function testTermMetaFilter()
 {
     $tid = $this->factory->term->create();
     $term = new TimberTerm($tid);
     add_filter('timber_term_get_meta_field', array($this, 'filter_timber_term_get_meta_field'), 10, 4);
     $term->meta("panic!");
 }
Exemplo n.º 2
0
 /**
 @issue #824
 */
 function testTermWithNativeMetaNotExisting()
 {
     $tid = $this->factory->term->create(array('name' => 'News', 'taxonomy' => 'category'));
     $term = new TimberTerm($tid);
     $this->assertFalse($term->meta('foo'));
 }
Exemplo n.º 3
0
 public function meta($field_name)
 {
     return $this->term->meta($field_name);
 }