I18N: Replace hardcoded file name in a translatable string in `convert_to_screen()` with a placeholder.

Props ramiy.
Fixes #41668.

git-svn-id: https://develop.svn.wordpress.org/trunk@41906 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2017-10-18 15:45:48 +00:00
parent 1cc00439ae
commit 129c9f42da
1 changed files with 11 additions and 1 deletions

View File

@ -2067,7 +2067,17 @@ function _wp_admin_html_begin() {
*/ */
function convert_to_screen( $hook_name ) { function convert_to_screen( $hook_name ) {
if ( ! class_exists( 'WP_Screen' ) ) { if ( ! class_exists( 'WP_Screen' ) ) {
_doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3.0' ); _doing_it_wrong(
'convert_to_screen(), add_meta_box()',
sprintf(
/* translators: 1: wp-admin/includes/template.php 2: add_meta_box() 3: add_meta_boxes */
__( 'Likely direct inclusion of %1$s in order to use %2$s. This is very wrong. Hook the %2$s call into the %3$s action instead.' ),
'<code>wp-admin/includes/template.php</code>',
'<code>add_meta_box()</code>',
'<code>add_meta_boxes</code>'
),
'3.3.0'
);
return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' ); return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' );
} }