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

Provide a setting to allow site admins to opt into using the CDN version of Pym #31

Closed
benlk opened this issue Feb 14, 2018 · 1 comment

Comments

@benlk
Copy link
Collaborator

benlk commented Feb 14, 2018

Wordpress' plugin guidelines require that we include pym.js locally, and that that version be used by default. This is because WordPress forbids loading executable code from CDNs: https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/#8-plugins-may-not-send-executable-code-via-third-party-systems

However, if we created a setting that allowed people to opt into using the NPR-CDN-provided version of Pym.js, and that setting page included sufficient warnings and explanations, we would be able to provide the option of enabling the CDN version to people who are interested in using it without having to set the pymsrc attribute on every single shortcode.

@benlk
Copy link
Collaborator Author

benlk commented Feb 16, 2018

A fast solution here would be to create a filter that, if outputting true, forces the use of the CDN.

The settings page proposed in #32 would be backwards-compatible with the filter by the expedient of disabling the field on the settings page if the filter is set to force the CDN.

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

1 participant