Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Add page selector to the customizer.
- *
- * @since Theme 1.0.0
- *
- * @param WP_Customize_Manager $wp_customize Customizer object.
- */
- function prefix_customize_register( $wp_customize ) {
- $wp_customize->add_section( 'showcase' , array(
- 'title' => __( 'Showcase', 'textdomain' ),
- 'priority' => 30,
- ) );
- for ( $count = 1; $count <= 4; $count++ ) {
- // Add color scheme setting and control.
- $wp_customize->add_setting( 'showcase-page-' . $count, array(
- 'default' => '',
- 'sanitize_callback' => 'absint'
- ) );
- $wp_customize->add_control( 'showcase-page-' . $count, array(
- 'label' => __( 'Select Page', 'textdomain' ),
- 'section' => 'showcase',
- 'type' => 'dropdown-pages'
- ) );
- }
- }
- add_action( 'customize_register', 'prefix_customize_register' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement