Uses
Uses | Description |
---|---|
wp-includes/taxonomy.php: wp_get_object_terms() | Retrieves the terms associated with the given object(s), in the supplied taxonomies. |
Retrieves the link category IDs associated with the link specified.
(int) (Required) Link ID to look up.
(int[]) The IDs of the requested link's categories.
File: wp-admin/includes/bookmark.php
function wp_get_link_cats( $link_id = 0 ) { $cats = wp_get_object_terms( $link_id, 'link_category', array( 'fields' => 'ids' ) ); return array_unique( $cats ); }
Version | Description |
---|---|
2.1.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_link_cats