add_section( 'header_ads_section', [ 'title' => __( 'Header ads', 'bansta' ), 'panel' => 'bansta_panel_header', 'priority' => 53 ]); $wp_customize->add_setting( 'show_ad_in_header', [ 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'bansta_sanitize_checkbox', ]); $wp_customize->add_control( new Ts_Button_Control( $wp_customize,'show_ad_in_header', [ 'description' => __( 'Ad in header', 'bansta' ), 'label' => __( 'Upgrade to Pro', 'bansta' ), 'setting' => 'show_ad_in_header', 'section' => 'header_ads_section', 'type' => 'button', 'url' => esc_url('https://tsteki.com/bansta-wordpress-theme/'), 'active_callback' => fn() => get_theme_mod( 'bansta_header_part' ) === 'style-2' && get_theme_mod( 'bansta_logo_align' ) === 'default' || get_theme_mod( 'bansta_header_part' ) === 'style-3' && get_theme_mod( 'bansta_logo_align' ) === 'default' ])); $wp_customize->add_setting( 'show_ad_after_header', [ 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'bansta_sanitize_checkbox' ]); $wp_customize->add_control( new Ts_Button_Control( $wp_customize,'show_ad_after_header', [ 'label' => __( 'Upgrade to Pro', 'bansta' ), 'setting' => 'show_ad_after_header', 'section' => 'header_ads_section', 'type' => 'button', 'description' => esc_html__('Ad after header', 'bansta'), 'url' => esc_url('https://tsteki.com/bansta-wordpress-theme/'), ])); $wp_customize->add_setting( 'show_ad_code_before_footer', [ 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'bansta_sanitize_checkbox' ]); $wp_customize->add_control( new Ts_Button_Control( $wp_customize, 'show_ad_code_before_footer', [ 'description' => __( 'Ad before footer', 'bansta' ), 'label' => __( 'Upgrade to Pro', 'bansta' ), 'setting' => 'show_ad_code_before_footer', 'section' => 'bansta_footer_section', 'type' => 'button', 'url' => esc_url('https://tsteki.com/bansta-wordpress-theme/'), ])); $wp_customize->add_setting( 'show_ad_code_before_content', [ 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'bansta_sanitize_checkbox' ]); $wp_customize->add_control( new Ts_Button_Control( $wp_customize, 'show_ad_code_before_content', [ 'description' => __( 'Show Ads before content', 'bansta' ), 'label' => __( 'Upgrade to Pro', 'bansta' ), 'setting' => 'show_ad_code_before_content', 'section' => 'bansta_section_single_post', 'type' => 'button', 'url' => esc_url('https://tsteki.com/bansta-wordpress-theme/'), ])); $wp_customize->add_setting( 'show_ad_code_after_paragraph', [ 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'bansta_sanitize_checkbox' ]); $wp_customize->add_control( new Ts_Button_Control( $wp_customize, 'show_ad_code_after_paragraph', [ 'description' => __( 'Show ads on paragraph', 'bansta' ), 'label' => __( 'Upgrade to Pro', 'bansta' ), 'setting' => 'show_ad_code_after_paragraph', 'section' => 'bansta_section_single_post', 'type' => 'button', 'url' => esc_url('https://tsteki.com/bansta-wordpress-theme/'), ])); $wp_customize->add_setting( 'show_ad_code_after_content', [ 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'bansta_sanitize_checkbox' ]); $wp_customize->add_control( new Ts_Button_Control( $wp_customize, 'show_ad_code_after_content', [ 'description' => __( 'Show ads after content', 'bansta' ), 'label' => __( 'Upgrade to Pro', 'bansta' ), 'setting' => 'show_ad_code_after_content', 'section' => 'bansta_section_single_post', 'type' => 'button', 'url' => esc_url('https://tsteki.com/bansta-wordpress-theme/'), ])); //Post loop $wp_customize->add_setting( 'show_ad_code_on_loop', [ 'capability' => 'edit_theme_options', 'type' => 'theme_mod', 'sanitize_callback' => 'bansta_sanitize_checkbox' ]); $wp_customize->add_control( new Ts_Button_Control( $wp_customize, 'show_ad_code_on_loop', [ 'description' => __( 'Show Loop Ad', 'bansta' ), 'label' => __( 'Upgrade to Pro', 'bansta' ), 'setting' => 'show_ad_code_on_loop', 'section' => 'bansta_section_frontpage', 'type' => 'button', 'url' => esc_url('https://tsteki.com/bansta-wordpress-theme/'), ]));