PluginProbe
Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms / 3.4.3
Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms v3.4.3
3.53.0 3.52.0 3.51.0 3.50.0 3.45.0 3.38.0 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.40.0 3.40.1 3.41.0 3.42.0 3.43.0 3.44.0 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 All 177 releases
simple-tags / inc / suggestterms.php

suggestterms.php in Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms 3.4.3, at inc/suggestterms.php

800 lines 43.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class SimpleTags_SuggestTerms
4 {
5
6 const MENU_SLUG = 'st_options';
7
8 // class instance
9 static $instance;
10
11 // WP_List_Table object
12 public $terms_table;
13
14 /**
15 * Constructor
16 *
17 * @return void
18 * @author Olatechpro
19 */
20 public function __construct()
21 {
22
23 add_filter('set-screen-option', [__CLASS__, 'set_screen'], 10, 3);
24 // Admin menu
25 add_action('admin_menu', [$this, 'admin_menu']);
26 // Javascript
27 add_action('admin_enqueue_scripts', [__CLASS__, 'admin_enqueue_scripts'], 11);
28
29 }
30
31 /**
32 * Init somes JS and CSS need for this feature
33 *
34 * @return void
35 * @author Olatechpro
36 */
37 public static function admin_enqueue_scripts()
38 {
39
40 // add JS for manage click tags
41 if (isset($_GET['page']) && $_GET['page'] == 'st_suggestterms') {
42 wp_enqueue_style('st-taxonomies-css');
43 }
44 }
45
46 public static function set_screen($status, $option, $value)
47 {
48 return $value;
49 }
50
51 /** Singleton instance */
52 public static function get_instance()
53 {
54 if (!isset(self::$instance)) {
55 self::$instance = new self();
56 }
57
58 return self::$instance;
59 }
60
61 /**
62 * Add WP admin menu for Tags
63 *
64 * @return void
65 * @author Olatechpro
66 */
67 public function admin_menu()
68 {
69 $hook = add_submenu_page(
70 self::MENU_SLUG,
71 __('Suggest Terms', 'simple-tags'),
72 __('Suggest Terms', 'simple-tags'),
73 'simple_tags',
74 'st_suggestterms',
75 [
76 $this,
77 'page_manage_suggestterms',
78 ]
79 );
80
81 if (taxopress_is_screen_main_page()) {
82 add_action("load-$hook", [$this, 'screen_option']);
83 }
84 }
85
86 /**
87 * Screen options
88 */
89 public function screen_option()
90 {
91
92 $option = 'per_page';
93 $args = [
94 'label' => __('Number of items per page', 'simple-tags'),
95 'default' => 20,
96 'option' => 'st_suggestterms_per_page'
97 ];
98
99 add_screen_option($option, $args);
100
101 $this->terms_table = new SuggestTerms_List();
102 }
103
104 /**
105 * Method for build the page HTML manage tags
106 *
107 * @return void
108 * @author Olatechpro
109 */
110 public function page_manage_suggestterms()
111 {
112 // Default order
113 if (!isset($_GET['order'])) {
114 $_GET['order'] = 'name-asc';
115 }
116
117 settings_errors(__CLASS__);
118
119 if (!isset($_GET['add'])) {
120 //all tax
121 ?>
122 <div class="wrap st_wrap st-manage-taxonomies-page">
123
124 <div id="">
125 <h1 class="wp-heading-inline"><?php _e('Suggest Terms', 'simple-tags'); ?></h1>
126 <a href="<?php echo esc_url(admin_url('admin.php?page=st_suggestterms&add=new_item')); ?>"
127 class="page-title-action"><?php esc_html_e('Add New', 'simple-tags'); ?></a>
128
129 <div class="taxopress-description">
130 <?php esc_html_e('This feature helps when you\'re writing content. "Suggest Terms" can show a metabox where you can browse all your existing terms. "Suggest Terms" can also analyze your content and find new ideas for terms.',
131 'simple-tags'); ?>
132 </div>
133
134
135 <?php
136 if (isset($_REQUEST['s']) && $search = esc_attr(wp_unslash($_REQUEST['s']))) {
137 /* translators: %s: search keywords */
138 printf(' <span class="subtitle">' . __('Search results for &#8220;%s&#8221;',
139 'simple-tags') . '</span>', $search);
140 }
141 ?>
142 <?php
143
144 //the terms table instance
145 $this->terms_table->prepare_items();
146 ?>
147
148
149 <hr class="wp-header-end">
150 <div id="ajax-response"></div>
151 <form class="search-form wp-clearfix st-taxonomies-search-form" method="get">
152 <?php $this->terms_table->search_box(__('Search Suggest Terms', 'simple-tags'), 'term'); ?>
153 </form>
154 <div class="clear"></div>
155
156 <div id="col-container" class="wp-clearfix">
157
158 <div class="col-wrap">
159 <form action="<?php echo add_query_arg('', '') ?>" method="post">
160 <?php $this->terms_table->display(); //Display the table ?>
161 </form>
162 <div class="form-wrap edit-term-notes">
163 <p><?php __('Description here.', 'simple-tags') ?></p>
164 </div>
165 </div>
166
167
168 </div>
169
170
171 </div>
172 <?php } else {
173 if ($_GET['add'] == 'new_item') {
174 //add/edit taxonomy
175 $this->taxopress_manage_suggestterms();
176 echo '<div>';
177 }
178 } ?>
179
180
181 <?php SimpleTags_Admin::printAdminFooter(); ?>
182 </div>
183 <?php
184 }
185
186
187 /**
188 * Create our settings page output.
189 *
190 * @internal
191 */
192 public function taxopress_manage_suggestterms()
193 {
194
195 $tab = (!empty($_GET) && !empty($_GET['action']) && 'edit' == $_GET['action']) ? 'edit' : 'new';
196 $tab_class = 'taxopress-' . $tab;
197 $current = null;
198
199 ?>
200
201 <div class="wrap <?php echo esc_attr($tab_class); ?>">
202
203 <?php
204
205 $suggestterms = taxopress_get_suggestterm_data();
206 $suggestterm_edit = false;
207 $suggestterm_limit = false;
208
209 if ('edit' === $tab) {
210
211
212 $selected_suggestterm = taxopress_get_current_suggestterm();
213
214 if ($selected_suggestterm && array_key_exists($selected_suggestterm, $suggestterms)) {
215 $current = $suggestterms[$selected_suggestterm];
216 $suggestterm_edit = true;
217 }
218
219 }
220
221
222 if (!isset($current['title']) && count($suggestterms) > 0 && apply_filters('taxopress_suggestterms_create_limit',
223 true)) {
224 $suggestterm_limit = true;
225 }
226
227
228 $ui = new taxopress_admin_ui();
229 ?>
230
231
232 <div class="wrap <?php echo esc_attr($tab_class); ?>">
233 <h1><?php echo __('Manage Suggest Terms', 'simple-tags'); ?></h1>
234 <div class="wp-clearfix"></div>
235
236 <form method="post" action="">
237
238
239 <div class="tagcloudui st-tabbed">
240
241
242 <div class="suggestterms-postbox-container">
243 <div id="poststuff">
244 <div class="taxopress-section postbox">
245 <div class="postbox-header">
246 <h2 class="hndle ui-sortable-handle">
247 <?php
248 if ($suggestterm_edit) {
249 $active_tab = (isset($current['active_tab']) && !empty(trim($current['active_tab']))) ? $current['active_tab'] : 'suggestterm_general';
250 echo esc_html__('Edit Suggest Terms', 'simple-tags');
251 echo '<input type="hidden" name="edited_suggestterm" value="' . $current['ID'] . '" />';
252 echo '<input type="hidden" name="taxopress_suggestterm[ID]" value="' . $current['ID'] . '" />';
253 echo '<input type="hidden" name="taxopress_suggestterm[active_tab]" class="taxopress-active-subtab" value="' . $active_tab . '" />';
254 } else {
255 $active_tab = 'suggestterm_general';
256 echo '<input type="hidden" name="taxopress_suggestterm[active_tab]" class="taxopress-active-subtab" value="" />';
257 echo esc_html__('Add new Suggest Terms', 'simple-tags');
258 }
259 ?>
260 </h2>
261 </div>
262 <div class="inside">
263 <div class="main">
264
265
266 <?php if ($suggestterm_limit) {
267 echo '<div class="st-taxonomy-content"><div class="taxopress-warning upgrade-pro">
268 <p>
269
270 <h2 style="margin-bottom: 5px;">' . __('To create more Suggest Terms, please upgrade to TaxoPress Pro.',
271 'simple-tags') . '</h2>
272 ' . __('With TaxoPress Pro, you can create unlimited Suggest Terms. You can create Suggest Terms for any taxonomy.',
273 'simple-tags') . '
274
275 </p>
276 </div></div>';
277
278 } else {
279 ?>
280
281
282 <ul class="taxopress-tab">
283 <li class="suggestterm_general_tab <?php echo $active_tab === 'suggestterm_general' ? 'active' : ''; ?>"
284 data-content="suggestterm_general">
285 <a href="#suggestterm_general"><span><?php esc_html_e('General',
286 'simple-tags'); ?></span></a>
287 </li>
288
289 <li class="suggestterm_external_tab <?php echo $active_tab === 'suggestterm_external' ? 'active' : ''; ?>"
290 data-content="suggestterm_external">
291 <a href="#suggestterm_external"><span><?php esc_html_e('Automatic Term Suggestions',
292 'simple-tags'); ?></span></a>
293 </li>
294
295 <li class="suggestterm_local_tab <?php echo $active_tab === 'suggestterm_local' ? 'active' : ''; ?>"
296 data-content="suggestterm_local">
297 <a href="#suggestterm_local"><span><?php esc_html_e('Show Existing Terms',
298 'simple-tags'); ?></span></a>
299 </li>
300
301 </ul>
302
303 <div class="st-taxonomy-content taxopress-tab-content">
304
305
306 <table class="form-table taxopress-table suggestterm_general"
307 style="<?php echo $active_tab === 'suggestterm_general' ? '' : 'display:none;'; ?>">
308 <?php
309 echo $ui->get_tr_start();
310
311
312 echo $ui->get_th_start();
313 echo $ui->get_label('title', esc_html__('Title',
314 'simple-tags')) . $ui->get_required_span();
315 echo $ui->get_th_end() . $ui->get_td_start();
316
317 echo $ui->get_text_input([
318 'namearray' => 'taxopress_suggestterm',
319 'name' => 'title',
320 'textvalue' => isset($current['title']) ? esc_attr($current['title']) : '',
321 'maxlength' => '32',
322 'helptext' => '',
323 'required' => true,
324 'placeholder' => false,
325 'wrap' => false,
326 ]);
327
328
329 $options = [];
330 foreach (get_all_taxopress_public_taxonomies() as $_taxonomy) {
331 $_taxonomy = $_taxonomy->name;
332 $tax = get_taxonomy($_taxonomy);
333 if (empty($tax->labels->name)) {
334 continue;
335 }
336 if ($tax->name === 'post_tag') {
337 $options[] = [
338 'attr' => $tax->name,
339 'text' => $tax->labels->name. ' ('.$tax->name.')',
340 'default' => 'true',
341 ];
342 } else {
343 $options[] = [
344 'attr' => $tax->name,
345 'text' => $tax->labels->name. ' ('.$tax->name.')',
346 ];
347 }
348 }
349
350 $select = [
351 'options' => $options,
352 ];
353 $selected = isset($current) ? taxopress_disp_boolean($current['taxonomy']) : '';
354 $select['selected'] = !empty($selected) ? $current['taxonomy'] : '';
355 echo $ui->get_select_checkbox_input_main([
356 'namearray' => 'taxopress_suggestterm',
357 'name' => 'taxonomy',
358 'class' => 'st-post-taxonomy-select',
359 'labeltext' => esc_html__('Default Taxonomy', 'simple-tags'),
360 'required' => true,
361 'selections' => $select,
362 ]);
363
364
365 /**
366 * Filters the arguments for post types to list for taxonomy association.
367 *
368 *
369 * @param array $value Array of default arguments.
370 */
371 $args = apply_filters('taxopress_attach_post_types_to_taxonomy',
372 ['public' => true]);
373
374 // If they don't return an array, fall back to the original default. Don't need to check for empty, because empty array is default for $args param in get_post_types anyway.
375 if (!is_array($args)) {
376 $args = ['public' => true];
377 }
378 $output = 'objects'; // Or objects.
379
380 /**
381 * Filters the results returned to display for available post types for taxonomy.
382 *
383 * @param array $value Array of post type objects.
384 * @param array $args Array of arguments for the post type query.
385 * @param string $output The output type we want for the results.
386 */
387 $post_types = apply_filters('taxopress_get_post_types_for_taxonomies',
388 get_post_types($args, $output), $args, $output);
389
390 $term_auto_locations = [];
391 foreach ($post_types as $post_type) {
392 $term_auto_locations[$post_type->name] = $post_type->label;
393 }
394
395 echo '<tr valign="top"><th scope="row"><label>' . esc_html__('Post Types',
396 'simple-tags') . '</label> </th><td>
397 <table class="visbile-table">';
398 foreach ($term_auto_locations as $key => $value) {
399
400
401 echo '<tr valign="top"><th scope="row"><label for="' . $key . '">' . $value . '</label></th><td>';
402
403 echo $ui->get_check_input([
404 'checkvalue' => $key,
405 'checked' => (!empty($current['post_types']) && is_array($current['post_types']) && in_array($key,
406 $current['post_types'], true)) ? 'true' : 'false',
407 'name' => $key,
408 'namearray' => 'post_types',
409 'textvalue' => $key,
410 'labeltext' => "",
411 'wrap' => false,
412 ]);
413
414 echo '</td></tr>';
415
416
417 }
418 echo '</table></td></tr>';
419
420
421 echo $ui->get_td_end() . $ui->get_tr_end();
422 ?>
423 </table>
424
425
426 <table class="form-table taxopress-table suggestterm_local"
427 style="<?php echo $active_tab === 'suggestterm_local' ? '' : 'display:none;'; ?>">
428
429 <tr valign="top"><td style="padding-left: 0;" colspan="2"><?php echo esc_html__('This feature shows a metabox where you can browse all your existing terms.', 'simple-tags'); ?></td></tr>
430
431 <?php
432
433 $select = [
434 'options' => [
435 [
436 'attr' => '0',
437 'text' => esc_attr__('False', 'simple-tags'),
438 'default' => 'true',
439 ],
440 [
441 'attr' => '1',
442 'text' => esc_attr__('True', 'simple-tags'),
443 ],
444 ],
445 ];
446 $selected = (isset($current) && isset($current['disable_local'])) ? taxopress_disp_boolean($current['disable_local']) : '';
447 $select['selected'] = !empty($selected) ? $current['disable_local'] : '';
448 echo $ui->get_select_checkbox_input([
449 'namearray' => 'taxopress_suggestterm',
450 'name' => 'disable_local',
451 'labeltext' => esc_html__('Disable "Show existing terms" feature',
452 'simple-tags'),
453 'selections' => $select,
454 ]);
455
456 if (!isset($current)) {
457 $maximum_terms = 100;
458 } else {
459 $maximum_terms = isset($current['number']) ? esc_attr($current['number']) : '0';
460 }
461
462 echo $ui->get_number_input([
463 'namearray' => 'taxopress_suggestterm',
464 'name' => 'number',
465 'textvalue' => $maximum_terms,
466 'labeltext' => esc_html__('Maximum terms', 'simple-tags'),
467 'helptext' => 'Set (0) for no limit.',
468 'min' => '0',
469 'required' => true,
470 ]);
471
472
473 $select = [
474 'options' => [
475 [
476 'attr' => 'name',
477 'text' => esc_attr__('Name', 'simple-tags')
478 ],
479 [
480 'attr' => 'count',
481 'text' => esc_attr__('Counter', 'simple-tags'),
482 'default' => 'true'
483 ],
484 [
485 'attr' => 'random',
486 'text' => esc_attr__('Random', 'simple-tags')
487 ],
488 ],
489 ];
490 $selected = isset($current) ? taxopress_disp_boolean($current['orderby']) : '';
491 $select['selected'] = !empty($selected) ? $current['orderby'] : '';
492 echo $ui->get_select_checkbox_input_main([
493 'namearray' => 'taxopress_suggestterm',
494 'name' => 'orderby',
495 'labeltext' => esc_html__('Method for choosing terms',
496 'simple-tags'),
497 'selections' => $select,
498 ]);
499
500
501 $select = [
502 'options' => [
503 [
504 'attr' => 'asc',
505 'text' => esc_attr__('Ascending', 'simple-tags')
506 ],
507 [
508 'attr' => 'desc',
509 'text' => esc_attr__('Descending', 'simple-tags'),
510 'default' => 'true'
511 ],
512 ],
513 ];
514 $selected = isset($current) ? taxopress_disp_boolean($current['order']) : '';
515 $select['selected'] = !empty($selected) ? $current['order'] : '';
516 echo $ui->get_select_checkbox_input_main([
517 'namearray' => 'taxopress_suggestterm',
518 'name' => 'order',
519 'labeltext' => esc_html__('Ordering for choosing terms',
520 'simple-tags'),
521 'selections' => $select,
522 ]);
523
524
525 ?>
526 </table>
527
528
529 <table class="form-table taxopress-table suggestterm_external"
530 style="<?php echo $active_tab === 'suggestterm_external' ? '' : 'display:none;'; ?>">
531
532
533 <tr class="suggestterm_external_description" valign="top"><td style="padding-left: 0;" colspan="2"><?php echo esc_html__('This feature can analyze your content and find new ideas for terms.', 'simple-tags'); ?></td></tr>
534
535 <?php
536
537
538
539 if(!isset($current)){
540 $select = [
541 'options' => [
542 [
543 'attr' => '0',
544 'text' => esc_attr__('False', 'simple-tags'),
545 ],
546 [
547 'attr' => '1',
548 'text' => esc_attr__('True', 'simple-tags'),
549 'default' => 'true',
550 ],
551 ],
552 ];
553 }else{
554 $select = [
555 'options' => [
556 [
557 'attr' => '0',
558 'text' => esc_attr__('False', 'simple-tags'),
559 'default' => 'true',
560 ],
561 [
562 'attr' => '1',
563 'text' => esc_attr__('True', 'simple-tags'),
564 ],
565 ],
566 ];
567
568 }
569
570 $selected = (isset($current) && isset($current['suggest_term_use_local'])) ? taxopress_disp_boolean($current['suggest_term_use_local']) : '';
571 $select['selected'] = !empty($selected) ? $current['suggest_term_use_local'] : '';
572 echo $ui->get_select_checkbox_input([
573 'namearray' => 'taxopress_suggestterm',
574 'name' => 'suggest_term_use_local',
575 'class' => 'suggest_term_use_local',
576 'labeltext' => esc_html__('Suggest existing terms on your site',
577 'simple-tags'),
578 'selections' => $select,
579 ]);
580
581
582 $select = [
583 'options' => [
584 [
585 'attr' => '0',
586 'text' => esc_attr__('False', 'simple-tags'),
587 'default' => 'true',
588 ],
589 [
590 'attr' => '1',
591 'text' => esc_attr__('True', 'simple-tags'),
592 ],
593 ],
594 ];
595 $selected = (isset($current) && isset($current['suggest_term_use_dandelion'])) ? taxopress_disp_boolean($current['suggest_term_use_dandelion']) : '';
596 $select['selected'] = !empty($selected) ? $current['suggest_term_use_dandelion'] : '';
597 echo $ui->get_select_checkbox_input([
598 'namearray' => 'taxopress_suggestterm',
599 'name' => 'suggest_term_use_dandelion',
600 'class' => 'suggest_term_use_dandelion',
601 'labeltext' => esc_html__('Suggest new terms from the Dandelion service',
602 'simple-tags'),
603 'selections' => $select,
604 ]);
605
606 echo $ui->get_text_input([
607 'namearray' => 'taxopress_suggestterm',
608 'name' => 'terms_datatxt_access_token',
609 'class' => 'terms_datatxt_access_token',
610 'textvalue' => isset($current['terms_datatxt_access_token']) ? esc_attr($current['terms_datatxt_access_token']) : '',
611 'labeltext' => esc_html__('Dandelion API token', 'simple-tags'),
612 'helptext' => __('You need an API key to use Dandelion to suggest terms. <br /> <a href="https://taxopress.com/docs/dandelion-api/">Click here for documentation.</a>',
613 'simple-tags'),
614 'required' => false,
615 ]);
616
617 if (!isset($current)) {
618 $terms_datatxt_min_confidence = '0.6';
619 } else {
620 $terms_datatxt_min_confidence = isset($current['terms_datatxt_min_confidence']) ? esc_attr($current['terms_datatxt_min_confidence']) : '0';
621 }
622
623 echo $ui->get_number_input([
624 'namearray' => 'taxopress_suggestterm',
625 'name' => 'terms_datatxt_min_confidence',
626 'class' => 'terms_datatxt_min_confidence',
627 'textvalue' => $terms_datatxt_min_confidence,
628 'labeltext' => esc_html__('Dandelion API confidence value',
629 'simple-tags'),
630 'helptext' => __('Choose a value between 0 and 1. A high value such as 0.8 will provide a few, accurate suggestions. A low value such as 0.2 will produce more suggestions, but they may be less accurate.',
631 'simple-tags'),
632 'min' => '0',
633 'max' => '1',
634 'other_attr' => 'step=".1"',
635 'required' => false,
636 ]);
637
638
639 $select = [
640 'options' => [
641 [
642 'attr' => '0',
643 'text' => esc_attr__('False', 'simple-tags'),
644 'default' => 'true',
645 ],
646 [
647 'attr' => '1',
648 'text' => esc_attr__('True', 'simple-tags'),
649 ],
650 ],
651 ];
652 $selected = (isset($current) && isset($current['suggest_term_use_opencalais'])) ? taxopress_disp_boolean($current['suggest_term_use_opencalais']) : '';
653 $select['selected'] = !empty($selected) ? $current['suggest_term_use_opencalais'] : '';
654 echo $ui->get_select_checkbox_input([
655 'namearray' => 'taxopress_suggestterm',
656 'name' => 'suggest_term_use_opencalais',
657 'class' => 'suggest_term_use_opencalais',
658 'labeltext' => esc_html__('Suggest new terms from the Open Calais service',
659 'simple-tags'),
660 'selections' => $select,
661 ]);
662
663 echo $ui->get_text_input([
664 'namearray' => 'taxopress_suggestterm',
665 'name' => 'terms_opencalais_key',
666 'class' => 'terms_opencalais_key',
667 'textvalue' => isset($current['terms_opencalais_key']) ? esc_attr($current['terms_opencalais_key']) : '',
668 'labeltext' => esc_html__('OpenCalais API Key', 'simple-tags'),
669 'helptext' => __('You need an API key to use OpenCalais to suggest terms. <br /> <a href="https://taxopress.com/docs/opencalais/">Click here for documentation.</a>',
670 'simple-tags'),
671 'required' => false,
672 ]);
673
674
675 ?>
676
677 </table>
678
679
680 </div>
681
682
683 <?php }//end new fields
684 ?>
685
686
687 <div class="clear"></div>
688
689
690 </div>
691 </div>
692 </div>
693
694
695 <?php if ($suggestterm_limit) { ?>
696
697 <div class="pp-version-notice-bold-purple" style="margin-left:0px;">
698 <div class="pp-version-notice-bold-purple-message"><?php echo esc_html__('You\'re using TaxoPress Free.
699 The Pro version has more features and support.',
700 'simple-tags'); ?>
701 </div>
702 <div class="pp-version-notice-bold-purple-button"><a
703 href="https://taxopress.com/pro" target="_blank"><?php echo esc_html__('Upgrade to Pro',
704 'simple-tags'); ?></a>
705 </div>
706 </div>
707
708 <?php } ?>
709 <?php
710 /**
711 * Fires after the default fieldsets on the taxonomy screen.
712 *
713 * @param taxopress_admin_ui $ui Admin UI instance.
714 */
715 do_action('taxopress_taxonomy_after_fieldsets', $ui);
716 ?>
717
718 </div>
719 </div>
720
721
722 </div>
723
724 <div class="taxopress-right-sidebar">
725 <div class="taxopress-right-sidebar-wrapper" style="min-height: 205px;">
726
727
728 <?php
729 if (!$suggestterm_limit) { ?>
730 <p class="submit">
731
732 <?php
733 wp_nonce_field('taxopress_addedit_suggestterm_nonce_action',
734 'taxopress_addedit_suggestterm_nonce_field');
735 if (!empty($_GET) && !empty($_GET['action']) && 'edit' === $_GET['action']) { ?>
736 <input type="submit"
737 class="button-primary taxopress-taxonomy-submit taxopress-suggestterm-submit"
738 name="suggestterm_submit"
739 value="<?php echo esc_attr(esc_attr__('Save Suggest Terms',
740 'simple-tags')); ?>"/>
741 <?php
742 } else { ?>
743 <input type="submit"
744 class="button-primary taxopress-taxonomy-submit taxopress-suggestterm-submit"
745 name="suggestterm_submit"
746 value="<?php echo esc_attr(esc_attr__('Add Suggest Terms',
747 'simple-tags')); ?>"/>
748 <?php } ?>
749
750
751 <input type="hidden" name="cpt_tax_status" id="cpt_tax_status"
752 value="<?php echo esc_attr($tab); ?>"/>
753 </p>
754
755 <?php
756 }
757 ?>
758
759 </div>
760
761 <?php do_action('taxopress_admin_after_sidebar'); ?>
762 </div>
763
764 <div class="clear"></div>
765
766
767
768 </form>
769
770 </div><!-- End .wrap -->
771
772 <div class="clear"></div>
773
774 <?php # Modal Windows;
775 ?>
776 <div class="remodal" data-remodal-id="taxopress-modal-alert"
777 data-remodal-options="hashTracking: false, closeOnOutsideClick: false">
778 <div class=""
779 style="color:red;"><?php echo __('Please complete the following required fields to save your changes:',
780 'simple-tags'); ?></div>
781 <div id="taxopress-modal-alert-content"></div>
782 <br>
783 <button data-remodal-action="cancel" class="remodal-cancel"><?php echo __('Okay',
784 'simple-tags'); ?></button>
785 </div>
786
787 <div class="remodal" data-remodal-id="taxopress-modal-confirm"
788 data-remodal-options="hashTracking: false, closeOnOutsideClick: false">
789 <div id="taxopress-modal-confirm-content"></div>
790 <br>
791 <button data-remodal-action="cancel" class="remodal-cancel"><?php echo __('No', 'simple-tags'); ?></button>
792 <button data-remodal-action="confirm"
793 class="remodal-confirm"><?php echo __('Yes', 'simple-tags'); ?></button>
794 </div>
795
796 <?php
797 }
798
799 }
800