Commit 6c040ea
PHP/RestrictedPHPFunctions: add XML documentation (#2693)
* Add documentation for WordPress.PHP.RestrictedPHPFunctions
* Rework XML documentation for WordPress.PHP.RestrictedPHPFunctions
Some of these changes were suggested during the review of PR 2491,
and others were decided while working on the new PR:
- Make the standard description generic instead of mentioning
create_function() specifically, following the pattern used by other
docs like DeprecatedFunctionsStandard.xml.
- Use "must not" instead of "should not" since the sniff produces an
error.
- Simplify the code examples by removing the add_action() wrapper.
- Add <em> tags to the valid code example.
* Explain why in the standard description
Following the suggestion in PR 2687, this commit improves the
standard description to explain why these functions must not
be used.
The phrasing is kept generic instead of mentioning
create_function() specifically, since the sniff name suggests
it could be extended with more functions in the future.
Co-authored-by: gogdzl <diego.rodrigues@automattic.com>1 parent c580c6c commit 6c040ea
1 file changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments