Ejemplo n.º 1
0
 /**
  * Constructor
  *
  * @since 1.8
  *
  * @param object $model
  */
 public function __construct(&$model)
 {
     $this->object_type = 'term';
     $this->tax_language = 'term_language';
     $this->tax_translations = 'term_translations';
     $this->tax_tt = 'tl_term_taxonomy_id';
     parent::__construct($model);
     // filters to prime terms cache
     add_filter('get_terms', array(&$this, '_prime_terms_cache'), 10, 2);
     add_filter('wp_get_object_terms', array(&$this, 'wp_get_object_terms'), 10, 3);
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  *
  * @since 1.8
  *
  * @param object $model
  */
 public function __construct(&$model)
 {
     // init properties
     $this->object_type = null;
     $this->tax_language = 'language';
     $this->tax_translations = 'post_translations';
     $this->tax_tt = 'term_taxonomy_id';
     parent::__construct($model);
     // registers completely the language taxonomy
     add_action('setup_theme', array(&$this, 'register_taxonomy'), 1);
     // setups post types to translate
     add_action('registered_post_type', array(&$this, 'registered_post_type'));
     // forces updating posts cache
     add_action('pre_get_posts', array(&$this, 'pre_get_posts'));
 }