Making WordPress.org

Changeset 13076

Timestamp:
12/21/2023 05:40:09 AM (8 months ago)
Author:
tellyworth
Message:

Plugin Dir: Add Preview links for moderators in plugin queue

This adds private Playground Preview links for the plugin review team to more easily test newly submitted plugins that have not yet been published.

Plugins are loaded with plugin-check active.

See #7380.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php

    r13034 r13076  
    712712
    713713            printf(
    714                 '<a href="%1$s">%2$s</a><br>%3$s</li>',
     714                '<a href="%1$s">%2$s</a><br>%3$s</li>',
    715715                esc_url( $url ),
    716716                esc_html( $name ),
    717                 esc_html( $zip_size )
     717                esc_html( $zip_size ),
     718                esc_url( Template::preview_link_zip( $post->post_name, $zip_file->ID ) )
    718719            );
    719720        }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php

    r12862 r13076  
    128128                list( $zip_url, $zip_file ) = $zip;
    129129                $zip_size                   = size_format( filesize( get_attached_file( $zip_file->ID ) ), 1 );
     130
    130131
    131132                printf(
    132                     '<li>%1$s <a href="%2$s">%3$s</a> (%4$s)</li>',
     133                    '<li>%1$s <a href="%2$s">%3$s</a> (%4$s)</li>',
    133134                    esc_html( $zip_date ),
    134135                    esc_url( $zip_url ),
    135136                    esc_html( basename( $zip_url ) ),
    136                     esc_html( $zip_size )
     137                    esc_html( $zip_size ),
     138                    esc_url( $zip_preview )
    137139                );
    138140            }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-blueprint.php

    r13019 r13076  
    1818            'methods'             => array( \WP_REST_Server::READABLE, \WP_REST_Server::CREATABLE ),
    1919            'callback'            => array( $this, 'blueprint' ),
     20
    2021            'permission_callback' => '__return_true',
    2122            'args'                => array(
     
    3536    public function blueprint( $request ) {
    3637        $plugin = Plugin_Directory::get_plugin_post( $request['plugin_slug'] );
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
    3786
    3887        $blueprints = get_post_meta( $plugin->ID, 'assets_blueprints', true );
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php

    r13061 r13076  
    763763
    764764        return sprintf( 'https://playground.wordpress.net/?plugin=%s&blueprint-url=%s', esc_attr($post->post_name), esc_attr($blueprint['url'] ) );
     765
     766
     767
     768
     769
     770
     771
     772
     773
     774
     775
     776
     777
     778
     779
     780
     781
     782
     783
     784
     785
     786
     787
     788
     789
     790
     791
     792
     793
     794
     795
     796
     797
     798
     799
     800
     801
     802
     803
     804
     805
     806
     807
     808
     809
    765810    }
    766811
Note: See TracChangeset for help on using the changeset viewer.