-
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
Metadata sniffs #136
Comments
And how would this work if the theme integrates a library for that purpose? Is it allowed because the theme isn't doing the work? Or is the library then part of the theme that shouldn't be doing it either? |
A library included in the theme is still a part of the theme. So, it doesn't matter. The library is irrelevant in this case. |
I suppose we should do the same for custom widgets. |
Let allow non-presentational metadata. |
There is a branch for this issue-136-non-presentational-meta but it needs testing. |
Resolution from the triage: we should add this as a sniff and add info into the requirements. Also, see if there is a chapter for this in the Theme developers handbook and add a chapter there if there isn't. |
Warning:
We need sniffs that check metadata. Currently, the theme review team allows themes to have metadata if it is presentational in nature. Some common examples:
However, we do not allow metadata that is non-presentational in nature. Some common examples:
This would probably need to be an warning-level notice because we wouldn't be able to know whether the meta is presentational or not via code.
Code would need to check functions:
add_metadata()
update_metadata()
add_post_meta()
update_post_meta()
add_user_meta()
update_user_meta()
add_comment_meta()
update_comment_meta()
We could probably check for the
delete_*_meta()
functions too, but this is probably unnecessary.Hooks to check:
attachment_fields_to_edit
attachment_fields_to_save
Error:
One area we could absolutely check for non-presentational metadata is if a theme has a filter on
user_contactmethods
. This is only used for adding contact methods to the user profile, which would not be presentational.The text was updated successfully, but these errors were encountered: