ampproject / amp-wp

Enable AMP on your WordPress site, the WordPress way.

Home Page:https://wordpress.org/plugins/amp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prevent triggering wp_print_scripts action when printing component scripts for legacy templates

westonruter opened this issue · comments

In #1097 we eliminated use of wp_print_scripts() in favor of wp_scripts()->do_items() to prevent triggering the wp_print_scripts action, which some plugins use to output scripts to the page. This change, however, was not done similarly when printing scripts for legacy templates:

https://github.com/Automattic/amp-wp/blob/70711f0cd647f233b02ffa1bbbd58496eeeea510/includes/amp-post-template-actions.php#L67-L70

This results in a support topic like this: https://wordpress.org/support/topic/slidedeck-js-not-being-stripped/