Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#10554 closed enhancement (wontfix)

Duplicate filter for pre-update option modification

Reported by: Adrian Lang Owned by:
Milestone: Priority: low
Severity: minor Version: 2.9
Component: General Keywords: has-patch
Focuses: Cc:


In [8247], the filter „pre_update_option_{$option_name}“ has been introduced after request in #7233. Yet there already is „sanitize_option_{$option}“ that serves the same purpose as has been pointed out in #5208.

Please clarify which of those should be used and deprecate/remove the other one. In any case, please change „'pre_update_option_' . $option_name“ to „"pre_update_option_{$option_name}"“ for automatic documentation tools.

Change History (2)

#1 @dd32
12 years ago

  • Component changed from Plugins to General
  • Keywords has-patch added
  • Milestone changed from Unassigned to 2.9
  • Version set to 2.9

sanitize_option_{$option} is for sanitizing the content of an option, And is only run if the function doesnt sanitize it itself.

pre_update_option_ can be used to prevent the option from being updated, as well as having a standard filter layout over all the *_option() functions.

has-patch: Just to move it through the workflow, I dont think submitting a patch is worth anyones time, quicker to just update the code directly.

#2 @ryan
12 years ago

  • Milestone 2.9 deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.