You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR | The following three functions are not allowed (plugin territory): register_post_type(), register_taxonomy(), add_shortcode(). Review this list with the Theme Review board as there might be some more functions which could be added. The sniff could probably just extend the Forbidden Functions sniff - though it should be kept as a separate sniff for clarity.
[Implement sniff] Check for functions that are plugin territory and display an error if found.
Rule type:
Error
Rule:
Ref: https://make.wordpress.org/themes/handbook/review/required/#presentation-vs-functionality
ERROR | The following three functions are not allowed (plugin territory): register_post_type(), register_taxonomy(), add_shortcode(). Review this list with the Theme Review board as there might be some more functions which could be added. The sniff could probably just extend the Forbidden Functions sniff - though it should be kept as a separate sniff for clarity.
Theme check file covering this rule:
https://github.com/Otto42/theme-check/blob/master/checks/plugin-territory.php
To do:
Adjust existing WPCS / PHPCS sniff and send in PR upstream.Add existingsniffname
sniff to the ruleset.The text was updated successfully, but these errors were encountered: