get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
// View Pro
$wp_customize->add_section( 'pro__section', array(
'title' => '' . esc_html__( 'View PRO Version', 'jason-lite' ),
'priority' => 2,
'description' => sprintf(
/* translators: %s is the whole upselling text */
__( '
Need More? Go PRO
Take it to the next level. See the features below:
-
Personalize to Match Your Style
Having different tastes and preferences might be tricky for users, but not with Jason onboard. It has an intuitive and catchy interface which allows you to change fonts, colors or layout sizes in a blink of an eye.
-
Adaptive Layouts For Your Posts
Whether your featured image is in portrait or landscape mode, Jason takes care of it by changing the post layout to provide the right fit.
-
Premium Customer Support
You will benefit by priority support from a caring and devoted team, eager to help and to spread happiness. We work hard to provide a flawless experience for those who vote us with trust and choose to be our special clients.
%s
', 'jason-lite' ),
sprintf( '%2$s', esc_url( jasonlite_get_pro_link() ), esc_html__( 'View Jason PRO', 'jason-lite' ) )
),
) );
$wp_customize->add_setting( 'jasonlite_style_view_pro_desc', array(
'default' => '',
'sanitize_callback' => '__return_true',
) );
$wp_customize->add_control( 'jasonlite_style_view_pro_desc', array(
'section' => 'pro__section',
'type' => 'hidden',
) );
}
add_action( 'customize_register', 'jasonlite_customize_register' );
/**
* Generate a link to the Jason Lite info page.
*/
function jasonlite_get_pro_link() {
return 'https://pixelgrade.com/themes/blogging/jason-lite?utm_source=jason-lite-clients&utm_medium=customizer&utm_campaign=jason-lite#pro';
}
/**
* Assets that will be loaded for the customizer sidebar
*/
function jasonlite_customizer_assets() {
wp_enqueue_style( 'jasonlite_customizer_style', get_template_directory_uri() . '/inc/admin/css/customizer.css', null, '1.1.2', false );
}
add_action( 'customize_controls_enqueue_scripts', 'jasonlite_customizer_assets' );
/**
* JavaScript that handles the Customizer AJAX logic
* This will be added in the preview part
*/
function jasonlite_customizer_preview_assets() {
wp_enqueue_script( 'jasonlite_customizer_preview', get_template_directory_uri() . '/assets/js/customizer-preview.js', array( 'customize-preview' ), '1.1.2', true );
}
add_action( 'customize_preview_init', 'jasonlite_customizer_preview_assets' );
function jasonlite_add_customify_options( $config ) {
$config['sections'] = array();
$config['panels'] = array();
return $config;
}
add_filter( 'customify_filter_fields', 'jasonlite_add_customify_options', 10, 1 );