WordPress.org

Make WordPress Core

Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#42931 closed enhancement (wontfix)

We need to make easier to replace calendar widget

Reported by: alexvorn2 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.1
Component: Widgets Keywords:
Focuses: Cc:

Description

I want to replace calendar widget content and I see that action to do this is located at the bottom of the function, so all code we will not need - is executed.

The solution would be to add a action at the top of the widget, so if we want to replace the widget content - the rest of the widget will not get executed.

Change History (3)

#1 @alexvorn2
18 months ago

The same we can do to the search widget, but there is less php code, so in the Calendar widget the execution time is longer...

#2 follow-up: @dd32
18 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

If you want to replace the entirety of the calendar widget, create a new widget, or extend the calendar widget rather than filtering it.

Filters are designed for making small modifications to things, or large, however when it's already a widget it makes no sense being able to pre filter them - Just register new widgets.

#3 in reply to: ↑ 2 @alexvorn2
18 months ago

Replying to dd32:

If you want to replace the entirety of the calendar widget, create a new widget, or extend the calendar widget rather than filtering it.

Filters are designed for making small modifications to things, or large, however when it's already a widget it makes no sense being able to pre filter them - Just register new widgets.

How to extend the calendar widget?

Note: See TracTickets for help on using tickets.