diff --git a/functions.php b/functions.php index 53d05ce..c7dab6b 100644 --- a/functions.php +++ b/functions.php @@ -94,12 +94,12 @@ function akina_setup() { remove_action( 'wp_head', 'wp_generator' ); //隐藏wordpress版本 remove_filter('the_content', 'wptexturize'); //取消标点符号转义 - remove_action('rest_api_init', 'wp_oembed_register_route'); - remove_filter('rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4); - remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10); - remove_filter('oembed_response_data', 'get_oembed_response_data_rich', 10, 4); - remove_action('wp_head', 'wp_oembed_add_discovery_links'); - remove_action('wp_head', 'wp_oembed_add_host_js'); + //remove_action('rest_api_init', 'wp_oembed_register_route'); + //remove_filter('rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4); + //remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10); + //remove_filter('oembed_response_data', 'get_oembed_response_data_rich', 10, 4); + //remove_action('wp_head', 'wp_oembed_add_discovery_links'); + //remove_action('wp_head', 'wp_oembed_add_host_js'); remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 ); function coolwp_remove_open_sans_from_wp_core() { @@ -481,7 +481,7 @@ add_action('get_header', 'set_post_views'); function get_post_views($post_id) { if (akina_option('statistics_api')=='wp_statistics'){ - if (!function_exists(wp_statistics_pages)) { + if (!function_exists('wp_statistics_pages')) { return '请安装 WP-Statistics 插件'; } else { return restyle_text(wp_statistics_pages('total','uri',$post_id)); @@ -1010,7 +1010,7 @@ global $wpsmiliestrans; if ( !get_option( 'use_smilies' ) ) return; - $wpsmiliestrans = [ + $wpsmiliestrans = array( ':good:' => 'icon_good.gif', ':han:' => 'icon_han.gif', ':spray:' => 'icon_spray.gif', @@ -1043,7 +1043,7 @@ if ( !get_option( 'use_smilies' ) ) ':niconiconi-t:' => 'icon_niconiconi_t.gif', ':niconiconit:' => 'icon_niconiconit.gif', ':awesome:' => 'icon_awesome.gif', - ]; + ); } smilies_reset(); @@ -1269,7 +1269,7 @@ function memory_archives_list() { $mon = $mon_tmp; $output .= '