Exemple #1
0
 /**
  * loads the polylang text domain
  * setups filters and action needed on all admin pages and on plugins page
  *
  * @since 1.2
  *
  * @param object $links_model
  */
 public function __construct(&$links_model)
 {
     parent::__construct($links_model);
     // adds a 'settings' link in the plugins table
     add_filter('plugin_action_links_' . POLYLANG_BASENAME, array(&$this, 'plugin_action_links'));
     add_action('in_plugin_update_message-' . POLYLANG_BASENAME, array(&$this, 'plugin_update_message'), 10, 2);
 }
 public function __construct(&$links_model)
 {
     parent::__construct($links_model);
     $this->active_tab = !empty($_GET['tab']) ? $_GET['tab'] : 'lang';
     PLL_Admin_Strings::init();
     // FIXME put this as late as possible
     add_action('admin_init', array(&$this, 'register_settings_modules'));
     // adds screen options and the about box in the languages admin panel
     add_action('load-settings_page_mlang', array(&$this, 'load_page'));
     // saves per-page value in screen option
     add_filter('set-screen-option', create_function('$s, $o, $v', 'return $v;'), 10, 3);
 }
Exemple #3
0
 /**
  * Constructor
  *
  * @since 1.2
  *
  * @param object $links_model
  */
 public function __construct(&$links_model)
 {
     parent::__construct($links_model);
     $this->active_tab = 'mlang' === $_GET['page'] ? 'lang' : substr($_GET['page'], 6);
     PLL_Admin_Strings::init();
     // FIXME put this as late as possible
     add_action('admin_init', array($this, 'register_settings_modules'));
     // adds screen options and the about box in the languages admin panel
     add_action('load-toplevel_page_mlang', array($this, 'load_page'));
     add_action('load-languages_page_mlang_strings', array($this, 'load_page_strings'));
     // saves per-page value in screen option
     add_filter('set-screen-option', array($this, 'set_screen_option'), 10, 3);
 }