Skip to content

Commit

Permalink
adicionados atalhos no customizer para edição das seções novas: yours…
Browse files Browse the repository at this point in the history
…lider e featuredpage
  • Loading branch information
diegorojas committed Feb 1, 2017
1 parent 2cb3c71 commit 4e69363
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions inc/customizer-selective-refresh.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function onepress_customizer_partials( $wp_customize ) {

$selective_refresh_keys = array(

// section features
// section hero
array(
'id' => 'hero',
'selector' => '.hero-slideshow-wrapper',
Expand All @@ -77,7 +77,6 @@ function onepress_customizer_partials( $wp_customize ) {
),
),


// section features
array(
'id' => 'features',
Expand All @@ -91,6 +90,25 @@ function onepress_customizer_partials( $wp_customize ) {
),
),

// section yourslider
array(
'id' => 'yourslider',
'selector' => '.section-yourslider',
'settings' => array(
'onepress_yourslider_shortcode',
),
),

// section featuredpage
array(
'id' => 'featuredpage',
'selector' => '.section-featuredpage',
'settings' => array(
'onepress_featuredpage_content',
'onepress_featuredpage_content_source',
),
),

// section services
array(
'id' => 'services',
Expand Down Expand Up @@ -190,10 +208,24 @@ function onepress_customizer_partials( $wp_customize ) {
// Footer social icons
$wp_customize->selective_refresh->add_partial( 'onepress_social_profiles', array(
'selector' => '.footer-social .footer-social-icons',
'settings' => array( 'onepress_social_profiles' ),
'settings' => array( 'onepress_social_profiles', ),
'render_callback' => 'onepress_get_social_profiles',
) );

// Footer social heading
$wp_customize->selective_refresh->add_partial( 'onepress_social_footer_title', array(
'selector' => '',
'settings' => array( 'onepress_social_footer_title' ),
'render_callback' => 'onepress_selective_refresh_social_footer_title',
) );

// Featured Page Content
$wp_customize->selective_refresh->add_partial( 'onepress_featuredpage_content', array(
'selector' => '',
'settings' => array( 'onepress_featuredpage_content', 'onepress_featuredpage_content_source' ),
'render_callback' => 'onepress_selective_refresh_featuredpage_content',
) );


}
add_action( 'customize_register', 'onepress_customizer_partials', 50 );
Expand Down

0 comments on commit 4e69363

Please sign in to comment.