Making WordPress.org

Changeset 13645


Ignore:
Timestamp:
05/02/2024 12:41:59 AM (2 years ago)
Author:
dd32
Message:

Plugin Directory: API: Overwrite the global $post, to ensure it works with pending plugins.

The public plugin endpoint was operational, but the pending wasn't after [13620].

See #7385.

File:
1 edited

Legend:

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

    r13620 r13645  
    9595         */
    9696        public function plugin_info_data( $request, $post ) {
    97                 global $post;
    98 
    99                 $plugin_slug = $post->post_name;
    100                 $post_id     = $post->ID;
     97                $GLOBALS['post'] = $post;
     98                $plugin_slug     = $post->post_name;
     99                $post_id         = $post->ID;
    101100
    102101                $result            = array();
Note: See TracChangeset for help on using the changeset viewer.