From 56c30a4ce72eb5e57d9a93ece3a3be9847c0a5d6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 25 Jul 2020 15:59:01 +0000 Subject: [PATCH] I18N: Move code out of a translatable string in `WP_Customize_Manager::customize_preview_init()`. Props ramiy. Fixes #50760. git-svn-id: https://develop.svn.wordpress.org/trunk@48609 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-manager.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 4e28a48b56..325e0d9a49 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -1907,7 +1907,14 @@ final class WP_Customize_Manager { * that the user's session has expired and they need to re-authenticate. */ if ( $this->messenger_channel && ! current_user_can( 'customize' ) ) { - $this->wp_die( -1, __( 'Unauthorized. You may remove the customize_messenger_channel param to preview as frontend.' ) ); + $this->wp_die( + -1, + sprintf( + /* translators: %s: customize_messenger_channel */ + __( 'Unauthorized. You may remove the %s param to preview as frontend.' ), + 'customize_messenger_channel' + ) + ); return; } @@ -3900,7 +3907,11 @@ final class WP_Customize_Manager { /* translators: 1: Panel ID, 2: Link to 'customize_loaded_components' filter reference. */ __( 'Removing %1$s manually will cause PHP warnings. Use the %2$s filter instead.' ), $id, - 'customize_loaded_components' + sprintf( + '%2$s', + esc_url( 'https://developer.wordpress.org/reference/hooks/customize_loaded_components/' ), + 'customize_loaded_components' + ) ); _doing_it_wrong( __METHOD__, $message, '4.5.0' );