forked from publishpress/publishpress-series
-
Notifications
You must be signed in to change notification settings - Fork 0
/
orgSeries-options.php
517 lines (434 loc) · 31.9 KB
/
orgSeries-options.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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<?php
/**
* This file contains all the necessary code for the Publishpress Series Options page.
*
* @package Publishpress Series
* @since 2.2
*/
add_action('admin_menu', 'orgseries_create_options');
//let's add a settings link on the WordPress plugin page
add_filter('plugin_action_links', 'inject_orgseries_settings_link', 10, 2 );
/**
* Add Settings link to plugins.
*/
function inject_orgseries_settings_link($links, $file) {
static $this_plugin;
global $orgseries;
if ( !$this_plugin ) $this_plugin = PPSERIES_BASE_NAME;
if ( $file == $this_plugin ) {
$settings_link = '<a href="options-general.php?page=orgseries_options_page">'.__("Settings", 'organize-series').'</a>';
array_unshift($links, $settings_link);
}
return $links;
}
//add orgSeries to the options submenu and register settings
function orgseries_create_options() {
global $orgseries;
$page = add_options_page(__('PublishPress Series Options', 'organize-series'), __('Series Options', 'organize-series'), 'manage_options', 'orgseries_options_page', 'orgseries_option_page');
add_action('admin_init', 'orgseries_options_init');
add_action('admin_print_scripts-' . $page, 'orgseries_options_scripts');
}
//validate form values
function orgseries_validate($input) {
global $orgseries, $wp_rewrite;
$newinput = array();
if ( isset($input['reset_option']) && $input['reset_option'] == 1 ) {
if ($reset_options = $orgseries->add_settings(true)) {
$input = $orgseries->settings;
$update['updated_output'] = '<div class="updated"><p>'. __('PublishPress Series Plugin Options have been RESET','organize-series').'</p></div>';
update_option('orgseries_update_message', $update['updated_output']);
return $input;
}
} else {
$update['updated_output'] = '<div class="updated"><p>' . __('PublishPress Series Plugin Options have been updated','organize-series') . '</p></div>';
}
//toggles and paging info
$newinput['auto_tag_toggle'] = isset($input['auto_tag_toggle']) && $input['auto_tag_toggle'] == 1 ? 1 : 0;
$newinput['auto_tag_nav_toggle'] = ( isset($input['auto_tag_nav_toggle']) && $input['auto_tag_nav_toggle'] == 1 ? 1 : 0 );
$newinput['auto_tag_seriesmeta_toggle'] = ( isset($input['auto_tag_seriesmeta_toggle']) && $input['auto_tag_seriesmeta_toggle'] == 1 ? 1 : 0 );
$newinput['custom_css'] = ( isset($input['custom_css']) && $input['custom_css'] == 1 ? 1 : 0 );
$newinput['series_css_tougle'] = ( isset($input['series_css_tougle']) ? trim(stripslashes($input['series_css_tougle']), 1) : 'default' );
$newinput['kill_on_delete'] = ( isset($input['kill_on_delete']) && $input['kill_on_delete'] == 1 ? 1 : 0 );
$newinput['series_toc_url'] = preg_replace('/(^\/)|(\/$)/', '', $input['series_toc_url']);
$newinput['series_custom_base'] = preg_replace('/(^\/)|(\/$)/', '', $input['series_custom_base']);
$newinput['series_perp_toc'] = trim(preg_replace('/[^0-9]/', '', $input['series_perp_toc']));
if ( strlen($input['series_toc_url']) <= 0 ) $newinput['series_toc_url'] = false;
$newinput['series_toc_title'] = isset($input['series_toc_title']) ? trim(stripslashes($input['series_toc_title'])) : '';
$newinput['orgseries_api'] = isset($input['orgseries_api']) ? trim($input['orgseries_api']) : '';
//template options
$newinput['series_post_list_template'] = trim(stripslashes($input['series_post_list_template']));
$newinput['series_post_list_post_template'] = trim(stripslashes($input['series_post_list_post_template']));
$newinput['series_post_list_currentpost_template'] = trim(stripslashes($input['series_post_list_currentpost_template']));
$newinput['series_meta_template'] = trim(stripslashes($input['series_meta_template']));
$newinput['series_meta_excerpt_template'] = trim(stripslashes($input['series_meta_excerpt_template']));
$newinput['series_table_of_contents_box_template'] = trim(stripslashes($input['series_table_of_contents_box_template']));
$newinput['series_post_nav_template'] = trim(stripslashes($input['series_post_nav_template']));
$newinput['series_nextpost_nav_custom_text'] = trim(stripslashes($input['series_nextpost_nav_custom_text']));
$newinput['series_prevpost_nav_custom_text'] = trim(stripslashes($input['series_prevpost_nav_custom_text']));
$newinput['series_posts_orderby'] = trim(stripslashes($input['series_posts_orderby']));
$newinput['series_posts_order'] = trim(stripslashes($input['series_posts_order']));
$newinput['latest_series_before_template'] = trim(stripslashes($input['latest_series_before_template']));
$newinput['latest_series_inner_template'] = trim(stripslashes($input['latest_series_inner_template']));
$newinput['latest_series_after_template'] = trim(stripslashes($input['latest_series_after_template']));
//series-icon related settings
$newinput['series_icon_width_series_page'] = (int) $input['series_icon_width_series_page'];
$newinput['series_icon_width_post_page'] = (int) $input['series_icon_width_post_page'];
$newinput['series_icon_width_latest_series'] = (int) $input['series_icon_width_latest_series'];
$newinput['last_modified'] = gmdate("D, d M Y H:i:s", time());
$return_input = apply_filters('orgseries_options', $newinput, $input);
update_option('orgseries_update_message', $update['updated_output']);
$wp_rewrite->flush_rules();
return $return_input;
}
function orgseries_options_scripts() {
wp_enqueue_script( 'orgseries_options' );
}
//register orgseries options
function orgseries_options_init() {
$orgseries_options = 'orgseries_options';
$org_opt = 'org_series_options';
register_setting($orgseries_options, $org_opt, 'orgseries_validate');
add_settings_section('series_automation_settings', 'Automation Settings', 'orgseries_main_section', 'orgseries_options_page');
add_settings_field('series_automation_core_fieldset','<br />Series Automation Core Options', 'series_automation_core_fieldset', 'orgseries_options_page', 'series_automation_settings');
add_settings_section('series_templates_settings', '<br /><br />Template Tag Options', 'orgseries_templates_section', 'orgseries_options_page');
add_settings_field('series_templates_core_fieldset', 'Series Templates Core Options', 'series_templates_core_fieldset', 'orgseries_options_page', 'series_templates_settings');
add_settings_section('series_icon_settings', '<br /><br />Series Icon Options', 'orgseries_icon_section', 'orgseries_options_page');
add_settings_field('series_icon_core_fieldset', 'Series Icon Core Options', 'series_icon_core_fieldset', 'orgseries_options_page', 'series_icon_settings');
add_settings_section('series_uninstall_settings', 'Uninstall', 'orgseries_uninstall_section', 'orgseries_options_page');
add_settings_field('series_uninstall_core_fieldset', 'Series uninstall', 'series_uninstall_core_fieldset', 'orgseries_options_page', 'series_uninstall_settings');
add_filter( 'ppseries_admin_settings_tabs', 'ppseries_filter_admin_settings_tabs');
}
function ppseries_filter_admin_settings_tabs($settings_tabs){
$settings_tabs['series_uninstall_settings'] = __('Uninstall / Reset', 'organize-series-cpt');
return $settings_tabs;
}
function orgseries_option_page() {
global $orgseries, $wp_rewrite;
$wp_rewrite->flush_rules();
$org_opt = $orgseries->settings;
$org_update_message = get_option('orgseries_update_message');
?>
<div class="wrap">
<div class="icon32" id="icon-options-general"><br /></div>
<h2><?php _e('PublishPress Series Plugin Options', 'organize-series'); ?></h2>
<?php
echo $org_update_message;
update_option('orgseries_update_message','');
?>
<h2 class="nav-tab-wrapper ppseries-settings-tab">
<?php
$settings_tabs = ppseries_admin_settings_tabs();
foreach($settings_tabs as $settings_tab_key => $settings_tab_label){
if(apply_filters('ppseries_settings_'.$settings_tab_key.'_tabbed', false)){
$tabbled_class = 'series-tab-content';
}else{
$tabbled_class = '';
}
echo '<a id="'.$settings_tab_key.'-series-tab" class="nav-tab '.$tabbled_class.'" href="#'.$settings_tab_key.'">'.$settings_tab_label.'</a>';
}
?>
</h2>
<div id="poststuff" class="metabox-holder has-right-sidebar">
<div id="side-info-column" class="inner-sidebar ppseries-settings-tab-content series_templates_settings-series-sidebar">
<div id="side-sortables" class="meta-box-sortables ui-sortable">
<div id="token-legend" class="postbox">
<h3 class="handle"><span><?php _e('Overview', 'organize-series'); ?></span></h3>
<div class="inside">
<p><small><?php _e('The following is a legend of the tokens that are available for use in the custom template fields. These will be replaced with the appropriate values when the plugin runs.', 'organize-series'); ?></small></p>
<strong>%series_icon%</strong><br />
<em><?php _e('This will be replaced with the series icon for a series.', 'organize-series'); ?></em><br /><br />
<strong>%series_icon_linked%</strong><br />
<em><?php _e('Same as %series_icon% except that the series icon will be linked to the series page','organize-series'); ?></em><br /><br />
<strong>%series_list%</strong><br />
<em><?php _e('This token is for use with the orgSeries widget only - it references where you want the list of series titles to be inserted and requires that the template for each series title be also set.', 'organize-series'); ?></em><br /><br />
<strong>%series_title%</strong><br />
<em><?php _e('This will be replaced with the title of a series', 'organize-series'); ?></em><br /><br />
<strong>%series_title_linked%</strong><br />
<em><?php _e('Same as %series_title% except that it will also be linked to the series page', 'organize-series'); ?></em><br /><br />
<strong>%post_title_list%</strong><br />
<em><?php _e('Is the location token for where the contents of the post list post templates will appear.', 'organize-series'); ?></em><br /><br />
<strong>%post_title%</strong><br />
<em><?php _e('Will be replaced with the post title of a post in the series', 'organize-series'); ?></em><br /><br />
<strong>%post_title_linked%</strong><br />
<em><?php _e('Will be replaced with the post title of a post in the series linked to the page view of that post.', 'organize-series'); ?></em><br /><br />
<strong>%previous_post%</strong><br />
<em><?php _e('Will be replaced by the navigation link for the previous post in a series. The text will be whatever is included in the \'Custom Previous Post Navigation Text\' field. If that field is empty then the text will be the title of the post', 'organize-series'); ?></em><br /><br />
<strong>%next_post%</strong><br />
<em><?php _e('Will be replaced by the navigation link for the next post in a series. The text will be whatever is included in the \'Custom Next Post Navigation Text\' field. If that field is empty then the text will be the title of the post', 'organize-series'); ?></em><br /><br />
<strong>%postcontent%</strong><br />
<em><?php _e('Use this tag either before or after the rest of the template code. It will indicate where you want the content of a post to display.', 'organize-series'); ?></em><br /><br />
<strong>%series_part%</strong><br />
<em><?php _e('Will display what part of a series the post is', 'organize-series'); ?></em><br /><br />
<strong>%total_posts_in_series%</strong><br />
<em><?php _e('Will display the total number of posts in a series', 'organize-series'); ?></em><br /><br />
<strong>%series_description%</strong><br />
<em><?php _e('Will display the description for the series', 'organize-series'); ?></em>
<?php do_action('orgseries_token_description'); ?>
</div>
</div>
<?php do_action('ppseries_licence_key_form'); ?>
</div>
</div>
<div id="post-body" class="has-sidebar">
<div id="post-body-content" class="has-sidebar-content ppseries-settings-body-content">
<form action="options.php" method="post" id="series_options" name="series_options">
<?php settings_fields('orgseries_options'); ?>
<table class="widefat seriesmanage">
<tbody id="the-list">
<tr><td>
<?php ppseries_do_settings_sections('orgseries_options_page'); ?>
</td></tr>
</tbody>
</table>
<br />
<?php
//$submit_text = __('Do you really want to reset to default options (all your custom changes will be lost)?', 'organize-series');
//$script_text = "javascript:return confirm('".$submit_text."')"
?>
<span class="submit">
<input type="hidden" name="org_series_options[updated_output]" value="" />
<input type="hidden" name="org_series_options[reset_option]" class="reset_option" value="" />
<input type="submit" class="button-primary" name="update_orgseries" value="<?php _e('Update Options', 'organize-series'); ?>" />
</span>
</form>
<div id="TBcontent" class="reset_dialog" style="display:none;">
<p> <?php _e('Clicking Yes will reset the options to the defaults and you will lose all customizations. Or you can click cancel and return.', 'organize-series'); ?></p>
<input type="submit" id="TBcancel" class="button" value="<?php esc_attr_e('No', 'organize-series'); ?>" />
<input type="submit" id="TBsubmit" class="alignright button-primary" value="<?php esc_attr_e('Yes', 'organize-series'); ?>" />
</div>
</div>
</div>
<br class="clear" />
</div>
</div>
<?php
}
function orgseries_main_section() {
global $orgseries;
?>
<?php
}
function orgseries_templates_section() {
global $orgseries;
?>
<?php
}
function orgseries_icon_section() {
global $orgseries;
?>
<p><?php _e('This section is for the icons that show with your series. Note that you must use a token for the icon in the "Templates" settings.', 'organize-series'); ?></p>
<?php
}
function orgseries_uninstall_section() {
global $orgseries;
?>
<?php
}
function series_automation_core_fieldset() {
global $orgseries;
$org_opt = $orgseries->settings;
$org_name = 'org_series_options';
$series_css_tougle = is_array($org_opt) && isset($org_opt['series_css_tougle']) ? $org_opt['series_css_tougle'] : 'default';
$series_perp_toc = is_array($org_opt) && isset($org_opt['series_perp_toc']) ? $org_opt['series_perp_toc'] : 10;
?>
<div id="topic-toc-settings-automation-core" class="" style="line-height:normal;border:unset;">
<div class="inside" style="padding: 0;margin: 0;">
<h1><?php _e('Display on single posts', 'organize-series'); ?></h1>
<table class="form-table ppseries-settings-table">
<tbody>
<tr valign="top"><th scope="row"><label for="auto_tag_toggle"><?php _e('Display series post list box?', 'organize-series'); ?></label></th>
<td><input name="<?php echo $org_name;?>[auto_tag_toggle]" value="1" id="auto_tag_toggle" type="checkbox" <?php checked('1', $org_opt['auto_tag_toggle']); ?> /></td>
</tr>
<tr valign="top"><th scope="row"><label for="auto_tag_nav_toggle"><?php _e('Display series navigation links?', 'organize-series'); ?></label></th>
<td><input name="<?php echo $org_name; ?>[auto_tag_nav_toggle]" id="auto_tag_nav_toggle" type="checkbox" value="1" <?php checked('1', $org_opt['auto_tag_nav_toggle']); ?> /></td>
</tr>
<tr valign="top"><th scope="row"><label for="auto_tag_seriesmeta_toggle"><?php _e('Display series meta information with posts?', 'organize-series'); ?></label></th>
<td><input name="<?php echo $org_name; ?>[auto_tag_seriesmeta_toggle]" id="auto_tag_seriesmeta_toggle" type="checkbox" value="1" <?php checked('1', $org_opt['auto_tag_seriesmeta_toggle']); ?> /></td>
</tr>
<tr valign="top"><th scope="row"><label for="custom_css"><?php _e('Use Series css styles', 'organize-series'); ?></label></th>
<td><input name="<?php echo $org_name; ?>[custom_css]" id="custom_css" type="checkbox" value="1" <?php checked('1', $org_opt['custom_css']); ?> /></td>
</tr>
<tr valign="top"><th scope="row"><label for=""><?php _e('Style options', 'organize-series'); ?></label></th>
<td>
<label><input name="<?php echo $org_name; ?>[series_css_tougle]" class="css_style" id="css_default" type="radio" value="default" <?php checked('default', $series_css_tougle); ?> <?php disabled('0', $org_opt['custom_css']) ?> /><?php _e('Use default style', 'organize-series'); ?> </label><br />
<label><input name="<?php echo $org_name; ?>[series_css_tougle]" class="css_style" id="css_dark" type="radio" value="dark" <?php checked('dark', $series_css_tougle); ?> <?php disabled('0', $org_opt['custom_css']) ?> /><?php _e('Use dark style', 'organize-series'); ?> </label><br />
<label><input name="<?php echo $org_name; ?>[series_css_tougle]" class="css_style" id="css_light" type="radio" value="light" <?php checked('light', $series_css_tougle); ?> <?php disabled('0', $org_opt['custom_css']) ?> /><?php _e('Use light style', 'organize-series'); ?> </label>
</td>
</tr>
<tr valign="top"><th scope="row" colspan="2"><h1><?php _e('Display on series overview screens', 'organize-series'); ?></h1></th></tr>
<tr valign="top"><th scope="row"><label for="series_toc_url"><?php _e('Series Table of Contents URL:', 'organize-series'); ?></label></th>
<td><?php bloginfo('url') ?>/<input type="text" name="<?php echo $org_name; ?>[series_toc_url]" id="series_toc_url" value="<?php echo htmlspecialchars($org_opt['series_toc_url']); ?>" /></td>
</tr>
<tr valign="top"><th scope="row"><label for="series_perp_toc"><?php _e('Series Per Page:', 'organize-series'); ?></label></th>
<td><input type="number" name="<?php echo $org_name; ?>[series_perp_toc]" value="<?php echo (int) ($series_perp_toc); ?>" /></td>
</tr>
<tr valign="top"><th scope="row"><label for="series_custom_base"><?php _e('Series Custom Base:', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_custom_base]" id="series_custom_base" value="<?php echo htmlspecialchars($org_opt['series_custom_base']); ?>" /></td>
</tr>
<tr valign="top"><th scope="row"><label for="series_toc_title"><?php _e('Series Table of Contents Title:', 'organize-series'); ?></label></th>
<td><input type="text" id="series_toc_title" name="<?php echo $org_name; ?>[series_toc_title]" value="<?php echo htmlspecialchars($org_opt['series_toc_title']); ?>"/></td>
</tr>
<tr valign="top"><th scope="row"><label for=""><?php _e('Order series by:', 'organize-series'); ?></label></th>
<td>
<label><input name="<?php echo $org_name; ?>[series_posts_orderby]" id="series_posts_orderby_part" type="radio" value="meta_value" <?php checked('meta_value', $org_opt['series_posts_orderby']); ?> /><?php _e('Series part', 'organize-series'); ?></label>
<label><input name="<?php echo $org_name; ?>[series_posts_orderby]" id="series_posts_orderby_date" type="radio" value="post_date" <?php checked('post_date', $org_opt['series_posts_orderby']); ?> /><?php _e('Order by date', 'organize-series'); ?></label>
</td>
</tr>
<tr valign="top"><th scope="row"><label for=""><?php _e('Series order method', 'organize-series'); ?></label></th>
<td>
<label><input name="<?php echo $org_name; ?>[series_posts_order]" id="series_posts_order_ASC" type="radio" value="ASC" <?php checked('ASC', $org_opt['series_posts_order']); ?> /><?php _e('Ascending', 'organize-series'); ?></label>
<label><input name="<?php echo $org_name; ?>[series_posts_order]" id="series_posts_order_DESC" type="radio" value="DESC" <?php checked('DESC', $org_opt['series_posts_order']); ?> /><?php _e('Descending', 'organize-series'); ?></label></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php
}
function series_templates_core_fieldset() {
global $orgseries;
$org_opt = $orgseries->settings;
$org_name = 'org_series_options';
?>
<div class="metabox-holder">
<div class="postbox-container" style="width: 99%;line-height:normal;">
<div id="topic-toc-settings-series-template-core" style="line-height:normal;">
<div class="inside" style="padding: 0;margin: 0;">
<table class="form-table ppseries-settings-table">
<tbody>
<tr valign="top"><th scope="row"><label for="series_post_list_template"><?php _e('Series Post List Template:', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_post_list_template]" id="series_post_list_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_post_list_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('This affects the list of series in a post on the page of a post belonging to a series [template tag -> wp_postlist_display()]', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="series_post_list_post_template"><?php _e('Series Post List Post Title Template:', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_post_list_post_template]" id="series_post_list_post_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_post_list_post_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('Use this to indicate what html tags will surround the post title in the series post list.', 'organize-series'); ?></small></p>
</td>
</tr>
<?php do_action('plist_ptitle_template_unpublished') ?>
<tr valign="top"><th scope="row"><label for="series_post_list_currentpost_template"><?php _e('Series Post List Current Post Title Template:', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_post_list_currentpost_template]" id="series_post_list_currentpost_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_post_list_currentpost_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('Use this to style how you want the post title in the post list that is the same as the current post to be displayed.', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="series_post_nav_template"><?php _e('Series Post Navigation Template:', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_post_nav_template]" id="series_post_nav_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_post_nav_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('Use this to style the Next/Previous post navigation strip on posts that are part of a series. (Don\'t forget to use the %postcontent% token to indicate where you want the navigation to show).', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="series_post_nav_template"><?php _e('Series Post Navigation Template:', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_post_nav_template]" id="series_post_nav_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_post_nav_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('Use this to style the Next/Previous post navigation strip on posts that are part of a series. (Don\'t forget to use the %postcontent% token to indicate where you want the navigation to show).', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="series_nextpost_nav_custom_text"><?php _e('Custom Next Post Text', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_nextpost_nav_custom_text]" id="series_nextpost_nav_custom_text" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_nextpost_nav_custom_text'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('if this is left blank, the post title will be used', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="series_prevpost_nav_custom_text"><?php _e('Custom previous post navigation text', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_prevpost_nav_custom_text]" id="series_prevpost_nav_custom_text" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_nextpost_nav_custom_text'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('if this is left blank, the post title will be used', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="series_table_of_contents_box_template"><?php _e('Series Table of Contents Listings:', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_table_of_contents_box_template]" id="series_table_of_contents_box_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_table_of_contents_box_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('This will affect how each series is listed on the Series Table of Contents Page (created at plugin init) [template tag -> wp_serieslist_display()]', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="series_meta_template"><?php _e('Series Meta:', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_meta_template]" id="series_meta_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_meta_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('This will control how and what series meta information is displayed with posts that are part of a series. [template tag -> wp_seriesmeta_write()]', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="series_meta_excerpt_template"><?php _e('Series Meta (with excerpts):', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[series_meta_excerpt_template]" id="series_meta_excerpt_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['series_meta_excerpt_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('This will control how and what series meta information is displayed with posts that are part of a series when the_excerpt is called. [template tag -> wp_seriesmeta_write(true)]', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="latest_series_before_template"><?php _e('Latest Series (tags before):', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[latest_series_before_template]" id="latest_series_before_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['latest_series_before_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('Put here any html you want before latest series information NOTE: series template tokens WILL NOT be converted here.', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="latest_series_inner_template"><?php _e('Latest Series (inner tags):', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[latest_series_inner_template]" id="latest_series_inner_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['latest_series_inner_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('This will control the layout/style and contents that will be returned with the latest_series() template tag (both via widget and/or manual calls). NOTE: PublishPress Series %tokens% can be used in this field.', 'organize-series'); ?></p>
</td>
</tr>
<tr valign="top"><th scope="row"><label for="latest_series_after_template"><?php _e('Latest Series (tags after):', 'organize-series'); ?></label></th>
<td><input type="text" name="<?php echo $org_name; ?>[latest_series_after_template]" id="latest_series_after_template" value="<?php echo esc_attr(htmlspecialchars($org_opt['latest_series_after_template'])); ?>" class="ppseries-full-width">
<br /><p class="ppseries-field-description description"><?php _e('Put here any html you want after latest series information NOTE: series template tokens WILL NOT be converted here.', 'organize-series'); ?></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php
}
function series_icon_core_fieldset() {
global $orgseries;
$org_opt = $orgseries->settings;
$org_name = 'org_series_options';
?>
<div class="metabox-holder">
<div class="postbox-container" style="width: 99%;line-height:normal;">
<div id="topic-toc-settings-icon-core" class="" style="line-height:normal;">
<div class="inside">
<table class="form-table ppseries-settings-table">
<tbody>
<tr valign="top">
<th scope="row"><label for="series_icon_width_series_page"><?php _e('Width for icon on series table of contents page (in pixels)', 'organize-series'); ?></label></th>
<td><input min="1" max="1000000000"name="<?php echo $org_name;?>[series_icon_width_series_page]" id="series_icon_width_series_page" type="number" value="<?php echo $org_opt['series_icon_width_series_page']; ?>" /></p>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="series_icon_width_post_page"><?php _e('Width for icon on a post page (in pixels).', 'organize-series'); ?></label></th>
<td><input min="1" max="1000000000" name="<?php echo $org_name;?>[series_icon_width_post_page]" id="series_icon_width_post_page" type="number" value="<?php echo $org_opt['series_icon_width_post_page']; ?>" /></p>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="series_icon_width_latest_series"><?php _e('Width for icon if displayed via the latest series template (in pixels).', 'organize-series'); ?></label></th>
<td><input min="1" max="1000000000" name="<?php echo $org_name;?>[series_icon_width_latest_series]" id="series_icon_width_latest_series" type="number" value="<?php echo $org_opt['series_icon_width_latest_series']; ?>" /></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php
}
function series_uninstall_core_fieldset() {
global $orgseries;
$org_opt = $orgseries->settings;
$org_name = 'org_series_options';
?>
<table class="form-table ppseries-settings-table">
<tbody>
<tr valign="top">
<th scope="row"><label for="kill_on_delete">
<?php _e('Series Settings', 'organize-series'); ?>
</label>
<br /><small style="color: #646970;">
<?php _e('Delete all PublishPress Series data from the database when deleting this plugin.', 'organize-series'); ?></label>
</small>
</th>
<td><input name="<?php echo $org_name; ?>[kill_on_delete]" id="kill_on_delete" type="checkbox" value="1" <?php checked('1', $org_opt['kill_on_delete']); ?> /></td>
</tr>
<tr valign="top">
<th scope="row"><label>
<?php _e('Reset settings', 'organize-series'); ?>
</label>
</th>
<td><input type="submit" class="button" name="option_reset" value="<?php _e('Reset options to default', 'organize-series'); ?>" /></td>
</tr>
</tbody>
</table> <?php
}
?>