Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#26616 closed defect (bug) (invalid)

unregister_widget not working in WordPress 3.8

Reported by: dane-morgan's profile Dane Morgan Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Widgets Keywords:
Focuses: Cc:


The code

function remove_calendar_widget() {

add_action( 'widgets_init', 'remove_calendar_widget' );

unregisters the calendar widget on a 3.7.1 install but does not unregister it on a 3.8 install on the same server

Add the above code to the functions.php file and open the widget management page in the dashboard.

Expected results
The calendar widget will not be available in the widgets list.

What I see instead
The calendar widget is still there in the list.

Change History (5)

#1 @Dane Morgan
11 years ago

Actually, when i put that code into a plugin it does work, so maybe in 3.8 this function is no longer available to themes?

#2 @SergeyBiryukov
11 years ago

That snippet still works as expected for me in 3.8 when I put it into Twenty Fourteen's or Twenty Thirteen's functions.php file.

#3 @Dane Morgan
11 years ago

Okay, same here. So I am missing something else. This works as expected. Thank you.

#4 @Dane Morgan
11 years ago

  • Keywords close added
  • Resolution set to invalid
  • Status changed from new to closed

#5 @SergeyBiryukov
11 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.