Changeset 44169 for trunk/src/wp-includes/functions.wp-scripts.php
- Timestamp:
- 12/14/2018 05:51:31 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43825,43828,43859,43898
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/functions.wp-scripts.php
r43661 r44169 199 199 200 200 return $wp_scripts->localize( $handle, $object_name, $l10n ); 201 } 202 203 /** 204 * Sets translated strings for a script. 205 * 206 * Works only if the script has already been added. 207 * 208 * @see WP_Scripts::set_translations() 209 * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. 210 * 211 * @since 5.0.0 212 * 213 * @param string $handle Script handle the textdomain will be attached to. 214 * @param string $domain The textdomain. 215 * @param string $path Optional. The full file path to the directory containing translation files. 216 * 217 * @return bool True if the textdomain was successfully localized, false otherwise. 218 */ 219 function wp_set_script_translations( $handle, $domain, $path = null ) { 220 global $wp_scripts; 221 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 222 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 223 return false; 224 } 225 226 return $wp_scripts->set_translations( $handle, $domain, $path ); 201 227 } 202 228
Note: See TracChangeset
for help on using the changeset viewer.