PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.3 3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 All 107 releases
← All changes | src/Integrations/class-amp.php +12 -1 3.16.2 → 3.24.2 View file →
@@ -84,9 +84,10 @@
84 84 return $this->is_amp_request() && ! $options['disable_amp'];
85 85 }
86 86
87 87 /**
88 - * Adds AMP actions.
88 + * Adds AMP actions and deregisters any scripts that create AMP validation
89 + * issues.
89 90 *
90 91 * @since 2.6.0
91 92 */
92 93 public function add_actions(): void {
@@ -92,8 +93,18 @@
92 93 public function add_actions(): void {
93 94 if ( $this->can_handle_amp_request() ) {
94 95 add_filter( 'amp_post_template_analytics', array( $this, 'register_parsely_for_amp_analytics' ) );
95 96 add_filter( 'amp_analytics_entries', array( $this, 'register_parsely_for_amp_native_analytics' ) );
97 +
98 + // The tracker script isn't needed here, since tracking is done via
99 + // the amp-analytics tag. Including the tracker creates an AMP
100 + // validation issue.
101 + wp_deregister_script( 'wp-parsely-tracker' );
102 +
103 + // Our loader script creates an AMP validation issue, and it might
104 + // not be useful under the AMP context. If we get feedback that it's
105 + // needed, we can consider adding it under AMP.
106 + wp_deregister_script( 'wp-parsely-loader' );
96 107 }
97 108 }
98 109
99 110 /**