Closed benlk closed 6 years ago
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.
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.