get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $our_client_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-clients' ); if ( ! empty( $our_client_section ) ) { $our_client_section->panel = 'theme_options'; $our_client_section->title = __( 'client section', 'promote' ); $our_client_section->priority = 9; } $our_service_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-service' ); if ( ! empty( $our_service_section ) ) { $our_service_section->panel = 'theme_options'; $our_service_section->title = __( 'Service section', 'promote' ); $our_service_section->priority = 3; } $counter_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-counter' ); if ( ! empty( $counter_section ) ) { $counter_section->panel = 'theme_options'; $counter_section->title = __( 'Counter section', 'promote' ); $counter_section->priority = 7; } $team_section = $wp_customize->get_section( 'sidebar-widgets-sidebar-team' ); if ( ! empty( $counter_section ) ) { $team_section->panel = 'theme_options'; $team_section->title = __( 'Team section', 'promote' ); $team_section->priority = 6; } $background_color_control = $wp_customize->get_control( 'background_color' ); if ( $background_color_control ) { $background_color_control->section = 'lapromotet_front_page'; } $background_color_control = $wp_customize->get_control( 'header_image' ); if ( $background_color_control ) { $background_color_control->section = 'promote_headtitle_settings'; } } add_action( 'customize_register', 'promote_customize_register' ); function promote_registers() { wp_enqueue_style( 'promote_customizer_style', get_template_directory_uri() . '/css/admin.css','promote-style', true ); } add_action( 'customize_controls_enqueue_scripts', 'promote_registers' ); /** * promote Customizer functionality */ /* Register Customizer options /* ------------------------------------ */ if ( ! function_exists( 'promote_customize_register_pro' ) ) { function promote_customize_register_pro( $wp_customize ) { // Register custom sections $wp_customize->register_section_type( 'promote_Section_Link' ); /** * Custom link/button section. */ if( ! class_exists( 'promote_Section_Link' ) ) { class promote_Section_Link extends WP_Customize_Section { /** * The type of customize section being rendered. */ public $type = 'link-button'; /** * Custom button text to output. */ public $link_text = ''; /** * Custom pro button URL. */ public $link_url = ''; /** * Add custom parameters to pass to the JS via JSON. */ public function json() { $json = parent::json(); $json['link_text'] = $this->link_text; $json['link_url'] = esc_url( $this->link_url ); return $json; } /** * Outputs the Underscore.js template. */ protected function render_template() { ?>