forked from yrccondor/mdx
/
admin_fn.php
343 lines (341 loc) · 21.5 KB
/
admin_fn.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<?php
settings_errors();
$trueon=__('开启', 'mdx');
$falseoff=__('关闭', 'mdx');
wp_enqueue_script('media-upload');
wp_enqueue_script('my-tag', get_bloginfo('template_url' ).'/js/admin_tag.js');
//加载上传图片的js
wp_enqueue_script('thickbox');
//加载css(wp自带)
wp_enqueue_style('thickbox');
?>
<div class="wrap"><h1><?php _e('MDx主题 - 功能', 'mdx');?></h1>
<?php
if(($_POST['mdx_ref'] == 'true') && check_admin_referer('mdx_options_update')){
update_option('mdx_night_style', $_POST['mdx_night_style']);
update_option('mdx_auto_night_style', $_POST['mdx_auto_night_style']);
update_option('mdx_notice', htmlentities(stripslashes($_POST['mdx_notice'])));
update_option('mdx_open_side', $_POST['mdx_open_side']);
update_option('mdx_img_box', $_POST['mdx_img_box']);
update_option("mdx_readmore", $_POST['mdx_readmore']);
update_option("mdx_post_money", $_POST['mdx_post_money']);
update_option("mdx_lazy_load_mode", $_POST['mdx_lazy_load_mode']);
update_option('mdx_read_pro', $_POST['mdx_read_pro']);
update_option('mdx_auto_scroll', $_POST['mdx_auto_scroll']);
update_option('mdx_load_pro', $_POST['mdx_load_pro']);
update_option('mdx_post_list_1', $_POST['mdx_post_list_1']);
update_option('mdx_post_list_2', $_POST['mdx_post_list_2']);
update_option('mdx_speed_pre', $_POST['mdx_speed_pre']);
update_option('mdx_smooth_scroll', $_POST['mdx_smooth_scroll']);
update_option('mdx_share_area', $_POST['mdx_share_area']);
update_option('mdx_tap_to_top', $_POST['mdx_tap_to_top']);
update_option('mdx_hot_posts', $_POST['mdx_hot_posts']);
update_option('mdx_hot_posts_num', $_POST['mdx_hot_posts_num']);
update_option('mdx_hot_posts_cat', $_POST['mdx_hot_posts_cat']);
update_option('mdx_hot_posts_text', $_POST['mdx_hot_posts_text']);
update_option('mdx_all_posts_text', $_POST['mdx_all_posts_text']);
update_option('mdx_you_may_like', $_POST['mdx_you_may_like']);
update_option('mdx_you_may_like_way', $_POST['mdx_you_may_like_way']);
update_option('mdx_you_may_like_text', $_POST['mdx_you_may_like_text']);
update_option('mdx_real_search', $_POST['mdx_real_search']);
update_option('mdx_seo_key', $_POST['mdx_seo_key']);
update_option('mdx_auto_des', $_POST['mdx_auto_des']);
update_option('mdx_seo_des', htmlentities(stripslashes($_POST['mdx_seo_des'])));
update_option('mdx_head_js', htmlentities(stripslashes($_POST['mdx_head_js'])));
update_option('mdx_footer_js', htmlentities(stripslashes($_POST['mdx_footer_js'])));
?>
<div class="notice notice-success is-dismissible">
<p><?php _e('设置已保存。', 'mdx'); ?></p>
</div>
<?php
}elseif(($_POST['mdx_ref'] == 'true') && !(check_admin_referer('mdx_options_update'))){
?>
<div class="notice notice-error is-dismissible">
<p><?php _e('更改未能保存。', 'mdx'); ?></p>
</div>
<?php
}?>
<form method="post" action="">
<?php
wp_nonce_field('mdx_options_update');
?>
<input type='hidden' name='mdx_ref' value='true'>
<table class="form-table">
<tr>
<th scope="row"><?php _e('夜间模式', 'mdx');?></th>
<td>
<?php $mdx_v_night_style=get_option('mdx_night_style');?>
<fieldset>
<label><input class="mdx_stbs" type="radio" name="mdx_night_style" value="true" <?php if($mdx_v_night_style=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input class="mdx_stbs" type="radio" name="mdx_night_style" value="false" <?php if($mdx_v_night_style=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,侧边栏中会出现夜间模式切换按钮。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><?php _e('自动夜间模式', 'mdx');?></th>
<td>
<?php $mdx_v_auto_night_style=get_option('mdx_auto_night_style');?>
<fieldset>
<label><input class="mdx_stbsip" type="radio" name="mdx_auto_night_style" value="true" <?php if($mdx_v_auto_night_style=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input class="mdx_stbsip" type="radio" name="mdx_auto_night_style" value="false" <?php if($mdx_v_auto_night_style=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('<strong>仅当开启夜间模式功能后此选项方可生效。</strong>开启后,22:30至第二天5:30之间打开页面时自动加载夜间模式。优先级低于用户自行设置。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_notice"><?php _e('网站公告', 'mdx');?></label></th>
<td><textarea name="mdx_notice" id="mdx_notice" rows="7" cols="50"><?php echo esc_attr(get_option('mdx_notice'))?></textarea>
<p class="description"><?php _e('在这里编辑网站公告。公告会显示在首页文章列表的顶部,留空则不会显示。支持 <code>HTML</code> 格式.', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><?php _e('使用手势打开抽屉菜单', 'mdx');?></th>
<td>
<?php $mdx_v_open_side=get_option('mdx_open_side');?>
<fieldset>
<label><input type="radio" name="mdx_open_side" value="true" <?php if($mdx_v_open_side=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_open_side" value="false" <?php if($mdx_v_open_side=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,可以通过从屏幕左侧向中心滑动的方式调出抽屉菜单。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><?php _e('ImgBox', 'mdx');?></th>
<td>
<?php $mdx_v_img_box=get_option('mdx_img_box');?>
<fieldset>
<label><input type="radio" name="mdx_img_box" value="true" <?php if($mdx_v_img_box=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_img_box" value="false" <?php if($mdx_v_img_box=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,对于文章内包裹在指向自身的链接中的图片可点击查看大图。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_readmore"><?php _e('“阅读更多”文本自定义', 'mdx');?></label></th>
<td><input name="mdx_readmore" type="text" id="mdx_readmore" value="<?php echo esc_attr(get_option('mdx_readmore'))?>" class="regular-text">
<p class="description" id="mdx_footer"><?php _e('在此自定义“阅读更多”按钮上的文本。', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><?php _e('赞赏二维码', 'mdx');?></th>
<td>
<input name="mdx_post_money" type="text" id="mdx_post_money" value="<?php echo esc_attr(get_option('mdx_post_money'))?>" class="regular-text">
<button type="button" id="insert-media-button" class="button"><?php _e('选择图片', 'mdx');?></button>
<p class="description"><?php _e('你可以上传或指定你的媒体库中的图片作为赞赏二维码。当此空不为空时将在文章底部显示赞赏按钮。', 'mdx');?></p>
<img id="img1" style="width:100%;max-width:300px;height:auto;margin-top:5px;"></img>
</td>
</tr>
<tr>
<th scope="row"><?php _e('阅读进度展示', 'mdx');?></th>
<td>
<?php $mdx_v_read_pro=get_option('mdx_read_pro');?>
<fieldset>
<label><input type="radio" name="mdx_read_pro" value="true" <?php if($mdx_v_read_pro=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_read_pro" value="false" <?php if($mdx_v_read_pro=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,会在文章/单独页面展示阅读进度。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_lazy_load_mode"><?php _e('LazyLoad 模式', 'mdx');?></label></th>
<td>
<?php $mdx_v_lazy_load_mode=get_option('mdx_lazy_load_mode');?>
<select name="mdx_lazy_load_mode" id="mdx_lazy_load_mode">
<option value="speed" <?php if($mdx_v_lazy_load_mode=='speed'){?>selected="selected"<?php }?>><?php _e('速度优先', 'mdx');?></option>
<option value="seo1" <?php if($mdx_v_lazy_load_mode=='seo1'){?>selected="selected"<?php }?>><?php _e('SEO优先(轻度)', 'mdx');?></option>
<option value="seo2" <?php if($mdx_v_lazy_load_mode=='seo2'){?>selected="selected"<?php }?>><?php _e('SEO优先(重度)', 'mdx');?></option>
</select>
<p class="description"><?php _e('LazyLoad 即图片会在即将滚动到屏幕内时才开始加载的技术(可能会影响 SEO)。此设置会影响图片加载模式。<br>速度优先:几乎所有图片都会使用 LazyLoad<br>SEO优先(轻度):除文章内使用的图片外几乎所有图片都会使用 LazyLoad<br>SEO优先(重度):文章内使用的图片和文章列表使用的图片不会使用 LazyLoad,但仍有少量装饰性图片会使用', 'mdx');?></p>
</td>
</tr>
<tr>
<th scope="row"><?php _e('转移设备时记录阅读进度', 'mdx');?></th>
<td>
<?php $mdx_v_auto_scroll=get_option('mdx_auto_scroll');?>
<fieldset>
<label><input type="radio" name="mdx_auto_scroll" value="true" <?php if($mdx_v_auto_scroll=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_auto_scroll" value="false" <?php if($mdx_v_auto_scroll=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,文章中通过二维码转移到其他设备阅读时会自动记录阅读进度并滚动。建议在网页加载速度较快时启用。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><?php _e('页面加载进度条', 'mdx');?></th>
<td>
<?php $mdx_v_load_pro=get_option('mdx_load_pro');?>
<fieldset>
<label><input type="radio" name="mdx_load_pro" value="true" <?php if($mdx_v_load_pro=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_load_pro" value="false" <?php if($mdx_v_load_pro=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,文章/单独页面加载时会在页面顶部显示加载进度条(仅动画,非真实进度),页面加载完成后消失。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_post_list_1"><?php _e('文章列表详细信息 - 位置1', 'mdx');?></label></th>
<td>
<?php $mdx_v_post_list_1=get_option('mdx_post_list_1');?>
<select name="mdx_post_list_1" id="mdx_post_list_1">
<option value="view" <?php if($mdx_v_post_list_1=='view'){?>selected="selected"<?php }?>>浏览量</option>
<option value="time" <?php if($mdx_v_post_list_1=='time'){?>selected="selected"<?php }?>>发表时间</option>
<option value="comments" <?php if($mdx_v_post_list_1=='comments'){?>selected="selected"<?php }?>>评论数</option>
</select>
<p class="description"><?php _e('详细信息显示在文章列表每篇文章的底部。在此指定你希望展示的信息。', 'mdx');?></p>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_post_list_2"><?php _e('文章列表详细信息 - 位置2', 'mdx');?></label></th>
<td>
<?php $mdx_v_post_list_2=get_option('mdx_post_list_2');?>
<select name="mdx_post_list_2" id="mdx_post_list_2">
<option value="view" <?php if($mdx_v_post_list_2=='view'){?>selected="selected"<?php }?>>浏览量</option>
<option value="time" <?php if($mdx_v_post_list_2=='time'){?>selected="selected"<?php }?>>发表时间</option>
<option value="comments" <?php if($mdx_v_post_list_2=='comments'){?>selected="selected"<?php }?>>评论数</option>
</select>
<p class="description"><?php _e('详细信息显示在文章列表每篇文章的底部。在此指定你希望展示的信息。', 'mdx');?></p>
</td>
</tr>
<tr>
<th scope="row"><?php _e('使用 Preload 技术加速页面加载', 'mdx');?></th>
<td>
<?php $mdx_v_speed_pre=get_option('mdx_speed_pre');?>
<fieldset>
<label><input type="radio" name="mdx_speed_pre" value="true" <?php if($mdx_v_speed_pre=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_speed_pre" value="false" <?php if($mdx_v_speed_pre=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,可使用 Preload 预加载技术加速页面加载。请确保你<strong>没有</strong>对主题 Javascript 脚本和字体文件使用和页面不同的域名加载。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><?php _e('使用 Smooth Scroll', 'mdx');?></th>
<td>
<?php $mdx_v_smooth_scroll=get_option('mdx_smooth_scroll');?>
<fieldset>
<label><input type="radio" name="mdx_smooth_scroll" value="true" <?php if($mdx_v_smooth_scroll=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_smooth_scroll" value="false" <?php if($mdx_v_smooth_scroll=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,可使不支持平滑滚动的浏览器启用平滑滚动。可能会在某些浏览器下导致页面滚动异常。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_share_area"><?php _e('分享到的服务商', 'mdx');?></label></th>
<td>
<?php $mdx_v_share_area=get_option('mdx_share_area');?>
<select name="mdx_share_area" id="mdx_share_area">
<option value="all" <?php if($mdx_v_share_area=='all'){?>selected="selected"<?php }?>>所有服务商</option>
<option value="china" <?php if($mdx_v_share_area=='china'){?>selected="selected"<?php }?>>只有中国国内服务商</option>
<option value="oversea" <?php if($mdx_v_share_area=='oversea'){?>selected="selected"<?php }?>>只有国际服务商</option>
</select>
<p class="description"><?php _e('指定你想提供给访问者的分享服务商。<br>“只有中国国内服务商”提供:微博、QQ、QQ 空间 的分享<br>“只有国际服务商”提供:Telegrame、Google+、Twitter、Facebook 的分享<br>无论如何,“生成分享图”始终启用。同时,由于微信 SDK 限制,MDx 无法集成微信分享,你可以自行完善。', 'mdx');?></p>
</td>
</tr>
<tr>
<th scope="row"><?php _e('点击顶部栏返回顶部', 'mdx');?></th>
<td>
<?php $mdx_v_tap_to_top=get_option('mdx_tap_to_top');?>
<fieldset>
<label><input type="radio" name="mdx_tap_to_top" value="true" <?php if($mdx_v_tap_to_top=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_tap_to_top" value="false" <?php if($mdx_v_tap_to_top=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,点击顶部栏可以返回页面顶部,具体效果参考 知乎/QQ 空间 客户端。此设置影响所有页面。</strong>', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><?php _e('首页推荐文章', 'mdx');?></th>
<td>
<?php $mdx_v_hot_posts=get_option('mdx_hot_posts');?>
<fieldset>
<label><input type="radio" class="mdx_apsp2" name="mdx_hot_posts" value="true" <?php if($mdx_v_hot_posts=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" class="mdx_apsp2" name="mdx_hot_posts" value="false" <?php if($mdx_v_hot_posts=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,首页会展示推荐文章,请在下方进行设置。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_hot_posts_num"><?php _e('首页推荐文章数量', 'mdx');?></label></th>
<td><input name="mdx_hot_posts_num" type="text" id="mdx_hot_posts_num" value="<?php echo esc_attr(get_option('mdx_hot_posts_num'))?>" class="regular-text mdx_apspc2">
<p class="description"><?php _e('在此设定首页推荐文章篇数。请输入整数。', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><label for="mdx_hot_posts_cat"><?php _e('首页推荐文章分类名', 'mdx');?></label></th>
<td><input name="mdx_hot_posts_cat" type="text" id="mdx_hot_posts_cat" value="<?php echo esc_attr(get_option('mdx_hot_posts_cat'))?>" class="regular-text mdx_apspc2">
<p class="description"><?php _e('首页推荐文章从特定分类获取文章。在此设定首页推荐文章的分类名。当分类不存在时,将显示最新文章。', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><label for="mdx_hot_posts_text"><?php _e('首页推荐文章模块标题', 'mdx');?></label></th>
<td><input name="mdx_hot_posts_text" type="text" id="mdx_hot_posts_text" value="<?php echo esc_attr(get_option('mdx_hot_posts_text'))?>" class="regular-text mdx_apspc2">
<p class="description"><?php _e('在此设定首页推荐文章模块标题。', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><label for="mdx_all_posts_text"><?php _e('首页最新文章模块标题', 'mdx');?></label></th>
<td><input name="mdx_all_posts_text" type="text" id="mdx_all_posts_text" value="<?php echo esc_attr(get_option('mdx_all_posts_text'))?>" class="regular-text mdx_apspc2">
<p class="description"><?php _e('在此设定首页最新文章模块标题。只有开启了“首页推荐文章”功能时此空才会生效。', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><?php _e('文末推荐文章', 'mdx');?></th>
<td>
<?php $mdx_v_you_may_like=get_option('mdx_you_may_like');?>
<fieldset>
<label><input type="radio" class="mdx_apsp" name="mdx_you_may_like" value="true" <?php if($mdx_v_you_may_like=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" class="mdx_apsp" name="mdx_you_may_like" value="false" <?php if($mdx_v_you_may_like=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,文章末会展示最多5篇相似文章。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><?php _e('文末推荐文章计算方式', 'mdx');?></th>
<td>
<?php $mdx_v_you_may_like_way=get_option('mdx_you_may_like_way');?>
<fieldset>
<label><input type="radio" class="mdx_apspc" name="mdx_you_may_like_way" value="tag" <?php if($mdx_v_you_may_like_way=='tag'){?>checked="checked"<?php }?>> <?php _e('相同标签')?></label><br>
<label><input type="radio" class="mdx_apspc" name="mdx_you_may_like_way" value="category" <?php if($mdx_v_you_may_like_way=='category'){?>checked="checked"<?php }?>> <?php _e('相同分类')?></label><br>
<p class="description"><?php _e('在此选择相似文章的计算方式。', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_you_may_like_text"><?php _e('文末推荐文章模块标题', 'mdx');?></label></th>
<td><input name="mdx_you_may_like_text" type="text" id="mdx_you_may_like_text" value="<?php echo esc_attr(get_option('mdx_you_may_like_text'))?>" class="regular-text mdx_apspc">
<p class="description"><?php _e('在此设置推荐文章模块的标题。', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><?php _e('实时搜索', 'mdx');?></th>
<td>
<?php $mdx_v_real_search=get_option('mdx_real_search');?>
<fieldset>
<label><input type="radio" name="mdx_real_search" value="true" <?php if($mdx_v_real_search=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_real_search" value="false" <?php if($mdx_v_real_search=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,进行搜索时会随用户输入实时反馈搜索结果。<strong>需要 WordPress REST API 支持。此 API 默认开启,请确保你没有将其关闭。</strong>', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_seo_key"><?php _e('SEO 关键词', 'mdx');?></label></th>
<td><input name="mdx_seo_key" type="text" id="mdx_seo_key" value="<?php echo esc_attr(get_option('mdx_seo_key'))?>" class="regular-text">
<p class="description" id="mdx_footer"><?php _e('用半角逗号分割关键词,数量在5个以内最佳。留空代表不开启此功能。', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><?php _e('自动生成网页描述', 'mdx');?></th>
<td>
<?php $mdx_v_auto_des=get_option('mdx_auto_des');?>
<fieldset>
<label><input type="radio" name="mdx_auto_des" value="true" <?php if($mdx_v_auto_des=='true'){?>checked="checked"<?php }?>> <?php echo $trueon;?></label><br>
<label><input type="radio" name="mdx_auto_des" value="false" <?php if($mdx_v_auto_des=='false'){?>checked="checked"<?php }?>> <?php echo $falseoff;?></label><br>
<p class="description"><?php _e('开启后,会自动生成 SEO 网页描述。<strong>对首页无效,请在下方输入首页描述。</strong>', 'mdx');?></p>
</fieldset>
</td>
</tr>
<tr>
<th scope="row"><label for="mdx_seo_des"><?php _e('SEO 描述', 'mdx');?></label></th>
<td><textarea name="mdx_seo_des" id="mdx_seo_des" rows="7" cols="50"><?php echo esc_attr(get_option('mdx_seo_des'))?></textarea>
<p class="description"><?php _e('在这里编辑网页描述。如开启自动生成网页描述功能,则此空仅对首页有效,其他页面会自动生成网页描述。此空留空则表示关闭全局 SEO 描述功能。', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><label for="mdx_head_js"><?php _e('页头脚本', 'mdx');?></label></th>
<td><textarea name="mdx_head_js" id="mdx_head_js" rows="7" cols="50"><?php echo get_option('mdx_head_js')?></textarea>
<p class="description"><?php _e('在这里插入脚本,会被插入至所有页面头部。', 'mdx');?></p></td>
</tr>
<tr>
<th scope="row"><label for="mdx_footer_js"><?php _e('页尾脚本', 'mdx');?></label></th>
<td><textarea name="mdx_footer_js" id="mdx_footer_js" rows="7" cols="50"><?php echo get_option('mdx_footer_js')?></textarea>
<p class="description"><?php _e('在这里插入脚本,会被插入至所有页面最后。', 'mdx');?></p></td>
</tr>
</table><?php submit_button(); ?></form></div>