Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#19179 closed enhancement (fixed)

Unused code in WP_Widget_Links

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: duck_'s profile duck_
Milestone: 3.4 Priority: normal
Severity: trivial Version: 3.2
Component: Widgets Keywords: has-patch
Focuses: Cc:


As reported by pavelevap in #18096:

In Links widget there are two places with the same string, but I could not simulate to display one of them on my testing website?

if ( is_admin() && !$category ) {
	// Display All Links widget as such in the widgets screen
	echo $before_widget . $before_title. __('All Links') . $after_title . $after_widget;

This code was introduced in [10896] as a part of the fix for #9449. It doesn't make much sense, since the function is never called in the admin.

Attachments (1)

19179.patch (823 bytes) - added by SergeyBiryukov 12 years ago.

Download all attachments as: .zip

Change History (4)

#1 @pavelevap
12 years ago

  • Cc pavelevap@… added

Thank you, Sergey.

#2 @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to 3.4
  • Type changed from defect (bug) to enhancement

#3 @duck_
11 years ago

  • Owner set to duck_
  • Resolution set to fixed
  • Status changed from new to closed

In [20245]:

Remove dead code from the Links widget. Props pavelevap, SergeyBiryukov. Fixes #19179.

The widget() method isn't called on the admin screen.

Note: See TracTickets for help on using tickets.