WordPress 上的 Argon – 更多表情包插件
本文最后更新于 98 天前,其中的信息可能已经有所发展或是发生改变。

引言

为什么要写这个插件

看到网上非常丰富的表情包,又看到自己博客的表情包,全网用烂了的 Emoji,颜文字,和 Argon 博客里用烂了的花,于是我就在想“能不能给我的博客添加一些更好的表情包”,说干就干,我立即开始寻找 WP 评论的表情包插件,但我找到的这些几乎完全不适配我所使用的 Argon 主题。那怎么办?只能像之前那个 Gravatar 镜像源加速器插件一样自己一个写了呗。

我打开 Argon 主题的文档,果真发现的表情包插件的开发文档和插件开发模板 -> 传送门

于是我根据这套模板开发了这个插件(技术还是不太过关,理解一下)因为目前不知道如何通过后台设置来控制表情包的启用和禁用,所以只能写成选择性下载的方式,管理员可以根据需求下载表情包。

注意:该插件目前仅适配 WordPress 上的 Argon 主题,其余主题全部用不了

使用方法如下

使用方法

下载并安装插件

过程不就多说了,和之前 Gravatar 插件文章中讲到的差不多 -> 传送门

源码在最底下

启用插件

安装完成后点击启用即可,这步那篇文章中也有讲 -> 传送门

然后就可以在评论区看到这个表情包了

源代码

暂时还没在 GitHub 上发布,最近网有点问题上不去 GitHub

<?php
/**
 * Plugin Name: Argon - 更多表情包
 * Plugin URI:  https://xiaozhao233.top/
 * Description: 为了让评论区更丰富,我们收录了多个可用的表情组供您选择,来源包括 B站,QQ,微信等。所以请确保您对这些表情的使用是非商业性质的,是符合版权相关法律法规的。因本插件造成的一切纠纷均与作者无关,作者不承担任何责任及连带责任。本插件目前仅适配 Argon 主题。
 * Version: 1.8.317
 * Author: 中国的小赵
 * Author URI: https://xiaozhao233.top/
 */
