1
0
Fork 0
mirror of https://github.com/yunluo/gdk.git synced 2024-05-12 03:06:54 +02:00
gdk/framework/options-config.php

610 lines
24 KiB
PHP
Raw Normal View History

2020-01-25 12:06:43 +01:00
<?php
/**
2021-10-10 15:48:53 +02:00
* 插件选项配置文件.
2020-01-25 12:06:43 +01:00
*/
2020-01-26 18:57:04 +01:00
$gdk_options = [
2021-10-10 15:48:53 +02:00
'优化' => [
2020-03-15 14:29:06 +01:00
[
2021-10-10 15:48:53 +02:00
'name' => '古腾堡编辑器',
'desc' => '新版编辑器尚不成熟,很多主题不兼容,建议禁用',
'id' => 'gdk_diasble_gutenberg',
'type' => 'select',
2020-03-15 14:29:06 +01:00
'options' => [
'0' => '启用',
'1' => '禁用',
2020-03-15 14:29:06 +01:00
],
2021-10-10 15:48:53 +02:00
'std' => '1',
2020-03-15 14:29:06 +01:00
],
2021-10-06 15:44:41 +02:00
[
2021-10-10 15:48:53 +02:00
'name' => '新版小工具块编辑器',
'desc' => '5.8版本小工具使用块编辑器,很多主题不兼容,建议禁用',
'id' => 'gdk_diasble_widgets_block',
'type' => 'select',
2021-10-06 15:44:41 +02:00
'options' => [
'0' => '启用',
'1' => '禁用',
2021-10-06 15:44:41 +02:00
],
2021-10-10 15:48:53 +02:00
'std' => '1',
2021-10-06 15:44:41 +02:00
],
2020-03-15 14:29:06 +01:00
[
2021-10-10 15:48:53 +02:00
'name' => '头部冗余代码',
'desc' => '禁用<br>WordPress头部自带很多无用代码不安全且浪费建议禁用',
'id' => 'gdk_diasble_head_useless',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => 'Emojis表情功能',
'desc' => '禁用<br>WordPress自带的Emojis功能会加载国外资源那是网站速度建议禁用',
'id' => 'gdk_disable_emojis',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '前台Dashicons字体资源',
'desc' => '禁用<br>一般前台不需要加载dashicons字体建议禁用',
'id' => 'gdk_disable_dashicons',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => '中英文自动空格',
'desc' => '启用<br>【开启后,中文和英文之前将自动增加一个空格,比如:WordPress插件=>WordPress 插件】',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_auto_space',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
2021-10-10 15:48:53 +02:00
'name' => 'XML-RPC发布功能',
'desc' => '禁用<br>该功能有安全风险如果不使用WordPress的手机客户端或者第三方编辑器软件那么建议禁用',
'id' => 'gdk_disable_xmlrpc',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '文章版本功能',
'desc' => '禁用<br>该功能有会造成数据库体量暴增为了你的数据库考虑,建议禁用',
'id' => 'gdk_disable_revision',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => 'Pingback功能',
'desc' => '禁用<br>该功能会增加垃圾评论的几率,建议禁用',
'id' => 'gdk_disable_trackbacks',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '文件上传重命名',
'desc' => '该功能会将上传的文件图片等按照数字格式重命名,服务器文件不建议使用中文,默认开启',
'id' => 'gdk_upload_rename',
'type' => 'select',
2020-03-15 14:29:06 +01:00
'options' => [
'0' => '禁用',
'1' => '开启',
],
2021-10-10 15:48:53 +02:00
'std' => '1',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => 'WordPress更新',
'desc' => '禁用<br>WordPress更新会不时发送请求数据所以可以关闭WordPress更新包括主题插件和内核更新,建议禁用',
'id' => 'gdk_diasble_wp_update',
'type' => 'checkbox',
],
2020-03-15 14:29:06 +01:00
[
2021-10-10 15:48:53 +02:00
'name' => 'WordPress更新中国加速',
'desc' => '启用<br>该功能会帮助更顺利更新WordPress注意如果上面的WordPress禁用更新了此处设置无效由Litepress提供镜像建议开启',
'id' => 'gdk_porxy_update',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '头像加速功能',
'desc' => '该功能会增加头像加载速度有随机头像V2EX头像镜像和七牛头像镜像默认选择随机头像本地头像和微信头像不受影响',
'id' => 'gdk_switch_get_avatar',
'type' => 'select',
2020-03-15 14:29:06 +01:00
'options' => [
'1' => '随机头像',
'2' => 'V2EX头像镜像',
'3' => '七牛头像镜像',
2021-10-06 15:44:41 +02:00
'4' => 'Cravatar',
2020-03-15 14:29:06 +01:00
],
2021-10-10 15:48:53 +02:00
'std' => '1',
2020-03-15 14:29:06 +01:00
],
],
'SEO' => [
2020-03-15 14:29:06 +01:00
[
'name' => '网站关键字', //选项显示的文字,选填
2021-10-10 15:48:53 +02:00
'desc' => '各关键字间用半角逗号', '分割数量在6个以内最佳。', //选项显示的一段描述文字,选填
'id' => 'gdk_keywords', //选项的id必须是唯一后面根据这个获取值必填
'type' => 'text', //种类,这个是普通的文字输入,必填
'std' => '', //选项的默认值,选填
2020-03-15 14:29:06 +01:00
],
[
'name' => '网站描述',
'desc' => '用简洁的文字描述本站点字数建议在120个字以内。',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_description',
2020-03-15 14:29:06 +01:00
'type' => 'text',
],
[
'name' => 'title分隔符',
'desc' => '显示在浏览器标题栏的一个用来分隔网站名字的',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_delimiter',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => '|',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '自动添加nofollow',
'desc' => '该功能会给外链自动添加nofollow,推荐开启',
'id' => 'gdk_nofollow',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => '分类去Category优化',
'desc' => '该功能会给外链自动添加nofollow,默认开启',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_no_category',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
2021-10-10 15:48:53 +02:00
'name' => '文章自动内链',
'desc' => '启用<br>该功能会将文章中与标签匹配的文字自动添加标签链接,如果是纯文字的内容建议打开,注意该功能和一些短代码等功能有冲突',
'id' => 'gdk_tag_link',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => '关键词链接次数',
'desc' => '文章中最多链接的次数默认是5',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_tag_num',
2020-03-15 14:29:06 +01:00
'type' => 'number',
2021-10-10 15:48:53 +02:00
'std' => 5,
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => 'Robots.txt 优化',
'desc' => '启用<br>该功能会自动生成一个虚拟Robots.txt文件,和真实文件效果一样的,默认开启',
'id' => 'gdk_robots',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '禁止蜘蛛爬取作者页面',
'desc' => '启用<br>该功能会屏蔽蜘蛛访问作者页面,如果是单作者网站没必要展示作者页,根据自己网站实际情况选择是否开启,建议启用',
'id' => 'gdk_no_author_page',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '网站地图 sitemap',
'desc' => '启用<br>该功能会自动生成网站地图[xml版和html版],链接:域名/sitemap.xml,域名/sitemap.html,开启后建议更新固定链接一次,建议启用开启',
'id' => 'gdk_sitemap_xml',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '文章图片自动添加alt以及title',
'desc' => '该功能会自动给文章中图片添加alt和title,并且是按照文章标题进行命名,默认开启',
'id' => 'gdk_seo_img',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => '外链GO跳转',
'desc' => '启用<br>启用后,文章外链会转化为/go?url=的类型',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_link_go',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
2021-10-10 15:48:53 +02:00
'name' => '百度自动&主动推送',
'desc' => '启用<br>启用后可以采用自动推送和主动推送给百度',
'id' => 'gdk_baidu_push',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => '主动推送接口token',
'desc' => '在百度站长平台获取主动推送token比如http://data.zz.baidu.com/urls?site=xxoo&token=<span class="key_word">一组字符</span>, 需要填写的是红色部分,<a class="key_word" rel="nofollow" href="http://zhanzhang.baidu.com/linksubmit/index" target="_blank">主动推送接口地址</a>',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_baidu_token',
2020-03-15 14:29:06 +01:00
'type' => 'text',
],
],
2021-10-10 15:48:53 +02:00
'安全' => [
2020-03-15 14:29:06 +01:00
[
2021-10-10 15:48:53 +02:00
'name' => '屏蔽各种不正常的请求',
'desc' => '该功能会将各种不正常的请求比如破解,注入类的屏蔽掉,默认开启',
'id' => 'gdk_block_requst',
'type' => 'select',
2020-03-15 14:29:06 +01:00
'options' => [
'0' => '禁用',
'1' => '启用',
2020-03-15 14:29:06 +01:00
],
2021-10-10 15:48:53 +02:00
'std' => '1',
2020-03-15 14:29:06 +01:00
],
[
'name' => '网站维护模式',
'desc' => '启用<br>启用后,未登录用户将看到一个简陋的维护页面',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_maintenance_mode',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'name' => '禁用REST API功能',
'desc' => '禁用<br>启用后REST API功能将关闭,如果没不使用该功能的话,建议关闭',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_disable_restapi',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'name' => '保护用户暴露用户名',
'desc' => '开启<br>启用后,将隐藏掉用户的登录名,起到保护作用',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_hide_user_name',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'title' => '登陆安全防御',
2021-10-10 15:48:53 +02:00
'type' => 'title',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '登陆安全保护',
'desc' => '该功能会将连续多次登陆错误的用户暂时锁定,待解锁后方可重新登陆,默认开启',
'id' => 'gdk_lock_login',
'type' => 'select',
2020-03-15 14:29:06 +01:00
'options' => [
'1' => '启用',
2020-03-15 14:29:06 +01:00
'0' => '禁用',
],
2021-10-10 15:48:53 +02:00
'std' => '1',
2020-03-15 14:29:06 +01:00
],
[
'name' => '登录失败最大次数',
'desc' => '默认5',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_failed_login_limit',
2020-03-15 14:29:06 +01:00
'type' => 'number',
2021-10-10 15:48:53 +02:00
'std' => 5,
2020-03-15 14:29:06 +01:00
],
[
'name' => '登录失败锁定时间',
'desc' => '单位秒默认60',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_lockout_duration',
2020-03-15 14:29:06 +01:00
'type' => 'number',
2021-10-10 15:48:53 +02:00
'std' => 60,
2020-03-15 14:29:06 +01:00
],
2020-04-03 13:11:11 +02:00
[
'name' => '登录失败邮件通知',
'desc' => '启用<br>开启后,将所有登陆失败信息发邮件通知管理员,预计会收到很多邮件,不建议启用',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_login_email',
2020-04-03 13:11:11 +02:00
'type' => 'checkbox',
],
2020-03-15 14:29:06 +01:00
[
'name' => '登陆数学验证',
'desc' => '启用<br>开启后,将会登陆页面增加数学验证码',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_login_verify',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'title' => '垃圾评论屏蔽',
2021-10-10 15:48:53 +02:00
'type' => 'title',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '垃圾评论拦截',
'desc' => '该功能会默认屏蔽垃圾评论,支持纯外语拦截,日语拦截[外贸站慎用],关键词黑名单拦截,请务必选择对应主题的评论方式,关键词黑名单如图设置<a class="key_word" target="_blank" href="https://ae03.alicdn.com/kf/U146356e193b14a6da3f7cbb9cf507ea3D.png">点击查看如图设置</a>',
'id' => 'gdk_fuck_spam',
'type' => 'select',
2020-03-15 14:29:06 +01:00
'options' => [
'0' => '禁用',
'1' => '启用(推荐)',
2020-03-15 14:29:06 +01:00
],
2021-10-10 15:48:53 +02:00
'std' => '1',
2020-03-15 14:29:06 +01:00
],
],
2021-10-10 15:48:53 +02:00
'高级' => [
2020-03-15 14:29:06 +01:00
[
2021-10-10 15:48:53 +02:00
'name' => '图片懒加载',
'desc' => '启用<br>该功能会降低因为图片而导致的打开速度慢问题,建议开启',
'id' => 'gdk_lazyload',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'HTML代码压缩',
'desc' => '启用<br>开启后将压缩网页HTML代码提高网页加载速度',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_compress',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'name' => '侧边栏缓存',
'desc' => '启用<br>开启后,将会自动缓存小工具,如果想禁止缓存某个小工具,可以去小工具页面排除',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_sidebar_cache',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
2020-03-21 17:33:39 +01:00
[
'name' => '链接新窗口打开',
'desc' => '启用<br>启用后,所有文章链接将在新标签页打开',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_target_blank',
2020-03-21 17:33:39 +01:00
'type' => 'checkbox',
],
2020-03-15 14:29:06 +01:00
[
'title' => '统一支付设置',
2021-10-10 15:48:53 +02:00
'type' => 'title',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '网站Psyjs支付功能',
'desc' => '启用<br>网站支付功能需要HTTPS支持,需要开通Payjs使用,<a class="key_word" href="https://payjs.cn/ref/ZVEMKD" target="_blank" >点击注册Payjs</a>',
'id' => 'gdk_payjs',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => '支付宝支付通道',
'desc' => '启用<br>开启后,将增加支付宝支付方式,支付宝通道需要到payjs申请开通,如果开通的话,建议使用支付宝,因为费率便宜',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_payjs_alipay',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'name' => '金币和RMB兑换关系',
'desc' => '请输入兑换关系默认1RMB=10金币请慎重选择一旦设置好后面不能修改的,本选项仅对会员金币支付生效,游客免登陆支持不受影响',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_rate',
2020-03-15 14:29:06 +01:00
'type' => 'number',
2021-10-10 15:48:53 +02:00
'std' => 10,
2020-03-15 14:29:06 +01:00
],
[
'name' => 'PayJs商户号',
'desc' => '',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_payjs_id',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => 2333333333,
2020-03-15 14:29:06 +01:00
],
[
'name' => 'PayJs密钥',
'desc' => '',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_payjs_key',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => 444444444,
2020-03-15 14:29:06 +01:00
],
[
'title' => 'CDN镜像加速',
2021-10-10 15:48:53 +02:00
'type' => 'title',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => 'CDN镜像加速',
'desc' => '开启<br>本功能可以将本站静态资源同步到远程CDN服务器减轻本站的流量压力提高网站整体速度国内主流CDN服务商[七牛又拍阿里OSS腾讯COS华为BOS等等]均支持,默认关闭,配置好服务器端后开启',
'id' => 'gdk_cdn',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'CDN域名',
'desc' => '输入您的CDN域名一般需要到VDN后台获取必须带 <span class="key_word">http(s):// ,且结尾不能带/ </span>',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_cdn_host',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => '',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'CDN镜像文件格式',
'desc' => '在输入框内添加准备镜像的文件格式比如png|jpg|jpeg|gif|ico使用|分隔)',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_cdn_ext',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => 'png|jpg|jpeg|gif|ico|html|7z|zip|rar|pdf|ppt|wmv|mp4|avi|mp3|txt',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'CDN镜像目录',
'desc' => '在输入框内添加准备镜像的文件夹默认为wp-content|wp-includes使用|分隔)',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_cdn_dir',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => 'wp-content|wp-includes',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => '静态CDN服务商',
'desc' => '选择使用国内CDN服务商,此项主要影响CDN缩略图,请选择对应服务商',
'id' => 'gdk_cdn_serves',
'type' => 'select',
'options' => [
'1' => '七牛云',
'2' => '又拍云',
'3' => '腾讯云COS',
'4' => '阿里云OSS',
'5' => '华为云OBS',
'6' => '百度云BOS',
],
2021-10-10 15:48:53 +02:00
'std' => '4',
],
2020-03-15 14:29:06 +01:00
[
'name' => 'CDN水印',
'desc' => '启用<br>启用后请在七牛又拍OSS等CDN中设置自定义样式名字为<span class="key_word">water.jpg</span>,分隔符为<span class="key_word">!</span>',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_cdn_water',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'title' => '微信登录设置',
2021-10-10 15:48:53 +02:00
'type' => 'title',
2020-03-15 14:29:06 +01:00
],
[
'name' => '是否启用微信扫码登录',
'desc' => '启用<br>开启后可以使用微信扫码另外需要HTTPS',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_weauth_oauth',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'name' => '强制微信登录',
'desc' => '启用<br>开启后将禁用WordPress自带的登录所有登录地址都跳转到微信的登录如需临时使用自带登录可以使用这个链接你的域名/wp-login.php?loggedout=true',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_weauth_force',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'title' => '微信推送设置',
2021-10-10 15:48:53 +02:00
'type' => 'title',
2020-03-15 14:29:06 +01:00
],
[
'name' => '评论微信推送提醒',
'desc' => '启用<br>开启后,如果网站有新的评论,可以给管理员的微信推送提醒',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_workpush',
2020-03-15 14:29:06 +01:00
'type' => 'checkbox',
],
[
'name' => '企业微信推送应用ID',
'desc' => '请输入您的企业微信推送应用ID',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_workpush_id',
2020-03-15 14:29:06 +01:00
'type' => 'text',
],
[
'name' => '企业微信推送应用Secret',
'desc' => '请输入您的企业微信推送应用Secret',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_workpush_secret',
'type' => 'text',
],
[
'name' => '企业微信企业ID',
'desc' => '请输入您的企业微信ID',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_work_id',
2020-03-15 14:29:06 +01:00
'type' => 'text',
],
[
'title' => '微信群发设置',
2021-10-10 15:48:53 +02:00
'type' => 'title',
],
[
'name' => '微信wxPushet应用Token',
'desc' => '请输入Wxpuers应用Token从wxpusher后台获取',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_wxpusher_key',
'type' => 'text',
],
[
'name' => '微信Wxpusher主题ID',
'desc' => '请输入您的Wxpusher主题ID可以从后台获取',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_wxpusher_id',
'type' => 'text',
],
[
'title' => '微信公众号设置',
2021-10-10 15:48:53 +02:00
'type' => 'title',
],
[
'name' => '微信公众号TOKEN',
'desc' => '请输入您的微信公众号TOKEN,微信公众号后台获取',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_wxmp_token',
'type' => 'text',
],
[
'name' => '微信公众号二维码',
'desc' => '请输入您的微信订阅号/公众号二维码图片链接',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_mp_qr',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => '',
2020-03-15 14:29:06 +01:00
],
[
'title' => 'HTML5 桌面推送',
2021-10-10 15:48:53 +02:00
'type' => 'title',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => 'HTML5 桌面推送',
'desc' => '启用<br>该功能开启后会在浏览器右下角进行信息推送',
'id' => 'gdk_h5notice',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'HTML5推送标题【必选】',
'desc' => '显示在弹窗顶部',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_notification_title',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => 'Hi你好',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'HTML5推送间隔【必选】',
'desc' => '输入数字当自动关闭或者用户关闭之后多久再次弹窗默认10天',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_notification_days',
2020-03-15 14:29:06 +01:00
'type' => 'number',
2021-10-10 15:48:53 +02:00
'std' => 10,
2020-03-15 14:29:06 +01:00
],
[
'name' => 'HTML5推送COOKIE【必选】',
'desc' => '修改COOKIE值可以强制向访客推送新的信息无视时间间隔不能使用中文默认233',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_notification_cookie',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => '233',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'HTML5推送图片【必选】',
'desc' => '填写一个正方形的图片,显示在推送信息左侧,默认为默认头像',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_notification_icon',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => '',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'HTML5推送链接【可选】',
'desc' => '当用户点击弹窗的时候说点击的链接,默认为极客公园',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_notification_link',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => 'https://gitcafe.net',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'HTML5推送内容',
'desc' => '在这里输入推送主体内容,字数合适就行,不能太多【必选】',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_notification_body',
2020-03-15 14:29:06 +01:00
'type' => 'textarea',
2021-10-10 15:48:53 +02:00
'std' => '极客公园一个分享有趣的安卓APP和实用的WordPress技术以及Windows使用技巧的网站',
2020-03-15 14:29:06 +01:00
],
[
'title' => 'SMTP邮箱设置',
2021-10-10 15:48:53 +02:00
'type' => 'title',
2020-03-15 14:29:06 +01:00
],
[
2021-10-10 15:48:53 +02:00
'name' => 'SMTP邮箱发送',
'desc' => '启用<br>该功能利用第三方SMTP邮箱服务发送邮件,比如评论邮件,需要配置好再开启',
'id' => 'gdk_smtp',
'type' => 'checkbox',
2020-03-15 14:29:06 +01:00
],
[
'name' => '发件人昵称',
'desc' => '请输入您的网站名称,比如:云落',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_smtp_username',
2020-03-15 14:29:06 +01:00
'type' => 'text',
],
[
'name' => 'SMTP服务器地址',
'desc' => '请输入您的邮箱的SMTP服务器<a class="key_word" target="_blank" href="https://blog.csdn.net/whyhonest/article/details/7289420">点击查看常用SMTP地址</a>',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_smtp_host',
2020-03-15 14:29:06 +01:00
'type' => 'text',
2021-10-10 15:48:53 +02:00
'std' => 'smtp.qq.com',
2020-03-15 14:29:06 +01:00
],
[
'name' => 'SMTP服务器端口',
'desc' => '请输入您的smtp端口一般QQ邮箱推荐使用465端口',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_smtp_port',
2020-03-15 14:29:06 +01:00
'type' => 'number',
2021-10-10 15:48:53 +02:00
'std' => 465,
2020-03-15 14:29:06 +01:00
],
[
'name' => '邮箱账号',
'desc' => '请输入您的邮箱地址比如云落的sp91@qq.com',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_smtp_mail',
2020-03-15 14:29:06 +01:00
'type' => 'text',
],
[
'name' => '邮箱密码',
'desc' => '请输入您的邮箱授权码,<span class="key_word">注意不同邮箱服务器的密码不一样,有的是密码,有的比如QQ邮箱就是授权码</span>',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_smtp_password',
2020-03-15 14:29:06 +01:00
'type' => 'password',
],
[
'title' => '自定义代码',
2021-10-10 15:48:53 +02:00
'type' => 'title',
2020-03-15 14:29:06 +01:00
],
[
'name' => '网站头部自定义代码',
'desc' => '代码将插入到head区域',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_custom_head_code',
2020-03-15 14:29:06 +01:00
'type' => 'textarea',
],
[
'name' => '网站底部自定义代码',
'desc' => '代码将插入到foot区域',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_custom_foot_code',
2020-03-15 14:29:06 +01:00
'type' => 'textarea',
],
[
'name' => '文章顶部自定义内容',
'desc' => '在文章顶部插入一个内容',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_artical_top',
2020-03-15 14:29:06 +01:00
'type' => 'textarea',
],
[
'name' => '文章底部自定义内容',
'desc' => '在文章底部插入一个内容',
2021-10-10 15:48:53 +02:00
'id' => 'gdk_artical_bottom',
2020-03-15 14:29:06 +01:00
'type' => 'textarea',
],
],
];
2020-03-15 14:29:06 +01:00
//载入主题配置,默认路径在主题根目录options.php
2021-10-10 15:48:53 +02:00
if (file_exists(get_template_directory().'/options.php')) {
include get_template_directory().'/options.php';
}
2020-03-15 14:29:06 +01:00
if (!empty($gdk_theme_options)) {
$gdk_options = array_merge($gdk_theme_options, $gdk_options);
}
2020-03-15 14:29:06 +01:00
//var_dump($gdk_options);