mirror of
https://github.com/WenPai-org/wpicp-license.git
synced 2025-08-03 05:13:20 +08:00
升级至 v1.3
添加新的简码。
This commit is contained in:
parent
2957170392
commit
7ef614f3ba
9 changed files with 315 additions and 106 deletions
0
assets/images/gongan.png
Normal file → Executable file
0
assets/images/gongan.png
Normal file → Executable file
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
155
includes/shortcode.php
Normal file → Executable file
155
includes/shortcode.php
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Shortcode
|
* Shortcode Functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
|
@ -8,87 +8,81 @@ if (!defined('ABSPATH')) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add ICP shortcode
|
// Add ICP shortcode
|
||||||
add_shortcode( 'wpicp_license', 'wpicp_license_shortcode' );
|
add_shortcode('wpicp_license', 'wpicp_license_shortcode');
|
||||||
|
|
||||||
function wpicp_license_shortcode() {
|
function wpicp_license_shortcode() {
|
||||||
$wpicp_license = get_option( 'wpicp_license' );
|
$wpicp_license = get_option('wpicp_license');
|
||||||
if ( $wpicp_license ) {
|
if ($wpicp_license) {
|
||||||
$license_text = '' . $wpicp_license;
|
$license_text = '' . $wpicp_license;
|
||||||
$license_url = 'https://beian.miit.gov.cn';
|
$license_url = 'https://beian.miit.gov.cn';
|
||||||
$target = '_blank';
|
$target = '_blank';
|
||||||
$nofollow = 'nofollow';
|
$nofollow = 'nofollow';
|
||||||
$license_link = '<a href="' . esc_url( $license_url ) . '" target="' . esc_attr( $target ) . '" rel="' . esc_attr( $nofollow ) . '">' . $license_text . '</a>';
|
$license_link = '<a href="' . esc_url($license_url) . '" target="' . esc_attr($target) . '" rel="' . esc_attr($nofollow) . '">' . $license_text . '</a>';
|
||||||
return $license_link;
|
return $license_link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add Wangan shortcode
|
// Add Wangan shortcode
|
||||||
add_shortcode( 'wpicp_wangan', 'wpicp_wangan_shortcode' );
|
add_shortcode('wpicp_wangan', 'wpicp_wangan_shortcode');
|
||||||
|
|
||||||
function wpicp_wangan_shortcode() {
|
function wpicp_wangan_shortcode() {
|
||||||
$wpicp_wangan = get_option( 'wpicp_wangan' );
|
$wpicp_wangan = get_option('wpicp_wangan');
|
||||||
$wpicp_province = get_option( 'wpicp_province' );
|
$wpicp_province = get_option('wpicp_province');
|
||||||
|
|
||||||
if ( $wpicp_wangan ) {
|
if ($wpicp_wangan) {
|
||||||
$wangan_text = '<img src="' . plugins_url( 'wpicp-license/assets/images/gongan.png' ) . '" alt="Wangan License" style="vertical-align:middle;" />' . $wpicp_province . '公网安备' . $wpicp_wangan . '号' ;
|
$wangan_text = '<img src="' . plugins_url('wpicp-license/assets/images/gongan.png') . '" alt="Wangan License" style="vertical-align:middle;" />' . $wpicp_province . '公网安备' . $wpicp_wangan . '号';
|
||||||
$wangan_url = 'https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=' . urlencode($wpicp_wangan);
|
$wangan_url = 'https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=' . urlencode($wpicp_wangan);
|
||||||
$target = '_blank';
|
$target = '_blank';
|
||||||
$nofollow = 'nofollow';
|
$nofollow = 'nofollow';
|
||||||
$wangan_link = '<a href="' . esc_url( $wangan_url ) . '" target="' . esc_attr( $target ) . '" rel="' . esc_attr( $nofollow ) . '">' . $wangan_text . '</a>';
|
$wangan_link = '<a href="' . esc_url($wangan_url) . '" target="' . esc_attr($target) . '" rel="' . esc_attr($nofollow) . '">' . $wangan_text . '</a>';
|
||||||
return $wangan_link;
|
return $wangan_link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add wpicp_province shortcode
|
// Add wpicp_province shortcode
|
||||||
add_shortcode( 'wpicp_province', 'wpicp_province_shortcode' );
|
add_shortcode('wpicp_province', 'wpicp_province_shortcode');
|
||||||
|
|
||||||
function wpicp_province_shortcode() {
|
function wpicp_province_shortcode() {
|
||||||
$wpicp_province = get_option( 'wpicp_province' );
|
$wpicp_province = get_option('wpicp_province');
|
||||||
$provinces = array(
|
$provinces = array(
|
||||||
'京' => __('Beijing', 'wpicp-license'),
|
'京' => __('Beijing', 'wpicp-license'),
|
||||||
'津' => __('Tianjin', 'wpicp-license'),
|
'津' => __('Tianjin', 'wpicp-license'),
|
||||||
'冀' => __('Hebei', 'wpicp-license'),
|
'冀' => __('Hebei', 'wpicp-license'),
|
||||||
'晋' => __('Shanxi', 'wpicp-license'),
|
'晋' => __('Shanxi', 'wpicp-license'),
|
||||||
'蒙' => __('Inner Mongolia', 'wpicp-license'),
|
'蒙' => __('Inner Mongolia', 'wpicp-license'),
|
||||||
'辽' => __('Liaoning', 'wpicp-license'),
|
'辽' => __('Liaoning', 'wpicp-license'),
|
||||||
'吉' => __('Jilin', 'wpicp-license'),
|
'吉' => __('Jilin', 'wpicp-license'),
|
||||||
'黑' => __('Heilongjiang', 'wpicp-license'),
|
'黑' => __('Heilongjiang', 'wpicp-license'),
|
||||||
'沪' => __('Shanghai', 'wpicp-license'),
|
'沪' => __('Shanghai', 'wpicp-license'),
|
||||||
'苏' => __('Jiangsu', 'wpicp-license'),
|
'苏' => __('Jiangsu', 'wpicp-license'),
|
||||||
'浙' => __('Zhejiang', 'wpicp-license'),
|
'浙' => __('Zhejiang', 'wpicp-license'),
|
||||||
'皖' => __('Anhui', 'wpicp-license'),
|
'皖' => __('Anhui', 'wpicp-license'),
|
||||||
'闽' => __('Fujian', 'wpicp-license'),
|
'闽' => __('Fujian', 'wpicp-license'),
|
||||||
'赣' => __('Jiangxi', 'wpicp-license'),
|
'赣' => __('Jiangxi', 'wpicp-license'),
|
||||||
'鲁' => __('Shandong', 'wpicp-license'),
|
'鲁' => __('Shandong', 'wpicp-license'),
|
||||||
'豫' => __('Henan', 'wpicp-license'),
|
'豫' => __('Henan', 'wpicp-license'),
|
||||||
'鄂' => __('Hubei', 'wpicp-license'),
|
'鄂' => __('Hubei', 'wpicp-license'),
|
||||||
'湘' => __('Hunan', 'wpicp-license'),
|
'湘' => __('Hunan', 'wpicp-license'),
|
||||||
'粤' => __('Guangdong', 'wpicp-license'),
|
'粤' => __('Guangdong', 'wpicp-license'),
|
||||||
'桂' => __('Guangxi', 'wpicp-license'),
|
'桂' => __('Guangxi', 'wpicp-license'),
|
||||||
'琼' => __('Hainan', 'wpicp-license'),
|
'琼' => __('Hainan', 'wpicp-license'),
|
||||||
'渝' => __('Chongqing', 'wpicp-license'),
|
'渝' => __('Chongqing', 'wpicp-license'),
|
||||||
'川' => __('Sichuan', 'wpicp-license'),
|
'川' => __('Sichuan', 'wpicp-license'),
|
||||||
'黔' => __('Guizhou', 'wpicp-license'),
|
'黔' => __('Guizhou', 'wpicp-license'),
|
||||||
'滇' => __('Yunnan', 'wpicp-license'),
|
'滇' => __('Yunnan', 'wpicp-license'),
|
||||||
'藏' => __('Tibet', 'wpicp-license'),
|
'藏' => __('Tibet', 'wpicp-license'),
|
||||||
'陕' => __('Shaanxi', 'wpicp-license'),
|
'陕' => __('Shaanxi', 'wpicp-license'),
|
||||||
'甘' => __('Gansu', 'wpicp-license'),
|
'甘' => __('Gansu', 'wpicp-license'),
|
||||||
'青' => __('Qinghai', 'wpicp-license'),
|
'青' => __('Qinghai', 'wpicp-license'),
|
||||||
'宁' => __('Ningxia', 'wpicp-license'),
|
'宁' => __('Ningxia', 'wpicp-license'),
|
||||||
'新' => __('Xinjiang', 'wpicp-license')
|
'新' => __('Xinjiang', 'wpicp-license')
|
||||||
// ... add more provinces here
|
|
||||||
);
|
);
|
||||||
if ( isset( $provinces[ $wpicp_province ] ) ) {
|
if (isset($provinces[$wpicp_province])) {
|
||||||
return $provinces[ $wpicp_province ];
|
return $provinces[$wpicp_province];
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add wpicp_p shortcode
|
||||||
add_shortcode( 'wpicp_p', 'wpicp_province_abbr_shortcode' );
|
add_shortcode( 'wpicp_p', 'wpicp_province_abbr_shortcode' );
|
||||||
function wpicp_province_abbr_shortcode() {
|
function wpicp_province_abbr_shortcode() {
|
||||||
$wpicp_province = get_option( 'wpicp_province' );
|
$wpicp_province = get_option( 'wpicp_province' );
|
||||||
|
@ -97,3 +91,58 @@ function wpicp_province_abbr_shortcode() {
|
||||||
return $wpicp_province;
|
return $wpicp_province;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Add wpicp_company shortcode
|
||||||
|
add_shortcode('wpicp_company', 'wpicp_company_shortcode');
|
||||||
|
function wpicp_company_shortcode() {
|
||||||
|
$wpicp_company = get_option('wpicp_company');
|
||||||
|
if ($wpicp_company) {
|
||||||
|
return esc_html($wpicp_company);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add wpicp_email shortcode
|
||||||
|
add_shortcode('wpicp_email', 'wpicp_email_shortcode');
|
||||||
|
function wpicp_email_shortcode() {
|
||||||
|
$wpicp_email = get_option('wpicp_email');
|
||||||
|
if ($wpicp_email) {
|
||||||
|
return esc_html($wpicp_email);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add wpicp_phone shortcode
|
||||||
|
add_shortcode('wpicp_phone', 'wpicp_phone_shortcode');
|
||||||
|
function wpicp_phone_shortcode() {
|
||||||
|
$wpicp_phone = get_option('wpicp_phone');
|
||||||
|
if ($wpicp_phone) {
|
||||||
|
return esc_html($wpicp_phone);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add wpicp_edi shortcode
|
||||||
|
add_shortcode('wpicp_edi', 'wpicp_edi_shortcode');
|
||||||
|
function wpicp_edi_shortcode() {
|
||||||
|
$wpicp_edi = get_option('wpicp_edi');
|
||||||
|
if ($wpicp_edi) {
|
||||||
|
return esc_html($wpicp_edi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add wpicp_app shortcode
|
||||||
|
add_shortcode('wpicp_app', 'wpicp_app_shortcode');
|
||||||
|
function wpicp_app_shortcode() {
|
||||||
|
$wpicp_app = get_option('wpicp_app');
|
||||||
|
if ($wpicp_app) {
|
||||||
|
return esc_html($wpicp_app);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add wpicp_minipapp shortcode
|
||||||
|
add_shortcode('wpicp_minipapp', 'wpicp_minipapp_shortcode');
|
||||||
|
function wpicp_minipapp_shortcode() {
|
||||||
|
$wpicp_minipapp = get_option('wpicp_minipapp');
|
||||||
|
if ($wpicp_minipapp) {
|
||||||
|
return esc_html($wpicp_minipapp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
BIN
languages/wpicp-license-zh_CN.mo
Normal file → Executable file
BIN
languages/wpicp-license-zh_CN.mo
Normal file → Executable file
Binary file not shown.
147
languages/wpicp-license-zh_CN.po
Normal file → Executable file
147
languages/wpicp-license-zh_CN.po
Normal file → Executable file
|
@ -1,16 +1,15 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WPICP License\n"
|
"Project-Id-Version: WPICP License\n"
|
||||||
"POT-Creation-Date: 2023-03-30 22:41+0800\n"
|
"POT-Creation-Date: 2024-07-05 15:33+0800\n"
|
||||||
"PO-Revision-Date: 2023-03-30 22:42+0800\n"
|
"PO-Revision-Date: 2024-07-05 15:36+0800\n"
|
||||||
"Last-Translator: 薇晓朵 <support@weixiaoduo.com>\n"
|
"Last-Translator: 薇晓朵 <support@weixiaoduo.com>\n"
|
||||||
"Language-Team: 薇晓朵 <support@weixiaoduo.com>\n"
|
"Language-Team: 薇晓朵 <support@weixiaoduo.com>\n"
|
||||||
"Language: zh_CN\n"
|
"Language: zh_CN\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
"X-Generator: Poedit 3.4.2\n"
|
||||||
"X-Generator: Poedit 3.1.1\n"
|
|
||||||
"X-Poedit-Basepath: ..\n"
|
"X-Poedit-Basepath: ..\n"
|
||||||
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
||||||
"X-Poedit-WPHeader: wpicp-license.php\n"
|
"X-Poedit-WPHeader: wpicp-license.php\n"
|
||||||
|
@ -21,127 +20,127 @@ msgstr ""
|
||||||
"X-Poedit-SearchPath-0: .\n"
|
"X-Poedit-SearchPath-0: .\n"
|
||||||
"X-Poedit-SearchPathExcluded-0: *.min.js\n"
|
"X-Poedit-SearchPathExcluded-0: *.min.js\n"
|
||||||
|
|
||||||
#: includes/shortcode.php:52 wpicp-license.php:145
|
#: includes/shortcode.php:46 wpicp-license.php:199
|
||||||
msgid "Beijing"
|
msgid "Beijing"
|
||||||
msgstr "北京"
|
msgstr "北京"
|
||||||
|
|
||||||
#: includes/shortcode.php:53 wpicp-license.php:146
|
#: includes/shortcode.php:47 wpicp-license.php:200
|
||||||
msgid "Tianjin"
|
msgid "Tianjin"
|
||||||
msgstr "天津"
|
msgstr "天津"
|
||||||
|
|
||||||
#: includes/shortcode.php:54 wpicp-license.php:147
|
#: includes/shortcode.php:48 wpicp-license.php:201
|
||||||
msgid "Hebei"
|
msgid "Hebei"
|
||||||
msgstr "河北"
|
msgstr "河北"
|
||||||
|
|
||||||
#: includes/shortcode.php:55 wpicp-license.php:148
|
#: includes/shortcode.php:49 wpicp-license.php:202
|
||||||
msgid "Shanxi"
|
msgid "Shanxi"
|
||||||
msgstr "山西"
|
msgstr "山西"
|
||||||
|
|
||||||
#: includes/shortcode.php:56 wpicp-license.php:149
|
#: includes/shortcode.php:50 wpicp-license.php:203
|
||||||
msgid "Inner Mongolia"
|
msgid "Inner Mongolia"
|
||||||
msgstr "内蒙古"
|
msgstr "内蒙古"
|
||||||
|
|
||||||
#: includes/shortcode.php:57 wpicp-license.php:150
|
#: includes/shortcode.php:51 wpicp-license.php:204
|
||||||
msgid "Liaoning"
|
msgid "Liaoning"
|
||||||
msgstr "辽宁"
|
msgstr "辽宁"
|
||||||
|
|
||||||
#: includes/shortcode.php:58 wpicp-license.php:151
|
#: includes/shortcode.php:52 wpicp-license.php:205
|
||||||
msgid "Jilin"
|
msgid "Jilin"
|
||||||
msgstr "吉林"
|
msgstr "吉林"
|
||||||
|
|
||||||
#: includes/shortcode.php:59 wpicp-license.php:152
|
#: includes/shortcode.php:53 wpicp-license.php:206
|
||||||
msgid "Heilongjiang"
|
msgid "Heilongjiang"
|
||||||
msgstr "黑龙江"
|
msgstr "黑龙江"
|
||||||
|
|
||||||
#: includes/shortcode.php:60 wpicp-license.php:153
|
#: includes/shortcode.php:54 wpicp-license.php:207
|
||||||
msgid "Shanghai"
|
msgid "Shanghai"
|
||||||
msgstr "上海"
|
msgstr "上海"
|
||||||
|
|
||||||
#: includes/shortcode.php:61 wpicp-license.php:154
|
#: includes/shortcode.php:55 wpicp-license.php:208
|
||||||
msgid "Jiangsu"
|
msgid "Jiangsu"
|
||||||
msgstr "江苏"
|
msgstr "江苏"
|
||||||
|
|
||||||
#: includes/shortcode.php:62 wpicp-license.php:155
|
#: includes/shortcode.php:56 wpicp-license.php:209
|
||||||
msgid "Zhejiang"
|
msgid "Zhejiang"
|
||||||
msgstr "浙江"
|
msgstr "浙江"
|
||||||
|
|
||||||
#: includes/shortcode.php:63 wpicp-license.php:156
|
#: includes/shortcode.php:57 wpicp-license.php:210
|
||||||
msgid "Anhui"
|
msgid "Anhui"
|
||||||
msgstr "安徽"
|
msgstr "安徽"
|
||||||
|
|
||||||
#: includes/shortcode.php:64 wpicp-license.php:157
|
#: includes/shortcode.php:58 wpicp-license.php:211
|
||||||
msgid "Fujian"
|
msgid "Fujian"
|
||||||
msgstr "福建"
|
msgstr "福建"
|
||||||
|
|
||||||
#: includes/shortcode.php:65 wpicp-license.php:158
|
#: includes/shortcode.php:59 wpicp-license.php:212
|
||||||
msgid "Jiangxi"
|
msgid "Jiangxi"
|
||||||
msgstr "江西"
|
msgstr "江西"
|
||||||
|
|
||||||
#: includes/shortcode.php:66 wpicp-license.php:159
|
#: includes/shortcode.php:60 wpicp-license.php:213
|
||||||
msgid "Shandong"
|
msgid "Shandong"
|
||||||
msgstr "山东"
|
msgstr "山东"
|
||||||
|
|
||||||
#: includes/shortcode.php:67 wpicp-license.php:160
|
#: includes/shortcode.php:61 wpicp-license.php:214
|
||||||
msgid "Henan"
|
msgid "Henan"
|
||||||
msgstr "河南"
|
msgstr "河南"
|
||||||
|
|
||||||
#: includes/shortcode.php:68 wpicp-license.php:161
|
#: includes/shortcode.php:62 wpicp-license.php:215
|
||||||
msgid "Hubei"
|
msgid "Hubei"
|
||||||
msgstr "湖北"
|
msgstr "湖北"
|
||||||
|
|
||||||
#: includes/shortcode.php:69 wpicp-license.php:162
|
#: includes/shortcode.php:63 wpicp-license.php:216
|
||||||
msgid "Hunan"
|
msgid "Hunan"
|
||||||
msgstr "湖南"
|
msgstr "湖南"
|
||||||
|
|
||||||
#: includes/shortcode.php:70 wpicp-license.php:163
|
#: includes/shortcode.php:64 wpicp-license.php:217
|
||||||
msgid "Guangdong"
|
msgid "Guangdong"
|
||||||
msgstr "广东"
|
msgstr "广东"
|
||||||
|
|
||||||
#: includes/shortcode.php:71 wpicp-license.php:164
|
#: includes/shortcode.php:65 wpicp-license.php:218
|
||||||
msgid "Guangxi"
|
msgid "Guangxi"
|
||||||
msgstr "广西"
|
msgstr "广西"
|
||||||
|
|
||||||
#: includes/shortcode.php:72 wpicp-license.php:165
|
#: includes/shortcode.php:66 wpicp-license.php:219
|
||||||
msgid "Hainan"
|
msgid "Hainan"
|
||||||
msgstr "海南"
|
msgstr "海南"
|
||||||
|
|
||||||
#: includes/shortcode.php:73 wpicp-license.php:166
|
#: includes/shortcode.php:67 wpicp-license.php:220
|
||||||
msgid "Chongqing"
|
msgid "Chongqing"
|
||||||
msgstr "重庆"
|
msgstr "重庆"
|
||||||
|
|
||||||
#: includes/shortcode.php:74 wpicp-license.php:167
|
#: includes/shortcode.php:68 wpicp-license.php:221
|
||||||
msgid "Sichuan"
|
msgid "Sichuan"
|
||||||
msgstr "四川"
|
msgstr "四川"
|
||||||
|
|
||||||
#: includes/shortcode.php:75 wpicp-license.php:168
|
#: includes/shortcode.php:69 wpicp-license.php:222
|
||||||
msgid "Guizhou"
|
msgid "Guizhou"
|
||||||
msgstr "贵州"
|
msgstr "贵州"
|
||||||
|
|
||||||
#: includes/shortcode.php:76 wpicp-license.php:169
|
#: includes/shortcode.php:70 wpicp-license.php:223
|
||||||
msgid "Yunnan"
|
msgid "Yunnan"
|
||||||
msgstr "云南"
|
msgstr "云南"
|
||||||
|
|
||||||
#: includes/shortcode.php:77 wpicp-license.php:170
|
#: includes/shortcode.php:71 wpicp-license.php:224
|
||||||
msgid "Tibet"
|
msgid "Tibet"
|
||||||
msgstr "西藏"
|
msgstr "西藏"
|
||||||
|
|
||||||
#: includes/shortcode.php:78 wpicp-license.php:171
|
#: includes/shortcode.php:72 wpicp-license.php:225
|
||||||
msgid "Shaanxi"
|
msgid "Shaanxi"
|
||||||
msgstr "陕西"
|
msgstr "陕西"
|
||||||
|
|
||||||
#: includes/shortcode.php:79 wpicp-license.php:172
|
#: includes/shortcode.php:73 wpicp-license.php:226
|
||||||
msgid "Gansu"
|
msgid "Gansu"
|
||||||
msgstr "甘肃"
|
msgstr "甘肃"
|
||||||
|
|
||||||
#: includes/shortcode.php:80 wpicp-license.php:173
|
#: includes/shortcode.php:74 wpicp-license.php:227
|
||||||
msgid "Qinghai"
|
msgid "Qinghai"
|
||||||
msgstr "青海"
|
msgstr "青海"
|
||||||
|
|
||||||
#: includes/shortcode.php:81 wpicp-license.php:174
|
#: includes/shortcode.php:75 wpicp-license.php:228
|
||||||
msgid "Ningxia"
|
msgid "Ningxia"
|
||||||
msgstr "宁夏"
|
msgstr "宁夏"
|
||||||
|
|
||||||
#: includes/shortcode.php:82 wpicp-license.php:175
|
#: includes/shortcode.php:76 wpicp-license.php:229
|
||||||
msgid "Xinjiang"
|
msgid "Xinjiang"
|
||||||
msgstr "新疆"
|
msgstr "新疆"
|
||||||
|
|
||||||
|
@ -149,7 +148,7 @@ msgstr "新疆"
|
||||||
msgid "WP ICP License Settings"
|
msgid "WP ICP License Settings"
|
||||||
msgstr "文派 ICP 许可证设置"
|
msgstr "文派 ICP 许可证设置"
|
||||||
|
|
||||||
#: wpicp-license.php:37 wpicp-license.php:69 wpicp-license.php:105
|
#: wpicp-license.php:37 wpicp-license.php:69 wpicp-license.php:159
|
||||||
msgid "ICP License"
|
msgid "ICP License"
|
||||||
msgstr "ICP 备案号"
|
msgstr "ICP 备案号"
|
||||||
|
|
||||||
|
@ -169,11 +168,35 @@ msgstr "网安备案号"
|
||||||
msgid "Province"
|
msgid "Province"
|
||||||
msgstr "省份"
|
msgstr "省份"
|
||||||
|
|
||||||
|
#: wpicp-license.php:91
|
||||||
|
msgid "Company Name"
|
||||||
|
msgstr "公司名称"
|
||||||
|
|
||||||
#: wpicp-license.php:99
|
#: wpicp-license.php:99
|
||||||
|
msgid "Report Email"
|
||||||
|
msgstr "举报邮箱"
|
||||||
|
|
||||||
|
#: wpicp-license.php:107
|
||||||
|
msgid "Complaint Hotline"
|
||||||
|
msgstr "投诉电话"
|
||||||
|
|
||||||
|
#: wpicp-license.php:115
|
||||||
|
msgid "EDI License Number"
|
||||||
|
msgstr "增值电信业务经营许可证"
|
||||||
|
|
||||||
|
#: wpicp-license.php:123
|
||||||
|
msgid "APP License Number"
|
||||||
|
msgstr "APP 备案号"
|
||||||
|
|
||||||
|
#: wpicp-license.php:131
|
||||||
|
msgid "MiniAPP License Number"
|
||||||
|
msgstr "小程序备案号"
|
||||||
|
|
||||||
|
#: wpicp-license.php:153
|
||||||
msgid "Enter your ICP license number information."
|
msgid "Enter your ICP license number information."
|
||||||
msgstr "输入您的备案号。"
|
msgstr "输入您的备案号。"
|
||||||
|
|
||||||
#: wpicp-license.php:115
|
#: wpicp-license.php:169
|
||||||
msgid ""
|
msgid ""
|
||||||
"This plugin is free forever, and its purpose is to supplement the essential "
|
"This plugin is free forever, and its purpose is to supplement the essential "
|
||||||
"functions that the Chinese version of WordPress lacks. More information at "
|
"functions that the Chinese version of WordPress lacks. More information at "
|
||||||
|
@ -183,11 +206,11 @@ msgstr ""
|
||||||
"此插件永久免费,目的是补充 WordPress 中文版本所缺少的功能。更多信息请访问 <a "
|
"此插件永久免费,目的是补充 WordPress 中文版本所缺少的功能。更多信息请访问 <a "
|
||||||
"href=\"https://wpicp.com\" target=\"_blank\" rel=\"noopener\">WPICP.com</a>"
|
"href=\"https://wpicp.com\" target=\"_blank\" rel=\"noopener\">WPICP.com</a>"
|
||||||
|
|
||||||
#: wpicp-license.php:116
|
#: wpicp-license.php:170
|
||||||
msgid "Why do you need?"
|
msgid "Why do you need?"
|
||||||
msgstr "为什么需要?"
|
msgstr "为什么需要?"
|
||||||
|
|
||||||
#: wpicp-license.php:117
|
#: wpicp-license.php:171
|
||||||
msgid ""
|
msgid ""
|
||||||
"The ICP license is a state-issued registration, All public websites in "
|
"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 "
|
"mainland China must have an ICP number listed on the homepage of the "
|
||||||
|
@ -198,11 +221,11 @@ msgstr ""
|
||||||
"ICP备案号。<a href=\"https://wpicp.com/document/what-would-happen-if-not\" "
|
"ICP备案号。<a href=\"https://wpicp.com/document/what-would-happen-if-not\" "
|
||||||
"target=\"_blank\" rel=\"noopener\">(如果没有会怎样?)</a>"
|
"target=\"_blank\" rel=\"noopener\">(如果没有会怎样?)</a>"
|
||||||
|
|
||||||
#: wpicp-license.php:118
|
#: wpicp-license.php:172
|
||||||
msgid "How to use?"
|
msgid "How to use?"
|
||||||
msgstr "如何使用?"
|
msgstr "如何使用?"
|
||||||
|
|
||||||
#: wpicp-license.php:119
|
#: wpicp-license.php:173
|
||||||
msgid ""
|
msgid ""
|
||||||
"1. Enter your ICP license information below. <a href=\"https://wpicp.com/"
|
"1. Enter your ICP license information below. <a href=\"https://wpicp.com/"
|
||||||
"document/find-my-license\" target=\"_blank\" rel=\"noopener\">(Find My "
|
"document/find-my-license\" target=\"_blank\" rel=\"noopener\">(Find My "
|
||||||
|
@ -211,7 +234,7 @@ msgstr ""
|
||||||
"1. 在下方输入您的 ICP 许可证信息。 <a href=\"https://wpicp.com/document/find-"
|
"1. 在下方输入您的 ICP 许可证信息。 <a href=\"https://wpicp.com/document/find-"
|
||||||
"my-license\" target=\"_blank\" rel=\"noopener\">(找到我的许可证?)</a>"
|
"my-license\" target=\"_blank\" rel=\"noopener\">(找到我的许可证?)</a>"
|
||||||
|
|
||||||
#: wpicp-license.php:120
|
#: wpicp-license.php:174
|
||||||
msgid ""
|
msgid ""
|
||||||
"2. Use the shortcode <code>[wpicp_license]</code> to display the license "
|
"2. Use the shortcode <code>[wpicp_license]</code> to display the license "
|
||||||
"information and link on your website. <a href=\"https://wpicp.com/document/"
|
"information and link on your website. <a href=\"https://wpicp.com/document/"
|
||||||
|
@ -222,16 +245,16 @@ msgstr ""
|
||||||
"href=\"https://wpicp.com/document/integrate-into-theme\" target=\"_blank\" "
|
"href=\"https://wpicp.com/document/integrate-into-theme\" target=\"_blank\" "
|
||||||
"rel=\"noopener\">(集成到主题?)</a>"
|
"rel=\"noopener\">(集成到主题?)</a>"
|
||||||
|
|
||||||
#: wpicp-license.php:127
|
#: wpicp-license.php:181
|
||||||
msgid ""
|
msgid ""
|
||||||
"Enter your ICP license number information. <a href=\"https://wpicp.com/"
|
"Enter your ICP license number information. <a href=\"https://wpicp.com/"
|
||||||
"document/correct-format\" target=\"_blank\" rel=\"noopener\">(Correct "
|
"document/correct-format\" target=\"_blank\" rel=\"noopener\">(Correct "
|
||||||
"format?)</a>"
|
"format?)</a>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"输入您的备案号。<a href=\"https://wpicp.com/document/correct-format\" target="
|
"输入您的备案号。<a href=\"https://wpicp.com/document/correct-format\" "
|
||||||
"\"_blank\" rel=\"noopener\">(正确格式?)</a>"
|
"target=\"_blank\" rel=\"noopener\">(正确格式?)</a>"
|
||||||
|
|
||||||
#: wpicp-license.php:131
|
#: wpicp-license.php:185
|
||||||
msgid ""
|
msgid ""
|
||||||
"Use the shortcode <code>[wpicp_wangan]</code>, You need to register with the "
|
"Use the shortcode <code>[wpicp_wangan]</code>, You need to register with the "
|
||||||
"Public Security Bureau (PSB) to have this license. <a href=\"https://wpicp."
|
"Public Security Bureau (PSB) to have this license. <a href=\"https://wpicp."
|
||||||
|
@ -239,16 +262,40 @@ msgid ""
|
||||||
"is PSB filing?)</a>"
|
"is PSB filing?)</a>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"使用简码<code>[wpicp_wangan]</code>,您需要在公安局(PSB)注册才能获得此备案"
|
"使用简码<code>[wpicp_wangan]</code>,您需要在公安局(PSB)注册才能获得此备案"
|
||||||
"许可证。 <a href=\"https://wpicp.com/document/what-is-psb-filing\" target="
|
"许可证。 <a href=\"https://wpicp.com/document/what-is-psb-filing\" "
|
||||||
"\"_blank\" rel=\"noopener\">(什么是公共安全备案?)</a>"
|
"target=\"_blank\" rel=\"noopener\">(什么是公共安全备案?)</a>"
|
||||||
|
|
||||||
#: wpicp-license.php:189
|
#: wpicp-license.php:243
|
||||||
msgid ""
|
msgid ""
|
||||||
"Enter your Wangan license number and select the abbreviation of your "
|
"Enter your Wangan license number and select the abbreviation of your "
|
||||||
"province."
|
"province."
|
||||||
msgstr "输入您的网安备案号并选择您所在省份的简称。"
|
msgstr "输入您的网安备案号并选择您所在省份的简称。"
|
||||||
|
|
||||||
#: wpicp-license.php:199
|
#: wpicp-license.php:251
|
||||||
|
msgid "Use the shortcode <code>[wpicp_company]</code>"
|
||||||
|
msgstr "使用简码 <code>[wpicp_company]</code>"
|
||||||
|
|
||||||
|
#: wpicp-license.php:258
|
||||||
|
msgid "Use the shortcode <code>[wpicp_email]</code>"
|
||||||
|
msgstr "使用简码 <code>[wpicp_email]</code>"
|
||||||
|
|
||||||
|
#: wpicp-license.php:265
|
||||||
|
msgid "Use the shortcode <code>[wpicp_phone]</code>"
|
||||||
|
msgstr "使用简码 <code>[wpicp_phone]</code>"
|
||||||
|
|
||||||
|
#: wpicp-license.php:272
|
||||||
|
msgid "Use the shortcode <code>[wpicp_edi]</code>"
|
||||||
|
msgstr "使用简码 <code>[wpicp_edi]</code>"
|
||||||
|
|
||||||
|
#: wpicp-license.php:279
|
||||||
|
msgid "Use the shortcode <code>[wpicp_app]</code>"
|
||||||
|
msgstr "使用简码 <code>[wpicp_app]</code>"
|
||||||
|
|
||||||
|
#: wpicp-license.php:285
|
||||||
|
msgid "Use the shortcode <code>[wpicp_minipapp]</code>"
|
||||||
|
msgstr "使用简码 <code>[wpicp_minipapp]</code>"
|
||||||
|
|
||||||
|
#: wpicp-license.php:294
|
||||||
msgid "ICP License Settings"
|
msgid "ICP License Settings"
|
||||||
msgstr "ICP 许可证设置"
|
msgstr "ICP 许可证设置"
|
||||||
|
|
||||||
|
|
0
languages/wpicp-license-zh_TW.mo
Normal file → Executable file
0
languages/wpicp-license-zh_TW.mo
Normal file → Executable file
0
languages/wpicp-license-zh_TW.po
Normal file → Executable file
0
languages/wpicp-license-zh_TW.po
Normal file → Executable file
0
license.txt
Normal file → Executable file
0
license.txt
Normal file → Executable file
10
readme.txt
Normal file → Executable file
10
readme.txt
Normal file → Executable file
|
@ -2,9 +2,9 @@
|
||||||
Contributors: wpfanyi
|
Contributors: wpfanyi
|
||||||
Tags: ICP, ICP License, ICP Beian,备案,备案号
|
Tags: ICP, ICP License, ICP Beian,备案,备案号
|
||||||
Requires at least: 5.4
|
Requires at least: 5.4
|
||||||
Tested up to: 6.2
|
Tested up to: 6.6
|
||||||
Requires PHP: 5.6
|
Requires PHP: 5.6
|
||||||
Stable tag: 1.2
|
Stable tag: 1.3
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
|
@ -68,6 +68,12 @@ Starting with WP ICP License consists of just two steps: installing and setting
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
### 1.3 ###
|
||||||
|
|
||||||
|
* Add Chinese company name and EDI/APP/MiniAPP ICP license short codes.
|
||||||
|
* Use short code [wpicp_company] to display full company name.
|
||||||
|
* Use short code [wpicp_email] to display report email.
|
||||||
|
* Use short code [wpicp_phone] to display complaint hotline.
|
||||||
|
|
||||||
### 1.2 ###
|
### 1.2 ###
|
||||||
|
|
||||||
|
|
109
wpicp-license.php
Normal file → Executable file
109
wpicp-license.php
Normal file → Executable file
|
@ -7,7 +7,7 @@
|
||||||
* Author URI: https://wpicp.com/
|
* Author URI: https://wpicp.com/
|
||||||
* Text Domain: wpicp-license
|
* Text Domain: wpicp-license
|
||||||
* Domain Path: /languages
|
* Domain Path: /languages
|
||||||
* Version: 1.2
|
* Version: 1.3
|
||||||
* Network: True
|
* Network: True
|
||||||
* License: GPLv2 or later
|
* License: GPLv2 or later
|
||||||
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
@ -86,10 +86,64 @@
|
||||||
'wpicp_license_section'
|
'wpicp_license_section'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'wpicp_company',
|
||||||
|
__('Company Name', 'wpicp-license'),
|
||||||
|
'wpicp_company_field_callback',
|
||||||
|
'wpicp_license_settings',
|
||||||
|
'wpicp_license_section'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'wpicp_email',
|
||||||
|
__('Report Email', 'wpicp-license'),
|
||||||
|
'wpicp_email_field_callback',
|
||||||
|
'wpicp_license_settings',
|
||||||
|
'wpicp_license_section'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'wpicp_phone',
|
||||||
|
__('Complaint Hotline', 'wpicp-license'),
|
||||||
|
'wpicp_phone_field_callback',
|
||||||
|
'wpicp_license_settings',
|
||||||
|
'wpicp_license_section'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'wpicp_edi',
|
||||||
|
__('EDI License Number', 'wpicp-license'),
|
||||||
|
'wpicp_edi_field_callback',
|
||||||
|
'wpicp_license_settings',
|
||||||
|
'wpicp_license_section'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'wpicp_app',
|
||||||
|
__('APP License Number', 'wpicp-license'),
|
||||||
|
'wpicp_app_field_callback',
|
||||||
|
'wpicp_license_settings',
|
||||||
|
'wpicp_license_section'
|
||||||
|
);
|
||||||
|
|
||||||
|
add_settings_field(
|
||||||
|
'wpicp_minipapp',
|
||||||
|
__('MiniAPP License Number', 'wpicp-license'),
|
||||||
|
'wpicp_minipapp_field_callback',
|
||||||
|
'wpicp_license_settings',
|
||||||
|
'wpicp_license_section'
|
||||||
|
);
|
||||||
|
|
||||||
register_setting( 'wpicp_license_settings', 'wpicp_province' );
|
register_setting( 'wpicp_license_settings', 'wpicp_province' );
|
||||||
register_setting( 'wpicp_license_settings', 'wpicp_wangan' );
|
register_setting( 'wpicp_license_settings', 'wpicp_wangan' );
|
||||||
register_setting( 'wpicp_license_settings', 'wpicp_license' );
|
register_setting( 'wpicp_license_settings', 'wpicp_license' );
|
||||||
|
register_setting( 'wpicp_license_settings', 'wpicp_company');
|
||||||
|
register_setting( 'wpicp_license_settings', 'wpicp_email' );
|
||||||
|
register_setting( 'wpicp_license_settings', 'wpicp_phone' );
|
||||||
|
register_setting( 'wpicp_license_settings', 'wpicp_edi');
|
||||||
|
register_setting( 'wpicp_license_settings', 'wpicp_app');
|
||||||
|
register_setting( 'wpicp_license_settings', 'wpicp_minipapp');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,6 +245,47 @@ function wpicp_wangan_field_callback() {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function wpicp_company_field_callback() {
|
||||||
|
$company = get_option('wpicp_company');
|
||||||
|
echo '<input type="text" id="wpicp_company" name="wpicp_company" value="' . esc_attr($company) . '" />';
|
||||||
|
echo '<p class="description" style="font-size:13px;">' . __( 'Use the shortcode <code>[wpicp_company]</code>', 'wpicp-license' ) . '</p>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function wpicp_email_field_callback() {
|
||||||
|
$company = get_option('wpicp_email');
|
||||||
|
echo '<input type="text" id="wpicp_email" name="wpicp_email" value="' . esc_attr($company) . '" />';
|
||||||
|
echo '<p class="description" style="font-size:13px;">' . __( 'Use the shortcode <code>[wpicp_email]</code>', 'wpicp-license' ) . '</p>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function wpicp_phone_field_callback() {
|
||||||
|
$company = get_option('wpicp_phone');
|
||||||
|
echo '<input type="text" id="wpicp_phone" name="wpicp_phone" value="' . esc_attr($company) . '" />';
|
||||||
|
echo '<p class="description" style="font-size:13px;">' . __( 'Use the shortcode <code>[wpicp_phone]</code>', 'wpicp-license' ) . '</p>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function wpicp_edi_field_callback() {
|
||||||
|
$edi = get_option('wpicp_edi');
|
||||||
|
echo '<input type="text" id="wpicp_edi" name="wpicp_edi" value="' . esc_attr($edi) . '" />';
|
||||||
|
echo '<p class="description" style="font-size:13px;">' . __( 'Use the shortcode <code>[wpicp_edi]</code>', 'wpicp-license' ) . '</p>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function wpicp_app_field_callback() {
|
||||||
|
$app = get_option('wpicp_app');
|
||||||
|
echo '<input type="text" id="wpicp_app" name="wpicp_app" value="' . esc_attr($app) . '" />';
|
||||||
|
echo '<p class="description" style="font-size:13px;">' . __( 'Use the shortcode <code>[wpicp_app]</code>', 'wpicp-license' ) . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function wpicp_minipapp_field_callback() {
|
||||||
|
$minipapp = get_option('wpicp_minipapp');
|
||||||
|
echo '<input type="text" id="wpicp_minipapp" name="wpicp_minipapp" value="' . esc_attr($minipapp) . '" />';
|
||||||
|
echo '<p class="description" style="font-size:13px;">' . __( 'Use the shortcode <code>[wpicp_minipapp]</code>', 'wpicp-license' ) . '</p>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Settings page callback
|
// Settings page callback
|
||||||
function wpicp_license_settings_page() {
|
function wpicp_license_settings_page() {
|
||||||
|
@ -207,5 +302,17 @@ function wpicp_license_settings_page() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Ensure this code runs after other plugins have loaded
|
||||||
|
add_action('plugins_loaded', 'wpicp_sync_cn_settings');
|
||||||
|
|
||||||
|
function wpicp_sync_cn_settings() {
|
||||||
|
if (get_option('wpicp_license') == '' && get_option('cn_icp') != '') {
|
||||||
|
update_option('wpicp_license', get_option('cn_icp'));
|
||||||
|
}
|
||||||
|
if (get_option('wpicp_wangan') == '' && get_option('cn_ga') != '') {
|
||||||
|
update_option('wpicp_wangan', get_option('cn_ga'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue