mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Remove dead code from the Links widget. Props pavelevap, SergeyBiryukov. Fixes #19179.
The widget() method isn't called on the admin screen. git-svn-id: http://svn.automattic.com/wordpress/trunk@20245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
77d36b1e55
commit
8750c95b4a
@ -106,12 +106,6 @@ class WP_Widget_Links extends WP_Widget {
|
|||||||
$order = $orderby == 'rating' ? 'DESC' : 'ASC';
|
$order = $orderby == 'rating' ? 'DESC' : 'ASC';
|
||||||
$limit = isset( $instance['limit'] ) ? $instance['limit'] : -1;
|
$limit = isset( $instance['limit'] ) ? $instance['limit'] : -1;
|
||||||
|
|
||||||
if ( is_admin() && !$category ) {
|
|
||||||
// Display All Links widget as such in the widgets screen
|
|
||||||
echo $before_widget . $before_title . _x('All Links', 'links widget') . $after_title . $after_widget;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget);
|
$before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget);
|
||||||
wp_list_bookmarks(apply_filters('widget_links_args', array(
|
wp_list_bookmarks(apply_filters('widget_links_args', array(
|
||||||
'title_before' => $before_title, 'title_after' => $after_title,
|
'title_before' => $before_title, 'title_after' => $after_title,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user