Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#42931 closed enhancement (wontfix)

We need to make easier to replace calendar widget

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

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
9 years 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
9 years ago

  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

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
9 years 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.