diff --git a/lib/class-wp-rest-menu-items-controller.php b/lib/class-wp-rest-menu-items-controller.php index 84f0c48d42d49..aeae2bb8706d9 100644 --- a/lib/class-wp-rest-menu-items-controller.php +++ b/lib/class-wp-rest-menu-items-controller.php @@ -543,17 +543,6 @@ protected function prepare_item_for_database( $request ) { $prepared_nav_item[ $key ] = implode( ' ', array_map( 'sanitize_html_class', $value ) ); } - // Apply the same filters as when calling wp_insert_post(). - - /** This filter is documented in wp-includes/post.php */ - $prepared_nav_item['menu-item-title'] = wp_unslash( apply_filters( 'title_save_pre', wp_slash( $prepared_nav_item['menu-item-title'] ) ) ); - - /** This filter is documented in wp-includes/post.php */ - $prepared_nav_item['menu-item-attr-title'] = wp_unslash( apply_filters( 'excerpt_save_pre', wp_slash( $prepared_nav_item['menu-item-attr-title'] ) ) ); - - /** This filter is documented in wp-includes/post.php */ - $prepared_nav_item['menu-item-description'] = wp_unslash( apply_filters( 'content_save_pre', wp_slash( $prepared_nav_item['menu-item-description'] ) ) ); - // Valid url. if ( '' !== $prepared_nav_item['menu-item-url'] ) { $prepared_nav_item['menu-item-url'] = esc_url_raw( $prepared_nav_item['menu-item-url'] );