diff --git a/inc/theme-article.php b/inc/theme-article.php index 8b094e9..da5afd6 100644 --- a/inc/theme-article.php +++ b/inc/theme-article.php @@ -319,6 +319,10 @@ function comment_callbacks($comment, $args, $depth = 2) } // 文章评论表情 +if (empty(get_option('use_smilies'))) { + update_option('use_smilies', 1); +} + function custom_smilies_src($img_src, $img, $siteurl) { return ASSET_PATH . '/assets/img/smilies/' . $img; @@ -329,12 +333,10 @@ function disable_emojis_tinymce($plugins) { return array_diff($plugins, array('wpemoji')); } + function smilies_reset() { - global $wpsmiliestrans, $wp_smiliessearch, $wp_version; - if (!get_option('use_smilies') || $wp_version < 4.2) { - return; - } + global $wpsmiliestrans; $wpsmiliestrans = array( ':mrgreen:' => 'mrgreen.png', @@ -364,7 +366,7 @@ smilies_reset(); function smilies_custom_button() { - printf('' . __('添加表情', 'kratos') . '