diff --git a/functions.php b/functions.php index 674f75e..abbcefa 100644 --- a/functions.php +++ b/functions.php @@ -1884,4 +1884,13 @@ function create_sakura_table() } add_action('after_setup_theme', 'create_sakura_table'); +//rest api支持 +function permalink_tip() +{ + if ( !get_option('permalink_structure') ){ + $msg = __(' For a better experience, please do not set permalink as plain. To do this, you may need to configure pseudo-static . ','sakura'); /*为了更好的使用体验,请不要将固定链接设置为朴素。为此,您可能需要配置伪静态*/ + echo '

' . $msg . '

'; + } +} +add_action('admin_notices', 'permalink_tip'); //code end diff --git a/js/sakura-app.js b/js/sakura-app.js index f8ae077..b581098 100644 --- a/js/sakura-app.js +++ b/js/sakura-app.js @@ -989,7 +989,9 @@ function activate_widget(){ $("#secondary").remove(); } } -activate_widget(); +setTimeout(function () { + activate_widget(); +}, 100); mashiro_global.ini.normalize(); loadCSS(mashiro_option.jsdelivr_css_src);