// === 百度官方 API 推送(Token: us6P88n2ZJlVuUgC)=== function farsailing_baidu_api_push($post_id) { if (wp_is_post_revision($post_id)) return; $post = get_post($post_id); if ($post->post_status != 'publish' || $post->post_type != 'post') return; $url = get_permalink($post_id); $site = get_site_url(); $token = 'us6P88n2ZJlVuUgC'; $api = "http://data.zz.baidu.com/urls?site={$site}&token={$token}"; wp_remote_post($api, array( 'headers' => array('Content-Type' => 'text/plain'), 'body' => $url, 'blocking' => false, 'timeout' => 2, )); } add_action('save_post', 'farsailing_baidu_api_push', 98);
Fatal error: Uncaught Error: Call to undefined function zib_is_docs_mode() in /www/wwwroot/www.farsailing.cn/wp-content/themes/zibll/single.php:15 Stack trace: #0 /www/wwwroot/www.farsailing.cn/wp-includes/template-loader.php(74): include() #1 /www/wwwroot/www.farsailing.cn/wp-blog-header.php(19): require_once('/www/wwwroot/ww...') #2 /www/wwwroot/www.farsailing.cn/index.php(17): require('/www/wwwroot/ww...') #3 {main} thrown in /www/wwwroot/www.farsailing.cn/wp-content/themes/zibll/single.php on line 15