-
-
Save anteprimorac/3552dc410e6fdd8b0ee7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function slicejack_customize_register( $wp_customize ) { | |
/* ... */ | |
/* ------- Layouts ------- */ | |
$wp_customize->add_section( 'layouts', array( | |
'title' => __( 'Layouts', 'sj' ), | |
'priority' => 40 | |
) ); | |
$wp_customize->add_setting( 'sj_global_layout', array( | |
'default' => 'left', | |
'transport' => 'postMessage' | |
) ); | |
$wp_customize->add_control( new sj_Layout_Control( $wp_customize, 'sj_global_layout', array( | |
'label' => __( 'Global', 'sj' ), | |
'section' => 'layouts', | |
'layouts' => array( | |
'none' => array( | |
'label' => __( 'None', 'sj' ) | |
), | |
'left' => array( | |
'label' => __( 'Left', 'sj' ) | |
), | |
'right' => array( | |
'label' => __( 'Right', 'sj' ) | |
) | |
), | |
'priority' => 1 | |
) ) ); | |
/* ... */ | |
} | |
add_action( 'customize_register', 'slicejack_customize_register' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment