1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2025-04-19 05:35:36 +03:00

Use plugin-name directly instead of passing a variable through

This should fix the incorrect pattern of using a variable where we
should be using the plugin-name instead. Same goes for any translatable
strings within the plugin (no more using $this->plugin-name etc).
This commit is contained in:
Devin Vinson 2015-12-05 20:46:30 -05:00
parent 5391e0ca27
commit 0c099e4208
2 changed files with 2 additions and 19 deletions

View file

@ -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;
}
}