mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 03:43:54 +02:00
Merge branch 'remove-var-translation'
This commit is contained in:
commit
923fbaf0c8
2 changed files with 2 additions and 19 deletions
|
@ -26,14 +26,6 @@
|
|||
*/
|
||||
class Plugin_Name_i18n {
|
||||
|
||||
/**
|
||||
* The domain specified for this plugin.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access private
|
||||
* @var string $domain The domain identifier for this plugin.
|
||||
*/
|
||||
private $domain;
|
||||
|
||||
/**
|
||||
* Load the plugin text domain for translation.
|
||||
|
@ -43,21 +35,13 @@ class Plugin_Name_i18n {
|
|||
public function load_plugin_textdomain() {
|
||||
|
||||
load_plugin_textdomain(
|
||||
$this->domain,
|
||||
'plugin-name',
|
||||
false,
|
||||
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the domain equal to that of the specified domain.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @param string $domain The domain that represents the locale of this plugin.
|
||||
*/
|
||||
public function set_domain( $domain ) {
|
||||
$this->domain = $domain;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -135,7 +135,6 @@ class Plugin_Name {
|
|||
private function set_locale() {
|
||||
|
||||
$plugin_i18n = new Plugin_Name_i18n();
|
||||
$plugin_i18n->set_domain( $this->get_plugin_name() );
|
||||
|
||||
$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
|
||||
|
||||
|
|
Loading…
Reference in a new issue