wordpress/wp-content/themes/basic/themify/customizer/class-themify-customizer.php
/**
		 * Add the control to render a navigation menu selector
		 *
		 * @param object $wp_customize Customizer instance.
		 * @param string $menu_location Location to add menu to.
		 * @param array $args Extra arguments to setup the control.
		 */
Add the control to render a navigation menu selector
@param object $wp_customize Customizer instance.
@param string $menu_location Location to add menu to.
@param array $args Extra arguments to setup the control.
Add the control to render a navigation menu selector @param object $wp_customize Customizer instance . @param string $menu_location Location to add menu to . @param array $args Extra arguments to setup the control .
function add_nav_menu_control($wp_customize, $menu_location = '', $args = array()) {
			$locations = get_registered_nav_menus();
			$menus = wp_get_nav_menus();
			if ($menus) {
				$choices = array(0 => __('&mdash; Select &mdash;', 'themify'));
				foreach ($menus as $menu) {
					$choices[$menu->term_id] = wp_html_excerpt($menu->name, 40, '&hellip;');
				}
				foreach ($locations as $location => $description) {
					if ($location == $menu_location) {
						$menu_setting_id = "nav_menu_locations[{$location}]";
						$wp_customize->add_setting($menu_setting_id, array(
							'sanitize_callback' => 'absint',
							'theme_supports' => 'menus',
						));
						$wp_customize->add_control($menu_setting_id, array(
							'label' => $description,
							'section' => 'themify_options',
							'type' => 'select',
							'choices' => $choices,
							'priority' => $args['priority'],
						));
						break;
					}
				}
			}
		}
function add_nav_menu_control ( $ wp_customize , $ menu_location = '' , $ args = array ( ) ) { $ locations = get_registered_nav_menus ( ) ; $ menus = wp_get_nav_menus ( ) ; if ( $ menus ) { $ choices = array ( 0 => __ ( '&mdash; Select &mdash;' , 'themify' ) ) ; foreach ( $ menus as $ menu ) { $ choices [ $ menu -> term_id ] = wp_html_excerpt ( $ menu -> name , 40 , '&hellip;' ) ; } foreach ( $ locations as $ location => $ description ) { if ( $ location == $ menu_location ) { $ menu_setting_id = " nav_menu_locations[ { $ location } ] " ; $ wp_customize -> add_setting ( $ menu_setting_id , array ( 'sanitize_callback' => 'absint' , 'theme_supports' => 'menus' , ) ) ; $ wp_customize -> add_control ( $ menu_setting_id , array ( 'label' => $ description , 'section' => 'themify_options' , 'type' => 'select' , 'choices' => $ choices , 'priority' => $ args [ 'priority' ] , ) ) ; break ; } } } }
Add the control to render a navigation menu selector
 @param object $wp_customize Customizer instance.
Add the control to render a navigation menu selector @param object $wp_customize Customizer instance .