Exemple #1
0
 /**
  * setups filters and action needed on all admin pages and on plugins page
  * loads the settings pages or the filters base on the request
  *
  * @since 1.2
  *
  * @param object $links_model
  */
 public function init()
 {
     parent::init();
     // setup filters for admin pages
     // priority 5 to make sure filters are there before customize_register is fired
     if ($this->model->get_languages_list()) {
         add_action('wp_loaded', array(&$this, 'add_filters'), 5);
     }
 }
 public function admin_enqueue_scripts()
 {
     parent::admin_enqueue_scripts();
     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     wp_enqueue_script('pll_admin', POLYLANG_URL . '/js/admin' . $suffix . '.js', array('jquery', 'wp-ajax-response', 'postbox', 'jquery-ui-selectmenu'), POLYLANG_VERSION);
     wp_localize_script('pll_admin', 'pll_flag_base_url', POLYLANG_URL . '/flags/');
     wp_enqueue_style('pll_selectmenu', POLYLANG_URL . '/css/selectmenu' . $suffix . '.css', array(), POLYLANG_VERSION);
 }