39 * |
39 * |
40 * @see WP_Customize_Control::__construct() |
40 * @see WP_Customize_Control::__construct() |
41 * |
41 * |
42 * @param WP_Customize_Manager $manager Customizer bootstrap instance. |
42 * @param WP_Customize_Manager $manager Customizer bootstrap instance. |
43 * @param string $id The control ID. |
43 * @param string $id The control ID. |
44 * @param array $args Optional. Overrides class property defaults. |
44 * @param array $args Optional. Arguments to override class property defaults. |
|
45 * See WP_Customize_Control::__construct() for information |
|
46 * on accepted arguments. Default empty array. |
45 */ |
47 */ |
46 public function __construct( $manager, $id, $args = array() ) { |
48 public function __construct( $manager, $id, $args = array() ) { |
47 parent::__construct( $manager, $id, $args ); |
49 parent::__construct( $manager, $id, $args ); |
48 } |
50 } |
49 |
51 |
69 <span class="menu-item-title<# if ( ! data.title && ! data.original_title ) { #> no-title<# } #>">{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}</span> |
71 <span class="menu-item-title<# if ( ! data.title && ! data.original_title ) { #> no-title<# } #>">{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}</span> |
70 </span> |
72 </span> |
71 <span class="item-controls"> |
73 <span class="item-controls"> |
72 <button type="button" class="button-link item-edit" aria-expanded="false"><span class="screen-reader-text"> |
74 <button type="button" class="button-link item-edit" aria-expanded="false"><span class="screen-reader-text"> |
73 <?php |
75 <?php |
74 /* translators: 1: Title of a menu item, 2: Type of a menu item */ |
76 /* translators: 1: Title of a menu item, 2: Type of a menu item. */ |
75 printf( __( 'Edit menu item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' ); |
77 printf( __( 'Edit menu item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' ); |
76 ?> |
78 ?> |
77 </span><span class="toggle-indicator" aria-hidden="true"></span></button> |
79 </span><span class="toggle-indicator" aria-hidden="true"></span></button> |
78 <button type="button" class="button-link item-delete submitdelete deletion"><span class="screen-reader-text"> |
80 <button type="button" class="button-link item-delete submitdelete deletion"><span class="screen-reader-text"> |
79 <?php |
81 <?php |
80 /* translators: 1: Title of a menu item, 2: Type of a menu item */ |
82 /* translators: 1: Title of a menu item, 2: Type of a menu item. */ |
81 printf( __( 'Remove Menu Item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' ); |
83 printf( __( 'Remove Menu Item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' ); |
82 ?> |
84 ?> |
83 </span></button> |
85 </span></button> |
84 </span> |
86 </span> |
85 </div> |
87 </div> |
130 <textarea id="edit-menu-item-description-{{ data.menu_item_id }}" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description">{{ data.description }}</textarea> |
132 <textarea id="edit-menu-item-description-{{ data.menu_item_id }}" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description">{{ data.description }}</textarea> |
131 <span class="description"><?php _e( 'The description will be displayed in the menu if the current theme supports it.' ); ?></span> |
133 <span class="description"><?php _e( 'The description will be displayed in the menu if the current theme supports it.' ); ?></span> |
132 </label> |
134 </label> |
133 </p> |
135 </p> |
134 |
136 |
|
137 <?php |
|
138 /** |
|
139 * Fires at the end of the form field template for nav menu items in the customizer. |
|
140 * |
|
141 * Additional fields can be rendered here and managed in JavaScript. |
|
142 * |
|
143 * @since 5.4.0 |
|
144 */ |
|
145 do_action( 'wp_nav_menu_item_custom_fields_customize_template' ); |
|
146 ?> |
|
147 |
135 <div class="menu-item-actions description-thin submitbox"> |
148 <div class="menu-item-actions description-thin submitbox"> |
136 <# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #> |
149 <# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #> |
137 <p class="link-to-original"> |
150 <p class="link-to-original"> |
138 <?php |
151 <?php |
139 /* translators: Nav menu item original title. %s: Original title */ |
152 /* translators: Nav menu item original title. %s: Original title. */ |
140 printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' ); |
153 printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' ); |
141 ?> |
154 ?> |
142 </p> |
155 </p> |
143 <# } #> |
156 <# } #> |
144 |
157 |