tags with the original nodes on error. */ trait AMP_Noscript_Fallback { /** * Attributes allowed on noscript fallback elements. * * This is used to prevent duplicated validation errors. * * @since 1.1 * @var array */ private $noscript_fallback_allowed_attributes = array(); /** * Initializes the internal allowed attributes array. * * @since 1.1 * * @param string $tag Tag name to get allowed attributes for. */ protected function initialize_noscript_allowed_attributes( $tag ) { $this->noscript_fallback_allowed_attributes = array_fill_keys( array_merge( array_keys( current( AMP_Allowed_Tags_Generated::get_allowed_tag( $tag ) )['attr_spec_list'] ), array_keys( AMP_Allowed_Tags_Generated::get_allowed_attributes() ) ), true ); } /** * Checks whether the given node is within an AMP-specific