Пример #1
0
 /**
  * constructor
  *
  * @since 1.9
  *
  * @param object $polylang polylang object
  */
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'licenses', 'title' => __('License keys', 'polylang'), 'description' => __('Manage licenses for Polylang Pro or addons.', 'polylang')));
     $this->buttons['cancel'] = sprintf('<button type="button" class="button button-secondary cancel">%s</button>', __('Close'));
     $this->items = apply_filters('pll_settings_licenses', array());
     add_action('wp_ajax_pll_deactivate_license', array(&$this, 'deactivate_license'));
 }
Пример #2
0
 /**
  * constructor
  *
  * @since 1.9
  *
  * @param object $polylang polylang object
  */
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'share-slugs', 'title' => __('Share slugs', 'polylang'), 'description' => __('Allows to share the same url slug accross languages for posts and terms.', 'polylang')));
     if (class_exists('PLL_Share_Post_Slug', true) && get_option('permalink_structure')) {
         add_action('admin_print_footer_scripts', array(&$this, 'print_js'));
     }
 }
Пример #3
0
 /**
  * Constructor
  *
  * @since 1.8
  *
  * @param object $polylang polylang object
  */
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'browser', 'title' => __('Detect browser language', 'polylang'), 'description' => __('When the front page is visited, set the language according to the browser preference', 'polylang'), 'active_option' => $this->is_available() ? 'browser' : false));
     if (!class_exists('PLL_Xdata_Domain', true)) {
         add_action('admin_print_footer_scripts', array($this, 'print_js'));
     }
 }
Пример #4
0
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'cpt', 'title' => __('Custom post types and Taxonomies', 'polylang'), 'description' => __('Activate the languages and translations management for the custom post types and taxonomies.', 'polylang')));
     // FIXME should be OK when the modules will be loaded from the settings page
     $post_types = get_post_types(array('public' => true, '_builtin' => false));
     $post_types = array_diff($post_types, get_post_types(array('_pll' => true)));
     $this->post_types = array_unique(apply_filters('pll_get_post_types', $post_types, true));
     $taxonomies = get_taxonomies(array('public' => true, '_builtin' => false));
     $taxonomies = array_diff($taxonomies, get_taxonomies(array('_pll' => true)));
     $this->taxonomies = array_unique(apply_filters('pll_get_taxonomies', $taxonomies, true));
 }
Пример #5
0
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'url', 'title' => __('URL modifications', 'polylang'), 'description' => __('Decide how your URLs will look like.', 'polylang'), 'configure' => true));
     $this->links_model =& $polylang->links_model;
     $this->page_on_front =& $polylang->static_pages->page_on_front;
 }
Пример #6
0
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'tools', 'title' => __('Tools', 'polylang'), 'description' => __('Decide whether to remove all data when deleting Polylang.', 'polylang')));
 }
Пример #7
0
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'wpml', 'title' => __('WPML Compatibility', 'polylang'), 'description' => __('WPML compatibility mode of Polylang', 'polylang')));
 }
 /**
  * constructor
  *
  * @since 1.9
  *
  * @param object $polylang polylang object
  */
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'translate-slugs', 'title' => __('Translate slugs', 'polylang'), 'description' => __('Allows to translate custom post types and taxonomies slugs in urls.', 'polylang')));
 }
Пример #9
0
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'sync', 'title' => __('Synchronization', 'polylang'), 'description' => __('The synchronization options allow to maintain exact same values (or translations in the case of taxonomies and page parent) of meta content between the translations of a post or page.', 'polylang')));
 }
Пример #10
0
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'browser', 'title' => __('Detect browser language', 'polylang'), 'description' => __('When the front page is visited, set the language according to the browser preference', 'polylang'), 'active_option' => 3 > $polylang->options['force_lang'] ? 'browser' : false));
     add_action('admin_print_footer_scripts', array(&$this, 'print_js'));
 }
Пример #11
0
 public function __construct(&$polylang)
 {
     parent::__construct($polylang, array('module' => 'media', 'title' => __('Media'), 'description' => __('Activate languages and translations for media', 'polylang'), 'active_option' => 'media_support'));
 }