Repository navigation
Commit ff2a71f
committed
Docs: Allow a callable
For backward compatibility, `register_setting()` still accepts a sanitize callback as its third argument, converting it into the `sanitize_callback` argument without a deprecation notice. Its docblock documented `$args` only as an array, so once PHPStan began reading the hash notation in r63420, callers passing a callback were reported, such as Twenty Eleven and the deprecated `add_option_update_handler()`. This form remains in wide use across thousands of plugins and themes in the theme & plugin directories.
Developed in #14137.
Follow-up to r38635, r63420.
Props jorgefilipecosta, westonruter.
See #65817, #65860.
git-svn-id: https://develop.svn.wordpress.org/trunk@64670 602fd350-edb4-49c9-b593-d223f7449a82$args in register_setting().1 parent 48d627a commit ff2a71f
2 files changed
Lines changed: 7 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3047 | 3047 | | |
3048 | 3048 | | |
3049 | 3049 | | |
3050 | | - | |
3051 | | - | |
3052 | | - | |
3053 | | - | |
3054 | | - | |
3055 | | - | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
| 3055 | + | |
| 3056 | + | |
3056 | 3057 | | |
3057 | 3058 | | |
3058 | 3059 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | 421 | | |
427 | 422 | | |
428 | 423 | | |
| |||
0 commit comments