Ticket #5208 (closed enhancement: wontfix)

Opened 1 year ago

Last modified 1 year ago

New filter: pre_update_option_{option-name}

Reported by: johnbillion Assigned to: westi
Priority: normal Milestone:
Component: General Version: 2.3
Severity: minor Keywords: update_option, pre_update_option, hook, filter, has-patch reporter-feedback
Cc:

Description

The update_option function has an action hook on it but not a filter. We like filters.

Introducing pre_update_option_{option-name}. This will mainly serve as a method for plugins to filter their own options before they get saved to the database (user input sanitising, etc).

Attachments

5208.diff (432 bytes) - added by johnbillion on 10/15/07 23:27:26.
Introducing pre_update_option_{option_name}

Change History

10/15/07 23:27:26 changed by johnbillion

  • attachment 5208.diff added.

Introducing pre_update_option_{option_name}

10/15/07 23:28:02 changed by johnbillion

  • keywords changed from update_option, pre_update_option, hook, filter to update_option, pre_update_option, hook, filter, has-patch.

Patch

10/16/07 01:25:57 changed by foolswisdom

  • milestone changed from 2.3.1 to 2.4.

10/16/07 06:37:23 changed by Otto42

May as well add a pre_add_option_$option filter as well...

10/16/07 06:38:09 changed by Otto42

Argh... Just saw #5209. Dangit, you beat me to the punch! ;)

10/16/07 08:16:01 changed by westi

  • keywords changed from update_option, pre_update_option, hook, filter, has-patch to update_option, pre_update_option, hook, filter, has-patch reporter-feedback.
  • owner changed from anonymous to westi.
  • status changed from new to assigned.

What does this give you that the filter in sanitize_option doesn't?

sanitize_option_{$option}

10/16/07 13:10:21 changed by johnbillion

  • status changed from assigned to closed.
  • resolution set to wontfix.
  • milestone deleted.

I never even realised there was a filter on sanitize_option. Hmm, this means this filter is superfluous.

Closing as RTFM.