diff --git a/inc/theme-article.php b/inc/theme-article.php index ec3268c..4dfd916 100644 --- a/inc/theme-article.php +++ b/inc/theme-article.php @@ -4,7 +4,7 @@ * 文章相关函数 * @author Seaton Jiang * @license GPL-3.0 License - * @version 2022.01.26 + * @version 2022.02.20 */ // 文章链接添加 target 和 rel @@ -454,6 +454,14 @@ function post_seo_callback($post) echo ''; } +if (kratos_option('g_image_filter', true)) { + add_action( 'admin_footer-post-new.php', 'fanly_mediapanel_lock_uploaded' ); + add_action( 'admin_footer-post.php', 'fanly_mediapanel_lock_uploaded' ); + function fanly_mediapanel_lock_uploaded() { + echo ''; + } +} + function wpdocs_save_meta_box($post_id) { global $new_meta_boxes; diff --git a/inc/theme-options.php b/inc/theme-options.php index 8725565..016ddfa 100644 --- a/inc/theme-options.php +++ b/inc/theme-options.php @@ -639,6 +639,13 @@ CSF::createSection($prefix, array( 'subtitle' => __('启用/禁用文章自动保存、修订版本功能', 'kratos'), 'default' => true, ), + array( + 'id' => 'g_image_filter', + 'type' => 'switcher', + 'title' => __('按类型筛选媒体库功能', 'kratos'), + 'subtitle' => __('启用/禁用按类型筛选媒体库功能功能', 'kratos'), + 'default' => true, + ), array( 'id' => 'g_article_widgets', 'type' => 'image_select',