详细的WordPress 自定义文章类型终极教程——注册到修改到删除
自定义文章类型可以帮助我们快速的用WordPress实现很多项目开发,比如项目管理、CRM系统等,多个自定义文章类型相互关联使用非常好用,但是里面的参数太多,这里详细说一下具体每一个参数的用……
2023年3月24日
// 屏蔽 REST API
remove_action('init', 'rest_api_init' );
remove_action('rest_api_init', 'rest_api_default_filters', 10 );
remove_action('parse_request', 'rest_api_loaded' );
add_filter('rest_enabled', '__return_false');
add_filter('rest_jsonp_enabled','__return_false');
// 移除头部 wp-json 标签和 HTTP header 中的 link
remove_action('wp_head', 'rest_output_link_wp_head', 10 );
remove_action('template_redirect', 'rest_output_link_header', 11);
remove_action('xmlrpc_rsd_apis', 'rest_output_rsd');
remove_action('auth_cookie_malformed', 'rest_cookie_collect_status');
remove_action('auth_cookie_expired', 'rest_cookie_collect_status');
remove_action('auth_cookie_bad_username', 'rest_cookie_collect_status');
remove_action('auth_cookie_bad_hash', 'rest_cookie_collect_status');
remove_action('auth_cookie_valid', 'rest_cookie_collect_status');
remove_filter('rest_authentication_errors', 'rest_cookie_check_errors', 100 );
本文由「
WordPress贰佰技 」 原创或整理后发布,欢迎分享和转发。
原文地址:
https://www.wp200.com/p/73.html 发布于
2022年12月11日