Ticket #23794: 23794.patch
File 23794.patch, 1.6 KB (added by , 11 years ago) |
---|
-
wp-includes/l10n.php
409 409 * @since 1.5.0 410 410 * 411 411 * @param string $domain Unique identifier for retrieving translated strings 412 * @param string $ abs_rel_path Optional. Relative path to ABSPATH of a folder,413 * where the .mo file resides. Deprecated, but still functional until 2.7414 * @ param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR. This is the preferred argument to use. It takes precedence over $abs_rel_path412 * @param string $deprecated Deprecated. 413 * @param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR. 414 * @return bool True on success, false on failure 415 415 */ 416 function load_plugin_textdomain( $domain, $ abs_rel_path= false, $plugin_rel_path = false ) {416 function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path = false ) { 417 417 $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); 418 418 419 419 if ( false !== $plugin_rel_path ) { 420 420 $path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' ); 421 } else if ( false !== $ abs_rel_path) {421 } else if ( false !== $deprecated ) { 422 422 _deprecated_argument( __FUNCTION__, '2.7' ); 423 $path = ABSPATH . trim( $ abs_rel_path, '/' );423 $path = ABSPATH . trim( $deprecated, '/' ); 424 424 } else { 425 425 $path = WP_PLUGIN_DIR; 426 426 } 427 427 428 if ( !is_readable( $path ) ) 429 $path = WPMU_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' ); 430 428 431 $mofile = $path . '/'. $domain . '-' . $locale . '.mo'; 429 432 return load_textdomain( $domain, $mofile ); 430 433 }