From 57d40cc8accb195deb61c8bb6d39e33cb69b6d30 Mon Sep 17 00:00:00 2001 From: feng Date: Sun, 16 Apr 2023 23:50:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/cravatar.php | 115 +++++++++++++++ languages/wpavatar-zh_CN.mo | Bin 5687 -> 1904 bytes languages/wpavatar-zh_CN.po | 285 +++++++----------------------------- languages/wpavatar-zh_TW.mo | Bin 5195 -> 1904 bytes languages/wpavatar-zh_TW.po | 266 +++++++++------------------------ wpavatar.php | 64 +++----- 6 files changed, 253 insertions(+), 477 deletions(-) create mode 100644 includes/cravatar.php diff --git a/includes/cravatar.php b/includes/cravatar.php new file mode 100644 index 0000000..028b173 --- /dev/null +++ b/includes/cravatar.php @@ -0,0 +1,115 @@ +'.__('You can update your profile picture at Cravatar.cn', 'wpavatar').''; + } + + if (get_option('wpavatar_enable_cravatar', '0') == '1') { + add_filter('user_profile_picture_description', 'set_user_profile_picture_for_cravatar', 1); + } +} + +add_action('admin_menu', 'wpavatar_create_settings_page'); + +function wpavatar_create_settings_page() +{ + add_options_page( + __('Avatar Settings', 'wpavatar'), + __('Avatar', 'wpavatar'), + 'manage_options', + 'wpavatar-settings', + 'wpavatar_render_settings_page' + ); + +} + +function wpavatar_render_settings_page() +{ + ?> +
+

+

+

Cravatar.cn.

