Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 6 years ago

#4223 closed enhancement (fixed)

remove_filter should return (bool) something acually removed

Reported by: mdawaffe's profile mdawaffe Owned by: rob1n's profile rob1n
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.2
Component: General Keywords: plugin api has-patch
Focuses: Cc:

Description

Sometimes it's nice for plugins to be able to conditionally do something depending on whether or not the hook used to have that filter attatched to it.

For example, add the removed filter back to the hook at a different priority.

Marking as 2.2. Feel free to push it back.

Attachments (1)

4223.diff (1.2 KB) - added by mdawaffe 18 years ago.

Download all attachments as: .zip

Change History (7)

@mdawaffe
18 years ago

#1 @rob1n
18 years ago

  • Milestone changed from 2.2 to 2.3
  • Owner changed from anonymous to rob1n

I like the idea. And it's not necessarily life-threatening, so I'm pushing it to 2.3. If someone else thinks it should go into 2.2, please raise it.

#2 @rob1n
18 years ago

  • Keywords has-patch added

#3 @rob1n
18 years ago

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

(In [5393]) Return based on whether the hook was removed or not. Props mdawaffe. fixes #4223

Note that this will almost definitely *not* affect existing implementations. The way most code is set up now is to just call remove_filter() or remove_action().

#4 @giovannimcosta
18 years ago

Ops, I forgot something....
BLOGROLL didn't imported, no "links" from my blogroll were imported =/

#5 @giovannimcosta
18 years ago

forget ! and please, forgive me I posted in wrong place, my browser colapsed and make this. sorry ok

This ticket was mentioned in Slack in #core-privacy by dejliglama. View the logs.


6 years ago

Note: See TracTickets for help on using tickets.