[wp-trac] [WordPress Trac] #20656: Link Manager Custom Column
WordPress Trac
wp-trac at lists.automattic.com
Fri May 11 07:47:39 UTC 2012
#20656: Link Manager Custom Column
----------------------------+-----------------------------------
Reporter: moallemi | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.3.2
Severity: normal | Keywords: needs-patch has-patch
----------------------------+-----------------------------------
WordPress has a "manage_link_custom_column" action in wp-admin/includes
/class-wp-links-list-table.php line 174 that can be never called! because
there is no filter to add a custom column to the link manager page and so
the default switch case in line 130 never happens!
I think adding applying a filter in get_columns() function in wp-
admin/includes/class-wp-links-list-table.php will solve this problem.
something like:
{{{
...
$links_columns = apply_filters( 'manage_link_columns', $link_columns );
return $link_columns;
}}}
here is the full patched function:
{{{
function get_columns() {
$link_columns = array(
'cb' => '<input type="checkbox" />',
'name' => _x( 'Name', 'link name' ),
'url' => __( 'URL' ),
'categories' => __( 'Categories' ),
'rel' => __( 'Relationship' ),
'visible' => __( 'Visible' ),
'rating' => __( 'Rating' )
);
return apply_filters( 'manage_link_columns', $link_columns
);
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20656>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list