esc_html__('Number of items per page', 'simple-tags'), 'default' => 20, 'option' => 'st_terms_display_per_page' ]; add_screen_option($option, $args); $this->terms_table = new TagClouds_List(); } /** * Method for build the page HTML manage tags * * @return void * @author Olatechpro */ public function page_manage_tagclouds() { // Default order if (!isset($_GET['order'])) { $_GET['order'] = 'name-asc'; } settings_errors(__CLASS__); if (!isset($_GET['add'])) { //all tax ?>

' . esc_html__('Search results for “%s”', 'simple-tags') . '', esc_html($search)); } ?> terms_table->prepare_items(); ?>
terms_table->search_box(esc_html__('Search Terms Display', 'simple-tags'), 'term'); ?>
terms_table->display(); //Display the table ?>

taxopress_manage_tagclouds(); echo '
'; } } ?>
0 && apply_filters('taxopress_tag_clouds_create_limit', true)){ $tag_cloud_limit = true; } $ui = new taxopress_admin_ui(); ?>

'; echo ''; echo ''; } else { $active_tab = 'tagcloud_general'; echo ''; echo esc_html__('Add new Terms Display', 'simple-tags'); } ?>

' . esc_html__('To create more Terms Display, please upgrade to TaxoPress Pro.','simple-tags').'

' . esc_html__('With TaxoPress Pro, you can create unlimited Terms Display. You can create Terms Display for any taxonomy and then display those Terms Display anywhere on your site.','simple-tags').'

