wp/wp-includes/widgets/class-wp-nav-menu-widget.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 21 48c4eec2b7e6
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
    23 	 */
    23 	 */
    24 	public function __construct() {
    24 	public function __construct() {
    25 		$widget_ops = array(
    25 		$widget_ops = array(
    26 			'description'                 => __( 'Add a navigation menu to your sidebar.' ),
    26 			'description'                 => __( 'Add a navigation menu to your sidebar.' ),
    27 			'customize_selective_refresh' => true,
    27 			'customize_selective_refresh' => true,
       
    28 			'show_instance_in_rest'       => true,
    28 		);
    29 		);
    29 		parent::__construct( 'nav_menu', __( 'Navigation Menu' ), $widget_ops );
    30 		parent::__construct( 'nav_menu', __( 'Navigation Menu' ), $widget_ops );
    30 	}
    31 	}
    31 
    32 
    32 	/**
    33 	/**
   175 			?>
   176 			?>
   176 		</p>
   177 		</p>
   177 		<div class="nav-menu-widget-form-controls" <?php echo $empty_menus_style; ?>>
   178 		<div class="nav-menu-widget-form-controls" <?php echo $empty_menus_style; ?>>
   178 			<p>
   179 			<p>
   179 				<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
   180 				<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
   180 				<input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>"/>
   181 				<input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>" />
   181 			</p>
   182 			</p>
   182 			<p>
   183 			<p>
   183 				<label for="<?php echo $this->get_field_id( 'nav_menu' ); ?>"><?php _e( 'Select Menu:' ); ?></label>
   184 				<label for="<?php echo $this->get_field_id( 'nav_menu' ); ?>"><?php _e( 'Select Menu:' ); ?></label>
   184 				<select id="<?php echo $this->get_field_id( 'nav_menu' ); ?>" name="<?php echo $this->get_field_name( 'nav_menu' ); ?>">
   185 				<select id="<?php echo $this->get_field_id( 'nav_menu' ); ?>" name="<?php echo $this->get_field_name( 'nav_menu' ); ?>">
   185 					<option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>
   186 					<option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>