Ticket #5209 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Add an action hook and sanitize_option filter to add_option_{option_name}

Reported by: johnbillion Owned by: anonymous
Priority: normal Milestone: 2.5
Component: General Version: 2.3
Severity: minor Keywords: add_option, sanitize_option, hook, filter, has-patch
Cc:

Description

In the spirit of #5208, I propose adding a filter and an action to the add_option function, as it currently has neither.

Attachments

5209.diff Download (664 bytes) - added by johnbillion 4 years ago.
Introducing add_option_{option_name} and pre_add_option_{option_name}
5209.2.diff Download (813 bytes) - added by johnbillion 4 years ago.
Add sanitize_option to add_option

Change History

Introducing add_option_{option_name} and pre_add_option_{option_name}

  • Keywords filter, has-patch added; filter removed

Patch

  • Milestone changed from 2.3.1 to 2.4

Add sanitize_option to add_option

  • Keywords sanitize_option, added; pre_add_option, removed
  • Summary changed from Two more new hooks: add_option_{option_name} and pre_add_option_{option_name} to Add an action hook and sanitize_option filter to add_option_{option_name}

In light of westi's comment over at #5208, I'm changing this ticket to propose adding the sanitize_option filter to add_option_{option_name}, in addition to an action hook.

See new patch.

Anyone see any problems with adding sanitize_option to the add_option function?

  • Milestone changed from 2.5 to 2.6
  • Status changed from new to closed
  • Resolution set to fixed

(In [7445]) Add sanitization of option values to add_option. Fixes #5209 props johnbillion.

  • Milestone changed from 2.6 to 2.5
Note: See TracTickets for help on using tickets.