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



wp_get_link_cats › WordPress Function

Od2.1.0
Przestarzałyn/a
wp_get_link_cats ( $link_id = 0 )
Parametry:
  • (int) $link_id Link ID to look up.
    Wymagane: Nie
    Domyślny:
Powrót:
  • (int[]) The IDs of the requested link's categories.
Zdefiniowane na:
Codex:

Retrieves the link category IDs associated with the link specified.



Źródło

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