D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
homehopshortterm
/
public_html
/
wp-content
/
themes
/
pixwell
/
backend
/
panels
/
Filename :
table-contents.php
back
Copy
<?php /** Don't load directly */ defined( 'ABSPATH' ) || exit; if ( ! function_exists( 'pixwell_register_options_table_contents' ) ) { function pixwell_register_options_table_contents() { return [ 'title' => esc_html__( 'Table of Contents', 'pixwell' ), 'id' => 'pixwell_config_section_table_contents', 'desc' => esc_html__( 'Customize the table of contents for the single post and page.', 'pixwell' ), 'icon' => 'el el-th-list', 'fields' => [ [ 'id' => 'section_start_table_contents_ptype', 'type' => 'section', 'class' => 'ruby-section-start', 'title' => esc_html__( 'Post & Page', 'pixwell' ), 'indent' => true, ], [ 'id' => 'table_contents_post', 'type' => 'switch', 'title' => esc_html__( 'Support Single Post', 'pixwell' ), 'subtitle' => esc_html__( 'Enable or disable the table of content for the single post.', 'pixwell' ), 'default' => false, ], [ 'id' => 'table_contents_page', 'type' => 'switch', 'title' => esc_html__( 'Support Page', 'pixwell' ), 'subtitle' => esc_html__( 'Enable or disable the table of content for the single.', 'pixwell' ), 'default' => false, ], [ 'id' => 'section_end_table_contents_ptype', 'type' => 'section', 'class' => 'ruby-section-end', 'indent' => false, ], [ 'id' => 'section_start_table_contents_heading', 'type' => 'section', 'class' => 'ruby-section-start', 'title' => esc_html__( 'Heading Tags', 'pixwell' ), 'indent' => true, ], [ 'id' => 'table_contents_h1', 'type' => 'switch', 'title' => esc_html__( 'Support H1', 'pixwell' ), 'subtitle' => esc_html__( 'Support H1 tag, Turn this option off if you would like to exclude H1 tag out of the table of contents.', 'pixwell' ), 'default' => true, ], [ 'id' => 'table_contents_h2', 'type' => 'switch', 'title' => esc_html__( 'Support H2', 'pixwell' ), 'subtitle' => esc_html__( 'Support H2 tag, Turn this option off if you would like to exclude H2 tag out of the table of contents.', 'pixwell' ), 'default' => true, ], [ 'id' => 'table_contents_h3', 'type' => 'switch', 'title' => esc_html__( 'Support H3', 'pixwell' ), 'subtitle' => esc_html__( 'Support H3 tag, Turn this option off if you would like to exclude H3 tag out of the table of contents.', 'pixwell' ), 'default' => true, ], [ 'id' => 'table_contents_h4', 'type' => 'switch', 'title' => esc_html__( 'Support H4', 'pixwell' ), 'subtitle' => esc_html__( 'Support H4 tag, Turn this option off if you would like to exclude H4 tag out of the table of contents.', 'pixwell' ), 'default' => true, ], [ 'id' => 'table_contents_h5', 'type' => 'switch', 'title' => esc_html__( 'Support H5', 'pixwell' ), 'subtitle' => esc_html__( 'Support H5 tag, Turn this option off if you would like to exclude H5 tag out of the table of contents.', 'pixwell' ), 'default' => true, ], [ 'id' => 'table_contents_h6', 'type' => 'switch', 'title' => esc_html__( 'Support H6', 'pixwell' ), 'subtitle' => esc_html__( 'Support H6 tag, Turn this option off if you would like to exclude H6 tag out of the table of contents.', 'pixwell' ), 'default' => true, ], [ 'id' => 'section_end_table_contents_heading', 'type' => 'section', 'class' => 'ruby-section-end', 'indent' => false, ], [ 'id' => 'section_start_table_contents_layout', 'type' => 'section', 'class' => 'ruby-section-start', 'title' => esc_html__( 'Layout & Position', 'pixwell' ), 'indent' => true, ], [ 'id' => 'table_contents_layout', 'title' => esc_html__( 'layout', 'pixwell' ), 'subtitle' => esc_html__( 'Select a layout for the table of contents.', 'pixwell' ), 'type' => 'select', 'options' => [ '1' => esc_html__( 'Half Width', 'pixwell' ), '2' => esc_html__( 'Full Width (2 Columns)', 'pixwell' ), '3' => esc_html__( 'Full Width (1 Column)', 'pixwell' ), ], 'default' => '1', ], [ 'id' => 'table_contents_enable', 'title' => esc_html__( 'At least H tags', 'pixwell' ), 'subtitle' => esc_html__( 'Input a minimum number of the H tags for starting to show.', 'pixwell' ), 'type' => 'text', 'class' => 'small-text', 'validate' => 'numeric', 'default' => 2, ], [ 'id' => 'table_contents_heading', 'type' => 'text', 'title' => esc_html__( 'Table of Cotnents Heading', 'pixwell' ), 'subtitle' => esc_html__( 'Input the heading for the table of contents box.', 'pixwell' ), 'default' => esc_html__( 'Contents', 'pixwell' ), ], [ 'id' => 'table_contents_position', 'class' => 'small-text', 'validate' => 'numeric', 'type' => 'text', 'title' => esc_html__( 'Display Position', 'pixwell' ), 'subtitle' => esc_html__( 'Input a position (After x paragraph) to display the table of contents box.', 'pixwell' ), 'default' => false, ], [ 'id' => 'table_contents_hierarchy', 'type' => 'switch', 'title' => esc_html__( 'Show Hierarchy', 'pixwell' ), 'subtitle' => esc_html__( 'Enable or disable hierarchy for the table of contents box.', 'pixwell' ), 'default' => true, ], [ 'id' => 'table_contents_scroll', 'type' => 'switch', 'title' => esc_html__( 'Smooth Scroll', 'pixwell' ), 'subtitle' => esc_html__( 'Enable or disable smooth scroll effect to jumb to the anchor link.', 'pixwell' ), 'default' => true, ], [ 'id' => 'table_contents_toggle', 'type' => 'switch', 'title' => esc_html__( 'Collapse Toggle', 'pixwell' ), 'subtitle' => esc_html__( 'Enable the collapse toggle button.', 'pixwell' ), 'default' => false, ], [ 'id' => 'section_end_table_contents_layout', 'type' => 'section', 'class' => 'ruby-section-end no-border', 'indent' => false, ], ], ]; } }