diff --git a/functions.php b/functions.php index 9a91b6d..e955648 100644 --- a/functions.php +++ b/functions.php @@ -42,8 +42,8 @@ function custom_posts_per_page($query){ remove_filter('the_content', 'wptexturize'); // 禁止代码标点符合转义 // 禁用REST API、移除wp-json链接 -add_filter('rest_enabled', '_return_false'); -add_filter('rest_jsonp_enabled', '_return_false'); +add_filter('rest_enabled', '__return_false'); +add_filter('rest_jsonp_enabled', '__return_false'); remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 ); @@ -162,4 +162,4 @@ function yayu_enqueue_scripts() } //add_action('wp_enqueue_scripts', 'yayu_enqueue_scripts'); endif; -?> \ No newline at end of file +?>