Merge remote-tracking branch 'upstream/master'

pull/95/head
spirit 2019-07-18 15:13:18 +08:00
commit 8627909cd9
1 changed files with 10 additions and 10 deletions

View File

@ -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 '请安装 <a href="https://wordpress.org/plugins/wp-statistics/" target="_blank">WP-Statistics 插件</a>';
} 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 .= '<li class="al_li"><span class="al_mon">'.$mon.'月 (<span id="post-num"></span>篇文章)</span><ul class="al_post_list">'; //输出月份
}
$output .= '<li>'.'<a href="'. get_permalink() .'"><span style="color:#0bf;">'.get_the_time('d日 ') .'</span>'. get_the_title() .' <span>('.wp_statistics_pages('total',get_permalink(),get_the_ID()).' <span class="fa fa-fire" aria-hidden="true"></span> / '. get_comments_number('0', '1', '%') .' <span class="fa fa-commenting" aria-hidden="true"></span>)</span></a></li>'; //输出文章日期和标题
$output .= '<li>'.'<a href="'. get_permalink() .'"><span style="color:#0bf;">'.get_the_time('d日 ') .'</span>'. get_the_title() .' <span>('.get_post_views(get_the_ID()).' <span class="fa fa-fire" aria-hidden="true"></span> / '. get_comments_number('0', '1', '%') .' <span class="fa fa-commenting" aria-hidden="true"></span>)</span></a></li>'; //输出文章日期和标题
endwhile;
wp_reset_postdata();
$output .= '</ul></li></ul> <!--<ul class="al_mon_list"><li><ul class="al_post_list" style="display: block;"><li>博客已经萌萌哒运行了<span id="monitorday"></span>天</li></ul></li></ul>--></div>';