Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#19179 closed enhancement (fixed)

Unused code in WP_Widget_Links

Reported by: SergeyBiryukov Owned by: 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 4 years ago.

Download all attachments as: .zip

Change History (4)

@SergeyBiryukov4 years ago

comment:1 @pavelevap4 years ago

  • Cc pavelevap@… added

Thank you, Sergey.

comment:2 @SergeyBiryukov4 years ago

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

comment:3 @duck_4 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.