1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2024-12-22 20:03:53 +02:00

Moved load_plugin_textdomain()

This commit is contained in:
Pippin Williamson 2012-11-05 21:07:10 -06:00
parent a74004d26c
commit 696d133f36

View file

@ -38,8 +38,8 @@ class PluginName {
*/
function __construct() {
// TODO: replace "plugin-name-locale" with a unique value for your plugin
load_plugin_textdomain( 'plugin-name-locale', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
// load plugin text domain
add_action( 'init', array( $this, 'textdomain' ) );
// Register admin styles and scripts
add_action( 'admin_print_styles', array( $this, 'register_admin_styles' ) );
@ -86,6 +86,14 @@ class PluginName {
// TODO define deactivation functionality here
} // end deactivate
/**
* Loads the plugin text domain for translation
*/
public function textdomain() {
// TODO: replace "plugin-name-locale" with a unique value for your plugin
load_plugin_textdomain( 'plugin-name-locale', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
}
/**
* Registers and enqueues admin-specific styles.
*/