wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



has_term_meta › WordPress Function

Da4.9.0
Deprecaton/a
has_term_meta ( $term_id )
Parametri:
  • (int) $term_id Term ID.
    Richiesto:
Ritorna:
  • (array|false) Array with meta data, or false when the meta table is not installed.
Definito a:
Codex:

Gets all meta data, including meta IDs, for the given term ID.



Sorgenti

function has_term_meta( $term_id ) {
	$check = wp_check_term_meta_support_prefilter( null );
	if ( null !== $check ) {
		return $check;
	}

	global $wpdb;

	return $wpdb->get_results( $wpdb->prepare( "SELECT meta_key, meta_value, meta_id, term_id FROM $wpdb->termmeta WHERE term_id = %d ORDER BY meta_key,meta_id", $term_id ), ARRAY_A );
}