Making WordPress.org

Changeset 13105

Timestamp:
01/12/2024 05:29:18 AM (7 months ago)
Author:
tellyworth
Message:

Plugin Directory: Load plugin dependencies in mod preview

When plugin moderators are previewing a plugin in Playground, this will attempt to load a plugin's depenedencies, for easier testing.

It also loads a small helper plugin.

See #7380.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-blueprint.php

    r13088 r13105  
    5858    }
    5959
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
    6074    function reviewer_blueprint( $request, $plugin ) {
    6175        // Direct zip preview for plugin reviewers
     
    6983                        $landing_page = '/wp-admin/plugins.php';
    7084                        $activate_plugin = true;
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
    7195
    7296                        // Plugin deactivated, and land on the Plugin Check page
    7397                        if ( 'pcp' === $request->get_param('type') ) {
    74                             $landing_page = '/wp-admin/admin.php?page=plugin-check';
     98                            $landing_page = '/wp-admin/admin.php?page=plugin-check;
    7599                            $activate_plugin = false;
     100
    76101                        }
    77102
     
    91116                                (object)[
    92117                                    'step' => 'installPlugin',
    93                                     'pluginZipFile' => [
     118                                    'pluginZipFile' => [
    94119                                        'resource' => 'wordpress.org/plugins',
    95120                                        'slug'     => 'plugin-check',
     
    114139                        ];
    115140
     141
     142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
    116177                        $output = json_encode( $zip_blueprint );
    117178
Note: See TracChangeset for help on using the changeset viewer.