WordPress-Coding-Standards/WordPress/Docs/PHP
Rodrigo Primo 6c040eabdd
Some checks failed
Basic QA checks / Run code sniffs (push) Failing after 0s
Basic QA checks / XML Code style (push) Failing after 0s
Basic QA checks / Ruleset test: PHP latest on PHPCS lowest (push) Failing after 0s
Basic QA checks / Ruleset test: PHP latest on PHPCS stable (push) Failing after 0s
Basic QA checks / PHPStan (push) Failing after 0s
Basic QA checks / Find typos (push) Failing after 0s
Basic QA checks / Ruleset test: PHP latest on PHPCS dev (push) Failing after 4s
Quick Tests / QTest - PHP 7.2 on PHPCS stable (push) Failing after 0s
Quick Tests / QTest - PHP latest on PHPCS lowest (push) Failing after 0s
Quick Tests / QTest - PHP 7.2 on PHPCS lowest (push) Failing after 2s
Quick Tests / QTest - PHP latest on PHPCS stable (push) Failing after 2s
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>
2026-03-05 02:58:31 +01:00
..
DevelopmentFunctionsStandard.xml PHP/DevelopmentFunctions: add XML documentation (#2690) 2026-02-04 08:02:19 +01:00
DontExtractStandard.xml Spellcheck: add some exceptions and fix some typos 2025-06-26 13:00:00 +02:00
IniSetStandard.xml Documentation: capitalization consistency fixes (#2469) 2024-07-27 15:10:40 +02:00
NoSilencedErrorsStandard.xml PHP/NoSilencedErrors: add XML documentation (#2694) 2026-02-25 14:04:17 +01:00
PregQuoteDelimiterStandard.xml PHP/PregQuoteDelimiter: add XML documentation 2025-12-24 07:53:51 -03:00
RestrictedPHPFunctionsStandard.xml PHP/RestrictedPHPFunctions: add XML documentation (#2693) 2026-03-05 02:58:31 +01:00
StrictInArrayStandard.xml Documentation: capitalization consistency fixes (#2469) 2024-07-27 15:10:40 +02:00
YodaConditionsStandard.xml Documentation: various consistency fixes 2024-07-22 16:46:40 +02:00