get_term_field [ WordPress Function ]
get_term_field ( $field, $term, $taxonomy, $context = 'display' )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_post_field, get_term_children, get_term_feed_link, get_the_id, _get_term_children
Get sanitized Term field.
Does checks for $term, based on the $taxonomy. The function is for contextual reasons and for simplicity of usage. See sanitize_term_field() for more information.
Source
<?php
function get_term_field( $field, $term, $taxonomy, $context = 'display' ) {
$term = (int) $term;
$term = get_term( $term, $taxonomy );
if ( is_wp_error($term) )
return $term;
if ( !is_object($term) )
return '';
if ( !isset($term->$field) )
return '';
return sanitize_term_field($field, $term->$field, $term->term_id, $taxonomy, $context);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- PHPXRef 0.7 : WordPress : Function Reference: get_term_field()
Function and Method Cross Reference. get_term_field(). Defined at: /wp-includes /taxonomy.php -> line 1006. Referenced 6 times: ...
phpxref.ftwr.co.uk - Docs for page functions.wp-taxonomy.php
void get_term_children ( $term, $taxonomy). $term; $taxonomy. get_term_field ( line 57). void get_term_field ( $field, $term, $taxonomy, [ $context = 'display']) ...
phpdoc.ftwr.co.uk - get_term_field (WordPress Function) - WPSeek.com
WordPress lookup for get_term_field, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - get_term_field | A HitchHackers guide through WordPress
Feb 12, 2011 ... function get_term_field( $field, $term, $taxonomy, $context = 'display' ) { $term = ( int) $term; $term = get_term( $term, $taxonomy ); if ...
hitchhackerguide.com