Making WordPress.org

Changeset 12157


Ignore:
Timestamp:
10/31/2022 01:18:25 AM (20 months ago)
Author:
dd32
Message:

Plugin Directory: Define missing 'permission_callback' for the plugins info endpoint.

File:
1 edited

Legend:

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

    r11374 r12157  
    2121    function __construct() {
    2222        register_rest_route( 'plugins/v1', '/plugin/(?P<plugin_slug>[^/]+)/?', array(
    23             'methods'  => WP_REST_Server::READABLE,
    24             'callback' => array( $this, 'plugin_info' ),
    25             'args'     => array(
     23            'methods'             => WP_REST_Server::READABLE,
     24            'callback'            => array( $this, 'plugin_info' ),
     25            'permission_callback' => '__return_true',
     26            'args'                => array(
    2627                'plugin_slug' => array(
    2728                    'validate_callback' => array( $this, 'validate_plugin_slug_callback' ),
Note: See TracChangeset for help on using the changeset viewer.