芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/clients/carotiti/wp-content/themes/royale-news/royalethemes/customizer/options.php
add_panel( 'royale_news_options', array( 'title' => esc_html__( 'Theme Options', 'royale-news' ), 'description' => esc_html__( 'Royale News Customization Options', 'royale-news' ), 'priority' => 10 ) ); /*------------------------------------------------ Top Header Options ------------------------------------------------*/ // Ticker News Options $wp_customize->add_section( 'royale_news_ticker_news_options', array( 'priority' => 20, 'title' => esc_html__( 'Ticker News Options', 'royale-news' ), 'description' => esc_html__( 'Configure Ticker News', 'royale-news' ), 'panel' => 'royale_news_options' ) ); $wp_customize->add_setting( 'royale_news_ticker_news_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => $default['royale_news_ticker_news_title'], ) ); $wp_customize->add_control( 'royale_news_ticker_news_title', array( 'label' => esc_html__( 'Ticker News Title', 'royale-news' ), 'section' => 'royale_news_ticker_news_options', 'settings' => 'royale_news_ticker_news_title', 'type' => 'text' ) ); $wp_customize->add_setting('royale_news_ticker_news_category',array( 'sanitize_callback' => 'royale_news_sanitize_select', 'default' => $default['royale_news_ticker_news_category'], ) ); $wp_customize->add_control( new Royale_News_Theme_Customize_Dropdown_Taxonomies_Control( $wp_customize, 'royale_news_ticker_news_category', array( 'label' => esc_html__('Choose Category','royale-news'), 'section' => 'royale_news_ticker_news_options', 'settings' => 'royale_news_ticker_news_category', 'type'=> 'dropdown-taxonomies', ) ) ); $wp_customize->add_setting('royale_news_ticker_news_no',array( 'sanitize_callback' => 'royale_news_sanitize_number_absint', 'default' => $default['royale_news_ticker_news_no'], ) ); $wp_customize->add_control( 'royale_news_ticker_news_no', array( 'label' => esc_html__('No of Posts','royale-news'), 'section' => 'royale_news_ticker_news_options', 'settings' => 'royale_news_ticker_news_no', 'type'=> 'number', ) ); // Current Date Options $wp_customize->add_section( 'royale_news_current_date_options', array( 'priority' => 20, 'title' => esc_html__( 'Current Date Option', 'royale-news' ), 'description' => esc_html__( 'Configure Current Date', 'royale-news' ), 'panel' => 'royale_news_options' ) ); $wp_customize->add_setting('royale_news_enable_current_date',array( 'sanitize_callback' => 'royale_news_sanitize_checkbox', 'default' => $default['royale_news_enable_current_date'], ) ); $wp_customize->add_control(new WP_Customize_Control($wp_customize,'royale_news_enable_current_date',array( 'label' => esc_html__('Show Current Date','royale-news'), 'section' => 'royale_news_current_date_options', 'settings' => 'royale_news_enable_current_date', 'type'=> 'checkbox', ))); // Search Button Options $wp_customize->add_section( 'royale_news_search_btn_options', array( 'priority' => 20, 'title' => esc_html__( 'Search Button Option', 'royale-news' ), 'description' => esc_html__( 'Configure Search Button', 'royale-news' ), 'panel' => 'royale_news_options' ) ); $wp_customize->add_setting('royale_news_enable_search_btn',array( 'sanitize_callback' => 'royale_news_sanitize_checkbox', 'default' => $default['royale_news_enable_search_btn'], ) ); $wp_customize->add_control(new WP_Customize_Control($wp_customize,'royale_news_enable_search_btn',array( 'label' => esc_html__('Show Search Button','royale-news'), 'section' => 'royale_news_search_btn_options', 'settings' => 'royale_news_enable_search_btn', 'type'=> 'checkbox', ))); /* Footer Settings */ $wp_customize->add_section( 'royale_news_copyright_options', array( 'priority' => 20, 'title' => esc_html__( 'Copyright Text Option', 'royale-news' ), 'description' => esc_html__( 'Configure Copyright Text', 'royale-news' ), 'panel' => 'royale_news_options' ) ); // Copyright Text $wp_customize->add_setting( 'royale_news_copyright_text', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => $default['royale_news_copyright_text'], ) ); $wp_customize->add_control( 'royale_news_copyright_text', array( 'label' => esc_html__( 'Copyright Text', 'royale-news' ), 'description' => esc_html__( 'Insert copyright text', 'royale-news' ), 'section' => 'royale_news_copyright_options', 'settings' => 'royale_news_copyright_text', 'type' => 'text' ) ); // Scroll Top Options $wp_customize->add_section( 'royale_news_scroll_top_options', array( 'priority' => 20, 'title' => esc_html__( 'Scroll Top Button Option', 'royale-news' ), 'description' => esc_html__( 'Configure Scroll Top Button', 'royale-news' ), 'panel' => 'royale_news_options' ) ); $wp_customize->add_setting('royale_news_enable_scroll_top',array( 'sanitize_callback' => 'royale_news_sanitize_checkbox', 'default' => $default['royale_news_enable_scroll_top'], ) ); $wp_customize->add_control(new WP_Customize_Control($wp_customize,'royale_news_enable_scroll_top',array( 'label' => esc_html__('Show Scroll Top Button','royale-news'), 'section' => 'royale_news_scroll_top_options', 'settings' => 'royale_news_enable_scroll_top', 'type'=> 'checkbox', ))); /*----------------------------------------- BreadCrumb Option -----------------------------------------*/ $wp_customize->add_section( 'royale_news_breadcrumb_option', array( 'priority' => 20, 'title' => esc_html__( 'Breadcrumb Option', 'royale-news' ), 'description' => esc_html__( 'Configure Breadcrumb', 'royale-news' ), 'panel' => 'royale_news_options' ) ); $wp_customize->add_setting('royale_news_enable_breadcrumb',array( 'sanitize_callback' => 'royale_news_sanitize_checkbox', 'default' => $default['royale_news_enable_breadcrumb'], ) ); $wp_customize->add_control(new WP_Customize_Control($wp_customize,'royale_news_enable_breadcrumb',array( 'label' => esc_html__('Show Breadcrumb','royale-news'), 'section' => 'royale_news_breadcrumb_option', 'settings' => 'royale_news_enable_breadcrumb', 'type'=> 'checkbox', ))); /*----------------------------------------- Blog Page Option -----------------------------------------*/ $wp_customize->add_section( 'royale_news_blogpage_option', array( 'priority' => 20, 'title' => esc_html__( 'Blog Page Option', 'royale-news' ), 'description' => esc_html__( 'Configure Blog page', 'royale-news' ), 'panel' => 'royale_news_options' ) ); $wp_customize->add_setting('royale_news_enable_featured_post',array( 'sanitize_callback' => 'royale_news_sanitize_checkbox', 'default' => $default['royale_news_enable_featured_post'], ) ); $wp_customize->add_control(new WP_Customize_Control($wp_customize,'royale_news_enable_featured_post',array( 'label' => esc_html__('Show Featured Posts','royale-news'), 'section' => 'royale_news_blogpage_option', 'settings' => 'royale_news_enable_featured_post', 'type'=> 'checkbox', ))); /*----------------------------------------- Theme Sidebar Option -----------------------------------------*/ $wp_customize->add_section( 'royale_news_sidebar_section', array( 'priority' => 20, 'title' => esc_html__( 'Sidebar Option', 'royale-news' ), 'description' => esc_html__( 'Configure Sidebar Position', 'royale-news' ), 'panel' => 'royale_news_options' ) ); $wp_customize->add_setting('royale_news_sidebar_position', array( 'sanitize_callback' => 'royale_news_sanitize_select', 'default' => $default['royale_news_sidebar_position'], )); $wp_customize->add_control('royale_news_sidebar_position', array( 'label' => esc_html__('Sidebar Position', 'royale-news'), 'description' => esc_html__( 'Select Sidebar Postion. Select none to hide sidebar.', 'royale-news' ), 'section' => 'royale_news_sidebar_section', 'settings' => 'royale_news_sidebar_position', 'type' => 'radio', 'choices' => array( 'left' => esc_html__('Left','royale-news'), 'right' => esc_html__('Right','royale-news'), 'none' => esc_html__('None','royale-news'), ), ) );