function add_more_emotions($emotionList){
	array_push(
		$emotionList,
        array(
            'groupname' => 'Bmoji', 
            'list' => array(
                array('type' => 'sticker', 'code' => 'bilibili-三星堆', 'src' => 'https://gh.xiaozhao233.top/bmoji/sanxingdui.png'),
                array('type' => 'sticker', 'code' => 'bilibili-脱单doge', 'src' => 'https://gh.xiaozhao233.top/bmoji/tuodan-doge.png'),
                array('type' => 'sticker', 'code' => 'bilibili-微笑', 'src' => 'https://gh.xiaozhao233.top/bmoji/weixiao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-口罩', 'src' => 'https://gh.xiaozhao233.top/bmoji/kouzhao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-doge', 'src' => 'https://gh.xiaozhao233.top/bmoji/doge.png'),
                array('type' => 'sticker', 'code' => 'bilibili-妙啊', 'src' => 'https://gh.xiaozhao233.top/bmoji/miaoa.png'),
                array('type' => 'sticker', 'code' => 'bilibili-ok', 'src' => 'https://gh.xiaozhao233.top/bmoji/ok.png'),
                array('type' => 'sticker', 'code' => 'bilibili-星星眼', 'src' => 'https://gh.xiaozhao233.top/bmoji/xingxingyan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-辣眼睛', 'src' => 'https://gh.xiaozhao233.top/bmoji/layanjing.png'),
                array('type' => 'sticker', 'code' => 'bilibili-吃瓜', 'src' => 'https://gh.xiaozhao233.top/bmoji/chigua.png'),
                array('type' => 'sticker', 'code' => 'bilibili-滑稽', 'src' => 'https://gh.xiaozhao233.top/bmoji/huaji.png'),
                array('type' => 'sticker', 'code' => 'bilibili-呲牙', 'src' => 'https://gh.xiaozhao233.top/bmoji/ciya.png'),
                array('type' => 'sticker', 'code' => 'bilibili-打call', 'src' => 'https://gh.xiaozhao233.top/bmoji/dacall.png'),
                array('type' => 'sticker', 'code' => 'bilibili-歪嘴', 'src' => 'https://gh.xiaozhao233.top/bmoji/waizui.png'),
                array('type' => 'sticker', 'code' => 'bilibili-调皮', 'src' => 'https://gh.xiaozhao233.top/bmoji/tiaopi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-2022', 'src' => 'https://gh.xiaozhao233.top/bmoji/2022.png'),
                array('type' => 'sticker', 'code' => 'bilibili-虎年', 'src' => 'https://gh.xiaozhao233.top/bmoji/hunian.png'),
                array('type' => 'sticker', 'code' => 'bilibili-豹富', 'src' => 'https://gh.xiaozhao233.top/bmoji/baofu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-嗑瓜子', 'src' => 'https://gh.xiaozhao233.top/bmoji/keguazi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-笑哭', 'src' => 'https://gh.xiaozhao233.top/bmoji/xiaoku.png'),
                array('type' => 'sticker', 'code' => 'bilibili-藏狐', 'src' => 'https://gh.xiaozhao233.top/bmoji/zanghu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-脸红', 'src' => 'https://gh.xiaozhao233.top/bmoji/lianhong.png'),
                array('type' => 'sticker', 'code' => 'bilibili-给心心', 'src' => 'https://gh.xiaozhao233.top/bmoji/geixinxin.png'),
                array('type' => 'sticker', 'code' => 'bilibili-嘟嘟', 'src' => 'https://gh.xiaozhao233.top/bmoji/dudu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-哦呼', 'src' => 'https://gh.xiaozhao233.top/bmoji/ohu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-喜欢', 'src' => 'https://gh.xiaozhao233.top/bmoji/xihuan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-酸了', 'src' => 'https://gh.xiaozhao233.top/bmoji/suanle.png'),
                array('type' => 'sticker', 'code' => 'bilibili-嫌弃', 'src' => 'https://gh.xiaozhao233.top/bmoji/xianqi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-大哭', 'src' => 'https://gh.xiaozhao233.top/bmoji/daku.png'),
                array('type' => 'sticker', 'code' => 'bilibili-害羞', 'src' => 'https://gh.xiaozhao233.top/bmoji/haixiu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-疑惑', 'src' => 'https://gh.xiaozhao233.top/bmoji/yihuo.png'),
                array('type' => 'sticker', 'code' => 'bilibili-喜极而泣', 'src' => 'https://gh.xiaozhao233.top/bmoji/xijierqi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-奸笑', 'src' => 'https://gh.xiaozhao233.top/bmoji/jianxiao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-笑', 'src' => 'https://gh.xiaozhao233.top/bmoji/xiao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-偷笑', 'src' => 'https://gh.xiaozhao233.top/bmoji/touxiao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-惊讶', 'src' => 'https://gh.xiaozhao233.top/bmoji/jingya.png'),
                array('type' => 'sticker', 'code' => 'bilibili-捂脸', 'src' => 'https://gh.xiaozhao233.top/bmoji/wulian.png'),
                array('type' => 'sticker', 'code' => 'bilibili-阴险', 'src' => 'https://gh.xiaozhao233.top/bmoji/yinxian.png'),
                array('type' => 'sticker', 'code' => 'bilibili-囧', 'src' => 'https://gh.xiaozhao233.top/bmoji/jiong.png'),
                array('type' => 'sticker', 'code' => 'bilibili-呆', 'src' => 'https://gh.xiaozhao233.top/bmoji/dai.png'),
                array('type' => 'sticker', 'code' => 'bilibili-抠鼻', 'src' => 'https://gh.xiaozhao233.top/bmoji/koubi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-大笑', 'src' => 'https://gh.xiaozhao233.top/bmoji/daxiao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-惊喜', 'src' => 'https://gh.xiaozhao233.top/bmoji/jingxi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-无语', 'src' => 'https://gh.xiaozhao233.top/bmoji/wuyu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-点赞', 'src' => 'https://gh.xiaozhao233.top/bmoji/dianzan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-鼓掌', 'src' => 'https://gh.xiaozhao233.top/bmoji/guzhang.png'),
                array('type' => 'sticker', 'code' => 'bilibili-尴尬', 'src' => 'https://gh.xiaozhao233.top/bmoji/ganga.png'),
                array('type' => 'sticker', 'code' => 'bilibili-灵魂出窍', 'src' => 'https://gh.xiaozhao233.top/bmoji/linghunchuqiao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-委屈', 'src' => 'https://gh.xiaozhao233.top/bmoji/weiqu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-傲娇', 'src' => 'https://gh.xiaozhao233.top/bmoji/aojiao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-疼', 'src' => 'https://gh.xiaozhao233.top/bmoji/teng.png'),
                array('type' => 'sticker', 'code' => 'bilibili-冷', 'src' => 'https://gh.xiaozhao233.top/bmoji/leng.png'),
                array('type' => 'sticker', 'code' => 'bilibili-热', 'src' => 'https://gh.xiaozhao233.top/bmoji/re.png'),
                array('type' => 'sticker', 'code' => 'bilibili-生病', 'src' => 'https://gh.xiaozhao233.top/bmoji/shengbing.png'),
                array('type' => 'sticker', 'code' => 'bilibili-吓', 'src' => 'https://gh.xiaozhao233.top/bmoji/xia.png'),
                array('type' => 'sticker', 'code' => 'bilibili-吐', 'src' => 'https://gh.xiaozhao233.top/bmoji/tu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-捂眼', 'src' => 'https://gh.xiaozhao233.top/bmoji/wuyan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-嘘声', 'src' => 'https://gh.xiaozhao233.top/bmoji/xusheng.png'),
                array('type' => 'sticker', 'code' => 'bilibili-思考', 'src' => 'https://gh.xiaozhao233.top/bmoji/sikao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-再见', 'src' => 'https://gh.xiaozhao233.top/bmoji/zaijian.png'),
                array('type' => 'sticker', 'code' => 'bilibili-翻白眼', 'src' => 'https://gh.xiaozhao233.top/bmoji/fanbaiyan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-哈欠', 'src' => 'https://gh.xiaozhao233.top/bmoji/haqian.png'),
                array('type' => 'sticker', 'code' => 'bilibili-奋斗', 'src' => 'https://gh.xiaozhao233.top/bmoji/fendou.png'),
                array('type' => 'sticker', 'code' => 'bilibili-墨镜', 'src' => 'https://gh.xiaozhao233.top/bmoji/mojing.png'),
                array('type' => 'sticker', 'code' => 'bilibili-难过', 'src' => 'https://gh.xiaozhao233.top/bmoji/nanguo.png'),
                array('type' => 'sticker', 'code' => 'bilibili-撇嘴', 'src' => 'https://gh.xiaozhao233.top/bmoji/piezui.png'),
                array('type' => 'sticker', 'code' => 'bilibili-抓狂', 'src' => 'https://gh.xiaozhao233.top/bmoji/zhuakuang.png'),
                array('type' => 'sticker', 'code' => 'bilibili-生气', 'src' => 'https://gh.xiaozhao233.top/bmoji/shengqi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-水稻', 'src' => 'https://gh.xiaozhao233.top/bmoji/shuidao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-奶茶干杯', 'src' => 'https://gh.xiaozhao233.top/bmoji/naichaganbei.png'),
                array('type' => 'sticker', 'code' => 'bilibili-汤圆', 'src' => 'https://gh.xiaozhao233.top/bmoji/tangyuan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-锦鲤', 'src' => 'https://gh.xiaozhao233.top/bmoji/jinli.png'),
                array('type' => 'sticker', 'code' => 'bilibili-福到了', 'src' => 'https://gh.xiaozhao233.top/bmoji/fudaole.png'),
                array('type' => 'sticker', 'code' => 'bilibili-鸡腿', 'src' => 'https://gh.xiaozhao233.top/bmoji/jitui.png'),
                array('type' => 'sticker', 'code' => 'bilibili-雪花', 'src' => 'https://gh.xiaozhao233.top/bmoji/xuehua.png'),
                array('type' => 'sticker', 'code' => 'bilibili-视频卫星', 'src' => 'https://gh.xiaozhao233.top/bmoji/shipinweixing.png'),
                array('type' => 'sticker', 'code' => 'bilibili-可乐干杯', 'src' => 'https://gh.xiaozhao233.top/bmoji/keleganbei.png'),
                array('type' => 'sticker', 'code' => 'bilibili-黑洞', 'src' => 'https://gh.xiaozhao233.top/bmoji/heidong.png'),
                array('type' => 'sticker', 'code' => 'bilibili-爱心', 'src' => 'https://gh.xiaozhao233.top/bmoji/aixin.png'),
                array('type' => 'sticker', 'code' => 'bilibili-胜利', 'src' => 'https://gh.xiaozhao233.top/bmoji/shengli.png'),
                array('type' => 'sticker', 'code' => 'bilibili-加油', 'src' => 'https://gh.xiaozhao233.top/bmoji/jiayou.png'),
                array('type' => 'sticker', 'code' => 'bilibili-抱拳', 'src' => 'https://gh.xiaozhao233.top/bmoji/baoquan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-响指', 'src' => 'https://gh.xiaozhao233.top/bmoji/xiangzhi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-保佑', 'src' => 'https://gh.xiaozhao233.top/bmoji/baoyou.png'),
                array('type' => 'sticker', 'code' => 'bilibili-支持', 'src' => 'https://gh.xiaozhao233.top/bmoji/zhichi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-拥抱', 'src' => 'https://gh.xiaozhao233.top/bmoji/yongbao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-跪了', 'src' => 'https://gh.xiaozhao233.top/bmoji/guile.png'),
                array('type' => 'sticker', 'code' => 'bilibili-怪我咯', 'src' => 'https://gh.xiaozhao233.top/bmoji/guaiwolo.png'),
                array('type' => 'sticker', 'code' => 'bilibili-老鼠', 'src' => 'https://gh.xiaozhao233.top/bmoji/laoshu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-牛年', 'src' => 'https://gh.xiaozhao233.top/bmoji/niunian.png'),
                array('type' => 'sticker', 'code' => 'bilibili-洛天依', 'src' => 'https://gh.xiaozhao233.top/bmoji/luotianyi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-坎公骑冠剑-吃鸡', 'src' => 'https://gh.xiaozhao233.top/bmoji/kangongqiguanjian-chiji.png'),
                array('type' => 'sticker', 'code' => 'bilibili-坎公骑冠剑-钻石', 'src' => 'https://gh.xiaozhao233.top/bmoji/kangongqiguanjian-zuanshi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-坎公骑冠剑-无语', 'src' => 'https://gh.xiaozhao233.top/bmoji/kangongqiguanjian-wuyu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-来古-沉思', 'src' => 'https://gh.xiaozhao233.top/bmoji/laigu-chensi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-来古-呆滞', 'src' => 'https://gh.xiaozhao233.top/bmoji/laigu-daizhi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-来古-疑问', 'src' => 'https://gh.xiaozhao233.top/bmoji/laigu-yiwen.png'),
                array('type' => 'sticker', 'code' => 'bilibili-来古-震撼', 'src' => 'https://gh.xiaozhao233.top/bmoji/laigu-zhenhan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-来古-注意', 'src' => 'https://gh.xiaozhao233.top/bmoji/laigu-zhuyi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-原神-哇', 'src' => 'https://gh.xiaozhao233.top/bmoji/yuanshen-wa.png'),
                array('type' => 'sticker', 'code' => 'bilibili-原神-哼', 'src' => 'https://gh.xiaozhao233.top/bmoji/yuanshen-heng.png'),
                array('type' => 'sticker', 'code' => 'bilibili-原神-嗯', 'src' => 'https://gh.xiaozhao233.top/bmoji/yuanshen-en.png'),
                array('type' => 'sticker', 'code' => 'bilibili-原神-欸嘿', 'src' => 'https://gh.xiaozhao233.top/bmoji/yuanshen-eihei.png'),
                array('type' => 'sticker', 'code' => 'bilibili-原神-喝茶', 'src' => 'https://gh.xiaozhao233.top/bmoji/yuanshen-hecha.png'),
                array('type' => 'sticker', 'code' => 'bilibili-原神-生气', 'src' => 'https://gh.xiaozhao233.top/bmoji/yuanshen-shengqi.png'),
                array('type' => 'sticker', 'code' => 'bilibili-保卫萝卜-白眼', 'src' => 'https://gh.xiaozhao233.top/bmoji/baoweiluobo-baiyan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-保卫萝卜-笔芯', 'src' => 'https://gh.xiaozhao233.top/bmoji/baoweiluobo-bixin.png'),
                array('type' => 'sticker', 'code' => 'bilibili-保卫萝卜-哭哭', 'src' => 'https://gh.xiaozhao233.top/bmoji/baoweiluobo-kuku.png'),
                array('type' => 'sticker', 'code' => 'bilibili-保卫萝卜-哇', 'src' => 'https://gh.xiaozhao233.top/bmoji/baoweiluobo-wa.png'),
                array('type' => 'sticker', 'code' => 'bilibili-保卫萝卜-问号', 'src' => 'https://gh.xiaozhao233.top/bmoji/baoweiluobo-wenhao.png'),
                array('type' => 'sticker', 'code' => 'bilibili-无悔华夏-不愧是你', 'src' => 'https://gh.xiaozhao233.top/bmoji/wuhuihuaxia-bukuishini.png'),
                array('type' => 'sticker', 'code' => 'bilibili-无悔华夏-吃瓜', 'src' => 'https://gh.xiaozhao233.top/bmoji/wuhuihuaxia-chigua.png'),
                array('type' => 'sticker', 'code' => 'bilibili-无悔华夏-哒咩', 'src' => 'https://gh.xiaozhao233.top/bmoji/wuhuihuaxia-damie.png'),
                array('type' => 'sticker', 'code' => 'bilibili-无悔华夏-点赞', 'src' => 'https://gh.xiaozhao233.top/bmoji/wuhuihuaxia-dianzan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-无悔华夏-好耶', 'src' => 'https://gh.xiaozhao233.top/bmoji/wuhuihuaxia-haoye.png'),
                array('type' => 'sticker', 'code' => 'bilibili-奥比岛-搬砖', 'src' => 'https://gh.xiaozhao233.top/bmoji/aobidao-banzhuan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-奥比岛-点赞', 'src' => 'https://gh.xiaozhao233.top/bmoji/aobidao-dianzan.png'),
                array('type' => 'sticker', 'code' => 'bilibili-奥比岛-击爪', 'src' => 'https://gh.xiaozhao233.top/bmoji/aobidao-jizhua.png'),
                array('type' => 'sticker', 'code' => 'bilibili-奥比岛-委屈', 'src' => 'https://gh.xiaozhao233.top/bmoji/aobidao-weiqu.png'),
                array('type' => 'sticker', 'code' => 'bilibili-奥比岛-喜欢', 'src' => 'https://gh.xiaozhao233.top/bmoji/aobidao-xihuan.png'),
                //array('type' => 'sticker', 'code' => 'bilibili-', 'src' => 'https://gh.xiaozhao233.top/bmoji/'),
            ),
        ),
    );
    return $emotionList;
}
add_filter('argon_emotion_list' , 'add_more_emotions');
?>

评论

  1. 博主 置顶
    Windows Chrome
    1月前
    2022-12-22 14:20:06

    为了省一点 GitHub repo 空间,给这些表情包专门开了个新的 repo,表情包文件的域名从 gh 移到了 emote.xzcn.eu.org,路径还是不变,用的时候记得改改,Ctrl + H 然后全局替换域名就行了😅

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Bmoji
热词系列
TVmoji
小电视
2233娘
那兔
洛天依
红小豆
上一篇
下一篇