Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
function theme_slug_customize_register( $wp_customize ) {
$wp_customize->add_section( 'sample_section',
array(
'title' => 'Sample Section',
'panel' => 'nav_menus',
)
);
$wp_customize->add_setting( 'sample_menu_option_one',
array(
'capability' => 'edit_theme_options',
'priority' => 1,
)
);
$wp_customize->add_control( 'sample_menu_option_one',
array(
'label' => 'Menu Option One',
'section' => 'sample_section',
)
);
add_action( 'customize_register', 'theme_slug_customize_register' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment