関数 load_muplugin_textdomain()
2015/01/11
関数 load_muplugin_textdomain()
定義ファイル :/blog/wp-includes/l10n.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { /** This filter is documented in wp-includes/l10n.php */ $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); $path = trailingslashit( WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ) ); // Load the textdomain according to the plugin first $mofile = $domain . '-' . $locale . '.mo'; if ( $loaded = load_textdomain( $domain, $path . $mofile ) ) return $loaded; // Otherwise, load from the languages directory $mofile = WP_LANG_DIR . '/plugins/' . $mofile; return load_textdomain( $domain, $mofile ); } |