PluginProbe
Gutenberg / 8.5.1
Gutenberg v8.5.1
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
← All changes | lib/class-wp-rest-customizer-nonces.php +2 -1 12.6.0 → 8.5.1 View file →
@@ -42,11 +42,12 @@
42 42
43 43 /**
44 44 * Checks if a given request has access to read menu items if they have access to edit them.
45 45 *
46 + * @param WP_REST_Request $request Full details about the request.
46 47 * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
47 48 */
48 - public function permissions_check() {
49 + public function permissions_check( $request ) {
49 50 $post_type = get_post_type_object( 'nav_menu_item' );
50 51 if ( ! current_user_can( $post_type->cap->edit_posts ) ) {
51 52 return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit posts in this post type.', 'gutenberg' ), array( 'status' => rest_authorization_required_code() ) );
52 53 }