wp/wp-includes/customize/class-wp-customize-nav-menu-item-control.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 19 3d72ae0968f4
--- a/wp/wp-includes/customize/class-wp-customize-nav-menu-item-control.php	Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-includes/customize/class-wp-customize-nav-menu-item-control.php	Tue Dec 15 13:49:49 2020 +0100
@@ -41,7 +41,9 @@
 	 *
 	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
 	 * @param string               $id      The control ID.
-	 * @param array                $args    Optional. Overrides class property defaults.
+	 * @param array                $args    Optional. Arguments to override class property defaults.
+	 *                                      See WP_Customize_Control::__construct() for information
+	 *                                      on accepted arguments. Default empty array.
 	 */
 	public function __construct( $manager, $id, $args = array() ) {
 		parent::__construct( $manager, $id, $args );
@@ -71,13 +73,13 @@
 				<span class="item-controls">
 					<button type="button" class="button-link item-edit" aria-expanded="false"><span class="screen-reader-text">
 					<?php
-						/* translators: 1: Title of a menu item, 2: Type of a menu item */
+						/* translators: 1: Title of a menu item, 2: Type of a menu item. */
 						printf( __( 'Edit menu item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
 					?>
 					</span><span class="toggle-indicator" aria-hidden="true"></span></button>
 					<button type="button" class="button-link item-delete submitdelete deletion"><span class="screen-reader-text">
 					<?php
-						/* translators: 1: Title of a menu item, 2: Type of a menu item */
+						/* translators: 1: Title of a menu item, 2: Type of a menu item. */
 						printf( __( 'Remove Menu Item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
 					?>
 					</span></button>
@@ -132,11 +134,22 @@
 				</label>
 			</p>
 
+			<?php
+			/**
+			 * Fires at the end of the form field template for nav menu items in the customizer.
+			 *
+			 * Additional fields can be rendered here and managed in JavaScript.
+			 *
+			 * @since 5.4.0
+			 */
+			do_action( 'wp_nav_menu_item_custom_fields_customize_template' );
+			?>
+
 			<div class="menu-item-actions description-thin submitbox">
 				<# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #>
 				<p class="link-to-original">
 					<?php
-						/* translators: Nav menu item original title. %s: Original title */
+						/* translators: Nav menu item original title. %s: Original title. */
 						printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' );
 					?>
 				</p>