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



wp_get_link_cats › WordPress Function

Da2.1.0
Deprecaton/a
wp_get_link_cats ( $link_id = 0 )
Parametri:
  • (int) $link_id Link ID to look up.
    Richiesto: No
    Default:
Ritorna:
  • (int[]) The IDs of the requested link's categories.
Definito a:
Codex:

Retrieves the link category IDs associated with the link specified.



Sorgenti

function wp_get_link_cats( $link_id = 0 ) {
	$cats = wp_get_object_terms( $link_id, 'link_category', array( 'fields' => 'ids' ) );
	return array_unique( $cats );
}