get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; // Rename the label to "Display Site Title & Tagline" in order to make this option clearer. $wp_customize->get_control( 'display_header_text' )->label = esc_html__( 'Display Site Title & Tagline', 'hive-lite' ); // View Pro $wp_customize->add_section( 'pro__section', array( 'title' => '' . esc_html__( 'View PRO Version', 'hive-lite' ), 'priority' => 2, 'description' => sprintf( /* translators: %s: The view pro link. */ __( '

Need More? Go PRO

Take it to the next level. See the features below:

%s
', 'hive-lite' ), /* translators: %1$s: The view pro URL, %2$s: The view pro link text. */ sprintf( '%2$s', esc_url( hivelite_get_pro_link() ), esc_html__( 'View Hive PRO', 'hive-lite' ) ) ), ) ); $wp_customize->add_setting( 'hivelite_style_view_pro_desc', array( 'default' => '', 'sanitize_callback' => '__return_true', ) ); $wp_customize->add_control( 'hivelite_style_view_pro_desc', array( 'section' => 'pro__section', 'type' => 'hidden', ) ); } add_action( 'customize_register', 'hivelite_customize_register', 15 ); /** * Assets that will be loaded for the customizer sidebar */ function hivelite_customizer_assets() { wp_enqueue_style( 'hivelite_customizer_style', get_template_directory_uri() . '/inc/admin/css/customizer.css', null, '1.1.3', false ); } add_action( 'customize_controls_enqueue_scripts', 'hivelite_customizer_assets' ); /** * JavaScript that handles the Customizer AJAX logic * This will be added in the preview part */ function hivelite_customizer_preview_assets() { wp_enqueue_script( 'hivelite_customizer_preview', get_template_directory_uri() . '/assets/js/customizer-preview.js', array( 'customize-preview' ), '1.1.3', true ); } add_action( 'customize_preview_init', 'hivelite_customizer_preview_assets' ); /** * Generate a link to the Hive Lite info page. */ function hivelite_get_pro_link() { return 'https://pixelgrade.com/themes/blogging/hive-lite?utm_source=hive-lite-clients&utm_medium=customizer&utm_campaign=hive-lite#pro'; }