Opened 9 years ago

Closed 9 years ago

#837 closed defect (bug) (invalid)

register_setting() page incorrectly refers to sanitization instead of validation

Reported by: mcguive7's profile McGuive7 Owned by:
Milestone: Priority: low
Component: Codex Keywords: needs-patch


The .org page for register_setting() ( refers to the third parameter as $sanitize_callback, however in truth what this callback does is actually validation. The parameter should be listed as $validation_callback IMO.

Note: this is also present on the following page:

Change History (2)

#1 @samuelsidler
9 years ago

The Codex is a wiki. Anyone can edit it.

However, you should really look at, which is the official code reference. If there are errors there, they need to get fixed in the inline documentation, which you can do by filing a ticket in the core trac.

#2 @Otto42
9 years ago

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

Additionally, this parameter is called "sanitize_callback" in the actual WordPress source code. The name is not chosen arbitrarily on the wiki page or in the documentation.

While I agree that the difference between "sanitization" and "validation" is a subtle one, this is what the code uses and how it defines it, therefore it should be documented as such.

Note: See TracTickets for help on using tickets.