From c00a29a3fb50254fdeabfda18275f43ce5ddb91b Mon Sep 17 00:00:00 2001 From: Kaiser Franz Josef Date: Wed, 30 Jan 2013 14:17:54 +0100 Subject: [PATCH] load translation textdomain and file --- bootstrap.class.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bootstrap.class.php b/bootstrap.class.php index 54b5ce3..e836b4a 100644 --- a/bootstrap.class.php +++ b/bootstrap.class.php @@ -4,7 +4,7 @@ * Plugin Name: (WCM) Filterama * Plugin URI: http://example.com * Description: Adds one taxonomy filter/drop-down/select box for each taxonomy attached to a (custom) post types list in the admin post list page. - * Version: 0.3.5 + * Version: 0.4 * Author: Franz Josef Kaiser * Author URI: http://example.com * Contributors: userabuser, kai-ser @@ -28,12 +28,21 @@ static function init() public function __construct() { - add_action( 'load-edit.php', array( $this, 'load' ), 0 ); + add_action( 'load-edit.php', array( $this, 'load_files' ), 0 ); + add_action( 'load-edit.php', array( $this, 'load_l18n' ), 0 ); } - public function load() + public function load_files() { foreach ( glob( plugin_dir_path( __FILE__ ).'inc/*.php' ) as $file ) require_once $file; } + + public function l18n() + { + load_theme_textdomain( + 'filterama' + ,plugin_dir_path( __FILE__ ).'/lang' + ); + } } \ No newline at end of file