wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_get_term_taxonomy_parent_id › WordPress Function

Od3.1.0
Przestarzałyn/a
wp_get_term_taxonomy_parent_id ( $term_id, $taxonomy )
Parametry: (2)
  • (int) $term_id Term ID.
    Wymagane: Tak
  • (string) $taxonomy Taxonomy name.
    Wymagane: Tak
Powrót:
  • (int|false) Parent term ID on success, false on failure.
Zdefiniowane na:
Codex:

Returns the term's parent's term ID.



Źródło

function wp_get_term_taxonomy_parent_id( $term_id, $taxonomy ) {
	$term = get_term( $term_id, $taxonomy );
	if ( ! $term || is_wp_error( $term ) ) {
		return false;
	}
	return (int) $term->parent;
}