子比主题自定义猫雷表情包

先修改 zibll/inc/functions/functions.php 第1677这段/*代码*/屏蔽1690行替换下方代码

//表情

    if ('smilie' == $type) {

        $but = '<a class="but btn-input-expand input-smilie mr6" href="javascript:;"><i class="fa fa-fw fa-smile-o"></i><span class="hide-sm">表情</span></a>';        $smilie_icon_args = array('Nayru-dead','Nayru-eat','Nayru-ehh','Nayru-goodnight','Nayru-look','Nayru-love','Nayru-no','Nayru-thanks','Nayru-to','Nayru-yeah','Nyaru-addoil','Nyaru-angle','Nyaru-angry','Nyaru-block','Nyaru-foofoo','Nyaru-haha','Nyaru-haha2','Nyaru-loveforever','Nyaru-mua','Nyaru-nb','Nyaru-question','Nyaru-sodayo','Nyaru-sorry','Nyaru-www','Nyaru-yes');

        $smilie_icon = '';

        $img_url = ZIB_TEMPLATE_DIRECTORY_URI . '/img/Nyaru/';

        $lazy_attr = zib_is_lazy('lazy_other', true) ? 'class="lazyload" data-' : '';

        foreach ($smilie_icon_args as $smilie_i) {

            $smilie_icon .= '<a class="smilie-icon" href="javascript:;" data-smilie="' . $smilie_i . '"><img ' . $lazy_attr . 'src="' . $img_url . $smilie_i . '.webp" alt="[' . $smilie_i . ']" /></a>';

        }

        $dropdown = '<div class="dropdown-smilie scroll-y mini-scrollbar">' . $smilie_icon . '</div>';

    }

 

 

然后将表情包上传到 wp-content/themes/zibll/img/文件夹解压即可 别整错了

 

蓝奏云网盘免费下载:

https://kkbia.lanzoue.com/i2xrj0y6w6ze

 

然后修改目录下

/wp-content/themes/zibll/inc/functions/zib-comment-list.php

第334行替换为下方代码

$cont = preg_replace('/\[g=(.*?)\]/', '<img class="smilie-icon" src="' . ZIB_TEMPLATE_DIRECTORY_URI . '/img/Nyaru/$1.webp" alt="表情[$1]' . zib_get_delimiter_blog_name() . '">', $cont);

 

 

最后修改图片显示大小 博客后台-主题设置-自定义代码-自定义CSS代码

.dropdown-smilie .smilie-icon {

width: 60px !important;

}

.smilie-icon {

width: 60px !important;

}

 

以上教程结束,希望对你有帮助

 

© 版权声明
THE END
喜欢就支持一下吧
点赞11赞赏 分享
评论 共2条

请登录后发表评论