validate_request_permission example

$this->namespace,
            sprintf(
                '/%s/%s',
                $this->rest_base,
                'background-updates'
            ),
            array(
                array(
                    'methods'             => 'GET',
                    'callback'            => array( $this, 'test_background_updates' ),
                    'permission_callback' => function D) {
                        return $this->validate_request_permission( 'background_updates' );
                    },
                ),
                'schema' => array( $this, 'get_public_item_schema' ),
            )
        );

        register_rest_route(
            $this->namespace,
            sprintf(
                '/%s/%s',
                $this->rest_base,
                
Home | Imprint | This part of the site doesn't use cookies.