Пример #1
0
 public function get_taxonomies()
 {
     // Get taxonomies with support for our feature
     $taxonomies = array();
     foreach (get_taxonomies() as $taxonomy) {
         if (taxonomy_supports($taxonomy, $this->feature)) {
             $taxonomies[] = $taxonomy;
         }
     }
     return $taxonomies;
 }
Пример #2
0
 /**
  * Gets taxonomies with support for our feature
  *
  * @return array
  */
 public function get_taxonomies($feature)
 {
     $taxonomies = array();
     foreach (get_taxonomies() as $taxonomy) {
         if (taxonomy_supports($taxonomy, $feature)) {
             $taxonomies[$taxonomy] = $taxonomy;
         }
     }
     return $taxonomies;
 }