wp_get_link_cats() – Retrieves the link categories associated with the link specified.

You appear to be a bot. Output may be restricted

Description

Retrieves the link category IDs associated with the link specified.

Usage

$int[] = wp_get_link_cats( $link_id );

Parameters

$link_id
( int ) optional – Link ID to look up.

Returns

int[] The IDs of the requested link's categories.

Source

File name: wordpress/wp-admin/includes/bookmark.php
Lines:

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

 View on GitHub View on Trac