* so that JavaScript can update the settings to refer to the newly-assigned
* term ID. This value is always negative to indicate it does not refer to
* a real term.
* so that JavaScript can update the settings to refer to the newly-assigned
* term ID. This value is always negative to indicate it does not refer to
* a real term.
- * When status is inserted, the placeholder term ID is stored in $previous_term_id.
- * When status is error, the error is stored in $update_error.
+ * See {@see 'customize_save_response'}.
+ *
+ * When status is inserted, the placeholder term ID is stored in `$previous_term_id`.
+ * When status is error, the error is stored in `$update_error`.
* Create/update the nav_menu term for this setting.
*
* Any created menus will have their assigned term IDs exported to the client
* Create/update the nav_menu term for this setting.
*
* Any created menus will have their assigned term IDs exported to the client
* to the client via the customize_save_response() filter.
*
* To delete a menu, the client can send false as the value.
* to the client via the customize_save_response() filter.
*
* To delete a menu, the client can send false as the value.
$original_name = $menu_data['menu-name'];
$name_conflict_suffix = 1;
while ( is_wp_error( $r ) && 'menu_exists' === $r->get_error_code() ) {
$name_conflict_suffix += 1;
/* translators: 1: original menu name, 2: duplicate count */
$menu_data['menu-name'] = sprintf( __( '%1$s (%2$d)' ), $original_name, $name_conflict_suffix );
$original_name = $menu_data['menu-name'];
$name_conflict_suffix = 1;
while ( is_wp_error( $r ) && 'menu_exists' === $r->get_error_code() ) {
$name_conflict_suffix += 1;
/* translators: 1: original menu name, 2: duplicate count */
$menu_data['menu-name'] = sprintf( __( '%1$s (%2$d)' ), $original_name, $name_conflict_suffix );