KnowAll 知识库、帮助台主题,去掉 Google 字体加速以及后台烦人的注册提示信息。

KnowAll 知识库、帮助台主题,去掉 Google 字体加速以及后台烦人的注册提示信息。

正在查看 2 个帖子:1-2 (共 2 个帖子)
  • 作者
    帖子
  • 风间
    参与者
    • 文章数量: 670
    @fengjian
    楼主

    找到主题的 /wp-content/themes/knowall/inc/support-helpers.php 文件,大约在 20 行

    原版的代码如下:

    		function ht_knowall_activation_reminder(){
    			$screen = get_current_screen();
    			$theme_license_status = get_option( 'knowall_license_key_status', false );
    			$hide_knowall_activation_reminder = apply_filters( 'hide_knowall_activation_reminder', false );
    			if( is_a($screen, 'WP_Screen') && 'appearance_page_knowall-license' != $screen->id && 'appearance_page_knowall-welcome' != $screen->id && 'valid' != $theme_license_status && !$hide_knowall_activation_reminder ):
    			    ?>
    			    <div class="notice notice-info is-dismissible">
    			        <p>
    			        	<?php _e( 'Your KnowAll key is not activated, you could be missing important updates and support.', 'knowall' ); ?> 
    			        	<a href="<?php echo admin_url( 'themes.php?page=knowall-license' ); ?>"><?php _e( 'Activate Now', 'knowall' ); ?></a>		        	
    			        </p>
    			    </div>
    			    <?php
    			endif;
    		}
    		

    要去掉后台的提示信息,修改为:

    		function ht_knowall_activation_reminder(){
    			$screen = get_current_screen();
    			$theme_license_status = get_option( 'knowall_license_key_status', true );
    			$hide_knowall_activation_reminder = apply_filters( 'hide_knowall_activation_reminder', true );
    			if( is_a($screen, 'WP_Screen') && 'appearance_page_knowall-license' != $screen->id && 'appearance_page_knowall-welcome' != $screen->id && 'valid' != $theme_license_status && !$hide_knowall_activation_reminder ):
    			    ?>
    			    <div class="notice notice-info is-dismissible">
    			        <p>
    			        	<?php _e( 'Your KnowAll key is not activated, you could be missing important updates and support.', 'knowall' ); ?>
    			        	<a href="<?php echo admin_url( 'themes.php?page=knowall-license' ); ?>"><?php _e( 'Activate Now', 'knowall' ); ?></a>
    			        </p>
    			    </div>
    			    <?php
    			endif;
    		}

    这样就不会再有了。

    风间
    参与者
    • 文章数量: 670
    @fengjian
    楼主

    找到主题的 /wp-content/themes/knowall/inc/kirki/includes/class-kirki-fonts-google.php 文件,大约在 334 行

    原版的代码如下:

    ), 'https://googlefonts.admincdn.com/css' );

    替换为:

    ), '#' );

    即可去掉 google 字体加速主题。

正在查看 2 个帖子:1-2 (共 2 个帖子)
  • 哎呀,回复话题必需登录。

话题信息