diff --git a/inc/theme-article.php b/inc/theme-article.php index 41856d4..8d2485e 100644 --- a/inc/theme-article.php +++ b/inc/theme-article.php @@ -3,7 +3,7 @@ * 文章相关函数 * @author Seaton Jiang * @license MIT License - * @version 2020.04.12 + * @version 2020.06.13 */ // 文章链接添加 target 和 rel @@ -337,13 +337,11 @@ function smilies_reset() } smilies_reset(); -function smilies_custom_button($context) +function smilies_custom_button() { - $context .= '' . __('添加表情', 'kratos') . '
' . get_wpsmiliestrans() . '
'; - return $context; + printf('' . __('添加表情', 'kratos') . '
' . get_wpsmiliestrans() . '
'); } - -add_action('media_buttons_context', 'smilies_custom_button'); +add_action('media_buttons', 'smilies_custom_button'); function get_wpsmiliestrans() {