WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#5209 closed enhancement (fixed)

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

Reported by: johnbillion Owned by:
Milestone: 2.5 Priority: normal
Severity: minor Version: 2.3
Component: General Keywords: add_option, sanitize_option, hook, filter, has-patch
Focuses: 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 (2)

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

Download all attachments as: .zip

Change History (8)

johnbillion7 years ago

Introducing add_option_{option_name} and pre_add_option_{option_name}

comment:1 johnbillion7 years ago

  • Keywords has-patch added

Patch

comment:2 foolswisdom7 years ago

  • Milestone changed from 2.3.1 to 2.4

johnbillion7 years ago

Add sanitize_option to add_option

comment:3 johnbillion7 years ago

  • 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?

comment:4 ffemtcj6 years ago

  • Milestone changed from 2.5 to 2.6

comment:5 westi6 years ago

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

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

comment:6 westi6 years ago

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