Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.