Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sniff to ensure plugin prefix in deprecated_functions #152

Open
andizer opened this issue Sep 20, 2019 · 3 comments
Open

Add sniff to ensure plugin prefix in deprecated_functions #152

andizer opened this issue Sep 20, 2019 · 3 comments

Comments

@andizer
Copy link
Contributor

andizer commented Sep 20, 2019

When we deprecate a method, function or hook we use the build in WordPress functions for it. One of the arguments these functions should receive the version number and that's the location where different kind of forms are use. We should have a sniff that checks if the plugin prefix is in there as well as the version number. Just to prevent this:
_deprecated_function( __METHOD__, '11.0');

We want:
_deprecated_function( __METHOD__, 'WPSEO 11.0');

@jrfnl
Copy link
Collaborator

jrfnl commented Sep 20, 2019

Loosely related to WordPress/WordPress-Coding-Standards#993

@jrfnl
Copy link
Collaborator

jrfnl commented Apr 8, 2020

Sniffs which will allow for checking this (as well as checking other parameters of the _deprecated_...() methods) are expected to go into WPCS 3.x.

@jrfnl
Copy link
Collaborator

jrfnl commented Sep 22, 2023

Note: the prefix needs to be configurable and should currently be the full plugin name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants