add_panel( 'anirohotellight_theme_options_panel', array( 'title' => esc_html__( 'Theme options', 'aniro-hotel-light' ), 'description' => esc_html__( 'Theme options.', 'aniro-hotel-light' ), 'priority' => 52, ) ); //***************************************************************************** // Add section 'Layouts options' //***************************************************************************** $wp_customize->add_section( 'anirohotellight-theme-options-section', array( 'title' => esc_html__( 'Layouts options', 'aniro-hotel-light' ), 'panel' => 'anirohotellight_theme_options_panel', 'description' => esc_html__( 'Change layout options.', 'aniro-hotel-light' ), )); // Create sidebar layout setting $wp_customize->add_setting('anirohotellight_layout', array( 'default' => 'sidebar-right', 'type' => 'theme_mod', 'sanitize_callback' => 'anirohotellight_sanitize_layout', 'transport' => 'postMessage' ) ); // Add sidebar layout controls $wp_customize->add_control('anirohotellight_layout', array( 'section' => 'anirohotellight-theme-options-section', 'type' => 'radio', 'label' => esc_html__( 'Sidebar position', 'aniro-hotel-light' ), 'choices' => array( 'no-sidebar' => esc_html__( 'No sidebar', 'aniro-hotel-light' ), 'sidebar-left' => esc_html__( 'Left sidebar', 'aniro-hotel-light' ), 'sidebar-right' => esc_html__( 'Right sidebar (default)', 'aniro-hotel-light' ) ), ) ); //***************************************************************************** // Add section 'Sticky post options' //*****************************************************************************/ $wp_customize->add_section( 'anirohotellight-sticky-post-section', array( 'title' => esc_html__( 'Sticky posts options', 'aniro-hotel-light' ), 'panel' => 'anirohotellight_theme_options_panel', 'description' => esc_html__( 'Change sticky posts options.', 'aniro-hotel-light' ), )); // Create sticky post setting $wp_customize->add_setting('anirohotellight-sticky-post', array( 'default' => 'square-check', 'type' => 'theme_mod', 'sanitize_callback' => 'anirohotellight_sanitize_sticky_post', ) ); // Add sticky post controls $wp_customize->add_control('anirohotellight-sticky-post', array( 'section' => 'anirohotellight-sticky-post-section', 'type' => 'radio', 'label' => esc_html__( 'Mark sticky posts', 'aniro-hotel-light' ), 'choices' => array( 'square-check' => esc_html__( 'Show square (check)', 'aniro-hotel-light' ), 'square-pin' => esc_html__( 'Show square (pin)', 'aniro-hotel-light' ), 'none' => esc_html__( 'Do not mark sticky posts', 'aniro-hotel-light' ) ), ) ); //***************************************************************************** // Add section 'Blog type' //***************************************************************************** $wp_customize->add_section( 'anirohotellight-front-page-type-section', array( 'title' => esc_html__( 'Blog type', 'aniro-hotel-light' ), 'panel' => 'anirohotellight_theme_options_panel', 'description' => esc_html__( 'Change blog type.', 'aniro-hotel-light' ), )); // Create blog type setting $wp_customize->add_setting('anirohotellight_front_page_type', array( 'default' => 'front-page-type3', 'type' => 'theme_mod', 'sanitize_callback' => 'anirohotellight_sanitize_front_page_type' ) ); // Add blog type controls $wp_customize->add_control('anirohotellight_front_page_type', array( 'section' => 'anirohotellight-front-page-type-section', 'type' => 'radio', 'label' => esc_html__( 'Blog type', 'aniro-hotel-light' ), 'choices' => array( 'front-page-type1' => esc_html__( 'Articles are large', 'aniro-hotel-light' ), 'front-page-type2' => esc_html__( 'Articles have an average size (Pictures are on the left)', 'aniro-hotel-light' ), 'front-page-type3' => esc_html__( 'Articles have an average size (The position of the pictures alternates)', 'aniro-hotel-light' ) ), ) ); // How many words show in articles on front page $wp_customize->add_setting('anirohotellight_number_of_words_frontpage', array( 'default' => 35, 'sanitize_callback' => 'absint' )); $wp_customize->add_control('anirohotellight_number_of_words_frontpage', array( 'section' => 'anirohotellight-front-page-type-section', 'label' => esc_html__('How many words show in articles','aniro-hotel-light'), 'type' => 'number', 'settings' => 'anirohotellight_number_of_words_frontpage', 'input_attrs' => array( 'min' => 5, 'max' => 80, 'step' => 1, 'style' => 'margin-bottom: 15px; padding: 15px;',) )); //****************************************************************************** // Add copyright text in footer //****************************************************************************** $wp_customize->add_section('anirohotellight_copyright_text_section', array( 'title' => esc_html__( 'Copyright text', 'aniro-hotel-light' ), 'priority' => 200, 'panel' => 'anirohotellight_theme_options_panel', 'description' => esc_html__( 'Add Copyright text to footer.', 'aniro-hotel-light'), ) ); //Copyright $wp_customize->add_setting('anirohotellight_years', array( 'default' => '', 'sanitize_callback' => 'wp_filter_nohtml_kses' ) ); $wp_customize->add_control('anirohotellight_years', array( 'section' => 'anirohotellight_copyright_text_section', 'label' => 'Years:', 'type' => 'text' ) ); //All Rights Reserved $wp_customize->add_setting('anirohotellight_all_rights_text', array( 'default' => 'All Rights Reserved.', 'sanitize_callback' => 'wp_filter_nohtml_kses' ) ); $wp_customize->add_control('anirohotellight_all_rights_text', array( 'section' => 'anirohotellight_copyright_text_section', 'label' => 'Copyright:', 'type' => 'text' ) ); //Hide copyright $wp_customize->add_setting('anirohotellight_hide_copyright', array( 'default' => '', 'sanitize_callback' => 'anirohotellight_sanitize_checkbox' )); $wp_customize->add_control('anirohotellight_hide_copyright', array( 'type' => 'checkbox', 'label' => esc_html__( 'Hide copyright.', 'aniro-hotel-light' ), 'section' => 'anirohotellight_copyright_text_section', ) );