mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Customize: Allow menu creation in locations pane
Adds a link to the menu creation workflow from the locations selector in the nav menu control. Props bpayton, westonruter, Travel_girl, melchoyce, celloexpressions. Fixes #36279. git-svn-id: https://develop.svn.wordpress.org/trunk@41899 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -50,6 +50,7 @@ class WP_Customize_Nav_Menu_Location_Control extends WP_Customize_Control {
|
||||
* Render content just like a normal select control.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @since 4.9.0 Added a button to create menus.
|
||||
*/
|
||||
public function render_content() {
|
||||
if ( empty( $this->choices ) ) {
|
||||
@@ -73,6 +74,7 @@ class WP_Customize_Nav_Menu_Location_Control extends WP_Customize_Control {
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
<button type="button" class="button-link create-menu<?php if ( $this->value() ) { echo ' hidden'; } ?>" data-location-id="<?php echo esc_attr( $this->location_id ); ?>" aria-label="<?php esc_attr_e( 'Create a menu for this location' ); ?>"><?php _e( '+ Create New Menu' ); ?></button>
|
||||
<button type="button" class="button-link edit-menu<?php if ( ! $this->value() ) { echo ' hidden'; } ?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user