Amp_Assets::scripts()

Summary

Get AMP script handles.


Description

This is only relevant in the Classic Mode, as component scripts are automatically in Native/Paired modes. This is used in an ‘amp_post_template_data’ filter.

See also

    Warning: preg_match(): Compilation failed: invalid range in character class at offset 24 in /app/wp-content/themes/wporg-developer/inc/formatting.php on line 181
  • amp_register_default_scripts()

Return

(string[]) Script handles.


Source

File: src/BigCommerce/Amp/Amp_Assets.php

	public function scripts() {
		$handles = array(
			'amp-carousel',
			'amp-form',
			'amp-bind',
			'amp-sidebar',
			'amp-list',
			'amp-mustache',
		);

		if ( is_archive() ) {
			$handles[] = 'amp-lightbox';
		}

		return $handles;
	}

User Contributed Notes

You must log in before being able to contribute a note or feedback.