Beispiel #1
0
 /**
  * Get terms.
  *
  * @param string|array $args
  * @param array   $maybe_args
  * @param string  $TermClass
  * @return mixed
  */
 public static function get_terms($args = null, $maybe_args = array(), $TermClass = 'TimberTerm')
 {
     return TermGetter::get_terms($args, $maybe_args, $TermClass);
 }
Beispiel #2
0
 /**
  * Get term.
  * @api
  * @param int|WP_Term|object $term
  * @param string     $taxonomy
  * @return Timber\Term|WP_Error|null
  */
 public static function get_term($term, $taxonomy = 'post_tag', $TermClass = 'Timber\\Term')
 {
     return TermGetter::get_term($term, $taxonomy, $TermClass);
 }
 public function findAll($args = [])
 {
     $args = array_merge(['posts_per_page' => '-1', 'taxonomy' => $this->getTaxonomy()], $args);
     return Timber\TermGetter::get_terms($args, get_called_class());
 }