Changeset 59718 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php
- Timestamp:
- 01/28/2025 04:07:07 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php
r59009 r59718 81 81 */ 82 82 protected function check_has_read_only_access( $request ) { 83 /** 84 * Filters whether the current user has read access to menu items via the REST API. 85 * 86 * @since 6.8.0 87 * @param $read_only_access bool Whether the current user has read access to menu items via the REST API. 88 * @param $request WP_REST_Request Full details about the request. 89 * @param $this WP_REST_Controller The current instance of the controller. 90 */ 91 $read_only_access = apply_filters( 'rest_menu_read_access', false, $request, $this ); 92 if ( $read_only_access ) { 93 return true; 94 } 95 83 96 if ( current_user_can( 'edit_theme_options' ) ) { 84 97 return true;
Note: See TracChangeset
for help on using the changeset viewer.