-
Notifications
You must be signed in to change notification settings - Fork 37
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
Adding more functions in the discouraged functions list #118
Comments
Related Theme Check issue WordPress/theme-check#119 I think these would make sense. Just to clarify that these will be warning and not errors. A PR can be made once we have merged the latest WPCS to this fork which should happen either this week or the next. |
@grappler Why wait for the back-merge ? |
|
Isnt using |
No, but we can always run the sniff on existing themes once is made to see if we can find any use cases.
The error would be part of restricted functions were as the warnings would be discouraged. |
I wouldn't report an error on any of those. There are legit use cases for them in themes. However, more often than not, the functions on the right are more appropriate. So, a warning/info notice might be appropriate. |
How about |
@joyously Yes, by checking the parameter/option name that is being modified. |
Options need to be handled in the customizer, |
Examples found in themes for
|
I'm thinking |
I don't think we have a PR on this, so I'll remove that tag. This sniff can go in a next release (after 0.2.0) |
function name -> recommended usage
site_url()
->home_url()
get_home_url()
->home_url()
paginate_links()
->the_posts_pagination()
single_cat_title()
->the_archive_title()
single_tag_title()
->the_archive_title()
category_description()
->the_archive_description()
tag_description()
->the_archive_description()
The text was updated successfully, but these errors were encountered: