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

Only add Schema.org metadata if not already added by another plugin #962

Closed
westonruter opened this issue Feb 15, 2018 · 0 comments
Closed
Milestone

Comments

@westonruter
Copy link
Member

westonruter commented Feb 15, 2018

Currently when theme support is enabled, amp_print_schemaorg_metadata() is called at the wp_head action. However, if another plugin is adding this Schema.org metadata then we should defer to the meta that it adds to prevent duplicates. So I think we should augment AMP_Theme_Support::ensure_required_markup() to check if the script is present after output-buffering, and if so, then add amp_get_schemaorg_metadata() to the head element.

Something similar should be done eventually for the app manifest.

For both Schema.org metadata and app manifest, core should eventually be doing these itself, and that will help facilitate themes and plugins coordinating on the data that is output.

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

No branches or pull requests

2 participants