'color-interpolation' => array(), 'color-interpolation-filters' => array(), 'color-profile' => array(), 'color-rendering' => array(), 'cursor' => array(), 'direction' => array(), 'display' => array(), 'dominant-baseline' => array(), 'dx' => array(), 'dy' => array(), 'enable-background' => array(), 'externalresourcesrequired' => array(), 'fill' => array(), 'fill-opacity' => array(), 'fill-rule' => array(), 'filter' => array(), 'flood-color' => array(), 'flood-opacity' => array(), 'focusable' => array(), 'font-family' => array(), 'font-size' => array(), 'font-size-adjust' => array(), 'font-stretch' => array(), 'font-style' => array(), 'font-variant' => array(), 'font-weight' => array(), 'glyph-orientation-horizontal' => array(), 'glyph-orientation-vertical' => array(), 'image-rendering' => array(), 'kerning' => array(), 'lengthadjust' => array(), 'letter-spacing' => array(), 'lighting-color' => array(), 'marker-end' => array(), 'marker-mid' => array(), 'marker-start' => array(), 'mask' => array(), 'opacity' => array(), 'overflow' => array(), 'pointer-events' => array(), 'requiredextensions' => array(), 'requiredfeatures' => array(), 'rotate' => array(), 'shape-rendering' => array(), 'stop-color' => array(), 'stop-opacity' => array(), 'stroke' => array(), 'stroke-dasharray' => array(), 'stroke-dashoffset' => array(), 'stroke-linecap' => array(), 'stroke-linejoin' => array(), 'stroke-miterlimit' => array(), 'stroke-opacity' => array(), 'stroke-width' => array(), 'style' => array(), 'systemlanguage' => array(), 'text-anchor' => array(), 'text-decoration' => array(), 'text-rendering' => array(), 'textlength' => array(), 'unicode-bidi' => array(), 'vector-effect' => array(), 'visibility' => array(), 'word-spacing' => array(), 'writing-mode' => array(), 'x' => array(), 'xml:lang' => array(), 'xml:space' => array(), 'xmlns' => array(), 'xmlns:xlink' => array(), 'y' => array(), ), 'tag_spec' => array( 'mandatory_ancestor' => 'svg', 'spec_url' => 'https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#svg', ), ), ), 'tt' => array( array( 'attr_spec_list' => array(), 'tag_spec' => array(), ), ), 'u' => array( array( 'attr_spec_list' => array(), 'tag_spec' => array(), ), ), 'ul' => array( array( 'attr_spec_list' => array(), 'tag_spec' => array(), ), ), 'use' => array( array( 'attr_spec_list' => array( 'alignment-baseline' => array(), 'baseline-shift' => array(), 'clip' => array(), 'clip-path' => array(), 'clip-rule' => array(), 'color' => array(), 'color-interpolation' => array(), 'color-interpolation-filters' => array(), 'color-profile' => array(), 'color-rendering' => array(), 'cursor' => array(), 'direction' => array(), 'display' => array(), 'dominant-baseline' => array(), 'enable-background' => array(), 'externalresourcesrequired' => array(), 'fill' => array(), 'fill-opacity' => array(), 'fill-rule' => array(), 'filter' => array(), 'flood-color' => array(), 'flood-opacity' => array(), 'focusable' => array(), 'font-family' => array(), 'font-size' => array(), 'font-size-adjust' => array(), 'font-stretch' => array(), 'font-style' => array(), 'font-variant' => array(), 'font-weight' => array(), 'glyph-orientation-horizontal' => array(), 'glyph-orientation-vertical' => array(), 'height' => array(), 'image-rendering' => array(), 'kerning' => array(), 'letter-spacing' => array(), 'lighting-color' => array(), 'marker-end' => array(), 'marker-mid' => array(), 'marker-start' => array(), 'mask' => array(), 'opacity' => array(), 'overflow' => array(), 'pointer-events' => array(), 'requiredextensions' => array(), 'requiredfeatures' => array(), 'shape-rendering' => array(), 'stop-color' => array(), 'stop-opacity' => array(), 'stroke' => array(), 'stroke-dasharray' => array(), 'stroke-dashoffset' => array(), 'stroke-linecap' => array(), 'stroke-linejoin' => array(), 'stroke-miterlimit' => array(), 'stroke-opacity' => array(), 'stroke-width' => array(), 'style' => array(), 'systemlanguage' => array(), 'text-anchor' => array(), 'text-decoration' => array(), 'text-rendering' => array(), 'transform' => array(), 'unicode-bidi' => array(), 'vector-effect' => array(), 'visibility' => array(), 'width' => array(), 'word-spacing' => array(), 'writing-mode' => array(), 'x' => array(), 'xlink:actuate' => array(), 'xlink:arcrole' => array(), 'xlink:href' => array( 'alternative_names' => array( 'href', ), 'value_url' => array( 'allow_empty' => false, 'protocol' => array( 'http', 'https', ), ), ), 'xlink:role' => array(), 'xlink:show' => array(), 'xlink:title' => array(), 'xlink:type' => array(), 'xml:lang' => array(), 'xml:space' => array(), 'xmlns' => array(), 'xmlns:xlink' => array(), 'y' => array(), ), 'tag_spec' => array( 'mandatory_ancestor' => 'svg', 'spec_url' => 'https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#svg', ), ), ), 'var' => array( array( 'attr_spec_list' => array(), 'tag_spec' => array(), ), ), 'video' => array( array( 'attr_spec_list' => array( 'autoplay' => array(), 'controls' => array(), 'height' => array(), 'loop' => array(), 'muted' => array(), 'playsinline' => array(), 'poster' => array(), 'preload' => array(), 'src' => array( 'disallowed_value_regex' => '__amp_source_origin', 'value_url' => array( 'allow_relative' => false, 'protocol' => array( 'data', 'https', ), ), ), 'width' => array(), ), 'tag_spec' => array( 'mandatory_ancestor' => 'noscript', 'mandatory_ancestor_suggested_alternative' => 'amp-video', 'spec_url' => 'https://amp.dev/documentation/components/amp-video/', ), ), ), 'view' => array( array( 'attr_spec_list' => array( 'externalresourcesrequired' => array(), 'preserveaspectratio' => array(), 'style' => array(), 'viewbox' => array(), 'viewtarget' => array(), 'xml:lang' => array(), 'xml:space' => array(), 'xmlns' => array(), 'xmlns:xlink' => array(), 'zoomandpan' => array(), ), 'tag_spec' => array( 'mandatory_ancestor' => 'svg', 'spec_url' => 'https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#svg', ), ), ), 'vkern' => array( array( 'attr_spec_list' => array( 'g1' => array(), 'g2' => array(), 'k' => array(), 'style' => array(), 'u1' => array(), 'u2' => array(), 'xml:lang' => array(), 'xml:space' => array(), 'xmlns' => array(), 'xmlns:xlink' => array(), ), 'tag_spec' => array( 'mandatory_ancestor' => 'svg', 'spec_url' => 'https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#svg', ), ), ), 'wbr' => array( array( 'attr_spec_list' => array(), 'tag_spec' => array(), ), ), ); private static $layout_allowed_attrs = array( 'data-amp-bind-height' => array(), 'data-amp-bind-width' => array(), 'disable-inline-width' => array(), 'height' => array(), 'heights' => array(), 'layout' => array(), 'sizes' => array(), 'width' => array(), ); private static $globally_allowed_attrs = array( 'about' => array(), 'accesskey' => array(), 'amp-access' => array(), 'amp-access-behavior' => array(), 'amp-access-hide' => array(), 'amp-access-id' => array(), 'amp-access-loader' => array(), 'amp-access-loading' => array(), 'amp-access-off' => array(), 'amp-access-on' => array(), 'amp-access-show' => array(), 'amp-access-style' => array(), 'amp-access-template' => array(), 'amp-fx' => array( 'requires_extension' => array( 'amp-fx-collection', ), 'value_regex_casei' => '(fade-in|fade-in-scroll|float-in-bottom|float-in-top|fly-in-bottom|fly-in-left|fly-in-right|fly-in-top|parallax)(\\s|fade-in|fade-in-scroll|float-in-bottom|float-in-top|fly-in-bottom|fly-in-left|fly-in-right|fly-in-top|parallax)*', ), 'aria-activedescendant' => array(), 'aria-atomic' => array(), 'aria-autocomplete' => array(), 'aria-busy' => array(), 'aria-checked' => array(), 'aria-controls' => array(), 'aria-current' => array(), 'aria-describedby' => array(), 'aria-disabled' => array(), 'aria-dropeffect' => array(), 'aria-expanded' => array(), 'aria-flowto' => array(), 'aria-grabbed' => array(), 'aria-haspopup' => array(), 'aria-hidden' => array(), 'aria-invalid' => array(), 'aria-label' => array(), 'aria-labelledby' => array(), 'aria-level' => array(), 'aria-live' => array(), 'aria-multiline' => array(), 'aria-multiselectable' => array(), 'aria-orientation' => array(), 'aria-owns' => array(), 'aria-posinset' => array(), 'aria-pressed' => array(), 'aria-readonly' => array(), 'aria-relevant' => array(), 'aria-required' => array(), 'aria-selected' => array(), 'aria-setsize' => array(), 'aria-sort' => array(), 'aria-valuemax' => array(), 'aria-valuemin' => array(), 'aria-valuenow' => array(), 'aria-valuetext' => array(), 'autoscroll' => array(), 'class' => array(), 'content' => array(), 'data-amp-bind-aria-activedescendant' => array(), 'data-amp-bind-aria-atomic' => array(), 'data-amp-bind-aria-autocomplete' => array(), 'data-amp-bind-aria-busy' => array(), 'data-amp-bind-aria-checked' => array(), 'data-amp-bind-aria-controls' => array(), 'data-amp-bind-aria-describedby' => array(), 'data-amp-bind-aria-disabled' => array(), 'data-amp-bind-aria-dropeffect' => array(), 'data-amp-bind-aria-expanded' => array(), 'data-amp-bind-aria-flowto' => array(), 'data-amp-bind-aria-grabbed' => array(), 'data-amp-bind-aria-haspopup' => array(), 'data-amp-bind-aria-hidden' => array(), 'data-amp-bind-aria-invalid' => array(), 'data-amp-bind-aria-label' => array(), 'data-amp-bind-aria-labelledby' => array(), 'data-amp-bind-aria-level' => array(), 'data-amp-bind-aria-live' => array(), 'data-amp-bind-aria-multiline' => array(), 'data-amp-bind-aria-multiselectable' => array(), 'data-amp-bind-aria-orientation' => array(), 'data-amp-bind-aria-owns' => array(), 'data-amp-bind-aria-posinset' => array(), 'data-amp-bind-aria-pressed' => array(), 'data-amp-bind-aria-readonly' => array(), 'data-amp-bind-aria-relevant' => array(), 'data-amp-bind-aria-required' => array(), 'data-amp-bind-aria-selected' => array(), 'data-amp-bind-aria-setsize' => array(), 'data-amp-bind-aria-sort' => array(), 'data-amp-bind-aria-valuemax' => array(), 'data-amp-bind-aria-valuemin' => array(), 'data-amp-bind-aria-valuenow' => array(), 'data-amp-bind-aria-valuetext' => array(), 'data-amp-bind-class' => array(), 'data-amp-bind-hidden' => array(), 'data-amp-bind-text' => array(), 'datatype' => array(), 'dir' => array(), 'draggable' => array(), 'fallback' => array( 'value' => array( '', ), ), 'hidden' => array( 'value' => array( '', ), ), 'i-amp-access-id' => array(), 'id' => array( 'disallowed_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|AMP|baseURI|checkValidity|childElementCount|childNodes|classList|className|clientHeight|clientLeft|clientTop|clientWidth|compareDocumentPosition|computedName|computedRole|contentEditable|createShadowRoot|enqueAction|firstChild|firstElementChild|getAnimations|getAttribute|getAttributeNS|getAttributeNode|getAttributeNodeNS|getBoundingClientRect|getClientRects|getDestinationInsertionPoints|getElementsByClassName|getElementsByTagName|getElementsByTagNameNS|getRootNode|hasAttribute|hasAttributeNS|hasAttributes|hasChildNodes|hasPointerCapture|i-amphtml-\\S*|innerHTML|innerText|inputMode|insertAdjacentElement|insertAdjacentHTML|insertAdjacentText|isContentEditable|isDefaultNamespace|isEqualNode|isSameNode|lastChild|lastElementChild|lookupNamespaceURI|namespaceURI|nextElementSibling|nextSibling|nodeName|nodeType|nodeValue|offsetHeight|offsetLeft|offsetParent|offsetTop|offsetWidth|outerHTML|outerText|ownerDocument|parentElement|parentNode|previousElementSibling|previousSibling|querySelector|querySelectorAll|releasePointerCapture|removeAttribute|removeAttributeNS|removeAttributeNode|removeChild|removeEventListener|replaceChild|reportValidity|requestPointerLock|scrollHeight|scrollIntoView|scrollIntoViewIfNeeded|scrollLeft|scrollWidth|setAttribute|setAttributeNS|setAttributeNode|setAttributeNodeNS|setPointerCapture|shadowRoot|styleMap|tabIndex|tagName|textContent|toString|valueOf|(webkit|ms|moz|o)dropzone|(webkit|moz|ms|o)MatchesSelector|(webkit|moz|ms|o)RequestFullScreen|(webkit|moz|ms|o)RequestFullscreen)(\\s|$)', ), 'inlist' => array(), 'itemid' => array(), 'itemprop' => array(), 'itemref' => array(), 'itemscope' => array(), 'itemtype' => array(), 'lang' => array(), 'next-page-hide' => array( 'requires_extension' => array( 'amp-next-page', ), ), 'next-page-replace' => array( 'requires_extension' => array( 'amp-next-page', ), ), 'on' => array(), 'overflow' => array(), 'placeholder' => array( 'value' => array( '', ), ), 'prefix' => array(), 'property' => array(), 'rel' => array( 'disallowed_value_regex' => '(^|\\s)(canonical|components|dns-prefetch|import|manifest|preconnect|preload|prerender|serviceworker|stylesheet|subresource)(\\s|$)', ), 'resource' => array(), 'rev' => array(), 'role' => array(), 'slot' => array(), 'style' => array(), 'subscriptions-action' => array( 'requires_extension' => array( 'amp-subscriptions', ), ), 'subscriptions-actions' => array( 'requires_extension' => array( 'amp-subscriptions', ), 'value' => array( '', ), ), 'subscriptions-decorate' => array( 'requires_extension' => array( 'amp-subscriptions', ), ), 'subscriptions-dialog' => array( 'requires_extension' => array( 'amp-subscriptions', ), 'value' => array( '', ), ), 'subscriptions-display' => array( 'requires_extension' => array( 'amp-subscriptions', ), ), 'subscriptions-google-rtc' => array( 'requires_extension' => array( 'amp-subscriptions-google', ), ), 'subscriptions-lang' => array( 'requires_extension' => array( 'amp-subscriptions', ), ), 'subscriptions-section' => array( 'requires_extension' => array( 'amp-subscriptions', ), 'value_casei' => array( 'actions', 'content', 'content-not-granted', 'loading', ), ), 'subscriptions-service' => array( 'requires_extension' => array( 'amp-subscriptions', ), ), 'tabindex' => array(), 'title' => array(), 'translate' => array(), 'typeof' => array(), 'validation-for' => array(), 'visible-when-invalid' => array( 'value' => array( 'badInput', 'customError', 'patternMismatch', 'rangeOverflow', 'rangeUnderflow', 'stepMismatch', 'tooLong', 'tooShort', 'typeMismatch', 'valueMissing', ), ), 'vocab' => array(), ); private static $reference_points = array( 'AMP-BASE-CAROUSEL lightbox [child]' => array( 'attr_spec_list' => array( 'lightbox-thumbnail-id' => array( 'value_regex_casei' => '^[a-z][a-z\\d_-]*', ), ), 'tag_spec' => array( 'spec_name' => 'AMP-BASE-CAROUSEL lightbox [child]', ), ), 'AMP-BASE-CAROUSEL lightbox [lightbox-exclude]' => array( 'attr_spec_list' => array( 'lightbox-exclude' => array( 'mandatory' => true, ), ), 'tag_spec' => array( 'spec_name' => 'AMP-BASE-CAROUSEL lightbox [lightbox-exclude]', ), ), 'AMP-CAROUSEL lightbox [child]' => array( 'attr_spec_list' => array( 'lightbox-thumbnail-id' => array( 'value_regex_casei' => '^[a-z][a-z\\d_-]*', ), ), 'tag_spec' => array( 'spec_name' => 'AMP-CAROUSEL lightbox [child]', ), ), 'AMP-CAROUSEL lightbox [lightbox-exclude]' => array( 'attr_spec_list' => array( 'lightbox-exclude' => array( 'mandatory' => true, ), ), 'tag_spec' => array( 'spec_name' => 'AMP-CAROUSEL lightbox [lightbox-exclude]', ), ), 'AMP-LIVE-LIST [items]' => array( 'attr_spec_list' => array( 'items' => array( 'mandatory' => true, ), ), 'tag_spec' => array( 'reference_points' => array( 'AMP-LIVE-LIST [items] item' => array( 'mandatory' => false, 'unique' => false, ), ), 'spec_name' => 'AMP-LIVE-LIST [items]', 'spec_url' => 'https://amp.dev/documentation/components/amp-live-list/#items', ), ), 'AMP-LIVE-LIST [items] item' => array( 'attr_spec_list' => array( 'data-sort-time' => array( 'mandatory' => true, ), 'data-tombstone' => array(), 'data-update-time' => array(), 'id' => array( 'disallowed_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|AMP|baseURI|checkValidity|childElementCount|childNodes|classList|className|clientHeight|clientLeft|clientTop|clientWidth|compareDocumentPosition|computedName|computedRole|contentEditable|createShadowRoot|enqueAction|firstChild|firstElementChild|getAnimations|getAttribute|getAttributeNS|getAttributeNode|getAttributeNodeNS|getBoundingClientRect|getClientRects|getDestinationInsertionPoints|getElementsByClassName|getElementsByTagName|getElementsByTagNameNS|getRootNode|hasAttribute|hasAttributeNS|hasAttributes|hasChildNodes|hasPointerCapture|i-amphtml-\\S*|innerHTML|innerText|inputMode|insertAdjacentElement|insertAdjacentHTML|insertAdjacentText|isContentEditable|isDefaultNamespace|isEqualNode|isSameNode|lastChild|lastElementChild|lookupNamespaceURI|namespaceURI|nextElementSibling|nextSibling|nodeName|nodeType|nodeValue|offsetHeight|offsetLeft|offsetParent|offsetTop|offsetWidth|outerHTML|outerText|ownerDocument|parentElement|parentNode|previousElementSibling|previousSibling|querySelector|querySelectorAll|releasePointerCapture|removeAttribute|removeAttributeNS|removeAttributeNode|removeChild|removeEventListener|replaceChild|reportValidity|requestPointerLock|scrollHeight|scrollIntoView|scrollIntoViewIfNeeded|scrollLeft|scrollWidth|setAttribute|setAttributeNS|setAttributeNode|setAttributeNodeNS|setPointerCapture|shadowRoot|styleMap|tabIndex|tagName|textContent|toString|valueOf|(webkit|ms|moz|o)dropzone|(webkit|moz|ms|o)MatchesSelector|(webkit|moz|ms|o)RequestFullScreen|(webkit|moz|ms|o)RequestFullscreen)(\\s|$)', 'mandatory' => true, ), ), 'tag_spec' => array( 'spec_name' => 'AMP-LIVE-LIST [items] item', 'spec_url' => 'https://amp.dev/documentation/components/amp-live-list/#items', ), ), 'AMP-LIVE-LIST [pagination]' => array( 'attr_spec_list' => array( 'pagination' => array( 'mandatory' => true, ), ), 'tag_spec' => array( 'spec_name' => 'AMP-LIVE-LIST [pagination]', 'spec_url' => 'https://amp.dev/documentation/components/amp-live-list/#pagination', ), ), 'AMP-LIVE-LIST [update]' => array( 'attr_spec_list' => array( 'update' => array( 'mandatory' => true, ), ), 'tag_spec' => array( 'spec_name' => 'AMP-LIVE-LIST [update]', 'spec_url' => 'https://amp.dev/documentation/components/amp-live-list/#update', ), ), 'AMP-MEGA-MENU > AMP-LIST' => array( 'attr_spec_list' => array( 'data-amp-bind-src' => array(), 'src' => array(), ), 'tag_spec' => array( 'child_tags' => array( 'child_tag_name_oneof' => array( 'template', ), 'mandatory_num_child_tags' => 1, ), 'mandatory_anyof' => array( 'data-amp-bind-src', 'src', ), 'reference_points' => array( 'AMP-MEGA-MENU > AMP-LIST > TEMPLATE' => array( 'mandatory' => false, 'unique' => false, ), ), 'spec_name' => 'AMP-MEGA-MENU > AMP-LIST', ), ), 'AMP-MEGA-MENU > AMP-LIST > TEMPLATE' => array( 'attr_spec_list' => array(), 'tag_spec' => array( 'child_tags' => array( 'child_tag_name_oneof' => array( 'nav', ), 'mandatory_num_child_tags' => 1, ), 'mandatory_parent' => 'amp-list', 'reference_points' => array( 'AMP-MEGA-MENU > NAV' => array( 'mandatory' => false, 'unique' => false, ), ), 'spec_name' => 'AMP-MEGA-MENU > AMP-LIST > TEMPLATE', ), ), 'AMP-MEGA-MENU > NAV' => array( 'attr_spec_list' => array(), 'tag_spec' => array( 'child_tags' => array( 'child_tag_name_oneof' => array( 'ol', 'ul', ), 'mandatory_num_child_tags' => 1, ), 'reference_points' => array( 'AMP-MEGA-MENU NAV > UL/OL' => array( 'mandatory' => false, 'unique' => false, ), ), 'spec_name' => 'AMP-MEGA-MENU > NAV', ), ), 'AMP-MEGA-MENU NAV > UL/OL' => array( 'attr_spec_list' => array(), 'tag_spec' => array( 'child_tags' => array( 'child_tag_name_oneof' => array( 'li', ), 'mandatory_min_num_child_tags' => 1, ), 'mandatory_parent' => 'nav', 'reference_points' => array( 'AMP-MEGA-MENU NAV > UL/OL > LI' => array( 'mandatory' => false, 'unique' => false, ), ), 'spec_name' => 'AMP-MEGA-MENU NAV > UL/OL', ), ), 'AMP-MEGA-MENU NAV > UL/OL > LI' => array( 'attr_spec_list' => array(), 'tag_spec' => array( 'child_tags' => array( 'child_tag_name_oneof' => array( 'a', 'button', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span', ), 'mandatory_min_num_child_tags' => 1, ), 'reference_points' => array( 'AMP-MEGA-MENU item-content' => array( 'mandatory' => false, 'unique' => true, ), 'AMP-MEGA-MENU item-heading' => array( 'mandatory' => true, 'unique' => true, ), ), 'spec_name' => 'AMP-MEGA-MENU NAV > UL/OL > LI', ), ), 'AMP-MEGA-MENU item-content' => array( 'attr_spec_list' => array( 'role' => array( 'mandatory' => true, 'value' => array( 'dialog', ), ), ), 'tag_spec' => array( 'spec_name' => 'AMP-MEGA-MENU item-content', ), ), 'AMP-MEGA-MENU item-heading' => array( 'attr_spec_list' => array( 'role' => array( 'value' => array( 'button', ), ), ), 'tag_spec' => array( 'spec_name' => 'AMP-MEGA-MENU item-heading', ), ), 'AMP-NEXT-PAGE > [footer]' => array( 'attr_spec_list' => array( 'footer' => array( 'mandatory' => true, ), ), 'tag_spec' => array( 'mandatory_parent' => 'amp-next-page', 'spec_name' => 'AMP-NEXT-PAGE > [footer]', ), ), 'AMP-NEXT-PAGE > [recommendation-box]' => array( 'attr_spec_list' => array( 'recommendation-box' => array( 'mandatory' => true, ), ), 'tag_spec' => array( 'mandatory_parent' => 'amp-next-page', 'spec_name' => 'AMP-NEXT-PAGE > [recommendation-box]', ), ), 'AMP-NEXT-PAGE > [separator]' => array( 'attr_spec_list' => array( 'separator' => array( 'mandatory' => true, ), ), 'tag_spec' => array( 'mandatory_parent' => 'amp-next-page', 'spec_name' => 'AMP-NEXT-PAGE > [separator]', ), ), 'AMP-SELECTOR child' => array( 'attr_spec_list' => array(), 'tag_spec' => array( 'reference_points' => array( 'AMP-SELECTOR child' => array( 'mandatory' => false, 'unique' => false, ), 'AMP-SELECTOR option' => array( 'mandatory' => false, 'unique' => false, ), ), 'spec_name' => 'AMP-SELECTOR child', ), ), 'AMP-SELECTOR option' => array( 'attr_spec_list' => array( 'disabled' => array( 'value' => array( '', ), ), 'option' => array( 'mandatory' => true, ), 'selected' => array( 'value' => array( '', ), ), ), 'tag_spec' => array( 'spec_name' => 'AMP-SELECTOR option', 'spec_url' => 'https://amp.dev/documentation/components/amp-selector/', ), ), 'AMP-STORY-CTA-LAYER animate-in' => array( 'attr_spec_list' => array( 'animate-in' => array( 'value' => array( 'drop', 'fade-in', 'fly-in-bottom', 'fly-in-left', 'fly-in-right', 'fly-in-top', 'pan-down', 'pan-left', 'pan-right', 'pan-up', 'pulse', 'rotate-in-left', 'rotate-in-right', 'scale-fade-down', 'scale-fade-up', 'twirl-in', 'whoosh-in-left', 'whoosh-in-right', 'zoom-in', 'zoom-out', ), ), 'animate-in-after' => array(), 'animate-in-delay' => array(), 'animate-in-duration' => array(), 'animate-in-timing-function' => array(), 'scale-end' => array( 'value_regex' => '[0-9]+([.][0-9]+)?', ), 'scale-start' => array( 'value_regex' => '[0-9]+([.][0-9]+)?', ), 'translate-x' => array( 'value_regex_casei' => '[0-9]+px', ), 'translate-y' => array( 'value_regex_casei' => '[0-9]+px', ), ), 'tag_spec' => array( 'reference_points' => array( 'AMP-STORY-CTA-LAYER animate-in' => array( 'mandatory' => false, 'unique' => false, ), ), 'spec_name' => 'AMP-STORY-CTA-LAYER animate-in', 'spec_url' => 'https://amp.dev/documentation/components/amp-story/', ), ), 'AMP-STORY-GRID-LAYER animate-in' => array( 'attr_spec_list' => array( 'animate-in' => array( 'value' => array( 'drop', 'fade-in', 'fly-in-bottom', 'fly-in-left', 'fly-in-right', 'fly-in-top', 'pan-down', 'pan-left', 'pan-right', 'pan-up', 'pulse', 'rotate-in-left', 'rotate-in-right', 'scale-fade-down', 'scale-fade-up', 'twirl-in', 'whoosh-in-left', 'whoosh-in-right', 'zoom-in', 'zoom-out', ), ), 'animate-in-after' => array(), 'animate-in-delay' => array(), 'animate-in-duration' => array(), 'animate-in-timing-function' => array(), 'data-tooltip-icon' => array( 'value_url' => array( 'protocol' => array( 'http', 'https', 'data', ), ), ), 'interactive' => array( 'value' => array( '', ), ), 'scale-end' => array( 'value_regex' => '[0-9]+([.][0-9]+)?', ), 'scale-start' => array( 'value_regex' => '[0-9]+([.][0-9]+)?', ), 'target' => array( 'value' => array( '_blank', ), ), 'translate-x' => array( 'value_regex_casei' => '[0-9]+px', ), 'translate-y' => array( 'value_regex_casei' => '[0-9]+px', ), ), 'tag_spec' => array( 'reference_points' => array( 'AMP-STORY-GRID-LAYER animate-in' => array( 'mandatory' => false, 'unique' => false, ), ), 'spec_name' => 'AMP-STORY-GRID-LAYER animate-in', 'spec_url' => 'https://amp.dev/documentation/components/amp-story/', ), ), 'AMP-STORY-GRID-LAYER default' => array( 'attr_spec_list' => array( 'align-content' => array( 'value' => array( 'center', 'end', 'space-around', 'space-between', 'space-evenly', 'start', 'stretch', ), ), 'align-items' => array( 'value' => array( 'center', 'end', 'start', 'stretch', ), ), 'align-self' => array( 'value' => array( 'center', 'end', 'start', 'stretch', ), ), 'animate-in' => array( 'value' => array( 'drop', 'fade-in', 'fly-in-bottom', 'fly-in-left', 'fly-in-right', 'fly-in-top', 'pan-down', 'pan-left', 'pan-right', 'pan-up', 'pulse', 'rotate-in-left', 'rotate-in-right', 'scale-fade-down', 'scale-fade-up', 'twirl-in', 'whoosh-in-left', 'whoosh-in-right', 'zoom-in', 'zoom-out', ), ), 'animate-in-after' => array(), 'animate-in-delay' => array(), 'animate-in-duration' => array(), 'animate-in-timing-function' => array(), 'data-tooltip-icon' => array( 'value_url' => array( 'protocol' => array( 'http', 'https', 'data', ), ), ), 'grid-area' => array(), 'interactive' => array( 'value' => array( '', ), ), 'justify-content' => array( 'value' => array( 'center', 'end', 'space-around', 'space-between', 'space-evenly', 'start', 'stretch', ), ), 'justify-items' => array( 'value' => array( 'center', 'end', 'start', 'stretch', ), ), 'justify-self' => array( 'value' => array( 'center', 'end', 'start', 'stretch', ), ), 'scale-end' => array( 'value_regex' => '[0-9]+([.][0-9]+)?', ), 'scale-start' => array( 'value_regex' => '[0-9]+([.][0-9]+)?', ), 'target' => array( 'value' => array( '_blank', ), ), 'translate-x' => array( 'value_regex_casei' => '[0-9]+px', ), 'translate-y' => array( 'value_regex_casei' => '[0-9]+px', ), ), 'tag_spec' => array( 'reference_points' => array( 'AMP-STORY-GRID-LAYER animate-in' => array( 'mandatory' => false, 'unique' => false, ), ), 'spec_name' => 'AMP-STORY-GRID-LAYER default', 'spec_url' => 'https://amp.dev/documentation/components/amp-story/', ), ), ); /** * Get allowed tags. * * @since 0.5 * @return array Allowed tags. */ public static function get_allowed_tags() { return self::$allowed_tags; } /** * Get extension specs. * * @since 1.5 * @internal * @return array Extension specs, keyed by extension name. */ public static function get_extension_specs() { static $extension_specs = []; if ( ! empty( $extension_specs ) ) { return $extension_specs; } foreach ( self::get_allowed_tag( 'script' ) as $script_spec ) { if ( isset( $script_spec[ AMP_Rule_Spec::TAG_SPEC ]['extension_spec'] ) ) { $extension_specs[ $script_spec[ AMP_Rule_Spec::TAG_SPEC ]['extension_spec']['name'] ] = $script_spec[ AMP_Rule_Spec::TAG_SPEC ]['extension_spec']; } } return $extension_specs; } /** * Get allowed tag. * * Get the rules for a single tag so that the entire data structure needn't be passed around. * * @since 0.7 * @param string $node_name Tag name. * @return array|null Allowed tag, or null if the tag does not exist. */ public static function get_allowed_tag( $node_name ) { if ( isset( self::$allowed_tags[ $node_name ] ) ) { return self::$allowed_tags[ $node_name ]; } return null; } /** * Get descendant tag lists. * * @since 1.1 * @return array Descendant tags list. */ public static function get_descendant_tag_lists() { return self::$descendant_tag_lists; } /** * Get allowed descendant tag list for a tag. * * Get the descendant rules for a single tag so that the entire data structure needn't be passed around. * * @since 1.1 * @param string $name Name for the descendants list. * @return array|bool Allowed tags list, or false if there are no restrictions. */ public static function get_descendant_tag_list( $name ) { if ( isset( self::$descendant_tag_lists[ $name ] ) ) { return self::$descendant_tag_lists[ $name ]; } return false; } /** * Get reference point spec. * * @since 1.0 * @param string $tag_spec_name Tag spec name. * @return array|null Reference point spec, or null if does not exist. */ public static function get_reference_point_spec( $tag_spec_name ) { if ( isset( self::$reference_points[ $tag_spec_name ] ) ) { return self::$reference_points[ $tag_spec_name ]; } return null; } /** * Get list of globally-allowed attributes. * * @since 0.5 * @return array Allowed tag. */ public static function get_allowed_attributes() { return self::$globally_allowed_attrs; } /** * Get layout attributes. * * @since 0.5 * @return array Allowed tag. */ public static function get_layout_attributes() { return self::$layout_allowed_attrs; } }