Sticky Post * * @uses $wp_customize->add_section() https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/ * @since 1.0.0 */ $wp_customize->add_section( new Blogbuster_Customize_Section ( $wp_customize, 'blogbuster_section_front_sticky_post', array( 'priority' => 20, 'panel' => 'blogbuster_panel_frontpage', 'title' => __( 'Sticky Post', 'blogbuster' ), ) ) ); /** * Toggle option for sticky post section. * * Frontpage Settings > Sticky Post * * @since 1.0.0 */ $wp_customize->add_setting( 'blogbuster_front_sticky_post_enable', array( 'default' => blogbuster_get_customizer_default( 'blogbuster_front_sticky_post_enable' ), 'sanitize_callback' => 'blogbuster_sanitize_checkbox' ) ); $wp_customize->add_control( new Blogbuster_Control_Toggle( $wp_customize, 'blogbuster_front_sticky_post_enable', array( 'priority' => 5, 'section' => 'blogbuster_section_front_sticky_post', 'settings' => 'blogbuster_front_sticky_post_enable', 'label' => __( 'Enable Sticky Post Section', 'blogbuster' ) ) ) ); /** * Text option for sticky post section title * * Frontpage Settings > Sticky Post * * @since 1.0.0 */ $wp_customize->add_setting( 'blogbuster_front_sticky_post_section_title', array( 'default' => blogbuster_get_customizer_default( 'blogbuster_front_sticky_post_section_title' ), 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'blogbuster_front_sticky_post_section_title', array( 'priority' => 10, 'section' => 'blogbuster_section_front_sticky_post', 'settings' => 'blogbuster_front_sticky_post_section_title', 'label' => __( 'Section Title', 'blogbuster' ), 'type' => 'text', ) ); /** * Upgrade field for sticky posts * * Frontpage Settings > Sticky Post * * @since 1.0.0 */ $wp_customize->add_setting( 'blogbuster_upgrade_front_stikcy', array( 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( new Blogbuster_Control_Upgrade( $wp_customize, 'blogbuster_upgrade_front_stikcy', array( 'priority' => 70, 'section' => 'blogbuster_section_front_sticky_post', 'settings' => 'blogbuster_upgrade_front_stikcy', 'label' => __( 'More features with Blogbuster Pro', 'blogbuster' ), 'choices' => blogbuster_upgrade_choices( 'blogbuster_front_stikcy' ) ) ) ); } endif;