'; } else { ?>
get_tr_start(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_th_start(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_label('name', esc_html__('Title', 'simple-tags')) . $ui->get_required_span(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_th_end() . $ui->get_td_start(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_text_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'title', 'textvalue' => isset($current['title']) ? esc_attr($current['title']) : '', 'maxlength' => '32', 'helptext' => '', 'required' => true, 'placeholder' => false, 'wrap' => false, ]); $options[] = [ 'attr' => '', 'text' => esc_html__('All post types', 'simple-tags'), 'default' => 'true' ]; foreach ( get_post_types(['public' => true], 'objects') as $post_type ) { $options[] = [ 'attr' => $post_type->name, 'text' => $post_type->label ]; } $select = [ 'options' => $options, ]; $selected = ( isset( $current ) && isset($current['post_type']) ) ? taxopress_disp_boolean( $current['post_type'] ) : ''; $select['selected'] = ! empty( $selected ) ? $current['post_type'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input_main( [ 'namearray' => 'taxopress_tag_cloud', 'name' => 'post_type', 'class' => 'st-post-type-select', 'labeltext' => esc_html__( 'Post Type', 'simple-tags' ), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ] ); $options = []; foreach ( get_all_taxopress_taxonomies() as $_taxonomy ) { $_taxonomy = $_taxonomy->name; $tax = get_taxonomy( $_taxonomy ); if ( ! $tax->show_tagcloud || empty( $tax->labels->name ) ) { continue; } if($tax->name === 'post_tag'){ $options[] = [ 'post_type' => join(',', $tax->object_type), 'attr' => $tax->name, 'text' => $tax->labels->name. ' ('.$tax->name.')', 'default' => 'true' ]; }else{ $options[] = [ 'post_type' => join(',', $tax->object_type), 'attr' => $tax->name, 'text' => $tax->labels->name. ' ('.$tax->name.')' ]; } } $select = [ 'options' => $options, ]; $selected = isset( $current ) ? taxopress_disp_boolean( $current['taxonomy'] ) : ''; $select['selected'] = ! empty( $selected ) ? $current['taxonomy'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input_main( [ 'namearray' => 'taxopress_tag_cloud', 'name' => 'taxonomy', 'class' => 'st-post-taxonomy-select', 'labeltext' => esc_html__( 'Taxonomy', 'simple-tags' ), 'required' => true, 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ] ); $select = [ 'options' => [ [ 'attr' => 'flat', 'text' => esc_attr__( 'Cloud', 'simple-tags' ), 'default' => 'true' ], [ 'attr' => 'list', 'text' => esc_attr__( 'List (UL/LI)', 'simple-tags' ) ], ], ]; $selected = isset( $current ) ? taxopress_disp_boolean( $current['format'] ) : ''; $select['selected'] = ! empty( $selected ) ? $current['format'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input_main( [ 'namearray' => 'taxopress_tag_cloud', 'name' => 'format', 'labeltext' => esc_html__( 'Display format', 'simple-tags' ), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_td_end() . $ui->get_tr_end(); ?>
[ [ 'attr' => '1', 'text' => esc_attr__( '24 hours', 'simple-tags' ) ], [ 'attr' => '7', 'text' => esc_attr__( '7 days', 'simple-tags' ) ], [ 'attr' => '14', 'text' => esc_attr__( '2 weeks', 'simple-tags' ) ], [ 'attr' => '30', 'text' => esc_attr__( '1 month', 'simple-tags' ) ], [ 'attr' => '180', 'text' => esc_attr__( '6 months', 'simple-tags' ) ], [ 'attr' => '365', 'text' => esc_attr__( '1 year', 'simple-tags' ) ], [ 'attr' => '0', 'text' => esc_attr__( 'No limit', 'simple-tags'), 'default' => 'true' ], ], ]; $selected = isset( $current ) ? taxopress_disp_boolean( $current['limit_days'] ) : ''; $select['selected'] = ! empty( $selected ) ? $current['limit_days'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_number_select( [ 'namearray' => 'taxopress_tag_cloud', 'name' => 'limit_days', 'labeltext' => esc_html__( 'Limit terms based on timeframe', 'simple-tags' ), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ] ); $select = [ 'options' => [ [ 'attr' => 'name', 'text' => esc_attr__( 'Name', 'simple-tags' ) ], [ 'attr' => 'slug', 'text' => esc_attr__( 'Slug', 'simple-tags' ) ], [ 'attr' => 'count', 'text' => esc_attr__( 'Counter', 'simple-tags'), 'default' => 'true' ], [ 'attr' => 'random', 'text' => esc_attr__( 'Random', 'simple-tags' ) ], ], ]; $selected = isset( $current ) ? taxopress_disp_boolean( $current['selectionby'] ) : ''; $select['selected'] = ! empty( $selected ) ? $current['selectionby'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input_main( [ 'namearray' => 'taxopress_tag_cloud', 'name' => 'selectionby', 'labeltext' => esc_html__( 'Method for choosing terms from the database', 'simple-tags' ), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ] ); $select = [ 'options' => [ [ 'attr' => 'asc', 'text' => esc_attr__( 'Ascending', 'simple-tags' ) ], [ 'attr' => 'desc', 'text' => esc_attr__( 'Descending', 'simple-tags'), 'default' => 'true' ], ], ]; $selected = isset( $current ) ? taxopress_disp_boolean( $current['selection'] ) : ''; $select['selected'] = ! empty( $selected ) ? $current['selection'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input_main( [ 'namearray' => 'taxopress_tag_cloud', 'name' => 'selection', 'labeltext' => esc_html__( 'Ordering for choosing term from the database', 'simple-tags' ), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ] ); $select = [ 'options' => [ [ 'attr' => 'name', 'text' => esc_attr__( 'Name', 'simple-tags' ) ], [ 'attr' => 'count', 'text' => esc_attr__( 'Counter', 'simple-tags') ], [ 'attr' => 'random', 'text' => esc_attr__( 'Random', 'simple-tags' ), 'default' => 'true' ], ], ]; $selected = isset( $current ) ? taxopress_disp_boolean( $current['orderby'] ) : ''; $select['selected'] = ! empty( $selected ) ? $current['orderby'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input_main( [ 'namearray' => 'taxopress_tag_cloud', 'name' => 'orderby', 'labeltext' => esc_html__( 'Method for choosing terms for display', 'simple-tags' ), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ] ); $select = [ 'options' => [ [ 'attr' => 'asc', 'text' => esc_attr__( 'Ascending', 'simple-tags' ) ], [ 'attr' => 'desc', 'text' => esc_attr__( 'Descending', 'simple-tags'), 'default' => 'true' ], ], ]; $selected = isset( $current ) ? taxopress_disp_boolean( $current['order'] ) : ''; $select['selected'] = ! empty( $selected ) ? $current['order'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input_main( [ 'namearray' => 'taxopress_tag_cloud', 'name' => 'order', 'labeltext' => esc_html__( 'Ordering for choosing terms for display', 'simple-tags' ), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ] ); ?>
[ [ 'attr' => '0', 'text' => esc_attr__('False', 'simple-tags'), 'default' => 'true', ], [ 'attr' => '1', 'text' => esc_attr__('True', 'simple-tags'), ], ], ]; $selected = ( isset($current) && isset($current['hide_title']) ) ? taxopress_disp_boolean($current['hide_title']) : ''; $select['selected'] = !empty($selected) ? $current['hide_title'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'hide_title', 'labeltext' => esc_html__('Hide title in output?', 'simple-tags'), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ]); $select = [ 'options' => [ [ 'attr' => '0', 'text' => esc_attr__('False', 'simple-tags'), 'default' => 'true', ], [ 'attr' => '1', 'text' => esc_attr__('True', 'simple-tags'), ], ], ]; $selected = ( isset($current) && isset($current['hide_output']) ) ? taxopress_disp_boolean($current['hide_output']) : ''; $select['selected'] = !empty($selected) ? $current['hide_output'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'hide_output', 'labeltext' => esc_html__('Hide display output if no terms?', 'simple-tags'), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_number_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'max', 'textvalue' => isset($current['max']) ? esc_attr($current['max']) : '45', 'labeltext' => esc_html__('Maximum terms to display', 'simple-tags'), 'helptext' => '', 'required' => true, ]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_number_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'smallest', 'textvalue' => isset($current['smallest']) ? esc_attr($current['smallest']) : '8', 'labeltext' => esc_html__('Font size minimum', 'simple-tags'), 'helptext' => '', 'required' => true, ]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_number_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'largest', 'textvalue' => isset($current['largest']) ? esc_attr($current['largest']) : '22', 'labeltext' => esc_html__('Font size maximum', 'simple-tags'), 'helptext' => '', 'required' => true, ]); $select = [ 'options' => [ [ 'attr' => 'pt', 'text' => esc_attr__( 'Point', 'simple-tags' ), 'default' => 'true' ], [ 'attr' => 'px', 'text' => esc_attr__( 'Pixel', 'simple-tags' ) ], [ 'attr' => 'em', 'text' => esc_attr__( 'Em', 'simple-tags') ], [ 'attr' => '%', 'text' => esc_attr__( 'Percent', 'simple-tags') ], ], ]; $selected = isset( $current ) ? taxopress_disp_boolean( $current['unit'] ) : ''; $select['selected'] = ! empty( $selected ) ? $current['unit'] : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input_main( [ 'namearray' => 'taxopress_tag_cloud', 'name' => 'unit', 'labeltext' => esc_html__( 'Unit font size', 'simple-tags' ), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ] ); $select = [ 'options' => [ [ 'attr' => '0', 'text' => esc_attr__('False', 'simple-tags'), ], [ 'attr' => '1', 'text' => esc_attr__('True', 'simple-tags'), //'default' => 'true', removed when default value is checked as this mean box is always checked even when user uncheck it since it's defau;t ], ], ]; $selected = ( isset($current) && isset($current['color']) ) ? taxopress_disp_boolean($current['color']) : ''; if($tag_cloud_edit){ $select['selected'] = !empty($selected) ? $current['color'] : ''; }else{ $select['selected'] = 1; //makeup for default when creating new term display } // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_select_checkbox_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'color', 'class' => 'tag-cloud-color-option', 'labeltext' => esc_html__('Enable colors for terms', 'simple-tags'), 'selections' => $select,// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_text_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'mincolor', 'class' => 'text-color tag-cloud-min', 'textvalue' => isset($current['mincolor']) ? esc_attr($current['mincolor']) : '#CCCCCC', 'labeltext' => esc_html__('Font color minimum', 'simple-tags'), 'helptext' => esc_html__('This is the color of the least popular term', 'simple-tags'), 'required' => true, ]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_text_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'maxcolor', 'class' => 'text-color tag-cloud-max', 'textvalue' => isset($current['maxcolor']) ? esc_attr($current['maxcolor']) : '#000000', 'labeltext' => esc_html__('Font color maximum', 'simple-tags'), 'helptext' => esc_html__('This is the color of the most popular term', 'simple-tags'), 'required' => true, ]); ?>
get_text_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'wrap_class', 'class' => '', 'textvalue' => isset($current['wrap_class']) ? esc_attr($current['wrap_class']) : '', 'labeltext' => esc_html__('Term display div class', 'simple-tags'), 'helptext' => '', 'required' => false, ]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_text_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'link_class', 'class' => '', 'textvalue' => isset($current['link_class']) ? esc_attr($current['link_class']) : '', 'labeltext' => esc_html__('Term link class', 'simple-tags'), 'helptext' => '', 'required' => false, ]); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $ui->get_textarea_input([ 'namearray' => 'taxopress_tag_cloud', 'name' => 'xformat', 'class' => 'st-full-width', 'rows' => '4', 'cols' => '40', 'textvalue' => isset($current['xformat']) ? esc_attr($current['xformat']) : esc_attr('%tag_name%'), 'labeltext' => esc_html__('Term link format', 'simple-tags'), 'helptext' => sprintf(esc_html__('This option allows you to change the format of your terms. You can use any of the tokens in the "Terms Display format" sidebar". Find more details %1sin the documentation%2s.', 'simple-tags'), '', ''), 'required' => false, ]); ?>

' . esc_html__('Shortcode: ','simple-tags'); ?>  

:

  • %tag_link%
  • %tag_id%
  • t%tag_scale%
  • %tag_count%
  • %tag_rel% ( rel="tag")
  • %tag_size%
  • %tag_color%
  • %tag_name%
  • %tag_name_attribute%