ok. This is what i could see in the customizer.php as you have pointed out. I concern is that as i am using it in wordpress plugin for my widget area, how do i use this function then to execute dropdown page list for selection
/**
* Filter number of front page sections in Twenty Seventeen.
*
* @since Twenty Seventeen 1.0
*
* @param int $num_sections Number of front page sections.
*/
$num_sections = apply_filters( ‘twentyseventeen_front_page_sections’, 4 );
// Create a setting and control for each of the sections available in the theme.
for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
$wp_customize->add_setting(
‘panel_’ . $i,
array(
‘default’ => false,
‘sanitize_callback’ => ‘absint’,
‘transport’ => ‘postMessage’,
)
);
$wp_customize->add_control(
‘panel_’ . $i,
array(
/* translators: %d: The front page section number. */
‘label’ => sprintf( __( ‘Front Page Section %d Content’, ‘twentyseventeen’ ), $i ),
‘description’ => ( 1 !== $i ? ” : __( ‘Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.’, ‘twentyseventeen’ ) ),
‘section’ => ‘theme_options’,
‘type’ => ‘dropdown-pages’,
‘allow_addition’ => true,
‘active_callback’ => ‘twentyseventeen_is_static_front_page’,
)
);
$wp_customize->selective_refresh->add_partial(
‘panel_’ . $i,
array(
‘selector’ => ‘#panel’ . $i,
‘render_callback’ => ‘twentyseventeen_front_page_section’,
‘container_inclusive’ => true,
)
);
}
}
add_action( ‘customize_register’, ‘twentyseventeen_customize_register’ );