get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->add_section( 'default_post_image' , array( 'title' => __('Default Post Image','all-purpose'), 'priority' => 30, ) ); $wp_customize->add_setting( 'no_post_img', array( 'default' => 'default', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'all_purpose_sanitize_no_img', ) ); $wp_customize->add_control( 'no_post_img', array( 'settings' => 'no_post_img', 'priority' => 1, 'label' => __( 'Activate Default Image:', 'all-purpose' ), 'section' => 'default_post_image', 'type' => 'select', 'choices' => array( 'hide' => __( 'Hide Default Post Image', 'all-purpose' ), 'default' => __( 'Activate Default Post Image', 'all-purpose' ), ), 'default' => 'default' ) ); $wp_customize->add_setting( 'no_cube_animation', array( 'default' => 'default', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'all_purpose_sanitize_no_animation', ) ); $wp_customize->add_control( 'no_cube_animation', array( 'settings' => 'no_cube_animation', 'priority' => 1, 'label' => __( 'Deactivate Cube Animation:', 'all-purpose' ), 'section' => 'default_post_image', 'type' => 'select', 'choices' => array( 'hide' => __( 'Deactivate', 'all-purpose' ), 'default' => __( 'Activate', 'all-purpose' ), ), 'default' => 'default' ) ); } add_action( 'customize_register', 'all_purpose_customize_register' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function all_purpose_customize_preview_js() { wp_enqueue_script( 'all_purpose_customizer', esc_url(get_template_directory_uri()) . '/framework/js/customizer.js', array( 'customize-preview' ), '20151215', true ); } add_action( 'customize_preview_init', 'all_purpose_customize_preview_js' ); function all_purpose_sanitize_no_img( $input ) { $valid = array( 'hide' => __( 'Hide Default Post Image', 'all-purpose' ), 'default' => __( 'Activate Default Post Image', 'all-purpose' ), ); if ( array_key_exists( $input, $valid ) ) { return $input; } else { return ''; } } function all_purpose_sanitize_no_animation( $input ) { $valid = array( 'hide' => __( 'Deactivate', 'all-purpose' ), 'default' => __( 'Activate', 'all-purpose' ), ); if ( array_key_exists( $input, $valid ) ) { return $input; } else { return ''; } } function all_purpose_cube_animation () { ?>


add_panel( 'all_purpose_buy_panel', array( 'title' => __('All-Purpose Pro', 'all-purpose'), 'description' => __(' Learn more about All-Purpose. ','all-purpose'), 'priority' => 3, )); /**************************** Theme Options ****************************/ $wp_customize->add_section( 'all_purpose_buy_section', array( 'title' => __('All-Purpose Pro Theme Options', 'all-purpose'), 'panel' => 'all_purpose_buy_panel', 'description' => __(' Learn more about All-Purpose. ','all-purpose'), 'priority' => 3, )); $wp_customize->add_setting( 'all_purpose_setting', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_filter_nohtml_kses', )); $wp_customize->add_control( new all_purpose_Customize( $wp_customize,'all_purpose_setting', array( 'label' => __('All-Purpose Pro Theme Options', 'all-purpose'), 'section' => 'all_purpose_buy_section', 'settings' => 'all_purpose_setting', ) ) ); /**************************** Slider ****************************/ $wp_customize->add_section( 'all_purpose_buy_section1', array( 'title' => __('Slider', 'all-purpose'), 'panel' => 'all_purpose_buy_panel', 'description' => __('Buy All-Purpose Pro - €39.99

All-Purpose Pro Demo ','all-purpose'), 'priority' => 3, )); $wp_customize->add_setting( 'all_purpose_slider', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_filter_nohtml_kses', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'all_purpose_slider', array( 'type' => 'radio', 'section' => 'all_purpose_buy_section1', 'settings' => 'all_purpose_slider', ) ) ); /**************************** Slider ****************************/ $wp_customize->add_section( 'all_purpose_buy_section2', array( 'title' => __('Custom CSS', 'all-purpose'), 'panel' => 'all_purpose_buy_panel', 'description' => __('Buy All-Purpose Pro - €39.99

All-Purpose Pro Demo ','all-purpose'), 'priority' => 3, )); $wp_customize->add_setting( 'all_purpose_panel_2', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_filter_nohtml_kses', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'all_purpose_panel_2', array( 'type' => 'radio', 'section' => 'all_purpose_buy_section2', 'settings' => 'all_purpose_panel_2', ) ) ); /**************************** Disable All Comments ****************************/ $wp_customize->add_section( 'all_purpose_buy_section3', array( 'title' => __('Disable All Comments', 'all-purpose'), 'panel' => 'all_purpose_buy_panel', 'description' => __('Buy All-Purpose Pro - €39.99

All-Purpose Pro Demo ','all-purpose'), 'priority' => 3, )); $wp_customize->add_setting( 'all_purpose_panel_3', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_filter_nohtml_kses', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'all_purpose_panel_3', array( 'type' => 'radio', 'section' => 'all_purpose_buy_section3', 'settings' => 'all_purpose_panel_3', ) ) ); /**************************** Disable Meta ****************************/ $wp_customize->add_section( 'all_purpose_buy_section4', array( 'title' => __('Disable Meta', 'all-purpose'), 'panel' => 'all_purpose_buy_panel', 'description' => __('Buy All-Purpose Pro - €39.99

All-Purpose Pro Demo ','all-purpose'), 'priority' => 3, )); $wp_customize->add_setting( 'all_purpose_panel_4', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_filter_nohtml_kses', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'all_purpose_panel_4', array( 'type' => 'radio', 'section' => 'all_purpose_buy_section4', 'settings' => 'all_purpose_panel_4', ) ) ); /**************************** Disable Titles ****************************/ $wp_customize->add_section( 'all_purpose_buy_section5', array( 'title' => __('Disable Titles', 'all-purpose'), 'panel' => 'all_purpose_buy_panel', 'description' => __('Buy All-Purpose Pro - €39.99

All-Purpose Pro Demo ','all-purpose'), 'priority' => 3, )); $wp_customize->add_setting( 'all_purpose_panel_5', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_filter_nohtml_kses', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize,'all_purpose_panel_5', array( 'type' => 'radio', 'section' => 'all_purpose_buy_section5', 'settings' => 'all_purpose_panel_5', ) ) ); } endif; add_action('customize_register', 'all_purpose_buy'); function all_purpose_customize_support( $input ) { ?>