Changeset 38961 for trunk/src/wp-includes/l10n.php
- Timestamp:
- 10/26/2016 03:35:58 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/l10n.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/l10n.php
r38955 r38961 1179 1179 return $wp_locale->is_rtl(); 1180 1180 } 1181 1182 /** 1183 * Switches the translations according to the given locale. 1184 * 1185 * @since 4.7.0 1186 * 1187 * @global WP_Locale_Switcher $wp_locale_switcher 1188 * 1189 * @param string $locale The locale. 1190 * @return bool True on success, false on failure. 1191 */ 1192 function switch_to_locale( $locale ) { 1193 /* @var WP_Locale_Switcher $wp_locale_switcher */ 1194 global $wp_locale_switcher; 1195 1196 return $wp_locale_switcher->switch_to_locale( $locale ); 1197 } 1198 1199 /** 1200 * Restores the translations according to the previous locale. 1201 * 1202 * @since 4.7.0 1203 * 1204 * @global WP_Locale_Switcher $wp_locale_switcher 1205 * 1206 * @return string|false Locale on success, false on error. 1207 */ 1208 function restore_previous_locale() { 1209 /* @var WP_Locale_Switcher $wp_locale_switcher */ 1210 global $wp_locale_switcher; 1211 1212 return $wp_locale_switcher->restore_previous_locale(); 1213 } 1214 1215 /** 1216 * Restores the translations according to the original locale. 1217 * 1218 * @since 4.7.0 1219 * 1220 * @global WP_Locale_Switcher $wp_locale_switcher 1221 * 1222 * @return string|false Locale on success, false on error. 1223 */ 1224 function restore_current_locale() { 1225 /* @var WP_Locale_Switcher $wp_locale_switcher */ 1226 global $wp_locale_switcher; 1227 1228 return $wp_locale_switcher->restore_current_locale(); 1229 } 1230 1231 /** 1232 * Whether switch_to_locale() is in effect. 1233 * 1234 * @since 4.7.0 1235 * 1236 * @global WP_Locale_Switcher $wp_locale_switcher 1237 * 1238 * @return bool True if the locale has been switched, false otherwise. 1239 */ 1240 function is_locale_switched() { 1241 /* @var WP_Locale_Switcher $wp_locale_switcher */ 1242 global $wp_locale_switcher; 1243 1244 return $wp_locale_switcher->is_switched(); 1245 }
Note: See TracChangeset
for help on using the changeset viewer.