Make WordPress Core

Opened 15 years ago

Closed 12 years ago

#14541 closed enhancement (wontfix)

Add boolean at remove_meta_box action

Reported by: rahe's profile Rahe Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

Add the possibility of getting the status of the remove_meta_box action by boolean.
Can be useful if you want to add/remove other metaboxes if one other is present or not.

Attachments (3)

metabox.diff (671 bytes) - added by Rahe 15 years ago.
14541.dff (1.0 KB) - added by spmlucas 12 years ago.
14541.diff (1.2 KB) - added by markjaquith 12 years ago.
refresh

Download all attachments as: .zip

Change History (8)

@Rahe
15 years ago

#1 @scribu
15 years ago

  • Keywords has-patch added

#2 @nacin
15 years ago

  • Milestone changed from Awaiting Review to Future Release

Needs docs too.

Also, once it's found it, it can just return true immediately. Then return false at the end. No need for the flag.

#3 @nacin
12 years ago

  • Component changed from General to Administration
  • Keywords needs-docs needs-refresh added
  • Milestone changed from Future Release to 3.9

@spmlucas
12 years ago

#4 @spmlucas
12 years ago

  • Keywords needs-docs needs-refresh removed

@markjaquith
12 years ago

refresh

#5 @markjaquith
12 years ago

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

The patch as written won't work. It's doing an isset check, so will continue returning true every time it is called. Furthermore, the function needs to set the value to false even if it isn't already set, because for core meta boxes this acts as a forward-block on the meta box (i.e. calling add later won't work, because it has been marked as pre-removed).

I also don't see the value of this return value. After calling it, it should be removed. Why do you care whether it was already marked as removed or not?

Note: See TracTickets for help on using tickets.