diff --git a/functions.php b/functions.php index 2e2bfb7..6837f01 100644 --- a/functions.php +++ b/functions.php @@ -7,7 +7,7 @@ * @package Sakura */ -define( 'SAKURA_VERSION', '3.2.6' ); +define( 'SAKURA_VERSION', '3.2.7' ); define( 'BUILD_VERSION', '3' ); define( 'JSDELIVR_VERSION', '3.6.7' ); @@ -183,6 +183,7 @@ function sakura_scripts() { wp_enqueue_style( 'saukra_css', 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@' . SAKURA_VERSION . '/style.min.css', array(), SAKURA_VERSION ); wp_enqueue_script( 'app', 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@' . SAKURA_VERSION . '/js/sakura-app.min.js', array(), SAKURA_VERSION, true ); } + wp_enqueue_script( 'github_card', 'https://cdn.jsdelivr.net/github-cards/latest/widget.js', array(), SAKURA_VERSION, true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); @@ -1548,6 +1549,18 @@ function html_tag_parser($content) { title="$1">', $content ); + + //Github cards + $content=preg_replace( + '/\[github repo=[\'"]([^\'"]+)[\'"]\]/i', + ' + + ', + $content + ); } return $content; } diff --git a/js/sakura-app.js b/js/sakura-app.js index b86f824..ae36a12 100644 --- a/js/sakura-app.js +++ b/js/sakura-app.js @@ -1,5 +1,5 @@ /*! - * Sakura application bundle theme ver 3.2.0 + * Sakura theme application bundle * @author Mashiro * @url https://2heng.xin * @date 2019.8.3 diff --git a/style.css b/style.css index d8840ae..0e8b216 100644 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Theme URI: https://2heng.xin/theme-sakura/ Author: Mashiro, Louie, Fuzzz Author URI: http://2heng.xin Description: Akina主题分支(原版地址 http://www.akina.pw/themeakina) -Version: 3.2.4 +Version: 3.2.7 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: akina