WP_Links_List_Table::column_categories() – Handles the link categories column output.
You appear to be a bot. Output may be restricted
Description
Handles the link categories column output.
Usage
WP_Links_List_Table::column_categories( $link );
Parameters
- $link
- ( object ) required – The current link object.
Returns
void
Source
File name: wordpress/wp-admin/includes/class-wp-links-list-table.php
Lines:
1 to 17 of 17
public function column_categories( $link ) { global $cat_id; $cat_names = array(); foreach ( $link->link_category as $category ) { $cat = get_term( $category, 'link_category', OBJECT, 'display' ); if ( is_wp_error( $cat ) ) { echo $cat->get_error_message(); } $cat_name = $cat->name; if ( (int) $cat_id !== $category ) { $cat_name = "<a href='link-manager.php?cat_id=$category'>$cat_name</a>"; } $cat_names[] = $cat_name; } echo implode( ', ', $cat_names ); }