+
+ + + + + + + + + + +
+ + + +
+ +
+
+ `v~s-pwq#bIHZ0 zQVUHXwF%acm{d@!ghCS^Qb_anMetehL0<&*cJCggox!v14B@a3<`FZ|3*? z{dRVLK7RNU4ed$vXVI6@pH|~Tc%W6lqu>R#RQ`t`>Sgc&tSBMx)N znJEb^O6GDZ?FmMtASareY)<+MHm4nAN|cF7IVn39l}t@t5}iz?Ho)mvk&$LF?TpaQ zGN(vQ);ep_mW9}(gU~p*8+w))mqd)WHZ+4LwP6Zf{RPVN%+p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m=8w$xJ>M9G=gPP8YTf zmGSrQ%^#Q#o<9z)u3qJf)$o(uJM)9xLC*_NEi*Zjf8}tAM*euOKR?I(y#tx)H(6%# zq(3<4cfE;W$X$??<#+G%r@L9HYy8pO!AOtaHv!47`r&$1y1~07x#{Gq*^%*Jc-Eio zE77G?I!I5dEy(Cky_4_g4febap9H-fa87opGcz*>Ka(q8J55St$NK!4X_kHQaBk-= z=1-l^Ob!up$Ir9e*>nEH%PcrI;qMz@!CP;`Vk|$?pPxSxoH-^3Fz%1-%*-7OLj;1c zVCoRfBj79jL=+^Fy@G*rRj!@+M zt~p4ZADJO{$Slc^9mj`Ca>RXQ!ZLc5s~ZK71-Sa@_CgD!I}@|KQN>Y;R96^d|Jr z&QANM$wvNj$8x*o;E7=HtUr1*ECsn!6S?v8`GN6kRJTR1K834`tXKZ%>%rOM3?9r4 z^s%d!u1ha^6hk{t{Eygg-w3%Ul*0(Cr#( z6zkb1xZOdH%uGjSs)u3^;na18GQI0WC_$;eaJxA>f9X$%N;G)oichRK$Sx}%$cE|g q%+M?{x8)W~3Te1h9(0)*u;=OQp>CF$?w57roU9gCUiPka|NB3XE$YYs diff --git a/languages/wpavatar-zh_CN.po b/languages/wpavatar-zh_CN.po index 50c455e..b252384 100644 --- a/languages/wpavatar-zh_CN.po +++ b/languages/wpavatar-zh_CN.po @@ -1,8 +1,8 @@ msgid "" msgstr "" -"Project-Id-Version: WPICP License\n" -"POT-Creation-Date: 2023-03-30 22:41+0800\n" -"PO-Revision-Date: 2023-03-30 22:42+0800\n" +"Project-Id-Version: WPAvatar\n" +"POT-Creation-Date: 2023-04-16 23:45+0800\n" +"PO-Revision-Date: 2023-04-16 23:45+0800\n" "Last-Translator: 薇晓朵 \n" "Language-Team: 薇晓朵 \n" "Language: zh_CN\n" @@ -13,261 +13,76 @@ msgstr "" "X-Generator: Poedit 3.1.1\n" "X-Poedit-Basepath: ..\n" "X-Poedit-Flags-xgettext: --add-comments=translators:\n" -"X-Poedit-WPHeader: wpicp-license.php\n" +"X-Poedit-WPHeader: wpavatar.php\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" -"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" -"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" +"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPathExcluded-0: *.min.js\n" -#: includes/shortcode.php:52 wpicp-license.php:145 -msgid "Beijing" -msgstr "北京" +#: includes/cravatar.php:44 +msgid "Cravatar Logo" +msgstr "头像" -#: includes/shortcode.php:53 wpicp-license.php:146 -msgid "Tianjin" -msgstr "天津" +#: includes/cravatar.php:59 +msgid "You can update your profile picture at Cravatar.cn" +msgstr "您可以在 Cravatar.cn 更新您的个人资料图片" -#: includes/shortcode.php:54 wpicp-license.php:147 -msgid "Hebei" -msgstr "河北" +#: includes/cravatar.php:72 +msgid "Avatar Settings" +msgstr "头像设置" -#: includes/shortcode.php:55 wpicp-license.php:148 -msgid "Shanxi" -msgstr "山西" +#: includes/cravatar.php:73 +msgid "Avatar" +msgstr "头像" -#: includes/shortcode.php:56 wpicp-license.php:149 -msgid "Inner Mongolia" -msgstr "内蒙古" +#: includes/cravatar.php:86 +msgid "WordPress Avatar Settings" +msgstr "文派头像设置" -#: includes/shortcode.php:57 wpicp-license.php:150 -msgid "Liaoning" -msgstr "辽宁" - -#: includes/shortcode.php:58 wpicp-license.php:151 -msgid "Jilin" -msgstr "吉林" - -#: includes/shortcode.php:59 wpicp-license.php:152 -msgid "Heilongjiang" -msgstr "黑龙江" - -#: includes/shortcode.php:60 wpicp-license.php:153 -msgid "Shanghai" -msgstr "上海" - -#: includes/shortcode.php:61 wpicp-license.php:154 -msgid "Jiangsu" -msgstr "江苏" - -#: includes/shortcode.php:62 wpicp-license.php:155 -msgid "Zhejiang" -msgstr "浙江" - -#: includes/shortcode.php:63 wpicp-license.php:156 -msgid "Anhui" -msgstr "安徽" - -#: includes/shortcode.php:64 wpicp-license.php:157 -msgid "Fujian" -msgstr "福建" - -#: includes/shortcode.php:65 wpicp-license.php:158 -msgid "Jiangxi" -msgstr "江西" - -#: includes/shortcode.php:66 wpicp-license.php:159 -msgid "Shandong" -msgstr "山东" - -#: includes/shortcode.php:67 wpicp-license.php:160 -msgid "Henan" -msgstr "河南" - -#: includes/shortcode.php:68 wpicp-license.php:161 -msgid "Hubei" -msgstr "湖北" - -#: includes/shortcode.php:69 wpicp-license.php:162 -msgid "Hunan" -msgstr "湖南" - -#: includes/shortcode.php:70 wpicp-license.php:163 -msgid "Guangdong" -msgstr "广东" - -#: includes/shortcode.php:71 wpicp-license.php:164 -msgid "Guangxi" -msgstr "广西" - -#: includes/shortcode.php:72 wpicp-license.php:165 -msgid "Hainan" -msgstr "海南" - -#: includes/shortcode.php:73 wpicp-license.php:166 -msgid "Chongqing" -msgstr "重庆" - -#: includes/shortcode.php:74 wpicp-license.php:167 -msgid "Sichuan" -msgstr "四川" - -#: includes/shortcode.php:75 wpicp-license.php:168 -msgid "Guizhou" -msgstr "贵州" - -#: includes/shortcode.php:76 wpicp-license.php:169 -msgid "Yunnan" -msgstr "云南" - -#: includes/shortcode.php:77 wpicp-license.php:170 -msgid "Tibet" -msgstr "西藏" - -#: includes/shortcode.php:78 wpicp-license.php:171 -msgid "Shaanxi" -msgstr "陕西" - -#: includes/shortcode.php:79 wpicp-license.php:172 -msgid "Gansu" -msgstr "甘肃" - -#: includes/shortcode.php:80 wpicp-license.php:173 -msgid "Qinghai" -msgstr "青海" - -#: includes/shortcode.php:81 wpicp-license.php:174 -msgid "Ningxia" -msgstr "宁夏" - -#: includes/shortcode.php:82 wpicp-license.php:175 -msgid "Xinjiang" -msgstr "新疆" - -#: wpicp-license.php:36 -msgid "WP ICP License Settings" -msgstr "文派 ICP 许可证设置" - -#: wpicp-license.php:37 wpicp-license.php:69 wpicp-license.php:105 -msgid "ICP License" -msgstr "ICP 备案号" - -#: wpicp-license.php:57 -msgid "WordPress ICP License Namber" -msgstr "文派(WordPress) ICP 备案许可证" - -#: wpicp-license.php:63 -msgid "China Wangan License Number" -msgstr "中国公安网许可证" - -#: wpicp-license.php:77 -msgid "Wangan License" -msgstr "网安备案号" - -#: wpicp-license.php:84 -msgid "Province" -msgstr "省份" - -#: wpicp-license.php:99 -msgid "Enter your ICP license number information." -msgstr "输入您的备案号。" - -#: wpicp-license.php:115 +#: includes/cravatar.php:87 msgid "" -"This plugin is free forever, and its purpose is to supplement the essential " -"functions that the Chinese version of WordPress lacks. More information at " -"WPICP.com" +"Cravatar is the perfect alternative to Gravatar in China, you can update " +"your avatar at" msgstr "" -"此插件永久免费,目的是补充 WordPress 中文版本所缺少的功能。更多信息请访问 WPICP.com" +"Cravatar(初认头像)是中国 Gravatar 的完美替代方案,您可以在官网更新您的头" +"像" -#: wpicp-license.php:116 -msgid "Why do you need?" -msgstr "为什么需要?" +#: includes/cravatar.php:95 +msgid "Enable Cravatar" +msgstr "启用Cravatar" -#: wpicp-license.php:117 -msgid "" -"The ICP license is a state-issued registration, All public websites in " -"mainland China must have an ICP number listed on the homepage of the " -"website. (What would happen if not?)" -msgstr "" -"ICP备案许可证是国家颁发的注册证,中国大陆所有公开网站都必须在网站首页显示有" -"ICP备案号。(如果没有会怎样?)" +#: includes/cravatar.php:98 +msgid "Yes" +msgstr "是" -#: wpicp-license.php:118 -msgid "How to use?" -msgstr "如何使用?" +#: includes/cravatar.php:99 +msgid "No" +msgstr "否" -#: wpicp-license.php:119 -msgid "" -"1. Enter your ICP license information below. (Find My " -"License?)" -msgstr "" -"1. 在下方输入您的 ICP 许可证信息。 (找到我的许可证?)" - -#: wpicp-license.php:120 -msgid "" -"2. Use the shortcode [wpicp_license] to display the license " -"information and link on your website. (Integrate into " -"theme?)" -msgstr "" -"2. 使用简码[wpicp_license]在您的网站上显示许可证信息和链接。(集成到主题?)" - -#: wpicp-license.php:127 -msgid "" -"Enter your ICP license number information. (Correct " -"format?)" -msgstr "" -"输入您的备案号。(正确格式?)" - -#: wpicp-license.php:131 -msgid "" -"Use the shortcode [wpicp_wangan], You need to register with the " -"Public Security Bureau (PSB) to have this license. (What " -"is PSB filing?)" -msgstr "" -"使用简码[wpicp_wangan],您需要在公安局(PSB)注册才能获得此备案" -"许可证。 (什么是公共安全备案?)" - -#: wpicp-license.php:189 -msgid "" -"Enter your Wangan license number and select the abbreviation of your " -"province." -msgstr "输入您的网安备案号并选择您所在省份的简称。" - -#: wpicp-license.php:199 -msgid "ICP License Settings" -msgstr "ICP 许可证设置" +#: includes/cravatar.php:104 +msgid "Save Changes" +msgstr "保存更改" #. Plugin Name of the plugin/theme -msgid "WPICP License" -msgstr "文派 ICP 许可证" +msgid "WPAvatar" +msgstr "文派头像" #. Plugin URI of the plugin/theme -msgid "https://wpicp.com/download" -msgstr "https://wpicp.com/download" +msgid "https://wpavatar.com/download" +msgstr "https://wpavatar.com/download" #. Description of the plugin/theme -msgid "Must-have for WordPress sites in China, showing your ICP license." -msgstr "中国WordPress网站必备,显示您的 ICP 备案许可证。" +msgid "" +"Replace Gravatar with Cravatar, a perfect replacement of Gravatar in China." +msgstr "" +"替换 Gravatar 头像为 Cravatar 头像,这是 Gravatar 在中国的完美替代方案。" #. Author of the plugin/theme -msgid "WPICP.com" -msgstr "文派 ICP" +msgid "WPfanyi" +msgstr "文派翻译" #. Author URI of the plugin/theme -msgid "https://wpicp.com/" -msgstr "https://wpicp.com/" +msgid "https://wpfanyi.com/" +msgstr "https://wpfanyi.com/" diff --git a/languages/wpavatar-zh_TW.mo b/languages/wpavatar-zh_TW.mo index 7aab82573eaccc55f239f0b99efcd520e034f59e..594897547bb5eb2da16d48963327f875d9284c0e 100644 GIT binary patch literal 1904 zcma)+UuYaf9LKlXR(t-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u|10odm@CyHtb_+pWrmPJ--lEL%#*hZOP& zuQ1Gbsi{~Nr?|2p2oH2!K~Y?T@pJMl!uF#3FcvBm9$;^vBO$A-EFsG}Rs{9H1$1-& zN$^08CEy=cjx3p#x)ztYWe1^ZS&kA%(p9OJjo?K#ui%?BjVGNbRN^87f}K{wqsY;C zxMf}q%XnZJ0+L=Y)YR}Myb?J?*_kk^m84vya0p55CrYWBgltPShNH#d!Xzq!q*hA0 zVb33k6`09`nb;!D4$pcO#?nX`*1=H@P- z^IBX{3JIvx2Ia9FL5Zrt%GIc1vw13I4WdTY?-$Aye4pWPU4ewKIt&cNdyQ%*0^3T% zz$jBo5j4SuxOQ3xJp|2LtglU z;-WRhMXSD7h`+o&C406>KMjMcn6Hc!=4~=4+y=omZ+krmRWZ@oBe;xsDV;(^|iBEoBRC*B7qM zdrR6u-)7l1%woPnGwh(E6|9aFMhYcaOD5#V>b%`>h=aT@=IwC+_MGz0-E>>(;dDsijyH#fx&saFFi{aH`En$pg#sIvUCv z?!-^kkzmtBGK^UFZXLGbUTO8->wrTL`CjXI7{lR!9Fa^;!iw&dW)VE0?^yQY890Vz z+b@!<+@T?I9MXb1(F!^{I^5eAbC~O$N7Pa10)}V1>q+#W zCS|X-X1k9(GI<{}XP^E&gev7->hy-sc%2P7-0pQABd?t8N{^+oqvK&Nhe;V~=-n7e z->Gx!n*8B0(z9a#K7dmZ4Rf^jT5q@?T=Lhq97~c98@n(H_G5?H&eQ{mh-Lhb zPG(cxe&2_WI7Q5RQkeSEQ#J?jb>&yy&0dC>@!Jq)kE+YFk4Kmss+t+-$+R4I-|rD> zx14^U(&0$-(4!J;3eHMl*rmsMQ6t>RwkP^ZJ\n" +"Language-Team: 薇曉朵 \n" +"Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: GlotPress/4.0.0-alpha.4\n" -"Language: zh_TW\n" -"Project-Id-Version: Plugins - WPICP License - Development (trunk)\n" +"X-Generator: Poedit 3.1.1\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-Flags-xgettext: --add-comments=translators:\n" +"X-Poedit-WPHeader: wpavatar.php\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" +"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.min.js\n" -#: wpicp-license.php:169 -msgid "Enter your Wangan license number and select the abbreviation of your province." -msgstr "輸入這個網站的公安局備案許可證號,並選取所在省份。" +#: includes/cravatar.php:44 +msgid "Cravatar Logo" +msgstr "頭像" -#: wpicp-license.php:155 -msgid "Xinjiang" -msgstr "新疆" +#: includes/cravatar.php:59 +msgid "You can update your profile picture at Cravatar.cn" +msgstr "您可以在 Cravatar.cn 更新您的個人資料圖片" -#: wpicp-license.php:154 -msgid "Ningxia" -msgstr "寧夏" +#: includes/cravatar.php:72 +msgid "Avatar Settings" +msgstr "頭像設定" -#: wpicp-license.php:153 -msgid "Qinghai" -msgstr "青海" +#: includes/cravatar.php:73 +msgid "Avatar" +msgstr "頭像" -#: wpicp-license.php:152 -msgid "Gansu" -msgstr "甘肅" +#: includes/cravatar.php:86 +msgid "WordPress Avatar Settings" +msgstr "文派頭像設定" -#: wpicp-license.php:151 -msgid "Shaanxi" -msgstr "陝西" +#: includes/cravatar.php:87 +msgid "" +"Cravatar is the perfect alternative to Gravatar in China, you can update " +"your avatar at" +msgstr "" +"Cravatar(初認頭像)是中國 Gravatar 的完美替代方案,您可以在官網更新您的頭" +"像" -#: wpicp-license.php:150 -msgid "Tibet" -msgstr "西藏" +#: includes/cravatar.php:95 +msgid "Enable Cravatar" +msgstr "啟用Cravatar" -#: wpicp-license.php:149 -msgid "Yunnan" -msgstr "雲南" +#: includes/cravatar.php:98 +msgid "Yes" +msgstr "是" -#: wpicp-license.php:148 -msgid "Guizhou" -msgstr "貴州" +#: includes/cravatar.php:99 +msgid "No" +msgstr "否" -#: wpicp-license.php:147 -msgid "Sichuan" -msgstr "四川" +#: includes/cravatar.php:104 +msgid "Save Changes" +msgstr "儲存更改" -#: wpicp-license.php:146 -msgid "Chongqing" -msgstr "重慶" +#. Plugin Name of the plugin/theme +msgid "WPAvatar" +msgstr "文派頭像" -#: wpicp-license.php:145 -msgid "Hainan" -msgstr "海南" +#. Plugin URI of the plugin/theme +msgid "https://wpavatar.com/download" +msgstr "https://wpavatar.com/download" -#: wpicp-license.php:144 -msgid "Guangxi" -msgstr "廣西" +#. Description of the plugin/theme +msgid "" +"Replace Gravatar with Cravatar, a perfect replacement of Gravatar in China." +msgstr "" +"替換 Gravatar 頭像為 Cravatar 頭像,這是 Gravatar 在中國的完美替代方案。" -#: wpicp-license.php:143 -msgid "Guangdong" -msgstr "廣東" +#. Author of the plugin/theme +msgid "WPfanyi" +msgstr "文派翻譯" -#: wpicp-license.php:142 -msgid "Hunan" -msgstr "湖南" - -#: wpicp-license.php:141 -msgid "Hubei" -msgstr "湖北" - -#: wpicp-license.php:140 -msgid "Henan" -msgstr "河南" - -#: wpicp-license.php:139 -msgid "Shandong" -msgstr "山東" - -#: wpicp-license.php:138 -msgid "Jiangxi" -msgstr "江西" - -#: wpicp-license.php:137 -msgid "Fujian" -msgstr "福建" - -#: wpicp-license.php:136 -msgid "Anhui" -msgstr "安徽" - -#: wpicp-license.php:135 -msgid "Zhejiang" -msgstr "浙江" - -#: wpicp-license.php:134 -msgid "Jiangsu" -msgstr "江蘇" - -#: wpicp-license.php:133 -msgid "Shanghai" -msgstr "上海" - -#: wpicp-license.php:132 -msgid "Heilongjiang" -msgstr "黑龍江" - -#: wpicp-license.php:131 -msgid "Jilin" -msgstr "吉林" - -#: wpicp-license.php:130 -msgid "Liaoning" -msgstr "遼寧" - -#: wpicp-license.php:129 -msgid "Inner Mongolia" -msgstr "內蒙古" - -#: wpicp-license.php:128 -msgid "Shanxi" -msgstr "山西" - -#: wpicp-license.php:127 -msgid "Hebei" -msgstr "河北" - -#: wpicp-license.php:126 -msgid "Tianjin" -msgstr "天津" - -#: wpicp-license.php:125 -msgid "Beijing" -msgstr "北京" - -#: wpicp-license.php:111 -msgid "Use the shortcode [wpicp_wangan], You need to register with the Public Security Bureau (PSB) to have this license. (What is PSB filing?)" -msgstr "使用短代碼 [wpicp_wangan]。網站管理員必須向中國公安局 (Public Security Bureau,PSB) 註冊以取得證號。(什麼是中國公安局備案)" - -#: wpicp-license.php:79 -msgid "Province" -msgstr "中國省份" - -#: wpicp-license.php:72 -msgid "Wangan License" -msgstr "公安網備案證號" - -#: wpicp-license.php:58 -msgid "China Wangan License Number" -msgstr "中國公安局備案證號" - -#: wpicp-license.php:179 -msgid "ICP License Settings" -msgstr "ICP 備案許可證號設定" - -#: wpicp-license.php:107 -msgid "Enter your ICP license number information. (Correct format?)" -msgstr "輸入這個網站的 ICP 備案許可證號。進一步了解正確格式" - -#: wpicp-license.php:99 -msgid "2. Use the shortcode [wpicp_license] to display the license information and link on your website. (Integrate into theme?)" -msgstr "2. 使用短代碼 [wpicp_license] 在這個網站上顯示 ICP 備案許可證號及連結。(與佈景主題整合的方式)" - -#: wpicp-license.php:98 -msgid "1. Enter your ICP license information below. (Find My License?)" -msgstr "1. 在下方輸入欄位輸入網站的 ICP 備案許可證號。(如何找到 ICP 備案許可證號)" - -#: wpicp-license.php:97 -msgid "How to use?" -msgstr "使用方式" - -#: wpicp-license.php:96 -msgid "The ICP license is a state-issued registration, All public websites in mainland China must have an ICP number listed on the homepage of the website. (What would happen if not?)" -msgstr "ICP 備案許可證號是中國頒發的網站註冊證明,在中國提供網際網路資訊服務的全部公開網站,都必須在網站首頁顯示 ICP 備案許可證號。(如果沒有 ICP 備案許可證號會發生什麼)" - -#: wpicp-license.php:95 -msgid "Why do you need?" -msgstr "為什麼需要 ICP 備案許可證號" - -#: wpicp-license.php:94 -msgid "This plugin is free forever, and its purpose is to supplement the essential functions that the Chinese version of WordPress lacks. More information at WPICP.com" -msgstr "這個外掛永久免費,目的是為 WordPress 網站新增能加入 ICP 備案許可證號的功能。如需進一步了解,請造訪 WPICP.com。" - -#: wpicp-license.php:52 -msgid "WordPress ICP License Namber" -msgstr "WordPress 網站 ICP 備案許可證號" - -#: wpicp-license.php:32 wpicp-license.php:64 -msgid "ICP License" -msgstr "ICP 備案許可證號" - -#: wpicp-license.php:31 -msgid "WP ICP License Settings" -msgstr "WordPress 網站 ICP 備案許可證號設定" - -#. Author URI of the plugin -msgid "https://wpicp.com/" -msgstr "https://wpicp.com/" - -#. Author of the plugin -msgid "WPICP.com" -msgstr "文派 ICP" - -#. Description of the plugin -msgid "Must-have for WordPress sites in China, showing your ICP license." -msgstr "目標對象為中國使用者的 WordPress 網站必備外掛,用於顯示網站 ICP 備案許可證號。" - -#. Plugin URI of the plugin -msgid "https://wpicp.com/download" -msgstr "https://wpicp.com/download" - -#. Plugin Name of the plugin -msgid "WPICP License" -msgstr "WPICP License" \ No newline at end of file +#. Author URI of the plugin/theme +msgid "https://wpfanyi.com/" +msgstr "https://wpfanyi.com/" diff --git a/wpavatar.php b/wpavatar.php index 42c86c1..ffc12c2 100644 --- a/wpavatar.php +++ b/wpavatar.php @@ -2,13 +2,12 @@ /** * Plugin Name: WPAvatar * Plugin URI: https://wpavatar.com/download - * Description: Must-have for WordPress sites in China, showing your ICP license. + * Description: Replace Gravatar with Cravatar, a perfect replacement of Gravatar in China. * Author: WPfanyi * Author URI: https://wpfanyi.com/ * Text Domain: wpavatar * Domain Path: /languages * Version: 1.0 - * Network: True * License: GPLv2 or later * License URI: http://www.gnu.org/licenses/gpl-2.0.html * @@ -23,44 +22,23 @@ * GNU General Public License for more details. */ - if ( ! function_exists( 'get_cravatar_url' ) ) { - /** - * 替换 Gravatar 头像为 Cravatar 头像 - * - * Cravatar 是 Gravatar 在中国的完美替代方案,你可以在 https://cravatar.cn 更新你的头像 - */ - function get_cravatar_url( $url ) { - $sources = array( - 'www.gravatar.com', - '0.gravatar.com', - '1.gravatar.com', - '2.gravatar.com', - 'secure.gravatar.com', - 'cn.gravatar.com', - 'gravatar.com', - ); - return str_replace( $sources, 'cravatar.cn', $url ); - } - add_filter( 'um_user_avatar_url_filter', 'get_cravatar_url', 1 ); - add_filter( 'bp_gravatar_url', 'get_cravatar_url', 1 ); - add_filter( 'get_avatar_url', 'get_cravatar_url', 1 ); - } - if ( ! function_exists( 'set_defaults_for_cravatar' ) ) { - /** - * 替换 WordPress 讨论设置中的默认头像 - */ - function set_defaults_for_cravatar( $avatar_defaults ) { - $avatar_defaults['gravatar_default'] = 'Cravatar 标志'; - return $avatar_defaults; - } - add_filter( 'avatar_defaults', 'set_defaults_for_cravatar', 1 ); - } - if ( ! function_exists( 'set_user_profile_picture_for_cravatar' ) ) { - /** - * 替换个人资料卡中的头像上传地址 - */ - function set_user_profile_picture_for_cravatar() { - return '您可以在 Cravatar 修改您的资料图片'; - } - add_filter( 'user_profile_picture_description', 'set_user_profile_picture_for_cravatar', 1 ); - } +if (!defined('ABSPATH')) { + exit; // Exit if accessed directly +} + + +require_once( plugin_dir_path( __FILE__ ) . 'includes/cravatar.php' ); + + +register_activation_hook( __FILE__, 'wpavatar_activate' ); + +function wpavatar_activate() { + update_option( 'wpavatar_enable_cravatar', '1' ); +} + + +// Load translation +add_action( 'init', 'wpavatar_load_textdomain' ); +function wpavatar_load_textdomain() { + load_plugin_textdomain( 'wpavatar', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); +}