add_section('appeal_custom_teaser_length_section', array( 'title' => __( 'Appeal Theme Controls', 'appeal' ), 'priority' => 45 )); /* (1) * WP_Customize_ /add_setting for header background color */ $wp_customize->add_setting( 'appeal_header_background_color_setting', array( 'type' => 'theme_mod', 'default' => 'f7f7f7', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh' ) ); /* (2) * WP_Customize_ /add_setting for content background color */ $wp_customize->add_setting( 'appeal_page_background_color_setting', array( 'type' => 'theme_mod', 'default' => 'ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh' ) ); /* (3)anchor links color * WP_Customize_ /add_setting for anchor link color */ $wp_customize->add_setting( 'appeal_anchor_links_color_setting', array( 'type' => 'theme_mod', 'default' => '33679d', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh' ) ); /* (3A)appeal_pullquote_text_color * WP_Customize_ /add_setting for anchor link color */ $wp_customize->add_setting( 'appeal_pullquote_text_color_setting', array( 'type' => 'theme_mod', 'default' => '356767', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh' ) ); /* (4) * WP_Customize_ /add_setting for pullquote teaser words */ $wp_customize->add_setting( 'appeal_custom_teaser_length_setting', array( 'type' => 'theme_mod', 'default' => 22, 'sanitize_callback' => 'appeal_sanitize_number_absint', 'transport' => 'refresh' ) ); /* (5) * WP_Customize_ /add_setting for pullquote teaser width */ $wp_customize->add_setting( 'appeal_custom_teaser_width_setting', array( 'type' => 'theme_mod', 'default' => 220, 'sanitize_callback' => 'appeal_sanitize_number_absint', 'transport' => 'refresh' ) ); /* (6) * WP_Customize_ /add_setting for post excerpt words */ $wp_customize->add_setting( 'appeal_posts_excerpt_length_setting', array( 'type' => 'theme_mod', 'default' => 58, 'sanitize_callback' => 'appeal_sanitize_number_absint', 'transport' => 'refresh' ) ); /* (7) * WP_Customize_ /add_setting for title visibility */ $wp_customize->add_setting( 'appeal_title_visible_setting', array( 'type' => 'theme_mod', 'default' => 'atvt1', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' ) ); /* (8) * WP_Customize_ /add_setting for post header link */ $wp_customize->add_setting( 'appeal_titlelink_color_setting', array( 'type' => 'theme_mod', 'default' => 'linkico-gray', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' ) ); /* (9) * WP_Customize_ /add_setting for theme instructions */ $wp_customize->add_setting( 'appeal_theme_instructions_setting', array( 'type' => 'option', 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); //-----------------Controls----------------------------------- // (1) Header and Footer background color $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'appeal_header_background_color', array( 'settings' => 'appeal_header_background_color_setting', 'section' => 'colors', 'priority' => 1, 'label' => __( 'Header, Footer and Sidebars Background', 'appeal' ), 'description' => __( 'Select the background color of the header area, the footer and sidebars', 'appeal' ), ) ) ); // (2) WP page background color $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'appeal_page_background_color', array( 'settings' => 'appeal_page_background_color_setting', 'section' => 'colors', 'label' => __( 'Content Background Color', 'appeal' ), 'description' => __( 'Sets background color of Post and Page content', 'appeal' ), ) ) ); // (3) Anchor links color $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'appeal_anchor_links_color', array( 'settings' => 'appeal_anchor_links_color_setting', 'section' => 'colors', 'priority' => 1, 'label' => __( 'Links Color', 'appeal' ), 'description' => __( 'Select the color for hyperlinks. May not effect everything.', 'appeal' ), ) ) ); // (3A) Pullquote word color $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'appeal_pullquote_text_color', array( 'settings' => 'appeal_pullquote_text_color_setting', 'section' => 'colors', 'priority' => 1, 'label' => __( 'PullQuote Text Color', 'appeal' ), 'description' => __( 'Select the color for pullquote excerpt on articles.', 'appeal' ), ) ) ); // (4) Teaser word count length $wp_customize->add_control( 'appeal_custom_teaser_length', array( 'settings' => 'appeal_custom_teaser_length_setting', 'type' => 'number', 'section' => 'appeal_custom_teaser_length_section', 'label' => __( 'PullQuote Number of Words', 'appeal' ), 'description' => __( 'Set how many words display on the pullquote.', 'appeal' ), 'input_attrs' => array( 'min' => 0, 'max' => 55, ), ) ); // (5) width of teaser $wp_customize->add_control( 'appeal_custom_teaser_width', array( 'settings' => 'appeal_custom_teaser_width_setting', 'type' => 'number', 'section' => 'appeal_custom_teaser_length_section', 'label' => __( 'Set Pullquote Width', 'appeal' ), 'description' => __( 'This sets how wide the Teaser will be. Height is automatic.', 'appeal' ), 'input_attrs' => array( 'min' => 0, 'max' => 540, ), ) ); // (6) posts excerpt length control $wp_customize->add_control( 'appeal_posts_excerpt_length', array( 'settings' => 'appeal_posts_excerpt_length_setting', 'type' => 'number', 'section' => 'appeal_custom_teaser_length_section', 'label' => __( 'Set Posts Excerpt Length', 'appeal' ), 'description' => __( 'This sets excertps for POSTS ONLY.', 'appeal' ), 'input_attrs' => array( 'min' => 0, 'max' => 385, ), ) ); // (7) $wp_customize->add_control( 'appeal_title_visible_toposts', array( 'settings' => 'appeal_title_visible_setting', 'label' => __( 'Title Visible only on: ', 'appeal' ), 'description' => __( 'Does not apply to archives etc', 'appeal' ), 'section' => 'appeal_custom_teaser_length_section', 'type' => 'select', 'choices' => array( 'atvt1' => __( 'Posts and Pages', 'appeal' ), 'atvt2' => __( 'Posts Only', 'appeal' ), 'atvt3' => __( 'Pages Only', 'appeal' ), 'atvt4' => __( 'Only HomePage Blog & Single Posts', 'appeal' ), ), )); // (8) $wp_customize->add_control( 'appeal_titlelink_color', array( 'settings' => 'appeal_titlelink_color_setting', 'label' => __( 'Choose color for link icon: ', 'appeal' ), 'section' => 'appeal_custom_teaser_length_section', 'type' => 'select', 'choices' => array( 'linkico' => __( 'Black Link Icon', 'appeal' ), 'linkico-red' => __( 'Red Link Icon', 'appeal' ), 'linkico-blu' => __( 'Blue Link Icon', 'appeal' ), 'linkico-grn' => __( 'Green Link Icon', 'appeal' ), 'linkico-gray' => __( 'Gray Link Icon', 'appeal' ), ), )); // (9) $wp_customize->add_control( 'appeal_theme_instructions', array( 'settings' => 'appeal_theme_instructions_setting', 'type' => 'hidden', 'section' => 'appeal_custom_teaser_length_section', 'label' => __( 'Further Theme Instructions', 'appeal' ), 'description' => __( 'By hiding titles of posts/pages, your titles can be added from your Editor to give better SEO URLs and puts title where you want it in the article. h3 tag is pre styled to match theme. The Editor Title box will be the url name. This is required.