Changeset 59127 for trunk/src/wp-includes/l10n.php
- Timestamp:
- 09/30/2024 03:28:26 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/l10n.php
r59126 r59127 1000 1000 } 1001 1001 1002 if ( ! doing_action( 'after_setup_theme' ) && ! did_action( 'after_setup_theme' ) ) { 1003 _doing_it_wrong( 1004 __FUNCTION__, 1005 sprintf( 1006 /* translators: 1: The text domain. 2: 'after_setup_theme'. */ 1007 __( 'Attempted to load translations for the %1$s domain too early. Translations should be loaded after the %2$s action has fired, to ensure that the current user is already set up.' ), 1008 '<code>' . $domain . '</code>', 1009 '<code>after_setup_theme</code>' 1010 ), 1011 '6.7.0' 1012 ); 1013 } 1014 1002 1015 /** 1003 1016 * Filters a plugin's locale. … … 1052 1065 } 1053 1066 1067 if ( ! doing_action( 'after_setup_theme' ) && ! did_action( 'after_setup_theme' ) ) { 1068 _doing_it_wrong( 1069 __FUNCTION__, 1070 sprintf( 1071 /* translators: 1: The text domain. 2: 'after_setup_theme'. */ 1072 __( 'Attempted to load translations for the %1$s domain too early. Translations should be loaded after the %2$s action has fired, to ensure that the current user is already set up.' ), 1073 '<code>' . $domain . '</code>', 1074 '<code>after_setup_theme</code>' 1075 ), 1076 '6.7.0' 1077 ); 1078 } 1079 1054 1080 /** This filter is documented in wp-includes/l10n.php */ 1055 1081 $locale = apply_filters( 'plugin_locale', determine_locale(), $domain ); … … 1093 1119 if ( ! is_string( $domain ) ) { 1094 1120 return false; 1121 } 1122 1123 if ( ! doing_action( 'after_setup_theme' ) && ! did_action( 'after_setup_theme' ) ) { 1124 _doing_it_wrong( 1125 __FUNCTION__, 1126 sprintf( 1127 /* translators: 1: The text domain. 2: 'after_setup_theme'. */ 1128 __( 'Attempted to load translations for the %1$s domain too early. Translations should be loaded after the %2$s action has fired, to ensure that the current user is already set up.' ), 1129 '<code>' . $domain . '</code>', 1130 '<code>after_setup_theme</code>' 1131 ), 1132 '6.7.0' 1133 ); 1095 1134 } 1096 1135 … … 1382 1421 return false; 1383 1422 } 1423 1424 if ( ! doing_action( 'after_setup_theme' ) && ! did_action( 'after_setup_theme' ) ) { 1425 _doing_it_wrong( 1426 __FUNCTION__, 1427 sprintf( 1428 /* translators: %s: The text domain. */ 1429 __( 'Translation loading for the %s domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early.' ), 1430 '<code>' . $domain . '</code>' 1431 ), 1432 '6.7.0' 1433 ); 1434 } 1435 1384 1436 // Themes with their language directory outside of WP_LANG_DIR have a different file name. 1385 1437 $template_directory = trailingslashit( get_template_directory() );
Note: See TracChangeset
for help on using the changeset viewer.