From ef4697fce6c7a5053d89f9313075770f402b3727 Mon Sep 17 00:00:00 2001 From: Seaton Jiang Date: Mon, 21 Sep 2020 12:15:00 +0800 Subject: [PATCH] feat: optimiz the bilibili citation method (#253) --- assets/js/buttons/more.js | 2 +- inc/theme-shortcode.php | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/assets/js/buttons/more.js b/assets/js/buttons/more.js index 42fbfec..e6ef4c5 100644 --- a/assets/js/buttons/more.js +++ b/assets/js/buttons/more.js @@ -277,7 +277,7 @@ title: '哔哩哔哩', image: url + '/images/bilibili.png', onclick: function () { - ed.selection.setContent('[bilibili cid=""]' + ed.selection.getContent() + '[/bilibili]') + ed.selection.setContent('[bilibili]' + ed.selection.getContent() + '[/bilibili]') } }) }, diff --git a/inc/theme-shortcode.php b/inc/theme-shortcode.php index eea2a7d..7ef6b8e 100644 --- a/inc/theme-shortcode.php +++ b/inc/theme-shortcode.php @@ -168,10 +168,7 @@ add_shortcode('youtube', 'youtube'); function bilibili($atts, $content = null, $code = "") { - extract(shortcode_atts(array("cid" => 'cid'), $atts)); - $return = '
'; return $return;