Version Description
Download this release
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.97.1 |
Comparing to | |
See all releases |
Code changes from version 0.9.97 to 0.9.97.1
- README.md +3 -98
- accelerated-moblie-pages.php +43 -124
- base_remover/base_remover.php +1 -1
- base_remover/dependencyScript.js +1 -1
- classes/class-ampforwp-instagram-sanitizer.php +1 -1
- classes/class-ampforwp-youtube-embed.php +6 -4
- components/author-box/author-box.php +3 -5
- components/comments/comments.php +51 -125
- components/components-core.php +4 -15
- components/logo/logo.php +2 -2
- components/loop/loop.php +4 -31
- components/post-pagination/post-pagination.php +22 -0
- components/related-posts/related-posts.php +55 -63
- images/d-1.png +0 -0
- images/d-2.png +0 -0
- images/d-3.png +0 -0
- images/d-4.png +0 -0
- images/feature-1.png +0 -0
- images/layouts-7.png +0 -0
- images/layouts-8.png +0 -0
- images/layouts-9.png +0 -0
- images/wpf.png +0 -0
- includes/admin-script.js +21 -76
- includes/admin-style.css +2 -76
- includes/amp-consent/consent.php +0 -3
- includes/icons/amp-icons.php +1 -3
- includes/options/admin-config.php +91 -605
- includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.css +0 -1
- includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.js +0 -54
- includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.min.js +0 -1
- includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.php +0 -210
- includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.scss +0 -13
- includes/options/extensions/checkbox_hierarchy/extension_checkbox_hierarchy.php +0 -110
- includes/options/redux-core/assets/css/redux-admin.css +1 -8
- includes/options/redux-core/core/enqueue.php +8 -8
- includes/options/redux-core/inc/extensions/import_export/import_export/field_import_export.php +3 -7
- includes/options/redux-core/inc/fields/ace_editor/field_ace_editor.php +2 -7
- includes/options/redux-core/inc/fields/checkbox/field_checkbox.php +2 -7
- includes/options/redux-core/inc/fields/color/field_color.php +1 -6
- includes/options/redux-core/inc/fields/color_rgba/field_color_rgba.php +2 -6
- includes/options/redux-core/inc/fields/image_select/field_image_select.php +2 -7
- includes/options/redux-core/inc/fields/media/field_media.php +1 -6
- includes/options/redux-core/inc/fields/select/field_select.php +2 -7
- includes/options/redux-core/inc/fields/spacing/field_spacing.php +2 -6
- includes/options/redux-core/inc/fields/switch/field_switch.php +2 -6
- includes/options/redux-custom.css +0 -3
- includes/redirect.php +1 -19
- includes/thirdparty-compatibility.php +1 -155
- includes/updater/update.php +127 -8
- includes/vendor/amp/back-compat/templates-v0-3/meta-author.php +1 -1
- includes/vendor/amp/includes/class-amp-content.php +14 -15
- includes/vendor/amp/includes/class-amp-post-template.php +0 -6
- includes/vendor/amp/includes/embeds/class-amp-dailymotion-embed.php +6 -5
- includes/vendor/amp/includes/embeds/class-amp-facebook-embed.php +7 -5
- includes/vendor/amp/includes/embeds/class-amp-instagram-embed.php +7 -4
- includes/vendor/amp/includes/embeds/class-amp-pinterest-embed.php +7 -4
- includes/vendor/amp/includes/embeds/class-amp-soundcloud-embed.php +7 -4
- includes/vendor/amp/includes/embeds/class-amp-twitter-embed.php +7 -4
- includes/vendor/amp/includes/embeds/class-amp-vimeo-embed.php +7 -5
- includes/vendor/amp/includes/embeds/class-amp-vine-embed.php +7 -4
- includes/vendor/amp/includes/embeds/class-amp-wistia-embed.php +0 -103
- includes/vendor/amp/includes/embeds/class-amp-youtube-embed.php +7 -5
- includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php +0 -10776
- includes/vendor/amp/includes/sanitizers/class-amp-base-sanitizer.php +0 -65
- includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php +0 -5
- includes/vendor/amp/includes/sanitizers/class-amp-iframe-sanitizer.php +3 -1
- includes/vendor/amp/includes/sanitizers/class-amp-playbuzz-sanitizer.php +3 -1
- includes/vendor/amp/includes/sanitizers/class-amp-rule-spec.php +0 -154
- includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php +0 -1643
- includes/vendor/amp/includes/sanitizers/class-amp-video-sanitizer.php +3 -1
- includes/vendor/amp/includes/utils/class-amp-dom-utils.php +48 -469
- includes/vendor/amp/templates/meta-author.php +1 -1
- includes/vendor/vendor-changelog.txt +1 -3
- pagebuilder/amp-page-builder.php +1 -4
- pagebuilder/components/fieldsTemplate.php +6 -26
- pagebuilder/components/modulePopupTemplate.php +1 -10
- pagebuilder/components/modulesHtmlTemplate.php +1 -10
- pagebuilder/config/moduleTemplate.php +7 -356
- pagebuilder/inc/admin-amp-page-builder.css +7 -35
- pagebuilder/inc/admin-amp-page-builder.js +2 -91
- pagebuilder/inc/amppb_save_data.php +1 -1
- pagebuilder/inc/viewShowFrontData.php +8 -26
- pagebuilder/modules/accordion-mod-module.php +1 -1
- pagebuilder/modules/adsense-ad-module.php +0 -77
- pagebuilder/modules/blurb-mod-module.php +2 -30
- pagebuilder/modules/button-mod-module.php +4 -35
- pagebuilder/modules/code-module.php +0 -58
- pagebuilder/modules/contact-form-shortcode-module.php +0 -169
- pagebuilder/modules/contents-module.php +30 -42
- pagebuilder/modules/feature-mod-module.php +8 -153
- pagebuilder/modules/slider-mod-module.php +3 -11
- readme.txt +3 -98
- templates/design-manager/design-1/archive.php +1 -1
- templates/design-manager/design-1/elements/comments.php +6 -5
- templates/design-manager/design-1/elements/content.php +15 -2
- templates/design-manager/design-1/elements/meta-info.php +3 -5
- templates/design-manager/design-1/elements/meta-taxonomy.php +1 -1
- templates/design-manager/design-1/elements/related-posts.php +104 -119
- templates/design-manager/design-1/elements/social-icons.php +8 -22
- templates/design-manager/design-1/index.php +1 -1
- templates/design-manager/design-1/search.php +1 -2
- templates/design-manager/design-1/style.php +3 -5
- templates/design-manager/design-2/archive.php +20 -12
- templates/design-manager/design-2/elements/comments.php +6 -5
- templates/design-manager/design-2/elements/content.php +15 -2
- templates/design-manager/design-2/elements/meta-info.php +1 -3
- templates/design-manager/design-2/elements/meta-taxonomy.php +1 -1
- templates/design-manager/design-2/elements/related-posts.php +101 -123
- templates/design-manager/design-2/elements/social-icons.php +1 -15
- templates/design-manager/design-2/index.php +23 -12
- templates/design-manager/design-2/search.php +20 -24
- templates/design-manager/design-2/style.php +11 -9
- templates/design-manager/design-3/archive.php +22 -23
- templates/design-manager/design-3/elements/comments.php +5 -5
- templates/design-manager/design-3/elements/content.php +16 -3
- templates/design-manager/design-3/elements/meta-info.php +1 -3
- templates/design-manager/design-3/elements/meta-taxonomy.php +1 -1
- templates/design-manager/design-3/elements/related-posts.php +106 -127
- templates/design-manager/design-3/elements/social-icons.php +2 -16
- templates/design-manager/design-3/index.php +34 -38
- templates/design-manager/design-3/search.php +21 -23
- templates/design-manager/design-3/style.php +8 -11
- templates/design-manager/swift/fonts/icomoon.ttf +0 -0
- templates/design-manager/swift/footer.php +6 -21
- templates/design-manager/swift/index.php +2 -2
- templates/design-manager/swift/loop.php +1 -1
- templates/design-manager/swift/page.php +1 -134
- templates/design-manager/swift/single.php +0 -20
- templates/design-manager/swift/style.php +15 -99
- templates/features.php +367 -791
- templates/frontpage-elements.php +6 -30
README.md
CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9.5
|
7 |
-
Stable tag: 0.9.97
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -183,103 +183,8 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
183 |
|
184 |
== Changelog ==
|
185 |
|
186 |
-
= 0.9.
|
187 |
-
*
|
188 |
-
* Fixed: Extraposition attribute left in CSS Design #2 #2119
|
189 |
-
* Fixed: Non-AMP header link not working #2109
|
190 |
-
* Added: Create an Ad Above the Post Content #2155
|
191 |
-
* Fixed: "AGO" text was not translatable #2158
|
192 |
-
* Added: Filter created `ampforwp_header_url` to modify logo url #2141
|
193 |
-
* Fixed: Removing the text "amp" in footer view non-amp-link #2158
|
194 |
-
* Added: Compatibility WP user Avatar plugin added #2011
|
195 |
-
* Fixed: Design 2 - meta info producing a block of empty HTML #1969 #1954
|
196 |
-
* Added: Pocket and Hatena Bookmark social share buttons Added #1652
|
197 |
-
* Fixed: External Links are appended with "amp" at the end of the url in content. #2174
|
198 |
-
* Fixed: Some Issues Found in Design #3 #2130
|
199 |
-
* Fixed: ScoopVersion: 1.4 By boostdevelopers theme displaying the error only in the category #1683
|
200 |
-
* Fixed: Page featured Image is not displaying in the Swift theme #2136
|
201 |
-
* Fixed: Dropcap breaking the youtube embed code #2157
|
202 |
-
* Fixed: Bulk hide by default option is requires Permalinks to be saved #2145
|
203 |
-
* Fixed: Fully compatibility with muffin page builder #2180
|
204 |
-
* Fixed: Incontent Related Post Issues #2078
|
205 |
-
* Fixed: Search page should not have AMP version of the page and not in search result #2191
|
206 |
-
* Added: Control added to modify Retina Images resolutions #2099
|
207 |
-
* Added: Created an option to duplicate a page builder element #1986
|
208 |
-
* Added: Image Caption is not displaying below the Image in design 1,2,3 #2101
|
209 |
-
* Fixed: Post pagination not working properly in D1, D2 and D3 #2168 #2243
|
210 |
-
* Fixed: Auto re-save permalink if the options in reading setting page get changed #2190
|
211 |
-
* Fixed: Leave a comment not looking good in Swift theme #2150
|
212 |
-
* Added: Social icons for pages. #2162
|
213 |
-
* Added: Create an option to pull canonical from Yoast #2118
|
214 |
-
* Added: Full Support for All in one SEO #1720
|
215 |
-
* Fixed: Single with sidebar CSS should only load if that layout type is selected #2091
|
216 |
-
* Fixed: Required Filed is not working in the Repeater in Page builder #2217
|
217 |
-
* Fixed: alt in `<div>` causing validation errors. #2093
|
218 |
-
* Added: Drop Down Menu Support in Swift Header Menu #2095
|
219 |
-
* Added: Parallax Setting Added in PageBuilder #2095
|
220 |
-
* Added: Multiple Layout Settings added in Feature Module in Page Builder #2095
|
221 |
-
* Added: Add the option changing the sliding speed of slider in "Slider module" of AMP Page Builder #2218
|
222 |
-
* Added: Created an option Related Post link in non amp #2201
|
223 |
-
* Fixed: Removed Jannah LazyLoad on AMP Mode #2224
|
224 |
-
* Fixed: Custom post types with custom taxonomy not working in AMP #2209
|
225 |
-
* Fixed: frontpage and homepage not working properly AMP take over #2153 #2277
|
226 |
-
* Added: Button field created in Feature module #2068
|
227 |
-
* Added: Excerpt should also work on homepage and categories page #2176
|
228 |
-
* Fixed: Options panel breaks in when RTL in WP Dashboard #2176
|
229 |
-
* Fixed: Featured image from Custom fields in page builder Category module #2237
|
230 |
-
* Added: Forms Module Support added in PageBuilder #2221
|
231 |
-
* Fixed: Paginated AMP URL on the category are opening to 404-page #2233
|
232 |
-
* Fixed: Ads not displaying properly in RTL #2227 #2138
|
233 |
-
* Fixed: single quotation (') in text module breaking AMP page builder #1940
|
234 |
-
* Added: Filter created to modify `ampforwp_loop_image_update` image arguments in components of AMP theme framework #2057
|
235 |
-
* Added: Option to change the locale of Facebook comments #2127
|
236 |
-
* Added: Search option in options panel #2088
|
237 |
-
* Fixed: Accordion not working when the user enters some data in Description with HTML Tags #2088 #2097
|
238 |
-
* Fixed: Internal links now working with ?amp=1 #2204
|
239 |
-
* Fixed: UTM Parameters not working properly with AMP #2223
|
240 |
-
* Fixed: Multiple Slider module of AMP Page builder not working #2090
|
241 |
-
* Fixed: Hide AMP by categories option should hide by default in the backend of that specific post #2112
|
242 |
-
* Added: IP Anonymization in Google analytics #2135
|
243 |
-
* Fixed: Improvement in the styling of AMP option panel #2102
|
244 |
-
* Added: Added new fonts control for Content in Single page #2122
|
245 |
-
* Fixed: Legacy page builder button styling is not loading properly #2036
|
246 |
-
* Added: Filter added so we can disable Comments on specific pages `ampforwp_comments_visibility` #2170
|
247 |
-
* Fixed: Improvement in Excerpt on small screen option #2034
|
248 |
-
* Added: Comments on Pages #2229
|
249 |
-
* Fixed: Pagination not working for some websites #2241
|
250 |
-
* Fixed: "Menu" option in Footer connected with Swift #2146
|
251 |
-
* Added: Wistia Support #1875
|
252 |
-
* Added: Add option in page builder to give the specific name to all modules #2251
|
253 |
-
* Added: Compatibility with Muffin Builder #2137
|
254 |
-
* Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
|
255 |
-
* Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
|
256 |
-
* Added: Render all the AMP Components added in Post Editor #2216 #2228
|
257 |
-
* Fixed: "Gap" Module of ThemeCo breaking the AMP pages #2220
|
258 |
-
* Added: Search widget compatibility #2143
|
259 |
-
* Added: Advertisement Module created in AMP Pagebuilder #2131
|
260 |
-
* Fixed: Performance issue with the function `ampforwp_get_comments_gravatar` #2234
|
261 |
-
* Fixed: Empty the amp pages, when the Clearfy HTML compress is enabled #2110
|
262 |
-
* Fixed: The attribute 'value' appearing in tag 'a' throwing the validation error #2262
|
263 |
-
* Fixed: Versioning of Styles and Scripts of redux-core #2126
|
264 |
-
* Added: Related Posts based on X days #2132
|
265 |
-
* Fixed: Warning in custom-sanitizer.php #2173
|
266 |
-
* Added: vuukle comment support #2075
|
267 |
-
* Fixed: Facebook Comment should not appear on the Checkout page, Add to cart page, or shop page #2170
|
268 |
-
* Added: SpotIM comment support #2075
|
269 |
-
* Added: Additional Controls added in Design3 Featured slider #2222
|
270 |
-
* Fixed: Username in AMP Option panel color was too light #2266
|
271 |
-
* Added: Settings created to modify H1 to H6 #2059
|
272 |
-
* Fixed: AMP_QUERY_VAR debug issue #2265
|
273 |
-
* Added: Custom page template in AMP #1923
|
274 |
-
* Fixed: Comments Button is not displaying in Design #3 #2163
|
275 |
-
* Added: Ability to add Forms Shortcodes in footer Widgets #2226
|
276 |
-
* Added: Option to add rel="nofollow" in AMP page builder button module #2239
|
277 |
-
* Added: Background video option in amp page builder #2195
|
278 |
-
* Fixed: Drop Down Menu Support in Swift Header Menu #2095
|
279 |
-
* Fixed: Yoast Description not getting added in AMP #2159
|
280 |
-
* Fixed: Improvement in styling of AMP option panel #2102
|
281 |
-
* Fixed: Hide AMP Bulk Tools Improvements #1867
|
282 |
-
* Added: Compatibility with the Relevanssi Plugin #1503
|
283 |
|
284 |
= 0.9.96 (2nd June 2018) =
|
285 |
* Added: Fully GDPR Compliance
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9.5
|
7 |
+
Stable tag: 0.9.97.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
183 |
|
184 |
== Changelog ==
|
185 |
|
186 |
+
= 0.9.96.1 (21st June 2018) =
|
187 |
+
* Fixed: Pagination on Homepage and Archive pages not working for some cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
= 0.9.96 (2nd June 2018) =
|
190 |
* Added: Fully GDPR Compliance
|
accelerated-moblie-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP for WP - Accelerated Mobile Pages for WordPress
|
6 |
-
Version: 0.9.97
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
@@ -19,7 +19,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
|
|
19 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
20 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
21 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
22 |
-
define('AMPFORWP_VERSION','0.9.97');
|
23 |
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
@@ -92,7 +92,7 @@ function ampforwp_add_custom_rewrite_rules() {
|
|
92 |
// For Homepage with Pagination
|
93 |
add_rewrite_rule(
|
94 |
'amp/page/([0-9]{1,})/?$',
|
95 |
-
'index.php?amp
|
96 |
'top'
|
97 |
);
|
98 |
|
@@ -100,13 +100,13 @@ function ampforwp_add_custom_rewrite_rules() {
|
|
100 |
if( ampforwp_name_blog_page() ) {
|
101 |
add_rewrite_rule(
|
102 |
ampforwp_name_blog_page(). '/amp/page/([0-9]{1,})/?$',
|
103 |
-
'index.php?amp
|
104 |
'top'
|
105 |
);
|
106 |
// Pagination to work with Extensions like.hml
|
107 |
add_rewrite_rule(
|
108 |
ampforwp_name_blog_page(). '(.+?)/amp/page/([0-9]{1,})/?$',
|
109 |
-
'index.php?amp
|
110 |
'top'
|
111 |
);
|
112 |
}
|
@@ -114,7 +114,7 @@ function ampforwp_add_custom_rewrite_rules() {
|
|
114 |
// For Author pages
|
115 |
add_rewrite_rule(
|
116 |
'author\/([^/]+)\/amp\/?$',
|
117 |
-
'index.php?amp
|
118 |
'top'
|
119 |
);
|
120 |
add_rewrite_rule(
|
@@ -133,13 +133,13 @@ function ampforwp_add_custom_rewrite_rules() {
|
|
133 |
|
134 |
add_rewrite_rule(
|
135 |
$rewrite_category.'\/(.+?)\/amp/?$',
|
136 |
-
'index.php?amp
|
137 |
'top'
|
138 |
);
|
139 |
// For category pages with Pagination
|
140 |
add_rewrite_rule(
|
141 |
-
$rewrite_category.'
|
142 |
-
'index.php?amp
|
143 |
'top'
|
144 |
);
|
145 |
|
@@ -150,7 +150,7 @@ function ampforwp_add_custom_rewrite_rules() {
|
|
150 |
if ( $permalink_structure ) {
|
151 |
add_rewrite_rule(
|
152 |
$permalink_structure.'\/'.$rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
|
153 |
-
'index.php?amp
|
154 |
'top'
|
155 |
);
|
156 |
}
|
@@ -164,20 +164,20 @@ function ampforwp_add_custom_rewrite_rules() {
|
|
164 |
}
|
165 |
add_rewrite_rule(
|
166 |
$rewrite_tag.'\/(.+?)\/amp/?$',
|
167 |
-
'index.php?amp
|
168 |
'top'
|
169 |
);
|
170 |
// For tag pages with Pagination
|
171 |
add_rewrite_rule(
|
172 |
$rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
|
173 |
-
'index.php?amp
|
174 |
'top'
|
175 |
);
|
176 |
// For tag pages with Pagination (Custom Permalink Structure)
|
177 |
if ( $permalink_structure ) {
|
178 |
add_rewrite_rule(
|
179 |
$permalink_structure.'\/'.$rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
|
180 |
-
'index.php?amp
|
181 |
'top'
|
182 |
);
|
183 |
}
|
@@ -220,56 +220,6 @@ function ampforwp_add_custom_rewrite_rules() {
|
|
220 |
}
|
221 |
}
|
222 |
add_action( 'init', 'ampforwp_add_custom_rewrite_rules' );
|
223 |
-
// add re-write rule for Products
|
224 |
-
add_action( 'init', 'ampforwp_custom_rewrite_rules_for_product_category' );
|
225 |
-
if ( ! function_exists('ampforwp_custom_rewrite_rules_for_product_category') ) {
|
226 |
-
function ampforwp_custom_rewrite_rules_for_product_category(){
|
227 |
-
if ( class_exists('WooCommerce') ) {
|
228 |
-
$permalinks = wp_parse_args( (array) get_option( 'woocommerce_permalinks', array() ), array(
|
229 |
-
'product_base' => '',
|
230 |
-
'category_base' => '',
|
231 |
-
'tag_base' => '',
|
232 |
-
'attribute_base' => '',
|
233 |
-
'use_verbose_page_rules' => false,
|
234 |
-
) );
|
235 |
-
// Ensure rewrite slugs are set.
|
236 |
-
$permalinks['product_rewrite_slug'] = untrailingslashit( empty( $permalinks['product_base'] ) ? _x( 'product', 'slug', 'woocommerce' ) : $permalinks['product_base'] );
|
237 |
-
$permalinks['category_rewrite_slug'] = untrailingslashit( empty( $permalinks['category_base'] ) ? _x( 'product-category', 'slug', 'woocommerce' ) : $permalinks['category_base'] );
|
238 |
-
$permalinks['tag_rewrite_slug'] = untrailingslashit( empty( $permalinks['tag_base'] ) ? _x( 'product-tag', 'slug', 'woocommerce' ) : $permalinks['tag_base'] );
|
239 |
-
$permalinks['attribute_rewrite_slug'] = untrailingslashit( empty( $permalinks['attribute_base'] ) ? '' : $permalinks['attribute_base'] );
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
add_rewrite_rule(
|
244 |
-
$permalinks['product_rewrite_slug']."\/amp\/page\/([0-9]{1,})/?$",
|
245 |
-
'index.php?post_type=product&paged=$matches[1]&=1',
|
246 |
-
'top'
|
247 |
-
);
|
248 |
-
add_rewrite_rule(
|
249 |
-
$permalinks['category_rewrite_slug'].'\/(.+?)\/amp\/page\/?([0-9]{1,})/?$',
|
250 |
-
'index.php?product_cat=$matches[1]&paged=$matches[2]&=1',
|
251 |
-
'top'
|
252 |
-
);
|
253 |
-
add_rewrite_rule(
|
254 |
-
$permalinks['category_rewrite_slug'].'\/(.+?)\/amp\/?$',
|
255 |
-
'index.php?amp&product_cat=$matches[1]',
|
256 |
-
'top'
|
257 |
-
);
|
258 |
-
|
259 |
-
|
260 |
-
add_rewrite_rule(
|
261 |
-
$permalinks['tag_rewrite_slug'].'\/(.+?)\/amp\/page\/?([0-9]{1,})/?$',
|
262 |
-
'index.php?product_tag=$matches[1]&paged=$matches[2]&=1',
|
263 |
-
'top'
|
264 |
-
);
|
265 |
-
add_rewrite_rule(
|
266 |
-
$permalinks['tag_rewrite_slug'].'\/(.+?)\/amp\/?$',
|
267 |
-
'index.php?amp&product_tag=$matches[1]',
|
268 |
-
'top'
|
269 |
-
);
|
270 |
-
}
|
271 |
-
}
|
272 |
-
}
|
273 |
|
274 |
register_activation_hook( __FILE__, 'ampforwp_rewrite_activation', 20 );
|
275 |
function ampforwp_rewrite_activation() {
|
@@ -364,76 +314,49 @@ function ampforwp_parent_plugin_check() {
|
|
364 |
if(!function_exists('ampforwp_upcomming_layouts_demo') && is_admin()){
|
365 |
function ampforwp_upcomming_layouts_demo(){
|
366 |
return array(
|
367 |
-
|
368 |
-
"name"=>'
|
369 |
-
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-
|
370 |
-
"link"=>'https://ampforwp.com/layouts-
|
371 |
-
),
|
372 |
-
array(
|
373 |
-
"name"=>'App',
|
374 |
-
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-8.png',
|
375 |
-
"link"=>'https://ampforwp.com/layouts-8/',
|
376 |
),
|
377 |
-
|
378 |
-
"name"=>'
|
379 |
-
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-
|
380 |
-
"link"=>'https://ampforwp.com/layouts-
|
381 |
),
|
|
|
|
|
|
|
|
|
|
|
382 |
array(
|
383 |
-
"name"=>'
|
384 |
-
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-
|
385 |
-
"link"=>'https://ampforwp.com/layouts-
|
386 |
-
),
|
387 |
array(
|
388 |
"name"=>'Studio',
|
389 |
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-5.png',
|
390 |
"link"=>'https://ampforwp.com/layouts-5/',
|
391 |
-
),
|
392 |
-
array(
|
393 |
-
"name"=>'Agency',
|
394 |
-
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-4.png',
|
395 |
-
"link"=>'https://ampforwp.com/layouts-4/',
|
396 |
),
|
397 |
array(
|
398 |
-
"name"=>'
|
399 |
-
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-
|
400 |
-
"link"=>'https://ampforwp.com/layouts
|
401 |
-
),
|
402 |
-
array(
|
403 |
-
"name"=>'Weekly Magazine',
|
404 |
-
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-2.png',
|
405 |
-
"link"=>'https://ampforwp.com/layouts-2/',
|
406 |
-
),
|
407 |
-
array(
|
408 |
-
"name"=>'News',
|
409 |
-
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-1.png',
|
410 |
-
"link"=>'https://ampforwp.com/layouts-1/',
|
411 |
),
|
412 |
-
|
413 |
);
|
414 |
}
|
415 |
}
|
416 |
// Redux panel inclusion code
|
417 |
-
|
418 |
-
|
419 |
-
require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
|
420 |
require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
|
421 |
}
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
|
427 |
-
require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
|
428 |
-
}
|
429 |
-
if ( is_admin() ) {
|
430 |
-
// Register all the main options
|
431 |
-
require_once dirname( __FILE__ ).'/includes/options/admin-config.php';
|
432 |
-
require_once dirname( __FILE__ ).'/templates/report-bugs.php';
|
433 |
-
}
|
434 |
}
|
435 |
-
|
436 |
-
|
437 |
// Modules
|
438 |
add_action('after_setup_theme','ampforwp_add_module_files');
|
439 |
function ampforwp_add_module_files() {
|
@@ -536,9 +459,6 @@ function ampforwp_bundle_core_amp_files(){
|
|
536 |
if ( ! defined('AMP__DIR__') ) {
|
537 |
define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
|
538 |
}
|
539 |
-
if ( ! defined('AMP_QUERY_VAR') ){
|
540 |
-
define('AMP_QUERY_VAR', 'amp');
|
541 |
-
}
|
542 |
define( 'AMP__VERSION', '0.4.2' );
|
543 |
|
544 |
require_once( AMP__DIR__ . '/back-compat/back-compat.php' );
|
@@ -572,8 +492,8 @@ function ampforwp_modify_amp_activatation_link( $actions, $plugin_file ) {
|
|
572 |
if ( $plugin == $plugin_file ) {
|
573 |
add_thickbox();
|
574 |
unset($actions['activate']);
|
575 |
-
$
|
576 |
-
array_unshift ($actions,$
|
577 |
}
|
578 |
return $actions;
|
579 |
}
|
@@ -585,9 +505,8 @@ if ( ! function_exists('ampforwp_init') ) {
|
|
585 |
if ( false === apply_filters( 'amp_is_enabled', true ) ) {
|
586 |
return;
|
587 |
}
|
588 |
-
|
589 |
-
|
590 |
-
}
|
591 |
|
592 |
if ( ! defined('AMP__DIR__') ) {
|
593 |
define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP for WP - Accelerated Mobile Pages for WordPress
|
6 |
+
Version: 0.9.97.1
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
19 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
20 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
21 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
22 |
+
define('AMPFORWP_VERSION','0.9.97.1');
|
23 |
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
92 |
// For Homepage with Pagination
|
93 |
add_rewrite_rule(
|
94 |
'amp/page/([0-9]{1,})/?$',
|
95 |
+
'index.php?amp&paged=$matches[1]',
|
96 |
'top'
|
97 |
);
|
98 |
|
100 |
if( ampforwp_name_blog_page() ) {
|
101 |
add_rewrite_rule(
|
102 |
ampforwp_name_blog_page(). '/amp/page/([0-9]{1,})/?$',
|
103 |
+
'index.php?amp&paged=$matches[1]&page_id=' .ampforwp_get_the_page_id_blog_page(),
|
104 |
'top'
|
105 |
);
|
106 |
// Pagination to work with Extensions like.hml
|
107 |
add_rewrite_rule(
|
108 |
ampforwp_name_blog_page(). '(.+?)/amp/page/([0-9]{1,})/?$',
|
109 |
+
'index.php?amp&paged=$matches[2]&page_id=' .ampforwp_get_the_page_id_blog_page(),
|
110 |
'top'
|
111 |
);
|
112 |
}
|
114 |
// For Author pages
|
115 |
add_rewrite_rule(
|
116 |
'author\/([^/]+)\/amp\/?$',
|
117 |
+
'index.php?amp&author_name=$matches[1]',
|
118 |
'top'
|
119 |
);
|
120 |
add_rewrite_rule(
|
133 |
|
134 |
add_rewrite_rule(
|
135 |
$rewrite_category.'\/(.+?)\/amp/?$',
|
136 |
+
'index.php?amp&category_name=$matches[1]',
|
137 |
'top'
|
138 |
);
|
139 |
// For category pages with Pagination
|
140 |
add_rewrite_rule(
|
141 |
+
$rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
|
142 |
+
'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
|
143 |
'top'
|
144 |
);
|
145 |
|
150 |
if ( $permalink_structure ) {
|
151 |
add_rewrite_rule(
|
152 |
$permalink_structure.'\/'.$rewrite_category.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
|
153 |
+
'index.php?amp&category_name=$matches[1]&paged=$matches[2]',
|
154 |
'top'
|
155 |
);
|
156 |
}
|
164 |
}
|
165 |
add_rewrite_rule(
|
166 |
$rewrite_tag.'\/(.+?)\/amp/?$',
|
167 |
+
'index.php?amp&tag=$matches[1]',
|
168 |
'top'
|
169 |
);
|
170 |
// For tag pages with Pagination
|
171 |
add_rewrite_rule(
|
172 |
$rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
|
173 |
+
'index.php?amp&tag=$matches[1]&paged=$matches[2]',
|
174 |
'top'
|
175 |
);
|
176 |
// For tag pages with Pagination (Custom Permalink Structure)
|
177 |
if ( $permalink_structure ) {
|
178 |
add_rewrite_rule(
|
179 |
$permalink_structure.'\/'.$rewrite_tag.'\/(.+?)\/amp\/page\/?([0-9]{1,})\/?$',
|
180 |
+
'index.php?amp&tag=$matches[1]&paged=$matches[2]',
|
181 |
'top'
|
182 |
);
|
183 |
}
|
220 |
}
|
221 |
}
|
222 |
add_action( 'init', 'ampforwp_add_custom_rewrite_rules' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
|
224 |
register_activation_hook( __FILE__, 'ampforwp_rewrite_activation', 20 );
|
225 |
function ampforwp_rewrite_activation() {
|
314 |
if(!function_exists('ampforwp_upcomming_layouts_demo') && is_admin()){
|
315 |
function ampforwp_upcomming_layouts_demo(){
|
316 |
return array(
|
317 |
+
array(
|
318 |
+
"name"=>'News',
|
319 |
+
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-1.png',
|
320 |
+
"link"=>'https://ampforwp.com/layouts-1/',
|
|
|
|
|
|
|
|
|
|
|
321 |
),
|
322 |
+
array(
|
323 |
+
"name"=>'Weekly Magazine',
|
324 |
+
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-2.png',
|
325 |
+
"link"=>'https://ampforwp.com/layouts-2/',
|
326 |
),
|
327 |
+
array(
|
328 |
+
"name"=>'Elegance',
|
329 |
+
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-3.png',
|
330 |
+
"link"=>'https://ampforwp.com/layouts-3/',
|
331 |
+
),
|
332 |
array(
|
333 |
+
"name"=>'Agency',
|
334 |
+
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-4.png',
|
335 |
+
"link"=>'https://ampforwp.com/layouts-4/',
|
336 |
+
),
|
337 |
array(
|
338 |
"name"=>'Studio',
|
339 |
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-5.png',
|
340 |
"link"=>'https://ampforwp.com/layouts-5/',
|
|
|
|
|
|
|
|
|
|
|
341 |
),
|
342 |
array(
|
343 |
+
"name"=>'Journal',
|
344 |
+
"image"=>''.AMPFORWP_IMAGE_DIR . '/layouts-6.png',
|
345 |
+
"link"=>'https://ampforwp.com/amp-layouts/',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
),
|
|
|
347 |
);
|
348 |
}
|
349 |
}
|
350 |
// Redux panel inclusion code
|
351 |
+
if ( ! class_exists( 'ReduxFramework' ) ) {
|
352 |
+
require_once dirname( __FILE__ ).'/includes/options/extensions/loader.php';
|
|
|
353 |
require_once dirname( __FILE__ ).'/includes/options/redux-core/framework.php';
|
354 |
}
|
355 |
+
if ( is_admin() ) {
|
356 |
+
// Register all the main options
|
357 |
+
require_once dirname( __FILE__ ).'/includes/options/admin-config.php';
|
358 |
+
require_once dirname( __FILE__ ).'/templates/report-bugs.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
}
|
|
|
|
|
360 |
// Modules
|
361 |
add_action('after_setup_theme','ampforwp_add_module_files');
|
362 |
function ampforwp_add_module_files() {
|
459 |
if ( ! defined('AMP__DIR__') ) {
|
460 |
define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
|
461 |
}
|
|
|
|
|
|
|
462 |
define( 'AMP__VERSION', '0.4.2' );
|
463 |
|
464 |
require_once( AMP__DIR__ . '/back-compat/back-compat.php' );
|
492 |
if ( $plugin == $plugin_file ) {
|
493 |
add_thickbox();
|
494 |
unset($actions['activate']);
|
495 |
+
$a = '<span style="cursor:pointer;color:#0089c8" class="warning_activate_amp" onclick="alert(\'AMP is already bundled with AMPforWP. Please do not install this plugin with AMPforWP to avoid conflicts. \')">Activate</span>';
|
496 |
+
array_unshift ($actions,$a);
|
497 |
}
|
498 |
return $actions;
|
499 |
}
|
505 |
if ( false === apply_filters( 'amp_is_enabled', true ) ) {
|
506 |
return;
|
507 |
}
|
508 |
+
|
509 |
+
define( 'AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
|
|
|
510 |
|
511 |
if ( ! defined('AMP__DIR__') ) {
|
512 |
define( 'AMP__DIR__', plugin_dir_path(__FILE__) . 'includes/vendor/amp/' );
|
base_remover/base_remover.php
CHANGED
@@ -23,7 +23,7 @@ function plugin_catagory_base_removed_admin_notice__success(){
|
|
23 |
$current_screen = get_current_screen();
|
24 |
if( $current_screen->id === "plugin-install" ) {
|
25 |
|
26 |
-
function amp_enqueue_function_dependancies() {
|
27 |
wp_enqueue_script( 'AMPScriptDependanciesremove', plugins_url('dependencyScript.js', __FILE__), array( 'jquery' ) );
|
28 |
}
|
29 |
add_action( 'admin_enqueue_scripts', 'amp_enqueue_function_dependancies' );
|
23 |
$current_screen = get_current_screen();
|
24 |
if( $current_screen->id === "plugin-install" ) {
|
25 |
|
26 |
+
function amp_enqueue_function_dependancies( $hook ) {
|
27 |
wp_enqueue_script( 'AMPScriptDependanciesremove', plugins_url('dependencyScript.js', __FILE__), array( 'jquery' ) );
|
28 |
}
|
29 |
add_action( 'admin_enqueue_scripts', 'amp_enqueue_function_dependancies' );
|
base_remover/dependencyScript.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
jQuery(document).ready(function($){
|
2 |
|
3 |
-
var myElement = document.getElementById(
|
4 |
//if( myElement.innerHtml!=''){
|
5 |
if(window.addEventListener) {
|
6 |
// Normal browsers
|
1 |
jQuery(document).ready(function($){
|
2 |
|
3 |
+
var myElement = document.getElementById('plugin-filter');
|
4 |
//if( myElement.innerHtml!=''){
|
5 |
if(window.addEventListener) {
|
6 |
// Normal browsers
|
classes/class-ampforwp-instagram-sanitizer.php
CHANGED
@@ -37,8 +37,8 @@ function create_instagram_tag($sourcecode){
|
|
37 |
'height'=> 400,
|
38 |
'layout' => 'responsive',
|
39 |
'data-captioned' => '',
|
|
|
40 |
);
|
41 |
-
$attrs = ampforwp_amp_consent_check( $attrs );
|
42 |
return AMP_DOM_Utils::create_node($this->dom, 'amp-instagram', $attrs);
|
43 |
}
|
44 |
public function get_scripts() {
|
37 |
'height'=> 400,
|
38 |
'layout' => 'responsive',
|
39 |
'data-captioned' => '',
|
40 |
+
'data-block-on-consent' => '',
|
41 |
);
|
|
|
42 |
return AMP_DOM_Utils::create_node($this->dom, 'amp-instagram', $attrs);
|
43 |
}
|
44 |
public function get_scripts() {
|
classes/class-ampforwp-youtube-embed.php
CHANGED
@@ -78,14 +78,16 @@ class AMPforWP_YouTube_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
78 |
|
79 |
$this->did_convert_elements = true;
|
80 |
// Return it with a filter for the modification purpose #1378
|
81 |
-
|
|
|
|
|
82 |
'data-videoid' => $args['video_id'],
|
83 |
'layout' => 'responsive',
|
84 |
'width' => $this->args['width'],
|
85 |
'height' => $this->args['height'],
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
}
|
90 |
|
91 |
private function get_video_id_from_url( $url ) {
|
78 |
|
79 |
$this->did_convert_elements = true;
|
80 |
// Return it with a filter for the modification purpose #1378
|
81 |
+
return AMP_HTML_Utils::build_tag(
|
82 |
+
'amp-youtube',apply_filters('amp_youtube_params',
|
83 |
+
array(
|
84 |
'data-videoid' => $args['video_id'],
|
85 |
'layout' => 'responsive',
|
86 |
'width' => $this->args['width'],
|
87 |
'height' => $this->args['height'],
|
88 |
+
'data-block-on-consent' => '',
|
89 |
+
) )
|
90 |
+
);
|
91 |
}
|
92 |
|
93 |
private function get_video_id_from_url( $url ) {
|
components/author-box/author-box.php
CHANGED
@@ -64,12 +64,10 @@ if ( isset($args['show_time']) ) {
|
|
64 |
?>
|
65 |
<div class="amp-author <?php echo $class; ?>">
|
66 |
<?php if ( $avatar ) {
|
67 |
-
|
68 |
-
|
69 |
-
$author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
|
70 |
-
} ?>
|
71 |
<div class="amp-author-image <?php echo $author_image_wrapper; ?>">
|
72 |
-
<amp-img
|
73 |
</div>
|
74 |
<?php } ?>
|
75 |
<?php echo '<div class="author-details '. $author_wrapper_class .'">';
|
64 |
?>
|
65 |
<div class="amp-author <?php echo $class; ?>">
|
66 |
<?php if ( $avatar ) {
|
67 |
+
$author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
|
68 |
+
?>
|
|
|
|
|
69 |
<div class="amp-author-image <?php echo $author_image_wrapper; ?>">
|
70 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo $avatar_size; ?>" height="<?php echo $avatar_size; ?>" layout="fixed"></amp-img>
|
71 |
</div>
|
72 |
<?php } ?>
|
73 |
<?php echo '<div class="author-details '. $author_wrapper_class .'">';
|
components/comments/comments.php
CHANGED
@@ -1,37 +1,29 @@
|
|
1 |
<?php
|
2 |
function ampforwp_framework_get_comments(){
|
3 |
global $redux_builder_amp;
|
4 |
-
$display_comments_on = "";
|
5 |
-
$display_comments_on = ampforwp_get_comments_status();
|
6 |
-
if ( $display_comments_on ) {
|
7 |
-
if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
|
8 |
-
echo ampforwp_framework_get_facebook_comments();
|
9 |
-
}
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
if ( $comments ) { ?>
|
34 |
-
<div id="comments" class="amp-comments-wrapper">
|
35 |
<h3><span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'], 'View Comments' )?></span></h3>
|
36 |
<ul><?php
|
37 |
// Display the list of comments
|
@@ -87,55 +79,50 @@ function ampforwp_framework_get_comments(){
|
|
87 |
'reverse_top_level' => true //Show the latest comments at the top of the list
|
88 |
), $comments); ?>
|
89 |
</ul> <?php
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
} // if ( $comments )
|
106 |
if ( ! defined( 'AMP_COMMENTS_VERSION' ) ) { ?>
|
107 |
-
<div class="
|
108 |
<?php if ( comments_open() ) { ?>
|
109 |
<a href="<?php echo ampforwp_comment_button_url(); ?>" rel="nofollow"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-leave-a-comment-text'], 'Leave a Comment' ); ?></a> <?php
|
110 |
} else {
|
111 |
echo "<p class='nocomments'>". ampforwp_translation( $redux_builder_amp['amp-translator-comments-closed'], 'Comments are closed' ) ." </p>";
|
112 |
}?>
|
113 |
</div> <?php
|
114 |
-
}
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
}
|
119 |
}
|
120 |
|
121 |
//Facebook Comments
|
122 |
function ampforwp_framework_get_facebook_comments(){
|
123 |
global $redux_builder_amp;
|
124 |
-
$facebook_comments_markup =
|
125 |
-
$lang = $redux_builder_amp['ampforwp-fb-comments-lang'];
|
126 |
-
$locale = 'data-locale = "'.$lang.'"';
|
127 |
if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
|
128 |
if( ampforwp_is_non_amp() && isset($redux_builder_amp['ampforwp-amp-convert-to-wp']) && $redux_builder_amp['ampforwp-amp-convert-to-wp']) {
|
129 |
$facebook_comments_markup = '<div class="fb-comments" data-href="' . get_permalink() . '" data-width="800px" data-numposts="'.$redux_builder_amp['ampforwp-number-of-fb-no-of-comments'].'"></div>';
|
130 |
}
|
131 |
else {
|
132 |
$facebook_comments_markup = '<section class="amp-facebook-comments">';
|
133 |
-
$facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
|
134 |
-
layout="responsive"
|
135 |
$facebook_comments_markup .= '"'. $redux_builder_amp['ampforwp-number-of-fb-no-of-comments']. '" ';
|
136 |
-
|
137 |
-
$facebook_comments_markup .= 'data-block-on-consent';
|
138 |
-
}
|
139 |
$facebook_comments_markup .= 'data-href=" ' . get_permalink() . ' "';
|
140 |
$facebook_comments_markup .= '></amp-facebook-comments></section>';
|
141 |
}
|
@@ -176,7 +163,7 @@ function ampforwp_framework_get_disqus_comments(){
|
|
176 |
layout="<?php echo $layout ?>"
|
177 |
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
|
178 |
frameborder="0"
|
179 |
-
|
180 |
src="<?php echo $disqus_url ?>" >
|
181 |
<div overflow tabindex="0" role="button" aria-label="Read more"><?php echo __('Disqus Comments Loading...','accelerated-mobile-pages') ?></div>
|
182 |
</amp-iframe>
|
@@ -185,84 +172,23 @@ function ampforwp_framework_get_disqus_comments(){
|
|
185 |
}
|
186 |
}
|
187 |
|
188 |
-
function ampforwp_framework_get_vuukle_comments(){
|
189 |
-
global $post, $redux_builder_amp;
|
190 |
-
$apiKey ='';
|
191 |
-
if( isset($redux_builder_amp['ampforwp-vuukle-comments-apiKey']) && $redux_builder_amp['ampforwp-vuukle-comments-apiKey'] !== ""){
|
192 |
-
$apiKey = $redux_builder_amp['ampforwp-vuukle-comments-apiKey'];
|
193 |
-
}
|
194 |
-
$srcUrl = 'https://cdn.vuukle.com/amp.html?';
|
195 |
-
$srcUrl = add_query_arg('url' ,get_permalink(), $srcUrl);
|
196 |
-
$srcUrl = add_query_arg('host' ,site_url(), $srcUrl);
|
197 |
-
$srcUrl = add_query_arg('id' , $post->ID, $srcUrl);
|
198 |
-
$srcUrl = add_query_arg('apiKey' , $apiKey, $srcUrl);
|
199 |
-
$srcUrl = add_query_arg('title' , $post->post_title, $srcUrl);
|
200 |
-
$vuukle_html = '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.$srcUrl.'">
|
201 |
-
|
202 |
-
<div overflow tabindex="0" role="button" aria-label="Show comments">Show comments</div>';
|
203 |
-
echo $vuukle_html;
|
204 |
-
}
|
205 |
-
|
206 |
-
function ampforwp_framework_get_spotim_comments(){
|
207 |
-
global $post, $redux_builder_amp;
|
208 |
-
$spotId ='';
|
209 |
-
if( isset($redux_builder_amp['ampforwp-spotim-comments-apiKey']) && $redux_builder_amp['ampforwp-spotim-comments-apiKey'] !== ""){
|
210 |
-
$spotId = $redux_builder_amp['ampforwp-spotim-comments-apiKey'];
|
211 |
-
}
|
212 |
-
$srcUrl = 'https://amp.spot.im/production.html?';
|
213 |
-
$srcUrl = add_query_arg('spotId' ,get_permalink(), $srcUrl);
|
214 |
-
$srcUrl = add_query_arg('postId' , $post->ID, $srcUrl);
|
215 |
-
$spotim_html = '<amp-iframe width="375" height="815" resizable sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation" layout="responsive"
|
216 |
-
frameborder="0" src="'.$srcUrl.'">
|
217 |
-
<amp-img placeholder height="815" layout="fill" src="//amp.spot.im/loader.png"></amp-img>
|
218 |
-
<div overflow class="spot-im-amp-overflow" tabindex="0" role="button" aria-label="Read more">Load more...</div>
|
219 |
-
</amp-iframe>';
|
220 |
-
echo $spotim_html;
|
221 |
-
}
|
222 |
-
|
223 |
// Comments Scripts
|
224 |
add_filter( 'amp_post_template_data', 'ampforwp_framework_comments_scripts' );
|
225 |
function ampforwp_framework_comments_scripts( $data ) {
|
226 |
|
227 |
$facebook_comments_check = ampforwp_framework_get_facebook_comments();
|
228 |
global $redux_builder_amp;
|
229 |
-
$
|
230 |
-
$is_pb_enabled = checkAMPforPageBuilderStatus(get_the_ID());
|
231 |
-
$display_comments_on = "";
|
232 |
-
$display_comments_on = ampforwp_get_comments_status();
|
233 |
-
|
234 |
-
if ( $facebook_comments_check && $redux_builder_amp['ampforwp-facebook-comments-support'] && $display_comments_on && !is_front_page() && !$is_pb_enabled ) {
|
235 |
if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) {
|
236 |
$data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js';
|
237 |
}
|
238 |
}
|
239 |
-
if ( $redux_builder_amp['ampforwp-disqus-comments-support'] &&
|
240 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
241 |
if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
|
242 |
$data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
|
243 |
}
|
244 |
}
|
245 |
-
}
|
246 |
-
if ( isset($redux_builder_amp['ampforwp-vuukle-comments-support'])
|
247 |
-
&& $redux_builder_amp['ampforwp-vuukle-comments-support']
|
248 |
-
&& $display_comments_on && comments_open() && !$is_pb_enabled
|
249 |
-
) {
|
250 |
-
if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
|
251 |
-
$data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
|
252 |
-
}
|
253 |
-
if ($redux_builder_amp['ampforwp-vuukle-Ads-before-comments']==1
|
254 |
-
&& empty( $data['amp_component_scripts']['amp-ad'] ) ) {
|
255 |
-
$data['amp_component_scripts']['amp-ad'] = 'https://cdn.ampproject.org/v0/amp-ad-0.1.js';
|
256 |
-
}
|
257 |
-
}
|
258 |
-
//spotim
|
259 |
-
if ( isset($redux_builder_amp['ampforwp-spotim-comments-support'])
|
260 |
-
&& $redux_builder_amp['ampforwp-spotim-comments-support']
|
261 |
-
&& $display_comments_on && comments_open() ) {
|
262 |
-
if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
|
263 |
-
$data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
|
264 |
-
}
|
265 |
-
|
266 |
-
}
|
267 |
return $data;
|
268 |
}
|
1 |
<?php
|
2 |
function ampforwp_framework_get_comments(){
|
3 |
global $redux_builder_amp;
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
+
if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
|
6 |
+
echo ampforwp_framework_get_facebook_comments();
|
7 |
+
}
|
8 |
+
|
9 |
+
if ( $redux_builder_amp['ampforwp-disqus-comments-support'] ) {
|
10 |
+
ampforwp_framework_get_disqus_comments();
|
11 |
+
}
|
12 |
+
|
13 |
+
if ( isset($redux_builder_amp['wordpress-comments-support']) && true == $redux_builder_amp['wordpress-comments-support'] ) {
|
14 |
+
do_action('ampforwp_before_comment_hook'); ?>
|
15 |
+
<div class="amp-comments">
|
16 |
+
<?php
|
17 |
+
// Gather comments for a specific page/post
|
18 |
+
$postID = $comments = $max_page = "";
|
19 |
+
$postID = get_the_ID();
|
20 |
+
$comments = get_comments(array(
|
21 |
+
'post_id' => $postID,
|
22 |
+
'status' => 'approve' //Change this to the type of comments to be displayed
|
23 |
+
));
|
24 |
+
|
25 |
+
if ( $comments ) { ?>
|
26 |
+
<div id="comments" class="amp-comments-wrapper">
|
|
|
|
|
27 |
<h3><span><?php echo ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'], 'View Comments' )?></span></h3>
|
28 |
<ul><?php
|
29 |
// Display the list of comments
|
79 |
'reverse_top_level' => true //Show the latest comments at the top of the list
|
80 |
), $comments); ?>
|
81 |
</ul> <?php
|
82 |
+
$max_page = get_comment_pages_count($comments, AMPFORWP_COMMENTS_PER_PAGE);
|
83 |
+
$args = array(
|
84 |
+
'base' => add_query_arg( array('cpage' => '%#%', 'amp' => '1'), get_permalink() ),
|
85 |
+
'format' => '',
|
86 |
+
'total' => $max_page,
|
87 |
+
'echo' => false,
|
88 |
+
'add_fragment' => '#comments',
|
89 |
+
);
|
90 |
+
if ( paginate_comments_links($args) ) { ?>
|
91 |
+
<div class="cmts-wrap">
|
92 |
+
<?php echo paginate_comments_links( $args ); ?>
|
93 |
+
</div>
|
94 |
+
<?php } ?>
|
95 |
+
</div> <!-- .amp-comments-wrapper -->
|
96 |
+
<?php // if amp-comments extension is enabled then hide this button
|
|
|
97 |
if ( ! defined( 'AMP_COMMENTS_VERSION' ) ) { ?>
|
98 |
+
<div class="cmts-btn-wrap">
|
99 |
<?php if ( comments_open() ) { ?>
|
100 |
<a href="<?php echo ampforwp_comment_button_url(); ?>" rel="nofollow"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-leave-a-comment-text'], 'Leave a Comment' ); ?></a> <?php
|
101 |
} else {
|
102 |
echo "<p class='nocomments'>". ampforwp_translation( $redux_builder_amp['amp-translator-comments-closed'], 'Comments are closed' ) ." </p>";
|
103 |
}?>
|
104 |
</div> <?php
|
105 |
+
}
|
106 |
+
} // if ( $comments )?>
|
107 |
+
</div>
|
108 |
+
<?php do_action('ampforwp_after_comment_hook');
|
109 |
+
}
|
110 |
}
|
111 |
|
112 |
//Facebook Comments
|
113 |
function ampforwp_framework_get_facebook_comments(){
|
114 |
global $redux_builder_amp;
|
115 |
+
$facebook_comments_markup = '';
|
|
|
|
|
116 |
if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
|
117 |
if( ampforwp_is_non_amp() && isset($redux_builder_amp['ampforwp-amp-convert-to-wp']) && $redux_builder_amp['ampforwp-amp-convert-to-wp']) {
|
118 |
$facebook_comments_markup = '<div class="fb-comments" data-href="' . get_permalink() . '" data-width="800px" data-numposts="'.$redux_builder_amp['ampforwp-number-of-fb-no-of-comments'].'"></div>';
|
119 |
}
|
120 |
else {
|
121 |
$facebook_comments_markup = '<section class="amp-facebook-comments">';
|
122 |
+
$facebook_comments_markup .= '<amp-facebook-comments data-block-on-consent width=486 height=357
|
123 |
+
layout="responsive" data-numposts=';
|
124 |
$facebook_comments_markup .= '"'. $redux_builder_amp['ampforwp-number-of-fb-no-of-comments']. '" ';
|
125 |
+
|
|
|
|
|
126 |
$facebook_comments_markup .= 'data-href=" ' . get_permalink() . ' "';
|
127 |
$facebook_comments_markup .= '></amp-facebook-comments></section>';
|
128 |
}
|
163 |
layout="<?php echo $layout ?>"
|
164 |
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
|
165 |
frameborder="0"
|
166 |
+
data-block-on-consent
|
167 |
src="<?php echo $disqus_url ?>" >
|
168 |
<div overflow tabindex="0" role="button" aria-label="Read more"><?php echo __('Disqus Comments Loading...','accelerated-mobile-pages') ?></div>
|
169 |
</amp-iframe>
|
172 |
}
|
173 |
}
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
// Comments Scripts
|
176 |
add_filter( 'amp_post_template_data', 'ampforwp_framework_comments_scripts' );
|
177 |
function ampforwp_framework_comments_scripts( $data ) {
|
178 |
|
179 |
$facebook_comments_check = ampforwp_framework_get_facebook_comments();
|
180 |
global $redux_builder_amp;
|
181 |
+
if ( $facebook_comments_check && $redux_builder_amp['ampforwp-facebook-comments-support'] && is_singular() && !is_front_page()) {
|
|
|
|
|
|
|
|
|
|
|
182 |
if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) {
|
183 |
$data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js';
|
184 |
}
|
185 |
}
|
186 |
+
if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && is_singular() && comments_open() ) {
|
187 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
188 |
if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
|
189 |
$data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
|
190 |
}
|
191 |
}
|
192 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
return $data;
|
194 |
}
|
components/components-core.php
CHANGED
@@ -106,7 +106,7 @@ function amp_logo(){
|
|
106 |
function amp_title(){
|
107 |
global $redux_builder_amp, $post;
|
108 |
$ID = '';
|
109 |
-
|
110 |
if( $redux_builder_amp['ampforwp-title-on-front-page'] ) {
|
111 |
$ID = ampforwp_get_frontpage_id();
|
112 |
}
|
@@ -324,9 +324,6 @@ function amp_header_core(){
|
|
324 |
wp_head();
|
325 |
|
326 |
}else{
|
327 |
-
if(is_search()){?>
|
328 |
-
<meta name="robots" content="noindex,nofollow"/>
|
329 |
-
<?php }
|
330 |
do_action( 'amp_post_template_head', $thisTemplate );
|
331 |
} ?>
|
332 |
<style amp-custom>
|
@@ -436,7 +433,7 @@ $thisTemplate = new AMP_Post_Template($post_id); ?>
|
|
436 |
$ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
|
437 |
}
|
438 |
// Muffin Builder Compatibility #1455 #1893
|
439 |
-
if ( function_exists('mfn_builder_print')
|
440 |
ob_start();
|
441 |
mfn_builder_print( $thisTemplate->get( 'post_id' ) );
|
442 |
$content = ob_get_contents();
|
@@ -455,15 +452,7 @@ $thisTemplate = new AMP_Post_Template($post_id); ?>
|
|
455 |
)
|
456 |
)
|
457 |
);
|
458 |
-
|
459 |
-
$ampforwp_custom_amp_editor_content = '';
|
460 |
-
$ampforwp_custom_amp_editor_content = $ampforwp_the_content;
|
461 |
-
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
462 |
-
$ampforwp_the_content .= $ampforwp_custom_amp_editor_content;
|
463 |
-
}
|
464 |
-
else{
|
465 |
-
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
466 |
-
}
|
467 |
}
|
468 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content',$ampforwp_the_content);
|
469 |
echo $ampforwp_the_content;
|
@@ -556,7 +545,7 @@ function amp_author_meta( $args ) {
|
|
556 |
if ( $avatar && true == ampforwp_gravatar_checker($post_author->user_email) ) {
|
557 |
$author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
|
558 |
?>
|
559 |
-
<amp-img
|
560 |
<?php }
|
561 |
elseif ( $avatar && false == ampforwp_gravatar_checker($post_author->user_email ) ) {
|
562 |
$avatar_img = get_avatar( $post_author->user_email, $avatar_size );
|
106 |
function amp_title(){
|
107 |
global $redux_builder_amp, $post;
|
108 |
$ID = '';
|
109 |
+
if( is_home() && ampforwp_get_frontpage_id() ){
|
110 |
if( $redux_builder_amp['ampforwp-title-on-front-page'] ) {
|
111 |
$ID = ampforwp_get_frontpage_id();
|
112 |
}
|
324 |
wp_head();
|
325 |
|
326 |
}else{
|
|
|
|
|
|
|
327 |
do_action( 'amp_post_template_head', $thisTemplate );
|
328 |
} ?>
|
329 |
<style amp-custom>
|
433 |
$ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
|
434 |
}
|
435 |
// Muffin Builder Compatibility #1455 #1893
|
436 |
+
if ( function_exists('mfn_builder_print') ) {
|
437 |
ob_start();
|
438 |
mfn_builder_print( $thisTemplate->get( 'post_id' ) );
|
439 |
$content = ob_get_contents();
|
452 |
)
|
453 |
)
|
454 |
);
|
455 |
+
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
}
|
457 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content',$ampforwp_the_content);
|
458 |
echo $ampforwp_the_content;
|
545 |
if ( $avatar && true == ampforwp_gravatar_checker($post_author->user_email) ) {
|
546 |
$author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
|
547 |
?>
|
548 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo $avatar_size; ?>" height="<?php echo $avatar_size; ?>" layout="fixed"></amp-img>
|
549 |
<?php }
|
550 |
elseif ( $avatar && false == ampforwp_gravatar_checker($post_author->user_email ) ) {
|
551 |
$avatar_img = get_avatar( $post_author->user_email, $avatar_size );
|
components/logo/logo.php
CHANGED
@@ -11,7 +11,7 @@ function ampforwp_framework_get_logo(){
|
|
11 |
$ampforwp_home_url = trailingslashit( get_bloginfo('url') ).'?nonamp=1';
|
12 |
$set_rel_to_noamp = true;
|
13 |
} else {
|
14 |
-
$ampforwp_home_url =
|
15 |
}
|
16 |
} else {
|
17 |
if($redux_builder_amp['ampforwp-homepage-on-off-support']) {
|
@@ -26,7 +26,7 @@ function ampforwp_framework_get_logo(){
|
|
26 |
}
|
27 |
}
|
28 |
}?>
|
29 |
-
|
30 |
<?php if ( true == ($redux_builder_amp['opt-media']['url']) ) {
|
31 |
$alt = ampforwp_default_logo('alt') ?>
|
32 |
<a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> >
|
11 |
$ampforwp_home_url = trailingslashit( get_bloginfo('url') ).'?nonamp=1';
|
12 |
$set_rel_to_noamp = true;
|
13 |
} else {
|
14 |
+
$ampforwp_home_url = ampforwp_url_controller( get_bloginfo('url') );
|
15 |
}
|
16 |
} else {
|
17 |
if($redux_builder_amp['ampforwp-homepage-on-off-support']) {
|
26 |
}
|
27 |
}
|
28 |
}?>
|
29 |
+
|
30 |
<?php if ( true == ($redux_builder_amp['opt-media']['url']) ) {
|
31 |
$alt = ampforwp_default_logo('alt') ?>
|
32 |
<a href="<?php echo esc_url( $ampforwp_home_url ); ?>" <?php if($set_rel_to_noamp){ echo ' rel="nofollow"'; } ?> >
|
components/loop/loop.php
CHANGED
@@ -303,15 +303,10 @@ function amp_loop_all_content($tag = 'p'){
|
|
303 |
}
|
304 |
|
305 |
function amp_loop_permalink($return,$amp_query_var ='amp'){
|
306 |
-
global $redux_builder_amp;
|
307 |
if( $return ){
|
308 |
return ampforwp_url_controller( get_permalink() ) ;
|
309 |
}
|
310 |
-
|
311 |
-
echo get_permalink();
|
312 |
-
}
|
313 |
-
else
|
314 |
-
echo ampforwp_url_controller( get_permalink() );
|
315 |
}
|
316 |
function amp_loop_image( $data=array() ) {
|
317 |
global $ampLoopData, $counterOffset, $redux_builder_amp;
|
@@ -354,12 +349,8 @@ function amp_loop_image( $data=array() ) {
|
|
354 |
$height = $thumb_height;
|
355 |
}
|
356 |
if ( isset($redux_builder_amp['ampforwp-retina-images']) && true == $redux_builder_amp['ampforwp-retina-images'] ) {
|
357 |
-
$
|
358 |
-
|
359 |
-
$resolution = $redux_builder_amp['ampforwp-retina-images-res'];
|
360 |
-
}
|
361 |
-
$width = $width * $resolution;
|
362 |
-
$height = $height * $resolution;
|
363 |
}
|
364 |
$thumb_url_array = ampforwp_aq_resize( $thumb_url, $width, $height, true, false, true ); //resize & crop the image
|
365 |
$thumb_url = $thumb_url_array[0];
|
@@ -367,26 +358,8 @@ function amp_loop_image( $data=array() ) {
|
|
367 |
$thumb_height = $thumb_url_array[2];
|
368 |
}
|
369 |
if ( $thumb_url ) {
|
370 |
-
$imageLink = amp_loop_permalink(true);
|
371 |
-
$loopImageData = array("post_id" =>get_the_ID(),
|
372 |
-
"image_url" =>$thumb_url,
|
373 |
-
"width" =>$thumb_width,
|
374 |
-
"height" =>$thumb_height,
|
375 |
-
"layout_responsive" =>$layout_responsive,
|
376 |
-
"image_class" =>$imageClass,
|
377 |
-
"image_link" =>$imageLink
|
378 |
-
);
|
379 |
-
$changesInImageData = apply_filters("ampforwp_loop_image_update",$loopImageData);
|
380 |
-
if(!empty($changesInImageData) && is_array($changesInImageData)){
|
381 |
-
$thumb_url = $changesInImageData["image_url"];
|
382 |
-
$thumb_width = $changesInImageData["width"];
|
383 |
-
$thumb_height = $changesInImageData["height"];
|
384 |
-
$layout_responsive = $changesInImageData["layout_responsive"];
|
385 |
-
$imageClass = $changesInImageData["image_class"];
|
386 |
-
$imageLink = $changesInImageData["image_link"];
|
387 |
-
}
|
388 |
echo '<'.$tag.' class="loop-img '.$tag_class.'">';
|
389 |
-
echo '<a href="'
|
390 |
echo '<amp-img src="'. $thumb_url .'" width="'.$thumb_width.'" height="'.$thumb_height.'" '. $layout_responsive .' class="'.$imageClass.'"></amp-img>';
|
391 |
echo '</a>';
|
392 |
echo '</'.$tag.'>';
|
303 |
}
|
304 |
|
305 |
function amp_loop_permalink($return,$amp_query_var ='amp'){
|
|
|
306 |
if( $return ){
|
307 |
return ampforwp_url_controller( get_permalink() ) ;
|
308 |
}
|
309 |
+
echo ampforwp_url_controller( get_permalink() );
|
|
|
|
|
|
|
|
|
310 |
}
|
311 |
function amp_loop_image( $data=array() ) {
|
312 |
global $ampLoopData, $counterOffset, $redux_builder_amp;
|
349 |
$height = $thumb_height;
|
350 |
}
|
351 |
if ( isset($redux_builder_amp['ampforwp-retina-images']) && true == $redux_builder_amp['ampforwp-retina-images'] ) {
|
352 |
+
$width = $width * 2;
|
353 |
+
$height = $height * 2;
|
|
|
|
|
|
|
|
|
354 |
}
|
355 |
$thumb_url_array = ampforwp_aq_resize( $thumb_url, $width, $height, true, false, true ); //resize & crop the image
|
356 |
$thumb_url = $thumb_url_array[0];
|
358 |
$thumb_height = $thumb_url_array[2];
|
359 |
}
|
360 |
if ( $thumb_url ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
echo '<'.$tag.' class="loop-img '.$tag_class.'">';
|
362 |
+
echo '<a href="'.amp_loop_permalink(true).'">';
|
363 |
echo '<amp-img src="'. $thumb_url .'" width="'.$thumb_width.'" height="'.$thumb_height.'" '. $layout_responsive .' class="'.$imageClass.'"></amp-img>';
|
364 |
echo '</a>';
|
365 |
echo '</'.$tag.'>';
|
components/post-pagination/post-pagination.php
CHANGED
@@ -157,3 +157,25 @@ function amp_paginated_post_rel_canonical(){
|
|
157 |
if($post_paginated_page){?>
|
158 |
<link rel="canonical" href="<?php echo $new_canonical_url.$post_paginated_page ?>/" /><?php }
|
159 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
if($post_paginated_page){?>
|
158 |
<link rel="canonical" href="<?php echo $new_canonical_url.$post_paginated_page ?>/" /><?php }
|
159 |
}
|
160 |
+
|
161 |
+
add_filter('ampforwp_modify_the_content','ampforwp_post_paginated_content');
|
162 |
+
function ampforwp_post_paginated_content($content){
|
163 |
+
global $redux_builder_amp;
|
164 |
+
$ampforwp_new_content = $ampforwp_the_content = $checker = '';
|
165 |
+
$ampforwp_the_content = $content;
|
166 |
+
$checker = preg_match('/<!--nextpage-->/', $ampforwp_the_content);
|
167 |
+
if ( 1 === $checker ) {
|
168 |
+
$ampforwp_new_content = explode('<!--nextpage-->', $ampforwp_the_content);
|
169 |
+
$queried_var = get_query_var('page');
|
170 |
+
if ( $queried_var > 1 ) {
|
171 |
+
$queried_var = $queried_var -1 ;
|
172 |
+
}
|
173 |
+
else {
|
174 |
+
$queried_var = 0;
|
175 |
+
}
|
176 |
+
return $ampforwp_new_content[$queried_var];
|
177 |
+
}
|
178 |
+
else {
|
179 |
+
return $ampforwp_the_content;
|
180 |
+
}
|
181 |
+
}
|
components/related-posts/related-posts.php
CHANGED
@@ -43,6 +43,7 @@ function ampforwp_framework_get_related_posts($argsdata=array()){
|
|
43 |
}
|
44 |
}
|
45 |
|
|
|
46 |
function related_post_loop_query(){
|
47 |
global $post, $redux_builder_amp;
|
48 |
$string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
|
@@ -51,53 +52,43 @@ function related_post_loop_query(){
|
|
51 |
|
52 |
if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
|
53 |
$categories = get_the_category($post->ID);
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
}
|
58 |
-
$args=array(
|
59 |
-
'category__in' => $category_ids,
|
60 |
-
'post__not_in' => array($post->ID),
|
61 |
-
'posts_per_page'=> $int_number_of_related_posts,
|
62 |
-
'ignore_sticky_posts'=>1,
|
63 |
-
'has_password' => false ,
|
64 |
-
'post_status'=> 'publish'
|
65 |
-
);
|
66 |
-
}
|
67 |
-
}
|
68 |
-
// tags
|
69 |
-
if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
70 |
-
$ampforwp_tags = get_the_tags($post->ID);
|
71 |
-
if ($ampforwp_tags) {
|
72 |
-
$tag_ids = array();
|
73 |
-
foreach($ampforwp_tags as $individual_tag) {
|
74 |
-
$tag_ids[] = $individual_tag->term_id;
|
75 |
}
|
76 |
$args=array(
|
77 |
-
|
78 |
'post__not_in' => array($post->ID),
|
79 |
'posts_per_page'=> $int_number_of_related_posts,
|
80 |
'ignore_sticky_posts'=>1,
|
81 |
'has_password' => false ,
|
82 |
'post_status'=> 'publish'
|
83 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
$
|
89 |
-
$
|
90 |
-
array(
|
91 |
-
'after' => array(
|
92 |
-
'year' => date('Y', $date_range ),
|
93 |
-
'month' => date('m', $date_range ),
|
94 |
-
'day' => date('d', $date_range ),
|
95 |
-
),
|
96 |
-
)
|
97 |
-
);
|
98 |
-
}
|
99 |
-
$my_query = new wp_query( $args );
|
100 |
-
return $my_query;
|
101 |
}
|
102 |
|
103 |
function ampforwp_related_post(){
|
@@ -107,12 +98,9 @@ function ampforwp_related_post(){
|
|
107 |
<h3 class="amp-related-posts-title"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></h3>
|
108 |
<?php }
|
109 |
|
|
|
110 |
function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array() ){
|
111 |
-
global $redux_builder_amp;
|
112 |
$related_post_permalink = ampforwp_url_controller( get_permalink() );
|
113 |
-
if ( isset($redux_builder_amp['ampforwp-single-related-posts-link']) && true == $redux_builder_amp['ampforwp-single-related-posts-link'] ) {
|
114 |
-
$related_post_permalink = get_permalink();
|
115 |
-
}
|
116 |
$show_image = (isset($data['show_image']) ? $data['show_image'] : true);
|
117 |
?>
|
118 |
<a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
|
@@ -145,25 +133,29 @@ function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array()
|
|
145 |
}
|
146 |
|
147 |
function ampforwp_get_relatedpost_content($argsdata=array()){
|
148 |
-
$related_post_permalink = ampforwp_url_controller( get_permalink() );
|
|
|
149 |
<div class="related_link">
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
|
|
|
|
|
43 |
}
|
44 |
}
|
45 |
|
46 |
+
|
47 |
function related_post_loop_query(){
|
48 |
global $post, $redux_builder_amp;
|
49 |
$string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
|
52 |
|
53 |
if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
|
54 |
$categories = get_the_category($post->ID);
|
55 |
+
if ($categories) {
|
56 |
+
$category_ids = array();
|
57 |
+
foreach($categories as $individual_category){ $category_ids[] = $individual_category->term_id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
$args=array(
|
60 |
+
'category__in' => $category_ids,
|
61 |
'post__not_in' => array($post->ID),
|
62 |
'posts_per_page'=> $int_number_of_related_posts,
|
63 |
'ignore_sticky_posts'=>1,
|
64 |
'has_password' => false ,
|
65 |
'post_status'=> 'publish'
|
66 |
);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
// tags
|
70 |
+
if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
71 |
+
$ampforwp_tags = get_the_tags($post->ID);
|
72 |
+
if ($ampforwp_tags) {
|
73 |
+
$tag_ids = array();
|
74 |
+
foreach($ampforwp_tags as $individual_tag) {
|
75 |
+
$tag_ids[] = $individual_tag->term_id;
|
76 |
+
}
|
77 |
+
$args=array(
|
78 |
+
'tag__in' => $tag_ids,
|
79 |
+
'post__not_in' => array($post->ID),
|
80 |
+
'posts_per_page'=> $int_number_of_related_posts,
|
81 |
+
'ignore_sticky_posts'=>1,
|
82 |
+
'has_password' => false ,
|
83 |
+
'post_status'=> 'publish'
|
84 |
+
);
|
85 |
+
}
|
86 |
}
|
87 |
+
if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
|
88 |
+
|
89 |
+
}
|
90 |
+
$my_query = new wp_query( $args );
|
91 |
+
return $my_query;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
|
94 |
function ampforwp_related_post(){
|
98 |
<h3 class="amp-related-posts-title"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></h3>
|
99 |
<?php }
|
100 |
|
101 |
+
|
102 |
function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array() ){
|
|
|
103 |
$related_post_permalink = ampforwp_url_controller( get_permalink() );
|
|
|
|
|
|
|
104 |
$show_image = (isset($data['show_image']) ? $data['show_image'] : true);
|
105 |
?>
|
106 |
<a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
|
133 |
}
|
134 |
|
135 |
function ampforwp_get_relatedpost_content($argsdata=array()){
|
136 |
+
$related_post_permalink = ampforwp_url_controller( get_permalink() );
|
137 |
+
?>
|
138 |
<div class="related_link">
|
139 |
+
<a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
|
140 |
+
|
141 |
+
<?php
|
142 |
+
$show_excerpt = (isset($argsdata['show_excerpt'])? $argsdata['show_excerpt'] : true);
|
143 |
+
if($show_excerpt){
|
144 |
+
if(has_excerpt()){
|
145 |
+
$content = get_the_excerpt();
|
146 |
+
}else{
|
147 |
+
$content = get_the_content();
|
148 |
+
}
|
149 |
+
?><p><?php
|
150 |
+
echo wp_trim_words( strip_shortcodes( $content ) , '15' );
|
151 |
+
?></p><?php
|
152 |
+
}
|
153 |
+
$show_author = (isset($argsdata['show_author'])? $argsdata['show_author'] : true);
|
154 |
+
if($show_author){
|
155 |
+
$author_args = isset($argsdata['author_args'])? $argsdata['author_args'] : array();
|
156 |
+
ampforwp_framework_get_author_box($author_args);
|
157 |
+
}
|
158 |
+
?>
|
159 |
+
</div>
|
160 |
+
<?php
|
161 |
+
}
|
images/d-1.png
ADDED
Binary file
|
images/d-2.png
ADDED
Binary file
|
images/d-3.png
ADDED
Binary file
|
images/d-4.png
ADDED
Binary file
|
images/feature-1.png
DELETED
Binary file
|
images/layouts-7.png
DELETED
Binary file
|
images/layouts-8.png
DELETED
Binary file
|
images/layouts-9.png
DELETED
Binary file
|
images/wpf.png
DELETED
Binary file
|
includes/admin-script.js
CHANGED
@@ -7,6 +7,7 @@ jQuery(function($) {
|
|
7 |
var parent = $(this).parents('.redux-container:first');
|
8 |
var expanded_options = parent.find('.expand_options');
|
9 |
if (searchString != "") {
|
|
|
10 |
if (!expanded_options.hasClass('expanded')) {
|
11 |
expanded_options.click();
|
12 |
parent.find('.redux-main').addClass('redux-search');
|
@@ -16,7 +17,7 @@ jQuery(function($) {
|
|
16 |
expanded_options.click();
|
17 |
parent.find('.redux-main').removeClass('redux-search');
|
18 |
}
|
19 |
-
|
20 |
|
21 |
if($('.redux-group-tab-link-li.active').length>0){
|
22 |
var rel = $('.redux-group-tab-link-li.active a').attr('data-rel');
|
@@ -63,33 +64,10 @@ jQuery(function($) {
|
|
63 |
$(this).parents('div.redux-group-tab').css('display','block');
|
64 |
}
|
65 |
return isMatch;
|
66 |
-
}).show( function() {
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
$(this).find("div.redux-section-field").each(function(){
|
71 |
-
var divSectionId = $(this).attr('id');
|
72 |
-
var splitResult = divSectionId.split("-");
|
73 |
-
splitResult.splice(1, 0, "table");
|
74 |
-
var divTableId = splitResult.join("-");
|
75 |
-
var totalTr = $("#"+divTableId).find('tr:visible').length;
|
76 |
-
if(totalTr==0){
|
77 |
-
$(this).hide();
|
78 |
-
}
|
79 |
-
});
|
80 |
-
} else {
|
81 |
-
$(this).find("div.redux-section-field").each(function(){
|
82 |
-
var divSectionId = $(this).attr('id');
|
83 |
-
var splitResult = divSectionId.split("-");
|
84 |
-
splitResult.splice(1, 0, "table");
|
85 |
-
var divTableId = splitResult.join("-");
|
86 |
-
var totalTr = $("#"+divTableId).find('tr:visible').length;
|
87 |
-
if(totalTr>0){
|
88 |
-
$(this).show();
|
89 |
-
}
|
90 |
-
});
|
91 |
-
}
|
92 |
-
}); // parent.find('.redux-group-tab') Closed
|
93 |
},
|
94 |
wait:400,
|
95 |
highlight:false,
|
@@ -262,46 +240,35 @@ jQuery(function($) {
|
|
262 |
var fontDetail = allFonts[i].fontFamily;
|
263 |
|
264 |
$('#amp_font_selector-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
|
265 |
-
$('#amp_font_selector_content_single-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
|
266 |
}
|
267 |
|
268 |
//console.log( values.length);
|
269 |
//console.log( values[0].family );
|
270 |
//console.table( values);
|
271 |
|
272 |
-
$('#amp_font_selector-select
|
273 |
var select = $('option:selected', this).attr('data-font-number');
|
274 |
var fontVariants = data.items[select].variants ;
|
275 |
var fontFile = data.items[select].files ;
|
276 |
|
277 |
-
if(
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
}
|
282 |
|
283 |
-
|
284 |
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
//$('.select2-search-choice').remove();
|
294 |
-
$('#amp_font_type_content_single-select').html('<option></option>').trigger('change');
|
295 |
-
}
|
296 |
-
$('#google_current_font_data_content_single').val( JSON.stringify(data.items[select]) );
|
297 |
-
|
298 |
-
for (var i in fontVariants) {
|
299 |
-
$('#amp_font_type_content_single-select').append($("<option value='"+ fontVariants[i] +"' > "+fontVariants[i]+"</option>")).trigger('change');
|
300 |
-
}
|
301 |
}
|
302 |
|
303 |
-
});
|
304 |
-
|
305 |
});
|
306 |
|
307 |
gfontData.fail(function(data) {
|
@@ -332,9 +299,6 @@ jQuery(function($) {
|
|
332 |
$('#amp_font_selector-select option[value="'+redux_data.amp_font_selector+'"]').attr("selected", "selected");
|
333 |
$('#amp_font_selector-select').select2('val',redux_data.amp_font_selector).trigger("change");
|
334 |
|
335 |
-
$('#amp_font_selector_content_single-select option[value="'+redux_data.amp_font_selector+'"]').attr("selected", "selected");
|
336 |
-
$('#amp_font_selector_content_single-select').select2('val',redux_data.amp_font_selector).trigger("change");
|
337 |
-
|
338 |
// Build select data
|
339 |
let fontData = redux_data.google_current_font_data;
|
340 |
// fontData = JSON.parse(fontData);
|
@@ -358,7 +322,6 @@ jQuery(function($) {
|
|
358 |
$('#s2id_amp_font_type-select ul').append('<li class="select2-search-choice"> <div> '+redux_data.amp_font_type[i]+'</div> <a href="#" class="select2-search-choice-close" tabindex="-1"></a></li>');
|
359 |
//s2.append($('<option>').text(e));
|
360 |
$('#amp_font_type-select option[value='+redux_data.amp_font_type[i]+']').attr('selected','selected').trigger('change');
|
361 |
-
$('#amp_font_type_content_single-select option[value='+redux_data.amp_font_type[i]+']').attr('selected','selected').trigger('change');
|
362 |
}
|
363 |
//$('#amp_font_type-select').select2('val',redux_data.amp_font_type)
|
364 |
}
|
@@ -370,10 +333,7 @@ jQuery(function($) {
|
|
370 |
|
371 |
$('.redux-container').each(function() {
|
372 |
if (!$(this).hasClass('redux-no-sections')) {
|
373 |
-
$(this).find('.
|
374 |
-
$('.redux-amp-search-icon').click(function(){
|
375 |
-
$('.redux_field_search').toggle('slide');
|
376 |
-
});
|
377 |
reduxOptionSearch();
|
378 |
}
|
379 |
});
|
@@ -436,13 +396,6 @@ $(".redux-ampforwp-ext-activate").click(function(){
|
|
436 |
var currentThis = $(this);
|
437 |
var plugin_id = currentThis.attr("id");
|
438 |
var license = $('input[name="redux_builder_amp[amp-license]['+plugin_id+'][license]"]').val();
|
439 |
-
if(license==""){
|
440 |
-
var newlicense = $('#redux_builder_amp_amp-license_'+plugin_id+'_license').val();
|
441 |
-
if(newlicense!=''){
|
442 |
-
license = newlicense;
|
443 |
-
$('input[name="redux_builder_amp[amp-license]['+plugin_id+'][license]"]').val(license);
|
444 |
-
}
|
445 |
-
}
|
446 |
var item_name = $('input[name="redux_builder_amp[amp-license]['+plugin_id+'][item_name]"]').val();
|
447 |
var store_url = $('input[name="redux_builder_amp[amp-license]['+plugin_id+'][store_url]"]').val();
|
448 |
var plugin_active_path = $('input[name="redux_builder_amp[amp-license]['+plugin_id+'][plugin_active_path]"]').val();
|
@@ -465,15 +418,7 @@ $(".redux-ampforwp-ext-activate").click(function(){
|
|
465 |
currentThis.html("Deactivate");
|
466 |
currentThis.after("<div class='afw-license-response-message'>"+response.message+'</div>');
|
467 |
currentThis.removeClass('redux-ampforwp-ext-activate').addClass('redux-ampforwp-ext-deactivate');
|
468 |
-
$('input[name="redux_builder_amp[amp-license]['+plugin_id+'][status]"]').val("valid");
|
469 |
deactivatelicence();
|
470 |
-
var all_data = response.other.all_data;
|
471 |
-
$('input[name="redux_builder_amp[amp-license]['+plugin_id+'][all_data][success]"]').val( all_data.success );
|
472 |
-
$('input[name="redux_builder_amp[amp-license]['+plugin_id+'][all_data][license]"]').val( all_data.license );
|
473 |
-
$('input[name="redux_builder_amp[amp-license]['+plugin_id+'][all_data][item_name]"]').val( all_data.item_name );
|
474 |
-
$('input[name="redux_builder_amp[amp-license]['+plugin_id+'][all_data][expires]"]').val( all_data.expires );
|
475 |
-
$('input[name="redux_builder_amp[amp-license]['+plugin_id+'][all_data][customer_name]"]').val( all_data.customer_name );
|
476 |
-
$('input[name="redux_builder_amp[amp-license]['+plugin_id+'][all_data][customer_email]"]').val( all_data.customer_email );
|
477 |
//window.location.href = window.location.href;
|
478 |
}else{
|
479 |
currentThis.after("<div class='afw-license-response-message'>"+response.message+'</div>');
|
7 |
var parent = $(this).parents('.redux-container:first');
|
8 |
var expanded_options = parent.find('.expand_options');
|
9 |
if (searchString != "") {
|
10 |
+
$('.redux-tab-container').hide();
|
11 |
if (!expanded_options.hasClass('expanded')) {
|
12 |
expanded_options.click();
|
13 |
parent.find('.redux-main').addClass('redux-search');
|
17 |
expanded_options.click();
|
18 |
parent.find('.redux-main').removeClass('redux-search');
|
19 |
}
|
20 |
+
parent.find('.redux-section-field, .redux-info-field, .redux-notice-field, .redux-container-group, .redux-section-desc, .redux-group-tab h3').show();
|
21 |
|
22 |
if($('.redux-group-tab-link-li.active').length>0){
|
23 |
var rel = $('.redux-group-tab-link-li.active a').attr('data-rel');
|
64 |
$(this).parents('div.redux-group-tab').css('display','block');
|
65 |
}
|
66 |
return isMatch;
|
67 |
+
}).show( function() {
|
68 |
|
69 |
+
|
70 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
},
|
72 |
wait:400,
|
73 |
highlight:false,
|
240 |
var fontDetail = allFonts[i].fontFamily;
|
241 |
|
242 |
$('#amp_font_selector-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
|
|
|
243 |
}
|
244 |
|
245 |
//console.log( values.length);
|
246 |
//console.log( values[0].family );
|
247 |
//console.table( values);
|
248 |
|
249 |
+
$('#amp_font_selector-select').on('change', function() {
|
250 |
var select = $('option:selected', this).attr('data-font-number');
|
251 |
var fontVariants = data.items[select].variants ;
|
252 |
var fontFile = data.items[select].files ;
|
253 |
|
254 |
+
if ( fontVariants) {
|
255 |
+
$('.select2-search-choice').remove();
|
256 |
+
$('#amp_font_type-select').html('<option></option>');
|
257 |
+
}
|
|
|
258 |
|
259 |
+
// console.log( data.items[select] );
|
260 |
|
261 |
+
//if ( data.items[select] ) {
|
262 |
+
$('#google_current_font_data').val( JSON.stringify(data.items[select]) );
|
263 |
+
//}
|
264 |
+
|
265 |
+
for (var i in fontVariants) {
|
266 |
+
// var fontArray = {};
|
267 |
+
// fontArray[fontVariants[i]] = fontFile[fontVariants[i]] ;
|
268 |
+
$('#amp_font_type-select').append($("<option value='"+ fontVariants[i] +"' > "+fontVariants[i]+"</option>")).trigger('change');;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
}
|
270 |
|
271 |
+
});
|
|
|
272 |
});
|
273 |
|
274 |
gfontData.fail(function(data) {
|
299 |
$('#amp_font_selector-select option[value="'+redux_data.amp_font_selector+'"]').attr("selected", "selected");
|
300 |
$('#amp_font_selector-select').select2('val',redux_data.amp_font_selector).trigger("change");
|
301 |
|
|
|
|
|
|
|
302 |
// Build select data
|
303 |
let fontData = redux_data.google_current_font_data;
|
304 |
// fontData = JSON.parse(fontData);
|
322 |
$('#s2id_amp_font_type-select ul').append('<li class="select2-search-choice"> <div> '+redux_data.amp_font_type[i]+'</div> <a href="#" class="select2-search-choice-close" tabindex="-1"></a></li>');
|
323 |
//s2.append($('<option>').text(e));
|
324 |
$('#amp_font_type-select option[value='+redux_data.amp_font_type[i]+']').attr('selected','selected').trigger('change');
|
|
|
325 |
}
|
326 |
//$('#amp_font_type-select').select2('val',redux_data.amp_font_type)
|
327 |
}
|
333 |
|
334 |
$('.redux-container').each(function() {
|
335 |
if (!$(this).hasClass('redux-no-sections')) {
|
336 |
+
$(this).find('.redux-main').prepend('<input style="float:right" class="redux_field_search" name="" type="text" placeholder="Search the controls"/>');
|
|
|
|
|
|
|
337 |
reduxOptionSearch();
|
338 |
}
|
339 |
});
|
396 |
var currentThis = $(this);
|
397 |
var plugin_id = currentThis.attr("id");
|
398 |
var license = $('input[name="redux_builder_amp[amp-license]['+plugin_id+'][license]"]').val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
var item_name = $('input[name="redux_builder_amp[amp-license]['+plugin_id+'][item_name]"]').val();
|
400 |
var store_url = $('input[name="redux_builder_amp[amp-license]['+plugin_id+'][store_url]"]').val();
|
401 |
var plugin_active_path = $('input[name="redux_builder_amp[amp-license]['+plugin_id+'][plugin_active_path]"]').val();
|
418 |
currentThis.html("Deactivate");
|
419 |
currentThis.after("<div class='afw-license-response-message'>"+response.message+'</div>');
|
420 |
currentThis.removeClass('redux-ampforwp-ext-activate').addClass('redux-ampforwp-ext-deactivate');
|
|
|
421 |
deactivatelicence();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
//window.location.href = window.location.href;
|
423 |
}else{
|
424 |
currentThis.after("<div class='afw-license-response-message'>"+response.message+'</div>');
|
includes/admin-style.css
CHANGED
@@ -642,80 +642,6 @@ visibility: hidden;
|
|
642 |
.backtoextensionlist{
|
643 |
cursor: pointer;
|
644 |
}
|
645 |
-
.redux-main #redux-sticky{display: none}
|
646 |
|
647 |
-
#info-ampforwp-beta-mode-notice{color: #263238; margin: 20px; background: #FFF9C4;border-color: #908204;}
|
648 |
-
|
649 |
-
.redux-container #redux-intro-text .dashicons-admin-generic:before, .activated-plugins { color: #666 }
|
650 |
-
|
651 |
-
/*** RTL CSS ***/
|
652 |
-
.rtl .redux_field_th span:first-child {
|
653 |
-
right: auto;
|
654 |
-
left: 2%;
|
655 |
-
}
|
656 |
-
.rtl .redux-main .redux-field-container{
|
657 |
-
margin-left: 50px;
|
658 |
-
width: 90%;
|
659 |
-
}
|
660 |
-
.rtl .redux-main .button.remove-image{
|
661 |
-
margin-right: 10px;
|
662 |
-
}
|
663 |
-
.rtl .redux-sidebar .redux-group-tab-link-a i {
|
664 |
-
right: auto;
|
665 |
-
left: 10px;
|
666 |
-
}
|
667 |
-
.rtl .redux-main .child_opt .redux_field_th {
|
668 |
-
margin-right: 10px;
|
669 |
-
}
|
670 |
-
.rtl .redux_field_th {
|
671 |
-
padding: 20px 20px 20px 10px !important;
|
672 |
-
}
|
673 |
-
.rtl .redux-container #redux-header .display_header{
|
674 |
-
float: right;
|
675 |
-
}
|
676 |
-
.rtl .redux-container #redux-intro-text {
|
677 |
-
left: 5px;
|
678 |
-
right: auto;
|
679 |
-
}
|
680 |
-
.rtl .redux-amp-search-icon .dashicons-before:before{
|
681 |
-
vertical-align:middle;
|
682 |
-
}
|
683 |
-
.rtl .redux-container-switch .switch-options{
|
684 |
-
text-align:right;
|
685 |
-
}
|
686 |
-
.rtl .redux-main .child_opt fieldset {
|
687 |
-
padding: 8px 25px 8px 10px;
|
688 |
-
}
|
689 |
-
.rtl .redux-main .child_opt th, .rtl .redux-main .child_opt td {
|
690 |
-
padding: 0px 0px 0px 0px !important;
|
691 |
-
}
|
692 |
-
.rtl .redux-main .child_opt fieldset {
|
693 |
-
right: 0;
|
694 |
-
}
|
695 |
-
.rtl .redux-main .redux-field-container {
|
696 |
-
padding: 18px 15px 18px 0;
|
697 |
-
}
|
698 |
-
.rtl .redux-main .afw-tooltip .afw-help-subtitle{
|
699 |
-
left: -16px;
|
700 |
-
}
|
701 |
-
.rtl .afw-tooltip .afw-help-subtitle::after{
|
702 |
-
display: none
|
703 |
-
}
|
704 |
-
/*** Free Vs Pro CSS ***/
|
705 |
-
.rtl .fr h1, .rtl .pr h1{
|
706 |
-
padding: 0px 35px 20px 0px;
|
707 |
-
}
|
708 |
-
.rtl .ext{
|
709 |
-
padding: 45px 50px 45px 0px;
|
710 |
-
}
|
711 |
-
.rtl .fe-t h4{
|
712 |
-
padding:0px 8px 0px 0px;
|
713 |
-
}
|
714 |
-
.rtl .lt {
|
715 |
-
padding-right: 50px;
|
716 |
-
padding-left:0;
|
717 |
-
}
|
718 |
-
|
719 |
-
#redux_builder_amp-hide-amp-categories .inner-child span:before{
|
720 |
-
content: "- "
|
721 |
-
}
|
642 |
.backtoextensionlist{
|
643 |
cursor: pointer;
|
644 |
}
|
645 |
+
.redux_field_search, .redux-main #redux-sticky{display: none}
|
646 |
|
647 |
+
#info-ampforwp-beta-mode-notice{color: #263238; margin: 20px; background: #FFF9C4;border-color: #908204;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/amp-consent/consent.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
echo '{"promptIfUnknown": true}' ;
|
3 |
-
?>
|
|
|
|
|
|
includes/icons/amp-icons.php
CHANGED
@@ -773,9 +773,7 @@ return array( 'widgets' => '.icon-widgets:before { content: "\e1bd";}',
|
|
773 |
'vk'=> '.icon-vk:before {content: "\e944";}',
|
774 |
'wechat'=> '.icon-wechat:before {content: "\e945";}',
|
775 |
'whatsapp'=> '.icon-whatsapp:before {content: "\e946";}',
|
776 |
-
'youtube'=> '.icon-youtube:before {content: "\e947";}'
|
777 |
-
'hatenabookmark'=> '.icon-hatenabookmark:before {content: "\e948";}',
|
778 |
-
'pocket'=> '.icon-pocket:before {content: "\e949";}',
|
779 |
);
|
780 |
|
781 |
?>
|
773 |
'vk'=> '.icon-vk:before {content: "\e944";}',
|
774 |
'wechat'=> '.icon-wechat:before {content: "\e945";}',
|
775 |
'whatsapp'=> '.icon-whatsapp:before {content: "\e946";}',
|
776 |
+
'youtube'=> '.icon-youtube:before {content: "\e947";}'
|
|
|
|
|
777 |
);
|
778 |
|
779 |
?>
|
includes/options/admin-config.php
CHANGED
@@ -27,8 +27,7 @@ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
|
27 |
$cta_AD_URL = "http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=call-to-action_banner_in_notification_bar&utm_campaign=AMP%20Plugin";
|
28 |
$cta_desc = '<a href="'.$cta_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/cta-banner.png" width="560" height="85" /></a>';
|
29 |
}
|
30 |
-
|
31 |
-
global $all_extensions_data;
|
32 |
$extension_listing_array = array(
|
33 |
array(
|
34 |
'name'=>'ADS for WP',
|
@@ -90,18 +89,6 @@ $extension_listing_array = array(
|
|
90 |
'is_activated'=>(is_plugin_active('amp-ninja-forms/amp-ninja-forms.php')? 1 : 2),
|
91 |
'settingUrl'=>'{ampforwp-nf-subsection}',
|
92 |
),
|
93 |
-
array(
|
94 |
-
'name'=>'WP Forms for AMP',
|
95 |
-
'desc'=>'Add WP Forms Support in AMP.',
|
96 |
-
'img_src'=>AMPFORWP_IMAGE_DIR . '/wpf.png',
|
97 |
-
'price'=>'$79',
|
98 |
-
'url_link'=>'http://ampforwp.com/wp-forms/#utm_source=options-panel&utm_medium=extension-tab_gf&utm_campaign=AMP%20Plugin',
|
99 |
-
'plugin_active_path'=> 'wp-forms-for-amp/amp-wpforms.php',
|
100 |
-
'item_name'=>'WP Forms for AMP',
|
101 |
-
'store_url'=>'https://accounts.ampforwp.com',
|
102 |
-
'is_activated'=>(is_plugin_active('wp-forms-for-amp/amp-wpforms.php')? 1 : 2),
|
103 |
-
'settingUrl'=>'{ampforwp-wpf-subsection}',
|
104 |
-
),
|
105 |
array(
|
106 |
'name'=>'Email Opt-in Forms',
|
107 |
'desc'=>'Capture Leads with Email Subscription.',
|
@@ -311,17 +298,15 @@ $extension_listing_array = array(
|
|
311 |
);
|
312 |
|
313 |
$extension_listing_array = apply_filters( 'ampforwp_extension_lists_filter', $extension_listing_array );
|
314 |
-
$all_extensions_data = $extension_listing_array;
|
315 |
$ampforwp_extension_list_html = '';
|
316 |
$ampforwp_nameOfUser = "";
|
317 |
$ampforwp_is_productActivated = false;
|
318 |
-
function
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
}
|
324 |
-
usort($extension_listing_array, 'ampforwp_sort_extension_array');
|
325 |
foreach ($extension_listing_array as $key => $extension) {
|
326 |
$currentStatus = "";
|
327 |
|
@@ -340,14 +325,7 @@ foreach ($extension_listing_array as $key => $extension) {
|
|
340 |
}
|
341 |
|
342 |
$amplicense = '';
|
343 |
-
$onclickUrl = $
|
344 |
-
$allResponseData = array('success'=>'',
|
345 |
-
'license'=> '',
|
346 |
-
'item_name'=> '',
|
347 |
-
'expires'=> '',
|
348 |
-
'customer_name'=> '',
|
349 |
-
'customer_email'=> '',
|
350 |
-
);
|
351 |
$selectedOption = get_option('redux_builder_amp',true);
|
352 |
if(isset($selectedOption['amp-license'][$pathExploded])){
|
353 |
$amplicense = $selectedOption['amp-license'][$pathExploded]['license'];
|
@@ -359,32 +337,16 @@ foreach ($extension_listing_array as $key => $extension) {
|
|
359 |
if($ampforwp_nameOfUser=="" && isset($selectedOption['amp-license'][$pathExploded]['all_data']['customer_name'])){
|
360 |
$ampforwp_nameOfUser = $selectedOption['amp-license'][$pathExploded]['all_data']['customer_name'];
|
361 |
}
|
362 |
-
|
363 |
-
if(isset($selectedOption['amp-license'][$pathExploded]['all_data']) && $selectedOption['amp-license'][$pathExploded]['all_data']!=""){
|
364 |
-
$allResponseData = $selectedOption['amp-license'][$pathExploded]['all_data'];
|
365 |
-
$remainingExpiresDays = floor( ( strtotime($allResponseData['expires'] )- time() )/( 60*60*24 ) );
|
366 |
-
if($remainingExpiresDays>0){
|
367 |
-
$amp_license_response = $remainingExpiresDays." Days Remaining. <a href='https://accounts.ampforwp.com/order/?edd_license_key=".$amplicense."&download_id=".$allResponseData['item_name']."'>Renew License</a>";
|
368 |
-
}else{ $amp_license_response = "Expired! <a href='https://accounts.ampforwp.com/order/?edd_license_key=".$amplicense."&download_id=".$allResponseData['item_name']."'>Renew your license</a>"; }
|
369 |
-
}
|
370 |
}
|
371 |
|
372 |
-
$pluginReview = '<input
|
373 |
-
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][license]" type="hidden" value="'. $amplicense.'">
|
374 |
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][item_name]" type="hidden" value="'.$extension['item_name'].'">
|
375 |
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][store_url]" type="hidden" value="'.$extension['store_url'].'">
|
376 |
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][plugin_active_path]" type="hidden" value="'.$extension['plugin_active_path'].'">
|
377 |
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][name]" type="hidden" value="'.$extension['name'].'">
|
378 |
-
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][status]" type="hidden" value="'.$selectedOption['amp-license'][$pathExploded]['status'].'">';
|
379 |
-
$pluginReview .= '<input name="redux_builder_amp[amp-license]['.$pathExploded.'][all_data][success]" type="hidden" value="'.$allResponseData['success'].'">
|
380 |
-
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][all_data][license]" type="hidden" value="'.$allResponseData['license'].'">
|
381 |
-
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][all_data][item_name]" type="hidden" value="'.$allResponseData['item_name'].'">
|
382 |
-
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][all_data][expires]" type="hidden" value="'.$allResponseData['expires'].'">
|
383 |
-
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][all_data][customer_name]" type="hidden" value="'.$allResponseData['customer_name'].'">
|
384 |
-
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][all_data][customer_email]" type="hidden" value="'.$allResponseData['customer_email'].'">
|
385 |
';
|
386 |
|
387 |
-
$pluginReview .= $verify
|
388 |
if(isset($selectedOption['amp-license'][$pathExploded]['message']) && $selectedOption['amp-license'][$pathExploded]['message']!=""){
|
389 |
$pluginReview .= "<div class='afw-license-response-message'>".$selectedOption['amp-license'][$pathExploded]['message']."</div>";
|
390 |
}
|
@@ -419,21 +381,6 @@ $extension_listing = '
|
|
419 |
</div>
|
420 |
';
|
421 |
|
422 |
-
// #2267
|
423 |
-
function ampforwp_check_extensions(){
|
424 |
-
global $all_extensions_data;
|
425 |
-
if($all_extensions_data){
|
426 |
-
foreach ($all_extensions_data as $extension ) {
|
427 |
-
$is_extension_active = $extension['is_activated'];
|
428 |
-
if( 1 === $is_extension_active){
|
429 |
-
return true;
|
430 |
-
}
|
431 |
-
}
|
432 |
-
}
|
433 |
-
|
434 |
-
return false;
|
435 |
-
}
|
436 |
-
|
437 |
$freepro_listing = '
|
438 |
<div class="fp-wr">
|
439 |
<div class="fp-img">
|
@@ -929,7 +876,7 @@ $eu_iso_codes = array(
|
|
929 |
//$amp_redux_header = '<span id="name"><span style="color: #4dbefa;">U</span>ltimate <span style="color: #4dbefa;">W</span>idgets</span>';
|
930 |
$proDetailsProvide = '<a class="premium_features_btn_txt" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">'.__('Get more out of AMP','accelerated-mobile-pages').'</a> <a class="premium_features_btn" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">Get PRO Version</a> ';
|
931 |
if($ampforwp_nameOfUser!=""){
|
932 |
-
$proDetailsProvide = "<span class='extension-menu-call'><span class='activated-plugins'>Hello, ".$ampforwp_nameOfUser."</span> <a class='' href='".admin_url('admin.php?page=amp_options&tabid=opt-go-premium')."'><i class='dashicons-before dashicons-admin-generic'></i></a></span>";
|
933 |
}elseif($ampforwp_is_productActivated){
|
934 |
$proDetailsProvide = "<span class='extension-menu-call'>One more Step <a class='premium_features_btn' href='".admin_url('admin.php?tabid=opt-go-premium&page=amp_options')."'>Enter license here</a></span>";
|
935 |
}
|
@@ -1471,26 +1418,10 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
1471 |
'type' => 'switch',
|
1472 |
'title' => __('AD #3', 'accelerated-mobile-pages'),
|
1473 |
'default' => 0,
|
1474 |
-
'desc' => __('Above the Post Content', 'accelerated-mobile-pages'),
|
1475 |
'true' => 'Enabled',
|
1476 |
'false' => 'Disabled',
|
1477 |
),
|
1478 |
-
array(
|
1479 |
-
'class' => 'child_opt child_opt_arrow',
|
1480 |
-
'id' => 'made-amp-ad-3-global',
|
1481 |
-
'type' => 'select',
|
1482 |
-
'title' => __('Display on', 'accelerated-mobile-pages'),
|
1483 |
-
'options' => array (
|
1484 |
-
'1' => 'Single',
|
1485 |
-
'2' => 'Pages',
|
1486 |
-
'3' => 'Custom Post Types',
|
1487 |
-
'4' => 'Global'
|
1488 |
-
),
|
1489 |
-
'multi' => true,
|
1490 |
-
'default' => '1',
|
1491 |
-
'desc' => __('Display the Ad on only post or on all posts and pages ', 'accelerated-mobile-pages'),
|
1492 |
-
'required' => array('enable-amp-ads-3', '=' , '1')
|
1493 |
-
),
|
1494 |
array(
|
1495 |
'class' => 'child_opt child_opt_arrow',
|
1496 |
'id' => 'enable-amp-ads-select-3',
|
@@ -1844,31 +1775,13 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
1844 |
'default' => 0,
|
1845 |
'required' => array('ampforwp-seo-selection', '=' , '1'),
|
1846 |
),
|
1847 |
-
array(
|
1848 |
-
'class' => 'child_opt',
|
1849 |
-
'id' => 'ampforwp-seo-yoast-canonical',
|
1850 |
-
'type' => 'switch',
|
1851 |
-
'tooltip-subtitle' => __('Pull Canonical from Yoast for AMP pages', 'accelerated-mobile-pages'),
|
1852 |
-
'title' => __( 'Canonical from Yoast', 'accelerated-mobile-pages' ),
|
1853 |
-
'default' => 0,
|
1854 |
-
'required' => array('ampforwp-seo-selection', '=' , '1'),
|
1855 |
-
),
|
1856 |
array(
|
1857 |
'id' => 'ampforwp-seo-aioseo',
|
1858 |
'type' => 'info',
|
1859 |
'style' => 'success',
|
1860 |
-
'desc' => __("All in One SEO works out of the Box with our plugin. It deosn't requires any extra config
|
1861 |
'required' => array('ampforwp-seo-selection', '=', '2')
|
1862 |
-
|
1863 |
-
array(
|
1864 |
-
'class' => 'child_opt',
|
1865 |
-
'id' => 'ampforwp-seo-aioseo-canonical',
|
1866 |
-
'type' => 'switch',
|
1867 |
-
'tooltip-subtitle' => __('Pull Canonical from All In One SEO for AMP pages', 'accelerated-mobile-pages'),
|
1868 |
-
'title' => __( 'Canonical from All In One SEO', 'accelerated-mobile-pages' ),
|
1869 |
-
'default' => 0,
|
1870 |
-
'required' => array('ampforwp-seo-selection', '=' , '2'),
|
1871 |
-
),
|
1872 |
array(
|
1873 |
'id' => 'ampforwp-seo-index-noindex-sub-section',
|
1874 |
'type' => 'section',
|
@@ -1989,7 +1902,7 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
1989 |
'options' => array(
|
1990 |
'1' => __('Google Analytics', 'accelerated-mobile-pages' ),
|
1991 |
'2' => __('Segment Analytics', 'accelerated-mobile-pages' ),
|
1992 |
-
'3' => __('
|
1993 |
'4' => __('Quantcast Measurement', 'accelerated-mobile-pages' ),
|
1994 |
'5' => __('comScore', 'accelerated-mobile-pages' ),
|
1995 |
'6' => __('Effective Measure', 'accelerated-mobile-pages' ),
|
@@ -2050,17 +1963,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2050 |
),
|
2051 |
'default' => 0,
|
2052 |
),
|
2053 |
-
array(
|
2054 |
-
'class' => 'child_opt',
|
2055 |
-
'id' => 'ampforwp-ga-field-anonymizeIP',
|
2056 |
-
'type' => 'switch',
|
2057 |
-
'title' => __( 'IP Anonymization', 'accelerated-mobile-pages' ),
|
2058 |
-
'required' => array(
|
2059 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2060 |
-
array('ampforwp-ga-switch', '=' , '1')
|
2061 |
-
),
|
2062 |
-
'default' => 1,
|
2063 |
-
),
|
2064 |
array(
|
2065 |
'class' => 'child_opt',
|
2066 |
'id' => 'ampforwp-ga-field-advance',
|
@@ -2113,7 +2015,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2113 |
),
|
2114 |
),
|
2115 |
array(
|
2116 |
-
'class' => 'child_opt',
|
2117 |
'id' =>'amp-gtm-analytics-type',
|
2118 |
'type' => 'text',
|
2119 |
'title' => __('Analytics Type','accelerated-mobile-pages'),
|
@@ -2135,16 +2036,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2135 |
'required' => array(
|
2136 |
array('amp-use-gtm-option', '=' , '1')),
|
2137 |
),
|
2138 |
-
array(
|
2139 |
-
'class' => 'child_opt',
|
2140 |
-
'id' => 'ampforwp-gtm-field-anonymizeIP',
|
2141 |
-
'type' => 'switch',
|
2142 |
-
'title' => __( 'IP Anonymization', 'accelerated-mobile-pages' ),
|
2143 |
-
'required' => array(
|
2144 |
-
array('amp-use-gtm-option', '=' , '1'),
|
2145 |
-
),
|
2146 |
-
'default' => 1,
|
2147 |
-
),
|
2148 |
// Google Cliend ID API
|
2149 |
array(
|
2150 |
'id' => 'ampforwp-ga-clientid-api-gtm',
|
@@ -2211,7 +2102,7 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2211 |
array(
|
2212 |
'id' => 'ampforwp-Piwik-switch',
|
2213 |
'type' => 'switch',
|
2214 |
-
'title' => '
|
2215 |
'default' => ampforwp_get_default_analytics('3'),
|
2216 |
'required' => array(
|
2217 |
array('amp-use-gtm-option', '=' , '0'),
|
@@ -2220,13 +2111,13 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2220 |
array(
|
2221 |
'id' => 'pa-feild',
|
2222 |
'type' => 'text',
|
2223 |
-
'title' => __( '
|
2224 |
'required' => array(
|
2225 |
array('amp-use-gtm-option', '=' , '0'),
|
2226 |
array('ampforwp-Piwik-switch', '=' , '1')
|
2227 |
),
|
2228 |
'desc' => __( 'Example: https://piwik.example.org/piwik.php?idsite=YOUR_SITE_ID&rec=1&action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL&rand=RANDOM', 'accelerated-mobile-pages' ),
|
2229 |
-
'tooltip-subtitle' => __('Enter your
|
2230 |
'default' => '#',
|
2231 |
),
|
2232 |
// Quantcast
|
@@ -2619,7 +2510,6 @@ function ampforwp_add_sd_fields($fields){
|
|
2619 |
'indent' => true,
|
2620 |
'layout_type' => 'accordion',
|
2621 |
'accordion-open'=> 1,
|
2622 |
-
'required' => array('amp-gdpr-compliance-switch', '=' , '0')
|
2623 |
),
|
2624 |
|
2625 |
array(
|
@@ -2630,7 +2520,6 @@ function ampforwp_add_sd_fields($fields){
|
|
2630 |
'tooltip-subtitle' => __('Show notifications on all of your AMP pages for cookie purposes, or anything else.', 'accelerated-mobile-pages'),
|
2631 |
'true' => 'Enabled',
|
2632 |
'false' => 'Disabled',
|
2633 |
-
'required' => array('amp-gdpr-compliance-switch', '=' , '0')
|
2634 |
),
|
2635 |
array(
|
2636 |
'class' => 'child_opt child_opt_arrow',
|
@@ -2664,7 +2553,28 @@ function ampforwp_add_sd_fields($fields){
|
|
2664 |
'type' => 'switch',
|
2665 |
'title' => __('GDPR Compliancy', 'accelerated-mobile-pages'),
|
2666 |
'default' => 0,
|
2667 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2668 |
),
|
2669 |
array(
|
2670 |
'id' => 'gdpr-type',
|
@@ -2908,23 +2818,23 @@ $forms_support[] = array(
|
|
2908 |
'desc' => '<div style=" background: #FFF9C4;padding: 12px;line-height: 1.6;margin:-45px -14px -18px -17px;"><b>ONE LAST STEP REQUIRED:</b> This feature requires <a href="https://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=cf7-tab_cf7_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Contact Form 7 extension</a>.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=cf7-tab_cf7_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Click here for more info</a>)</div></div>',
|
2909 |
);
|
2910 |
}
|
2911 |
-
|
2912 |
-
|
2913 |
'id' => 'ampforwp-cfs_2',
|
2914 |
'type' => 'section',
|
2915 |
'title' => __('Gravity Forms Compatibility', 'accelerated-mobile-pages'),
|
2916 |
'indent' => true,
|
2917 |
'layout_type' => 'accordion',
|
2918 |
'accordion-open'=> 1,
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
2929 |
if(!is_plugin_active( 'amp-gravity-forms/amp-gravity-forms.php' ) ){
|
2930 |
$forms_support[]= array(
|
@@ -2932,34 +2842,7 @@ $forms_support[] = array(
|
|
2932 |
'type' => 'info',
|
2933 |
'required' => array('amp-enable-gravityforms_support', '=' , '1'),
|
2934 |
'desc' => '<div style=" background: #FFF9C4;padding: 12px;line-height: 1.6;margin:-45px -14px -18px -17px;"><b>ONE LAST STEP REQUIRED:</b> This feature requires <a href="https://ampforwp.com/gravity-forms/#utm_source=options-panel&utm_medium=gf-tab_gf_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Gravity Forms extension</a>.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/gravity-forms/#utm_source=options-panel&utm_medium=gf-tab_gf_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Click here for more info</a>)</div></div>',
|
2935 |
-
|
2936 |
-
}
|
2937 |
-
// Ninja Forms
|
2938 |
-
$forms_support[] = array(
|
2939 |
-
'id' => 'ampforwp-ninja-forms',
|
2940 |
-
'type' => 'section',
|
2941 |
-
'title' => __('Ninja Forms Compatibility', 'accelerated-mobile-pages'),
|
2942 |
-
'indent' => true,
|
2943 |
-
'layout_type' => 'accordion',
|
2944 |
-
'accordion-open'=> 1,
|
2945 |
-
);
|
2946 |
-
$forms_support[] = array(
|
2947 |
-
'id' =>'amp-enable-ninja-forms-support',
|
2948 |
-
'type' => 'switch',
|
2949 |
-
'title' => __('Ninja Forms Support', 'accelerated-mobile-pages'),
|
2950 |
-
'default' => '',
|
2951 |
-
'true' => 'Enabled',
|
2952 |
-
'false' => 'Disabled',
|
2953 |
-
);
|
2954 |
-
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
2955 |
-
if(!is_plugin_active( 'amp-gravity-forms/amp-ninja-forms.php' ) ){
|
2956 |
-
$forms_support[]= array(
|
2957 |
-
'id' => 'info_normal_2',
|
2958 |
-
'type' => 'info',
|
2959 |
-
'required' => array('amp-enable-ninja-forms-support', '=' , '1'),
|
2960 |
-
'desc' => '<div style=" background: #FFF9C4;padding: 12px;line-height: 1.6;margin:-45px -14px -18px -17px;"><b>ONE LAST STEP REQUIRED:</b> This feature requires <a href="https://ampforwp.com/ninja-forms/#utm_source=options-panel&utm_medium=gf-tab_gf_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Ninja Forms extension</a>.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/ninja-forms/#utm_source=options-panel&utm_medium=gf-tab_gf_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Click here for more info</a>)</div></div>',
|
2961 |
-
);
|
2962 |
-
}
|
2963 |
|
2964 |
// Contact Form SECTION
|
2965 |
Redux::setSection( $opt_name, array(
|
@@ -2978,29 +2861,6 @@ $forms_support[] = array(
|
|
2978 |
'id' => 'disqus-comments',
|
2979 |
'subsection' => true,
|
2980 |
'fields' => array(
|
2981 |
-
array(
|
2982 |
-
'id' => 'ampforwp-display-comments',
|
2983 |
-
'type' => 'section',
|
2984 |
-
'title' => __('Display', 'accelerated-mobile-pages'),
|
2985 |
-
'indent' => true,
|
2986 |
-
'layout_type' => 'accordion',
|
2987 |
-
'accordion-open'=> 1,
|
2988 |
-
),
|
2989 |
-
array(
|
2990 |
-
'id' => 'ampforwp-display-on-pages',
|
2991 |
-
'type' => 'switch',
|
2992 |
-
'title' => __('Display on Pages', 'accelerated-mobile-pages'),
|
2993 |
-
'tooltip-subtitle' => __('Enable/Disable comments on pages using this switch.', 'accelerated-mobile-pages'),
|
2994 |
-
'default' => 1
|
2995 |
-
),
|
2996 |
-
array(
|
2997 |
-
'id' => 'ampforwp-display-on-posts',
|
2998 |
-
'type' => 'switch',
|
2999 |
-
'title' => __('Display on Posts', 'accelerated-mobile-pages'),
|
3000 |
-
'tooltip-subtitle' => __('Enable/Disable comments on posts using this switch.', 'accelerated-mobile-pages'),
|
3001 |
-
'default' => 1
|
3002 |
-
),
|
3003 |
-
|
3004 |
array(
|
3005 |
'id' => 'ampforwp-comments',
|
3006 |
'type' => 'section',
|
@@ -3025,16 +2885,6 @@ $forms_support[] = array(
|
|
3025 |
'required' => array('wordpress-comments-support' , '=' , 1
|
3026 |
),
|
3027 |
),
|
3028 |
-
array(
|
3029 |
-
'class' => 'child_opt child_opt_arrow',
|
3030 |
-
'id' => 'ampforwp-display-avatar',
|
3031 |
-
'type' => 'switch',
|
3032 |
-
'title' => __('Display on User Avatar', 'accelerated-mobile-pages'),
|
3033 |
-
'tooltip-subtitle' => __('Enable/Disable user Avatar.', 'accelerated-mobile-pages'),
|
3034 |
-
'default' => 1,
|
3035 |
-
'required' => array('wordpress-comments-support' , '=' , 1
|
3036 |
-
),
|
3037 |
-
),
|
3038 |
array(
|
3039 |
'id' => 'ampforwp-disqus-comments-support',
|
3040 |
'type' => 'switch',
|
@@ -3067,8 +2917,7 @@ $forms_support[] = array(
|
|
3067 |
'id' => 'ampforwp-disqus-host-file',
|
3068 |
'type' => 'text',
|
3069 |
'title' => __('Disqus Host File', 'accelerated-mobile-pages'),
|
3070 |
-
'
|
3071 |
-
'tooltip-subtitle' => __('Enter the URL of host file', 'accelerated-mobile-pages'),
|
3072 |
'placeholder' => 'https://comments.example.com/disqus.php',
|
3073 |
'required' => array('ampforwp-disqus-host-position', '=' , '0'),
|
3074 |
),
|
@@ -3107,62 +2956,11 @@ $forms_support[] = array(
|
|
3107 |
'title' => __('No of Comments', 'accelerated-mobile-pages'),
|
3108 |
'default' => 10,
|
3109 |
'required' => array(
|
3110 |
-
|
3111 |
-
),
|
3112 |
-
),
|
3113 |
-
array(
|
3114 |
-
'class' => 'child_opt child_opt_arrow',
|
3115 |
-
'id' => 'ampforwp-fb-comments-lang',
|
3116 |
-
'type' => 'text',
|
3117 |
-
'tooltip-subtitle' => __('Enter the Language code','accelerated-mobile-pages'),
|
3118 |
-
'title' => __('Language', 'accelerated-mobile-pages'),
|
3119 |
-
'desc' => '<a href="https://developers.facebook.com/docs/internationalization" target="_blank">Locales and Languages Supported by Facebook </a>',
|
3120 |
-
'default' => get_locale(),
|
3121 |
-
'required' => array(
|
3122 |
-
array('ampforwp-facebook-comments-support', '=' , 1)
|
3123 |
-
),
|
3124 |
-
),
|
3125 |
-
//Vuukle options
|
3126 |
-
array(
|
3127 |
-
'id' => 'ampforwp-vuukle-comments-support',
|
3128 |
-
'type' => 'switch',
|
3129 |
-
'title' => __('Vuukle Comments', 'accelerated-mobile-pages'),
|
3130 |
-
'tooltip-subtitle' => __('Enable/Disable Vuukle comments using this switch.', 'accelerated-mobile-pages'),
|
3131 |
-
'default' => 0,
|
3132 |
-
),
|
3133 |
-
array(
|
3134 |
-
'class' => 'child_opt child_opt_arrow',
|
3135 |
-
'id' => 'ampforwp-vuukle-comments-apiKey',
|
3136 |
-
'type' => 'text',
|
3137 |
-
'tooltip-subtitle' => __('Enter the API key of Vuukle','accelerated-mobile-pages'),
|
3138 |
-
'title' => __('API Key', 'accelerated-mobile-pages'),
|
3139 |
-
'default' => '',
|
3140 |
-
'desc' => "For Example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
3141 |
-
'required' => array(
|
3142 |
-
array('ampforwp-vuukle-comments-support', '=' , 1),
|
3143 |
-
),
|
3144 |
-
),
|
3145 |
-
//SpotIM Options
|
3146 |
-
array(
|
3147 |
-
'id' => 'ampforwp-spotim-comments-support',
|
3148 |
-
'type' => 'switch',
|
3149 |
-
'title' => __('Spot.IM Conversation', 'accelerated-mobile-pages'),
|
3150 |
-
'tooltip-subtitle' => __('Enable/Disable Spot.IM Conversation using this switch.', 'accelerated-mobile-pages'),
|
3151 |
-
'default' => 0,
|
3152 |
-
),
|
3153 |
-
array(
|
3154 |
-
'class' => 'child_opt child_opt_arrow',
|
3155 |
-
'id' => 'ampforwp-spotim-comments-apiKey',
|
3156 |
-
'type' => 'text',
|
3157 |
-
'tooltip-subtitle' => __('Enter the SPOT_ID of Spot.IM','accelerated-mobile-pages'),
|
3158 |
-
'title' => __('SPOT ID', 'accelerated-mobile-pages'),
|
3159 |
-
'default' => '',
|
3160 |
-
'desc' => "For Example xxxxxxxx-xxxx-xxxx-xxxx",
|
3161 |
-
'required' => array(
|
3162 |
-
array('ampforwp-spotim-comments-support', '=' , 1),
|
3163 |
-
),
|
3164 |
-
),
|
3165 |
|
|
|
|
|
|
|
3166 |
)
|
3167 |
) );
|
3168 |
|
@@ -3313,21 +3111,12 @@ Redux::setSection( $opt_name, array(
|
|
3313 |
),
|
3314 |
array(
|
3315 |
'id' =>'hide-amp-categories',
|
3316 |
-
'type' => '
|
3317 |
'title' => __('Select Categories to Hide AMP'),
|
3318 |
'tooltip-subtitle' => __( 'Hide AMP from all the posts of a selected category.', 'accelerated-mobile-pages' ),
|
3319 |
'default' => 0,
|
3320 |
-
'data' => '
|
3321 |
),
|
3322 |
-
array(
|
3323 |
-
'id' =>'hide-amp-tags-bulk-option',
|
3324 |
-
'type' => 'checkbox',
|
3325 |
-
'title' => __('Select Tags to Hide AMP'),
|
3326 |
-
'tooltip-subtitle' => __( 'Hide AMP from all the posts of a selected tags.', 'accelerated-mobile-pages' ),
|
3327 |
-
'default' => 0,
|
3328 |
-
'data' => 'tags',
|
3329 |
-
|
3330 |
-
),
|
3331 |
)
|
3332 |
)
|
3333 |
);
|
@@ -3357,13 +3146,6 @@ Redux::setSection( $opt_name, array(
|
|
3357 |
'default' => 0,
|
3358 |
|
3359 |
),
|
3360 |
-
array(
|
3361 |
-
'id' => 'convert-internal-nonamplinks-to-amp',
|
3362 |
-
'type' => 'switch',
|
3363 |
-
'title' => __('Change Internal Links to AMP', 'accelerated-mobile-pages'),
|
3364 |
-
'tooltip-subtitle' => __('Enable if you want all your links inside the article to go to /amp/. All the outbound links will remain untouched.','accelerated-mobile-pages'),
|
3365 |
-
'default' => 0,
|
3366 |
-
),
|
3367 |
// End-point option
|
3368 |
array(
|
3369 |
'id' => 'amp-core-end-point',
|
@@ -3475,19 +3257,6 @@ Redux::setSection( $opt_name, array(
|
|
3475 |
'title' => __('Retina Images', 'accelerated-mobile-pages'),
|
3476 |
'tooltip-subtitle' => __('Enable if your current images looking blured on Apple Devices.', 'accelerated-mobile-pages'),
|
3477 |
'default' => 0,
|
3478 |
-
),
|
3479 |
-
array(
|
3480 |
-
'id' => 'ampforwp-retina-images-res',
|
3481 |
-
'type' => 'select',
|
3482 |
-
'options' => array(
|
3483 |
-
'2' => '2x',
|
3484 |
-
'3' => '3x',
|
3485 |
-
'4' => '4x',
|
3486 |
-
),
|
3487 |
-
'title' => __('Retina Images Resolution', 'accelerated-mobile-pages'),
|
3488 |
-
'tooltip-subtitle' => __('Select the Resolution', 'accelerated-mobile-pages'),
|
3489 |
-
'default' => '2',
|
3490 |
-
'required' => array('ampforwp-retina-images', '=', 1)
|
3491 |
),
|
3492 |
array(
|
3493 |
'id' => 'amp-meta-permissions',
|
@@ -4154,8 +3923,8 @@ Redux::setSection( $opt_name, array(
|
|
4154 |
array(
|
4155 |
'id' => 'amp_font_selector',
|
4156 |
'type' => 'select',
|
4157 |
-
'class' => 'ampforwp-google-font-class
|
4158 |
-
'title' => __( '
|
4159 |
'tooltip-subtitle' => __( 'Select your design from dropdown or ', 'accelerated-mobile-pages' ),
|
4160 |
'options' => array(
|
4161 |
'1' => 'None',
|
@@ -4170,9 +3939,9 @@ Redux::setSection( $opt_name, array(
|
|
4170 |
array(
|
4171 |
'id' => 'amp_font_type',
|
4172 |
'type' => 'select',
|
4173 |
-
'class' => 'ampforwp-google-font-class
|
4174 |
'multi' => true,
|
4175 |
-
'title' => __( '
|
4176 |
'tooltip-subtitle' => __( 'Select your design from dropdown', 'accelerated-mobile-pages' ),
|
4177 |
'options' => array(
|
4178 |
'1' => 'none',
|
@@ -4183,73 +3952,9 @@ Redux::setSection( $opt_name, array(
|
|
4183 |
)
|
4184 |
|
4185 |
),
|
4186 |
-
array(
|
4187 |
-
'id' =>'google_current_font_data',
|
4188 |
-
'type' =>'text',
|
4189 |
-
'class' => 'hide',
|
4190 |
-
'title' =>__('Google Font Current Font','accelerated-mobile-pages'),
|
4191 |
-
'default' =>'',
|
4192 |
-
'required' => array(
|
4193 |
-
array('amp-design-selector', '=' , '4')
|
4194 |
-
)
|
4195 |
-
),
|
4196 |
-
|
4197 |
-
|
4198 |
|
4199 |
-
|
4200 |
-
|
4201 |
-
|
4202 |
-
|
4203 |
-
|
4204 |
-
array(
|
4205 |
-
'id' => 'content-font-family-enable',
|
4206 |
-
'type' => 'switch',
|
4207 |
-
'class' => 'ampforwp-google-font-class',
|
4208 |
-
'title' => __('Content Font Selector', 'accelerated-mobile-pages'),
|
4209 |
-
'required' => array(
|
4210 |
-
array('amp-design-selector', '=' , '4')
|
4211 |
-
),
|
4212 |
-
'default' => '0' ,
|
4213 |
-
'required' => array(
|
4214 |
-
array('amp-design-selector', '=' , '4')
|
4215 |
-
)
|
4216 |
-
),
|
4217 |
array(
|
4218 |
-
'id'
|
4219 |
-
'type' => 'select',
|
4220 |
-
'class' => 'ampforwp-google-font-class ampwp-font-families',
|
4221 |
-
'title' => __( 'Content Font Family Selector', 'accelerated-mobile-pages' ),
|
4222 |
-
'tooltip-subtitle' => __( 'Select your design from dropdown or ', 'accelerated-mobile-pages' ),
|
4223 |
-
'options' => array(
|
4224 |
-
'1' => 'None',
|
4225 |
-
),
|
4226 |
-
'default' => '',
|
4227 |
-
'required' => array(
|
4228 |
-
array('amp-design-selector', '=' , '4'),
|
4229 |
-
array('content-font-family-enable', '=' , '1'),
|
4230 |
-
)
|
4231 |
-
|
4232 |
-
),
|
4233 |
-
|
4234 |
-
array(
|
4235 |
-
'id' => 'amp_font_type_content_single',
|
4236 |
-
'type' => 'select',
|
4237 |
-
'class' => 'ampforwp-google-font-class ampwp-font-family-weights',
|
4238 |
-
'multi' => true,
|
4239 |
-
'title' => __( 'Content Font Family Weight Selector', 'accelerated-mobile-pages' ),
|
4240 |
-
'tooltip-subtitle' => __( 'Select your design from dropdown', 'accelerated-mobile-pages' ),
|
4241 |
-
'options' => array(
|
4242 |
-
'1' => 'none',
|
4243 |
-
),
|
4244 |
-
'default' => '',
|
4245 |
-
'required' => array(
|
4246 |
-
array('amp-design-selector', '=' , '4'),
|
4247 |
-
array('content-font-family-enable', '=' , '1')
|
4248 |
-
)
|
4249 |
-
|
4250 |
-
),
|
4251 |
-
array(
|
4252 |
-
'id' =>'google_current_font_data_content_single',
|
4253 |
'type' =>'text',
|
4254 |
'class' => 'hide',
|
4255 |
'title' =>__('Google Font Current Font','accelerated-mobile-pages'),
|
@@ -4258,14 +3963,6 @@ Redux::setSection( $opt_name, array(
|
|
4258 |
array('amp-design-selector', '=' , '4')
|
4259 |
)
|
4260 |
),
|
4261 |
-
|
4262 |
-
|
4263 |
-
|
4264 |
-
|
4265 |
-
|
4266 |
-
|
4267 |
-
|
4268 |
-
|
4269 |
|
4270 |
array(
|
4271 |
'id' => 'design-advanced',
|
@@ -4433,16 +4130,6 @@ Redux::setSection( $opt_name, array(
|
|
4433 |
array('primary-menu','=',1)
|
4434 |
)
|
4435 |
),
|
4436 |
-
array(
|
4437 |
-
'id' => 'drp-dwn',
|
4438 |
-
'type' => 'switch',
|
4439 |
-
'class' => 'child_opt child_opt_arrow',
|
4440 |
-
'title' => __('Dropdown Support', 'accelerated-mobile-pages'),
|
4441 |
-
'true' => 'true',
|
4442 |
-
'false' => 'false',
|
4443 |
-
'default' => 0,
|
4444 |
-
'required' => array( array('primary-menu','=',1) ),
|
4445 |
-
),
|
4446 |
array(
|
4447 |
'id' => 'signin-button',
|
4448 |
'title' => __('Button Customize', 'accelerated-mobile-pages'),
|
@@ -4968,7 +4655,6 @@ Redux::setSection( $opt_name, array(
|
|
4968 |
array(
|
4969 |
'id' => 'amp-design-3-category-selector',
|
4970 |
'type' => 'select',
|
4971 |
-
'class' => 'child_opt',
|
4972 |
'title' => __( 'Featured Slider Category', 'accelerated-mobile-pages' ),
|
4973 |
'options' => $categories_array,
|
4974 |
'required' => array(
|
@@ -4976,45 +4662,16 @@ Redux::setSection( $opt_name, array(
|
|
4976 |
array('amp-design-3-featured-slider', '=' , '1')
|
4977 |
),
|
4978 |
),
|
4979 |
-
array(
|
4980 |
-
'id' =>'ampforwp-featur-slider-num-posts',
|
4981 |
-
'type' =>'text',
|
4982 |
-
'class' => 'child_opt',
|
4983 |
-
'title' =>__('Number of Posts','accelerated-mobile-pages'),
|
4984 |
-
'required' => array(
|
4985 |
-
array('amp-design-3-featured-slider', '=' , '1'),
|
4986 |
-
),
|
4987 |
-
'validate' =>'numeric',
|
4988 |
-
'default' =>'4',
|
4989 |
-
),
|
4990 |
-
array(
|
4991 |
-
'id' => 'ampforwp-featur-slider-autop',
|
4992 |
-
'type' => 'switch',
|
4993 |
-
'class' => 'child_opt',
|
4994 |
-
'title' => __('Autoplay', 'accelerated-mobile-pages'),
|
4995 |
-
'default' => '1',
|
4996 |
-
'required' => array(
|
4997 |
-
array('amp-design-3-featured-slider', '=' , '1'),
|
4998 |
-
)
|
4999 |
-
),
|
5000 |
-
array(
|
5001 |
-
'id' =>'ampforwp-featur-slider-autop-delay',
|
5002 |
-
'type' =>'text',
|
5003 |
-
'class' => 'child_opt',
|
5004 |
-
'title' =>__('Delay in Autoplay','accelerated-mobile-pages'),
|
5005 |
-
'required' => array(
|
5006 |
-
array('ampforwp-featur-slider-autop', '=' , '1'),
|
5007 |
-
),
|
5008 |
-
'validate' =>'numeric',
|
5009 |
-
'default' =>'4000',
|
5010 |
-
),
|
5011 |
// Excerpt Length for design1 #1013
|
5012 |
array(
|
5013 |
|
5014 |
-
'id' => 'excerpt-option',
|
5015 |
'type' => 'switch',
|
5016 |
'title' => __('Excerpt', 'accelerated-mobile-pages'),
|
5017 |
'default' => '1',
|
|
|
|
|
|
|
5018 |
),
|
5019 |
array(
|
5020 |
'id' =>'amp-design-1-excerpt',
|
@@ -5023,7 +4680,7 @@ Redux::setSection( $opt_name, array(
|
|
5023 |
'title' =>__('Excerpt Length','accelerated-mobile-pages'),
|
5024 |
'required' => array(
|
5025 |
array('amp-design-selector', '=' , '1'),
|
5026 |
-
array('excerpt-option', '=' , '1'),
|
5027 |
),
|
5028 |
'validate' =>'numeric',
|
5029 |
'default' =>'20',
|
@@ -5039,16 +4696,6 @@ Redux::setSection( $opt_name, array(
|
|
5039 |
),
|
5040 |
|
5041 |
// Excerpt Length for design2 #1122
|
5042 |
-
array(
|
5043 |
-
'id' =>'amp-design-2-excerpt',
|
5044 |
-
'type' =>'text',
|
5045 |
-
'tooltip-subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
|
5046 |
-
'title' =>__('Excerpt Length','accelerated-mobile-pages'),
|
5047 |
-
'required' => array(
|
5048 |
-
array('amp-design-selector', '=' , '2')),
|
5049 |
-
'validate' =>'numeric',
|
5050 |
-
'default' =>'20',
|
5051 |
-
),
|
5052 |
array(
|
5053 |
|
5054 |
'id' => 'excerpt-option-design-2',
|
@@ -5057,22 +4704,22 @@ Redux::setSection( $opt_name, array(
|
|
5057 |
'default' => '0',
|
5058 |
'required' => array(
|
5059 |
array('amp-design-selector', '=' , '2'),
|
5060 |
-
array('excerpt-option', '=' , '1'),
|
5061 |
)
|
5062 |
),
|
5063 |
-
|
5064 |
-
|
5065 |
-
array(
|
5066 |
-
'id' =>'amp-design-3-excerpt',
|
5067 |
'type' =>'text',
|
5068 |
'tooltip-subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
|
5069 |
'title' =>__('Excerpt Length','accelerated-mobile-pages'),
|
5070 |
'required' => array(
|
5071 |
-
array('amp-design-selector', '=' , '
|
5072 |
-
array('excerpt-option', '=' , '1')
|
|
|
5073 |
'validate' =>'numeric',
|
5074 |
-
'default' =>'
|
5075 |
),
|
|
|
|
|
5076 |
array(
|
5077 |
'id' => 'excerpt-option-design-3',
|
5078 |
'type' => 'switch',
|
@@ -5080,9 +4727,20 @@ Redux::setSection( $opt_name, array(
|
|
5080 |
'default' => '0',
|
5081 |
'required' => array(
|
5082 |
array('amp-design-selector', '=' , '3'),
|
5083 |
-
array('excerpt-option', '=' , '1'),
|
5084 |
)
|
5085 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5086 |
|
5087 |
// Featured Time
|
5088 |
array(
|
@@ -5433,7 +5091,7 @@ Redux::setSection( $opt_name, array(
|
|
5433 |
'id' => 'ampforwp-single-related-posts-image',
|
5434 |
'type' => 'switch',
|
5435 |
'class' => 'child_opt',
|
5436 |
-
'title' => __('Image', 'accelerated-mobile-pages'),
|
5437 |
'default' => 1,
|
5438 |
'required' => array(
|
5439 |
array('ampforwp-single-related-posts-switch', '=' , '1')
|
@@ -5443,22 +5101,12 @@ Redux::setSection( $opt_name, array(
|
|
5443 |
'id' => 'ampforwp-single-related-posts-excerpt',
|
5444 |
'type' => 'switch',
|
5445 |
'class' => 'child_opt',
|
5446 |
-
'title' => __('Excerpt', 'accelerated-mobile-pages'),
|
5447 |
'default' => 1,
|
5448 |
'required' => array(
|
5449 |
array('ampforwp-single-related-posts-switch', '=' , '1')
|
5450 |
),
|
5451 |
),
|
5452 |
-
array(
|
5453 |
-
'id' => 'ampforwp-single-related-posts-link',
|
5454 |
-
'type' => 'switch',
|
5455 |
-
'class' => 'child_opt',
|
5456 |
-
'title' => __('Link to Non-AMP', 'accelerated-mobile-pages'),
|
5457 |
-
'default' => 0,
|
5458 |
-
'required' => array(
|
5459 |
-
array('ampforwp-single-related-posts-switch', '=' , '1')
|
5460 |
-
),
|
5461 |
-
),
|
5462 |
array(
|
5463 |
'id' => 'ampforwp-single-order-of-related-posts',
|
5464 |
'type' => 'switch',
|
@@ -5480,28 +5128,6 @@ Redux::setSection( $opt_name, array(
|
|
5480 |
array('ampforwp-single-related-posts-switch', '=' , '1')
|
5481 |
),
|
5482 |
),
|
5483 |
-
array(
|
5484 |
-
'id' => 'ampforwp-related-posts-days-switch',
|
5485 |
-
'type' => 'switch',
|
5486 |
-
'class' => 'child_opt',
|
5487 |
-
'title' => __('By Last X Days', 'accelerated-mobile-pages'),
|
5488 |
-
'tooltip-subtitle' => __('Show Related Posts From Past Few Days', 'accelerated-mobile-pages'),
|
5489 |
-
'default' => 0,
|
5490 |
-
'required' => array(
|
5491 |
-
array('ampforwp-single-related-posts-switch', '=' , '1')
|
5492 |
-
),
|
5493 |
-
),
|
5494 |
-
array(
|
5495 |
-
'id' => 'ampforwp-related-posts-days-text',
|
5496 |
-
'type' => 'text',
|
5497 |
-
'class' => 'child_opt',
|
5498 |
-
'title' => __('Number of Days', 'accelerated-mobile-pages'),
|
5499 |
-
'validate' => 'numeric',
|
5500 |
-
'default' => '7',
|
5501 |
-
'required' => array(
|
5502 |
-
array('ampforwp-related-posts-days-switch', '=' , '1')
|
5503 |
-
),
|
5504 |
-
),
|
5505 |
array(
|
5506 |
'id' => 'ampforwp-single_section_4',
|
5507 |
'type' => 'section',
|
@@ -5590,116 +5216,6 @@ Redux::setSection( $opt_name, array(
|
|
5590 |
'default' => 0,
|
5591 |
'required' => array( array('single-new-features', '=' , '1') ),
|
5592 |
),
|
5593 |
-
// Content h1 - h6 font sizes //#2059
|
5594 |
-
array(
|
5595 |
-
'id' => 'swift_cnt',
|
5596 |
-
'type' => 'switch',
|
5597 |
-
'title' => __( 'Heading Font Sizes', 'accelerated-mobile-pages' ),
|
5598 |
-
'default' => 0,
|
5599 |
-
'tooltip-subtitle' => __('Enable the Heading to add Font Sizes in single', 'accelerated-mobile-pages'),
|
5600 |
-
),
|
5601 |
-
array(
|
5602 |
-
'id' => 'swift_cnt_h1',
|
5603 |
-
'type' => 'switch',
|
5604 |
-
'class' => 'child_opt',
|
5605 |
-
'title' => __('H1', 'accelerated-mobile-pages'),
|
5606 |
-
'default' => 0,
|
5607 |
-
'required' => array('swift_cnt' , '=' , '1'),
|
5608 |
-
),
|
5609 |
-
array(
|
5610 |
-
'id' => 'swift_h1_sz',
|
5611 |
-
'type' => 'text',
|
5612 |
-
'class' => 'child_opt',
|
5613 |
-
'title' => __('H1 Font Size', 'accelerated-mobile-pages'),
|
5614 |
-
'default' => '28px',
|
5615 |
-
'required' => array('swift_cnt_h1' , '=' , '1'),
|
5616 |
-
array('swift_cnt' , '=' , '1')
|
5617 |
-
),
|
5618 |
-
array(
|
5619 |
-
'id' => 'swift_cnt_h2',
|
5620 |
-
'type' => 'switch',
|
5621 |
-
'class' => 'child_opt',
|
5622 |
-
'title' => __('H2', 'accelerated-mobile-pages'),
|
5623 |
-
'default' => 0,
|
5624 |
-
'required' => array('swift_cnt' , '=' , '1'),
|
5625 |
-
),
|
5626 |
-
array(
|
5627 |
-
'id' => 'swift_h2_sz',
|
5628 |
-
'type' => 'text',
|
5629 |
-
'class' => 'child_opt',
|
5630 |
-
'title' => __('H2 Font Size', 'accelerated-mobile-pages'),
|
5631 |
-
'default' => '25px',
|
5632 |
-
'required' => array('swift_cnt_h2' , '=' , '1'),
|
5633 |
-
array('swift_cnt' , '=' , '1')
|
5634 |
-
),
|
5635 |
-
array(
|
5636 |
-
'id' => 'swift_cnt_h3',
|
5637 |
-
'type' => 'switch',
|
5638 |
-
'class' => 'child_opt',
|
5639 |
-
'title' => __('H3', 'accelerated-mobile-pages'),
|
5640 |
-
'default' => 0,
|
5641 |
-
'required' => array('swift_cnt' , '=' , '1'),
|
5642 |
-
),
|
5643 |
-
array(
|
5644 |
-
'id' => 'swift_h3_sz',
|
5645 |
-
'type' => 'text',
|
5646 |
-
'class' => 'child_opt',
|
5647 |
-
'title' => __('H3 Font Size', 'accelerated-mobile-pages'),
|
5648 |
-
'default' => '22px',
|
5649 |
-
'required' => array('swift_cnt_h3' , '=' , '1'),
|
5650 |
-
array('swift_cnt' , '=' , '1')
|
5651 |
-
),
|
5652 |
-
array(
|
5653 |
-
'id' => 'swift_cnt_h4',
|
5654 |
-
'type' => 'switch',
|
5655 |
-
'class' => 'child_opt',
|
5656 |
-
'title' => __('H4', 'accelerated-mobile-pages'),
|
5657 |
-
'default' => 0,
|
5658 |
-
'required' => array('swift_cnt' , '=' , '1'),
|
5659 |
-
),
|
5660 |
-
array(
|
5661 |
-
'id' => 'swift_h4_sz',
|
5662 |
-
'type' => 'text',
|
5663 |
-
'class' => 'child_opt',
|
5664 |
-
'title' => __('H4 Font Size', 'accelerated-mobile-pages'),
|
5665 |
-
'default' => '19px',
|
5666 |
-
'required' => array('swift_cnt_h4' , '=' , '1'),
|
5667 |
-
array('swift_cnt' , '=' , '1')
|
5668 |
-
),
|
5669 |
-
array(
|
5670 |
-
'id' => 'swift_cnt_h5',
|
5671 |
-
'type' => 'switch',
|
5672 |
-
'class' => 'child_opt',
|
5673 |
-
'title' => __('H5', 'accelerated-mobile-pages'),
|
5674 |
-
'default' => 0,
|
5675 |
-
'required' => array('swift_cnt' , '=' , '1'),
|
5676 |
-
),
|
5677 |
-
array(
|
5678 |
-
'id' => 'swift_h5_sz',
|
5679 |
-
'type' => 'text',
|
5680 |
-
'class' => 'child_opt',
|
5681 |
-
'title' => __('H5 Font Size', 'accelerated-mobile-pages'),
|
5682 |
-
'default' => '17px',
|
5683 |
-
'required' => array('swift_cnt_h5' , '=' , '1'),
|
5684 |
-
array('swift_cnt' , '=' , '1')
|
5685 |
-
),
|
5686 |
-
array(
|
5687 |
-
'id' => 'swift_cnt_h6',
|
5688 |
-
'type' => 'switch',
|
5689 |
-
'class' => 'child_opt',
|
5690 |
-
'title' => __('H6', 'accelerated-mobile-pages'),
|
5691 |
-
'default' => 0,
|
5692 |
-
'required' => array('swift_cnt' , '=' , '1'),
|
5693 |
-
),
|
5694 |
-
array(
|
5695 |
-
'id' => 'swift_h6_sz',
|
5696 |
-
'type' => 'text',
|
5697 |
-
'class' => 'child_opt',
|
5698 |
-
'title' => __('H6 Font Size', 'accelerated-mobile-pages'),
|
5699 |
-
'default' => '15px',
|
5700 |
-
'required' => array('swift_cnt_h6' , '=' , '1'),
|
5701 |
-
array('swift_cnt' , '=' , '1')
|
5702 |
-
),
|
5703 |
|
5704 |
// array(
|
5705 |
// 'id' => 'ampforwp-comments-banner',
|
@@ -6032,20 +5548,6 @@ Redux::setSection( $opt_name, array(
|
|
6032 |
'title' => __('Subpages/ChildPages', 'accelerated-mobile-pages'),
|
6033 |
'tooltip-subtitle' => __('Shows a List of Subpages'),
|
6034 |
),
|
6035 |
-
array(
|
6036 |
-
'id' => 'ampforwp-page-social',
|
6037 |
-
'type' => 'switch',
|
6038 |
-
'default' => '0',
|
6039 |
-
'title' => __('Social Icons', 'accelerated-mobile-pages'),
|
6040 |
-
'tooltip-subtitle' => __('Enable Social Sharing on Pages'),
|
6041 |
-
),
|
6042 |
-
array(
|
6043 |
-
'id' => 'ampforwp-page-sticky-social',
|
6044 |
-
'type' => 'switch',
|
6045 |
-
'default' => '0',
|
6046 |
-
'title' => __('Sticky Social Icons', 'accelerated-mobile-pages'),
|
6047 |
-
'tooltip-subtitle' => __('Enable Social Sticky Icons on Pages'),
|
6048 |
-
),
|
6049 |
)
|
6050 |
));
|
6051 |
|
@@ -6218,20 +5720,6 @@ Redux::setSection( $opt_name, array(
|
|
6218 |
'type' => 'switch',
|
6219 |
'title' => __('Viber', 'accelerated-mobile-pages'),
|
6220 |
'default' => 0,
|
6221 |
-
),
|
6222 |
-
// Hatena BookMark
|
6223 |
-
array(
|
6224 |
-
'id' => 'enable-single-hatena-bookmarks',
|
6225 |
-
'type' => 'switch',
|
6226 |
-
'title' => __('Hatena Bookmarks', 'accelerated-mobile-pages'),
|
6227 |
-
'default' => 0,
|
6228 |
-
),
|
6229 |
-
// Pocket
|
6230 |
-
array(
|
6231 |
-
'id' => 'enable-single-pocket-share',
|
6232 |
-
'type' => 'switch',
|
6233 |
-
'title' => __('Pocket', 'accelerated-mobile-pages'),
|
6234 |
-
'default' => 0,
|
6235 |
),
|
6236 |
// Yummly
|
6237 |
array(
|
@@ -6815,7 +6303,6 @@ Redux::setSection( $opt_name, array(
|
|
6815 |
// 'icon' => 'el el-puzzle',
|
6816 |
) );
|
6817 |
|
6818 |
-
if(!ampforwp_check_extensions()){
|
6819 |
Redux::setSection( $opt_name, array(
|
6820 |
'title' => __( 'Free vs Pro', 'accelerated-mobile-pages' ),
|
6821 |
// 'desc' => __( 'For full documentation on this field, visit: ', 'accelerated-mobile-pages' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
|
@@ -6824,7 +6311,6 @@ if(!ampforwp_check_extensions()){
|
|
6824 |
'desc' => $freepro_listing,
|
6825 |
'icon' => 'el el-heart',
|
6826 |
) );
|
6827 |
-
}
|
6828 |
|
6829 |
|
6830 |
// Priority Support
|
27 |
$cta_AD_URL = "http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=call-to-action_banner_in_notification_bar&utm_campaign=AMP%20Plugin";
|
28 |
$cta_desc = '<a href="'.$cta_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/cta-banner.png" width="560" height="85" /></a>';
|
29 |
}
|
30 |
+
|
|
|
31 |
$extension_listing_array = array(
|
32 |
array(
|
33 |
'name'=>'ADS for WP',
|
89 |
'is_activated'=>(is_plugin_active('amp-ninja-forms/amp-ninja-forms.php')? 1 : 2),
|
90 |
'settingUrl'=>'{ampforwp-nf-subsection}',
|
91 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
array(
|
93 |
'name'=>'Email Opt-in Forms',
|
94 |
'desc'=>'Capture Leads with Email Subscription.',
|
298 |
);
|
299 |
|
300 |
$extension_listing_array = apply_filters( 'ampforwp_extension_lists_filter', $extension_listing_array );
|
|
|
301 |
$ampforwp_extension_list_html = '';
|
302 |
$ampforwp_nameOfUser = "";
|
303 |
$ampforwp_is_productActivated = false;
|
304 |
+
usort($extension_listing_array, function($a, $b){
|
305 |
+
if ($a['is_activated'] == $b['is_activated']) {
|
306 |
+
return 0;
|
307 |
+
}
|
308 |
+
return ($a['is_activated'] < $b['is_activated']) ? -1 : 1;
|
309 |
+
});
|
|
|
310 |
foreach ($extension_listing_array as $key => $extension) {
|
311 |
$currentStatus = "";
|
312 |
|
325 |
}
|
326 |
|
327 |
$amplicense = '';
|
328 |
+
$onclickUrl = $onclickUrlclose= '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
$selectedOption = get_option('redux_builder_amp',true);
|
330 |
if(isset($selectedOption['amp-license'][$pathExploded])){
|
331 |
$amplicense = $selectedOption['amp-license'][$pathExploded]['license'];
|
337 |
if($ampforwp_nameOfUser=="" && isset($selectedOption['amp-license'][$pathExploded]['all_data']['customer_name'])){
|
338 |
$ampforwp_nameOfUser = $selectedOption['amp-license'][$pathExploded]['all_data']['customer_name'];
|
339 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
}
|
341 |
|
342 |
+
$pluginReview = '<input name="redux_builder_amp[amp-license]['.$pathExploded.'][license]" type="text" value="'.$amplicense.'" onclick="return false;">
|
|
|
343 |
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][item_name]" type="hidden" value="'.$extension['item_name'].'">
|
344 |
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][store_url]" type="hidden" value="'.$extension['store_url'].'">
|
345 |
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][plugin_active_path]" type="hidden" value="'.$extension['plugin_active_path'].'">
|
346 |
<input name="redux_builder_amp[amp-license]['.$pathExploded.'][name]" type="hidden" value="'.$extension['name'].'">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
';
|
348 |
|
349 |
+
$pluginReview .= $verify;
|
350 |
if(isset($selectedOption['amp-license'][$pathExploded]['message']) && $selectedOption['amp-license'][$pathExploded]['message']!=""){
|
351 |
$pluginReview .= "<div class='afw-license-response-message'>".$selectedOption['amp-license'][$pathExploded]['message']."</div>";
|
352 |
}
|
381 |
</div>
|
382 |
';
|
383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
$freepro_listing = '
|
385 |
<div class="fp-wr">
|
386 |
<div class="fp-img">
|
876 |
//$amp_redux_header = '<span id="name"><span style="color: #4dbefa;">U</span>ltimate <span style="color: #4dbefa;">W</span>idgets</span>';
|
877 |
$proDetailsProvide = '<a class="premium_features_btn_txt" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">'.__('Get more out of AMP','accelerated-mobile-pages').'</a> <a class="premium_features_btn" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">Get PRO Version</a> ';
|
878 |
if($ampforwp_nameOfUser!=""){
|
879 |
+
$proDetailsProvide = "<span class='extension-menu-call'><span class='activated-plugins' style='color:#f2f2f2'>Hello, ".$ampforwp_nameOfUser."</span> <a class='' href='".admin_url('admin.php?page=amp_options&tabid=opt-go-premium')."'><i class='dashicons-before dashicons-admin-generic'></i></a></span>";
|
880 |
}elseif($ampforwp_is_productActivated){
|
881 |
$proDetailsProvide = "<span class='extension-menu-call'>One more Step <a class='premium_features_btn' href='".admin_url('admin.php?tabid=opt-go-premium&page=amp_options')."'>Enter license here</a></span>";
|
882 |
}
|
1418 |
'type' => 'switch',
|
1419 |
'title' => __('AD #3', 'accelerated-mobile-pages'),
|
1420 |
'default' => 0,
|
1421 |
+
'desc' => __('Above the Post Content (Single Post)', 'accelerated-mobile-pages'),
|
1422 |
'true' => 'Enabled',
|
1423 |
'false' => 'Disabled',
|
1424 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1425 |
array(
|
1426 |
'class' => 'child_opt child_opt_arrow',
|
1427 |
'id' => 'enable-amp-ads-select-3',
|
1775 |
'default' => 0,
|
1776 |
'required' => array('ampforwp-seo-selection', '=' , '1'),
|
1777 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1778 |
array(
|
1779 |
'id' => 'ampforwp-seo-aioseo',
|
1780 |
'type' => 'info',
|
1781 |
'style' => 'success',
|
1782 |
+
'desc' => __("All in One SEO works out of the Box with our plugin. It deosn't requires any extra config.", 'accelerated-mobile-pages'),
|
1783 |
'required' => array('ampforwp-seo-selection', '=', '2')
|
1784 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1785 |
array(
|
1786 |
'id' => 'ampforwp-seo-index-noindex-sub-section',
|
1787 |
'type' => 'section',
|
1902 |
'options' => array(
|
1903 |
'1' => __('Google Analytics', 'accelerated-mobile-pages' ),
|
1904 |
'2' => __('Segment Analytics', 'accelerated-mobile-pages' ),
|
1905 |
+
'3' => __('Piwik Analytics', 'accelerated-mobile-pages' ),
|
1906 |
'4' => __('Quantcast Measurement', 'accelerated-mobile-pages' ),
|
1907 |
'5' => __('comScore', 'accelerated-mobile-pages' ),
|
1908 |
'6' => __('Effective Measure', 'accelerated-mobile-pages' ),
|
1963 |
),
|
1964 |
'default' => 0,
|
1965 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1966 |
array(
|
1967 |
'class' => 'child_opt',
|
1968 |
'id' => 'ampforwp-ga-field-advance',
|
2015 |
),
|
2016 |
),
|
2017 |
array(
|
|
|
2018 |
'id' =>'amp-gtm-analytics-type',
|
2019 |
'type' => 'text',
|
2020 |
'title' => __('Analytics Type','accelerated-mobile-pages'),
|
2036 |
'required' => array(
|
2037 |
array('amp-use-gtm-option', '=' , '1')),
|
2038 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2039 |
// Google Cliend ID API
|
2040 |
array(
|
2041 |
'id' => 'ampforwp-ga-clientid-api-gtm',
|
2102 |
array(
|
2103 |
'id' => 'ampforwp-Piwik-switch',
|
2104 |
'type' => 'switch',
|
2105 |
+
'title' => 'Piwik Analytics',
|
2106 |
'default' => ampforwp_get_default_analytics('3'),
|
2107 |
'required' => array(
|
2108 |
array('amp-use-gtm-option', '=' , '0'),
|
2111 |
array(
|
2112 |
'id' => 'pa-feild',
|
2113 |
'type' => 'text',
|
2114 |
+
'title' => __( 'Piwik Analytics', 'accelerated-mobile-pages' ),
|
2115 |
'required' => array(
|
2116 |
array('amp-use-gtm-option', '=' , '0'),
|
2117 |
array('ampforwp-Piwik-switch', '=' , '1')
|
2118 |
),
|
2119 |
'desc' => __( 'Example: https://piwik.example.org/piwik.php?idsite=YOUR_SITE_ID&rec=1&action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL&rand=RANDOM', 'accelerated-mobile-pages' ),
|
2120 |
+
'tooltip-subtitle' => __('Enter your Piwik Analytics URL.', 'accelerated-mobile-pages' ),
|
2121 |
'default' => '#',
|
2122 |
),
|
2123 |
// Quantcast
|
2510 |
'indent' => true,
|
2511 |
'layout_type' => 'accordion',
|
2512 |
'accordion-open'=> 1,
|
|
|
2513 |
),
|
2514 |
|
2515 |
array(
|
2520 |
'tooltip-subtitle' => __('Show notifications on all of your AMP pages for cookie purposes, or anything else.', 'accelerated-mobile-pages'),
|
2521 |
'true' => 'Enabled',
|
2522 |
'false' => 'Disabled',
|
|
|
2523 |
),
|
2524 |
array(
|
2525 |
'class' => 'child_opt child_opt_arrow',
|
2553 |
'type' => 'switch',
|
2554 |
'title' => __('GDPR Compliancy', 'accelerated-mobile-pages'),
|
2555 |
'default' => 0,
|
2556 |
+
),
|
2557 |
+
array(
|
2558 |
+
'class' => 'child_opt',
|
2559 |
+
'id' =>'audience-for-amp-gdpr-compliance',
|
2560 |
+
'type' => 'select',
|
2561 |
+
'title' => __('GDPR Visibility', 'accelerated-mobile-pages'),
|
2562 |
+
'tooltip-subtitle' => __('Select the option to which you want to display GDPR. ', 'accelerated-mobile-pages'),
|
2563 |
+
'options' => array('1' => 'Globally',
|
2564 |
+
'2' => 'For European Union',
|
2565 |
+
'3' => 'Handpicked EU Countries'
|
2566 |
+
),
|
2567 |
+
'default' => 2,
|
2568 |
+
'required' => array('amp-gdpr-compliance-switch', '=' , '1'),
|
2569 |
+
),
|
2570 |
+
array(
|
2571 |
+
'class' => 'child_opt',
|
2572 |
+
'id' =>'amp-gdpr-compliance-privacy-geo-location',
|
2573 |
+
'type' => 'checkbox',
|
2574 |
+
'title' => __('Select Countries for GDPR', 'accelerated-mobile-pages'),'tooltip-subtitle' => __('Select the Countries to which you want to display GDPR, If checked None it displayed for all EU countries. ', 'accelerated-mobile-pages'),
|
2575 |
+
'default' => 0,
|
2576 |
+
'options' => $eu_iso_codes,
|
2577 |
+
'required' => array('audience-for-amp-gdpr-compliance', '=' , '3'),
|
2578 |
),
|
2579 |
array(
|
2580 |
'id' => 'gdpr-type',
|
2818 |
'desc' => '<div style=" background: #FFF9C4;padding: 12px;line-height: 1.6;margin:-45px -14px -18px -17px;"><b>ONE LAST STEP REQUIRED:</b> This feature requires <a href="https://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=cf7-tab_cf7_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Contact Form 7 extension</a>.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=cf7-tab_cf7_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Click here for more info</a>)</div></div>',
|
2819 |
);
|
2820 |
}
|
2821 |
+
// contact form 7
|
2822 |
+
$forms_support[] = array(
|
2823 |
'id' => 'ampforwp-cfs_2',
|
2824 |
'type' => 'section',
|
2825 |
'title' => __('Gravity Forms Compatibility', 'accelerated-mobile-pages'),
|
2826 |
'indent' => true,
|
2827 |
'layout_type' => 'accordion',
|
2828 |
'accordion-open'=> 1,
|
2829 |
+
);
|
2830 |
+
$forms_support[] = array(
|
2831 |
+
'id' =>'amp-enable-gravityforms_support',
|
2832 |
+
'type' => 'switch',
|
2833 |
+
'title' => __('Gravity Forms Support', 'accelerated-mobile-pages'),
|
2834 |
+
'default' => '',
|
2835 |
+
'true' => 'Enabled',
|
2836 |
+
'false' => 'Disabled',
|
2837 |
+
);
|
2838 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
2839 |
if(!is_plugin_active( 'amp-gravity-forms/amp-gravity-forms.php' ) ){
|
2840 |
$forms_support[]= array(
|
2842 |
'type' => 'info',
|
2843 |
'required' => array('amp-enable-gravityforms_support', '=' , '1'),
|
2844 |
'desc' => '<div style=" background: #FFF9C4;padding: 12px;line-height: 1.6;margin:-45px -14px -18px -17px;"><b>ONE LAST STEP REQUIRED:</b> This feature requires <a href="https://ampforwp.com/gravity-forms/#utm_source=options-panel&utm_medium=gf-tab_gf_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Gravity Forms extension</a>.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/gravity-forms/#utm_source=options-panel&utm_medium=gf-tab_gf_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Click here for more info</a>)</div></div>',
|
2845 |
+
);}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2846 |
|
2847 |
// Contact Form SECTION
|
2848 |
Redux::setSection( $opt_name, array(
|
2861 |
'id' => 'disqus-comments',
|
2862 |
'subsection' => true,
|
2863 |
'fields' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2864 |
array(
|
2865 |
'id' => 'ampforwp-comments',
|
2866 |
'type' => 'section',
|
2885 |
'required' => array('wordpress-comments-support' , '=' , 1
|
2886 |
),
|
2887 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2888 |
array(
|
2889 |
'id' => 'ampforwp-disqus-comments-support',
|
2890 |
'type' => 'switch',
|
2917 |
'id' => 'ampforwp-disqus-host-file',
|
2918 |
'type' => 'text',
|
2919 |
'title' => __('Disqus Host File', 'accelerated-mobile-pages'),
|
2920 |
+
'tooltip-subtitle' => __('<a href="https://ampforwp.com/host-disqus-comments/"> Click here to know, How to Setup Disqus Host file on your servers </a>', 'accelerated-mobile-pages'),
|
|
|
2921 |
'placeholder' => 'https://comments.example.com/disqus.php',
|
2922 |
'required' => array('ampforwp-disqus-host-position', '=' , '0'),
|
2923 |
),
|
2956 |
'title' => __('No of Comments', 'accelerated-mobile-pages'),
|
2957 |
'default' => 10,
|
2958 |
'required' => array(
|
2959 |
+
array('ampforwp-facebook-comments-support', '=' , 1),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2960 |
|
2961 |
+
|
2962 |
+
),
|
2963 |
+
)
|
2964 |
)
|
2965 |
) );
|
2966 |
|
3111 |
),
|
3112 |
array(
|
3113 |
'id' =>'hide-amp-categories',
|
3114 |
+
'type' => 'checkbox',
|
3115 |
'title' => __('Select Categories to Hide AMP'),
|
3116 |
'tooltip-subtitle' => __( 'Hide AMP from all the posts of a selected category.', 'accelerated-mobile-pages' ),
|
3117 |
'default' => 0,
|
3118 |
+
'data' => 'categories',
|
3119 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3120 |
)
|
3121 |
)
|
3122 |
);
|
3146 |
'default' => 0,
|
3147 |
|
3148 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3149 |
// End-point option
|
3150 |
array(
|
3151 |
'id' => 'amp-core-end-point',
|
3257 |
'title' => __('Retina Images', 'accelerated-mobile-pages'),
|
3258 |
'tooltip-subtitle' => __('Enable if your current images looking blured on Apple Devices.', 'accelerated-mobile-pages'),
|
3259 |
'default' => 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3260 |
),
|
3261 |
array(
|
3262 |
'id' => 'amp-meta-permissions',
|
3923 |
array(
|
3924 |
'id' => 'amp_font_selector',
|
3925 |
'type' => 'select',
|
3926 |
+
'class' => 'ampforwp-google-font-class',
|
3927 |
+
'title' => __( 'Font Selector', 'accelerated-mobile-pages' ),
|
3928 |
'tooltip-subtitle' => __( 'Select your design from dropdown or ', 'accelerated-mobile-pages' ),
|
3929 |
'options' => array(
|
3930 |
'1' => 'None',
|
3939 |
array(
|
3940 |
'id' => 'amp_font_type',
|
3941 |
'type' => 'select',
|
3942 |
+
'class' => 'ampforwp-google-font-class',
|
3943 |
'multi' => true,
|
3944 |
+
'title' => __( 'Font Selector', 'accelerated-mobile-pages' ),
|
3945 |
'tooltip-subtitle' => __( 'Select your design from dropdown', 'accelerated-mobile-pages' ),
|
3946 |
'options' => array(
|
3947 |
'1' => 'none',
|
3952 |
)
|
3953 |
|
3954 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3955 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3956 |
array(
|
3957 |
+
'id' =>'google_current_font_data',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3958 |
'type' =>'text',
|
3959 |
'class' => 'hide',
|
3960 |
'title' =>__('Google Font Current Font','accelerated-mobile-pages'),
|
3963 |
array('amp-design-selector', '=' , '4')
|
3964 |
)
|
3965 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3966 |
|
3967 |
array(
|
3968 |
'id' => 'design-advanced',
|
4130 |
array('primary-menu','=',1)
|
4131 |
)
|
4132 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4133 |
array(
|
4134 |
'id' => 'signin-button',
|
4135 |
'title' => __('Button Customize', 'accelerated-mobile-pages'),
|
4655 |
array(
|
4656 |
'id' => 'amp-design-3-category-selector',
|
4657 |
'type' => 'select',
|
|
|
4658 |
'title' => __( 'Featured Slider Category', 'accelerated-mobile-pages' ),
|
4659 |
'options' => $categories_array,
|
4660 |
'required' => array(
|
4662 |
array('amp-design-3-featured-slider', '=' , '1')
|
4663 |
),
|
4664 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4665 |
// Excerpt Length for design1 #1013
|
4666 |
array(
|
4667 |
|
4668 |
+
'id' => 'excerpt-option-design-1',
|
4669 |
'type' => 'switch',
|
4670 |
'title' => __('Excerpt', 'accelerated-mobile-pages'),
|
4671 |
'default' => '1',
|
4672 |
+
'required' => array(
|
4673 |
+
array('amp-design-selector', '=' , '1'),
|
4674 |
+
)
|
4675 |
),
|
4676 |
array(
|
4677 |
'id' =>'amp-design-1-excerpt',
|
4680 |
'title' =>__('Excerpt Length','accelerated-mobile-pages'),
|
4681 |
'required' => array(
|
4682 |
array('amp-design-selector', '=' , '1'),
|
4683 |
+
array('excerpt-option-design-1', '=' , '1'),
|
4684 |
),
|
4685 |
'validate' =>'numeric',
|
4686 |
'default' =>'20',
|
4696 |
),
|
4697 |
|
4698 |
// Excerpt Length for design2 #1122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4699 |
array(
|
4700 |
|
4701 |
'id' => 'excerpt-option-design-2',
|
4704 |
'default' => '0',
|
4705 |
'required' => array(
|
4706 |
array('amp-design-selector', '=' , '2'),
|
|
|
4707 |
)
|
4708 |
),
|
4709 |
+
array(
|
4710 |
+
'id' =>'amp-design-2-excerpt',
|
|
|
|
|
4711 |
'type' =>'text',
|
4712 |
'tooltip-subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
|
4713 |
'title' =>__('Excerpt Length','accelerated-mobile-pages'),
|
4714 |
'required' => array(
|
4715 |
+
array('amp-design-selector', '=' , '2'),
|
4716 |
+
array('excerpt-option-design-2', '=' , '1'),
|
4717 |
+
),
|
4718 |
'validate' =>'numeric',
|
4719 |
+
'default' =>'20',
|
4720 |
),
|
4721 |
+
|
4722 |
+
// Excerpt Length for design3 #1122
|
4723 |
array(
|
4724 |
'id' => 'excerpt-option-design-3',
|
4725 |
'type' => 'switch',
|
4727 |
'default' => '0',
|
4728 |
'required' => array(
|
4729 |
array('amp-design-selector', '=' , '3'),
|
|
|
4730 |
)
|
4731 |
),
|
4732 |
+
array(
|
4733 |
+
'id' =>'amp-design-3-excerpt',
|
4734 |
+
'type' =>'text',
|
4735 |
+
'tooltip-subtitle' =>__('Enter the number of words Eg: 10','accelerated-mobile-pages'),
|
4736 |
+
'title' =>__('Excerpt Length','accelerated-mobile-pages'),
|
4737 |
+
'required' => array(
|
4738 |
+
array('amp-design-selector', '=' , '3'),
|
4739 |
+
array('excerpt-option-design-3', '=' , '1'),
|
4740 |
+
),
|
4741 |
+
'validate' =>'numeric',
|
4742 |
+
'default' =>'20',
|
4743 |
+
),
|
4744 |
|
4745 |
// Featured Time
|
4746 |
array(
|
5091 |
'id' => 'ampforwp-single-related-posts-image',
|
5092 |
'type' => 'switch',
|
5093 |
'class' => 'child_opt',
|
5094 |
+
'title' => __('Image in Related Post', 'accelerated-mobile-pages'),
|
5095 |
'default' => 1,
|
5096 |
'required' => array(
|
5097 |
array('ampforwp-single-related-posts-switch', '=' , '1')
|
5101 |
'id' => 'ampforwp-single-related-posts-excerpt',
|
5102 |
'type' => 'switch',
|
5103 |
'class' => 'child_opt',
|
5104 |
+
'title' => __('Excerpt in Related Post', 'accelerated-mobile-pages'),
|
5105 |
'default' => 1,
|
5106 |
'required' => array(
|
5107 |
array('ampforwp-single-related-posts-switch', '=' , '1')
|
5108 |
),
|
5109 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5110 |
array(
|
5111 |
'id' => 'ampforwp-single-order-of-related-posts',
|
5112 |
'type' => 'switch',
|
5128 |
array('ampforwp-single-related-posts-switch', '=' , '1')
|
5129 |
),
|
5130 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5131 |
array(
|
5132 |
'id' => 'ampforwp-single_section_4',
|
5133 |
'type' => 'section',
|
5216 |
'default' => 0,
|
5217 |
'required' => array( array('single-new-features', '=' , '1') ),
|
5218 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5219 |
|
5220 |
// array(
|
5221 |
// 'id' => 'ampforwp-comments-banner',
|
5548 |
'title' => __('Subpages/ChildPages', 'accelerated-mobile-pages'),
|
5549 |
'tooltip-subtitle' => __('Shows a List of Subpages'),
|
5550 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5551 |
)
|
5552 |
));
|
5553 |
|
5720 |
'type' => 'switch',
|
5721 |
'title' => __('Viber', 'accelerated-mobile-pages'),
|
5722 |
'default' => 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5723 |
),
|
5724 |
// Yummly
|
5725 |
array(
|
6303 |
// 'icon' => 'el el-puzzle',
|
6304 |
) );
|
6305 |
|
|
|
6306 |
Redux::setSection( $opt_name, array(
|
6307 |
'title' => __( 'Free vs Pro', 'accelerated-mobile-pages' ),
|
6308 |
// 'desc' => __( 'For full documentation on this field, visit: ', 'accelerated-mobile-pages' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
|
6311 |
'desc' => $freepro_listing,
|
6312 |
'icon' => 'el el-heart',
|
6313 |
) );
|
|
|
6314 |
|
6315 |
|
6316 |
// Priority Support
|
includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.redux-container-checkbox_hierarchy label{vertical-align:top;width:100%}.redux-container-checkbox_hierarchy label .field-desc{margin-top:0;float:left;width:93%;clear:none}.redux-container-checkbox_hierarchy ul.inner-child{padding-left:25px;}
|
|
includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.js
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Redux Checkbox
|
3 |
-
* Dependencies : jquery
|
4 |
-
* Feature added by : Dovy Paukstys
|
5 |
-
* Date : 17 June 2014
|
6 |
-
*/
|
7 |
-
|
8 |
-
/*global redux_change, wp, redux*/
|
9 |
-
|
10 |
-
(function( $ ) {
|
11 |
-
"use strict";
|
12 |
-
redux.field_objects = redux.field_objects || {};
|
13 |
-
redux.field_objects.checkbox_hierarchy = redux.field_objects.checkbox_hierarchy || {};
|
14 |
-
|
15 |
-
$( document ).ready(
|
16 |
-
function() {
|
17 |
-
redux.field_objects.checkbox_hierarchy.init();
|
18 |
-
}
|
19 |
-
);
|
20 |
-
|
21 |
-
redux.field_objects.checkbox_hierarchy.init = function( selector ) {
|
22 |
-
if ( !selector ) {
|
23 |
-
selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-checkbox_hierarchy:visible' );
|
24 |
-
}
|
25 |
-
|
26 |
-
$( selector ).each(
|
27 |
-
function() {
|
28 |
-
var el = $( this );
|
29 |
-
var parent = el;
|
30 |
-
if ( !el.hasClass( 'redux-field-container' ) ) {
|
31 |
-
parent = el.parents( '.redux-field-container:first' );
|
32 |
-
}
|
33 |
-
if ( parent.is( ":hidden" ) ) { // Skip hidden fields
|
34 |
-
return;
|
35 |
-
}
|
36 |
-
if ( parent.hasClass( 'redux-field-init' ) ) {
|
37 |
-
parent.removeClass( 'redux-field-init' );
|
38 |
-
} else {
|
39 |
-
return;
|
40 |
-
}
|
41 |
-
el.find( '.checkbox' ).on(
|
42 |
-
'click', function( e ) {
|
43 |
-
var val = 0;
|
44 |
-
if ( $( this ).is( ':checked' ) ) {
|
45 |
-
val = $( this ).parent().find( '.checkbox-check' ).attr( 'data-val' );
|
46 |
-
}
|
47 |
-
$( this ).parent().find( '.checkbox-check' ).val( val );
|
48 |
-
redux_change( $( this ) );
|
49 |
-
}
|
50 |
-
);
|
51 |
-
}
|
52 |
-
);
|
53 |
-
};
|
54 |
-
})( jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(e){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.checkbox_hierarchy=redux.field_objects.checkbox_hierarchy||{},e(document).ready(function(){redux.field_objects.checkbox_hierarchy.init()}),redux.field_objects.checkbox_hierarchy.init=function(i){i||(i=e(document).find(".redux-group-tab:visible").find(".redux-container-checkbox_hierarchy:visible")),e(i).each(function(){var i=e(this),c=i;i.hasClass("redux-field-container")||(c=i.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),i.find(".checkbox").on("click",function(i){var c=0;e(this).is(":checked")&&(c=e(this).parent().find(".checkbox-check").attr("data-val")),e(this).parent().find(".checkbox-check").val(c),redux_change(e(this))}))})}}(jQuery);
|
|
includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.php
DELETED
@@ -1,210 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Redux Framework is free software: you can redistribute it and/or modify
|
4 |
-
* it under the terms of the GNU General Public License as published by
|
5 |
-
* the Free Software Foundation, either version 2 of the License, or
|
6 |
-
* any later version.
|
7 |
-
* Redux Framework is distributed in the hope that it will be useful,
|
8 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
10 |
-
* GNU General Public License for more details.
|
11 |
-
* You should have received a copy of the GNU General Public License
|
12 |
-
* along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
|
13 |
-
*
|
14 |
-
* @package ReduxFramework
|
15 |
-
* @subpackage Field_Checkbox
|
16 |
-
* @author Daniel J Griffiths (Ghost1227)
|
17 |
-
* @author Dovy Paukstys
|
18 |
-
* @version 3.0.0
|
19 |
-
*/
|
20 |
-
// Exit if accessed directly
|
21 |
-
if ( !defined ( 'ABSPATH' ) ) {
|
22 |
-
exit;
|
23 |
-
}
|
24 |
-
// Don't duplicate me!
|
25 |
-
if ( !class_exists ( 'ReduxFramework_checkbox_hierarchy' ) ) {
|
26 |
-
/**
|
27 |
-
* Main ReduxFramework_checkbox class
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
*/
|
31 |
-
class ReduxFramework_checkbox_hierarchy {
|
32 |
-
/**
|
33 |
-
* Field Constructor.
|
34 |
-
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
|
35 |
-
*
|
36 |
-
* @since 1.0.0
|
37 |
-
* @access public
|
38 |
-
* @return void
|
39 |
-
*/
|
40 |
-
function __construct ( $field = array(), $value = '', $parent ) {
|
41 |
-
$this->parent = $parent;
|
42 |
-
$this->field = $field;
|
43 |
-
$this->value = $value;
|
44 |
-
|
45 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
46 |
-
$this->time = AMPFORWP_VERSION;
|
47 |
-
}
|
48 |
-
if ( empty( $this->extension_dir ) ) {
|
49 |
-
$this->extension_dir = trailingslashit( str_replace( '\\', '/', dirname( __FILE__ ) ) );
|
50 |
-
$this->extension_url = site_url( str_replace( trailingslashit( str_replace( '\\', '/', ABSPATH ) ), '', $this->extension_dir ) );
|
51 |
-
}
|
52 |
-
}
|
53 |
-
/**
|
54 |
-
* Field Render Function.
|
55 |
-
* Takes the vars and outputs the HTML for the field in the settings
|
56 |
-
*
|
57 |
-
* @since 1.0.0
|
58 |
-
* @access public
|
59 |
-
* @return void
|
60 |
-
*/
|
61 |
-
public function render () {
|
62 |
-
if( !empty( $this->field['data'] ) && empty( $this->field['options'] ) ) {
|
63 |
-
if (empty($this->field['args'])) {
|
64 |
-
$this->field['args'] = array();
|
65 |
-
}
|
66 |
-
$this->field['options'] = $this->parent->get_wordpress_data($this->field['data'], $this->field['args']);
|
67 |
-
if (empty($this->field['options'])) {
|
68 |
-
return;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
$this->field[ 'data_class' ] = ( isset ( $this->field[ 'multi_layout' ] ) ) ? 'data-' . $this->field[ 'multi_layout' ] : 'data-full';
|
72 |
-
if ( !empty ( $this->field[ 'options' ] ) && ( is_array ( $this->field[ 'options' ] ) || is_array ( $this->field[ 'default' ] ) ) ) {
|
73 |
-
echo '<ul class="' . $this->field[ 'data_class' ] . '">';
|
74 |
-
if ( !isset ( $this->value ) ) {
|
75 |
-
$this->value = array();
|
76 |
-
}
|
77 |
-
|
78 |
-
if ( empty ( $this->field[ 'options' ] ) && isset ( $this->field[ 'default' ] ) && is_array ( $this->field[ 'default' ] ) ) {
|
79 |
-
$this->field[ 'options' ] = $this->field[ 'default' ];
|
80 |
-
}
|
81 |
-
if($this->field[ 'options' ]['set_category_hirarchy']==1){
|
82 |
-
$this->wp_dropdown_cats_cat();
|
83 |
-
echo "</ul>";
|
84 |
-
return ;
|
85 |
-
}
|
86 |
-
foreach ( $this->field[ 'options' ] as $k => $v ) {
|
87 |
-
if ( empty ( $this->value[ $k ] ) ) {
|
88 |
-
$this->value[ $k ] = "";
|
89 |
-
}
|
90 |
-
echo '<li>';
|
91 |
-
echo '<label for="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $k . ']', array(
|
92 |
-
'[' => '_',
|
93 |
-
']' => ''
|
94 |
-
) ) . '_' . array_search ( $k, array_keys ( $this->field[ 'options' ] ) ) . '">';
|
95 |
-
echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . $this->field[ 'name' ] . '[' . $k . ']' . $this->field[ 'name_suffix' ] . '" value="' . $this->value[ $k ] . '" ' . '/>';
|
96 |
-
echo '<input type="checkbox" class="checkbox ' . $this->field[ 'class' ] . '" id="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $k . ']', array(
|
97 |
-
'[' => '_',
|
98 |
-
']' => ''
|
99 |
-
) ) . '_' . array_search ( $k, array_keys ( $this->field[ 'options' ] ) ) . '" value="1" ' . checked ( $this->value[ $k ], '1', false ) . '/>';
|
100 |
-
echo ' ' . $v['name'] . '</label>';
|
101 |
-
|
102 |
-
if(isset($v['child']) && count($v['child']) > 0){
|
103 |
-
echo '<ul class="' . $this->field[ 'data_class' ] . ' inner-child">';
|
104 |
-
foreach ( $v['child'] as $childKey => $childValue ) {
|
105 |
-
if ( empty ( $this->value[ $childKey ] ) ) {
|
106 |
-
$this->value[ $childKey ] = "";
|
107 |
-
}
|
108 |
-
echo '<li>';
|
109 |
-
echo '<label for="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $childKey . ']', array(
|
110 |
-
'[' => '_',
|
111 |
-
']' => ''
|
112 |
-
) ) . '_' . array_search ( $childKey, array_keys ( $this->field[ 'options' ] ) ) . '">';
|
113 |
-
echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . $this->field[ 'name' ] . '[' . $childKey . ']' . $this->field[ 'name_suffix' ] . '" value="' . $this->value[ $childKey ] . '" ' . '/>';
|
114 |
-
echo '<input type="checkbox" class="checkbox ' . $this->field[ 'class' ] . '" id="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $childKey . ']', array(
|
115 |
-
'[' => '_',
|
116 |
-
']' => ''
|
117 |
-
) ) . '_' . array_search ( $childKey, array_keys ( $this->field[ 'options' ] ) ) . '" value="1" ' . checked ( $this->value[ $childKey ], '1', false ) . '/>';
|
118 |
-
echo ' <span>' . $childValue . '</span></label>';
|
119 |
-
echo '</li>';
|
120 |
-
}
|
121 |
-
echo '</ul>';
|
122 |
-
}
|
123 |
-
|
124 |
-
echo '</li>';
|
125 |
-
}
|
126 |
-
echo '</ul>';
|
127 |
-
} else if ( empty ( $this->field[ 'data' ] ) ) {
|
128 |
-
echo (!empty ( $this->field[ 'desc' ] ) ) ? ' <ul class="data-full"><li><label for="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . ']', array(
|
129 |
-
'[' => '_',
|
130 |
-
']' => ''
|
131 |
-
) ) . '">' : '';
|
132 |
-
// Got the "Checked" status as "0" or "1" then insert it as the "value" option
|
133 |
-
//$ch_value = 1; // checked($this->value, '1', false) == "" ? "0" : "1";
|
134 |
-
echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . $this->field[ 'name' ] . $this->field[ 'name_suffix' ] . '" value="' . $this->value . '" ' . '/>';
|
135 |
-
echo '<input type="checkbox" id="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . ']', array(
|
136 |
-
'[' => '_',
|
137 |
-
']' => ''
|
138 |
-
) ) . '" value="1" class="checkbox ' . $this->field[ 'class' ] . '" ' . checked ( $this->value, '1', false ) . '/>';
|
139 |
-
echo isset( $this->field[ 'label' ] ) ? ' ' . $this->field[ 'label' ] : '';
|
140 |
-
echo '</label></li></ul>';
|
141 |
-
}
|
142 |
-
}
|
143 |
-
function wp_dropdown_cats_cat( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
|
144 |
-
|
145 |
-
//$this->parent->args[ 'opt_name' ] = 'redux_builder_amp';
|
146 |
-
|
147 |
-
|
148 |
-
if (!$categories )
|
149 |
-
$categories = get_categories( );//array('hide_empty' => 0)
|
150 |
-
|
151 |
-
if ( $categories ) {
|
152 |
-
foreach ( $categories as $category ) {
|
153 |
-
if ( $currentcat != $category->term_id && $parent == $category->parent) {
|
154 |
-
$pad = str_repeat( '– ', $level );
|
155 |
-
$category->name = esc_html( $category->name );
|
156 |
-
/*echo "\n\t<option value='$category->term_id'";
|
157 |
-
if ( $currentparent == $category->term_id )
|
158 |
-
echo " selected='selected'";
|
159 |
-
echo ">$pad$category->name</option>";*/
|
160 |
-
|
161 |
-
|
162 |
-
echo '<li><label for="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $category->term_id . ']', array(
|
163 |
-
'[' => '_',
|
164 |
-
']' => ''
|
165 |
-
) ) . '_' . array_search ( $category->term_id, array_keys ( $this->field[ 'options' ] ) ) . '">';
|
166 |
-
echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . $this->field[ 'name' ] . '[' . $category->term_id . ']' . $this->field[ 'name_suffix' ] . '" value="' . $this->value[ $category->term_id ] . '" ' . '/>';
|
167 |
-
echo '<input type="checkbox" class="checkbox ' . $this->field[ 'class' ] . '" id="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $category->term_id . ']', array(
|
168 |
-
'[' => '_',
|
169 |
-
']' => ''
|
170 |
-
) ) . '_' . array_search ( $category->term_id, array_keys ( $this->field[ 'options' ] ) ) . '" value="1" ' . checked ( $this->value[$category->term_id], '1', false ) . '/>';
|
171 |
-
echo ' <span>' .$pad. $category->name . '</span></label></li>';
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
$this->wp_dropdown_cats_cat( $currentcat, $currentparent, $category->term_id, $level +1, $categories );
|
176 |
-
}
|
177 |
-
}
|
178 |
-
} else {
|
179 |
-
return false;
|
180 |
-
}
|
181 |
-
}
|
182 |
-
/**
|
183 |
-
* Enqueue Function.
|
184 |
-
* If this field requires any scripts, or css define this function and register/enqueue the scripts/css
|
185 |
-
*
|
186 |
-
* @since 1.0.0
|
187 |
-
* @access public
|
188 |
-
* @return void
|
189 |
-
*/
|
190 |
-
public function enqueue () {
|
191 |
-
if ($this->parent->args['dev_mode']) {
|
192 |
-
wp_enqueue_style (
|
193 |
-
'redux-field-checkbox-hierarchy-css',
|
194 |
-
$this->extension_url . 'field_checkbox_hierarchy.css',
|
195 |
-
array(),
|
196 |
-
$this->time, //time (),
|
197 |
-
'all'
|
198 |
-
);
|
199 |
-
}
|
200 |
-
//
|
201 |
-
wp_enqueue_script (
|
202 |
-
'redux-field-checkbox-hierarchy-js',
|
203 |
-
$this->extension_url . 'field_checkbox_hierarchy' . Redux_Functions::isMin () . '.js',
|
204 |
-
array( 'jquery', 'redux-js' ),
|
205 |
-
$this->time, //time (),
|
206 |
-
true
|
207 |
-
);
|
208 |
-
}
|
209 |
-
}
|
210 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.scss
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
.redux-container-checkbox_hierarchy {
|
2 |
-
label {
|
3 |
-
vertical-align: top;
|
4 |
-
width: 100%;
|
5 |
-
|
6 |
-
.field-desc {
|
7 |
-
margin-top: 0;
|
8 |
-
float: left;
|
9 |
-
width: 93%;
|
10 |
-
clear: none;
|
11 |
-
}
|
12 |
-
}
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/options/extensions/checkbox_hierarchy/extension_checkbox_hierarchy.php
DELETED
@@ -1,110 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Redux Framework is free software: you can redistribute it and/or modify
|
4 |
-
* it under the terms of the GNU General Public License as published by
|
5 |
-
* the Free Software Foundation, either version 2 of the License, or
|
6 |
-
* any later version.
|
7 |
-
*
|
8 |
-
* Redux Framework is distributed in the hope that it will be useful,
|
9 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11 |
-
* GNU General Public License for more details.
|
12 |
-
*
|
13 |
-
* You should have received a copy of the GNU General Public License
|
14 |
-
* along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
|
15 |
-
*
|
16 |
-
* @package ReduxFramework
|
17 |
-
* @author Dovy Paukstys (dovy)
|
18 |
-
* @version 3.0.0
|
19 |
-
*/
|
20 |
-
// Exit if accessed directly
|
21 |
-
if( !defined( 'ABSPATH' ) ) exit;
|
22 |
-
// Don't duplicate me!
|
23 |
-
if( !class_exists( 'ReduxFramework_extension_checkbox_hierarchy' ) ) {
|
24 |
-
/**
|
25 |
-
* Main ReduxFramework checkbox_hierarchy extension class
|
26 |
-
*
|
27 |
-
* @since 3.1.6
|
28 |
-
*/
|
29 |
-
class ReduxFramework_extension_checkbox_hierarchy {
|
30 |
-
|
31 |
-
// Set the version number of your extension here
|
32 |
-
public static $version = '1.0.0';
|
33 |
-
// Set the name of your extension here
|
34 |
-
public $ext_name = 'Checkbox hierarchy';
|
35 |
-
|
36 |
-
// Set the minumum required version of Redux here (optional).
|
37 |
-
// Leave blank to require no minimum version.
|
38 |
-
// This allows you to specify a minimum required version of Redux in the event
|
39 |
-
// you do not want to support older versions.
|
40 |
-
public $min_redux_version = '3.0.0';
|
41 |
-
// Protected vars
|
42 |
-
protected $parent;
|
43 |
-
public $extension_url;
|
44 |
-
public $extension_dir;
|
45 |
-
public static $theInstance;
|
46 |
-
/**
|
47 |
-
* Class Constructor. Defines the args for the extions class
|
48 |
-
*
|
49 |
-
* @since 1.0.0
|
50 |
-
* @access public
|
51 |
-
* @param array $sections Panel sections.
|
52 |
-
* @param array $args Class constructor arguments.
|
53 |
-
* @param array $extra_tabs Extra panel tabs.
|
54 |
-
* @return void
|
55 |
-
*/
|
56 |
-
public function __construct( $parent ) {
|
57 |
-
|
58 |
-
$this->parent = $parent;
|
59 |
-
|
60 |
-
if (is_admin() && !$this->is_minimum_version()) {
|
61 |
-
return;
|
62 |
-
}
|
63 |
-
|
64 |
-
if ( empty( $this->extension_dir ) ) {
|
65 |
-
$this->extension_dir = trailingslashit( str_replace( '\\', '/', dirname( __FILE__ ) ) );
|
66 |
-
$this->extension_url = site_url( str_replace( trailingslashit( str_replace( '\\', '/', ABSPATH ) ), '', $this->extension_dir ) );
|
67 |
-
}
|
68 |
-
|
69 |
-
$this->field_name = 'checkbox_hierarchy';
|
70 |
-
self::$theInstance = $this;
|
71 |
-
add_filter( 'redux/'.$this->parent->args['opt_name'].'/field/class/'.$this->field_name, array( &$this, 'overload_field_path' ) ); // Adds the local field
|
72 |
-
}
|
73 |
-
public function getInstance() {
|
74 |
-
return self::$theInstance;
|
75 |
-
}
|
76 |
-
// Forces the use of the embeded field path vs what the core typically would use
|
77 |
-
public function overload_field_path($field) {
|
78 |
-
return dirname(__FILE__).'/'.$this->field_name.'/field_'.$this->field_name.'.php';
|
79 |
-
}
|
80 |
-
private function is_minimum_version () {
|
81 |
-
$redux_ver = ReduxFramework::$_version;
|
82 |
-
if ($this->min_redux_version != '') {
|
83 |
-
if (version_compare($redux_ver, $this->min_redux_version) < 0) {
|
84 |
-
$msg = '<strong>' . esc_html__( 'The', 'redux-framework') . ' ' . $this->ext_name . ' ' . esc_html__('extension requires', 'redux-framework') . ' Redux Framework ' . esc_html__('version', 'redux-framework') . ' ' . $this->min_redux_version . ' ' . esc_html__('or higher.','redux-framework' ) . '</strong> ' . esc_html__( 'You are currently running', 'redux-framework') . ' Redux Framework ' . esc_html__('version','redux-framework' ) . ' ' . $redux_ver . '.<br/><br/>' . esc_html__('This field will not render in your option panel, and featuress of this extension will not be available until the latest version of','redux-framework' ) . ' Redux Framework ' . esc_html__('has been installed.','redux-framework' );
|
85 |
-
|
86 |
-
$data = array(
|
87 |
-
'parent' => $this->parent,
|
88 |
-
'type' => 'error',
|
89 |
-
'msg' => $msg,
|
90 |
-
'id' => $this->ext_name . '_notice_' . self::$version,
|
91 |
-
'dismiss' => false
|
92 |
-
);
|
93 |
-
|
94 |
-
if (method_exists('Redux_Admin_Notices', 'set_notice')) {
|
95 |
-
Redux_Admin_Notices::set_notice($data);
|
96 |
-
} else {
|
97 |
-
echo '<div class="error">';
|
98 |
-
echo '<p>';
|
99 |
-
echo $msg;
|
100 |
-
echo '</p>';
|
101 |
-
echo '</div>';
|
102 |
-
}
|
103 |
-
return false;
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
return true;
|
108 |
-
}
|
109 |
-
} // class
|
110 |
-
} // if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/options/redux-core/assets/css/redux-admin.css
CHANGED
@@ -72,11 +72,6 @@
|
|
72 |
right: -14px;
|
73 |
background: #fff;}.redux-main #redux-footer-sticky{margin-left:-20px;margin-right:-20px;margin-bottom:-10px}.redux-qtip{z-index:999999 !important}.redux-main pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}
|
74 |
/* custom css */
|
75 |
-
.redux-amp-search-icon{
|
76 |
-
position: relative;
|
77 |
-
top: 17px;
|
78 |
-
left: 10px;
|
79 |
-
}
|
80 |
.redux-container{
|
81 |
position: relative;
|
82 |
background: #f5f6fa;
|
@@ -298,11 +293,9 @@ img.ampforwp-post-builder-img{
|
|
298 |
background: #303e9f;
|
299 |
text-decoration: none;
|
300 |
color: #fff;
|
301 |
-
|
302 |
-
padding: 6px 10px 6px 10px;
|
303 |
right: 0;
|
304 |
border-radius: 40px;
|
305 |
-
margin-top: 10px;
|
306 |
}
|
307 |
.extension_listing li{
|
308 |
background: #ffffff;
|
72 |
right: -14px;
|
73 |
background: #fff;}.redux-main #redux-footer-sticky{margin-left:-20px;margin-right:-20px;margin-bottom:-10px}.redux-qtip{z-index:999999 !important}.redux-main pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}
|
74 |
/* custom css */
|
|
|
|
|
|
|
|
|
|
|
75 |
.redux-container{
|
76 |
position: relative;
|
77 |
background: #f5f6fa;
|
293 |
background: #303e9f;
|
294 |
text-decoration: none;
|
295 |
color: #fff;
|
296 |
+
float: right; padding: 6px 10px 8px 10px;
|
|
|
297 |
right: 0;
|
298 |
border-radius: 40px;
|
|
|
299 |
}
|
300 |
.extension_listing li{
|
301 |
background: #ffffff;
|
includes/options/redux-core/core/enqueue.php
CHANGED
@@ -87,7 +87,7 @@
|
|
87 |
'select2-css',
|
88 |
'//cdn.jsdelivr.net/select2/3.5.2/select2.css',
|
89 |
array(),
|
90 |
-
|
91 |
'all'
|
92 |
);
|
93 |
|
@@ -103,7 +103,7 @@
|
|
103 |
'redux-spectrum-css',
|
104 |
ReduxFramework::$_url . 'assets/css/vendor/spectrum/' . $css_file,
|
105 |
array(),
|
106 |
-
|
107 |
'all'
|
108 |
);
|
109 |
|
@@ -130,7 +130,7 @@
|
|
130 |
'qtip-css',
|
131 |
ReduxFramework::$_url . 'assets/css/vendor/qtip/' . $css_file,
|
132 |
array(),
|
133 |
-
|
134 |
'all'
|
135 |
);
|
136 |
|
@@ -170,7 +170,7 @@
|
|
170 |
'redux-field-media-css',
|
171 |
ReduxFramework::$_url . 'assets/css/media/media.css',
|
172 |
array(),
|
173 |
-
|
174 |
'all'
|
175 |
);
|
176 |
}
|
@@ -225,7 +225,7 @@
|
|
225 |
'select2-js',
|
226 |
'//cdn.jsdelivr.net/select2/3.5.2/select2' . $this->min . '.js',
|
227 |
array( 'jquery', 'redux-select2-sortable-js' ),
|
228 |
-
|
229 |
true
|
230 |
);
|
231 |
|
@@ -241,7 +241,7 @@
|
|
241 |
'qtip-js',
|
242 |
ReduxFramework::$_url . 'assets/js/vendor/qtip/' . $js_file,
|
243 |
array( 'jquery' ),
|
244 |
-
|
245 |
true
|
246 |
);
|
247 |
|
@@ -257,7 +257,7 @@
|
|
257 |
'redux-spectrum-js',
|
258 |
ReduxFramework::$_url . 'assets/js/vendor/spectrum/' . $js_file,
|
259 |
array( 'jquery' ),
|
260 |
-
|
261 |
true
|
262 |
);
|
263 |
|
@@ -293,7 +293,7 @@
|
|
293 |
'webfontloader',
|
294 |
'https://ajax.googleapis.com/ajax/libs/webfont/1.5.0/webfont.js',
|
295 |
array( 'jquery' ),
|
296 |
-
|
297 |
true
|
298 |
);
|
299 |
}
|
87 |
'select2-css',
|
88 |
'//cdn.jsdelivr.net/select2/3.5.2/select2.css',
|
89 |
array(),
|
90 |
+
'3.5.2',//$this->timestamp,
|
91 |
'all'
|
92 |
);
|
93 |
|
103 |
'redux-spectrum-css',
|
104 |
ReduxFramework::$_url . 'assets/css/vendor/spectrum/' . $css_file,
|
105 |
array(),
|
106 |
+
'1.3.3',
|
107 |
'all'
|
108 |
);
|
109 |
|
130 |
'qtip-css',
|
131 |
ReduxFramework::$_url . 'assets/css/vendor/qtip/' . $css_file,
|
132 |
array(),
|
133 |
+
'2.2.0',
|
134 |
'all'
|
135 |
);
|
136 |
|
170 |
'redux-field-media-css',
|
171 |
ReduxFramework::$_url . 'assets/css/media/media.css',
|
172 |
array(),
|
173 |
+
time(),
|
174 |
'all'
|
175 |
);
|
176 |
}
|
225 |
'select2-js',
|
226 |
'//cdn.jsdelivr.net/select2/3.5.2/select2' . $this->min . '.js',
|
227 |
array( 'jquery', 'redux-select2-sortable-js' ),
|
228 |
+
'3.5.2',
|
229 |
true
|
230 |
);
|
231 |
|
241 |
'qtip-js',
|
242 |
ReduxFramework::$_url . 'assets/js/vendor/qtip/' . $js_file,
|
243 |
array( 'jquery' ),
|
244 |
+
'2.2.0',
|
245 |
true
|
246 |
);
|
247 |
|
257 |
'redux-spectrum-js',
|
258 |
ReduxFramework::$_url . 'assets/js/vendor/spectrum/' . $js_file,
|
259 |
array( 'jquery' ),
|
260 |
+
'1.3.3',
|
261 |
true
|
262 |
);
|
263 |
|
293 |
'webfontloader',
|
294 |
'https://ajax.googleapis.com/ajax/libs/webfont/1.5.0/webfont.js',
|
295 |
array( 'jquery' ),
|
296 |
+
'1.5.0',
|
297 |
true
|
298 |
);
|
299 |
}
|
includes/options/redux-core/inc/extensions/import_export/import_export/field_import_export.php
CHANGED
@@ -44,10 +44,6 @@
|
|
44 |
$this->parent = $parent;
|
45 |
$this->field = $field;
|
46 |
$this->value = $value;
|
47 |
-
$this->time = '';
|
48 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
49 |
-
$this->timestamp = AMPFORWP_VERSION;
|
50 |
-
}
|
51 |
$this->is_field = $this->parent->extensions['import_export']->is_field;
|
52 |
|
53 |
$this->extension_dir = ReduxFramework::$_dir . 'inc/extensions/import_export/';
|
@@ -159,14 +155,14 @@
|
|
159 |
'redux-import-export',
|
160 |
$this->extension_url . 'import_export/field_import_export' . Redux_Functions::isMin() . '.js',
|
161 |
array( 'jquery' ),
|
162 |
-
|
163 |
true
|
164 |
);
|
|
|
165 |
wp_enqueue_style(
|
166 |
'redux-import-export',
|
167 |
$this->extension_url . 'import_export/field_import_export.css',
|
168 |
-
|
169 |
-
$this->timestamp, //time(),
|
170 |
true
|
171 |
);
|
172 |
|
44 |
$this->parent = $parent;
|
45 |
$this->field = $field;
|
46 |
$this->value = $value;
|
|
|
|
|
|
|
|
|
47 |
$this->is_field = $this->parent->extensions['import_export']->is_field;
|
48 |
|
49 |
$this->extension_dir = ReduxFramework::$_dir . 'inc/extensions/import_export/';
|
155 |
'redux-import-export',
|
156 |
$this->extension_url . 'import_export/field_import_export' . Redux_Functions::isMin() . '.js',
|
157 |
array( 'jquery' ),
|
158 |
+
ReduxFramework_extension_import_export::$version,
|
159 |
true
|
160 |
);
|
161 |
+
|
162 |
wp_enqueue_style(
|
163 |
'redux-import-export',
|
164 |
$this->extension_url . 'import_export/field_import_export.css',
|
165 |
+
time(),
|
|
|
166 |
true
|
167 |
);
|
168 |
|
includes/options/redux-core/inc/fields/ace_editor/field_ace_editor.php
CHANGED
@@ -32,7 +32,6 @@
|
|
32 |
*
|
33 |
* @since ReduxFramework 1.0.0
|
34 |
*/
|
35 |
-
private $time = '';
|
36 |
function __construct( $field = array(), $value = '', $parent ) {
|
37 |
$this->parent = $parent;
|
38 |
$this->field = $field;
|
@@ -48,10 +47,6 @@
|
|
48 |
$this->field['args'] = $this->field['options'];
|
49 |
unset( $this->field['options'] );
|
50 |
}
|
51 |
-
$this->time = time();
|
52 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
53 |
-
$this->time = AMPFORWP_VERSION;
|
54 |
-
}
|
55 |
|
56 |
}
|
57 |
|
@@ -117,7 +112,7 @@
|
|
117 |
'ace-editor-js',
|
118 |
'//cdn.jsdelivr.net/ace/1.1.9/min/ace.js',
|
119 |
array( 'jquery' ),
|
120 |
-
|
121 |
true
|
122 |
);
|
123 |
}
|
@@ -127,7 +122,7 @@
|
|
127 |
'redux-field-ace-editor-js',
|
128 |
ReduxFramework::$_url . 'inc/fields/ace_editor/field_ace_editor' . Redux_Functions::isMin() . '.js',
|
129 |
array( 'jquery', 'ace-editor-js', 'redux-js' ),
|
130 |
-
|
131 |
true
|
132 |
);
|
133 |
}
|
32 |
*
|
33 |
* @since ReduxFramework 1.0.0
|
34 |
*/
|
|
|
35 |
function __construct( $field = array(), $value = '', $parent ) {
|
36 |
$this->parent = $parent;
|
37 |
$this->field = $field;
|
47 |
$this->field['args'] = $this->field['options'];
|
48 |
unset( $this->field['options'] );
|
49 |
}
|
|
|
|
|
|
|
|
|
50 |
|
51 |
}
|
52 |
|
112 |
'ace-editor-js',
|
113 |
'//cdn.jsdelivr.net/ace/1.1.9/min/ace.js',
|
114 |
array( 'jquery' ),
|
115 |
+
'1.1.9',
|
116 |
true
|
117 |
);
|
118 |
}
|
122 |
'redux-field-ace-editor-js',
|
123 |
ReduxFramework::$_url . 'inc/fields/ace_editor/field_ace_editor' . Redux_Functions::isMin() . '.js',
|
124 |
array( 'jquery', 'ace-editor-js', 'redux-js' ),
|
125 |
+
time(),
|
126 |
true
|
127 |
);
|
128 |
}
|
includes/options/redux-core/inc/fields/checkbox/field_checkbox.php
CHANGED
@@ -41,16 +41,11 @@ if ( !class_exists ( 'ReduxFramework_checkbox' ) ) {
|
|
41 |
* @access public
|
42 |
* @return void
|
43 |
*/
|
44 |
-
private $timestamp = '';
|
45 |
-
|
46 |
function __construct ( $field = array(), $value = '', $parent ) {
|
47 |
|
48 |
$this->parent = $parent;
|
49 |
$this->field = $field;
|
50 |
$this->value = $value;
|
51 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
52 |
-
$this->timestamp = AMPFORWP_VERSION;
|
53 |
-
}
|
54 |
}
|
55 |
|
56 |
/**
|
@@ -146,7 +141,7 @@ if ( !class_exists ( 'ReduxFramework_checkbox' ) ) {
|
|
146 |
'redux-field-checkbox-css',
|
147 |
ReduxFramework::$_url . 'inc/fields/checkbox/field_checkbox.css',
|
148 |
array(),
|
149 |
-
|
150 |
'all'
|
151 |
);
|
152 |
}
|
@@ -155,7 +150,7 @@ if ( !class_exists ( 'ReduxFramework_checkbox' ) ) {
|
|
155 |
'redux-field-checkbox-js',
|
156 |
ReduxFramework::$_url . 'inc/fields/checkbox/field_checkbox' . Redux_Functions::isMin () . '.js',
|
157 |
array( 'jquery', 'redux-js' ),
|
158 |
-
|
159 |
true
|
160 |
);
|
161 |
}
|
41 |
* @access public
|
42 |
* @return void
|
43 |
*/
|
|
|
|
|
44 |
function __construct ( $field = array(), $value = '', $parent ) {
|
45 |
|
46 |
$this->parent = $parent;
|
47 |
$this->field = $field;
|
48 |
$this->value = $value;
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
/**
|
141 |
'redux-field-checkbox-css',
|
142 |
ReduxFramework::$_url . 'inc/fields/checkbox/field_checkbox.css',
|
143 |
array(),
|
144 |
+
time (),
|
145 |
'all'
|
146 |
);
|
147 |
}
|
150 |
'redux-field-checkbox-js',
|
151 |
ReduxFramework::$_url . 'inc/fields/checkbox/field_checkbox' . Redux_Functions::isMin () . '.js',
|
152 |
array( 'jquery', 'redux-js' ),
|
153 |
+
time (),
|
154 |
true
|
155 |
);
|
156 |
}
|
includes/options/redux-core/inc/fields/color/field_color.php
CHANGED
@@ -42,16 +42,11 @@ if ( ! class_exists( 'ReduxFramework_color' ) ) {
|
|
42 |
* @access public
|
43 |
* @return void
|
44 |
*/
|
45 |
-
private $time = '';
|
46 |
function __construct( $field = array(), $value = '', $parent ) {
|
47 |
|
48 |
$this->parent = $parent;
|
49 |
$this->field = $field;
|
50 |
$this->value = $value;
|
51 |
-
$this->time = time();
|
52 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
53 |
-
$this->time = AMPFORWP_VERSION;
|
54 |
-
}
|
55 |
}
|
56 |
|
57 |
/**
|
@@ -98,7 +93,7 @@ if ( ! class_exists( 'ReduxFramework_color' ) ) {
|
|
98 |
'redux-field-color-js',
|
99 |
ReduxFramework::$_url . 'inc/fields/color/field_color' . Redux_Functions::isMin() . '.js',
|
100 |
array( 'jquery', 'wp-color-picker', 'redux-js' ),
|
101 |
-
|
102 |
true
|
103 |
);
|
104 |
}
|
42 |
* @access public
|
43 |
* @return void
|
44 |
*/
|
|
|
45 |
function __construct( $field = array(), $value = '', $parent ) {
|
46 |
|
47 |
$this->parent = $parent;
|
48 |
$this->field = $field;
|
49 |
$this->value = $value;
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
/**
|
93 |
'redux-field-color-js',
|
94 |
ReduxFramework::$_url . 'inc/fields/color/field_color' . Redux_Functions::isMin() . '.js',
|
95 |
array( 'jquery', 'wp-color-picker', 'redux-js' ),
|
96 |
+
time(),
|
97 |
true
|
98 |
);
|
99 |
}
|
includes/options/redux-core/inc/fields/color_rgba/field_color_rgba.php
CHANGED
@@ -51,10 +51,6 @@ if( !class_exists( 'ReduxFramework_color_rgba' ) ) {
|
|
51 |
$this->parent = $parent;
|
52 |
$this->field = $field;
|
53 |
$this->value = $value;
|
54 |
-
$this->time = time();
|
55 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
56 |
-
$this->time = AMPFORWP_VERSION;
|
57 |
-
}
|
58 |
|
59 |
$defaults = array(
|
60 |
'color' => '',
|
@@ -196,7 +192,7 @@ if( !class_exists( 'ReduxFramework_color_rgba' ) ) {
|
|
196 |
'redux-field-color-rgba-js',
|
197 |
ReduxFramework::$_url . 'inc/fields/color_rgba/field_color_rgba' . Redux_Functions::isMin() . '.js',
|
198 |
array('jquery', 'redux-spectrum-js'),
|
199 |
-
|
200 |
true
|
201 |
);
|
202 |
}
|
@@ -212,7 +208,7 @@ if( !class_exists( 'ReduxFramework_color_rgba' ) ) {
|
|
212 |
'redux-field-color-rgba-css',
|
213 |
ReduxFramework::$_url . 'inc/fields/color_rgba/field_color_rgba.css',
|
214 |
array(),
|
215 |
-
|
216 |
'all'
|
217 |
);
|
218 |
}
|
51 |
$this->parent = $parent;
|
52 |
$this->field = $field;
|
53 |
$this->value = $value;
|
|
|
|
|
|
|
|
|
54 |
|
55 |
$defaults = array(
|
56 |
'color' => '',
|
192 |
'redux-field-color-rgba-js',
|
193 |
ReduxFramework::$_url . 'inc/fields/color_rgba/field_color_rgba' . Redux_Functions::isMin() . '.js',
|
194 |
array('jquery', 'redux-spectrum-js'),
|
195 |
+
time(),
|
196 |
true
|
197 |
);
|
198 |
}
|
208 |
'redux-field-color-rgba-css',
|
209 |
ReduxFramework::$_url . 'inc/fields/color_rgba/field_color_rgba.css',
|
210 |
array(),
|
211 |
+
time(),
|
212 |
'all'
|
213 |
);
|
214 |
}
|
includes/options/redux-core/inc/fields/image_select/field_image_select.php
CHANGED
@@ -42,15 +42,10 @@ if ( ! class_exists( 'ReduxFramework_image_select' ) ) {
|
|
42 |
* @access public
|
43 |
* @return void
|
44 |
*/
|
45 |
-
private $time = '';
|
46 |
function __construct( $field = array(), $value = '', $parent ) {
|
47 |
$this->parent = $parent;
|
48 |
$this->field = $field;
|
49 |
$this->value = $value;
|
50 |
-
$this->time = time();
|
51 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
52 |
-
$this->time = AMPFORWP_VERSION;
|
53 |
-
}
|
54 |
}
|
55 |
|
56 |
/**
|
@@ -215,7 +210,7 @@ if ( ! class_exists( 'ReduxFramework_image_select' ) ) {
|
|
215 |
'redux-field-image-select-js',
|
216 |
ReduxFramework::$_url . 'inc/fields/image_select/field_image_select' . Redux_Functions::isMin() . '.js',
|
217 |
array( 'jquery', 'redux-js' ),
|
218 |
-
|
219 |
true
|
220 |
);
|
221 |
|
@@ -224,7 +219,7 @@ if ( ! class_exists( 'ReduxFramework_image_select' ) ) {
|
|
224 |
'redux-field-image-select-css',
|
225 |
ReduxFramework::$_url . 'inc/fields/image_select/field_image_select.css',
|
226 |
array(),
|
227 |
-
|
228 |
'all'
|
229 |
);
|
230 |
}
|
42 |
* @access public
|
43 |
* @return void
|
44 |
*/
|
|
|
45 |
function __construct( $field = array(), $value = '', $parent ) {
|
46 |
$this->parent = $parent;
|
47 |
$this->field = $field;
|
48 |
$this->value = $value;
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
/**
|
210 |
'redux-field-image-select-js',
|
211 |
ReduxFramework::$_url . 'inc/fields/image_select/field_image_select' . Redux_Functions::isMin() . '.js',
|
212 |
array( 'jquery', 'redux-js' ),
|
213 |
+
time(),
|
214 |
true
|
215 |
);
|
216 |
|
219 |
'redux-field-image-select-css',
|
220 |
ReduxFramework::$_url . 'inc/fields/image_select/field_image_select.css',
|
221 |
array(),
|
222 |
+
time(),
|
223 |
'all'
|
224 |
);
|
225 |
}
|
includes/options/redux-core/inc/fields/media/field_media.php
CHANGED
@@ -43,15 +43,10 @@ if ( ! class_exists( 'ReduxFramework_media' ) ) {
|
|
43 |
* @access public
|
44 |
* @return void
|
45 |
*/
|
46 |
-
private $timestamp = '';
|
47 |
-
|
48 |
function __construct( $field = array(), $value = '', $parent ) {
|
49 |
$this->parent = $parent;
|
50 |
$this->field = $field;
|
51 |
$this->value = $value;
|
52 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
53 |
-
$this->timestamp = AMPFORWP_VERSION;
|
54 |
-
}
|
55 |
}
|
56 |
|
57 |
/**
|
@@ -231,7 +226,7 @@ if ( ! class_exists( 'ReduxFramework_media' ) ) {
|
|
231 |
'redux-field-media-js',
|
232 |
ReduxFramework::$_url . 'assets/js/media/media' . Redux_Functions::isMin() . '.js',
|
233 |
array( 'jquery', 'redux-js' ),
|
234 |
-
|
235 |
true
|
236 |
);
|
237 |
|
43 |
* @access public
|
44 |
* @return void
|
45 |
*/
|
|
|
|
|
46 |
function __construct( $field = array(), $value = '', $parent ) {
|
47 |
$this->parent = $parent;
|
48 |
$this->field = $field;
|
49 |
$this->value = $value;
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
/**
|
226 |
'redux-field-media-js',
|
227 |
ReduxFramework::$_url . 'assets/js/media/media' . Redux_Functions::isMin() . '.js',
|
228 |
array( 'jquery', 'redux-js' ),
|
229 |
+
time(),
|
230 |
true
|
231 |
);
|
232 |
|
includes/options/redux-core/inc/fields/select/field_select.php
CHANGED
@@ -14,15 +14,10 @@ if ( ! class_exists( 'ReduxFramework_select' ) ) {
|
|
14 |
*
|
15 |
* @since ReduxFramework 1.0.0
|
16 |
*/
|
17 |
-
private $time = '';
|
18 |
public function __construct( $field = array(), $value = '', $parent ) {
|
19 |
$this->parent = $parent;
|
20 |
$this->field = $field;
|
21 |
$this->value = $value;
|
22 |
-
$this->time = time();
|
23 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
24 |
-
$this->time = AMPFORWP_VERSION;
|
25 |
-
}
|
26 |
}
|
27 |
|
28 |
/**
|
@@ -167,7 +162,7 @@ if ( ! class_exists( 'ReduxFramework_select' ) ) {
|
|
167 |
'redux-field-select-js',
|
168 |
ReduxFramework::$_url . 'inc/fields/select/field_select' . Redux_Functions::isMin() . '.js',
|
169 |
array( 'jquery', 'select2-js', 'redux-js' ),
|
170 |
-
|
171 |
true
|
172 |
);
|
173 |
|
@@ -176,7 +171,7 @@ if ( ! class_exists( 'ReduxFramework_select' ) ) {
|
|
176 |
'redux-field-select-css',
|
177 |
ReduxFramework::$_url . 'inc/fields/select/field_select.css',
|
178 |
array(),
|
179 |
-
|
180 |
'all'
|
181 |
);
|
182 |
}
|
14 |
*
|
15 |
* @since ReduxFramework 1.0.0
|
16 |
*/
|
|
|
17 |
public function __construct( $field = array(), $value = '', $parent ) {
|
18 |
$this->parent = $parent;
|
19 |
$this->field = $field;
|
20 |
$this->value = $value;
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
|
23 |
/**
|
162 |
'redux-field-select-js',
|
163 |
ReduxFramework::$_url . 'inc/fields/select/field_select' . Redux_Functions::isMin() . '.js',
|
164 |
array( 'jquery', 'select2-js', 'redux-js' ),
|
165 |
+
time(),
|
166 |
true
|
167 |
);
|
168 |
|
171 |
'redux-field-select-css',
|
172 |
ReduxFramework::$_url . 'inc/fields/select/field_select.css',
|
173 |
array(),
|
174 |
+
time(),
|
175 |
'all'
|
176 |
);
|
177 |
}
|
includes/options/redux-core/inc/fields/spacing/field_spacing.php
CHANGED
@@ -18,10 +18,6 @@ if ( ! class_exists( 'ReduxFramework_spacing' ) ) {
|
|
18 |
$this->parent = $parent;
|
19 |
$this->field = $field;
|
20 |
$this->value = $value;
|
21 |
-
$this->time = time();
|
22 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
23 |
-
$this->time = AMPFORWP_VERSION;
|
24 |
-
}
|
25 |
}
|
26 |
|
27 |
/**
|
@@ -286,7 +282,7 @@ if ( ! class_exists( 'ReduxFramework_spacing' ) ) {
|
|
286 |
'redux-field-spacing-js',
|
287 |
ReduxFramework::$_url . 'inc/fields/spacing/field_spacing' . Redux_Functions::isMin() . '.js',
|
288 |
array( 'jquery', 'select2-js', 'redux-js' ),
|
289 |
-
|
290 |
true
|
291 |
);
|
292 |
|
@@ -295,7 +291,7 @@ if ( ! class_exists( 'ReduxFramework_spacing' ) ) {
|
|
295 |
'redux-field-spacing-css',
|
296 |
ReduxFramework::$_url . 'inc/fields/spacing/field_spacing.css',
|
297 |
array(),
|
298 |
-
|
299 |
'all'
|
300 |
);
|
301 |
}
|
18 |
$this->parent = $parent;
|
19 |
$this->field = $field;
|
20 |
$this->value = $value;
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
|
23 |
/**
|
282 |
'redux-field-spacing-js',
|
283 |
ReduxFramework::$_url . 'inc/fields/spacing/field_spacing' . Redux_Functions::isMin() . '.js',
|
284 |
array( 'jquery', 'select2-js', 'redux-js' ),
|
285 |
+
time(),
|
286 |
true
|
287 |
);
|
288 |
|
291 |
'redux-field-spacing-css',
|
292 |
ReduxFramework::$_url . 'inc/fields/spacing/field_spacing.css',
|
293 |
array(),
|
294 |
+
time(),
|
295 |
'all'
|
296 |
);
|
297 |
}
|
includes/options/redux-core/inc/fields/switch/field_switch.php
CHANGED
@@ -18,10 +18,6 @@ if ( ! class_exists( 'ReduxFramework_switch' ) ) {
|
|
18 |
$this->parent = $parent;
|
19 |
$this->field = $field;
|
20 |
$this->value = $value;
|
21 |
-
$this->timestamp = '';
|
22 |
-
if ( defined('AMPFORWP_VERSION') ) {
|
23 |
-
$this->timestamp = AMPFORWP_VERSION;
|
24 |
-
}
|
25 |
}
|
26 |
|
27 |
/**
|
@@ -77,7 +73,7 @@ if ( ! class_exists( 'ReduxFramework_switch' ) ) {
|
|
77 |
'redux-field-switch-js',
|
78 |
ReduxFramework::$_url . 'inc/fields/switch/field_switch' . Redux_Functions::isMin() . '.js',
|
79 |
array( 'jquery', 'redux-js' ),
|
80 |
-
|
81 |
true
|
82 |
);
|
83 |
|
@@ -86,7 +82,7 @@ if ( ! class_exists( 'ReduxFramework_switch' ) ) {
|
|
86 |
'redux-field-switch-css',
|
87 |
ReduxFramework::$_url . 'inc/fields/switch/field_switch.css',
|
88 |
array(),
|
89 |
-
|
90 |
'all'
|
91 |
);
|
92 |
}
|
18 |
$this->parent = $parent;
|
19 |
$this->field = $field;
|
20 |
$this->value = $value;
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
|
23 |
/**
|
73 |
'redux-field-switch-js',
|
74 |
ReduxFramework::$_url . 'inc/fields/switch/field_switch' . Redux_Functions::isMin() . '.js',
|
75 |
array( 'jquery', 'redux-js' ),
|
76 |
+
time(),
|
77 |
true
|
78 |
);
|
79 |
|
82 |
'redux-field-switch-css',
|
83 |
ReduxFramework::$_url . 'inc/fields/switch/field_switch.css',
|
84 |
array(),
|
85 |
+
time(),
|
86 |
'all'
|
87 |
);
|
88 |
}
|
includes/options/redux-custom.css
CHANGED
@@ -37,9 +37,6 @@
|
|
37 |
.redux-container #redux-intro-text{
|
38 |
text-align: right
|
39 |
}
|
40 |
-
.extension-menu-call{
|
41 |
-
color: #333
|
42 |
-
}
|
43 |
.redux-container #redux-intro-text{
|
44 |
background: transparent;
|
45 |
border: 0;
|
37 |
.redux-container #redux-intro-text{
|
38 |
text-align: right
|
39 |
}
|
|
|
|
|
|
|
40 |
.redux-container #redux-intro-text{
|
41 |
background: transparent;
|
42 |
border: 0;
|
includes/redirect.php
CHANGED
@@ -45,12 +45,7 @@ function ampforwp_check_amp_page_status() {
|
|
45 |
|
46 |
// AMP and non-amp Homepage
|
47 |
if ( is_home() && ampforwp_is_front_page() && ! ampforwp_is_home() ) {
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
// Single and Pages
|
52 |
-
if ( ( is_single() && !$redux_builder_amp['amp-on-off-for-all-posts'] ) || ( is_page() && !$redux_builder_amp['amp-on-off-for-all-pages'] ) || (is_singular() && 'hide-amp' == get_post_meta( get_the_ID(),'ampforwp-amp-on-off',true)) ) {
|
53 |
-
return;
|
54 |
}
|
55 |
|
56 |
// Blog page
|
@@ -137,19 +132,6 @@ function ampforwp_page_template_redirect() {
|
|
137 |
|
138 |
// Return if some categories are selected as Hide #999
|
139 |
if ( is_archive() && $redux_builder_amp['ampforwp-archive-support'] ) {
|
140 |
-
if(is_tag() && is_array($redux_builder_amp['hide-amp-tags-bulk-option'])) {
|
141 |
-
$all_tags = get_the_tags();
|
142 |
-
$tagsOnPost = array();
|
143 |
-
foreach ($all_tags as $tagskey => $tagsvalue) {
|
144 |
-
$tagsOnPost[] = $tagsvalue->term_id;
|
145 |
-
}
|
146 |
-
$get_tags_checkbox = array_keys(array_filter($redux_builder_amp['hide-amp-tags-bulk-option']));
|
147 |
-
|
148 |
-
if( count(array_intersect($get_tags_checkbox,$tagsOnPost))>0 ){
|
149 |
-
return;
|
150 |
-
}
|
151 |
-
}//tags check area closed
|
152 |
-
|
153 |
$selected_cats = array();
|
154 |
$categories = get_the_category();
|
155 |
$category_id = $categories[0]->cat_ID;
|
45 |
|
46 |
// AMP and non-amp Homepage
|
47 |
if ( is_home() && ampforwp_is_front_page() && ! ampforwp_is_home() ) {
|
48 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
// Blog page
|
132 |
|
133 |
// Return if some categories are selected as Hide #999
|
134 |
if ( is_archive() && $redux_builder_amp['ampforwp-archive-support'] ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
$selected_cats = array();
|
136 |
$categories = get_the_category();
|
137 |
$category_id = $categories[0]->cat_ID;
|
includes/thirdparty-compatibility.php
CHANGED
@@ -207,24 +207,6 @@ if(!function_exists('ampforwp_amp_nonamp_convert')){
|
|
207 |
}
|
208 |
}
|
209 |
break;
|
210 |
-
case is_author():
|
211 |
-
$author = get_queried_object();
|
212 |
-
|
213 |
-
$templates = array();
|
214 |
-
|
215 |
-
if ( $author instanceof WP_User ) {
|
216 |
-
$templates[] = $filePath . "/author-{$author->user_nicename}.php";
|
217 |
-
$templates[] = $filePath . "/author-{$author->ID}.php";
|
218 |
-
}
|
219 |
-
$templates[] = $filePath . "/author.php";
|
220 |
-
|
221 |
-
foreach ( $templates as $key => $value ) {
|
222 |
-
if ( 'single' === $type && file_exists($value) ) {
|
223 |
-
$file = $value;
|
224 |
-
break;
|
225 |
-
}
|
226 |
-
}
|
227 |
-
break;
|
228 |
case (is_archive()):
|
229 |
$post_types = array_filter( (array) get_query_var( 'post_type' ) );
|
230 |
$templates = array();
|
@@ -296,39 +278,6 @@ if(!function_exists('ampforwp_amp_nonamp_convert')){
|
|
296 |
}
|
297 |
}
|
298 |
break;
|
299 |
-
case is_page():
|
300 |
-
$id = get_queried_object_id();
|
301 |
-
$template = get_page_template_slug();
|
302 |
-
$pagename = get_query_var('pagename');
|
303 |
-
|
304 |
-
if ( ! $pagename && $id ) {
|
305 |
-
// If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object
|
306 |
-
$post = get_queried_object();
|
307 |
-
if ( $post )
|
308 |
-
$pagename = $post->post_name;
|
309 |
-
}
|
310 |
-
|
311 |
-
$templates = array();
|
312 |
-
if ( $template && 0 === validate_file( $template ) )
|
313 |
-
$templates[] = $template;
|
314 |
-
if ( $pagename ) {
|
315 |
-
$pagename_decoded = urldecode( $pagename );
|
316 |
-
if ( $pagename_decoded !== $pagename ) {
|
317 |
-
$templates[] = $filePath . "/page-{$pagename_decoded}.php";
|
318 |
-
}
|
319 |
-
$templates[] = $filePath . "/page-{$pagename}.php";
|
320 |
-
}
|
321 |
-
if ( $id )
|
322 |
-
$templates[] = $filePath . "/page-{$id}.php";
|
323 |
-
$templates[] = $filePath . "/page.php";
|
324 |
-
|
325 |
-
foreach ( $templates as $key => $value ) {
|
326 |
-
if ( 'single' == $type && file_exists($value) ) {
|
327 |
-
$file = $value;
|
328 |
-
break;
|
329 |
-
}
|
330 |
-
}
|
331 |
-
break;
|
332 |
}
|
333 |
if(!file_exists($file)){
|
334 |
$file = $currentFile;
|
@@ -368,107 +317,4 @@ function ampforwp_add_upcomminglayouts($layoutTemplate){
|
|
368 |
}
|
369 |
return $layoutTemplate;
|
370 |
|
371 |
-
}
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
if(!function_exists('ampforwp_isexternal')){
|
377 |
-
function ampforwp_isexternal($url) {
|
378 |
-
$components = parse_url($url);
|
379 |
-
if ( empty($components['host']) ) return false; // we will treat url like '/relative.php' as relative
|
380 |
-
if ( strcasecmp($components['host'], $_SERVER['HTTP_HOST']) === 0 ) return false; // url host looks exactly like the local host
|
381 |
-
return strrpos(strtolower($components['host']), $_SERVER['HTTP_HOST']) !== strlen($components['host']) - strlen($_SERVER['HTTP_HOST']); // check if the url host is a subdomain
|
382 |
-
}//Function function_exists
|
383 |
-
}// ampforwp_isexternal function_exists close
|
384 |
-
if(!function_exists('ampforwp_findInternalUrl')){
|
385 |
-
function ampforwp_findInternalUrl($url){
|
386 |
-
global $redux_builder_amp;
|
387 |
-
|
388 |
-
if(isset($redux_builder_amp['convert-internal-nonamplinks-to-amp']) && ! $redux_builder_amp['convert-internal-nonamplinks-to-amp']){
|
389 |
-
return $url;
|
390 |
-
}
|
391 |
-
|
392 |
-
if($url=='#'){ return $url; }
|
393 |
-
|
394 |
-
if(!ampforwp_isexternal($url) && ampforwp_is_amp_inURL($url)===false){
|
395 |
-
// Skip the URL's that have edit link to it
|
396 |
-
$parts = parse_url($url);
|
397 |
-
parse_str($parts['query'], $query);
|
398 |
-
if ( (isset( $query['action'] ) && $query['action']) || (isset( $query['amp'] ) && $query['amp'] ) ) {
|
399 |
-
return $url;
|
400 |
-
}
|
401 |
-
|
402 |
-
$qmarkAmp = (isset($redux_builder_amp['amp-core-end-point']) ? $redux_builder_amp['amp-core-end-point']: false );//amp-core-end-point
|
403 |
-
if ( $qmarkAmp ){
|
404 |
-
$url = add_query_arg( 'amp', '1', $url);
|
405 |
-
return $url;
|
406 |
-
|
407 |
-
}
|
408 |
-
|
409 |
-
if(strpos($url, "#")!==false){
|
410 |
-
$url = explode("#",$url);
|
411 |
-
$url = trailingslashit($url[0]).user_trailingslashit(AMPFORWP_AMP_QUERY_VAR).'#'.$url[1];
|
412 |
-
}else{
|
413 |
-
$url = trailingslashit($url).user_trailingslashit(AMPFORWP_AMP_QUERY_VAR);
|
414 |
-
}
|
415 |
-
return $url;
|
416 |
-
}
|
417 |
-
return $url;
|
418 |
-
}// function Close
|
419 |
-
}// function_exists ampforwp_findInternalUrl close
|
420 |
-
function ampforwp_is_amp_inURL($url){
|
421 |
-
$urlArray = explode("/", $url);
|
422 |
-
if(!in_array(AMPFORWP_AMP_QUERY_VAR, $urlArray)){
|
423 |
-
return false;
|
424 |
-
}
|
425 |
-
return true;
|
426 |
-
}
|
427 |
-
|
428 |
-
if(is_admin()){
|
429 |
-
add_action( 'redux/options/redux_builder_amp/saved', 'ampforwp_extension_individual_amp_page',10,2);
|
430 |
-
function ampforwp_extension_individual_amp_page($options, $changed_values){
|
431 |
-
if(isset($changed_values['amp-pages-meta-default']) && $options['amp-pages-meta-default']=='hide'){
|
432 |
-
delete_transient('ampforwp_current_version_check');
|
433 |
-
}
|
434 |
-
}
|
435 |
-
|
436 |
-
add_filter("redux/options/redux_builder_amp/data/category_list_hierarchy", 'ampforwp_redux_category_list_hierarchy',10,1);
|
437 |
-
function ampforwp_redux_category_list_hierarchy($data){
|
438 |
-
if(!is_array($data)){ $data = array(); }// To avoid PHP Fatal error: Cannot use string offset as an array
|
439 |
-
$cats = get_categories();
|
440 |
-
if ( ! empty ( $cats ) ) {
|
441 |
-
foreach ( $cats as $cat ) {
|
442 |
-
if($cat->category_parent!=0){
|
443 |
-
$data[ $cat->category_parent ]['child'][$cat->term_id] = $cat->name;
|
444 |
-
}else{
|
445 |
-
$data[ $cat->term_id ]['name'] = $cat->name;
|
446 |
-
}
|
447 |
-
}//foreach
|
448 |
-
} // If
|
449 |
-
|
450 |
-
$data['set_category_hirarchy'] = 1;
|
451 |
-
return $data;
|
452 |
-
}
|
453 |
-
|
454 |
-
|
455 |
-
}//Is_admin Closed
|
456 |
-
|
457 |
-
/**
|
458 |
-
* Added filter to Add tags & attribute
|
459 |
-
* sanitizer in all content filters
|
460 |
-
*/
|
461 |
-
add_filter("amp_content_sanitizers",'ampforwp_allows_tag_sanitizer');
|
462 |
-
add_filter("ampforwp_content_sanitizers",'ampforwp_allows_tag_sanitizer');
|
463 |
-
|
464 |
-
function ampforwp_allows_tag_sanitizer($sanitizer_classes){
|
465 |
-
$sanitizer_classes['AMP_Tag_And_Attribute_Sanitizer'] = array();
|
466 |
-
return $sanitizer_classes;
|
467 |
-
};
|
468 |
-
|
469 |
-
// Liberating Search from Relevanssi's Search Take Over
|
470 |
-
add_action('amp_init', 'ampforwp_remove_relevanssi_search_takeover');
|
471 |
-
function ampforwp_remove_relevanssi_search_takeover(){
|
472 |
-
remove_filter( 'the_posts', 'relevanssi_query', 99, 2 );
|
473 |
-
remove_filter( 'posts_request', 'relevanssi_prevent_default_request', 10, 2 );
|
474 |
-
}
|
207 |
}
|
208 |
}
|
209 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
case (is_archive()):
|
211 |
$post_types = array_filter( (array) get_query_var( 'post_type' ) );
|
212 |
$templates = array();
|
278 |
}
|
279 |
}
|
280 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
}
|
282 |
if(!file_exists($file)){
|
283 |
$file = $currentFile;
|
317 |
}
|
318 |
return $layoutTemplate;
|
319 |
|
320 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/updater/update.php
CHANGED
@@ -107,19 +107,14 @@ function ampforwp_get_licence_activate_update(){
|
|
107 |
$status = $license_data->license;
|
108 |
$limit = ampforwp_set_plugin_limit( true, $license_data, $ampforwp_license_activate);
|
109 |
$selectedOption['amp-license'][$ampforwp_license_activate]['limit'] = $limit;
|
110 |
-
|
111 |
-
$response_all_data = json_decode($response,true);
|
112 |
-
$selectedOption['amp-license'][$ampforwp_license_activate]['all_data']['success'] = $response_all_data['success'];
|
113 |
-
$selectedOption['amp-license'][$ampforwp_license_activate]['all_data']['license'] = $response_all_data['license'];
|
114 |
-
$selectedOption['amp-license'][$ampforwp_license_activate]['all_data']['item_name'] = $response_all_data['item_name'];
|
115 |
-
$selectedOption['amp-license'][$ampforwp_license_activate]['all_data']['expires'] = $response_all_data['expires'];
|
116 |
-
$selectedOption['amp-license'][$ampforwp_license_activate]['all_data']['customer_name'] = $response_all_data['customer_name'];
|
117 |
-
$selectedOption['amp-license'][$ampforwp_license_activate]['all_data']['customer_email'] = $response_all_data['customer_email'];
|
118 |
}
|
119 |
|
120 |
$selectedOption['amp-license'][$ampforwp_license_activate]['status'] = $status;
|
121 |
$selectedOption['amp-license'][$ampforwp_license_activate]['message'] = $message;
|
122 |
|
|
|
|
|
123 |
update_option( 'redux_builder_amp', $selectedOption );
|
124 |
if($status=='valid'){
|
125 |
$status = "200";
|
@@ -134,8 +129,132 @@ function ampforwp_get_licence_activate_update(){
|
|
134 |
}
|
135 |
}
|
136 |
add_action( 'wp_ajax_ampforwp_get_licence_activate_update', 'ampforwp_get_licence_activate_update' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
|
|
|
|
|
|
|
|
|
139 |
/***********************************************
|
140 |
* Illustrates how to deactivate a license key.
|
141 |
* This will decrease the site count
|
107 |
$status = $license_data->license;
|
108 |
$limit = ampforwp_set_plugin_limit( true, $license_data, $ampforwp_license_activate);
|
109 |
$selectedOption['amp-license'][$ampforwp_license_activate]['limit'] = $limit;
|
110 |
+
$selectedOption['amp-license'][$ampforwp_license_activate]['all_data'] = json_decode($response,true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
|
113 |
$selectedOption['amp-license'][$ampforwp_license_activate]['status'] = $status;
|
114 |
$selectedOption['amp-license'][$ampforwp_license_activate]['message'] = $message;
|
115 |
|
116 |
+
|
117 |
+
|
118 |
update_option( 'redux_builder_amp', $selectedOption );
|
119 |
if($status=='valid'){
|
120 |
$status = "200";
|
129 |
}
|
130 |
}
|
131 |
add_action( 'wp_ajax_ampforwp_get_licence_activate_update', 'ampforwp_get_licence_activate_update' );
|
132 |
+
/**
|
133 |
+
* Activate the license
|
134 |
+
*/
|
135 |
+
function ampForWP_extension_activate_license() {
|
136 |
+
//Get Data from Redux data
|
137 |
+
|
138 |
+
$selectedOption = get_option('redux_builder_amp',true);
|
139 |
+
if( isset($selectedOption['amp-license']) && "" != $selectedOption['amp-license']){
|
140 |
+
foreach ($selectedOption['amp-license'] as $ext_key => $ext_value) {
|
141 |
+
$amplicense = $ext_value['license'];
|
142 |
+
$item_name = $ext_value['item_name'];
|
143 |
+
$store_url = $ext_value['store_url'];
|
144 |
+
$plugin_active_path = (isset($ext_value['plugin_active_path'])? $ext_value['plugin_active_path'] : "");
|
145 |
+
if($store_url!="" && isset($ext_value['status']) && $ext_value['status']==='valid'){
|
146 |
+
continue;
|
147 |
+
}
|
148 |
+
// data to send in our API request
|
149 |
+
$api_params = array(
|
150 |
+
'edd_action' => 'activate_license',
|
151 |
+
'license' => $amplicense,
|
152 |
+
'item_name' => urlencode( $item_name ), // the name of our product in EDD
|
153 |
+
'url' => home_url()
|
154 |
+
);
|
155 |
+
|
156 |
+
// Call the custom API.
|
157 |
+
$response = wp_remote_post( $store_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
|
158 |
+
$message = '';
|
159 |
+
// make sure the response came back okay
|
160 |
+
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
|
161 |
+
|
162 |
+
if ( is_wp_error( $response ) ) {
|
163 |
+
$message = $response->get_error_message();
|
164 |
+
} else {
|
165 |
+
$message = __( 'An error occurred, please try again.', 'ampforwp-extension-updater' );
|
166 |
+
}
|
167 |
+
|
168 |
+
} else {
|
169 |
+
$response = wp_remote_retrieve_body( $response );
|
170 |
+
$license_data = json_decode( $response );
|
171 |
+
if ( false === $license_data->success ) {
|
172 |
+
switch( $license_data->error ) {
|
173 |
+
case 'expired' :
|
174 |
+
$message = sprintf(
|
175 |
+
__( 'Your license key expired on %s.', 'ampforwp-extension-updater' ),
|
176 |
+
date_i18n( get_option( 'date_format' ), strtotime( $license_data->expires, current_time( 'timestamp' ) ) )
|
177 |
+
);
|
178 |
+
$message .= "<a href='".$store_url."/checkout-2/?edd_license_key=16ed15c13524cc7e00346eeb3f76e412'>Renew Link</a>";
|
179 |
+
break;
|
180 |
+
|
181 |
+
case 'revoked' :
|
182 |
+
|
183 |
+
$message = __( 'Your license key has been disabled.', 'ampforwp-extension-updater' );
|
184 |
+
break;
|
185 |
+
|
186 |
+
case 'missing' :
|
187 |
+
|
188 |
+
$message = __( 'Please enter the license key.', 'ampforwp-extension-updater' );
|
189 |
+
break;
|
190 |
+
|
191 |
+
case 'invalid' :
|
192 |
+
case 'site_inactive' :
|
193 |
+
|
194 |
+
$message = __( 'Your license is not active for this URL.', 'ampforwp-extension-updater' );
|
195 |
+
break;
|
196 |
+
|
197 |
+
case 'item_name_mismatch' :
|
198 |
+
|
199 |
+
$message = sprintf(
|
200 |
+
__( 'This appears to be an invalid license key for %s.', 'ampforwp-extension-updater' ),
|
201 |
+
$item_name
|
202 |
+
);
|
203 |
+
break;
|
204 |
+
|
205 |
+
case 'no_activations_left':
|
206 |
+
|
207 |
+
$message = __( 'Your license key has reached its activation limit.', 'ampforwp-extension-updater' );
|
208 |
+
break;
|
209 |
+
|
210 |
+
default :
|
211 |
+
|
212 |
+
$message = __( 'An error occurred, please try again.', 'ampforwp-extension-updater' );
|
213 |
+
break;
|
214 |
+
}
|
215 |
+
|
216 |
+
}
|
217 |
+
|
218 |
+
}//else Closed
|
219 |
+
// Check if anything passed on a message constituting a failure
|
220 |
+
$status = false;
|
221 |
+
if ( ! empty( $message ) ) {
|
222 |
+
if(isset($license_data) && is_object($license_data)){
|
223 |
+
$status = $license_data->error;
|
224 |
+
}else{
|
225 |
+
$status = "An error occurred, Error type not found.";
|
226 |
+
}
|
227 |
+
}else{
|
228 |
+
$status = $license_data->license;
|
229 |
+
$limit = ampforwp_set_plugin_limit( true, $license_data, $ext_value);
|
230 |
+
$selectedOption['amp-license'][$ext_key]['limit'] = $limit;
|
231 |
+
$selectedOption['amp-license'][$ext_key]['all_data'] = json_decode($response,true);
|
232 |
+
}
|
233 |
+
|
234 |
+
// Set the license limit
|
235 |
+
// First parameter must be true to force an update (e.g. after upgrading)
|
236 |
+
|
237 |
+
|
238 |
+
// $license_data->license will be either "valid" or "invalid"
|
239 |
+
/*update_option( 'amp_ads_license_status', $license_data->license );
|
240 |
+
wp_redirect( admin_url( 'edit.php?post_type=tracked-plugin&page=' . AMP_ADS_LICENSE_PAGE ) );
|
241 |
+
exit();*/
|
242 |
+
|
243 |
+
$selectedOption['amp-license'][$ext_key]['status'] = $status;
|
244 |
+
$selectedOption['amp-license'][$ext_key]['message'] = $message;
|
245 |
+
|
246 |
+
}
|
247 |
+
update_option( 'redux_builder_amp', $selectedOption );
|
248 |
+
|
249 |
+
//wp_redirect( admin_url( '?page=amp_options&tab=2' ) );
|
250 |
+
|
251 |
+
}
|
252 |
|
253 |
|
254 |
+
|
255 |
+
}
|
256 |
+
add_action( 'redux/options/redux_builder_amp/saved', 'ampForWP_extension_activate_license');
|
257 |
+
|
258 |
/***********************************************
|
259 |
* Illustrates how to deactivate a license key.
|
260 |
* This will decrease the site count
|
includes/vendor/amp/back-compat/templates-v0-3/meta-author.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php $post_author = $this->get( 'post_author' ); ?>
|
2 |
<li class="amp-wp-byline">
|
3 |
<?php if ( function_exists( 'get_avatar_url' ) ) : ?>
|
4 |
-
<amp-img
|
5 |
'size' => 24,
|
6 |
) ) ); ?>" width="24" height="24" layout="fixed"></amp-img>
|
7 |
<?php endif; ?>
|
1 |
<?php $post_author = $this->get( 'post_author' ); ?>
|
2 |
<li class="amp-wp-byline">
|
3 |
<?php if ( function_exists( 'get_avatar_url' ) ) : ?>
|
4 |
+
<amp-img data-block-on-consent src="<?php echo esc_url( get_avatar_url( $post_author->user_email, array(
|
5 |
'size' => 24,
|
6 |
) ) ); ?>" width="24" height="24" layout="fixed"></amp-img>
|
7 |
<?php endif; ?>
|
includes/vendor/amp/includes/class-amp-content.php
CHANGED
@@ -104,25 +104,24 @@ class AMP_Content_Sanitizer {
|
|
104 |
$scripts = array();
|
105 |
$styles = array();
|
106 |
$dom = AMP_DOM_Utils::get_dom_from_content( $content );
|
107 |
-
if ( ! empty($sanitizer_classes) ) {
|
108 |
-
foreach ( $sanitizer_classes as $sanitizer_class => $args ) {
|
109 |
-
if ( ! class_exists( $sanitizer_class ) ) {
|
110 |
-
_doing_it_wrong( __METHOD__, sprintf( esc_html__( 'Sanitizer (%s) class does not exist', 'amp' ), esc_html( $sanitizer_class ) ), '0.4.1' );
|
111 |
-
continue;
|
112 |
-
}
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
}
|
120 |
|
121 |
-
|
122 |
|
123 |
-
|
124 |
-
|
|
|
125 |
}
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
|
128 |
$sanitized_content = AMP_DOM_Utils::get_content_from_dom( $dom );
|
104 |
$scripts = array();
|
105 |
$styles = array();
|
106 |
$dom = AMP_DOM_Utils::get_dom_from_content( $content );
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
+
foreach ( $sanitizer_classes as $sanitizer_class => $args ) {
|
109 |
+
if ( ! class_exists( $sanitizer_class ) ) {
|
110 |
+
_doing_it_wrong( __METHOD__, sprintf( esc_html__( 'Sanitizer (%s) class does not exist', 'amp' ), esc_html( $sanitizer_class ) ), '0.4.1' );
|
111 |
+
continue;
|
112 |
+
}
|
|
|
113 |
|
114 |
+
$sanitizer = new $sanitizer_class( $dom, array_merge( $global_args, $args ) );
|
115 |
|
116 |
+
if ( ! is_subclass_of( $sanitizer, 'AMP_Base_Sanitizer' ) ) {
|
117 |
+
_doing_it_wrong( __METHOD__, sprintf( esc_html__( 'Sanitizer (%s) must extend `AMP_Base_Sanitizer`', 'amp' ), esc_html( $sanitizer_class ) ), '0.1' );
|
118 |
+
continue;
|
119 |
}
|
120 |
+
|
121 |
+
$sanitizer->sanitize();
|
122 |
+
|
123 |
+
$scripts = array_merge( $scripts, $sanitizer->get_scripts() );
|
124 |
+
$styles = array_merge( $styles, $sanitizer->get_styles() );
|
125 |
}
|
126 |
|
127 |
$sanitized_content = AMP_DOM_Utils::get_content_from_dom( $dom );
|
includes/vendor/amp/includes/class-amp-post-template.php
CHANGED
@@ -15,10 +15,6 @@ require_once( AMP__DIR__ . '/includes/sanitizers/class-amp-iframe-sanitizer.php'
|
|
15 |
require_once( AMP__DIR__ . '/includes/sanitizers/class-amp-audio-sanitizer.php' );
|
16 |
require_once( AMP__DIR__ . '/includes/sanitizers/class-amp-playbuzz-sanitizer.php' );
|
17 |
|
18 |
-
require_once( AMP__DIR__ . '/includes/sanitizers/class-amp-rule-spec.php' );
|
19 |
-
require_once( AMP__DIR__ . '/includes/sanitizers/class-amp-allowed-tags-generated.php' );
|
20 |
-
require_once( AMP__DIR__ . '/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php' );
|
21 |
-
|
22 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-twitter-embed.php' );
|
23 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-youtube-embed.php' );
|
24 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-dailymotion-embed.php' );
|
@@ -29,7 +25,6 @@ require_once( AMP__DIR__ . '/includes/embeds/class-amp-facebook-embed.php' );
|
|
29 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-vimeo-embed.php' );
|
30 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-soundcloud-embed.php' );
|
31 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-pinterest-embed.php' );
|
32 |
-
require_once( AMP__DIR__ . '/includes/embeds/class-amp-wistia-embed.php' );
|
33 |
|
34 |
class AMP_Post_Template {
|
35 |
const SITE_ICON_SIZE = 32;
|
@@ -268,7 +263,6 @@ class AMP_Post_Template {
|
|
268 |
'AMP_Facebook_Embed_Handler' => array(),
|
269 |
'AMP_Pinterest_Embed_Handler' => array(),
|
270 |
'AMP_Gallery_Embed_Handler' => array(),
|
271 |
-
'AMP_Wistia_Embed_Handler' => array(),
|
272 |
), $this->post ),
|
273 |
apply_filters( 'amp_content_sanitizers', array(
|
274 |
'AMP_Style_Sanitizer' => array(),
|
15 |
require_once( AMP__DIR__ . '/includes/sanitizers/class-amp-audio-sanitizer.php' );
|
16 |
require_once( AMP__DIR__ . '/includes/sanitizers/class-amp-playbuzz-sanitizer.php' );
|
17 |
|
|
|
|
|
|
|
|
|
18 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-twitter-embed.php' );
|
19 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-youtube-embed.php' );
|
20 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-dailymotion-embed.php' );
|
25 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-vimeo-embed.php' );
|
26 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-soundcloud-embed.php' );
|
27 |
require_once( AMP__DIR__ . '/includes/embeds/class-amp-pinterest-embed.php' );
|
|
|
28 |
|
29 |
class AMP_Post_Template {
|
30 |
const SITE_ICON_SIZE = 32;
|
263 |
'AMP_Facebook_Embed_Handler' => array(),
|
264 |
'AMP_Pinterest_Embed_Handler' => array(),
|
265 |
'AMP_Gallery_Embed_Handler' => array(),
|
|
|
266 |
), $this->post ),
|
267 |
apply_filters( 'amp_content_sanitizers', array(
|
268 |
'AMP_Style_Sanitizer' => array(),
|
includes/vendor/amp/includes/embeds/class-amp-dailymotion-embed.php
CHANGED
@@ -80,15 +80,16 @@ class AMP_DailyMotion_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
80 |
|
81 |
$this->did_convert_elements = true;
|
82 |
|
83 |
-
|
|
|
|
|
84 |
'data-videoid' => $args['video_id'],
|
85 |
'layout' => 'responsive',
|
86 |
'width' => $this->args['width'],
|
87 |
-
'height' => $this->args['height']
|
|
|
|
|
88 |
);
|
89 |
-
|
90 |
-
$attrs = ampforwp_amp_consent_check( $attrs );
|
91 |
-
return AMP_HTML_Utils::build_tag('amp-dailymotion', $attrs);
|
92 |
}
|
93 |
|
94 |
private function get_video_id_from_url( $url ) {
|
80 |
|
81 |
$this->did_convert_elements = true;
|
82 |
|
83 |
+
return AMP_HTML_Utils::build_tag(
|
84 |
+
'amp-dailymotion',
|
85 |
+
array(
|
86 |
'data-videoid' => $args['video_id'],
|
87 |
'layout' => 'responsive',
|
88 |
'width' => $this->args['width'],
|
89 |
+
'height' => $this->args['height'],
|
90 |
+
'data-block-on-consent' => '',
|
91 |
+
)
|
92 |
);
|
|
|
|
|
|
|
93 |
}
|
94 |
|
95 |
private function get_video_id_from_url( $url ) {
|
includes/vendor/amp/includes/embeds/class-amp-facebook-embed.php
CHANGED
@@ -41,14 +41,16 @@ class AMP_Facebook_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
41 |
}
|
42 |
|
43 |
$this->did_convert_elements = true;
|
44 |
-
|
|
|
|
|
|
|
45 |
'data-href' => $args['url'],
|
46 |
'layout' => 'responsive',
|
47 |
'width' => $this->args['width'],
|
48 |
'height' => $this->args['height'],
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
return AMP_HTML_Utils::build_tag('amp-facebook',$attrs);
|
53 |
}
|
54 |
}
|
41 |
}
|
42 |
|
43 |
$this->did_convert_elements = true;
|
44 |
+
|
45 |
+
return AMP_HTML_Utils::build_tag(
|
46 |
+
'amp-facebook',
|
47 |
+
array(
|
48 |
'data-href' => $args['url'],
|
49 |
'layout' => 'responsive',
|
50 |
'width' => $this->args['width'],
|
51 |
'height' => $this->args['height'],
|
52 |
+
'data-block-on-consent' => '',
|
53 |
+
)
|
54 |
+
);
|
|
|
55 |
}
|
56 |
}
|
includes/vendor/amp/includes/embeds/class-amp-instagram-embed.php
CHANGED
@@ -66,15 +66,18 @@ class AMP_Instagram_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
66 |
}
|
67 |
|
68 |
$this->did_convert_elements = true;
|
69 |
-
|
|
|
|
|
|
|
70 |
'data-shortcode' => $args['instagram_id'],
|
71 |
'layout' => 'responsive',
|
72 |
'width' => $this->args['width'],
|
73 |
'height' => $this->args['height'],
|
74 |
'data-captioned' => '',
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
}
|
79 |
|
80 |
private function get_instagram_id_from_url( $url ) {
|
66 |
}
|
67 |
|
68 |
$this->did_convert_elements = true;
|
69 |
+
|
70 |
+
return AMP_HTML_Utils::build_tag(
|
71 |
+
'amp-instagram',
|
72 |
+
array(
|
73 |
'data-shortcode' => $args['instagram_id'],
|
74 |
'layout' => 'responsive',
|
75 |
'width' => $this->args['width'],
|
76 |
'height' => $this->args['height'],
|
77 |
'data-captioned' => '',
|
78 |
+
'data-block-on-consent' => '',
|
79 |
+
)
|
80 |
+
);
|
81 |
}
|
82 |
|
83 |
private function get_instagram_id_from_url( $url ) {
|
includes/vendor/amp/includes/embeds/class-amp-pinterest-embed.php
CHANGED
@@ -46,14 +46,17 @@ class AMP_Pinterest_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
46 |
}
|
47 |
|
48 |
$this->did_convert_elements = true;
|
49 |
-
|
|
|
|
|
|
|
50 |
'width' => $this->args['width'],
|
51 |
'height' => $this->args['height'],
|
52 |
'data-do' => "embedPin",
|
53 |
'data-url' => $args['url'],
|
54 |
'layout' => 'responsive',
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
}
|
59 |
}
|
46 |
}
|
47 |
|
48 |
$this->did_convert_elements = true;
|
49 |
+
|
50 |
+
return AMP_HTML_Utils::build_tag(
|
51 |
+
'amp-pinterest',
|
52 |
+
array(
|
53 |
'width' => $this->args['width'],
|
54 |
'height' => $this->args['height'],
|
55 |
'data-do' => "embedPin",
|
56 |
'data-url' => $args['url'],
|
57 |
'layout' => 'responsive',
|
58 |
+
'data-block-on-consent' => '',
|
59 |
+
)
|
60 |
+
);
|
61 |
}
|
62 |
}
|
includes/vendor/amp/includes/embeds/class-amp-soundcloud-embed.php
CHANGED
@@ -74,13 +74,16 @@ class AMP_SoundCloud_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
74 |
}
|
75 |
|
76 |
$this->did_convert_elements = true;
|
77 |
-
|
|
|
|
|
|
|
78 |
'data-trackid' => $args['track_id'],
|
79 |
'layout' => 'fixed-height',
|
80 |
'height' => $this->args['height'],
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
}
|
85 |
|
86 |
private function get_track_id_from_url( $url ) {
|
74 |
}
|
75 |
|
76 |
$this->did_convert_elements = true;
|
77 |
+
|
78 |
+
return AMP_HTML_Utils::build_tag(
|
79 |
+
'amp-soundcloud',
|
80 |
+
array(
|
81 |
'data-trackid' => $args['track_id'],
|
82 |
'layout' => 'fixed-height',
|
83 |
'height' => $this->args['height'],
|
84 |
+
'data-block-on-consent' => '',
|
85 |
+
)
|
86 |
+
);
|
87 |
}
|
88 |
|
89 |
private function get_track_id_from_url( $url ) {
|
includes/vendor/amp/includes/embeds/class-amp-twitter-embed.php
CHANGED
@@ -51,14 +51,17 @@ class AMP_Twitter_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
51 |
}
|
52 |
|
53 |
$this->did_convert_elements = true;
|
54 |
-
|
|
|
|
|
|
|
55 |
'data-tweetid' => $id,
|
56 |
'layout' => 'responsive',
|
57 |
'width' => $this->args['width'],
|
58 |
'height' => $this->args['height'],
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
}
|
63 |
|
64 |
function oembed( $matches, $attr, $url, $rawattr ) {
|
51 |
}
|
52 |
|
53 |
$this->did_convert_elements = true;
|
54 |
+
|
55 |
+
return AMP_HTML_Utils::build_tag(
|
56 |
+
'amp-twitter',
|
57 |
+
array(
|
58 |
'data-tweetid' => $id,
|
59 |
'layout' => 'responsive',
|
60 |
'width' => $this->args['width'],
|
61 |
'height' => $this->args['height'],
|
62 |
+
'data-block-on-consent' => '',
|
63 |
+
)
|
64 |
+
);
|
65 |
}
|
66 |
|
67 |
function oembed( $matches, $attr, $url, $rawattr ) {
|
includes/vendor/amp/includes/embeds/class-amp-vimeo-embed.php
CHANGED
@@ -83,15 +83,17 @@ class AMP_Vimeo_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
83 |
}
|
84 |
|
85 |
$this->did_convert_elements = true;
|
86 |
-
|
|
|
|
|
|
|
87 |
'data-videoid' => $args['video_id'],
|
88 |
'layout' => 'responsive',
|
89 |
'width' => $this->args['width'],
|
90 |
'height' => $this->args['height'],
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
return AMP_HTML_Utils::build_tag('amp-vimeo', $attrs);
|
95 |
}
|
96 |
|
97 |
// get_video_id_from_url()
|
83 |
}
|
84 |
|
85 |
$this->did_convert_elements = true;
|
86 |
+
|
87 |
+
return AMP_HTML_Utils::build_tag(
|
88 |
+
'amp-vimeo',
|
89 |
+
array(
|
90 |
'data-videoid' => $args['video_id'],
|
91 |
'layout' => 'responsive',
|
92 |
'width' => $this->args['width'],
|
93 |
'height' => $this->args['height'],
|
94 |
+
'data-block-on-consent' => '',
|
95 |
+
)
|
96 |
+
);
|
|
|
97 |
}
|
98 |
|
99 |
// get_video_id_from_url()
|
includes/vendor/amp/includes/embeds/class-amp-vine-embed.php
CHANGED
@@ -42,13 +42,16 @@ class AMP_Vine_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
42 |
}
|
43 |
|
44 |
$this->did_convert_elements = true;
|
45 |
-
|
|
|
|
|
|
|
46 |
'data-vineid' => $args['vine_id'],
|
47 |
'layout' => 'responsive',
|
48 |
'width' => $this->args['width'],
|
49 |
'height' => $this->args['height'],
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
}
|
54 |
}
|
42 |
}
|
43 |
|
44 |
$this->did_convert_elements = true;
|
45 |
+
|
46 |
+
return AMP_HTML_Utils::build_tag(
|
47 |
+
'amp-vine',
|
48 |
+
array(
|
49 |
'data-vineid' => $args['vine_id'],
|
50 |
'layout' => 'responsive',
|
51 |
'width' => $this->args['width'],
|
52 |
'height' => $this->args['height'],
|
53 |
+
'data-block-on-consent' => '',
|
54 |
+
)
|
55 |
+
);
|
56 |
}
|
57 |
}
|
includes/vendor/amp/includes/embeds/class-amp-wistia-embed.php
DELETED
@@ -1,103 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( AMP__DIR__ . '/includes/embeds/class-amp-base-embed-handler.php' );
|
4 |
-
|
5 |
-
class AMP_Wistia_Embed_Handler extends AMP_Base_Embed_Handler {
|
6 |
-
const SHORT_URL_HOST = 'wistia.com';
|
7 |
-
const URL_PATTERN = '#https?:\/\/(?:www|support|fast)\.wistia\.com/(?:v/|embed/|medias/)(?:medias/)?#i';
|
8 |
-
const RATIO = 0.5625;
|
9 |
-
|
10 |
-
protected $DEFAULT_WIDTH = 512;
|
11 |
-
protected $DEFAULT_HEIGHT = 360;
|
12 |
-
|
13 |
-
private static $script_slug = 'amp-wistia-player';
|
14 |
-
private static $script_src = 'https://cdn.ampproject.org/v0/amp-wistia-player-0.1.js';
|
15 |
-
|
16 |
-
function __construct( $args = array() ) {
|
17 |
-
parent::__construct( $args );
|
18 |
-
|
19 |
-
if ( isset( $this->args['content_max_width'] ) ) {
|
20 |
-
$max_width = $this->args['content_max_width'];
|
21 |
-
$this->args['width'] = $max_width;
|
22 |
-
$this->args['height'] = round( $max_width * self::RATIO );
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
function register_embed() {
|
27 |
-
wp_embed_register_handler( 'amp-wistia-player', self::URL_PATTERN, array( $this, 'oembed' ), -1 );
|
28 |
-
add_shortcode( 'wistia', array( $this, 'shortcode' ) );
|
29 |
-
}
|
30 |
-
|
31 |
-
public function unregister_embed() {
|
32 |
-
wp_embed_unregister_handler( 'amp-wistia-player', -1 );
|
33 |
-
remove_shortcode( 'wistia' );
|
34 |
-
}
|
35 |
-
|
36 |
-
public function get_scripts() {
|
37 |
-
if ( ! $this->did_convert_elements ) {
|
38 |
-
return array();
|
39 |
-
}
|
40 |
-
|
41 |
-
return array( self::$script_slug => self::$script_src );
|
42 |
-
}
|
43 |
-
|
44 |
-
public function shortcode( $attr ) {
|
45 |
-
$url = false;
|
46 |
-
$video_id = false;
|
47 |
-
if ( isset( $attr[0] ) ) {
|
48 |
-
$url = ltrim( $attr[0] , '=' );
|
49 |
-
} elseif ( function_exists( 'shortcode_new_to_old_params' ) ) {
|
50 |
-
$url = shortcode_new_to_old_params( $attr );
|
51 |
-
}
|
52 |
-
|
53 |
-
if ( empty( $url ) ) {
|
54 |
-
return '';
|
55 |
-
}
|
56 |
-
|
57 |
-
$video_id = $this->get_video_id_from_url( $url );
|
58 |
-
|
59 |
-
return $this->render( array(
|
60 |
-
'url' => $url,
|
61 |
-
'video_id' => $video_id,
|
62 |
-
) );
|
63 |
-
}
|
64 |
-
|
65 |
-
public function oembed( $matches, $attr, $url, $rawattr ) {
|
66 |
-
return $this->shortcode( array( $url ) );
|
67 |
-
}
|
68 |
-
|
69 |
-
public function render( $args ) {
|
70 |
-
$args = wp_parse_args( $args, array(
|
71 |
-
'video_id' => false,
|
72 |
-
) );
|
73 |
-
|
74 |
-
if ( empty( $args['video_id'] ) ) {
|
75 |
-
return AMP_HTML_Utils::build_tag( 'a', array( 'href' => esc_url( $args['url'] ), 'class' => 'amp-wp-embed-fallback' ), esc_html( $args['url'] ) );
|
76 |
-
}
|
77 |
-
|
78 |
-
$this->did_convert_elements = true;
|
79 |
-
$attrs = array(
|
80 |
-
'data-media-hashed-id' => $args['video_id'],
|
81 |
-
'width' => $this->args['width'],
|
82 |
-
'height' => $this->args['height'],
|
83 |
-
'layout' => 'responsive',
|
84 |
-
);
|
85 |
-
$attrs = ampforwp_amp_consent_check($attrs);
|
86 |
-
return AMP_HTML_Utils::build_tag(
|
87 |
-
'amp-wistia-player',$attrs);
|
88 |
-
}
|
89 |
-
|
90 |
-
private function get_video_id_from_url( $url ) {
|
91 |
-
$video_id = false;
|
92 |
-
$parsed_url = parse_url( $url );
|
93 |
-
|
94 |
-
if ( self::SHORT_URL_HOST === substr( $parsed_url['host'], -strlen( self::SHORT_URL_HOST ) ) ) {
|
95 |
-
$parts = explode( '/', $parsed_url['path'] );
|
96 |
-
if ( ! empty( $parts ) ) {
|
97 |
-
$video_id = end($parts);
|
98 |
-
}
|
99 |
-
}
|
100 |
-
|
101 |
-
return $video_id;
|
102 |
-
}
|
103 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/vendor/amp/includes/embeds/class-amp-youtube-embed.php
CHANGED
@@ -78,15 +78,17 @@ class AMP_YouTube_Embed_Handler extends AMP_Base_Embed_Handler {
|
|
78 |
}
|
79 |
|
80 |
$this->did_convert_elements = true;
|
81 |
-
|
|
|
|
|
|
|
82 |
'data-videoid' => $args['video_id'],
|
83 |
'layout' => 'responsive',
|
84 |
'width' => $this->args['width'],
|
85 |
'height' => $this->args['height'],
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
'amp-youtube',$attrs);
|
90 |
}
|
91 |
|
92 |
private function get_video_id_from_url( $url ) {
|
78 |
}
|
79 |
|
80 |
$this->did_convert_elements = true;
|
81 |
+
|
82 |
+
return AMP_HTML_Utils::build_tag(
|
83 |
+
'amp-youtube',
|
84 |
+
array(
|
85 |
'data-videoid' => $args['video_id'],
|
86 |
'layout' => 'responsive',
|
87 |
'width' => $this->args['width'],
|
88 |
'height' => $this->args['height'],
|
89 |
+
'data-block-on-consent' => '',
|
90 |
+
)
|
91 |
+
);
|
|
|
92 |
}
|
93 |
|
94 |
private function get_video_id_from_url( $url ) {
|
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php
DELETED
@@ -1,10776 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Generated by amphtml-update.py - do not edit.
|
4 |
-
*
|
5 |
-
* This is a list of HTML tags and attributes that are allowed by the
|
6 |
-
* AMP specification. Note that tag names have been converted to lowercase.
|
7 |
-
*
|
8 |
-
* Note: This file only contains tags that are relevant to the `body` of
|
9 |
-
* an AMP page. To include additional elements modify the variable
|
10 |
-
* `mandatory_parent_blacklist` in the amp_wp_build.py script.
|
11 |
-
*
|
12 |
-
* phpcs:ignoreFile
|
13 |
-
*/
|
14 |
-
class AMP_Allowed_Tags_Generated {
|
15 |
-
|
16 |
-
private static $spec_file_revision = 595;
|
17 |
-
private static $minimum_validator_revision_required = 322;
|
18 |
-
|
19 |
-
private static $allowed_tags = array(
|
20 |
-
'a' => array(
|
21 |
-
array(
|
22 |
-
'attr_spec_list' => array(
|
23 |
-
'[href]' => array(),
|
24 |
-
'border' => array(),
|
25 |
-
'download' => array(),
|
26 |
-
'href' => array(
|
27 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
28 |
-
'value_url' => array(
|
29 |
-
'allow_empty' => true,
|
30 |
-
'allow_relative' => true,
|
31 |
-
'allowed_protocol' => array(
|
32 |
-
'ftp',
|
33 |
-
'geo',
|
34 |
-
'http',
|
35 |
-
'https',
|
36 |
-
'mailto',
|
37 |
-
'maps',
|
38 |
-
'bbmi',
|
39 |
-
'fb-messenger',
|
40 |
-
'intent',
|
41 |
-
'line',
|
42 |
-
'skype',
|
43 |
-
'sms',
|
44 |
-
'snapchat',
|
45 |
-
'tel',
|
46 |
-
'tg',
|
47 |
-
'threema',
|
48 |
-
'twitter',
|
49 |
-
'viber',
|
50 |
-
'whatsapp',
|
51 |
-
),
|
52 |
-
),
|
53 |
-
),
|
54 |
-
'hreflang' => array(),
|
55 |
-
'media' => array(),
|
56 |
-
'name' => array(),
|
57 |
-
'referrerpolicy' => array(),
|
58 |
-
'rel' => array(
|
59 |
-
'blacklisted_value_regex' => '(^|\\s)(components|dns-prefetch|import|manifest|preconnect|prefetch|preload|prerender|serviceworker|stylesheet|subresource|)(\\s|$)',
|
60 |
-
),
|
61 |
-
'role' => array(),
|
62 |
-
'tabindex' => array(),
|
63 |
-
'target' => array(
|
64 |
-
'value_regex' => '(_blank|_self|_top)',
|
65 |
-
),
|
66 |
-
'type' => array(
|
67 |
-
'value_casei' => 'text/html',
|
68 |
-
),
|
69 |
-
),
|
70 |
-
'tag_spec' => array(
|
71 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#links',
|
72 |
-
),
|
73 |
-
),
|
74 |
-
),
|
75 |
-
'abbr' => array(
|
76 |
-
array(
|
77 |
-
'attr_spec_list' => array(),
|
78 |
-
'tag_spec' => array(),
|
79 |
-
),
|
80 |
-
),
|
81 |
-
'acronym' => array(
|
82 |
-
array(
|
83 |
-
'attr_spec_list' => array(),
|
84 |
-
'tag_spec' => array(),
|
85 |
-
),
|
86 |
-
),
|
87 |
-
'address' => array(
|
88 |
-
array(
|
89 |
-
'attr_spec_list' => array(),
|
90 |
-
'tag_spec' => array(),
|
91 |
-
),
|
92 |
-
),
|
93 |
-
'amp-3q-player' => array(
|
94 |
-
array(
|
95 |
-
'attr_spec_list' => array(
|
96 |
-
'autoplay' => array(
|
97 |
-
'value' => '',
|
98 |
-
),
|
99 |
-
'data-id' => array(
|
100 |
-
'mandatory' => true,
|
101 |
-
),
|
102 |
-
'media' => array(),
|
103 |
-
'noloading' => array(
|
104 |
-
'value' => '',
|
105 |
-
),
|
106 |
-
),
|
107 |
-
'tag_spec' => array(
|
108 |
-
'requires_extension' => array(
|
109 |
-
'amp-3q-player',
|
110 |
-
),
|
111 |
-
),
|
112 |
-
),
|
113 |
-
),
|
114 |
-
'amp-accordion' => array(
|
115 |
-
array(
|
116 |
-
'attr_spec_list' => array(
|
117 |
-
'disable-session-states' => array(
|
118 |
-
'value' => '',
|
119 |
-
),
|
120 |
-
'expand-single-section' => array(
|
121 |
-
'value' => '',
|
122 |
-
),
|
123 |
-
),
|
124 |
-
'tag_spec' => array(
|
125 |
-
'requires_extension' => array(
|
126 |
-
'amp-accordion',
|
127 |
-
),
|
128 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-accordion',
|
129 |
-
),
|
130 |
-
),
|
131 |
-
),
|
132 |
-
'amp-ad' => array(
|
133 |
-
array(
|
134 |
-
'attr_spec_list' => array(
|
135 |
-
'alt' => array(),
|
136 |
-
'json' => array(),
|
137 |
-
'media' => array(),
|
138 |
-
'noloading' => array(
|
139 |
-
'value' => '',
|
140 |
-
),
|
141 |
-
'rtc-config' => array(),
|
142 |
-
'src' => array(
|
143 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
144 |
-
'value_url' => array(
|
145 |
-
'allow_relative' => true,
|
146 |
-
'allowed_protocol' => array(
|
147 |
-
'https',
|
148 |
-
),
|
149 |
-
),
|
150 |
-
),
|
151 |
-
'template' => array(),
|
152 |
-
'type' => array(
|
153 |
-
'mandatory' => true,
|
154 |
-
),
|
155 |
-
),
|
156 |
-
'tag_spec' => array(
|
157 |
-
'also_requires_tag_warning' => array(
|
158 |
-
'amp-ad extension .js script',
|
159 |
-
),
|
160 |
-
'disallowed_ancestor' => array(
|
161 |
-
'amp-app-banner',
|
162 |
-
),
|
163 |
-
'requires_extension' => array(
|
164 |
-
'amp-ad',
|
165 |
-
),
|
166 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-ad',
|
167 |
-
),
|
168 |
-
),
|
169 |
-
array(
|
170 |
-
'attr_spec_list' => array(
|
171 |
-
'alt' => array(),
|
172 |
-
'data-multi-size' => array(
|
173 |
-
'dispatch_key' => 2,
|
174 |
-
'mandatory' => true,
|
175 |
-
'value' => '',
|
176 |
-
),
|
177 |
-
'json' => array(),
|
178 |
-
'media' => array(),
|
179 |
-
'noloading' => array(
|
180 |
-
'value' => '',
|
181 |
-
),
|
182 |
-
'rtc-config' => array(),
|
183 |
-
'src' => array(
|
184 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
185 |
-
'value_url' => array(
|
186 |
-
'allow_relative' => true,
|
187 |
-
'allowed_protocol' => array(
|
188 |
-
'https',
|
189 |
-
),
|
190 |
-
),
|
191 |
-
),
|
192 |
-
'type' => array(
|
193 |
-
'mandatory' => true,
|
194 |
-
),
|
195 |
-
),
|
196 |
-
'tag_spec' => array(
|
197 |
-
'also_requires_tag_warning' => array(
|
198 |
-
'amp-ad extension .js script',
|
199 |
-
),
|
200 |
-
'disallowed_ancestor' => array(
|
201 |
-
'amp-app-banner',
|
202 |
-
'amp-carousel',
|
203 |
-
'amp-fx-flying-carpet',
|
204 |
-
'amp-lightbox',
|
205 |
-
'amp-sticky-ad',
|
206 |
-
),
|
207 |
-
'requires_extension' => array(
|
208 |
-
'amp-ad',
|
209 |
-
),
|
210 |
-
'spec_name' => 'amp-ad with data-multi-size attribute',
|
211 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-ad',
|
212 |
-
),
|
213 |
-
),
|
214 |
-
array(
|
215 |
-
'attr_spec_list' => array(
|
216 |
-
'alt' => array(),
|
217 |
-
'data-enable-refresh' => array(
|
218 |
-
'dispatch_key' => 2,
|
219 |
-
'mandatory' => true,
|
220 |
-
'value' => '',
|
221 |
-
),
|
222 |
-
'json' => array(),
|
223 |
-
'media' => array(),
|
224 |
-
'noloading' => array(
|
225 |
-
'value' => '',
|
226 |
-
),
|
227 |
-
'src' => array(
|
228 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
229 |
-
'value_url' => array(
|
230 |
-
'allow_relative' => true,
|
231 |
-
'allowed_protocol' => array(
|
232 |
-
'https',
|
233 |
-
),
|
234 |
-
),
|
235 |
-
),
|
236 |
-
'type' => array(
|
237 |
-
'mandatory' => true,
|
238 |
-
),
|
239 |
-
),
|
240 |
-
'tag_spec' => array(
|
241 |
-
'also_requires_tag_warning' => array(
|
242 |
-
'amp-ad extension .js script',
|
243 |
-
),
|
244 |
-
'disallowed_ancestor' => array(
|
245 |
-
'amp-app-banner',
|
246 |
-
'amp-fx-flying-carpet',
|
247 |
-
'amp-lightbox',
|
248 |
-
),
|
249 |
-
'requires_extension' => array(
|
250 |
-
'amp-ad',
|
251 |
-
),
|
252 |
-
'spec_name' => 'amp-ad with data-enable-refresh attribute',
|
253 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-ad',
|
254 |
-
),
|
255 |
-
),
|
256 |
-
),
|
257 |
-
'amp-analytics' => array(
|
258 |
-
array(
|
259 |
-
'attr_spec_list' => array(
|
260 |
-
'config' => array(
|
261 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
262 |
-
'value_url' => array(
|
263 |
-
'allow_empty' => true,
|
264 |
-
'allow_relative' => true,
|
265 |
-
'allowed_protocol' => array(
|
266 |
-
'https',
|
267 |
-
),
|
268 |
-
),
|
269 |
-
),
|
270 |
-
'type' => array(),
|
271 |
-
),
|
272 |
-
'tag_spec' => array(
|
273 |
-
'requires_extension' => array(
|
274 |
-
'amp-analytics',
|
275 |
-
),
|
276 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-analytics',
|
277 |
-
),
|
278 |
-
),
|
279 |
-
),
|
280 |
-
'amp-anim' => array(
|
281 |
-
array(
|
282 |
-
'attr_spec_list' => array(
|
283 |
-
'alt' => array(),
|
284 |
-
'attribution' => array(),
|
285 |
-
'controls' => array(),
|
286 |
-
'media' => array(),
|
287 |
-
'noloading' => array(
|
288 |
-
'value' => '',
|
289 |
-
),
|
290 |
-
'src' => array(
|
291 |
-
'alternative_names' => array(
|
292 |
-
'srcset',
|
293 |
-
),
|
294 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
295 |
-
'mandatory' => true,
|
296 |
-
'value_url' => array(
|
297 |
-
'allow_relative' => true,
|
298 |
-
'allowed_protocol' => array(
|
299 |
-
'data',
|
300 |
-
'http',
|
301 |
-
'https',
|
302 |
-
),
|
303 |
-
),
|
304 |
-
),
|
305 |
-
),
|
306 |
-
'tag_spec' => array(
|
307 |
-
'requires_extension' => array(
|
308 |
-
'amp-anim',
|
309 |
-
),
|
310 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-anim',
|
311 |
-
),
|
312 |
-
),
|
313 |
-
),
|
314 |
-
'amp-animation' => array(
|
315 |
-
array(
|
316 |
-
'attr_spec_list' => array(
|
317 |
-
'media' => array(),
|
318 |
-
'noloading' => array(
|
319 |
-
'value' => '',
|
320 |
-
),
|
321 |
-
'trigger' => array(
|
322 |
-
'value' => 'visibility',
|
323 |
-
),
|
324 |
-
),
|
325 |
-
'tag_spec' => array(
|
326 |
-
'requires_extension' => array(
|
327 |
-
'amp-animation',
|
328 |
-
),
|
329 |
-
),
|
330 |
-
),
|
331 |
-
),
|
332 |
-
'amp-apester-media' => array(
|
333 |
-
array(
|
334 |
-
'attr_spec_list' => array(
|
335 |
-
'data-apester-channel-token' => array(
|
336 |
-
'value_regex' => '[0-9a-zA-Z]+',
|
337 |
-
),
|
338 |
-
'data-apester-media-id' => array(
|
339 |
-
'value_regex' => '[0-9a-zA-Z]+',
|
340 |
-
),
|
341 |
-
'media' => array(),
|
342 |
-
'noloading' => array(
|
343 |
-
'value' => '',
|
344 |
-
),
|
345 |
-
),
|
346 |
-
'tag_spec' => array(
|
347 |
-
'requires_extension' => array(
|
348 |
-
'amp-apester-media',
|
349 |
-
),
|
350 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-apester-media',
|
351 |
-
),
|
352 |
-
),
|
353 |
-
),
|
354 |
-
'amp-app-banner' => array(
|
355 |
-
array(
|
356 |
-
'attr_spec_list' => array(
|
357 |
-
'id' => array(
|
358 |
-
'mandatory' => true,
|
359 |
-
),
|
360 |
-
'media' => array(),
|
361 |
-
'noloading' => array(
|
362 |
-
'value' => '',
|
363 |
-
),
|
364 |
-
),
|
365 |
-
'tag_spec' => array(
|
366 |
-
'mandatory_parent' => 'body',
|
367 |
-
'requires_extension' => array(
|
368 |
-
'amp-app-banner',
|
369 |
-
),
|
370 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-app-banner',
|
371 |
-
'unique' => true,
|
372 |
-
),
|
373 |
-
),
|
374 |
-
),
|
375 |
-
'amp-audio' => array(
|
376 |
-
array(
|
377 |
-
'attr_spec_list' => array(
|
378 |
-
'album' => array(),
|
379 |
-
'artist' => array(),
|
380 |
-
'artwork' => array(),
|
381 |
-
'autoplay' => array(
|
382 |
-
'value' => '',
|
383 |
-
),
|
384 |
-
'controls' => array(),
|
385 |
-
'controlslist' => array(),
|
386 |
-
'loop' => array(
|
387 |
-
'value' => '',
|
388 |
-
),
|
389 |
-
'media' => array(),
|
390 |
-
'muted' => array(
|
391 |
-
'value' => '',
|
392 |
-
),
|
393 |
-
'noloading' => array(
|
394 |
-
'value' => '',
|
395 |
-
),
|
396 |
-
'preload' => array(
|
397 |
-
'value_regex_casei' => '(auto|metadata|none|)',
|
398 |
-
),
|
399 |
-
'src' => array(
|
400 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
401 |
-
'value_url' => array(
|
402 |
-
'allow_relative' => true,
|
403 |
-
'allowed_protocol' => array(
|
404 |
-
'https',
|
405 |
-
),
|
406 |
-
),
|
407 |
-
),
|
408 |
-
),
|
409 |
-
'tag_spec' => array(
|
410 |
-
'disallowed_ancestor' => array(
|
411 |
-
'amp-story',
|
412 |
-
),
|
413 |
-
'requires_extension' => array(
|
414 |
-
'amp-audio',
|
415 |
-
),
|
416 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-audio',
|
417 |
-
),
|
418 |
-
),
|
419 |
-
array(
|
420 |
-
'attr_spec_list' => array(
|
421 |
-
'album' => array(),
|
422 |
-
'artist' => array(),
|
423 |
-
'artwork' => array(),
|
424 |
-
'autoplay' => array(
|
425 |
-
'mandatory' => true,
|
426 |
-
'value' => '',
|
427 |
-
),
|
428 |
-
'controls' => array(),
|
429 |
-
'controlslist' => array(),
|
430 |
-
'loop' => array(
|
431 |
-
'value' => '',
|
432 |
-
),
|
433 |
-
'media' => array(),
|
434 |
-
'muted' => array(
|
435 |
-
'value' => '',
|
436 |
-
),
|
437 |
-
'noloading' => array(
|
438 |
-
'value' => '',
|
439 |
-
),
|
440 |
-
'src' => array(
|
441 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
442 |
-
'value_url' => array(
|
443 |
-
'allow_relative' => true,
|
444 |
-
'allowed_protocol' => array(
|
445 |
-
'https',
|
446 |
-
),
|
447 |
-
),
|
448 |
-
),
|
449 |
-
),
|
450 |
-
'tag_spec' => array(
|
451 |
-
'mandatory_ancestor' => 'amp-story',
|
452 |
-
'requires_extension' => array(
|
453 |
-
'amp-audio',
|
454 |
-
),
|
455 |
-
'spec_name' => 'amp-story >> amp-audio',
|
456 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-audio',
|
457 |
-
),
|
458 |
-
),
|
459 |
-
),
|
460 |
-
'amp-auto-ads' => array(
|
461 |
-
array(
|
462 |
-
'attr_spec_list' => array(
|
463 |
-
'media' => array(),
|
464 |
-
'noloading' => array(
|
465 |
-
'value' => '',
|
466 |
-
),
|
467 |
-
'type' => array(
|
468 |
-
'mandatory' => true,
|
469 |
-
),
|
470 |
-
),
|
471 |
-
'tag_spec' => array(
|
472 |
-
'mandatory_parent' => 'body',
|
473 |
-
'requires_extension' => array(
|
474 |
-
'amp-auto-ads',
|
475 |
-
),
|
476 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-auto-ads',
|
477 |
-
),
|
478 |
-
),
|
479 |
-
),
|
480 |
-
'amp-beopinion' => array(
|
481 |
-
array(
|
482 |
-
'attr_spec_list' => array(
|
483 |
-
'data-account' => array(
|
484 |
-
'mandatory' => true,
|
485 |
-
'value_regex_casei' => '[0-9a-f]{24}',
|
486 |
-
),
|
487 |
-
'data-content' => array(
|
488 |
-
'value_regex_casei' => '[0-9a-f]{24}',
|
489 |
-
),
|
490 |
-
'data-my-content' => array(
|
491 |
-
'value_regex' => '0|1',
|
492 |
-
),
|
493 |
-
'data-name' => array(),
|
494 |
-
'media' => array(),
|
495 |
-
'noloading' => array(
|
496 |
-
'value' => '',
|
497 |
-
),
|
498 |
-
),
|
499 |
-
'tag_spec' => array(
|
500 |
-
'requires_extension' => array(
|
501 |
-
'amp-beopinion',
|
502 |
-
),
|
503 |
-
),
|
504 |
-
),
|
505 |
-
),
|
506 |
-
'amp-bind-macro' => array(
|
507 |
-
array(
|
508 |
-
'attr_spec_list' => array(
|
509 |
-
'arguments' => array(),
|
510 |
-
'expression' => array(
|
511 |
-
'mandatory' => true,
|
512 |
-
),
|
513 |
-
'id' => array(
|
514 |
-
'mandatory' => true,
|
515 |
-
),
|
516 |
-
),
|
517 |
-
'tag_spec' => array(
|
518 |
-
'requires_extension' => array(
|
519 |
-
'amp-bind',
|
520 |
-
),
|
521 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-bind',
|
522 |
-
),
|
523 |
-
),
|
524 |
-
),
|
525 |
-
'amp-bodymovin-animation' => array(
|
526 |
-
array(
|
527 |
-
'attr_spec_list' => array(
|
528 |
-
'loop' => array(
|
529 |
-
'value_regex_casei' => '(false|number|true)',
|
530 |
-
),
|
531 |
-
'noautoplay' => array(
|
532 |
-
'value' => '',
|
533 |
-
),
|
534 |
-
'src' => array(
|
535 |
-
'mandatory' => true,
|
536 |
-
'value_url' => array(
|
537 |
-
'allow_relative' => false,
|
538 |
-
'allowed_protocol' => array(
|
539 |
-
'https',
|
540 |
-
),
|
541 |
-
),
|
542 |
-
),
|
543 |
-
),
|
544 |
-
'tag_spec' => array(
|
545 |
-
'requires_extension' => array(
|
546 |
-
'amp-bodymovin-animation',
|
547 |
-
),
|
548 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-bodymovin-animation',
|
549 |
-
),
|
550 |
-
),
|
551 |
-
),
|
552 |
-
'amp-brid-player' => array(
|
553 |
-
array(
|
554 |
-
'attr_spec_list' => array(
|
555 |
-
'autoplay' => array(),
|
556 |
-
'data-outstream' => array(
|
557 |
-
'value_regex' => '[0-9]+',
|
558 |
-
),
|
559 |
-
'data-partner' => array(
|
560 |
-
'mandatory' => true,
|
561 |
-
'value_regex' => '[0-9]+',
|
562 |
-
),
|
563 |
-
'data-player' => array(
|
564 |
-
'mandatory' => true,
|
565 |
-
'value_regex' => '[0-9]+',
|
566 |
-
),
|
567 |
-
'data-playlist' => array(
|
568 |
-
'value_regex' => '[0-9]+',
|
569 |
-
),
|
570 |
-
'data-video' => array(
|
571 |
-
'value_regex' => '[0-9]+',
|
572 |
-
),
|
573 |
-
'media' => array(),
|
574 |
-
'noloading' => array(
|
575 |
-
'value' => '',
|
576 |
-
),
|
577 |
-
),
|
578 |
-
'tag_spec' => array(
|
579 |
-
'requires_extension' => array(
|
580 |
-
'amp-brid-player',
|
581 |
-
),
|
582 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-brid-player',
|
583 |
-
),
|
584 |
-
),
|
585 |
-
),
|
586 |
-
'amp-brightcove' => array(
|
587 |
-
array(
|
588 |
-
'attr_spec_list' => array(
|
589 |
-
'[data-account]' => array(),
|
590 |
-
'[data-embed]' => array(),
|
591 |
-
'[data-player-id]' => array(),
|
592 |
-
'[data-player]' => array(),
|
593 |
-
'[data-playlist-id]' => array(),
|
594 |
-
'[data-video-id]' => array(),
|
595 |
-
'data-account' => array(
|
596 |
-
'mandatory' => true,
|
597 |
-
),
|
598 |
-
'media' => array(),
|
599 |
-
'noloading' => array(
|
600 |
-
'value' => '',
|
601 |
-
),
|
602 |
-
),
|
603 |
-
'tag_spec' => array(
|
604 |
-
'requires_extension' => array(
|
605 |
-
'amp-brightcove',
|
606 |
-
),
|
607 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-brightcove',
|
608 |
-
),
|
609 |
-
),
|
610 |
-
),
|
611 |
-
'amp-byside-content' => array(
|
612 |
-
array(
|
613 |
-
'attr_spec_list' => array(
|
614 |
-
'data-label' => array(
|
615 |
-
'mandatory' => true,
|
616 |
-
),
|
617 |
-
'data-webcare-id' => array(
|
618 |
-
'mandatory' => true,
|
619 |
-
),
|
620 |
-
'media' => array(),
|
621 |
-
'noloading' => array(
|
622 |
-
'value' => '',
|
623 |
-
),
|
624 |
-
),
|
625 |
-
'tag_spec' => array(
|
626 |
-
'requires_extension' => array(
|
627 |
-
'amp-byside-content',
|
628 |
-
),
|
629 |
-
),
|
630 |
-
),
|
631 |
-
),
|
632 |
-
'amp-call-tracking' => array(
|
633 |
-
array(
|
634 |
-
'attr_spec_list' => array(
|
635 |
-
'config' => array(
|
636 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
637 |
-
'mandatory' => true,
|
638 |
-
'value_url' => array(
|
639 |
-
'allow_relative' => false,
|
640 |
-
'allowed_protocol' => array(
|
641 |
-
'https',
|
642 |
-
),
|
643 |
-
),
|
644 |
-
),
|
645 |
-
'media' => array(),
|
646 |
-
'noloading' => array(
|
647 |
-
'value' => '',
|
648 |
-
),
|
649 |
-
),
|
650 |
-
'tag_spec' => array(
|
651 |
-
'requires_extension' => array(
|
652 |
-
'amp-call-tracking',
|
653 |
-
),
|
654 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-call-tracking',
|
655 |
-
),
|
656 |
-
),
|
657 |
-
),
|
658 |
-
'amp-carousel' => array(
|
659 |
-
array(
|
660 |
-
'attr_spec_list' => array(
|
661 |
-
'[slide]' => array(),
|
662 |
-
'arrows' => array(
|
663 |
-
'value' => '',
|
664 |
-
),
|
665 |
-
'autoplay' => array(
|
666 |
-
'value' => '',
|
667 |
-
),
|
668 |
-
'controls' => array(),
|
669 |
-
'delay' => array(
|
670 |
-
'value_regex' => '[0-9]+',
|
671 |
-
),
|
672 |
-
'dots' => array(
|
673 |
-
'value' => '',
|
674 |
-
),
|
675 |
-
'lightbox' => array(),
|
676 |
-
'lightbox-exclude' => array(
|
677 |
-
'value' => '',
|
678 |
-
),
|
679 |
-
'lightbox-thumbnail-id' => array(
|
680 |
-
'value_regex_casei' => '^[a-z][a-z\\d_-]*',
|
681 |
-
),
|
682 |
-
'loop' => array(
|
683 |
-
'value' => '',
|
684 |
-
),
|
685 |
-
'media' => array(),
|
686 |
-
'noloading' => array(
|
687 |
-
'value' => '',
|
688 |
-
),
|
689 |
-
'type' => array(
|
690 |
-
'value_regex' => 'slides|carousel',
|
691 |
-
),
|
692 |
-
),
|
693 |
-
'tag_spec' => array(
|
694 |
-
'requires_extension' => array(
|
695 |
-
'amp-carousel',
|
696 |
-
),
|
697 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-carousel',
|
698 |
-
),
|
699 |
-
),
|
700 |
-
),
|
701 |
-
'amp-consent' => array(
|
702 |
-
array(
|
703 |
-
'attr_spec_list' => array(
|
704 |
-
'media' => array(),
|
705 |
-
'noloading' => array(
|
706 |
-
'value' => '',
|
707 |
-
),
|
708 |
-
),
|
709 |
-
'tag_spec' => array(
|
710 |
-
'requires_extension' => array(
|
711 |
-
'amp-consent',
|
712 |
-
),
|
713 |
-
'unique' => true,
|
714 |
-
),
|
715 |
-
),
|
716 |
-
),
|
717 |
-
'amp-dailymotion' => array(
|
718 |
-
array(
|
719 |
-
'attr_spec_list' => array(
|
720 |
-
'autoplay' => array(),
|
721 |
-
'data-endscreen-enable' => array(
|
722 |
-
'value_regex' => 'true|false',
|
723 |
-
),
|
724 |
-
'data-info' => array(
|
725 |
-
'value_regex' => 'true|false',
|
726 |
-
),
|
727 |
-
'data-mute' => array(
|
728 |
-
'value_regex' => 'true|false',
|
729 |
-
),
|
730 |
-
'data-sharing-enable' => array(
|
731 |
-
'value_regex' => 'true|false',
|
732 |
-
),
|
733 |
-
'data-start' => array(
|
734 |
-
'value_regex' => '[0-9]+',
|
735 |
-
),
|
736 |
-
'data-ui-highlight' => array(
|
737 |
-
'value_regex_casei' => '([0-9a-f]{3}){1,2}',
|
738 |
-
),
|
739 |
-
'data-ui-logo' => array(
|
740 |
-
'value_regex' => 'true|false',
|
741 |
-
),
|
742 |
-
'data-videoid' => array(
|
743 |
-
'mandatory' => true,
|
744 |
-
'value_regex_casei' => '[a-z0-9]+',
|
745 |
-
),
|
746 |
-
'media' => array(),
|
747 |
-
'noloading' => array(
|
748 |
-
'value' => '',
|
749 |
-
),
|
750 |
-
),
|
751 |
-
'tag_spec' => array(
|
752 |
-
'requires_extension' => array(
|
753 |
-
'amp-dailymotion',
|
754 |
-
),
|
755 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-dailymotion',
|
756 |
-
),
|
757 |
-
),
|
758 |
-
),
|
759 |
-
'amp-date-picker' => array(
|
760 |
-
array(
|
761 |
-
'attr_spec_list' => array(
|
762 |
-
'allow-blocked-ranges' => array(
|
763 |
-
'value' => '',
|
764 |
-
),
|
765 |
-
'blocked' => array(),
|
766 |
-
'day-size' => array(
|
767 |
-
'value_regex' => '[0-9]+',
|
768 |
-
),
|
769 |
-
'first-day-of-week' => array(
|
770 |
-
'value_regex' => '[0-6]',
|
771 |
-
),
|
772 |
-
'format' => array(),
|
773 |
-
'fullscreen' => array(
|
774 |
-
'value' => '',
|
775 |
-
),
|
776 |
-
'highlighted' => array(),
|
777 |
-
'input-selector' => array(),
|
778 |
-
'locale' => array(),
|
779 |
-
'max' => array(),
|
780 |
-
'media' => array(),
|
781 |
-
'min' => array(),
|
782 |
-
'mode' => array(
|
783 |
-
'value_casei' => 'static',
|
784 |
-
),
|
785 |
-
'month-format' => array(),
|
786 |
-
'noloading' => array(
|
787 |
-
'value' => '',
|
788 |
-
),
|
789 |
-
'number-of-months' => array(
|
790 |
-
'value_regex' => '[0-9]+',
|
791 |
-
),
|
792 |
-
'open-after-clear' => array(
|
793 |
-
'value' => '',
|
794 |
-
),
|
795 |
-
'open-after-select' => array(
|
796 |
-
'value' => '',
|
797 |
-
),
|
798 |
-
'src' => array(
|
799 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
800 |
-
'value_url' => array(
|
801 |
-
'allow_relative' => true,
|
802 |
-
'allowed_protocol' => array(
|
803 |
-
'https',
|
804 |
-
),
|
805 |
-
),
|
806 |
-
),
|
807 |
-
'type' => array(
|
808 |
-
'value_casei' => 'single',
|
809 |
-
),
|
810 |
-
'week-day-format' => array(),
|
811 |
-
),
|
812 |
-
'tag_spec' => array(
|
813 |
-
'requires_extension' => array(
|
814 |
-
'amp-date-picker',
|
815 |
-
),
|
816 |
-
'spec_name' => 'amp-date-picker[type=single][mode=static]',
|
817 |
-
),
|
818 |
-
),
|
819 |
-
array(
|
820 |
-
'attr_spec_list' => array(
|
821 |
-
'allow-blocked-ranges' => array(
|
822 |
-
'value' => '',
|
823 |
-
),
|
824 |
-
'blocked' => array(),
|
825 |
-
'day-size' => array(
|
826 |
-
'value_regex' => '[0-9]+',
|
827 |
-
),
|
828 |
-
'first-day-of-week' => array(
|
829 |
-
'value_regex' => '[0-6]',
|
830 |
-
),
|
831 |
-
'format' => array(),
|
832 |
-
'highlighted' => array(),
|
833 |
-
'input-selector' => array(),
|
834 |
-
'locale' => array(),
|
835 |
-
'max' => array(),
|
836 |
-
'media' => array(),
|
837 |
-
'min' => array(),
|
838 |
-
'mode' => array(
|
839 |
-
'mandatory' => true,
|
840 |
-
'value_casei' => 'overlay',
|
841 |
-
),
|
842 |
-
'month-format' => array(),
|
843 |
-
'noloading' => array(
|
844 |
-
'value' => '',
|
845 |
-
),
|
846 |
-
'number-of-months' => array(
|
847 |
-
'value_regex' => '[0-9]+',
|
848 |
-
),
|
849 |
-
'open-after-clear' => array(
|
850 |
-
'value' => '',
|
851 |
-
),
|
852 |
-
'open-after-select' => array(
|
853 |
-
'value' => '',
|
854 |
-
),
|
855 |
-
'src' => array(
|
856 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
857 |
-
'value_url' => array(
|
858 |
-
'allow_relative' => true,
|
859 |
-
'allowed_protocol' => array(
|
860 |
-
'https',
|
861 |
-
),
|
862 |
-
),
|
863 |
-
),
|
864 |
-
'type' => array(
|
865 |
-
'value_casei' => 'single',
|
866 |
-
),
|
867 |
-
'week-day-format' => array(),
|
868 |
-
),
|
869 |
-
'tag_spec' => array(
|
870 |
-
'requires_extension' => array(
|
871 |
-
'amp-date-picker',
|
872 |
-
),
|
873 |
-
'spec_name' => 'amp-date-picker[type=single][mode=overlay]',
|
874 |
-
),
|
875 |
-
),
|
876 |
-
array(
|
877 |
-
'attr_spec_list' => array(
|
878 |
-
'allow-blocked-ranges' => array(
|
879 |
-
'value' => '',
|
880 |
-
),
|
881 |
-
'blocked' => array(),
|
882 |
-
'day-size' => array(
|
883 |
-
'value_regex' => '[0-9]+',
|
884 |
-
),
|
885 |
-
'end-input-selector' => array(),
|
886 |
-
'first-day-of-week' => array(
|
887 |
-
'value_regex' => '[0-6]',
|
888 |
-
),
|
889 |
-
'format' => array(),
|
890 |
-
'fullscreen' => array(
|
891 |
-
'value' => '',
|
892 |
-
),
|
893 |
-
'highlighted' => array(),
|
894 |
-
'locale' => array(),
|
895 |
-
'max' => array(),
|
896 |
-
'media' => array(),
|
897 |
-
'min' => array(),
|
898 |
-
'mode' => array(
|
899 |
-
'value_casei' => 'static',
|
900 |
-
),
|
901 |
-
'month-format' => array(),
|
902 |
-
'noloading' => array(
|
903 |
-
'value' => '',
|
904 |
-
),
|
905 |
-
'number-of-months' => array(
|
906 |
-
'value_regex' => '[0-9]+',
|
907 |
-
),
|
908 |
-
'open-after-clear' => array(
|
909 |
-
'value' => '',
|
910 |
-
),
|
911 |
-
'open-after-select' => array(
|
912 |
-
'value' => '',
|
913 |
-
),
|
914 |
-
'src' => array(
|
915 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
916 |
-
'value_url' => array(
|
917 |
-
'allow_relative' => true,
|
918 |
-
'allowed_protocol' => array(
|
919 |
-
'https',
|
920 |
-
),
|
921 |
-
),
|
922 |
-
),
|
923 |
-
'start-input-selector' => array(),
|
924 |
-
'type' => array(
|
925 |
-
'mandatory' => true,
|
926 |
-
'value_casei' => 'range',
|
927 |
-
),
|
928 |
-
'week-day-format' => array(),
|
929 |
-
),
|
930 |
-
'tag_spec' => array(
|
931 |
-
'requires_extension' => array(
|
932 |
-
'amp-date-picker',
|
933 |
-
),
|
934 |
-
'spec_name' => 'amp-date-picker[type=range][mode=static]',
|
935 |
-
),
|
936 |
-
),
|
937 |
-
array(
|
938 |
-
'attr_spec_list' => array(
|
939 |
-
'allow-blocked-ranges' => array(
|
940 |
-
'value' => '',
|
941 |
-
),
|
942 |
-
'blocked' => array(),
|
943 |
-
'day-size' => array(
|
944 |
-
'value_regex' => '[0-9]+',
|
945 |
-
),
|
946 |
-
'end-input-selector' => array(),
|
947 |
-
'first-day-of-week' => array(
|
948 |
-
'value_regex' => '[0-6]',
|
949 |
-
),
|
950 |
-
'format' => array(),
|
951 |
-
'highlighted' => array(),
|
952 |
-
'locale' => array(),
|
953 |
-
'max' => array(),
|
954 |
-
'media' => array(),
|
955 |
-
'min' => array(),
|
956 |
-
'mode' => array(
|
957 |
-
'mandatory' => true,
|
958 |
-
'value_casei' => 'overlay',
|
959 |
-
),
|
960 |
-
'month-format' => array(),
|
961 |
-
'noloading' => array(
|
962 |
-
'value' => '',
|
963 |
-
),
|
964 |
-
'number-of-months' => array(
|
965 |
-
'value_regex' => '[0-9]+',
|
966 |
-
),
|
967 |
-
'open-after-clear' => array(
|
968 |
-
'value' => '',
|
969 |
-
),
|
970 |
-
'open-after-select' => array(
|
971 |
-
'value' => '',
|
972 |
-
),
|
973 |
-
'src' => array(
|
974 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
975 |
-
'value_url' => array(
|
976 |
-
'allow_relative' => true,
|
977 |
-
'allowed_protocol' => array(
|
978 |
-
'https',
|
979 |
-
),
|
980 |
-
),
|
981 |
-
),
|
982 |
-
'start-input-selector' => array(),
|
983 |
-
'type' => array(
|
984 |
-
'mandatory' => true,
|
985 |
-
'value_casei' => 'range',
|
986 |
-
),
|
987 |
-
'week-day-format' => array(),
|
988 |
-
),
|
989 |
-
'tag_spec' => array(
|
990 |
-
'requires_extension' => array(
|
991 |
-
'amp-date-picker',
|
992 |
-
),
|
993 |
-
'spec_name' => 'amp-date-picker[type=range][mode=overlay]',
|
994 |
-
),
|
995 |
-
),
|
996 |
-
),
|
997 |
-
'amp-document-recommendations' => array(
|
998 |
-
array(
|
999 |
-
'attr_spec_list' => array(),
|
1000 |
-
'tag_spec' => array(
|
1001 |
-
'mandatory_parent' => 'body',
|
1002 |
-
'requires_extension' => array(
|
1003 |
-
'amp-document-recommendations',
|
1004 |
-
),
|
1005 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-document-recommendations',
|
1006 |
-
),
|
1007 |
-
),
|
1008 |
-
),
|
1009 |
-
'amp-embed' => array(
|
1010 |
-
array(
|
1011 |
-
'attr_spec_list' => array(
|
1012 |
-
'alt' => array(),
|
1013 |
-
'json' => array(),
|
1014 |
-
'media' => array(),
|
1015 |
-
'noloading' => array(
|
1016 |
-
'value' => '',
|
1017 |
-
),
|
1018 |
-
'rtc-config' => array(),
|
1019 |
-
'src' => array(
|
1020 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1021 |
-
'value_url' => array(
|
1022 |
-
'allow_relative' => true,
|
1023 |
-
'allowed_protocol' => array(
|
1024 |
-
'https',
|
1025 |
-
),
|
1026 |
-
),
|
1027 |
-
),
|
1028 |
-
'template' => array(),
|
1029 |
-
'type' => array(
|
1030 |
-
'mandatory' => true,
|
1031 |
-
),
|
1032 |
-
),
|
1033 |
-
'tag_spec' => array(
|
1034 |
-
'also_requires_tag_warning' => array(
|
1035 |
-
'amp-ad extension .js script',
|
1036 |
-
),
|
1037 |
-
'disallowed_ancestor' => array(
|
1038 |
-
'amp-app-banner',
|
1039 |
-
),
|
1040 |
-
'requires_extension' => array(
|
1041 |
-
'amp-ad',
|
1042 |
-
),
|
1043 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-ad',
|
1044 |
-
),
|
1045 |
-
),
|
1046 |
-
array(
|
1047 |
-
'attr_spec_list' => array(
|
1048 |
-
'alt' => array(),
|
1049 |
-
'data-multi-size' => array(
|
1050 |
-
'dispatch_key' => 2,
|
1051 |
-
'mandatory' => true,
|
1052 |
-
'value' => '',
|
1053 |
-
),
|
1054 |
-
'json' => array(),
|
1055 |
-
'media' => array(),
|
1056 |
-
'noloading' => array(
|
1057 |
-
'value' => '',
|
1058 |
-
),
|
1059 |
-
'rtc-config' => array(),
|
1060 |
-
'src' => array(
|
1061 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1062 |
-
'value_url' => array(
|
1063 |
-
'allow_relative' => true,
|
1064 |
-
'allowed_protocol' => array(
|
1065 |
-
'https',
|
1066 |
-
),
|
1067 |
-
),
|
1068 |
-
),
|
1069 |
-
'type' => array(
|
1070 |
-
'mandatory' => true,
|
1071 |
-
),
|
1072 |
-
),
|
1073 |
-
'tag_spec' => array(
|
1074 |
-
'also_requires_tag_warning' => array(
|
1075 |
-
'amp-ad extension .js script',
|
1076 |
-
),
|
1077 |
-
'disallowed_ancestor' => array(
|
1078 |
-
'amp-app-banner',
|
1079 |
-
'amp-carousel',
|
1080 |
-
'amp-fx-flying-carpet',
|
1081 |
-
'amp-lightbox',
|
1082 |
-
'amp-sticky-ad',
|
1083 |
-
),
|
1084 |
-
'requires_extension' => array(
|
1085 |
-
'amp-ad',
|
1086 |
-
),
|
1087 |
-
'spec_name' => 'amp-embed with data-multi-size attribute',
|
1088 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-ad',
|
1089 |
-
),
|
1090 |
-
),
|
1091 |
-
),
|
1092 |
-
'amp-experiment' => array(
|
1093 |
-
array(
|
1094 |
-
'attr_spec_list' => array(),
|
1095 |
-
'tag_spec' => array(
|
1096 |
-
'requires_extension' => array(
|
1097 |
-
'amp-experiment',
|
1098 |
-
),
|
1099 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-experiment',
|
1100 |
-
'unique' => true,
|
1101 |
-
),
|
1102 |
-
),
|
1103 |
-
),
|
1104 |
-
'amp-facebook' => array(
|
1105 |
-
array(
|
1106 |
-
'attr_spec_list' => array(
|
1107 |
-
'data-href' => array(
|
1108 |
-
'mandatory' => true,
|
1109 |
-
),
|
1110 |
-
'media' => array(),
|
1111 |
-
'noloading' => array(
|
1112 |
-
'value' => '',
|
1113 |
-
),
|
1114 |
-
),
|
1115 |
-
'tag_spec' => array(
|
1116 |
-
'requires_extension' => array(
|
1117 |
-
'amp-facebook',
|
1118 |
-
),
|
1119 |
-
),
|
1120 |
-
),
|
1121 |
-
),
|
1122 |
-
'amp-facebook-comments' => array(
|
1123 |
-
array(
|
1124 |
-
'attr_spec_list' => array(
|
1125 |
-
'data-href' => array(
|
1126 |
-
'mandatory' => true,
|
1127 |
-
),
|
1128 |
-
'media' => array(),
|
1129 |
-
'noloading' => array(
|
1130 |
-
'value' => '',
|
1131 |
-
),
|
1132 |
-
),
|
1133 |
-
'tag_spec' => array(
|
1134 |
-
'requires_extension' => array(
|
1135 |
-
'amp-facebook-comments',
|
1136 |
-
),
|
1137 |
-
),
|
1138 |
-
),
|
1139 |
-
),
|
1140 |
-
'amp-facebook-like' => array(
|
1141 |
-
array(
|
1142 |
-
'attr_spec_list' => array(
|
1143 |
-
'data-href' => array(
|
1144 |
-
'mandatory' => true,
|
1145 |
-
'value_url' => array(
|
1146 |
-
'allow_relative' => false,
|
1147 |
-
'allowed_protocol' => array(
|
1148 |
-
'http',
|
1149 |
-
'https',
|
1150 |
-
),
|
1151 |
-
),
|
1152 |
-
),
|
1153 |
-
'media' => array(),
|
1154 |
-
'noloading' => array(
|
1155 |
-
'value' => '',
|
1156 |
-
),
|
1157 |
-
),
|
1158 |
-
'tag_spec' => array(
|
1159 |
-
'requires_extension' => array(
|
1160 |
-
'amp-facebook-like',
|
1161 |
-
),
|
1162 |
-
),
|
1163 |
-
),
|
1164 |
-
),
|
1165 |
-
'amp-facebook-page' => array(
|
1166 |
-
array(
|
1167 |
-
'attr_spec_list' => array(
|
1168 |
-
'data-href' => array(
|
1169 |
-
'mandatory' => true,
|
1170 |
-
'value_url' => array(
|
1171 |
-
'allow_relative' => false,
|
1172 |
-
'allowed_protocol' => array(
|
1173 |
-
'http',
|
1174 |
-
'https',
|
1175 |
-
),
|
1176 |
-
),
|
1177 |
-
),
|
1178 |
-
'media' => array(),
|
1179 |
-
'noloading' => array(
|
1180 |
-
'value' => '',
|
1181 |
-
),
|
1182 |
-
),
|
1183 |
-
'tag_spec' => array(
|
1184 |
-
'requires_extension' => array(
|
1185 |
-
'amp-facebook-page',
|
1186 |
-
),
|
1187 |
-
),
|
1188 |
-
),
|
1189 |
-
),
|
1190 |
-
'amp-fit-text' => array(
|
1191 |
-
array(
|
1192 |
-
'attr_spec_list' => array(
|
1193 |
-
'max-font-size' => array(),
|
1194 |
-
'media' => array(),
|
1195 |
-
'min-font-size' => array(),
|
1196 |
-
'noloading' => array(
|
1197 |
-
'value' => '',
|
1198 |
-
),
|
1199 |
-
),
|
1200 |
-
'tag_spec' => array(
|
1201 |
-
'requires_extension' => array(
|
1202 |
-
'amp-fit-text',
|
1203 |
-
),
|
1204 |
-
),
|
1205 |
-
),
|
1206 |
-
),
|
1207 |
-
'amp-font' => array(
|
1208 |
-
array(
|
1209 |
-
'attr_spec_list' => array(
|
1210 |
-
'font-family' => array(
|
1211 |
-
'mandatory' => true,
|
1212 |
-
),
|
1213 |
-
'font-style' => array(),
|
1214 |
-
'font-variant' => array(),
|
1215 |
-
'font-weight' => array(),
|
1216 |
-
'media' => array(),
|
1217 |
-
'noloading' => array(
|
1218 |
-
'value' => '',
|
1219 |
-
),
|
1220 |
-
'on-error-add-class' => array(),
|
1221 |
-
'on-error-remove-class' => array(),
|
1222 |
-
'on-load-add-class' => array(),
|
1223 |
-
'on-load-remove-class' => array(),
|
1224 |
-
'timeout' => array(
|
1225 |
-
'value_regex' => '[0-9]+',
|
1226 |
-
),
|
1227 |
-
),
|
1228 |
-
'tag_spec' => array(
|
1229 |
-
'requires_extension' => array(
|
1230 |
-
'amp-font',
|
1231 |
-
),
|
1232 |
-
),
|
1233 |
-
),
|
1234 |
-
),
|
1235 |
-
'amp-fx-flying-carpet' => array(
|
1236 |
-
array(
|
1237 |
-
'attr_spec_list' => array(
|
1238 |
-
'height' => array(
|
1239 |
-
'mandatory' => true,
|
1240 |
-
),
|
1241 |
-
'media' => array(),
|
1242 |
-
'noloading' => array(
|
1243 |
-
'value' => '',
|
1244 |
-
),
|
1245 |
-
),
|
1246 |
-
'tag_spec' => array(
|
1247 |
-
'requires_extension' => array(
|
1248 |
-
'amp-fx-flying-carpet',
|
1249 |
-
),
|
1250 |
-
),
|
1251 |
-
),
|
1252 |
-
),
|
1253 |
-
'amp-gfycat' => array(
|
1254 |
-
array(
|
1255 |
-
'attr_spec_list' => array(
|
1256 |
-
'data-gfyid' => array(
|
1257 |
-
'mandatory' => true,
|
1258 |
-
),
|
1259 |
-
'media' => array(),
|
1260 |
-
'noautoplay' => array(
|
1261 |
-
'value' => '',
|
1262 |
-
),
|
1263 |
-
'noloading' => array(
|
1264 |
-
'value' => '',
|
1265 |
-
),
|
1266 |
-
),
|
1267 |
-
'tag_spec' => array(
|
1268 |
-
'requires_extension' => array(
|
1269 |
-
'amp-gfycat',
|
1270 |
-
),
|
1271 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-gfycat',
|
1272 |
-
),
|
1273 |
-
),
|
1274 |
-
),
|
1275 |
-
'amp-gist' => array(
|
1276 |
-
array(
|
1277 |
-
'attr_spec_list' => array(
|
1278 |
-
'data-gistid' => array(
|
1279 |
-
'mandatory' => true,
|
1280 |
-
),
|
1281 |
-
'media' => array(),
|
1282 |
-
'noloading' => array(
|
1283 |
-
'value' => '',
|
1284 |
-
),
|
1285 |
-
),
|
1286 |
-
'tag_spec' => array(
|
1287 |
-
'requires_extension' => array(
|
1288 |
-
'amp-gist',
|
1289 |
-
),
|
1290 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-gist',
|
1291 |
-
),
|
1292 |
-
),
|
1293 |
-
),
|
1294 |
-
'amp-hulu' => array(
|
1295 |
-
array(
|
1296 |
-
'attr_spec_list' => array(
|
1297 |
-
'data-eid' => array(
|
1298 |
-
'mandatory' => true,
|
1299 |
-
),
|
1300 |
-
'media' => array(),
|
1301 |
-
'noloading' => array(
|
1302 |
-
'value' => '',
|
1303 |
-
),
|
1304 |
-
),
|
1305 |
-
'tag_spec' => array(
|
1306 |
-
'requires_extension' => array(
|
1307 |
-
'amp-hulu',
|
1308 |
-
),
|
1309 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-hulu',
|
1310 |
-
),
|
1311 |
-
),
|
1312 |
-
),
|
1313 |
-
'amp-iframe' => array(
|
1314 |
-
array(
|
1315 |
-
'attr_spec_list' => array(
|
1316 |
-
'[src]' => array(),
|
1317 |
-
'allow' => array(),
|
1318 |
-
'allowfullscreen' => array(
|
1319 |
-
'value' => '',
|
1320 |
-
),
|
1321 |
-
'allowpaymentrequest' => array(
|
1322 |
-
'value' => '',
|
1323 |
-
),
|
1324 |
-
'allowtransparency' => array(
|
1325 |
-
'value' => '',
|
1326 |
-
),
|
1327 |
-
'frameborder' => array(
|
1328 |
-
'value_regex' => '0|1',
|
1329 |
-
),
|
1330 |
-
'media' => array(),
|
1331 |
-
'noloading' => array(
|
1332 |
-
'value' => '',
|
1333 |
-
),
|
1334 |
-
'referrerpolicy' => array(),
|
1335 |
-
'resizable' => array(
|
1336 |
-
'value' => '',
|
1337 |
-
),
|
1338 |
-
'sandbox' => array(),
|
1339 |
-
'scrolling' => array(
|
1340 |
-
'value_regex' => 'auto|yes|no',
|
1341 |
-
),
|
1342 |
-
'src' => array(
|
1343 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1344 |
-
'value_url' => array(
|
1345 |
-
'allow_relative' => true,
|
1346 |
-
'allowed_protocol' => array(
|
1347 |
-
'data',
|
1348 |
-
'https',
|
1349 |
-
),
|
1350 |
-
),
|
1351 |
-
),
|
1352 |
-
'srcdoc' => array(),
|
1353 |
-
),
|
1354 |
-
'tag_spec' => array(
|
1355 |
-
'requires_extension' => array(
|
1356 |
-
'amp-iframe',
|
1357 |
-
),
|
1358 |
-
),
|
1359 |
-
),
|
1360 |
-
),
|
1361 |
-
'amp-ima-video' => array(
|
1362 |
-
array(
|
1363 |
-
'attr_spec_list' => array(
|
1364 |
-
'autoplay' => array(
|
1365 |
-
'value' => '',
|
1366 |
-
),
|
1367 |
-
'data-src' => array(
|
1368 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1369 |
-
'value_url' => array(
|
1370 |
-
'allow_relative' => true,
|
1371 |
-
'allowed_protocol' => array(
|
1372 |
-
'https',
|
1373 |
-
),
|
1374 |
-
),
|
1375 |
-
),
|
1376 |
-
'data-tag' => array(
|
1377 |
-
'mandatory' => true,
|
1378 |
-
'value_url' => array(
|
1379 |
-
'allow_relative' => true,
|
1380 |
-
'allowed_protocol' => array(
|
1381 |
-
'https',
|
1382 |
-
),
|
1383 |
-
),
|
1384 |
-
),
|
1385 |
-
'media' => array(),
|
1386 |
-
'noloading' => array(
|
1387 |
-
'value' => '',
|
1388 |
-
),
|
1389 |
-
),
|
1390 |
-
'tag_spec' => array(
|
1391 |
-
'requires_extension' => array(
|
1392 |
-
'amp-ima-video',
|
1393 |
-
),
|
1394 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-ima-video',
|
1395 |
-
),
|
1396 |
-
),
|
1397 |
-
),
|
1398 |
-
'amp-image-lightbox' => array(
|
1399 |
-
array(
|
1400 |
-
'attr_spec_list' => array(
|
1401 |
-
'controls' => array(),
|
1402 |
-
'media' => array(),
|
1403 |
-
'noloading' => array(
|
1404 |
-
'value' => '',
|
1405 |
-
),
|
1406 |
-
),
|
1407 |
-
'tag_spec' => array(
|
1408 |
-
'requires_extension' => array(
|
1409 |
-
'amp-image-lightbox',
|
1410 |
-
),
|
1411 |
-
),
|
1412 |
-
),
|
1413 |
-
),
|
1414 |
-
'amp-img' => array(
|
1415 |
-
array(
|
1416 |
-
'attr_spec_list' => array(
|
1417 |
-
'[alt]' => array(),
|
1418 |
-
'[attribution]' => array(),
|
1419 |
-
'[src]' => array(),
|
1420 |
-
'[srcset]' => array(),
|
1421 |
-
'alt' => array(),
|
1422 |
-
'attribution' => array(),
|
1423 |
-
'lightbox' => array(),
|
1424 |
-
'lightbox-exclude' => array(
|
1425 |
-
'value' => '',
|
1426 |
-
),
|
1427 |
-
'lightbox-thumbnail-id' => array(
|
1428 |
-
'value_regex_casei' => '^[a-z][a-z\\d_-]*',
|
1429 |
-
),
|
1430 |
-
'media' => array(),
|
1431 |
-
'noloading' => array(
|
1432 |
-
'value' => '',
|
1433 |
-
),
|
1434 |
-
'placeholder' => array(),
|
1435 |
-
'src' => array(
|
1436 |
-
'alternative_names' => array(
|
1437 |
-
'srcset',
|
1438 |
-
),
|
1439 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1440 |
-
'mandatory' => true,
|
1441 |
-
'value_url' => array(
|
1442 |
-
'allow_relative' => true,
|
1443 |
-
'allowed_protocol' => array(
|
1444 |
-
'data',
|
1445 |
-
'http',
|
1446 |
-
'https',
|
1447 |
-
),
|
1448 |
-
),
|
1449 |
-
),
|
1450 |
-
),
|
1451 |
-
'tag_spec' => array(
|
1452 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-img',
|
1453 |
-
),
|
1454 |
-
),
|
1455 |
-
),
|
1456 |
-
'amp-imgur' => array(
|
1457 |
-
array(
|
1458 |
-
'attr_spec_list' => array(
|
1459 |
-
'data-imgur-id' => array(
|
1460 |
-
'mandatory' => true,
|
1461 |
-
),
|
1462 |
-
'media' => array(),
|
1463 |
-
'noloading' => array(
|
1464 |
-
'value' => '',
|
1465 |
-
),
|
1466 |
-
),
|
1467 |
-
'tag_spec' => array(
|
1468 |
-
'requires_extension' => array(
|
1469 |
-
'amp-imgur',
|
1470 |
-
),
|
1471 |
-
),
|
1472 |
-
),
|
1473 |
-
),
|
1474 |
-
'amp-instagram' => array(
|
1475 |
-
array(
|
1476 |
-
'attr_spec_list' => array(
|
1477 |
-
'alt' => array(),
|
1478 |
-
'data-shortcode' => array(
|
1479 |
-
'mandatory' => true,
|
1480 |
-
),
|
1481 |
-
'media' => array(),
|
1482 |
-
'noloading' => array(
|
1483 |
-
'value' => '',
|
1484 |
-
),
|
1485 |
-
),
|
1486 |
-
'tag_spec' => array(
|
1487 |
-
'requires_extension' => array(
|
1488 |
-
'amp-instagram',
|
1489 |
-
),
|
1490 |
-
),
|
1491 |
-
),
|
1492 |
-
),
|
1493 |
-
'amp-install-serviceworker' => array(
|
1494 |
-
array(
|
1495 |
-
'attr_spec_list' => array(
|
1496 |
-
'data-iframe-src' => array(
|
1497 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1498 |
-
'value_url' => array(
|
1499 |
-
'allow_relative' => true,
|
1500 |
-
'allowed_protocol' => array(
|
1501 |
-
'https',
|
1502 |
-
),
|
1503 |
-
),
|
1504 |
-
),
|
1505 |
-
'src' => array(
|
1506 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1507 |
-
'mandatory' => true,
|
1508 |
-
'value_url' => array(
|
1509 |
-
'allow_relative' => true,
|
1510 |
-
'allowed_protocol' => array(
|
1511 |
-
'https',
|
1512 |
-
),
|
1513 |
-
),
|
1514 |
-
),
|
1515 |
-
),
|
1516 |
-
'tag_spec' => array(
|
1517 |
-
'requires_extension' => array(
|
1518 |
-
'amp-install-serviceworker',
|
1519 |
-
),
|
1520 |
-
),
|
1521 |
-
),
|
1522 |
-
),
|
1523 |
-
'amp-izlesene' => array(
|
1524 |
-
array(
|
1525 |
-
'attr_spec_list' => array(
|
1526 |
-
'data-videoid' => array(
|
1527 |
-
'mandatory' => true,
|
1528 |
-
'value_regex' => '[0-9]+',
|
1529 |
-
),
|
1530 |
-
'media' => array(),
|
1531 |
-
'noloading' => array(
|
1532 |
-
'value' => '',
|
1533 |
-
),
|
1534 |
-
),
|
1535 |
-
'tag_spec' => array(
|
1536 |
-
'requires_extension' => array(
|
1537 |
-
'amp-izlesene',
|
1538 |
-
),
|
1539 |
-
),
|
1540 |
-
),
|
1541 |
-
),
|
1542 |
-
'amp-jwplayer' => array(
|
1543 |
-
array(
|
1544 |
-
'attr_spec_list' => array(
|
1545 |
-
'data-media-id' => array(
|
1546 |
-
'value_regex_casei' => '[0-9a-z]{8}',
|
1547 |
-
),
|
1548 |
-
'data-player-id' => array(
|
1549 |
-
'mandatory' => true,
|
1550 |
-
'value_regex_casei' => '[0-9a-z]{8}',
|
1551 |
-
),
|
1552 |
-
'data-playlist-id' => array(
|
1553 |
-
'value_regex_casei' => '[0-9a-z]{8}',
|
1554 |
-
),
|
1555 |
-
),
|
1556 |
-
'tag_spec' => array(
|
1557 |
-
'requires_extension' => array(
|
1558 |
-
'amp-jwplayer',
|
1559 |
-
),
|
1560 |
-
),
|
1561 |
-
),
|
1562 |
-
),
|
1563 |
-
'amp-kaltura-player' => array(
|
1564 |
-
array(
|
1565 |
-
'attr_spec_list' => array(
|
1566 |
-
'data-partner' => array(
|
1567 |
-
'mandatory' => true,
|
1568 |
-
),
|
1569 |
-
'media' => array(),
|
1570 |
-
'noloading' => array(
|
1571 |
-
'value' => '',
|
1572 |
-
),
|
1573 |
-
),
|
1574 |
-
'tag_spec' => array(
|
1575 |
-
'requires_extension' => array(
|
1576 |
-
'amp-kaltura-player',
|
1577 |
-
),
|
1578 |
-
),
|
1579 |
-
),
|
1580 |
-
),
|
1581 |
-
'amp-layout' => array(
|
1582 |
-
array(
|
1583 |
-
'attr_spec_list' => array(
|
1584 |
-
'media' => array(),
|
1585 |
-
'noloading' => array(
|
1586 |
-
'value' => '',
|
1587 |
-
),
|
1588 |
-
),
|
1589 |
-
'tag_spec' => array(
|
1590 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-layout',
|
1591 |
-
),
|
1592 |
-
),
|
1593 |
-
),
|
1594 |
-
'amp-lightbox' => array(
|
1595 |
-
array(
|
1596 |
-
'attr_spec_list' => array(
|
1597 |
-
'controls' => array(),
|
1598 |
-
'from' => array(),
|
1599 |
-
'media' => array(),
|
1600 |
-
'noloading' => array(
|
1601 |
-
'value' => '',
|
1602 |
-
),
|
1603 |
-
'scrollable' => array(),
|
1604 |
-
),
|
1605 |
-
'tag_spec' => array(
|
1606 |
-
'requires_extension' => array(
|
1607 |
-
'amp-lightbox',
|
1608 |
-
),
|
1609 |
-
),
|
1610 |
-
),
|
1611 |
-
),
|
1612 |
-
'amp-list' => array(
|
1613 |
-
array(
|
1614 |
-
'attr_spec_list' => array(
|
1615 |
-
'[src]' => array(),
|
1616 |
-
'[state]' => array(),
|
1617 |
-
'credentials' => array(),
|
1618 |
-
'items' => array(),
|
1619 |
-
'max-items' => array(),
|
1620 |
-
'media' => array(),
|
1621 |
-
'noloading' => array(
|
1622 |
-
'value' => '',
|
1623 |
-
),
|
1624 |
-
'reset-on-refresh' => array(
|
1625 |
-
'value' => '',
|
1626 |
-
),
|
1627 |
-
'single-item' => array(),
|
1628 |
-
'src' => array(
|
1629 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1630 |
-
'mandatory' => true,
|
1631 |
-
'value_url' => array(
|
1632 |
-
'allow_relative' => true,
|
1633 |
-
'allowed_protocol' => array(
|
1634 |
-
'https',
|
1635 |
-
),
|
1636 |
-
),
|
1637 |
-
),
|
1638 |
-
'template' => array(),
|
1639 |
-
),
|
1640 |
-
'tag_spec' => array(
|
1641 |
-
'requires_extension' => array(
|
1642 |
-
'amp-list',
|
1643 |
-
),
|
1644 |
-
),
|
1645 |
-
),
|
1646 |
-
array(
|
1647 |
-
'attr_spec_list' => array(
|
1648 |
-
'[src]' => array(
|
1649 |
-
'mandatory' => true,
|
1650 |
-
),
|
1651 |
-
'credentials' => array(),
|
1652 |
-
'items' => array(),
|
1653 |
-
'max-items' => array(),
|
1654 |
-
'media' => array(),
|
1655 |
-
'noloading' => array(
|
1656 |
-
'value' => '',
|
1657 |
-
),
|
1658 |
-
'single-item' => array(),
|
1659 |
-
'src' => array(
|
1660 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1661 |
-
'value_url' => array(
|
1662 |
-
'allow_relative' => true,
|
1663 |
-
'allowed_protocol' => array(
|
1664 |
-
'https',
|
1665 |
-
),
|
1666 |
-
),
|
1667 |
-
),
|
1668 |
-
'template' => array(),
|
1669 |
-
),
|
1670 |
-
'tag_spec' => array(
|
1671 |
-
'requires_extension' => array(
|
1672 |
-
'amp-list',
|
1673 |
-
),
|
1674 |
-
'spec_name' => 'AMP-LIST [SRC]',
|
1675 |
-
),
|
1676 |
-
),
|
1677 |
-
),
|
1678 |
-
'amp-live-list' => array(
|
1679 |
-
array(
|
1680 |
-
'attr_spec_list' => array(
|
1681 |
-
'data-max-items-per-page' => array(
|
1682 |
-
'mandatory' => true,
|
1683 |
-
'value_regex' => '\\d+',
|
1684 |
-
),
|
1685 |
-
'data-poll-interval' => array(
|
1686 |
-
'value_regex' => '\\d{5,}',
|
1687 |
-
),
|
1688 |
-
'disabled' => array(
|
1689 |
-
'value' => '',
|
1690 |
-
),
|
1691 |
-
'id' => array(
|
1692 |
-
'mandatory' => true,
|
1693 |
-
),
|
1694 |
-
'sort' => array(
|
1695 |
-
'value_regex' => 'ascending',
|
1696 |
-
),
|
1697 |
-
),
|
1698 |
-
'tag_spec' => array(
|
1699 |
-
'requires_extension' => array(
|
1700 |
-
'amp-live-list',
|
1701 |
-
),
|
1702 |
-
),
|
1703 |
-
),
|
1704 |
-
),
|
1705 |
-
'amp-mathml' => array(
|
1706 |
-
array(
|
1707 |
-
'attr_spec_list' => array(
|
1708 |
-
'data-formula' => array(
|
1709 |
-
'mandatory' => true,
|
1710 |
-
),
|
1711 |
-
'inline' => array(),
|
1712 |
-
'media' => array(),
|
1713 |
-
'noloading' => array(
|
1714 |
-
'value' => '',
|
1715 |
-
),
|
1716 |
-
),
|
1717 |
-
'tag_spec' => array(
|
1718 |
-
'requires_extension' => array(
|
1719 |
-
'amp-mathml',
|
1720 |
-
),
|
1721 |
-
),
|
1722 |
-
),
|
1723 |
-
),
|
1724 |
-
'amp-nexxtv-player' => array(
|
1725 |
-
array(
|
1726 |
-
'attr_spec_list' => array(
|
1727 |
-
'data-client' => array(
|
1728 |
-
'mandatory' => true,
|
1729 |
-
),
|
1730 |
-
'data-mediaid' => array(
|
1731 |
-
'mandatory' => true,
|
1732 |
-
'value_regex' => '[^=/?:]+',
|
1733 |
-
),
|
1734 |
-
'data-mode' => array(
|
1735 |
-
'value_regex' => 'api|static',
|
1736 |
-
),
|
1737 |
-
'data-origin' => array(
|
1738 |
-
'value_url' => array(
|
1739 |
-
'allow_empty' => true,
|
1740 |
-
'allowed_protocol' => array(
|
1741 |
-
'https',
|
1742 |
-
'http',
|
1743 |
-
),
|
1744 |
-
),
|
1745 |
-
),
|
1746 |
-
'data-streamtype' => array(
|
1747 |
-
'value_regex' => 'album|audio|live|playlist|playlist-marked|video',
|
1748 |
-
),
|
1749 |
-
'media' => array(),
|
1750 |
-
'noloading' => array(
|
1751 |
-
'value' => '',
|
1752 |
-
),
|
1753 |
-
),
|
1754 |
-
'tag_spec' => array(
|
1755 |
-
'requires_extension' => array(
|
1756 |
-
'amp-nexxtv-player',
|
1757 |
-
),
|
1758 |
-
),
|
1759 |
-
),
|
1760 |
-
),
|
1761 |
-
'amp-o2-player' => array(
|
1762 |
-
array(
|
1763 |
-
'attr_spec_list' => array(
|
1764 |
-
'data-bcid' => array(
|
1765 |
-
'mandatory' => true,
|
1766 |
-
),
|
1767 |
-
'data-pid' => array(
|
1768 |
-
'mandatory' => true,
|
1769 |
-
),
|
1770 |
-
'media' => array(),
|
1771 |
-
'noloading' => array(
|
1772 |
-
'value' => '',
|
1773 |
-
),
|
1774 |
-
),
|
1775 |
-
'tag_spec' => array(
|
1776 |
-
'requires_extension' => array(
|
1777 |
-
'amp-o2-player',
|
1778 |
-
),
|
1779 |
-
),
|
1780 |
-
),
|
1781 |
-
),
|
1782 |
-
'amp-ooyala-player' => array(
|
1783 |
-
array(
|
1784 |
-
'attr_spec_list' => array(
|
1785 |
-
'data-embedcode' => array(
|
1786 |
-
'mandatory' => true,
|
1787 |
-
),
|
1788 |
-
'data-pcode' => array(
|
1789 |
-
'mandatory' => true,
|
1790 |
-
),
|
1791 |
-
'data-playerid' => array(
|
1792 |
-
'mandatory' => true,
|
1793 |
-
),
|
1794 |
-
'media' => array(),
|
1795 |
-
'noloading' => array(
|
1796 |
-
'value' => '',
|
1797 |
-
),
|
1798 |
-
),
|
1799 |
-
'tag_spec' => array(
|
1800 |
-
'requires_extension' => array(
|
1801 |
-
'amp-ooyala-player',
|
1802 |
-
),
|
1803 |
-
),
|
1804 |
-
),
|
1805 |
-
),
|
1806 |
-
'amp-pinterest' => array(
|
1807 |
-
array(
|
1808 |
-
'attr_spec_list' => array(
|
1809 |
-
'alt' => array(),
|
1810 |
-
'data-do' => array(
|
1811 |
-
'mandatory' => true,
|
1812 |
-
),
|
1813 |
-
'media' => array(),
|
1814 |
-
'noloading' => array(
|
1815 |
-
'value' => '',
|
1816 |
-
),
|
1817 |
-
),
|
1818 |
-
'tag_spec' => array(
|
1819 |
-
'requires_extension' => array(
|
1820 |
-
'amp-pinterest',
|
1821 |
-
),
|
1822 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-pinterest',
|
1823 |
-
),
|
1824 |
-
),
|
1825 |
-
),
|
1826 |
-
'amp-pixel' => array(
|
1827 |
-
array(
|
1828 |
-
'attr_spec_list' => array(
|
1829 |
-
'allow-ssr-img' => array(),
|
1830 |
-
'media' => array(),
|
1831 |
-
'noloading' => array(
|
1832 |
-
'value' => '',
|
1833 |
-
),
|
1834 |
-
'referrerpolicy' => array(
|
1835 |
-
'value' => 'no-referrer',
|
1836 |
-
),
|
1837 |
-
'src' => array(
|
1838 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
1839 |
-
'mandatory' => true,
|
1840 |
-
'value_url' => array(
|
1841 |
-
'allow_empty' => true,
|
1842 |
-
'allow_relative' => true,
|
1843 |
-
'allowed_protocol' => array(
|
1844 |
-
'https',
|
1845 |
-
),
|
1846 |
-
),
|
1847 |
-
),
|
1848 |
-
),
|
1849 |
-
'tag_spec' => array(
|
1850 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-pixel',
|
1851 |
-
),
|
1852 |
-
),
|
1853 |
-
),
|
1854 |
-
'amp-playbuzz' => array(
|
1855 |
-
array(
|
1856 |
-
'attr_spec_list' => array(
|
1857 |
-
'data-comments' => array(
|
1858 |
-
'value_regex_casei' => '(false|true)',
|
1859 |
-
),
|
1860 |
-
'data-item' => array(),
|
1861 |
-
'data-item-info' => array(
|
1862 |
-
'value_regex_casei' => '(false|true)',
|
1863 |
-
),
|
1864 |
-
'data-share-buttons' => array(
|
1865 |
-
'value_regex_casei' => '(false|true)',
|
1866 |
-
),
|
1867 |
-
'media' => array(),
|
1868 |
-
'noloading' => array(
|
1869 |
-
'value' => '',
|
1870 |
-
),
|
1871 |
-
'src' => array(),
|
1872 |
-
),
|
1873 |
-
'tag_spec' => array(
|
1874 |
-
'requires_extension' => array(
|
1875 |
-
'amp-playbuzz',
|
1876 |
-
),
|
1877 |
-
),
|
1878 |
-
),
|
1879 |
-
),
|
1880 |
-
'amp-position-observer' => array(
|
1881 |
-
array(
|
1882 |
-
'attr_spec_list' => array(
|
1883 |
-
'intersection-ratios' => array(
|
1884 |
-
'value_regex' => '^([0]*?\\.\\d*$|1$|0$)|([0]*?\\.\\d*|1|0)\\s{1}([0]*?\\.\\d*$|1$|0$)',
|
1885 |
-
),
|
1886 |
-
'media' => array(),
|
1887 |
-
'noloading' => array(
|
1888 |
-
'value' => '',
|
1889 |
-
),
|
1890 |
-
'target' => array(),
|
1891 |
-
'viewport-margins' => array(
|
1892 |
-
'value_regex' => '^(\\d+$|\\d+px$|\\d+vh$)|((\\d+|\\d+px|\\d+vh)\\s{1}(\\d+$|\\d+px$|\\d+vh$))',
|
1893 |
-
),
|
1894 |
-
),
|
1895 |
-
'tag_spec' => array(
|
1896 |
-
'requires_extension' => array(
|
1897 |
-
'amp-position-observer',
|
1898 |
-
),
|
1899 |
-
),
|
1900 |
-
),
|
1901 |
-
),
|
1902 |
-
'amp-reach-player' => array(
|
1903 |
-
array(
|
1904 |
-
'attr_spec_list' => array(
|
1905 |
-
'data-embed-id' => array(
|
1906 |
-
'mandatory' => true,
|
1907 |
-
'value_regex' => '[0-9a-z-]+',
|
1908 |
-
),
|
1909 |
-
'media' => array(),
|
1910 |
-
'noloading' => array(
|
1911 |
-
'value' => '',
|
1912 |
-
),
|
1913 |
-
),
|
1914 |
-
'tag_spec' => array(
|
1915 |
-
'requires_extension' => array(
|
1916 |
-
'amp-reach-player',
|
1917 |
-
),
|
1918 |
-
),
|
1919 |
-
),
|
1920 |
-
),
|
1921 |
-
'amp-reddit' => array(
|
1922 |
-
array(
|
1923 |
-
'attr_spec_list' => array(
|
1924 |
-
'data-embedlive' => array(
|
1925 |
-
'value_regex_casei' => '(false|true)',
|
1926 |
-
),
|
1927 |
-
'data-embedparent' => array(
|
1928 |
-
'value_regex_casei' => '(false|true)',
|
1929 |
-
),
|
1930 |
-
'data-embedtype' => array(
|
1931 |
-
'mandatory' => true,
|
1932 |
-
'value_regex_casei' => '(comment|post)',
|
1933 |
-
),
|
1934 |
-
'data-src' => array(
|
1935 |
-
'mandatory' => true,
|
1936 |
-
),
|
1937 |
-
'media' => array(),
|
1938 |
-
'noloading' => array(
|
1939 |
-
'value' => '',
|
1940 |
-
),
|
1941 |
-
),
|
1942 |
-
'tag_spec' => array(
|
1943 |
-
'requires_extension' => array(
|
1944 |
-
'amp-reddit',
|
1945 |
-
),
|
1946 |
-
),
|
1947 |
-
),
|
1948 |
-
),
|
1949 |
-
'amp-riddle-quiz' => array(
|
1950 |
-
array(
|
1951 |
-
'attr_spec_list' => array(
|
1952 |
-
'data-riddle-id' => array(
|
1953 |
-
'mandatory' => true,
|
1954 |
-
'value_regex' => '[0-9]+',
|
1955 |
-
),
|
1956 |
-
'media' => array(),
|
1957 |
-
'noloading' => array(
|
1958 |
-
'value' => '',
|
1959 |
-
),
|
1960 |
-
),
|
1961 |
-
'tag_spec' => array(
|
1962 |
-
'requires_extension' => array(
|
1963 |
-
'amp-riddle-quiz',
|
1964 |
-
),
|
1965 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-riddle-quiz',
|
1966 |
-
),
|
1967 |
-
),
|
1968 |
-
),
|
1969 |
-
'amp-selector' => array(
|
1970 |
-
array(
|
1971 |
-
'attr_spec_list' => array(
|
1972 |
-
'[disabled]' => array(),
|
1973 |
-
'[selected]' => array(),
|
1974 |
-
'disabled' => array(
|
1975 |
-
'value' => '',
|
1976 |
-
),
|
1977 |
-
'form' => array(),
|
1978 |
-
'keyboard-select-mode' => array(
|
1979 |
-
'value_regex_casei' => 'focus|none|select',
|
1980 |
-
),
|
1981 |
-
'media' => array(),
|
1982 |
-
'multiple' => array(
|
1983 |
-
'value' => '',
|
1984 |
-
),
|
1985 |
-
'name' => array(
|
1986 |
-
'blacklisted_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|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|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|$)',
|
1987 |
-
),
|
1988 |
-
'noloading' => array(
|
1989 |
-
'value' => '',
|
1990 |
-
),
|
1991 |
-
),
|
1992 |
-
'tag_spec' => array(
|
1993 |
-
'disallowed_ancestor' => array(
|
1994 |
-
'amp-selector',
|
1995 |
-
),
|
1996 |
-
'requires_extension' => array(
|
1997 |
-
'amp-selector',
|
1998 |
-
),
|
1999 |
-
),
|
2000 |
-
),
|
2001 |
-
),
|
2002 |
-
'amp-sidebar' => array(
|
2003 |
-
array(
|
2004 |
-
'attr_spec_list' => array(
|
2005 |
-
'media' => array(),
|
2006 |
-
'noloading' => array(
|
2007 |
-
'value' => '',
|
2008 |
-
),
|
2009 |
-
'side' => array(
|
2010 |
-
'value_regex' => '(left|right)',
|
2011 |
-
),
|
2012 |
-
),
|
2013 |
-
'tag_spec' => array(
|
2014 |
-
'mandatory_parent' => 'body',
|
2015 |
-
'requires_extension' => array(
|
2016 |
-
'amp-sidebar',
|
2017 |
-
),
|
2018 |
-
),
|
2019 |
-
),
|
2020 |
-
),
|
2021 |
-
'amp-social-share' => array(
|
2022 |
-
array(
|
2023 |
-
'attr_spec_list' => array(
|
2024 |
-
'data-share-endpoint' => array(
|
2025 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
2026 |
-
'value_url' => array(
|
2027 |
-
'allow_relative' => false,
|
2028 |
-
'allowed_protocol' => array(
|
2029 |
-
'ftp',
|
2030 |
-
'http',
|
2031 |
-
'https',
|
2032 |
-
'mailto',
|
2033 |
-
'bbmi',
|
2034 |
-
'fb-messenger',
|
2035 |
-
'intent',
|
2036 |
-
'line',
|
2037 |
-
'skype',
|
2038 |
-
'sms',
|
2039 |
-
'snapchat',
|
2040 |
-
'tel',
|
2041 |
-
'tg',
|
2042 |
-
'threema',
|
2043 |
-
'viber',
|
2044 |
-
'whatsapp',
|
2045 |
-
),
|
2046 |
-
),
|
2047 |
-
),
|
2048 |
-
'media' => array(),
|
2049 |
-
'noloading' => array(
|
2050 |
-
'value' => '',
|
2051 |
-
),
|
2052 |
-
'type' => array(
|
2053 |
-
'mandatory' => true,
|
2054 |
-
),
|
2055 |
-
),
|
2056 |
-
'tag_spec' => array(
|
2057 |
-
'requires_extension' => array(
|
2058 |
-
'amp-social-share',
|
2059 |
-
),
|
2060 |
-
),
|
2061 |
-
),
|
2062 |
-
),
|
2063 |
-
'amp-soundcloud' => array(
|
2064 |
-
array(
|
2065 |
-
'attr_spec_list' => array(
|
2066 |
-
'data-color' => array(
|
2067 |
-
'value_regex_casei' => '([0-9a-f]{3}){1,2}',
|
2068 |
-
),
|
2069 |
-
'data-playlistid' => array(
|
2070 |
-
'value_regex' => '[0-9]+',
|
2071 |
-
),
|
2072 |
-
'data-secret-token' => array(
|
2073 |
-
'value_regex' => '[A-Za-z0-9_-]+',
|
2074 |
-
),
|
2075 |
-
'data-trackid' => array(
|
2076 |
-
'value_regex' => '[0-9]+',
|
2077 |
-
),
|
2078 |
-
'data-visual' => array(
|
2079 |
-
'value_regex' => 'true|false',
|
2080 |
-
),
|
2081 |
-
'media' => array(),
|
2082 |
-
'noloading' => array(
|
2083 |
-
'value' => '',
|
2084 |
-
),
|
2085 |
-
),
|
2086 |
-
'tag_spec' => array(
|
2087 |
-
'requires_extension' => array(
|
2088 |
-
'amp-soundcloud',
|
2089 |
-
),
|
2090 |
-
),
|
2091 |
-
),
|
2092 |
-
),
|
2093 |
-
'amp-springboard-player' => array(
|
2094 |
-
array(
|
2095 |
-
'attr_spec_list' => array(
|
2096 |
-
'data-content-id' => array(
|
2097 |
-
'mandatory' => true,
|
2098 |
-
),
|
2099 |
-
'data-domain' => array(
|
2100 |
-
'mandatory' => true,
|
2101 |
-
),
|
2102 |
-
'data-items' => array(
|
2103 |
-
'mandatory' => true,
|
2104 |
-
),
|
2105 |
-
'data-mode' => array(
|
2106 |
-
'mandatory' => true,
|
2107 |
-
'value_regex_casei' => 'playlist|video',
|
2108 |
-
),
|
2109 |
-
'data-player-id' => array(
|
2110 |
-
'mandatory' => true,
|
2111 |
-
'value_regex_casei' => '[a-z0-9]+',
|
2112 |
-
),
|
2113 |
-
'data-site-id' => array(
|
2114 |
-
'mandatory' => true,
|
2115 |
-
'value_regex' => '[0-9]+',
|
2116 |
-
),
|
2117 |
-
'media' => array(),
|
2118 |
-
'noloading' => array(
|
2119 |
-
'value' => '',
|
2120 |
-
),
|
2121 |
-
),
|
2122 |
-
'tag_spec' => array(
|
2123 |
-
'requires_extension' => array(
|
2124 |
-
'amp-springboard-player',
|
2125 |
-
),
|
2126 |
-
),
|
2127 |
-
),
|
2128 |
-
),
|
2129 |
-
'amp-state' => array(
|
2130 |
-
array(
|
2131 |
-
'attr_spec_list' => array(
|
2132 |
-
'[src]' => array(),
|
2133 |
-
'credentials' => array(),
|
2134 |
-
'id' => array(
|
2135 |
-
'mandatory' => true,
|
2136 |
-
),
|
2137 |
-
'overridable' => array(),
|
2138 |
-
'src' => array(
|
2139 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
2140 |
-
'value_url' => array(
|
2141 |
-
'allow_relative' => true,
|
2142 |
-
'allowed_protocol' => array(
|
2143 |
-
'https',
|
2144 |
-
),
|
2145 |
-
),
|
2146 |
-
),
|
2147 |
-
),
|
2148 |
-
'tag_spec' => array(
|
2149 |
-
'requires_extension' => array(
|
2150 |
-
'amp-bind',
|
2151 |
-
),
|
2152 |
-
'spec_name' => 'amp-state',
|
2153 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-bind',
|
2154 |
-
),
|
2155 |
-
),
|
2156 |
-
),
|
2157 |
-
'amp-sticky-ad' => array(
|
2158 |
-
array(
|
2159 |
-
'attr_spec_list' => array(
|
2160 |
-
'media' => array(),
|
2161 |
-
'noloading' => array(
|
2162 |
-
'value' => '',
|
2163 |
-
),
|
2164 |
-
),
|
2165 |
-
'tag_spec' => array(
|
2166 |
-
'disallowed_ancestor' => array(
|
2167 |
-
'amp-app-banner',
|
2168 |
-
),
|
2169 |
-
'requires_extension' => array(
|
2170 |
-
'amp-sticky-ad',
|
2171 |
-
),
|
2172 |
-
'unique' => true,
|
2173 |
-
),
|
2174 |
-
),
|
2175 |
-
),
|
2176 |
-
'amp-story' => array(
|
2177 |
-
array(
|
2178 |
-
'attr_spec_list' => array(
|
2179 |
-
'background-audio' => array(
|
2180 |
-
'value_url' => array(
|
2181 |
-
'allowed_protocol' => array(
|
2182 |
-
'http',
|
2183 |
-
'https',
|
2184 |
-
),
|
2185 |
-
),
|
2186 |
-
),
|
2187 |
-
'bookend-config-src' => array(
|
2188 |
-
'value_url' => array(
|
2189 |
-
'allowed_protocol' => array(
|
2190 |
-
'http',
|
2191 |
-
'https',
|
2192 |
-
),
|
2193 |
-
),
|
2194 |
-
),
|
2195 |
-
'standalone' => array(
|
2196 |
-
'mandatory' => true,
|
2197 |
-
'value' => '',
|
2198 |
-
),
|
2199 |
-
),
|
2200 |
-
'tag_spec' => array(
|
2201 |
-
'mandatory_parent' => 'body',
|
2202 |
-
'requires_extension' => array(
|
2203 |
-
'amp-story',
|
2204 |
-
),
|
2205 |
-
),
|
2206 |
-
),
|
2207 |
-
),
|
2208 |
-
'amp-story-auto-ads' => array(
|
2209 |
-
array(
|
2210 |
-
'attr_spec_list' => array(),
|
2211 |
-
'tag_spec' => array(
|
2212 |
-
'mandatory_parent' => 'amp-story',
|
2213 |
-
'requires_extension' => array(
|
2214 |
-
'amp-story-auto-ads',
|
2215 |
-
),
|
2216 |
-
'spec_url' => 'https://github.com/ampproject/amphtml/blob/master/extensions/amp-story/amp-story-auto-ads.md',
|
2217 |
-
'unique' => true,
|
2218 |
-
),
|
2219 |
-
),
|
2220 |
-
),
|
2221 |
-
'amp-story-cta-layer' => array(
|
2222 |
-
array(
|
2223 |
-
'attr_spec_list' => array(),
|
2224 |
-
'tag_spec' => array(
|
2225 |
-
'mandatory_ancestor' => 'amp-story-page',
|
2226 |
-
),
|
2227 |
-
),
|
2228 |
-
),
|
2229 |
-
'amp-story-grid-layer' => array(
|
2230 |
-
array(
|
2231 |
-
'attr_spec_list' => array(
|
2232 |
-
'template' => array(
|
2233 |
-
'mandatory' => true,
|
2234 |
-
'value_regex' => '(fill|horizontal|vertical|thirds)',
|
2235 |
-
),
|
2236 |
-
),
|
2237 |
-
'tag_spec' => array(
|
2238 |
-
'mandatory_ancestor' => 'amp-story-page',
|
2239 |
-
),
|
2240 |
-
),
|
2241 |
-
),
|
2242 |
-
'amp-story-page' => array(
|
2243 |
-
array(
|
2244 |
-
'attr_spec_list' => array(
|
2245 |
-
'auto-advance-after' => array(),
|
2246 |
-
'background-audio' => array(
|
2247 |
-
'value_url' => array(
|
2248 |
-
'allowed_protocol' => array(
|
2249 |
-
'http',
|
2250 |
-
'https',
|
2251 |
-
),
|
2252 |
-
),
|
2253 |
-
),
|
2254 |
-
'id' => array(
|
2255 |
-
'mandatory' => true,
|
2256 |
-
),
|
2257 |
-
),
|
2258 |
-
'tag_spec' => array(
|
2259 |
-
'mandatory_parent' => 'amp-story',
|
2260 |
-
'requires_extension' => array(
|
2261 |
-
'amp-story',
|
2262 |
-
),
|
2263 |
-
),
|
2264 |
-
),
|
2265 |
-
),
|
2266 |
-
'amp-timeago' => array(
|
2267 |
-
array(
|
2268 |
-
'attr_spec_list' => array(
|
2269 |
-
'cutoff' => array(
|
2270 |
-
'value_regex' => '\\d+',
|
2271 |
-
),
|
2272 |
-
'datetime' => array(
|
2273 |
-
'mandatory' => true,
|
2274 |
-
'value_regex' => '\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-][0-1][0-9]:[0-5][0-9])',
|
2275 |
-
),
|
2276 |
-
'locale' => array(),
|
2277 |
-
'media' => array(),
|
2278 |
-
'noloading' => array(
|
2279 |
-
'value' => '',
|
2280 |
-
),
|
2281 |
-
),
|
2282 |
-
'tag_spec' => array(
|
2283 |
-
'requires_extension' => array(
|
2284 |
-
'amp-timeago',
|
2285 |
-
),
|
2286 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-timeago',
|
2287 |
-
),
|
2288 |
-
),
|
2289 |
-
),
|
2290 |
-
'amp-twitter' => array(
|
2291 |
-
array(
|
2292 |
-
'attr_spec_list' => array(
|
2293 |
-
'data-tweetid' => array(
|
2294 |
-
'mandatory' => true,
|
2295 |
-
),
|
2296 |
-
'media' => array(),
|
2297 |
-
'noloading' => array(
|
2298 |
-
'value' => '',
|
2299 |
-
),
|
2300 |
-
),
|
2301 |
-
'tag_spec' => array(
|
2302 |
-
'requires_extension' => array(
|
2303 |
-
'amp-twitter',
|
2304 |
-
),
|
2305 |
-
),
|
2306 |
-
),
|
2307 |
-
),
|
2308 |
-
'amp-user-notification' => array(
|
2309 |
-
array(
|
2310 |
-
'attr_spec_list' => array(
|
2311 |
-
'data-dismiss-href' => array(
|
2312 |
-
'value_url' => array(
|
2313 |
-
'allow_empty' => false,
|
2314 |
-
'allow_relative' => false,
|
2315 |
-
'allowed_protocol' => array(
|
2316 |
-
'https',
|
2317 |
-
),
|
2318 |
-
),
|
2319 |
-
),
|
2320 |
-
'data-show-if-href' => array(
|
2321 |
-
'value_url' => array(
|
2322 |
-
'allow_empty' => false,
|
2323 |
-
'allow_relative' => false,
|
2324 |
-
'allowed_protocol' => array(
|
2325 |
-
'https',
|
2326 |
-
),
|
2327 |
-
),
|
2328 |
-
),
|
2329 |
-
'enctype' => array(
|
2330 |
-
'value' => 'application/x-www-form-urlencoded',
|
2331 |
-
),
|
2332 |
-
'media' => array(),
|
2333 |
-
'noloading' => array(
|
2334 |
-
'value' => '',
|
2335 |
-
),
|
2336 |
-
),
|
2337 |
-
'tag_spec' => array(
|
2338 |
-
'requires_extension' => array(
|
2339 |
-
'amp-user-notification',
|
2340 |
-
),
|
2341 |
-
),
|
2342 |
-
),
|
2343 |
-
),
|
2344 |
-
'amp-video' => array(
|
2345 |
-
array(
|
2346 |
-
'attr_spec_list' => array(
|
2347 |
-
'[album]' => array(),
|
2348 |
-
'[alt]' => array(),
|
2349 |
-
'[artist]' => array(),
|
2350 |
-
'[artwork]' => array(),
|
2351 |
-
'[attribution]' => array(),
|
2352 |
-
'[controls]' => array(),
|
2353 |
-
'[controlslist]' => array(),
|
2354 |
-
'[loop]' => array(),
|
2355 |
-
'[poster]' => array(),
|
2356 |
-
'[preload]' => array(),
|
2357 |
-
'[src]' => array(),
|
2358 |
-
'[title]' => array(),
|
2359 |
-
'album' => array(),
|
2360 |
-
'alt' => array(),
|
2361 |
-
'artist' => array(),
|
2362 |
-
'artwork' => array(),
|
2363 |
-
'attribution' => array(),
|
2364 |
-
'autoplay' => array(
|
2365 |
-
'value' => '',
|
2366 |
-
),
|
2367 |
-
'controls' => array(
|
2368 |
-
'value' => '',
|
2369 |
-
),
|
2370 |
-
'controlslist' => array(),
|
2371 |
-
'crossorigin' => array(),
|
2372 |
-
'disableremoteplayback' => array(
|
2373 |
-
'value' => '',
|
2374 |
-
),
|
2375 |
-
'lightbox' => array(),
|
2376 |
-
'lightbox-exclude' => array(
|
2377 |
-
'value' => '',
|
2378 |
-
),
|
2379 |
-
'lightbox-thumbnail-id' => array(
|
2380 |
-
'value_regex_casei' => '^[a-z][a-z\\d_-]*',
|
2381 |
-
),
|
2382 |
-
'loop' => array(
|
2383 |
-
'value' => '',
|
2384 |
-
),
|
2385 |
-
'media' => array(),
|
2386 |
-
'muted' => array(
|
2387 |
-
'value' => '',
|
2388 |
-
),
|
2389 |
-
'noloading' => array(
|
2390 |
-
'value' => '',
|
2391 |
-
),
|
2392 |
-
'placeholder' => array(),
|
2393 |
-
'poster' => array(),
|
2394 |
-
'preload' => array(
|
2395 |
-
'value_regex' => '(none|metadata|auto|)',
|
2396 |
-
),
|
2397 |
-
'src' => array(
|
2398 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
2399 |
-
'value_url' => array(
|
2400 |
-
'allow_relative' => true,
|
2401 |
-
'allowed_protocol' => array(
|
2402 |
-
'https',
|
2403 |
-
),
|
2404 |
-
),
|
2405 |
-
),
|
2406 |
-
),
|
2407 |
-
'tag_spec' => array(
|
2408 |
-
'also_requires_tag_warning' => array(
|
2409 |
-
'amp-video extension .js script',
|
2410 |
-
),
|
2411 |
-
'disallowed_ancestor' => array(
|
2412 |
-
'amp-story',
|
2413 |
-
),
|
2414 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-video',
|
2415 |
-
),
|
2416 |
-
),
|
2417 |
-
array(
|
2418 |
-
'attr_spec_list' => array(
|
2419 |
-
'[album]' => array(),
|
2420 |
-
'[alt]' => array(),
|
2421 |
-
'[artist]' => array(),
|
2422 |
-
'[artwork]' => array(),
|
2423 |
-
'[attribution]' => array(),
|
2424 |
-
'[controls]' => array(),
|
2425 |
-
'[controlslist]' => array(),
|
2426 |
-
'[loop]' => array(),
|
2427 |
-
'[poster]' => array(),
|
2428 |
-
'[preload]' => array(),
|
2429 |
-
'[src]' => array(),
|
2430 |
-
'[title]' => array(),
|
2431 |
-
'album' => array(),
|
2432 |
-
'alt' => array(),
|
2433 |
-
'artist' => array(),
|
2434 |
-
'artwork' => array(),
|
2435 |
-
'attribution' => array(),
|
2436 |
-
'autoplay' => array(
|
2437 |
-
'value' => '',
|
2438 |
-
),
|
2439 |
-
'controls' => array(
|
2440 |
-
'value' => '',
|
2441 |
-
),
|
2442 |
-
'controlslist' => array(),
|
2443 |
-
'crossorigin' => array(),
|
2444 |
-
'disableremoteplayback' => array(
|
2445 |
-
'value' => '',
|
2446 |
-
),
|
2447 |
-
'loop' => array(
|
2448 |
-
'value' => '',
|
2449 |
-
),
|
2450 |
-
'media' => array(),
|
2451 |
-
'muted' => array(
|
2452 |
-
'value' => '',
|
2453 |
-
),
|
2454 |
-
'noloading' => array(
|
2455 |
-
'value' => '',
|
2456 |
-
),
|
2457 |
-
'placeholder' => array(),
|
2458 |
-
'poster' => array(
|
2459 |
-
'mandatory' => true,
|
2460 |
-
),
|
2461 |
-
'preload' => array(
|
2462 |
-
'value_regex' => '(none|metadata|auto|)',
|
2463 |
-
),
|
2464 |
-
'src' => array(
|
2465 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
2466 |
-
'value_url' => array(
|
2467 |
-
'allow_relative' => true,
|
2468 |
-
'allowed_protocol' => array(
|
2469 |
-
'https',
|
2470 |
-
),
|
2471 |
-
),
|
2472 |
-
),
|
2473 |
-
),
|
2474 |
-
'tag_spec' => array(
|
2475 |
-
'mandatory_ancestor' => 'amp-story',
|
2476 |
-
'requires_extension' => array(
|
2477 |
-
'amp-video',
|
2478 |
-
),
|
2479 |
-
'spec_name' => 'amp-story >> amp-video',
|
2480 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-video',
|
2481 |
-
),
|
2482 |
-
),
|
2483 |
-
),
|
2484 |
-
'amp-vimeo' => array(
|
2485 |
-
array(
|
2486 |
-
'attr_spec_list' => array(
|
2487 |
-
'data-videoid' => array(
|
2488 |
-
'mandatory' => true,
|
2489 |
-
'value_regex' => '[0-9]+',
|
2490 |
-
),
|
2491 |
-
'media' => array(),
|
2492 |
-
'noloading' => array(
|
2493 |
-
'value' => '',
|
2494 |
-
),
|
2495 |
-
),
|
2496 |
-
'tag_spec' => array(
|
2497 |
-
'requires_extension' => array(
|
2498 |
-
'amp-vimeo',
|
2499 |
-
),
|
2500 |
-
),
|
2501 |
-
),
|
2502 |
-
),
|
2503 |
-
'amp-vine' => array(
|
2504 |
-
array(
|
2505 |
-
'attr_spec_list' => array(
|
2506 |
-
'data-vineid' => array(
|
2507 |
-
'mandatory' => true,
|
2508 |
-
),
|
2509 |
-
'media' => array(),
|
2510 |
-
'noloading' => array(
|
2511 |
-
'value' => '',
|
2512 |
-
),
|
2513 |
-
),
|
2514 |
-
'tag_spec' => array(
|
2515 |
-
'requires_extension' => array(
|
2516 |
-
'amp-vine',
|
2517 |
-
),
|
2518 |
-
),
|
2519 |
-
),
|
2520 |
-
),
|
2521 |
-
'amp-vk' => array(
|
2522 |
-
array(
|
2523 |
-
'attr_spec_list' => array(
|
2524 |
-
'data-embedtype' => array(
|
2525 |
-
'mandatory' => true,
|
2526 |
-
),
|
2527 |
-
'media' => array(),
|
2528 |
-
'noloading' => array(
|
2529 |
-
'value' => '',
|
2530 |
-
),
|
2531 |
-
),
|
2532 |
-
'tag_spec' => array(
|
2533 |
-
'requires_extension' => array(
|
2534 |
-
'amp-vk',
|
2535 |
-
),
|
2536 |
-
),
|
2537 |
-
),
|
2538 |
-
),
|
2539 |
-
'amp-web-push' => array(
|
2540 |
-
array(
|
2541 |
-
'attr_spec_list' => array(
|
2542 |
-
'helper-iframe-url' => array(
|
2543 |
-
'mandatory' => true,
|
2544 |
-
'value_url' => array(
|
2545 |
-
'allow_relative' => false,
|
2546 |
-
'allowed_protocol' => array(
|
2547 |
-
'https',
|
2548 |
-
),
|
2549 |
-
),
|
2550 |
-
),
|
2551 |
-
'id' => array(
|
2552 |
-
'mandatory' => true,
|
2553 |
-
'value_regex' => 'amp-web-push',
|
2554 |
-
),
|
2555 |
-
'media' => array(),
|
2556 |
-
'noloading' => array(
|
2557 |
-
'value' => '',
|
2558 |
-
),
|
2559 |
-
'permission-dialog-url' => array(
|
2560 |
-
'mandatory' => true,
|
2561 |
-
'value_url' => array(
|
2562 |
-
'allow_relative' => false,
|
2563 |
-
'allowed_protocol' => array(
|
2564 |
-
'https',
|
2565 |
-
),
|
2566 |
-
),
|
2567 |
-
),
|
2568 |
-
'service-worker-url' => array(
|
2569 |
-
'mandatory' => true,
|
2570 |
-
'value_url' => array(
|
2571 |
-
'allow_relative' => false,
|
2572 |
-
'allowed_protocol' => array(
|
2573 |
-
'https',
|
2574 |
-
),
|
2575 |
-
),
|
2576 |
-
),
|
2577 |
-
),
|
2578 |
-
'tag_spec' => array(
|
2579 |
-
'requires_extension' => array(
|
2580 |
-
'amp-web-push',
|
2581 |
-
),
|
2582 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-web-push',
|
2583 |
-
),
|
2584 |
-
),
|
2585 |
-
),
|
2586 |
-
'amp-web-push-widget' => array(
|
2587 |
-
array(
|
2588 |
-
'attr_spec_list' => array(
|
2589 |
-
'media' => array(),
|
2590 |
-
'noloading' => array(
|
2591 |
-
'value' => '',
|
2592 |
-
),
|
2593 |
-
'visibility' => array(
|
2594 |
-
'mandatory' => true,
|
2595 |
-
'value_regex' => '(blocked|subscribed|unsubscribed)',
|
2596 |
-
),
|
2597 |
-
),
|
2598 |
-
'tag_spec' => array(
|
2599 |
-
'requires_extension' => array(
|
2600 |
-
'amp-web-push',
|
2601 |
-
),
|
2602 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-web-push',
|
2603 |
-
),
|
2604 |
-
),
|
2605 |
-
),
|
2606 |
-
'amp-wistia-player' => array(
|
2607 |
-
array(
|
2608 |
-
'attr_spec_list' => array(
|
2609 |
-
'data-media-hashed-id' => array(
|
2610 |
-
'mandatory' => true,
|
2611 |
-
'value_regex' => '[0-9a-zA-Z]+',
|
2612 |
-
),
|
2613 |
-
'media' => array(),
|
2614 |
-
'noloading' => array(
|
2615 |
-
'value' => '',
|
2616 |
-
),
|
2617 |
-
),
|
2618 |
-
'tag_spec' => array(
|
2619 |
-
'requires_extension' => array(
|
2620 |
-
'amp-wistia-player',
|
2621 |
-
),
|
2622 |
-
),
|
2623 |
-
),
|
2624 |
-
),
|
2625 |
-
'amp-youtube' => array(
|
2626 |
-
array(
|
2627 |
-
'attr_spec_list' => array(
|
2628 |
-
'[data-videoid]' => array(),
|
2629 |
-
'autoplay' => array(),
|
2630 |
-
'credentials' => array(
|
2631 |
-
'value_regex_casei' => '(include|omit)',
|
2632 |
-
),
|
2633 |
-
'data-live-channelid' => array(
|
2634 |
-
'value_regex' => '[^=/?:]+',
|
2635 |
-
),
|
2636 |
-
'data-videoid' => array(
|
2637 |
-
'value_regex' => '[^=/?:]+',
|
2638 |
-
),
|
2639 |
-
'lightbox' => array(),
|
2640 |
-
'lightbox-exclude' => array(
|
2641 |
-
'value' => '',
|
2642 |
-
),
|
2643 |
-
'lightbox-thumbnail-id' => array(
|
2644 |
-
'value_regex_casei' => '^[a-z][a-z\\d_-]*',
|
2645 |
-
),
|
2646 |
-
'media' => array(),
|
2647 |
-
'noloading' => array(
|
2648 |
-
'value' => '',
|
2649 |
-
),
|
2650 |
-
),
|
2651 |
-
'tag_spec' => array(
|
2652 |
-
'requires_extension' => array(
|
2653 |
-
'amp-youtube',
|
2654 |
-
),
|
2655 |
-
),
|
2656 |
-
),
|
2657 |
-
),
|
2658 |
-
'article' => array(
|
2659 |
-
array(
|
2660 |
-
'attr_spec_list' => array(),
|
2661 |
-
'tag_spec' => array(),
|
2662 |
-
),
|
2663 |
-
),
|
2664 |
-
'aside' => array(
|
2665 |
-
array(
|
2666 |
-
'attr_spec_list' => array(),
|
2667 |
-
'tag_spec' => array(),
|
2668 |
-
),
|
2669 |
-
),
|
2670 |
-
'audio' => array(
|
2671 |
-
array(
|
2672 |
-
'attr_spec_list' => array(
|
2673 |
-
'autoplay' => array(),
|
2674 |
-
'controls' => array(),
|
2675 |
-
'loop' => array(),
|
2676 |
-
'muted' => array(),
|
2677 |
-
'preload' => array(),
|
2678 |
-
'src' => array(
|
2679 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
2680 |
-
'value_url' => array(
|
2681 |
-
'allow_relative' => false,
|
2682 |
-
'allowed_protocol' => array(
|
2683 |
-
'data',
|
2684 |
-
'https',
|
2685 |
-
),
|
2686 |
-
),
|
2687 |
-
),
|
2688 |
-
),
|
2689 |
-
'tag_spec' => array(
|
2690 |
-
'mandatory_ancestor' => 'noscript',
|
2691 |
-
'mandatory_ancestor_suggested_alternative' => 'amp-audio',
|
2692 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-audio',
|
2693 |
-
),
|
2694 |
-
),
|
2695 |
-
),
|
2696 |
-
'b' => array(
|
2697 |
-
array(
|
2698 |
-
'attr_spec_list' => array(),
|
2699 |
-
'tag_spec' => array(),
|
2700 |
-
),
|
2701 |
-
),
|
2702 |
-
'base' => array(
|
2703 |
-
array(
|
2704 |
-
'attr_spec_list' => array(
|
2705 |
-
'href' => array(
|
2706 |
-
'value' => '/',
|
2707 |
-
),
|
2708 |
-
'target' => array(
|
2709 |
-
'value_regex_casei' => '(_blank|_self|_top)',
|
2710 |
-
),
|
2711 |
-
),
|
2712 |
-
'tag_spec' => array(
|
2713 |
-
'mandatory_parent' => 'head',
|
2714 |
-
'unique' => true,
|
2715 |
-
),
|
2716 |
-
),
|
2717 |
-
),
|
2718 |
-
'bdi' => array(
|
2719 |
-
array(
|
2720 |
-
'attr_spec_list' => array(),
|
2721 |
-
'tag_spec' => array(),
|
2722 |
-
),
|
2723 |
-
),
|
2724 |
-
'bdo' => array(
|
2725 |
-
array(
|
2726 |
-
'attr_spec_list' => array(
|
2727 |
-
'dir' => array(),
|
2728 |
-
),
|
2729 |
-
'tag_spec' => array(),
|
2730 |
-
),
|
2731 |
-
),
|
2732 |
-
'big' => array(
|
2733 |
-
array(
|
2734 |
-
'attr_spec_list' => array(),
|
2735 |
-
'tag_spec' => array(),
|
2736 |
-
),
|
2737 |
-
),
|
2738 |
-
'blockquote' => array(
|
2739 |
-
array(
|
2740 |
-
'attr_spec_list' => array(
|
2741 |
-
'align' => array(),
|
2742 |
-
'cite' => array(
|
2743 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
2744 |
-
'value_url' => array(
|
2745 |
-
'allow_empty' => true,
|
2746 |
-
'allow_relative' => true,
|
2747 |
-
'allowed_protocol' => array(
|
2748 |
-
'http',
|
2749 |
-
'https',
|
2750 |
-
),
|
2751 |
-
),
|
2752 |
-
),
|
2753 |
-
),
|
2754 |
-
'tag_spec' => array(),
|
2755 |
-
),
|
2756 |
-
),
|
2757 |
-
'body' => array(
|
2758 |
-
array(
|
2759 |
-
'attr_spec_list' => array(),
|
2760 |
-
'tag_spec' => array(
|
2761 |
-
'mandatory' => true,
|
2762 |
-
'mandatory_parent' => 'html',
|
2763 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#required-markup',
|
2764 |
-
'unique' => true,
|
2765 |
-
),
|
2766 |
-
),
|
2767 |
-
),
|
2768 |
-
'br' => array(
|
2769 |
-
array(
|
2770 |
-
'attr_spec_list' => array(),
|
2771 |
-
'tag_spec' => array(),
|
2772 |
-
),
|
2773 |
-
),
|
2774 |
-
'button' => array(
|
2775 |
-
array(
|
2776 |
-
'attr_spec_list' => array(
|
2777 |
-
'[disabled]' => array(),
|
2778 |
-
'[type]' => array(),
|
2779 |
-
'[value]' => array(),
|
2780 |
-
'disabled' => array(
|
2781 |
-
'value' => '',
|
2782 |
-
),
|
2783 |
-
'name' => array(
|
2784 |
-
'blacklisted_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|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|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|$)',
|
2785 |
-
),
|
2786 |
-
'role' => array(),
|
2787 |
-
'tabindex' => array(),
|
2788 |
-
'type' => array(),
|
2789 |
-
'value' => array(),
|
2790 |
-
),
|
2791 |
-
'tag_spec' => array(),
|
2792 |
-
),
|
2793 |
-
array(
|
2794 |
-
'attr_spec_list' => array(
|
2795 |
-
'name' => array(
|
2796 |
-
'blacklisted_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|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|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|$)',
|
2797 |
-
),
|
2798 |
-
'open-button' => array(
|
2799 |
-
'value' => '',
|
2800 |
-
),
|
2801 |
-
'role' => array(),
|
2802 |
-
'tabindex' => array(),
|
2803 |
-
'type' => array(),
|
2804 |
-
'value' => array(),
|
2805 |
-
),
|
2806 |
-
'tag_spec' => array(
|
2807 |
-
'mandatory_ancestor' => 'amp-app-banner',
|
2808 |
-
'spec_name' => 'amp-app-banner button[open-button]',
|
2809 |
-
),
|
2810 |
-
),
|
2811 |
-
),
|
2812 |
-
'caption' => array(
|
2813 |
-
array(
|
2814 |
-
'attr_spec_list' => array(),
|
2815 |
-
'tag_spec' => array(),
|
2816 |
-
),
|
2817 |
-
),
|
2818 |
-
'center' => array(
|
2819 |
-
array(
|
2820 |
-
'attr_spec_list' => array(),
|
2821 |
-
'tag_spec' => array(),
|
2822 |
-
),
|
2823 |
-
),
|
2824 |
-
'circle' => array(
|
2825 |
-
array(
|
2826 |
-
'attr_spec_list' => array(
|
2827 |
-
'alignment-baseline' => array(),
|
2828 |
-
'baseline-shift' => array(),
|
2829 |
-
'clip' => array(),
|
2830 |
-
'clip-path' => array(),
|
2831 |
-
'clip-rule' => array(),
|
2832 |
-
'color' => array(),
|
2833 |
-
'color-interpolation' => array(),
|
2834 |
-
'color-interpolation-filters' => array(),
|
2835 |
-
'color-profile' => array(),
|
2836 |
-
'color-rendering' => array(),
|
2837 |
-
'cursor' => array(),
|
2838 |
-
'cx' => array(),
|
2839 |
-
'cy' => array(),
|
2840 |
-
'direction' => array(),
|
2841 |
-
'display' => array(),
|
2842 |
-
'dominant-baseline' => array(),
|
2843 |
-
'enable-background' => array(),
|
2844 |
-
'externalresourcesrequired' => array(),
|
2845 |
-
'fill' => array(),
|
2846 |
-
'fill-opacity' => array(),
|
2847 |
-
'fill-rule' => array(),
|
2848 |
-
'filter' => array(),
|
2849 |
-
'flood-color' => array(),
|
2850 |
-
'flood-opacity' => array(),
|
2851 |
-
'font-family' => array(),
|
2852 |
-
'font-size' => array(),
|
2853 |
-
'font-size-adjust' => array(),
|
2854 |
-
'font-stretch' => array(),
|
2855 |
-
'font-style' => array(),
|
2856 |
-
'font-variant' => array(),
|
2857 |
-
'font-weight' => array(),
|
2858 |
-
'glyph-orientation-horizontal' => array(),
|
2859 |
-
'glyph-orientation-vertical' => array(),
|
2860 |
-
'image-rendering' => array(),
|
2861 |
-
'kerning' => array(),
|
2862 |
-
'letter-spacing' => array(),
|
2863 |
-
'lighting-color' => array(),
|
2864 |
-
'marker-end' => array(),
|
2865 |
-
'marker-mid' => array(),
|
2866 |
-
'marker-start' => array(),
|
2867 |
-
'mask' => array(),
|
2868 |
-
'opacity' => array(),
|
2869 |
-
'overflow' => array(),
|
2870 |
-
'pointer-events' => array(),
|
2871 |
-
'r' => array(),
|
2872 |
-
'requiredextensions' => array(),
|
2873 |
-
'requiredfeatures' => array(),
|
2874 |
-
'shape-rendering' => array(),
|
2875 |
-
'sketch:type' => array(),
|
2876 |
-
'stop-color' => array(),
|
2877 |
-
'stop-opacity' => array(),
|
2878 |
-
'stroke' => array(),
|
2879 |
-
'stroke-dasharray' => array(),
|
2880 |
-
'stroke-dashoffset' => array(),
|
2881 |
-
'stroke-linecap' => array(),
|
2882 |
-
'stroke-linejoin' => array(),
|
2883 |
-
'stroke-miterlimit' => array(),
|
2884 |
-
'stroke-opacity' => array(),
|
2885 |
-
'stroke-width' => array(),
|
2886 |
-
'style' => array(
|
2887 |
-
'blacklisted_value_regex' => '!important',
|
2888 |
-
),
|
2889 |
-
'systemlanguage' => array(),
|
2890 |
-
'text-anchor' => array(),
|
2891 |
-
'text-decoration' => array(),
|
2892 |
-
'text-rendering' => array(),
|
2893 |
-
'transform' => array(),
|
2894 |
-
'unicode-bidi' => array(),
|
2895 |
-
'vector-effect' => array(),
|
2896 |
-
'visibility' => array(),
|
2897 |
-
'word-spacing' => array(),
|
2898 |
-
'writing-mode' => array(),
|
2899 |
-
'xml:lang' => array(),
|
2900 |
-
'xml:space' => array(),
|
2901 |
-
'xmlns' => array(),
|
2902 |
-
'xmlns:xlink' => array(),
|
2903 |
-
),
|
2904 |
-
'tag_spec' => array(
|
2905 |
-
'mandatory_ancestor' => 'svg',
|
2906 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
2907 |
-
),
|
2908 |
-
),
|
2909 |
-
),
|
2910 |
-
'cite' => array(
|
2911 |
-
array(
|
2912 |
-
'attr_spec_list' => array(),
|
2913 |
-
'tag_spec' => array(),
|
2914 |
-
),
|
2915 |
-
),
|
2916 |
-
'clippath' => array(
|
2917 |
-
array(
|
2918 |
-
'attr_spec_list' => array(
|
2919 |
-
'alignment-baseline' => array(),
|
2920 |
-
'baseline-shift' => array(),
|
2921 |
-
'clip' => array(),
|
2922 |
-
'clip-path' => array(),
|
2923 |
-
'clip-rule' => array(),
|
2924 |
-
'clippathunits' => array(),
|
2925 |
-
'color' => array(),
|
2926 |
-
'color-interpolation' => array(),
|
2927 |
-
'color-interpolation-filters' => array(),
|
2928 |
-
'color-profile' => array(),
|
2929 |
-
'color-rendering' => array(),
|
2930 |
-
'cursor' => array(),
|
2931 |
-
'direction' => array(),
|
2932 |
-
'display' => array(),
|
2933 |
-
'dominant-baseline' => array(),
|
2934 |
-
'enable-background' => array(),
|
2935 |
-
'externalresourcesrequired' => array(),
|
2936 |
-
'fill' => array(),
|
2937 |
-
'fill-opacity' => array(),
|
2938 |
-
'fill-rule' => array(),
|
2939 |
-
'filter' => array(),
|
2940 |
-
'flood-color' => array(),
|
2941 |
-
'flood-opacity' => array(),
|
2942 |
-
'font-family' => array(),
|
2943 |
-
'font-size' => array(),
|
2944 |
-
'font-size-adjust' => array(),
|
2945 |
-
'font-stretch' => array(),
|
2946 |
-
'font-style' => array(),
|
2947 |
-
'font-variant' => array(),
|
2948 |
-
'font-weight' => array(),
|
2949 |
-
'glyph-orientation-horizontal' => array(),
|
2950 |
-
'glyph-orientation-vertical' => array(),
|
2951 |
-
'image-rendering' => array(),
|
2952 |
-
'kerning' => array(),
|
2953 |
-
'letter-spacing' => array(),
|
2954 |
-
'lighting-color' => array(),
|
2955 |
-
'marker-end' => array(),
|
2956 |
-
'marker-mid' => array(),
|
2957 |
-
'marker-start' => array(),
|
2958 |
-
'mask' => array(),
|
2959 |
-
'opacity' => array(),
|
2960 |
-
'overflow' => array(),
|
2961 |
-
'pointer-events' => array(),
|
2962 |
-
'requiredextensions' => array(),
|
2963 |
-
'requiredfeatures' => array(),
|
2964 |
-
'shape-rendering' => array(),
|
2965 |
-
'stop-color' => array(),
|
2966 |
-
'stop-opacity' => array(),
|
2967 |
-
'stroke' => array(),
|
2968 |
-
'stroke-dasharray' => array(),
|
2969 |
-
'stroke-dashoffset' => array(),
|
2970 |
-
'stroke-linecap' => array(),
|
2971 |
-
'stroke-linejoin' => array(),
|
2972 |
-
'stroke-miterlimit' => array(),
|
2973 |
-
'stroke-opacity' => array(),
|
2974 |
-
'stroke-width' => array(),
|
2975 |
-
'style' => array(
|
2976 |
-
'blacklisted_value_regex' => '!important',
|
2977 |
-
),
|
2978 |
-
'systemlanguage' => array(),
|
2979 |
-
'text-anchor' => array(),
|
2980 |
-
'text-decoration' => array(),
|
2981 |
-
'text-rendering' => array(),
|
2982 |
-
'transform' => array(),
|
2983 |
-
'unicode-bidi' => array(),
|
2984 |
-
'vector-effect' => array(),
|
2985 |
-
'visibility' => array(),
|
2986 |
-
'word-spacing' => array(),
|
2987 |
-
'writing-mode' => array(),
|
2988 |
-
'xml:lang' => array(),
|
2989 |
-
'xml:space' => array(),
|
2990 |
-
'xmlns' => array(),
|
2991 |
-
'xmlns:xlink' => array(),
|
2992 |
-
),
|
2993 |
-
'tag_spec' => array(
|
2994 |
-
'mandatory_ancestor' => 'svg',
|
2995 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
2996 |
-
),
|
2997 |
-
),
|
2998 |
-
),
|
2999 |
-
'code' => array(
|
3000 |
-
array(
|
3001 |
-
'attr_spec_list' => array(),
|
3002 |
-
'tag_spec' => array(),
|
3003 |
-
),
|
3004 |
-
),
|
3005 |
-
'col' => array(
|
3006 |
-
array(
|
3007 |
-
'attr_spec_list' => array(
|
3008 |
-
'span' => array(),
|
3009 |
-
),
|
3010 |
-
'tag_spec' => array(),
|
3011 |
-
),
|
3012 |
-
),
|
3013 |
-
'colgroup' => array(
|
3014 |
-
array(
|
3015 |
-
'attr_spec_list' => array(
|
3016 |
-
'span' => array(),
|
3017 |
-
),
|
3018 |
-
'tag_spec' => array(),
|
3019 |
-
),
|
3020 |
-
),
|
3021 |
-
'data' => array(
|
3022 |
-
array(
|
3023 |
-
'attr_spec_list' => array(),
|
3024 |
-
'tag_spec' => array(),
|
3025 |
-
),
|
3026 |
-
),
|
3027 |
-
'datalist' => array(
|
3028 |
-
array(
|
3029 |
-
'attr_spec_list' => array(),
|
3030 |
-
'tag_spec' => array(
|
3031 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-form',
|
3032 |
-
),
|
3033 |
-
),
|
3034 |
-
),
|
3035 |
-
'dd' => array(
|
3036 |
-
array(
|
3037 |
-
'attr_spec_list' => array(),
|
3038 |
-
'tag_spec' => array(),
|
3039 |
-
),
|
3040 |
-
),
|
3041 |
-
'defs' => array(
|
3042 |
-
array(
|
3043 |
-
'attr_spec_list' => array(
|
3044 |
-
'alignment-baseline' => array(),
|
3045 |
-
'baseline-shift' => array(),
|
3046 |
-
'clip' => array(),
|
3047 |
-
'clip-path' => array(),
|
3048 |
-
'clip-rule' => array(),
|
3049 |
-
'color' => array(),
|
3050 |
-
'color-interpolation' => array(),
|
3051 |
-
'color-interpolation-filters' => array(),
|
3052 |
-
'color-profile' => array(),
|
3053 |
-
'color-rendering' => array(),
|
3054 |
-
'cursor' => array(),
|
3055 |
-
'direction' => array(),
|
3056 |
-
'display' => array(),
|
3057 |
-
'dominant-baseline' => array(),
|
3058 |
-
'enable-background' => array(),
|
3059 |
-
'externalresourcesrequired' => array(),
|
3060 |
-
'fill' => array(),
|
3061 |
-
'fill-opacity' => array(),
|
3062 |
-
'fill-rule' => array(),
|
3063 |
-
'filter' => array(),
|
3064 |
-
'flood-color' => array(),
|
3065 |
-
'flood-opacity' => array(),
|
3066 |
-
'font-family' => array(),
|
3067 |
-
'font-size' => array(),
|
3068 |
-
'font-size-adjust' => array(),
|
3069 |
-
'font-stretch' => array(),
|
3070 |
-
'font-style' => array(),
|
3071 |
-
'font-variant' => array(),
|
3072 |
-
'font-weight' => array(),
|
3073 |
-
'glyph-orientation-horizontal' => array(),
|
3074 |
-
'glyph-orientation-vertical' => array(),
|
3075 |
-
'image-rendering' => array(),
|
3076 |
-
'kerning' => array(),
|
3077 |
-
'letter-spacing' => array(),
|
3078 |
-
'lighting-color' => array(),
|
3079 |
-
'marker-end' => array(),
|
3080 |
-
'marker-mid' => array(),
|
3081 |
-
'marker-start' => array(),
|
3082 |
-
'mask' => array(),
|
3083 |
-
'opacity' => array(),
|
3084 |
-
'overflow' => array(),
|
3085 |
-
'pointer-events' => array(),
|
3086 |
-
'requiredextensions' => array(),
|
3087 |
-
'requiredfeatures' => array(),
|
3088 |
-
'shape-rendering' => array(),
|
3089 |
-
'stop-color' => array(),
|
3090 |
-
'stop-opacity' => array(),
|
3091 |
-
'stroke' => array(),
|
3092 |
-
'stroke-dasharray' => array(),
|
3093 |
-
'stroke-dashoffset' => array(),
|
3094 |
-
'stroke-linecap' => array(),
|
3095 |
-
'stroke-linejoin' => array(),
|
3096 |
-
'stroke-miterlimit' => array(),
|
3097 |
-
'stroke-opacity' => array(),
|
3098 |
-
'stroke-width' => array(),
|
3099 |
-
'style' => array(
|
3100 |
-
'blacklisted_value_regex' => '!important',
|
3101 |
-
),
|
3102 |
-
'systemlanguage' => array(),
|
3103 |
-
'text-anchor' => array(),
|
3104 |
-
'text-decoration' => array(),
|
3105 |
-
'text-rendering' => array(),
|
3106 |
-
'transform' => array(),
|
3107 |
-
'unicode-bidi' => array(),
|
3108 |
-
'vector-effect' => array(),
|
3109 |
-
'visibility' => array(),
|
3110 |
-
'word-spacing' => array(),
|
3111 |
-
'writing-mode' => array(),
|
3112 |
-
'xml:lang' => array(),
|
3113 |
-
'xml:space' => array(),
|
3114 |
-
'xmlns' => array(),
|
3115 |
-
'xmlns:xlink' => array(),
|
3116 |
-
),
|
3117 |
-
'tag_spec' => array(
|
3118 |
-
'mandatory_ancestor' => 'svg',
|
3119 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3120 |
-
),
|
3121 |
-
),
|
3122 |
-
),
|
3123 |
-
'del' => array(
|
3124 |
-
array(
|
3125 |
-
'attr_spec_list' => array(
|
3126 |
-
'cite' => array(
|
3127 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
3128 |
-
'value_url' => array(
|
3129 |
-
'allow_empty' => true,
|
3130 |
-
'allow_relative' => true,
|
3131 |
-
'allowed_protocol' => array(
|
3132 |
-
'http',
|
3133 |
-
'https',
|
3134 |
-
),
|
3135 |
-
),
|
3136 |
-
),
|
3137 |
-
'datetime' => array(),
|
3138 |
-
),
|
3139 |
-
'tag_spec' => array(),
|
3140 |
-
),
|
3141 |
-
),
|
3142 |
-
'desc' => array(
|
3143 |
-
array(
|
3144 |
-
'attr_spec_list' => array(
|
3145 |
-
'style' => array(
|
3146 |
-
'blacklisted_value_regex' => '!important',
|
3147 |
-
),
|
3148 |
-
'xml:lang' => array(),
|
3149 |
-
'xml:space' => array(),
|
3150 |
-
'xmlns' => array(),
|
3151 |
-
'xmlns:xlink' => array(),
|
3152 |
-
),
|
3153 |
-
'tag_spec' => array(
|
3154 |
-
'mandatory_ancestor' => 'svg',
|
3155 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3156 |
-
),
|
3157 |
-
),
|
3158 |
-
),
|
3159 |
-
'dfn' => array(
|
3160 |
-
array(
|
3161 |
-
'attr_spec_list' => array(),
|
3162 |
-
'tag_spec' => array(),
|
3163 |
-
),
|
3164 |
-
),
|
3165 |
-
'dir' => array(
|
3166 |
-
array(
|
3167 |
-
'attr_spec_list' => array(),
|
3168 |
-
'tag_spec' => array(),
|
3169 |
-
),
|
3170 |
-
),
|
3171 |
-
'div' => array(
|
3172 |
-
array(
|
3173 |
-
'attr_spec_list' => array(
|
3174 |
-
'align' => array(),
|
3175 |
-
),
|
3176 |
-
'tag_spec' => array(),
|
3177 |
-
),
|
3178 |
-
array(
|
3179 |
-
'attr_spec_list' => array(
|
3180 |
-
'align' => array(),
|
3181 |
-
'submitting' => array(
|
3182 |
-
'dispatch_key' => 1,
|
3183 |
-
'mandatory' => true,
|
3184 |
-
),
|
3185 |
-
),
|
3186 |
-
'tag_spec' => array(
|
3187 |
-
'mandatory_parent' => 'form',
|
3188 |
-
'spec_name' => 'FORM > DIV [submitting]',
|
3189 |
-
),
|
3190 |
-
),
|
3191 |
-
array(
|
3192 |
-
'attr_spec_list' => array(
|
3193 |
-
'align' => array(),
|
3194 |
-
'submit-success' => array(
|
3195 |
-
'mandatory' => true,
|
3196 |
-
),
|
3197 |
-
),
|
3198 |
-
'tag_spec' => array(
|
3199 |
-
'mandatory_parent' => 'form',
|
3200 |
-
'spec_name' => 'FORM > DIV [submit-success]',
|
3201 |
-
),
|
3202 |
-
),
|
3203 |
-
array(
|
3204 |
-
'attr_spec_list' => array(
|
3205 |
-
'align' => array(),
|
3206 |
-
'submit-success' => array(
|
3207 |
-
'mandatory' => true,
|
3208 |
-
),
|
3209 |
-
'template' => array(
|
3210 |
-
'mandatory' => true,
|
3211 |
-
),
|
3212 |
-
),
|
3213 |
-
'tag_spec' => array(
|
3214 |
-
'mandatory_parent' => 'form',
|
3215 |
-
'spec_name' => 'FORM > DIV [submit-success][template]',
|
3216 |
-
),
|
3217 |
-
),
|
3218 |
-
array(
|
3219 |
-
'attr_spec_list' => array(
|
3220 |
-
'align' => array(),
|
3221 |
-
'submit-error' => array(
|
3222 |
-
'mandatory' => true,
|
3223 |
-
),
|
3224 |
-
),
|
3225 |
-
'tag_spec' => array(
|
3226 |
-
'mandatory_parent' => 'form',
|
3227 |
-
'spec_name' => 'FORM > DIV [submit-error]',
|
3228 |
-
),
|
3229 |
-
),
|
3230 |
-
array(
|
3231 |
-
'attr_spec_list' => array(
|
3232 |
-
'align' => array(),
|
3233 |
-
'submit-error' => array(
|
3234 |
-
'mandatory' => true,
|
3235 |
-
),
|
3236 |
-
'template' => array(
|
3237 |
-
'mandatory' => true,
|
3238 |
-
),
|
3239 |
-
),
|
3240 |
-
'tag_spec' => array(
|
3241 |
-
'mandatory_parent' => 'form',
|
3242 |
-
'spec_name' => 'FORM > DIV [submit-error][template]',
|
3243 |
-
),
|
3244 |
-
),
|
3245 |
-
),
|
3246 |
-
'dl' => array(
|
3247 |
-
array(
|
3248 |
-
'attr_spec_list' => array(),
|
3249 |
-
'tag_spec' => array(),
|
3250 |
-
),
|
3251 |
-
),
|
3252 |
-
'dt' => array(
|
3253 |
-
array(
|
3254 |
-
'attr_spec_list' => array(),
|
3255 |
-
'tag_spec' => array(),
|
3256 |
-
),
|
3257 |
-
),
|
3258 |
-
'ellipse' => array(
|
3259 |
-
array(
|
3260 |
-
'attr_spec_list' => array(
|
3261 |
-
'alignment-baseline' => array(),
|
3262 |
-
'baseline-shift' => array(),
|
3263 |
-
'clip' => array(),
|
3264 |
-
'clip-path' => array(),
|
3265 |
-
'clip-rule' => array(),
|
3266 |
-
'color' => array(),
|
3267 |
-
'color-interpolation' => array(),
|
3268 |
-
'color-interpolation-filters' => array(),
|
3269 |
-
'color-profile' => array(),
|
3270 |
-
'color-rendering' => array(),
|
3271 |
-
'cursor' => array(),
|
3272 |
-
'cx' => array(),
|
3273 |
-
'cy' => array(),
|
3274 |
-
'direction' => array(),
|
3275 |
-
'display' => array(),
|
3276 |
-
'dominant-baseline' => array(),
|
3277 |
-
'enable-background' => array(),
|
3278 |
-
'externalresourcesrequired' => array(),
|
3279 |
-
'fill' => array(),
|
3280 |
-
'fill-opacity' => array(),
|
3281 |
-
'fill-rule' => array(),
|
3282 |
-
'filter' => array(),
|
3283 |
-
'flood-color' => array(),
|
3284 |
-
'flood-opacity' => array(),
|
3285 |
-
'font-family' => array(),
|
3286 |
-
'font-size' => array(),
|
3287 |
-
'font-size-adjust' => array(),
|
3288 |
-
'font-stretch' => array(),
|
3289 |
-
'font-style' => array(),
|
3290 |
-
'font-variant' => array(),
|
3291 |
-
'font-weight' => array(),
|
3292 |
-
'glyph-orientation-horizontal' => array(),
|
3293 |
-
'glyph-orientation-vertical' => array(),
|
3294 |
-
'image-rendering' => array(),
|
3295 |
-
'kerning' => array(),
|
3296 |
-
'letter-spacing' => array(),
|
3297 |
-
'lighting-color' => array(),
|
3298 |
-
'marker-end' => array(),
|
3299 |
-
'marker-mid' => array(),
|
3300 |
-
'marker-start' => array(),
|
3301 |
-
'mask' => array(),
|
3302 |
-
'opacity' => array(),
|
3303 |
-
'overflow' => array(),
|
3304 |
-
'pointer-events' => array(),
|
3305 |
-
'requiredextensions' => array(),
|
3306 |
-
'requiredfeatures' => array(),
|
3307 |
-
'rx' => array(),
|
3308 |
-
'ry' => array(),
|
3309 |
-
'shape-rendering' => array(),
|
3310 |
-
'sketch:type' => array(),
|
3311 |
-
'stop-color' => array(),
|
3312 |
-
'stop-opacity' => array(),
|
3313 |
-
'stroke' => array(),
|
3314 |
-
'stroke-dasharray' => array(),
|
3315 |
-
'stroke-dashoffset' => array(),
|
3316 |
-
'stroke-linecap' => array(),
|
3317 |
-
'stroke-linejoin' => array(),
|
3318 |
-
'stroke-miterlimit' => array(),
|
3319 |
-
'stroke-opacity' => array(),
|
3320 |
-
'stroke-width' => array(),
|
3321 |
-
'style' => array(
|
3322 |
-
'blacklisted_value_regex' => '!important',
|
3323 |
-
),
|
3324 |
-
'systemlanguage' => array(),
|
3325 |
-
'text-anchor' => array(),
|
3326 |
-
'text-decoration' => array(),
|
3327 |
-
'text-rendering' => array(),
|
3328 |
-
'transform' => array(),
|
3329 |
-
'unicode-bidi' => array(),
|
3330 |
-
'vector-effect' => array(),
|
3331 |
-
'visibility' => array(),
|
3332 |
-
'word-spacing' => array(),
|
3333 |
-
'writing-mode' => array(),
|
3334 |
-
'xml:lang' => array(),
|
3335 |
-
'xml:space' => array(),
|
3336 |
-
'xmlns' => array(),
|
3337 |
-
'xmlns:xlink' => array(),
|
3338 |
-
),
|
3339 |
-
'tag_spec' => array(
|
3340 |
-
'mandatory_ancestor' => 'svg',
|
3341 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3342 |
-
),
|
3343 |
-
),
|
3344 |
-
),
|
3345 |
-
'em' => array(
|
3346 |
-
array(
|
3347 |
-
'attr_spec_list' => array(),
|
3348 |
-
'tag_spec' => array(),
|
3349 |
-
),
|
3350 |
-
),
|
3351 |
-
'fecolormatrix' => array(
|
3352 |
-
array(
|
3353 |
-
'attr_spec_list' => array(
|
3354 |
-
'alignment-baseline' => array(),
|
3355 |
-
'baseline-shift' => array(),
|
3356 |
-
'clip' => array(),
|
3357 |
-
'clip-path' => array(),
|
3358 |
-
'clip-rule' => array(),
|
3359 |
-
'color' => array(),
|
3360 |
-
'color-interpolation' => array(),
|
3361 |
-
'color-interpolation-filters' => array(),
|
3362 |
-
'color-profile' => array(),
|
3363 |
-
'color-rendering' => array(),
|
3364 |
-
'cursor' => array(),
|
3365 |
-
'direction' => array(),
|
3366 |
-
'display' => array(),
|
3367 |
-
'dominant-baseline' => array(),
|
3368 |
-
'enable-background' => array(),
|
3369 |
-
'fill' => array(),
|
3370 |
-
'fill-opacity' => array(),
|
3371 |
-
'fill-rule' => array(),
|
3372 |
-
'filter' => array(),
|
3373 |
-
'flood-color' => array(),
|
3374 |
-
'flood-opacity' => array(),
|
3375 |
-
'font-family' => array(),
|
3376 |
-
'font-size' => array(),
|
3377 |
-
'font-size-adjust' => array(),
|
3378 |
-
'font-stretch' => array(),
|
3379 |
-
'font-style' => array(),
|
3380 |
-
'font-variant' => array(),
|
3381 |
-
'font-weight' => array(),
|
3382 |
-
'glyph-orientation-horizontal' => array(),
|
3383 |
-
'glyph-orientation-vertical' => array(),
|
3384 |
-
'height' => array(),
|
3385 |
-
'image-rendering' => array(),
|
3386 |
-
'in' => array(),
|
3387 |
-
'kerning' => array(),
|
3388 |
-
'letter-spacing' => array(),
|
3389 |
-
'lighting-color' => array(),
|
3390 |
-
'marker-end' => array(),
|
3391 |
-
'marker-mid' => array(),
|
3392 |
-
'marker-start' => array(),
|
3393 |
-
'mask' => array(),
|
3394 |
-
'opacity' => array(),
|
3395 |
-
'overflow' => array(),
|
3396 |
-
'pointer-events' => array(),
|
3397 |
-
'result' => array(),
|
3398 |
-
'shape-rendering' => array(),
|
3399 |
-
'stop-color' => array(),
|
3400 |
-
'stop-opacity' => array(),
|
3401 |
-
'stroke' => array(),
|
3402 |
-
'stroke-dasharray' => array(),
|
3403 |
-
'stroke-dashoffset' => array(),
|
3404 |
-
'stroke-linecap' => array(),
|
3405 |
-
'stroke-linejoin' => array(),
|
3406 |
-
'stroke-miterlimit' => array(),
|
3407 |
-
'stroke-opacity' => array(),
|
3408 |
-
'stroke-width' => array(),
|
3409 |
-
'style' => array(
|
3410 |
-
'blacklisted_value_regex' => '!important',
|
3411 |
-
),
|
3412 |
-
'text-anchor' => array(),
|
3413 |
-
'text-decoration' => array(),
|
3414 |
-
'text-rendering' => array(),
|
3415 |
-
'type' => array(),
|
3416 |
-
'unicode-bidi' => array(),
|
3417 |
-
'values' => array(),
|
3418 |
-
'vector-effect' => array(),
|
3419 |
-
'visibility' => array(),
|
3420 |
-
'width' => array(),
|
3421 |
-
'word-spacing' => array(),
|
3422 |
-
'writing-mode' => array(),
|
3423 |
-
'x' => array(),
|
3424 |
-
'xml:lang' => array(),
|
3425 |
-
'xml:space' => array(),
|
3426 |
-
'xmlns' => array(),
|
3427 |
-
'xmlns:xlink' => array(),
|
3428 |
-
'y' => array(),
|
3429 |
-
),
|
3430 |
-
'tag_spec' => array(
|
3431 |
-
'mandatory_ancestor' => 'svg',
|
3432 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3433 |
-
),
|
3434 |
-
),
|
3435 |
-
),
|
3436 |
-
'fecomposite' => array(
|
3437 |
-
array(
|
3438 |
-
'attr_spec_list' => array(
|
3439 |
-
'alignment-baseline' => array(),
|
3440 |
-
'baseline-shift' => array(),
|
3441 |
-
'clip' => array(),
|
3442 |
-
'clip-path' => array(),
|
3443 |
-
'clip-rule' => array(),
|
3444 |
-
'color' => array(),
|
3445 |
-
'color-interpolation' => array(),
|
3446 |
-
'color-interpolation-filters' => array(),
|
3447 |
-
'color-profile' => array(),
|
3448 |
-
'color-rendering' => array(),
|
3449 |
-
'cursor' => array(),
|
3450 |
-
'direction' => array(),
|
3451 |
-
'display' => array(),
|
3452 |
-
'dominant-baseline' => array(),
|
3453 |
-
'enable-background' => array(),
|
3454 |
-
'fill' => array(),
|
3455 |
-
'fill-opacity' => array(),
|
3456 |
-
'fill-rule' => array(),
|
3457 |
-
'filter' => array(),
|
3458 |
-
'flood-color' => array(),
|
3459 |
-
'flood-opacity' => array(),
|
3460 |
-
'font-family' => array(),
|
3461 |
-
'font-size' => array(),
|
3462 |
-
'font-size-adjust' => array(),
|
3463 |
-
'font-stretch' => array(),
|
3464 |
-
'font-style' => array(),
|
3465 |
-
'font-variant' => array(),
|
3466 |
-
'font-weight' => array(),
|
3467 |
-
'glyph-orientation-horizontal' => array(),
|
3468 |
-
'glyph-orientation-vertical' => array(),
|
3469 |
-
'height' => array(),
|
3470 |
-
'image-rendering' => array(),
|
3471 |
-
'in' => array(),
|
3472 |
-
'in2' => array(),
|
3473 |
-
'k1' => array(),
|
3474 |
-
'k2' => array(),
|
3475 |
-
'k3' => array(),
|
3476 |
-
'k4' => array(),
|
3477 |
-
'kerning' => array(),
|
3478 |
-
'letter-spacing' => array(),
|
3479 |
-
'lighting-color' => array(),
|
3480 |
-
'marker-end' => array(),
|
3481 |
-
'marker-mid' => array(),
|
3482 |
-
'marker-start' => array(),
|
3483 |
-
'mask' => array(),
|
3484 |
-
'opacity' => array(),
|
3485 |
-
'operator' => array(),
|
3486 |
-
'overflow' => array(),
|
3487 |
-
'pointer-events' => array(),
|
3488 |
-
'result' => array(),
|
3489 |
-
'shape-rendering' => array(),
|
3490 |
-
'stop-color' => array(),
|
3491 |
-
'stop-opacity' => array(),
|
3492 |
-
'stroke' => array(),
|
3493 |
-
'stroke-dasharray' => array(),
|
3494 |
-
'stroke-dashoffset' => array(),
|
3495 |
-
'stroke-linecap' => array(),
|
3496 |
-
'stroke-linejoin' => array(),
|
3497 |
-
'stroke-miterlimit' => array(),
|
3498 |
-
'stroke-opacity' => array(),
|
3499 |
-
'stroke-width' => array(),
|
3500 |
-
'style' => array(
|
3501 |
-
'blacklisted_value_regex' => '!important',
|
3502 |
-
),
|
3503 |
-
'text-anchor' => array(),
|
3504 |
-
'text-decoration' => array(),
|
3505 |
-
'text-rendering' => array(),
|
3506 |
-
'unicode-bidi' => array(),
|
3507 |
-
'vector-effect' => array(),
|
3508 |
-
'visibility' => array(),
|
3509 |
-
'width' => array(),
|
3510 |
-
'word-spacing' => array(),
|
3511 |
-
'writing-mode' => array(),
|
3512 |
-
'x' => array(),
|
3513 |
-
'xml:lang' => array(),
|
3514 |
-
'xml:space' => array(),
|
3515 |
-
'xmlns' => array(),
|
3516 |
-
'xmlns:xlink' => array(),
|
3517 |
-
'y' => array(),
|
3518 |
-
),
|
3519 |
-
'tag_spec' => array(
|
3520 |
-
'mandatory_ancestor' => 'svg',
|
3521 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3522 |
-
),
|
3523 |
-
),
|
3524 |
-
),
|
3525 |
-
'feflood' => array(
|
3526 |
-
array(
|
3527 |
-
'attr_spec_list' => array(
|
3528 |
-
'alignment-baseline' => array(),
|
3529 |
-
'baseline-shift' => array(),
|
3530 |
-
'clip' => array(),
|
3531 |
-
'clip-path' => array(),
|
3532 |
-
'clip-rule' => array(),
|
3533 |
-
'color' => array(),
|
3534 |
-
'color-interpolation' => array(),
|
3535 |
-
'color-interpolation-filters' => array(),
|
3536 |
-
'color-profile' => array(),
|
3537 |
-
'color-rendering' => array(),
|
3538 |
-
'cursor' => array(),
|
3539 |
-
'direction' => array(),
|
3540 |
-
'display' => array(),
|
3541 |
-
'dominant-baseline' => array(),
|
3542 |
-
'enable-background' => array(),
|
3543 |
-
'fill' => array(),
|
3544 |
-
'fill-opacity' => array(),
|
3545 |
-
'fill-rule' => array(),
|
3546 |
-
'filter' => array(),
|
3547 |
-
'flood-color' => array(),
|
3548 |
-
'flood-opacity' => array(),
|
3549 |
-
'font-family' => array(),
|
3550 |
-
'font-size' => array(),
|
3551 |
-
'font-size-adjust' => array(),
|
3552 |
-
'font-stretch' => array(),
|
3553 |
-
'font-style' => array(),
|
3554 |
-
'font-variant' => array(),
|
3555 |
-
'font-weight' => array(),
|
3556 |
-
'glyph-orientation-horizontal' => array(),
|
3557 |
-
'glyph-orientation-vertical' => array(),
|
3558 |
-
'height' => array(),
|
3559 |
-
'image-rendering' => array(),
|
3560 |
-
'kerning' => array(),
|
3561 |
-
'letter-spacing' => array(),
|
3562 |
-
'lighting-color' => array(),
|
3563 |
-
'marker-end' => array(),
|
3564 |
-
'marker-mid' => array(),
|
3565 |
-
'marker-start' => array(),
|
3566 |
-
'mask' => array(),
|
3567 |
-
'opacity' => array(),
|
3568 |
-
'overflow' => array(),
|
3569 |
-
'pointer-events' => array(),
|
3570 |
-
'result' => array(),
|
3571 |
-
'shape-rendering' => array(),
|
3572 |
-
'stop-color' => array(),
|
3573 |
-
'stop-opacity' => array(),
|
3574 |
-
'stroke' => array(),
|
3575 |
-
'stroke-dasharray' => array(),
|
3576 |
-
'stroke-dashoffset' => array(),
|
3577 |
-
'stroke-linecap' => array(),
|
3578 |
-
'stroke-linejoin' => array(),
|
3579 |
-
'stroke-miterlimit' => array(),
|
3580 |
-
'stroke-opacity' => array(),
|
3581 |
-
'stroke-width' => array(),
|
3582 |
-
'style' => array(
|
3583 |
-
'blacklisted_value_regex' => '!important',
|
3584 |
-
),
|
3585 |
-
'text-anchor' => array(),
|
3586 |
-
'text-decoration' => array(),
|
3587 |
-
'text-rendering' => array(),
|
3588 |
-
'unicode-bidi' => array(),
|
3589 |
-
'vector-effect' => array(),
|
3590 |
-
'visibility' => array(),
|
3591 |
-
'width' => array(),
|
3592 |
-
'word-spacing' => array(),
|
3593 |
-
'writing-mode' => array(),
|
3594 |
-
'x' => array(),
|
3595 |
-
'xml:lang' => array(),
|
3596 |
-
'xml:space' => array(),
|
3597 |
-
'xmlns' => array(),
|
3598 |
-
'xmlns:xlink' => array(),
|
3599 |
-
'y' => array(),
|
3600 |
-
),
|
3601 |
-
'tag_spec' => array(
|
3602 |
-
'mandatory_ancestor' => 'svg',
|
3603 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3604 |
-
),
|
3605 |
-
),
|
3606 |
-
),
|
3607 |
-
'fegaussianblur' => array(
|
3608 |
-
array(
|
3609 |
-
'attr_spec_list' => array(
|
3610 |
-
'alignment-baseline' => array(),
|
3611 |
-
'baseline-shift' => array(),
|
3612 |
-
'clip' => array(),
|
3613 |
-
'clip-path' => array(),
|
3614 |
-
'clip-rule' => array(),
|
3615 |
-
'color' => array(),
|
3616 |
-
'color-interpolation' => array(),
|
3617 |
-
'color-interpolation-filters' => array(),
|
3618 |
-
'color-profile' => array(),
|
3619 |
-
'color-rendering' => array(),
|
3620 |
-
'cursor' => array(),
|
3621 |
-
'direction' => array(),
|
3622 |
-
'display' => array(),
|
3623 |
-
'dominant-baseline' => array(),
|
3624 |
-
'edgemode' => array(),
|
3625 |
-
'enable-background' => array(),
|
3626 |
-
'fill' => array(),
|
3627 |
-
'fill-opacity' => array(),
|
3628 |
-
'fill-rule' => array(),
|
3629 |
-
'filter' => array(),
|
3630 |
-
'flood-color' => array(),
|
3631 |
-
'flood-opacity' => array(),
|
3632 |
-
'font-family' => array(),
|
3633 |
-
'font-size' => array(),
|
3634 |
-
'font-size-adjust' => array(),
|
3635 |
-
'font-stretch' => array(),
|
3636 |
-
'font-style' => array(),
|
3637 |
-
'font-variant' => array(),
|
3638 |
-
'font-weight' => array(),
|
3639 |
-
'glyph-orientation-horizontal' => array(),
|
3640 |
-
'glyph-orientation-vertical' => array(),
|
3641 |
-
'height' => array(),
|
3642 |
-
'image-rendering' => array(),
|
3643 |
-
'in' => array(),
|
3644 |
-
'kerning' => array(),
|
3645 |
-
'letter-spacing' => array(),
|
3646 |
-
'lighting-color' => array(),
|
3647 |
-
'marker-end' => array(),
|
3648 |
-
'marker-mid' => array(),
|
3649 |
-
'marker-start' => array(),
|
3650 |
-
'mask' => array(),
|
3651 |
-
'opacity' => array(),
|
3652 |
-
'overflow' => array(),
|
3653 |
-
'pointer-events' => array(),
|
3654 |
-
'result' => array(),
|
3655 |
-
'shape-rendering' => array(),
|
3656 |
-
'stddeviation' => array(),
|
3657 |
-
'stop-color' => array(),
|
3658 |
-
'stop-opacity' => array(),
|
3659 |
-
'stroke' => array(),
|
3660 |
-
'stroke-dasharray' => array(),
|
3661 |
-
'stroke-dashoffset' => array(),
|
3662 |
-
'stroke-linecap' => array(),
|
3663 |
-
'stroke-linejoin' => array(),
|
3664 |
-
'stroke-miterlimit' => array(),
|
3665 |
-
'stroke-opacity' => array(),
|
3666 |
-
'stroke-width' => array(),
|
3667 |
-
'style' => array(
|
3668 |
-
'blacklisted_value_regex' => '!important',
|
3669 |
-
),
|
3670 |
-
'text-anchor' => array(),
|
3671 |
-
'text-decoration' => array(),
|
3672 |
-
'text-rendering' => array(),
|
3673 |
-
'unicode-bidi' => array(),
|
3674 |
-
'vector-effect' => array(),
|
3675 |
-
'visibility' => array(),
|
3676 |
-
'width' => array(),
|
3677 |
-
'word-spacing' => array(),
|
3678 |
-
'writing-mode' => array(),
|
3679 |
-
'x' => array(),
|
3680 |
-
'xml:lang' => array(),
|
3681 |
-
'xml:space' => array(),
|
3682 |
-
'xmlns' => array(),
|
3683 |
-
'xmlns:xlink' => array(),
|
3684 |
-
'y' => array(),
|
3685 |
-
),
|
3686 |
-
'tag_spec' => array(
|
3687 |
-
'mandatory_ancestor' => 'svg',
|
3688 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3689 |
-
),
|
3690 |
-
),
|
3691 |
-
),
|
3692 |
-
'femerge' => array(
|
3693 |
-
array(
|
3694 |
-
'attr_spec_list' => array(
|
3695 |
-
'alignment-baseline' => array(),
|
3696 |
-
'baseline-shift' => array(),
|
3697 |
-
'clip' => array(),
|
3698 |
-
'clip-path' => array(),
|
3699 |
-
'clip-rule' => array(),
|
3700 |
-
'color' => array(),
|
3701 |
-
'color-interpolation' => array(),
|
3702 |
-
'color-interpolation-filters' => array(),
|
3703 |
-
'color-profile' => array(),
|
3704 |
-
'color-rendering' => array(),
|
3705 |
-
'cursor' => array(),
|
3706 |
-
'direction' => array(),
|
3707 |
-
'display' => array(),
|
3708 |
-
'dominant-baseline' => array(),
|
3709 |
-
'enable-background' => array(),
|
3710 |
-
'fill' => array(),
|
3711 |
-
'fill-opacity' => array(),
|
3712 |
-
'fill-rule' => array(),
|
3713 |
-
'filter' => array(),
|
3714 |
-
'flood-color' => array(),
|
3715 |
-
'flood-opacity' => array(),
|
3716 |
-
'font-family' => array(),
|
3717 |
-
'font-size' => array(),
|
3718 |
-
'font-size-adjust' => array(),
|
3719 |
-
'font-stretch' => array(),
|
3720 |
-
'font-style' => array(),
|
3721 |
-
'font-variant' => array(),
|
3722 |
-
'font-weight' => array(),
|
3723 |
-
'glyph-orientation-horizontal' => array(),
|
3724 |
-
'glyph-orientation-vertical' => array(),
|
3725 |
-
'height' => array(),
|
3726 |
-
'image-rendering' => array(),
|
3727 |
-
'kerning' => array(),
|
3728 |
-
'letter-spacing' => array(),
|
3729 |
-
'lighting-color' => array(),
|
3730 |
-
'marker-end' => array(),
|
3731 |
-
'marker-mid' => array(),
|
3732 |
-
'marker-start' => array(),
|
3733 |
-
'mask' => array(),
|
3734 |
-
'opacity' => array(),
|
3735 |
-
'overflow' => array(),
|
3736 |
-
'pointer-events' => array(),
|
3737 |
-
'result' => array(),
|
3738 |
-
'shape-rendering' => array(),
|
3739 |
-
'stop-color' => array(),
|
3740 |
-
'stop-opacity' => array(),
|
3741 |
-
'stroke' => array(),
|
3742 |
-
'stroke-dasharray' => array(),
|
3743 |
-
'stroke-dashoffset' => array(),
|
3744 |
-
'stroke-linecap' => array(),
|
3745 |
-
'stroke-linejoin' => array(),
|
3746 |
-
'stroke-miterlimit' => array(),
|
3747 |
-
'stroke-opacity' => array(),
|
3748 |
-
'stroke-width' => array(),
|
3749 |
-
'style' => array(
|
3750 |
-
'blacklisted_value_regex' => '!important',
|
3751 |
-
),
|
3752 |
-
'text-anchor' => array(),
|
3753 |
-
'text-decoration' => array(),
|
3754 |
-
'text-rendering' => array(),
|
3755 |
-
'unicode-bidi' => array(),
|
3756 |
-
'vector-effect' => array(),
|
3757 |
-
'visibility' => array(),
|
3758 |
-
'width' => array(),
|
3759 |
-
'word-spacing' => array(),
|
3760 |
-
'writing-mode' => array(),
|
3761 |
-
'x' => array(),
|
3762 |
-
'xml:lang' => array(),
|
3763 |
-
'xml:space' => array(),
|
3764 |
-
'xmlns' => array(),
|
3765 |
-
'xmlns:xlink' => array(),
|
3766 |
-
'y' => array(),
|
3767 |
-
),
|
3768 |
-
'tag_spec' => array(
|
3769 |
-
'mandatory_ancestor' => 'svg',
|
3770 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3771 |
-
),
|
3772 |
-
),
|
3773 |
-
),
|
3774 |
-
'femergenode' => array(
|
3775 |
-
array(
|
3776 |
-
'attr_spec_list' => array(
|
3777 |
-
'in' => array(),
|
3778 |
-
'style' => array(
|
3779 |
-
'blacklisted_value_regex' => '!important',
|
3780 |
-
),
|
3781 |
-
'xml:lang' => array(),
|
3782 |
-
'xml:space' => array(),
|
3783 |
-
'xmlns' => array(),
|
3784 |
-
'xmlns:xlink' => array(),
|
3785 |
-
),
|
3786 |
-
'tag_spec' => array(
|
3787 |
-
'mandatory_ancestor' => 'svg',
|
3788 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3789 |
-
),
|
3790 |
-
),
|
3791 |
-
),
|
3792 |
-
'feoffset' => array(
|
3793 |
-
array(
|
3794 |
-
'attr_spec_list' => array(
|
3795 |
-
'alignment-baseline' => array(),
|
3796 |
-
'baseline-shift' => array(),
|
3797 |
-
'clip' => array(),
|
3798 |
-
'clip-path' => array(),
|
3799 |
-
'clip-rule' => array(),
|
3800 |
-
'color' => array(),
|
3801 |
-
'color-interpolation' => array(),
|
3802 |
-
'color-interpolation-filters' => array(),
|
3803 |
-
'color-profile' => array(),
|
3804 |
-
'color-rendering' => array(),
|
3805 |
-
'cursor' => array(),
|
3806 |
-
'direction' => array(),
|
3807 |
-
'display' => array(),
|
3808 |
-
'dominant-baseline' => array(),
|
3809 |
-
'dx' => array(),
|
3810 |
-
'dy' => array(),
|
3811 |
-
'enable-background' => array(),
|
3812 |
-
'fill' => array(),
|
3813 |
-
'fill-opacity' => array(),
|
3814 |
-
'fill-rule' => array(),
|
3815 |
-
'filter' => array(),
|
3816 |
-
'flood-color' => array(),
|
3817 |
-
'flood-opacity' => array(),
|
3818 |
-
'font-family' => array(),
|
3819 |
-
'font-size' => array(),
|
3820 |
-
'font-size-adjust' => array(),
|
3821 |
-
'font-stretch' => array(),
|
3822 |
-
'font-style' => array(),
|
3823 |
-
'font-variant' => array(),
|
3824 |
-
'font-weight' => array(),
|
3825 |
-
'glyph-orientation-horizontal' => array(),
|
3826 |
-
'glyph-orientation-vertical' => array(),
|
3827 |
-
'height' => array(),
|
3828 |
-
'image-rendering' => array(),
|
3829 |
-
'in' => array(),
|
3830 |
-
'kerning' => array(),
|
3831 |
-
'letter-spacing' => array(),
|
3832 |
-
'lighting-color' => array(),
|
3833 |
-
'marker-end' => array(),
|
3834 |
-
'marker-mid' => array(),
|
3835 |
-
'marker-start' => array(),
|
3836 |
-
'mask' => array(),
|
3837 |
-
'opacity' => array(),
|
3838 |
-
'overflow' => array(),
|
3839 |
-
'pointer-events' => array(),
|
3840 |
-
'result' => array(),
|
3841 |
-
'shape-rendering' => array(),
|
3842 |
-
'stop-color' => array(),
|
3843 |
-
'stop-opacity' => array(),
|
3844 |
-
'stroke' => array(),
|
3845 |
-
'stroke-dasharray' => array(),
|
3846 |
-
'stroke-dashoffset' => array(),
|
3847 |
-
'stroke-linecap' => array(),
|
3848 |
-
'stroke-linejoin' => array(),
|
3849 |
-
'stroke-miterlimit' => array(),
|
3850 |
-
'stroke-opacity' => array(),
|
3851 |
-
'stroke-width' => array(),
|
3852 |
-
'style' => array(
|
3853 |
-
'blacklisted_value_regex' => '!important',
|
3854 |
-
),
|
3855 |
-
'text-anchor' => array(),
|
3856 |
-
'text-decoration' => array(),
|
3857 |
-
'text-rendering' => array(),
|
3858 |
-
'unicode-bidi' => array(),
|
3859 |
-
'vector-effect' => array(),
|
3860 |
-
'visibility' => array(),
|
3861 |
-
'width' => array(),
|
3862 |
-
'word-spacing' => array(),
|
3863 |
-
'writing-mode' => array(),
|
3864 |
-
'x' => array(),
|
3865 |
-
'xml:lang' => array(),
|
3866 |
-
'xml:space' => array(),
|
3867 |
-
'xmlns' => array(),
|
3868 |
-
'xmlns:xlink' => array(),
|
3869 |
-
'y' => array(),
|
3870 |
-
),
|
3871 |
-
'tag_spec' => array(
|
3872 |
-
'mandatory_ancestor' => 'svg',
|
3873 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
3874 |
-
),
|
3875 |
-
),
|
3876 |
-
),
|
3877 |
-
'fieldset' => array(
|
3878 |
-
array(
|
3879 |
-
'attr_spec_list' => array(
|
3880 |
-
'[disabled]' => array(),
|
3881 |
-
'disabled' => array(),
|
3882 |
-
'name' => array(
|
3883 |
-
'blacklisted_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|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|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|$)',
|
3884 |
-
),
|
3885 |
-
),
|
3886 |
-
'tag_spec' => array(),
|
3887 |
-
),
|
3888 |
-
),
|
3889 |
-
'figcaption' => array(
|
3890 |
-
array(
|
3891 |
-
'attr_spec_list' => array(),
|
3892 |
-
'tag_spec' => array(),
|
3893 |
-
),
|
3894 |
-
),
|
3895 |
-
'figure' => array(
|
3896 |
-
array(
|
3897 |
-
'attr_spec_list' => array(),
|
3898 |
-
'tag_spec' => array(),
|
3899 |
-
),
|
3900 |
-
),
|
3901 |
-
'filter' => array(
|
3902 |
-
array(
|
3903 |
-
'attr_spec_list' => array(
|
3904 |
-
'alignment-baseline' => array(),
|
3905 |
-
'baseline-shift' => array(),
|
3906 |
-
'clip' => array(),
|
3907 |
-
'clip-path' => array(),
|
3908 |
-
'clip-rule' => array(),
|
3909 |
-
'color' => array(),
|
3910 |
-
'color-interpolation' => array(),
|
3911 |
-
'color-interpolation-filters' => array(),
|
3912 |
-
'color-profile' => array(),
|
3913 |
-
'color-rendering' => array(),
|
3914 |
-
'cursor' => array(),
|
3915 |
-
'direction' => array(),
|
3916 |
-
'display' => array(),
|
3917 |
-
'dominant-baseline' => array(),
|
3918 |
-
'enable-background' => array(),
|
3919 |
-
'externalresourcesrequired' => array(),
|
3920 |
-
'fill' => array(),
|
3921 |
-
'fill-opacity' => array(),
|
3922 |
-
'fill-rule' => array(),
|
3923 |
-
'filter' => array(),
|
3924 |
-
'filterres' => array(),
|
3925 |
-
'filterunits' => array(),
|
3926 |
-
'flood-color' => array(),
|
3927 |
-
'flood-opacity' => array(),
|
3928 |
-
'font-family' => array(),
|
3929 |
-
'font-size' => array(),
|
3930 |
-
'font-size-adjust' => array(),
|
3931 |
-
'font-stretch' => array(),
|
3932 |
-
'font-style' => array(),
|
3933 |
-
'font-variant' => array(),
|
3934 |
-
'font-weight' => array(),
|
3935 |
-
'glyph-orientation-horizontal' => array(),
|
3936 |
-
'glyph-orientation-vertical' => array(),
|
3937 |
-
'height' => array(),
|
3938 |
-
'image-rendering' => array(),
|
3939 |
-
'kerning' => array(),
|
3940 |
-
'letter-spacing' => array(),
|
3941 |
-
'lighting-color' => array(),
|
3942 |
-
'marker-end' => array(),
|
3943 |
-
'marker-mid' => array(),
|
3944 |
-
'marker-start' => array(),
|
3945 |
-
'mask' => array(),
|
3946 |
-
'opacity' => array(),
|
3947 |
-
'overflow' => array(),
|
3948 |
-
'pointer-events' => array(),
|
3949 |
-
'primitiveunits' => array(),
|
3950 |
-
'shape-rendering' => array(),
|
3951 |
-
'stop-color' => array(),
|
3952 |
-
'stop-opacity' => array(),
|
3953 |
-
'stroke' => array(),
|
3954 |
-
'stroke-dasharray' => array(),
|
3955 |
-
'stroke-dashoffset' => array(),
|
3956 |
-
'stroke-linecap' => array(),
|
3957 |
-
'stroke-linejoin' => array(),
|
3958 |
-
'stroke-miterlimit' => array(),
|
3959 |
-
'stroke-opacity' => array(),
|
3960 |
-
'stroke-width' => array(),
|
3961 |
-
'style' => array(
|
3962 |
-
'blacklisted_value_regex' => '!important',
|
3963 |
-
),
|
3964 |
-
'text-anchor' => array(),
|
3965 |
-
'text-decoration' => array(),
|
3966 |
-
'text-rendering' => array(),
|
3967 |
-
'unicode-bidi' => array(),
|
3968 |
-
'vector-effect' => array(),
|
3969 |
-
'visibility' => array(),
|
3970 |
-
'width' => array(),
|
3971 |
-
'word-spacing' => array(),
|
3972 |
-
'writing-mode' => array(),
|
3973 |
-
'x' => array(),
|
3974 |
-
'xlink:actuate' => array(),
|
3975 |
-
'xlink:arcrole' => array(),
|
3976 |
-
'xlink:href' => array(
|
3977 |
-
'alternative_names' => array(
|
3978 |
-
'href',
|
3979 |
-
),
|
3980 |
-
'value_url' => array(
|
3981 |
-
'allow_empty' => false,
|
3982 |
-
'allow_relative' => true,
|
3983 |
-
'allowed_protocol' => array(
|
3984 |
-
'http',
|
3985 |
-
'https',
|
3986 |
-
),
|
3987 |
-
),
|
3988 |
-
),
|
3989 |
-
'xlink:role' => array(),
|
3990 |
-
'xlink:show' => array(),
|
3991 |
-
'xlink:title' => array(),
|
3992 |
-
'xlink:type' => array(),
|
3993 |
-
'xml:lang' => array(),
|
3994 |
-
'xml:space' => array(),
|
3995 |
-
'xmlns' => array(),
|
3996 |
-
'xmlns:xlink' => array(),
|
3997 |
-
'y' => array(),
|
3998 |
-
),
|
3999 |
-
'tag_spec' => array(
|
4000 |
-
'mandatory_ancestor' => 'svg',
|
4001 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
4002 |
-
),
|
4003 |
-
),
|
4004 |
-
),
|
4005 |
-
'footer' => array(
|
4006 |
-
array(
|
4007 |
-
'attr_spec_list' => array(),
|
4008 |
-
'tag_spec' => array(),
|
4009 |
-
),
|
4010 |
-
),
|
4011 |
-
'foreignobject' => array(
|
4012 |
-
array(
|
4013 |
-
'attr_spec_list' => array(
|
4014 |
-
'alignment-baseline' => array(),
|
4015 |
-
'baseline-shift' => array(),
|
4016 |
-
'clip' => array(),
|
4017 |
-
'clip-path' => array(),
|
4018 |
-
'clip-rule' => array(),
|
4019 |
-
'color' => array(),
|
4020 |
-
'color-interpolation' => array(),
|
4021 |
-
'color-interpolation-filters' => array(),
|
4022 |
-
'color-profile' => array(),
|
4023 |
-
'color-rendering' => array(),
|
4024 |
-
'cursor' => array(),
|
4025 |
-
'direction' => array(),
|
4026 |
-
'display' => array(),
|
4027 |
-
'dominant-baseline' => array(),
|
4028 |
-
'enable-background' => array(),
|
4029 |
-
'externalresourcesrequired' => array(),
|
4030 |
-
'fill' => array(),
|
4031 |
-
'fill-opacity' => array(),
|
4032 |
-
'fill-rule' => array(),
|
4033 |
-
'filter' => array(),
|
4034 |
-
'flood-color' => array(),
|
4035 |
-
'flood-opacity' => array(),
|
4036 |
-
'font-family' => array(),
|
4037 |
-
'font-size' => array(),
|
4038 |
-
'font-size-adjust' => array(),
|
4039 |
-
'font-stretch' => array(),
|
4040 |
-
'font-style' => array(),
|
4041 |
-
'font-variant' => array(),
|
4042 |
-
'font-weight' => array(),
|
4043 |
-
'glyph-orientation-horizontal' => array(),
|
4044 |
-
'glyph-orientation-vertical' => array(),
|
4045 |
-
'height' => array(),
|
4046 |
-
'image-rendering' => array(),
|
4047 |
-
'kerning' => array(),
|
4048 |
-
'letter-spacing' => array(),
|
4049 |
-
'lighting-color' => array(),
|
4050 |
-
'marker-end' => array(),
|
4051 |
-
'marker-mid' => array(),
|
4052 |
-
'marker-start' => array(),
|
4053 |
-
'mask' => array(),
|
4054 |
-
'opacity' => array(),
|
4055 |
-
'overflow' => array(),
|
4056 |
-
'pointer-events' => array(),
|
4057 |
-
'requiredextensions' => array(),
|
4058 |
-
'requiredfeatures' => array(),
|
4059 |
-
'shape-rendering' => array(),
|
4060 |
-
'stop-color' => array(),
|
4061 |
-
'stop-opacity' => array(),
|
4062 |
-
'stroke' => array(),
|
4063 |
-
'stroke-dasharray' => array(),
|
4064 |
-
'stroke-dashoffset' => array(),
|
4065 |
-
'stroke-linecap' => array(),
|
4066 |
-
'stroke-linejoin' => array(),
|
4067 |
-
'stroke-miterlimit' => array(),
|
4068 |
-
'stroke-opacity' => array(),
|
4069 |
-
'stroke-width' => array(),
|
4070 |
-
'style' => array(
|
4071 |
-
'blacklisted_value_regex' => '!important',
|
4072 |
-
),
|
4073 |
-
'systemlanguage' => array(),
|
4074 |
-
'text-anchor' => array(),
|
4075 |
-
'text-decoration' => array(),
|
4076 |
-
'text-rendering' => array(),
|
4077 |
-
'transform' => array(),
|
4078 |
-
'unicode-bidi' => array(),
|
4079 |
-
'vector-effect' => array(),
|
4080 |
-
'visibility' => array(),
|
4081 |
-
'width' => array(),
|
4082 |
-
'word-spacing' => array(),
|
4083 |
-
'writing-mode' => array(),
|
4084 |
-
'x' => array(),
|
4085 |
-
'xml:lang' => array(),
|
4086 |
-
'xml:space' => array(),
|
4087 |
-
'xmlns' => array(),
|
4088 |
-
'xmlns:xlink' => array(),
|
4089 |
-
'y' => array(),
|
4090 |
-
),
|
4091 |
-
'tag_spec' => array(
|
4092 |
-
'mandatory_ancestor' => 'svg',
|
4093 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
4094 |
-
),
|
4095 |
-
),
|
4096 |
-
),
|
4097 |
-
'form' => array(
|
4098 |
-
array(
|
4099 |
-
'attr_spec_list' => array(
|
4100 |
-
'accept' => array(),
|
4101 |
-
'accept-charset' => array(),
|
4102 |
-
'action' => array(
|
4103 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
4104 |
-
'mandatory' => true,
|
4105 |
-
'value_url' => array(
|
4106 |
-
'allow_relative' => true,
|
4107 |
-
'allowed_protocol' => array(
|
4108 |
-
'https',
|
4109 |
-
),
|
4110 |
-
),
|
4111 |
-
),
|
4112 |
-
'action-xhr' => array(
|
4113 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
4114 |
-
'value_url' => array(
|
4115 |
-
'allow_relative' => true,
|
4116 |
-
'allowed_protocol' => array(
|
4117 |
-
'https',
|
4118 |
-
),
|
4119 |
-
),
|
4120 |
-
),
|
4121 |
-
'autocomplete' => array(),
|
4122 |
-
'custom-validation-reporting' => array(
|
4123 |
-
'value_regex' => '(show-first-on-submit|show-all-on-submit|as-you-go|interact-and-submit)',
|
4124 |
-
),
|
4125 |
-
'enctype' => array(),
|
4126 |
-
'method' => array(
|
4127 |
-
'value_casei' => 'get',
|
4128 |
-
),
|
4129 |
-
'name' => array(),
|
4130 |
-
'novalidate' => array(),
|
4131 |
-
'target' => array(
|
4132 |
-
'mandatory' => true,
|
4133 |
-
'value_regex_casei' => '(_blank|_top)',
|
4134 |
-
),
|
4135 |
-
'verify-xhr' => array(
|
4136 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
4137 |
-
'value_url' => array(
|
4138 |
-
'allow_relative' => true,
|
4139 |
-
'allowed_protocol' => array(
|
4140 |
-
'https',
|
4141 |
-
),
|
4142 |
-
),
|
4143 |
-
),
|
4144 |
-
),
|
4145 |
-
'tag_spec' => array(
|
4146 |
-
'disallowed_ancestor' => array(
|
4147 |
-
'amp-app-banner',
|
4148 |
-
),
|
4149 |
-
'requires_extension' => array(
|
4150 |
-
'amp-form',
|
4151 |
-
),
|
4152 |
-
'spec_name' => 'FORM [method=GET]',
|
4153 |
-
),
|
4154 |
-
),
|
4155 |
-
array(
|
4156 |
-
'attr_spec_list' => array(
|
4157 |
-
'accept' => array(),
|
4158 |
-
'accept-charset' => array(),
|
4159 |
-
'action-xhr' => array(
|
4160 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
4161 |
-
'mandatory' => true,
|
4162 |
-
'value_url' => array(
|
4163 |
-
'allow_relative' => true,
|
4164 |
-
'allowed_protocol' => array(
|
4165 |
-
'https',
|
4166 |
-
),
|
4167 |
-
),
|
4168 |
-
),
|
4169 |
-
'autocomplete' => array(),
|
4170 |
-
'custom-validation-reporting' => array(
|
4171 |
-
'value_regex' => '(show-first-on-submit|show-all-on-submit|as-you-go)',
|
4172 |
-
),
|
4173 |
-
'enctype' => array(),
|
4174 |
-
'method' => array(
|
4175 |
-
'dispatch_key' => 2,
|
4176 |
-
'mandatory' => true,
|
4177 |
-
'value_casei' => 'post',
|
4178 |
-
),
|
4179 |
-
'name' => array(),
|
4180 |
-
'novalidate' => array(),
|
4181 |
-
'target' => array(
|
4182 |
-
'mandatory' => true,
|
4183 |
-
'value_regex_casei' => '(_blank|_top)',
|
4184 |
-
),
|
4185 |
-
'verify-xhr' => array(
|
4186 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
4187 |
-
'value_url' => array(
|
4188 |
-
'allow_relative' => true,
|
4189 |
-
'allowed_protocol' => array(
|
4190 |
-
'https',
|
4191 |
-
),
|
4192 |
-
),
|
4193 |
-
),
|
4194 |
-
),
|
4195 |
-
'tag_spec' => array(
|
4196 |
-
'disallowed_ancestor' => array(
|
4197 |
-
'amp-app-banner',
|
4198 |
-
),
|
4199 |
-
'requires_extension' => array(
|
4200 |
-
'amp-form',
|
4201 |
-
),
|
4202 |
-
'spec_name' => 'FORM [method=POST]',
|
4203 |
-
),
|
4204 |
-
),
|
4205 |
-
),
|
4206 |
-
'g' => array(
|
4207 |
-
array(
|
4208 |
-
'attr_spec_list' => array(
|
4209 |
-
'alignment-baseline' => array(),
|
4210 |
-
'baseline-shift' => array(),
|
4211 |
-
'clip' => array(),
|
4212 |
-
'clip-path' => array(),
|
4213 |
-
'clip-rule' => array(),
|
4214 |
-
'color' => array(),
|
4215 |
-
'color-interpolation' => array(),
|
4216 |
-
'color-interpolation-filters' => array(),
|
4217 |
-
'color-profile' => array(),
|
4218 |
-
'color-rendering' => array(),
|
4219 |
-
'cursor' => array(),
|
4220 |
-
'direction' => array(),
|
4221 |
-
'display' => array(),
|
4222 |
-
'dominant-baseline' => array(),
|
4223 |
-
'enable-background' => array(),
|
4224 |
-
'externalresourcesrequired' => array(),
|
4225 |
-
'fill' => array(),
|
4226 |
-
'fill-opacity' => array(),
|
4227 |
-
'fill-rule' => array(),
|
4228 |
-
'filter' => array(),
|
4229 |
-
'flood-color' => array(),
|
4230 |
-
'flood-opacity' => array(),
|
4231 |
-
'font-family' => array(),
|
4232 |
-
'font-size' => array(),
|
4233 |
-
'font-size-adjust' => array(),
|
4234 |
-
'font-stretch' => array(),
|
4235 |
-
'font-style' => array(),
|
4236 |
-
'font-variant' => array(),
|
4237 |
-
'font-weight' => array(),
|
4238 |
-
'glyph-orientation-horizontal' => array(),
|
4239 |
-
'glyph-orientation-vertical' => array(),
|
4240 |
-
'image-rendering' => array(),
|
4241 |
-
'kerning' => array(),
|
4242 |
-
'letter-spacing' => array(),
|
4243 |
-
'lighting-color' => array(),
|
4244 |
-
'marker-end' => array(),
|
4245 |
-
'marker-mid' => array(),
|
4246 |
-
'marker-start' => array(),
|
4247 |
-
'mask' => array(),
|
4248 |
-
'opacity' => array(),
|
4249 |
-
'overflow' => array(),
|
4250 |
-
'pointer-events' => array(),
|
4251 |
-
'requiredextensions' => array(),
|
4252 |
-
'requiredfeatures' => array(),
|
4253 |
-
'shape-rendering' => array(),
|
4254 |
-
'stop-color' => array(),
|
4255 |
-
'stop-opacity' => array(),
|
4256 |
-
'stroke' => array(),
|
4257 |
-
'stroke-dasharray' => array(),
|
4258 |
-
'stroke-dashoffset' => array(),
|
4259 |
-
'stroke-linecap' => array(),
|
4260 |
-
'stroke-linejoin' => array(),
|
4261 |
-
'stroke-miterlimit' => array(),
|
4262 |
-
'stroke-opacity' => array(),
|
4263 |
-
'stroke-width' => array(),
|
4264 |
-
'style' => array(
|
4265 |
-
'blacklisted_value_regex' => '!important',
|
4266 |
-
),
|
4267 |
-
'systemlanguage' => array(),
|
4268 |
-
'text-anchor' => array(),
|
4269 |
-
'text-decoration' => array(),
|
4270 |
-
'text-rendering' => array(),
|
4271 |
-
'transform' => array(),
|
4272 |
-
'unicode-bidi' => array(),
|
4273 |
-
'vector-effect' => array(),
|
4274 |
-
'visibility' => array(),
|
4275 |
-
'word-spacing' => array(),
|
4276 |
-
'writing-mode' => array(),
|
4277 |
-
'xml:lang' => array(),
|
4278 |
-
'xml:space' => array(),
|
4279 |
-
'xmlns' => array(),
|
4280 |
-
'xmlns:xlink' => array(),
|
4281 |
-
),
|
4282 |
-
'tag_spec' => array(
|
4283 |
-
'mandatory_ancestor' => 'svg',
|
4284 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
4285 |
-
),
|
4286 |
-
),
|
4287 |
-
),
|
4288 |
-
'glyph' => array(
|
4289 |
-
array(
|
4290 |
-
'attr_spec_list' => array(
|
4291 |
-
'alignment-baseline' => array(),
|
4292 |
-
'arabic-form' => array(),
|
4293 |
-
'baseline-shift' => array(),
|
4294 |
-
'clip' => array(),
|
4295 |
-
'clip-path' => array(),
|
4296 |
-
'clip-rule' => array(),
|
4297 |
-
'color' => array(),
|
4298 |
-
'color-interpolation' => array(),
|
4299 |
-
'color-interpolation-filters' => array(),
|
4300 |
-
'color-profile' => array(),
|
4301 |
-
'color-rendering' => array(),
|
4302 |
-
'cursor' => array(),
|
4303 |
-
'd' => array(),
|
4304 |
-
'direction' => array(),
|
4305 |
-
'display' => array(),
|
4306 |
-
'dominant-baseline' => array(),
|
4307 |
-
'enable-background' => array(),
|
4308 |
-
'fill' => array(),
|
4309 |
-
'fill-opacity' => array(),
|
4310 |
-
'fill-rule' => array(),
|
4311 |
-
'filter' => array(),
|
4312 |
-
'flood-color' => array(),
|
4313 |
-
'flood-opacity' => array(),
|
4314 |
-
'font-family' => array(),
|
4315 |
-
'font-size' => array(),
|
4316 |
-
'font-size-adjust' => array(),
|
4317 |
-
'font-stretch' => array(),
|
4318 |
-
'font-style' => array(),
|
4319 |
-
'font-variant' => array(),
|
4320 |
-
'font-weight' => array(),
|
4321 |
-
'glyph-name' => array(),
|
4322 |
-
'glyph-orientation-horizontal' => array(),
|
4323 |
-
'glyph-orientation-vertical' => array(),
|
4324 |
-
'horiz-adv-x' => array(),
|
4325 |
-
'image-rendering' => array(),
|
4326 |
-
'kerning' => array(),
|
4327 |
-
'letter-spacing' => array(),
|
4328 |
-
'lighting-color' => array(),
|
4329 |
-
'marker-end' => array(),
|
4330 |
-
'marker-mid' => array(),
|
4331 |
-
'marker-start' => array(),
|
4332 |
-
'mask' => array(),
|
4333 |
-
'opacity' => array(),
|
4334 |
-
'orientation' => array(),
|
4335 |
-
'overflow' => array(),
|
4336 |
-
'pointer-events' => array(),
|
4337 |
-
'shape-rendering' => array(),
|
4338 |
-
'stop-color' => array(),
|
4339 |
-
'stop-opacity' => array(),
|
4340 |
-
'stroke' => array(),
|
4341 |
-
'stroke-dasharray' => array(),
|
4342 |
-
'stroke-dashoffset' => array(),
|
4343 |
-
'stroke-linecap' => array(),
|
4344 |
-
'stroke-linejoin' => array(),
|
4345 |
-
'stroke-miterlimit' => array(),
|
4346 |
-
'stroke-opacity' => array(),
|
4347 |
-
'stroke-width' => array(),
|
4348 |
-
'style' => array(
|
4349 |
-
'blacklisted_value_regex' => '!important',
|
4350 |
-
),
|
4351 |
-
'text-anchor' => array(),
|
4352 |
-
'text-decoration' => array(),
|
4353 |
-
'text-rendering' => array(),
|
4354 |
-
'unicode' => array(),
|
4355 |
-
'unicode-bidi' => array(),
|
4356 |
-
'vector-effect' => array(),
|
4357 |
-
'vert-adv-y' => array(),
|
4358 |
-
'vert-origin-x' => array(),
|
4359 |
-
'vert-origin-y' => array(),
|
4360 |
-
'visibility' => array(),
|
4361 |
-
'word-spacing' => array(),
|
4362 |
-
'writing-mode' => array(),
|
4363 |
-
'xml:lang' => array(),
|
4364 |
-
'xml:space' => array(),
|
4365 |
-
'xmlns' => array(),
|
4366 |
-
'xmlns:xlink' => array(),
|
4367 |
-
),
|
4368 |
-
'tag_spec' => array(
|
4369 |
-
'mandatory_ancestor' => 'svg',
|
4370 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
4371 |
-
),
|
4372 |
-
),
|
4373 |
-
),
|
4374 |
-
'glyphref' => array(
|
4375 |
-
array(
|
4376 |
-
'attr_spec_list' => array(
|
4377 |
-
'alignment-baseline' => array(),
|
4378 |
-
'baseline-shift' => array(),
|
4379 |
-
'clip' => array(),
|
4380 |
-
'clip-path' => array(),
|
4381 |
-
'clip-rule' => array(),
|
4382 |
-
'color' => array(),
|
4383 |
-
'color-interpolation' => array(),
|
4384 |
-
'color-interpolation-filters' => array(),
|
4385 |
-
'color-profile' => array(),
|
4386 |
-
'color-rendering' => array(),
|
4387 |
-
'cursor' => array(),
|
4388 |
-
'direction' => array(),
|
4389 |
-
'display' => array(),
|
4390 |
-
'dominant-baseline' => array(),
|
4391 |
-
'dx' => array(),
|
4392 |
-
'dy' => array(),
|
4393 |
-
'enable-background' => array(),
|
4394 |
-
'fill' => array(),
|
4395 |
-
'fill-opacity' => array(),
|
4396 |
-
'fill-rule' => array(),
|
4397 |
-
'filter' => array(),
|
4398 |
-
'flood-color' => array(),
|
4399 |
-
'flood-opacity' => array(),
|
4400 |
-
'font-family' => array(),
|
4401 |
-
'font-size' => array(),
|
4402 |
-
'font-size-adjust' => array(),
|
4403 |
-
'font-stretch' => array(),
|
4404 |
-
'font-style' => array(),
|
4405 |
-
'font-variant' => array(),
|
4406 |
-
'font-weight' => array(),
|
4407 |
-
'format' => array(),
|
4408 |
-
'glyph-orientation-horizontal' => array(),
|
4409 |
-
'glyph-orientation-vertical' => array(),
|
4410 |
-
'glyphref' => array(),
|
4411 |
-
'image-rendering' => array(),
|
4412 |
-
'kerning' => array(),
|
4413 |
-
'letter-spacing' => array(),
|
4414 |
-
'lighting-color' => array(),
|
4415 |
-
'marker-end' => array(),
|
4416 |
-
'marker-mid' => array(),
|
4417 |
-
'marker-start' => array(),
|
4418 |
-
'mask' => array(),
|
4419 |
-
'opacity' => array(),
|
4420 |
-
'overflow' => array(),
|
4421 |
-
'pointer-events' => array(),
|
4422 |
-
'shape-rendering' => array(),
|
4423 |
-
'stop-color' => array(),
|
4424 |
-
'stop-opacity' => array(),
|
4425 |
-
'stroke' => array(),
|
4426 |
-
'stroke-dasharray' => array(),
|
4427 |
-
'stroke-dashoffset' => array(),
|
4428 |
-
'stroke-linecap' => array(),
|
4429 |
-
'stroke-linejoin' => array(),
|
4430 |
-
'stroke-miterlimit' => array(),
|
4431 |
-
'stroke-opacity' => array(),
|
4432 |
-
'stroke-width' => array(),
|
4433 |
-
'style' => array(
|
4434 |
-
'blacklisted_value_regex' => '!important',
|
4435 |
-
),
|
4436 |
-
'text-anchor' => array(),
|
4437 |
-
'text-decoration' => array(),
|
4438 |
-
'text-rendering' => array(),
|
4439 |
-
'unicode-bidi' => array(),
|
4440 |
-
'vector-effect' => array(),
|
4441 |
-
'visibility' => array(),
|
4442 |
-
'word-spacing' => array(),
|
4443 |
-
'writing-mode' => array(),
|
4444 |
-
'x' => array(),
|
4445 |
-
'xlink:actuate' => array(),
|
4446 |
-
'xlink:arcrole' => array(),
|
4447 |
-
'xlink:href' => array(
|
4448 |
-
'alternative_names' => array(
|
4449 |
-
'href',
|
4450 |
-
),
|
4451 |
-
'value_url' => array(
|
4452 |
-
'allow_empty' => false,
|
4453 |
-
'allow_relative' => true,
|
4454 |
-
'allowed_protocol' => array(
|
4455 |
-
'http',
|
4456 |
-
'https',
|
4457 |
-
),
|
4458 |
-
),
|
4459 |
-
),
|
4460 |
-
'xlink:role' => array(),
|
4461 |
-
'xlink:show' => array(),
|
4462 |
-
'xlink:title' => array(),
|
4463 |
-
'xlink:type' => array(),
|
4464 |
-
'xml:lang' => array(),
|
4465 |
-
'xml:space' => array(),
|
4466 |
-
'xmlns' => array(),
|
4467 |
-
'xmlns:xlink' => array(),
|
4468 |
-
'y' => array(),
|
4469 |
-
),
|
4470 |
-
'tag_spec' => array(
|
4471 |
-
'mandatory_ancestor' => 'svg',
|
4472 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
4473 |
-
),
|
4474 |
-
),
|
4475 |
-
),
|
4476 |
-
'h1' => array(
|
4477 |
-
array(
|
4478 |
-
'attr_spec_list' => array(
|
4479 |
-
'align' => array(),
|
4480 |
-
),
|
4481 |
-
'tag_spec' => array(),
|
4482 |
-
),
|
4483 |
-
),
|
4484 |
-
'h2' => array(
|
4485 |
-
array(
|
4486 |
-
'attr_spec_list' => array(
|
4487 |
-
'align' => array(),
|
4488 |
-
),
|
4489 |
-
'tag_spec' => array(),
|
4490 |
-
),
|
4491 |
-
),
|
4492 |
-
'h3' => array(
|
4493 |
-
array(
|
4494 |
-
'attr_spec_list' => array(
|
4495 |
-
'align' => array(),
|
4496 |
-
),
|
4497 |
-
'tag_spec' => array(),
|
4498 |
-
),
|
4499 |
-
),
|
4500 |
-
'h4' => array(
|
4501 |
-
array(
|
4502 |
-
'attr_spec_list' => array(
|
4503 |
-
'align' => array(),
|
4504 |
-
),
|
4505 |
-
'tag_spec' => array(),
|
4506 |
-
),
|
4507 |
-
),
|
4508 |
-
'h5' => array(
|
4509 |
-
array(
|
4510 |
-
'attr_spec_list' => array(
|
4511 |
-
'align' => array(),
|
4512 |
-
),
|
4513 |
-
'tag_spec' => array(),
|
4514 |
-
),
|
4515 |
-
),
|
4516 |
-
'h6' => array(
|
4517 |
-
array(
|
4518 |
-
'attr_spec_list' => array(
|
4519 |
-
'align' => array(),
|
4520 |
-
),
|
4521 |
-
'tag_spec' => array(),
|
4522 |
-
),
|
4523 |
-
),
|
4524 |
-
'head' => array(
|
4525 |
-
array(
|
4526 |
-
'attr_spec_list' => array(),
|
4527 |
-
'tag_spec' => array(
|
4528 |
-
'mandatory' => true,
|
4529 |
-
'mandatory_parent' => 'html',
|
4530 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#required-markup',
|
4531 |
-
'unique' => true,
|
4532 |
-
),
|
4533 |
-
),
|
4534 |
-
),
|
4535 |
-
'header' => array(
|
4536 |
-
array(
|
4537 |
-
'attr_spec_list' => array(),
|
4538 |
-
'tag_spec' => array(),
|
4539 |
-
),
|
4540 |
-
),
|
4541 |
-
'hgroup' => array(
|
4542 |
-
array(
|
4543 |
-
'attr_spec_list' => array(),
|
4544 |
-
'tag_spec' => array(),
|
4545 |
-
),
|
4546 |
-
),
|
4547 |
-
'hkern' => array(
|
4548 |
-
array(
|
4549 |
-
'attr_spec_list' => array(
|
4550 |
-
'g1' => array(),
|
4551 |
-
'g2' => array(),
|
4552 |
-
'k' => array(),
|
4553 |
-
'style' => array(
|
4554 |
-
'blacklisted_value_regex' => '!important',
|
4555 |
-
),
|
4556 |
-
'u1' => array(),
|
4557 |
-
'u2' => array(),
|
4558 |
-
'xml:lang' => array(),
|
4559 |
-
'xml:space' => array(),
|
4560 |
-
'xmlns' => array(),
|
4561 |
-
'xmlns:xlink' => array(),
|
4562 |
-
),
|
4563 |
-
'tag_spec' => array(
|
4564 |
-
'mandatory_ancestor' => 'svg',
|
4565 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
4566 |
-
),
|
4567 |
-
),
|
4568 |
-
),
|
4569 |
-
'hr' => array(
|
4570 |
-
array(
|
4571 |
-
'attr_spec_list' => array(),
|
4572 |
-
'tag_spec' => array(),
|
4573 |
-
),
|
4574 |
-
),
|
4575 |
-
'html' => array(
|
4576 |
-
array(
|
4577 |
-
'attr_spec_list' => array(
|
4578 |
-
'\\u26a1' => array(
|
4579 |
-
'alternative_names' => array(
|
4580 |
-
'amp',
|
4581 |
-
),
|
4582 |
-
'mandatory' => true,
|
4583 |
-
'value' => '',
|
4584 |
-
),
|
4585 |
-
),
|
4586 |
-
'tag_spec' => array(
|
4587 |
-
'mandatory' => true,
|
4588 |
-
'mandatory_parent' => '!doctype',
|
4589 |
-
'spec_name' => 'html \\u26a1 for top-level html',
|
4590 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#required-markup',
|
4591 |
-
'unique' => true,
|
4592 |
-
),
|
4593 |
-
),
|
4594 |
-
),
|
4595 |
-
'i' => array(
|
4596 |
-
array(
|
4597 |
-
'attr_spec_list' => array(),
|
4598 |
-
'tag_spec' => array(),
|
4599 |
-
),
|
4600 |
-
),
|
4601 |
-
'iframe' => array(
|
4602 |
-
array(
|
4603 |
-
'attr_spec_list' => array(
|
4604 |
-
'frameborder' => array(
|
4605 |
-
'value_regex' => '0|1',
|
4606 |
-
),
|
4607 |
-
'height' => array(),
|
4608 |
-
'name' => array(),
|
4609 |
-
'referrerpolicy' => array(),
|
4610 |
-
'resizable' => array(
|
4611 |
-
'value' => '',
|
4612 |
-
),
|
4613 |
-
'sandbox' => array(),
|
4614 |
-
'scrolling' => array(
|
4615 |
-
'value_regex' => 'auto|yes|no',
|
4616 |
-
),
|
4617 |
-
'src' => array(
|
4618 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
4619 |
-
'value_url' => array(
|
4620 |
-
'allow_relative' => false,
|
4621 |
-
'allowed_protocol' => array(
|
4622 |
-
'data',
|
4623 |
-
'https',
|
4624 |
-
),
|
4625 |
-
),
|
4626 |
-
),
|
4627 |
-
'srcdoc' => array(),
|
4628 |
-
'width' => array(),
|
4629 |
-
),
|
4630 |
-
'tag_spec' => array(
|
4631 |
-
'mandatory_ancestor' => 'noscript',
|
4632 |
-
'mandatory_ancestor_suggested_alternative' => 'amp-iframe',
|
4633 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-iframe',
|
4634 |
-
),
|
4635 |
-
),
|
4636 |
-
),
|
4637 |
-
'image' => array(
|
4638 |
-
array(
|
4639 |
-
'attr_spec_list' => array(
|
4640 |
-
'alignment-baseline' => array(),
|
4641 |
-
'baseline-shift' => array(),
|
4642 |
-
'clip' => array(),
|
4643 |
-
'clip-path' => array(),
|
4644 |
-
'clip-rule' => array(),
|
4645 |
-
'color' => array(),
|
4646 |
-
'color-interpolation' => array(),
|
4647 |
-
'color-interpolation-filters' => array(),
|
4648 |
-
'color-profile' => array(),
|
4649 |
-
'color-rendering' => array(),
|
4650 |
-
'cursor' => array(),
|
4651 |
-
'direction' => array(),
|
4652 |
-
'display' => array(),
|
4653 |
-
'dominant-baseline' => array(),
|
4654 |
-
'enable-background' => array(),
|
4655 |
-
'externalresourcesrequired' => array(),
|
4656 |
-
'fill' => array(),
|
4657 |
-
'fill-opacity' => array(),
|
4658 |
-
'fill-rule' => array(),
|
4659 |
-
'filter' => array(),
|
4660 |
-
'flood-color' => array(),
|
4661 |
-
'flood-opacity' => array(),
|
4662 |
-
'font-family' => array(),
|
4663 |
-
'font-size' => array(),
|
4664 |
-
'font-size-adjust' => array(),
|
4665 |
-
'font-stretch' => array(),
|
4666 |
-
'font-style' => array(),
|
4667 |
-
'font-variant' => array(),
|
4668 |
-
'font-weight' => array(),
|
4669 |
-
'glyph-orientation-horizontal' => array(),
|
4670 |
-
'glyph-orientation-vertical' => array(),
|
4671 |
-
'height' => array(),
|
4672 |
-
'image-rendering' => array(),
|
4673 |
-
'kerning' => array(),
|
4674 |
-
'letter-spacing' => array(),
|
4675 |
-
'lighting-color' => array(),
|
4676 |
-
'marker-end' => array(),
|
4677 |
-
'marker-mid' => array(),
|
4678 |
-
'marker-start' => array(),
|
4679 |
-
'mask' => array(),
|
4680 |
-
'opacity' => array(),
|
4681 |
-
'overflow' => array(),
|
4682 |
-
'pointer-events' => array(),
|
4683 |
-
'preserveaspectratio' => array(),
|
4684 |
-
'requiredextensions' => array(),
|
4685 |
-
'requiredfeatures' => array(),
|
4686 |
-
'shape-rendering' => array(),
|
4687 |
-
'stop-color' => array(),
|
4688 |
-
'stop-opacity' => array(),
|
4689 |
-
'stroke' => array(),
|
4690 |
-
'stroke-dasharray' => array(),
|
4691 |
-
'stroke-dashoffset' => array(),
|
4692 |
-
'stroke-linecap' => array(),
|
4693 |
-
'stroke-linejoin' => array(),
|
4694 |
-
'stroke-miterlimit' => array(),
|
4695 |
-
'stroke-opacity' => array(),
|
4696 |
-
'stroke-width' => array(),
|
4697 |
-
'style' => array(
|
4698 |
-
'blacklisted_value_regex' => '!important',
|
4699 |
-
),
|
4700 |
-
'systemlanguage' => array(),
|
4701 |
-
'text-anchor' => array(),
|
4702 |
-
'text-decoration' => array(),
|
4703 |
-
'text-rendering' => array(),
|
4704 |
-
'transform' => array(),
|
4705 |
-
'unicode-bidi' => array(),
|
4706 |
-
'vector-effect' => array(),
|
4707 |
-
'visibility' => array(),
|
4708 |
-
'width' => array(),
|
4709 |
-
'word-spacing' => array(),
|
4710 |
-
'writing-mode' => array(),
|
4711 |
-
'x' => array(),
|
4712 |
-
'xlink:actuate' => array(),
|
4713 |
-
'xlink:arcrole' => array(),
|
4714 |
-
'xlink:href' => array(
|
4715 |
-
'alternative_names' => array(
|
4716 |
-
'href',
|
4717 |
-
),
|
4718 |
-
'blacklisted_value_regex' => '(^|\\s)data:image\\/svg\\+xml',
|
4719 |
-
'value_url' => array(
|
4720 |
-
'allow_empty' => false,
|
4721 |
-
'allow_relative' => true,
|
4722 |
-
'allowed_protocol' => array(
|
4723 |
-
'data',
|
4724 |
-
'http',
|
4725 |
-
'https',
|
4726 |
-
),
|
4727 |
-
),
|
4728 |
-
),
|
4729 |
-
'xlink:role' => array(),
|
4730 |
-
'xlink:show' => array(),
|
4731 |
-
'xlink:title' => array(),
|
4732 |
-
'xlink:type' => array(),
|
4733 |
-
'xml:lang' => array(),
|
4734 |
-
'xml:space' => array(),
|
4735 |
-
'xmlns' => array(),
|
4736 |
-
'xmlns:xlink' => array(),
|
4737 |
-
'y' => array(),
|
4738 |
-
),
|
4739 |
-
'tag_spec' => array(
|
4740 |
-
'mandatory_ancestor' => 'svg',
|
4741 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
4742 |
-
),
|
4743 |
-
),
|
4744 |
-
),
|
4745 |
-
'img' => array(
|
4746 |
-
array(
|
4747 |
-
'attr_spec_list' => array(
|
4748 |
-
'alt' => array(),
|
4749 |
-
'border' => array(),
|
4750 |
-
'height' => array(),
|
4751 |
-
'ismap' => array(),
|
4752 |
-
'longdesc' => array(
|
4753 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
4754 |
-
'value_url' => array(
|
4755 |
-
'allow_relative' => true,
|
4756 |
-
'allowed_protocol' => array(
|
4757 |
-
'http',
|
4758 |
-
'https',
|
4759 |
-
),
|
4760 |
-
),
|
4761 |
-
),
|
4762 |
-
'src' => array(
|
4763 |
-
'alternative_names' => array(
|
4764 |
-
'srcset',
|
4765 |
-
),
|
4766 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
4767 |
-
'mandatory' => true,
|
4768 |
-
'value_url' => array(
|
4769 |
-
'allow_relative' => true,
|
4770 |
-
'allowed_protocol' => array(
|
4771 |
-
'data',
|
4772 |
-
'https',
|
4773 |
-
),
|
4774 |
-
),
|
4775 |
-
),
|
4776 |
-
'width' => array(),
|
4777 |
-
),
|
4778 |
-
'tag_spec' => array(
|
4779 |
-
'mandatory_ancestor' => 'noscript',
|
4780 |
-
'mandatory_ancestor_suggested_alternative' => 'amp-img',
|
4781 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-img',
|
4782 |
-
),
|
4783 |
-
),
|
4784 |
-
),
|
4785 |
-
'input' => array(
|
4786 |
-
array(
|
4787 |
-
'attr_spec_list' => array(
|
4788 |
-
'[accept]' => array(),
|
4789 |
-
'[accesskey]' => array(),
|
4790 |
-
'[autocomplete]' => array(),
|
4791 |
-
'[checked]' => array(),
|
4792 |
-
'[disabled]' => array(),
|
4793 |
-
'[height]' => array(),
|
4794 |
-
'[inputmode]' => array(),
|
4795 |
-
'[max]' => array(),
|
4796 |
-
'[maxlength]' => array(),
|
4797 |
-
'[min]' => array(),
|
4798 |
-
'[minlength]' => array(),
|
4799 |
-
'[multiple]' => array(),
|
4800 |
-
'[pattern]' => array(),
|
4801 |
-
'[placeholder]' => array(),
|
4802 |
-
'[readonly]' => array(),
|
4803 |
-
'[required]' => array(),
|
4804 |
-
'[selectiondirection]' => array(),
|
4805 |
-
'[size]' => array(),
|
4806 |
-
'[spellcheck]' => array(),
|
4807 |
-
'[step]' => array(),
|
4808 |
-
'[type]' => array(),
|
4809 |
-
'[value]' => array(),
|
4810 |
-
'[width]' => array(),
|
4811 |
-
'accept' => array(),
|
4812 |
-
'accesskey' => array(),
|
4813 |
-
'autocomplete' => array(),
|
4814 |
-
'autofocus' => array(),
|
4815 |
-
'checked' => array(),
|
4816 |
-
'disabled' => array(),
|
4817 |
-
'height' => array(),
|
4818 |
-
'inputmode' => array(),
|
4819 |
-
'list' => array(),
|
4820 |
-
'max' => array(),
|
4821 |
-
'maxlength' => array(),
|
4822 |
-
'min' => array(),
|
4823 |
-
'minlength' => array(),
|
4824 |
-
'multiple' => array(),
|
4825 |
-
'name' => array(
|
4826 |
-
'blacklisted_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|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|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|$)',
|
4827 |
-
),
|
4828 |
-
'pattern' => array(),
|
4829 |
-
'placeholder' => array(),
|
4830 |
-
'readonly' => array(),
|
4831 |
-
'required' => array(),
|
4832 |
-
'selectiondirection' => array(),
|
4833 |
-
'size' => array(),
|
4834 |
-
'spellcheck' => array(),
|
4835 |
-
'step' => array(),
|
4836 |
-
'tabindex' => array(),
|
4837 |
-
'type' => array(
|
4838 |
-
'blacklisted_value_regex' => '(^|\\s)(button|file|image|password|)(\\s|$)',
|
4839 |
-
),
|
4840 |
-
'value' => array(),
|
4841 |
-
'width' => array(),
|
4842 |
-
),
|
4843 |
-
'tag_spec' => array(
|
4844 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-form',
|
4845 |
-
),
|
4846 |
-
),
|
4847 |
-
),
|
4848 |
-
'ins' => array(
|
4849 |
-
array(
|
4850 |
-
'attr_spec_list' => array(
|
4851 |
-
'cite' => array(
|
4852 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
4853 |
-
'value_url' => array(
|
4854 |
-
'allow_empty' => true,
|
4855 |
-
'allow_relative' => true,
|
4856 |
-
'allowed_protocol' => array(
|
4857 |
-
'http',
|
4858 |
-
'https',
|
4859 |
-
),
|
4860 |
-
),
|
4861 |
-
),
|
4862 |
-
'datetime' => array(),
|
4863 |
-
),
|
4864 |
-
'tag_spec' => array(),
|
4865 |
-
),
|
4866 |
-
),
|
4867 |
-
'kbd' => array(
|
4868 |
-
array(
|
4869 |
-
'attr_spec_list' => array(),
|
4870 |
-
'tag_spec' => array(),
|
4871 |
-
),
|
4872 |
-
),
|
4873 |
-
'label' => array(
|
4874 |
-
array(
|
4875 |
-
'attr_spec_list' => array(
|
4876 |
-
'for' => array(),
|
4877 |
-
),
|
4878 |
-
'tag_spec' => array(
|
4879 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-form',
|
4880 |
-
),
|
4881 |
-
),
|
4882 |
-
),
|
4883 |
-
'legend' => array(
|
4884 |
-
array(
|
4885 |
-
'attr_spec_list' => array(),
|
4886 |
-
'tag_spec' => array(),
|
4887 |
-
),
|
4888 |
-
),
|
4889 |
-
'li' => array(
|
4890 |
-
array(
|
4891 |
-
'attr_spec_list' => array(
|
4892 |
-
'value' => array(
|
4893 |
-
'value_regex' => '[0-9]*',
|
4894 |
-
),
|
4895 |
-
),
|
4896 |
-
'tag_spec' => array(),
|
4897 |
-
),
|
4898 |
-
),
|
4899 |
-
'line' => array(
|
4900 |
-
array(
|
4901 |
-
'attr_spec_list' => array(
|
4902 |
-
'alignment-baseline' => array(),
|
4903 |
-
'baseline-shift' => array(),
|
4904 |
-
'clip' => array(),
|
4905 |
-
'clip-path' => array(),
|
4906 |
-
'clip-rule' => array(),
|
4907 |
-
'color' => array(),
|
4908 |
-
'color-interpolation' => array(),
|
4909 |
-
'color-interpolation-filters' => array(),
|
4910 |
-
'color-profile' => array(),
|
4911 |
-
'color-rendering' => array(),
|
4912 |
-
'cursor' => array(),
|
4913 |
-
'direction' => array(),
|
4914 |
-
'display' => array(),
|
4915 |
-
'dominant-baseline' => array(),
|
4916 |
-
'enable-background' => array(),
|
4917 |
-
'externalresourcesrequired' => array(),
|
4918 |
-
'fill' => array(),
|
4919 |
-
'fill-opacity' => array(),
|
4920 |
-
'fill-rule' => array(),
|
4921 |
-
'filter' => array(),
|
4922 |
-
'flood-color' => array(),
|
4923 |
-
'flood-opacity' => array(),
|
4924 |
-
'font-family' => array(),
|
4925 |
-
'font-size' => array(),
|
4926 |
-
'font-size-adjust' => array(),
|
4927 |
-
'font-stretch' => array(),
|
4928 |
-
'font-style' => array(),
|
4929 |
-
'font-variant' => array(),
|
4930 |
-
'font-weight' => array(),
|
4931 |
-
'glyph-orientation-horizontal' => array(),
|
4932 |
-
'glyph-orientation-vertical' => array(),
|
4933 |
-
'image-rendering' => array(),
|
4934 |
-
'kerning' => array(),
|
4935 |
-
'letter-spacing' => array(),
|
4936 |
-
'lighting-color' => array(),
|
4937 |
-
'marker-end' => array(),
|
4938 |
-
'marker-mid' => array(),
|
4939 |
-
'marker-start' => array(),
|
4940 |
-
'mask' => array(),
|
4941 |
-
'opacity' => array(),
|
4942 |
-
'overflow' => array(),
|
4943 |
-
'pointer-events' => array(),
|
4944 |
-
'requiredextensions' => array(),
|
4945 |
-
'requiredfeatures' => array(),
|
4946 |
-
'shape-rendering' => array(),
|
4947 |
-
'sketch:type' => array(),
|
4948 |
-
'stop-color' => array(),
|
4949 |
-
'stop-opacity' => array(),
|
4950 |
-
'stroke' => array(),
|
4951 |
-
'stroke-dasharray' => array(),
|
4952 |
-
'stroke-dashoffset' => array(),
|
4953 |
-
'stroke-linecap' => array(),
|
4954 |
-
'stroke-linejoin' => array(),
|
4955 |
-
'stroke-miterlimit' => array(),
|
4956 |
-
'stroke-opacity' => array(),
|
4957 |
-
'stroke-width' => array(),
|
4958 |
-
'style' => array(
|
4959 |
-
'blacklisted_value_regex' => '!important',
|
4960 |
-
),
|
4961 |
-
'systemlanguage' => array(),
|
4962 |
-
'text-anchor' => array(),
|
4963 |
-
'text-decoration' => array(),
|
4964 |
-
'text-rendering' => array(),
|
4965 |
-
'transform' => array(),
|
4966 |
-
'unicode-bidi' => array(),
|
4967 |
-
'vector-effect' => array(),
|
4968 |
-
'visibility' => array(),
|
4969 |
-
'word-spacing' => array(),
|
4970 |
-
'writing-mode' => array(),
|
4971 |
-
'x1' => array(),
|
4972 |
-
'x2' => array(),
|
4973 |
-
'xml:lang' => array(),
|
4974 |
-
'xml:space' => array(),
|
4975 |
-
'xmlns' => array(),
|
4976 |
-
'xmlns:xlink' => array(),
|
4977 |
-
'y1' => array(),
|
4978 |
-
'y2' => array(),
|
4979 |
-
),
|
4980 |
-
'tag_spec' => array(
|
4981 |
-
'mandatory_ancestor' => 'svg',
|
4982 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
4983 |
-
),
|
4984 |
-
),
|
4985 |
-
),
|
4986 |
-
'lineargradient' => array(
|
4987 |
-
array(
|
4988 |
-
'attr_spec_list' => array(
|
4989 |
-
'alignment-baseline' => array(),
|
4990 |
-
'baseline-shift' => array(),
|
4991 |
-
'clip' => array(),
|
4992 |
-
'clip-path' => array(),
|
4993 |
-
'clip-rule' => array(),
|
4994 |
-
'color' => array(),
|
4995 |
-
'color-interpolation' => array(),
|
4996 |
-
'color-interpolation-filters' => array(),
|
4997 |
-
'color-profile' => array(),
|
4998 |
-
'color-rendering' => array(),
|
4999 |
-
'cursor' => array(),
|
5000 |
-
'direction' => array(),
|
5001 |
-
'display' => array(),
|
5002 |
-
'dominant-baseline' => array(),
|
5003 |
-
'enable-background' => array(),
|
5004 |
-
'externalresourcesrequired' => array(),
|
5005 |
-
'fill' => array(),
|
5006 |
-
'fill-opacity' => array(),
|
5007 |
-
'fill-rule' => array(),
|
5008 |
-
'filter' => array(),
|
5009 |
-
'flood-color' => array(),
|
5010 |
-
'flood-opacity' => array(),
|
5011 |
-
'font-family' => array(),
|
5012 |
-
'font-size' => array(),
|
5013 |
-
'font-size-adjust' => array(),
|
5014 |
-
'font-stretch' => array(),
|
5015 |
-
'font-style' => array(),
|
5016 |
-
'font-variant' => array(),
|
5017 |
-
'font-weight' => array(),
|
5018 |
-
'glyph-orientation-horizontal' => array(),
|
5019 |
-
'glyph-orientation-vertical' => array(),
|
5020 |
-
'gradienttransform' => array(),
|
5021 |
-
'gradientunits' => array(),
|
5022 |
-
'image-rendering' => array(),
|
5023 |
-
'kerning' => array(),
|
5024 |
-
'letter-spacing' => array(),
|
5025 |
-
'lighting-color' => array(),
|
5026 |
-
'marker-end' => array(),
|
5027 |
-
'marker-mid' => array(),
|
5028 |
-
'marker-start' => array(),
|
5029 |
-
'mask' => array(),
|
5030 |
-
'opacity' => array(),
|
5031 |
-
'overflow' => array(),
|
5032 |
-
'pointer-events' => array(),
|
5033 |
-
'shape-rendering' => array(),
|
5034 |
-
'spreadmethod' => array(),
|
5035 |
-
'stop-color' => array(),
|
5036 |
-
'stop-opacity' => array(),
|
5037 |
-
'stroke' => array(),
|
5038 |
-
'stroke-dasharray' => array(),
|
5039 |
-
'stroke-dashoffset' => array(),
|
5040 |
-
'stroke-linecap' => array(),
|
5041 |
-
'stroke-linejoin' => array(),
|
5042 |
-
'stroke-miterlimit' => array(),
|
5043 |
-
'stroke-opacity' => array(),
|
5044 |
-
'stroke-width' => array(),
|
5045 |
-
'style' => array(
|
5046 |
-
'blacklisted_value_regex' => '!important',
|
5047 |
-
),
|
5048 |
-
'text-anchor' => array(),
|
5049 |
-
'text-decoration' => array(),
|
5050 |
-
'text-rendering' => array(),
|
5051 |
-
'unicode-bidi' => array(),
|
5052 |
-
'vector-effect' => array(),
|
5053 |
-
'visibility' => array(),
|
5054 |
-
'word-spacing' => array(),
|
5055 |
-
'writing-mode' => array(),
|
5056 |
-
'x1' => array(),
|
5057 |
-
'x2' => array(),
|
5058 |
-
'xlink:actuate' => array(),
|
5059 |
-
'xlink:arcrole' => array(),
|
5060 |
-
'xlink:href' => array(
|
5061 |
-
'alternative_names' => array(
|
5062 |
-
'href',
|
5063 |
-
),
|
5064 |
-
'value_url' => array(
|
5065 |
-
'allow_empty' => false,
|
5066 |
-
'allow_relative' => true,
|
5067 |
-
'allowed_protocol' => array(
|
5068 |
-
'http',
|
5069 |
-
'https',
|
5070 |
-
),
|
5071 |
-
),
|
5072 |
-
),
|
5073 |
-
'xlink:role' => array(),
|
5074 |
-
'xlink:show' => array(),
|
5075 |
-
'xlink:title' => array(),
|
5076 |
-
'xlink:type' => array(),
|
5077 |
-
'xml:lang' => array(),
|
5078 |
-
'xml:space' => array(),
|
5079 |
-
'xmlns' => array(),
|
5080 |
-
'xmlns:xlink' => array(),
|
5081 |
-
'y1' => array(),
|
5082 |
-
'y2' => array(),
|
5083 |
-
),
|
5084 |
-
'tag_spec' => array(
|
5085 |
-
'mandatory_ancestor' => 'svg',
|
5086 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
5087 |
-
),
|
5088 |
-
),
|
5089 |
-
),
|
5090 |
-
'link' => array(
|
5091 |
-
array(
|
5092 |
-
'attr_spec_list' => array(
|
5093 |
-
'charset' => array(
|
5094 |
-
'value_casei' => 'utf-8',
|
5095 |
-
),
|
5096 |
-
'color' => array(),
|
5097 |
-
'crossorigin' => array(),
|
5098 |
-
'href' => array(),
|
5099 |
-
'hreflang' => array(),
|
5100 |
-
'media' => array(),
|
5101 |
-
'rel' => array(
|
5102 |
-
'blacklisted_value_regex' => '(^|\\s)(canonical|components|import|manifest|preload|serviceworker|stylesheet|subresource|)(\\s|$)',
|
5103 |
-
'mandatory' => true,
|
5104 |
-
),
|
5105 |
-
'sizes' => array(),
|
5106 |
-
'target' => array(),
|
5107 |
-
'type' => array(),
|
5108 |
-
),
|
5109 |
-
'tag_spec' => array(
|
5110 |
-
'disallowed_ancestor' => array(
|
5111 |
-
'template',
|
5112 |
-
),
|
5113 |
-
'spec_name' => 'link rel=',
|
5114 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5115 |
-
),
|
5116 |
-
),
|
5117 |
-
array(
|
5118 |
-
'attr_spec_list' => array(
|
5119 |
-
'charset' => array(
|
5120 |
-
'value_casei' => 'utf-8',
|
5121 |
-
),
|
5122 |
-
'color' => array(),
|
5123 |
-
'crossorigin' => array(),
|
5124 |
-
'href' => array(
|
5125 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
5126 |
-
'mandatory' => true,
|
5127 |
-
'value_url' => array(
|
5128 |
-
'allow_relative' => true,
|
5129 |
-
'allowed_protocol' => array(
|
5130 |
-
'http',
|
5131 |
-
'https',
|
5132 |
-
),
|
5133 |
-
),
|
5134 |
-
),
|
5135 |
-
'hreflang' => array(),
|
5136 |
-
'media' => array(),
|
5137 |
-
'rel' => array(
|
5138 |
-
'dispatch_key' => 2,
|
5139 |
-
'mandatory' => true,
|
5140 |
-
'value_casei' => 'canonical',
|
5141 |
-
),
|
5142 |
-
'sizes' => array(),
|
5143 |
-
'target' => array(),
|
5144 |
-
'type' => array(),
|
5145 |
-
),
|
5146 |
-
'tag_spec' => array(
|
5147 |
-
'mandatory' => true,
|
5148 |
-
'mandatory_parent' => 'head',
|
5149 |
-
'spec_name' => 'link rel=canonical',
|
5150 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#required-markup',
|
5151 |
-
'unique' => true,
|
5152 |
-
),
|
5153 |
-
),
|
5154 |
-
array(
|
5155 |
-
'attr_spec_list' => array(
|
5156 |
-
'charset' => array(
|
5157 |
-
'value_casei' => 'utf-8',
|
5158 |
-
),
|
5159 |
-
'color' => array(),
|
5160 |
-
'crossorigin' => array(),
|
5161 |
-
'href' => array(
|
5162 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
5163 |
-
'mandatory' => true,
|
5164 |
-
'value_url' => array(
|
5165 |
-
'allow_relative' => true,
|
5166 |
-
'allowed_protocol' => array(
|
5167 |
-
'https',
|
5168 |
-
),
|
5169 |
-
),
|
5170 |
-
),
|
5171 |
-
'hreflang' => array(),
|
5172 |
-
'media' => array(),
|
5173 |
-
'rel' => array(
|
5174 |
-
'dispatch_key' => 2,
|
5175 |
-
'mandatory' => true,
|
5176 |
-
'value_casei' => 'manifest',
|
5177 |
-
),
|
5178 |
-
'sizes' => array(),
|
5179 |
-
'target' => array(),
|
5180 |
-
'type' => array(),
|
5181 |
-
),
|
5182 |
-
'tag_spec' => array(
|
5183 |
-
'mandatory_parent' => 'head',
|
5184 |
-
'spec_name' => 'link rel=manifest',
|
5185 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5186 |
-
),
|
5187 |
-
),
|
5188 |
-
array(
|
5189 |
-
'attr_spec_list' => array(
|
5190 |
-
'as' => array(),
|
5191 |
-
'charset' => array(
|
5192 |
-
'value_casei' => 'utf-8',
|
5193 |
-
),
|
5194 |
-
'color' => array(),
|
5195 |
-
'crossorigin' => array(),
|
5196 |
-
'href' => array(),
|
5197 |
-
'hreflang' => array(),
|
5198 |
-
'media' => array(),
|
5199 |
-
'rel' => array(
|
5200 |
-
'dispatch_key' => 2,
|
5201 |
-
'mandatory' => true,
|
5202 |
-
'value_casei' => 'preload',
|
5203 |
-
),
|
5204 |
-
'sizes' => array(),
|
5205 |
-
'target' => array(),
|
5206 |
-
'type' => array(),
|
5207 |
-
),
|
5208 |
-
'tag_spec' => array(
|
5209 |
-
'disallowed_ancestor' => array(
|
5210 |
-
'template',
|
5211 |
-
),
|
5212 |
-
'spec_name' => 'link rel=preload',
|
5213 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5214 |
-
),
|
5215 |
-
),
|
5216 |
-
array(
|
5217 |
-
'attr_spec_list' => array(
|
5218 |
-
'async' => array(),
|
5219 |
-
'crossorigin' => array(),
|
5220 |
-
'href' => array(
|
5221 |
-
'mandatory' => true,
|
5222 |
-
'value_regex' => 'https://cdn\\.materialdesignicons\\.com/([0-9]+\\.?)+/css/materialdesignicons\\.min\\.css|https://cloud\\.typography\\.com/[0-9]*/[0-9]*/css/fonts\\.css|https://fast\\.fonts\\.net/.*|https://fonts\\.googleapis\\.com/css\\?.*|https://fonts\\.googleapis\\.com/icon\\?.*|https://fonts\\.googleapis\\.com/earlyaccess/.*\\.css|https://maxcdn\\.bootstrapcdn\\.com/font-awesome/([0-9]+\\.?)+/css/font-awesome\\.min\\.css(\\?.*)?|https://use\\.fontawesome\\.com/releases/v([0-9]+\\.?)+/css/(all|brands|solids|fontawesome)\\.css|https://use\\.typekit\\.net/[\\w\\p{L}\\p{N}_]+\\.css',
|
5223 |
-
),
|
5224 |
-
'integrity' => array(),
|
5225 |
-
'media' => array(),
|
5226 |
-
'rel' => array(
|
5227 |
-
'dispatch_key' => 2,
|
5228 |
-
'mandatory' => true,
|
5229 |
-
'value_casei' => 'stylesheet',
|
5230 |
-
),
|
5231 |
-
'type' => array(
|
5232 |
-
'value_casei' => 'text/css',
|
5233 |
-
),
|
5234 |
-
),
|
5235 |
-
'tag_spec' => array(
|
5236 |
-
'mandatory_parent' => 'head',
|
5237 |
-
'spec_name' => 'link rel=stylesheet for fonts',
|
5238 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#custom-fonts',
|
5239 |
-
),
|
5240 |
-
),
|
5241 |
-
array(
|
5242 |
-
'attr_spec_list' => array(
|
5243 |
-
'charset' => array(
|
5244 |
-
'value_casei' => 'utf-8',
|
5245 |
-
),
|
5246 |
-
'color' => array(),
|
5247 |
-
'crossorigin' => array(),
|
5248 |
-
'href' => array(
|
5249 |
-
'mandatory' => true,
|
5250 |
-
),
|
5251 |
-
'hreflang' => array(),
|
5252 |
-
'itemprop' => array(
|
5253 |
-
'dispatch_key' => 2,
|
5254 |
-
'mandatory' => true,
|
5255 |
-
'value_casei' => 'sameas',
|
5256 |
-
),
|
5257 |
-
'media' => array(),
|
5258 |
-
'sizes' => array(),
|
5259 |
-
'target' => array(),
|
5260 |
-
'type' => array(),
|
5261 |
-
),
|
5262 |
-
'tag_spec' => array(
|
5263 |
-
'spec_name' => 'link itemprop=sameAs',
|
5264 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5265 |
-
),
|
5266 |
-
),
|
5267 |
-
array(
|
5268 |
-
'attr_spec_list' => array(
|
5269 |
-
'charset' => array(
|
5270 |
-
'value_casei' => 'utf-8',
|
5271 |
-
),
|
5272 |
-
'color' => array(),
|
5273 |
-
'crossorigin' => array(),
|
5274 |
-
'href' => array(
|
5275 |
-
'mandatory' => true,
|
5276 |
-
),
|
5277 |
-
'hreflang' => array(),
|
5278 |
-
'itemprop' => array(
|
5279 |
-
'mandatory' => true,
|
5280 |
-
),
|
5281 |
-
'media' => array(),
|
5282 |
-
'sizes' => array(),
|
5283 |
-
'target' => array(),
|
5284 |
-
'type' => array(),
|
5285 |
-
),
|
5286 |
-
'tag_spec' => array(
|
5287 |
-
'spec_name' => 'link itemprop=',
|
5288 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5289 |
-
),
|
5290 |
-
),
|
5291 |
-
array(
|
5292 |
-
'attr_spec_list' => array(
|
5293 |
-
'charset' => array(
|
5294 |
-
'value_casei' => 'utf-8',
|
5295 |
-
),
|
5296 |
-
'color' => array(),
|
5297 |
-
'crossorigin' => array(),
|
5298 |
-
'href' => array(
|
5299 |
-
'mandatory' => true,
|
5300 |
-
),
|
5301 |
-
'hreflang' => array(),
|
5302 |
-
'media' => array(),
|
5303 |
-
'property' => array(
|
5304 |
-
'mandatory' => true,
|
5305 |
-
),
|
5306 |
-
'sizes' => array(),
|
5307 |
-
'target' => array(),
|
5308 |
-
'type' => array(),
|
5309 |
-
),
|
5310 |
-
'tag_spec' => array(
|
5311 |
-
'spec_name' => 'link property=',
|
5312 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5313 |
-
),
|
5314 |
-
),
|
5315 |
-
),
|
5316 |
-
'listing' => array(
|
5317 |
-
array(
|
5318 |
-
'attr_spec_list' => array(),
|
5319 |
-
'tag_spec' => array(),
|
5320 |
-
),
|
5321 |
-
),
|
5322 |
-
'main' => array(
|
5323 |
-
array(
|
5324 |
-
'attr_spec_list' => array(),
|
5325 |
-
'tag_spec' => array(),
|
5326 |
-
),
|
5327 |
-
),
|
5328 |
-
'mark' => array(
|
5329 |
-
array(
|
5330 |
-
'attr_spec_list' => array(),
|
5331 |
-
'tag_spec' => array(),
|
5332 |
-
),
|
5333 |
-
),
|
5334 |
-
'marker' => array(
|
5335 |
-
array(
|
5336 |
-
'attr_spec_list' => array(
|
5337 |
-
'alignment-baseline' => array(),
|
5338 |
-
'baseline-shift' => array(),
|
5339 |
-
'clip' => array(),
|
5340 |
-
'clip-path' => array(),
|
5341 |
-
'clip-rule' => array(),
|
5342 |
-
'color' => array(),
|
5343 |
-
'color-interpolation' => array(),
|
5344 |
-
'color-interpolation-filters' => array(),
|
5345 |
-
'color-profile' => array(),
|
5346 |
-
'color-rendering' => array(),
|
5347 |
-
'cursor' => array(),
|
5348 |
-
'direction' => array(),
|
5349 |
-
'display' => array(),
|
5350 |
-
'dominant-baseline' => array(),
|
5351 |
-
'enable-background' => array(),
|
5352 |
-
'externalresourcesrequired' => array(),
|
5353 |
-
'fill' => array(),
|
5354 |
-
'fill-opacity' => array(),
|
5355 |
-
'fill-rule' => array(),
|
5356 |
-
'filter' => array(),
|
5357 |
-
'flood-color' => array(),
|
5358 |
-
'flood-opacity' => array(),
|
5359 |
-
'font-family' => array(),
|
5360 |
-
'font-size' => array(),
|
5361 |
-
'font-size-adjust' => array(),
|
5362 |
-
'font-stretch' => array(),
|
5363 |
-
'font-style' => array(),
|
5364 |
-
'font-variant' => array(),
|
5365 |
-
'font-weight' => array(),
|
5366 |
-
'glyph-orientation-horizontal' => array(),
|
5367 |
-
'glyph-orientation-vertical' => array(),
|
5368 |
-
'image-rendering' => array(),
|
5369 |
-
'kerning' => array(),
|
5370 |
-
'letter-spacing' => array(),
|
5371 |
-
'lighting-color' => array(),
|
5372 |
-
'marker-end' => array(),
|
5373 |
-
'marker-mid' => array(),
|
5374 |
-
'marker-start' => array(),
|
5375 |
-
'markerheight' => array(),
|
5376 |
-
'markerunits' => array(),
|
5377 |
-
'markerwidth' => array(),
|
5378 |
-
'mask' => array(),
|
5379 |
-
'opacity' => array(),
|
5380 |
-
'orient' => array(),
|
5381 |
-
'overflow' => array(),
|
5382 |
-
'pointer-events' => array(),
|
5383 |
-
'preserveaspectratio' => array(),
|
5384 |
-
'refx' => array(),
|
5385 |
-
'refy' => array(),
|
5386 |
-
'shape-rendering' => array(),
|
5387 |
-
'stop-color' => array(),
|
5388 |
-
'stop-opacity' => array(),
|
5389 |
-
'stroke' => array(),
|
5390 |
-
'stroke-dasharray' => array(),
|
5391 |
-
'stroke-dashoffset' => array(),
|
5392 |
-
'stroke-linecap' => array(),
|
5393 |
-
'stroke-linejoin' => array(),
|
5394 |
-
'stroke-miterlimit' => array(),
|
5395 |
-
'stroke-opacity' => array(),
|
5396 |
-
'stroke-width' => array(),
|
5397 |
-
'style' => array(
|
5398 |
-
'blacklisted_value_regex' => '!important',
|
5399 |
-
),
|
5400 |
-
'text-anchor' => array(),
|
5401 |
-
'text-decoration' => array(),
|
5402 |
-
'text-rendering' => array(),
|
5403 |
-
'transform' => array(),
|
5404 |
-
'unicode-bidi' => array(),
|
5405 |
-
'vector-effect' => array(),
|
5406 |
-
'viewbox' => array(),
|
5407 |
-
'visibility' => array(),
|
5408 |
-
'word-spacing' => array(),
|
5409 |
-
'writing-mode' => array(),
|
5410 |
-
'xml:lang' => array(),
|
5411 |
-
'xml:space' => array(),
|
5412 |
-
'xmlns' => array(),
|
5413 |
-
'xmlns:xlink' => array(),
|
5414 |
-
),
|
5415 |
-
'tag_spec' => array(
|
5416 |
-
'mandatory_ancestor' => 'svg',
|
5417 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
5418 |
-
),
|
5419 |
-
),
|
5420 |
-
),
|
5421 |
-
'mask' => array(
|
5422 |
-
array(
|
5423 |
-
'attr_spec_list' => array(
|
5424 |
-
'alignment-baseline' => array(),
|
5425 |
-
'baseline-shift' => array(),
|
5426 |
-
'clip' => array(),
|
5427 |
-
'clip-path' => array(),
|
5428 |
-
'clip-rule' => array(),
|
5429 |
-
'color' => array(),
|
5430 |
-
'color-interpolation' => array(),
|
5431 |
-
'color-interpolation-filters' => array(),
|
5432 |
-
'color-profile' => array(),
|
5433 |
-
'color-rendering' => array(),
|
5434 |
-
'cursor' => array(),
|
5435 |
-
'direction' => array(),
|
5436 |
-
'display' => array(),
|
5437 |
-
'dominant-baseline' => array(),
|
5438 |
-
'enable-background' => array(),
|
5439 |
-
'externalresourcesrequired' => array(),
|
5440 |
-
'fill' => array(),
|
5441 |
-
'fill-opacity' => array(),
|
5442 |
-
'fill-rule' => array(),
|
5443 |
-
'filter' => array(),
|
5444 |
-
'flood-color' => array(),
|
5445 |
-
'flood-opacity' => array(),
|
5446 |
-
'font-family' => array(),
|
5447 |
-
'font-size' => array(),
|
5448 |
-
'font-size-adjust' => array(),
|
5449 |
-
'font-stretch' => array(),
|
5450 |
-
'font-style' => array(),
|
5451 |
-
'font-variant' => array(),
|
5452 |
-
'font-weight' => array(),
|
5453 |
-
'glyph-orientation-horizontal' => array(),
|
5454 |
-
'glyph-orientation-vertical' => array(),
|
5455 |
-
'height' => array(),
|
5456 |
-
'image-rendering' => array(),
|
5457 |
-
'kerning' => array(),
|
5458 |
-
'letter-spacing' => array(),
|
5459 |
-
'lighting-color' => array(),
|
5460 |
-
'marker-end' => array(),
|
5461 |
-
'marker-mid' => array(),
|
5462 |
-
'marker-start' => array(),
|
5463 |
-
'mask' => array(),
|
5464 |
-
'maskcontentunits' => array(),
|
5465 |
-
'maskunits' => array(),
|
5466 |
-
'opacity' => array(),
|
5467 |
-
'overflow' => array(),
|
5468 |
-
'pointer-events' => array(),
|
5469 |
-
'requiredextensions' => array(),
|
5470 |
-
'requiredfeatures' => array(),
|
5471 |
-
'shape-rendering' => array(),
|
5472 |
-
'stop-color' => array(),
|
5473 |
-
'stop-opacity' => array(),
|
5474 |
-
'stroke' => array(),
|
5475 |
-
'stroke-dasharray' => array(),
|
5476 |
-
'stroke-dashoffset' => array(),
|
5477 |
-
'stroke-linecap' => array(),
|
5478 |
-
'stroke-linejoin' => array(),
|
5479 |
-
'stroke-miterlimit' => array(),
|
5480 |
-
'stroke-opacity' => array(),
|
5481 |
-
'stroke-width' => array(),
|
5482 |
-
'style' => array(
|
5483 |
-
'blacklisted_value_regex' => '!important',
|
5484 |
-
),
|
5485 |
-
'systemlanguage' => array(),
|
5486 |
-
'text-anchor' => array(),
|
5487 |
-
'text-decoration' => array(),
|
5488 |
-
'text-rendering' => array(),
|
5489 |
-
'unicode-bidi' => array(),
|
5490 |
-
'vector-effect' => array(),
|
5491 |
-
'visibility' => array(),
|
5492 |
-
'width' => array(),
|
5493 |
-
'word-spacing' => array(),
|
5494 |
-
'writing-mode' => array(),
|
5495 |
-
'x' => array(),
|
5496 |
-
'xml:lang' => array(),
|
5497 |
-
'xml:space' => array(),
|
5498 |
-
'xmlns' => array(),
|
5499 |
-
'xmlns:xlink' => array(),
|
5500 |
-
'y' => array(),
|
5501 |
-
),
|
5502 |
-
'tag_spec' => array(
|
5503 |
-
'mandatory_ancestor' => 'svg',
|
5504 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
5505 |
-
),
|
5506 |
-
),
|
5507 |
-
),
|
5508 |
-
'meta' => array(
|
5509 |
-
array(
|
5510 |
-
'attr_spec_list' => array(
|
5511 |
-
'charset' => array(
|
5512 |
-
'dispatch_key' => 1,
|
5513 |
-
'mandatory' => true,
|
5514 |
-
'value_casei' => 'utf-8',
|
5515 |
-
),
|
5516 |
-
),
|
5517 |
-
'tag_spec' => array(
|
5518 |
-
'mandatory' => true,
|
5519 |
-
'mandatory_parent' => 'head',
|
5520 |
-
'spec_name' => 'meta charset=utf-8',
|
5521 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#required-markup',
|
5522 |
-
'unique' => true,
|
5523 |
-
),
|
5524 |
-
),
|
5525 |
-
array(
|
5526 |
-
'attr_spec_list' => array(
|
5527 |
-
'content' => array(
|
5528 |
-
'mandatory' => true,
|
5529 |
-
'value_properties' => array(
|
5530 |
-
'height' => array(),
|
5531 |
-
'initial-scale' => array(),
|
5532 |
-
'maximum-scale' => array(),
|
5533 |
-
'minimum-scale' => array(
|
5534 |
-
'mandatory' => true,
|
5535 |
-
'value_double' => 1.0,
|
5536 |
-
),
|
5537 |
-
'shrink-to-fit' => array(),
|
5538 |
-
'user-scalable' => array(),
|
5539 |
-
'viewport-fit' => array(),
|
5540 |
-
'width' => array(
|
5541 |
-
'mandatory' => true,
|
5542 |
-
'value' => 'device-width',
|
5543 |
-
),
|
5544 |
-
),
|
5545 |
-
),
|
5546 |
-
'name' => array(
|
5547 |
-
'dispatch_key' => 2,
|
5548 |
-
'mandatory' => true,
|
5549 |
-
'value' => 'viewport',
|
5550 |
-
),
|
5551 |
-
),
|
5552 |
-
'tag_spec' => array(
|
5553 |
-
'mandatory' => true,
|
5554 |
-
'mandatory_parent' => 'head',
|
5555 |
-
'spec_name' => 'meta name=viewport',
|
5556 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#required-markup',
|
5557 |
-
'unique' => true,
|
5558 |
-
),
|
5559 |
-
),
|
5560 |
-
array(
|
5561 |
-
'attr_spec_list' => array(
|
5562 |
-
'content' => array(
|
5563 |
-
'mandatory' => true,
|
5564 |
-
'value_properties' => array(
|
5565 |
-
'chrome' => array(
|
5566 |
-
'value' => '1',
|
5567 |
-
),
|
5568 |
-
'ie' => array(
|
5569 |
-
'value' => 'edge',
|
5570 |
-
),
|
5571 |
-
),
|
5572 |
-
),
|
5573 |
-
'http-equiv' => array(
|
5574 |
-
'dispatch_key' => 2,
|
5575 |
-
'mandatory' => true,
|
5576 |
-
'value_casei' => 'x-ua-compatible',
|
5577 |
-
),
|
5578 |
-
),
|
5579 |
-
'tag_spec' => array(
|
5580 |
-
'mandatory_ancestor' => 'head',
|
5581 |
-
'spec_name' => 'meta http-equiv=X-UA-Compatible',
|
5582 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5583 |
-
),
|
5584 |
-
),
|
5585 |
-
array(
|
5586 |
-
'attr_spec_list' => array(
|
5587 |
-
'content' => array(
|
5588 |
-
'mandatory' => true,
|
5589 |
-
'value_regex' => '.*app-id=.*',
|
5590 |
-
),
|
5591 |
-
'name' => array(
|
5592 |
-
'dispatch_key' => 2,
|
5593 |
-
'mandatory' => true,
|
5594 |
-
'value_casei' => 'apple-itunes-app',
|
5595 |
-
),
|
5596 |
-
),
|
5597 |
-
'tag_spec' => array(
|
5598 |
-
'mandatory_parent' => 'head',
|
5599 |
-
'spec_name' => 'meta name=apple-itunes-app',
|
5600 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5601 |
-
),
|
5602 |
-
),
|
5603 |
-
array(
|
5604 |
-
'attr_spec_list' => array(
|
5605 |
-
'content' => array(
|
5606 |
-
'mandatory' => true,
|
5607 |
-
),
|
5608 |
-
'name' => array(
|
5609 |
-
'dispatch_key' => 2,
|
5610 |
-
'mandatory' => true,
|
5611 |
-
'value_casei' => 'amp-experiments-opt-in',
|
5612 |
-
),
|
5613 |
-
),
|
5614 |
-
'tag_spec' => array(
|
5615 |
-
'mandatory_parent' => 'head',
|
5616 |
-
'spec_name' => 'meta name=amp-experiments-opt-in',
|
5617 |
-
),
|
5618 |
-
),
|
5619 |
-
array(
|
5620 |
-
'attr_spec_list' => array(
|
5621 |
-
'content' => array(
|
5622 |
-
'mandatory' => true,
|
5623 |
-
'value_url' => array(
|
5624 |
-
'allowed_protocol' => array(
|
5625 |
-
'https',
|
5626 |
-
),
|
5627 |
-
),
|
5628 |
-
),
|
5629 |
-
'name' => array(
|
5630 |
-
'dispatch_key' => 2,
|
5631 |
-
'mandatory' => true,
|
5632 |
-
'value_casei' => 'amp-3p-iframe-src',
|
5633 |
-
),
|
5634 |
-
),
|
5635 |
-
'tag_spec' => array(
|
5636 |
-
'mandatory_parent' => 'head',
|
5637 |
-
'spec_name' => 'meta name=amp-3p-iframe-src',
|
5638 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-ad',
|
5639 |
-
),
|
5640 |
-
),
|
5641 |
-
array(
|
5642 |
-
'attr_spec_list' => array(
|
5643 |
-
'content' => array(
|
5644 |
-
'mandatory' => true,
|
5645 |
-
),
|
5646 |
-
'name' => array(
|
5647 |
-
'dispatch_key' => 2,
|
5648 |
-
'mandatory' => true,
|
5649 |
-
'value_casei' => 'amp-experiment-token',
|
5650 |
-
),
|
5651 |
-
),
|
5652 |
-
'tag_spec' => array(
|
5653 |
-
'mandatory_parent' => 'head',
|
5654 |
-
'spec_name' => 'meta name=amp-experiment-token',
|
5655 |
-
),
|
5656 |
-
),
|
5657 |
-
array(
|
5658 |
-
'attr_spec_list' => array(
|
5659 |
-
'content' => array(
|
5660 |
-
'mandatory' => true,
|
5661 |
-
),
|
5662 |
-
'name' => array(
|
5663 |
-
'dispatch_key' => 2,
|
5664 |
-
'mandatory' => true,
|
5665 |
-
'value_casei' => 'amp-link-variable-allowed-origin',
|
5666 |
-
),
|
5667 |
-
),
|
5668 |
-
'tag_spec' => array(
|
5669 |
-
'mandatory_parent' => 'head',
|
5670 |
-
'spec_name' => 'meta name=amp-link-variable-allowed-origin',
|
5671 |
-
),
|
5672 |
-
),
|
5673 |
-
array(
|
5674 |
-
'attr_spec_list' => array(
|
5675 |
-
'content' => array(
|
5676 |
-
'mandatory' => true,
|
5677 |
-
),
|
5678 |
-
'name' => array(
|
5679 |
-
'dispatch_key' => 2,
|
5680 |
-
'mandatory' => true,
|
5681 |
-
'value_casei' => 'amp-google-client-id-api',
|
5682 |
-
),
|
5683 |
-
),
|
5684 |
-
'tag_spec' => array(
|
5685 |
-
'mandatory_parent' => 'head',
|
5686 |
-
'spec_name' => 'meta name=amp-google-clientid-id-api',
|
5687 |
-
),
|
5688 |
-
),
|
5689 |
-
array(
|
5690 |
-
'attr_spec_list' => array(
|
5691 |
-
'name' => array(
|
5692 |
-
'dispatch_key' => 2,
|
5693 |
-
'mandatory' => true,
|
5694 |
-
'value_casei' => 'amp-ad-doubleclick-sra',
|
5695 |
-
),
|
5696 |
-
),
|
5697 |
-
'tag_spec' => array(
|
5698 |
-
'mandatory_parent' => 'head',
|
5699 |
-
'spec_name' => 'meta name=amp-ad-doubleclick-sra',
|
5700 |
-
),
|
5701 |
-
),
|
5702 |
-
array(
|
5703 |
-
'attr_spec_list' => array(
|
5704 |
-
'content' => array(),
|
5705 |
-
'itemprop' => array(),
|
5706 |
-
'name' => array(
|
5707 |
-
'blacklisted_value_regex' => '(^|\\s)(amp-.*|amp4ads-.*|apple-itunes-app|content-disposition|revisit-after|viewport)(\\s|$)',
|
5708 |
-
),
|
5709 |
-
'property' => array(),
|
5710 |
-
'scheme' => array(),
|
5711 |
-
),
|
5712 |
-
'tag_spec' => array(
|
5713 |
-
'spec_name' => 'meta name= and content=',
|
5714 |
-
),
|
5715 |
-
),
|
5716 |
-
array(
|
5717 |
-
'attr_spec_list' => array(
|
5718 |
-
'content' => array(
|
5719 |
-
'mandatory' => true,
|
5720 |
-
'value_casei' => 'text/html; charset=utf-8',
|
5721 |
-
),
|
5722 |
-
'http-equiv' => array(
|
5723 |
-
'dispatch_key' => 2,
|
5724 |
-
'mandatory' => true,
|
5725 |
-
'value_casei' => 'content-type',
|
5726 |
-
),
|
5727 |
-
),
|
5728 |
-
'tag_spec' => array(
|
5729 |
-
'mandatory_ancestor' => 'head',
|
5730 |
-
'spec_name' => 'meta http-equiv=Content-Type',
|
5731 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5732 |
-
),
|
5733 |
-
),
|
5734 |
-
array(
|
5735 |
-
'attr_spec_list' => array(
|
5736 |
-
'content' => array(
|
5737 |
-
'mandatory' => true,
|
5738 |
-
),
|
5739 |
-
'http-equiv' => array(
|
5740 |
-
'dispatch_key' => 2,
|
5741 |
-
'mandatory' => true,
|
5742 |
-
'value_casei' => 'content-language',
|
5743 |
-
),
|
5744 |
-
),
|
5745 |
-
'tag_spec' => array(
|
5746 |
-
'mandatory_ancestor' => 'head',
|
5747 |
-
'spec_name' => 'meta http-equiv=content-language',
|
5748 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5749 |
-
),
|
5750 |
-
),
|
5751 |
-
array(
|
5752 |
-
'attr_spec_list' => array(
|
5753 |
-
'content' => array(
|
5754 |
-
'mandatory' => true,
|
5755 |
-
),
|
5756 |
-
'http-equiv' => array(
|
5757 |
-
'dispatch_key' => 2,
|
5758 |
-
'mandatory' => true,
|
5759 |
-
'value_casei' => 'pics-label',
|
5760 |
-
),
|
5761 |
-
),
|
5762 |
-
'tag_spec' => array(
|
5763 |
-
'mandatory_ancestor' => 'head',
|
5764 |
-
'spec_name' => 'meta http-equiv=pics-label',
|
5765 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5766 |
-
),
|
5767 |
-
),
|
5768 |
-
array(
|
5769 |
-
'attr_spec_list' => array(
|
5770 |
-
'content' => array(
|
5771 |
-
'mandatory' => true,
|
5772 |
-
),
|
5773 |
-
'http-equiv' => array(
|
5774 |
-
'dispatch_key' => 2,
|
5775 |
-
'mandatory' => true,
|
5776 |
-
'value_casei' => 'imagetoolbar',
|
5777 |
-
),
|
5778 |
-
),
|
5779 |
-
'tag_spec' => array(
|
5780 |
-
'mandatory_ancestor' => 'head',
|
5781 |
-
'spec_name' => 'meta http-equiv=imagetoolbar',
|
5782 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5783 |
-
),
|
5784 |
-
),
|
5785 |
-
array(
|
5786 |
-
'attr_spec_list' => array(
|
5787 |
-
'content' => array(
|
5788 |
-
'mandatory' => true,
|
5789 |
-
'value_casei' => 'text/css',
|
5790 |
-
),
|
5791 |
-
'http-equiv' => array(
|
5792 |
-
'dispatch_key' => 2,
|
5793 |
-
'mandatory' => true,
|
5794 |
-
'value_casei' => 'content-style-type',
|
5795 |
-
),
|
5796 |
-
),
|
5797 |
-
'tag_spec' => array(
|
5798 |
-
'mandatory_ancestor' => 'head',
|
5799 |
-
'spec_name' => 'meta http-equiv=Content-Style-Type',
|
5800 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5801 |
-
),
|
5802 |
-
),
|
5803 |
-
array(
|
5804 |
-
'attr_spec_list' => array(
|
5805 |
-
'content' => array(
|
5806 |
-
'mandatory' => true,
|
5807 |
-
'value_casei' => 'text/javascript',
|
5808 |
-
),
|
5809 |
-
'http-equiv' => array(
|
5810 |
-
'dispatch_key' => 2,
|
5811 |
-
'mandatory' => true,
|
5812 |
-
'value_casei' => 'content-script-type',
|
5813 |
-
),
|
5814 |
-
),
|
5815 |
-
'tag_spec' => array(
|
5816 |
-
'mandatory_ancestor' => 'head',
|
5817 |
-
'spec_name' => 'meta http-equiv=Content-Script-Type',
|
5818 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5819 |
-
),
|
5820 |
-
),
|
5821 |
-
array(
|
5822 |
-
'attr_spec_list' => array(
|
5823 |
-
'content' => array(
|
5824 |
-
'mandatory' => true,
|
5825 |
-
),
|
5826 |
-
'http-equiv' => array(
|
5827 |
-
'dispatch_key' => 2,
|
5828 |
-
'mandatory' => true,
|
5829 |
-
'value_casei' => 'origin-trial',
|
5830 |
-
),
|
5831 |
-
),
|
5832 |
-
'tag_spec' => array(
|
5833 |
-
'mandatory_ancestor' => 'head',
|
5834 |
-
'spec_name' => 'meta http-equiv=origin-trial',
|
5835 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5836 |
-
),
|
5837 |
-
),
|
5838 |
-
array(
|
5839 |
-
'attr_spec_list' => array(
|
5840 |
-
'content' => array(
|
5841 |
-
'mandatory' => true,
|
5842 |
-
),
|
5843 |
-
'http-equiv' => array(
|
5844 |
-
'dispatch_key' => 2,
|
5845 |
-
'mandatory' => true,
|
5846 |
-
'value_casei' => 'resource-type',
|
5847 |
-
),
|
5848 |
-
),
|
5849 |
-
'tag_spec' => array(
|
5850 |
-
'mandatory_ancestor' => 'head',
|
5851 |
-
'spec_name' => 'meta http-equiv=resource-type',
|
5852 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5853 |
-
),
|
5854 |
-
),
|
5855 |
-
array(
|
5856 |
-
'attr_spec_list' => array(
|
5857 |
-
'content' => array(
|
5858 |
-
'mandatory' => true,
|
5859 |
-
'value_regex_casei' => '(off|on)',
|
5860 |
-
),
|
5861 |
-
'http-equiv' => array(
|
5862 |
-
'dispatch_key' => 2,
|
5863 |
-
'mandatory' => true,
|
5864 |
-
'value_casei' => 'x-dns-prefetch-control',
|
5865 |
-
),
|
5866 |
-
),
|
5867 |
-
'tag_spec' => array(
|
5868 |
-
'mandatory_ancestor' => 'head',
|
5869 |
-
'spec_name' => 'meta http-equiv=x-dns-prefetch-control',
|
5870 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#html-tags',
|
5871 |
-
),
|
5872 |
-
),
|
5873 |
-
array(
|
5874 |
-
'attr_spec_list' => array(
|
5875 |
-
'content' => array(
|
5876 |
-
'mandatory' => true,
|
5877 |
-
),
|
5878 |
-
'name' => array(
|
5879 |
-
'dispatch_key' => 2,
|
5880 |
-
'mandatory' => true,
|
5881 |
-
'value_casei' => 'amp-ad-enable-refresh',
|
5882 |
-
),
|
5883 |
-
),
|
5884 |
-
'tag_spec' => array(
|
5885 |
-
'mandatory_ancestor' => 'head',
|
5886 |
-
'spec_name' => 'meta name=amp-ad-enable-refresh',
|
5887 |
-
),
|
5888 |
-
),
|
5889 |
-
array(
|
5890 |
-
'attr_spec_list' => array(
|
5891 |
-
'content' => array(
|
5892 |
-
'mandatory' => true,
|
5893 |
-
),
|
5894 |
-
'name' => array(
|
5895 |
-
'dispatch_key' => 2,
|
5896 |
-
'mandatory' => true,
|
5897 |
-
'value_casei' => 'amp-to-amp-navigation',
|
5898 |
-
),
|
5899 |
-
),
|
5900 |
-
'tag_spec' => array(
|
5901 |
-
'mandatory_parent' => 'head',
|
5902 |
-
'spec_name' => 'meta name=amp-to-amp-navigation',
|
5903 |
-
'unique' => true,
|
5904 |
-
),
|
5905 |
-
),
|
5906 |
-
),
|
5907 |
-
'metadata' => array(
|
5908 |
-
array(
|
5909 |
-
'attr_spec_list' => array(
|
5910 |
-
'style' => array(
|
5911 |
-
'blacklisted_value_regex' => '!important',
|
5912 |
-
),
|
5913 |
-
'xml:lang' => array(),
|
5914 |
-
'xml:space' => array(),
|
5915 |
-
'xmlns' => array(),
|
5916 |
-
'xmlns:xlink' => array(),
|
5917 |
-
),
|
5918 |
-
'tag_spec' => array(
|
5919 |
-
'mandatory_ancestor' => 'svg',
|
5920 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
5921 |
-
),
|
5922 |
-
),
|
5923 |
-
),
|
5924 |
-
'meter' => array(
|
5925 |
-
array(
|
5926 |
-
'attr_spec_list' => array(
|
5927 |
-
'high' => array(),
|
5928 |
-
'low' => array(),
|
5929 |
-
'max' => array(),
|
5930 |
-
'min' => array(),
|
5931 |
-
'optimum' => array(),
|
5932 |
-
'value' => array(),
|
5933 |
-
),
|
5934 |
-
'tag_spec' => array(),
|
5935 |
-
),
|
5936 |
-
),
|
5937 |
-
'multicol' => array(
|
5938 |
-
array(
|
5939 |
-
'attr_spec_list' => array(),
|
5940 |
-
'tag_spec' => array(),
|
5941 |
-
),
|
5942 |
-
),
|
5943 |
-
'nav' => array(
|
5944 |
-
array(
|
5945 |
-
'attr_spec_list' => array(),
|
5946 |
-
'tag_spec' => array(),
|
5947 |
-
),
|
5948 |
-
array(
|
5949 |
-
'attr_spec_list' => array(
|
5950 |
-
'toolbar' => array(
|
5951 |
-
'dispatch_key' => 1,
|
5952 |
-
'mandatory' => true,
|
5953 |
-
),
|
5954 |
-
'toolbar-target' => array(
|
5955 |
-
'mandatory' => true,
|
5956 |
-
),
|
5957 |
-
),
|
5958 |
-
'tag_spec' => array(
|
5959 |
-
'mandatory_parent' => 'amp-sidebar',
|
5960 |
-
'spec_name' => 'amp-sidebar > nav',
|
5961 |
-
),
|
5962 |
-
),
|
5963 |
-
),
|
5964 |
-
'nextid' => array(
|
5965 |
-
array(
|
5966 |
-
'attr_spec_list' => array(),
|
5967 |
-
'tag_spec' => array(),
|
5968 |
-
),
|
5969 |
-
),
|
5970 |
-
'nobr' => array(
|
5971 |
-
array(
|
5972 |
-
'attr_spec_list' => array(),
|
5973 |
-
'tag_spec' => array(),
|
5974 |
-
),
|
5975 |
-
),
|
5976 |
-
'noscript' => array(
|
5977 |
-
array(
|
5978 |
-
'attr_spec_list' => array(),
|
5979 |
-
'tag_spec' => array(
|
5980 |
-
'mandatory' => true,
|
5981 |
-
'mandatory_parent' => 'head',
|
5982 |
-
'spec_name' => 'noscript enclosure for boilerplate',
|
5983 |
-
'spec_url' => 'https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md',
|
5984 |
-
'unique' => true,
|
5985 |
-
),
|
5986 |
-
),
|
5987 |
-
array(
|
5988 |
-
'attr_spec_list' => array(),
|
5989 |
-
'tag_spec' => array(
|
5990 |
-
'disallowed_ancestor' => array(
|
5991 |
-
'noscript',
|
5992 |
-
),
|
5993 |
-
'mandatory_ancestor' => 'body',
|
5994 |
-
),
|
5995 |
-
),
|
5996 |
-
),
|
5997 |
-
'o:p' => array(
|
5998 |
-
array(
|
5999 |
-
'attr_spec_list' => array(),
|
6000 |
-
'tag_spec' => array(),
|
6001 |
-
),
|
6002 |
-
),
|
6003 |
-
'ol' => array(
|
6004 |
-
array(
|
6005 |
-
'attr_spec_list' => array(
|
6006 |
-
'reversed' => array(
|
6007 |
-
'value' => '',
|
6008 |
-
),
|
6009 |
-
'start' => array(
|
6010 |
-
'value_regex' => '[0-9]*',
|
6011 |
-
),
|
6012 |
-
'type' => array(
|
6013 |
-
'value_regex' => '[1AaIi]',
|
6014 |
-
),
|
6015 |
-
),
|
6016 |
-
'tag_spec' => array(),
|
6017 |
-
),
|
6018 |
-
),
|
6019 |
-
'optgroup' => array(
|
6020 |
-
array(
|
6021 |
-
'attr_spec_list' => array(
|
6022 |
-
'[disabled]' => array(),
|
6023 |
-
'[label]' => array(),
|
6024 |
-
'disabled' => array(),
|
6025 |
-
'label' => array(),
|
6026 |
-
),
|
6027 |
-
'tag_spec' => array(
|
6028 |
-
'mandatory_parent' => 'select',
|
6029 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-form',
|
6030 |
-
),
|
6031 |
-
),
|
6032 |
-
),
|
6033 |
-
'option' => array(
|
6034 |
-
array(
|
6035 |
-
'attr_spec_list' => array(
|
6036 |
-
'[disabled]' => array(),
|
6037 |
-
'[label]' => array(),
|
6038 |
-
'[selected]' => array(),
|
6039 |
-
'[value]' => array(),
|
6040 |
-
'disabled' => array(),
|
6041 |
-
'label' => array(),
|
6042 |
-
'selected' => array(),
|
6043 |
-
'value' => array(),
|
6044 |
-
),
|
6045 |
-
'tag_spec' => array(
|
6046 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-form',
|
6047 |
-
),
|
6048 |
-
),
|
6049 |
-
),
|
6050 |
-
'output' => array(
|
6051 |
-
array(
|
6052 |
-
'attr_spec_list' => array(
|
6053 |
-
'for' => array(),
|
6054 |
-
'form' => array(),
|
6055 |
-
'name' => array(
|
6056 |
-
'blacklisted_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|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|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|$)',
|
6057 |
-
),
|
6058 |
-
),
|
6059 |
-
'tag_spec' => array(),
|
6060 |
-
),
|
6061 |
-
),
|
6062 |
-
'p' => array(
|
6063 |
-
array(
|
6064 |
-
'attr_spec_list' => array(
|
6065 |
-
'align' => array(),
|
6066 |
-
),
|
6067 |
-
'tag_spec' => array(),
|
6068 |
-
),
|
6069 |
-
),
|
6070 |
-
'path' => array(
|
6071 |
-
array(
|
6072 |
-
'attr_spec_list' => array(
|
6073 |
-
'alignment-baseline' => array(),
|
6074 |
-
'baseline-shift' => array(),
|
6075 |
-
'clip' => array(),
|
6076 |
-
'clip-path' => array(),
|
6077 |
-
'clip-rule' => array(),
|
6078 |
-
'color' => array(),
|
6079 |
-
'color-interpolation' => array(),
|
6080 |
-
'color-interpolation-filters' => array(),
|
6081 |
-
'color-profile' => array(),
|
6082 |
-
'color-rendering' => array(),
|
6083 |
-
'cursor' => array(),
|
6084 |
-
'd' => array(),
|
6085 |
-
'direction' => array(),
|
6086 |
-
'display' => array(),
|
6087 |
-
'dominant-baseline' => array(),
|
6088 |
-
'enable-background' => array(),
|
6089 |
-
'externalresourcesrequired' => array(),
|
6090 |
-
'fill' => array(),
|
6091 |
-
'fill-opacity' => array(),
|
6092 |
-
'fill-rule' => array(),
|
6093 |
-
'filter' => array(),
|
6094 |
-
'flood-color' => array(),
|
6095 |
-
'flood-opacity' => array(),
|
6096 |
-
'font-family' => array(),
|
6097 |
-
'font-size' => array(),
|
6098 |
-
'font-size-adjust' => array(),
|
6099 |
-
'font-stretch' => array(),
|
6100 |
-
'font-style' => array(),
|
6101 |
-
'font-variant' => array(),
|
6102 |
-
'font-weight' => array(),
|
6103 |
-
'glyph-orientation-horizontal' => array(),
|
6104 |
-
'glyph-orientation-vertical' => array(),
|
6105 |
-
'image-rendering' => array(),
|
6106 |
-
'kerning' => array(),
|
6107 |
-
'letter-spacing' => array(),
|
6108 |
-
'lighting-color' => array(),
|
6109 |
-
'marker-end' => array(),
|
6110 |
-
'marker-mid' => array(),
|
6111 |
-
'marker-start' => array(),
|
6112 |
-
'mask' => array(),
|
6113 |
-
'opacity' => array(),
|
6114 |
-
'overflow' => array(),
|
6115 |
-
'pathlength' => array(),
|
6116 |
-
'pointer-events' => array(),
|
6117 |
-
'requiredextensions' => array(),
|
6118 |
-
'requiredfeatures' => array(),
|
6119 |
-
'shape-rendering' => array(),
|
6120 |
-
'sketch:type' => array(),
|
6121 |
-
'stop-color' => array(),
|
6122 |
-
'stop-opacity' => array(),
|
6123 |
-
'stroke' => array(),
|
6124 |
-
'stroke-dasharray' => array(),
|
6125 |
-
'stroke-dashoffset' => array(),
|
6126 |
-
'stroke-linecap' => array(),
|
6127 |
-
'stroke-linejoin' => array(),
|
6128 |
-
'stroke-miterlimit' => array(),
|
6129 |
-
'stroke-opacity' => array(),
|
6130 |
-
'stroke-width' => array(),
|
6131 |
-
'style' => array(
|
6132 |
-
'blacklisted_value_regex' => '!important',
|
6133 |
-
),
|
6134 |
-
'systemlanguage' => array(),
|
6135 |
-
'text-anchor' => array(),
|
6136 |
-
'text-decoration' => array(),
|
6137 |
-
'text-rendering' => array(),
|
6138 |
-
'transform' => array(),
|
6139 |
-
'unicode-bidi' => array(),
|
6140 |
-
'vector-effect' => array(),
|
6141 |
-
'visibility' => array(),
|
6142 |
-
'word-spacing' => array(),
|
6143 |
-
'writing-mode' => array(),
|
6144 |
-
'xml:lang' => array(),
|
6145 |
-
'xml:space' => array(),
|
6146 |
-
'xmlns' => array(),
|
6147 |
-
'xmlns:xlink' => array(),
|
6148 |
-
),
|
6149 |
-
'tag_spec' => array(
|
6150 |
-
'mandatory_ancestor' => 'svg',
|
6151 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
6152 |
-
),
|
6153 |
-
),
|
6154 |
-
),
|
6155 |
-
'pattern' => array(
|
6156 |
-
array(
|
6157 |
-
'attr_spec_list' => array(
|
6158 |
-
'alignment-baseline' => array(),
|
6159 |
-
'baseline-shift' => array(),
|
6160 |
-
'clip' => array(),
|
6161 |
-
'clip-path' => array(),
|
6162 |
-
'clip-rule' => array(),
|
6163 |
-
'color' => array(),
|
6164 |
-
'color-interpolation' => array(),
|
6165 |
-
'color-interpolation-filters' => array(),
|
6166 |
-
'color-profile' => array(),
|
6167 |
-
'color-rendering' => array(),
|
6168 |
-
'cursor' => array(),
|
6169 |
-
'direction' => array(),
|
6170 |
-
'display' => array(),
|
6171 |
-
'dominant-baseline' => array(),
|
6172 |
-
'enable-background' => array(),
|
6173 |
-
'externalresourcesrequired' => array(),
|
6174 |
-
'fill' => array(),
|
6175 |
-
'fill-opacity' => array(),
|
6176 |
-
'fill-rule' => array(),
|
6177 |
-
'filter' => array(),
|
6178 |
-
'flood-color' => array(),
|
6179 |
-
'flood-opacity' => array(),
|
6180 |
-
'font-family' => array(),
|
6181 |
-
'font-size' => array(),
|
6182 |
-
'font-size-adjust' => array(),
|
6183 |
-
'font-stretch' => array(),
|
6184 |
-
'font-style' => array(),
|
6185 |
-
'font-variant' => array(),
|
6186 |
-
'font-weight' => array(),
|
6187 |
-
'glyph-orientation-horizontal' => array(),
|
6188 |
-
'glyph-orientation-vertical' => array(),
|
6189 |
-
'height' => array(),
|
6190 |
-
'image-rendering' => array(),
|
6191 |
-
'kerning' => array(),
|
6192 |
-
'letter-spacing' => array(),
|
6193 |
-
'lighting-color' => array(),
|
6194 |
-
'marker-end' => array(),
|
6195 |
-
'marker-mid' => array(),
|
6196 |
-
'marker-start' => array(),
|
6197 |
-
'mask' => array(),
|
6198 |
-
'opacity' => array(),
|
6199 |
-
'overflow' => array(),
|
6200 |
-
'patterncontentunits' => array(),
|
6201 |
-
'patterntransform' => array(),
|
6202 |
-
'patternunits' => array(),
|
6203 |
-
'pointer-events' => array(),
|
6204 |
-
'preserveaspectratio' => array(),
|
6205 |
-
'requiredextensions' => array(),
|
6206 |
-
'requiredfeatures' => array(),
|
6207 |
-
'shape-rendering' => array(),
|
6208 |
-
'stop-color' => array(),
|
6209 |
-
'stop-opacity' => array(),
|
6210 |
-
'stroke' => array(),
|
6211 |
-
'stroke-dasharray' => array(),
|
6212 |
-
'stroke-dashoffset' => array(),
|
6213 |
-
'stroke-linecap' => array(),
|
6214 |
-
'stroke-linejoin' => array(),
|
6215 |
-
'stroke-miterlimit' => array(),
|
6216 |
-
'stroke-opacity' => array(),
|
6217 |
-
'stroke-width' => array(),
|
6218 |
-
'style' => array(
|
6219 |
-
'blacklisted_value_regex' => '!important',
|
6220 |
-
),
|
6221 |
-
'systemlanguage' => array(),
|
6222 |
-
'text-anchor' => array(),
|
6223 |
-
'text-decoration' => array(),
|
6224 |
-
'text-rendering' => array(),
|
6225 |
-
'unicode-bidi' => array(),
|
6226 |
-
'vector-effect' => array(),
|
6227 |
-
'viewbox' => array(),
|
6228 |
-
'visibility' => array(),
|
6229 |
-
'width' => array(),
|
6230 |
-
'word-spacing' => array(),
|
6231 |
-
'writing-mode' => array(),
|
6232 |
-
'x' => array(),
|
6233 |
-
'xlink:actuate' => array(),
|
6234 |
-
'xlink:arcrole' => array(),
|
6235 |
-
'xlink:href' => array(
|
6236 |
-
'alternative_names' => array(
|
6237 |
-
'href',
|
6238 |
-
),
|
6239 |
-
'value_url' => array(
|
6240 |
-
'allow_empty' => false,
|
6241 |
-
'allow_relative' => true,
|
6242 |
-
'allowed_protocol' => array(
|
6243 |
-
'http',
|
6244 |
-
'https',
|
6245 |
-
),
|
6246 |
-
),
|
6247 |
-
),
|
6248 |
-
'xlink:role' => array(),
|
6249 |
-
'xlink:show' => array(),
|
6250 |
-
'xlink:title' => array(),
|
6251 |
-
'xlink:type' => array(),
|
6252 |
-
'xml:lang' => array(),
|
6253 |
-
'xml:space' => array(),
|
6254 |
-
'xmlns' => array(),
|
6255 |
-
'xmlns:xlink' => array(),
|
6256 |
-
'y' => array(),
|
6257 |
-
),
|
6258 |
-
'tag_spec' => array(
|
6259 |
-
'mandatory_ancestor' => 'svg',
|
6260 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
6261 |
-
),
|
6262 |
-
),
|
6263 |
-
),
|
6264 |
-
'polygon' => array(
|
6265 |
-
array(
|
6266 |
-
'attr_spec_list' => array(
|
6267 |
-
'alignment-baseline' => array(),
|
6268 |
-
'baseline-shift' => array(),
|
6269 |
-
'clip' => array(),
|
6270 |
-
'clip-path' => array(),
|
6271 |
-
'clip-rule' => array(),
|
6272 |
-
'color' => array(),
|
6273 |
-
'color-interpolation' => array(),
|
6274 |
-
'color-interpolation-filters' => array(),
|
6275 |
-
'color-profile' => array(),
|
6276 |
-
'color-rendering' => array(),
|
6277 |
-
'cursor' => array(),
|
6278 |
-
'direction' => array(),
|
6279 |
-
'display' => array(),
|
6280 |
-
'dominant-baseline' => array(),
|
6281 |
-
'enable-background' => array(),
|
6282 |
-
'externalresourcesrequired' => array(),
|
6283 |
-
'fill' => array(),
|
6284 |
-
'fill-opacity' => array(),
|
6285 |
-
'fill-rule' => array(),
|
6286 |
-
'filter' => array(),
|
6287 |
-
'flood-color' => array(),
|
6288 |
-
'flood-opacity' => array(),
|
6289 |
-
'font-family' => array(),
|
6290 |
-
'font-size' => array(),
|
6291 |
-
'font-size-adjust' => array(),
|
6292 |
-
'font-stretch' => array(),
|
6293 |
-
'font-style' => array(),
|
6294 |
-
'font-variant' => array(),
|
6295 |
-
'font-weight' => array(),
|
6296 |
-
'glyph-orientation-horizontal' => array(),
|
6297 |
-
'glyph-orientation-vertical' => array(),
|
6298 |
-
'image-rendering' => array(),
|
6299 |
-
'kerning' => array(),
|
6300 |
-
'letter-spacing' => array(),
|
6301 |
-
'lighting-color' => array(),
|
6302 |
-
'marker-end' => array(),
|
6303 |
-
'marker-mid' => array(),
|
6304 |
-
'marker-start' => array(),
|
6305 |
-
'mask' => array(),
|
6306 |
-
'opacity' => array(),
|
6307 |
-
'overflow' => array(),
|
6308 |
-
'pointer-events' => array(),
|
6309 |
-
'points' => array(),
|
6310 |
-
'requiredextensions' => array(),
|
6311 |
-
'requiredfeatures' => array(),
|
6312 |
-
'shape-rendering' => array(),
|
6313 |
-
'sketch:type' => array(),
|
6314 |
-
'stop-color' => array(),
|
6315 |
-
'stop-opacity' => array(),
|
6316 |
-
'stroke' => array(),
|
6317 |
-
'stroke-dasharray' => array(),
|
6318 |
-
'stroke-dashoffset' => array(),
|
6319 |
-
'stroke-linecap' => array(),
|
6320 |
-
'stroke-linejoin' => array(),
|
6321 |
-
'stroke-miterlimit' => array(),
|
6322 |
-
'stroke-opacity' => array(),
|
6323 |
-
'stroke-width' => array(),
|
6324 |
-
'style' => array(
|
6325 |
-
'blacklisted_value_regex' => '!important',
|
6326 |
-
),
|
6327 |
-
'systemlanguage' => array(),
|
6328 |
-
'text-anchor' => array(),
|
6329 |
-
'text-decoration' => array(),
|
6330 |
-
'text-rendering' => array(),
|
6331 |
-
'transform' => array(),
|
6332 |
-
'unicode-bidi' => array(),
|
6333 |
-
'vector-effect' => array(),
|
6334 |
-
'visibility' => array(),
|
6335 |
-
'word-spacing' => array(),
|
6336 |
-
'writing-mode' => array(),
|
6337 |
-
'xml:lang' => array(),
|
6338 |
-
'xml:space' => array(),
|
6339 |
-
'xmlns' => array(),
|
6340 |
-
'xmlns:xlink' => array(),
|
6341 |
-
),
|
6342 |
-
'tag_spec' => array(
|
6343 |
-
'mandatory_ancestor' => 'svg',
|
6344 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
6345 |
-
),
|
6346 |
-
),
|
6347 |
-
),
|
6348 |
-
'polyline' => array(
|
6349 |
-
array(
|
6350 |
-
'attr_spec_list' => array(
|
6351 |
-
'alignment-baseline' => array(),
|
6352 |
-
'baseline-shift' => array(),
|
6353 |
-
'clip' => array(),
|
6354 |
-
'clip-path' => array(),
|
6355 |
-
'clip-rule' => array(),
|
6356 |
-
'color' => array(),
|
6357 |
-
'color-interpolation' => array(),
|
6358 |
-
'color-interpolation-filters' => array(),
|
6359 |
-
'color-profile' => array(),
|
6360 |
-
'color-rendering' => array(),
|
6361 |
-
'cursor' => array(),
|
6362 |
-
'direction' => array(),
|
6363 |
-
'display' => array(),
|
6364 |
-
'dominant-baseline' => array(),
|
6365 |
-
'enable-background' => array(),
|
6366 |
-
'externalresourcesrequired' => array(),
|
6367 |
-
'fill' => array(),
|
6368 |
-
'fill-opacity' => array(),
|
6369 |
-
'fill-rule' => array(),
|
6370 |
-
'filter' => array(),
|
6371 |
-
'flood-color' => array(),
|
6372 |
-
'flood-opacity' => array(),
|
6373 |
-
'font-family' => array(),
|
6374 |
-
'font-size' => array(),
|
6375 |
-
'font-size-adjust' => array(),
|
6376 |
-
'font-stretch' => array(),
|
6377 |
-
'font-style' => array(),
|
6378 |
-
'font-variant' => array(),
|
6379 |
-
'font-weight' => array(),
|
6380 |
-
'glyph-orientation-horizontal' => array(),
|
6381 |
-
'glyph-orientation-vertical' => array(),
|
6382 |
-
'image-rendering' => array(),
|
6383 |
-
'kerning' => array(),
|
6384 |
-
'letter-spacing' => array(),
|
6385 |
-
'lighting-color' => array(),
|
6386 |
-
'marker-end' => array(),
|
6387 |
-
'marker-mid' => array(),
|
6388 |
-
'marker-start' => array(),
|
6389 |
-
'mask' => array(),
|
6390 |
-
'opacity' => array(),
|
6391 |
-
'overflow' => array(),
|
6392 |
-
'pointer-events' => array(),
|
6393 |
-
'points' => array(),
|
6394 |
-
'requiredextensions' => array(),
|
6395 |
-
'requiredfeatures' => array(),
|
6396 |
-
'shape-rendering' => array(),
|
6397 |
-
'sketch:type' => array(),
|
6398 |
-
'stop-color' => array(),
|
6399 |
-
'stop-opacity' => array(),
|
6400 |
-
'stroke' => array(),
|
6401 |
-
'stroke-dasharray' => array(),
|
6402 |
-
'stroke-dashoffset' => array(),
|
6403 |
-
'stroke-linecap' => array(),
|
6404 |
-
'stroke-linejoin' => array(),
|
6405 |
-
'stroke-miterlimit' => array(),
|
6406 |
-
'stroke-opacity' => array(),
|
6407 |
-
'stroke-width' => array(),
|
6408 |
-
'style' => array(
|
6409 |
-
'blacklisted_value_regex' => '!important',
|
6410 |
-
),
|
6411 |
-
'systemlanguage' => array(),
|
6412 |
-
'text-anchor' => array(),
|
6413 |
-
'text-decoration' => array(),
|
6414 |
-
'text-rendering' => array(),
|
6415 |
-
'transform' => array(),
|
6416 |
-
'unicode-bidi' => array(),
|
6417 |
-
'vector-effect' => array(),
|
6418 |
-
'visibility' => array(),
|
6419 |
-
'word-spacing' => array(),
|
6420 |
-
'writing-mode' => array(),
|
6421 |
-
'xml:lang' => array(),
|
6422 |
-
'xml:space' => array(),
|
6423 |
-
'xmlns' => array(),
|
6424 |
-
'xmlns:xlink' => array(),
|
6425 |
-
),
|
6426 |
-
'tag_spec' => array(
|
6427 |
-
'mandatory_ancestor' => 'svg',
|
6428 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
6429 |
-
),
|
6430 |
-
),
|
6431 |
-
),
|
6432 |
-
'pre' => array(
|
6433 |
-
array(
|
6434 |
-
'attr_spec_list' => array(),
|
6435 |
-
'tag_spec' => array(),
|
6436 |
-
),
|
6437 |
-
),
|
6438 |
-
'progress' => array(
|
6439 |
-
array(
|
6440 |
-
'attr_spec_list' => array(
|
6441 |
-
'max' => array(),
|
6442 |
-
'value' => array(),
|
6443 |
-
),
|
6444 |
-
'tag_spec' => array(),
|
6445 |
-
),
|
6446 |
-
),
|
6447 |
-
'q' => array(
|
6448 |
-
array(
|
6449 |
-
'attr_spec_list' => array(
|
6450 |
-
'cite' => array(
|
6451 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
6452 |
-
'value_url' => array(
|
6453 |
-
'allow_empty' => true,
|
6454 |
-
'allow_relative' => true,
|
6455 |
-
'allowed_protocol' => array(
|
6456 |
-
'http',
|
6457 |
-
'https',
|
6458 |
-
),
|
6459 |
-
),
|
6460 |
-
),
|
6461 |
-
),
|
6462 |
-
'tag_spec' => array(),
|
6463 |
-
),
|
6464 |
-
),
|
6465 |
-
'radialgradient' => array(
|
6466 |
-
array(
|
6467 |
-
'attr_spec_list' => array(
|
6468 |
-
'alignment-baseline' => array(),
|
6469 |
-
'baseline-shift' => array(),
|
6470 |
-
'clip' => array(),
|
6471 |
-
'clip-path' => array(),
|
6472 |
-
'clip-rule' => array(),
|
6473 |
-
'color' => array(),
|
6474 |
-
'color-interpolation' => array(),
|
6475 |
-
'color-interpolation-filters' => array(),
|
6476 |
-
'color-profile' => array(),
|
6477 |
-
'color-rendering' => array(),
|
6478 |
-
'cursor' => array(),
|
6479 |
-
'cx' => array(),
|
6480 |
-
'cy' => array(),
|
6481 |
-
'direction' => array(),
|
6482 |
-
'display' => array(),
|
6483 |
-
'dominant-baseline' => array(),
|
6484 |
-
'enable-background' => array(),
|
6485 |
-
'externalresourcesrequired' => array(),
|
6486 |
-
'fill' => array(),
|
6487 |
-
'fill-opacity' => array(),
|
6488 |
-
'fill-rule' => array(),
|
6489 |
-
'filter' => array(),
|
6490 |
-
'flood-color' => array(),
|
6491 |
-
'flood-opacity' => array(),
|
6492 |
-
'font-family' => array(),
|
6493 |
-
'font-size' => array(),
|
6494 |
-
'font-size-adjust' => array(),
|
6495 |
-
'font-stretch' => array(),
|
6496 |
-
'font-style' => array(),
|
6497 |
-
'font-variant' => array(),
|
6498 |
-
'font-weight' => array(),
|
6499 |
-
'fr' => array(),
|
6500 |
-
'fx' => array(),
|
6501 |
-
'fy' => array(),
|
6502 |
-
'glyph-orientation-horizontal' => array(),
|
6503 |
-
'glyph-orientation-vertical' => array(),
|
6504 |
-
'gradienttransform' => array(),
|
6505 |
-
'gradientunits' => array(),
|
6506 |
-
'image-rendering' => array(),
|
6507 |
-
'kerning' => array(),
|
6508 |
-
'letter-spacing' => array(),
|
6509 |
-
'lighting-color' => array(),
|
6510 |
-
'marker-end' => array(),
|
6511 |
-
'marker-mid' => array(),
|
6512 |
-
'marker-start' => array(),
|
6513 |
-
'mask' => array(),
|
6514 |
-
'opacity' => array(),
|
6515 |
-
'overflow' => array(),
|
6516 |
-
'pointer-events' => array(),
|
6517 |
-
'r' => array(),
|
6518 |
-
'shape-rendering' => array(),
|
6519 |
-
'spreadmethod' => array(),
|
6520 |
-
'stop-color' => array(),
|
6521 |
-
'stop-opacity' => array(),
|
6522 |
-
'stroke' => array(),
|
6523 |
-
'stroke-dasharray' => array(),
|
6524 |
-
'stroke-dashoffset' => array(),
|
6525 |
-
'stroke-linecap' => array(),
|
6526 |
-
'stroke-linejoin' => array(),
|
6527 |
-
'stroke-miterlimit' => array(),
|
6528 |
-
'stroke-opacity' => array(),
|
6529 |
-
'stroke-width' => array(),
|
6530 |
-
'style' => array(
|
6531 |
-
'blacklisted_value_regex' => '!important',
|
6532 |
-
),
|
6533 |
-
'text-anchor' => array(),
|
6534 |
-
'text-decoration' => array(),
|
6535 |
-
'text-rendering' => array(),
|
6536 |
-
'unicode-bidi' => array(),
|
6537 |
-
'vector-effect' => array(),
|
6538 |
-
'visibility' => array(),
|
6539 |
-
'word-spacing' => array(),
|
6540 |
-
'writing-mode' => array(),
|
6541 |
-
'xlink:actuate' => array(),
|
6542 |
-
'xlink:arcrole' => array(),
|
6543 |
-
'xlink:href' => array(
|
6544 |
-
'alternative_names' => array(
|
6545 |
-
'href',
|
6546 |
-
),
|
6547 |
-
'value_url' => array(
|
6548 |
-
'allow_empty' => false,
|
6549 |
-
'allow_relative' => true,
|
6550 |
-
'allowed_protocol' => array(
|
6551 |
-
'http',
|
6552 |
-
'https',
|
6553 |
-
),
|
6554 |
-
),
|
6555 |
-
),
|
6556 |
-
'xlink:role' => array(),
|
6557 |
-
'xlink:show' => array(),
|
6558 |
-
'xlink:title' => array(),
|
6559 |
-
'xlink:type' => array(),
|
6560 |
-
'xml:lang' => array(),
|
6561 |
-
'xml:space' => array(),
|
6562 |
-
'xmlns' => array(),
|
6563 |
-
'xmlns:xlink' => array(),
|
6564 |
-
),
|
6565 |
-
'tag_spec' => array(
|
6566 |
-
'mandatory_ancestor' => 'svg',
|
6567 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
6568 |
-
),
|
6569 |
-
),
|
6570 |
-
),
|
6571 |
-
'rb' => array(
|
6572 |
-
array(
|
6573 |
-
'attr_spec_list' => array(),
|
6574 |
-
'tag_spec' => array(),
|
6575 |
-
),
|
6576 |
-
),
|
6577 |
-
'rect' => array(
|
6578 |
-
array(
|
6579 |
-
'attr_spec_list' => array(
|
6580 |
-
'alignment-baseline' => array(),
|
6581 |
-
'baseline-shift' => array(),
|
6582 |
-
'clip' => array(),
|
6583 |
-
'clip-path' => array(),
|
6584 |
-
'clip-rule' => array(),
|
6585 |
-
'color' => array(),
|
6586 |
-
'color-interpolation' => array(),
|
6587 |
-
'color-interpolation-filters' => array(),
|
6588 |
-
'color-profile' => array(),
|
6589 |
-
'color-rendering' => array(),
|
6590 |
-
'cursor' => array(),
|
6591 |
-
'direction' => array(),
|
6592 |
-
'display' => array(),
|
6593 |
-
'dominant-baseline' => array(),
|
6594 |
-
'enable-background' => array(),
|
6595 |
-
'externalresourcesrequired' => array(),
|
6596 |
-
'fill' => array(),
|
6597 |
-
'fill-opacity' => array(),
|
6598 |
-
'fill-rule' => array(),
|
6599 |
-
'filter' => array(),
|
6600 |
-
'flood-color' => array(),
|
6601 |
-
'flood-opacity' => array(),
|
6602 |
-
'font-family' => array(),
|
6603 |
-
'font-size' => array(),
|
6604 |
-
'font-size-adjust' => array(),
|
6605 |
-
'font-stretch' => array(),
|
6606 |
-
'font-style' => array(),
|
6607 |
-
'font-variant' => array(),
|
6608 |
-
'font-weight' => array(),
|
6609 |
-
'glyph-orientation-horizontal' => array(),
|
6610 |
-
'glyph-orientation-vertical' => array(),
|
6611 |
-
'height' => array(),
|
6612 |
-
'image-rendering' => array(),
|
6613 |
-
'kerning' => array(),
|
6614 |
-
'letter-spacing' => array(),
|
6615 |
-
'lighting-color' => array(),
|
6616 |
-
'marker-end' => array(),
|
6617 |
-
'marker-mid' => array(),
|
6618 |
-
'marker-start' => array(),
|
6619 |
-
'mask' => array(),
|
6620 |
-
'opacity' => array(),
|
6621 |
-
'overflow' => array(),
|
6622 |
-
'pointer-events' => array(),
|
6623 |
-
'requiredextensions' => array(),
|
6624 |
-
'requiredfeatures' => array(),
|
6625 |
-
'rx' => array(),
|
6626 |
-
'ry' => array(),
|
6627 |
-
'shape-rendering' => array(),
|
6628 |
-
'sketch:type' => array(),
|
6629 |
-
'stop-color' => array(),
|
6630 |
-
'stop-opacity' => array(),
|
6631 |
-
'stroke' => array(),
|
6632 |
-
'stroke-dasharray' => array(),
|
6633 |
-
'stroke-dashoffset' => array(),
|
6634 |
-
'stroke-linecap' => array(),
|
6635 |
-
'stroke-linejoin' => array(),
|
6636 |
-
'stroke-miterlimit' => array(),
|
6637 |
-
'stroke-opacity' => array(),
|
6638 |
-
'stroke-width' => array(),
|
6639 |
-
'style' => array(
|
6640 |
-
'blacklisted_value_regex' => '!important',
|
6641 |
-
),
|
6642 |
-
'systemlanguage' => array(),
|
6643 |
-
'text-anchor' => array(),
|
6644 |
-
'text-decoration' => array(),
|
6645 |
-
'text-rendering' => array(),
|
6646 |
-
'transform' => array(),
|
6647 |
-
'unicode-bidi' => array(),
|
6648 |
-
'vector-effect' => array(),
|
6649 |
-
'visibility' => array(),
|
6650 |
-
'width' => array(),
|
6651 |
-
'word-spacing' => array(),
|
6652 |
-
'writing-mode' => array(),
|
6653 |
-
'x' => array(),
|
6654 |
-
'xml:lang' => array(),
|
6655 |
-
'xml:space' => array(),
|
6656 |
-
'xmlns' => array(),
|
6657 |
-
'xmlns:xlink' => array(),
|
6658 |
-
'y' => array(),
|
6659 |
-
),
|
6660 |
-
'tag_spec' => array(
|
6661 |
-
'mandatory_ancestor' => 'svg',
|
6662 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
6663 |
-
),
|
6664 |
-
),
|
6665 |
-
),
|
6666 |
-
'rp' => array(
|
6667 |
-
array(
|
6668 |
-
'attr_spec_list' => array(),
|
6669 |
-
'tag_spec' => array(),
|
6670 |
-
),
|
6671 |
-
),
|
6672 |
-
'rt' => array(
|
6673 |
-
array(
|
6674 |
-
'attr_spec_list' => array(),
|
6675 |
-
'tag_spec' => array(),
|
6676 |
-
),
|
6677 |
-
),
|
6678 |
-
'rtc' => array(
|
6679 |
-
array(
|
6680 |
-
'attr_spec_list' => array(),
|
6681 |
-
'tag_spec' => array(),
|
6682 |
-
),
|
6683 |
-
),
|
6684 |
-
'ruby' => array(
|
6685 |
-
array(
|
6686 |
-
'attr_spec_list' => array(),
|
6687 |
-
'tag_spec' => array(),
|
6688 |
-
),
|
6689 |
-
),
|
6690 |
-
's' => array(
|
6691 |
-
array(
|
6692 |
-
'attr_spec_list' => array(),
|
6693 |
-
'tag_spec' => array(),
|
6694 |
-
),
|
6695 |
-
),
|
6696 |
-
'samp' => array(
|
6697 |
-
array(
|
6698 |
-
'attr_spec_list' => array(),
|
6699 |
-
'tag_spec' => array(),
|
6700 |
-
),
|
6701 |
-
),
|
6702 |
-
'script' => array(
|
6703 |
-
array(
|
6704 |
-
'attr_spec_list' => array(
|
6705 |
-
'async' => array(
|
6706 |
-
'mandatory' => true,
|
6707 |
-
'value' => '',
|
6708 |
-
),
|
6709 |
-
'nonce' => array(),
|
6710 |
-
'src' => array(
|
6711 |
-
'dispatch_key' => 2,
|
6712 |
-
'mandatory' => true,
|
6713 |
-
'value' => 'https://cdn.ampproject.org/v0.js',
|
6714 |
-
),
|
6715 |
-
'type' => array(
|
6716 |
-
'value_casei' => 'text/javascript',
|
6717 |
-
),
|
6718 |
-
),
|
6719 |
-
'cdata' => array(
|
6720 |
-
'blacklisted_cdata_regex' => array(
|
6721 |
-
'error_message' => 'contents',
|
6722 |
-
'regex' => '.',
|
6723 |
-
),
|
6724 |
-
),
|
6725 |
-
'tag_spec' => array(
|
6726 |
-
'mandatory' => true,
|
6727 |
-
'mandatory_parent' => 'head',
|
6728 |
-
'spec_name' => 'amphtml engine v0.js script',
|
6729 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#required-markup',
|
6730 |
-
'unique' => true,
|
6731 |
-
),
|
6732 |
-
),
|
6733 |
-
array(
|
6734 |
-
'attr_spec_list' => array(
|
6735 |
-
'nonce' => array(),
|
6736 |
-
'type' => array(
|
6737 |
-
'dispatch_key' => 2,
|
6738 |
-
'mandatory' => true,
|
6739 |
-
'value_casei' => 'application/ld+json',
|
6740 |
-
),
|
6741 |
-
),
|
6742 |
-
'cdata' => array(
|
6743 |
-
'blacklisted_cdata_regex' => array(
|
6744 |
-
'error_message' => 'html comments',
|
6745 |
-
'regex' => '<!--',
|
6746 |
-
),
|
6747 |
-
),
|
6748 |
-
'tag_spec' => array(
|
6749 |
-
'spec_name' => 'script type=application/ld+json',
|
6750 |
-
),
|
6751 |
-
),
|
6752 |
-
array(
|
6753 |
-
'attr_spec_list' => array(
|
6754 |
-
'id' => array(
|
6755 |
-
'dispatch_key' => 2,
|
6756 |
-
'mandatory' => true,
|
6757 |
-
'value_casei' => 'amp-rtc',
|
6758 |
-
),
|
6759 |
-
'nonce' => array(),
|
6760 |
-
'type' => array(
|
6761 |
-
'mandatory' => true,
|
6762 |
-
'value_casei' => 'application/json',
|
6763 |
-
),
|
6764 |
-
),
|
6765 |
-
'cdata' => array(
|
6766 |
-
'blacklisted_cdata_regex' => array(
|
6767 |
-
'error_message' => 'html comments',
|
6768 |
-
'regex' => '<!--',
|
6769 |
-
),
|
6770 |
-
),
|
6771 |
-
'tag_spec' => array(
|
6772 |
-
'mandatory_parent' => 'head',
|
6773 |
-
'spec_name' => 'script id=amp-rtc',
|
6774 |
-
'unique' => true,
|
6775 |
-
),
|
6776 |
-
),
|
6777 |
-
array(
|
6778 |
-
'attr_spec_list' => array(
|
6779 |
-
'type' => array(
|
6780 |
-
'dispatch_key' => 3,
|
6781 |
-
'mandatory' => true,
|
6782 |
-
'value_casei' => 'application/json',
|
6783 |
-
),
|
6784 |
-
),
|
6785 |
-
'cdata' => array(
|
6786 |
-
'blacklisted_cdata_regex' => array(
|
6787 |
-
'error_message' => 'html comments',
|
6788 |
-
'regex' => '<!--',
|
6789 |
-
),
|
6790 |
-
),
|
6791 |
-
'tag_spec' => array(
|
6792 |
-
'mandatory_parent' => 'amp-ima-video',
|
6793 |
-
'spec_name' => 'amp-ima-video > script[type=application/json]',
|
6794 |
-
),
|
6795 |
-
),
|
6796 |
-
array(
|
6797 |
-
'attr_spec_list' => array(
|
6798 |
-
'async' => array(
|
6799 |
-
'mandatory' => true,
|
6800 |
-
'value' => '',
|
6801 |
-
),
|
6802 |
-
'nonce' => array(),
|
6803 |
-
'type' => array(
|
6804 |
-
'value_casei' => 'text/javascript',
|
6805 |
-
),
|
6806 |
-
),
|
6807 |
-
'tag_spec' => array(
|
6808 |
-
'extension_spec' => array(
|
6809 |
-
'allowed_versions' => array(
|
6810 |
-
'0.1',
|
6811 |
-
'latest',
|
6812 |
-
),
|
6813 |
-
'name' => 'amp-3q-player',
|
6814 |
-
),
|
6815 |
-
),
|
6816 |
-
),
|
6817 |
-
array(
|
6818 |
-
'attr_spec_list' => array(
|
6819 |
-
'async' => array(
|
6820 |
-
'mandatory' => true,
|
6821 |
-
'value' => '',
|
6822 |
-
),
|
6823 |
-
'nonce' => array(),
|
6824 |
-
'type' => array(
|
6825 |
-
'value_casei' => 'text/javascript',
|
6826 |
-
),
|
6827 |
-
),
|
6828 |
-
'tag_spec' => array(
|
6829 |
-
'extension_spec' => array(
|
6830 |
-
'allowed_versions' => array(
|
6831 |
-
'0.1',
|
6832 |
-
'latest',
|
6833 |
-
),
|
6834 |
-
'name' => 'amp-access-laterpay',
|
6835 |
-
'requires_usage' => 3,
|
6836 |
-
),
|
6837 |
-
'requires_extension' => array(
|
6838 |
-
'amp-access',
|
6839 |
-
),
|
6840 |
-
),
|
6841 |
-
),
|
6842 |
-
array(
|
6843 |
-
'attr_spec_list' => array(
|
6844 |
-
'async' => array(
|
6845 |
-
'mandatory' => true,
|
6846 |
-
'value' => '',
|
6847 |
-
),
|
6848 |
-
'nonce' => array(),
|
6849 |
-
'type' => array(
|
6850 |
-
'value_casei' => 'text/javascript',
|
6851 |
-
),
|
6852 |
-
),
|
6853 |
-
'tag_spec' => array(
|
6854 |
-
'extension_spec' => array(
|
6855 |
-
'allowed_versions' => array(
|
6856 |
-
'0.1',
|
6857 |
-
'latest',
|
6858 |
-
),
|
6859 |
-
'name' => 'amp-access-scroll',
|
6860 |
-
'requires_usage' => 3,
|
6861 |
-
),
|
6862 |
-
'requires_extension' => array(
|
6863 |
-
'amp-access',
|
6864 |
-
),
|
6865 |
-
),
|
6866 |
-
),
|
6867 |
-
array(
|
6868 |
-
'attr_spec_list' => array(
|
6869 |
-
'async' => array(
|
6870 |
-
'mandatory' => true,
|
6871 |
-
'value' => '',
|
6872 |
-
),
|
6873 |
-
'nonce' => array(),
|
6874 |
-
'type' => array(
|
6875 |
-
'value_casei' => 'text/javascript',
|
6876 |
-
),
|
6877 |
-
),
|
6878 |
-
'tag_spec' => array(
|
6879 |
-
'extension_spec' => array(
|
6880 |
-
'allowed_versions' => array(
|
6881 |
-
'0.1',
|
6882 |
-
'latest',
|
6883 |
-
),
|
6884 |
-
'deprecated_allow_duplicates' => true,
|
6885 |
-
'name' => 'amp-access',
|
6886 |
-
'requires_usage' => 2,
|
6887 |
-
),
|
6888 |
-
),
|
6889 |
-
),
|
6890 |
-
array(
|
6891 |
-
'attr_spec_list' => array(
|
6892 |
-
'id' => array(
|
6893 |
-
'dispatch_key' => 2,
|
6894 |
-
'mandatory' => true,
|
6895 |
-
'value' => 'amp-access',
|
6896 |
-
),
|
6897 |
-
'nonce' => array(),
|
6898 |
-
'type' => array(
|
6899 |
-
'mandatory' => true,
|
6900 |
-
'value_casei' => 'application/json',
|
6901 |
-
),
|
6902 |
-
),
|
6903 |
-
'cdata' => array(
|
6904 |
-
'blacklisted_cdata_regex' => array(
|
6905 |
-
'error_message' => 'html comments',
|
6906 |
-
'regex' => '<!--',
|
6907 |
-
),
|
6908 |
-
),
|
6909 |
-
'tag_spec' => array(
|
6910 |
-
'mandatory_parent' => 'head',
|
6911 |
-
'requires_extension' => array(
|
6912 |
-
'amp-access',
|
6913 |
-
'amp-analytics',
|
6914 |
-
),
|
6915 |
-
'spec_name' => 'amp-access extension .json script',
|
6916 |
-
'unique' => true,
|
6917 |
-
),
|
6918 |
-
),
|
6919 |
-
array(
|
6920 |
-
'attr_spec_list' => array(
|
6921 |
-
'async' => array(
|
6922 |
-
'mandatory' => true,
|
6923 |
-
'value' => '',
|
6924 |
-
),
|
6925 |
-
'nonce' => array(),
|
6926 |
-
'type' => array(
|
6927 |
-
'value_casei' => 'text/javascript',
|
6928 |
-
),
|
6929 |
-
),
|
6930 |
-
'tag_spec' => array(
|
6931 |
-
'extension_spec' => array(
|
6932 |
-
'allowed_versions' => array(
|
6933 |
-
'0.1',
|
6934 |
-
'latest',
|
6935 |
-
),
|
6936 |
-
'deprecated_allow_duplicates' => true,
|
6937 |
-
'name' => 'amp-accordion',
|
6938 |
-
'requires_usage' => 2,
|
6939 |
-
),
|
6940 |
-
),
|
6941 |
-
),
|
6942 |
-
array(
|
6943 |
-
'attr_spec_list' => array(
|
6944 |
-
'async' => array(
|
6945 |
-
'mandatory' => true,
|
6946 |
-
'value' => '',
|
6947 |
-
),
|
6948 |
-
'nonce' => array(),
|
6949 |
-
'type' => array(
|
6950 |
-
'value_casei' => 'text/javascript',
|
6951 |
-
),
|
6952 |
-
),
|
6953 |
-
'tag_spec' => array(
|
6954 |
-
'extension_spec' => array(
|
6955 |
-
'allowed_versions' => array(
|
6956 |
-
'0.1',
|
6957 |
-
'latest',
|
6958 |
-
),
|
6959 |
-
'deprecated_allow_duplicates' => true,
|
6960 |
-
'name' => 'amp-ad',
|
6961 |
-
'requires_usage' => 2,
|
6962 |
-
),
|
6963 |
-
'spec_name' => 'amp-ad extension .js script',
|
6964 |
-
),
|
6965 |
-
),
|
6966 |
-
array(
|
6967 |
-
'attr_spec_list' => array(
|
6968 |
-
'async' => array(
|
6969 |
-
'mandatory' => true,
|
6970 |
-
'value' => '',
|
6971 |
-
),
|
6972 |
-
'nonce' => array(),
|
6973 |
-
'type' => array(
|
6974 |
-
'value_casei' => 'text/javascript',
|
6975 |
-
),
|
6976 |
-
),
|
6977 |
-
'tag_spec' => array(
|
6978 |
-
'extension_spec' => array(
|
6979 |
-
'allowed_versions' => array(
|
6980 |
-
'0.1',
|
6981 |
-
'latest',
|
6982 |
-
),
|
6983 |
-
'deprecated_allow_duplicates' => true,
|
6984 |
-
'name' => 'amp-analytics',
|
6985 |
-
'requires_usage' => 2,
|
6986 |
-
),
|
6987 |
-
),
|
6988 |
-
),
|
6989 |
-
array(
|
6990 |
-
'attr_spec_list' => array(
|
6991 |
-
'nonce' => array(),
|
6992 |
-
'type' => array(
|
6993 |
-
'dispatch_key' => 3,
|
6994 |
-
'mandatory' => true,
|
6995 |
-
'value_casei' => 'application/json',
|
6996 |
-
),
|
6997 |
-
),
|
6998 |
-
'cdata' => array(
|
6999 |
-
'blacklisted_cdata_regex' => array(
|
7000 |
-
'error_message' => 'html comments',
|
7001 |
-
'regex' => '<!--',
|
7002 |
-
),
|
7003 |
-
),
|
7004 |
-
'tag_spec' => array(
|
7005 |
-
'mandatory_parent' => 'amp-analytics',
|
7006 |
-
'requires_extension' => array(
|
7007 |
-
'amp-analytics',
|
7008 |
-
),
|
7009 |
-
'spec_name' => 'amp-analytics extension .json script',
|
7010 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-analytics',
|
7011 |
-
),
|
7012 |
-
),
|
7013 |
-
array(
|
7014 |
-
'attr_spec_list' => array(
|
7015 |
-
'async' => array(
|
7016 |
-
'mandatory' => true,
|
7017 |
-
'value' => '',
|
7018 |
-
),
|
7019 |
-
'nonce' => array(),
|
7020 |
-
'type' => array(
|
7021 |
-
'value_casei' => 'text/javascript',
|
7022 |
-
),
|
7023 |
-
),
|
7024 |
-
'tag_spec' => array(
|
7025 |
-
'extension_spec' => array(
|
7026 |
-
'allowed_versions' => array(
|
7027 |
-
'0.1',
|
7028 |
-
'latest',
|
7029 |
-
),
|
7030 |
-
'deprecated_allow_duplicates' => true,
|
7031 |
-
'name' => 'amp-anim',
|
7032 |
-
'requires_usage' => 2,
|
7033 |
-
),
|
7034 |
-
),
|
7035 |
-
),
|
7036 |
-
array(
|
7037 |
-
'attr_spec_list' => array(
|
7038 |
-
'async' => array(
|
7039 |
-
'mandatory' => true,
|
7040 |
-
'value' => '',
|
7041 |
-
),
|
7042 |
-
'nonce' => array(),
|
7043 |
-
'type' => array(
|
7044 |
-
'value_casei' => 'text/javascript',
|
7045 |
-
),
|
7046 |
-
),
|
7047 |
-
'tag_spec' => array(
|
7048 |
-
'extension_spec' => array(
|
7049 |
-
'allowed_versions' => array(
|
7050 |
-
'0.1',
|
7051 |
-
'latest',
|
7052 |
-
),
|
7053 |
-
'name' => 'amp-animation',
|
7054 |
-
),
|
7055 |
-
),
|
7056 |
-
),
|
7057 |
-
array(
|
7058 |
-
'attr_spec_list' => array(
|
7059 |
-
'nonce' => array(),
|
7060 |
-
'type' => array(
|
7061 |
-
'dispatch_key' => 3,
|
7062 |
-
'mandatory' => true,
|
7063 |
-
'value_casei' => 'application/json',
|
7064 |
-
),
|
7065 |
-
),
|
7066 |
-
'cdata' => array(
|
7067 |
-
'blacklisted_cdata_regex' => array(
|
7068 |
-
'error_message' => 'html comments',
|
7069 |
-
'regex' => '<!--',
|
7070 |
-
),
|
7071 |
-
),
|
7072 |
-
'tag_spec' => array(
|
7073 |
-
'mandatory_parent' => 'amp-animation',
|
7074 |
-
'requires_extension' => array(
|
7075 |
-
'amp-animation',
|
7076 |
-
),
|
7077 |
-
'spec_name' => 'amp-animation extension .json script',
|
7078 |
-
),
|
7079 |
-
),
|
7080 |
-
array(
|
7081 |
-
'attr_spec_list' => array(
|
7082 |
-
'async' => array(
|
7083 |
-
'mandatory' => true,
|
7084 |
-
'value' => '',
|
7085 |
-
),
|
7086 |
-
'nonce' => array(),
|
7087 |
-
'type' => array(
|
7088 |
-
'value_casei' => 'text/javascript',
|
7089 |
-
),
|
7090 |
-
),
|
7091 |
-
'tag_spec' => array(
|
7092 |
-
'extension_spec' => array(
|
7093 |
-
'allowed_versions' => array(
|
7094 |
-
'0.1',
|
7095 |
-
'latest',
|
7096 |
-
),
|
7097 |
-
'deprecated_allow_duplicates' => true,
|
7098 |
-
'name' => 'amp-apester-media',
|
7099 |
-
'requires_usage' => 2,
|
7100 |
-
),
|
7101 |
-
),
|
7102 |
-
),
|
7103 |
-
array(
|
7104 |
-
'attr_spec_list' => array(
|
7105 |
-
'async' => array(
|
7106 |
-
'mandatory' => true,
|
7107 |
-
'value' => '',
|
7108 |
-
),
|
7109 |
-
'nonce' => array(),
|
7110 |
-
'type' => array(
|
7111 |
-
'value_casei' => 'text/javascript',
|
7112 |
-
),
|
7113 |
-
),
|
7114 |
-
'tag_spec' => array(
|
7115 |
-
'extension_spec' => array(
|
7116 |
-
'allowed_versions' => array(
|
7117 |
-
'0.1',
|
7118 |
-
'latest',
|
7119 |
-
),
|
7120 |
-
'deprecated_allow_duplicates' => true,
|
7121 |
-
'name' => 'amp-app-banner',
|
7122 |
-
),
|
7123 |
-
),
|
7124 |
-
),
|
7125 |
-
array(
|
7126 |
-
'attr_spec_list' => array(
|
7127 |
-
'async' => array(
|
7128 |
-
'mandatory' => true,
|
7129 |
-
'value' => '',
|
7130 |
-
),
|
7131 |
-
'nonce' => array(),
|
7132 |
-
'type' => array(
|
7133 |
-
'value_casei' => 'text/javascript',
|
7134 |
-
),
|
7135 |
-
),
|
7136 |
-
'tag_spec' => array(
|
7137 |
-
'extension_spec' => array(
|
7138 |
-
'allowed_versions' => array(
|
7139 |
-
'0.1',
|
7140 |
-
'latest',
|
7141 |
-
),
|
7142 |
-
'deprecated_allow_duplicates' => true,
|
7143 |
-
'name' => 'amp-audio',
|
7144 |
-
'requires_usage' => 2,
|
7145 |
-
),
|
7146 |
-
),
|
7147 |
-
),
|
7148 |
-
array(
|
7149 |
-
'attr_spec_list' => array(
|
7150 |
-
'async' => array(
|
7151 |
-
'mandatory' => true,
|
7152 |
-
'value' => '',
|
7153 |
-
),
|
7154 |
-
'nonce' => array(),
|
7155 |
-
'type' => array(
|
7156 |
-
'value_casei' => 'text/javascript',
|
7157 |
-
),
|
7158 |
-
),
|
7159 |
-
'tag_spec' => array(
|
7160 |
-
'extension_spec' => array(
|
7161 |
-
'allowed_versions' => array(
|
7162 |
-
'0.1',
|
7163 |
-
'latest',
|
7164 |
-
),
|
7165 |
-
'name' => 'amp-auto-ads',
|
7166 |
-
),
|
7167 |
-
),
|
7168 |
-
),
|
7169 |
-
array(
|
7170 |
-
'attr_spec_list' => array(
|
7171 |
-
'async' => array(
|
7172 |
-
'mandatory' => true,
|
7173 |
-
'value' => '',
|
7174 |
-
),
|
7175 |
-
'nonce' => array(),
|
7176 |
-
'type' => array(
|
7177 |
-
'value_casei' => 'text/javascript',
|
7178 |
-
),
|
7179 |
-
),
|
7180 |
-
'tag_spec' => array(
|
7181 |
-
'extension_spec' => array(
|
7182 |
-
'allowed_versions' => array(
|
7183 |
-
'0.1',
|
7184 |
-
'latest',
|
7185 |
-
),
|
7186 |
-
'name' => 'amp-beopinion',
|
7187 |
-
),
|
7188 |
-
),
|
7189 |
-
),
|
7190 |
-
array(
|
7191 |
-
'attr_spec_list' => array(
|
7192 |
-
'async' => array(
|
7193 |
-
'mandatory' => true,
|
7194 |
-
'value' => '',
|
7195 |
-
),
|
7196 |
-
'nonce' => array(),
|
7197 |
-
'type' => array(
|
7198 |
-
'value_casei' => 'text/javascript',
|
7199 |
-
),
|
7200 |
-
),
|
7201 |
-
'tag_spec' => array(
|
7202 |
-
'extension_spec' => array(
|
7203 |
-
'allowed_versions' => array(
|
7204 |
-
'0.1',
|
7205 |
-
'latest',
|
7206 |
-
),
|
7207 |
-
'name' => 'amp-bind',
|
7208 |
-
'requires_usage' => 3,
|
7209 |
-
),
|
7210 |
-
),
|
7211 |
-
),
|
7212 |
-
array(
|
7213 |
-
'attr_spec_list' => array(
|
7214 |
-
'nonce' => array(),
|
7215 |
-
'type' => array(
|
7216 |
-
'dispatch_key' => 3,
|
7217 |
-
'mandatory' => true,
|
7218 |
-
'value_casei' => 'application/json',
|
7219 |
-
),
|
7220 |
-
),
|
7221 |
-
'cdata' => array(
|
7222 |
-
'blacklisted_cdata_regex' => array(
|
7223 |
-
'error_message' => 'html comments',
|
7224 |
-
'regex' => '<!--',
|
7225 |
-
),
|
7226 |
-
),
|
7227 |
-
'tag_spec' => array(
|
7228 |
-
'mandatory_parent' => 'amp-state',
|
7229 |
-
'requires_extension' => array(
|
7230 |
-
'amp-bind',
|
7231 |
-
),
|
7232 |
-
'spec_name' => 'amp-bind extension .json script',
|
7233 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-bind',
|
7234 |
-
),
|
7235 |
-
),
|
7236 |
-
array(
|
7237 |
-
'attr_spec_list' => array(
|
7238 |
-
'async' => array(
|
7239 |
-
'mandatory' => true,
|
7240 |
-
'value' => '',
|
7241 |
-
),
|
7242 |
-
'nonce' => array(),
|
7243 |
-
'type' => array(
|
7244 |
-
'value_casei' => 'text/javascript',
|
7245 |
-
),
|
7246 |
-
),
|
7247 |
-
'tag_spec' => array(
|
7248 |
-
'extension_spec' => array(
|
7249 |
-
'allowed_versions' => array(
|
7250 |
-
'0.1',
|
7251 |
-
'latest',
|
7252 |
-
),
|
7253 |
-
'name' => 'amp-bodymovin-animation',
|
7254 |
-
),
|
7255 |
-
),
|
7256 |
-
),
|
7257 |
-
array(
|
7258 |
-
'attr_spec_list' => array(
|
7259 |
-
'async' => array(
|
7260 |
-
'mandatory' => true,
|
7261 |
-
'value' => '',
|
7262 |
-
),
|
7263 |
-
'nonce' => array(),
|
7264 |
-
'type' => array(
|
7265 |
-
'value_casei' => 'text/javascript',
|
7266 |
-
),
|
7267 |
-
),
|
7268 |
-
'tag_spec' => array(
|
7269 |
-
'extension_spec' => array(
|
7270 |
-
'allowed_versions' => array(
|
7271 |
-
'0.1',
|
7272 |
-
'latest',
|
7273 |
-
),
|
7274 |
-
'deprecated_allow_duplicates' => true,
|
7275 |
-
'name' => 'amp-brid-player',
|
7276 |
-
'requires_usage' => 2,
|
7277 |
-
),
|
7278 |
-
),
|
7279 |
-
),
|
7280 |
-
array(
|
7281 |
-
'attr_spec_list' => array(
|
7282 |
-
'async' => array(
|
7283 |
-
'mandatory' => true,
|
7284 |
-
'value' => '',
|
7285 |
-
),
|
7286 |
-
'nonce' => array(),
|
7287 |
-
'type' => array(
|
7288 |
-
'value_casei' => 'text/javascript',
|
7289 |
-
),
|
7290 |
-
),
|
7291 |
-
'tag_spec' => array(
|
7292 |
-
'extension_spec' => array(
|
7293 |
-
'allowed_versions' => array(
|
7294 |
-
'0.1',
|
7295 |
-
'latest',
|
7296 |
-
),
|
7297 |
-
'deprecated_allow_duplicates' => true,
|
7298 |
-
'name' => 'amp-brightcove',
|
7299 |
-
'requires_usage' => 2,
|
7300 |
-
),
|
7301 |
-
),
|
7302 |
-
),
|
7303 |
-
array(
|
7304 |
-
'attr_spec_list' => array(
|
7305 |
-
'async' => array(
|
7306 |
-
'mandatory' => true,
|
7307 |
-
'value' => '',
|
7308 |
-
),
|
7309 |
-
'nonce' => array(),
|
7310 |
-
'type' => array(
|
7311 |
-
'value_casei' => 'text/javascript',
|
7312 |
-
),
|
7313 |
-
),
|
7314 |
-
'tag_spec' => array(
|
7315 |
-
'extension_spec' => array(
|
7316 |
-
'allowed_versions' => array(
|
7317 |
-
'0.1',
|
7318 |
-
'latest',
|
7319 |
-
),
|
7320 |
-
'name' => 'amp-byside-content',
|
7321 |
-
),
|
7322 |
-
),
|
7323 |
-
),
|
7324 |
-
array(
|
7325 |
-
'attr_spec_list' => array(
|
7326 |
-
'async' => array(
|
7327 |
-
'mandatory' => true,
|
7328 |
-
'value' => '',
|
7329 |
-
),
|
7330 |
-
'nonce' => array(),
|
7331 |
-
'type' => array(
|
7332 |
-
'value_casei' => 'text/javascript',
|
7333 |
-
),
|
7334 |
-
),
|
7335 |
-
'tag_spec' => array(
|
7336 |
-
'extension_spec' => array(
|
7337 |
-
'allowed_versions' => array(
|
7338 |
-
'0.1',
|
7339 |
-
'latest',
|
7340 |
-
),
|
7341 |
-
'name' => 'amp-call-tracking',
|
7342 |
-
'requires_usage' => 2,
|
7343 |
-
),
|
7344 |
-
),
|
7345 |
-
),
|
7346 |
-
array(
|
7347 |
-
'attr_spec_list' => array(
|
7348 |
-
'async' => array(
|
7349 |
-
'mandatory' => true,
|
7350 |
-
'value' => '',
|
7351 |
-
),
|
7352 |
-
'nonce' => array(),
|
7353 |
-
'type' => array(
|
7354 |
-
'value_casei' => 'text/javascript',
|
7355 |
-
),
|
7356 |
-
),
|
7357 |
-
'tag_spec' => array(
|
7358 |
-
'extension_spec' => array(
|
7359 |
-
'allowed_versions' => array(
|
7360 |
-
'0.1',
|
7361 |
-
'latest',
|
7362 |
-
),
|
7363 |
-
'deprecated_allow_duplicates' => true,
|
7364 |
-
'name' => 'amp-carousel',
|
7365 |
-
'requires_usage' => 2,
|
7366 |
-
),
|
7367 |
-
),
|
7368 |
-
),
|
7369 |
-
array(
|
7370 |
-
'attr_spec_list' => array(
|
7371 |
-
'async' => array(
|
7372 |
-
'mandatory' => true,
|
7373 |
-
'value' => '',
|
7374 |
-
),
|
7375 |
-
'nonce' => array(),
|
7376 |
-
'type' => array(
|
7377 |
-
'value_casei' => 'text/javascript',
|
7378 |
-
),
|
7379 |
-
),
|
7380 |
-
'tag_spec' => array(
|
7381 |
-
'extension_spec' => array(
|
7382 |
-
'allowed_versions' => array(
|
7383 |
-
'0.1',
|
7384 |
-
'latest',
|
7385 |
-
),
|
7386 |
-
'name' => 'amp-consent',
|
7387 |
-
),
|
7388 |
-
),
|
7389 |
-
),
|
7390 |
-
array(
|
7391 |
-
'attr_spec_list' => array(
|
7392 |
-
'nonce' => array(),
|
7393 |
-
'type' => array(
|
7394 |
-
'dispatch_key' => 3,
|
7395 |
-
'mandatory' => true,
|
7396 |
-
'value_casei' => 'application/json',
|
7397 |
-
),
|
7398 |
-
),
|
7399 |
-
'cdata' => array(
|
7400 |
-
'blacklisted_cdata_regex' => array(
|
7401 |
-
'error_message' => 'html comments',
|
7402 |
-
'regex' => '<!--',
|
7403 |
-
),
|
7404 |
-
),
|
7405 |
-
'tag_spec' => array(
|
7406 |
-
'mandatory_parent' => 'amp-consent',
|
7407 |
-
'requires_extension' => array(
|
7408 |
-
'amp-consent',
|
7409 |
-
),
|
7410 |
-
'spec_name' => 'amp-consent extension .json script',
|
7411 |
-
'unique' => true,
|
7412 |
-
),
|
7413 |
-
),
|
7414 |
-
array(
|
7415 |
-
'attr_spec_list' => array(
|
7416 |
-
'async' => array(
|
7417 |
-
'mandatory' => true,
|
7418 |
-
'value' => '',
|
7419 |
-
),
|
7420 |
-
'nonce' => array(),
|
7421 |
-
'type' => array(
|
7422 |
-
'value_casei' => 'text/javascript',
|
7423 |
-
),
|
7424 |
-
),
|
7425 |
-
'tag_spec' => array(
|
7426 |
-
'extension_spec' => array(
|
7427 |
-
'allowed_versions' => array(
|
7428 |
-
'0.1',
|
7429 |
-
'latest',
|
7430 |
-
),
|
7431 |
-
'deprecated_allow_duplicates' => true,
|
7432 |
-
'name' => 'amp-dailymotion',
|
7433 |
-
'requires_usage' => 2,
|
7434 |
-
),
|
7435 |
-
),
|
7436 |
-
),
|
7437 |
-
array(
|
7438 |
-
'attr_spec_list' => array(
|
7439 |
-
'async' => array(
|
7440 |
-
'mandatory' => true,
|
7441 |
-
'value' => '',
|
7442 |
-
),
|
7443 |
-
'nonce' => array(),
|
7444 |
-
'type' => array(
|
7445 |
-
'value_casei' => 'text/javascript',
|
7446 |
-
),
|
7447 |
-
),
|
7448 |
-
'tag_spec' => array(
|
7449 |
-
'extension_spec' => array(
|
7450 |
-
'allowed_versions' => array(
|
7451 |
-
'0.1',
|
7452 |
-
'latest',
|
7453 |
-
),
|
7454 |
-
'name' => 'amp-date-picker',
|
7455 |
-
),
|
7456 |
-
),
|
7457 |
-
),
|
7458 |
-
array(
|
7459 |
-
'attr_spec_list' => array(),
|
7460 |
-
'tag_spec' => array(
|
7461 |
-
'extension_spec' => array(
|
7462 |
-
'allowed_versions' => array(
|
7463 |
-
'0.1',
|
7464 |
-
'latest',
|
7465 |
-
),
|
7466 |
-
'name' => 'amp-document-recommendations',
|
7467 |
-
),
|
7468 |
-
),
|
7469 |
-
),
|
7470 |
-
array(
|
7471 |
-
'attr_spec_list' => array(
|
7472 |
-
'recommendations' => array(
|
7473 |
-
'dispatch_key' => 3,
|
7474 |
-
'mandatory' => true,
|
7475 |
-
'value_casei' => 'application/json',
|
7476 |
-
),
|
7477 |
-
),
|
7478 |
-
'tag_spec' => array(
|
7479 |
-
'mandatory_parent' => 'amp-document-recommendations',
|
7480 |
-
'requires_extension' => array(
|
7481 |
-
'amp-document-recommendations',
|
7482 |
-
),
|
7483 |
-
'spec_name' => 'amp-document-recommendations extension .json configuration',
|
7484 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-document-recommendations',
|
7485 |
-
),
|
7486 |
-
),
|
7487 |
-
array(
|
7488 |
-
'attr_spec_list' => array(
|
7489 |
-
'async' => array(
|
7490 |
-
'mandatory' => true,
|
7491 |
-
'value' => '',
|
7492 |
-
),
|
7493 |
-
'nonce' => array(),
|
7494 |
-
'type' => array(
|
7495 |
-
'value_casei' => 'text/javascript',
|
7496 |
-
),
|
7497 |
-
),
|
7498 |
-
'tag_spec' => array(
|
7499 |
-
'extension_spec' => array(
|
7500 |
-
'allowed_versions' => array(
|
7501 |
-
'0.1',
|
7502 |
-
'latest',
|
7503 |
-
),
|
7504 |
-
'deprecated_allow_duplicates' => true,
|
7505 |
-
'name' => 'amp-dynamic-css-classes',
|
7506 |
-
'requires_usage' => 3,
|
7507 |
-
),
|
7508 |
-
),
|
7509 |
-
),
|
7510 |
-
array(
|
7511 |
-
'attr_spec_list' => array(
|
7512 |
-
'async' => array(
|
7513 |
-
'mandatory' => true,
|
7514 |
-
'value' => '',
|
7515 |
-
),
|
7516 |
-
'nonce' => array(),
|
7517 |
-
'type' => array(
|
7518 |
-
'value_casei' => 'text/javascript',
|
7519 |
-
),
|
7520 |
-
),
|
7521 |
-
'tag_spec' => array(
|
7522 |
-
'extension_spec' => array(
|
7523 |
-
'allowed_versions' => array(
|
7524 |
-
'0.1',
|
7525 |
-
'latest',
|
7526 |
-
),
|
7527 |
-
'deprecated_allow_duplicates' => true,
|
7528 |
-
'name' => 'amp-experiment',
|
7529 |
-
'requires_usage' => 2,
|
7530 |
-
),
|
7531 |
-
),
|
7532 |
-
),
|
7533 |
-
array(
|
7534 |
-
'attr_spec_list' => array(
|
7535 |
-
'nonce' => array(),
|
7536 |
-
'type' => array(
|
7537 |
-
'dispatch_key' => 3,
|
7538 |
-
'mandatory' => true,
|
7539 |
-
'value_casei' => 'application/json',
|
7540 |
-
),
|
7541 |
-
),
|
7542 |
-
'cdata' => array(
|
7543 |
-
'blacklisted_cdata_regex' => array(
|
7544 |
-
'error_message' => 'html comments',
|
7545 |
-
'regex' => '<!--',
|
7546 |
-
),
|
7547 |
-
),
|
7548 |
-
'tag_spec' => array(
|
7549 |
-
'mandatory_parent' => 'amp-experiment',
|
7550 |
-
'spec_name' => 'amp-experiment extension .json script',
|
7551 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-experiment',
|
7552 |
-
),
|
7553 |
-
),
|
7554 |
-
array(
|
7555 |
-
'attr_spec_list' => array(
|
7556 |
-
'async' => array(
|
7557 |
-
'mandatory' => true,
|
7558 |
-
'value' => '',
|
7559 |
-
),
|
7560 |
-
'nonce' => array(),
|
7561 |
-
'type' => array(
|
7562 |
-
'value_casei' => 'text/javascript',
|
7563 |
-
),
|
7564 |
-
),
|
7565 |
-
'tag_spec' => array(
|
7566 |
-
'extension_spec' => array(
|
7567 |
-
'allowed_versions' => array(
|
7568 |
-
'0.1',
|
7569 |
-
'latest',
|
7570 |
-
),
|
7571 |
-
'name' => 'amp-facebook-comments',
|
7572 |
-
),
|
7573 |
-
),
|
7574 |
-
),
|
7575 |
-
array(
|
7576 |
-
'attr_spec_list' => array(
|
7577 |
-
'async' => array(
|
7578 |
-
'mandatory' => true,
|
7579 |
-
'value' => '',
|
7580 |
-
),
|
7581 |
-
'nonce' => array(),
|
7582 |
-
'type' => array(
|
7583 |
-
'value_casei' => 'text/javascript',
|
7584 |
-
),
|
7585 |
-
),
|
7586 |
-
'tag_spec' => array(
|
7587 |
-
'extension_spec' => array(
|
7588 |
-
'allowed_versions' => array(
|
7589 |
-
'0.1',
|
7590 |
-
'latest',
|
7591 |
-
),
|
7592 |
-
'name' => 'amp-facebook-like',
|
7593 |
-
),
|
7594 |
-
),
|
7595 |
-
),
|
7596 |
-
array(
|
7597 |
-
'attr_spec_list' => array(
|
7598 |
-
'async' => array(
|
7599 |
-
'mandatory' => true,
|
7600 |
-
'value' => '',
|
7601 |
-
),
|
7602 |
-
'nonce' => array(),
|
7603 |
-
'type' => array(
|
7604 |
-
'value_casei' => 'text/javascript',
|
7605 |
-
),
|
7606 |
-
),
|
7607 |
-
'tag_spec' => array(
|
7608 |
-
'extension_spec' => array(
|
7609 |
-
'allowed_versions' => array(
|
7610 |
-
'0.1',
|
7611 |
-
'latest',
|
7612 |
-
),
|
7613 |
-
'name' => 'amp-facebook-page',
|
7614 |
-
),
|
7615 |
-
),
|
7616 |
-
),
|
7617 |
-
array(
|
7618 |
-
'attr_spec_list' => array(
|
7619 |
-
'async' => array(
|
7620 |
-
'mandatory' => true,
|
7621 |
-
'value' => '',
|
7622 |
-
),
|
7623 |
-
'nonce' => array(),
|
7624 |
-
'type' => array(
|
7625 |
-
'value_casei' => 'text/javascript',
|
7626 |
-
),
|
7627 |
-
),
|
7628 |
-
'tag_spec' => array(
|
7629 |
-
'extension_spec' => array(
|
7630 |
-
'allowed_versions' => array(
|
7631 |
-
'0.1',
|
7632 |
-
'latest',
|
7633 |
-
),
|
7634 |
-
'deprecated_allow_duplicates' => true,
|
7635 |
-
'name' => 'amp-facebook',
|
7636 |
-
'requires_usage' => 2,
|
7637 |
-
),
|
7638 |
-
),
|
7639 |
-
),
|
7640 |
-
array(
|
7641 |
-
'attr_spec_list' => array(
|
7642 |
-
'async' => array(
|
7643 |
-
'mandatory' => true,
|
7644 |
-
'value' => '',
|
7645 |
-
),
|
7646 |
-
'nonce' => array(),
|
7647 |
-
'type' => array(
|
7648 |
-
'value_casei' => 'text/javascript',
|
7649 |
-
),
|
7650 |
-
),
|
7651 |
-
'tag_spec' => array(
|
7652 |
-
'extension_spec' => array(
|
7653 |
-
'allowed_versions' => array(
|
7654 |
-
'0.1',
|
7655 |
-
'latest',
|
7656 |
-
),
|
7657 |
-
'deprecated_allow_duplicates' => true,
|
7658 |
-
'name' => 'amp-fit-text',
|
7659 |
-
'requires_usage' => 2,
|
7660 |
-
),
|
7661 |
-
),
|
7662 |
-
),
|
7663 |
-
array(
|
7664 |
-
'attr_spec_list' => array(
|
7665 |
-
'async' => array(
|
7666 |
-
'mandatory' => true,
|
7667 |
-
'value' => '',
|
7668 |
-
),
|
7669 |
-
'nonce' => array(),
|
7670 |
-
'type' => array(
|
7671 |
-
'value_casei' => 'text/javascript',
|
7672 |
-
),
|
7673 |
-
),
|
7674 |
-
'tag_spec' => array(
|
7675 |
-
'extension_spec' => array(
|
7676 |
-
'allowed_versions' => array(
|
7677 |
-
'0.1',
|
7678 |
-
'latest',
|
7679 |
-
),
|
7680 |
-
'deprecated_allow_duplicates' => true,
|
7681 |
-
'name' => 'amp-font',
|
7682 |
-
'requires_usage' => 2,
|
7683 |
-
),
|
7684 |
-
),
|
7685 |
-
),
|
7686 |
-
array(
|
7687 |
-
'attr_spec_list' => array(
|
7688 |
-
'async' => array(
|
7689 |
-
'mandatory' => true,
|
7690 |
-
'value' => '',
|
7691 |
-
),
|
7692 |
-
'nonce' => array(),
|
7693 |
-
'type' => array(
|
7694 |
-
'value_casei' => 'text/javascript',
|
7695 |
-
),
|
7696 |
-
),
|
7697 |
-
'tag_spec' => array(
|
7698 |
-
'extension_spec' => array(
|
7699 |
-
'allowed_versions' => array(
|
7700 |
-
'0.1',
|
7701 |
-
'latest',
|
7702 |
-
),
|
7703 |
-
'deprecated_allow_duplicates' => true,
|
7704 |
-
'name' => 'amp-form',
|
7705 |
-
'requires_usage' => 2,
|
7706 |
-
),
|
7707 |
-
),
|
7708 |
-
),
|
7709 |
-
array(
|
7710 |
-
'attr_spec_list' => array(
|
7711 |
-
'async' => array(
|
7712 |
-
'mandatory' => true,
|
7713 |
-
'value' => '',
|
7714 |
-
),
|
7715 |
-
'nonce' => array(),
|
7716 |
-
'type' => array(
|
7717 |
-
'value_casei' => 'text/javascript',
|
7718 |
-
),
|
7719 |
-
),
|
7720 |
-
'tag_spec' => array(
|
7721 |
-
'extension_spec' => array(
|
7722 |
-
'allowed_versions' => array(
|
7723 |
-
'0.1',
|
7724 |
-
'latest',
|
7725 |
-
),
|
7726 |
-
'name' => 'amp-fx-collection',
|
7727 |
-
'requires_usage' => 3,
|
7728 |
-
),
|
7729 |
-
),
|
7730 |
-
),
|
7731 |
-
array(
|
7732 |
-
'attr_spec_list' => array(
|
7733 |
-
'async' => array(
|
7734 |
-
'mandatory' => true,
|
7735 |
-
'value' => '',
|
7736 |
-
),
|
7737 |
-
'nonce' => array(),
|
7738 |
-
'type' => array(
|
7739 |
-
'value_casei' => 'text/javascript',
|
7740 |
-
),
|
7741 |
-
),
|
7742 |
-
'tag_spec' => array(
|
7743 |
-
'extension_spec' => array(
|
7744 |
-
'allowed_versions' => array(
|
7745 |
-
'0.1',
|
7746 |
-
'latest',
|
7747 |
-
),
|
7748 |
-
'deprecated_allow_duplicates' => true,
|
7749 |
-
'name' => 'amp-fx-flying-carpet',
|
7750 |
-
'requires_usage' => 2,
|
7751 |
-
),
|
7752 |
-
),
|
7753 |
-
),
|
7754 |
-
array(
|
7755 |
-
'attr_spec_list' => array(
|
7756 |
-
'async' => array(
|
7757 |
-
'mandatory' => true,
|
7758 |
-
'value' => '',
|
7759 |
-
),
|
7760 |
-
'nonce' => array(),
|
7761 |
-
'type' => array(
|
7762 |
-
'value_casei' => 'text/javascript',
|
7763 |
-
),
|
7764 |
-
),
|
7765 |
-
'tag_spec' => array(
|
7766 |
-
'extension_spec' => array(
|
7767 |
-
'allowed_versions' => array(
|
7768 |
-
'0.1',
|
7769 |
-
'latest',
|
7770 |
-
),
|
7771 |
-
'deprecated_allow_duplicates' => true,
|
7772 |
-
'name' => 'amp-gfycat',
|
7773 |
-
'requires_usage' => 2,
|
7774 |
-
),
|
7775 |
-
),
|
7776 |
-
),
|
7777 |
-
array(
|
7778 |
-
'attr_spec_list' => array(
|
7779 |
-
'async' => array(
|
7780 |
-
'mandatory' => true,
|
7781 |
-
'value' => '',
|
7782 |
-
),
|
7783 |
-
'nonce' => array(),
|
7784 |
-
'type' => array(
|
7785 |
-
'value_casei' => 'text/javascript',
|
7786 |
-
),
|
7787 |
-
),
|
7788 |
-
'tag_spec' => array(
|
7789 |
-
'extension_spec' => array(
|
7790 |
-
'allowed_versions' => array(
|
7791 |
-
'0.1',
|
7792 |
-
'latest',
|
7793 |
-
),
|
7794 |
-
'name' => 'amp-gist',
|
7795 |
-
),
|
7796 |
-
),
|
7797 |
-
),
|
7798 |
-
array(
|
7799 |
-
'attr_spec_list' => array(
|
7800 |
-
'async' => array(
|
7801 |
-
'mandatory' => true,
|
7802 |
-
'value' => '',
|
7803 |
-
),
|
7804 |
-
'nonce' => array(),
|
7805 |
-
'type' => array(
|
7806 |
-
'value_casei' => 'text/javascript',
|
7807 |
-
),
|
7808 |
-
),
|
7809 |
-
'tag_spec' => array(
|
7810 |
-
'extension_spec' => array(
|
7811 |
-
'allowed_versions' => array(
|
7812 |
-
'0.1',
|
7813 |
-
'latest',
|
7814 |
-
),
|
7815 |
-
'name' => 'amp-hulu',
|
7816 |
-
),
|
7817 |
-
),
|
7818 |
-
),
|
7819 |
-
array(
|
7820 |
-
'attr_spec_list' => array(
|
7821 |
-
'async' => array(
|
7822 |
-
'mandatory' => true,
|
7823 |
-
'value' => '',
|
7824 |
-
),
|
7825 |
-
'nonce' => array(),
|
7826 |
-
'type' => array(
|
7827 |
-
'value_casei' => 'text/javascript',
|
7828 |
-
),
|
7829 |
-
),
|
7830 |
-
'tag_spec' => array(
|
7831 |
-
'extension_spec' => array(
|
7832 |
-
'allowed_versions' => array(
|
7833 |
-
'0.1',
|
7834 |
-
'latest',
|
7835 |
-
),
|
7836 |
-
'deprecated_allow_duplicates' => true,
|
7837 |
-
'name' => 'amp-iframe',
|
7838 |
-
'requires_usage' => 2,
|
7839 |
-
),
|
7840 |
-
),
|
7841 |
-
),
|
7842 |
-
array(
|
7843 |
-
'attr_spec_list' => array(
|
7844 |
-
'async' => array(
|
7845 |
-
'mandatory' => true,
|
7846 |
-
'value' => '',
|
7847 |
-
),
|
7848 |
-
'nonce' => array(),
|
7849 |
-
'type' => array(
|
7850 |
-
'value_casei' => 'text/javascript',
|
7851 |
-
),
|
7852 |
-
),
|
7853 |
-
'tag_spec' => array(
|
7854 |
-
'extension_spec' => array(
|
7855 |
-
'allowed_versions' => array(
|
7856 |
-
'0.1',
|
7857 |
-
'latest',
|
7858 |
-
),
|
7859 |
-
'name' => 'amp-ima-video',
|
7860 |
-
),
|
7861 |
-
),
|
7862 |
-
),
|
7863 |
-
array(
|
7864 |
-
'attr_spec_list' => array(
|
7865 |
-
'async' => array(
|
7866 |
-
'mandatory' => true,
|
7867 |
-
'value' => '',
|
7868 |
-
),
|
7869 |
-
'nonce' => array(),
|
7870 |
-
'type' => array(
|
7871 |
-
'value_casei' => 'text/javascript',
|
7872 |
-
),
|
7873 |
-
),
|
7874 |
-
'tag_spec' => array(
|
7875 |
-
'extension_spec' => array(
|
7876 |
-
'allowed_versions' => array(
|
7877 |
-
'0.1',
|
7878 |
-
'latest',
|
7879 |
-
),
|
7880 |
-
'deprecated_allow_duplicates' => true,
|
7881 |
-
'name' => 'amp-image-lightbox',
|
7882 |
-
'requires_usage' => 2,
|
7883 |
-
),
|
7884 |
-
),
|
7885 |
-
),
|
7886 |
-
array(
|
7887 |
-
'attr_spec_list' => array(
|
7888 |
-
'async' => array(
|
7889 |
-
'mandatory' => true,
|
7890 |
-
'value' => '',
|
7891 |
-
),
|
7892 |
-
'nonce' => array(),
|
7893 |
-
'type' => array(
|
7894 |
-
'value_casei' => 'text/javascript',
|
7895 |
-
),
|
7896 |
-
),
|
7897 |
-
'tag_spec' => array(
|
7898 |
-
'extension_spec' => array(
|
7899 |
-
'allowed_versions' => array(
|
7900 |
-
'0.1',
|
7901 |
-
'latest',
|
7902 |
-
),
|
7903 |
-
'name' => 'amp-imgur',
|
7904 |
-
),
|
7905 |
-
),
|
7906 |
-
),
|
7907 |
-
array(
|
7908 |
-
'attr_spec_list' => array(
|
7909 |
-
'async' => array(
|
7910 |
-
'mandatory' => true,
|
7911 |
-
'value' => '',
|
7912 |
-
),
|
7913 |
-
'nonce' => array(),
|
7914 |
-
'type' => array(
|
7915 |
-
'value_casei' => 'text/javascript',
|
7916 |
-
),
|
7917 |
-
),
|
7918 |
-
'tag_spec' => array(
|
7919 |
-
'extension_spec' => array(
|
7920 |
-
'allowed_versions' => array(
|
7921 |
-
'0.1',
|
7922 |
-
'latest',
|
7923 |
-
),
|
7924 |
-
'deprecated_allow_duplicates' => true,
|
7925 |
-
'name' => 'amp-instagram',
|
7926 |
-
'requires_usage' => 2,
|
7927 |
-
),
|
7928 |
-
),
|
7929 |
-
),
|
7930 |
-
array(
|
7931 |
-
'attr_spec_list' => array(
|
7932 |
-
'async' => array(
|
7933 |
-
'mandatory' => true,
|
7934 |
-
'value' => '',
|
7935 |
-
),
|
7936 |
-
'nonce' => array(),
|
7937 |
-
'type' => array(
|
7938 |
-
'value_casei' => 'text/javascript',
|
7939 |
-
),
|
7940 |
-
),
|
7941 |
-
'tag_spec' => array(
|
7942 |
-
'extension_spec' => array(
|
7943 |
-
'allowed_versions' => array(
|
7944 |
-
'0.1',
|
7945 |
-
'latest',
|
7946 |
-
),
|
7947 |
-
'deprecated_allow_duplicates' => true,
|
7948 |
-
'name' => 'amp-install-serviceworker',
|
7949 |
-
'requires_usage' => 2,
|
7950 |
-
),
|
7951 |
-
),
|
7952 |
-
),
|
7953 |
-
array(
|
7954 |
-
'attr_spec_list' => array(
|
7955 |
-
'async' => array(
|
7956 |
-
'mandatory' => true,
|
7957 |
-
'value' => '',
|
7958 |
-
),
|
7959 |
-
'nonce' => array(),
|
7960 |
-
'type' => array(
|
7961 |
-
'value_casei' => 'text/javascript',
|
7962 |
-
),
|
7963 |
-
),
|
7964 |
-
'tag_spec' => array(
|
7965 |
-
'extension_spec' => array(
|
7966 |
-
'allowed_versions' => array(
|
7967 |
-
'0.1',
|
7968 |
-
'latest',
|
7969 |
-
),
|
7970 |
-
'name' => 'amp-izlesene',
|
7971 |
-
'requires_usage' => 2,
|
7972 |
-
),
|
7973 |
-
),
|
7974 |
-
),
|
7975 |
-
array(
|
7976 |
-
'attr_spec_list' => array(
|
7977 |
-
'async' => array(
|
7978 |
-
'mandatory' => true,
|
7979 |
-
'value' => '',
|
7980 |
-
),
|
7981 |
-
'nonce' => array(),
|
7982 |
-
'type' => array(
|
7983 |
-
'value_casei' => 'text/javascript',
|
7984 |
-
),
|
7985 |
-
),
|
7986 |
-
'tag_spec' => array(
|
7987 |
-
'extension_spec' => array(
|
7988 |
-
'allowed_versions' => array(
|
7989 |
-
'0.1',
|
7990 |
-
'latest',
|
7991 |
-
),
|
7992 |
-
'deprecated_allow_duplicates' => true,
|
7993 |
-
'name' => 'amp-jwplayer',
|
7994 |
-
'requires_usage' => 2,
|
7995 |
-
),
|
7996 |
-
),
|
7997 |
-
),
|
7998 |
-
array(
|
7999 |
-
'attr_spec_list' => array(
|
8000 |
-
'async' => array(
|
8001 |
-
'mandatory' => true,
|
8002 |
-
'value' => '',
|
8003 |
-
),
|
8004 |
-
'nonce' => array(),
|
8005 |
-
'type' => array(
|
8006 |
-
'value_casei' => 'text/javascript',
|
8007 |
-
),
|
8008 |
-
),
|
8009 |
-
'tag_spec' => array(
|
8010 |
-
'extension_spec' => array(
|
8011 |
-
'allowed_versions' => array(
|
8012 |
-
'0.1',
|
8013 |
-
'latest',
|
8014 |
-
),
|
8015 |
-
'deprecated_allow_duplicates' => true,
|
8016 |
-
'name' => 'amp-kaltura-player',
|
8017 |
-
'requires_usage' => 2,
|
8018 |
-
),
|
8019 |
-
),
|
8020 |
-
),
|
8021 |
-
array(
|
8022 |
-
'attr_spec_list' => array(
|
8023 |
-
'async' => array(
|
8024 |
-
'mandatory' => true,
|
8025 |
-
'value' => '',
|
8026 |
-
),
|
8027 |
-
'nonce' => array(),
|
8028 |
-
'type' => array(
|
8029 |
-
'value_casei' => 'text/javascript',
|
8030 |
-
),
|
8031 |
-
),
|
8032 |
-
'tag_spec' => array(
|
8033 |
-
'extension_spec' => array(
|
8034 |
-
'allowed_versions' => array(
|
8035 |
-
'0.1',
|
8036 |
-
'latest',
|
8037 |
-
),
|
8038 |
-
'name' => 'amp-lightbox-gallery',
|
8039 |
-
'requires_usage' => 3,
|
8040 |
-
),
|
8041 |
-
),
|
8042 |
-
),
|
8043 |
-
array(
|
8044 |
-
'attr_spec_list' => array(
|
8045 |
-
'async' => array(
|
8046 |
-
'mandatory' => true,
|
8047 |
-
'value' => '',
|
8048 |
-
),
|
8049 |
-
'nonce' => array(),
|
8050 |
-
'type' => array(
|
8051 |
-
'value_casei' => 'text/javascript',
|
8052 |
-
),
|
8053 |
-
),
|
8054 |
-
'tag_spec' => array(
|
8055 |
-
'extension_spec' => array(
|
8056 |
-
'allowed_versions' => array(
|
8057 |
-
'0.1',
|
8058 |
-
'latest',
|
8059 |
-
),
|
8060 |
-
'deprecated_allow_duplicates' => true,
|
8061 |
-
'name' => 'amp-lightbox',
|
8062 |
-
'requires_usage' => 2,
|
8063 |
-
),
|
8064 |
-
),
|
8065 |
-
),
|
8066 |
-
array(
|
8067 |
-
'attr_spec_list' => array(
|
8068 |
-
'async' => array(
|
8069 |
-
'mandatory' => true,
|
8070 |
-
'value' => '',
|
8071 |
-
),
|
8072 |
-
'nonce' => array(),
|
8073 |
-
'type' => array(
|
8074 |
-
'value_casei' => 'text/javascript',
|
8075 |
-
),
|
8076 |
-
),
|
8077 |
-
'tag_spec' => array(
|
8078 |
-
'extension_spec' => array(
|
8079 |
-
'allowed_versions' => array(
|
8080 |
-
'0.1',
|
8081 |
-
'latest',
|
8082 |
-
),
|
8083 |
-
'deprecated_allow_duplicates' => true,
|
8084 |
-
'name' => 'amp-list',
|
8085 |
-
'requires_usage' => 2,
|
8086 |
-
),
|
8087 |
-
),
|
8088 |
-
),
|
8089 |
-
array(
|
8090 |
-
'attr_spec_list' => array(
|
8091 |
-
'async' => array(
|
8092 |
-
'mandatory' => true,
|
8093 |
-
'value' => '',
|
8094 |
-
),
|
8095 |
-
'nonce' => array(),
|
8096 |
-
'type' => array(
|
8097 |
-
'value_casei' => 'text/javascript',
|
8098 |
-
),
|
8099 |
-
),
|
8100 |
-
'tag_spec' => array(
|
8101 |
-
'extension_spec' => array(
|
8102 |
-
'allowed_versions' => array(
|
8103 |
-
'0.1',
|
8104 |
-
'latest',
|
8105 |
-
),
|
8106 |
-
'name' => 'amp-live-list',
|
8107 |
-
'requires_usage' => 2,
|
8108 |
-
),
|
8109 |
-
'mandatory_parent' => 'head',
|
8110 |
-
'unique_warning' => true,
|
8111 |
-
),
|
8112 |
-
),
|
8113 |
-
array(
|
8114 |
-
'attr_spec_list' => array(
|
8115 |
-
'async' => array(
|
8116 |
-
'mandatory' => true,
|
8117 |
-
'value' => '',
|
8118 |
-
),
|
8119 |
-
'nonce' => array(),
|
8120 |
-
'type' => array(
|
8121 |
-
'value_casei' => 'text/javascript',
|
8122 |
-
),
|
8123 |
-
),
|
8124 |
-
'tag_spec' => array(
|
8125 |
-
'extension_spec' => array(
|
8126 |
-
'allowed_versions' => array(
|
8127 |
-
'0.1',
|
8128 |
-
'latest',
|
8129 |
-
),
|
8130 |
-
'name' => 'amp-mathml',
|
8131 |
-
),
|
8132 |
-
),
|
8133 |
-
),
|
8134 |
-
array(
|
8135 |
-
'attr_spec_list' => array(
|
8136 |
-
'async' => array(
|
8137 |
-
'mandatory' => true,
|
8138 |
-
'value' => '',
|
8139 |
-
),
|
8140 |
-
'nonce' => array(),
|
8141 |
-
'type' => array(
|
8142 |
-
'value_casei' => 'text/javascript',
|
8143 |
-
),
|
8144 |
-
),
|
8145 |
-
'tag_spec' => array(
|
8146 |
-
'extension_spec' => array(
|
8147 |
-
'allowed_versions' => array(
|
8148 |
-
'0.1',
|
8149 |
-
'latest',
|
8150 |
-
),
|
8151 |
-
'deprecated_allow_duplicates' => true,
|
8152 |
-
'is_custom_template' => true,
|
8153 |
-
'name' => 'amp-mustache',
|
8154 |
-
'requires_usage' => 2,
|
8155 |
-
),
|
8156 |
-
),
|
8157 |
-
),
|
8158 |
-
array(
|
8159 |
-
'attr_spec_list' => array(
|
8160 |
-
'async' => array(
|
8161 |
-
'mandatory' => true,
|
8162 |
-
'value' => '',
|
8163 |
-
),
|
8164 |
-
'nonce' => array(),
|
8165 |
-
'type' => array(
|
8166 |
-
'value_casei' => 'text/javascript',
|
8167 |
-
),
|
8168 |
-
),
|
8169 |
-
'tag_spec' => array(
|
8170 |
-
'extension_spec' => array(
|
8171 |
-
'allowed_versions' => array(
|
8172 |
-
'0.1',
|
8173 |
-
'latest',
|
8174 |
-
),
|
8175 |
-
'name' => 'amp-nexxtv-player',
|
8176 |
-
),
|
8177 |
-
),
|
8178 |
-
),
|
8179 |
-
array(
|
8180 |
-
'attr_spec_list' => array(
|
8181 |
-
'async' => array(
|
8182 |
-
'mandatory' => true,
|
8183 |
-
'value' => '',
|
8184 |
-
),
|
8185 |
-
'nonce' => array(),
|
8186 |
-
'type' => array(
|
8187 |
-
'value_casei' => 'text/javascript',
|
8188 |
-
),
|
8189 |
-
),
|
8190 |
-
'tag_spec' => array(
|
8191 |
-
'extension_spec' => array(
|
8192 |
-
'allowed_versions' => array(
|
8193 |
-
'0.1',
|
8194 |
-
'latest',
|
8195 |
-
),
|
8196 |
-
'deprecated_allow_duplicates' => true,
|
8197 |
-
'name' => 'amp-o2-player',
|
8198 |
-
'requires_usage' => 2,
|
8199 |
-
),
|
8200 |
-
),
|
8201 |
-
),
|
8202 |
-
array(
|
8203 |
-
'attr_spec_list' => array(
|
8204 |
-
'async' => array(
|
8205 |
-
'mandatory' => true,
|
8206 |
-
'value' => '',
|
8207 |
-
),
|
8208 |
-
'nonce' => array(),
|
8209 |
-
'type' => array(
|
8210 |
-
'value_casei' => 'text/javascript',
|
8211 |
-
),
|
8212 |
-
),
|
8213 |
-
'tag_spec' => array(
|
8214 |
-
'extension_spec' => array(
|
8215 |
-
'allowed_versions' => array(
|
8216 |
-
'0.1',
|
8217 |
-
'latest',
|
8218 |
-
),
|
8219 |
-
'name' => 'amp-ooyala-player',
|
8220 |
-
),
|
8221 |
-
),
|
8222 |
-
),
|
8223 |
-
array(
|
8224 |
-
'attr_spec_list' => array(
|
8225 |
-
'async' => array(
|
8226 |
-
'mandatory' => true,
|
8227 |
-
'value' => '',
|
8228 |
-
),
|
8229 |
-
'nonce' => array(),
|
8230 |
-
'type' => array(
|
8231 |
-
'value_casei' => 'text/javascript',
|
8232 |
-
),
|
8233 |
-
),
|
8234 |
-
'tag_spec' => array(
|
8235 |
-
'extension_spec' => array(
|
8236 |
-
'allowed_versions' => array(
|
8237 |
-
'0.1',
|
8238 |
-
'latest',
|
8239 |
-
),
|
8240 |
-
'deprecated_allow_duplicates' => true,
|
8241 |
-
'name' => 'amp-pinterest',
|
8242 |
-
'requires_usage' => 2,
|
8243 |
-
),
|
8244 |
-
),
|
8245 |
-
),
|
8246 |
-
array(
|
8247 |
-
'attr_spec_list' => array(
|
8248 |
-
'async' => array(
|
8249 |
-
'mandatory' => true,
|
8250 |
-
'value' => '',
|
8251 |
-
),
|
8252 |
-
'nonce' => array(),
|
8253 |
-
'type' => array(
|
8254 |
-
'value_casei' => 'text/javascript',
|
8255 |
-
),
|
8256 |
-
),
|
8257 |
-
'tag_spec' => array(
|
8258 |
-
'extension_spec' => array(
|
8259 |
-
'allowed_versions' => array(
|
8260 |
-
'0.1',
|
8261 |
-
'latest',
|
8262 |
-
),
|
8263 |
-
'name' => 'amp-playbuzz',
|
8264 |
-
),
|
8265 |
-
),
|
8266 |
-
),
|
8267 |
-
array(
|
8268 |
-
'attr_spec_list' => array(
|
8269 |
-
'async' => array(
|
8270 |
-
'mandatory' => true,
|
8271 |
-
'value' => '',
|
8272 |
-
),
|
8273 |
-
'nonce' => array(),
|
8274 |
-
'type' => array(
|
8275 |
-
'value_casei' => 'text/javascript',
|
8276 |
-
),
|
8277 |
-
),
|
8278 |
-
'tag_spec' => array(
|
8279 |
-
'extension_spec' => array(
|
8280 |
-
'allowed_versions' => array(
|
8281 |
-
'0.1',
|
8282 |
-
'latest',
|
8283 |
-
),
|
8284 |
-
'name' => 'amp-position-observer',
|
8285 |
-
),
|
8286 |
-
),
|
8287 |
-
),
|
8288 |
-
array(
|
8289 |
-
'attr_spec_list' => array(
|
8290 |
-
'async' => array(
|
8291 |
-
'mandatory' => true,
|
8292 |
-
'value' => '',
|
8293 |
-
),
|
8294 |
-
'nonce' => array(),
|
8295 |
-
'type' => array(
|
8296 |
-
'value_casei' => 'text/javascript',
|
8297 |
-
),
|
8298 |
-
),
|
8299 |
-
'tag_spec' => array(
|
8300 |
-
'extension_spec' => array(
|
8301 |
-
'allowed_versions' => array(
|
8302 |
-
'0.1',
|
8303 |
-
'latest',
|
8304 |
-
),
|
8305 |
-
'deprecated_allow_duplicates' => true,
|
8306 |
-
'name' => 'amp-reach-player',
|
8307 |
-
'requires_usage' => 2,
|
8308 |
-
),
|
8309 |
-
),
|
8310 |
-
),
|
8311 |
-
array(
|
8312 |
-
'attr_spec_list' => array(
|
8313 |
-
'async' => array(
|
8314 |
-
'mandatory' => true,
|
8315 |
-
'value' => '',
|
8316 |
-
),
|
8317 |
-
'nonce' => array(),
|
8318 |
-
'type' => array(
|
8319 |
-
'value_casei' => 'text/javascript',
|
8320 |
-
),
|
8321 |
-
),
|
8322 |
-
'tag_spec' => array(
|
8323 |
-
'extension_spec' => array(
|
8324 |
-
'allowed_versions' => array(
|
8325 |
-
'0.1',
|
8326 |
-
'latest',
|
8327 |
-
),
|
8328 |
-
'deprecated_allow_duplicates' => true,
|
8329 |
-
'name' => 'amp-reddit',
|
8330 |
-
),
|
8331 |
-
),
|
8332 |
-
),
|
8333 |
-
array(
|
8334 |
-
'attr_spec_list' => array(
|
8335 |
-
'async' => array(
|
8336 |
-
'mandatory' => true,
|
8337 |
-
'value' => '',
|
8338 |
-
),
|
8339 |
-
'nonce' => array(),
|
8340 |
-
'type' => array(
|
8341 |
-
'value_casei' => 'text/javascript',
|
8342 |
-
),
|
8343 |
-
),
|
8344 |
-
'tag_spec' => array(
|
8345 |
-
'extension_spec' => array(
|
8346 |
-
'allowed_versions' => array(
|
8347 |
-
'0.1',
|
8348 |
-
'latest',
|
8349 |
-
),
|
8350 |
-
'name' => 'amp-riddle-quiz',
|
8351 |
-
),
|
8352 |
-
),
|
8353 |
-
),
|
8354 |
-
array(
|
8355 |
-
'attr_spec_list' => array(
|
8356 |
-
'async' => array(
|
8357 |
-
'mandatory' => true,
|
8358 |
-
'value' => '',
|
8359 |
-
),
|
8360 |
-
'nonce' => array(),
|
8361 |
-
'type' => array(
|
8362 |
-
'value_casei' => 'text/javascript',
|
8363 |
-
),
|
8364 |
-
),
|
8365 |
-
'tag_spec' => array(
|
8366 |
-
'extension_spec' => array(
|
8367 |
-
'allowed_versions' => array(
|
8368 |
-
'0.1',
|
8369 |
-
'latest',
|
8370 |
-
),
|
8371 |
-
'name' => 'amp-selector',
|
8372 |
-
'requires_usage' => 2,
|
8373 |
-
),
|
8374 |
-
),
|
8375 |
-
),
|
8376 |
-
array(
|
8377 |
-
'attr_spec_list' => array(
|
8378 |
-
'async' => array(
|
8379 |
-
'mandatory' => true,
|
8380 |
-
'value' => '',
|
8381 |
-
),
|
8382 |
-
'nonce' => array(),
|
8383 |
-
'type' => array(
|
8384 |
-
'value_casei' => 'text/javascript',
|
8385 |
-
),
|
8386 |
-
),
|
8387 |
-
'tag_spec' => array(
|
8388 |
-
'extension_spec' => array(
|
8389 |
-
'allowed_versions' => array(
|
8390 |
-
'0.1',
|
8391 |
-
'latest',
|
8392 |
-
),
|
8393 |
-
'deprecated_allow_duplicates' => true,
|
8394 |
-
'name' => 'amp-sidebar',
|
8395 |
-
'requires_usage' => 2,
|
8396 |
-
),
|
8397 |
-
),
|
8398 |
-
),
|
8399 |
-
array(
|
8400 |
-
'attr_spec_list' => array(
|
8401 |
-
'async' => array(
|
8402 |
-
'mandatory' => true,
|
8403 |
-
'value' => '',
|
8404 |
-
),
|
8405 |
-
'nonce' => array(),
|
8406 |
-
'type' => array(
|
8407 |
-
'value_casei' => 'text/javascript',
|
8408 |
-
),
|
8409 |
-
),
|
8410 |
-
'tag_spec' => array(
|
8411 |
-
'extension_spec' => array(
|
8412 |
-
'allowed_versions' => array(
|
8413 |
-
'0.1',
|
8414 |
-
'latest',
|
8415 |
-
),
|
8416 |
-
'deprecated_allow_duplicates' => true,
|
8417 |
-
'name' => 'amp-social-share',
|
8418 |
-
'requires_usage' => 2,
|
8419 |
-
),
|
8420 |
-
),
|
8421 |
-
),
|
8422 |
-
array(
|
8423 |
-
'attr_spec_list' => array(
|
8424 |
-
'async' => array(
|
8425 |
-
'mandatory' => true,
|
8426 |
-
'value' => '',
|
8427 |
-
),
|
8428 |
-
'nonce' => array(),
|
8429 |
-
'type' => array(
|
8430 |
-
'value_casei' => 'text/javascript',
|
8431 |
-
),
|
8432 |
-
),
|
8433 |
-
'tag_spec' => array(
|
8434 |
-
'extension_spec' => array(
|
8435 |
-
'allowed_versions' => array(
|
8436 |
-
'0.1',
|
8437 |
-
'latest',
|
8438 |
-
),
|
8439 |
-
'deprecated_allow_duplicates' => true,
|
8440 |
-
'name' => 'amp-soundcloud',
|
8441 |
-
'requires_usage' => 2,
|
8442 |
-
),
|
8443 |
-
),
|
8444 |
-
),
|
8445 |
-
array(
|
8446 |
-
'attr_spec_list' => array(
|
8447 |
-
'async' => array(
|
8448 |
-
'mandatory' => true,
|
8449 |
-
'value' => '',
|
8450 |
-
),
|
8451 |
-
'nonce' => array(),
|
8452 |
-
'type' => array(
|
8453 |
-
'value_casei' => 'text/javascript',
|
8454 |
-
),
|
8455 |
-
),
|
8456 |
-
'tag_spec' => array(
|
8457 |
-
'extension_spec' => array(
|
8458 |
-
'allowed_versions' => array(
|
8459 |
-
'0.1',
|
8460 |
-
'latest',
|
8461 |
-
),
|
8462 |
-
'deprecated_allow_duplicates' => true,
|
8463 |
-
'name' => 'amp-springboard-player',
|
8464 |
-
'requires_usage' => 2,
|
8465 |
-
),
|
8466 |
-
),
|
8467 |
-
),
|
8468 |
-
array(
|
8469 |
-
'attr_spec_list' => array(
|
8470 |
-
'async' => array(
|
8471 |
-
'mandatory' => true,
|
8472 |
-
'value' => '',
|
8473 |
-
),
|
8474 |
-
'nonce' => array(),
|
8475 |
-
'type' => array(
|
8476 |
-
'value_casei' => 'text/javascript',
|
8477 |
-
),
|
8478 |
-
),
|
8479 |
-
'tag_spec' => array(
|
8480 |
-
'extension_spec' => array(
|
8481 |
-
'allowed_versions' => array(
|
8482 |
-
'0.1',
|
8483 |
-
'1.0',
|
8484 |
-
'latest',
|
8485 |
-
),
|
8486 |
-
'deprecated_versions' => array(
|
8487 |
-
'0.1',
|
8488 |
-
),
|
8489 |
-
'name' => 'amp-sticky-ad',
|
8490 |
-
'requires_usage' => 2,
|
8491 |
-
),
|
8492 |
-
),
|
8493 |
-
),
|
8494 |
-
array(
|
8495 |
-
'attr_spec_list' => array(
|
8496 |
-
'async' => array(
|
8497 |
-
'mandatory' => true,
|
8498 |
-
'value' => '',
|
8499 |
-
),
|
8500 |
-
'nonce' => array(),
|
8501 |
-
'type' => array(
|
8502 |
-
'value_casei' => 'text/javascript',
|
8503 |
-
),
|
8504 |
-
),
|
8505 |
-
'tag_spec' => array(
|
8506 |
-
'extension_spec' => array(
|
8507 |
-
'allowed_versions' => array(
|
8508 |
-
'0.1',
|
8509 |
-
'latest',
|
8510 |
-
),
|
8511 |
-
'name' => 'amp-story-auto-ads',
|
8512 |
-
),
|
8513 |
-
),
|
8514 |
-
),
|
8515 |
-
array(
|
8516 |
-
'attr_spec_list' => array(
|
8517 |
-
'nonce' => array(),
|
8518 |
-
'type' => array(
|
8519 |
-
'dispatch_key' => 3,
|
8520 |
-
'mandatory' => true,
|
8521 |
-
'value_casei' => 'application/json',
|
8522 |
-
),
|
8523 |
-
),
|
8524 |
-
'cdata' => array(
|
8525 |
-
'blacklisted_cdata_regex' => array(
|
8526 |
-
'error_message' => 'html comments',
|
8527 |
-
'regex' => '<!--',
|
8528 |
-
),
|
8529 |
-
),
|
8530 |
-
'tag_spec' => array(
|
8531 |
-
'mandatory_parent' => 'amp-story-auto-ads',
|
8532 |
-
'requires_extension' => array(
|
8533 |
-
'amp-story-auto-ads',
|
8534 |
-
),
|
8535 |
-
'spec_name' => 'amp-story-auto-ads config script',
|
8536 |
-
'spec_url' => 'https://github.com/ampproject/amphtml/blob/master/extensions/amp-story/amp-story-auto-ads.md',
|
8537 |
-
),
|
8538 |
-
),
|
8539 |
-
array(
|
8540 |
-
'attr_spec_list' => array(
|
8541 |
-
'async' => array(
|
8542 |
-
'mandatory' => true,
|
8543 |
-
'value' => '',
|
8544 |
-
),
|
8545 |
-
'nonce' => array(),
|
8546 |
-
'type' => array(
|
8547 |
-
'value_casei' => 'text/javascript',
|
8548 |
-
),
|
8549 |
-
),
|
8550 |
-
'tag_spec' => array(
|
8551 |
-
'extension_spec' => array(
|
8552 |
-
'allowed_versions' => array(
|
8553 |
-
'0.1',
|
8554 |
-
'latest',
|
8555 |
-
),
|
8556 |
-
'name' => 'amp-story',
|
8557 |
-
),
|
8558 |
-
),
|
8559 |
-
),
|
8560 |
-
array(
|
8561 |
-
'attr_spec_list' => array(
|
8562 |
-
'async' => array(
|
8563 |
-
'mandatory' => true,
|
8564 |
-
'value' => '',
|
8565 |
-
),
|
8566 |
-
'nonce' => array(),
|
8567 |
-
'type' => array(
|
8568 |
-
'value_casei' => 'text/javascript',
|
8569 |
-
),
|
8570 |
-
),
|
8571 |
-
'tag_spec' => array(
|
8572 |
-
'extension_spec' => array(
|
8573 |
-
'allowed_versions' => array(
|
8574 |
-
'0.1',
|
8575 |
-
'latest',
|
8576 |
-
),
|
8577 |
-
'name' => 'amp-subscriptions',
|
8578 |
-
'requires_usage' => 3,
|
8579 |
-
),
|
8580 |
-
),
|
8581 |
-
),
|
8582 |
-
array(
|
8583 |
-
'attr_spec_list' => array(
|
8584 |
-
'id' => array(
|
8585 |
-
'dispatch_key' => 2,
|
8586 |
-
'mandatory' => true,
|
8587 |
-
'value' => 'amp-subscriptions',
|
8588 |
-
),
|
8589 |
-
'nonce' => array(),
|
8590 |
-
'type' => array(
|
8591 |
-
'mandatory' => true,
|
8592 |
-
'value_casei' => 'application/json',
|
8593 |
-
),
|
8594 |
-
),
|
8595 |
-
'cdata' => array(
|
8596 |
-
'blacklisted_cdata_regex' => array(
|
8597 |
-
'error_message' => 'html comments',
|
8598 |
-
'regex' => '<!--',
|
8599 |
-
),
|
8600 |
-
),
|
8601 |
-
'tag_spec' => array(
|
8602 |
-
'mandatory_parent' => 'head',
|
8603 |
-
'requires_extension' => array(
|
8604 |
-
'amp-subscriptions',
|
8605 |
-
),
|
8606 |
-
'spec_name' => 'amp-subscriptions extension .json script',
|
8607 |
-
'unique' => true,
|
8608 |
-
),
|
8609 |
-
),
|
8610 |
-
array(
|
8611 |
-
'attr_spec_list' => array(
|
8612 |
-
'async' => array(
|
8613 |
-
'mandatory' => true,
|
8614 |
-
'value' => '',
|
8615 |
-
),
|
8616 |
-
'nonce' => array(),
|
8617 |
-
'type' => array(
|
8618 |
-
'value_casei' => 'text/javascript',
|
8619 |
-
),
|
8620 |
-
),
|
8621 |
-
'tag_spec' => array(
|
8622 |
-
'extension_spec' => array(
|
8623 |
-
'allowed_versions' => array(
|
8624 |
-
'0.1',
|
8625 |
-
'latest',
|
8626 |
-
),
|
8627 |
-
'name' => 'amp-subscriptions-google',
|
8628 |
-
'requires_usage' => 3,
|
8629 |
-
),
|
8630 |
-
'requires_extension' => array(
|
8631 |
-
'amp-subscriptions',
|
8632 |
-
),
|
8633 |
-
),
|
8634 |
-
),
|
8635 |
-
array(
|
8636 |
-
'attr_spec_list' => array(
|
8637 |
-
'async' => array(
|
8638 |
-
'mandatory' => true,
|
8639 |
-
'value' => '',
|
8640 |
-
),
|
8641 |
-
'nonce' => array(),
|
8642 |
-
'type' => array(
|
8643 |
-
'value_casei' => 'text/javascript',
|
8644 |
-
),
|
8645 |
-
),
|
8646 |
-
'tag_spec' => array(
|
8647 |
-
'extension_spec' => array(
|
8648 |
-
'allowed_versions' => array(
|
8649 |
-
'0.1',
|
8650 |
-
'latest',
|
8651 |
-
),
|
8652 |
-
'name' => 'amp-timeago',
|
8653 |
-
),
|
8654 |
-
),
|
8655 |
-
),
|
8656 |
-
array(
|
8657 |
-
'attr_spec_list' => array(
|
8658 |
-
'async' => array(
|
8659 |
-
'mandatory' => true,
|
8660 |
-
'value' => '',
|
8661 |
-
),
|
8662 |
-
'nonce' => array(),
|
8663 |
-
'type' => array(
|
8664 |
-
'value_casei' => 'text/javascript',
|
8665 |
-
),
|
8666 |
-
),
|
8667 |
-
'tag_spec' => array(
|
8668 |
-
'extension_spec' => array(
|
8669 |
-
'allowed_versions' => array(
|
8670 |
-
'0.1',
|
8671 |
-
'latest',
|
8672 |
-
),
|
8673 |
-
'deprecated_allow_duplicates' => true,
|
8674 |
-
'name' => 'amp-twitter',
|
8675 |
-
'requires_usage' => 2,
|
8676 |
-
),
|
8677 |
-
),
|
8678 |
-
),
|
8679 |
-
array(
|
8680 |
-
'attr_spec_list' => array(
|
8681 |
-
'async' => array(
|
8682 |
-
'mandatory' => true,
|
8683 |
-
'value' => '',
|
8684 |
-
),
|
8685 |
-
'nonce' => array(),
|
8686 |
-
'type' => array(
|
8687 |
-
'value_casei' => 'text/javascript',
|
8688 |
-
),
|
8689 |
-
),
|
8690 |
-
'tag_spec' => array(
|
8691 |
-
'extension_spec' => array(
|
8692 |
-
'allowed_versions' => array(
|
8693 |
-
'0.1',
|
8694 |
-
'latest',
|
8695 |
-
),
|
8696 |
-
'deprecated_allow_duplicates' => true,
|
8697 |
-
'name' => 'amp-user-notification',
|
8698 |
-
'requires_usage' => 2,
|
8699 |
-
),
|
8700 |
-
),
|
8701 |
-
),
|
8702 |
-
array(
|
8703 |
-
'attr_spec_list' => array(
|
8704 |
-
'async' => array(
|
8705 |
-
'mandatory' => true,
|
8706 |
-
'value' => '',
|
8707 |
-
),
|
8708 |
-
'nonce' => array(),
|
8709 |
-
'type' => array(
|
8710 |
-
'value_casei' => 'text/javascript',
|
8711 |
-
),
|
8712 |
-
),
|
8713 |
-
'tag_spec' => array(
|
8714 |
-
'extension_spec' => array(
|
8715 |
-
'allowed_versions' => array(
|
8716 |
-
'0.1',
|
8717 |
-
'latest',
|
8718 |
-
),
|
8719 |
-
'name' => 'amp-video',
|
8720 |
-
'requires_usage' => 3,
|
8721 |
-
),
|
8722 |
-
'spec_name' => 'amp-video extension .js script',
|
8723 |
-
),
|
8724 |
-
),
|
8725 |
-
array(
|
8726 |
-
'attr_spec_list' => array(
|
8727 |
-
'async' => array(
|
8728 |
-
'mandatory' => true,
|
8729 |
-
'value' => '',
|
8730 |
-
),
|
8731 |
-
'nonce' => array(),
|
8732 |
-
'type' => array(
|
8733 |
-
'value_casei' => 'text/javascript',
|
8734 |
-
),
|
8735 |
-
),
|
8736 |
-
'tag_spec' => array(
|
8737 |
-
'extension_spec' => array(
|
8738 |
-
'allowed_versions' => array(
|
8739 |
-
'0.1',
|
8740 |
-
'latest',
|
8741 |
-
),
|
8742 |
-
'deprecated_allow_duplicates' => true,
|
8743 |
-
'name' => 'amp-vimeo',
|
8744 |
-
'requires_usage' => 2,
|
8745 |
-
),
|
8746 |
-
),
|
8747 |
-
),
|
8748 |
-
array(
|
8749 |
-
'attr_spec_list' => array(
|
8750 |
-
'async' => array(
|
8751 |
-
'mandatory' => true,
|
8752 |
-
'value' => '',
|
8753 |
-
),
|
8754 |
-
'nonce' => array(),
|
8755 |
-
'type' => array(
|
8756 |
-
'value_casei' => 'text/javascript',
|
8757 |
-
),
|
8758 |
-
),
|
8759 |
-
'tag_spec' => array(
|
8760 |
-
'extension_spec' => array(
|
8761 |
-
'allowed_versions' => array(
|
8762 |
-
'0.1',
|
8763 |
-
'latest',
|
8764 |
-
),
|
8765 |
-
'deprecated_allow_duplicates' => true,
|
8766 |
-
'name' => 'amp-vine',
|
8767 |
-
'requires_usage' => 2,
|
8768 |
-
),
|
8769 |
-
),
|
8770 |
-
),
|
8771 |
-
array(
|
8772 |
-
'attr_spec_list' => array(
|
8773 |
-
'async' => array(
|
8774 |
-
'mandatory' => true,
|
8775 |
-
'value' => '',
|
8776 |
-
),
|
8777 |
-
'nonce' => array(),
|
8778 |
-
'type' => array(
|
8779 |
-
'value_casei' => 'text/javascript',
|
8780 |
-
),
|
8781 |
-
),
|
8782 |
-
'tag_spec' => array(
|
8783 |
-
'extension_spec' => array(
|
8784 |
-
'allowed_versions' => array(
|
8785 |
-
'0.1',
|
8786 |
-
'latest',
|
8787 |
-
),
|
8788 |
-
'name' => 'amp-vk',
|
8789 |
-
),
|
8790 |
-
),
|
8791 |
-
),
|
8792 |
-
array(
|
8793 |
-
'attr_spec_list' => array(
|
8794 |
-
'async' => array(
|
8795 |
-
'mandatory' => true,
|
8796 |
-
'value' => '',
|
8797 |
-
),
|
8798 |
-
'nonce' => array(),
|
8799 |
-
'type' => array(
|
8800 |
-
'value_casei' => 'text/javascript',
|
8801 |
-
),
|
8802 |
-
),
|
8803 |
-
'tag_spec' => array(
|
8804 |
-
'extension_spec' => array(
|
8805 |
-
'allowed_versions' => array(
|
8806 |
-
'0.1',
|
8807 |
-
'latest',
|
8808 |
-
),
|
8809 |
-
'name' => 'amp-web-push',
|
8810 |
-
),
|
8811 |
-
),
|
8812 |
-
),
|
8813 |
-
array(
|
8814 |
-
'attr_spec_list' => array(
|
8815 |
-
'async' => array(
|
8816 |
-
'mandatory' => true,
|
8817 |
-
'value' => '',
|
8818 |
-
),
|
8819 |
-
'nonce' => array(),
|
8820 |
-
'type' => array(
|
8821 |
-
'value_casei' => 'text/javascript',
|
8822 |
-
),
|
8823 |
-
),
|
8824 |
-
'tag_spec' => array(
|
8825 |
-
'extension_spec' => array(
|
8826 |
-
'allowed_versions' => array(
|
8827 |
-
'0.1',
|
8828 |
-
'latest',
|
8829 |
-
),
|
8830 |
-
'name' => 'amp-wistia-player',
|
8831 |
-
),
|
8832 |
-
),
|
8833 |
-
),
|
8834 |
-
array(
|
8835 |
-
'attr_spec_list' => array(
|
8836 |
-
'async' => array(
|
8837 |
-
'mandatory' => true,
|
8838 |
-
'value' => '',
|
8839 |
-
),
|
8840 |
-
'nonce' => array(),
|
8841 |
-
'type' => array(
|
8842 |
-
'value_casei' => 'text/javascript',
|
8843 |
-
),
|
8844 |
-
),
|
8845 |
-
'tag_spec' => array(
|
8846 |
-
'extension_spec' => array(
|
8847 |
-
'allowed_versions' => array(
|
8848 |
-
'0.1',
|
8849 |
-
'latest',
|
8850 |
-
),
|
8851 |
-
'deprecated_allow_duplicates' => true,
|
8852 |
-
'name' => 'amp-youtube',
|
8853 |
-
'requires_usage' => 2,
|
8854 |
-
),
|
8855 |
-
),
|
8856 |
-
),
|
8857 |
-
),
|
8858 |
-
'section' => array(
|
8859 |
-
array(
|
8860 |
-
'attr_spec_list' => array(),
|
8861 |
-
'tag_spec' => array(
|
8862 |
-
'disallowed_ancestor' => array(
|
8863 |
-
'amp-accordion',
|
8864 |
-
),
|
8865 |
-
),
|
8866 |
-
),
|
8867 |
-
array(
|
8868 |
-
'attr_spec_list' => array(
|
8869 |
-
'expanded' => array(
|
8870 |
-
'value' => '',
|
8871 |
-
),
|
8872 |
-
),
|
8873 |
-
'tag_spec' => array(
|
8874 |
-
'mandatory_parent' => 'amp-accordion',
|
8875 |
-
'spec_name' => 'amp-accordion > section',
|
8876 |
-
),
|
8877 |
-
),
|
8878 |
-
),
|
8879 |
-
'select' => array(
|
8880 |
-
array(
|
8881 |
-
'attr_spec_list' => array(
|
8882 |
-
'[autofocus]' => array(),
|
8883 |
-
'[disabled]' => array(),
|
8884 |
-
'[multiple]' => array(),
|
8885 |
-
'[required]' => array(),
|
8886 |
-
'[size]' => array(),
|
8887 |
-
'autofocus' => array(),
|
8888 |
-
'disabled' => array(),
|
8889 |
-
'multiple' => array(),
|
8890 |
-
'name' => array(
|
8891 |
-
'blacklisted_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|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|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|$)',
|
8892 |
-
),
|
8893 |
-
'required' => array(),
|
8894 |
-
'size' => array(),
|
8895 |
-
),
|
8896 |
-
'tag_spec' => array(
|
8897 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-form',
|
8898 |
-
),
|
8899 |
-
),
|
8900 |
-
),
|
8901 |
-
'slot' => array(
|
8902 |
-
array(
|
8903 |
-
'attr_spec_list' => array(
|
8904 |
-
'name' => array(),
|
8905 |
-
),
|
8906 |
-
'tag_spec' => array(),
|
8907 |
-
),
|
8908 |
-
),
|
8909 |
-
'small' => array(
|
8910 |
-
array(
|
8911 |
-
'attr_spec_list' => array(),
|
8912 |
-
'tag_spec' => array(),
|
8913 |
-
),
|
8914 |
-
),
|
8915 |
-
'solidcolor' => array(
|
8916 |
-
array(
|
8917 |
-
'attr_spec_list' => array(
|
8918 |
-
'alignment-baseline' => array(),
|
8919 |
-
'baseline-shift' => array(),
|
8920 |
-
'clip' => array(),
|
8921 |
-
'clip-path' => array(),
|
8922 |
-
'clip-rule' => array(),
|
8923 |
-
'color' => array(),
|
8924 |
-
'color-interpolation' => array(),
|
8925 |
-
'color-interpolation-filters' => array(),
|
8926 |
-
'color-profile' => array(),
|
8927 |
-
'color-rendering' => array(),
|
8928 |
-
'cursor' => array(),
|
8929 |
-
'direction' => array(),
|
8930 |
-
'display' => array(),
|
8931 |
-
'dominant-baseline' => array(),
|
8932 |
-
'enable-background' => array(),
|
8933 |
-
'fill' => array(),
|
8934 |
-
'fill-opacity' => array(),
|
8935 |
-
'fill-rule' => array(),
|
8936 |
-
'filter' => array(),
|
8937 |
-
'flood-color' => array(),
|
8938 |
-
'flood-opacity' => array(),
|
8939 |
-
'font-family' => array(),
|
8940 |
-
'font-size' => array(),
|
8941 |
-
'font-size-adjust' => array(),
|
8942 |
-
'font-stretch' => array(),
|
8943 |
-
'font-style' => array(),
|
8944 |
-
'font-variant' => array(),
|
8945 |
-
'font-weight' => array(),
|
8946 |
-
'glyph-orientation-horizontal' => array(),
|
8947 |
-
'glyph-orientation-vertical' => array(),
|
8948 |
-
'image-rendering' => array(),
|
8949 |
-
'kerning' => array(),
|
8950 |
-
'letter-spacing' => array(),
|
8951 |
-
'lighting-color' => array(),
|
8952 |
-
'marker-end' => array(),
|
8953 |
-
'marker-mid' => array(),
|
8954 |
-
'marker-start' => array(),
|
8955 |
-
'mask' => array(),
|
8956 |
-
'opacity' => array(),
|
8957 |
-
'overflow' => array(),
|
8958 |
-
'pointer-events' => array(),
|
8959 |
-
'shape-rendering' => array(),
|
8960 |
-
'solid-color' => array(),
|
8961 |
-
'solid-opacity' => array(),
|
8962 |
-
'stop-color' => array(),
|
8963 |
-
'stop-opacity' => array(),
|
8964 |
-
'stroke' => array(),
|
8965 |
-
'stroke-dasharray' => array(),
|
8966 |
-
'stroke-dashoffset' => array(),
|
8967 |
-
'stroke-linecap' => array(),
|
8968 |
-
'stroke-linejoin' => array(),
|
8969 |
-
'stroke-miterlimit' => array(),
|
8970 |
-
'stroke-opacity' => array(),
|
8971 |
-
'stroke-width' => array(),
|
8972 |
-
'style' => array(
|
8973 |
-
'blacklisted_value_regex' => '!important',
|
8974 |
-
),
|
8975 |
-
'text-anchor' => array(),
|
8976 |
-
'text-decoration' => array(),
|
8977 |
-
'text-rendering' => array(),
|
8978 |
-
'unicode-bidi' => array(),
|
8979 |
-
'vector-effect' => array(),
|
8980 |
-
'visibility' => array(),
|
8981 |
-
'word-spacing' => array(),
|
8982 |
-
'writing-mode' => array(),
|
8983 |
-
'xml:lang' => array(),
|
8984 |
-
'xml:space' => array(),
|
8985 |
-
'xmlns' => array(),
|
8986 |
-
'xmlns:xlink' => array(),
|
8987 |
-
),
|
8988 |
-
'tag_spec' => array(
|
8989 |
-
'mandatory_ancestor' => 'svg',
|
8990 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
8991 |
-
),
|
8992 |
-
),
|
8993 |
-
),
|
8994 |
-
'source' => array(
|
8995 |
-
array(
|
8996 |
-
'attr_spec_list' => array(
|
8997 |
-
'[src]' => array(),
|
8998 |
-
'[type]' => array(),
|
8999 |
-
'media' => array(),
|
9000 |
-
'src' => array(
|
9001 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
9002 |
-
'value_url' => array(
|
9003 |
-
'allow_relative' => true,
|
9004 |
-
'allowed_protocol' => array(
|
9005 |
-
'https',
|
9006 |
-
),
|
9007 |
-
),
|
9008 |
-
),
|
9009 |
-
'type' => array(),
|
9010 |
-
),
|
9011 |
-
'tag_spec' => array(
|
9012 |
-
'mandatory_parent' => 'amp-video',
|
9013 |
-
'spec_name' => 'amp-video > source',
|
9014 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-video',
|
9015 |
-
),
|
9016 |
-
),
|
9017 |
-
array(
|
9018 |
-
'attr_spec_list' => array(
|
9019 |
-
'[src]' => array(),
|
9020 |
-
'[type]' => array(),
|
9021 |
-
'media' => array(),
|
9022 |
-
'src' => array(
|
9023 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
9024 |
-
'value_url' => array(
|
9025 |
-
'allow_relative' => true,
|
9026 |
-
'allowed_protocol' => array(
|
9027 |
-
'https',
|
9028 |
-
),
|
9029 |
-
),
|
9030 |
-
),
|
9031 |
-
'type' => array(),
|
9032 |
-
),
|
9033 |
-
'tag_spec' => array(
|
9034 |
-
'mandatory_parent' => 'amp-audio',
|
9035 |
-
'spec_name' => 'amp-audio > source',
|
9036 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-audio',
|
9037 |
-
),
|
9038 |
-
),
|
9039 |
-
array(
|
9040 |
-
'attr_spec_list' => array(
|
9041 |
-
'media' => array(),
|
9042 |
-
'src' => array(
|
9043 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
9044 |
-
'mandatory' => true,
|
9045 |
-
'value_url' => array(
|
9046 |
-
'allow_relative' => true,
|
9047 |
-
'allowed_protocol' => array(
|
9048 |
-
'https',
|
9049 |
-
),
|
9050 |
-
),
|
9051 |
-
),
|
9052 |
-
'type' => array(
|
9053 |
-
'mandatory' => true,
|
9054 |
-
),
|
9055 |
-
),
|
9056 |
-
'tag_spec' => array(
|
9057 |
-
'mandatory_parent' => 'audio',
|
9058 |
-
'spec_name' => 'audio > source',
|
9059 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-audio',
|
9060 |
-
),
|
9061 |
-
),
|
9062 |
-
array(
|
9063 |
-
'attr_spec_list' => array(
|
9064 |
-
'media' => array(),
|
9065 |
-
'src' => array(
|
9066 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
9067 |
-
'mandatory' => true,
|
9068 |
-
'value_url' => array(
|
9069 |
-
'allow_relative' => true,
|
9070 |
-
'allowed_protocol' => array(
|
9071 |
-
'https',
|
9072 |
-
),
|
9073 |
-
),
|
9074 |
-
),
|
9075 |
-
'type' => array(
|
9076 |
-
'mandatory' => true,
|
9077 |
-
),
|
9078 |
-
),
|
9079 |
-
'tag_spec' => array(
|
9080 |
-
'mandatory_parent' => 'video',
|
9081 |
-
'spec_name' => 'video > source',
|
9082 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-video',
|
9083 |
-
),
|
9084 |
-
),
|
9085 |
-
array(
|
9086 |
-
'attr_spec_list' => array(
|
9087 |
-
'[src]' => array(),
|
9088 |
-
'[type]' => array(),
|
9089 |
-
'media' => array(),
|
9090 |
-
'src' => array(
|
9091 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
9092 |
-
'value_url' => array(
|
9093 |
-
'allow_relative' => true,
|
9094 |
-
'allowed_protocol' => array(
|
9095 |
-
'https',
|
9096 |
-
),
|
9097 |
-
),
|
9098 |
-
),
|
9099 |
-
'type' => array(),
|
9100 |
-
),
|
9101 |
-
'tag_spec' => array(
|
9102 |
-
'mandatory_parent' => 'amp-ima-video',
|
9103 |
-
'requires_extension' => array(
|
9104 |
-
'amp-ima-video',
|
9105 |
-
),
|
9106 |
-
'spec_name' => 'amp-ima-video > source',
|
9107 |
-
),
|
9108 |
-
),
|
9109 |
-
),
|
9110 |
-
'spacer' => array(
|
9111 |
-
array(
|
9112 |
-
'attr_spec_list' => array(),
|
9113 |
-
'tag_spec' => array(),
|
9114 |
-
),
|
9115 |
-
),
|
9116 |
-
'span' => array(
|
9117 |
-
array(
|
9118 |
-
'attr_spec_list' => array(),
|
9119 |
-
'tag_spec' => array(),
|
9120 |
-
),
|
9121 |
-
),
|
9122 |
-
'stop' => array(
|
9123 |
-
array(
|
9124 |
-
'attr_spec_list' => array(
|
9125 |
-
'offset' => array(),
|
9126 |
-
'stop-color' => array(),
|
9127 |
-
'stop-opacity' => array(),
|
9128 |
-
'style' => array(
|
9129 |
-
'blacklisted_value_regex' => '!important',
|
9130 |
-
),
|
9131 |
-
),
|
9132 |
-
'tag_spec' => array(
|
9133 |
-
'mandatory_ancestor' => 'lineargradient',
|
9134 |
-
'spec_name' => 'lineargradient > stop',
|
9135 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
9136 |
-
),
|
9137 |
-
),
|
9138 |
-
array(
|
9139 |
-
'attr_spec_list' => array(
|
9140 |
-
'offset' => array(),
|
9141 |
-
'stop-color' => array(),
|
9142 |
-
'stop-opacity' => array(),
|
9143 |
-
'style' => array(
|
9144 |
-
'blacklisted_value_regex' => '!important',
|
9145 |
-
),
|
9146 |
-
),
|
9147 |
-
'tag_spec' => array(
|
9148 |
-
'mandatory_ancestor' => 'radialgradient',
|
9149 |
-
'spec_name' => 'radialgradient > stop',
|
9150 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
9151 |
-
),
|
9152 |
-
),
|
9153 |
-
),
|
9154 |
-
'strike' => array(
|
9155 |
-
array(
|
9156 |
-
'attr_spec_list' => array(),
|
9157 |
-
'tag_spec' => array(),
|
9158 |
-
),
|
9159 |
-
),
|
9160 |
-
'strong' => array(
|
9161 |
-
array(
|
9162 |
-
'attr_spec_list' => array(),
|
9163 |
-
'tag_spec' => array(),
|
9164 |
-
),
|
9165 |
-
),
|
9166 |
-
'style' => array(
|
9167 |
-
array(
|
9168 |
-
'attr_spec_list' => array(
|
9169 |
-
'amp-custom' => array(
|
9170 |
-
'mandatory' => true,
|
9171 |
-
'value' => '',
|
9172 |
-
),
|
9173 |
-
'nonce' => array(),
|
9174 |
-
'type' => array(
|
9175 |
-
'value_casei' => 'text/css',
|
9176 |
-
),
|
9177 |
-
),
|
9178 |
-
'cdata' => array(
|
9179 |
-
'blacklisted_cdata_regex' => array(
|
9180 |
-
'error_message' => 'CSS !important',
|
9181 |
-
'regex' => '!important',
|
9182 |
-
),
|
9183 |
-
'max_bytes' => 50000,
|
9184 |
-
'max_bytes_spec_url' => 'https://www.ampproject.org/docs/reference/spec#maximum-size',
|
9185 |
-
),
|
9186 |
-
'tag_spec' => array(
|
9187 |
-
'mandatory_parent' => 'head',
|
9188 |
-
'spec_name' => 'style amp-custom',
|
9189 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#stylesheets',
|
9190 |
-
'unique' => true,
|
9191 |
-
),
|
9192 |
-
),
|
9193 |
-
array(
|
9194 |
-
'attr_spec_list' => array(
|
9195 |
-
'amp-boilerplate' => array(
|
9196 |
-
'dispatch_key' => 3,
|
9197 |
-
'mandatory' => true,
|
9198 |
-
'value' => '',
|
9199 |
-
),
|
9200 |
-
'nonce' => array(),
|
9201 |
-
),
|
9202 |
-
'cdata' => array(
|
9203 |
-
'cdata_regex' => '\\s*body{-webkit-animation:-amp-start\\s+8s\\s+steps\\(1,end\\)\\s+0s\\s+1\\s+normal\\s+both;-moz-animation:-amp-start\\s+8s\\s+steps\\(1,end\\)\\s+0s\\s+1\\s+normal\\s+both;-ms-animation:-amp-start\\s+8s\\s+steps\\(1,end\\)\\s+0s\\s+1\\s+normal\\s+both;animation:-amp-start\\s+8s\\s+steps\\(1,end\\)\\s+0s\\s+1\\s+normal\\s+both}@-webkit-keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes\\s+-amp-start{from{visibility:hidden}to{visibility:visible}}\\s*',
|
9204 |
-
),
|
9205 |
-
'tag_spec' => array(
|
9206 |
-
'mandatory_alternatives' => 'head > style[amp-boilerplate]',
|
9207 |
-
'mandatory_parent' => 'head',
|
9208 |
-
'spec_name' => 'head > style[amp-boilerplate]',
|
9209 |
-
'spec_url' => 'https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md',
|
9210 |
-
'unique' => true,
|
9211 |
-
),
|
9212 |
-
),
|
9213 |
-
array(
|
9214 |
-
'attr_spec_list' => array(
|
9215 |
-
'amp-boilerplate' => array(
|
9216 |
-
'dispatch_key' => 3,
|
9217 |
-
'mandatory' => true,
|
9218 |
-
'value' => '',
|
9219 |
-
),
|
9220 |
-
'nonce' => array(),
|
9221 |
-
),
|
9222 |
-
'cdata' => array(
|
9223 |
-
'cdata_regex' => '\\s*body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}\\s*',
|
9224 |
-
),
|
9225 |
-
'tag_spec' => array(
|
9226 |
-
'mandatory_alternatives' => 'noscript > style[amp-boilerplate]',
|
9227 |
-
'mandatory_ancestor' => 'head',
|
9228 |
-
'mandatory_parent' => 'noscript',
|
9229 |
-
'spec_name' => 'noscript > style[amp-boilerplate]',
|
9230 |
-
'spec_url' => 'https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md',
|
9231 |
-
'unique' => true,
|
9232 |
-
),
|
9233 |
-
),
|
9234 |
-
array(
|
9235 |
-
'attr_spec_list' => array(
|
9236 |
-
'amp-keyframes' => array(
|
9237 |
-
'dispatch_key' => 1,
|
9238 |
-
'mandatory' => true,
|
9239 |
-
'value' => '',
|
9240 |
-
),
|
9241 |
-
),
|
9242 |
-
'cdata' => array(
|
9243 |
-
'max_bytes' => 500000,
|
9244 |
-
'max_bytes_spec_url' => 'https://www.ampproject.org/docs/reference/spec#keyframes-stylesheet',
|
9245 |
-
),
|
9246 |
-
'tag_spec' => array(
|
9247 |
-
'mandatory_parent' => 'body',
|
9248 |
-
'spec_name' => 'style[amp-keyframes]',
|
9249 |
-
'unique' => true,
|
9250 |
-
),
|
9251 |
-
),
|
9252 |
-
),
|
9253 |
-
'sub' => array(
|
9254 |
-
array(
|
9255 |
-
'attr_spec_list' => array(),
|
9256 |
-
'tag_spec' => array(),
|
9257 |
-
),
|
9258 |
-
),
|
9259 |
-
'sup' => array(
|
9260 |
-
array(
|
9261 |
-
'attr_spec_list' => array(),
|
9262 |
-
'tag_spec' => array(),
|
9263 |
-
),
|
9264 |
-
),
|
9265 |
-
'svg' => array(
|
9266 |
-
array(
|
9267 |
-
'attr_spec_list' => array(
|
9268 |
-
'alignment-baseline' => array(),
|
9269 |
-
'baseline-shift' => array(),
|
9270 |
-
'clip' => array(),
|
9271 |
-
'clip-path' => array(),
|
9272 |
-
'clip-rule' => array(),
|
9273 |
-
'color' => array(),
|
9274 |
-
'color-interpolation' => array(),
|
9275 |
-
'color-interpolation-filters' => array(),
|
9276 |
-
'color-profile' => array(),
|
9277 |
-
'color-rendering' => array(),
|
9278 |
-
'contentscripttype' => array(),
|
9279 |
-
'contentstyletype' => array(),
|
9280 |
-
'cursor' => array(),
|
9281 |
-
'direction' => array(),
|
9282 |
-
'display' => array(),
|
9283 |
-
'dominant-baseline' => array(),
|
9284 |
-
'enable-background' => array(),
|
9285 |
-
'externalresourcesrequired' => array(),
|
9286 |
-
'fill' => array(),
|
9287 |
-
'fill-opacity' => array(),
|
9288 |
-
'fill-rule' => array(),
|
9289 |
-
'filter' => array(),
|
9290 |
-
'flood-color' => array(),
|
9291 |
-
'flood-opacity' => array(),
|
9292 |
-
'font-family' => array(),
|
9293 |
-
'font-size' => array(),
|
9294 |
-
'font-size-adjust' => array(),
|
9295 |
-
'font-stretch' => array(),
|
9296 |
-
'font-style' => array(),
|
9297 |
-
'font-variant' => array(),
|
9298 |
-
'font-weight' => array(),
|
9299 |
-
'glyph-orientation-horizontal' => array(),
|
9300 |
-
'glyph-orientation-vertical' => array(),
|
9301 |
-
'height' => array(),
|
9302 |
-
'image-rendering' => array(),
|
9303 |
-
'kerning' => array(),
|
9304 |
-
'letter-spacing' => array(),
|
9305 |
-
'lighting-color' => array(),
|
9306 |
-
'marker-end' => array(),
|
9307 |
-
'marker-mid' => array(),
|
9308 |
-
'marker-start' => array(),
|
9309 |
-
'mask' => array(),
|
9310 |
-
'opacity' => array(),
|
9311 |
-
'overflow' => array(),
|
9312 |
-
'pointer-events' => array(),
|
9313 |
-
'preserveaspectratio' => array(),
|
9314 |
-
'requiredextensions' => array(),
|
9315 |
-
'requiredfeatures' => array(),
|
9316 |
-
'shape-rendering' => array(),
|
9317 |
-
'stop-color' => array(),
|
9318 |
-
'stop-opacity' => array(),
|
9319 |
-
'stroke' => array(),
|
9320 |
-
'stroke-dasharray' => array(),
|
9321 |
-
'stroke-dashoffset' => array(),
|
9322 |
-
'stroke-linecap' => array(),
|
9323 |
-
'stroke-linejoin' => array(),
|
9324 |
-
'stroke-miterlimit' => array(),
|
9325 |
-
'stroke-opacity' => array(),
|
9326 |
-
'stroke-width' => array(),
|
9327 |
-
'systemlanguage' => array(),
|
9328 |
-
'text-anchor' => array(),
|
9329 |
-
'text-decoration' => array(),
|
9330 |
-
'text-rendering' => array(),
|
9331 |
-
'unicode-bidi' => array(),
|
9332 |
-
'vector-effect' => array(),
|
9333 |
-
'version' => array(
|
9334 |
-
'value_regex' => '(1.0|1.1)',
|
9335 |
-
),
|
9336 |
-
'viewbox' => array(),
|
9337 |
-
'visibility' => array(),
|
9338 |
-
'width' => array(),
|
9339 |
-
'word-spacing' => array(),
|
9340 |
-
'writing-mode' => array(),
|
9341 |
-
'x' => array(),
|
9342 |
-
'xml:lang' => array(),
|
9343 |
-
'xml:space' => array(),
|
9344 |
-
'xmlns' => array(),
|
9345 |
-
'xmlns:xlink' => array(),
|
9346 |
-
'y' => array(),
|
9347 |
-
'zoomandpan' => array(),
|
9348 |
-
),
|
9349 |
-
'tag_spec' => array(
|
9350 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
9351 |
-
),
|
9352 |
-
),
|
9353 |
-
),
|
9354 |
-
'switch' => array(
|
9355 |
-
array(
|
9356 |
-
'attr_spec_list' => array(
|
9357 |
-
'alignment-baseline' => array(),
|
9358 |
-
'baseline-shift' => array(),
|
9359 |
-
'clip' => array(),
|
9360 |
-
'clip-path' => array(),
|
9361 |
-
'clip-rule' => array(),
|
9362 |
-
'color' => array(),
|
9363 |
-
'color-interpolation' => array(),
|
9364 |
-
'color-interpolation-filters' => array(),
|
9365 |
-
'color-profile' => array(),
|
9366 |
-
'color-rendering' => array(),
|
9367 |
-
'cursor' => array(),
|
9368 |
-
'direction' => array(),
|
9369 |
-
'display' => array(),
|
9370 |
-
'dominant-baseline' => array(),
|
9371 |
-
'enable-background' => array(),
|
9372 |
-
'fill' => array(),
|
9373 |
-
'fill-opacity' => array(),
|
9374 |
-
'fill-rule' => array(),
|
9375 |
-
'filter' => array(),
|
9376 |
-
'flood-color' => array(),
|
9377 |
-
'flood-opacity' => array(),
|
9378 |
-
'font-family' => array(),
|
9379 |
-
'font-size' => array(),
|
9380 |
-
'font-size-adjust' => array(),
|
9381 |
-
'font-stretch' => array(),
|
9382 |
-
'font-style' => array(),
|
9383 |
-
'font-variant' => array(),
|
9384 |
-
'font-weight' => array(),
|
9385 |
-
'glyph-orientation-horizontal' => array(),
|
9386 |
-
'glyph-orientation-vertical' => array(),
|
9387 |
-
'image-rendering' => array(),
|
9388 |
-
'kerning' => array(),
|
9389 |
-
'letter-spacing' => array(),
|
9390 |
-
'lighting-color' => array(),
|
9391 |
-
'marker-end' => array(),
|
9392 |
-
'marker-mid' => array(),
|
9393 |
-
'marker-start' => array(),
|
9394 |
-
'mask' => array(),
|
9395 |
-
'opacity' => array(),
|
9396 |
-
'overflow' => array(),
|
9397 |
-
'pointer-events' => array(),
|
9398 |
-
'requiredextensions' => array(),
|
9399 |
-
'requiredfeatures' => array(),
|
9400 |
-
'shape-rendering' => array(),
|
9401 |
-
'stop-color' => array(),
|
9402 |
-
'stop-opacity' => array(),
|
9403 |
-
'stroke' => array(),
|
9404 |
-
'stroke-dasharray' => array(),
|
9405 |
-
'stroke-dashoffset' => array(),
|
9406 |
-
'stroke-linecap' => array(),
|
9407 |
-
'stroke-linejoin' => array(),
|
9408 |
-
'stroke-miterlimit' => array(),
|
9409 |
-
'stroke-opacity' => array(),
|
9410 |
-
'stroke-width' => array(),
|
9411 |
-
'style' => array(
|
9412 |
-
'blacklisted_value_regex' => '!important',
|
9413 |
-
),
|
9414 |
-
'systemlanguage' => array(),
|
9415 |
-
'text-anchor' => array(),
|
9416 |
-
'text-decoration' => array(),
|
9417 |
-
'text-rendering' => array(),
|
9418 |
-
'unicode-bidi' => array(),
|
9419 |
-
'vector-effect' => array(),
|
9420 |
-
'visibility' => array(),
|
9421 |
-
'word-spacing' => array(),
|
9422 |
-
'writing-mode' => array(),
|
9423 |
-
'xml:lang' => array(),
|
9424 |
-
'xml:space' => array(),
|
9425 |
-
'xmlns' => array(),
|
9426 |
-
'xmlns:xlink' => array(),
|
9427 |
-
),
|
9428 |
-
'tag_spec' => array(
|
9429 |
-
'mandatory_ancestor' => 'svg',
|
9430 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
9431 |
-
),
|
9432 |
-
),
|
9433 |
-
),
|
9434 |
-
'symbol' => array(
|
9435 |
-
array(
|
9436 |
-
'attr_spec_list' => array(
|
9437 |
-
'alignment-baseline' => array(),
|
9438 |
-
'baseline-shift' => array(),
|
9439 |
-
'clip' => array(),
|
9440 |
-
'clip-path' => array(),
|
9441 |
-
'clip-rule' => array(),
|
9442 |
-
'color' => array(),
|
9443 |
-
'color-interpolation' => array(),
|
9444 |
-
'color-interpolation-filters' => array(),
|
9445 |
-
'color-profile' => array(),
|
9446 |
-
'color-rendering' => array(),
|
9447 |
-
'cursor' => array(),
|
9448 |
-
'direction' => array(),
|
9449 |
-
'display' => array(),
|
9450 |
-
'dominant-baseline' => array(),
|
9451 |
-
'enable-background' => array(),
|
9452 |
-
'externalresourcesrequired' => array(),
|
9453 |
-
'fill' => array(),
|
9454 |
-
'fill-opacity' => array(),
|
9455 |
-
'fill-rule' => array(),
|
9456 |
-
'filter' => array(),
|
9457 |
-
'flood-color' => array(),
|
9458 |
-
'flood-opacity' => array(),
|
9459 |
-
'font-family' => array(),
|
9460 |
-
'font-size' => array(),
|
9461 |
-
'font-size-adjust' => array(),
|
9462 |
-
'font-stretch' => array(),
|
9463 |
-
'font-style' => array(),
|
9464 |
-
'font-variant' => array(),
|
9465 |
-
'font-weight' => array(),
|
9466 |
-
'glyph-orientation-horizontal' => array(),
|
9467 |
-
'glyph-orientation-vertical' => array(),
|
9468 |
-
'image-rendering' => array(),
|
9469 |
-
'kerning' => array(),
|
9470 |
-
'letter-spacing' => array(),
|
9471 |
-
'lighting-color' => array(),
|
9472 |
-
'marker-end' => array(),
|
9473 |
-
'marker-mid' => array(),
|
9474 |
-
'marker-start' => array(),
|
9475 |
-
'mask' => array(),
|
9476 |
-
'opacity' => array(),
|
9477 |
-
'overflow' => array(),
|
9478 |
-
'pointer-events' => array(),
|
9479 |
-
'preserveaspectratio' => array(),
|
9480 |
-
'shape-rendering' => array(),
|
9481 |
-
'stop-color' => array(),
|
9482 |
-
'stop-opacity' => array(),
|
9483 |
-
'stroke' => array(),
|
9484 |
-
'stroke-dasharray' => array(),
|
9485 |
-
'stroke-dashoffset' => array(),
|
9486 |
-
'stroke-linecap' => array(),
|
9487 |
-
'stroke-linejoin' => array(),
|
9488 |
-
'stroke-miterlimit' => array(),
|
9489 |
-
'stroke-opacity' => array(),
|
9490 |
-
'stroke-width' => array(),
|
9491 |
-
'style' => array(
|
9492 |
-
'blacklisted_value_regex' => '!important',
|
9493 |
-
),
|
9494 |
-
'text-anchor' => array(),
|
9495 |
-
'text-decoration' => array(),
|
9496 |
-
'text-rendering' => array(),
|
9497 |
-
'unicode-bidi' => array(),
|
9498 |
-
'vector-effect' => array(),
|
9499 |
-
'viewbox' => array(),
|
9500 |
-
'visibility' => array(),
|
9501 |
-
'word-spacing' => array(),
|
9502 |
-
'writing-mode' => array(),
|
9503 |
-
'xml:lang' => array(),
|
9504 |
-
'xml:space' => array(),
|
9505 |
-
'xmlns' => array(),
|
9506 |
-
'xmlns:xlink' => array(),
|
9507 |
-
),
|
9508 |
-
'tag_spec' => array(
|
9509 |
-
'mandatory_ancestor' => 'svg',
|
9510 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
9511 |
-
),
|
9512 |
-
),
|
9513 |
-
),
|
9514 |
-
'table' => array(
|
9515 |
-
array(
|
9516 |
-
'attr_spec_list' => array(
|
9517 |
-
'align' => array(),
|
9518 |
-
'bgcolor' => array(),
|
9519 |
-
'border' => array(
|
9520 |
-
'value_regex' => '0|1',
|
9521 |
-
),
|
9522 |
-
'cellpadding' => array(),
|
9523 |
-
'cellspacing' => array(),
|
9524 |
-
'sortable' => array(),
|
9525 |
-
'width' => array(),
|
9526 |
-
),
|
9527 |
-
'tag_spec' => array(),
|
9528 |
-
),
|
9529 |
-
),
|
9530 |
-
'tbody' => array(
|
9531 |
-
array(
|
9532 |
-
'attr_spec_list' => array(),
|
9533 |
-
'tag_spec' => array(),
|
9534 |
-
),
|
9535 |
-
),
|
9536 |
-
'td' => array(
|
9537 |
-
array(
|
9538 |
-
'attr_spec_list' => array(
|
9539 |
-
'align' => array(),
|
9540 |
-
'bgcolor' => array(),
|
9541 |
-
'colspan' => array(),
|
9542 |
-
'headers' => array(),
|
9543 |
-
'height' => array(),
|
9544 |
-
'rowspan' => array(),
|
9545 |
-
'valign' => array(),
|
9546 |
-
'width' => array(),
|
9547 |
-
),
|
9548 |
-
'tag_spec' => array(),
|
9549 |
-
),
|
9550 |
-
),
|
9551 |
-
'template' => array(
|
9552 |
-
array(
|
9553 |
-
'attr_spec_list' => array(
|
9554 |
-
'type' => array(
|
9555 |
-
'mandatory' => true,
|
9556 |
-
'value' => 'amp-mustache',
|
9557 |
-
),
|
9558 |
-
),
|
9559 |
-
'tag_spec' => array(
|
9560 |
-
'disallowed_ancestor' => array(
|
9561 |
-
'template',
|
9562 |
-
'amp-story-auto-ads',
|
9563 |
-
'form > div [submit-success][template]',
|
9564 |
-
'form > div [submit-error][template]',
|
9565 |
-
),
|
9566 |
-
'requires_extension' => array(
|
9567 |
-
'amp-mustache',
|
9568 |
-
),
|
9569 |
-
),
|
9570 |
-
),
|
9571 |
-
array(
|
9572 |
-
'attr_spec_list' => array(
|
9573 |
-
'type' => array(
|
9574 |
-
'mandatory' => true,
|
9575 |
-
'value' => 'amp-mustache',
|
9576 |
-
),
|
9577 |
-
),
|
9578 |
-
'tag_spec' => array(
|
9579 |
-
'mandatory_parent' => 'amp-story-auto-ads',
|
9580 |
-
'requires_extension' => array(
|
9581 |
-
'amp-mustache',
|
9582 |
-
),
|
9583 |
-
'spec_name' => 'amp-story-auto-ads > template',
|
9584 |
-
),
|
9585 |
-
),
|
9586 |
-
),
|
9587 |
-
'text' => array(
|
9588 |
-
array(
|
9589 |
-
'attr_spec_list' => array(
|
9590 |
-
'alignment-baseline' => array(),
|
9591 |
-
'baseline-shift' => array(),
|
9592 |
-
'clip' => array(),
|
9593 |
-
'clip-path' => array(),
|
9594 |
-
'clip-rule' => array(),
|
9595 |
-
'color' => array(),
|
9596 |
-
'color-interpolation' => array(),
|
9597 |
-
'color-interpolation-filters' => array(),
|
9598 |
-
'color-profile' => array(),
|
9599 |
-
'color-rendering' => array(),
|
9600 |
-
'cursor' => array(),
|
9601 |
-
'direction' => array(),
|
9602 |
-
'display' => array(),
|
9603 |
-
'dominant-baseline' => array(),
|
9604 |
-
'dx' => array(),
|
9605 |
-
'dy' => array(),
|
9606 |
-
'enable-background' => array(),
|
9607 |
-
'externalresourcesrequired' => array(),
|
9608 |
-
'fill' => array(),
|
9609 |
-
'fill-opacity' => array(),
|
9610 |
-
'fill-rule' => array(),
|
9611 |
-
'filter' => array(),
|
9612 |
-
'flood-color' => array(),
|
9613 |
-
'flood-opacity' => array(),
|
9614 |
-
'font-family' => array(),
|
9615 |
-
'font-size' => array(),
|
9616 |
-
'font-size-adjust' => array(),
|
9617 |
-
'font-stretch' => array(),
|
9618 |
-
'font-style' => array(),
|
9619 |
-
'font-variant' => array(),
|
9620 |
-
'font-weight' => array(),
|
9621 |
-
'glyph-orientation-horizontal' => array(),
|
9622 |
-
'glyph-orientation-vertical' => array(),
|
9623 |
-
'image-rendering' => array(),
|
9624 |
-
'kerning' => array(),
|
9625 |
-
'lengthadjust' => array(),
|
9626 |
-
'letter-spacing' => array(),
|
9627 |
-
'lighting-color' => array(),
|
9628 |
-
'marker-end' => array(),
|
9629 |
-
'marker-mid' => array(),
|
9630 |
-
'marker-start' => array(),
|
9631 |
-
'mask' => array(),
|
9632 |
-
'opacity' => array(),
|
9633 |
-
'overflow' => array(),
|
9634 |
-
'pointer-events' => array(),
|
9635 |
-
'requiredextensions' => array(),
|
9636 |
-
'requiredfeatures' => array(),
|
9637 |
-
'rotate' => array(),
|
9638 |
-
'shape-rendering' => array(),
|
9639 |
-
'stop-color' => array(),
|
9640 |
-
'stop-opacity' => array(),
|
9641 |
-
'stroke' => array(),
|
9642 |
-
'stroke-dasharray' => array(),
|
9643 |
-
'stroke-dashoffset' => array(),
|
9644 |
-
'stroke-linecap' => array(),
|
9645 |
-
'stroke-linejoin' => array(),
|
9646 |
-
'stroke-miterlimit' => array(),
|
9647 |
-
'stroke-opacity' => array(),
|
9648 |
-
'stroke-width' => array(),
|
9649 |
-
'style' => array(
|
9650 |
-
'blacklisted_value_regex' => '!important',
|
9651 |
-
),
|
9652 |
-
'systemlanguage' => array(),
|
9653 |
-
'text-anchor' => array(),
|
9654 |
-
'text-decoration' => array(),
|
9655 |
-
'text-rendering' => array(),
|
9656 |
-
'textlength' => array(),
|
9657 |
-
'transform' => array(),
|
9658 |
-
'unicode-bidi' => array(),
|
9659 |
-
'vector-effect' => array(),
|
9660 |
-
'visibility' => array(),
|
9661 |
-
'word-spacing' => array(),
|
9662 |
-
'writing-mode' => array(),
|
9663 |
-
'x' => array(),
|
9664 |
-
'xml:lang' => array(),
|
9665 |
-
'xml:space' => array(),
|
9666 |
-
'xmlns' => array(),
|
9667 |
-
'xmlns:xlink' => array(),
|
9668 |
-
'y' => array(),
|
9669 |
-
),
|
9670 |
-
'tag_spec' => array(
|
9671 |
-
'mandatory_ancestor' => 'svg',
|
9672 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
9673 |
-
),
|
9674 |
-
),
|
9675 |
-
),
|
9676 |
-
'textarea' => array(
|
9677 |
-
array(
|
9678 |
-
'attr_spec_list' => array(
|
9679 |
-
'[autocomplete]' => array(),
|
9680 |
-
'[autofocus]' => array(),
|
9681 |
-
'[cols]' => array(),
|
9682 |
-
'[disabled]' => array(),
|
9683 |
-
'[maxlength]' => array(),
|
9684 |
-
'[minlength]' => array(),
|
9685 |
-
'[placeholder]' => array(),
|
9686 |
-
'[readonly]' => array(),
|
9687 |
-
'[required]' => array(),
|
9688 |
-
'[rows]' => array(),
|
9689 |
-
'[selectiondirection]' => array(),
|
9690 |
-
'[selectionend]' => array(),
|
9691 |
-
'[selectionstart]' => array(),
|
9692 |
-
'[spellcheck]' => array(),
|
9693 |
-
'[wrap]' => array(),
|
9694 |
-
'autocomplete' => array(),
|
9695 |
-
'autofocus' => array(),
|
9696 |
-
'cols' => array(),
|
9697 |
-
'disabled' => array(),
|
9698 |
-
'maxlength' => array(),
|
9699 |
-
'minlength' => array(),
|
9700 |
-
'name' => array(
|
9701 |
-
'blacklisted_value_regex' => '(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|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|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|$)',
|
9702 |
-
),
|
9703 |
-
'placeholder' => array(),
|
9704 |
-
'readonly' => array(),
|
9705 |
-
'required' => array(),
|
9706 |
-
'rows' => array(),
|
9707 |
-
'selectiondirection' => array(),
|
9708 |
-
'selectionend' => array(),
|
9709 |
-
'selectionstart' => array(),
|
9710 |
-
'spellcheck' => array(),
|
9711 |
-
'wrap' => array(),
|
9712 |
-
),
|
9713 |
-
'tag_spec' => array(
|
9714 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-form',
|
9715 |
-
),
|
9716 |
-
),
|
9717 |
-
),
|
9718 |
-
'textpath' => array(
|
9719 |
-
array(
|
9720 |
-
'attr_spec_list' => array(
|
9721 |
-
'alignment-baseline' => array(),
|
9722 |
-
'baseline-shift' => array(),
|
9723 |
-
'clip' => array(),
|
9724 |
-
'clip-path' => array(),
|
9725 |
-
'clip-rule' => array(),
|
9726 |
-
'color' => array(),
|
9727 |
-
'color-interpolation' => array(),
|
9728 |
-
'color-interpolation-filters' => array(),
|
9729 |
-
'color-profile' => array(),
|
9730 |
-
'color-rendering' => array(),
|
9731 |
-
'cursor' => array(),
|
9732 |
-
'direction' => array(),
|
9733 |
-
'display' => array(),
|
9734 |
-
'dominant-baseline' => array(),
|
9735 |
-
'enable-background' => array(),
|
9736 |
-
'externalresourcesrequired' => array(),
|
9737 |
-
'fill' => array(),
|
9738 |
-
'fill-opacity' => array(),
|
9739 |
-
'fill-rule' => array(),
|
9740 |
-
'filter' => array(),
|
9741 |
-
'flood-color' => array(),
|
9742 |
-
'flood-opacity' => array(),
|
9743 |
-
'font-family' => array(),
|
9744 |
-
'font-size' => array(),
|
9745 |
-
'font-size-adjust' => array(),
|
9746 |
-
'font-stretch' => array(),
|
9747 |
-
'font-style' => array(),
|
9748 |
-
'font-variant' => array(),
|
9749 |
-
'font-weight' => array(),
|
9750 |
-
'glyph-orientation-horizontal' => array(),
|
9751 |
-
'glyph-orientation-vertical' => array(),
|
9752 |
-
'image-rendering' => array(),
|
9753 |
-
'kerning' => array(),
|
9754 |
-
'letter-spacing' => array(),
|
9755 |
-
'lighting-color' => array(),
|
9756 |
-
'marker-end' => array(),
|
9757 |
-
'marker-mid' => array(),
|
9758 |
-
'marker-start' => array(),
|
9759 |
-
'mask' => array(),
|
9760 |
-
'method' => array(),
|
9761 |
-
'opacity' => array(),
|
9762 |
-
'overflow' => array(),
|
9763 |
-
'pointer-events' => array(),
|
9764 |
-
'requiredextensions' => array(),
|
9765 |
-
'requiredfeatures' => array(),
|
9766 |
-
'shape-rendering' => array(),
|
9767 |
-
'spacing' => array(),
|
9768 |
-
'startoffset' => array(),
|
9769 |
-
'stop-color' => array(),
|
9770 |
-
'stop-opacity' => array(),
|
9771 |
-
'stroke' => array(),
|
9772 |
-
'stroke-dasharray' => array(),
|
9773 |
-
'stroke-dashoffset' => array(),
|
9774 |
-
'stroke-linecap' => array(),
|
9775 |
-
'stroke-linejoin' => array(),
|
9776 |
-
'stroke-miterlimit' => array(),
|
9777 |
-
'stroke-opacity' => array(),
|
9778 |
-
'stroke-width' => array(),
|
9779 |
-
'style' => array(
|
9780 |
-
'blacklisted_value_regex' => '!important',
|
9781 |
-
),
|
9782 |
-
'systemlanguage' => array(),
|
9783 |
-
'text-anchor' => array(),
|
9784 |
-
'text-decoration' => array(),
|
9785 |
-
'text-rendering' => array(),
|
9786 |
-
'unicode-bidi' => array(),
|
9787 |
-
'vector-effect' => array(),
|
9788 |
-
'visibility' => array(),
|
9789 |
-
'word-spacing' => array(),
|
9790 |
-
'writing-mode' => array(),
|
9791 |
-
'xlink:actuate' => array(),
|
9792 |
-
'xlink:arcrole' => array(),
|
9793 |
-
'xlink:href' => array(
|
9794 |
-
'alternative_names' => array(
|
9795 |
-
'href',
|
9796 |
-
),
|
9797 |
-
'value_url' => array(
|
9798 |
-
'allow_empty' => false,
|
9799 |
-
'allow_relative' => true,
|
9800 |
-
'allowed_protocol' => array(
|
9801 |
-
'http',
|
9802 |
-
'https',
|
9803 |
-
),
|
9804 |
-
),
|
9805 |
-
),
|
9806 |
-
'xlink:role' => array(),
|
9807 |
-
'xlink:show' => array(),
|
9808 |
-
'xlink:title' => array(),
|
9809 |
-
'xlink:type' => array(),
|
9810 |
-
'xml:lang' => array(),
|
9811 |
-
'xml:space' => array(),
|
9812 |
-
'xmlns' => array(),
|
9813 |
-
'xmlns:xlink' => array(),
|
9814 |
-
),
|
9815 |
-
'tag_spec' => array(
|
9816 |
-
'mandatory_ancestor' => 'svg',
|
9817 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
9818 |
-
),
|
9819 |
-
),
|
9820 |
-
),
|
9821 |
-
'tfoot' => array(
|
9822 |
-
array(
|
9823 |
-
'attr_spec_list' => array(),
|
9824 |
-
'tag_spec' => array(),
|
9825 |
-
),
|
9826 |
-
),
|
9827 |
-
'th' => array(
|
9828 |
-
array(
|
9829 |
-
'attr_spec_list' => array(
|
9830 |
-
'abbr' => array(),
|
9831 |
-
'align' => array(),
|
9832 |
-
'bgcolor' => array(),
|
9833 |
-
'colspan' => array(),
|
9834 |
-
'headers' => array(),
|
9835 |
-
'height' => array(),
|
9836 |
-
'rowspan' => array(),
|
9837 |
-
'scope' => array(),
|
9838 |
-
'sorted' => array(),
|
9839 |
-
'valign' => array(),
|
9840 |
-
'width' => array(),
|
9841 |
-
),
|
9842 |
-
'tag_spec' => array(),
|
9843 |
-
),
|
9844 |
-
),
|
9845 |
-
'thead' => array(
|
9846 |
-
array(
|
9847 |
-
'attr_spec_list' => array(),
|
9848 |
-
'tag_spec' => array(),
|
9849 |
-
),
|
9850 |
-
),
|
9851 |
-
'time' => array(
|
9852 |
-
array(
|
9853 |
-
'attr_spec_list' => array(
|
9854 |
-
'datetime' => array(),
|
9855 |
-
),
|
9856 |
-
'tag_spec' => array(),
|
9857 |
-
),
|
9858 |
-
),
|
9859 |
-
'title' => array(
|
9860 |
-
array(
|
9861 |
-
'attr_spec_list' => array(),
|
9862 |
-
'tag_spec' => array(
|
9863 |
-
'spec_name' => 'title',
|
9864 |
-
),
|
9865 |
-
),
|
9866 |
-
array(
|
9867 |
-
'attr_spec_list' => array(
|
9868 |
-
'style' => array(
|
9869 |
-
'blacklisted_value_regex' => '!important',
|
9870 |
-
),
|
9871 |
-
'xml:lang' => array(),
|
9872 |
-
'xml:space' => array(),
|
9873 |
-
'xmlns' => array(),
|
9874 |
-
'xmlns:xlink' => array(),
|
9875 |
-
),
|
9876 |
-
'tag_spec' => array(
|
9877 |
-
'mandatory_ancestor' => 'svg',
|
9878 |
-
'spec_name' => 'svg title',
|
9879 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
9880 |
-
),
|
9881 |
-
),
|
9882 |
-
),
|
9883 |
-
'tr' => array(
|
9884 |
-
array(
|
9885 |
-
'attr_spec_list' => array(
|
9886 |
-
'align' => array(),
|
9887 |
-
'bgcolor' => array(),
|
9888 |
-
'height' => array(),
|
9889 |
-
'valign' => array(),
|
9890 |
-
),
|
9891 |
-
'tag_spec' => array(),
|
9892 |
-
),
|
9893 |
-
),
|
9894 |
-
'track' => array(
|
9895 |
-
array(
|
9896 |
-
'attr_spec_list' => array(
|
9897 |
-
'default' => array(
|
9898 |
-
'value' => '',
|
9899 |
-
),
|
9900 |
-
'kind' => array(
|
9901 |
-
'value_regex' => '(captions|descriptions|chapters|metadata)',
|
9902 |
-
),
|
9903 |
-
'label' => array(),
|
9904 |
-
'src' => array(
|
9905 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
9906 |
-
'mandatory' => true,
|
9907 |
-
'value_url' => array(
|
9908 |
-
'allow_relative' => false,
|
9909 |
-
'allowed_protocol' => array(
|
9910 |
-
'https',
|
9911 |
-
),
|
9912 |
-
),
|
9913 |
-
),
|
9914 |
-
'srclang' => array(),
|
9915 |
-
),
|
9916 |
-
'tag_spec' => array(
|
9917 |
-
'mandatory_parent' => 'audio',
|
9918 |
-
'spec_name' => 'audio > track',
|
9919 |
-
),
|
9920 |
-
),
|
9921 |
-
array(
|
9922 |
-
'attr_spec_list' => array(
|
9923 |
-
'default' => array(
|
9924 |
-
'value' => '',
|
9925 |
-
),
|
9926 |
-
'kind' => array(
|
9927 |
-
'mandatory' => true,
|
9928 |
-
'value_casei' => 'subtitles',
|
9929 |
-
),
|
9930 |
-
'label' => array(),
|
9931 |
-
'src' => array(
|
9932 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
9933 |
-
'mandatory' => true,
|
9934 |
-
'value_url' => array(
|
9935 |
-
'allow_relative' => false,
|
9936 |
-
'allowed_protocol' => array(
|
9937 |
-
'https',
|
9938 |
-
),
|
9939 |
-
),
|
9940 |
-
),
|
9941 |
-
'srclang' => array(
|
9942 |
-
'mandatory' => true,
|
9943 |
-
),
|
9944 |
-
),
|
9945 |
-
'tag_spec' => array(
|
9946 |
-
'mandatory_parent' => 'audio',
|
9947 |
-
'spec_name' => 'audio > track[kind=subtitles]',
|
9948 |
-
),
|
9949 |
-
),
|
9950 |
-
array(
|
9951 |
-
'attr_spec_list' => array(
|
9952 |
-
'default' => array(
|
9953 |
-
'value' => '',
|
9954 |
-
),
|
9955 |
-
'kind' => array(
|
9956 |
-
'value_regex' => '(captions|descriptions|chapters|metadata)',
|
9957 |
-
),
|
9958 |
-
'label' => array(),
|
9959 |
-
'src' => array(
|
9960 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
9961 |
-
'mandatory' => true,
|
9962 |
-
'value_url' => array(
|
9963 |
-
'allow_relative' => false,
|
9964 |
-
'allowed_protocol' => array(
|
9965 |
-
'https',
|
9966 |
-
),
|
9967 |
-
),
|
9968 |
-
),
|
9969 |
-
'srclang' => array(),
|
9970 |
-
),
|
9971 |
-
'tag_spec' => array(
|
9972 |
-
'mandatory_parent' => 'video',
|
9973 |
-
'spec_name' => 'video > track',
|
9974 |
-
),
|
9975 |
-
),
|
9976 |
-
array(
|
9977 |
-
'attr_spec_list' => array(
|
9978 |
-
'default' => array(
|
9979 |
-
'value' => '',
|
9980 |
-
),
|
9981 |
-
'kind' => array(
|
9982 |
-
'mandatory' => true,
|
9983 |
-
'value_casei' => 'subtitles',
|
9984 |
-
),
|
9985 |
-
'label' => array(),
|
9986 |
-
'src' => array(
|
9987 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
9988 |
-
'mandatory' => true,
|
9989 |
-
'value_url' => array(
|
9990 |
-
'allow_relative' => false,
|
9991 |
-
'allowed_protocol' => array(
|
9992 |
-
'https',
|
9993 |
-
),
|
9994 |
-
),
|
9995 |
-
),
|
9996 |
-
'srclang' => array(
|
9997 |
-
'mandatory' => true,
|
9998 |
-
),
|
9999 |
-
),
|
10000 |
-
'tag_spec' => array(
|
10001 |
-
'mandatory_parent' => 'video',
|
10002 |
-
'spec_name' => 'video > track[kind=subtitles]',
|
10003 |
-
),
|
10004 |
-
),
|
10005 |
-
array(
|
10006 |
-
'attr_spec_list' => array(
|
10007 |
-
'[label]' => array(),
|
10008 |
-
'[src]' => array(),
|
10009 |
-
'[srclang]' => array(),
|
10010 |
-
'default' => array(
|
10011 |
-
'value' => '',
|
10012 |
-
),
|
10013 |
-
'kind' => array(
|
10014 |
-
'value_regex' => '(captions|descriptions|chapters|metadata)',
|
10015 |
-
),
|
10016 |
-
'label' => array(),
|
10017 |
-
'src' => array(
|
10018 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
10019 |
-
'mandatory' => true,
|
10020 |
-
'value_url' => array(
|
10021 |
-
'allow_relative' => false,
|
10022 |
-
'allowed_protocol' => array(
|
10023 |
-
'https',
|
10024 |
-
),
|
10025 |
-
),
|
10026 |
-
),
|
10027 |
-
'srclang' => array(),
|
10028 |
-
),
|
10029 |
-
'tag_spec' => array(
|
10030 |
-
'mandatory_parent' => 'amp-audio',
|
10031 |
-
'spec_name' => 'amp-audio > track',
|
10032 |
-
),
|
10033 |
-
),
|
10034 |
-
array(
|
10035 |
-
'attr_spec_list' => array(
|
10036 |
-
'[label]' => array(),
|
10037 |
-
'[src]' => array(),
|
10038 |
-
'[srclang]' => array(),
|
10039 |
-
'default' => array(
|
10040 |
-
'value' => '',
|
10041 |
-
),
|
10042 |
-
'kind' => array(
|
10043 |
-
'mandatory' => true,
|
10044 |
-
'value_casei' => 'subtitles',
|
10045 |
-
),
|
10046 |
-
'label' => array(),
|
10047 |
-
'src' => array(
|
10048 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
10049 |
-
'mandatory' => true,
|
10050 |
-
'value_url' => array(
|
10051 |
-
'allow_relative' => false,
|
10052 |
-
'allowed_protocol' => array(
|
10053 |
-
'https',
|
10054 |
-
),
|
10055 |
-
),
|
10056 |
-
),
|
10057 |
-
'srclang' => array(
|
10058 |
-
'mandatory' => true,
|
10059 |
-
),
|
10060 |
-
),
|
10061 |
-
'tag_spec' => array(
|
10062 |
-
'mandatory_parent' => 'amp-audio',
|
10063 |
-
'spec_name' => 'amp-audio > track[kind=subtitles]',
|
10064 |
-
),
|
10065 |
-
),
|
10066 |
-
array(
|
10067 |
-
'attr_spec_list' => array(
|
10068 |
-
'[label]' => array(),
|
10069 |
-
'[src]' => array(),
|
10070 |
-
'[srclang]' => array(),
|
10071 |
-
'default' => array(
|
10072 |
-
'value' => '',
|
10073 |
-
),
|
10074 |
-
'kind' => array(
|
10075 |
-
'value_regex' => '(captions|descriptions|chapters|metadata)',
|
10076 |
-
),
|
10077 |
-
'label' => array(),
|
10078 |
-
'src' => array(
|
10079 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
10080 |
-
'mandatory' => true,
|
10081 |
-
'value_url' => array(
|
10082 |
-
'allow_relative' => false,
|
10083 |
-
'allowed_protocol' => array(
|
10084 |
-
'https',
|
10085 |
-
),
|
10086 |
-
),
|
10087 |
-
),
|
10088 |
-
'srclang' => array(),
|
10089 |
-
),
|
10090 |
-
'tag_spec' => array(
|
10091 |
-
'mandatory_parent' => 'amp-video',
|
10092 |
-
'spec_name' => 'amp-video > track',
|
10093 |
-
),
|
10094 |
-
),
|
10095 |
-
array(
|
10096 |
-
'attr_spec_list' => array(
|
10097 |
-
'[label]' => array(),
|
10098 |
-
'[src]' => array(),
|
10099 |
-
'[srclang]' => array(),
|
10100 |
-
'default' => array(
|
10101 |
-
'value' => '',
|
10102 |
-
),
|
10103 |
-
'kind' => array(
|
10104 |
-
'mandatory' => true,
|
10105 |
-
'value_casei' => 'subtitles',
|
10106 |
-
),
|
10107 |
-
'label' => array(),
|
10108 |
-
'src' => array(
|
10109 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
10110 |
-
'mandatory' => true,
|
10111 |
-
'value_url' => array(
|
10112 |
-
'allow_relative' => false,
|
10113 |
-
'allowed_protocol' => array(
|
10114 |
-
'https',
|
10115 |
-
),
|
10116 |
-
),
|
10117 |
-
),
|
10118 |
-
'srclang' => array(
|
10119 |
-
'mandatory' => true,
|
10120 |
-
),
|
10121 |
-
),
|
10122 |
-
'tag_spec' => array(
|
10123 |
-
'mandatory_parent' => 'amp-video',
|
10124 |
-
'spec_name' => 'amp-video > track[kind=subtitles]',
|
10125 |
-
),
|
10126 |
-
),
|
10127 |
-
array(
|
10128 |
-
'attr_spec_list' => array(
|
10129 |
-
'[label]' => array(),
|
10130 |
-
'[src]' => array(),
|
10131 |
-
'[srclang]' => array(),
|
10132 |
-
'default' => array(
|
10133 |
-
'value' => '',
|
10134 |
-
),
|
10135 |
-
'kind' => array(
|
10136 |
-
'mandatory' => true,
|
10137 |
-
'value_casei' => 'subtitles',
|
10138 |
-
),
|
10139 |
-
'label' => array(),
|
10140 |
-
'src' => array(
|
10141 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
10142 |
-
'mandatory' => true,
|
10143 |
-
'value_url' => array(
|
10144 |
-
'allow_relative' => false,
|
10145 |
-
'allowed_protocol' => array(
|
10146 |
-
'https',
|
10147 |
-
),
|
10148 |
-
),
|
10149 |
-
),
|
10150 |
-
'srclang' => array(
|
10151 |
-
'mandatory' => true,
|
10152 |
-
),
|
10153 |
-
),
|
10154 |
-
'tag_spec' => array(
|
10155 |
-
'mandatory_parent' => 'amp-ima-video',
|
10156 |
-
'spec_name' => 'amp-ima-video > track[kind=subtitles]',
|
10157 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-ima-video',
|
10158 |
-
),
|
10159 |
-
),
|
10160 |
-
),
|
10161 |
-
'tref' => array(
|
10162 |
-
array(
|
10163 |
-
'attr_spec_list' => array(
|
10164 |
-
'alignment-baseline' => array(),
|
10165 |
-
'baseline-shift' => array(),
|
10166 |
-
'clip' => array(),
|
10167 |
-
'clip-path' => array(),
|
10168 |
-
'clip-rule' => array(),
|
10169 |
-
'color' => array(),
|
10170 |
-
'color-interpolation' => array(),
|
10171 |
-
'color-interpolation-filters' => array(),
|
10172 |
-
'color-profile' => array(),
|
10173 |
-
'color-rendering' => array(),
|
10174 |
-
'cursor' => array(),
|
10175 |
-
'direction' => array(),
|
10176 |
-
'display' => array(),
|
10177 |
-
'dominant-baseline' => array(),
|
10178 |
-
'enable-background' => array(),
|
10179 |
-
'externalresourcesrequired' => array(),
|
10180 |
-
'fill' => array(),
|
10181 |
-
'fill-opacity' => array(),
|
10182 |
-
'fill-rule' => array(),
|
10183 |
-
'filter' => array(),
|
10184 |
-
'flood-color' => array(),
|
10185 |
-
'flood-opacity' => array(),
|
10186 |
-
'font-family' => array(),
|
10187 |
-
'font-size' => array(),
|
10188 |
-
'font-size-adjust' => array(),
|
10189 |
-
'font-stretch' => array(),
|
10190 |
-
'font-style' => array(),
|
10191 |
-
'font-variant' => array(),
|
10192 |
-
'font-weight' => array(),
|
10193 |
-
'glyph-orientation-horizontal' => array(),
|
10194 |
-
'glyph-orientation-vertical' => array(),
|
10195 |
-
'image-rendering' => array(),
|
10196 |
-
'kerning' => array(),
|
10197 |
-
'letter-spacing' => array(),
|
10198 |
-
'lighting-color' => array(),
|
10199 |
-
'marker-end' => array(),
|
10200 |
-
'marker-mid' => array(),
|
10201 |
-
'marker-start' => array(),
|
10202 |
-
'mask' => array(),
|
10203 |
-
'opacity' => array(),
|
10204 |
-
'overflow' => array(),
|
10205 |
-
'pointer-events' => array(),
|
10206 |
-
'requiredextensions' => array(),
|
10207 |
-
'requiredfeatures' => array(),
|
10208 |
-
'shape-rendering' => array(),
|
10209 |
-
'stop-color' => array(),
|
10210 |
-
'stop-opacity' => array(),
|
10211 |
-
'stroke' => array(),
|
10212 |
-
'stroke-dasharray' => array(),
|
10213 |
-
'stroke-dashoffset' => array(),
|
10214 |
-
'stroke-linecap' => array(),
|
10215 |
-
'stroke-linejoin' => array(),
|
10216 |
-
'stroke-miterlimit' => array(),
|
10217 |
-
'stroke-opacity' => array(),
|
10218 |
-
'stroke-width' => array(),
|
10219 |
-
'style' => array(
|
10220 |
-
'blacklisted_value_regex' => '!important',
|
10221 |
-
),
|
10222 |
-
'systemlanguage' => array(),
|
10223 |
-
'text-anchor' => array(),
|
10224 |
-
'text-decoration' => array(),
|
10225 |
-
'text-rendering' => array(),
|
10226 |
-
'unicode-bidi' => array(),
|
10227 |
-
'vector-effect' => array(),
|
10228 |
-
'visibility' => array(),
|
10229 |
-
'word-spacing' => array(),
|
10230 |
-
'writing-mode' => array(),
|
10231 |
-
'xlink:actuate' => array(),
|
10232 |
-
'xlink:arcrole' => array(),
|
10233 |
-
'xlink:href' => array(
|
10234 |
-
'alternative_names' => array(
|
10235 |
-
'href',
|
10236 |
-
),
|
10237 |
-
'value_url' => array(
|
10238 |
-
'allow_empty' => false,
|
10239 |
-
'allow_relative' => true,
|
10240 |
-
'allowed_protocol' => array(
|
10241 |
-
'http',
|
10242 |
-
'https',
|
10243 |
-
),
|
10244 |
-
),
|
10245 |
-
),
|
10246 |
-
'xlink:role' => array(),
|
10247 |
-
'xlink:show' => array(),
|
10248 |
-
'xlink:title' => array(),
|
10249 |
-
'xlink:type' => array(),
|
10250 |
-
'xml:lang' => array(),
|
10251 |
-
'xml:space' => array(),
|
10252 |
-
'xmlns' => array(),
|
10253 |
-
'xmlns:xlink' => array(),
|
10254 |
-
),
|
10255 |
-
'tag_spec' => array(
|
10256 |
-
'mandatory_ancestor' => 'svg',
|
10257 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
10258 |
-
),
|
10259 |
-
),
|
10260 |
-
),
|
10261 |
-
'tspan' => array(
|
10262 |
-
array(
|
10263 |
-
'attr_spec_list' => array(
|
10264 |
-
'alignment-baseline' => array(),
|
10265 |
-
'baseline-shift' => array(),
|
10266 |
-
'clip' => array(),
|
10267 |
-
'clip-path' => array(),
|
10268 |
-
'clip-rule' => array(),
|
10269 |
-
'color' => array(),
|
10270 |
-
'color-interpolation' => array(),
|
10271 |
-
'color-interpolation-filters' => array(),
|
10272 |
-
'color-profile' => array(),
|
10273 |
-
'color-rendering' => array(),
|
10274 |
-
'cursor' => array(),
|
10275 |
-
'direction' => array(),
|
10276 |
-
'display' => array(),
|
10277 |
-
'dominant-baseline' => array(),
|
10278 |
-
'dx' => array(),
|
10279 |
-
'dy' => array(),
|
10280 |
-
'enable-background' => array(),
|
10281 |
-
'externalresourcesrequired' => array(),
|
10282 |
-
'fill' => array(),
|
10283 |
-
'fill-opacity' => array(),
|
10284 |
-
'fill-rule' => array(),
|
10285 |
-
'filter' => array(),
|
10286 |
-
'flood-color' => array(),
|
10287 |
-
'flood-opacity' => array(),
|
10288 |
-
'font-family' => array(),
|
10289 |
-
'font-size' => array(),
|
10290 |
-
'font-size-adjust' => array(),
|
10291 |
-
'font-stretch' => array(),
|
10292 |
-
'font-style' => array(),
|
10293 |
-
'font-variant' => array(),
|
10294 |
-
'font-weight' => array(),
|
10295 |
-
'glyph-orientation-horizontal' => array(),
|
10296 |
-
'glyph-orientation-vertical' => array(),
|
10297 |
-
'image-rendering' => array(),
|
10298 |
-
'kerning' => array(),
|
10299 |
-
'lengthadjust' => array(),
|
10300 |
-
'letter-spacing' => array(),
|
10301 |
-
'lighting-color' => array(),
|
10302 |
-
'marker-end' => array(),
|
10303 |
-
'marker-mid' => array(),
|
10304 |
-
'marker-start' => array(),
|
10305 |
-
'mask' => array(),
|
10306 |
-
'opacity' => array(),
|
10307 |
-
'overflow' => array(),
|
10308 |
-
'pointer-events' => array(),
|
10309 |
-
'requiredextensions' => array(),
|
10310 |
-
'requiredfeatures' => array(),
|
10311 |
-
'rotate' => array(),
|
10312 |
-
'shape-rendering' => array(),
|
10313 |
-
'stop-color' => array(),
|
10314 |
-
'stop-opacity' => array(),
|
10315 |
-
'stroke' => array(),
|
10316 |
-
'stroke-dasharray' => array(),
|
10317 |
-
'stroke-dashoffset' => array(),
|
10318 |
-
'stroke-linecap' => array(),
|
10319 |
-
'stroke-linejoin' => array(),
|
10320 |
-
'stroke-miterlimit' => array(),
|
10321 |
-
'stroke-opacity' => array(),
|
10322 |
-
'stroke-width' => array(),
|
10323 |
-
'style' => array(
|
10324 |
-
'blacklisted_value_regex' => '!important',
|
10325 |
-
),
|
10326 |
-
'systemlanguage' => array(),
|
10327 |
-
'text-anchor' => array(),
|
10328 |
-
'text-decoration' => array(),
|
10329 |
-
'text-rendering' => array(),
|
10330 |
-
'textlength' => array(),
|
10331 |
-
'unicode-bidi' => array(),
|
10332 |
-
'vector-effect' => array(),
|
10333 |
-
'visibility' => array(),
|
10334 |
-
'word-spacing' => array(),
|
10335 |
-
'writing-mode' => array(),
|
10336 |
-
'x' => array(),
|
10337 |
-
'xml:lang' => array(),
|
10338 |
-
'xml:space' => array(),
|
10339 |
-
'xmlns' => array(),
|
10340 |
-
'xmlns:xlink' => array(),
|
10341 |
-
'y' => array(),
|
10342 |
-
),
|
10343 |
-
'tag_spec' => array(
|
10344 |
-
'mandatory_ancestor' => 'svg',
|
10345 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
10346 |
-
),
|
10347 |
-
),
|
10348 |
-
),
|
10349 |
-
'tt' => array(
|
10350 |
-
array(
|
10351 |
-
'attr_spec_list' => array(),
|
10352 |
-
'tag_spec' => array(),
|
10353 |
-
),
|
10354 |
-
),
|
10355 |
-
'u' => array(
|
10356 |
-
array(
|
10357 |
-
'attr_spec_list' => array(),
|
10358 |
-
'tag_spec' => array(),
|
10359 |
-
),
|
10360 |
-
),
|
10361 |
-
'ul' => array(
|
10362 |
-
array(
|
10363 |
-
'attr_spec_list' => array(),
|
10364 |
-
'tag_spec' => array(),
|
10365 |
-
),
|
10366 |
-
),
|
10367 |
-
'use' => array(
|
10368 |
-
array(
|
10369 |
-
'attr_spec_list' => array(
|
10370 |
-
'alignment-baseline' => array(),
|
10371 |
-
'baseline-shift' => array(),
|
10372 |
-
'clip' => array(),
|
10373 |
-
'clip-path' => array(),
|
10374 |
-
'clip-rule' => array(),
|
10375 |
-
'color' => array(),
|
10376 |
-
'color-interpolation' => array(),
|
10377 |
-
'color-interpolation-filters' => array(),
|
10378 |
-
'color-profile' => array(),
|
10379 |
-
'color-rendering' => array(),
|
10380 |
-
'cursor' => array(),
|
10381 |
-
'direction' => array(),
|
10382 |
-
'display' => array(),
|
10383 |
-
'dominant-baseline' => array(),
|
10384 |
-
'enable-background' => array(),
|
10385 |
-
'externalresourcesrequired' => array(),
|
10386 |
-
'fill' => array(),
|
10387 |
-
'fill-opacity' => array(),
|
10388 |
-
'fill-rule' => array(),
|
10389 |
-
'filter' => array(),
|
10390 |
-
'flood-color' => array(),
|
10391 |
-
'flood-opacity' => array(),
|
10392 |
-
'font-family' => array(),
|
10393 |
-
'font-size' => array(),
|
10394 |
-
'font-size-adjust' => array(),
|
10395 |
-
'font-stretch' => array(),
|
10396 |
-
'font-style' => array(),
|
10397 |
-
'font-variant' => array(),
|
10398 |
-
'font-weight' => array(),
|
10399 |
-
'glyph-orientation-horizontal' => array(),
|
10400 |
-
'glyph-orientation-vertical' => array(),
|
10401 |
-
'height' => array(),
|
10402 |
-
'image-rendering' => array(),
|
10403 |
-
'kerning' => array(),
|
10404 |
-
'letter-spacing' => array(),
|
10405 |
-
'lighting-color' => array(),
|
10406 |
-
'marker-end' => array(),
|
10407 |
-
'marker-mid' => array(),
|
10408 |
-
'marker-start' => array(),
|
10409 |
-
'mask' => array(),
|
10410 |
-
'opacity' => array(),
|
10411 |
-
'overflow' => array(),
|
10412 |
-
'pointer-events' => array(),
|
10413 |
-
'requiredextensions' => array(),
|
10414 |
-
'requiredfeatures' => array(),
|
10415 |
-
'shape-rendering' => array(),
|
10416 |
-
'stop-color' => array(),
|
10417 |
-
'stop-opacity' => array(),
|
10418 |
-
'stroke' => array(),
|
10419 |
-
'stroke-dasharray' => array(),
|
10420 |
-
'stroke-dashoffset' => array(),
|
10421 |
-
'stroke-linecap' => array(),
|
10422 |
-
'stroke-linejoin' => array(),
|
10423 |
-
'stroke-miterlimit' => array(),
|
10424 |
-
'stroke-opacity' => array(),
|
10425 |
-
'stroke-width' => array(),
|
10426 |
-
'style' => array(
|
10427 |
-
'blacklisted_value_regex' => '!important',
|
10428 |
-
),
|
10429 |
-
'systemlanguage' => array(),
|
10430 |
-
'text-anchor' => array(),
|
10431 |
-
'text-decoration' => array(),
|
10432 |
-
'text-rendering' => array(),
|
10433 |
-
'transform' => array(),
|
10434 |
-
'unicode-bidi' => array(),
|
10435 |
-
'vector-effect' => array(),
|
10436 |
-
'visibility' => array(),
|
10437 |
-
'width' => array(),
|
10438 |
-
'word-spacing' => array(),
|
10439 |
-
'writing-mode' => array(),
|
10440 |
-
'x' => array(),
|
10441 |
-
'xlink:actuate' => array(),
|
10442 |
-
'xlink:arcrole' => array(),
|
10443 |
-
'xlink:href' => array(
|
10444 |
-
'alternative_names' => array(
|
10445 |
-
'href',
|
10446 |
-
),
|
10447 |
-
'value_url' => array(
|
10448 |
-
'allow_empty' => false,
|
10449 |
-
'allow_relative' => true,
|
10450 |
-
'allowed_protocol' => array(
|
10451 |
-
'http',
|
10452 |
-
'https',
|
10453 |
-
),
|
10454 |
-
),
|
10455 |
-
),
|
10456 |
-
'xlink:role' => array(),
|
10457 |
-
'xlink:show' => array(),
|
10458 |
-
'xlink:title' => array(),
|
10459 |
-
'xlink:type' => array(),
|
10460 |
-
'xml:lang' => array(),
|
10461 |
-
'xml:space' => array(),
|
10462 |
-
'xmlns' => array(),
|
10463 |
-
'xmlns:xlink' => array(),
|
10464 |
-
'y' => array(),
|
10465 |
-
),
|
10466 |
-
'tag_spec' => array(
|
10467 |
-
'mandatory_ancestor' => 'svg',
|
10468 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
10469 |
-
),
|
10470 |
-
),
|
10471 |
-
),
|
10472 |
-
'var' => array(
|
10473 |
-
array(
|
10474 |
-
'attr_spec_list' => array(),
|
10475 |
-
'tag_spec' => array(),
|
10476 |
-
),
|
10477 |
-
),
|
10478 |
-
'video' => array(
|
10479 |
-
array(
|
10480 |
-
'attr_spec_list' => array(
|
10481 |
-
'autoplay' => array(),
|
10482 |
-
'controls' => array(),
|
10483 |
-
'height' => array(),
|
10484 |
-
'loop' => array(),
|
10485 |
-
'muted' => array(),
|
10486 |
-
'playsinline' => array(),
|
10487 |
-
'poster' => array(),
|
10488 |
-
'preload' => array(),
|
10489 |
-
'src' => array(
|
10490 |
-
'blacklisted_value_regex' => '__amp_source_origin',
|
10491 |
-
'value_url' => array(
|
10492 |
-
'allow_relative' => false,
|
10493 |
-
'allowed_protocol' => array(
|
10494 |
-
'data',
|
10495 |
-
'https',
|
10496 |
-
),
|
10497 |
-
),
|
10498 |
-
),
|
10499 |
-
'width' => array(),
|
10500 |
-
),
|
10501 |
-
'tag_spec' => array(
|
10502 |
-
'mandatory_ancestor' => 'noscript',
|
10503 |
-
'mandatory_ancestor_suggested_alternative' => 'amp-video',
|
10504 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-video',
|
10505 |
-
),
|
10506 |
-
),
|
10507 |
-
),
|
10508 |
-
'view' => array(
|
10509 |
-
array(
|
10510 |
-
'attr_spec_list' => array(
|
10511 |
-
'externalresourcesrequired' => array(),
|
10512 |
-
'preserveaspectratio' => array(),
|
10513 |
-
'style' => array(
|
10514 |
-
'blacklisted_value_regex' => '!important',
|
10515 |
-
),
|
10516 |
-
'viewbox' => array(),
|
10517 |
-
'viewtarget' => array(),
|
10518 |
-
'xml:lang' => array(),
|
10519 |
-
'xml:space' => array(),
|
10520 |
-
'xmlns' => array(),
|
10521 |
-
'xmlns:xlink' => array(),
|
10522 |
-
'zoomandpan' => array(),
|
10523 |
-
),
|
10524 |
-
'tag_spec' => array(
|
10525 |
-
'mandatory_ancestor' => 'svg',
|
10526 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
10527 |
-
),
|
10528 |
-
),
|
10529 |
-
),
|
10530 |
-
'vkern' => array(
|
10531 |
-
array(
|
10532 |
-
'attr_spec_list' => array(
|
10533 |
-
'g1' => array(),
|
10534 |
-
'g2' => array(),
|
10535 |
-
'k' => array(),
|
10536 |
-
'style' => array(
|
10537 |
-
'blacklisted_value_regex' => '!important',
|
10538 |
-
),
|
10539 |
-
'u1' => array(),
|
10540 |
-
'u2' => array(),
|
10541 |
-
'xml:lang' => array(),
|
10542 |
-
'xml:space' => array(),
|
10543 |
-
'xmlns' => array(),
|
10544 |
-
'xmlns:xlink' => array(),
|
10545 |
-
),
|
10546 |
-
'tag_spec' => array(
|
10547 |
-
'mandatory_ancestor' => 'svg',
|
10548 |
-
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#svg',
|
10549 |
-
),
|
10550 |
-
),
|
10551 |
-
),
|
10552 |
-
'wbr' => array(
|
10553 |
-
array(
|
10554 |
-
'attr_spec_list' => array(),
|
10555 |
-
'tag_spec' => array(),
|
10556 |
-
),
|
10557 |
-
),
|
10558 |
-
'xmp' => array(
|
10559 |
-
array(
|
10560 |
-
'attr_spec_list' => array(),
|
10561 |
-
'tag_spec' => array(),
|
10562 |
-
),
|
10563 |
-
),
|
10564 |
-
);
|
10565 |
-
|
10566 |
-
private static $layout_allowed_attrs = array(
|
10567 |
-
'[height]' => array(),
|
10568 |
-
'[width]' => array(),
|
10569 |
-
'height' => array(),
|
10570 |
-
'heights' => array(),
|
10571 |
-
'layout' => array(),
|
10572 |
-
'sizes' => array(),
|
10573 |
-
'width' => array(),
|
10574 |
-
);
|
10575 |
-
|
10576 |
-
|
10577 |
-
private static $globally_allowed_attrs = array(
|
10578 |
-
'[aria-activedescendant]' => array(),
|
10579 |
-
'[aria-atomic]' => array(),
|
10580 |
-
'[aria-autocomplete]' => array(),
|
10581 |
-
'[aria-busy]' => array(),
|
10582 |
-
'[aria-checked]' => array(),
|
10583 |
-
'[aria-controls]' => array(),
|
10584 |
-
'[aria-describedby]' => array(),
|
10585 |
-
'[aria-disabled]' => array(),
|
10586 |
-
'[aria-dropeffect]' => array(),
|
10587 |
-
'[aria-expanded]' => array(),
|
10588 |
-
'[aria-flowto]' => array(),
|
10589 |
-
'[aria-grabbed]' => array(),
|
10590 |
-
'[aria-haspopup]' => array(),
|
10591 |
-
'[aria-hidden]' => array(),
|
10592 |
-
'[aria-invalid]' => array(),
|
10593 |
-
'[aria-label]' => array(),
|
10594 |
-
'[aria-labelledby]' => array(),
|
10595 |
-
'[aria-level]' => array(),
|
10596 |
-
'[aria-live]' => array(),
|
10597 |
-
'[aria-multiline]' => array(),
|
10598 |
-
'[aria-multiselectable]' => array(),
|
10599 |
-
'[aria-orientation]' => array(),
|
10600 |
-
'[aria-owns]' => array(),
|
10601 |
-
'[aria-posinset]' => array(),
|
10602 |
-
'[aria-pressed]' => array(),
|
10603 |
-
'[aria-readonly]' => array(),
|
10604 |
-
'[aria-relevant]' => array(),
|
10605 |
-
'[aria-required]' => array(),
|
10606 |
-
'[aria-selected]' => array(),
|
10607 |
-
'[aria-setsize]' => array(),
|
10608 |
-
'[aria-sort]' => array(),
|
10609 |
-
'[aria-valuemax]' => array(),
|
10610 |
-
'[aria-valuemin]' => array(),
|
10611 |
-
'[aria-valuenow]' => array(),
|
10612 |
-
'[aria-valuetext]' => array(),
|
10613 |
-
'[class]' => array(),
|
10614 |
-
'[hidden]' => array(),
|
10615 |
-
'[text]' => array(),
|
10616 |
-
'about' => array(),
|
10617 |
-
'accesskey' => array(),
|
10618 |
-
'amp-access' => array(),
|
10619 |
-
'amp-access-behavior' => array(),
|
10620 |
-
'amp-access-hide' => array(),
|
10621 |
-
'amp-access-id' => array(),
|
10622 |
-
'amp-access-loader' => array(),
|
10623 |
-
'amp-access-loading' => array(),
|
10624 |
-
'amp-access-off' => array(),
|
10625 |
-
'amp-access-on' => array(),
|
10626 |
-
'amp-access-show' => array(),
|
10627 |
-
'amp-access-style' => array(),
|
10628 |
-
'amp-access-template' => array(),
|
10629 |
-
'amp-fx' => array(
|
10630 |
-
'value_casei' => 'parallax',
|
10631 |
-
),
|
10632 |
-
'aria-activedescendant' => array(),
|
10633 |
-
'aria-atomic' => array(),
|
10634 |
-
'aria-autocomplete' => array(),
|
10635 |
-
'aria-busy' => array(),
|
10636 |
-
'aria-checked' => array(),
|
10637 |
-
'aria-controls' => array(),
|
10638 |
-
'aria-current' => array(),
|
10639 |
-
'aria-describedby' => array(),
|
10640 |
-
'aria-disabled' => array(),
|
10641 |
-
'aria-dropeffect' => array(),
|
10642 |
-
'aria-expanded' => array(),
|
10643 |
-
'aria-flowto' => array(),
|
10644 |
-
'aria-grabbed' => array(),
|
10645 |
-
'aria-haspopup' => array(),
|
10646 |
-
'aria-hidden' => array(),
|
10647 |
-
'aria-invalid' => array(),
|
10648 |
-
'aria-label' => array(),
|
10649 |
-
'aria-labelledby' => array(),
|
10650 |
-
'aria-level' => array(),
|
10651 |
-
'aria-live' => array(),
|
10652 |
-
'aria-multiline' => array(),
|
10653 |
-
'aria-multiselectable' => array(),
|
10654 |
-
'aria-orientation' => array(),
|
10655 |
-
'aria-owns' => array(),
|
10656 |
-
'aria-posinset' => array(),
|
10657 |
-
'aria-pressed' => array(),
|
10658 |
-
'aria-readonly' => array(),
|
10659 |
-
'aria-relevant' => array(),
|
10660 |
-
'aria-required' => array(),
|
10661 |
-
'aria-selected' => array(),
|
10662 |
-
'aria-setsize' => array(),
|
10663 |
-
'aria-sort' => array(),
|
10664 |
-
'aria-valuemax' => array(),
|
10665 |
-
'aria-valuemin' => array(),
|
10666 |
-
'aria-valuenow' => array(),
|
10667 |
-
'aria-valuetext' => array(),
|
10668 |
-
'class' => array(
|
10669 |
-
'blacklisted_value_regex' => '(^|\\W)i-amphtml-',
|
10670 |
-
),
|
10671 |
-
'content' => array(),
|
10672 |
-
'datatype' => array(),
|
10673 |
-
'dir' => array(),
|
10674 |
-
'draggable' => array(),
|
10675 |
-
'fallback' => array(
|
10676 |
-
'value' => '',
|
10677 |
-
),
|
10678 |
-
'hidden' => array(
|
10679 |
-
'value' => '',
|
10680 |
-
),
|
10681 |
-
'i-amp-access-id' => array(),
|
10682 |
-
'id' => array(
|
10683 |
-
'blacklisted_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|$)',
|
10684 |
-
),
|
10685 |
-
'inlist' => array(),
|
10686 |
-
'itemid' => array(),
|
10687 |
-
'itemprop' => array(),
|
10688 |
-
'itemref' => array(),
|
10689 |
-
'itemscope' => array(),
|
10690 |
-
'itemtype' => array(),
|
10691 |
-
'lang' => array(),
|
10692 |
-
'lightbox' => array(),
|
10693 |
-
'on' => array(),
|
10694 |
-
'overflow' => array(),
|
10695 |
-
'placeholder' => array(
|
10696 |
-
'value' => '',
|
10697 |
-
),
|
10698 |
-
'prefix' => array(),
|
10699 |
-
'property' => array(),
|
10700 |
-
'rel' => array(
|
10701 |
-
'blacklisted_value_regex' => '(^|\\s)(canonical|components|dns-prefetch|import|manifest|preconnect|preload|prerender|serviceworker|stylesheet|subresource)(\\s|$)',
|
10702 |
-
),
|
10703 |
-
'resource' => array(),
|
10704 |
-
'rev' => array(),
|
10705 |
-
'role' => array(),
|
10706 |
-
'subscriptions-action' => array(),
|
10707 |
-
'subscriptions-actions' => array(
|
10708 |
-
'value' => '',
|
10709 |
-
),
|
10710 |
-
'subscriptions-dialog' => array(
|
10711 |
-
'value' => '',
|
10712 |
-
),
|
10713 |
-
'subscriptions-display' => array(),
|
10714 |
-
'subscriptions-section' => array(
|
10715 |
-
'value_regex_casei' => '(actions|content|content-not-granted)',
|
10716 |
-
),
|
10717 |
-
'subscriptions-service' => array(),
|
10718 |
-
'tabindex' => array(),
|
10719 |
-
'title' => array(),
|
10720 |
-
'translate' => array(),
|
10721 |
-
'typeof' => array(),
|
10722 |
-
'validation-for' => array(),
|
10723 |
-
'visible-when-invalid' => array(
|
10724 |
-
'value_regex' => '(badInput|customError|patternMismatch|rangeOverflow|rangeUnderflow|stepMismatch|tooLong|typeMismatch|valueMissing)',
|
10725 |
-
),
|
10726 |
-
'vocab' => array(),
|
10727 |
-
);
|
10728 |
-
|
10729 |
-
|
10730 |
-
/**
|
10731 |
-
* Get allowed tags.
|
10732 |
-
*
|
10733 |
-
* @since 0.5
|
10734 |
-
* @return array Allowed tags.
|
10735 |
-
*/
|
10736 |
-
public static function get_allowed_tags() {
|
10737 |
-
return self::$allowed_tags;
|
10738 |
-
}
|
10739 |
-
|
10740 |
-
/**
|
10741 |
-
* Get allowed tag.
|
10742 |
-
*
|
10743 |
-
* Get the rules for a single tag so that the entire data structure needn't be passed around.
|
10744 |
-
*
|
10745 |
-
* @since 0.7
|
10746 |
-
* @param string $node_name Tag name.
|
10747 |
-
* @return array|null Allowed tag, or null if the tag does not exist.
|
10748 |
-
*/
|
10749 |
-
public static function get_allowed_tag( $node_name ) {
|
10750 |
-
if ( isset( self::$allowed_tags[ $node_name ] ) ) {
|
10751 |
-
return self::$allowed_tags[ $node_name ];
|
10752 |
-
}
|
10753 |
-
return null;
|
10754 |
-
}
|
10755 |
-
|
10756 |
-
/**
|
10757 |
-
* Get list of globally-allowed attributes.
|
10758 |
-
*
|
10759 |
-
* @since 0.5
|
10760 |
-
* @return array Allowed tag.
|
10761 |
-
*/
|
10762 |
-
public static function get_allowed_attributes() {
|
10763 |
-
return self::$globally_allowed_attrs;
|
10764 |
-
}
|
10765 |
-
|
10766 |
-
/**
|
10767 |
-
* Get layout attributes.
|
10768 |
-
*
|
10769 |
-
* @since 0.5
|
10770 |
-
* @return array Allowed tag.
|
10771 |
-
*/
|
10772 |
-
public static function get_layout_attributes() {
|
10773 |
-
return self::$layout_allowed_attrs;
|
10774 |
-
}
|
10775 |
-
|
10776 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/vendor/amp/includes/sanitizers/class-amp-base-sanitizer.php
CHANGED
@@ -121,69 +121,4 @@ abstract class AMP_Base_Sanitizer {
|
|
121 |
|
122 |
return $src;
|
123 |
}
|
124 |
-
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Removes an invalid child of a node.
|
128 |
-
*
|
129 |
-
* Also, calls the mutation callback for it.
|
130 |
-
* This tracks all the nodes that were removed.
|
131 |
-
*
|
132 |
-
* @since 0.7
|
133 |
-
*
|
134 |
-
* @param DOMNode|DOMElement $node The node to remove.
|
135 |
-
* @param array $args Additional args to pass to validation error callback.
|
136 |
-
*
|
137 |
-
* @return void
|
138 |
-
*/
|
139 |
-
public function remove_invalid_child( $node, $args = array() ) {
|
140 |
-
if ( isset( $this->args['validation_error_callback'] ) ) {
|
141 |
-
call_user_func( $this->args['validation_error_callback'],
|
142 |
-
array_merge( compact( 'node' ), $args )
|
143 |
-
);
|
144 |
-
}
|
145 |
-
if ( empty( $this->args['disable_invalid_removal'] ) ) {
|
146 |
-
$node->parentNode->removeChild( $node );
|
147 |
-
}
|
148 |
-
}
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Removes an invalid attribute of a node.
|
152 |
-
*
|
153 |
-
* Also, calls the mutation callback for it.
|
154 |
-
* This tracks all the attributes that were removed.
|
155 |
-
*
|
156 |
-
* @since 0.7
|
157 |
-
*
|
158 |
-
* @param DOMElement $element The node for which to remove the attribute.
|
159 |
-
* @param DOMAttr|string $attribute The attribute to remove from the element.
|
160 |
-
* @param array $args Additional args to pass to validation error callback.
|
161 |
-
* @return void
|
162 |
-
*/
|
163 |
-
public function remove_invalid_attribute( $element, $attribute, $args = array() ) {
|
164 |
-
if ( isset( $this->args['validation_error_callback'] ) ) {
|
165 |
-
if ( is_string( $attribute ) ) {
|
166 |
-
$attribute = $element->getAttributeNode( $attribute );
|
167 |
-
}
|
168 |
-
if ( $attribute ) {
|
169 |
-
call_user_func( $this->args['validation_error_callback'],
|
170 |
-
array_merge(
|
171 |
-
array(
|
172 |
-
'node' => $attribute,
|
173 |
-
),
|
174 |
-
$args
|
175 |
-
)
|
176 |
-
);
|
177 |
-
if ( empty( $this->args['disable_invalid_removal'] ) ) {
|
178 |
-
$element->removeAttributeNode( $attribute );
|
179 |
-
}
|
180 |
-
}
|
181 |
-
} elseif ( empty( $this->args['disable_invalid_removal'] ) ) {
|
182 |
-
if ( is_string( $attribute ) ) {
|
183 |
-
$element->removeAttribute( $attribute );
|
184 |
-
} else {
|
185 |
-
$element->removeAttributeNode( $attribute );
|
186 |
-
}
|
187 |
-
}
|
188 |
-
}
|
189 |
}
|
121 |
|
122 |
return $src;
|
123 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php
CHANGED
@@ -34,11 +34,6 @@ class AMP_Blacklist_Sanitizer extends AMP_Base_Sanitizer {
|
|
34 |
|
35 |
$node_name = $node->nodeName;
|
36 |
|
37 |
-
if($node->nodeName=='a' ){
|
38 |
-
$href = $node->getAttribute('href');
|
39 |
-
$node->setAttribute('href',ampforwp_findInternalUrl($href));
|
40 |
-
}
|
41 |
-
|
42 |
// Some nodes may contain valid content but are themselves invalid.
|
43 |
// Remove the node but preserve the children.
|
44 |
if ( 'font' === $node_name ) {
|
34 |
|
35 |
$node_name = $node->nodeName;
|
36 |
|
|
|
|
|
|
|
|
|
|
|
37 |
// Some nodes may contain valid content but are themselves invalid.
|
38 |
// Remove the node but preserve the children.
|
39 |
if ( 'font' === $node_name ) {
|
includes/vendor/amp/includes/sanitizers/class-amp-iframe-sanitizer.php
CHANGED
@@ -120,7 +120,9 @@ class AMP_Iframe_Sanitizer extends AMP_Base_Sanitizer {
|
|
120 |
$out['sandbox'] = self::SANDBOX_DEFAULTS;
|
121 |
}
|
122 |
|
123 |
-
|
|
|
|
|
124 |
|
125 |
return $out;
|
126 |
}
|
120 |
$out['sandbox'] = self::SANDBOX_DEFAULTS;
|
121 |
}
|
122 |
|
123 |
+
if ( ! isset( $out['data-block-on-consent'] ) ) {
|
124 |
+
$out['data-block-on-consent'] = '';
|
125 |
+
}
|
126 |
|
127 |
return $out;
|
128 |
}
|
includes/vendor/amp/includes/sanitizers/class-amp-playbuzz-sanitizer.php
CHANGED
@@ -106,7 +106,9 @@ class AMP_Playbuzz_Sanitizer extends AMP_Base_Sanitizer {
|
|
106 |
|
107 |
$out['height'] = self::$height;
|
108 |
|
109 |
-
|
|
|
|
|
110 |
|
111 |
return $out;
|
112 |
}
|
106 |
|
107 |
$out['height'] = self::$height;
|
108 |
|
109 |
+
if ( ! isset( $out['data-block-on-consent'] ) ) {
|
110 |
+
$out['data-block-on-consent'] = '';
|
111 |
+
}
|
112 |
|
113 |
return $out;
|
114 |
}
|
includes/vendor/amp/includes/sanitizers/class-amp-rule-spec.php
DELETED
@@ -1,154 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class AMP_Rule_Spec
|
4 |
-
*
|
5 |
-
* @package AMP
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class AMP_Rule_Spec
|
10 |
-
*
|
11 |
-
* Set of constants used throughout the sanitizer.
|
12 |
-
*/
|
13 |
-
abstract class AMP_Rule_Spec {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* AMP rule_spec types
|
17 |
-
*/
|
18 |
-
const ATTR_SPEC_LIST = 'attr_spec_list';
|
19 |
-
const TAG_SPEC = 'tag_spec';
|
20 |
-
const CDATA = 'cdata';
|
21 |
-
|
22 |
-
/**
|
23 |
-
* AMP attr_spec value check results.
|
24 |
-
*
|
25 |
-
* In 0.7 these changed from strings to integers to speed up comparisons.
|
26 |
-
*/
|
27 |
-
const PASS = 1;
|
28 |
-
const FAIL = 0;
|
29 |
-
const NOT_APPLICABLE = -1;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* HTML Element Tag rule names
|
33 |
-
*/
|
34 |
-
const DISALLOWED_ANCESTOR = 'disallowed_ancestor';
|
35 |
-
const MANDATORY_ANCESTOR = 'mandatory_ancestor';
|
36 |
-
const MANDATORY_PARENT = 'mandatory_parent';
|
37 |
-
|
38 |
-
/**
|
39 |
-
* HTML Element Attribute rule names
|
40 |
-
*/
|
41 |
-
const ALLOW_EMPTY = 'allow_empty';
|
42 |
-
const ALLOW_RELATIVE = 'allow_relative';
|
43 |
-
const ALLOWED_PROTOCOL = 'allowed_protocol';
|
44 |
-
const ALTERNATIVE_NAMES = 'alternative_names';
|
45 |
-
const BLACKLISTED_VALUE_REGEX = 'blacklisted_value_regex';
|
46 |
-
const DISALLOWED_DOMAIN = 'disallowed_domain';
|
47 |
-
const MANDATORY = 'mandatory';
|
48 |
-
const VALUE = 'value';
|
49 |
-
const VALUE_CASEI = 'value_casei';
|
50 |
-
const VALUE_REGEX = 'value_regex';
|
51 |
-
const VALUE_REGEX_CASEI = 'value_regex_casei';
|
52 |
-
const VALUE_PROPERTIES = 'value_properties';
|
53 |
-
const VALUE_URL = 'value_url';
|
54 |
-
|
55 |
-
/**
|
56 |
-
* If a node type listed here is invalid, it and it's subtree will be
|
57 |
-
* removed if it is invalid. This is mainly because any children will be
|
58 |
-
* non-functional without this parent.
|
59 |
-
*
|
60 |
-
* If a tag is not listed here, it will be replaced by its children if it
|
61 |
-
* is invalid.
|
62 |
-
*
|
63 |
-
* @todo There are other nodes that should probably be listed here as well.
|
64 |
-
*
|
65 |
-
* @var array
|
66 |
-
*/
|
67 |
-
public static $node_types_to_remove_if_invalid = array(
|
68 |
-
'form',
|
69 |
-
'input',
|
70 |
-
'link',
|
71 |
-
'meta',
|
72 |
-
'style',
|
73 |
-
// Include 'script' here?
|
74 |
-
);
|
75 |
-
|
76 |
-
/**
|
77 |
-
* It is mentioned in the documentation in several places that data-*
|
78 |
-
* is generally allowed, but there is no specific rule for it in the
|
79 |
-
* protoascii file, so we include it here.
|
80 |
-
*
|
81 |
-
* @var array
|
82 |
-
*/
|
83 |
-
public static $whitelisted_attr_regex = array(
|
84 |
-
'@^data-[a-zA-Z][\\w:.-]*$@uis',
|
85 |
-
'(update|item|pagination|option|selected|disabled)', // Allowed for live reference points.
|
86 |
-
);
|
87 |
-
|
88 |
-
/**
|
89 |
-
* List of boolean attributes.
|
90 |
-
*
|
91 |
-
* @since 0.7
|
92 |
-
* @var array
|
93 |
-
*/
|
94 |
-
public static $boolean_attributes = array(
|
95 |
-
'allowfullscreen',
|
96 |
-
'async',
|
97 |
-
'autofocus',
|
98 |
-
'autoplay',
|
99 |
-
'checked',
|
100 |
-
'compact',
|
101 |
-
'controls',
|
102 |
-
'declare',
|
103 |
-
'default',
|
104 |
-
'defaultchecked',
|
105 |
-
'defaultmuted',
|
106 |
-
'defaultselected',
|
107 |
-
'defer',
|
108 |
-
'disabled',
|
109 |
-
'draggable',
|
110 |
-
'enabled',
|
111 |
-
'formnovalidate',
|
112 |
-
'hidden',
|
113 |
-
'indeterminate',
|
114 |
-
'inert',
|
115 |
-
'ismap',
|
116 |
-
'itemscope',
|
117 |
-
'loop',
|
118 |
-
'multiple',
|
119 |
-
'muted',
|
120 |
-
'nohref',
|
121 |
-
'noresize',
|
122 |
-
'noshade',
|
123 |
-
'novalidate',
|
124 |
-
'nowrap',
|
125 |
-
'open',
|
126 |
-
'pauseonexit',
|
127 |
-
'readonly',
|
128 |
-
'required',
|
129 |
-
'reversed',
|
130 |
-
'scoped',
|
131 |
-
'seamless',
|
132 |
-
'selected',
|
133 |
-
'sortable',
|
134 |
-
'spellcheck',
|
135 |
-
'translate',
|
136 |
-
'truespeed',
|
137 |
-
'typemustmatch',
|
138 |
-
'visible',
|
139 |
-
);
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Additional allowed tags.
|
143 |
-
*
|
144 |
-
* @var array
|
145 |
-
*/
|
146 |
-
public static $additional_allowed_tags = array(
|
147 |
-
|
148 |
-
// An experimental tag with no protoascii.
|
149 |
-
'amp-share-tracking' => array(
|
150 |
-
'attr_spec_list' => array(),
|
151 |
-
'tag_spec' => array(),
|
152 |
-
),
|
153 |
-
);
|
154 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php
DELETED
@@ -1,1643 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class AMP_Tag_And_Attribute_Sanitizer
|
4 |
-
*
|
5 |
-
* @package AMP
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Strips the tags and attributes from the content that are not allowed by the AMP spec.
|
10 |
-
*
|
11 |
-
* Allowed tags array is generated from this protocol buffer:
|
12 |
-
*
|
13 |
-
* https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii
|
14 |
-
* by the python script in amp-wp/bin/amp_wp_build.py. See the comment at the top
|
15 |
-
* of that file for instructions to generate class-amp-allowed-tags-generated.php.
|
16 |
-
*
|
17 |
-
* @todo Need to check the following items that are not yet checked by this sanitizer:
|
18 |
-
*
|
19 |
-
* - `also_requires_attr` - if one attribute is present, this requires another.
|
20 |
-
* - `ChildTagSpec` - Places restrictions on the number and type of child tags.
|
21 |
-
* - `if_value_regex` - if one attribute value matches, this places a restriction
|
22 |
-
* on another attribute/value.
|
23 |
-
* - `mandatory_oneof` - Within the context of the tag, exactly one of the attributes
|
24 |
-
* must be present.
|
25 |
-
*/
|
26 |
-
class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Allowed tags.
|
30 |
-
*
|
31 |
-
* @since 0.5
|
32 |
-
*
|
33 |
-
* @var string[]
|
34 |
-
*/
|
35 |
-
protected $allowed_tags;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Globally-allowed attributes.
|
39 |
-
*
|
40 |
-
* @since 0.5
|
41 |
-
*
|
42 |
-
* @var array[][]
|
43 |
-
*/
|
44 |
-
protected $globally_allowed_attributes;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Layout-allowed attributes.
|
48 |
-
*
|
49 |
-
* @since 0.5
|
50 |
-
*
|
51 |
-
* @var string[]
|
52 |
-
*/
|
53 |
-
protected $layout_allowed_attributes;
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Mapping of alternative names back to their primary names.
|
57 |
-
*
|
58 |
-
* @since 0.7
|
59 |
-
* @var array
|
60 |
-
*/
|
61 |
-
protected $rev_alternate_attr_name_lookup = array();
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Stack.
|
65 |
-
*
|
66 |
-
* @since 0.5
|
67 |
-
*
|
68 |
-
* @var DOMElement[]
|
69 |
-
*/
|
70 |
-
private $stack = array();
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Default args.
|
74 |
-
*
|
75 |
-
* @since 0.5
|
76 |
-
*
|
77 |
-
* @var array
|
78 |
-
*/
|
79 |
-
protected $DEFAULT_ARGS = array();
|
80 |
-
|
81 |
-
/**
|
82 |
-
* AMP script components that are discovered being required through sanitization.
|
83 |
-
*
|
84 |
-
* @var string[]
|
85 |
-
*/
|
86 |
-
protected $script_components = array();
|
87 |
-
|
88 |
-
/**
|
89 |
-
* AMP_Tag_And_Attribute_Sanitizer constructor.
|
90 |
-
*
|
91 |
-
* @since 0.5
|
92 |
-
*
|
93 |
-
* @param DOMDocument $dom DOM.
|
94 |
-
* @param array $args Args.
|
95 |
-
*/
|
96 |
-
public function __construct( $dom, $args = array() ) {
|
97 |
-
$this->DEFAULT_ARGS = array(
|
98 |
-
'amp_allowed_tags' => AMP_Allowed_Tags_Generated::get_allowed_tags(),
|
99 |
-
'amp_globally_allowed_attributes' => AMP_Allowed_Tags_Generated::get_allowed_attributes(),
|
100 |
-
'amp_layout_allowed_attributes' => AMP_Allowed_Tags_Generated::get_layout_attributes(),
|
101 |
-
'amp_bind_placeholder_prefix' => AMP_DOM_Utils::get_amp_bind_placeholder_prefix(),
|
102 |
-
);
|
103 |
-
|
104 |
-
parent::__construct( $dom, $args );
|
105 |
-
|
106 |
-
if ( ! empty( $this->args['allow_dirty_styles'] ) ) {
|
107 |
-
|
108 |
-
// Allow style attribute on all elements.
|
109 |
-
$this->args['amp_globally_allowed_attributes']['style'] = array();
|
110 |
-
|
111 |
-
// Allow style elements.
|
112 |
-
$this->args['amp_allowed_tags']['style'][] = array(
|
113 |
-
'attr_spec_list' => array(
|
114 |
-
'type' => array(
|
115 |
-
'value_casei' => 'text/css',
|
116 |
-
),
|
117 |
-
),
|
118 |
-
'cdata' => array(),
|
119 |
-
'tag_spec' => array(
|
120 |
-
'spec_name' => 'style for Customizer preview',
|
121 |
-
),
|
122 |
-
);
|
123 |
-
|
124 |
-
// Allow stylesheet links.
|
125 |
-
$this->args['amp_allowed_tags']['link'][] = array(
|
126 |
-
'attr_spec_list' => array(
|
127 |
-
'async' => array(),
|
128 |
-
'crossorigin' => array(),
|
129 |
-
'href' => array(
|
130 |
-
'mandatory' => true,
|
131 |
-
),
|
132 |
-
'integrity' => array(),
|
133 |
-
'media' => array(),
|
134 |
-
'rel' => array(
|
135 |
-
'dispatch_key' => 2,
|
136 |
-
'mandatory' => true,
|
137 |
-
'value_casei' => 'stylesheet',
|
138 |
-
),
|
139 |
-
'type' => array(
|
140 |
-
'value_casei' => 'text/css',
|
141 |
-
),
|
142 |
-
),
|
143 |
-
'tag_spec' => array(
|
144 |
-
'spec_name' => 'link rel=stylesheet for Customizer preview', // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
|
145 |
-
),
|
146 |
-
);
|
147 |
-
}
|
148 |
-
|
149 |
-
// Allow scripts if requested.
|
150 |
-
if ( ! empty( $this->args['allow_dirty_scripts'] ) ) {
|
151 |
-
$this->args['amp_allowed_tags']['script'][] = array(
|
152 |
-
'attr_spec_list' => array(
|
153 |
-
'type' => array(),
|
154 |
-
'src' => array(),
|
155 |
-
'async' => array(),
|
156 |
-
'defer' => array(),
|
157 |
-
),
|
158 |
-
'cdata' => array(),
|
159 |
-
'tag_spec' => array(
|
160 |
-
'spec_name' => 'scripts for Customizer preview',
|
161 |
-
),
|
162 |
-
);
|
163 |
-
}
|
164 |
-
|
165 |
-
// Prepare whitelists.
|
166 |
-
$this->allowed_tags = $this->args['amp_allowed_tags'];
|
167 |
-
foreach ( AMP_Rule_Spec::$additional_allowed_tags as $tag_name => $tag_rule_spec ) {
|
168 |
-
$this->allowed_tags[ $tag_name ][] = $tag_rule_spec;
|
169 |
-
}
|
170 |
-
|
171 |
-
// @todo Do the same for body when !use_document_element?
|
172 |
-
if ( ! empty( $this->args['use_document_element'] ) ) {
|
173 |
-
foreach ( $this->allowed_tags['html'] as &$rule_spec ) {
|
174 |
-
unset( $rule_spec[ AMP_Rule_Spec::TAG_SPEC ][ AMP_Rule_Spec::MANDATORY_PARENT ] );
|
175 |
-
}
|
176 |
-
}
|
177 |
-
|
178 |
-
foreach ( $this->allowed_tags as &$tag_specs ) {
|
179 |
-
foreach ( $tag_specs as &$tag_spec ) {
|
180 |
-
if ( isset( $tag_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ] ) ) {
|
181 |
-
$tag_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ] = $this->process_alternate_names( $tag_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ] );
|
182 |
-
}
|
183 |
-
}
|
184 |
-
}
|
185 |
-
$this->globally_allowed_attributes = $this->process_alternate_names( $this->args['amp_globally_allowed_attributes'] );
|
186 |
-
$this->layout_allowed_attributes = $this->process_alternate_names( $this->args['amp_layout_allowed_attributes'] );
|
187 |
-
}
|
188 |
-
|
189 |
-
/**
|
190 |
-
* Return array of values that would be valid as an HTML `script` element.
|
191 |
-
*
|
192 |
-
* Array keys are AMP element names and array values are their respective
|
193 |
-
* Javascript URLs from https://cdn.ampproject.org
|
194 |
-
*
|
195 |
-
* @since 0.7
|
196 |
-
* @see amp_register_default_scripts()
|
197 |
-
*
|
198 |
-
* @return array() Returns component name as array key and true as value (or JavaScript URL string),
|
199 |
-
* respectively. When true then the default component script URL will be used.
|
200 |
-
* Will return an empty array if sanitization has yet to be run
|
201 |
-
* or if it did not find any HTML elements to convert to AMP equivalents.
|
202 |
-
*/
|
203 |
-
public function get_scripts() {
|
204 |
-
$scriptArray = array_fill_keys( $this->script_components, true );
|
205 |
-
foreach ( $scriptArray as $ext_key=>$ext_value ) {
|
206 |
-
$scriptArray[$ext_key] = sprintf(
|
207 |
-
'https://cdn.ampproject.org/v0/%s-%s.js',
|
208 |
-
$ext_key,
|
209 |
-
'latest'
|
210 |
-
);
|
211 |
-
}
|
212 |
-
if(count($scriptArray)>0){
|
213 |
-
remove_filter('the_content', 'wpautop');
|
214 |
-
}
|
215 |
-
return $scriptArray;
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Process alternative names in attribute spec list.
|
220 |
-
*
|
221 |
-
* @since 0.7
|
222 |
-
*
|
223 |
-
* @param array $attr_spec_list Attribute spec list.
|
224 |
-
* @return array Modified attribute spec list.
|
225 |
-
*/
|
226 |
-
private function process_alternate_names( $attr_spec_list ) {
|
227 |
-
foreach ( $attr_spec_list as $attr_name => &$attr_spec ) {
|
228 |
-
if ( '[' === $attr_name[0] ) {
|
229 |
-
$placeholder_attr_name = $this->args['amp_bind_placeholder_prefix'] . trim( $attr_name, '[]' );
|
230 |
-
if ( ! isset( $attr_spec[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
231 |
-
$attr_spec[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] = array();
|
232 |
-
}
|
233 |
-
$attr_spec[ AMP_Rule_Spec::ALTERNATIVE_NAMES ][] = $placeholder_attr_name;
|
234 |
-
}
|
235 |
-
|
236 |
-
// Save all alternative names in lookup to improve performance.
|
237 |
-
if ( isset( $attr_spec[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
238 |
-
foreach ( $attr_spec[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $alternative_name ) {
|
239 |
-
$this->rev_alternate_attr_name_lookup[ $alternative_name ] = $attr_name;
|
240 |
-
}
|
241 |
-
}
|
242 |
-
}
|
243 |
-
return $attr_spec_list;
|
244 |
-
}
|
245 |
-
|
246 |
-
/**
|
247 |
-
* Sanitize the <video> elements from the HTML contained in this instance's DOMDocument.
|
248 |
-
*
|
249 |
-
* @since 0.5
|
250 |
-
*/
|
251 |
-
public function sanitize() {
|
252 |
-
|
253 |
-
// Add root of content to the stack.
|
254 |
-
$this->stack[] = $this->get_body_node();
|
255 |
-
|
256 |
-
/**
|
257 |
-
* This loop traverses through the DOM tree iteratively.
|
258 |
-
*/
|
259 |
-
while ( ! empty( $this->stack ) ) {
|
260 |
-
|
261 |
-
// Get the next node to process.
|
262 |
-
$node = array_pop( $this->stack );
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Process this node.
|
266 |
-
*/
|
267 |
-
$this->process_node( $node );
|
268 |
-
|
269 |
-
/*
|
270 |
-
* Push child nodes onto the stack, if any exist.
|
271 |
-
* if node was removed, then it's parentNode value is null.
|
272 |
-
*/
|
273 |
-
if ( $node->parentNode ) {
|
274 |
-
$child = $node->firstChild;
|
275 |
-
while ( $child ) {
|
276 |
-
$this->stack[] = $child;
|
277 |
-
$child = $child->nextSibling;
|
278 |
-
}
|
279 |
-
}
|
280 |
-
}
|
281 |
-
}
|
282 |
-
|
283 |
-
/**
|
284 |
-
* Process a node by sanitizing and/or validating it per.
|
285 |
-
*
|
286 |
-
* @param DOMNode $node Node.
|
287 |
-
*/
|
288 |
-
private function process_node( $node ) {
|
289 |
-
|
290 |
-
// Don't process text or comment nodes.
|
291 |
-
if ( XML_TEXT_NODE === $node->nodeType || XML_COMMENT_NODE === $node->nodeType || XML_CDATA_SECTION_NODE === $node->nodeType ) {
|
292 |
-
return;
|
293 |
-
}
|
294 |
-
|
295 |
-
// Remove nodes with tags that have not been whitelisted.
|
296 |
-
if ( ! $this->is_amp_allowed_tag( $node ) ) {
|
297 |
-
|
298 |
-
// If it's not an allowed tag, replace the node with it's children.
|
299 |
-
$this->replace_node_with_children( $node );
|
300 |
-
|
301 |
-
// Return early since this node no longer exists.
|
302 |
-
return;
|
303 |
-
}
|
304 |
-
|
305 |
-
/**
|
306 |
-
* Node is now an element.
|
307 |
-
*
|
308 |
-
* @var DOMElement $node
|
309 |
-
*/
|
310 |
-
|
311 |
-
/*
|
312 |
-
* Compile a list of rule_specs to validate for this node
|
313 |
-
* based on tag name of the node.
|
314 |
-
*/
|
315 |
-
$rule_spec_list_to_validate = array();
|
316 |
-
$rule_spec_list = array();
|
317 |
-
if ( isset( $this->allowed_tags[ $node->nodeName ] ) ) {
|
318 |
-
$rule_spec_list = $this->allowed_tags[ $node->nodeName ];
|
319 |
-
}
|
320 |
-
foreach ( $rule_spec_list as $id => $rule_spec ) {
|
321 |
-
if ( $this->validate_tag_spec_for_node( $node, $rule_spec[ AMP_Rule_Spec::TAG_SPEC ] ) ) {
|
322 |
-
|
323 |
-
// Expand extension_spec into a set of attr_spec_list.
|
324 |
-
if ( isset( $rule_spec[ AMP_Rule_Spec::TAG_SPEC ]['extension_spec'] ) ) {
|
325 |
-
$extension_spec = $rule_spec[ AMP_Rule_Spec::TAG_SPEC ]['extension_spec'];
|
326 |
-
$custom_attr = 'amp-mustache' === $extension_spec['name'] ? 'custom-template' : 'custom-element';
|
327 |
-
|
328 |
-
$rule_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ][ $custom_attr ] = array(
|
329 |
-
AMP_Rule_Spec::VALUE => $extension_spec['name'],
|
330 |
-
AMP_Rule_Spec::MANDATORY => true,
|
331 |
-
);
|
332 |
-
|
333 |
-
$rule_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ]['src'] = array(
|
334 |
-
AMP_Rule_Spec::VALUE_REGEX => implode( '', array(
|
335 |
-
'^',
|
336 |
-
preg_quote( 'https://cdn.ampproject.org/v0/' . $extension_spec['name'] . '-' ),
|
337 |
-
'(' . implode( '|', $extension_spec['allowed_versions'] ) . ')',
|
338 |
-
'\.js$',
|
339 |
-
) ),
|
340 |
-
);
|
341 |
-
}
|
342 |
-
|
343 |
-
$rule_spec_list_to_validate[ $id ] = $rule_spec;
|
344 |
-
}
|
345 |
-
}
|
346 |
-
|
347 |
-
// If no valid rule_specs exist, then remove this node and return.
|
348 |
-
if ( empty( $rule_spec_list_to_validate ) ) {
|
349 |
-
$this->remove_node( $node );
|
350 |
-
return;
|
351 |
-
}
|
352 |
-
|
353 |
-
// The remaining validations all have to do with attributes.
|
354 |
-
$attr_spec_list = array();
|
355 |
-
$tag_spec = array();
|
356 |
-
$cdata = array();
|
357 |
-
|
358 |
-
/*
|
359 |
-
* If we have exactly one rule_spec, use it's attr_spec_list
|
360 |
-
* to validate the node's attributes.
|
361 |
-
*/
|
362 |
-
if ( 1 === count( $rule_spec_list_to_validate ) ) {
|
363 |
-
$rule_spec = array_pop( $rule_spec_list_to_validate );
|
364 |
-
$attr_spec_list = $rule_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ];
|
365 |
-
$tag_spec = $rule_spec[ AMP_Rule_Spec::TAG_SPEC ];
|
366 |
-
if ( isset( $rule_spec[ AMP_Rule_Spec::CDATA ] ) ) {
|
367 |
-
$cdata = $rule_spec[ AMP_Rule_Spec::CDATA ];
|
368 |
-
}
|
369 |
-
} else {
|
370 |
-
/*
|
371 |
-
* If there is more than one valid rule_spec for this node,
|
372 |
-
* then try to deduce which one is intended by inspecting
|
373 |
-
* the node's attributes.
|
374 |
-
*/
|
375 |
-
|
376 |
-
/*
|
377 |
-
* Get a score from each attr_spec_list by seeing how many
|
378 |
-
* attributes and values match the node.
|
379 |
-
*/
|
380 |
-
$attr_spec_scores = array();
|
381 |
-
foreach ( $rule_spec_list_to_validate as $spec_id => $rule_spec ) {
|
382 |
-
$attr_spec_scores[ $spec_id ] = $this->validate_attr_spec_list_for_node( $node, $rule_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ] );
|
383 |
-
}
|
384 |
-
|
385 |
-
// Remove all spec lists that didn't match.
|
386 |
-
$attr_spec_scores = array_filter( $attr_spec_scores );
|
387 |
-
|
388 |
-
// If no attribute spec lists match, then the element must be removed.
|
389 |
-
if ( empty( $attr_spec_scores ) ) {
|
390 |
-
$this->remove_node( $node );
|
391 |
-
return;
|
392 |
-
}
|
393 |
-
|
394 |
-
// Get the key(s) to the highest score(s).
|
395 |
-
$spec_ids_sorted = array_keys( $attr_spec_scores, max( $attr_spec_scores ), true );
|
396 |
-
|
397 |
-
// If there is exactly one attr_spec with a max score, use that one.
|
398 |
-
if ( 1 === count( $spec_ids_sorted ) ) {
|
399 |
-
$attr_spec_list = $rule_spec_list_to_validate[ $spec_ids_sorted[0] ][ AMP_Rule_Spec::ATTR_SPEC_LIST ];
|
400 |
-
$tag_spec = $rule_spec_list_to_validate[ $spec_ids_sorted[0] ][ AMP_Rule_Spec::TAG_SPEC ];
|
401 |
-
if ( isset( $rule_spec_list_to_validate[ $spec_ids_sorted[0] ][ AMP_Rule_Spec::CDATA ] ) ) {
|
402 |
-
$cdata = $rule_spec_list_to_validate[ $spec_ids_sorted[0] ][ AMP_Rule_Spec::CDATA ];
|
403 |
-
}
|
404 |
-
} else {
|
405 |
-
// This should not happen very often, but...
|
406 |
-
// If we're here, then we're not sure which spec should
|
407 |
-
// be used. Let's use the top scoring ones.
|
408 |
-
foreach ( $spec_ids_sorted as $id ) {
|
409 |
-
$spec_list = isset( $rule_spec_list_to_validate[ $id ][ AMP_Rule_Spec::ATTR_SPEC_LIST ] ) ? $rule_spec_list_to_validate[ $id ][ AMP_Rule_Spec::ATTR_SPEC_LIST ] : null;
|
410 |
-
if ( ! $this->is_missing_mandatory_attribute( $spec_list, $node ) ) {
|
411 |
-
$attr_spec_list = array_merge( $attr_spec_list, $spec_list );
|
412 |
-
$tag_spec = array_merge(
|
413 |
-
$tag_spec,
|
414 |
-
$rule_spec_list_to_validate[ $id ][ AMP_Rule_Spec::TAG_SPEC ]
|
415 |
-
);
|
416 |
-
if ( isset( $rule_spec_list_to_validate[ $id ][ AMP_Rule_Spec::CDATA ] ) ) {
|
417 |
-
$cdata = array_merge( $cdata, $rule_spec_list_to_validate[ $id ][ AMP_Rule_Spec::CDATA ] );
|
418 |
-
}
|
419 |
-
}
|
420 |
-
}
|
421 |
-
$first_spec = reset( $rule_spec_list_to_validate );
|
422 |
-
if ( empty( $attr_spec_list ) && isset( $first_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ] ) ) {
|
423 |
-
$attr_spec_list = $first_spec[ AMP_Rule_Spec::ATTR_SPEC_LIST ];
|
424 |
-
}
|
425 |
-
}
|
426 |
-
} // End if().
|
427 |
-
|
428 |
-
if ( ! empty( $attr_spec_list ) && $this->is_missing_mandatory_attribute( $attr_spec_list, $node ) ) {
|
429 |
-
$this->remove_node( $node );
|
430 |
-
return;
|
431 |
-
}
|
432 |
-
|
433 |
-
// Remove element if it has illegal CDATA.
|
434 |
-
if ( ! empty( $cdata ) && $node instanceof DOMElement ) {
|
435 |
-
$validity = $this->validate_cdata_for_node( $node, $cdata );
|
436 |
-
if ( is_wp_error( $validity ) ) {
|
437 |
-
$this->remove_node( $node );
|
438 |
-
return;
|
439 |
-
}
|
440 |
-
}
|
441 |
-
|
442 |
-
$merged_attr_spec_list = array_merge(
|
443 |
-
$this->globally_allowed_attributes,
|
444 |
-
$attr_spec_list
|
445 |
-
);
|
446 |
-
|
447 |
-
// Identify any remaining disallowed attributes.
|
448 |
-
$disallowed_attributes = $this->get_disallowed_attributes_in_node( $node, $merged_attr_spec_list );
|
449 |
-
|
450 |
-
// Identify attribute values that don't conform to the attr_spec.
|
451 |
-
$disallowed_attributes = $this->sanitize_disallowed_attribute_values_in_node( $node, $merged_attr_spec_list, $disallowed_attributes );
|
452 |
-
|
453 |
-
// If $disallowed_attributes is false then the entire element should be removed.
|
454 |
-
if ( false === $disallowed_attributes ) {
|
455 |
-
$this->remove_node( $node );
|
456 |
-
return;
|
457 |
-
}
|
458 |
-
|
459 |
-
// Remove all invalid attributes.
|
460 |
-
foreach ( $disallowed_attributes as $disallowed_attribute ) {
|
461 |
-
$this->remove_invalid_attribute( $node, $disallowed_attribute );
|
462 |
-
}
|
463 |
-
|
464 |
-
// Add required AMP component scripts if the element is still in the document.
|
465 |
-
if ( $node->parentNode ) {
|
466 |
-
if ( ! empty( $tag_spec['also_requires_tag_warning'] ) ) {
|
467 |
-
$this->script_components[] = strtok( $tag_spec['also_requires_tag_warning'][0], ' ' );
|
468 |
-
}
|
469 |
-
if ( ! empty( $tag_spec['requires_extension'] ) ) {
|
470 |
-
$this->script_components = array_merge( $this->script_components, $tag_spec['requires_extension'] );
|
471 |
-
}
|
472 |
-
|
473 |
-
// Check if element needs amp-bind component.
|
474 |
-
if ( $node instanceof DOMElement && ! in_array( 'amp-bind', $this->script_components, true ) ) {
|
475 |
-
foreach ( $node->attributes as $name => $value ) {
|
476 |
-
$is_bind_attribute = (
|
477 |
-
'[' === $name[0]
|
478 |
-
||
|
479 |
-
( isset( $this->rev_alternate_attr_name_lookup[ $name ] ) && '[' === $this->rev_alternate_attr_name_lookup[ $name ][0] )
|
480 |
-
);
|
481 |
-
if ( $is_bind_attribute ) {
|
482 |
-
$this->script_components[] = 'amp-bind';
|
483 |
-
break;
|
484 |
-
}
|
485 |
-
}
|
486 |
-
}
|
487 |
-
}
|
488 |
-
}
|
489 |
-
|
490 |
-
/**
|
491 |
-
* Whether a node is missing a mandatory attribute.
|
492 |
-
*
|
493 |
-
* @param array $attr_spec The attribute specification.
|
494 |
-
* @param DOMElement $node The DOMElement of the node to check.
|
495 |
-
* @return boolean $is_missing boolean Whether a required attribute is missing.
|
496 |
-
*/
|
497 |
-
public function is_missing_mandatory_attribute( $attr_spec, $node ) {
|
498 |
-
if ( ! is_array( $attr_spec ) ) {
|
499 |
-
return false;
|
500 |
-
}
|
501 |
-
foreach ( $attr_spec as $attr_name => $attr_spec_rule_value ) {
|
502 |
-
if ( '\u' === substr( $attr_name, 0, 2 ) ) {
|
503 |
-
$attr_name = html_entity_decode( '&#x' . substr( $attr_name, 2 ) . ';' ); // Probably ⚡.
|
504 |
-
}
|
505 |
-
$is_mandatory = isset( $attr_spec_rule_value[ AMP_Rule_Spec::MANDATORY ] ) ? ( true === $attr_spec_rule_value[ AMP_Rule_Spec::MANDATORY ] ) : false;
|
506 |
-
$attribute_exists = false;
|
507 |
-
if ( method_exists( $node, 'hasAttribute' ) ) {
|
508 |
-
$attribute_exists = $node->hasAttribute( $attr_name );
|
509 |
-
if ( ! $attribute_exists && ! empty( $attr_spec_rule_value[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
510 |
-
foreach ( $attr_spec_rule_value[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $alternative_attr_name ) {
|
511 |
-
if ( $node->hasAttribute( $alternative_attr_name ) ) {
|
512 |
-
$attribute_exists = true;
|
513 |
-
break;
|
514 |
-
}
|
515 |
-
}
|
516 |
-
}
|
517 |
-
}
|
518 |
-
if ( $is_mandatory && ! $attribute_exists ) {
|
519 |
-
return true;
|
520 |
-
}
|
521 |
-
}
|
522 |
-
return false;
|
523 |
-
}
|
524 |
-
|
525 |
-
/**
|
526 |
-
* Validate element for its CDATA.
|
527 |
-
*
|
528 |
-
* @since 0.7
|
529 |
-
*
|
530 |
-
* @param DOMElement $element Element.
|
531 |
-
* @param array $cdata_spec CDATA.
|
532 |
-
* @return true|WP_Error True when valid or error when invalid.
|
533 |
-
*/
|
534 |
-
private function validate_cdata_for_node( $element, $cdata_spec ) {
|
535 |
-
if ( isset( $cdata_spec['blacklisted_cdata_regex'] ) ) {
|
536 |
-
if ( preg_match( '@' . $cdata_spec['blacklisted_cdata_regex']['regex'] . '@u', $element->textContent ) ) {
|
537 |
-
return new WP_Error( $cdata_spec['blacklisted_cdata_regex']['error_message'] );
|
538 |
-
}
|
539 |
-
}
|
540 |
-
return true;
|
541 |
-
}
|
542 |
-
|
543 |
-
/**
|
544 |
-
* Determines is a node is currently valid per its tag specification.
|
545 |
-
*
|
546 |
-
* Checks to see if a node's placement with the DOM is be valid for the
|
547 |
-
* given tag_spec. If there are restrictions placed on the type of node
|
548 |
-
* that can be an immediate parent or an ancestor of this node, then make
|
549 |
-
* sure those restrictions are met.
|
550 |
-
*
|
551 |
-
* @since 0.5
|
552 |
-
*
|
553 |
-
* @param DOMNode $node The node to validate.
|
554 |
-
* @param array $tag_spec The specification.
|
555 |
-
* @return boolean $valid Whether the node's placement is valid.
|
556 |
-
*/
|
557 |
-
private function validate_tag_spec_for_node( $node, $tag_spec ) {
|
558 |
-
|
559 |
-
if ( ! empty( $tag_spec[ AMP_Rule_Spec::MANDATORY_PARENT ] ) && ! $this->has_parent( $node, $tag_spec[ AMP_Rule_Spec::MANDATORY_PARENT ] ) ) {
|
560 |
-
return false;
|
561 |
-
}
|
562 |
-
|
563 |
-
// Extension scripts must be in the head.
|
564 |
-
if ( isset( $tag_spec['extension_spec'] ) && ! $this->has_parent( $node, 'head' ) ) {
|
565 |
-
return false;
|
566 |
-
}
|
567 |
-
|
568 |
-
if ( ! empty( $tag_spec[ AMP_Rule_Spec::DISALLOWED_ANCESTOR ] ) ) {
|
569 |
-
foreach ( $tag_spec[ AMP_Rule_Spec::DISALLOWED_ANCESTOR ] as $disallowed_ancestor_node_name ) {
|
570 |
-
if ( $this->has_ancestor( $node, $disallowed_ancestor_node_name ) ) {
|
571 |
-
return false;
|
572 |
-
}
|
573 |
-
}
|
574 |
-
}
|
575 |
-
|
576 |
-
if ( ! empty( $tag_spec[ AMP_Rule_Spec::MANDATORY_ANCESTOR ] ) && ! $this->has_ancestor( $node, $tag_spec[ AMP_Rule_Spec::MANDATORY_ANCESTOR ] ) ) {
|
577 |
-
return false;
|
578 |
-
}
|
579 |
-
|
580 |
-
return true;
|
581 |
-
}
|
582 |
-
|
583 |
-
/**
|
584 |
-
* Checks to see if a spec is potentially valid.
|
585 |
-
*
|
586 |
-
* Checks the given node based on the attributes present in the node.
|
587 |
-
*
|
588 |
-
* @note This can be a very expensive function. Use it sparingly.
|
589 |
-
*
|
590 |
-
* @param DOMNode $node Node.
|
591 |
-
* @param array[] $attr_spec_list Attribute Spec list.
|
592 |
-
*
|
593 |
-
* @return float Number of times the attribute spec list matched. If there was a mismatch, then 0 is returned. 0.5 is returned if there is an implicit match.
|
594 |
-
*/
|
595 |
-
private function validate_attr_spec_list_for_node( $node, $attr_spec_list ) {
|
596 |
-
/*
|
597 |
-
* If node has no attributes there is no point in continuing, but if none of attributes
|
598 |
-
* in the spec list are mandatory, then we give this a score.
|
599 |
-
*/
|
600 |
-
if ( ! $node->hasAttributes() ) {
|
601 |
-
foreach ( $attr_spec_list as $attr_name => $attr_spec_rule ) {
|
602 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::MANDATORY ] ) ) {
|
603 |
-
return 0;
|
604 |
-
}
|
605 |
-
}
|
606 |
-
return 0.5;
|
607 |
-
}
|
608 |
-
|
609 |
-
if ( ! $node instanceof DOMElement ) {
|
610 |
-
/*
|
611 |
-
* A DOMNode is not valid for checks so might
|
612 |
-
* as well bail here is not an DOMElement.
|
613 |
-
*/
|
614 |
-
return 0;
|
615 |
-
}
|
616 |
-
|
617 |
-
foreach ( $node->attributes as $attr_name => $attr_node ) {
|
618 |
-
if ( ! isset( $attr_spec_list[ $attr_name ][ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
619 |
-
continue;
|
620 |
-
}
|
621 |
-
foreach ( $attr_spec_list[ $attr_name ][ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $attr_alt_name ) {
|
622 |
-
$attr_spec_list[ $attr_alt_name ] = $attr_spec_list[ $attr_name ];
|
623 |
-
}
|
624 |
-
}
|
625 |
-
|
626 |
-
$score = 0;
|
627 |
-
|
628 |
-
/*
|
629 |
-
* Keep track of how many of the attribute spec rules are mandatory,
|
630 |
-
* because if none are mandatory, then we will let this rule have a
|
631 |
-
* score since all the invalid attributes can just be removed.
|
632 |
-
*/
|
633 |
-
$mandatory_count = 0;
|
634 |
-
|
635 |
-
/*
|
636 |
-
* Iterate through each attribute rule in this attr spec list and run
|
637 |
-
* the series of tests. Each filter is given a `$node`, an `$attr_name`,
|
638 |
-
* and an `$attr_spec_rule`. If the `$attr_spec_rule` seems to be valid
|
639 |
-
* for the given node, then the filter should increment the score by one.
|
640 |
-
*/
|
641 |
-
foreach ( $attr_spec_list as $attr_name => $attr_spec_rule ) {
|
642 |
-
|
643 |
-
// If attr spec rule is empty, then it allows anything.
|
644 |
-
if ( empty( $attr_spec_rule ) && $node->hasAttribute( $attr_name ) ) {
|
645 |
-
$score++;
|
646 |
-
continue;
|
647 |
-
}
|
648 |
-
|
649 |
-
// If a mandatory attribute is required, and attribute exists, pass.
|
650 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::MANDATORY ] ) ) {
|
651 |
-
$mandatory_count++;
|
652 |
-
$result = $this->check_attr_spec_rule_mandatory( $node, $attr_name, $attr_spec_rule );
|
653 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
654 |
-
$score++;
|
655 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
656 |
-
return 0;
|
657 |
-
}
|
658 |
-
}
|
659 |
-
|
660 |
-
/*
|
661 |
-
* Check 'value' - case sensitive
|
662 |
-
* Given attribute's value must exactly equal value of the rule to pass.
|
663 |
-
*/
|
664 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE ] ) ) {
|
665 |
-
$result = $this->check_attr_spec_rule_value( $node, $attr_name, $attr_spec_rule );
|
666 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
667 |
-
$score++;
|
668 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
669 |
-
return 0;
|
670 |
-
}
|
671 |
-
}
|
672 |
-
|
673 |
-
/*
|
674 |
-
* Check 'value_regex' - case sensitive regex match
|
675 |
-
* Given attribute's value must be a case insensitive match to regex pattern
|
676 |
-
* specified by the value of rule to pass.
|
677 |
-
*/
|
678 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_REGEX ] ) ) {
|
679 |
-
$result = $this->check_attr_spec_rule_value_regex( $node, $attr_name, $attr_spec_rule );
|
680 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
681 |
-
$score++;
|
682 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
683 |
-
return 0;
|
684 |
-
}
|
685 |
-
}
|
686 |
-
|
687 |
-
/*
|
688 |
-
* Check 'value_casei' - case insensitive
|
689 |
-
* Given attribute's value must be a case insensitive match to the value of
|
690 |
-
* the rule to pass.
|
691 |
-
*/
|
692 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ] ) ) {
|
693 |
-
$result = $this->check_attr_spec_rule_value_casei( $node, $attr_name, $attr_spec_rule );
|
694 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
695 |
-
$score++;
|
696 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
697 |
-
return 0;
|
698 |
-
}
|
699 |
-
}
|
700 |
-
|
701 |
-
/*
|
702 |
-
* Check 'value_regex_casei' - case insensitive regex match
|
703 |
-
* Given attribute's value must be a case insensitive match to the regex
|
704 |
-
* pattern specified by the value of the rule to pass.
|
705 |
-
*/
|
706 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_REGEX_CASEI ] ) ) {
|
707 |
-
$result = $this->check_attr_spec_rule_value_regex_casei( $node, $attr_name, $attr_spec_rule );
|
708 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
709 |
-
$score++;
|
710 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
711 |
-
return 0;
|
712 |
-
}
|
713 |
-
}
|
714 |
-
|
715 |
-
/*
|
716 |
-
* If given attribute's value is a URL with a protocol, the protocol must
|
717 |
-
* be in the array specified by the rule's value to pass.
|
718 |
-
*/
|
719 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOWED_PROTOCOL ] ) ) {
|
720 |
-
$result = $this->check_attr_spec_rule_allowed_protocol( $node, $attr_name, $attr_spec_rule );
|
721 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
722 |
-
$score++;
|
723 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
724 |
-
return 0;
|
725 |
-
}
|
726 |
-
}
|
727 |
-
|
728 |
-
/*
|
729 |
-
* If given attribute's value is a URL with a host, the host must
|
730 |
-
* be valid
|
731 |
-
*/
|
732 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ] ) ) {
|
733 |
-
$result = $this->check_attr_spec_rule_valid_url( $node, $attr_name, $attr_spec_rule );
|
734 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
735 |
-
$score++;
|
736 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
737 |
-
return 0;
|
738 |
-
}
|
739 |
-
}
|
740 |
-
|
741 |
-
/*
|
742 |
-
* If the given attribute's value is *not* a relative path, and the rule's
|
743 |
-
* value is `false`, then pass.
|
744 |
-
*/
|
745 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_RELATIVE ] ) ) {
|
746 |
-
$result = $this->check_attr_spec_rule_disallowed_relative( $node, $attr_name, $attr_spec_rule );
|
747 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
748 |
-
$score++;
|
749 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
750 |
-
return 0;
|
751 |
-
}
|
752 |
-
}
|
753 |
-
|
754 |
-
/*
|
755 |
-
* If the given attribute's value exists, is non-empty and the rule's value
|
756 |
-
* is false, then pass.
|
757 |
-
*/
|
758 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_EMPTY ] ) ) {
|
759 |
-
$result = $this->check_attr_spec_rule_disallowed_empty( $node, $attr_name, $attr_spec_rule );
|
760 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
761 |
-
$score++;
|
762 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
763 |
-
return 0;
|
764 |
-
}
|
765 |
-
}
|
766 |
-
|
767 |
-
/*
|
768 |
-
* If the given attribute's value is a URL and does not match any of the list
|
769 |
-
* of domains in the value of the rule, then pass.
|
770 |
-
*/
|
771 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::DISALLOWED_DOMAIN ] ) ) {
|
772 |
-
$result = $this->check_attr_spec_rule_disallowed_domain( $node, $attr_name, $attr_spec_rule );
|
773 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
774 |
-
$score++;
|
775 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
776 |
-
return 0;
|
777 |
-
}
|
778 |
-
}
|
779 |
-
|
780 |
-
/*
|
781 |
-
* If the attribute's value exists and does not match the regex specified
|
782 |
-
* by the rule's value, then pass.
|
783 |
-
*/
|
784 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::BLACKLISTED_VALUE_REGEX ] ) ) {
|
785 |
-
$result = $this->check_attr_spec_rule_blacklisted_value_regex( $node, $attr_name, $attr_spec_rule );
|
786 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
787 |
-
$score++;
|
788 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
789 |
-
return 0;
|
790 |
-
}
|
791 |
-
}
|
792 |
-
|
793 |
-
// If the attribute's value exists and it matches the value properties spec.
|
794 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_PROPERTIES ] ) && $node->hasAttribute( $attr_name ) ) {
|
795 |
-
$result = $this->check_attr_spec_rule_value_properties( $node, $attr_name, $attr_spec_rule );
|
796 |
-
if ( AMP_Rule_Spec::PASS === $result ) {
|
797 |
-
$score++;
|
798 |
-
} elseif ( AMP_Rule_Spec::FAIL === $result ) {
|
799 |
-
return 0;
|
800 |
-
}
|
801 |
-
}
|
802 |
-
}
|
803 |
-
|
804 |
-
// Give the spec a score if it doesn't have any mandatory attributes.
|
805 |
-
if ( 0 === $mandatory_count && 0 === $score ) {
|
806 |
-
$score = 0.5;
|
807 |
-
}
|
808 |
-
|
809 |
-
return $score;
|
810 |
-
}
|
811 |
-
|
812 |
-
/**
|
813 |
-
* Remove attributes from $node that are not listed in $allowed_attrs.
|
814 |
-
*
|
815 |
-
* @param DOMNode $node Node.
|
816 |
-
* @param array[] $attr_spec_list Attribute spec list.
|
817 |
-
* @return DOMAttr[] Attributes to remove.
|
818 |
-
*/
|
819 |
-
private function get_disallowed_attributes_in_node( $node, $attr_spec_list ) {
|
820 |
-
|
821 |
-
if ( ! $node instanceof DOMElement ) {
|
822 |
-
/**
|
823 |
-
* If $node is only a DOMNode and not a DOMElement we can't
|
824 |
-
* remove an attribute from it anyway. So bail out now.
|
825 |
-
*/
|
826 |
-
return array();
|
827 |
-
}
|
828 |
-
|
829 |
-
/*
|
830 |
-
* We can't remove attributes inside the 'foreach' loop without
|
831 |
-
* breaking the iteration. So we keep track of the attributes to
|
832 |
-
* remove in the first loop, then remove them in the second loop.
|
833 |
-
*/
|
834 |
-
$attrs_to_remove = array();
|
835 |
-
foreach ( $node->attributes as $attr_name => $attr_node ) {
|
836 |
-
if ( ! $this->is_amp_allowed_attribute( $attr_name, $attr_spec_list ) ) {
|
837 |
-
$attrs_to_remove[] = $attr_node;
|
838 |
-
}
|
839 |
-
}
|
840 |
-
|
841 |
-
return $attrs_to_remove;
|
842 |
-
}
|
843 |
-
|
844 |
-
/**
|
845 |
-
* Remove invalid AMP attributes values from $node that have been implicitly disallowed.
|
846 |
-
*
|
847 |
-
* Allowed values are found $this->globally_allowed_attributes and in parameter $attr_spec_list
|
848 |
-
*
|
849 |
-
* @param DOMNode $node Node.
|
850 |
-
* @param array[][] $attr_spec_list Attribute spec list.
|
851 |
-
* @param DOMAttr[] $attributes_pending_removal Attributes pending removal.
|
852 |
-
* @return DOMAttr[]|false Attributes to remove, or false if the element itself should be removed.
|
853 |
-
*/
|
854 |
-
private function sanitize_disallowed_attribute_values_in_node( $node, $attr_spec_list, $attributes_pending_removal ) {
|
855 |
-
|
856 |
-
if ( ! $node instanceof DOMElement ) {
|
857 |
-
/*
|
858 |
-
* If $node is only a DOMNode and not a DOMElement we can't
|
859 |
-
* remove an attribute from it anyway. So bail out now.
|
860 |
-
*/
|
861 |
-
return $attributes_pending_removal;
|
862 |
-
}
|
863 |
-
|
864 |
-
return $this->delegated_sanitize_disallowed_attribute_values_in_node(
|
865 |
-
$node,
|
866 |
-
array_merge(
|
867 |
-
$this->globally_allowed_attributes,
|
868 |
-
$attr_spec_list
|
869 |
-
),
|
870 |
-
$attributes_pending_removal
|
871 |
-
);
|
872 |
-
}
|
873 |
-
|
874 |
-
/**
|
875 |
-
* Remove attributes values from $node that have been disallowed by AMP.
|
876 |
-
*
|
877 |
-
* @see $this->sanitize_disallowed_attribute_values_in_node() which delegates to this method
|
878 |
-
*
|
879 |
-
* @param DOMElement $node Node.
|
880 |
-
* @param array[][] $attr_spec_list Attribute spec list.
|
881 |
-
* @param DOMAttr[] $attributes_pending_removal Attributes pending removal.
|
882 |
-
* @return DOMAttr[]|false Attributes to remove, or false if the element itself should be removed.
|
883 |
-
*/
|
884 |
-
private function delegated_sanitize_disallowed_attribute_values_in_node( $node, $attr_spec_list, $attributes_pending_removal ) {
|
885 |
-
$attrs_to_remove = array();
|
886 |
-
|
887 |
-
foreach ( $attr_spec_list as $attr_name => $attr_val ) {
|
888 |
-
if ( isset( $attr_spec_list[ $attr_name ][ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
889 |
-
foreach ( $attr_spec_list[ $attr_name ][ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $attr_alt_name ) {
|
890 |
-
$attr_spec_list[ $attr_alt_name ] = $attr_spec_list[ $attr_name ];
|
891 |
-
}
|
892 |
-
}
|
893 |
-
}
|
894 |
-
|
895 |
-
foreach ( $node->attributes as $attr_name => $attr_node ) {
|
896 |
-
|
897 |
-
if ( ! isset( $attr_spec_list[ $attr_name ] ) || in_array( $attr_node, $attributes_pending_removal, true ) ) {
|
898 |
-
continue;
|
899 |
-
}
|
900 |
-
|
901 |
-
$should_remove_node = false;
|
902 |
-
$attr_spec_rule = $attr_spec_list[ $attr_name ];
|
903 |
-
|
904 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE ] ) &&
|
905 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_value( $node, $attr_name, $attr_spec_rule ) ) {
|
906 |
-
$should_remove_node = true;
|
907 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ] ) &&
|
908 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_value_casei( $node, $attr_name, $attr_spec_rule ) ) {
|
909 |
-
$should_remove_node = true;
|
910 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_REGEX ] ) &&
|
911 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_value_regex( $node, $attr_name, $attr_spec_rule ) ) {
|
912 |
-
$should_remove_node = true;
|
913 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_REGEX_CASEI ] ) &&
|
914 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_value_regex_casei( $node, $attr_name, $attr_spec_rule ) ) {
|
915 |
-
$should_remove_node = true;
|
916 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOWED_PROTOCOL ] ) &&
|
917 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_allowed_protocol( $node, $attr_name, $attr_spec_rule ) ) {
|
918 |
-
$should_remove_node = true;
|
919 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ] ) &&
|
920 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_valid_url( $node, $attr_name, $attr_spec_rule ) ) {
|
921 |
-
$should_remove_node = true;
|
922 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_RELATIVE ] ) &&
|
923 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_disallowed_relative( $node, $attr_name, $attr_spec_rule ) ) {
|
924 |
-
$should_remove_node = true;
|
925 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_EMPTY ] ) &&
|
926 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_disallowed_empty( $node, $attr_name, $attr_spec_rule ) ) {
|
927 |
-
$should_remove_node = true;
|
928 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::DISALLOWED_DOMAIN ] ) &&
|
929 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_disallowed_domain( $node, $attr_name, $attr_spec_rule ) ) {
|
930 |
-
$should_remove_node = true;
|
931 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::BLACKLISTED_VALUE_REGEX ] ) &&
|
932 |
-
AMP_Rule_Spec::FAIL === $this->check_attr_spec_rule_blacklisted_value_regex( $node, $attr_name, $attr_spec_rule ) ) {
|
933 |
-
$should_remove_node = true;
|
934 |
-
}
|
935 |
-
|
936 |
-
if ( $should_remove_node ) {
|
937 |
-
$is_mandatory =
|
938 |
-
isset( $attr_spec_rule[ AMP_Rule_Spec::MANDATORY ] )
|
939 |
-
? (bool) $attr_spec_rule[ AMP_Rule_Spec::MANDATORY ]
|
940 |
-
: false;
|
941 |
-
|
942 |
-
if ( $is_mandatory ) {
|
943 |
-
$this->remove_node( $node );
|
944 |
-
return false;
|
945 |
-
}
|
946 |
-
|
947 |
-
$attrs_to_remove[] = $attr_node;
|
948 |
-
}
|
949 |
-
}
|
950 |
-
|
951 |
-
// Remove the disallowed values.
|
952 |
-
foreach ( $attrs_to_remove as $attr_node ) {
|
953 |
-
if ( isset( $attr_spec_list[ $attr_node->nodeName ][ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_EMPTY ] ) &&
|
954 |
-
( true === $attr_spec_list[ $attr_node->nodeName ][ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_EMPTY ] ) ) {
|
955 |
-
$attr_node->nodeValue = '';
|
956 |
-
} else {
|
957 |
-
$attributes_pending_removal[] = $attr_node;
|
958 |
-
}
|
959 |
-
}
|
960 |
-
|
961 |
-
return $attributes_pending_removal;
|
962 |
-
}
|
963 |
-
|
964 |
-
/**
|
965 |
-
* Check if attribute is mandatory determine whether it exists in $node.
|
966 |
-
*
|
967 |
-
* When checking for the given attribute it also checks valid alternates.
|
968 |
-
*
|
969 |
-
* @param DOMElement $node Node.
|
970 |
-
* @param string $attr_name Attribute name.
|
971 |
-
* @param array[] $attr_spec_rule Attribute spec rule.
|
972 |
-
*
|
973 |
-
* @return string:
|
974 |
-
* - AMP_Rule_Spec::PASS - $attr_name is mandatory and it exists
|
975 |
-
* - AMP_Rule_Spec::FAIL - $attr_name is mandatory, but doesn't exist
|
976 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name is not mandatory
|
977 |
-
*/
|
978 |
-
private function check_attr_spec_rule_mandatory( $node, $attr_name, $attr_spec_rule ) {
|
979 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::MANDATORY ] ) && ( $attr_spec_rule[ AMP_Rule_Spec::MANDATORY ] ) ) {
|
980 |
-
if ( $node->hasAttribute( $attr_name ) ) {
|
981 |
-
return AMP_Rule_Spec::PASS;
|
982 |
-
} else {
|
983 |
-
// Check if an alternative name list is specified.
|
984 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
985 |
-
foreach ( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $alt_name ) {
|
986 |
-
if ( $node->hasAttribute( $alt_name ) ) {
|
987 |
-
return AMP_Rule_Spec::PASS;
|
988 |
-
}
|
989 |
-
}
|
990 |
-
}
|
991 |
-
return AMP_Rule_Spec::FAIL;
|
992 |
-
}
|
993 |
-
}
|
994 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
995 |
-
}
|
996 |
-
|
997 |
-
/**
|
998 |
-
* Check if attribute has a value rule determine if its value is valid.
|
999 |
-
*
|
1000 |
-
* Checks for value validity by matches against valid values.
|
1001 |
-
*
|
1002 |
-
* @param DOMElement $node Node.
|
1003 |
-
* @param string $attr_name Attribute name.
|
1004 |
-
* @param array $attr_spec_rule Attribute spec rule.
|
1005 |
-
*
|
1006 |
-
* @return string:
|
1007 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1008 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1009 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1010 |
-
* is no rule for this attribute.
|
1011 |
-
*/
|
1012 |
-
private function check_attr_spec_rule_value( $node, $attr_name, $attr_spec_rule ) {
|
1013 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE ] ) ) {
|
1014 |
-
if ( $node->hasAttribute( $attr_name ) ) {
|
1015 |
-
if ( $this->check_matching_attribute_value( $attr_name, $node->getAttribute( $attr_name ), $attr_spec_rule[ AMP_Rule_Spec::VALUE ] ) ) {
|
1016 |
-
return AMP_Rule_Spec::PASS;
|
1017 |
-
} else {
|
1018 |
-
return AMP_Rule_Spec::FAIL;
|
1019 |
-
}
|
1020 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
1021 |
-
foreach ( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $alternative_name ) {
|
1022 |
-
if ( $node->hasAttribute( $alternative_name ) ) {
|
1023 |
-
if ( $this->check_matching_attribute_value( $attr_name, $node->getAttribute( $alternative_name ), $attr_spec_rule[ AMP_Rule_Spec::VALUE ] ) ) {
|
1024 |
-
return AMP_Rule_Spec::PASS;
|
1025 |
-
} else {
|
1026 |
-
return AMP_Rule_Spec::FAIL;
|
1027 |
-
}
|
1028 |
-
}
|
1029 |
-
}
|
1030 |
-
}
|
1031 |
-
}
|
1032 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1033 |
-
}
|
1034 |
-
|
1035 |
-
/**
|
1036 |
-
* Check that an attribute's value matches is given spec value.
|
1037 |
-
*
|
1038 |
-
* This takes into account boolean attributes where value can match name (e.g. selected="selected").
|
1039 |
-
*
|
1040 |
-
* @since 0.7.0
|
1041 |
-
*
|
1042 |
-
* @param string $attr_name Attribute name.
|
1043 |
-
* @param string $attr_value Attribute value.
|
1044 |
-
* @param string $spec_value Attribute spec value.
|
1045 |
-
* @return bool Is value valid.
|
1046 |
-
*/
|
1047 |
-
private function check_matching_attribute_value( $attr_name, $attr_value, $spec_value ) {
|
1048 |
-
if ( $spec_value === $attr_value ) {
|
1049 |
-
return true;
|
1050 |
-
}
|
1051 |
-
|
1052 |
-
// Check for boolean attribute.
|
1053 |
-
return (
|
1054 |
-
'' === $spec_value
|
1055 |
-
&&
|
1056 |
-
in_array( $attr_name, AMP_Rule_Spec::$boolean_attributes, true )
|
1057 |
-
&&
|
1058 |
-
strtolower( $attr_value ) === strtolower( $attr_name )
|
1059 |
-
);
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
/**
|
1063 |
-
* Check if attribute has a value rule determine if its value matches ignoring case.
|
1064 |
-
*
|
1065 |
-
* @param DOMElement $node Node.
|
1066 |
-
* @param string $attr_name Attribute name.
|
1067 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1068 |
-
*
|
1069 |
-
* @return string:
|
1070 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1071 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1072 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1073 |
-
* is no rule for this attribute.
|
1074 |
-
*/
|
1075 |
-
private function check_attr_spec_rule_value_casei( $node, $attr_name, $attr_spec_rule ) {
|
1076 |
-
/**
|
1077 |
-
* Check 'value_casei' - case insensitive
|
1078 |
-
*/
|
1079 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ] ) ) {
|
1080 |
-
$rule_value = strtolower( $attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ] );
|
1081 |
-
if ( $node->hasAttribute( $attr_name ) ) {
|
1082 |
-
$attr_value = strtolower( $node->getAttribute( $attr_name ) );
|
1083 |
-
if ( $attr_value === (string) $rule_value ) {
|
1084 |
-
return AMP_Rule_Spec::PASS;
|
1085 |
-
} else {
|
1086 |
-
return AMP_Rule_Spec::FAIL;
|
1087 |
-
}
|
1088 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
1089 |
-
foreach ( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $alternative_name ) {
|
1090 |
-
if ( $node->hasAttribute( $alternative_name ) ) {
|
1091 |
-
$attr_value = strtolower( $node->getAttribute( $alternative_name ) );
|
1092 |
-
if ( $attr_value === (string) $rule_value ) {
|
1093 |
-
return AMP_Rule_Spec::PASS;
|
1094 |
-
} else {
|
1095 |
-
return AMP_Rule_Spec::FAIL;
|
1096 |
-
}
|
1097 |
-
}
|
1098 |
-
}
|
1099 |
-
}
|
1100 |
-
}
|
1101 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1102 |
-
}
|
1103 |
-
|
1104 |
-
/**
|
1105 |
-
* Check if attribute has a regex value rule determine if it matches.
|
1106 |
-
*
|
1107 |
-
* @param DOMElement $node Node.
|
1108 |
-
* @param string $attr_name Attribute name.
|
1109 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1110 |
-
*
|
1111 |
-
* @return string:
|
1112 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1113 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1114 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1115 |
-
* is no rule for this attribute.
|
1116 |
-
*/
|
1117 |
-
private function check_attr_spec_rule_value_regex( $node, $attr_name, $attr_spec_rule ) {
|
1118 |
-
// Check 'value_regex' - case sensitive regex match.
|
1119 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_REGEX ] ) && $node->hasAttribute( $attr_name ) ) {
|
1120 |
-
$rule_value = $attr_spec_rule[ AMP_Rule_Spec::VALUE_REGEX ];
|
1121 |
-
|
1122 |
-
/*
|
1123 |
-
* The regex pattern has '^' and '$' though they are not in the AMP spec.
|
1124 |
-
* Leaving them out would allow both '_blank' and 'yyy_blankzzz' to be
|
1125 |
-
* matched by a regex rule of '(_blank|_self|_top)'. As the AMP JS validator
|
1126 |
-
* only accepts '_blank' we leave it this way for now.
|
1127 |
-
*/
|
1128 |
-
if ( preg_match( '@^' . $rule_value . '$@u', $node->getAttribute( $attr_name ) ) ) {
|
1129 |
-
return AMP_Rule_Spec::PASS;
|
1130 |
-
} else {
|
1131 |
-
return AMP_Rule_Spec::FAIL;
|
1132 |
-
}
|
1133 |
-
}
|
1134 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1135 |
-
}
|
1136 |
-
|
1137 |
-
/**
|
1138 |
-
* Check if attribute has a case-insensitive regex value rule determine if it matches.
|
1139 |
-
*
|
1140 |
-
* @param DOMElement $node Node.
|
1141 |
-
* @param string $attr_name Attribute name.
|
1142 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1143 |
-
*
|
1144 |
-
* @return string:
|
1145 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1146 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1147 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1148 |
-
* is no rule for this attribute.
|
1149 |
-
*/
|
1150 |
-
private function check_attr_spec_rule_value_regex_casei( $node, $attr_name, $attr_spec_rule ) {
|
1151 |
-
/**
|
1152 |
-
* Check 'value_regex_casei' - case insensitive regex match
|
1153 |
-
*/
|
1154 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_REGEX_CASEI ] ) && $node->hasAttribute( $attr_name ) ) {
|
1155 |
-
$rule_value = $attr_spec_rule[ AMP_Rule_Spec::VALUE_REGEX_CASEI ];
|
1156 |
-
|
1157 |
-
// See note above regarding the '^' and '$' that are added here.
|
1158 |
-
if ( preg_match( '/^' . $rule_value . '$/ui', $node->getAttribute( $attr_name ) ) ) {
|
1159 |
-
return AMP_Rule_Spec::PASS;
|
1160 |
-
} else {
|
1161 |
-
return AMP_Rule_Spec::FAIL;
|
1162 |
-
}
|
1163 |
-
}
|
1164 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1165 |
-
}
|
1166 |
-
|
1167 |
-
/**
|
1168 |
-
* Check if attribute has a valid host value
|
1169 |
-
*
|
1170 |
-
* @since 0.7
|
1171 |
-
*
|
1172 |
-
* @param DOMElement $node Node.
|
1173 |
-
* @param string $attr_name Attribute name.
|
1174 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1175 |
-
*
|
1176 |
-
* @return string:
|
1177 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1178 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1179 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1180 |
-
* is no rule for this attribute.
|
1181 |
-
*/
|
1182 |
-
private function check_attr_spec_rule_valid_url( $node, $attr_name, $attr_spec_rule ) {
|
1183 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ] ) ) {
|
1184 |
-
if ( $node->hasAttribute( $attr_name ) ) {
|
1185 |
-
$urls_to_test = preg_split( '/\s*,\s*/', $node->getAttribute( $attr_name ) );
|
1186 |
-
foreach ( $urls_to_test as $url ) {
|
1187 |
-
$url = urldecode( $url );
|
1188 |
-
// Check if the host contains invalid chars.
|
1189 |
-
$url_host = wp_parse_url( $url, PHP_URL_HOST );
|
1190 |
-
if ( $url_host && preg_match( '/[!"#$%&\'()*+,\/:;<=>?@[\]^`{|}~\s]/i', $url_host ) ) {
|
1191 |
-
return AMP_Rule_Spec::FAIL;
|
1192 |
-
}
|
1193 |
-
|
1194 |
-
// Check if the protocol contains invalid chars.
|
1195 |
-
$dots_pos = strpos( $url, ':' );
|
1196 |
-
if ( false !== $dots_pos && preg_match( '/[!"#$%&\'()*+,\/:;<=>?@[\]^`{|}~\s]/i', substr( $url, 0, $dots_pos ) ) ) {
|
1197 |
-
return AMP_Rule_Spec::FAIL;
|
1198 |
-
}
|
1199 |
-
}
|
1200 |
-
|
1201 |
-
return AMP_Rule_Spec::PASS;
|
1202 |
-
}
|
1203 |
-
}
|
1204 |
-
|
1205 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1206 |
-
}
|
1207 |
-
|
1208 |
-
/**
|
1209 |
-
* Check if attribute has a protocol value rule determine if it matches.
|
1210 |
-
*
|
1211 |
-
* @param DOMElement $node Node.
|
1212 |
-
* @param string $attr_name Attribute name.
|
1213 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1214 |
-
*
|
1215 |
-
* @return string:
|
1216 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1217 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1218 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1219 |
-
* is no rule for this attribute.
|
1220 |
-
*/
|
1221 |
-
private function check_attr_spec_rule_allowed_protocol( $node, $attr_name, $attr_spec_rule ) {
|
1222 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOWED_PROTOCOL ] ) ) {
|
1223 |
-
if ( $node->hasAttribute( $attr_name ) ) {
|
1224 |
-
$urls_to_test = preg_split( '/\s*,\s*/', $node->getAttribute( $attr_name ) );
|
1225 |
-
foreach ( $urls_to_test as $url ) {
|
1226 |
-
/*
|
1227 |
-
* This seems to be an acceptable check since the AMP validator
|
1228 |
-
* will allow a URL with no protocol to pass validation.
|
1229 |
-
*/
|
1230 |
-
$url_scheme = AMP_WP_Utils::parse_url( $url, PHP_URL_SCHEME );
|
1231 |
-
if ( $url_scheme ) {
|
1232 |
-
if ( ! in_array( strtolower( $url_scheme ), $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOWED_PROTOCOL ], true ) ) {
|
1233 |
-
return AMP_Rule_Spec::FAIL;
|
1234 |
-
}
|
1235 |
-
}
|
1236 |
-
}
|
1237 |
-
return AMP_Rule_Spec::PASS;
|
1238 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
1239 |
-
foreach ( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $alternative_name ) {
|
1240 |
-
if ( $node->hasAttribute( $alternative_name ) ) {
|
1241 |
-
$urls_to_test = preg_split( '/\s*,\s*/', $node->getAttribute( $alternative_name ) );
|
1242 |
-
foreach ( $urls_to_test as $url ) {
|
1243 |
-
/*
|
1244 |
-
* This seems to be an acceptable check since the AMP validator
|
1245 |
-
* will allow a URL with no protocol to pass validation.
|
1246 |
-
*/
|
1247 |
-
$url_scheme = AMP_WP_Utils::parse_url( $url, PHP_URL_SCHEME );
|
1248 |
-
if ( $url_scheme ) {
|
1249 |
-
if ( ! in_array( strtolower( $url_scheme ), $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOWED_PROTOCOL ], true ) ) {
|
1250 |
-
return AMP_Rule_Spec::FAIL;
|
1251 |
-
}
|
1252 |
-
}
|
1253 |
-
}
|
1254 |
-
return AMP_Rule_Spec::PASS;
|
1255 |
-
}
|
1256 |
-
}
|
1257 |
-
}
|
1258 |
-
}
|
1259 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1260 |
-
}
|
1261 |
-
|
1262 |
-
/**
|
1263 |
-
* Check if attribute has disallowed relative value rule determine if disallowed relative value matches.
|
1264 |
-
*
|
1265 |
-
* @param DOMElement $node Node.
|
1266 |
-
* @param string $attr_name Attribute name.
|
1267 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1268 |
-
*
|
1269 |
-
* @return string:
|
1270 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1271 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1272 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1273 |
-
* is no rule for this attribute.
|
1274 |
-
*/
|
1275 |
-
private function check_attr_spec_rule_disallowed_relative( $node, $attr_name, $attr_spec_rule ) {
|
1276 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_RELATIVE ] ) && ! ( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_RELATIVE ] ) ) {
|
1277 |
-
if ( $node->hasAttribute( $attr_name ) ) {
|
1278 |
-
$urls_to_test = preg_split( '/\s*,\s*/', $node->getAttribute( $attr_name ) );
|
1279 |
-
foreach ( $urls_to_test as $url ) {
|
1280 |
-
$parsed_url = AMP_WP_Utils::parse_url( $url );
|
1281 |
-
|
1282 |
-
/*
|
1283 |
-
* The JS AMP validator seems to consider 'relative' to mean
|
1284 |
-
* *protocol* relative, not *host* relative for this rule. So,
|
1285 |
-
* a url with an empty 'scheme' is considered "relative" by AMP.
|
1286 |
-
* ie. '//domain.com/path' and '/path' should both be considered
|
1287 |
-
* relative for purposes of AMP validation.
|
1288 |
-
*/
|
1289 |
-
if ( empty( $parsed_url['scheme'] ) ) {
|
1290 |
-
return AMP_Rule_Spec::FAIL;
|
1291 |
-
}
|
1292 |
-
}
|
1293 |
-
return AMP_Rule_Spec::PASS;
|
1294 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
1295 |
-
foreach ( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $alternative_name ) {
|
1296 |
-
if ( $node->hasAttribute( $alternative_name ) ) {
|
1297 |
-
$urls_to_test = preg_split( '/\s*,\s*/', $node->getAttribute( $alternative_name ) );
|
1298 |
-
foreach ( $urls_to_test as $url ) {
|
1299 |
-
$parsed_url = AMP_WP_Utils::parse_url( $url );
|
1300 |
-
if ( empty( $parsed_url['scheme'] ) ) {
|
1301 |
-
return AMP_Rule_Spec::FAIL;
|
1302 |
-
}
|
1303 |
-
}
|
1304 |
-
}
|
1305 |
-
}
|
1306 |
-
return AMP_Rule_Spec::PASS;
|
1307 |
-
}
|
1308 |
-
}
|
1309 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1310 |
-
}
|
1311 |
-
|
1312 |
-
/**
|
1313 |
-
* Check if attribute has disallowed empty value rule determine if value is empty.
|
1314 |
-
*
|
1315 |
-
* @param DOMElement $node Node.
|
1316 |
-
* @param string $attr_name Attribute name.
|
1317 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1318 |
-
*
|
1319 |
-
* @return string:
|
1320 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1321 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1322 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1323 |
-
* is no rule for this attribute.
|
1324 |
-
*/
|
1325 |
-
private function check_attr_spec_rule_disallowed_empty( $node, $attr_name, $attr_spec_rule ) {
|
1326 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_EMPTY ] ) && ! ( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ][ AMP_Rule_Spec::ALLOW_EMPTY ] ) && $node->hasAttribute( $attr_name ) ) {
|
1327 |
-
$attr_value = $node->getAttribute( $attr_name );
|
1328 |
-
if ( empty( $attr_value ) ) {
|
1329 |
-
return AMP_Rule_Spec::FAIL;
|
1330 |
-
}
|
1331 |
-
return AMP_Rule_Spec::PASS;
|
1332 |
-
}
|
1333 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1334 |
-
}
|
1335 |
-
|
1336 |
-
/**
|
1337 |
-
* Check if attribute has disallowed domain value rule determine if value matches.
|
1338 |
-
*
|
1339 |
-
* @param DOMElement $node Node.
|
1340 |
-
* @param string $attr_name Attribute name.
|
1341 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1342 |
-
*
|
1343 |
-
* @return string:
|
1344 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1345 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1346 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1347 |
-
* is no rule for this attribute.
|
1348 |
-
*/
|
1349 |
-
private function check_attr_spec_rule_disallowed_domain( $node, $attr_name, $attr_spec_rule ) {
|
1350 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::DISALLOWED_DOMAIN ] ) && $node->hasAttribute( $attr_name ) ) {
|
1351 |
-
$attr_value = $node->getAttribute( $attr_name );
|
1352 |
-
$url_domain = AMP_WP_Utils::parse_url( $attr_value, PHP_URL_HOST );
|
1353 |
-
if ( ! empty( $url_domain ) ) {
|
1354 |
-
foreach ( $attr_spec_rule[ AMP_Rule_Spec::DISALLOWED_DOMAIN ] as $disallowed_domain ) {
|
1355 |
-
if ( strtolower( $url_domain ) === strtolower( $disallowed_domain ) ) {
|
1356 |
-
|
1357 |
-
// Found a disallowed domain, fail validation.
|
1358 |
-
return AMP_Rule_Spec::FAIL;
|
1359 |
-
}
|
1360 |
-
}
|
1361 |
-
return AMP_Rule_Spec::PASS;
|
1362 |
-
}
|
1363 |
-
}
|
1364 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1365 |
-
}
|
1366 |
-
|
1367 |
-
/**
|
1368 |
-
* Check if attribute has blacklisted value via regex match determine if value matches.
|
1369 |
-
*
|
1370 |
-
* @since 0.5
|
1371 |
-
*
|
1372 |
-
* @param DOMElement $node Node.
|
1373 |
-
* @param string $attr_name Attribute name.
|
1374 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1375 |
-
*
|
1376 |
-
* @return string:
|
1377 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1378 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1379 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1380 |
-
* is no rule for this attribute.
|
1381 |
-
*/
|
1382 |
-
private function check_attr_spec_rule_blacklisted_value_regex( $node, $attr_name, $attr_spec_rule ) {
|
1383 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::BLACKLISTED_VALUE_REGEX ] ) ) {
|
1384 |
-
$pattern = '/' . $attr_spec_rule[ AMP_Rule_Spec::BLACKLISTED_VALUE_REGEX ] . '/u';
|
1385 |
-
if ( $node->hasAttribute( $attr_name ) ) {
|
1386 |
-
$attr_value = $node->getAttribute( $attr_name );
|
1387 |
-
if ( preg_match( $pattern, $attr_value ) ) {
|
1388 |
-
return AMP_Rule_Spec::FAIL;
|
1389 |
-
} else {
|
1390 |
-
return AMP_Rule_Spec::PASS;
|
1391 |
-
}
|
1392 |
-
} elseif ( isset( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] ) ) {
|
1393 |
-
foreach ( $attr_spec_rule[ AMP_Rule_Spec::ALTERNATIVE_NAMES ] as $alternative_name ) {
|
1394 |
-
if ( $node->hasAttribute( $alternative_name ) ) {
|
1395 |
-
$attr_value = $node->getAttribute( $alternative_name );
|
1396 |
-
if ( preg_match( $pattern, $attr_value ) ) {
|
1397 |
-
return AMP_Rule_Spec::FAIL;
|
1398 |
-
} else {
|
1399 |
-
return AMP_Rule_Spec::PASS;
|
1400 |
-
}
|
1401 |
-
}
|
1402 |
-
}
|
1403 |
-
}
|
1404 |
-
}
|
1405 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1406 |
-
}
|
1407 |
-
|
1408 |
-
/**
|
1409 |
-
* Check if attribute has valid properties.
|
1410 |
-
*
|
1411 |
-
* @since 0.7
|
1412 |
-
*
|
1413 |
-
* @param DOMElement $node Node.
|
1414 |
-
* @param string $attr_name Attribute name.
|
1415 |
-
* @param array[]|string[] $attr_spec_rule Attribute spec rule.
|
1416 |
-
*
|
1417 |
-
* @return string:
|
1418 |
-
* - AMP_Rule_Spec::PASS - $attr_name has a value that matches the rule.
|
1419 |
-
* - AMP_Rule_Spec::FAIL - $attr_name has a value that does *not* match rule.
|
1420 |
-
* - AMP_Rule_Spec::NOT_APPLICABLE - $attr_name does not exist or there
|
1421 |
-
* is no rule for this attribute.
|
1422 |
-
*/
|
1423 |
-
private function check_attr_spec_rule_value_properties( $node, $attr_name, $attr_spec_rule ) {
|
1424 |
-
if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_PROPERTIES ] ) && $node->hasAttribute( $attr_name ) ) {
|
1425 |
-
$properties = array();
|
1426 |
-
foreach ( explode( ',', $node->getAttribute( $attr_name ) ) as $pair ) {
|
1427 |
-
$pair_parts = explode( '=', $pair, 2 );
|
1428 |
-
if ( 2 !== count( $pair_parts ) ) {
|
1429 |
-
return 0;
|
1430 |
-
}
|
1431 |
-
$properties[ strtolower( $pair_parts[0] ) ] = $pair_parts[1];
|
1432 |
-
}
|
1433 |
-
|
1434 |
-
// Fail if there are unrecognized properties.
|
1435 |
-
if ( count( array_diff( array_keys( $properties ), array_keys( $attr_spec_rule[ AMP_Rule_Spec::VALUE_PROPERTIES ] ) ) ) > 0 ) {
|
1436 |
-
return AMP_Rule_Spec::FAIL;
|
1437 |
-
}
|
1438 |
-
|
1439 |
-
foreach ( $attr_spec_rule[ AMP_Rule_Spec::VALUE_PROPERTIES ] as $prop_name => $property_spec ) {
|
1440 |
-
|
1441 |
-
// Mandatory property is missing.
|
1442 |
-
if ( ! empty( $property_spec['mandatory'] ) && ! isset( $properties[ $prop_name ] ) ) {
|
1443 |
-
return AMP_Rule_Spec::FAIL;
|
1444 |
-
}
|
1445 |
-
|
1446 |
-
if ( ! isset( $properties[ $prop_name ] ) ) {
|
1447 |
-
continue;
|
1448 |
-
}
|
1449 |
-
|
1450 |
-
$prop_value = $properties[ $prop_name ];
|
1451 |
-
|
1452 |
-
// Required value is absent, so fail.
|
1453 |
-
$required_value = null;
|
1454 |
-
if ( isset( $property_spec['value'] ) ) {
|
1455 |
-
$required_value = $property_spec['value'];
|
1456 |
-
} elseif ( isset( $property_spec['value_double'] ) ) {
|
1457 |
-
$required_value = $property_spec['value_double'];
|
1458 |
-
$prop_value = (double) $prop_value;
|
1459 |
-
}
|
1460 |
-
if ( isset( $required_value ) && $prop_value !== $required_value ) {
|
1461 |
-
return AMP_Rule_Spec::FAIL;
|
1462 |
-
}
|
1463 |
-
}
|
1464 |
-
return AMP_Rule_Spec::PASS;
|
1465 |
-
}
|
1466 |
-
return AMP_Rule_Spec::NOT_APPLICABLE;
|
1467 |
-
}
|
1468 |
-
|
1469 |
-
/**
|
1470 |
-
* Determine if the supplied attribute name is allowed for AMP.
|
1471 |
-
*
|
1472 |
-
* @since 0.5
|
1473 |
-
*
|
1474 |
-
* @param string $attr_name Attribute name.
|
1475 |
-
* @param array[]|string[] $attr_spec_list Attribute spec list.
|
1476 |
-
* @return bool Return true if attribute name is valid for this attr_spec_list, false otherwise.
|
1477 |
-
*/
|
1478 |
-
private function is_amp_allowed_attribute( $attr_name, $attr_spec_list ) {
|
1479 |
-
if ( isset( $this->globally_allowed_attributes[ $attr_name ] ) || isset( $this->layout_allowed_attributes[ $attr_name ] ) || isset( $attr_spec_list[ $attr_name ] ) ) {
|
1480 |
-
return true;
|
1481 |
-
} else {
|
1482 |
-
foreach ( AMP_Rule_Spec::$whitelisted_attr_regex as $whitelisted_attr_regex ) {
|
1483 |
-
if ( preg_match( $whitelisted_attr_regex, $attr_name ) ) {
|
1484 |
-
return true;
|
1485 |
-
}
|
1486 |
-
}
|
1487 |
-
}
|
1488 |
-
|
1489 |
-
$is_allowed_alt_name_attr = (
|
1490 |
-
isset( $this->rev_alternate_attr_name_lookup[ $attr_name ] )
|
1491 |
-
&&
|
1492 |
-
isset( $attr_spec_list[ $this->rev_alternate_attr_name_lookup[ $attr_name ] ] )
|
1493 |
-
);
|
1494 |
-
if ( $is_allowed_alt_name_attr ) {
|
1495 |
-
return true;
|
1496 |
-
}
|
1497 |
-
|
1498 |
-
return false;
|
1499 |
-
}
|
1500 |
-
|
1501 |
-
/**
|
1502 |
-
* Determine if the supplied $node's HTML tag is allowed for AMP.
|
1503 |
-
*
|
1504 |
-
* @since 0.5
|
1505 |
-
*
|
1506 |
-
* @param DOMNode $node Node.
|
1507 |
-
* @return bool Return true if the specified node's name is an AMP allowed tag, false otherwise.
|
1508 |
-
*/
|
1509 |
-
private function is_amp_allowed_tag( $node ) {
|
1510 |
-
if ( ! $node instanceof DOMElement ) {
|
1511 |
-
return false;
|
1512 |
-
}
|
1513 |
-
/**
|
1514 |
-
* Return true if node is an allowed tags or is a text or comment node.
|
1515 |
-
*/
|
1516 |
-
return (
|
1517 |
-
( XML_TEXT_NODE === $node->nodeType ) ||
|
1518 |
-
isset( $this->allowed_tags[ $node->nodeName ] ) ||
|
1519 |
-
( XML_COMMENT_NODE === $node->nodeType ) ||
|
1520 |
-
( XML_CDATA_SECTION_NODE === $node->nodeType )
|
1521 |
-
);
|
1522 |
-
}
|
1523 |
-
|
1524 |
-
/**
|
1525 |
-
* Determine if the supplied $node has a parent with the specified tag name.
|
1526 |
-
*
|
1527 |
-
* @since 0.5
|
1528 |
-
*
|
1529 |
-
* @param DOMNode $node Node.
|
1530 |
-
* @param string $parent_tag_name Parent tag name.
|
1531 |
-
* @return bool Return true if given node has direct parent with the given name, false otherwise.
|
1532 |
-
*/
|
1533 |
-
private function has_parent( $node, $parent_tag_name ) {
|
1534 |
-
if ( $node && $node->parentNode && ( $node->parentNode->nodeName === $parent_tag_name ) ) {
|
1535 |
-
return true;
|
1536 |
-
}
|
1537 |
-
return false;
|
1538 |
-
}
|
1539 |
-
|
1540 |
-
/**
|
1541 |
-
* Determine if the supplied $node has an ancestor with the specified tag name.
|
1542 |
-
*
|
1543 |
-
* @since 0.5
|
1544 |
-
*
|
1545 |
-
* @todo The $ancestor_tag_name here is not sufficient as it is not just a tag name but an entire selector that is used.
|
1546 |
-
* @param DOMNode $node Node.
|
1547 |
-
* @param string $ancestor_tag_name Ancestor tag name.
|
1548 |
-
* @return bool Return true if given node has any ancestor with the give name, false otherwise.
|
1549 |
-
*/
|
1550 |
-
private function has_ancestor( $node, $ancestor_tag_name ) {
|
1551 |
-
if ( $this->get_ancestor_with_tag_name( $node, $ancestor_tag_name ) ) {
|
1552 |
-
return true;
|
1553 |
-
}
|
1554 |
-
return false;
|
1555 |
-
}
|
1556 |
-
|
1557 |
-
/**
|
1558 |
-
* Get the first ancestor node matching the specified tag name for the supplied $node.
|
1559 |
-
*
|
1560 |
-
* @since 0.5
|
1561 |
-
*
|
1562 |
-
* @param DOMNode $node Node.
|
1563 |
-
* @param string $ancestor_tag_name Ancestor tag name.
|
1564 |
-
* @return DOMNode|null Returns an ancestor node for the name specified, or null if not found.
|
1565 |
-
*/
|
1566 |
-
private function get_ancestor_with_tag_name( $node, $ancestor_tag_name ) {
|
1567 |
-
while ( $node && $node->parentNode ) {
|
1568 |
-
$node = $node->parentNode;
|
1569 |
-
if ( $node->nodeName === $ancestor_tag_name ) {
|
1570 |
-
return $node;
|
1571 |
-
}
|
1572 |
-
}
|
1573 |
-
return null;
|
1574 |
-
}
|
1575 |
-
|
1576 |
-
/**
|
1577 |
-
* Replaces the given node with it's child nodes, if any
|
1578 |
-
*
|
1579 |
-
* Also adds them to the stack for processing by the sanitize() function.
|
1580 |
-
*
|
1581 |
-
* @since 0.3.3
|
1582 |
-
*
|
1583 |
-
* @param DOMNode $node Node.
|
1584 |
-
*/
|
1585 |
-
private function replace_node_with_children( $node ) {
|
1586 |
-
|
1587 |
-
if ( ! $node->hasChildNodes() || ! $node->parentNode ) {
|
1588 |
-
// If node has no children or no parent, just remove the node.
|
1589 |
-
$this->remove_node( $node );
|
1590 |
-
|
1591 |
-
} else {
|
1592 |
-
/*
|
1593 |
-
* If node has children, replace it with them and push children onto stack
|
1594 |
-
*
|
1595 |
-
* Create a DOM fragment to hold the children
|
1596 |
-
*/
|
1597 |
-
$fragment = $this->dom->createDocumentFragment();
|
1598 |
-
|
1599 |
-
// Add all children to fragment/stack.
|
1600 |
-
$child = $node->firstChild;
|
1601 |
-
while ( $child ) {
|
1602 |
-
$fragment->appendChild( $child );
|
1603 |
-
$this->stack[] = $child;
|
1604 |
-
$child = $node->firstChild;
|
1605 |
-
}
|
1606 |
-
|
1607 |
-
// Replace node with fragment.
|
1608 |
-
$node->parentNode->replaceChild( $fragment, $node );
|
1609 |
-
|
1610 |
-
}
|
1611 |
-
}
|
1612 |
-
|
1613 |
-
/**
|
1614 |
-
* Removes a node from its parent node.
|
1615 |
-
*
|
1616 |
-
* If removing the node makes the parent node empty, then it will remove the parent
|
1617 |
-
* too. It will Continue until a non-empty parent or the 'body' element is reached.
|
1618 |
-
*
|
1619 |
-
* @since 0.5
|
1620 |
-
*
|
1621 |
-
* @param DOMNode $node Node.
|
1622 |
-
*/
|
1623 |
-
private function remove_node( $node ) {
|
1624 |
-
/**
|
1625 |
-
* Parent.
|
1626 |
-
*
|
1627 |
-
* @var DOMNode $parent
|
1628 |
-
*/
|
1629 |
-
/*
|
1630 |
-
$parent = $node->parentNode;
|
1631 |
-
if ( $node && $parent ) {
|
1632 |
-
$this->remove_invalid_child( $node );
|
1633 |
-
}
|
1634 |
-
while ( $parent && ! $parent->hasChildNodes() && $this->root_element !== $parent ) {
|
1635 |
-
$node = $parent;
|
1636 |
-
$parent = $parent->parentNode;
|
1637 |
-
if ( $parent ) {
|
1638 |
-
$parent->removeChild( $node );
|
1639 |
-
}
|
1640 |
-
}
|
1641 |
-
*/
|
1642 |
-
}
|
1643 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/vendor/amp/includes/sanitizers/class-amp-video-sanitizer.php
CHANGED
@@ -100,7 +100,9 @@ class AMP_Video_Sanitizer extends AMP_Base_Sanitizer {
|
|
100 |
}
|
101 |
}
|
102 |
|
103 |
-
|
|
|
|
|
104 |
|
105 |
return $out;
|
106 |
}
|
100 |
}
|
101 |
}
|
102 |
|
103 |
+
if ( ! isset( $out['data-block-on-consent'] ) ) {
|
104 |
+
$out['data-block-on-consent'] = '';
|
105 |
+
}
|
106 |
|
107 |
return $out;
|
108 |
}
|
includes/vendor/amp/includes/utils/class-amp-dom-utils.php
CHANGED
@@ -1,126 +1,15 @@
|
|
1 |
<?php
|
2 |
|
3 |
class AMP_DOM_Utils {
|
4 |
-
|
5 |
-
* HTML elements that are self-closing.
|
6 |
-
*
|
7 |
-
* Not all are valid AMP, but we include them for completeness.
|
8 |
-
*
|
9 |
-
* @since 0.7
|
10 |
-
* @link https://www.w3.org/TR/html5/syntax.html#serializing-html-fragments
|
11 |
-
* @var array
|
12 |
-
*/
|
13 |
-
private static $self_closing_tags = array(
|
14 |
-
'area',
|
15 |
-
'base',
|
16 |
-
'basefont',
|
17 |
-
'bgsound',
|
18 |
-
'br',
|
19 |
-
'col',
|
20 |
-
'embed',
|
21 |
-
'frame',
|
22 |
-
'hr',
|
23 |
-
'img',
|
24 |
-
'input',
|
25 |
-
'keygen',
|
26 |
-
'link',
|
27 |
-
'meta',
|
28 |
-
'param',
|
29 |
-
'source',
|
30 |
-
'track',
|
31 |
-
'wbr',
|
32 |
-
);
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Stored noscript/comment replacements for libxml<2.8.
|
36 |
-
*
|
37 |
-
* @since 0.7
|
38 |
-
* @var array
|
39 |
-
*/
|
40 |
-
public static $noscript_placeholder_comments = array();
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Return a valid DOMDocument representing HTML document passed as a parameter.
|
44 |
-
*
|
45 |
-
* @since 0.7
|
46 |
-
* @see AMP_DOM_Utils::get_content_from_dom_node()
|
47 |
-
*
|
48 |
-
* @param string $document Valid HTML document to be represented by a DOMDocument.
|
49 |
-
* @return DOMDocument|false Returns DOMDocument, or false if conversion failed.
|
50 |
-
*/
|
51 |
-
public static function get_dom( $document ) {
|
52 |
$libxml_previous_state = libxml_use_internal_errors( true );
|
53 |
|
54 |
-
$dom = new DOMDocument
|
55 |
-
|
56 |
-
//
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
* Prevent amp-mustache syntax from getting URL-encoded in attributes when saveHTML is done.
|
61 |
-
* While this is applying to the entire document, it only really matters inside of <template>
|
62 |
-
* elements, since URL-encoding of curly braces in href attributes would not normally matter.
|
63 |
-
* But when this is done inside of a <template> then it breaks Mustache. Since Mustache
|
64 |
-
* is logic-less and curly braces are not unsafe for HTML, we can do a global replacement.
|
65 |
-
* The replacement is done on the entire HTML document instead of just inside of the <template>
|
66 |
-
* elements since it is faster and wouldn't change the outcome.
|
67 |
-
*/
|
68 |
-
$placeholders = self::get_mustache_tag_placeholders();
|
69 |
-
$document = str_replace(
|
70 |
-
array_keys( $placeholders ),
|
71 |
-
array_values( $placeholders ),
|
72 |
-
$document
|
73 |
-
);
|
74 |
-
|
75 |
-
// Force all self-closing tags to have closing tags since DOMDocument isn't fully aware.
|
76 |
-
$document = preg_replace(
|
77 |
-
'#<(' . implode( '|', self::$self_closing_tags ) . ')[^>]*>(?!</\1>)#',
|
78 |
-
'$0</$1>',
|
79 |
-
$document
|
80 |
-
);
|
81 |
-
|
82 |
-
// Deal with bugs in older versions of libxml.
|
83 |
-
$added_back_compat_meta_content_type = false;
|
84 |
-
if ( version_compare( LIBXML_DOTTED_VERSION, '2.8', '<' ) ) {
|
85 |
-
/*
|
86 |
-
* Replace noscript elements with placeholders since libxml<2.8 can parse them incorrectly.
|
87 |
-
* When appearing in the head element, a noscript can cause the head to close prematurely
|
88 |
-
* and the noscript gets moved to the body and anything after it which was in the head.
|
89 |
-
* See <https://stackoverflow.com/questions/39013102/why-does-noscript-move-into-body-tag-instead-of-head-tag>.
|
90 |
-
*/
|
91 |
-
$document = preg_replace_callback(
|
92 |
-
'#<noscript[^>]*>.*?</noscript>#si',
|
93 |
-
function( $matches ) {
|
94 |
-
$placeholder = sprintf( '<!--noscript:%s-->', (string) wp_rand() );
|
95 |
-
AMP_DOM_Utils::$noscript_placeholder_comments[ $placeholder ] = $matches[0];
|
96 |
-
return $placeholder;
|
97 |
-
},
|
98 |
-
$document
|
99 |
-
);
|
100 |
-
|
101 |
-
/*
|
102 |
-
* Add a pre-HTML5-style declaration of the encoding since libxml<2.8 doesn't recognize
|
103 |
-
* HTML5's meta charset. See <https://bugzilla.gnome.org/show_bug.cgi?id=655218>.
|
104 |
-
*/
|
105 |
-
$document = preg_replace(
|
106 |
-
'#(?=<meta\s+charset=["\']?([a-z0-9_-]+))#i',
|
107 |
-
'<meta http-equiv="Content-Type" content="text/html; charset=$1" id="meta-http-equiv-content-type">',
|
108 |
-
$document,
|
109 |
-
1,
|
110 |
-
$count
|
111 |
-
);
|
112 |
-
if ( 1 === $count ) {
|
113 |
-
$added_back_compat_meta_content_type = true;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
-
/*
|
118 |
-
* Wrap in dummy tags, since XML needs one parent node.
|
119 |
-
* It also makes it easier to loop through nodes.
|
120 |
-
* We can later use this to extract our nodes.
|
121 |
-
* Add charset so loadHTML does not have problems parsing it.
|
122 |
-
*/
|
123 |
-
$result = $dom->loadHTML( $document );
|
124 |
|
125 |
libxml_clear_errors();
|
126 |
libxml_use_internal_errors( $libxml_previous_state );
|
@@ -129,321 +18,32 @@ class AMP_DOM_Utils {
|
|
129 |
return false;
|
130 |
}
|
131 |
|
132 |
-
// Remove pre-HTML5-style encoding declaration if added above.
|
133 |
-
if ( $added_back_compat_meta_content_type ) {
|
134 |
-
$meta_http_equiv_element = $dom->getElementById( 'meta-http-equiv-content-type' );
|
135 |
-
if ( $meta_http_equiv_element ) {
|
136 |
-
$meta_http_equiv_element->parentNode->removeChild( $meta_http_equiv_element );
|
137 |
-
}
|
138 |
-
}
|
139 |
-
|
140 |
return $dom;
|
141 |
}
|
142 |
|
143 |
-
/**
|
144 |
-
* Get attribute prefix for converted amp-bind attributes.
|
145 |
-
*
|
146 |
-
* This contains a random string to prevent HTML content containing this data- attribute
|
147 |
-
* originally from being mutated to contain an amp-bind attribute when attributes are restored.
|
148 |
-
*
|
149 |
-
* @since 0.7
|
150 |
-
* @see \AMP_DOM_Utils::convert_amp_bind_attributes()
|
151 |
-
* @see \AMP_DOM_Utils::restore_amp_bind_attributes()
|
152 |
-
* @link https://www.ampproject.org/docs/reference/components/amp-bind
|
153 |
-
*
|
154 |
-
* @return string HTML5 data-* attribute name prefix for AMP binding attributes.
|
155 |
-
*/
|
156 |
-
public static function get_amp_bind_placeholder_prefix() {
|
157 |
-
static $attribute_prefix;
|
158 |
-
if ( ! isset( $attribute_prefix ) ) {
|
159 |
-
$attribute_prefix = sprintf( 'amp-binding-%s-', md5( wp_rand() ) );
|
160 |
-
}
|
161 |
-
return $attribute_prefix;
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Get amp-mustache tag/placeholder mappings.
|
166 |
-
*
|
167 |
-
* @since 0.7
|
168 |
-
* @see \wpdb::placeholder_escape()
|
169 |
-
*
|
170 |
-
* @return array Mapping of mustache tag token to its placeholder.
|
171 |
-
*/
|
172 |
-
private static function get_mustache_tag_placeholders() {
|
173 |
-
static $placeholders;
|
174 |
-
if ( ! isset( $placeholders ) ) {
|
175 |
-
$salt = wp_rand();
|
176 |
-
|
177 |
-
// Note: The order of these tokens is important, as it determines the order of the order of the replacements.
|
178 |
-
$tokens = array(
|
179 |
-
'{{{',
|
180 |
-
'}}}',
|
181 |
-
'{{#',
|
182 |
-
'{{^',
|
183 |
-
'{{/',
|
184 |
-
'{{/',
|
185 |
-
'{{',
|
186 |
-
'}}',
|
187 |
-
);
|
188 |
-
$placeholders = array();
|
189 |
-
foreach ( $tokens as $token ) {
|
190 |
-
$placeholders[ $token ] = '_amp_mustache_' . md5( $salt . $token );
|
191 |
-
}
|
192 |
-
}
|
193 |
-
return $placeholders;
|
194 |
-
}
|
195 |
-
|
196 |
-
/**
|
197 |
-
* Replace AMP binding attributes with something that libxml can parse (as HTML5 data-* attributes).
|
198 |
-
*
|
199 |
-
* This is necessary because attributes in square brackets are not understood in PHP and
|
200 |
-
* get dropped with an error raised:
|
201 |
-
* > Warning: DOMDocument::loadHTML(): error parsing attribute name
|
202 |
-
* This is a reciprocal function of AMP_DOM_Utils::restore_amp_bind_attributes().
|
203 |
-
*
|
204 |
-
* @since 0.7
|
205 |
-
* @see \AMP_DOM_Utils::convert_amp_bind_attributes()
|
206 |
-
* @link https://www.ampproject.org/docs/reference/components/amp-bind
|
207 |
-
*
|
208 |
-
* @param string $html HTML containing amp-bind attributes.
|
209 |
-
* @return string HTML with AMP binding attributes replaced with HTML5 data-* attributes.
|
210 |
-
*/
|
211 |
-
public static function convert_amp_bind_attributes( $html ) {
|
212 |
-
$amp_bind_attr_prefix = self::get_amp_bind_placeholder_prefix();
|
213 |
-
|
214 |
-
// Pattern for HTML attribute accounting for binding attr name, boolean attribute, single/double-quoted attribute value, and unquoted attribute values.
|
215 |
-
$attr_regex = '#^\s+(?P<name>\[?[a-zA-Z0-9_\-]+\]?)(?P<value>=(?:"[^"]*"|\'[^\']*\'|[^\'"\s]+))?#';
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Replace callback.
|
219 |
-
*
|
220 |
-
* @param array $tag_matches Tag matches.
|
221 |
-
* @return string Replacement.
|
222 |
-
*/
|
223 |
-
$replace_callback = function( $tag_matches ) use ( $amp_bind_attr_prefix, $attr_regex ) {
|
224 |
-
$old_attrs = rtrim( $tag_matches['attrs'] );
|
225 |
-
$new_attrs = '';
|
226 |
-
$offset = 0;
|
227 |
-
while ( preg_match( $attr_regex, substr( $old_attrs, $offset ), $attr_matches ) ) {
|
228 |
-
$offset += strlen( $attr_matches[0] );
|
229 |
-
|
230 |
-
if ( '[' === $attr_matches['name'][0] ) {
|
231 |
-
$new_attrs .= ' ' . $amp_bind_attr_prefix . trim( $attr_matches['name'], '[]' );
|
232 |
-
if ( isset( $attr_matches['value'] ) ) {
|
233 |
-
$new_attrs .= $attr_matches['value'];
|
234 |
-
}
|
235 |
-
} else {
|
236 |
-
$new_attrs .= $attr_matches[0];
|
237 |
-
}
|
238 |
-
}
|
239 |
-
|
240 |
-
// Bail on parse error which occurs when the regex isn't able to consume the entire $new_attrs string.
|
241 |
-
if ( strlen( $old_attrs ) !== $offset ) {
|
242 |
-
return $tag_matches[0];
|
243 |
-
}
|
244 |
-
|
245 |
-
return '<' . $tag_matches['name'] . $new_attrs . '>';
|
246 |
-
};
|
247 |
-
|
248 |
-
$converted = preg_replace_callback(
|
249 |
-
// Match all start tags that probably contain a binding attribute.
|
250 |
-
'#<(?P<name>[a-zA-Z0-9_\-]+)(?P<attrs>\s[^>]+\]=[^>]+)>#',
|
251 |
-
$replace_callback,
|
252 |
-
$html
|
253 |
-
);
|
254 |
-
|
255 |
-
/**
|
256 |
-
* If the regex engine incurred an error during processing, for example exceeding the backtrack
|
257 |
-
* limit, $converted will be null. In this case we return the originally passed document to allow
|
258 |
-
* DOMDocument to attempt to load it. If the AMP HTML doesn't make use of amp-bind or similar
|
259 |
-
* attributes, then everything should still work.
|
260 |
-
*
|
261 |
-
* See https://github.com/Automattic/amp-wp/issues/993 for additional context on this issue.
|
262 |
-
* See http://php.net/manual/en/pcre.constants.php for additional info on PCRE errors.
|
263 |
-
*/
|
264 |
-
return ( ! is_null( $converted ) ) ? $converted : $html;
|
265 |
-
}
|
266 |
-
|
267 |
-
/**
|
268 |
-
* Convert AMP bind-attributes back to their original syntax.
|
269 |
-
*
|
270 |
-
* This is a reciprocal function of AMP_DOM_Utils::convert_amp_bind_attributes().
|
271 |
-
*
|
272 |
-
* @since 0.7
|
273 |
-
* @see \AMP_DOM_Utils::convert_amp_bind_attributes()
|
274 |
-
* @link https://www.ampproject.org/docs/reference/components/amp-bind
|
275 |
-
*
|
276 |
-
* @param string $html HTML with amp-bind attributes converted.
|
277 |
-
* @return string HTML with amp-bind attributes restored.
|
278 |
-
*/
|
279 |
-
public static function restore_amp_bind_attributes( $html ) {
|
280 |
-
$html = preg_replace(
|
281 |
-
'#\s' . self::get_amp_bind_placeholder_prefix() . '([a-zA-Z0-9_\-]+)#',
|
282 |
-
' [$1]',
|
283 |
-
$html
|
284 |
-
);
|
285 |
-
return $html;
|
286 |
-
}
|
287 |
-
|
288 |
-
/**
|
289 |
-
* Return a valid DOMDocument representing arbitrary HTML content passed as a parameter.
|
290 |
-
*
|
291 |
-
* @see Reciprocal function get_content_from_dom()
|
292 |
-
*
|
293 |
-
* @since 0.2
|
294 |
-
*
|
295 |
-
* @param string $content Valid HTML content to be represented by a DOMDocument.
|
296 |
-
*
|
297 |
-
* @return DOMDocument|false Returns DOMDocument, or false if conversion failed.
|
298 |
-
*/
|
299 |
-
public static function get_dom_from_content( $content ) {
|
300 |
-
/*
|
301 |
-
* Wrap in dummy tags, since XML needs one parent node.
|
302 |
-
* It also makes it easier to loop through nodes.
|
303 |
-
* We can later use this to extract our nodes.
|
304 |
-
* Add utf-8 charset so loadHTML does not have problems parsing it.
|
305 |
-
* See: http://php.net/manual/en/domdocument.loadhtml.php#78243
|
306 |
-
*/
|
307 |
-
$document = sprintf(
|
308 |
-
'<html><head><meta http-equiv="content-type" content="text/html; charset=%s"></head><body>%s</body></html>',
|
309 |
-
get_bloginfo( 'charset' ),
|
310 |
-
$content
|
311 |
-
);
|
312 |
-
|
313 |
-
return self::get_dom( $document );
|
314 |
-
|
315 |
-
}
|
316 |
-
|
317 |
-
/**
|
318 |
-
* Return valid HTML *body* content extracted from the DOMDocument passed as a parameter.
|
319 |
-
*
|
320 |
-
* @since 0.2
|
321 |
-
* @see AMP_DOM_Utils::get_content_from_dom_node() Reciprocal function.
|
322 |
-
*
|
323 |
-
* @param DOMDocument $dom Represents an HTML document from which to extract HTML content.
|
324 |
-
*
|
325 |
-
* @return string Returns the HTML content of the body element represented in the DOMDocument.
|
326 |
-
*/
|
327 |
public static function get_content_from_dom( $dom ) {
|
328 |
-
|
329 |
-
|
330 |
-
* We only want children of the body tag, since we have a subset of HTML.
|
331 |
-
*
|
332 |
-
* @todo We will want to get the full HTML eventually.
|
333 |
-
*/
|
334 |
$body = $dom->getElementsByTagName( 'body' )->item( 0 );
|
335 |
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
return '';
|
341 |
-
}
|
342 |
-
|
343 |
-
$out = '';
|
344 |
|
345 |
-
foreach ( $body->childNodes as $
|
346 |
-
$out .=
|
347 |
}
|
348 |
-
|
349 |
return $out;
|
350 |
}
|
351 |
|
352 |
-
|
353 |
-
/**
|
354 |
-
* Return valid HTML content extracted from the DOMNode passed as a parameter.
|
355 |
-
*
|
356 |
-
* @since 0.6
|
357 |
-
* @see AMP_DOM_Utils::get_dom() Where the operations in this method are mirrored.
|
358 |
-
* @see AMP_DOM_Utils::get_content_from_dom() Reciprocal function.
|
359 |
-
* @todo In the future consider an AMP_DOMDocument subclass that does this automatically at saveHTML(). See <https://github.com/Automattic/amp-wp/pull/895/files#r163825513>.
|
360 |
-
*
|
361 |
-
* @param DOMDocument $dom Represents an HTML document.
|
362 |
-
* @param DOMElement $node Represents an HTML element of the $dom from which to extract HTML content.
|
363 |
-
* @return string Returns the HTML content represented in the DOMNode
|
364 |
-
*/
|
365 |
-
public static function get_content_from_dom_node( $dom, $node ) {
|
366 |
-
/**
|
367 |
-
* Self closing tags regex.
|
368 |
-
*
|
369 |
-
* @var string Regular expression to match self-closing tags
|
370 |
-
* that saveXML() has generated a closing tag for.
|
371 |
-
*/
|
372 |
-
static $self_closing_tags_regex;
|
373 |
-
|
374 |
-
/*
|
375 |
-
* Cache this regex so we don't have to recreate it every call.
|
376 |
-
*/
|
377 |
-
if ( ! isset( $self_closing_tags_regex ) ) {
|
378 |
-
$self_closing_tags = implode( '|', self::$self_closing_tags );
|
379 |
-
$self_closing_tags_regex = "#</({$self_closing_tags})>#i";
|
380 |
-
}
|
381 |
-
|
382 |
-
$html = $dom->saveHTML( $node );
|
383 |
-
|
384 |
-
// Whitespace just causes unit tests to fail... so whitespace begone.
|
385 |
-
if ( '' === trim( $html ) ) {
|
386 |
-
return '';
|
387 |
-
}
|
388 |
-
|
389 |
-
// Restore noscript elements which were temporarily removed to prevent libxml<2.8 parsing problems.
|
390 |
-
if ( version_compare( LIBXML_DOTTED_VERSION, '2.8', '<' ) ) {
|
391 |
-
$html = str_replace(
|
392 |
-
array_keys( self::$noscript_placeholder_comments ),
|
393 |
-
array_values( self::$noscript_placeholder_comments ),
|
394 |
-
$html
|
395 |
-
);
|
396 |
-
}
|
397 |
-
|
398 |
-
$html = self::restore_amp_bind_attributes( $html );
|
399 |
-
|
400 |
-
// Restore amp-mustache placeholders which were replaced to prevent URL-encoded corruption by saveHTML.
|
401 |
-
$placeholders = self::get_mustache_tag_placeholders();
|
402 |
-
$html = str_replace(
|
403 |
-
array_values( $placeholders ),
|
404 |
-
array_keys( $placeholders ),
|
405 |
-
$html
|
406 |
-
);
|
407 |
-
|
408 |
-
/*
|
409 |
-
* Travis w/PHP 7.1 generates <br></br> and <hr></hr> vs. <br/> and <hr/>, respectively.
|
410 |
-
* Travis w/PHP 7.x generates <source ...></source> vs. <source ... />. Etc.
|
411 |
-
* Seems like LIBXML_NOEMPTYTAG was passed, but as you can see it was not.
|
412 |
-
* This does not happen in my (@mikeschinkel) local testing, btw.
|
413 |
-
*/
|
414 |
-
$html = preg_replace( $self_closing_tags_regex, '', $html );
|
415 |
-
|
416 |
-
return $html;
|
417 |
-
}
|
418 |
-
|
419 |
-
/**
|
420 |
-
* Create a new node w/attributes (a DOMElement) and add to the passed DOMDocument.
|
421 |
-
*
|
422 |
-
* @since 0.2
|
423 |
-
*
|
424 |
-
* @param DOMDocument $dom A representation of an HTML document to add the new node to.
|
425 |
-
* @param string $tag A valid HTML element tag for the element to be added.
|
426 |
-
* @param string[] $attributes One of more valid attributes for the new node.
|
427 |
-
*
|
428 |
-
* @return DOMElement|false The DOMElement for the given $tag, or false on failure
|
429 |
-
*/
|
430 |
public static function create_node( $dom, $tag, $attributes ) {
|
431 |
$node = $dom->createElement( $tag );
|
432 |
self::add_attributes_to_node( $node, $attributes );
|
433 |
-
|
434 |
return $node;
|
435 |
}
|
436 |
|
437 |
-
/**
|
438 |
-
* Extract a DOMElement node's HTML element attributes and return as an array.
|
439 |
-
*
|
440 |
-
* @since 0.2
|
441 |
-
*
|
442 |
-
* @param DOMNode $node Represents an HTML element for which to extract attributes.
|
443 |
-
*
|
444 |
-
* @return string[] The attributes for the passed node, or an
|
445 |
-
* empty array if it has no attributes.
|
446 |
-
*/
|
447 |
public static function get_node_attributes_as_assoc_array( $node ) {
|
448 |
$attributes = array();
|
449 |
if ( ! $node->hasAttributes() ) {
|
@@ -453,91 +53,70 @@ class AMP_DOM_Utils {
|
|
453 |
foreach ( $node->attributes as $attribute ) {
|
454 |
$attributes[ $attribute->nodeName ] = $attribute->nodeValue;
|
455 |
}
|
456 |
-
|
457 |
return $attributes;
|
458 |
}
|
459 |
|
460 |
-
/**
|
461 |
-
* Add one or more HTML element attributes to a node's DOMElement.
|
462 |
-
*
|
463 |
-
* @since 0.2
|
464 |
-
*
|
465 |
-
* @param DOMElement $node Represents an HTML element.
|
466 |
-
* @param string[] $attributes One or more attributes for the node's HTML element.
|
467 |
-
*/
|
468 |
public static function add_attributes_to_node( $node, $attributes ) {
|
469 |
foreach ( $attributes as $name => $value ) {
|
470 |
$node->setAttribute( $name, $value );
|
471 |
}
|
472 |
}
|
473 |
|
474 |
-
/**
|
475 |
-
* Determines if a DOMElement's node is empty or not..
|
476 |
-
*
|
477 |
-
* @since 0.2
|
478 |
-
*
|
479 |
-
* @param DOMElement $node Represents an HTML element.
|
480 |
-
* @return bool Returns true if the DOMElement has no child nodes and
|
481 |
-
* the textContent property of the DOMElement is empty;
|
482 |
-
* Otherwise it returns false.
|
483 |
-
*/
|
484 |
public static function is_node_empty( $node ) {
|
485 |
-
return false === $node->hasChildNodes()
|
|
|
486 |
}
|
487 |
|
488 |
-
|
489 |
-
* Forces HTML element closing tags given a DOMDocument and optional DOMElement
|
490 |
-
*
|
491 |
-
* @since 0.2
|
492 |
-
* @deprecated
|
493 |
-
*
|
494 |
-
* @param DOMDocument $dom Represents HTML document on which to force closing tags.
|
495 |
-
* @param DOMElement $node Represents HTML element to start closing tags on.
|
496 |
-
* If not passed, defaults to first child of body.
|
497 |
-
*/
|
498 |
-
public static function recursive_force_closing_tags( $dom, $node = null ) {
|
499 |
-
_deprecated_function( __METHOD__, '0.7' );
|
500 |
-
|
501 |
-
if ( is_null( $node ) ) {
|
502 |
-
$node = $dom->getElementsByTagName( 'body' )->item( 0 );
|
503 |
-
}
|
504 |
-
|
505 |
if ( XML_ELEMENT_NODE !== $node->nodeType ) {
|
506 |
return;
|
507 |
}
|
508 |
|
509 |
if ( self::is_self_closing_tag( $node->nodeName ) ) {
|
510 |
-
/*
|
511 |
-
* Ensure there is no text content to accidentally force a child
|
512 |
-
*/
|
513 |
-
$node->textContent = null;
|
514 |
return;
|
515 |
}
|
516 |
|
517 |
if ( self::is_node_empty( $node ) ) {
|
518 |
$text_node = $dom->createTextNode( '' );
|
519 |
$node->appendChild( $text_node );
|
520 |
-
|
521 |
return;
|
522 |
}
|
523 |
|
524 |
$num_children = $node->childNodes->length;
|
525 |
-
for ( $i = $num_children - 1; $i >= 0; $i
|
526 |
$child = $node->childNodes->item( $i );
|
527 |
self::recursive_force_closing_tags( $dom, $child );
|
528 |
}
|
529 |
-
|
530 |
}
|
531 |
|
532 |
-
/**
|
533 |
-
* Determines if an HTML element tag is validly a self-closing tag per W3C HTML5 specs.
|
534 |
-
*
|
535 |
-
* @since 0.2
|
536 |
-
*
|
537 |
-
* @param string $tag Tag.
|
538 |
-
* @return bool Returns true if a valid self-closing tag, false if not.
|
539 |
-
*/
|
540 |
private static function is_self_closing_tag( $tag ) {
|
541 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
542 |
}
|
543 |
}
|
1 |
<?php
|
2 |
|
3 |
class AMP_DOM_Utils {
|
4 |
+
public static function get_dom_from_content( $content ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
$libxml_previous_state = libxml_use_internal_errors( true );
|
6 |
|
7 |
+
$dom = new DOMDocument;
|
8 |
+
// Wrap in dummy tags, since XML needs one parent node.
|
9 |
+
// It also makes it easier to loop through nodes.
|
10 |
+
// We can later use this to extract our nodes.
|
11 |
+
// Add utf-8 charset so loadHTML does not have problems parsing it. See: http://php.net/manual/en/domdocument.loadhtml.php#78243
|
12 |
+
$result = $dom->loadHTML( '<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body>' . $content . '</body></html>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
libxml_clear_errors();
|
15 |
libxml_use_internal_errors( $libxml_previous_state );
|
18 |
return false;
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
return $dom;
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public static function get_content_from_dom( $dom ) {
|
25 |
+
// Only want children of the body tag, since we have a subset of HTML.
|
26 |
+
$out = '';
|
|
|
|
|
|
|
|
|
27 |
$body = $dom->getElementsByTagName( 'body' )->item( 0 );
|
28 |
|
29 |
+
// AMP elements always need closing tags.
|
30 |
+
// To force them, we can't use saveHTML (node support is 5.3+) and LIBXML_NOEMPTYTAG results in issues with self-closing tags like `br` and `hr`.
|
31 |
+
// So, we're manually forcing closing tags.
|
32 |
+
self::recursive_force_closing_tags( $dom, $body );
|
|
|
|
|
|
|
|
|
33 |
|
34 |
+
foreach ( $body->childNodes as $node ) {
|
35 |
+
$out .= $dom->saveXML( $node );
|
36 |
}
|
37 |
+
$out = apply_filters('amp_get_content_from_dom', $out);
|
38 |
return $out;
|
39 |
}
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
public static function create_node( $dom, $tag, $attributes ) {
|
42 |
$node = $dom->createElement( $tag );
|
43 |
self::add_attributes_to_node( $node, $attributes );
|
|
|
44 |
return $node;
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
public static function get_node_attributes_as_assoc_array( $node ) {
|
48 |
$attributes = array();
|
49 |
if ( ! $node->hasAttributes() ) {
|
53 |
foreach ( $node->attributes as $attribute ) {
|
54 |
$attributes[ $attribute->nodeName ] = $attribute->nodeValue;
|
55 |
}
|
|
|
56 |
return $attributes;
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
public static function add_attributes_to_node( $node, $attributes ) {
|
60 |
foreach ( $attributes as $name => $value ) {
|
61 |
$node->setAttribute( $name, $value );
|
62 |
}
|
63 |
}
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
public static function is_node_empty( $node ) {
|
66 |
+
return false === $node->hasChildNodes()
|
67 |
+
&& empty( $node->textContent );
|
68 |
}
|
69 |
|
70 |
+
public static function recursive_force_closing_tags( $dom, $node ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
if ( XML_ELEMENT_NODE !== $node->nodeType ) {
|
72 |
return;
|
73 |
}
|
74 |
|
75 |
if ( self::is_self_closing_tag( $node->nodeName ) ) {
|
|
|
|
|
|
|
|
|
76 |
return;
|
77 |
}
|
78 |
|
79 |
if ( self::is_node_empty( $node ) ) {
|
80 |
$text_node = $dom->createTextNode( '' );
|
81 |
$node->appendChild( $text_node );
|
|
|
82 |
return;
|
83 |
}
|
84 |
|
85 |
$num_children = $node->childNodes->length;
|
86 |
+
for ( $i = $num_children - 1; $i >= 0; $i-- ) {
|
87 |
$child = $node->childNodes->item( $i );
|
88 |
self::recursive_force_closing_tags( $dom, $child );
|
89 |
}
|
|
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
private static function is_self_closing_tag( $tag ) {
|
93 |
+
// This function is called a lot; the static var prevents having to re-create the array every time.
|
94 |
+
static $self_closing_tags;
|
95 |
+
if ( ! isset( $self_closing_tags ) ) {
|
96 |
+
// https://www.w3.org/TR/html5/syntax.html#serializing-html-fragments
|
97 |
+
// Not all are valid AMP, but we include them for completeness.
|
98 |
+
$self_closing_tags = array(
|
99 |
+
'area',
|
100 |
+
'base',
|
101 |
+
'basefont',
|
102 |
+
'bgsound',
|
103 |
+
'br',
|
104 |
+
'col',
|
105 |
+
'embed',
|
106 |
+
'frame',
|
107 |
+
'hr',
|
108 |
+
'img',
|
109 |
+
'input',
|
110 |
+
'keygen',
|
111 |
+
'link',
|
112 |
+
'meta',
|
113 |
+
'param',
|
114 |
+
'source',
|
115 |
+
'track',
|
116 |
+
'wbr',
|
117 |
+
);
|
118 |
+
}
|
119 |
+
|
120 |
+
return in_array( $tag, $self_closing_tags, true );
|
121 |
}
|
122 |
}
|
includes/vendor/amp/templates/meta-author.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<?php $author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 24 ) ); ?>
|
4 |
<div class="amp-wp-meta amp-wp-byline">
|
5 |
<?php if ( function_exists( 'get_avatar_url' ) ) : ?>
|
6 |
-
<amp-img
|
7 |
<?php endif; ?>
|
8 |
<span class="amp-wp-author author vcard"><?php echo esc_html( $post_author->display_name ); ?></span>
|
9 |
</div>
|
3 |
<?php $author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 24 ) ); ?>
|
4 |
<div class="amp-wp-meta amp-wp-byline">
|
5 |
<?php if ( function_exists( 'get_avatar_url' ) ) : ?>
|
6 |
+
<amp-img data-block-on-consent src="<?php echo esc_url( $author_avatar_url ); ?>" width="24" height="24" layout="fixed"></amp-img>
|
7 |
<?php endif; ?>
|
8 |
<span class="amp-wp-author author vcard"><?php echo esc_html( $post_author->display_name ); ?></span>
|
9 |
</div>
|
includes/vendor/vendor-changelog.txt
CHANGED
@@ -47,6 +47,4 @@ Reason: To extend the functionality of sidebars and Pagebuilder
|
|
47 |
20. Modification is class-amp-blacklist-sanitizer.php #1958
|
48 |
21. ampforwp_post_content_filter filter added in class-amp-post-template.php #2001
|
49 |
22. hook action changed from amp_post_template_head to amp_post_template_footer for function amp_post_template_add_schemaorg_metadata() in amp-post-template-actions.php #1945
|
50 |
-
23. Section specific class added for subsections in framework.php on line number 3288
|
51 |
-
24. ALTER black list sanitizer LINE no 37 Added Href internal links changes
|
52 |
-
25. check added in class-amp-content.php on line no.107 #2173
|
47 |
20. Modification is class-amp-blacklist-sanitizer.php #1958
|
48 |
21. ampforwp_post_content_filter filter added in class-amp-post-template.php #2001
|
49 |
22. hook action changed from amp_post_template_head to amp_post_template_footer for function amp_post_template_add_schemaorg_metadata() in amp-post-template-actions.php #1945
|
50 |
+
23. Section specific class added for subsections in framework.php on line number 3288
|
|
|
|
pagebuilder/amp-page-builder.php
CHANGED
@@ -83,7 +83,7 @@ function call_page_builder(){
|
|
83 |
$ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
|
84 |
$previousData = isset($previousData[0])? $previousData[0]: null;
|
85 |
|
86 |
-
$previousData = (str_replace("'", "
|
87 |
|
88 |
$totalRows = 1;
|
89 |
$totalmodules = 1;
|
@@ -172,8 +172,6 @@ function call_page_builder(){
|
|
172 |
>
|
173 |
<i class="tools-icon dashicons dashicons-menu"></i>
|
174 |
</span>
|
175 |
-
<span @click="duplicateRow($event)" class="amppb-duplicate dashicons dashicons-admin-page" :data-rowid="row.id"></span>
|
176 |
-
|
177 |
</div><!-- .amppb-row-title -->
|
178 |
|
179 |
<div class="amppb-row-fields col" data-cell="1">
|
@@ -212,7 +210,6 @@ function call_page_builder(){
|
|
212 |
>
|
213 |
<span class="tools-icon dashicons dashicons-menu"></span>
|
214 |
</span>
|
215 |
-
<span @click="duplicateRow($event)" class="amppb-duplicate dashicons dashicons-admin-page" :data-rowid="row.id"></span>
|
216 |
</div><!-- .amppb-row-title -->
|
217 |
|
218 |
<div class="amppb-row-fields ">
|
83 |
$ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
|
84 |
$previousData = isset($previousData[0])? $previousData[0]: null;
|
85 |
|
86 |
+
$previousData = (str_replace("'", "", $previousData));
|
87 |
|
88 |
$totalRows = 1;
|
89 |
$totalmodules = 1;
|
172 |
>
|
173 |
<i class="tools-icon dashicons dashicons-menu"></i>
|
174 |
</span>
|
|
|
|
|
175 |
</div><!-- .amppb-row-title -->
|
176 |
|
177 |
<div class="amppb-row-fields col" data-cell="1">
|
210 |
>
|
211 |
<span class="tools-icon dashicons dashicons-menu"></span>
|
212 |
</span>
|
|
|
213 |
</div><!-- .amppb-row-title -->
|
214 |
|
215 |
<div class="amppb-row-fields ">
|
pagebuilder/components/fieldsTemplate.php
CHANGED
@@ -2,48 +2,37 @@
|
|
2 |
<div class="amp-form-control" :id="field.name" data-type="text" v-if="field.type=='text' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
3 |
|
4 |
<div class="form-label">{{field.label}}</div>
|
5 |
-
<div class="form-field"><input type="text" class="full text" :id="field.id" :name="field.name"
|
6 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
7 |
-
</div>
|
8 |
<div class="clearfix"></div>
|
9 |
</div>
|
10 |
<div class="amp-form-control" :id="field.name" data-type="hidden" v-else-if="field.type=='hidden' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
11 |
<div class="form-label">{{field.label}}</div>
|
12 |
-
<div class="form-field"><input type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default">
|
13 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
14 |
-
</div>
|
15 |
<div class="clearfix"></div>
|
16 |
</div>
|
17 |
|
18 |
<div class="amp-form-control" :id="field.name" data-type="number" v-else-if="field.type=='number' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
19 |
<div class="form-label">{{field.label}}</div>
|
20 |
-
<div class="form-field"><input type="number" class="full text" :id="field.id" :name="field.name" v-model="field.default">
|
21 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
22 |
-
</div>
|
23 |
<div class="clearfix"></div>
|
24 |
</div>
|
25 |
|
26 |
<?php /*Normal Textarea*/?>
|
27 |
<div class="amp-form-control" :id="field.name" data-type='textarea' v-else-if="field.type=='textarea' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
28 |
<div class="form-label">{{field.label}}</div>
|
29 |
-
<div class="form-field"><textarea class="full textarea" :id="field.id" :name="field.name" v-model="field.default"></textarea>
|
30 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
31 |
-
</div>
|
32 |
<div class="clearfix"></div>
|
33 |
</div>
|
34 |
|
35 |
<div class="amp-form-control" :id="field.name" data-type="text-editor" v-else-if="field.type=='text-editor' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
36 |
<div class="form-label" style="position: absolute;margin-top: 10px;">{{field.label}}</div>
|
37 |
-
<div class="form-field"><textarea-wysiwyg :default-text="field" :fieldindex="fieldkey"></textarea-wysiwyg>
|
38 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
39 |
-
</div>
|
40 |
<div class="clearfix"></div>
|
41 |
</div>
|
42 |
|
43 |
<div class="amp-form-control" :id="field.name" data-type="select" v-else-if="field.type=='select' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
44 |
<div class="form-label">{{field.label}}</div>
|
45 |
-
<div class="form-field">
|
46 |
-
<select type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default" v-if="field.options_details.length!=0">
|
47 |
<option value="">Select option</option>
|
48 |
<option
|
49 |
v-for="(option, key, index) in field.options_details"
|
@@ -53,7 +42,6 @@
|
|
53 |
{{option}}
|
54 |
</option>
|
55 |
</select>
|
56 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
57 |
</div>
|
58 |
<div class="clearfix"></div>
|
59 |
</div>
|
@@ -65,7 +53,6 @@
|
|
65 |
<input type="checkbox" :value="val.value" v-model="field.default" >
|
66 |
{{val.label}}
|
67 |
</label>
|
68 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
69 |
</div>
|
70 |
<div class="clearfix"></div>
|
71 |
</div>
|
@@ -76,7 +63,6 @@
|
|
76 |
<input type="checkbox" :value="val.value" :checked="field.default" v-model="field.default" v-bind:true-value="val.value" v-bind:false-value="0">
|
77 |
{{val.label}}
|
78 |
</label>
|
79 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
80 |
</div>
|
81 |
<div class="clearfix"></div>
|
82 |
</div>
|
@@ -112,7 +98,6 @@
|
|
112 |
<input type="text" data-type="margin" data-pos="left" v-model="field.default.left">
|
113 |
</label>
|
114 |
<div class="clearfix"></div>
|
115 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
116 |
</div>
|
117 |
|
118 |
<div class="clearfix"></div>
|
@@ -131,7 +116,6 @@
|
|
131 |
<img v-if="field.default!=''" src="../wp-includes/images/spinner.gif" :data-src="refresh_image(field.default,this,'tag',field)" class="amppbimageuploadField"/>
|
132 |
<span class="dashicons-before dashicons-no link" @click="removeSelectedImage(field)"></span>
|
133 |
</div>
|
134 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
135 |
</div>
|
136 |
<div class="clearfix"></div>
|
137 |
</div>
|
@@ -144,7 +128,6 @@
|
|
144 |
<span class="button" @click="openIconOptions=!openIconOptions;">Select Icon</span>
|
145 |
<i v-if="field.default!=''" class="amppb-icon " :class="'icon-'+field.default"></i>
|
146 |
<input type="hidden" v-model="field.default">
|
147 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
148 |
</div>
|
149 |
<div class="select-icons" :class="{'hide': (!openIconOptions)}">
|
150 |
<span class="amppb-icon-close" @click="openIconOptions=!openIconOptions;"><i class=" icon-close"></i></span>
|
@@ -165,7 +148,6 @@
|
|
165 |
<span class="button" @click="openIconOptions=!openIconOptions;">
|
166 |
Select Gradient</span>
|
167 |
<input type="hidden" v-model="field.default">
|
168 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
169 |
</div>
|
170 |
<div class="select-icons select-gradient-box" :class="{'hide': (!openIconOptions)}" :style="field.default">
|
171 |
<span class="amppb-icon-close" @click="openIconOptions=!openIconOptions;"><i class=" icon-close"></i></span>
|
@@ -395,7 +377,6 @@
|
|
395 |
<div class="form-label label_txt">{{field.label}}</div>
|
396 |
<div class="form-field color-wrapper" style="line-height: 35px" >
|
397 |
<color-picker :colorfield="field"></color-picker>
|
398 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
399 |
</div>
|
400 |
|
401 |
<div class="clearfix"></div>
|
@@ -409,7 +390,6 @@
|
|
409 |
<label :data-value="option.value">{{option.label}}</label>
|
410 |
<img :data-value="option.value" :src="option.demo_image">
|
411 |
</div>
|
412 |
-
<div class="help-msg" v-html="field.helpmessage"></div>
|
413 |
</div>
|
414 |
|
415 |
<div class="clearfix"></div>
|
2 |
<div class="amp-form-control" :id="field.name" data-type="text" v-if="field.type=='text' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
3 |
|
4 |
<div class="form-label">{{field.label}}</div>
|
5 |
+
<div class="form-field"><input type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default"></div>
|
|
|
|
|
6 |
<div class="clearfix"></div>
|
7 |
</div>
|
8 |
<div class="amp-form-control" :id="field.name" data-type="hidden" v-else-if="field.type=='hidden' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
9 |
<div class="form-label">{{field.label}}</div>
|
10 |
+
<div class="form-field"><input type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default"></div>
|
|
|
|
|
11 |
<div class="clearfix"></div>
|
12 |
</div>
|
13 |
|
14 |
<div class="amp-form-control" :id="field.name" data-type="number" v-else-if="field.type=='number' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
15 |
<div class="form-label">{{field.label}}</div>
|
16 |
+
<div class="form-field"><input type="number" class="full text" :id="field.id" :name="field.name" v-model="field.default"></div>
|
|
|
|
|
17 |
<div class="clearfix"></div>
|
18 |
</div>
|
19 |
|
20 |
<?php /*Normal Textarea*/?>
|
21 |
<div class="amp-form-control" :id="field.name" data-type='textarea' v-else-if="field.type=='textarea' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
22 |
<div class="form-label">{{field.label}}</div>
|
23 |
+
<div class="form-field"><textarea class="full textarea" :id="field.id" :name="field.name" v-model="field.default"></textarea></div>
|
|
|
|
|
24 |
<div class="clearfix"></div>
|
25 |
</div>
|
26 |
|
27 |
<div class="amp-form-control" :id="field.name" data-type="text-editor" v-else-if="field.type=='text-editor' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
28 |
<div class="form-label" style="position: absolute;margin-top: 10px;">{{field.label}}</div>
|
29 |
+
<div class="form-field"><textarea-wysiwyg :default-text="field" :fieldindex="fieldkey"></textarea-wysiwyg></div>
|
|
|
|
|
30 |
<div class="clearfix"></div>
|
31 |
</div>
|
32 |
|
33 |
<div class="amp-form-control" :id="field.name" data-type="select" v-else-if="field.type=='select' && (field.tab==defaulttab || repeater==1)" :data-require="JSON.stringify(field.required)" v-show="fieldShowHideCheck(field)">
|
34 |
<div class="form-label">{{field.label}}</div>
|
35 |
+
<div class="form-field"><select type="text" class="full text" :id="field.id" :name="field.name" v-model="field.default">
|
|
|
36 |
<option value="">Select option</option>
|
37 |
<option
|
38 |
v-for="(option, key, index) in field.options_details"
|
42 |
{{option}}
|
43 |
</option>
|
44 |
</select>
|
|
|
45 |
</div>
|
46 |
<div class="clearfix"></div>
|
47 |
</div>
|
53 |
<input type="checkbox" :value="val.value" v-model="field.default" >
|
54 |
{{val.label}}
|
55 |
</label>
|
|
|
56 |
</div>
|
57 |
<div class="clearfix"></div>
|
58 |
</div>
|
63 |
<input type="checkbox" :value="val.value" :checked="field.default" v-model="field.default" v-bind:true-value="val.value" v-bind:false-value="0">
|
64 |
{{val.label}}
|
65 |
</label>
|
|
|
66 |
</div>
|
67 |
<div class="clearfix"></div>
|
68 |
</div>
|
98 |
<input type="text" data-type="margin" data-pos="left" v-model="field.default.left">
|
99 |
</label>
|
100 |
<div class="clearfix"></div>
|
|
|
101 |
</div>
|
102 |
|
103 |
<div class="clearfix"></div>
|
116 |
<img v-if="field.default!=''" src="../wp-includes/images/spinner.gif" :data-src="refresh_image(field.default,this,'tag',field)" class="amppbimageuploadField"/>
|
117 |
<span class="dashicons-before dashicons-no link" @click="removeSelectedImage(field)"></span>
|
118 |
</div>
|
|
|
119 |
</div>
|
120 |
<div class="clearfix"></div>
|
121 |
</div>
|
128 |
<span class="button" @click="openIconOptions=!openIconOptions;">Select Icon</span>
|
129 |
<i v-if="field.default!=''" class="amppb-icon " :class="'icon-'+field.default"></i>
|
130 |
<input type="hidden" v-model="field.default">
|
|
|
131 |
</div>
|
132 |
<div class="select-icons" :class="{'hide': (!openIconOptions)}">
|
133 |
<span class="amppb-icon-close" @click="openIconOptions=!openIconOptions;"><i class=" icon-close"></i></span>
|
148 |
<span class="button" @click="openIconOptions=!openIconOptions;">
|
149 |
Select Gradient</span>
|
150 |
<input type="hidden" v-model="field.default">
|
|
|
151 |
</div>
|
152 |
<div class="select-icons select-gradient-box" :class="{'hide': (!openIconOptions)}" :style="field.default">
|
153 |
<span class="amppb-icon-close" @click="openIconOptions=!openIconOptions;"><i class=" icon-close"></i></span>
|
377 |
<div class="form-label label_txt">{{field.label}}</div>
|
378 |
<div class="form-field color-wrapper" style="line-height: 35px" >
|
379 |
<color-picker :colorfield="field"></color-picker>
|
|
|
380 |
</div>
|
381 |
|
382 |
<div class="clearfix"></div>
|
390 |
<label :data-value="option.value">{{option.label}}</label>
|
391 |
<img :data-value="option.value" :src="option.demo_image">
|
392 |
</div>
|
|
|
393 |
</div>
|
394 |
|
395 |
<div class="clearfix"></div>
|
pagebuilder/components/modulePopupTemplate.php
CHANGED
@@ -19,16 +19,7 @@
|
|
19 |
</ul>
|
20 |
</div>
|
21 |
<div class="modal-header">
|
22 |
-
<h3>{{modalcontent.label}}
|
23 |
-
<em v-if="editModuleTempTitle==false"> : {{modalcontent.cell_identity_name}}
|
24 |
-
<i class="dashicons-head dashicons dashicons-edit" v-on:click="editModuleTempTitle = modalcontent.cell_identity_name"></i>
|
25 |
-
</em>
|
26 |
-
<em v-if="editModuleTempTitle!=false">
|
27 |
-
<input type="text" v-model="modalcontent.cell_identity_name">
|
28 |
-
<span v-on:click="saveModuleTitle(modalcontent);"><i class="dashicons-head dashicons dashicons-yes"></i></span>
|
29 |
-
<span v-on:click="cancleModuleTitle(modalcontent);"><i class="dashicons-head dashicons dashicons-no"></i></span>
|
30 |
-
</em>
|
31 |
-
</h3>
|
32 |
</div>
|
33 |
<div class="modal-body">
|
34 |
<div class="modal-settings">
|
19 |
</ul>
|
20 |
</div>
|
21 |
<div class="modal-header">
|
22 |
+
<h3>{{modalcontent.label}}</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
</div>
|
24 |
<div class="modal-body">
|
25 |
<div class="modal-settings">
|
pagebuilder/components/modulesHtmlTemplate.php
CHANGED
@@ -28,20 +28,11 @@
|
|
28 |
:data-module_id="cell.cell_id"
|
29 |
>
|
30 |
|
31 |
-
|
32 |
-
<em v-if="cell.cell_identity_name"> {{cell.cell_identity_name}} </em>
|
33 |
-
</span>
|
34 |
<span class="amppb-setting-right">
|
35 |
-
<label @click="duplicateModule($event)" class="link amppb-module-copy" title="'.$module['label'].'"
|
36 |
-
:data-module_id="cell.cell_id"
|
37 |
-
:data-container_id="cell.container_id"
|
38 |
-
>
|
39 |
-
<span class=" dashicons dashicons-admin-page"></span>
|
40 |
-
</label>
|
41 |
<label @click="showModulePopUp($event)" class="link" title="'.$module['label'].'" data-popupContent=\''.json_encode($module).'\'
|
42 |
:data-module_id="cell.cell_id"
|
43 |
:data-container_id="cell.container_id"
|
44 |
-
:data-cell_identity_name = cell.cell_identity_name
|
45 |
>
|
46 |
<span class="dashicons dashicons-admin-generic"></span>
|
47 |
</label>
|
28 |
:data-module_id="cell.cell_id"
|
29 |
>
|
30 |
|
31 |
+
<span class="module_label">'.$module['label'].'</span>
|
|
|
|
|
32 |
<span class="amppb-setting-right">
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
<label @click="showModulePopUp($event)" class="link" title="'.$module['label'].'" data-popupContent=\''.json_encode($module).'\'
|
34 |
:data-module_id="cell.cell_id"
|
35 |
:data-container_id="cell.container_id"
|
|
|
36 |
>
|
37 |
<span class="dashicons dashicons-admin-generic"></span>
|
38 |
</label>
|
pagebuilder/config/moduleTemplate.php
CHANGED
@@ -53,43 +53,18 @@ if(!function_exists("ampforwp_module_templates")){
|
|
53 |
}//If Fucntion check closed
|
54 |
|
55 |
//Row Contents
|
56 |
-
$output = '<section class="ap_m {{row_class}} {{grid_type}}
|
57 |
-
{{if_condition_background_type==video}}
|
58 |
-
<div class="amp_video">
|
59 |
-
<div class="amp-txt">
|
60 |
-
<h1>{{title}}</h1>
|
61 |
-
{{content_title}}
|
62 |
-
</div>
|
63 |
-
<amp-iframe class="vdo" width="854" height="480"
|
64 |
-
sandbox="allow-scripts allow-same-origin"
|
65 |
-
layout="responsive"
|
66 |
-
frameborder="0"
|
67 |
-
src="{{row_background_video}}">
|
68 |
-
</amp-iframe>
|
69 |
-
{{if_condition_check_for_overlay==1}}
|
70 |
-
<div class="overlay"></div>
|
71 |
-
{{ifend_condition_check_for_overlay_1}}
|
72 |
-
</div>
|
73 |
-
{{ifend_condition_background_type_video}}
|
74 |
-
';
|
75 |
$outputEnd = '<div class="cb"></div> </section>';
|
76 |
$front_css = '
|
77 |
-
{{if_condition_background_type==image}}
|
78 |
{{row-class}}{
|
79 |
background-image: url({{row_background_image}});
|
80 |
background-repeat: no-repeat;
|
81 |
background-size: cover;
|
82 |
height: auto;
|
83 |
background-position:{{align_type}};
|
84 |
-
{{if_condition_check_for_parallax==1}}
|
85 |
-
min-height: 550px;
|
86 |
-
background-attachment: fixed;
|
87 |
-
{{ifend_condition_check_for_parallax_1}}
|
88 |
}
|
89 |
-
{{ifend_condition_background_type_image}}
|
90 |
-
|
91 |
{{row-class}}.amppb-fluid{width:{{fluid-width}};}
|
92 |
-
{{row-class}}.amppb-fluid .col
|
93 |
{{row-class}}.amppb-fixed .col {max-width:{{content-width}};width:{{fixed-width}};margin: 0 auto;}
|
94 |
|
95 |
{{row-class}}{
|
@@ -106,93 +81,9 @@ $front_css = '
|
|
106 |
|
107 |
{{shadow}}
|
108 |
}
|
109 |
-
{{row-class}}.slant_clr{position:relative;}
|
110 |
-
{{if_condition_check_for_enbtp==1}}
|
111 |
-
{{row-class}}.slant_clr:before{
|
112 |
-
content:"";
|
113 |
-
height:110px;
|
114 |
-
width:100%;
|
115 |
-
display:block;
|
116 |
-
background-image:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' preserveAspectRatio=\'none\' viewBox=\'0 0 100 100\'><polygon fill=\'{{color_picker}}\' points=\'0,0 100,0 100,44 0,0\' /></svg>");
|
117 |
-
background-repeat:no-repeat;
|
118 |
-
top: -110px;
|
119 |
-
position: absolute;
|
120 |
-
{{if_condition_align_type_slant==left}}
|
121 |
-
transform: rotate(-180deg);
|
122 |
-
{{ifend_condition_align_type_slant_left}}
|
123 |
-
{{if_condition_align_type_slant==right}}
|
124 |
-
transform: rotate(-180deg) scaleX(-1);
|
125 |
-
{{ifend_condition_align_type_slant_right}}
|
126 |
-
}
|
127 |
-
{{ifend_condition_check_for_enbtp_1}}
|
128 |
-
|
129 |
-
{{if_condition_check_for_enbbt==1}}
|
130 |
-
{{row-class}}.slant_clr:after{
|
131 |
-
content:"";
|
132 |
-
height:110px;
|
133 |
-
width:100%;
|
134 |
-
display:block;
|
135 |
-
background-image:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' preserveAspectRatio=\'none\' viewBox=\'0 0 100 100\'><polygon fill=\'{{color_picker}}\' points=\'0,0 100,0 100,44 0,0\' /></svg>");
|
136 |
-
background-repeat:no-repeat;
|
137 |
-
bottom: -110px;
|
138 |
-
position: absolute;
|
139 |
-
{{if_condition_align_type_slate_btn==lft}}
|
140 |
-
transform: rotate(-0deg) scaleX(-1);
|
141 |
-
{{ifend_condition_align_type_slate_btn_lft}}
|
142 |
-
{{if_condition_align_type_slate_btn==rht}}
|
143 |
-
transform: rotate(0deg);
|
144 |
-
{{ifend_condition_align_type_slate_btn_rht}}
|
145 |
-
}
|
146 |
-
{{ifend_condition_check_for_enbbt_1}}
|
147 |
-
{{if_condition_background_type==video}}
|
148 |
-
{{row-class}} .amp_video{
|
149 |
-
position: relative;
|
150 |
-
}
|
151 |
-
{{row-class}} .amp_video .amp-txt{
|
152 |
-
font-size: {{cnt_size}};
|
153 |
-
line-height: {{cnt_ln_hgt}};
|
154 |
-
font-weight: {{cnt_font_type}};
|
155 |
-
{{if_condition_check_for_overlay==0}}
|
156 |
-
color:{{cnt_color}};
|
157 |
-
{{ifend_condition_check_for_overlay_0}}
|
158 |
-
position: absolute;
|
159 |
-
top: 10%;
|
160 |
-
bottom: auto;
|
161 |
-
left: 20%;
|
162 |
-
right: 20%;
|
163 |
-
margin: 0 auto;
|
164 |
-
text-align: center;
|
165 |
-
z-index: 9;
|
166 |
-
}
|
167 |
-
{{row-class}} .amp-txt h1{
|
168 |
-
font-size: {{tlt_size}};
|
169 |
-
font-weight: {{tlt_wgt}};
|
170 |
-
letter-spacing: {{letter_spacing}};
|
171 |
-
line-height: {{tlt_ln_hgt}};
|
172 |
-
{{if_condition_check_for_overlay==0}}
|
173 |
-
color:{{tlt_color}};
|
174 |
-
{{ifend_condition_check_for_overlay_0}}
|
175 |
-
margin-bottom:20px;
|
176 |
-
}
|
177 |
-
{{if_condition_check_for_overlay==1}}
|
178 |
-
{{row-class}} .overlay{
|
179 |
-
background: #000;
|
180 |
-
bottom: 0;
|
181 |
-
left: 0;
|
182 |
-
position: absolute;
|
183 |
-
right: 0;
|
184 |
-
top: 0;
|
185 |
-
opacity: 0.4;
|
186 |
-
}
|
187 |
-
{{row-class}} .amp-txt{
|
188 |
-
color:{{overlay_cnt_color}};
|
189 |
-
}
|
190 |
-
{{ifend_condition_check_for_overlay_1}}
|
191 |
-
{{ifend_condition_background_type_video}}
|
192 |
-
|
193 |
@media(max-width:768px){
|
194 |
{{row-class}}.amppb-fluid{width:100%;}
|
195 |
-
{{row-class}}.amppb-fluid .col
|
196 |
}
|
197 |
|
198 |
@media(max-width:425px){
|
@@ -217,7 +108,6 @@ $containerCommonSettings = array(
|
|
217 |
'tabs' => array(
|
218 |
'customizer'=>'Basic',
|
219 |
'container_css'=>'Advance',
|
220 |
-
'design'=>'Design'
|
221 |
),
|
222 |
'fields' => array(
|
223 |
array(
|
@@ -312,20 +202,11 @@ $containerCommonSettings = array(
|
|
312 |
'options_details'=>array(
|
313 |
'color'=>'Color',
|
314 |
'gradient'=>'Gradient',
|
315 |
-
'image'=>'Background Image'
|
316 |
-
'video'=>'Background Video'
|
317 |
),
|
318 |
-
'content_type'=>'
|
319 |
'output_format'=>''
|
320 |
),
|
321 |
-
array(
|
322 |
-
'type' =>'require_script',
|
323 |
-
'name' =>"embeded_script",
|
324 |
-
'label' =>'amp-iframe',
|
325 |
-
'default' =>'https://cdn.ampproject.org/v0/amp-iframe-0.1.js',
|
326 |
-
'content_type'=>'js',
|
327 |
-
'required' => array('background_type'=>'video'),
|
328 |
-
),
|
329 |
array(
|
330 |
'type' =>'select',
|
331 |
'name' =>'align_type',
|
@@ -348,236 +229,6 @@ $containerCommonSettings = array(
|
|
348 |
'content_type'=>'css',
|
349 |
'required' => array('background_type'=>'image')
|
350 |
),
|
351 |
-
array(
|
352 |
-
'type' =>'text',
|
353 |
-
'name' =>"row_background_video",
|
354 |
-
'label' =>"Background Video URL",
|
355 |
-
'tab' =>'customizer',
|
356 |
-
'default' =>'',
|
357 |
-
'content_type'=>'html',
|
358 |
-
'required' => array('background_type'=>'video')
|
359 |
-
),
|
360 |
-
array(
|
361 |
-
'type' =>'text',
|
362 |
-
'name' =>"title",
|
363 |
-
'label' =>'Background Video Heading',
|
364 |
-
'tab' =>'customizer',
|
365 |
-
'default' =>'Heading',
|
366 |
-
'content_type'=>'html',
|
367 |
-
'required' => array('background_type'=>'video')
|
368 |
-
),
|
369 |
-
array(
|
370 |
-
'type' =>'text-editor',
|
371 |
-
'name' =>"content_title",
|
372 |
-
'label' =>'Background Video Content',
|
373 |
-
'tab' =>'customizer',
|
374 |
-
'default' =>'Write your content in Text Editor',
|
375 |
-
'content_type'=>'html',
|
376 |
-
'required' => array('background_type'=>'video')
|
377 |
-
),
|
378 |
-
array(
|
379 |
-
'type' =>'text',
|
380 |
-
'name' =>"tlt_size",
|
381 |
-
'label' =>'Heading Font Size',
|
382 |
-
'tab' =>'design',
|
383 |
-
'default' =>'35px',
|
384 |
-
'content_type'=>'css',
|
385 |
-
'required' => array('background_type'=>'video')
|
386 |
-
),
|
387 |
-
array(
|
388 |
-
'type' =>'select',
|
389 |
-
'name' =>'tlt_wgt',
|
390 |
-
'label' =>"Heading Font Weight",
|
391 |
-
'tab' =>'design',
|
392 |
-
'default' =>'600',
|
393 |
-
'options_details'=>array(
|
394 |
-
'300' =>'Light',
|
395 |
-
'400' =>'Regular',
|
396 |
-
'500' =>'Medium',
|
397 |
-
'600' =>'Semi Bold',
|
398 |
-
'700' =>'Bold',
|
399 |
-
),
|
400 |
-
'content_type'=>'css',
|
401 |
-
'required' => array('background_type'=>'video')
|
402 |
-
),
|
403 |
-
array(
|
404 |
-
'type' =>'text',
|
405 |
-
'name' =>"letter_spacing",
|
406 |
-
'label' =>'Heading Letter Spacing',
|
407 |
-
'tab' =>'design',
|
408 |
-
'default' =>'1px',
|
409 |
-
'content_type'=>'css',
|
410 |
-
'required' => array('background_type'=>'video')
|
411 |
-
),
|
412 |
-
array(
|
413 |
-
'type' =>'text',
|
414 |
-
'name' =>"tlt_ln_hgt",
|
415 |
-
'label' =>'Heading Line Height',
|
416 |
-
'tab' =>'design',
|
417 |
-
'default' =>'1.7',
|
418 |
-
'content_type'=>'css',
|
419 |
-
'required' => array('background_type'=>'video')
|
420 |
-
),
|
421 |
-
array(
|
422 |
-
'type' =>'color-picker',
|
423 |
-
'name' =>"tlt_color",
|
424 |
-
'label' =>'Heading Color',
|
425 |
-
'tab' =>'design',
|
426 |
-
'default' =>'#333',
|
427 |
-
'content_type'=>'css',
|
428 |
-
'required' => array('background_type'=>'video')
|
429 |
-
),
|
430 |
-
array(
|
431 |
-
'type' =>'text',
|
432 |
-
'name' =>"cnt_size",
|
433 |
-
'label' =>'Content Font Size',
|
434 |
-
'tab' =>'design',
|
435 |
-
'default' =>'18px',
|
436 |
-
'content_type'=>'css',
|
437 |
-
'required' => array('background_type'=>'video')
|
438 |
-
),
|
439 |
-
array(
|
440 |
-
'type' =>'select',
|
441 |
-
'name' =>'cnt_font_type',
|
442 |
-
'label' =>"Content Font Weight",
|
443 |
-
'tab' =>'design',
|
444 |
-
'default' =>'400',
|
445 |
-
'options_details'=>array(
|
446 |
-
'300' =>'Light',
|
447 |
-
'400' =>'Regular',
|
448 |
-
'500' =>'Medium',
|
449 |
-
'600' =>'Semi Bold',
|
450 |
-
'700' =>'Bold',
|
451 |
-
),
|
452 |
-
'content_type'=>'css',
|
453 |
-
'required' => array('background_type'=>'video')
|
454 |
-
),
|
455 |
-
array(
|
456 |
-
'type' =>'text',
|
457 |
-
'name' =>"cnt_ln_hgt",
|
458 |
-
'label' =>'Content Line Height',
|
459 |
-
'tab' =>'design',
|
460 |
-
'default' =>'1.7',
|
461 |
-
'content_type'=>'css',
|
462 |
-
'required' => array('background_type'=>'video')
|
463 |
-
),
|
464 |
-
array(
|
465 |
-
'type' =>'color-picker',
|
466 |
-
'name' =>"cnt_color",
|
467 |
-
'label' =>'Content Color',
|
468 |
-
'tab' =>'design',
|
469 |
-
'default' =>'#333',
|
470 |
-
'content_type'=>'css',
|
471 |
-
'required' => array('background_type'=>'video')
|
472 |
-
),
|
473 |
-
array(
|
474 |
-
'type' =>'checkbox_bool',
|
475 |
-
'name' =>"check_for_overlay",
|
476 |
-
'label' => 'Background Video Overlay',
|
477 |
-
'tab' =>'design',
|
478 |
-
'default' =>0,
|
479 |
-
'options' =>array(
|
480 |
-
array(
|
481 |
-
'label'=>'Yes',
|
482 |
-
'value'=>1,
|
483 |
-
)
|
484 |
-
),
|
485 |
-
'content_type'=>'html',
|
486 |
-
'required' => array('background_type'=>'video')
|
487 |
-
),
|
488 |
-
array(
|
489 |
-
'type' =>'color-picker',
|
490 |
-
'name' =>"overlay_cnt_color",
|
491 |
-
'label' =>'Background Video Content Color',
|
492 |
-
'tab' =>'design',
|
493 |
-
'default' =>'#fff',
|
494 |
-
'content_type'=>'css',
|
495 |
-
'required' => array('background_type'=>'video', 'check_for_overlay'=>1)
|
496 |
-
),
|
497 |
-
array(
|
498 |
-
'type' =>'checkbox_bool',
|
499 |
-
'name' =>"check_for_parallax",
|
500 |
-
'label' => 'Parallax Effect',
|
501 |
-
'tab' =>'design',
|
502 |
-
'default' =>0,
|
503 |
-
'options' =>array(
|
504 |
-
array(
|
505 |
-
'label'=>'Yes',
|
506 |
-
'value'=>1,
|
507 |
-
)
|
508 |
-
),
|
509 |
-
'content_type'=>'css',
|
510 |
-
'required' => array('background_type'=>'image')
|
511 |
-
),
|
512 |
-
array(
|
513 |
-
'type' =>'checkbox_bool',
|
514 |
-
'name' =>"check_for_slant",
|
515 |
-
'label' => 'Slant Background',
|
516 |
-
'tab' =>'design',
|
517 |
-
'default' =>0,
|
518 |
-
'options' =>array(
|
519 |
-
array(
|
520 |
-
'label'=>'Yes',
|
521 |
-
'value'=>1,
|
522 |
-
)
|
523 |
-
),
|
524 |
-
'content_type'=>'html',
|
525 |
-
'required' => array('background_type'=>'color')
|
526 |
-
),
|
527 |
-
array(
|
528 |
-
'type' =>'checkbox_bool',
|
529 |
-
'name' =>"check_for_enbtp",
|
530 |
-
'label' => 'Enable Top',
|
531 |
-
'tab' =>'design',
|
532 |
-
'default' =>0,
|
533 |
-
'options' =>array(
|
534 |
-
array(
|
535 |
-
'label'=>'Yes',
|
536 |
-
'value'=>1,
|
537 |
-
)
|
538 |
-
),
|
539 |
-
'content_type'=>'css',
|
540 |
-
'required' => array('background_type'=>'color', 'check_for_slant'=>1)
|
541 |
-
),
|
542 |
-
array(
|
543 |
-
'type' =>'select',
|
544 |
-
'name' =>'align_type_slant',
|
545 |
-
'label' =>"Slant Position",
|
546 |
-
'tab' =>'design',
|
547 |
-
'default' =>'left',
|
548 |
-
'options_details'=>array(
|
549 |
-
'left' =>'Left',
|
550 |
-
'right' =>'Right', ),
|
551 |
-
'content_type'=>'css',
|
552 |
-
'required' => array('check_for_slant'=>1, 'check_for_enbtp'=>1)
|
553 |
-
),
|
554 |
-
array(
|
555 |
-
'type' =>'checkbox_bool',
|
556 |
-
'name' =>"check_for_enbbt",
|
557 |
-
'label' => 'Enable Bottom',
|
558 |
-
'tab' =>'design',
|
559 |
-
'default' =>0,
|
560 |
-
'options' =>array(
|
561 |
-
array(
|
562 |
-
'label'=>'Yes',
|
563 |
-
'value'=>1,
|
564 |
-
)
|
565 |
-
),
|
566 |
-
'content_type'=>'css',
|
567 |
-
'required' => array('background_type'=>'color', 'check_for_slant'=>1)
|
568 |
-
),
|
569 |
-
array(
|
570 |
-
'type' =>'select',
|
571 |
-
'name' =>'align_type_slate_btn',
|
572 |
-
'label' =>"Slant Position",
|
573 |
-
'tab' =>'design',
|
574 |
-
'default' =>'lft',
|
575 |
-
'options_details'=>array(
|
576 |
-
'lft' =>'Left',
|
577 |
-
'rht' =>'Right', ),
|
578 |
-
'content_type'=>'css',
|
579 |
-
'required' => array('check_for_slant'=>1, 'check_for_enbbt'=>1)
|
580 |
-
),
|
581 |
array(
|
582 |
'type' =>'color-picker',
|
583 |
'name' =>"color_picker",
|
@@ -655,8 +306,8 @@ $containerCommonSettings = array(
|
|
655 |
array(
|
656 |
'type' =>'checkbox',
|
657 |
'name' =>"shadow",
|
658 |
-
'label' =>'
|
659 |
-
'tab' =>'
|
660 |
'default' =>array(),
|
661 |
'options' =>array(
|
662 |
array(
|
53 |
}//If Fucntion check closed
|
54 |
|
55 |
//Row Contents
|
56 |
+
$output = '<section class="ap_m {{row_class}} {{grid_type}}">';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
$outputEnd = '<div class="cb"></div> </section>';
|
58 |
$front_css = '
|
|
|
59 |
{{row-class}}{
|
60 |
background-image: url({{row_background_image}});
|
61 |
background-repeat: no-repeat;
|
62 |
background-size: cover;
|
63 |
height: auto;
|
64 |
background-position:{{align_type}};
|
|
|
|
|
|
|
|
|
65 |
}
|
|
|
|
|
66 |
{{row-class}}.amppb-fluid{width:{{fluid-width}};}
|
67 |
+
{{row-class}}.amppb-fluid .col{margin:0 auto;max-width:{{fluid-wrapper}}; }
|
68 |
{{row-class}}.amppb-fixed .col {max-width:{{content-width}};width:{{fixed-width}};margin: 0 auto;}
|
69 |
|
70 |
{{row-class}}{
|
81 |
|
82 |
{{shadow}}
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
@media(max-width:768px){
|
85 |
{{row-class}}.amppb-fluid{width:100%;}
|
86 |
+
{{row-class}}.amppb-fluid .col{max-width:90%;}
|
87 |
}
|
88 |
|
89 |
@media(max-width:425px){
|
108 |
'tabs' => array(
|
109 |
'customizer'=>'Basic',
|
110 |
'container_css'=>'Advance',
|
|
|
111 |
),
|
112 |
'fields' => array(
|
113 |
array(
|
202 |
'options_details'=>array(
|
203 |
'color'=>'Color',
|
204 |
'gradient'=>'Gradient',
|
205 |
+
'image'=>'Background Image'
|
|
|
206 |
),
|
207 |
+
'content_type'=>'css',
|
208 |
'output_format'=>''
|
209 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
array(
|
211 |
'type' =>'select',
|
212 |
'name' =>'align_type',
|
229 |
'content_type'=>'css',
|
230 |
'required' => array('background_type'=>'image')
|
231 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
array(
|
233 |
'type' =>'color-picker',
|
234 |
'name' =>"color_picker",
|
306 |
array(
|
307 |
'type' =>'checkbox',
|
308 |
'name' =>"shadow",
|
309 |
+
'label' =>'Shadow',
|
310 |
+
'tab' =>'customizer',
|
311 |
'default' =>array(),
|
312 |
'options' =>array(
|
313 |
array(
|
pagebuilder/inc/admin-amp-page-builder.css
CHANGED
@@ -162,7 +162,7 @@ div#amppb-module-actions-container:before {
|
|
162 |
background: #f44336;
|
163 |
color: #fff;
|
164 |
}
|
165 |
-
.tools-icon
|
166 |
/*display: none;*/
|
167 |
padding: 3px 0px 1px 1px;
|
168 |
float: right;
|
@@ -174,20 +174,14 @@ div#amppb-module-actions-container:before {
|
|
174 |
width: 23px;
|
175 |
height: 20px;
|
176 |
border-radius: 60px;
|
177 |
-
right:
|
178 |
transition: color 0.2s;
|
179 |
}
|
180 |
-
.amppb-duplicate {
|
181 |
-
font-size: 14px;
|
182 |
-
top: 6px;
|
183 |
-
right: 9px;
|
184 |
-
line-height: 16px;
|
185 |
-
}
|
186 |
.amppb-row:hover .tools-icon{
|
187 |
color: #546e7a;
|
188 |
transition: 0s
|
189 |
}
|
190 |
-
.amppb-row:hover .tools-icon:hover
|
191 |
transition: 0s;
|
192 |
color: #fff;
|
193 |
background: #546e7a
|
@@ -278,22 +272,13 @@ amppb-row-fields .amppb-column-2:not(:last-child){
|
|
278 |
top: 10px;
|
279 |
left: 15px;
|
280 |
}
|
281 |
-
|
282 |
-
float:right;
|
283 |
-
}
|
284 |
-
.amppb-module-copy{
|
285 |
-
right: -10px;
|
286 |
-
position: relative;
|
287 |
-
}
|
288 |
-
#pagebilder_content .amppb-module-copy span{
|
289 |
-
color: #bbb
|
290 |
-
}
|
291 |
.amppb-setting-right span{
|
292 |
display: inline-block;
|
293 |
right: 0px;
|
294 |
-
|
295 |
top: 0px;
|
296 |
-
padding: 12px 7px 9px
|
297 |
cursor: pointer;
|
298 |
font-size: 15px;
|
299 |
color: #72777c;
|
@@ -1339,17 +1324,4 @@ body .modal-footer .del-btn-modal{
|
|
1339 |
color: #777;
|
1340 |
}
|
1341 |
.amp-layout-breadcrumbs_last{font-weight: bold}
|
1342 |
-
.amp_l_preview_button{width: 49.2% !important}
|
1343 |
-
.dashicons-head{
|
1344 |
-
vertical-align: initial;
|
1345 |
-
}
|
1346 |
-
.amppb-module .module_label em {
|
1347 |
-
background: #eee;
|
1348 |
-
font-size: 11px;
|
1349 |
-
font-weight: normal;
|
1350 |
-
padding: 2px 3px;
|
1351 |
-
text-transform: unset;
|
1352 |
-
font-style: normal;
|
1353 |
-
color: #555;
|
1354 |
-
border-radius: 40px;
|
1355 |
-
}
|
162 |
background: #f44336;
|
163 |
color: #fff;
|
164 |
}
|
165 |
+
.tools-icon{
|
166 |
/*display: none;*/
|
167 |
padding: 3px 0px 1px 1px;
|
168 |
float: right;
|
174 |
width: 23px;
|
175 |
height: 20px;
|
176 |
border-radius: 60px;
|
177 |
+
right: 5px;
|
178 |
transition: color 0.2s;
|
179 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
.amppb-row:hover .tools-icon{
|
181 |
color: #546e7a;
|
182 |
transition: 0s
|
183 |
}
|
184 |
+
.amppb-row:hover .tools-icon:hover {
|
185 |
transition: 0s;
|
186 |
color: #fff;
|
187 |
background: #546e7a
|
272 |
top: 10px;
|
273 |
left: 15px;
|
274 |
}
|
275 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
.amppb-setting-right span{
|
277 |
display: inline-block;
|
278 |
right: 0px;
|
279 |
+
position: absolute;
|
280 |
top: 0px;
|
281 |
+
padding: 12px 7px 9px 15px;
|
282 |
cursor: pointer;
|
283 |
font-size: 15px;
|
284 |
color: #72777c;
|
1324 |
color: #777;
|
1325 |
}
|
1326 |
.amp-layout-breadcrumbs_last{font-weight: bold}
|
1327 |
+
.amp_l_preview_button{width: 49.2% !important}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pagebuilder/inc/admin-amp-page-builder.js
CHANGED
@@ -126,7 +126,6 @@ Vue.component('amp-pagebuilder-module-modal', {
|
|
126 |
data: function(){
|
127 |
return {
|
128 |
modalcontent: app.modalcontent,
|
129 |
-
editModuleTempTitle: false,
|
130 |
};
|
131 |
},
|
132 |
mounted: function () {//On ready State for component
|
@@ -268,34 +267,7 @@ Vue.component('amp-pagebuilder-module-modal', {
|
|
268 |
});
|
269 |
}
|
270 |
return returnOpt;
|
271 |
-
},
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
editModuleTitle: function(modalcontent){
|
276 |
-
this.editModuleTempTitle = modalcontent.cell_identity_name;
|
277 |
-
},
|
278 |
-
saveModuleTitle: function(modalcontent){
|
279 |
-
app.mainContent.rows.forEach(function(rowData, rowKey){
|
280 |
-
if(rowData.id==app.modalTypeData.containerId){
|
281 |
-
if(app.modalType=='module'){
|
282 |
-
rowData.cell_data.forEach(function(moduleData, moduleKey){
|
283 |
-
if(moduleData.cell_id==app.modalTypeData.moduleId){
|
284 |
-
//app.modalcontent.cell_identity_name = modalcontent.cell_identity_name
|
285 |
-
Vue.set( moduleData, 'cell_identity_name', modalcontent.cell_identity_name );
|
286 |
-
}
|
287 |
-
});
|
288 |
-
}
|
289 |
-
}
|
290 |
-
});
|
291 |
-
|
292 |
-
this.editModuleTempTitle = false;
|
293 |
-
},
|
294 |
-
cancleModuleTitle: function(modalcontent){
|
295 |
-
app.modalcontent.cell_identity_name = this.editModuleTempTitle;
|
296 |
-
this.editModuleTempTitle = false;
|
297 |
}
|
298 |
-
|
299 |
}
|
300 |
})
|
301 |
|
@@ -312,32 +284,6 @@ Vue.component('module-data',{
|
|
312 |
showModulePopUp: function(event){
|
313 |
openModulePopup(event,'module');
|
314 |
},
|
315 |
-
duplicateModule: function(event){
|
316 |
-
currentModuleId = parseInt( event.currentTarget.getAttribute('data-module_id') );
|
317 |
-
currentcontainerId = parseInt( event.currentTarget.getAttribute('data-container_id') );
|
318 |
-
var updateRowKey = ''; var updateModuleKey = ''; var newDuplicateData = {};
|
319 |
-
app.mainContent.rows.forEach(function(rowData, rowKey){
|
320 |
-
if(rowData.id == currentcontainerId){
|
321 |
-
rowData.cell_data.forEach(function(moduleData, moduleKey){
|
322 |
-
if(moduleData.cell_id==currentModuleId){
|
323 |
-
var modulesid = parseInt(app.mainContent.totalmodules);
|
324 |
-
newDuplicateData = _.clone(moduleData);
|
325 |
-
newDuplicateData.cell_id = modulesid;
|
326 |
-
updateRowKey = rowKey;
|
327 |
-
updateModuleKey = moduleKey;
|
328 |
-
app.mainContent.totalmodules = modulesid+1;
|
329 |
-
}
|
330 |
-
});
|
331 |
-
}
|
332 |
-
});
|
333 |
-
if(updateModuleKey>0){
|
334 |
-
app.mainContent.rows[updateRowKey].cell_data.splice(updateModuleKey, 0,newDuplicateData);
|
335 |
-
}else{
|
336 |
-
app.mainContent.rows[updateRowKey].cell_data.push(newDuplicateData);
|
337 |
-
|
338 |
-
}
|
339 |
-
app.re_process_rawdata();
|
340 |
-
}//duplicateModule closed
|
341 |
}
|
342 |
});
|
343 |
|
@@ -360,7 +306,6 @@ function openModulePopup(event,type){
|
|
360 |
rowData.cell_data.forEach(function(moduleData, moduleKey){
|
361 |
if(moduleData.cell_id==currentModuleId){
|
362 |
//app.modalcontent.repeater.showFields.forEach
|
363 |
-
app.modalcontent.cell_identity_name = moduleData.cell_identity_name;
|
364 |
app.modalcontent.fields.forEach(function(fieldData,fieldKey){
|
365 |
//if(moduleData[fieldData.name] && moduleData[fieldData.name]!=''){
|
366 |
|
@@ -385,7 +330,7 @@ function openModulePopup(event,type){
|
|
385 |
'default',
|
386 |
userValues );
|
387 |
//}
|
388 |
-
|
389 |
if(moduleData.repeater){
|
390 |
|
391 |
app.modalcontent.repeater.showFields = [];
|
@@ -577,7 +522,6 @@ Vue.component('fields-data',{
|
|
577 |
Vue.set(field,'default',imageList);
|
578 |
}else{*/
|
579 |
if(type=='tag'){
|
580 |
-
field[field['name']+'_image_data'] = response.data.front_image;
|
581 |
jQuery(currentSelectfield.$el).find('img').attr('src',response.data.detail[0]);
|
582 |
}else{
|
583 |
//console.log(jQuery(currentSelectfield).parents('p'))
|
@@ -745,7 +689,6 @@ var app = new Vue({
|
|
745 |
showModal: false,
|
746 |
//Module data
|
747 |
showmoduleModal: false,
|
748 |
-
editModuleTempTitle: false,
|
749 |
stopModuleModalClose:false,
|
750 |
modalcontent: [],
|
751 |
modalType:'',//module/rowSetting
|
@@ -833,37 +776,6 @@ var app = new Vue({
|
|
833 |
this.call_default_functions();
|
834 |
}
|
835 |
},
|
836 |
-
duplicateRow: function(){
|
837 |
-
var currentRowId = event.currentTarget.getAttribute('data-rowid');
|
838 |
-
var duplicateRowData = {}; var rowKeyValue = '';
|
839 |
-
app.mainContent.rows.forEach(function(rowData, rowKey){
|
840 |
-
if(rowData.id == currentRowId){
|
841 |
-
var rowsId = parseInt(app.mainContent.totalrows);
|
842 |
-
duplicateRowData = JSON.parse(JSON.stringify(rowData));
|
843 |
-
duplicateRowData.id = rowsId;
|
844 |
-
rowKeyValue = rowKey;
|
845 |
-
app.mainContent.totalrows = rowsId+1;
|
846 |
-
}
|
847 |
-
});
|
848 |
-
var sampleSelldata = duplicateRowData.cell_data;//_.clone(duplicateRowData.cell_data);
|
849 |
-
sampleSelldata.forEach(function(moduleData, moduleKey){
|
850 |
-
var modulesid = parseInt(app.mainContent.totalmodules);
|
851 |
-
duplicateRowData.cell_data[moduleKey].cell_id = modulesid;
|
852 |
-
duplicateRowData.cell_data[moduleKey].container_id = duplicateRowData.id;
|
853 |
-
app.mainContent.totalmodules = modulesid+1;
|
854 |
-
});
|
855 |
-
duplicateRowData.cell_data = sampleSelldata;
|
856 |
-
|
857 |
-
|
858 |
-
// console.log(duplicateRowData);
|
859 |
-
if(rowKeyValue>0){
|
860 |
-
app.mainContent.rows.splice(rowKeyValue, 0,duplicateRowData);
|
861 |
-
}else{
|
862 |
-
app.mainContent.rows.push(duplicateRowData);
|
863 |
-
}
|
864 |
-
app.re_process_rawdata();
|
865 |
-
//
|
866 |
-
},
|
867 |
//Rows drop details
|
868 |
handleDrop: function(columnData,Events) {
|
869 |
if(typeof columnData=='undefined' || typeof columnData.type=='undefined'){
|
@@ -927,7 +839,6 @@ var app = new Vue({
|
|
927 |
'type' : modulename,
|
928 |
'container_id': rowid,
|
929 |
'cell_container': cellid,
|
930 |
-
'cell_identity_name': modulesid,
|
931 |
};
|
932 |
|
933 |
if(moduleJson.fields.length > 0){
|
@@ -1091,4 +1002,4 @@ var app = new Vue({
|
|
1091 |
});
|
1092 |
|
1093 |
app.mainContent = amppb_data;
|
1094 |
-
app.call_default_functions();
|
126 |
data: function(){
|
127 |
return {
|
128 |
modalcontent: app.modalcontent,
|
|
|
129 |
};
|
130 |
},
|
131 |
mounted: function () {//On ready State for component
|
267 |
});
|
268 |
}
|
269 |
return returnOpt;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
}
|
|
|
271 |
}
|
272 |
})
|
273 |
|
284 |
showModulePopUp: function(event){
|
285 |
openModulePopup(event,'module');
|
286 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
}
|
288 |
});
|
289 |
|
306 |
rowData.cell_data.forEach(function(moduleData, moduleKey){
|
307 |
if(moduleData.cell_id==currentModuleId){
|
308 |
//app.modalcontent.repeater.showFields.forEach
|
|
|
309 |
app.modalcontent.fields.forEach(function(fieldData,fieldKey){
|
310 |
//if(moduleData[fieldData.name] && moduleData[fieldData.name]!=''){
|
311 |
|
330 |
'default',
|
331 |
userValues );
|
332 |
//}
|
333 |
+
console.log(app.modalcontent.repeater);
|
334 |
if(moduleData.repeater){
|
335 |
|
336 |
app.modalcontent.repeater.showFields = [];
|
522 |
Vue.set(field,'default',imageList);
|
523 |
}else{*/
|
524 |
if(type=='tag'){
|
|
|
525 |
jQuery(currentSelectfield.$el).find('img').attr('src',response.data.detail[0]);
|
526 |
}else{
|
527 |
//console.log(jQuery(currentSelectfield).parents('p'))
|
689 |
showModal: false,
|
690 |
//Module data
|
691 |
showmoduleModal: false,
|
|
|
692 |
stopModuleModalClose:false,
|
693 |
modalcontent: [],
|
694 |
modalType:'',//module/rowSetting
|
776 |
this.call_default_functions();
|
777 |
}
|
778 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
//Rows drop details
|
780 |
handleDrop: function(columnData,Events) {
|
781 |
if(typeof columnData=='undefined' || typeof columnData.type=='undefined'){
|
839 |
'type' : modulename,
|
840 |
'container_id': rowid,
|
841 |
'cell_container': cellid,
|
|
|
842 |
};
|
843 |
|
844 |
if(moduleJson.fields.length > 0){
|
1002 |
});
|
1003 |
|
1004 |
app.mainContent = amppb_data;
|
1005 |
+
app.call_default_functions();
|
pagebuilder/inc/amppb_save_data.php
CHANGED
@@ -28,7 +28,7 @@ function amppb_save_post( $post_id, $post ){
|
|
28 |
|
29 |
/* Get new submitted data and sanitize it. */
|
30 |
$submitted_data = isset( $request['amp-page-builder'] ) ? $request['amp-page-builder'] : null;
|
31 |
-
$submitted_data = (str_replace("'", "
|
32 |
$submitted_data = wp_slash($submitted_data);
|
33 |
|
34 |
/* New data submitted, No previous data, create it */
|
28 |
|
29 |
/* Get new submitted data and sanitize it. */
|
30 |
$submitted_data = isset( $request['amp-page-builder'] ) ? $request['amp-page-builder'] : null;
|
31 |
+
$submitted_data = (str_replace("'", "", $submitted_data));
|
32 |
$submitted_data = wp_slash($submitted_data);
|
33 |
|
34 |
/* New data submitted, No previous data, create it */
|
pagebuilder/inc/viewShowFrontData.php
CHANGED
@@ -6,10 +6,7 @@ Show Front Data
|
|
6 |
add_action('pre_amp_render_post','amp_pagebuilder_content');
|
7 |
function amp_pagebuilder_content(){
|
8 |
global $post, $redux_builder_amp;
|
9 |
-
|
10 |
-
$postId = (is_object($post) ? $post->ID : '');
|
11 |
-
if( empty( $postId ) ) return;
|
12 |
-
|
13 |
if( ampforwp_is_front_page() ){
|
14 |
$postId = ampforwp_get_frontpage_id();
|
15 |
}
|
@@ -177,7 +174,7 @@ function amp_pagebuilder_content_styles(){
|
|
177 |
$rowCss = str_replace('{{row-class}}', '.ap_r_'.$rowsData['id'], $rowCss);
|
178 |
foreach($containerCommonSettings['fields'] as $rowfield){
|
179 |
$replaceRow = '';
|
180 |
-
|
181 |
if(isset($rowContainer[$rowfield['name']])){
|
182 |
$replaceRow = $rowContainer[$rowfield['name']];
|
183 |
|
@@ -271,7 +268,7 @@ function amp_pagebuilder_content_styles(){
|
|
271 |
}
|
272 |
break;
|
273 |
}
|
274 |
-
|
275 |
$rowCss = ampforwp_replaceIfContentConditional($rowfield['name'], $replaceRow, $rowCss);
|
276 |
}
|
277 |
echo amppb_validateCss($rowCss);
|
@@ -427,7 +424,6 @@ function amp_pagebuilder_content_styles(){
|
|
427 |
$repeaterFrontCss = $moduleTemplate[$contentArray['type']]['repeater']['front_css'];
|
428 |
|
429 |
if($moduleField['content_type']=='css'){
|
430 |
-
$repeaterFrontCss = str_replace('{{repeater-module-class}}', $moduleField['name'].'_'.$repeaterVarIndex, $repeaterFrontCss);
|
431 |
$replace = $repeaterUserValues[$moduleField['name'].'_'.$repeaterVarIndex];
|
432 |
if(is_array($replace)){
|
433 |
if(count($replace)>0){
|
@@ -539,14 +535,13 @@ function amppb_post_content($content){
|
|
539 |
$replace .= 'ap_r_'.$rowsData['id'];
|
540 |
}
|
541 |
if(isset($rowsData['data'][$field['name']]) && !is_array($rowsData['data'][$field['name']])){
|
542 |
-
$replace .=
|
543 |
}else{
|
544 |
$replace .= '';
|
545 |
}
|
546 |
if(! is_array($field['name']) && $field['content_type']=='html'){
|
547 |
$rowStartTemplate = str_replace('{{'.$field['name'].'}}', $replace, $rowStartTemplate);
|
548 |
}
|
549 |
-
$rowStartTemplate = ampforwp_replaceIfContentConditional($field['name'], $replace, $rowStartTemplate);
|
550 |
}
|
551 |
}
|
552 |
$html .= $rowStartTemplate;
|
@@ -561,10 +556,9 @@ function amppb_post_content($content){
|
|
561 |
foreach($rowsData['cell_data'] as $colDevider){
|
562 |
$colData[$colDevider['cell_container']][] = $colDevider;
|
563 |
}
|
564 |
-
|
565 |
foreach($colData as $data)
|
566 |
$html .= rowData($data,$rowsData['cells'],$moduleTemplate);
|
567 |
-
$html .= '</div>';
|
568 |
break;
|
569 |
|
570 |
default:
|
@@ -700,7 +694,6 @@ function rowData($container,$col,$moduleTemplate){
|
|
700 |
);
|
701 |
$repeaterFrontTemplate = ampforwp_replaceIfContentConditional($moduleField['name'], $imageUrl, $repeaterFrontTemplate);
|
702 |
}else{
|
703 |
-
$replace = nl2br($replace);
|
704 |
$repeaterFrontTemplate = str_replace(
|
705 |
'{{'.$moduleField['name'].'}}',
|
706 |
$replace,
|
@@ -713,7 +706,6 @@ function rowData($container,$col,$moduleTemplate){
|
|
713 |
$repeaterUniqueId++;
|
714 |
}
|
715 |
}
|
716 |
-
$repeaterFrontTemplate = str_replace('{{repeater-module-class}}', $moduleField['name'].'_'.$repeaterVarIndex, $repeaterFrontTemplate);
|
717 |
|
718 |
$repeaterFields .= $repeaterFrontTemplate;
|
719 |
|
@@ -771,15 +763,6 @@ function rowData($container,$col,$moduleTemplate){
|
|
771 |
}
|
772 |
}
|
773 |
|
774 |
-
$catName = 'Recent posts'; $cat_link = "#";
|
775 |
-
if(trim($fieldValues['category_selection']) != 'recent_option'){
|
776 |
-
$catName = get_cat_name($fieldValues['category_selection']);
|
777 |
-
$cat_link = get_category_link($fieldValues['category_selection']);
|
778 |
-
$cat_link = esc_url(ampforwp_url_controller($cat_link));
|
779 |
-
}
|
780 |
-
$moduleFrontHtml = str_replace('{{content_category_title}}', urldecode($catName), $moduleFrontHtml);
|
781 |
-
$moduleFrontHtml = str_replace('{{content_category_link}}', $cat_link, $moduleFrontHtml);
|
782 |
-
|
783 |
$moduleFrontHtml = str_replace('{{content_title}}', urldecode($fieldValues['content_title']), $moduleFrontHtml);
|
784 |
$moduleFrontHtml = str_replace('{{category_selection}}', $totalLoopHtml, $moduleFrontHtml);
|
785 |
//print_r($moduleFrontHtml);die;
|
@@ -793,7 +776,7 @@ function rowData($container,$col,$moduleTemplate){
|
|
793 |
|
794 |
break;
|
795 |
default:
|
796 |
-
|
797 |
break;
|
798 |
}
|
799 |
|
@@ -893,7 +876,6 @@ function rowData($container,$col,$moduleTemplate){
|
|
893 |
}//Foreach closed
|
894 |
}//If closed
|
895 |
|
896 |
-
$moduleFrontHtml = str_replace('{{unique_cell_id}}', $contentArray['cell_id'], $moduleFrontHtml);
|
897 |
$html .= "<div class='amp_mod ap_m_".$contentArray['cell_id'].' '.$contentArray['type']."'>".$moduleFrontHtml;
|
898 |
$html .= '</div>';
|
899 |
/*if($contentArray['type']=="text"){
|
@@ -981,7 +963,7 @@ function ampforwp_replaceIfContentConditional($byReplace, $replaceWith, $string)
|
|
981 |
if(isset($matches[1]) && count($matches[1])>0){
|
982 |
$matches[1] = array_unique($matches[1]);
|
983 |
foreach ($matches[1] as $key => $matchValue) {
|
984 |
-
if(
|
985 |
$string = str_replace(array("{{if_condition_".$byReplace."==".$matchValue."}}","{{ifend_condition_".$byReplace."_".$matchValue."}}"), array("<amp-condition>","</amp-condition>"), $string);
|
986 |
|
987 |
$string = preg_replace_callback('/(<amp-condition>)(.*?)(<\/amp-condition>)/s', function($match){
|
@@ -1013,4 +995,4 @@ function getdefaultValue($requiredKey, $fieldArray){
|
|
1013 |
return $fieldvalue['default'];
|
1014 |
}
|
1015 |
}
|
1016 |
-
}
|
6 |
add_action('pre_amp_render_post','amp_pagebuilder_content');
|
7 |
function amp_pagebuilder_content(){
|
8 |
global $post, $redux_builder_amp;
|
9 |
+
$postId = $post->ID;
|
|
|
|
|
|
|
10 |
if( ampforwp_is_front_page() ){
|
11 |
$postId = ampforwp_get_frontpage_id();
|
12 |
}
|
174 |
$rowCss = str_replace('{{row-class}}', '.ap_r_'.$rowsData['id'], $rowCss);
|
175 |
foreach($containerCommonSettings['fields'] as $rowfield){
|
176 |
$replaceRow = '';
|
177 |
+
if($rowfield['content_type']=='css'){
|
178 |
if(isset($rowContainer[$rowfield['name']])){
|
179 |
$replaceRow = $rowContainer[$rowfield['name']];
|
180 |
|
268 |
}
|
269 |
break;
|
270 |
}
|
271 |
+
}
|
272 |
$rowCss = ampforwp_replaceIfContentConditional($rowfield['name'], $replaceRow, $rowCss);
|
273 |
}
|
274 |
echo amppb_validateCss($rowCss);
|
424 |
$repeaterFrontCss = $moduleTemplate[$contentArray['type']]['repeater']['front_css'];
|
425 |
|
426 |
if($moduleField['content_type']=='css'){
|
|
|
427 |
$replace = $repeaterUserValues[$moduleField['name'].'_'.$repeaterVarIndex];
|
428 |
if(is_array($replace)){
|
429 |
if(count($replace)>0){
|
535 |
$replace .= 'ap_r_'.$rowsData['id'];
|
536 |
}
|
537 |
if(isset($rowsData['data'][$field['name']]) && !is_array($rowsData['data'][$field['name']])){
|
538 |
+
$replace .= ' '.$rowsData['data'][$field['name']];
|
539 |
}else{
|
540 |
$replace .= '';
|
541 |
}
|
542 |
if(! is_array($field['name']) && $field['content_type']=='html'){
|
543 |
$rowStartTemplate = str_replace('{{'.$field['name'].'}}', $replace, $rowStartTemplate);
|
544 |
}
|
|
|
545 |
}
|
546 |
}
|
547 |
$html .= $rowStartTemplate;
|
556 |
foreach($rowsData['cell_data'] as $colDevider){
|
557 |
$colData[$colDevider['cell_container']][] = $colDevider;
|
558 |
}
|
559 |
+
|
560 |
foreach($colData as $data)
|
561 |
$html .= rowData($data,$rowsData['cells'],$moduleTemplate);
|
|
|
562 |
break;
|
563 |
|
564 |
default:
|
694 |
);
|
695 |
$repeaterFrontTemplate = ampforwp_replaceIfContentConditional($moduleField['name'], $imageUrl, $repeaterFrontTemplate);
|
696 |
}else{
|
|
|
697 |
$repeaterFrontTemplate = str_replace(
|
698 |
'{{'.$moduleField['name'].'}}',
|
699 |
$replace,
|
706 |
$repeaterUniqueId++;
|
707 |
}
|
708 |
}
|
|
|
709 |
|
710 |
$repeaterFields .= $repeaterFrontTemplate;
|
711 |
|
763 |
}
|
764 |
}
|
765 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
$moduleFrontHtml = str_replace('{{content_title}}', urldecode($fieldValues['content_title']), $moduleFrontHtml);
|
767 |
$moduleFrontHtml = str_replace('{{category_selection}}', $totalLoopHtml, $moduleFrontHtml);
|
768 |
//print_r($moduleFrontHtml);die;
|
776 |
|
777 |
break;
|
778 |
default:
|
779 |
+
|
780 |
break;
|
781 |
}
|
782 |
|
876 |
}//Foreach closed
|
877 |
}//If closed
|
878 |
|
|
|
879 |
$html .= "<div class='amp_mod ap_m_".$contentArray['cell_id'].' '.$contentArray['type']."'>".$moduleFrontHtml;
|
880 |
$html .= '</div>';
|
881 |
/*if($contentArray['type']=="text"){
|
963 |
if(isset($matches[1]) && count($matches[1])>0){
|
964 |
$matches[1] = array_unique($matches[1]);
|
965 |
foreach ($matches[1] as $key => $matchValue) {
|
966 |
+
if($matchValue != $replaceWith){
|
967 |
$string = str_replace(array("{{if_condition_".$byReplace."==".$matchValue."}}","{{ifend_condition_".$byReplace."_".$matchValue."}}"), array("<amp-condition>","</amp-condition>"), $string);
|
968 |
|
969 |
$string = preg_replace_callback('/(<amp-condition>)(.*?)(<\/amp-condition>)/s', function($match){
|
995 |
return $fieldvalue['default'];
|
996 |
}
|
997 |
}
|
998 |
+
}
|
pagebuilder/modules/accordion-mod-module.php
CHANGED
@@ -94,7 +94,7 @@ return array(
|
|
94 |
'front_template'=>
|
95 |
'<section>
|
96 |
<h5 class="acc-lbl">{{acc_title}}</h5>
|
97 |
-
<
|
98 |
</section>'
|
99 |
),
|
100 |
);
|
94 |
'front_template'=>
|
95 |
'<section>
|
96 |
<h5 class="acc-lbl">{{acc_title}}</h5>
|
97 |
+
<p class="acc-desc">{{ass_desc}}</p>
|
98 |
</section>'
|
99 |
),
|
100 |
);
|
pagebuilder/modules/adsense-ad-module.php
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$output = '<amp-ad class="amp-ad-1"
|
4 |
-
type="adsense"
|
5 |
-
{{if_condition_ad_size_option==300x250}}width="300"{{ifend_condition_ad_size_option_300x250}}
|
6 |
-
{{if_condition_ad_size_option==336x280}}width="336"{{ifend_condition_ad_size_option_336x280}}
|
7 |
-
{{if_condition_ad_size_option==728x90}}width="728"{{ifend_condition_ad_size_option_728x90}}
|
8 |
-
{{if_condition_ad_size_option==300x600}}width="300"{{ifend_condition_ad_size_option_300x600}}
|
9 |
-
{{if_condition_ad_size_option==320x100}}width="320"{{ifend_condition_ad_size_option_320x100}}
|
10 |
-
{{if_condition_ad_size_option==200x50}}width="200"{{ifend_condition_ad_size_option_200x50}}
|
11 |
-
{{if_condition_ad_size_option==320x50}}width="320"{{ifend_condition_ad_size_option_320x50}}
|
12 |
-
{{if_condition_ad_size_option==responsive}}width="100vw"{{ifend_condition_ad_size_option_responsive}}
|
13 |
-
|
14 |
-
{{if_condition_ad_size_option==300x250}}height="250"{{ifend_condition_ad_size_option_300x250}}
|
15 |
-
{{if_condition_ad_size_option==336x280}}height="280"{{ifend_condition_ad_size_option_336x280}}
|
16 |
-
{{if_condition_ad_size_option==728x90}}height="90"{{ifend_condition_ad_size_option_728x90}}
|
17 |
-
{{if_condition_ad_size_option==300x600}}height="600"{{ifend_condition_ad_size_option_300x600}}
|
18 |
-
{{if_condition_ad_size_option==320x100}}height="100"{{ifend_condition_ad_size_option_320x100}}
|
19 |
-
{{if_condition_ad_size_option==200x50}}height="50"{{ifend_condition_ad_size_option_200x50}}
|
20 |
-
{{if_condition_ad_size_option==320x50}}height="50"{{ifend_condition_ad_size_option_320x50}}
|
21 |
-
{{if_condition_ad_size_option==responsive}}height="320"{{ifend_condition_ad_size_option_responsive}}
|
22 |
-
|
23 |
-
data-ad-client="{{data_ad_client}}"
|
24 |
-
data-ad-slot="{{data_ad_slot}}"
|
25 |
-
{{if_condition_ad_size_option==responsive}}data-auto-format="rspv"
|
26 |
-
data-full-width>
|
27 |
-
<div overflow></div{{ifend_condition_ad_size_option_responsive}}></amp-ad>';
|
28 |
-
$css ='';
|
29 |
-
return array(
|
30 |
-
'label' =>'Advertisement',
|
31 |
-
'name' =>'adsense-ad',
|
32 |
-
'default_tab'=> 'customizer',
|
33 |
-
'fields' => array(
|
34 |
-
array(
|
35 |
-
'type' =>'select',
|
36 |
-
'name' =>'ad_size_option',
|
37 |
-
'label' =>"Ad Size",
|
38 |
-
'tab' =>'customizer',
|
39 |
-
'default' =>'336x280',
|
40 |
-
'options_details'=>array(
|
41 |
-
'300x250' =>'300x250',
|
42 |
-
'336x280' =>'336x280',
|
43 |
-
'728x90' =>'728x90',
|
44 |
-
'300x600' =>'300x600',
|
45 |
-
'320x100' =>'320x100',
|
46 |
-
'200x50' =>'200x50',
|
47 |
-
'320x50' =>'320x50',
|
48 |
-
'responsive' =>'Responsive'
|
49 |
-
),
|
50 |
-
'content_type'=>'html',
|
51 |
-
),
|
52 |
-
array(
|
53 |
-
'type' => 'text',
|
54 |
-
'name' => "data_ad_client",
|
55 |
-
'label' => 'Data AD Client',
|
56 |
-
'tab' => 'customizer',
|
57 |
-
'default' => '',
|
58 |
-
'helpmessage' => 'e.g. ca-pub-0497xxxxxxxxxx12',
|
59 |
-
'content_type' => 'html',
|
60 |
-
),
|
61 |
-
array(
|
62 |
-
'type' => 'text',
|
63 |
-
'name' => "data_ad_slot",
|
64 |
-
'label' => 'Data AD Slot',
|
65 |
-
'tab' => 'customizer',
|
66 |
-
'default' => '',
|
67 |
-
'helpmessage' => 'e.g. 896xxxxx12',
|
68 |
-
'content_type' => 'html',
|
69 |
-
),
|
70 |
-
),
|
71 |
-
'front_template'=> $output,
|
72 |
-
'front_css'=> $css,
|
73 |
-
'front_common_css'=>'',
|
74 |
-
);
|
75 |
-
|
76 |
-
|
77 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pagebuilder/modules/blurb-mod-module.php
CHANGED
@@ -7,10 +7,9 @@ $css = '
|
|
7 |
{{module-class}}.blurb-mod{margin:{{margin_css}};padding:{{padding_css}};}
|
8 |
|
9 |
{{module-class}} .blu-mod .blurb-txt{font-size: {{text-size}};font-weight: {{fnt_wght}};color:{{font_color_picker}};}
|
10 |
-
{{module-class}} .blu-mod .ico-pic{font-size:{{ic-size}};color:{{ic_color_picker}};
|
11 |
-
margin:{{ic_margin_gap}};display:inline-block;background:{{bg_color_picker}};border-radius:50%;padding:15px;}
|
12 |
{{module-class}} .blu-mod{font-size: 15px;line-height: 1.7;}
|
13 |
-
{{module-class}} .blu-mod p{margin:
|
14 |
|
15 |
|
16 |
{{module-class}} .blu-mod{
|
@@ -123,20 +122,6 @@ return array(
|
|
123 |
'default' =>'#43c45d',
|
124 |
'content_type'=>'css',
|
125 |
),
|
126 |
-
array(
|
127 |
-
'type' =>'spacing',
|
128 |
-
'name' =>"ic_margin_gap",
|
129 |
-
'label' =>'Icon Gapping',
|
130 |
-
'tab' =>'design',
|
131 |
-
'default' =>
|
132 |
-
array(
|
133 |
-
'top'=>'0px',
|
134 |
-
'right'=>'0px',
|
135 |
-
'bottom'=>'30px',
|
136 |
-
'left'=>'0px',
|
137 |
-
),
|
138 |
-
'content_type'=>'css',
|
139 |
-
),
|
140 |
array(
|
141 |
'type' =>'text',
|
142 |
'name' =>"text-size",
|
@@ -185,19 +170,6 @@ return array(
|
|
185 |
'content_type'=>'css'
|
186 |
),
|
187 |
array(
|
188 |
-
'type' =>'spacing',
|
189 |
-
'name' =>"mrgn_css",
|
190 |
-
'label' =>'Content Gapping',
|
191 |
-
'tab' =>'design',
|
192 |
-
'default' =>array(
|
193 |
-
'left'=>'0px',
|
194 |
-
'right'=>'0px',
|
195 |
-
'top'=>'15px',
|
196 |
-
'bottom'=>'0px'
|
197 |
-
),
|
198 |
-
'content_type'=>'css',
|
199 |
-
),
|
200 |
-
array(
|
201 |
'type' =>'checkbox_bool',
|
202 |
'name' =>"check_for_bdr",
|
203 |
'label' => 'Border',
|
7 |
{{module-class}}.blurb-mod{margin:{{margin_css}};padding:{{padding_css}};}
|
8 |
|
9 |
{{module-class}} .blu-mod .blurb-txt{font-size: {{text-size}};font-weight: {{fnt_wght}};color:{{font_color_picker}};}
|
10 |
+
{{module-class}} .blu-mod .ico-pic{font-size:{{ic-size}};color:{{ic_color_picker}};margin-bottom:30px;display:inline-block;background:{{bg_color_picker}};border-radius:50%;padding:15px;}
|
|
|
11 |
{{module-class}} .blu-mod{font-size: 15px;line-height: 1.7;}
|
12 |
+
{{module-class}} .blu-mod p{margin: 15px 0px 0px 0px;}
|
13 |
|
14 |
|
15 |
{{module-class}} .blu-mod{
|
122 |
'default' =>'#43c45d',
|
123 |
'content_type'=>'css',
|
124 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
array(
|
126 |
'type' =>'text',
|
127 |
'name' =>"text-size",
|
170 |
'content_type'=>'css'
|
171 |
),
|
172 |
array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
'type' =>'checkbox_bool',
|
174 |
'name' =>"check_for_bdr",
|
175 |
'label' => 'Border',
|
pagebuilder/modules/button-mod-module.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
$output = '
|
3 |
-
<div class="btn"><a href="{{btn_link}}" {{if_condition_page_link_open==new_page}}target="_blank"{{ifend_condition_page_link_open_new_page}}
|
4 |
{{if_sub_heading}}<span>{{sub_heading}}</span> {{ifend_sub_heading}}</div>
|
5 |
{{if_condition_button_repeat_check==1}}{{repeater}}{{ifend_condition_button_repeat_check_1}}
|
6 |
';
|
@@ -17,10 +17,7 @@ font-size:{{text-size}}; border-radius:{{border-rds}}; color:{{font_color_picker
|
|
17 |
{{module-class}} .btn-txt .ico-pic{font-size: {{icon-size}};position: absolute; margin:{{margin_gap}};}
|
18 |
{{ifend_condition_check_for_icon_1}}
|
19 |
{{if_condition_display_type==inline}}
|
20 |
-
|
21 |
-
display:inline-block;
|
22 |
-
margin:{{mrgn_css}};
|
23 |
-
}
|
24 |
{{ifend_condition_display_type_inline}}
|
25 |
{{if_condition_check_for_altrbtn==1}}
|
26 |
{{module-class}} .alt-btn{
|
@@ -83,21 +80,6 @@ return array(
|
|
83 |
'content_type'=>'html',
|
84 |
),
|
85 |
|
86 |
-
array(
|
87 |
-
'type' =>'checkbox_bool',
|
88 |
-
'name' =>"check_for_nofollow",
|
89 |
-
'label' => 'Nofollow Link',
|
90 |
-
'tab' =>'customizer',
|
91 |
-
'default' =>0,
|
92 |
-
'options' =>array(
|
93 |
-
array(
|
94 |
-
'label'=>'Yes',
|
95 |
-
'value'=>1,
|
96 |
-
)
|
97 |
-
),
|
98 |
-
'content_type'=>'html',
|
99 |
-
),
|
100 |
-
|
101 |
array(
|
102 |
'type' =>'text',
|
103 |
'name' =>"sub_heading",
|
@@ -250,7 +232,7 @@ return array(
|
|
250 |
array(
|
251 |
'type' =>'spacing',
|
252 |
'name' =>"gapping_css",
|
253 |
-
'label' =>'Button
|
254 |
'tab' =>'design',
|
255 |
'default' =>array(
|
256 |
'left'=>'20px',
|
@@ -260,19 +242,6 @@ return array(
|
|
260 |
),
|
261 |
'content_type'=>'css',
|
262 |
),
|
263 |
-
array(
|
264 |
-
'type' =>'spacing',
|
265 |
-
'name' =>"mrgn_css",
|
266 |
-
'label' =>'Button Margin',
|
267 |
-
'tab' =>'design',
|
268 |
-
'default' => array(
|
269 |
-
'top'=>'0px',
|
270 |
-
'right'=>'0px',
|
271 |
-
'bottom'=>'0px',
|
272 |
-
'left'=>'0px',
|
273 |
-
),
|
274 |
-
'content_type'=>'css',
|
275 |
-
),
|
276 |
array(
|
277 |
'type' =>'checkbox_bool',
|
278 |
'name' =>"check_for_border",
|
@@ -437,7 +406,7 @@ return array(
|
|
437 |
'<div class="btn">
|
438 |
<a href="{{btn_link}}" {{if_condition_page_link_open==new_page}}target="_blank"{{ifend_condition_page_link_open_new_page}}
|
439 |
class="btn-txt{{if_condition_button_repeat_check==1}}
|
440 |
-
alt-btn"{{ifend_condition_button_repeat_check_1}}
|
441 |
{{if_condition_button_repeat_check==1}}
|
442 |
{{content_title}}{{if_condition_check_for_icon==1}}<i class="ico-pic icon-{{icon-picker}}"></i>{{ifend_condition_check_for_icon_1}}
|
443 |
</a>
|
1 |
<?php
|
2 |
$output = '
|
3 |
+
<div class="btn"><a href="{{btn_link}}" {{if_condition_page_link_open==new_page}}target="_blank"{{ifend_condition_page_link_open_new_page}} class="btn-txt">{{content_title}}{{if_condition_check_for_icon==1}}<i class="ico-pic icon-{{icon-picker}}"></i>{{ifend_condition_check_for_icon_1}}</a>
|
4 |
{{if_sub_heading}}<span>{{sub_heading}}</span> {{ifend_sub_heading}}</div>
|
5 |
{{if_condition_button_repeat_check==1}}{{repeater}}{{ifend_condition_button_repeat_check_1}}
|
6 |
';
|
17 |
{{module-class}} .btn-txt .ico-pic{font-size: {{icon-size}};position: absolute; margin:{{margin_gap}};}
|
18 |
{{ifend_condition_check_for_icon_1}}
|
19 |
{{if_condition_display_type==inline}}
|
20 |
+
.btn{display:inline-block;}
|
|
|
|
|
|
|
21 |
{{ifend_condition_display_type_inline}}
|
22 |
{{if_condition_check_for_altrbtn==1}}
|
23 |
{{module-class}} .alt-btn{
|
80 |
'content_type'=>'html',
|
81 |
),
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
array(
|
84 |
'type' =>'text',
|
85 |
'name' =>"sub_heading",
|
232 |
array(
|
233 |
'type' =>'spacing',
|
234 |
'name' =>"gapping_css",
|
235 |
+
'label' =>'Button Gapping',
|
236 |
'tab' =>'design',
|
237 |
'default' =>array(
|
238 |
'left'=>'20px',
|
242 |
),
|
243 |
'content_type'=>'css',
|
244 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
array(
|
246 |
'type' =>'checkbox_bool',
|
247 |
'name' =>"check_for_border",
|
406 |
'<div class="btn">
|
407 |
<a href="{{btn_link}}" {{if_condition_page_link_open==new_page}}target="_blank"{{ifend_condition_page_link_open_new_page}}
|
408 |
class="btn-txt{{if_condition_button_repeat_check==1}}
|
409 |
+
alt-btn"{{ifend_condition_button_repeat_check_1}} </a>
|
410 |
{{if_condition_button_repeat_check==1}}
|
411 |
{{content_title}}{{if_condition_check_for_icon==1}}<i class="ico-pic icon-{{icon-picker}}"></i>{{ifend_condition_check_for_icon_1}}
|
412 |
</a>
|
pagebuilder/modules/code-module.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
add_filter("ampforwp_extension_pagebuilder_module_template", 'ampforwp_code_module_replacement',10,3);
|
4 |
-
function ampforwp_code_module_replacement($moduleFrontHtml,$moduleTemplate, $contentArray){
|
5 |
-
if($moduleTemplate['name']==='code'){
|
6 |
-
if(isset($moduleTemplate['fields']) && count($moduleTemplate['fields']) > 0) {
|
7 |
-
foreach ($moduleTemplate['fields'] as $key => $field) {
|
8 |
-
if(!empty($contentArray) && !isset($contentArray[$field['name']])){
|
9 |
-
$replace = getdefaultValue($field['name'], $moduleTemplate['fields']);
|
10 |
-
}else{
|
11 |
-
$replace = $contentArray[$field['name']];
|
12 |
-
}
|
13 |
-
|
14 |
-
$moduleFrontHtml = str_replace('{{'.$field['name'].'}}', $replace, $moduleFrontHtml);
|
15 |
-
$moduleFrontHtml = ampforwp_replaceIfContentConditional($field['name'], $replace, $moduleFrontHtml);
|
16 |
-
}
|
17 |
-
$moduleFrontHtml = htmlspecialchars_decode($moduleFrontHtml);
|
18 |
-
}
|
19 |
-
|
20 |
-
}
|
21 |
-
return $moduleFrontHtml;
|
22 |
-
}
|
23 |
-
function ampforwp_runCompleteCode($moduleFrontHtml){
|
24 |
-
if(!empty($moduleFrontHtml)){
|
25 |
-
return eval( "?>". $moduleFrontHtml . "<?php " );
|
26 |
-
}
|
27 |
-
}
|
28 |
-
|
29 |
-
$output = '{{code_content}}';
|
30 |
-
$css = '
|
31 |
-
';
|
32 |
-
return array(
|
33 |
-
'label' =>'Code',
|
34 |
-
'name' =>'code',
|
35 |
-
'default_tab'=> 'customizer',
|
36 |
-
'tabs' => array(
|
37 |
-
'customizer'=>'Content',
|
38 |
-
'design'=>'Design',
|
39 |
-
'advanced' => 'Advanced'
|
40 |
-
),
|
41 |
-
'fields' => array(
|
42 |
-
array(
|
43 |
-
'type' => 'textarea',
|
44 |
-
'name' => "code_content",
|
45 |
-
'label' => 'Enter your code here',
|
46 |
-
'tab' => 'customizer',
|
47 |
-
'default' => '',
|
48 |
-
'helpmessage' => 'please Insert only HTML Codes',
|
49 |
-
'content_type' => 'html',
|
50 |
-
),
|
51 |
-
),
|
52 |
-
'front_template'=> $output,
|
53 |
-
'front_css'=> $css,
|
54 |
-
'front_common_css'=>'',
|
55 |
-
);
|
56 |
-
|
57 |
-
|
58 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pagebuilder/modules/contact-form-shortcode-module.php
DELETED
@@ -1,169 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$output = '
|
3 |
-
{{if_condition_form_type==contact-form-7}}
|
4 |
-
[contact-form-7 id="{{cf7_form_id}}"]
|
5 |
-
{{ifend_condition_form_type_contact-form-7}}
|
6 |
-
|
7 |
-
{{if_condition_form_type==gravityform}}
|
8 |
-
[gravityform id="{{gf_form_id}}" title="true" description="true"]
|
9 |
-
{{ifend_condition_form_type_gravityform}}
|
10 |
-
|
11 |
-
{{if_condition_form_type==wpforms}}
|
12 |
-
[wpforms id="{{wp_form_id}}"]
|
13 |
-
{{ifend_condition_form_type_wpforms}}
|
14 |
-
|
15 |
-
{{if_condition_form_type==ninja_form}}
|
16 |
-
[ninja_form id="{{nj_forms_id}}"]
|
17 |
-
{{ifend_condition_form_type_ninja_form}}
|
18 |
-
';
|
19 |
-
|
20 |
-
$css = '';
|
21 |
-
$formSupported = array();
|
22 |
-
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
23 |
-
if(is_plugin_active('amp-cf7/amp-cf7.php')){
|
24 |
-
$formSupported = array_merge($formSupported, array('contact-form-7'=>'Contact Form 7'));
|
25 |
-
|
26 |
-
$args = array('post_type' => 'wpcf7_contact_form', 'posts_per_page' => -1);
|
27 |
-
$cf7Forms = get_posts( $args );
|
28 |
-
$form_titles = wp_list_pluck( $cf7Forms , 'post_title' );
|
29 |
-
$form_id = wp_list_pluck( $cf7Forms , 'ID' );
|
30 |
-
$cf7formArray = array();
|
31 |
-
if(count($form_titles)>0){
|
32 |
-
foreach ($form_titles as $key => $formName) {
|
33 |
-
$cf7formArray[$form_id[$key]] = $formName;
|
34 |
-
}
|
35 |
-
}
|
36 |
-
$cf7FormsList = array(array(
|
37 |
-
'type' =>'select',
|
38 |
-
'name' =>'cf7_form_id',
|
39 |
-
'label' =>"Select Form",
|
40 |
-
'tab' =>'customizer',
|
41 |
-
'default' =>'',
|
42 |
-
'options_details'=>$cf7formArray,
|
43 |
-
'content_type'=>'html',
|
44 |
-
'required' => array('form_type' => 'contact-form-7'),
|
45 |
-
));
|
46 |
-
|
47 |
-
}
|
48 |
-
if(is_plugin_active('amp-gravity-forms/amp-gravity-forms.php')){
|
49 |
-
$formSupported = array_merge($formSupported, array('gravityform'=>'Gravity Form'));
|
50 |
-
|
51 |
-
$apbGFforms = RGFormsModel::get_forms();
|
52 |
-
$grvtyformArray = array();
|
53 |
-
if(count($apbGFforms)){
|
54 |
-
foreach( $apbGFforms as $form ):
|
55 |
-
$grvtyformArray[$form->id] = $form->title;
|
56 |
-
endforeach;
|
57 |
-
}
|
58 |
-
$gravityFormsList = array(array(
|
59 |
-
'type' =>'select',
|
60 |
-
'name' =>'gf_form_id',
|
61 |
-
'label' =>"Select Form",
|
62 |
-
'tab' =>'customizer',
|
63 |
-
'default' =>'',
|
64 |
-
'options_details'=>$grvtyformArray,
|
65 |
-
'content_type'=>'html',
|
66 |
-
'required' => array('form_type' => 'gravityform'),
|
67 |
-
));
|
68 |
-
}
|
69 |
-
if(is_plugin_active('amp-wp-forms/amp-wpforms.php')){
|
70 |
-
$formSupported = array_merge($formSupported, array('wpforms'=>'WP Forms'));
|
71 |
-
|
72 |
-
//$args = apply_filters( 'wpforms_modal_select', array() );
|
73 |
-
// No ID provided, get multiple forms
|
74 |
-
$defaults = array(
|
75 |
-
'post_type' => 'wpforms',
|
76 |
-
'orderby' => 'id',
|
77 |
-
'order' => 'ASC',
|
78 |
-
'no_found_rows' => true,
|
79 |
-
'nopaging' => true,
|
80 |
-
);
|
81 |
-
$args = wp_parse_args( $args, $defaults );
|
82 |
-
$args['post_type'] = 'wpforms';
|
83 |
-
$forms = get_posts( $args );
|
84 |
-
$wpformsArray = array();
|
85 |
-
if(count($forms)){
|
86 |
-
foreach( $forms as $form ):
|
87 |
-
$wpformsArray[$form->id] = $form->post_title;
|
88 |
-
endforeach;
|
89 |
-
}
|
90 |
-
$wpformsList = array(array(
|
91 |
-
'type' =>'select',
|
92 |
-
'name' =>'wp_forms_id',
|
93 |
-
'label' =>"Select Form",
|
94 |
-
'tab' =>'customizer',
|
95 |
-
'default' =>'',
|
96 |
-
'options_details'=>$wpformsArray,
|
97 |
-
'content_type'=>'html',
|
98 |
-
'required' => array('form_type' => 'wpforms'),
|
99 |
-
));
|
100 |
-
}
|
101 |
-
if(is_plugin_active('amp-ninja-forms/amp-ninja-forms.php')){
|
102 |
-
$formSupported = array_merge($formSupported, array('ninja_form'=>'Ninja Forms'));
|
103 |
-
|
104 |
-
$ninjaforms_modified = array();
|
105 |
-
|
106 |
-
if ( get_option( 'ninja_forms_load_deprecated', false ) ) {
|
107 |
-
$forms = Ninja_Forms()->forms()->get_all();
|
108 |
-
|
109 |
-
foreach ( $forms as $form_id ) {
|
110 |
-
$ninjaforms_modified[ $form_id ] = Ninja_Forms()->form( $form_id )->get_setting( 'form_title' );;
|
111 |
-
}
|
112 |
-
} else {
|
113 |
-
$forms = Ninja_Forms()->form()->get_forms();
|
114 |
-
foreach ( $forms as $index => $form ) {
|
115 |
-
$ninjaforms_modified[ $form->get_id() ] = $form->get_setting( 'title' );
|
116 |
-
}
|
117 |
-
}
|
118 |
-
$ninjaFormList = array(array(
|
119 |
-
'type' =>'select',
|
120 |
-
'name' =>'nj_forms_id',
|
121 |
-
'label' =>"Select Form",
|
122 |
-
'tab' =>'customizer',
|
123 |
-
'default' =>'',
|
124 |
-
'options_details'=>$ninjaforms_modified,
|
125 |
-
'content_type'=>'html',
|
126 |
-
'required' => array('form_type' => 'ninja_form'),
|
127 |
-
));
|
128 |
-
}
|
129 |
-
|
130 |
-
$formFields = array(
|
131 |
-
array(
|
132 |
-
'type' =>'select',
|
133 |
-
'name' =>'form_type',
|
134 |
-
'label' =>"Select Form",
|
135 |
-
'tab' =>'customizer',
|
136 |
-
'default' =>'',
|
137 |
-
'options_details'=>$formSupported,
|
138 |
-
'content_type'=>'html',
|
139 |
-
'helpmessage' => 'This module requires <a href="https://ampforwp.com/contact-form-7" target="_blank">AMP Contact Form 7</a> or <a href="https://ampforwp.com/gravity-forms/" target="_blank">AMP Gravity Forms</a> Extension. <a target="_blank" href="https://ampforwp.com/extensions/">View all the Extensions</a>'
|
140 |
-
),
|
141 |
-
);
|
142 |
-
if(isset($cf7FormsList)){
|
143 |
-
$formFields = array_merge($formFields, $cf7FormsList);
|
144 |
-
}
|
145 |
-
if(isset($gravityFormsList)){
|
146 |
-
$formFields = array_merge($formFields, $gravityFormsList);
|
147 |
-
}
|
148 |
-
if(isset($wpformsList)){
|
149 |
-
$formFields = array_merge($formFields, $wpformsList);
|
150 |
-
}
|
151 |
-
if(isset($ninjaFormList)){
|
152 |
-
$formFields = array_merge($formFields, $ninjaFormList);
|
153 |
-
}
|
154 |
-
return array(
|
155 |
-
'label' =>'Contact Forms',
|
156 |
-
'name' =>'contact-form-shortcode',
|
157 |
-
'default_tab'=> 'customizer',
|
158 |
-
'tabs' => array(
|
159 |
-
'customizer'=>'Content',
|
160 |
-
'design'=>'Design',
|
161 |
-
'advanced' => 'Advanced',
|
162 |
-
'layout' => 'Layout'
|
163 |
-
),
|
164 |
-
'fields' => $formFields,
|
165 |
-
'front_template'=> $output,
|
166 |
-
'front_common_css'=>'',
|
167 |
-
);
|
168 |
-
|
169 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pagebuilder/modules/contents-module.php
CHANGED
@@ -195,60 +195,48 @@ require_once ABSPATH . WPINC . '/category.php';
|
|
195 |
$image = $thumb_url_array[0];
|
196 |
$width = $thumb_url_array[1];
|
197 |
$height = $thumb_url_array[2];
|
198 |
-
}
|
199 |
-
if(ampforwp_is_custom_field_featured_image() && ampforwp_cf_featured_image_src()){
|
200 |
-
$image = ampforwp_cf_featured_image_src();
|
201 |
-
$width = ampforwp_cf_featured_image_src('width');
|
202 |
-
$height = ampforwp_cf_featured_image_src('height');
|
203 |
-
}
|
204 |
-
if(!empty($image) && !empty($width) && !empty($height)){
|
205 |
-
switch($fieldValues['content_layout_type']){
|
206 |
-
case 1:
|
207 |
-
$width = $fieldValues['img-width-1'];
|
208 |
-
$height = $fieldValues['img-height-1'];
|
209 |
-
break;
|
210 |
-
case 2:
|
211 |
-
$width = $fieldValues['img-width-2'];
|
212 |
-
$height = $fieldValues['img-height-2'];
|
213 |
-
break;
|
214 |
-
case 3:
|
215 |
-
$width = $fieldValues['img-width-3'];
|
216 |
-
$height = $fieldValues['img-height-3'];
|
217 |
-
break;
|
218 |
-
case 4:
|
219 |
-
$width = $fieldValues['img-width-4'];
|
220 |
-
$height = $fieldValues['img-height-4'];
|
221 |
-
break;
|
222 |
-
case 5:
|
223 |
-
$width = $fieldValues['img-width-5'];
|
224 |
-
$height = $fieldValues['img-height-5'];
|
225 |
-
break;
|
226 |
-
default:
|
227 |
-
break;
|
228 |
-
}
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
}
|
238 |
-
|
239 |
$thumb_url = ampforwp_aq_resize( $image, $width, $height, true, false ); //resize & crop the image
|
240 |
-
|
241 |
if($thumb_url!=false){
|
242 |
$image = $thumb_url[0];
|
243 |
$width = $thumb_url[1];
|
244 |
$height = $thumb_url[2];
|
245 |
}
|
246 |
-
|
247 |
}catch(Exception $e){
|
248 |
error_log($e);
|
249 |
}
|
|
|
250 |
}
|
251 |
-
|
252 |
$excerptContent = "";
|
253 |
if( $ampforwp_show_excerpt == 'yes' ) {
|
254 |
if( has_excerpt() ) {
|
195 |
$image = $thumb_url_array[0];
|
196 |
$width = $thumb_url_array[1];
|
197 |
$height = $thumb_url_array[2];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
|
199 |
+
switch($fieldValues['content_layout_type']){
|
200 |
+
case 1:
|
201 |
+
$width = $fieldValues['img-width-1'];
|
202 |
+
$height = $fieldValues['img-height-1'];
|
203 |
+
break;
|
204 |
+
case 2:
|
205 |
+
$width = $fieldValues['img-width-2'];
|
206 |
+
$height = $fieldValues['img-height-2'];
|
207 |
+
break;
|
208 |
+
case 3:
|
209 |
+
$width = $fieldValues['img-width-3'];
|
210 |
+
$height = $fieldValues['img-height-3'];
|
211 |
+
break;
|
212 |
+
case 4:
|
213 |
+
$width = $fieldValues['img-width-4'];
|
214 |
+
$height = $fieldValues['img-height-4'];
|
215 |
+
break;
|
216 |
+
case 5:
|
217 |
+
$width = $fieldValues['img-width-5'];
|
218 |
+
$height = $fieldValues['img-height-5'];
|
219 |
+
break;
|
220 |
+
default:
|
221 |
+
break;
|
222 |
+
}
|
223 |
+
list($new_width, $new_height) = apply_filters("ampforwp_pb_content_mod_set_height_width", $width, $height, $fieldValues);
|
224 |
+
if ( $new_width && $new_height ) {
|
225 |
+
$width = $new_width;
|
226 |
+
$height = $new_height;
|
227 |
}
|
228 |
+
try{
|
229 |
$thumb_url = ampforwp_aq_resize( $image, $width, $height, true, false ); //resize & crop the image
|
|
|
230 |
if($thumb_url!=false){
|
231 |
$image = $thumb_url[0];
|
232 |
$width = $thumb_url[1];
|
233 |
$height = $thumb_url[2];
|
234 |
}
|
|
|
235 |
}catch(Exception $e){
|
236 |
error_log($e);
|
237 |
}
|
238 |
+
|
239 |
}
|
|
|
240 |
$excerptContent = "";
|
241 |
if( $ampforwp_show_excerpt == 'yes' ) {
|
242 |
if( has_excerpt() ) {
|
pagebuilder/modules/feature-mod-module.php
CHANGED
@@ -3,32 +3,18 @@ $output = '
|
|
3 |
<div class="ln-fx">{{repeater}}</div>';
|
4 |
$css = '
|
5 |
.feature-mod{margin:{{margin_css}};padding:{{padding_css}};}
|
6 |
-
{{if_condition_feature_layout_type==1}}
|
7 |
{{module-class}} .ln-fx{width:100%;display:flex; flex-wrap:wrap;}
|
8 |
.feat-blk{ margin: 0 3% 3% 0; background: {{background_color_picker}}; width: 47%; text-align: center;padding: 40px; position: relative;color: #26292c;}
|
9 |
.feat-blk p{color: #333;font-size: 18px;padding-top:15px;}
|
10 |
.feat-blk h3{font-size:28px;color:{{font_color_picker}};font-weight:400;padding-bottom:15px;}
|
11 |
.feat-blk amp-img{margin:0 auto;width:100%}
|
12 |
.feat-blk amp-img{width:{{img_width}};}
|
13 |
-
{{if_condition_check_for_btn==1}}
|
14 |
-
.feat-blk .fe_btn{
|
15 |
-
font-size:{{btn_size}};
|
16 |
-
font-weight:{{btn_weight}};
|
17 |
-
color:{{btn_color}};
|
18 |
-
background:{{btn_bg_color}};
|
19 |
-
border-radius:{{bdr_rds}};
|
20 |
-
padding: 10px 20px;
|
21 |
-
margin-top: 15px;
|
22 |
-
display: inline-block;
|
23 |
-
}
|
24 |
-
{{ifend_condition_check_for_btn_1}}
|
25 |
@media(max-width:768px){
|
26 |
.feat-blk{width: 100%;margin-right: 0;}
|
27 |
}
|
28 |
@media(max-width:425px){
|
29 |
.feat-blk amp-img{width:100%;}
|
30 |
}
|
31 |
-
{{ifend_condition_feature_layout_type_1}}
|
32 |
';
|
33 |
return array(
|
34 |
'label' =>'Feature',
|
@@ -37,25 +23,9 @@ return array(
|
|
37 |
'tabs' => array(
|
38 |
'customizer'=>'Content',
|
39 |
'design'=>'Design',
|
40 |
-
'advanced' => 'Advanced'
|
41 |
-
'layouts'=> 'Layouts'
|
42 |
),
|
43 |
'fields' => array(
|
44 |
-
array(
|
45 |
-
'type' =>'layout-image-picker',
|
46 |
-
'name' =>"feature_layout_type",
|
47 |
-
'label' =>"Select Layout",
|
48 |
-
'tab' =>'layouts',
|
49 |
-
'default' =>'1',
|
50 |
-
'options_details'=>array(
|
51 |
-
array(
|
52 |
-
'value'=>'1',
|
53 |
-
'label'=>'',
|
54 |
-
'demo_image'=> AMPFORWP_PLUGIN_DIR_URI.'/images/feature-1.png'
|
55 |
-
),
|
56 |
-
),
|
57 |
-
'content_type'=>'html',
|
58 |
-
),
|
59 |
array(
|
60 |
'type' =>'checkbox',
|
61 |
'name' =>"image_layout",
|
@@ -69,7 +39,6 @@ return array(
|
|
69 |
),
|
70 |
),
|
71 |
'content_type'=>'html',
|
72 |
-
'required' => array('feature_layout_type'=> 1)
|
73 |
),
|
74 |
array(
|
75 |
'type' =>'text',
|
@@ -78,32 +47,15 @@ return array(
|
|
78 |
'tab' =>'customizer',
|
79 |
'default' =>'300px',
|
80 |
'content_type'=>'css',
|
81 |
-
'required' => array('feature_layout_type'=> 1)
|
82 |
),
|
83 |
-
|
84 |
-
'type' =>'checkbox_bool',
|
85 |
-
'name' =>"check_for_btn",
|
86 |
-
'label' => 'Enable Button',
|
87 |
-
'tab' =>'customizer',
|
88 |
-
'default' =>0,
|
89 |
-
'options' =>array(
|
90 |
-
array(
|
91 |
-
'label'=>'Yes',
|
92 |
-
'value'=>1,
|
93 |
-
)
|
94 |
-
),
|
95 |
-
'content_type'=>'html',
|
96 |
-
'required' => array('feature_layout_type'=> 1)
|
97 |
-
),
|
98 |
-
|
99 |
array(
|
100 |
'type' =>'color-picker',
|
101 |
'name' =>"background_color_picker",
|
102 |
'label' =>'Background Color',
|
103 |
'tab' =>'design',
|
104 |
'default' =>'#f4f4f4',
|
105 |
-
'content_type'=>'css'
|
106 |
-
'required' => array('feature_layout_type'=> 1)
|
107 |
),
|
108 |
array(
|
109 |
'type' =>'color-picker',
|
@@ -111,8 +63,7 @@ return array(
|
|
111 |
'label' =>'Text Color',
|
112 |
'tab' =>'design',
|
113 |
'default' =>'#333',
|
114 |
-
'content_type'=>'css'
|
115 |
-
'required' => array('feature_layout_type'=> 1)
|
116 |
),
|
117 |
array(
|
118 |
'type' =>'select',
|
@@ -125,60 +76,8 @@ return array(
|
|
125 |
'left' =>'Left',
|
126 |
'right' =>'Right', ),
|
127 |
'content_type'=>'css',
|
128 |
-
'required' => array('feature_layout_type'=> 1)
|
129 |
-
),
|
130 |
-
array(
|
131 |
-
'type' =>'text',
|
132 |
-
'name' =>"btn_size",
|
133 |
-
'label' =>'Button Font Size',
|
134 |
-
'tab' =>'design',
|
135 |
-
'default' =>'16px',
|
136 |
-
'content_type'=>'css',
|
137 |
-
'required' => array('feature_layout_type'=> 1)
|
138 |
-
),
|
139 |
-
array(
|
140 |
-
'type' =>'select',
|
141 |
-
'name' =>'btn_weight',
|
142 |
-
'label' =>"Button Font Weight",
|
143 |
-
'tab' =>'design',
|
144 |
-
'default' =>'400',
|
145 |
-
'options_details'=>array(
|
146 |
-
'300' =>'Light',
|
147 |
-
'400' =>'Regular',
|
148 |
-
'500' =>'Medium',
|
149 |
-
'600' =>'Semi Bold',
|
150 |
-
'700' =>'Bold',
|
151 |
-
),
|
152 |
-
'content_type'=>'css',
|
153 |
-
'required' => array('feature_layout_type'=> 1)
|
154 |
-
),
|
155 |
-
array(
|
156 |
-
'type' =>'color-picker',
|
157 |
-
'name' =>"btn_color",
|
158 |
-
'label' =>'Button Text Color',
|
159 |
-
'tab' =>'design',
|
160 |
-
'default' =>'#fff',
|
161 |
-
'content_type'=>'css',
|
162 |
-
'required' => array('feature_layout_type'=> 1)
|
163 |
-
),
|
164 |
-
array(
|
165 |
-
'type' =>'color-picker',
|
166 |
-
'name' =>"btn_bg_color",
|
167 |
-
'label' =>'Background Color',
|
168 |
-
'tab' =>'design',
|
169 |
-
'default' =>'#555',
|
170 |
-
'content_type'=>'css',
|
171 |
-
'required' => array('feature_layout_type'=> 1)
|
172 |
-
),
|
173 |
-
array(
|
174 |
-
'type' =>'text',
|
175 |
-
'name' =>'bdr_rds',
|
176 |
-
'label' =>'Border Radius',
|
177 |
-
'tab' =>'design',
|
178 |
-
'default' =>'0px',
|
179 |
-
'content_type'=>'css',
|
180 |
-
'required' => array('feature_layout_type'=> 1)
|
181 |
),
|
|
|
182 |
array(
|
183 |
'type' =>'spacing',
|
184 |
'name' =>"margin_css",
|
@@ -192,7 +91,6 @@ return array(
|
|
192 |
'left'=>'0px',
|
193 |
),
|
194 |
'content_type'=>'css',
|
195 |
-
'required' => array('feature_layout_type'=> 1)
|
196 |
),
|
197 |
array(
|
198 |
'type' =>'spacing',
|
@@ -206,7 +104,6 @@ return array(
|
|
206 |
'bottom'=>'0px'
|
207 |
),
|
208 |
'content_type'=>'css',
|
209 |
-
'required' => array('feature_layout_type'=> 1)
|
210 |
),
|
211 |
|
212 |
),
|
@@ -223,7 +120,6 @@ return array(
|
|
223 |
'tab' =>'customizer',
|
224 |
'default' =>'Your Feature Title',
|
225 |
'content_type'=>'html',
|
226 |
-
'required' => array('feature_layout_type'=> 1)
|
227 |
),
|
228 |
array(
|
229 |
'type' =>'upload',
|
@@ -232,7 +128,6 @@ return array(
|
|
232 |
'tab' =>'customizer',
|
233 |
'default' =>'',
|
234 |
'content_type'=>'html',
|
235 |
-
'required' => array('feature_layout_type'=> 1)
|
236 |
),
|
237 |
array(
|
238 |
'type' =>'text-editor',
|
@@ -241,55 +136,15 @@ return array(
|
|
241 |
'tab' =>'customizer',
|
242 |
'default' =>'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut.',
|
243 |
'content_type'=>'html',
|
244 |
-
'required' => array('feature_layout_type'=> 1)
|
245 |
),
|
246 |
-
|
247 |
-
|
248 |
-
array(
|
249 |
-
'type' => 'text',
|
250 |
-
'name' => "btn_txt",
|
251 |
-
'label' => 'Button Text',
|
252 |
-
'tab' => 'customizer',
|
253 |
-
'default' => 'Learn More',
|
254 |
-
'content_type' => 'html',
|
255 |
-
'helpmessage' => 'Leave empty if do not want to show button.',
|
256 |
-
'required' => array('feature_layout_type'=>'1', 'check_for_btn'=>'1'),
|
257 |
-
),
|
258 |
-
array(
|
259 |
-
'type' =>'text',
|
260 |
-
'name' =>"btn_link",
|
261 |
-
'label' =>'URL',
|
262 |
-
'tab' =>'customizer',
|
263 |
-
'default' =>'#',
|
264 |
-
'content_type'=>'html',
|
265 |
-
'required' => array('feature_layout_type'=>'1', 'check_for_btn'=>'1'),
|
266 |
-
),
|
267 |
-
array(
|
268 |
-
'type' =>'select',
|
269 |
-
'name' =>'page_link_open',
|
270 |
-
'label' =>"Open link in",
|
271 |
-
'tab' =>'customizer',
|
272 |
-
'default' =>'new_page',
|
273 |
-
'options_details'=>array(
|
274 |
-
'new_page' =>'New tab',
|
275 |
-
'same_page' =>'Same page'
|
276 |
-
),
|
277 |
-
'content_type'=>'html',
|
278 |
-
'required' => array('feature_layout_type'=>'1', 'check_for_btn'=>'1'),
|
279 |
-
),
|
280 |
-
|
281 |
),
|
282 |
'front_template'=>
|
283 |
-
'
|
284 |
<h3 class="t-txt">{{content_title}}</h3>
|
285 |
{{if_img_upload}}<amp-img src="{{img_upload}}" width="{{image_width}}" height="{{image_height}}" {{image_layout}} alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
|
286 |
<p>{{content}}</p>
|
287 |
-
|
288 |
-
{{if_btn_txt}}
|
289 |
-
<a href="{{btn_link}}" {{if_condition_page_link_open==new_page}}target="_blank"{{ifend_condition_page_link_open_new_page}} class="fe_btn">{{btn_txt}}</a>
|
290 |
-
{{ifend_btn_txt}}
|
291 |
-
{{ifend_condition_check_for_btn_1}}
|
292 |
-
</div> {{ifend_condition_feature_layout_type_1}}'
|
293 |
),
|
294 |
|
295 |
);
|
3 |
<div class="ln-fx">{{repeater}}</div>';
|
4 |
$css = '
|
5 |
.feature-mod{margin:{{margin_css}};padding:{{padding_css}};}
|
|
|
6 |
{{module-class}} .ln-fx{width:100%;display:flex; flex-wrap:wrap;}
|
7 |
.feat-blk{ margin: 0 3% 3% 0; background: {{background_color_picker}}; width: 47%; text-align: center;padding: 40px; position: relative;color: #26292c;}
|
8 |
.feat-blk p{color: #333;font-size: 18px;padding-top:15px;}
|
9 |
.feat-blk h3{font-size:28px;color:{{font_color_picker}};font-weight:400;padding-bottom:15px;}
|
10 |
.feat-blk amp-img{margin:0 auto;width:100%}
|
11 |
.feat-blk amp-img{width:{{img_width}};}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
@media(max-width:768px){
|
13 |
.feat-blk{width: 100%;margin-right: 0;}
|
14 |
}
|
15 |
@media(max-width:425px){
|
16 |
.feat-blk amp-img{width:100%;}
|
17 |
}
|
|
|
18 |
';
|
19 |
return array(
|
20 |
'label' =>'Feature',
|
23 |
'tabs' => array(
|
24 |
'customizer'=>'Content',
|
25 |
'design'=>'Design',
|
26 |
+
'advanced' => 'Advanced'
|
|
|
27 |
),
|
28 |
'fields' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
array(
|
30 |
'type' =>'checkbox',
|
31 |
'name' =>"image_layout",
|
39 |
),
|
40 |
),
|
41 |
'content_type'=>'html',
|
|
|
42 |
),
|
43 |
array(
|
44 |
'type' =>'text',
|
47 |
'tab' =>'customizer',
|
48 |
'default' =>'300px',
|
49 |
'content_type'=>'css',
|
|
|
50 |
),
|
51 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
array(
|
53 |
'type' =>'color-picker',
|
54 |
'name' =>"background_color_picker",
|
55 |
'label' =>'Background Color',
|
56 |
'tab' =>'design',
|
57 |
'default' =>'#f4f4f4',
|
58 |
+
'content_type'=>'css'
|
|
|
59 |
),
|
60 |
array(
|
61 |
'type' =>'color-picker',
|
63 |
'label' =>'Text Color',
|
64 |
'tab' =>'design',
|
65 |
'default' =>'#333',
|
66 |
+
'content_type'=>'css'
|
|
|
67 |
),
|
68 |
array(
|
69 |
'type' =>'select',
|
76 |
'left' =>'Left',
|
77 |
'right' =>'Right', ),
|
78 |
'content_type'=>'css',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
),
|
80 |
+
|
81 |
array(
|
82 |
'type' =>'spacing',
|
83 |
'name' =>"margin_css",
|
91 |
'left'=>'0px',
|
92 |
),
|
93 |
'content_type'=>'css',
|
|
|
94 |
),
|
95 |
array(
|
96 |
'type' =>'spacing',
|
104 |
'bottom'=>'0px'
|
105 |
),
|
106 |
'content_type'=>'css',
|
|
|
107 |
),
|
108 |
|
109 |
),
|
120 |
'tab' =>'customizer',
|
121 |
'default' =>'Your Feature Title',
|
122 |
'content_type'=>'html',
|
|
|
123 |
),
|
124 |
array(
|
125 |
'type' =>'upload',
|
128 |
'tab' =>'customizer',
|
129 |
'default' =>'',
|
130 |
'content_type'=>'html',
|
|
|
131 |
),
|
132 |
array(
|
133 |
'type' =>'text-editor',
|
136 |
'tab' =>'customizer',
|
137 |
'default' =>'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut.',
|
138 |
'content_type'=>'html',
|
|
|
139 |
),
|
140 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
),
|
142 |
'front_template'=>
|
143 |
+
'<div class="feat-blk">
|
144 |
<h3 class="t-txt">{{content_title}}</h3>
|
145 |
{{if_img_upload}}<amp-img src="{{img_upload}}" width="{{image_width}}" height="{{image_height}}" {{image_layout}} alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
|
146 |
<p>{{content}}</p>
|
147 |
+
</div> '
|
|
|
|
|
|
|
|
|
|
|
148 |
),
|
149 |
|
150 |
);
|
pagebuilder/modules/slider-mod-module.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
$output = '
|
3 |
{{if_condition_carousel_layout_type==1}}
|
4 |
-
<amp-carousel width="400" height="300" layout="responsive" type="slides" autoplay delay="
|
5 |
{{repeater_image}}
|
6 |
</amp-carousel>
|
7 |
{{ifend_condition_carousel_layout_type_1}}
|
8 |
{{if_condition_carousel_layout_type==2}}
|
9 |
-
<amp-carousel id="carousel-with-preview
|
10 |
{{repeater_image}}
|
11 |
</amp-carousel>
|
12 |
<div class="slid-prv">
|
@@ -76,14 +76,6 @@ return array(
|
|
76 |
'default' =>'90%',
|
77 |
'content_type'=>'css',
|
78 |
),
|
79 |
-
array(
|
80 |
-
'type' =>'text',
|
81 |
-
'name' =>"delay",
|
82 |
-
'label' =>'Slider Delay',
|
83 |
-
'tab' =>'customizer',
|
84 |
-
'default' =>'2000',
|
85 |
-
'content_type'=>'html',
|
86 |
-
),
|
87 |
array(
|
88 |
'type' =>'checkbox',
|
89 |
'name' =>"image_layout",
|
@@ -168,7 +160,7 @@ return array(
|
|
168 |
"image"=>'
|
169 |
{{if_img_upload}}<amp-img src="{{img_upload}}" width="{{image_width}}" height="{{image_height}}" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
|
170 |
',
|
171 |
-
"button"=>'<button on="tap:carousel-with-preview
|
172 |
{{if_img_upload}}<amp-img src="{{img_upload-thumbnail}}" width="150" height="150" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
|
173 |
</button>'
|
174 |
)
|
1 |
<?php
|
2 |
$output = '
|
3 |
{{if_condition_carousel_layout_type==1}}
|
4 |
+
<amp-carousel width="400" height="300" layout="responsive" type="slides" autoplay delay="2000">
|
5 |
{{repeater_image}}
|
6 |
</amp-carousel>
|
7 |
{{ifend_condition_carousel_layout_type_1}}
|
8 |
{{if_condition_carousel_layout_type==2}}
|
9 |
+
<amp-carousel id="carousel-with-preview" width="400" height="300" layout="responsive" type="slides">
|
10 |
{{repeater_image}}
|
11 |
</amp-carousel>
|
12 |
<div class="slid-prv">
|
76 |
'default' =>'90%',
|
77 |
'content_type'=>'css',
|
78 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
array(
|
80 |
'type' =>'checkbox',
|
81 |
'name' =>"image_layout",
|
160 |
"image"=>'
|
161 |
{{if_img_upload}}<amp-img src="{{img_upload}}" width="{{image_width}}" height="{{image_height}}" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
|
162 |
',
|
163 |
+
"button"=>'<button on="tap:carousel-with-preview.goToSlide(index={{repeater_unique}})">
|
164 |
{{if_img_upload}}<amp-img src="{{img_upload-thumbnail}}" width="150" height="150" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
|
165 |
</button>'
|
166 |
)
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9.5
|
7 |
-
Stable tag: 0.9.97
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -183,103 +183,8 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
183 |
|
184 |
== Changelog ==
|
185 |
|
186 |
-
= 0.9.
|
187 |
-
*
|
188 |
-
* Fixed: Extraposition attribute left in CSS Design #2 #2119
|
189 |
-
* Fixed: Non-AMP header link not working #2109
|
190 |
-
* Added: Create an Ad Above the Post Content #2155
|
191 |
-
* Fixed: "AGO" text was not translatable #2158
|
192 |
-
* Added: Filter created `ampforwp_header_url` to modify logo url #2141
|
193 |
-
* Fixed: Removing the text "amp" in footer view non-amp-link #2158
|
194 |
-
* Added: Compatibility WP user Avatar plugin added #2011
|
195 |
-
* Fixed: Design 2 - meta info producing a block of empty HTML #1969 #1954
|
196 |
-
* Added: Pocket and Hatena Bookmark social share buttons Added #1652
|
197 |
-
* Fixed: External Links are appended with "amp" at the end of the url in content. #2174
|
198 |
-
* Fixed: Some Issues Found in Design #3 #2130
|
199 |
-
* Fixed: ScoopVersion: 1.4 By boostdevelopers theme displaying the error only in the category #1683
|
200 |
-
* Fixed: Page featured Image is not displaying in the Swift theme #2136
|
201 |
-
* Fixed: Dropcap breaking the youtube embed code #2157
|
202 |
-
* Fixed: Bulk hide by default option is requires Permalinks to be saved #2145
|
203 |
-
* Fixed: Fully compatibility with muffin page builder #2180
|
204 |
-
* Fixed: Incontent Related Post Issues #2078
|
205 |
-
* Fixed: Search page should not have AMP version of the page and not in search result #2191
|
206 |
-
* Added: Control added to modify Retina Images resolutions #2099
|
207 |
-
* Added: Created an option to duplicate a page builder element #1986
|
208 |
-
* Added: Image Caption is not displaying below the Image in design 1,2,3 #2101
|
209 |
-
* Fixed: Post pagination not working properly in D1, D2 and D3 #2168 #2243
|
210 |
-
* Fixed: Auto re-save permalink if the options in reading setting page get changed #2190
|
211 |
-
* Fixed: Leave a comment not looking good in Swift theme #2150
|
212 |
-
* Added: Social icons for pages. #2162
|
213 |
-
* Added: Create an option to pull canonical from Yoast #2118
|
214 |
-
* Added: Full Support for All in one SEO #1720
|
215 |
-
* Fixed: Single with sidebar CSS should only load if that layout type is selected #2091
|
216 |
-
* Fixed: Required Filed is not working in the Repeater in Page builder #2217
|
217 |
-
* Fixed: alt in `<div>` causing validation errors. #2093
|
218 |
-
* Added: Drop Down Menu Support in Swift Header Menu #2095
|
219 |
-
* Added: Parallax Setting Added in PageBuilder #2095
|
220 |
-
* Added: Multiple Layout Settings added in Feature Module in Page Builder #2095
|
221 |
-
* Added: Add the option changing the sliding speed of slider in "Slider module" of AMP Page Builder #2218
|
222 |
-
* Added: Created an option Related Post link in non amp #2201
|
223 |
-
* Fixed: Removed Jannah LazyLoad on AMP Mode #2224
|
224 |
-
* Fixed: Custom post types with custom taxonomy not working in AMP #2209
|
225 |
-
* Fixed: frontpage and homepage not working properly AMP take over #2153 #2277
|
226 |
-
* Added: Button field created in Feature module #2068
|
227 |
-
* Added: Excerpt should also work on homepage and categories page #2176
|
228 |
-
* Fixed: Options panel breaks in when RTL in WP Dashboard #2176
|
229 |
-
* Fixed: Featured image from Custom fields in page builder Category module #2237
|
230 |
-
* Added: Forms Module Support added in PageBuilder #2221
|
231 |
-
* Fixed: Paginated AMP URL on the category are opening to 404-page #2233
|
232 |
-
* Fixed: Ads not displaying properly in RTL #2227 #2138
|
233 |
-
* Fixed: single quotation (') in text module breaking AMP page builder #1940
|
234 |
-
* Added: Filter created to modify `ampforwp_loop_image_update` image arguments in components of AMP theme framework #2057
|
235 |
-
* Added: Option to change the locale of Facebook comments #2127
|
236 |
-
* Added: Search option in options panel #2088
|
237 |
-
* Fixed: Accordion not working when the user enters some data in Description with HTML Tags #2088 #2097
|
238 |
-
* Fixed: Internal links now working with ?amp=1 #2204
|
239 |
-
* Fixed: UTM Parameters not working properly with AMP #2223
|
240 |
-
* Fixed: Multiple Slider module of AMP Page builder not working #2090
|
241 |
-
* Fixed: Hide AMP by categories option should hide by default in the backend of that specific post #2112
|
242 |
-
* Added: IP Anonymization in Google analytics #2135
|
243 |
-
* Fixed: Improvement in the styling of AMP option panel #2102
|
244 |
-
* Added: Added new fonts control for Content in Single page #2122
|
245 |
-
* Fixed: Legacy page builder button styling is not loading properly #2036
|
246 |
-
* Added: Filter added so we can disable Comments on specific pages `ampforwp_comments_visibility` #2170
|
247 |
-
* Fixed: Improvement in Excerpt on small screen option #2034
|
248 |
-
* Added: Comments on Pages #2229
|
249 |
-
* Fixed: Pagination not working for some websites #2241
|
250 |
-
* Fixed: "Menu" option in Footer connected with Swift #2146
|
251 |
-
* Added: Wistia Support #1875
|
252 |
-
* Added: Add option in page builder to give the specific name to all modules #2251
|
253 |
-
* Added: Compatibility with Muffin Builder #2137
|
254 |
-
* Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
|
255 |
-
* Fixed: AMPforWP Option panel styles are overriding other theme's options panel if both use Redux Framework #2121
|
256 |
-
* Added: Render all the AMP Components added in Post Editor #2216 #2228
|
257 |
-
* Fixed: "Gap" Module of ThemeCo breaking the AMP pages #2220
|
258 |
-
* Added: Search widget compatibility #2143
|
259 |
-
* Added: Advertisement Module created in AMP Pagebuilder #2131
|
260 |
-
* Fixed: Performance issue with the function `ampforwp_get_comments_gravatar` #2234
|
261 |
-
* Fixed: Empty the amp pages, when the Clearfy HTML compress is enabled #2110
|
262 |
-
* Fixed: The attribute 'value' appearing in tag 'a' throwing the validation error #2262
|
263 |
-
* Fixed: Versioning of Styles and Scripts of redux-core #2126
|
264 |
-
* Added: Related Posts based on X days #2132
|
265 |
-
* Fixed: Warning in custom-sanitizer.php #2173
|
266 |
-
* Added: vuukle comment support #2075
|
267 |
-
* Fixed: Facebook Comment should not appear on the Checkout page, Add to cart page, or shop page #2170
|
268 |
-
* Added: SpotIM comment support #2075
|
269 |
-
* Added: Additional Controls added in Design3 Featured slider #2222
|
270 |
-
* Fixed: Username in AMP Option panel color was too light #2266
|
271 |
-
* Added: Settings created to modify H1 to H6 #2059
|
272 |
-
* Fixed: AMP_QUERY_VAR debug issue #2265
|
273 |
-
* Added: Custom page template in AMP #1923
|
274 |
-
* Fixed: Comments Button is not displaying in Design #3 #2163
|
275 |
-
* Added: Ability to add Forms Shortcodes in footer Widgets #2226
|
276 |
-
* Added: Option to add rel="nofollow" in AMP page builder button module #2239
|
277 |
-
* Added: Background video option in amp page builder #2195
|
278 |
-
* Fixed: Drop Down Menu Support in Swift Header Menu #2095
|
279 |
-
* Fixed: Yoast Description not getting added in AMP #2159
|
280 |
-
* Fixed: Improvement in styling of AMP option panel #2102
|
281 |
-
* Fixed: Hide AMP Bulk Tools Improvements #1867
|
282 |
-
* Added: Compatibility with the Relevanssi Plugin #1503
|
283 |
|
284 |
= 0.9.96 (2nd June 2018) =
|
285 |
* Added: Fully GDPR Compliance
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9.5
|
7 |
+
Stable tag: 0.9.97.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
183 |
|
184 |
== Changelog ==
|
185 |
|
186 |
+
= 0.9.96.1 (21st June 2018) =
|
187 |
+
* Fixed: Pagination on Homepage and Archive pages not working for some cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
= 0.9.96 (2nd June 2018) =
|
190 |
* Added: Fully GDPR Compliance
|
templates/design-manager/design-1/archive.php
CHANGED
@@ -131,7 +131,7 @@
|
|
131 |
$content = get_the_content();
|
132 |
} ?>
|
133 |
<p><?php global $redux_builder_amp;
|
134 |
-
if($redux_builder_amp['excerpt-option']== true) {
|
135 |
$excerpt_length = $redux_builder_amp['amp-design-1-excerpt'];
|
136 |
$final_content = "";
|
137 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
131 |
$content = get_the_content();
|
132 |
} ?>
|
133 |
<p><?php global $redux_builder_amp;
|
134 |
+
if($redux_builder_amp['excerpt-option-design-1']== true) {
|
135 |
$excerpt_length = $redux_builder_amp['amp-design-1-excerpt'];
|
136 |
$final_content = "";
|
137 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
templates/design-manager/design-1/elements/comments.php
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
<?php do_action('ampforwp_before_comment_hook',$this);
|
2 |
global $redux_builder_amp;
|
3 |
$enable_comments = "";
|
4 |
-
$display_comments_on = "";
|
5 |
if ( isset($redux_builder_amp['wordpress-comments-support']) && $redux_builder_amp['wordpress-comments-support']==true ) {
|
6 |
$enable_comments = true;
|
7 |
}
|
8 |
-
|
9 |
-
if ( $enable_comments
|
10 |
<div id="comments" class="ampforwp-comment-wrapper"> <?php
|
11 |
// Gather comments for a specific page/post
|
12 |
$postID = $comments = "";
|
@@ -37,8 +36,10 @@
|
|
37 |
<article id="comment-<?php comment_ID(); ?>" class="comment-body">
|
38 |
<footer class="comment-meta">
|
39 |
<?php if($comment_author_img_url){ ?>
|
40 |
-
<amp-img
|
41 |
-
<?php } ?>
|
|
|
|
|
42 |
<div class="comment-author vcard">
|
43 |
<?php printf(__('<b class="fn">%s</b> <span class="says">'.ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says').':</span>'), get_comment_author_link()) ?>
|
44 |
</div>
|
1 |
<?php do_action('ampforwp_before_comment_hook',$this);
|
2 |
global $redux_builder_amp;
|
3 |
$enable_comments = "";
|
|
|
4 |
if ( isset($redux_builder_amp['wordpress-comments-support']) && $redux_builder_amp['wordpress-comments-support']==true ) {
|
5 |
$enable_comments = true;
|
6 |
}
|
7 |
+
|
8 |
+
if ( $enable_comments ) { ?>
|
9 |
<div id="comments" class="ampforwp-comment-wrapper"> <?php
|
10 |
// Gather comments for a specific page/post
|
11 |
$postID = $comments = "";
|
36 |
<article id="comment-<?php comment_ID(); ?>" class="comment-body">
|
37 |
<footer class="comment-meta">
|
38 |
<?php if($comment_author_img_url){ ?>
|
39 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($comment_author_img_url); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
|
40 |
+
<?php } else { ?>
|
41 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($default_gravatar['url']); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
|
42 |
+
<?php } ?>
|
43 |
<div class="comment-author vcard">
|
44 |
<?php printf(__('<b class="fn">%s</b> <span class="says">'.ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says').':</span>'), get_comment_author_link()) ?>
|
45 |
</div>
|
templates/design-manager/design-1/elements/content.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
$ampforwp_the_content = $this->get( 'ampforwp_amp_content' );
|
16 |
}
|
17 |
// Muffin Builder Compatibility #1455 #1893
|
18 |
-
if ( function_exists('mfn_builder_print')
|
19 |
ob_start();
|
20 |
mfn_builder_print( get_the_ID() );
|
21 |
$content = ob_get_contents();
|
@@ -34,7 +34,20 @@
|
|
34 |
)
|
35 |
)
|
36 |
);
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
|
40 |
//Filter to modify the Content
|
15 |
$ampforwp_the_content = $this->get( 'ampforwp_amp_content' );
|
16 |
}
|
17 |
// Muffin Builder Compatibility #1455 #1893
|
18 |
+
if ( function_exists('mfn_builder_print') ) {
|
19 |
ob_start();
|
20 |
mfn_builder_print( get_the_ID() );
|
21 |
$content = ob_get_contents();
|
34 |
)
|
35 |
)
|
36 |
);
|
37 |
+
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
38 |
+
}
|
39 |
+
else {
|
40 |
+
if($redux_builder_amp['amp-pagination']) {
|
41 |
+
$ampforwp_new_content = explode('<!--nextpage-->', $ampforwp_the_content);
|
42 |
+
$queried_var = get_query_var('page');
|
43 |
+
if ( $queried_var > 1 ) {
|
44 |
+
$queried_var = $queried_var -1 ;
|
45 |
+
}
|
46 |
+
else {
|
47 |
+
$queried_var = 0;
|
48 |
+
}
|
49 |
+
$ampforwp_the_content = $ampforwp_new_content[$queried_var];
|
50 |
+
} //#1015 Pegazee
|
51 |
}
|
52 |
|
53 |
//Filter to modify the Content
|
templates/design-manager/design-1/elements/meta-info.php
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
<?php do_action('ampforwp_before_meta_info_hook',$this); ?>
|
2 |
-
<?php global $redux_builder_amp;
|
3 |
-
if ( is_single() || (is_page() && $redux_builder_amp['meta_page']) ) : ?>
|
4 |
<div class="amp-wp-article-header ampforwp-meta-info <?php if( is_page() && ! $redux_builder_amp['meta_page'] ) {?> hide-meta-info <?php }?>">
|
5 |
|
6 |
<?php $post_author = $this->get( 'post_author' ); ?>
|
@@ -11,12 +10,12 @@ if ( is_single() || (is_page() && $redux_builder_amp['meta_page']) ) : ?>
|
|
11 |
$author_image = get_avatar_url( $post_author->user_email, array( 'size' => 24 ) );
|
12 |
if ( function_exists( 'get_avatar_url' ) && ( $author_image ) ) {
|
13 |
if( is_single()) { ?>
|
14 |
-
<amp-img
|
15 |
<?php
|
16 |
echo ampforwp_get_author_details( $post_author , 'meta-info' );
|
17 |
}
|
18 |
if( is_page() && $redux_builder_amp['meta_page'] ) { ?>
|
19 |
-
<amp-img
|
20 |
<?php
|
21 |
echo ampforwp_get_author_details( $post_author , 'meta-info' );
|
22 |
}
|
@@ -38,5 +37,4 @@ if ( is_single() || (is_page() && $redux_builder_amp['meta_page']) ) : ?>
|
|
38 |
</div>
|
39 |
|
40 |
</div>
|
41 |
-
<?php endif; ?>
|
42 |
<?php do_action('ampforwp_after_meta_info_hook',$this);
|
1 |
<?php do_action('ampforwp_before_meta_info_hook',$this); ?>
|
2 |
+
<?php global $redux_builder_amp; ?>
|
|
|
3 |
<div class="amp-wp-article-header ampforwp-meta-info <?php if( is_page() && ! $redux_builder_amp['meta_page'] ) {?> hide-meta-info <?php }?>">
|
4 |
|
5 |
<?php $post_author = $this->get( 'post_author' ); ?>
|
10 |
$author_image = get_avatar_url( $post_author->user_email, array( 'size' => 24 ) );
|
11 |
if ( function_exists( 'get_avatar_url' ) && ( $author_image ) ) {
|
12 |
if( is_single()) { ?>
|
13 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($author_image); ?>" width="24" height="24" layout="fixed"></amp-img>
|
14 |
<?php
|
15 |
echo ampforwp_get_author_details( $post_author , 'meta-info' );
|
16 |
}
|
17 |
if( is_page() && $redux_builder_amp['meta_page'] ) { ?>
|
18 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($author_image); ?>" width="24" height="24" layout="fixed"></amp-img>
|
19 |
<?php
|
20 |
echo ampforwp_get_author_details( $post_author , 'meta-info' );
|
21 |
}
|
37 |
</div>
|
38 |
|
39 |
</div>
|
|
|
40 |
<?php do_action('ampforwp_after_meta_info_hook',$this);
|
templates/design-manager/design-1/elements/meta-taxonomy.php
CHANGED
@@ -61,7 +61,7 @@ if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_sing
|
|
61 |
$author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 70 ) );
|
62 |
}
|
63 |
if ( $author_avatar_url ) { ?>
|
64 |
-
<amp-img
|
65 |
<?php
|
66 |
}
|
67 |
echo ampforwp_get_author_details( $post_author , 'meta-taxonomy' );
|
61 |
$author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 70 ) );
|
62 |
}
|
63 |
if ( $author_avatar_url ) { ?>
|
64 |
+
<amp-img data-block-on-consent src="<?php echo $author_avatar_url; ?>" width="70" height="70" layout="fixed"></amp-img>
|
65 |
<?php
|
66 |
}
|
67 |
echo ampforwp_get_author_details( $post_author , 'meta-taxonomy' );
|
templates/design-manager/design-1/elements/related-posts.php
CHANGED
@@ -1,125 +1,110 @@
|
|
1 |
<?php
|
2 |
-
global $post, $redux_builder_amp;
|
3 |
-
do_action('ampforwp_above_related_post',$this); //Above Related Posts
|
4 |
-
$string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
|
5 |
-
$int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
|
6 |
|
7 |
-
// declaring this variable here to prevent debug errors
|
8 |
-
$args = null;
|
9 |
-
$orderby = 'ID';
|
10 |
-
// declaring this variable for counting number of related post
|
11 |
-
$r_count = 1;
|
12 |
-
// Check for the order of related posts
|
13 |
-
if( isset( $redux_builder_amp['ampforwp-single-order-of-related-posts'] ) && $redux_builder_amp['ampforwp-single-order-of-related-posts'] ){
|
14 |
-
|
15 |
-
}
|
16 |
-
// Custom Post types
|
17 |
-
if( $current_post_type = get_post_type( $post )) {
|
18 |
-
// The query arguments
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
}//end of block for custom Post types
|
29 |
-
// code block for categories
|
30 |
-
if($redux_builder_amp['ampforwp-single-select-type-of-related']==2) {
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
}
|
45 |
-
} //end of block for categories
|
46 |
-
|
47 |
-
//code block for tags
|
48 |
-
if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
49 |
-
$ampforwp_tags = get_the_tags($post->ID);
|
50 |
-
if ($ampforwp_tags) {
|
51 |
-
$tag_ids = array();
|
52 |
-
foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
|
53 |
-
$args=array(
|
54 |
-
'tag__in' => $tag_ids,
|
55 |
-
'post__not_in' => array($post->ID),
|
56 |
-
'posts_per_page' => $int_number_of_related_posts,
|
57 |
-
'ignore_sticky_posts'=> 1,
|
58 |
-
'has_password' => false ,
|
59 |
-
'post_status' => 'publish',
|
60 |
-
'orderby' => $orderby
|
61 |
-
);
|
62 |
-
}
|
63 |
-
}//end of block for tags
|
64 |
-
// Related Posts Based on Past few Days #2132
|
65 |
-
if ( isset($redux_builder_amp['ampforwp-related-posts-days-switch']) && true == $redux_builder_amp['ampforwp-related-posts-days-switch'] ) {
|
66 |
-
$date_range = strtotime ( '-' . $redux_builder_amp['ampforwp-related-posts-days-text'] .' day' );
|
67 |
-
$args['date_query'] = array(
|
68 |
-
array(
|
69 |
-
'after' => array(
|
70 |
-
'year' => date('Y', $date_range ),
|
71 |
-
'month' => date('m', $date_range ),
|
72 |
-
'day' => date('d', $date_range ),
|
73 |
-
),
|
74 |
-
)
|
75 |
-
);
|
76 |
-
}
|
77 |
-
if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] && $redux_builder_amp['ampforwp-single-select-type-of-related'] ){
|
78 |
-
$my_query = new wp_query( $args );
|
79 |
-
if( $my_query->have_posts() ) { ?>
|
80 |
-
<div class="amp-wp-content relatedpost">
|
81 |
-
<div class="related_posts">
|
82 |
-
<ol class="clearfix">
|
83 |
-
<span><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></span>
|
84 |
-
<?php
|
85 |
-
while( $my_query->have_posts() ) {
|
86 |
-
$my_query->the_post();
|
87 |
-
$related_post_permalink = ampforwp_url_controller( get_permalink() );
|
88 |
-
if ( isset($redux_builder_amp['ampforwp-single-related-posts-link']) && true == $redux_builder_amp['ampforwp-single-related-posts-link'] ) {
|
89 |
-
$related_post_permalink = get_permalink();
|
90 |
}
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
wp_reset_postdata();
|
124 |
?>
|
125 |
<?php do_action('ampforwp_below_related_post',$this);
|
1 |
<?php
|
2 |
+
global $post, $redux_builder_amp;
|
3 |
+
do_action('ampforwp_above_related_post',$this); //Above Related Posts
|
4 |
+
$string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
|
5 |
+
$int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
|
6 |
|
7 |
+
// declaring this variable here to prevent debug errors
|
8 |
+
$args = null;
|
9 |
+
$orderby = 'ID';
|
10 |
+
// declaring this variable for counting number of related post
|
11 |
+
$r_count = 1;
|
12 |
+
// Check for the order of related posts
|
13 |
+
if( isset( $redux_builder_amp['ampforwp-single-order-of-related-posts'] ) && $redux_builder_amp['ampforwp-single-order-of-related-posts'] ){
|
14 |
+
$orderby = 'rand';
|
15 |
+
}
|
16 |
+
// Custom Post types
|
17 |
+
if( $current_post_type = get_post_type( $post )) {
|
18 |
+
// The query arguments
|
19 |
+
if($current_post_type != 'page'){
|
20 |
+
$args = array(
|
21 |
+
'posts_per_page'=> $int_number_of_related_posts,
|
22 |
+
'order' => 'DESC',
|
23 |
+
'orderby' => $orderby,
|
24 |
+
'post_type' => $current_post_type,
|
25 |
+
'post__not_in' => array( $post->ID )
|
26 |
+
);
|
27 |
+
}
|
28 |
+
}//end of block for custom Post types
|
29 |
+
// code block for categories
|
30 |
+
if($redux_builder_amp['ampforwp-single-select-type-of-related']==2) {
|
31 |
+
$categories = get_the_category($post->ID);
|
32 |
+
if ($categories) {
|
33 |
+
$category_ids = array();
|
34 |
+
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
|
35 |
+
$args=array(
|
36 |
+
'category__in' => $category_ids,
|
37 |
+
'post__not_in' => array($post->ID),
|
38 |
+
'posts_per_page' => $int_number_of_related_posts,
|
39 |
+
'ignore_sticky_posts'=> 1,
|
40 |
+
'has_password' => false ,
|
41 |
+
'post_status' => 'publish',
|
42 |
+
'orderby' => $orderby
|
43 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
+
} //end of block for categories
|
46 |
+
|
47 |
+
//code block for tags
|
48 |
+
if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
49 |
+
$ampforwp_tags = get_the_tags($post->ID);
|
50 |
+
if ($ampforwp_tags) {
|
51 |
+
$tag_ids = array();
|
52 |
+
foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
|
53 |
+
$args=array(
|
54 |
+
'tag__in' => $tag_ids,
|
55 |
+
'post__not_in' => array($post->ID),
|
56 |
+
'posts_per_page' => $int_number_of_related_posts,
|
57 |
+
'ignore_sticky_posts'=> 1,
|
58 |
+
'has_password' => false ,
|
59 |
+
'post_status' => 'publish',
|
60 |
+
'orderby' => $orderby
|
61 |
+
);
|
62 |
+
}
|
63 |
+
}//end of block for tags
|
64 |
+
|
65 |
+
if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] && $redux_builder_amp['ampforwp-single-select-type-of-related'] ){
|
66 |
+
$my_query = new wp_query( $args );
|
67 |
+
if( $my_query->have_posts() ) { ?>
|
68 |
+
<div class="amp-wp-content relatedpost">
|
69 |
+
<div class="related_posts">
|
70 |
+
<ol class="clearfix">
|
71 |
+
<span><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></span>
|
72 |
+
<?php
|
73 |
+
while( $my_query->have_posts() ) {
|
74 |
+
$my_query->the_post();
|
75 |
+
$related_post_permalink = ampforwp_url_controller( get_permalink() );
|
76 |
+
?>
|
77 |
+
<li class="<?php if ( ampforwp_has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
|
78 |
+
<?php if ( ampforwp_has_post_thumbnail() ) {
|
79 |
+
if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
|
80 |
+
$width = 150;
|
81 |
+
$height = 150;
|
82 |
+
$image_args = array("tag"=>'div','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height,'responsive'=> 'true' );
|
83 |
+
amp_loop_image($image_args);
|
84 |
+
}
|
85 |
+
}?>
|
86 |
+
<div class="related_link">
|
87 |
+
<a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
|
88 |
+
<?php
|
89 |
+
if ( isset($redux_builder_amp['ampforwp-single-related-posts-excerpt']) && true == $redux_builder_amp['ampforwp-single-related-posts-excerpt'] ) {
|
90 |
+
if(has_excerpt()){
|
91 |
+
$content = get_the_excerpt();
|
92 |
+
}else{
|
93 |
+
$content = get_the_content();
|
94 |
+
} ?>
|
95 |
+
<p><?php echo wp_trim_words( strip_shortcodes( $content ) , '15' ); ?></p>
|
96 |
+
<?php } ?>
|
97 |
+
</div>
|
98 |
+
</li>
|
99 |
+
<?php
|
100 |
+
do_action('ampforwp_between_related_post',$r_count,$this);
|
101 |
+
$r_count++;
|
102 |
+
} ?>
|
103 |
+
</ol>
|
104 |
+
</div>
|
105 |
+
</div> <?php
|
106 |
+
}
|
107 |
+
}
|
108 |
wp_reset_postdata();
|
109 |
?>
|
110 |
<?php do_action('ampforwp_below_related_post',$this);
|
templates/design-manager/design-1/elements/social-icons.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php global $redux_builder_amp;
|
2 |
-
if ( is_single()
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
<?php do_action('ampforwp_before_social_icons_hook',$this); ?>
|
11 |
<div class="ampforwp-social-icons">
|
12 |
<?php if( true == $redux_builder_amp['ampforwp-facebook-like-button'] ) {
|
@@ -122,20 +122,6 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
|
|
122 |
</div>
|
123 |
</a>
|
124 |
<?php } ?>
|
125 |
-
<?php if ( true == $redux_builder_amp['enable-single-hatena-bookmarks'] ) { ?>
|
126 |
-
<a href="http://b.hatena.ne.jp/entry/<?php echo esc_url(get_the_permalink()); ?>" target="_blank">
|
127 |
-
<div class="amp-social-icon amp-social-hatena">
|
128 |
-
<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'%3e%3cpath d='M 64 96 L 64 416 L 212 416 C 252 416 292 404 308 368 C 328 332 320 276 284 252 C 272 244 260 240 248 236 C 276 232 300 212 300 184 C 304 156 296 120 268 108 C 236 96 192 96 160 96 L 64 96 z M 364 96 L 364 308 L 444 308 L 444 96 L 364 96 z M 144 156 C 144 156 188 156 200 160 C 224 168 224 208 196 212 C 188 216 144 216 144 216 L 144 156 z M 144 280 C 144 280 188 280 208 284 C 232 288 240 312 228 332 C 220 348 204 348 188 348 L 144 348 L 144 280 z M 404 328 A 44 44 0 0 0 360 372 A 44 44 0 0 0 404 416 A 44 44 0 0 0 448 372 A 44 44 0 0 0 404 328 z' style='fill:%23ffffff'/%3e%3c/svg%3e" width="50" height="20" />
|
129 |
-
</div>
|
130 |
-
</a>
|
131 |
-
<?php } ?>
|
132 |
-
<?php if ( true == $redux_builder_amp['enable-single-pocket-share'] ) { ?>
|
133 |
-
<a href="https://getpocket.com/save?url=<?php echo esc_url(get_the_permalink()); ?>" target="_blank">
|
134 |
-
<div class="amp-social-icon amp-social-pocket">
|
135 |
-
<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='2500' height='2251' viewBox='75.247 261.708 445.529 401.074'%3e%3cpath fill='%23EF4056' d='M114.219 261.708c-24.275 1.582-38.972 15.44-38.972 40.088v147.611c0 119.893 119.242 214.114 222.393 213.37 115.986-.837 223.137-98.779 223.137-213.37V301.796c0-24.741-15.626-38.693-40.088-40.088h-366.47zm93.943 120.079L297.64 466.8l89.571-85.013c40.088-16.835 57.574 28.927 41.111 42.321L311.685 535.443c-3.813 3.628-24.183 3.628-27.996 0L167.051 424.107c-15.72-14.789 4.743-61.295 41.111-42.32z'/%3e%3c/svg%3e" width="50" height="20" />
|
136 |
-
</div>
|
137 |
-
</a>
|
138 |
-
<?php } ?>
|
139 |
</div>
|
140 |
<?php } ?>
|
141 |
|
1 |
<?php global $redux_builder_amp;
|
2 |
+
if ( is_single() ) {
|
3 |
+
$permalink = '';
|
4 |
+
if(isset($redux_builder_amp['enable-single-twitter-share-link']) && $redux_builder_amp['enable-single-twitter-share-link']){
|
5 |
+
$permalink = get_the_permalink();
|
6 |
+
}
|
7 |
+
else
|
8 |
+
$permalink = wp_get_shortlink();
|
9 |
+
?>
|
10 |
<?php do_action('ampforwp_before_social_icons_hook',$this); ?>
|
11 |
<div class="ampforwp-social-icons">
|
12 |
<?php if( true == $redux_builder_amp['ampforwp-facebook-like-button'] ) {
|
122 |
</div>
|
123 |
</a>
|
124 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
</div>
|
126 |
<?php } ?>
|
127 |
|
templates/design-manager/design-1/index.php
CHANGED
@@ -92,7 +92,7 @@
|
|
92 |
$content = get_the_content();
|
93 |
} ?>
|
94 |
<p><?php global $redux_builder_amp;
|
95 |
-
if($redux_builder_amp['excerpt-option']== true) {
|
96 |
$excerpt_length = $redux_builder_amp['amp-design-1-excerpt'];
|
97 |
$final_content = "";
|
98 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
92 |
$content = get_the_content();
|
93 |
} ?>
|
94 |
<p><?php global $redux_builder_amp;
|
95 |
+
if($redux_builder_amp['excerpt-option-design-1']== true) {
|
96 |
$excerpt_length = $redux_builder_amp['amp-design-1-excerpt'];
|
97 |
$final_content = "";
|
98 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
templates/design-manager/design-1/search.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
|
4 |
<head>
|
5 |
<meta charset="utf-8">
|
6 |
-
<meta name="robots" content="noindex,nofollow"/>
|
7 |
<link rel="dns-prefetch" href="https://cdn.ampproject.org">
|
8 |
<?php $paged = get_query_var( 'paged' );
|
9 |
$current_search_url =trailingslashit(get_home_url())."?s=".get_search_query();
|
@@ -83,7 +82,7 @@
|
|
83 |
$content = get_the_content();
|
84 |
} ?>
|
85 |
<p><?php global $redux_builder_amp;
|
86 |
-
if($redux_builder_amp['excerpt-option']== true) {
|
87 |
$excerpt_length = $redux_builder_amp['amp-design-1-excerpt'];
|
88 |
$final_content = "";
|
89 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
3 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
|
4 |
<head>
|
5 |
<meta charset="utf-8">
|
|
|
6 |
<link rel="dns-prefetch" href="https://cdn.ampproject.org">
|
7 |
<?php $paged = get_query_var( 'paged' );
|
8 |
$current_search_url =trailingslashit(get_home_url())."?s=".get_search_query();
|
82 |
$content = get_the_content();
|
83 |
} ?>
|
84 |
<p><?php global $redux_builder_amp;
|
85 |
+
if($redux_builder_amp['excerpt-option-design-1']== true) {
|
86 |
$excerpt_length = $redux_builder_amp['amp-design-1-excerpt'];
|
87 |
$final_content = "";
|
88 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
templates/design-manager/design-1/style.php
CHANGED
@@ -51,7 +51,6 @@
|
|
51 |
.amp-wp-enforced-sizes{ max-width: 100%; margin: 0 auto; }
|
52 |
.amp-wp-unknown-size img{ object-fit: contain; }
|
53 |
amp-iframe{ max-width: 100%; margin-bottom : 20px; }
|
54 |
-
amp-wistia-player {margin:5px 0px;}
|
55 |
.amp-wp-content,.amp-wp-title-bar div {<?php if ( $content_max_width > 0 ) : ?> margin: 0 auto;max-width: <?php echo sprintf( '%dpx', $content_max_width ); ?>; <?php endif; ?> }
|
56 |
html{background: <?php echo sanitize_hex_color( $header_background_color ); ?>;} body{background: <?php echo sanitize_hex_color( $theme_color ); ?>;color: <?php echo sanitize_hex_color( $text_color ); ?>;font-family: 'Merriweather', 'Times New Roman', Times, Serif;font-weight: 300;line-height: 1.75em;}
|
57 |
p,ol,ul,figure {margin: 0 0 1em;padding: 0;} a,a:visited {color:<?php echo $redux_builder_amp['amp-opt-color-rgba-link-design1']['color']; ?>;}a:hover,a:active,a:focus {color: <?php echo sanitize_hex_color( $text_color ); ?>;} .wp-caption amp-img{max-width: 100%}
|
@@ -72,7 +71,7 @@ blockquote {color: <?php echo sanitize_hex_color( $text_color ); ?>;background:
|
|
72 |
.amp-wp-footer p {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .8em;line-height: 1.5em;margin: 0 15px 0 0;}
|
73 |
.amp-wp-footer a{text-decoration:none}.copyright_txt{float:left}.back-to-top{float:right}.amp-wp-header .nav_container{float: right;top: 16px;line-height: 1; right: 65px; position: absolute}.toggle-text{position:absolute;right:0;height:22px;width:28px}.toggle-text span{display:block;position:absolute;height:2px;width:25px;background:#fff;border-radius:19px;opacity:1;left:0}.toggle-text span:nth-child(2){top:9px}.toggle-text span:nth-child(3){top:18px}.amp-wp-home .amp-wp-meta{margin:5px 0}.amp-wp-home .amp-wp-content p{display:inline-block;width:100%}.ampforwp-custom-index .amp-wp-title a {text-decoration: none;color: <?php echo sanitize_hex_color( $text_color ); ?>;}.comment-button-wrapper a,.related_posts ol{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.amp-wp-meta{display:flex}.amp-wp-posted-on{display:initial}#pagination .next,#pagination .prev{display:inline-block}.ampforwp-custom-index .amp-wp-content{margin-bottom:30px}.pagination-holder{margin:1.5em 16px}#pagination .next{float:right}.amp-wp-home .amp-wp-content p{display:inline}.home-post-image{float:right;margin:0 0 10px 20px}.amp-wp-article-content amp-img{max-width:100%}.amp-wp-meta.amp-wp-tax-category,.amp-wp-meta.amp-wp-tax-tag{margin:0}.amp-wp-meta.amp-wp-tax-tag{display:initial}.ampforwp-social-icons{margin:1.5em 16px}.amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; margin-bottom:5px; }
|
74 |
.amp-social-icon amp-img{ top: 4px; }
|
75 |
-
.custom-amp-socialsharing-line{background:#00b900}.custom-amp-socialsharing-vk{background:#45668e}.amp-social-odnoklassniki{background:#ed812b}.amp-social-reddit{background:#ff4500}.amp-social-telegram{background:#0088cc}.amp-social-tumblr{background:#35465c}.amp-social-digg{background:#005be2}.amp-social-stumbleupon{background:#eb4924}.amp-social-wechat{background:#7bb32e}.amp-social-viber{background:#8f5db7}.
|
76 |
.comments_list ul li p{margin:0;font-size:14px;clear:both;padding-top:5px; word-break:break-word;}
|
77 |
.comments_list ul li{font-family:sans-serif;font-size:11px;list-style-type:none;margin-bottom:12px;background:#fefefe;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 2px 3px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.05);box-shadow:0 2px 3px rgba(0,0,0,.05);padding:0;max-width:1000px;width:96%}.comments_list ul li .says{margin-right:4px}.comments_list li li,.comments_list li li li{margin:20px 20px 10px}.comments_list ul li p{font-family:Merriweather,'Times New Roman',Times,Serif}.comments_list ul li .comment-body{padding:10px 0 15px}.comment-author{float:left}.single-post footer.comment-meta{padding-bottom:0; line-height: 1.9;}.comments_list li li{background:#f7f7f7;box-shadow:none;border:1px solid #eee} .page-numbers{ padding: 9px 10px; background: #fff; font-size: 14px; } .comment-author-img{float: left; margin-right: 5px; border-radius: 60px;} .comment-content amp-img{max-width: 300px;} amp-sidebar{width:250px}.amp-sidebar-image{line-height:100px;vertical-align:middle}.amp-close-image{top:15px;left:225px;cursor:pointer}.toggle-navigationv2 ul{list-style-type:none;margin:0;font-family:sans-serif;padding:0}.toggle-navigationv2 ul ul li a{padding-left:35px;background:#fff;display:inline-block}.toggle-navigationv2 ul li a{padding:10px 15px 10px 25px;width:88%;text-decoration:none;background:#fafafa;font-size:13px;border-bottom:1px solid #efefef}.close-nav{font-size:12px;font-family:sans-serif;background:rgba(0,0,0,.25);letter-spacing:1px;padding:10px;border-radius:100px;line-height:8px;margin:14px;left:191px;color:#fff}.close-nav:hover{background:rgba(0,0,0,.45)}.toggle-navigation ul{list-style-type:none;margin:0;padding:0;width:100%}.menu-all-pages-container:after{content:"";clear:both}.toggle-navigation ul li{font-size:13px;border-bottom:1px solid rgba(0,0,0,.11);padding:11px 0;width:25%;float:left;text-align:center;margin-top:6px}.toggle-navigation ul ul{display:none}.toggle-navigation ul li a{color:#eee;padding:15px}.toggle-navigation{display:none;background:#444}.nav_container:hover+.toggle-navigation,.toggle-navigation:active,.toggle-navigation:focus,.toggle-navigation:hover{display:inline-block;width:100%}#amp-user-notification1 p{display:inline-block}amp-user-notification{padding:5px;text-align:center;background:#fff;border-top:1px solid} amp-user-notification button {padding: 8px 10px;background: <?php echo sanitize_hex_color( $header_background_color ); ?>;color: <?php echo sanitize_hex_color( $header_color ); ?>;margin-left: 5px;border: 0;}amp-user-notification button:hover {cursor: pointer} .amp-ad-wrapper {text-align: center} <?php if( $redux_builder_amp['enable-single-social-icons'] == true && is_single() ) { ?>body {padding-bottom: 43px;}<?php } ?> .sticky_social a{text-decoration:none}.sticky_social{width:100%;bottom:0;display:block;left:0;box-shadow:0 4px 7px #000;background:#fff;padding:7px 0 0;position:fixed;margin:0;z-index:10;text-align:center}.whatsapp-share-icon{width:50px;height:28px;display:inline-block;background:#5cbe4a;padding:4px 0;position:relative;top:-4px}.amp-wp-tax-category span:first-child:after{content:' '}.amp-wp-tax-category span:after,.amp-wp-tax-tag span:after{content:', '}.amp-wp-tax-category span:last-child:after,.amp-wp-tax-tag span:last-child:after{content:' '}pre{white-space:pre-wrap}.amp-ad-wrapper.amp_ad_1{padding-top:20px}
|
78 |
.amp-wp-content-loop{width:100%}
|
@@ -100,13 +99,13 @@ blockquote {color: <?php echo sanitize_hex_color( $text_color ); ?>;background:
|
|
100 |
.amp-category-post amp-img{ margin-bottom:5px; }
|
101 |
.amp-category-block li:nth-child(3){ margin: 0 1%; }
|
102 |
@media screen and (max-width: 530px){ .amp-category-post {line-height: 1.45;font-size: 14px; } .amp-category-block li:nth-child(3) {margin:0 0.6%} }
|
103 |
-
@media screen and (max-width: 375px){ .
|
104 |
.searchmenu{ margin-right: 15px; margin-top: 10px; position: absolute; top: 0; right: 91px; }
|
105 |
.searchmenu button{ background:transparent; border:none }
|
106 |
.closebutton{ background: transparent; border: 0; color: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 30px; width: 32px; height: 32px; font-size: 12px; text-align: center; position: absolute; top: 12px; right: 20px; outline:none }
|
107 |
amp-lightbox{ background: rgba(0, 0, 0,0.85); }
|
108 |
<?php if( $redux_builder_amp['ampforwp-single-select-type-of-related'] ){ ?>
|
109 |
-
.related_posts span{display: block;}.related_posts ol{list-style-type:none;margin:0;padding:0}.related_posts ol li{width:100%;margin-bottom:12px;padding:0}.related_posts .related_link a{color:#000;font-size:18px}.related_posts ol li amp-img{width:100px;float:left;margin-right:15px}.related_posts ol li p{font-size:12px;color:#999;line-height:1.2;margin:
|
110 |
.related_posts ol li{display:inline-block}
|
111 |
<?php } ?>
|
112 |
<?php if( is_singular() || is_home() && $redux_builder_amp['amp-frontpage-select-option'] && ampforwp_get_blog_details() == false ) { ?>
|
@@ -146,7 +145,6 @@ table tr:hover td { background: #f2f2f2; background: -webkit-gradient(linear, le
|
|
146 |
.ampforwp-search-nav-wrapper .searchmenu{ margin-top: 20px; }
|
147 |
.headerlogo a, [class*=icono-]{ top:0; }
|
148 |
.amp-logo h1{font-size: 1em; font-weight: 400; line-height: 1.75em; margin: 0;}
|
149 |
-
.amp-logo{display:inline-block}
|
150 |
.amp-wp-header a, .headerlogo a, [class*=icono-] {color: <?php echo sanitize_hex_color( $header_color ); ?>;text-decoration: none;}
|
151 |
@media screen and (min-width: 650px) { table {display: inline-table;} }
|
152 |
<?php if($redux_builder_amp['enable-single-social-icons'] && is_socialshare_or_socialsticky_enabled_in_ampforwp() ){ ?> .amp-wp-footer{padding-bottom: 20px;}<?php } ?>
|
51 |
.amp-wp-enforced-sizes{ max-width: 100%; margin: 0 auto; }
|
52 |
.amp-wp-unknown-size img{ object-fit: contain; }
|
53 |
amp-iframe{ max-width: 100%; margin-bottom : 20px; }
|
|
|
54 |
.amp-wp-content,.amp-wp-title-bar div {<?php if ( $content_max_width > 0 ) : ?> margin: 0 auto;max-width: <?php echo sprintf( '%dpx', $content_max_width ); ?>; <?php endif; ?> }
|
55 |
html{background: <?php echo sanitize_hex_color( $header_background_color ); ?>;} body{background: <?php echo sanitize_hex_color( $theme_color ); ?>;color: <?php echo sanitize_hex_color( $text_color ); ?>;font-family: 'Merriweather', 'Times New Roman', Times, Serif;font-weight: 300;line-height: 1.75em;}
|
56 |
p,ol,ul,figure {margin: 0 0 1em;padding: 0;} a,a:visited {color:<?php echo $redux_builder_amp['amp-opt-color-rgba-link-design1']['color']; ?>;}a:hover,a:active,a:focus {color: <?php echo sanitize_hex_color( $text_color ); ?>;} .wp-caption amp-img{max-width: 100%}
|
71 |
.amp-wp-footer p {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .8em;line-height: 1.5em;margin: 0 15px 0 0;}
|
72 |
.amp-wp-footer a{text-decoration:none}.copyright_txt{float:left}.back-to-top{float:right}.amp-wp-header .nav_container{float: right;top: 16px;line-height: 1; right: 65px; position: absolute}.toggle-text{position:absolute;right:0;height:22px;width:28px}.toggle-text span{display:block;position:absolute;height:2px;width:25px;background:#fff;border-radius:19px;opacity:1;left:0}.toggle-text span:nth-child(2){top:9px}.toggle-text span:nth-child(3){top:18px}.amp-wp-home .amp-wp-meta{margin:5px 0}.amp-wp-home .amp-wp-content p{display:inline-block;width:100%}.ampforwp-custom-index .amp-wp-title a {text-decoration: none;color: <?php echo sanitize_hex_color( $text_color ); ?>;}.comment-button-wrapper a,.related_posts ol{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.amp-wp-meta{display:flex}.amp-wp-posted-on{display:initial}#pagination .next,#pagination .prev{display:inline-block}.ampforwp-custom-index .amp-wp-content{margin-bottom:30px}.pagination-holder{margin:1.5em 16px}#pagination .next{float:right}.amp-wp-home .amp-wp-content p{display:inline}.home-post-image{float:right;margin:0 0 10px 20px}.amp-wp-article-content amp-img{max-width:100%}.amp-wp-meta.amp-wp-tax-category,.amp-wp-meta.amp-wp-tax-tag{margin:0}.amp-wp-meta.amp-wp-tax-tag{display:initial}.ampforwp-social-icons{margin:1.5em 16px}.amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; margin-bottom:5px; }
|
73 |
.amp-social-icon amp-img{ top: 4px; }
|
74 |
+
.custom-amp-socialsharing-line{background:#00b900}.custom-amp-socialsharing-vk{background:#45668e}.amp-social-odnoklassniki{background:#ed812b}.amp-social-reddit{background:#ff4500}.amp-social-telegram{background:#0088cc}.amp-social-tumblr{background:#35465c}.amp-social-digg{background:#005be2}.amp-social-stumbleupon{background:#eb4924}.amp-social-wechat{background:#7bb32e}.amp-social-viber{background:#8f5db7}.comment-button-wrapper a{border-style:solid;border-color:#c2c2c2;border-width:1px 1px 2px;border-radius:4px;background-color:transparent;color:#0a89c0;cursor:pointer;display:block;font-size:14px;font-weight:600;text-align:center;line-height:18px;margin:0 auto;max-width:200px;padding:11px 16px;text-decoration:none;width:50%;-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.close-nav,.comments_list div,.related_posts ol li,.toggle-navigation ul,.toggle-navigationv2 ul li a{display:inline-block}main .amp-wp-content.comments_list{background:0 0;box-shadow:none;max-width:1030px}.comments_list h3{font-size:14px;font-weight:700;letter-spacing:.4px;margin:25px 0 10px;color:#333}.comments_list{margin:2.5em 16px}.comments_list ul{margin:0;padding:0}.comments_list ul.children{padding-bottom:10px;margin-left:4%;width:96%}
|
75 |
.comments_list ul li p{margin:0;font-size:14px;clear:both;padding-top:5px; word-break:break-word;}
|
76 |
.comments_list ul li{font-family:sans-serif;font-size:11px;list-style-type:none;margin-bottom:12px;background:#fefefe;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 2px 3px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.05);box-shadow:0 2px 3px rgba(0,0,0,.05);padding:0;max-width:1000px;width:96%}.comments_list ul li .says{margin-right:4px}.comments_list li li,.comments_list li li li{margin:20px 20px 10px}.comments_list ul li p{font-family:Merriweather,'Times New Roman',Times,Serif}.comments_list ul li .comment-body{padding:10px 0 15px}.comment-author{float:left}.single-post footer.comment-meta{padding-bottom:0; line-height: 1.9;}.comments_list li li{background:#f7f7f7;box-shadow:none;border:1px solid #eee} .page-numbers{ padding: 9px 10px; background: #fff; font-size: 14px; } .comment-author-img{float: left; margin-right: 5px; border-radius: 60px;} .comment-content amp-img{max-width: 300px;} amp-sidebar{width:250px}.amp-sidebar-image{line-height:100px;vertical-align:middle}.amp-close-image{top:15px;left:225px;cursor:pointer}.toggle-navigationv2 ul{list-style-type:none;margin:0;font-family:sans-serif;padding:0}.toggle-navigationv2 ul ul li a{padding-left:35px;background:#fff;display:inline-block}.toggle-navigationv2 ul li a{padding:10px 15px 10px 25px;width:88%;text-decoration:none;background:#fafafa;font-size:13px;border-bottom:1px solid #efefef}.close-nav{font-size:12px;font-family:sans-serif;background:rgba(0,0,0,.25);letter-spacing:1px;padding:10px;border-radius:100px;line-height:8px;margin:14px;left:191px;color:#fff}.close-nav:hover{background:rgba(0,0,0,.45)}.toggle-navigation ul{list-style-type:none;margin:0;padding:0;width:100%}.menu-all-pages-container:after{content:"";clear:both}.toggle-navigation ul li{font-size:13px;border-bottom:1px solid rgba(0,0,0,.11);padding:11px 0;width:25%;float:left;text-align:center;margin-top:6px}.toggle-navigation ul ul{display:none}.toggle-navigation ul li a{color:#eee;padding:15px}.toggle-navigation{display:none;background:#444}.nav_container:hover+.toggle-navigation,.toggle-navigation:active,.toggle-navigation:focus,.toggle-navigation:hover{display:inline-block;width:100%}#amp-user-notification1 p{display:inline-block}amp-user-notification{padding:5px;text-align:center;background:#fff;border-top:1px solid} amp-user-notification button {padding: 8px 10px;background: <?php echo sanitize_hex_color( $header_background_color ); ?>;color: <?php echo sanitize_hex_color( $header_color ); ?>;margin-left: 5px;border: 0;}amp-user-notification button:hover {cursor: pointer} .amp-ad-wrapper {text-align: center} <?php if( $redux_builder_amp['enable-single-social-icons'] == true && is_single() ) { ?>body {padding-bottom: 43px;}<?php } ?> .sticky_social a{text-decoration:none}.sticky_social{width:100%;bottom:0;display:block;left:0;box-shadow:0 4px 7px #000;background:#fff;padding:7px 0 0;position:fixed;margin:0;z-index:10;text-align:center}.whatsapp-share-icon{width:50px;height:28px;display:inline-block;background:#5cbe4a;padding:4px 0;position:relative;top:-4px}.amp-wp-tax-category span:first-child:after{content:' '}.amp-wp-tax-category span:after,.amp-wp-tax-tag span:after{content:', '}.amp-wp-tax-category span:last-child:after,.amp-wp-tax-tag span:last-child:after{content:' '}pre{white-space:pre-wrap}.amp-ad-wrapper.amp_ad_1{padding-top:20px}
|
77 |
.amp-wp-content-loop{width:100%}
|
99 |
.amp-category-post amp-img{ margin-bottom:5px; }
|
100 |
.amp-category-block li:nth-child(3){ margin: 0 1%; }
|
101 |
@media screen and (max-width: 530px){ .amp-category-post {line-height: 1.45;font-size: 14px; } .amp-category-block li:nth-child(3) {margin:0 0.6%} }
|
102 |
+
@media screen and (max-width: 375px){ .amp-category-post {line-height: 1.45;font-size: 12px; } .amp-category-block li:nth-child(3) {margin:0%} }
|
103 |
.searchmenu{ margin-right: 15px; margin-top: 10px; position: absolute; top: 0; right: 91px; }
|
104 |
.searchmenu button{ background:transparent; border:none }
|
105 |
.closebutton{ background: transparent; border: 0; color: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 30px; width: 32px; height: 32px; font-size: 12px; text-align: center; position: absolute; top: 12px; right: 20px; outline:none }
|
106 |
amp-lightbox{ background: rgba(0, 0, 0,0.85); }
|
107 |
<?php if( $redux_builder_amp['ampforwp-single-select-type-of-related'] ){ ?>
|
108 |
+
.related_posts span{display: block;}.related_posts ol{list-style-type:none;margin:0;padding:0}.related_posts ol li{width:100%;margin-bottom:12px;padding:0}.related_posts .related_link a{color:#000;font-size:18px}.related_posts ol li amp-img{width:100px;float:left;margin-right:15px}.related_posts ol li p{font-size:12px;color:#999;line-height:1.2;margin:12px 0 0}.no_related_thumbnail{padding:15px 18px} main .amp-wp-content.relatedpost{background:0 0;box-shadow:none;max-width:1030px}.relatedpost{margin:2em 16px}.related_posts span{font-size:14px;font-weight:700;letter-spacing:.4px;margin:25px 0 10px;color:#333}
|
109 |
.related_posts ol li{display:inline-block}
|
110 |
<?php } ?>
|
111 |
<?php if( is_singular() || is_home() && $redux_builder_amp['amp-frontpage-select-option'] && ampforwp_get_blog_details() == false ) { ?>
|
145 |
.ampforwp-search-nav-wrapper .searchmenu{ margin-top: 20px; }
|
146 |
.headerlogo a, [class*=icono-]{ top:0; }
|
147 |
.amp-logo h1{font-size: 1em; font-weight: 400; line-height: 1.75em; margin: 0;}
|
|
|
148 |
.amp-wp-header a, .headerlogo a, [class*=icono-] {color: <?php echo sanitize_hex_color( $header_color ); ?>;text-decoration: none;}
|
149 |
@media screen and (min-width: 650px) { table {display: inline-table;} }
|
150 |
<?php if($redux_builder_amp['enable-single-social-icons'] && is_socialshare_or_socialsticky_enabled_in_ampforwp() ){ ?> .amp-wp-footer{padding-bottom: 20px;}<?php } ?>
|
templates/design-manager/design-2/archive.php
CHANGED
@@ -121,28 +121,36 @@
|
|
121 |
<h2 class="amp-wp-title"><a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"><?php the_title(); ?></a></h2>
|
122 |
|
123 |
<?php
|
124 |
-
if( true == $redux_builder_amp['excerpt-option'] ) {
|
125 |
-
$class = 'large-screen-excerpt';
|
126 |
-
if ( true == $redux_builder_amp['excerpt-option-design-2'] ) {
|
127 |
-
$class = 'small-screen-excerpt';
|
128 |
-
}
|
129 |
if(has_excerpt()){
|
130 |
$content = get_the_excerpt();
|
131 |
}else{
|
132 |
$content = get_the_content();
|
133 |
}
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
140 |
|
141 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
142 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
143 |
}
|
144 |
-
echo $final_content;
|
145 |
-
|
|
|
146 |
</div>
|
147 |
<div class="cb"></div>
|
148 |
</div>
|
121 |
<h2 class="amp-wp-title"><a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"><?php the_title(); ?></a></h2>
|
122 |
|
123 |
<?php
|
|
|
|
|
|
|
|
|
|
|
124 |
if(has_excerpt()){
|
125 |
$content = get_the_excerpt();
|
126 |
}else{
|
127 |
$content = get_the_content();
|
128 |
}
|
129 |
+
?>
|
130 |
+
<p class="large-screen-excerpt">
|
131 |
+
<?php
|
132 |
+
$excerpt_length = "";
|
133 |
+
$excerpt_length = 15;
|
134 |
+
$final_content = "";
|
135 |
+
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
136 |
+
|
137 |
+
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
138 |
+
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
139 |
+
}
|
140 |
+
echo $final_content; ?> </p>
|
141 |
+
<p class="small-screen-excerpt" > <?php
|
142 |
+
if($redux_builder_amp['excerpt-option-design-2']== true) {
|
143 |
+
$excerpt_length='';
|
144 |
+
$excerpt_length = $redux_builder_amp['amp-design-2-excerpt'];
|
145 |
+
$final_content = "";
|
146 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
147 |
|
148 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
149 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
150 |
}
|
151 |
+
echo $final_content;
|
152 |
+
} ?>
|
153 |
+
</p>
|
154 |
</div>
|
155 |
<div class="cb"></div>
|
156 |
</div>
|
templates/design-manager/design-2/elements/comments.php
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
<?php do_action('ampforwp_before_comment_hook',$this);
|
2 |
global $redux_builder_amp;
|
3 |
$enable_comments = "";
|
4 |
-
$display_comments_on = "";
|
5 |
if ( isset($redux_builder_amp['wordpress-comments-support']) && $redux_builder_amp['wordpress-comments-support']==true ) {
|
6 |
$enable_comments = true;
|
7 |
}
|
8 |
-
|
9 |
-
if ( $enable_comments
|
10 |
<div id="comments" class="ampforwp-comment-wrapper"> <?php
|
11 |
// Gather comments for a specific page/post
|
12 |
$postID = $comments = "";
|
@@ -37,8 +36,10 @@
|
|
37 |
<article id="comment-<?php comment_ID(); ?>" class="comment-body">
|
38 |
<footer class="comment-meta">
|
39 |
<?php if($comment_author_img_url){ ?>
|
40 |
-
<amp-img
|
41 |
-
<?php } ?>
|
|
|
|
|
42 |
<div class="comment-author vcard">
|
43 |
<?php printf(__('<b class="fn">%s</b> <span class="says">'.ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says').':</span>'), get_comment_author_link()) ?>
|
44 |
</div>
|
1 |
<?php do_action('ampforwp_before_comment_hook',$this);
|
2 |
global $redux_builder_amp;
|
3 |
$enable_comments = "";
|
|
|
4 |
if ( isset($redux_builder_amp['wordpress-comments-support']) && $redux_builder_amp['wordpress-comments-support']==true ) {
|
5 |
$enable_comments = true;
|
6 |
}
|
7 |
+
|
8 |
+
if ( $enable_comments ) { ?>
|
9 |
<div id="comments" class="ampforwp-comment-wrapper"> <?php
|
10 |
// Gather comments for a specific page/post
|
11 |
$postID = $comments = "";
|
36 |
<article id="comment-<?php comment_ID(); ?>" class="comment-body">
|
37 |
<footer class="comment-meta">
|
38 |
<?php if($comment_author_img_url){ ?>
|
39 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($comment_author_img_url); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
|
40 |
+
<?php } else { ?>
|
41 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($default_gravatar['url']); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
|
42 |
+
<?php } ?>
|
43 |
<div class="comment-author vcard">
|
44 |
<?php printf(__('<b class="fn">%s</b> <span class="says">'.ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says').':</span>'), get_comment_author_link()) ?>
|
45 |
</div>
|
templates/design-manager/design-2/elements/content.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
$ampforwp_the_content = $this->get( 'ampforwp_amp_content' );
|
16 |
}
|
17 |
// Muffin Builder Compatibility #1455 #1893
|
18 |
-
if ( function_exists('mfn_builder_print')
|
19 |
ob_start();
|
20 |
mfn_builder_print( get_the_ID() );
|
21 |
$content = ob_get_contents();
|
@@ -34,8 +34,21 @@
|
|
34 |
)
|
35 |
)
|
36 |
);
|
37 |
-
|
38 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
//Filter to modify the Content
|
41 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
|
15 |
$ampforwp_the_content = $this->get( 'ampforwp_amp_content' );
|
16 |
}
|
17 |
// Muffin Builder Compatibility #1455 #1893
|
18 |
+
if ( function_exists('mfn_builder_print') ) {
|
19 |
ob_start();
|
20 |
mfn_builder_print( get_the_ID() );
|
21 |
$content = ob_get_contents();
|
34 |
)
|
35 |
)
|
36 |
);
|
37 |
+
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
38 |
}
|
39 |
+
else {
|
40 |
+
if($redux_builder_amp['amp-pagination']) {
|
41 |
+
$ampforwp_new_content = explode('<!--nextpage-->', $ampforwp_the_content);
|
42 |
+
$queried_var = get_query_var('page');
|
43 |
+
if ( $queried_var > 1 ) {
|
44 |
+
$queried_var = $queried_var -1 ;
|
45 |
+
}
|
46 |
+
else{
|
47 |
+
$queried_var = 0;
|
48 |
+
}
|
49 |
+
$ampforwp_the_content = $ampforwp_new_content[$queried_var];
|
50 |
+
} //#1015 Pegazee
|
51 |
+
}
|
52 |
|
53 |
//Filter to modify the Content
|
54 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
|
templates/design-manager/design-2/elements/meta-info.php
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
<?php do_action('ampforwp_before_meta_info_hook',$this);
|
2 |
-
global $redux_builder_amp;
|
3 |
-
if ( is_single() || (is_page() && $redux_builder_amp['meta_page']) ) : ?>
|
4 |
<div class="amp-wp-article-header ampforwp-meta-info <?php if( is_page() && ! $redux_builder_amp['meta_page'] ) {?> hide-meta-info <?php }?>">
|
5 |
<div class="amp-wp-content post-title-meta">
|
6 |
|
@@ -50,5 +49,4 @@ if( isset($redux_builder_amp['ampforwp-cats-single']) && $redux_builder_amp['amp
|
|
50 |
</ul>
|
51 |
</div>
|
52 |
</div>
|
53 |
-
<?php endif; ?>
|
54 |
<?php do_action('ampforwp_after_meta_info_hook',$this);
|
1 |
<?php do_action('ampforwp_before_meta_info_hook',$this);
|
2 |
+
global $redux_builder_amp; ?>
|
|
|
3 |
<div class="amp-wp-article-header ampforwp-meta-info <?php if( is_page() && ! $redux_builder_amp['meta_page'] ) {?> hide-meta-info <?php }?>">
|
4 |
<div class="amp-wp-content post-title-meta">
|
5 |
|
49 |
</ul>
|
50 |
</div>
|
51 |
</div>
|
|
|
52 |
<?php do_action('ampforwp_after_meta_info_hook',$this);
|
templates/design-manager/design-2/elements/meta-taxonomy.php
CHANGED
@@ -44,7 +44,7 @@ if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_sing
|
|
44 |
$author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 70 ) );
|
45 |
}
|
46 |
if ( $author_avatar_url ) { ?>
|
47 |
-
<amp-img
|
48 |
<?php
|
49 |
}
|
50 |
echo ampforwp_get_author_details( $post_author , 'meta-taxonomy' );
|
44 |
$author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 70 ) );
|
45 |
}
|
46 |
if ( $author_avatar_url ) { ?>
|
47 |
+
<amp-img data-block-on-consent src="<?php echo $author_avatar_url; ?>" width="70" height="70" layout="fixed"></amp-img>
|
48 |
<?php
|
49 |
}
|
50 |
echo ampforwp_get_author_details( $post_author , 'meta-taxonomy' );
|
templates/design-manager/design-2/elements/related-posts.php
CHANGED
@@ -1,127 +1,105 @@
|
|
1 |
<?php
|
2 |
-
global $post,
|
3 |
-
do_action('ampforwp_above_related_post',$this); //Above Related Posts
|
4 |
-
$string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
|
5 |
-
$int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
|
6 |
|
7 |
-
// declaring this variable here to prevent debug errors
|
8 |
-
$args = null;
|
9 |
-
$orderby = 'ID';
|
10 |
-
// declaring this variable for counting number of related post
|
11 |
-
$r_count = 1;
|
12 |
-
// Check for the order of related posts
|
13 |
-
if( isset( $redux_builder_amp['ampforwp-single-order-of-related-posts'] ) && $redux_builder_amp['ampforwp-single-order-of-related-posts'] ){
|
14 |
-
|
15 |
-
}
|
16 |
-
// Custom Post types
|
17 |
-
if( $current_post_type = get_post_type( $post )) {
|
18 |
-
// The query arguments
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
}//end of block for custom Post types
|
29 |
|
30 |
-
if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
} //end of block for categories
|
46 |
-
//code block for tags
|
47 |
-
if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
}//end of block for tags
|
63 |
-
|
64 |
-
|
65 |
-
if
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
$class = 'small-screen-excerpt';
|
107 |
-
}
|
108 |
-
if(has_excerpt()){
|
109 |
-
$content = get_the_excerpt();
|
110 |
-
}else{
|
111 |
-
$content = get_the_content();
|
112 |
-
} ?>
|
113 |
-
<p class="<?php echo $class; ?>"><?php echo wp_trim_words( strip_shortcodes($content) , '15' ); ?></p>
|
114 |
-
<?php } ?>
|
115 |
-
</div>
|
116 |
-
</li>
|
117 |
-
<?php
|
118 |
-
do_action('ampforwp_between_related_post',$r_count,$this);
|
119 |
-
$r_count++;
|
120 |
-
} ?>
|
121 |
-
</ol>
|
122 |
-
</div>
|
123 |
-
</div> <?php
|
124 |
-
wp_reset_postdata();
|
125 |
-
}
|
126 |
-
} ?>
|
127 |
<?php do_action('ampforwp_below_related_post',$this);
|
1 |
<?php
|
2 |
+
global $post, $redux_builder_amp;
|
3 |
+
do_action('ampforwp_above_related_post',$this); //Above Related Posts
|
4 |
+
$string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts']; $int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
|
|
|
5 |
|
6 |
+
// declaring this variable here to prevent debug errors
|
7 |
+
$args = null;
|
8 |
+
$orderby = 'ID';
|
9 |
+
// declaring this variable for counting number of related post
|
10 |
+
$r_count = 1;
|
11 |
+
// Check for the order of related posts
|
12 |
+
if( isset( $redux_builder_amp['ampforwp-single-order-of-related-posts'] ) && $redux_builder_amp['ampforwp-single-order-of-related-posts'] ){
|
13 |
+
$orderby = 'rand';
|
14 |
+
}
|
15 |
+
// Custom Post types
|
16 |
+
if( $current_post_type = get_post_type( $post )) {
|
17 |
+
// The query arguments
|
18 |
+
if($current_post_type != 'page'){
|
19 |
+
$args = array(
|
20 |
+
'posts_per_page'=> $int_number_of_related_posts,
|
21 |
+
'order' => 'DESC',
|
22 |
+
'orderby' => $orderby,
|
23 |
+
'post_type' => $current_post_type,
|
24 |
+
'post__not_in' => array( $post->ID )
|
25 |
+
);
|
26 |
+
}
|
27 |
+
}//end of block for custom Post types
|
28 |
|
29 |
+
if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
|
30 |
+
$categories = get_the_category($post->ID);
|
31 |
+
if ($categories) {
|
32 |
+
$category_ids = array();
|
33 |
+
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
|
34 |
+
$args=array(
|
35 |
+
'category__in' => $category_ids,
|
36 |
+
'post__not_in' => array($post->ID),
|
37 |
+
'posts_per_page' => $int_number_of_related_posts,
|
38 |
+
'ignore_sticky_posts'=> 1,
|
39 |
+
'has_password' => false ,
|
40 |
+
'post_status' => 'publish',
|
41 |
+
'orderby' => $orderby
|
42 |
+
);
|
43 |
+
}
|
44 |
+
} //end of block for categories
|
45 |
+
//code block for tags
|
46 |
+
if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
47 |
+
$ampforwp_tags = get_the_tags($post->ID);
|
48 |
+
if ($ampforwp_tags) {
|
49 |
+
$tag_ids = array();
|
50 |
+
foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
|
51 |
+
$args=array(
|
52 |
+
'tag__in' => $tag_ids,
|
53 |
+
'post__not_in' => array($post->ID),
|
54 |
+
'posts_per_page' => $int_number_of_related_posts,
|
55 |
+
'ignore_sticky_posts'=> 1,
|
56 |
+
'has_password' => false ,
|
57 |
+
'post_status' => 'publish',
|
58 |
+
'orderby' => $orderby
|
59 |
+
);
|
60 |
+
}
|
61 |
+
}//end of block for tags
|
62 |
+
if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] && $redux_builder_amp['ampforwp-single-select-type-of-related'] ) {
|
63 |
+
$my_query = new wp_query( $args );
|
64 |
+
if( $my_query->have_posts() ) { ?>
|
65 |
+
<div class="amp-wp-content relatedpost">
|
66 |
+
<div class="related_posts">
|
67 |
+
<ol class="clearfix">
|
68 |
+
<span class="related-title"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></span>
|
69 |
+
<?php
|
70 |
+
while( $my_query->have_posts() ) {
|
71 |
+
$my_query->the_post();
|
72 |
+
$related_post_permalink = ampforwp_url_controller( get_permalink() );?>
|
73 |
+
<li class="<?php if ( ampforwp_has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
|
74 |
+
<?php if ( ampforwp_has_post_thumbnail() ) {
|
75 |
+
if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
|
76 |
+
$width = 150;
|
77 |
+
$height = 150;
|
78 |
+
$image_args = array("tag"=>'div','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height,'responsive'=> 'true' );
|
79 |
+
amp_loop_image($image_args);
|
80 |
+
}
|
81 |
+
}?>
|
82 |
+
<div class="related_link">
|
83 |
+
<a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
|
84 |
+
|
85 |
+
<?php if ( isset($redux_builder_amp['ampforwp-single-related-posts-excerpt']) && true == $redux_builder_amp['ampforwp-single-related-posts-excerpt'] ) {
|
86 |
+
if(has_excerpt()){
|
87 |
+
$content = get_the_excerpt();
|
88 |
+
}else{
|
89 |
+
$content = get_the_content();
|
90 |
+
} ?>
|
91 |
+
<p><?php echo wp_trim_words( strip_shortcodes($content) , '15' ); ?></p>
|
92 |
+
<?php } ?>
|
93 |
+
</div>
|
94 |
+
</li>
|
95 |
+
<?php
|
96 |
+
do_action('ampforwp_between_related_post',$r_count,$this);
|
97 |
+
$r_count++;
|
98 |
+
} ?>
|
99 |
+
</ol>
|
100 |
+
</div>
|
101 |
+
</div> <?php
|
102 |
+
wp_reset_postdata();
|
103 |
+
}
|
104 |
+
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
<?php do_action('ampforwp_below_related_post',$this);
|
templates/design-manager/design-2/elements/social-icons.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php global $redux_builder_amp;
|
2 |
-
if ( is_single()
|
3 |
$permalink = '';
|
4 |
if(isset($redux_builder_amp['enable-single-twitter-share-link']) && $redux_builder_amp['enable-single-twitter-share-link']){
|
5 |
$permalink = get_the_permalink();
|
@@ -122,20 +122,6 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
|
|
122 |
</div>
|
123 |
</a>
|
124 |
<?php } ?>
|
125 |
-
<?php if ( true == $redux_builder_amp['enable-single-hatena-bookmarks'] ) { ?>
|
126 |
-
<a href="http://b.hatena.ne.jp/entry/<?php echo esc_url(get_the_permalink()); ?>" target="_blank">
|
127 |
-
<div class="amp-social-icon amp-social-hatena">
|
128 |
-
<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'%3e%3cpath d='M 64 96 L 64 416 L 212 416 C 252 416 292 404 308 368 C 328 332 320 276 284 252 C 272 244 260 240 248 236 C 276 232 300 212 300 184 C 304 156 296 120 268 108 C 236 96 192 96 160 96 L 64 96 z M 364 96 L 364 308 L 444 308 L 444 96 L 364 96 z M 144 156 C 144 156 188 156 200 160 C 224 168 224 208 196 212 C 188 216 144 216 144 216 L 144 156 z M 144 280 C 144 280 188 280 208 284 C 232 288 240 312 228 332 C 220 348 204 348 188 348 L 144 348 L 144 280 z M 404 328 A 44 44 0 0 0 360 372 A 44 44 0 0 0 404 416 A 44 44 0 0 0 448 372 A 44 44 0 0 0 404 328 z' style='fill:%23ffffff'/%3e%3c/svg%3e" width="50" height="20" />
|
129 |
-
</div>
|
130 |
-
</a>
|
131 |
-
<?php } ?>
|
132 |
-
<?php if ( true == $redux_builder_amp['enable-single-pocket-share'] ) { ?>
|
133 |
-
<a href="https://getpocket.com/save?url=<?php echo esc_url(get_the_permalink()); ?>" target="_blank">
|
134 |
-
<div class="amp-social-icon amp-social-pocket">
|
135 |
-
<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='2500' height='2251' viewBox='75.247 261.708 445.529 401.074'%3e%3cpath fill='%23EF4056' d='M114.219 261.708c-24.275 1.582-38.972 15.44-38.972 40.088v147.611c0 119.893 119.242 214.114 222.393 213.37 115.986-.837 223.137-98.779 223.137-213.37V301.796c0-24.741-15.626-38.693-40.088-40.088h-366.47zm93.943 120.079L297.64 466.8l89.571-85.013c40.088-16.835 57.574 28.927 41.111 42.321L311.685 535.443c-3.813 3.628-24.183 3.628-27.996 0L167.051 424.107c-15.72-14.789 4.743-61.295 41.111-42.32z'/%3e%3c/svg%3e" width="50" height="20" />
|
136 |
-
</div>
|
137 |
-
</a>
|
138 |
-
<?php } ?>
|
139 |
</div>
|
140 |
<?php } ?>
|
141 |
<?php do_action('ampforwp_after_social_icons_hook',$this);
|
1 |
<?php global $redux_builder_amp;
|
2 |
+
if ( is_single() ) {
|
3 |
$permalink = '';
|
4 |
if(isset($redux_builder_amp['enable-single-twitter-share-link']) && $redux_builder_amp['enable-single-twitter-share-link']){
|
5 |
$permalink = get_the_permalink();
|
122 |
</div>
|
123 |
</a>
|
124 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
</div>
|
126 |
<?php } ?>
|
127 |
<?php do_action('ampforwp_after_social_icons_hook',$this);
|
templates/design-manager/design-2/index.php
CHANGED
@@ -70,28 +70,39 @@
|
|
70 |
<h2 class="amp-wp-title"><a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"><?php the_title(); ?></a></h2>
|
71 |
|
72 |
<?php
|
73 |
-
if( true == $redux_builder_amp['excerpt-option'] ) {
|
74 |
-
$class = 'large-screen-excerpt';
|
75 |
-
if ( true == $redux_builder_amp['excerpt-option-design-2'] ) {
|
76 |
-
$class = 'small-screen-excerpt';
|
77 |
-
}
|
78 |
if(has_excerpt()){
|
79 |
$content = get_the_excerpt();
|
80 |
}else{
|
81 |
$content = get_the_content();
|
82 |
}
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
91 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
92 |
}
|
93 |
echo $final_content;
|
94 |
-
|
|
|
95 |
</div>
|
96 |
<div class="amp-wp-meta">
|
97 |
<?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author') ) ); ?>
|
70 |
<h2 class="amp-wp-title"><a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"><?php the_title(); ?></a></h2>
|
71 |
|
72 |
<?php
|
|
|
|
|
|
|
|
|
|
|
73 |
if(has_excerpt()){
|
74 |
$content = get_the_excerpt();
|
75 |
}else{
|
76 |
$content = get_the_content();
|
77 |
}
|
78 |
+
?>
|
79 |
+
<p class="large-screen-excerpt">
|
80 |
+
<?php
|
81 |
+
$excerpt_length = "";
|
82 |
+
$excerpt_length = 15;
|
83 |
+
$final_content = "";
|
84 |
+
|
85 |
+
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
86 |
+
|
87 |
+
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
88 |
+
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
89 |
+
}
|
90 |
+
|
91 |
+
echo $final_content;
|
92 |
+
?></p>
|
93 |
+
<p class="small-screen-excerpt" > <?php
|
94 |
+
if($redux_builder_amp['excerpt-option-design-2']== true) {
|
95 |
+
$excerpt_length_2 ='';
|
96 |
+
$excerpt_length_2 = $redux_builder_amp['amp-design-2-excerpt'];
|
97 |
+
$final_content = "";
|
98 |
+
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
99 |
|
100 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
101 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
102 |
}
|
103 |
echo $final_content;
|
104 |
+
} ?>
|
105 |
+
</p>
|
106 |
</div>
|
107 |
<div class="amp-wp-meta">
|
108 |
<?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author') ) ); ?>
|
templates/design-manager/design-2/search.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
|
4 |
<head>
|
5 |
<meta charset="utf-8">
|
6 |
-
<meta name="robots" content="noindex,nofollow"/>
|
7 |
<link rel="dns-prefetch" href="https://cdn.ampproject.org">
|
8 |
<?php $paged = get_query_var( 'paged' );
|
9 |
$current_search_url =trailingslashit(get_home_url())."?s=".get_search_query();
|
@@ -63,39 +62,36 @@
|
|
63 |
<div class="amp-wp-post-content">
|
64 |
<h2 class="amp-wp-title"><a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"><?php the_title(); ?></a></h2>
|
65 |
|
66 |
-
<?php
|
67 |
-
if( true == $redux_builder_amp['excerpt-option'] ) {
|
68 |
-
if(has_excerpt()){
|
69 |
$content = get_the_excerpt();
|
70 |
}else{
|
71 |
$content = get_the_content();
|
72 |
} ?>
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
$final_content = "";
|
78 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
79 |
|
80 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
81 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
82 |
}
|
83 |
-
echo $final_content;
|
84 |
-
|
85 |
-
|
86 |
-
if($redux_builder_amp['excerpt-option-design-2']== true) {
|
87 |
-
$excerpt_length='';
|
88 |
-
$excerpt_length = $redux_builder_amp['amp-design-2-excerpt'];
|
89 |
-
$final_content = "";
|
90 |
-
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
91 |
-
|
92 |
-
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
93 |
-
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
94 |
-
}
|
95 |
-
echo $final_content;
|
96 |
-
} ?>
|
97 |
-
</p>
|
98 |
-
<?php } ?>
|
99 |
</div>
|
100 |
<div class="cb"></div>
|
101 |
</div>
|
3 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
|
4 |
<head>
|
5 |
<meta charset="utf-8">
|
|
|
6 |
<link rel="dns-prefetch" href="https://cdn.ampproject.org">
|
7 |
<?php $paged = get_query_var( 'paged' );
|
8 |
$current_search_url =trailingslashit(get_home_url())."?s=".get_search_query();
|
62 |
<div class="amp-wp-post-content">
|
63 |
<h2 class="amp-wp-title"><a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"><?php the_title(); ?></a></h2>
|
64 |
|
65 |
+
<?php if(has_excerpt()){
|
|
|
|
|
66 |
$content = get_the_excerpt();
|
67 |
}else{
|
68 |
$content = get_the_content();
|
69 |
} ?>
|
70 |
+
<p class="large-screen-excerpt">
|
71 |
+
<?php
|
72 |
+
$excerpt_length = "";
|
73 |
+
$excerpt_length = 15;
|
74 |
+
$final_content = "";
|
75 |
+
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
76 |
+
|
77 |
+
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
78 |
+
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
79 |
+
}
|
80 |
+
echo $final_content;
|
81 |
+
?></p>
|
82 |
+
<p class="small-screen-excerpt" > <?php
|
83 |
+
if($redux_builder_amp['excerpt-option-design-2']== true) {
|
84 |
+
$excerpt_length='';
|
85 |
+
$excerpt_length = $redux_builder_amp['amp-design-2-excerpt'];
|
86 |
$final_content = "";
|
87 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
88 |
|
89 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
90 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
91 |
}
|
92 |
+
echo $final_content;
|
93 |
+
} ?>
|
94 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
</div>
|
96 |
<div class="cb"></div>
|
97 |
</div>
|
templates/design-manager/design-2/style.php
CHANGED
@@ -28,7 +28,6 @@ a { color: #312C7E; text-decoration: none }
|
|
28 |
.clearfix, .cb { clear: both }
|
29 |
amp-iframe{ max-width: 100%; margin-bottom : 20px; }
|
30 |
amp-anim { max-width: 100%; }
|
31 |
-
amp-wistia-player {margin:5px 0px;}
|
32 |
.alignleft{ margin-right: 12px; margin-bottom:5px; float: left; }
|
33 |
.alignright{ float:right; margin-left: 12px; margin-bottom:5px; }
|
34 |
.aligncenter{ text-align:center; margin: 0 auto }
|
@@ -58,7 +57,7 @@ amp-sidebar{ width: 250px; }
|
|
58 |
.toggle-navigation ul li a{ color: #eee; padding: 15px; }
|
59 |
.toggle-navigation{ display: none; background: #444; }
|
60 |
.toggle-text{ color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 3px; display: inherit; text-align: center; }
|
61 |
-
.toggle-text:before{ content: "..."; font-size: 32px; font-family: georgia; line-height: 0px; margin-left: 0px; letter-spacing: 1px; top: -3px; position: relative; padding-right: 10px; }
|
62 |
.nav_container:hover + .toggle-navigation, .toggle-navigation:hover, .toggle-navigation:active, .toggle-navigation:focus{ display: inline-block; width: 100%; }
|
63 |
/* Category 2 */
|
64 |
.category-widget-wrapper{ padding:30px 15% 10px 15% }
|
@@ -96,7 +95,7 @@ amp-lightbox{ background: rgba(0, 0, 0,0.85); }
|
|
96 |
#pagination .prev{ float: left }
|
97 |
#pagination .next a, #pagination .prev a{ margin-bottom: 12px; background: #fefefe; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -moz-box-shadow: 0 2px 3px rgba(0,0,0,.05); -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.05); box-shadow: 0 2px 3px rgba(0,0,0,.05); padding: 11px 15px; font-size: 12px; color: #666; }
|
98 |
<?php
|
99 |
-
if(is_single()
|
100 |
/* Sticky Social bar in Single */
|
101 |
.ampforwp-social-icons-wrapper{ margin: 0.65em 0px 0.65em 0px; height: 28px; }
|
102 |
.sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
|
@@ -104,7 +103,7 @@ amp-lightbox{ background: rgba(0, 0, 0,0.85); }
|
|
104 |
.amp-social-icon amp-img{ top: 4px; }
|
105 |
.custom-amp-socialsharing-line{background:#00b900}
|
106 |
.ampforwp-social-icons custom-amp-socialsharing-vk{background:#45668e}
|
107 |
-
.amp-social-odnoklassniki{background:#ed812b}.amp-social-reddit{background:#ff4500}.amp-social-telegram{background:#0088cc}.amp-social-tumblr{background:#35465c}.amp-social-digg{background:#005be2}.amp-social-stumbleupon{background:#eb4924}.amp-social-wechat{background:#7bb32e}.amp-social-viber{background:#8f5db7}
|
108 |
<?php }?>
|
109 |
/* Header */
|
110 |
header.container{line-height: 0;}
|
@@ -123,7 +122,10 @@ h2.amp-wp-title{ line-height: 30px; }
|
|
123 |
h2.amp-wp-title a{ font-weight: 300; color: #000; font-size: 20px; }
|
124 |
h2.amp-wp-title , .amp-wp-post-content p{ margin: 0 0 0 5px; }
|
125 |
/* For Excerpt */
|
126 |
-
.amp-wp-post-content .
|
|
|
|
|
|
|
127 |
display: block;
|
128 |
}
|
129 |
.amp-wp-post-content p{ font-size: 12px; color: #999; line-height: 20px; margin: 3px 0 0 5px; }
|
@@ -222,7 +224,7 @@ main .amp-wp-content.comments_list {background: none;box-shadow: none;max-width:
|
|
222 |
.single-post .amp_ad_1{ margin-top: 10px; margin-bottom: -20px; }
|
223 |
html .single-post .ampforwp-incontent-ad-1 { margin-bottom: 10px; }
|
224 |
.amp-ad-4{ margin-top:10px; }
|
225 |
-
.amp-wp-content blockquote { border-left: 3px solid; margin: 0; padding: 15px 20px 8px 24px; background: #f3f3f3; }
|
226 |
pre { white-space: pre-wrap; }
|
227 |
/* Tables */
|
228 |
table { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; overflow-x: auto; }
|
@@ -254,18 +256,18 @@ amp-user-notification button:hover { cursor: pointer }
|
|
254 |
/* Responsive */
|
255 |
@media screen and (min-width: 650px) { table {display: inline-table;} }
|
256 |
@media screen and (max-width: 800px) { .single-post main{ padding: 12px 10px 10px 10px } }
|
257 |
-
@media screen and (max-width: 630px) { .related_link { margin: 16px 18px 20px 19px; } .amp-category-post {line-height: 1.45;font-size: 14px; } .amp-category-block li:nth-child(3) {margin:0 0.6%} }
|
258 |
@media screen and (max-width: 510px) { .ampforwp-tax-category span{ display:none }
|
259 |
.related_posts ol li p{ line-height: 1.6; margin: 7px 0 0 0; }
|
260 |
.related_posts .related_link { margin: 17px 18px 17px 19px; }
|
261 |
.comments_list ul li .comment-body{ width:auto }
|
262 |
}
|
263 |
-
@media screen and (max-width: 425px) { .alignright, .alignleft {float: none;} .related_posts .related_link { margin: 13px 18px 14px 19px; } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .amp-meta-wrapper{ display: inline-block; margin-bottom: 0px; margin-top: 8px; width:100% } .ampforwp-tax-category{ padding-bottom:0 } h1.amp-wp-title{ margin: 16px 0px 13px 0px; } .amp-wp-byline{ padding:0 } .related_posts .related_link a { font-size: 17px; line-height: 1.5; }
|
264 |
@media screen and (max-width: 375px) { #pagination .next a, #pagination .prev a{ padding: 10px 6px; font-size: 11px; color: #666; } .related_posts .related-title, .comments_list h3{ margin-top:15px; } #pagination .next{ margin-bottom:15px;} .related_posts .related_link a { font-size: 15px; line-height: 1.6; } }
|
265 |
@media screen and (max-width: 340px) { .related_posts .related_link a { font-size: 15px; } .single-post main{ padding: 10px 5px 10px 5px } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } .amp-category-post {line-height: 1.45;font-size: 12px; } .amp-category-block li:nth-child(3) {margin:0%} }
|
266 |
@media screen and (max-width: 320px) { .related_posts .related_link a { font-size: 13px; } h1.amp-wp-title{ font-size:17px; padding:0px 4px } }
|
267 |
@media screen and (max-width: 400px) { .amp-wp-title{ font-size: 19px; margin: 21px 10px -1px 10px; } }
|
268 |
-
@media screen and (max-width: 767px) { .amp-wp-post-content .small-screen-excerpt { display: block; } main, .amp-category-block, .category-widget-wrapper{ padding: 15px 18px 0px 18px; } .toggle-navigation ul li{ width: 50% } }
|
269 |
@media screen and (max-width: 495px) { h2.amp-wp-title a{ font-size: 17px; line-height: 26px;} }
|
270 |
<?php if($redux_builder_amp['amp-rtl-select-option'] == true) { ?>
|
271 |
header, amp-sidebar, article, footer, main { direction: rtl; }
|
28 |
.clearfix, .cb { clear: both }
|
29 |
amp-iframe{ max-width: 100%; margin-bottom : 20px; }
|
30 |
amp-anim { max-width: 100%; }
|
|
|
31 |
.alignleft{ margin-right: 12px; margin-bottom:5px; float: left; }
|
32 |
.alignright{ float:right; margin-left: 12px; margin-bottom:5px; }
|
33 |
.aligncenter{ text-align:center; margin: 0 auto }
|
57 |
.toggle-navigation ul li a{ color: #eee; padding: 15px; }
|
58 |
.toggle-navigation{ display: none; background: #444; }
|
59 |
.toggle-text{ color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 3px; display: inherit; text-align: center; }
|
60 |
+
.toggle-text:before{ content: "..."; font-size: 32px; position: ; font-family: georgia; line-height: 0px; margin-left: 0px; letter-spacing: 1px; top: -3px; position: relative; padding-right: 10px; }
|
61 |
.nav_container:hover + .toggle-navigation, .toggle-navigation:hover, .toggle-navigation:active, .toggle-navigation:focus{ display: inline-block; width: 100%; }
|
62 |
/* Category 2 */
|
63 |
.category-widget-wrapper{ padding:30px 15% 10px 15% }
|
95 |
#pagination .prev{ float: left }
|
96 |
#pagination .next a, #pagination .prev a{ margin-bottom: 12px; background: #fefefe; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -moz-box-shadow: 0 2px 3px rgba(0,0,0,.05); -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.05); box-shadow: 0 2px 3px rgba(0,0,0,.05); padding: 11px 15px; font-size: 12px; color: #666; }
|
97 |
<?php
|
98 |
+
if(is_single()){?>
|
99 |
/* Sticky Social bar in Single */
|
100 |
.ampforwp-social-icons-wrapper{ margin: 0.65em 0px 0.65em 0px; height: 28px; }
|
101 |
.sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
|
103 |
.amp-social-icon amp-img{ top: 4px; }
|
104 |
.custom-amp-socialsharing-line{background:#00b900}
|
105 |
.ampforwp-social-icons custom-amp-socialsharing-vk{background:#45668e}
|
106 |
+
.amp-social-odnoklassniki{background:#ed812b}.amp-social-reddit{background:#ff4500}.amp-social-telegram{background:#0088cc}.amp-social-tumblr{background:#35465c}.amp-social-digg{background:#005be2}.amp-social-stumbleupon{background:#eb4924}.amp-social-wechat{background:#7bb32e}.amp-social-viber{background:#8f5db7}
|
107 |
<?php }?>
|
108 |
/* Header */
|
109 |
header.container{line-height: 0;}
|
122 |
h2.amp-wp-title a{ font-weight: 300; color: #000; font-size: 20px; }
|
123 |
h2.amp-wp-title , .amp-wp-post-content p{ margin: 0 0 0 5px; }
|
124 |
/* For Excerpt */
|
125 |
+
.amp-wp-post-content .small-screen-excerpt{
|
126 |
+
display: none;
|
127 |
+
}
|
128 |
+
.amp-wp-post-content .large-screen-excerpt {
|
129 |
display: block;
|
130 |
}
|
131 |
.amp-wp-post-content p{ font-size: 12px; color: #999; line-height: 20px; margin: 3px 0 0 5px; }
|
224 |
.single-post .amp_ad_1{ margin-top: 10px; margin-bottom: -20px; }
|
225 |
html .single-post .ampforwp-incontent-ad-1 { margin-bottom: 10px; }
|
226 |
.amp-ad-4{ margin-top:10px; }
|
227 |
+
.amp-wp-content blockquote { background-color: #fff; border-left: 3px solid; margin: 0; padding: 15px 20px 8px 24px; background: #f3f3f3; }
|
228 |
pre { white-space: pre-wrap; }
|
229 |
/* Tables */
|
230 |
table { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; overflow-x: auto; }
|
256 |
/* Responsive */
|
257 |
@media screen and (min-width: 650px) { table {display: inline-table;} }
|
258 |
@media screen and (max-width: 800px) { .single-post main{ padding: 12px 10px 10px 10px } }
|
259 |
+
@media screen and (max-width: 630px) { .related_posts ol li p{ display:none } .related_link { margin: 16px 18px 20px 19px; } .amp-category-post {line-height: 1.45;font-size: 14px; } .amp-category-block li:nth-child(3) {margin:0 0.6%} }
|
260 |
@media screen and (max-width: 510px) { .ampforwp-tax-category span{ display:none }
|
261 |
.related_posts ol li p{ line-height: 1.6; margin: 7px 0 0 0; }
|
262 |
.related_posts .related_link { margin: 17px 18px 17px 19px; }
|
263 |
.comments_list ul li .comment-body{ width:auto }
|
264 |
}
|
265 |
+
@media screen and (max-width: 425px) { .related_posts .related_link p{ display:none } .alignright, .alignleft {float: none;} .related_posts .related_link { margin: 13px 18px 14px 19px; } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .amp-meta-wrapper{ display: inline-block; margin-bottom: 0px; margin-top: 8px; width:100% } .ampforwp-tax-category{ padding-bottom:0 } h1.amp-wp-title{ margin: 16px 0px 13px 0px; } .amp-wp-byline{ padding:0 } .related_posts .related_link a { font-size: 17px; line-height: 1.5; } }
|
266 |
@media screen and (max-width: 375px) { #pagination .next a, #pagination .prev a{ padding: 10px 6px; font-size: 11px; color: #666; } .related_posts .related-title, .comments_list h3{ margin-top:15px; } #pagination .next{ margin-bottom:15px;} .related_posts .related_link a { font-size: 15px; line-height: 1.6; } }
|
267 |
@media screen and (max-width: 340px) { .related_posts .related_link a { font-size: 15px; } .single-post main{ padding: 10px 5px 10px 5px } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } .amp-category-post {line-height: 1.45;font-size: 12px; } .amp-category-block li:nth-child(3) {margin:0%} }
|
268 |
@media screen and (max-width: 320px) { .related_posts .related_link a { font-size: 13px; } h1.amp-wp-title{ font-size:17px; padding:0px 4px } }
|
269 |
@media screen and (max-width: 400px) { .amp-wp-title{ font-size: 19px; margin: 21px 10px -1px 10px; } }
|
270 |
+
@media screen and (max-width: 767px) { .amp-wp-post-content .large-screen-excerpt { display: none; } .amp-wp-post-content .small-screen-excerpt { display: block; } main, .amp-category-block, .category-widget-wrapper{ padding: 15px 18px 0px 18px; } .toggle-navigation ul li{ width: 50% } }
|
271 |
@media screen and (max-width: 495px) { h2.amp-wp-title a{ font-size: 17px; line-height: 26px;} }
|
272 |
<?php if($redux_builder_amp['amp-rtl-select-option'] == true) { ?>
|
273 |
header, amp-sidebar, article, footer, main { direction: rtl; }
|
templates/design-manager/design-3/archive.php
CHANGED
@@ -76,7 +76,7 @@ if ( get_query_var( 'paged' ) ) {
|
|
76 |
$curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
|
77 |
if($curauth_url){ ?>
|
78 |
<div class="amp-wp-content author-img">
|
79 |
-
<amp-img
|
80 |
</div>
|
81 |
<?php }
|
82 |
}
|
@@ -154,37 +154,36 @@ if ( get_query_var( 'paged' ) ) {
|
|
154 |
|
155 |
|
156 |
<?php
|
157 |
-
if( true == $redux_builder_amp['excerpt-option'] ) {
|
158 |
if(has_excerpt()){
|
159 |
$content = get_the_excerpt();
|
160 |
}else{
|
161 |
$content = get_the_content();
|
162 |
-
}
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
169 |
|
170 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
171 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
172 |
}
|
173 |
-
echo $final_content;
|
174 |
-
|
175 |
-
|
176 |
-
$excerpt_length='';
|
177 |
-
$excerpt_length = $redux_builder_amp['amp-design-3-excerpt'];
|
178 |
-
$final_content = "";
|
179 |
-
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
180 |
-
|
181 |
-
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
182 |
-
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
183 |
-
}
|
184 |
-
echo $final_content;
|
185 |
-
} ?>
|
186 |
-
</p>
|
187 |
-
<?php } ?>
|
188 |
<div class="featured_time">
|
189 |
<?php
|
190 |
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
76 |
$curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
|
77 |
if($curauth_url){ ?>
|
78 |
<div class="amp-wp-content author-img">
|
79 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($curauth_url); ?>" width="90" height="90" layout="responsive"></amp-img>
|
80 |
</div>
|
81 |
<?php }
|
82 |
}
|
154 |
|
155 |
|
156 |
<?php
|
|
|
157 |
if(has_excerpt()){
|
158 |
$content = get_the_excerpt();
|
159 |
}else{
|
160 |
$content = get_the_content();
|
161 |
+
}
|
162 |
+
?>
|
163 |
+
<p class="large-screen-excerpt-design-3">
|
164 |
+
<?php
|
165 |
+
$excerpt_length ='';
|
166 |
+
$excerpt_length = 15;
|
167 |
+
$final_content = "";
|
168 |
+
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
169 |
+
|
170 |
+
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
171 |
+
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
172 |
+
}
|
173 |
+
echo $final_content; ?> </p>
|
174 |
+
<p class="small-screen-excerpt-design-3" > <?php
|
175 |
+
if($redux_builder_amp['excerpt-option-design-3']== true) {
|
176 |
+
$excerpt_length='';
|
177 |
+
$excerpt_length = $redux_builder_amp['amp-design-3-excerpt'];
|
178 |
+
$final_content = "";
|
179 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
180 |
|
181 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
182 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
183 |
}
|
184 |
+
echo $final_content;
|
185 |
+
} ?>
|
186 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
<div class="featured_time">
|
188 |
<?php
|
189 |
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
templates/design-manager/design-3/elements/comments.php
CHANGED
@@ -1,13 +1,11 @@
|
|
1 |
<?php do_action('ampforwp_before_comment_hook',$this);
|
2 |
global $redux_builder_amp;
|
3 |
$enable_comments = "";
|
4 |
-
$display_comments_on = "";
|
5 |
if ( isset($redux_builder_amp['wordpress-comments-support']) && $redux_builder_amp['wordpress-comments-support']==true ) {
|
6 |
$enable_comments = true;
|
7 |
}
|
8 |
|
9 |
-
$
|
10 |
-
if ( $enable_comments && $display_comments_on ) { ?>
|
11 |
<div id="comments" class="ampforwp-comment-wrapper"> <?php
|
12 |
// Gather comments for a specific page/post
|
13 |
$postID = $comments = "";
|
@@ -38,8 +36,10 @@
|
|
38 |
<article id="comment-<?php comment_ID(); ?>" class="comment-body">
|
39 |
<footer class="comment-meta">
|
40 |
<?php if($comment_author_img_url){ ?>
|
41 |
-
<amp-img
|
42 |
-
<?php }
|
|
|
|
|
43 |
<div class="comment-author vcard">
|
44 |
<?php printf(__('<b class="fn">%s</b> <span class="says">'.ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says').':</span>'), get_comment_author_link()) ?>
|
45 |
</div>
|
1 |
<?php do_action('ampforwp_before_comment_hook',$this);
|
2 |
global $redux_builder_amp;
|
3 |
$enable_comments = "";
|
|
|
4 |
if ( isset($redux_builder_amp['wordpress-comments-support']) && $redux_builder_amp['wordpress-comments-support']==true ) {
|
5 |
$enable_comments = true;
|
6 |
}
|
7 |
|
8 |
+
if ( $enable_comments ) { ?>
|
|
|
9 |
<div id="comments" class="ampforwp-comment-wrapper"> <?php
|
10 |
// Gather comments for a specific page/post
|
11 |
$postID = $comments = "";
|
36 |
<article id="comment-<?php comment_ID(); ?>" class="comment-body">
|
37 |
<footer class="comment-meta">
|
38 |
<?php if($comment_author_img_url){ ?>
|
39 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($comment_author_img_url); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
|
40 |
+
<?php } else { ?>
|
41 |
+
<amp-img data-block-on-consent src="<?php echo esc_url($default_gravatar['url']); ?>" width="40" height="40" layout="fixed" class="comment-author-img"></amp-img>
|
42 |
+
<?php } ?>
|
43 |
<div class="comment-author vcard">
|
44 |
<?php printf(__('<b class="fn">%s</b> <span class="says">'.ampforwp_translation($redux_builder_amp['amp-translator-says-text'],'says').':</span>'), get_comment_author_link()) ?>
|
45 |
</div>
|
templates/design-manager/design-3/elements/content.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
$ampforwp_the_content = $this->get( 'ampforwp_amp_content' );
|
17 |
}
|
18 |
// Muffin Builder Compatibility #1455 #1893
|
19 |
-
if ( function_exists('mfn_builder_print')
|
20 |
ob_start();
|
21 |
mfn_builder_print( get_the_ID() );
|
22 |
$content = ob_get_contents();
|
@@ -34,8 +34,21 @@
|
|
34 |
),
|
35 |
)
|
36 |
)
|
37 |
-
);
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
//Filter to modify the Content
|
16 |
$ampforwp_the_content = $this->get( 'ampforwp_amp_content' );
|
17 |
}
|
18 |
// Muffin Builder Compatibility #1455 #1893
|
19 |
+
if ( function_exists('mfn_builder_print') ) {
|
20 |
ob_start();
|
21 |
mfn_builder_print( get_the_ID() );
|
22 |
$content = ob_get_contents();
|
34 |
),
|
35 |
)
|
36 |
)
|
37 |
+
);
|
38 |
+
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
if($redux_builder_amp['amp-pagination']) {
|
42 |
+
$ampforwp_new_content = explode('<!--nextpage-->', $ampforwp_the_content);
|
43 |
+
$queried_var = get_query_var('page');
|
44 |
+
if ( $queried_var > 1 ) {
|
45 |
+
$queried_var = $queried_var -1 ;
|
46 |
+
}
|
47 |
+
else{
|
48 |
+
$queried_var = 0;
|
49 |
+
}
|
50 |
+
$ampforwp_the_content = $ampforwp_new_content[$queried_var];
|
51 |
+
}//#1015 pegazee
|
52 |
}
|
53 |
|
54 |
//Filter to modify the Content
|
templates/design-manager/design-3/elements/meta-info.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
|
2 |
<?php do_action('ampforwp_before_meta_info_hook',$this); ?>
|
3 |
-
<?php global $redux_builder_amp;
|
4 |
-
if ( is_single() || (is_page() && $redux_builder_amp['meta_page']) ) : ?>
|
5 |
<div class="amp-wp-content amp-wp-article-header ampforwp-meta-info">
|
6 |
<div class="amp-wp-content post-title-meta">
|
7 |
|
@@ -52,5 +51,4 @@ if( isset($redux_builder_amp['ampforwp-cats-single']) && $redux_builder_amp['amp
|
|
52 |
</ul>
|
53 |
</div>
|
54 |
</div>
|
55 |
-
<?php endif; ?>
|
56 |
<?php do_action('ampforwp_after_meta_info_hook',$this);
|
1 |
|
2 |
<?php do_action('ampforwp_before_meta_info_hook',$this); ?>
|
3 |
+
<?php global $redux_builder_amp; ?>
|
|
|
4 |
<div class="amp-wp-content amp-wp-article-header ampforwp-meta-info">
|
5 |
<div class="amp-wp-content post-title-meta">
|
6 |
|
51 |
</ul>
|
52 |
</div>
|
53 |
</div>
|
|
|
54 |
<?php do_action('ampforwp_after_meta_info_hook',$this);
|
templates/design-manager/design-3/elements/meta-taxonomy.php
CHANGED
@@ -32,7 +32,7 @@ if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_sing
|
|
32 |
$author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 70 ) );
|
33 |
}
|
34 |
if ( $author_avatar_url ) { ?>
|
35 |
-
<amp-img
|
36 |
<?php
|
37 |
}
|
38 |
echo ampforwp_get_author_details( $post_author , 'meta-taxonomy' );
|
32 |
$author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 70 ) );
|
33 |
}
|
34 |
if ( $author_avatar_url ) { ?>
|
35 |
+
<amp-img data-block-on-consent src="<?php echo $author_avatar_url; ?>" width="70" height="70" layout="fixed"></amp-img>
|
36 |
<?php
|
37 |
}
|
38 |
echo ampforwp_get_author_details( $post_author , 'meta-taxonomy' );
|
templates/design-manager/design-3/elements/related-posts.php
CHANGED
@@ -1,132 +1,111 @@
|
|
1 |
<?php
|
2 |
-
global $post, $redux_builder_amp;
|
3 |
-
do_action('ampforwp_above_related_post',$this); //Above Related Posts
|
4 |
-
$string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
|
5 |
-
$int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
$
|
10 |
-
// declaring this variable for counting number of related post
|
11 |
-
$r_count = 1;
|
12 |
-
// Check for the order of related posts
|
13 |
-
if( isset( $redux_builder_amp['ampforwp-single-order-of-related-posts'] ) && $redux_builder_amp['ampforwp-single-order-of-related-posts'] ){
|
14 |
-
$orderby = 'rand';
|
15 |
-
}
|
16 |
-
// Custom Post types
|
17 |
-
if( $current_post_type = get_post_type( $post )) {
|
18 |
-
// The query arguments
|
19 |
-
if($current_post_type != 'page'){
|
20 |
-
$args = array(
|
21 |
-
'posts_per_page'=> $int_number_of_related_posts,
|
22 |
-
'order' => 'DESC',
|
23 |
-
'orderby' => $orderby,
|
24 |
-
'post_type' => $current_post_type,
|
25 |
-
'post__not_in' => array( $post->ID )
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
$category_ids = array();
|
35 |
-
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
|
36 |
-
$args=array(
|
37 |
-
'category__in' => $category_ids,
|
38 |
-
'post__not_in' => array($post->ID),
|
39 |
-
'posts_per_page' => $int_number_of_related_posts,
|
40 |
-
'ignore_sticky_posts'=> 1,
|
41 |
-
'has_password' => false ,
|
42 |
-
'post_status' => 'publish',
|
43 |
-
'orderby' => $orderby,
|
44 |
-
);
|
45 |
-
}
|
46 |
-
} //end of block for categories
|
47 |
-
//code block for tags
|
48 |
-
if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
49 |
-
$ampforwp_tags = get_the_tags($post->ID);
|
50 |
-
if ($ampforwp_tags) {
|
51 |
-
$tag_ids = array();
|
52 |
-
foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
|
53 |
-
$args=array(
|
54 |
-
'tag__in' => $tag_ids,
|
55 |
-
'post__not_in' => array($post->ID),
|
56 |
-
'posts_per_page' => $int_number_of_related_posts,
|
57 |
-
'ignore_sticky_posts'=> 1,
|
58 |
-
'has_password' => false ,
|
59 |
-
'post_status' => 'publish',
|
60 |
-
'orderby' => $orderby,
|
61 |
-
);
|
62 |
-
}
|
63 |
-
}//end of block for tags
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
global $post, $redux_builder_amp;
|
4 |
+
do_action('ampforwp_above_related_post',$this); //Above Related Posts
|
5 |
+
$string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts']; $int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
// declaring this variable here to prevent debug errors
|
8 |
+
$args = null;
|
9 |
+
$orderby = 'ID';
|
10 |
+
// declaring this variable for counting number of related post
|
11 |
+
$r_count = 1;
|
12 |
+
// Check for the order of related posts
|
13 |
+
if( isset( $redux_builder_amp['ampforwp-single-order-of-related-posts'] ) && $redux_builder_amp['ampforwp-single-order-of-related-posts'] ){
|
14 |
+
$orderby = 'rand';
|
15 |
+
}
|
16 |
+
// Custom Post types
|
17 |
+
if( $current_post_type = get_post_type( $post )) {
|
18 |
+
// The query arguments
|
19 |
+
if($current_post_type != 'page'){
|
20 |
+
$args = array(
|
21 |
+
'posts_per_page'=> $int_number_of_related_posts,
|
22 |
+
'order' => 'DESC',
|
23 |
+
'orderby' => $orderby,
|
24 |
+
'post_type' => $current_post_type,
|
25 |
+
'post__not_in' => array( $post->ID )
|
26 |
|
27 |
+
);
|
28 |
+
}
|
29 |
+
}//end of block for custom Post types
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
|
32 |
+
$categories = get_the_category($post->ID);
|
33 |
+
if ($categories) {
|
34 |
+
$category_ids = array();
|
35 |
+
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
|
36 |
+
$args=array(
|
37 |
+
'category__in' => $category_ids,
|
38 |
+
'post__not_in' => array($post->ID),
|
39 |
+
'posts_per_page' => $int_number_of_related_posts,
|
40 |
+
'ignore_sticky_posts'=> 1,
|
41 |
+
'has_password' => false ,
|
42 |
+
'post_status' => 'publish',
|
43 |
+
'orderby' => $orderby,
|
44 |
+
);
|
45 |
+
}
|
46 |
+
} //end of block for categories
|
47 |
+
//code block for tags
|
48 |
+
if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
49 |
+
$ampforwp_tags = get_the_tags($post->ID);
|
50 |
+
if ($ampforwp_tags) {
|
51 |
+
$tag_ids = array();
|
52 |
+
foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
|
53 |
+
$args=array(
|
54 |
+
'tag__in' => $tag_ids,
|
55 |
+
'post__not_in' => array($post->ID),
|
56 |
+
'posts_per_page' => $int_number_of_related_posts,
|
57 |
+
'ignore_sticky_posts'=> 1,
|
58 |
+
'has_password' => false ,
|
59 |
+
'post_status' => 'publish',
|
60 |
+
'orderby' => $orderby,
|
61 |
+
);
|
62 |
+
}
|
63 |
+
}//end of block for tags
|
64 |
+
if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] && $redux_builder_amp['ampforwp-single-select-type-of-related'] ){
|
65 |
+
$my_query = new wp_query( $args );
|
66 |
+
if( $my_query->have_posts() ) { ?>
|
67 |
+
<div class="amp-wp-content relatedpost">
|
68 |
+
<div class="related_posts">
|
69 |
+
<ol class="clearfix">
|
70 |
+
<span class="related-title"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></span>
|
71 |
+
<?php
|
72 |
+
while( $my_query->have_posts() ) {
|
73 |
+
$my_query->the_post();
|
74 |
+
$related_post_permalink = "";
|
75 |
+
$related_post_permalink = ampforwp_url_controller( get_permalink() );?>
|
76 |
+
<li class="<?php if ( ampforwp_has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
|
77 |
+
<div class="related-post_image">
|
78 |
+
<a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
|
79 |
+
<?php if ( ampforwp_has_post_thumbnail() ) {
|
80 |
+
$thumb_url = ampforwp_get_post_thumbnail();
|
81 |
+
$thumb_width = ampforwp_get_post_thumbnail('width');
|
82 |
+
$thumb_height = ampforwp_get_post_thumbnail('height');
|
83 |
+
if( $thumb_url && true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { ?>
|
84 |
+
<amp-img src="<?php echo esc_url( $thumb_url ); ?>" width=<?php echo $thumb_width; ?> height=<?php echo $thumb_height; ?> layout="responsive"></amp-img>
|
85 |
+
<?php }
|
86 |
+
}?>
|
87 |
+
</a>
|
88 |
+
</div>
|
89 |
+
<div class="related_link">
|
90 |
+
<a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
|
91 |
+
<?php if ( isset($redux_builder_amp['ampforwp-single-related-posts-excerpt']) && true == $redux_builder_amp['ampforwp-single-related-posts-excerpt'] ) {
|
92 |
+
if(has_excerpt()){
|
93 |
+
$content = get_the_excerpt();
|
94 |
+
}else{
|
95 |
+
$content = get_the_content();
|
96 |
+
} ?>
|
97 |
+
<p><?php echo wp_trim_words( strip_shortcodes( $content ) , '15' ); ?></p>
|
98 |
+
<?php } ?>
|
99 |
+
</div>
|
100 |
+
</li>
|
101 |
+
<?php
|
102 |
+
do_action('ampforwp_between_related_post',$r_count,$this);
|
103 |
+
$r_count++;
|
104 |
+
} ?>
|
105 |
+
</ol>
|
106 |
+
</div>
|
107 |
+
</div> <?php
|
108 |
+
wp_reset_postdata();
|
109 |
+
}
|
110 |
+
} ?>
|
111 |
+
<?php do_action('ampforwp_below_related_post_hook',$this);
|
templates/design-manager/design-3/elements/social-icons.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php global $redux_builder_amp, $post;
|
2 |
-
$image = '';
|
3 |
-
if ( is_single()
|
4 |
if ( has_post_thumbnail( $post->ID ) ) {
|
5 |
$thumb_id = get_post_thumbnail_id($post->ID);
|
6 |
$image = wp_get_attachment_image_src( $thumb_id, 'full' );
|
@@ -148,20 +148,6 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
|
|
148 |
</a>
|
149 |
</div>
|
150 |
<?php } ?>
|
151 |
-
<?php if ( true == $redux_builder_amp['enable-single-hatena-bookmarks'] ) { ?>
|
152 |
-
<a href="http://b.hatena.ne.jp/entry/<?php echo esc_url(get_the_permalink()); ?>" target="_blank">
|
153 |
-
<div class="amp-social-icon-rounded amp-social-hatena">
|
154 |
-
<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'%3e%3cpath d='M 64 96 L 64 416 L 212 416 C 252 416 292 404 308 368 C 328 332 320 276 284 252 C 272 244 260 240 248 236 C 276 232 300 212 300 184 C 304 156 296 120 268 108 C 236 96 192 96 160 96 L 64 96 z M 364 96 L 364 308 L 444 308 L 444 96 L 364 96 z M 144 156 C 144 156 188 156 200 160 C 224 168 224 208 196 212 C 188 216 144 216 144 216 L 144 156 z M 144 280 C 144 280 188 280 208 284 C 232 288 240 312 228 332 C 220 348 204 348 188 348 L 144 348 L 144 280 z M 404 328 A 44 44 0 0 0 360 372 A 44 44 0 0 0 404 416 A 44 44 0 0 0 448 372 A 44 44 0 0 0 404 328 z' style='fill:%23ffffff'/%3e%3c/svg%3e" width="16" height="16" />
|
155 |
-
</div>
|
156 |
-
</a>
|
157 |
-
<?php } ?>
|
158 |
-
<?php if ( true == $redux_builder_amp['enable-single-pocket-share'] ) { ?>
|
159 |
-
<a href="https://getpocket.com/save?url=<?php echo esc_url(get_the_permalink()); ?>" target="_blank">
|
160 |
-
<div class="amp-social-icon-rounded amp-social-pocket">
|
161 |
-
<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='2500' height='2251' viewBox='75.247 261.708 445.529 401.074'%3e%3cpath fill='%23EF4056' d='M114.219 261.708c-24.275 1.582-38.972 15.44-38.972 40.088v147.611c0 119.893 119.242 214.114 222.393 213.37 115.986-.837 223.137-98.779 223.137-213.37V301.796c0-24.741-15.626-38.693-40.088-40.088h-366.47zm93.943 120.079L297.64 466.8l89.571-85.013c40.088-16.835 57.574 28.927 41.111 42.321L311.685 535.443c-3.813 3.628-24.183 3.628-27.996 0L167.051 424.107c-15.72-14.789 4.743-61.295 41.111-42.32z'/%3e%3c/svg%3e" width="16" height="16" />
|
162 |
-
</div>
|
163 |
-
</a>
|
164 |
-
<?php } ?>
|
165 |
</div>
|
166 |
<?php } ?>
|
167 |
<?php do_action('ampforwp_after_social_icons_hook',$this);
|
1 |
<?php global $redux_builder_amp, $post;
|
2 |
+
$image = ''; ?>
|
3 |
+
<?php if ( is_single() ) {
|
4 |
if ( has_post_thumbnail( $post->ID ) ) {
|
5 |
$thumb_id = get_post_thumbnail_id($post->ID);
|
6 |
$image = wp_get_attachment_image_src( $thumb_id, 'full' );
|
148 |
</a>
|
149 |
</div>
|
150 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
</div>
|
152 |
<?php } ?>
|
153 |
<?php do_action('ampforwp_after_social_icons_hook',$this);
|
templates/design-manager/design-3/index.php
CHANGED
@@ -16,11 +16,9 @@
|
|
16 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
17 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
</div>
|
23 |
-
<?php endif; ?>
|
24 |
|
25 |
<?php do_action( 'ampforwp_after_header', $this );
|
26 |
|
@@ -34,38 +32,26 @@ if ( get_query_var( 'paged' ) ) {
|
|
34 |
|
35 |
?>
|
36 |
|
37 |
-
<?php if( $redux_builder_amp['amp-design-3-featured-slider'] == 1 && $paged === 1 ) {
|
38 |
-
$num_posts = 4;$autoplay = 'autoplay';$delay = 'delay="4000"';
|
39 |
-
if ( isset($redux_builder_amp['ampforwp-featur-slider-autop-delay']) && $redux_builder_amp['ampforwp-featur-slider-autop-delay'] ) {
|
40 |
-
$delay = 'delay="'.$redux_builder_amp["ampforwp-featur-slider-autop-delay"].'"';
|
41 |
-
}
|
42 |
-
if ( isset($redux_builder_amp['ampforwp-featur-slider-num-posts']) && $redux_builder_amp['ampforwp-featur-slider-num-posts'] ) {
|
43 |
-
$num_posts = $redux_builder_amp['ampforwp-featur-slider-num-posts'];
|
44 |
-
}
|
45 |
-
if ( isset($redux_builder_amp['ampforwp-featur-slider-autop']) && false == $redux_builder_amp['ampforwp-featur-slider-autop'] ) {
|
46 |
-
$autoplay = '';
|
47 |
-
$delay = '';
|
48 |
-
}
|
49 |
-
?>
|
50 |
<div class="amp-featured-wrapper">
|
51 |
<div class="amp-featured-area">
|
52 |
<amp-carousel width="450"
|
53 |
height="270" layout="responsive"
|
54 |
-
type="slides"
|
55 |
-
|
56 |
<?php
|
57 |
global $redux_builder_amp;
|
58 |
if( isset($redux_builder_amp['amp-design-3-category-selector']) && $redux_builder_amp['amp-design-3-category-selector'] ){
|
59 |
$args = array(
|
60 |
'cat' => $redux_builder_amp['amp-design-3-category-selector'],
|
61 |
-
'posts_per_page' =>
|
62 |
'has_password' => false ,
|
63 |
'post_status'=> 'publish'
|
64 |
);
|
65 |
} else {
|
66 |
//if user does not give a category
|
67 |
$args = array(
|
68 |
-
'posts_per_page' =>
|
69 |
'has_password' => false ,
|
70 |
'post_status'=> 'publish'
|
71 |
);
|
@@ -77,14 +63,14 @@ if ( get_query_var( 'paged' ) ) {
|
|
77 |
$category_posts->the_post();
|
78 |
?>
|
79 |
<div>
|
80 |
-
|
81 |
-
<?php if ( ampforwp_has_post_thumbnail() ) {
|
82 |
$thumb_url = ampforwp_get_post_thumbnail();
|
83 |
if($thumb_url){
|
84 |
?>
|
85 |
<amp-img src=<?php echo $thumb_url ?> width=450 height=270></amp-img>
|
86 |
<?php }
|
87 |
}?>
|
|
|
88 |
<div class="featured_title">
|
89 |
<div class="featured_time"><?php
|
90 |
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
@@ -161,30 +147,40 @@ if ( get_query_var( 'paged' ) ) {
|
|
161 |
|
162 |
|
163 |
<?php
|
164 |
-
if( true == $redux_builder_amp['excerpt-option'] ) {
|
165 |
-
$class = 'large-screen-excerpt-design-3';
|
166 |
-
if ( true == $redux_builder_amp['excerpt-option-design-3'] ) {
|
167 |
-
$class = 'small-screen-excerpt-design-3';
|
168 |
-
}
|
169 |
if(has_excerpt()){
|
170 |
$content = get_the_excerpt();
|
171 |
}else{
|
172 |
$content = get_the_content();
|
173 |
}
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
180 |
-
|
181 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
182 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
183 |
}
|
184 |
echo $final_content;
|
185 |
-
|
186 |
-
|
187 |
-
|
|
|
|
|
188 |
?>
|
189 |
<div class="featured_time"><?php
|
190 |
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
16 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
17 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
18 |
|
19 |
+
<div class="amp-wp-content">
|
20 |
+
<?php do_action('ampforwp_area_above_loop'); ?>
|
21 |
+
</div>
|
|
|
|
|
22 |
|
23 |
<?php do_action( 'ampforwp_after_header', $this );
|
24 |
|
32 |
|
33 |
?>
|
34 |
|
35 |
+
<?php global $redux_builder_amp; if( $redux_builder_amp['amp-design-3-featured-slider'] == 1 && $paged === 1 ) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
<div class="amp-featured-wrapper">
|
37 |
<div class="amp-featured-area">
|
38 |
<amp-carousel width="450"
|
39 |
height="270" layout="responsive"
|
40 |
+
type="slides" autoplay
|
41 |
+
delay="4000">
|
42 |
<?php
|
43 |
global $redux_builder_amp;
|
44 |
if( isset($redux_builder_amp['amp-design-3-category-selector']) && $redux_builder_amp['amp-design-3-category-selector'] ){
|
45 |
$args = array(
|
46 |
'cat' => $redux_builder_amp['amp-design-3-category-selector'],
|
47 |
+
'posts_per_page' => 4,
|
48 |
'has_password' => false ,
|
49 |
'post_status'=> 'publish'
|
50 |
);
|
51 |
} else {
|
52 |
//if user does not give a category
|
53 |
$args = array(
|
54 |
+
'posts_per_page' => 4,
|
55 |
'has_password' => false ,
|
56 |
'post_status'=> 'publish'
|
57 |
);
|
63 |
$category_posts->the_post();
|
64 |
?>
|
65 |
<div>
|
66 |
+
<?php if ( ampforwp_has_post_thumbnail() ) {
|
|
|
67 |
$thumb_url = ampforwp_get_post_thumbnail();
|
68 |
if($thumb_url){
|
69 |
?>
|
70 |
<amp-img src=<?php echo $thumb_url ?> width=450 height=270></amp-img>
|
71 |
<?php }
|
72 |
}?>
|
73 |
+
<a href="<?php echo ampforwp_url_controller( get_the_permalink() ); ?>">
|
74 |
<div class="featured_title">
|
75 |
<div class="featured_time"><?php
|
76 |
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
147 |
|
148 |
|
149 |
<?php
|
|
|
|
|
|
|
|
|
|
|
150 |
if(has_excerpt()){
|
151 |
$content = get_the_excerpt();
|
152 |
}else{
|
153 |
$content = get_the_content();
|
154 |
}
|
155 |
+
?>
|
156 |
+
<p class="large-screen-excerpt-design-3">
|
157 |
+
<?php
|
158 |
+
$excerpt_length ='';
|
159 |
+
$excerpt_length = 15;
|
160 |
+
$final_content_1 = "";
|
161 |
+
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
162 |
+
|
163 |
+
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
164 |
+
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
165 |
+
}
|
166 |
+
echo $final_content;
|
167 |
+
|
168 |
+
?> </p>
|
169 |
+
<p class="small-screen-excerpt-design-3"> <?php
|
170 |
+
if($redux_builder_amp['excerpt-option-design-3']== true) {
|
171 |
+
$excerpt_length = '';
|
172 |
+
$excerpt_length = $redux_builder_amp['amp-design-3-excerpt'];
|
173 |
+
$final_content = "";
|
174 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
|
|
175 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
176 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
177 |
}
|
178 |
echo $final_content;
|
179 |
+
} ?>
|
180 |
+
</p>
|
181 |
+
<?php
|
182 |
+
global $redux_builder_amp;
|
183 |
+
if($redux_builder_amp['amp-design-selector'] == '3' && $redux_builder_amp['amp-design-3-featured-time'] == '1'){
|
184 |
?>
|
185 |
<div class="featured_time"><?php
|
186 |
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
templates/design-manager/design-3/search.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
|
4 |
<head>
|
5 |
<meta charset="utf-8">
|
6 |
-
<meta name="robots" content="noindex,nofollow"/>
|
7 |
<link rel="dns-prefetch" href="https://cdn.ampproject.org">
|
8 |
<?php $paged = get_query_var( 'paged' );
|
9 |
$current_search_url =trailingslashit(get_home_url())."?s=".get_search_query();
|
@@ -87,38 +86,37 @@
|
|
87 |
|
88 |
|
89 |
<?php
|
90 |
-
if( true == $redux_builder_amp['excerpt-option'] ) {
|
91 |
if(has_excerpt()){
|
92 |
$content = get_the_excerpt();
|
93 |
}else{
|
94 |
$content = get_the_content();
|
95 |
-
}
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
102 |
|
103 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
104 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
105 |
}
|
106 |
echo $final_content;
|
107 |
-
|
108 |
-
|
109 |
-
if($redux_builder_amp['excerpt-option-design-3']== true) {
|
110 |
-
$excerpt_length ='';
|
111 |
-
$excerpt_length = $redux_builder_amp['amp-design-3-excerpt'];
|
112 |
-
$final_content = "";
|
113 |
-
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
114 |
-
|
115 |
-
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
116 |
-
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
117 |
-
}
|
118 |
-
echo $final_content;
|
119 |
-
} ?>
|
120 |
-
</p>
|
121 |
-
<?php } ?>
|
122 |
<div class="featured_time"><?php
|
123 |
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
124 |
$post_date = apply_filters('ampforwp_modify_post_date',$post_date);
|
3 |
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
|
4 |
<head>
|
5 |
<meta charset="utf-8">
|
|
|
6 |
<link rel="dns-prefetch" href="https://cdn.ampproject.org">
|
7 |
<?php $paged = get_query_var( 'paged' );
|
8 |
$current_search_url =trailingslashit(get_home_url())."?s=".get_search_query();
|
86 |
|
87 |
|
88 |
<?php
|
|
|
89 |
if(has_excerpt()){
|
90 |
$content = get_the_excerpt();
|
91 |
}else{
|
92 |
$content = get_the_content();
|
93 |
+
}
|
94 |
+
?>
|
95 |
+
<p class="large-screen-excerpt-design-3">
|
96 |
+
<?php
|
97 |
+
$excerpt_length ='';
|
98 |
+
$excerpt_length = 15;
|
99 |
+
$final_content = "";
|
100 |
+
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
101 |
+
|
102 |
+
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
103 |
+
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
104 |
+
}
|
105 |
+
echo $final_content;
|
106 |
+
?></p>
|
107 |
+
<p class="small-screen-excerpt-design-3" > <?php
|
108 |
+
if($redux_builder_amp['excerpt-option-design-3']== true) {
|
109 |
+
$excerpt_length ='';
|
110 |
+
$excerpt_length = $redux_builder_amp['amp-design-3-excerpt'];
|
111 |
+
$final_content = "";
|
112 |
$final_content = apply_filters('ampforwp_modify_index_content', $content, $excerpt_length );
|
113 |
|
114 |
if ( false === has_filter('ampforwp_modify_index_content' ) ) {
|
115 |
$final_content = wp_trim_words( strip_shortcodes( $content ) , $excerpt_length );
|
116 |
}
|
117 |
echo $final_content;
|
118 |
+
} ?>
|
119 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
<div class="featured_time"><?php
|
121 |
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
122 |
$post_date = apply_filters('ampforwp_modify_post_date',$post_date);
|
templates/design-manager/design-3/style.php
CHANGED
@@ -32,7 +32,6 @@ a{ color: #312C7E; text-decoration: none }
|
|
32 |
.aligncenter{ text-align:center; margin: 0 auto }
|
33 |
#statcounter{width: 1px;height:1px;}
|
34 |
amp-anim { max-width: 100%; }
|
35 |
-
amp-wistia-player {margin:5px 0px;}
|
36 |
.amp-wp-content amp-iframe{max-width:100%}
|
37 |
@font-face {
|
38 |
font-family: 'Roboto Slab';
|
@@ -94,7 +93,7 @@ amp-sidebar{ width: 280px; background: #131313; font-family: 'Roboto Slab', seri
|
|
94 |
#pagination .next, #pagination .prev{ margin: 0px 6% 10px 6%; }
|
95 |
#pagination .next a, #pagination .prev a{ opacity:0.9; background: #f42f42; width: 100%; color: #fff; display: inline-block; text-align: center; font-size: 16px; line-height: 1; padding: 18px 0%; border-radius: 4px; }
|
96 |
<?php }
|
97 |
-
if ( is_single()
|
98 |
/* Sticky Social bar in Single */
|
99 |
.sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
|
100 |
.amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; }
|
@@ -169,7 +168,7 @@ h1.amp-wp-title{ margin: 0; color: #333333; font-size: 48px; line-height: 58px;
|
|
169 |
.amp-social-icon-rounded{padding: 11px 12px 9px 12px; top: -13px; position: relative; line-height: 1; display: inline-block; height: inherit; border-radius: 60px; }
|
170 |
.amp-social-line{background:#00b900}
|
171 |
.amp-social-vk{background:#45668e}
|
172 |
-
.amp-social-odnoklassniki{background:#ed812b}.amp-social-reddit{background:#ff4500}.amp-social-telegram{background:#0088cc}.amp-social-tumblr{background:#35465c}.amp-social-digg{background:#005be2}.amp-social-stumbleupon{background:#eb4924}.amp-social-wechat{background:#7bb32e}.amp-social-viber{background:#8f5db7}
|
173 |
.amp-social-facebook{background:#3b5998}.amp-social-twitter{background:#1da1f2}.amp-social-gplus{background:#dd4b39}.amp-social-email{background:#000000}.amp-social-pinterest{background:#bd081c}.amp-social-linkedin{background:#0077b5}.amp-social-whatsapp{background:#5cbe4a}
|
174 |
.ampforwp-custom-social{display:inline-block; margin-bottom:5px}
|
175 |
.amp-wp-tax-tag { list-style: none; display: inline-block; }
|
@@ -194,7 +193,6 @@ main .amp-wp-content.relatedpost{ background: none; box-shadow: none; padding:0p
|
|
194 |
.related_posts ol{ list-style-type:none; margin:0; padding:0 }
|
195 |
.related_posts ol li{ display:inline-block; width:100%; margin-bottom: 12px; padding: 0px; }
|
196 |
.related_posts .related_link a{ color: #444; font-size: 16px; font-family: 'Roboto Slab', serif; font-weight: 600; }
|
197 |
-
.related_posts ol li amp-img{float:left; margin-right:15px }
|
198 |
.related_posts ol li amp-img{ float:left; margin-right:15px }
|
199 |
.related_posts ol li p{ font-size: 12px; color: #999; line-height: 1.2; margin: 12px 0 0 0; }
|
200 |
.no_related_thumbnail{ padding: 15px 18px; }
|
@@ -232,7 +230,7 @@ main .amp-wp-content.comments_list{ background: none; box-shadow: none; padding:
|
|
232 |
html .single-post .ampforwp-incontent-ad-1 { margin-bottom: 10px; }
|
233 |
.amp-ad-3{ margin-bottom:10px; }
|
234 |
.amp-ad-4{ margin-top:2px; }
|
235 |
-
.amp-wp-content blockquote{ border-left: 3px solid; margin: 0; padding: 15px 20px; background: #f3f3f3; }
|
236 |
.amp-wp-content blockquote p{ margin-bottom:0 }
|
237 |
pre{ white-space: pre-wrap; }
|
238 |
|
@@ -300,7 +298,6 @@ amp-lightbox{ background: rgba(0, 0, 0,0.85); }
|
|
300 |
<?php if ( ampforwp_is_home() || ampforwp_is_blog() ) {?>
|
301 |
/* AMP carousel */
|
302 |
.amp-carousel-button-prev, .amp-carousel-button-next{ top:30px;border-radius:60px; }
|
303 |
-
.amp-carousel-button { z-index: 999}
|
304 |
.amp-featured-wrapper{ background:#333 }
|
305 |
.amp-featured-area{ margin: 0 auto; max-width: 450px; max-height: 270px; }
|
306 |
.amp-carousel-slide h1{ font-size: 30px; font-family: 'PT Serif', serif; margin: 0; font-weight: normal; line-height: 38px; color: #fff; padding: 10px 20px 20px 20px; }
|
@@ -343,11 +340,11 @@ amp-user-notification button:hover{ cursor: pointer }
|
|
343 |
@media screen and (max-width: 768px){ .amp-wp-meta{ margin:10px 0px 15px 0px } .home-post_image{ width: 40%; } .amp-loop-list .amp-wp-post-content{ width: 58%; } .amp-loop-list .featured_time{line-height:1} .single-post main .amp-wp-content h1{ line-height:1.4; font-size: 30px;} }
|
344 |
@media screen and (max-width: 600px){ .amp-loop-list .amp-wp-tags{display:none} }
|
345 |
@media screen and (max-width: 530px){ .home-post_image{ width: 35%; } .amp-loop-list .amp-wp-post-content{ width: 63%; } .amp-wp-post-content p { font-size: 12px; } .related_posts ol li p { line-height: 1.6; margin: 7px 0 0 0;} .comments_list ul li .comment-body {width:auto} .amp-category-block li:nth-child(3) {margin:0} }
|
346 |
-
@media screen and (max-width: 425px){ .home-post_image{ /* width: 125px;*/ width: 31.6%; overflow: hidden; /* margin-right: 13px; */ margin-right: 3%; max-height: 122px } .home-post_image amp-img{ width: 144%; left: -20%; } h2.amp-wp-title{ margin-bottom: 7px; line-height: 1.31578947; font-size: 19px; position:relative;top:-3px } h2.amp-wp-title a{ color:#262626} .amp-loop-list{padding:25px 15px 22px 15px} .amp-loop-list .amp-wp-post-content{ width: 63%; } .related_posts .amp-loop-list .amp-wp-post-content .small-screen-excerpt-design-3 { display: block; } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .ampforwp-tax-category{ padding-bottom:0 } .amp-wp-byline{ padding:0 } .related_posts .related_link a{ font-size: 17px; line-height: 1.5; } .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 26px;} .icono-share{display:none} .ampforwp-social-icons amp-social-share{ margin-right: 3px;} main .amp-wp-content{ font-size: 16px; line-height: 26px;} .single-post .amp_author_area .amp_author_area_wrapper{font-size:13px;} .amp-category-post{ font-size:12px; color:#666 }
|
347 |
@media screen and (max-width: 400px){ .amp-wp-title{ font-size: 19px; } }
|
348 |
-
@media screen and (max-width: 375px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 24px;} .amp-carousel-slide h1{ font-size: 28px; line-height: 32px; } #pagination .next a, #pagination .prev a{ color: #666; font-size: 14px; padding: 15px 0px; margin-top: -5px; }.related-title,.comments_list h3{ margin-top:15px; } #pagination .next{ margin-bottom:15px; } .related_posts .related_link {line-height: 1; } }
|
349 |
-
@media screen and (max-width: 340px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 22px;} h2.amp-wp-title{ line-height: 1.31578947; font-size: 17px; } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } }
|
350 |
-
@media screen and (max-width: 320px){ .ampforwp-social-icons amp-social-share{ margin-right: 1px; } }
|
351 |
.entry-content amp-anim{display:table-cell;}
|
352 |
<?php if ( true == $redux_builder_amp['amp-rtl-select-option'] ) { ?>
|
353 |
.amp-carousel-slide h1{ direction: rtl; }
|
@@ -473,7 +470,7 @@ if ( ! is_home() && 1 == $redux_builder_amp['ampforwp-bread-crumb'] ) { ?>
|
|
473 |
.amp-carousel-img img {object-fit: contain;}
|
474 |
.amp-ad-wrapper span { display: inherit; font-size: 12px; line-height: 1;}
|
475 |
<?php // Ads (sitewide)
|
476 |
-
if ( (isset($redux_builder_amp['enable-amp-ads-1'] ) && $redux_builder_amp['enable-amp-ads-1']) || (isset($redux_builder_amp['enable-amp-ads-2'] ) && $redux_builder_amp['enable-amp-ads-2']) ) { ?> .amp-ad-wrapper{ text-align: center } .amp_ad_1{ margin-top: 15px; margin-bottom: 10px; } .single-post .amp_ad_1{ margin-bottom: -15px; } .amp-ad-2{ margin-bottom: -5px; margin-top: 20px; } .amp-ad-wrapper{ text-align: center; margin-left: -13px; } <?php }
|
477 |
if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
|
478 |
.ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
|
479 |
<?php }
|
32 |
.aligncenter{ text-align:center; margin: 0 auto }
|
33 |
#statcounter{width: 1px;height:1px;}
|
34 |
amp-anim { max-width: 100%; }
|
|
|
35 |
.amp-wp-content amp-iframe{max-width:100%}
|
36 |
@font-face {
|
37 |
font-family: 'Roboto Slab';
|
93 |
#pagination .next, #pagination .prev{ margin: 0px 6% 10px 6%; }
|
94 |
#pagination .next a, #pagination .prev a{ opacity:0.9; background: #f42f42; width: 100%; color: #fff; display: inline-block; text-align: center; font-size: 16px; line-height: 1; padding: 18px 0%; border-radius: 4px; }
|
95 |
<?php }
|
96 |
+
if ( is_single() ) {?>
|
97 |
/* Sticky Social bar in Single */
|
98 |
.sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
|
99 |
.amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; }
|
168 |
.amp-social-icon-rounded{padding: 11px 12px 9px 12px; top: -13px; position: relative; line-height: 1; display: inline-block; height: inherit; border-radius: 60px; }
|
169 |
.amp-social-line{background:#00b900}
|
170 |
.amp-social-vk{background:#45668e}
|
171 |
+
.amp-social-odnoklassniki{background:#ed812b}.amp-social-reddit{background:#ff4500}.amp-social-telegram{background:#0088cc}.amp-social-tumblr{background:#35465c}.amp-social-digg{background:#005be2}.amp-social-stumbleupon{background:#eb4924}.amp-social-wechat{background:#7bb32e}.amp-social-viber{background:#8f5db7}
|
172 |
.amp-social-facebook{background:#3b5998}.amp-social-twitter{background:#1da1f2}.amp-social-gplus{background:#dd4b39}.amp-social-email{background:#000000}.amp-social-pinterest{background:#bd081c}.amp-social-linkedin{background:#0077b5}.amp-social-whatsapp{background:#5cbe4a}
|
173 |
.ampforwp-custom-social{display:inline-block; margin-bottom:5px}
|
174 |
.amp-wp-tax-tag { list-style: none; display: inline-block; }
|
193 |
.related_posts ol{ list-style-type:none; margin:0; padding:0 }
|
194 |
.related_posts ol li{ display:inline-block; width:100%; margin-bottom: 12px; padding: 0px; }
|
195 |
.related_posts .related_link a{ color: #444; font-size: 16px; font-family: 'Roboto Slab', serif; font-weight: 600; }
|
|
|
196 |
.related_posts ol li amp-img{ float:left; margin-right:15px }
|
197 |
.related_posts ol li p{ font-size: 12px; color: #999; line-height: 1.2; margin: 12px 0 0 0; }
|
198 |
.no_related_thumbnail{ padding: 15px 18px; }
|
230 |
html .single-post .ampforwp-incontent-ad-1 { margin-bottom: 10px; }
|
231 |
.amp-ad-3{ margin-bottom:10px; }
|
232 |
.amp-ad-4{ margin-top:2px; }
|
233 |
+
.amp-wp-content blockquote{ background-color: #fff; border-left: 3px solid; margin: 0; padding: 15px 20px; background: #f3f3f3; }
|
234 |
.amp-wp-content blockquote p{ margin-bottom:0 }
|
235 |
pre{ white-space: pre-wrap; }
|
236 |
|
298 |
<?php if ( ampforwp_is_home() || ampforwp_is_blog() ) {?>
|
299 |
/* AMP carousel */
|
300 |
.amp-carousel-button-prev, .amp-carousel-button-next{ top:30px;border-radius:60px; }
|
|
|
301 |
.amp-featured-wrapper{ background:#333 }
|
302 |
.amp-featured-area{ margin: 0 auto; max-width: 450px; max-height: 270px; }
|
303 |
.amp-carousel-slide h1{ font-size: 30px; font-family: 'PT Serif', serif; margin: 0; font-weight: normal; line-height: 38px; color: #fff; padding: 10px 20px 20px 20px; }
|
340 |
@media screen and (max-width: 768px){ .amp-wp-meta{ margin:10px 0px 15px 0px } .home-post_image{ width: 40%; } .amp-loop-list .amp-wp-post-content{ width: 58%; } .amp-loop-list .featured_time{line-height:1} .single-post main .amp-wp-content h1{ line-height:1.4; font-size: 30px;} }
|
341 |
@media screen and (max-width: 600px){ .amp-loop-list .amp-wp-tags{display:none} }
|
342 |
@media screen and (max-width: 530px){ .home-post_image{ width: 35%; } .amp-loop-list .amp-wp-post-content{ width: 63%; } .amp-wp-post-content p { font-size: 12px; } .related_posts ol li p { line-height: 1.6; margin: 7px 0 0 0;} .comments_list ul li .comment-body {width:auto} .amp-category-block li:nth-child(3) {margin:0} }
|
343 |
+
@media screen and (max-width: 425px){ .home-post_image{ /* width: 125px;*/ width: 31.6%; overflow: hidden; /* margin-right: 13px; */ margin-right: 3%; max-height: 122px } .home-post_image amp-img{ width: 144%; left: -20%; } h2.amp-wp-title{ margin-bottom: 7px; line-height: 1.31578947; font-size: 19px; position:relative;top:-3px } h2.amp-wp-title a{ color:#262626} .amp-loop-list{padding:25px 15px 22px 15px} .amp-loop-list .amp-wp-post-content{ width: 63%; } .amp-loop-list .amp-wp-post-content .large-screen-excerpt-design-3, .related_posts .related_link p{ display:none } .amp-loop-list .amp-wp-post-content .small-screen-excerpt-design-3 { display: block; } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .ampforwp-tax-category{ padding-bottom:0 } .amp-wp-byline{ padding:0 } .related_posts .related_link a{ font-size: 17px; line-height: 1.5; } .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 26px;} .icono-share{display:none} .ampforwp-social-icons amp-social-share{ margin-right: 3px;} main .amp-wp-content{ font-size: 16px; line-height: 26px;} .single-post .amp_author_area .amp_author_area_wrapper{font-size:13px;} .amp-category-post{ font-size:12px; color:#666 } }
|
344 |
@media screen and (max-width: 400px){ .amp-wp-title{ font-size: 19px; } }
|
345 |
+
@media screen and (max-width: 375px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 24px;} .amp-carousel-slide h1{ font-size: 28px; line-height: 32px; } #pagination .next a, #pagination .prev a{ color: #666; font-size: 14px; padding: 15px 0px; margin-top: -5px; }.related-title,.comments_list h3{ margin-top:15px; } #pagination .next{ margin-bottom:15px; } .related_posts .related_link a{ font-size: 15px; line-height: 1.6; } }
|
346 |
+
@media screen and (max-width: 340px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 22px;} h2.amp-wp-title{ line-height: 1.31578947; font-size: 17px; } .related_posts .related_link a{ font-size: 15px; } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } }
|
347 |
+
@media screen and (max-width: 320px){ .related_posts .related_link a{ font-size: 13px; } .ampforwp-social-icons amp-social-share{ margin-right: 1px; } }
|
348 |
.entry-content amp-anim{display:table-cell;}
|
349 |
<?php if ( true == $redux_builder_amp['amp-rtl-select-option'] ) { ?>
|
350 |
.amp-carousel-slide h1{ direction: rtl; }
|
470 |
.amp-carousel-img img {object-fit: contain;}
|
471 |
.amp-ad-wrapper span { display: inherit; font-size: 12px; line-height: 1;}
|
472 |
<?php // Ads (sitewide)
|
473 |
+
if ( (isset($redux_builder_amp['enable-amp-ads-1'] ) && $redux_builder_amp['enable-amp-ads-1']) || (isset($redux_builder_amp['enable-amp-ads-2'] ) && $redux_builder_amp['enable-amp-ads-2']) ) { ?> .amp-ad-wrapper{ text-align: center } .amp_ad_1{ margin-top: 15px; margin-bottom: 10px; } .single-post .amp_ad_1{ margin-bottom: -15px; } .amp-ad-2{ margin-bottom: -5px; margin-top: 20px; } .amp-ad-wrapper{ text-align: center; margin-left: -13px; }.amp-ad-wrapper, .amp-wp-article amp-ad{ direction: ltr; } <?php }
|
474 |
if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
|
475 |
.ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
|
476 |
<?php }
|
templates/design-manager/swift/fonts/icomoon.ttf
CHANGED
Binary file
|
templates/design-manager/swift/footer.php
CHANGED
@@ -7,10 +7,6 @@
|
|
7 |
<div class="cntr">
|
8 |
<div class="f-w">
|
9 |
<?php
|
10 |
-
if ( is_active_widget(false,false,'search', true) || is_active_widget(false,false,'text', true) ) {
|
11 |
-
add_filter('amp_blacklisted_tags','ampforwp_sidebar_blacklist_tags');
|
12 |
-
add_filter('ampforwp_modify_sidebars_content','ampforwp_modified_search_sidebar');
|
13 |
-
}
|
14 |
ob_start();
|
15 |
dynamic_sidebar('swift-footer-widget-area');
|
16 |
$swift_footer_widget = ob_get_contents();
|
@@ -31,7 +27,6 @@
|
|
31 |
)
|
32 |
);
|
33 |
$sanitized_footer_widget = $sanitizer_obj->get_amp_content();
|
34 |
-
$sanitized_footer_widget = apply_filters('ampforwp_modify_sidebars_content',$sanitized_footer_widget);
|
35 |
echo $sanitized_footer_widget;
|
36 |
?>
|
37 |
</div>
|
@@ -40,7 +35,7 @@
|
|
40 |
<?php endif; ?>
|
41 |
<div class="f-w-f2">
|
42 |
<div class="cntr">
|
43 |
-
<?php if
|
44 |
<div class="f-menu">
|
45 |
<nav itemscope="" itemtype="https://schema.org/SiteNavigationElement">
|
46 |
<?php
|
@@ -56,7 +51,7 @@
|
|
56 |
echo $sanitized_menu; ?>
|
57 |
</nav>
|
58 |
</div>
|
59 |
-
<?php }
|
60 |
<div class="rr">
|
61 |
<?php amp_non_amp_link(); ?>
|
62 |
<?php do_action('amp_footer_link'); ?>
|
@@ -64,9 +59,9 @@
|
|
64 |
</div>
|
65 |
</div>
|
66 |
</footer>
|
67 |
-
<?php }
|
68 |
-
|
69 |
-
if(
|
70 |
<div class="s_stk ss-ic">
|
71 |
<ul>
|
72 |
<?php if($redux_builder_amp['enable-single-facebook-share']){?>
|
@@ -159,19 +154,9 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
|
|
159 |
<a class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
|
160 |
</li>
|
161 |
<?php } ?>
|
162 |
-
<?php if ( isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
|
163 |
-
<li>
|
164 |
-
<a class="s_hb" target="_blank" href="http://b.hatena.ne.jp/entry/<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
165 |
-
</li>
|
166 |
-
<?php } ?>
|
167 |
-
<?php if ( isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
|
168 |
-
<li>
|
169 |
-
<a class="s_pk" target="_blank" href="https://getpocket.com/save?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
170 |
-
</li>
|
171 |
-
<?php } ?>
|
172 |
</ul>
|
173 |
</div>
|
174 |
-
<?php }
|
175 |
do_action("ampforwp_advance_footer_options");
|
176 |
?>
|
177 |
<?php amp_footer_core(); ?>
|
7 |
<div class="cntr">
|
8 |
<div class="f-w">
|
9 |
<?php
|
|
|
|
|
|
|
|
|
10 |
ob_start();
|
11 |
dynamic_sidebar('swift-footer-widget-area');
|
12 |
$swift_footer_widget = ob_get_contents();
|
27 |
)
|
28 |
);
|
29 |
$sanitized_footer_widget = $sanitizer_obj->get_amp_content();
|
|
|
30 |
echo $sanitized_footer_widget;
|
31 |
?>
|
32 |
</div>
|
35 |
<?php endif; ?>
|
36 |
<div class="f-w-f2">
|
37 |
<div class="cntr">
|
38 |
+
<?php if ( has_nav_menu( 'amp-footer-menu' ) ) { ?>
|
39 |
<div class="f-menu">
|
40 |
<nav itemscope="" itemtype="https://schema.org/SiteNavigationElement">
|
41 |
<?php
|
51 |
echo $sanitized_menu; ?>
|
52 |
</nav>
|
53 |
</div>
|
54 |
+
<?php } ?>
|
55 |
<div class="rr">
|
56 |
<?php amp_non_amp_link(); ?>
|
57 |
<?php do_action('amp_footer_link'); ?>
|
59 |
</div>
|
60 |
</div>
|
61 |
</footer>
|
62 |
+
<?php } ?>
|
63 |
+
<?php if(is_single()){ ?>
|
64 |
+
<?php if($redux_builder_amp['enable-single-social-icons']){?>
|
65 |
<div class="s_stk ss-ic">
|
66 |
<ul>
|
67 |
<?php if($redux_builder_amp['enable-single-facebook-share']){?>
|
154 |
<a class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
|
155 |
</li>
|
156 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
</ul>
|
158 |
</div>
|
159 |
+
<?php } }
|
160 |
do_action("ampforwp_advance_footer_options");
|
161 |
?>
|
162 |
<?php amp_footer_core(); ?>
|
templates/design-manager/swift/index.php
CHANGED
@@ -30,7 +30,7 @@
|
|
30 |
<?php amp_loop_date(); ?>
|
31 |
<?php amp_author_box(); ?>
|
32 |
</div>
|
33 |
-
<?php
|
34 |
</div>
|
35 |
</div>
|
36 |
<?php } else {
|
@@ -50,7 +50,7 @@
|
|
50 |
<div class="fsp-cnt">
|
51 |
<?php amp_loop_category(); ?>
|
52 |
<?php amp_loop_title(); ?>
|
53 |
-
<?php
|
54 |
<div class="pt-dt">
|
55 |
<?php amp_loop_date(); ?>
|
56 |
</div>
|
30 |
<?php amp_loop_date(); ?>
|
31 |
<?php amp_author_box(); ?>
|
32 |
</div>
|
33 |
+
<?php amp_loop_excerpt(50); ?>
|
34 |
</div>
|
35 |
</div>
|
36 |
<?php } else {
|
50 |
<div class="fsp-cnt">
|
51 |
<?php amp_loop_category(); ?>
|
52 |
<?php amp_loop_title(); ?>
|
53 |
+
<?php amp_loop_excerpt(20); ?>
|
54 |
<div class="pt-dt">
|
55 |
<?php amp_loop_date(); ?>
|
56 |
</div>
|
templates/design-manager/swift/loop.php
CHANGED
@@ -14,7 +14,7 @@ if( true == $redux_builder_amp['ampforwp-homepage-posts-image-modify-size'] ){
|
|
14 |
<div class="fsp-cnt">
|
15 |
<?php amp_loop_category(); ?>
|
16 |
<?php amp_loop_title(); ?>
|
17 |
-
<?php
|
18 |
<div class="pt-dt">
|
19 |
<?php amp_loop_date(); ?>
|
20 |
</div>
|
14 |
<div class="fsp-cnt">
|
15 |
<?php amp_loop_category(); ?>
|
16 |
<?php amp_loop_title(); ?>
|
17 |
+
<?php amp_loop_excerpt(20); ?>
|
18 |
<div class="pt-dt">
|
19 |
<?php amp_loop_date(); ?>
|
20 |
</div>
|
templates/design-manager/swift/page.php
CHANGED
@@ -8,144 +8,11 @@ amp_header(); ?>
|
|
8 |
}?>
|
9 |
<?php amp_title(); ?>
|
10 |
<?php } ?>
|
11 |
-
<?php if ( isset($redux_builder_amp['swift-featued-image']) && $redux_builder_amp['swift-featued-image'] && ampforwp_has_post_thumbnail() ) { ?>
|
12 |
-
<div class="sf-img">
|
13 |
-
<?php amp_featured_image();?>
|
14 |
-
</div>
|
15 |
-
<?php } ?>
|
16 |
<div class="pg">
|
17 |
<div class="cntn-wrp">
|
18 |
<?php amp_content(); ?>
|
19 |
</div>
|
20 |
-
<?php if(!checkAMPforPageBuilderStatus(get_the_ID())){
|
21 |
-
if( is_page() && isset($redux_builder_amp['ampforwp-page-social']) && $redux_builder_amp['ampforwp-page-social'] ) { ?>
|
22 |
-
<div class="ss-ic">
|
23 |
-
<span class="shr-txt"><?php echo ampforwp_translation($redux_builder_amp['amp-translator-share-text'], 'Share' ); ?></span>
|
24 |
-
<ul>
|
25 |
-
<?php if($redux_builder_amp['enable-single-facebook-share']){?>
|
26 |
-
<li>
|
27 |
-
<a class="s_fb" target="_blank" href="https://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>"></a>
|
28 |
-
</li>
|
29 |
-
<?php } ?>
|
30 |
-
<?php if($redux_builder_amp['enable-single-twitter-share']){?>
|
31 |
-
<li>
|
32 |
-
<a class="s_tw" target="_blank" href="https://twitter.com/intent/tweet?url=<?php the_permalink(); ?>&text=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>">
|
33 |
-
</a>
|
34 |
-
</li>
|
35 |
-
<?php } ?>
|
36 |
-
<?php if($redux_builder_amp['enable-single-gplus-share']){?>
|
37 |
-
<li>
|
38 |
-
<a class="s_gp" target="_blank" href="https://plus.google.com/share?url=<?php the_permalink(); ?>"></a>
|
39 |
-
</li>
|
40 |
-
<?php } ?>
|
41 |
-
<?php if($redux_builder_amp['enable-single-email-share']){?>
|
42 |
-
<li>
|
43 |
-
<a class="s_em" target="_blank" href="mailto:?subject=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&body=<?php the_permalink(); ?>"></a>
|
44 |
-
</li>
|
45 |
-
<?php } ?>
|
46 |
-
<?php if($redux_builder_amp['enable-single-pinterest-share']){
|
47 |
-
$image = '';
|
48 |
-
if (ampforwp_has_post_thumbnail( ) ){
|
49 |
-
$image = ampforwp_get_post_thumbnail( 'url', 'full' );
|
50 |
-
}?>
|
51 |
-
<li>
|
52 |
-
<a class="s_pt" target="_blank" href="https://pinterest.com/pin/create/button/?media=<?php echo esc_url($image); ?>&url=<?php esc_url(the_permalink()); ?>&description=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
53 |
-
</li>
|
54 |
-
<?php } ?>
|
55 |
-
<?php if($redux_builder_amp['enable-single-linkedin-share']){?>
|
56 |
-
<li>
|
57 |
-
<a class="s_lk" target="_blank" href="https://www.linkedin.com/shareArticle?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
58 |
-
</li>
|
59 |
-
<?php } ?>
|
60 |
-
<?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
|
61 |
-
<li>
|
62 |
-
<a class="s_wp" target="_blank" href="whatsapp://send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
|
63 |
-
</li>
|
64 |
-
<?php } ?>
|
65 |
-
<?php if($redux_builder_amp['enable-single-vk-share']){?>
|
66 |
-
<li>
|
67 |
-
<a class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php the_permalink(); ?>"></a>
|
68 |
-
</li>
|
69 |
-
<?php } ?>
|
70 |
-
<?php if($redux_builder_amp['enable-single-odnoklassniki-share']){?>
|
71 |
-
<li>
|
72 |
-
<a class="s_od" target="_blank" href="https://ok.ru/dk?st.cmd=addShare&st._surl=<?php the_permalink(); ?>"></a>
|
73 |
-
</li>
|
74 |
-
<?php } ?>
|
75 |
-
<?php if($redux_builder_amp['enable-single-reddit-share']){?>
|
76 |
-
<li>
|
77 |
-
<a class="s_rd" target="_blank" href="https://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
78 |
-
</li>
|
79 |
-
<?php } ?>
|
80 |
-
<?php if($redux_builder_amp['enable-single-tumblr-share']){?>
|
81 |
-
<li>
|
82 |
-
<a class="s_tb" target="_blank" href="https://www.tumblr.com/widgets/share/tool?canonicalUrl=<?php the_permalink(); ?>"></a>
|
83 |
-
</li>
|
84 |
-
<?php } ?>
|
85 |
-
<?php if($redux_builder_amp['enable-single-telegram-share']){?>
|
86 |
-
<li>
|
87 |
-
<a class="s_tg" target="_blank" href="https://telegram.me/share/url?url=<?php the_permalink(); ?>&text=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
88 |
-
</li>
|
89 |
-
<?php } ?>
|
90 |
-
<?php if($redux_builder_amp['enable-single-digg-share']){?>
|
91 |
-
<li>
|
92 |
-
<a class="s_dg" target="_blank" href="http://digg.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
93 |
-
</li>
|
94 |
-
<?php } ?>
|
95 |
-
<?php if($redux_builder_amp['enable-single-stumbleupon-share']){?>
|
96 |
-
<li>
|
97 |
-
<a class="s_su" target="_blank" href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
98 |
-
</li>
|
99 |
-
<?php } ?>
|
100 |
-
<?php if($redux_builder_amp['enable-single-wechat-share']){?>
|
101 |
-
<li>
|
102 |
-
<a class="s_wc" target="_blank" href="http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url=<?php the_permalink(); ?>"></a>
|
103 |
-
</li>
|
104 |
-
<?php } ?>
|
105 |
-
<?php if($redux_builder_amp['enable-single-viber-share']){?>
|
106 |
-
<li>
|
107 |
-
<a class="s_vb" target="_blank" href="viber://forward?text=<?php the_permalink(); ?>"></a>
|
108 |
-
</li>
|
109 |
-
<?php } ?>
|
110 |
-
<?php if ( isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
|
111 |
-
<li>
|
112 |
-
<a class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
|
113 |
-
</li>
|
114 |
-
<?php } ?>
|
115 |
-
<?php if ( isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
|
116 |
-
<li>
|
117 |
-
<a class="s_hb" target="_blank" href="http://b.hatena.ne.jp/entry/<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
118 |
-
</li>
|
119 |
-
<?php } ?>
|
120 |
-
<?php if ( isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
|
121 |
-
<li>
|
122 |
-
<a class="s_pk" target="_blank" href="https://getpocket.com/save?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
123 |
-
</li>
|
124 |
-
<?php } ?>
|
125 |
-
<?php if($redux_builder_amp['ampforwp-facebook-like-button']){?>
|
126 |
-
<li>
|
127 |
-
<?php if( ampforwp_is_non_amp() && isset($redux_builder_amp['ampforwp-amp-convert-to-wp']) && $redux_builder_amp['ampforwp-amp-convert-to-wp']) { ?>
|
128 |
-
<div class="fb-like"
|
129 |
-
data-href="<?php echo esc_url(get_the_permalink());?>"
|
130 |
-
data-layout="button_count"
|
131 |
-
data-action="like"
|
132 |
-
data-show-faces="true">
|
133 |
-
</div>
|
134 |
-
<?php }
|
135 |
-
else { ?>
|
136 |
-
<amp-facebook-like width=90 height=28
|
137 |
-
layout="fixed"
|
138 |
-
data-size="large"
|
139 |
-
data-layout="button_count"
|
140 |
-
data-href="<?php echo esc_url(get_the_permalink());?>">
|
141 |
-
</amp-facebook-like>
|
142 |
-
<?php } ?>
|
143 |
-
</li>
|
144 |
-
<?php } ?>
|
145 |
-
|
146 |
-
</ul>
|
147 |
-
</div>
|
148 |
-
<?php } ?>
|
149 |
<div class="cmts">
|
150 |
<?php amp_comments();?>
|
151 |
</div>
|
8 |
}?>
|
9 |
<?php amp_title(); ?>
|
10 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
11 |
<div class="pg">
|
12 |
<div class="cntn-wrp">
|
13 |
<?php amp_content(); ?>
|
14 |
</div>
|
15 |
+
<?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
<div class="cmts">
|
17 |
<?php amp_comments();?>
|
18 |
</div>
|
templates/design-manager/swift/single.php
CHANGED
@@ -138,16 +138,6 @@
|
|
138 |
<a class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
|
139 |
</li>
|
140 |
<?php } ?>
|
141 |
-
<?php if ( isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
|
142 |
-
<li>
|
143 |
-
<a class="s_hb" target="_blank" href="http://b.hatena.ne.jp/entry/<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
144 |
-
</li>
|
145 |
-
<?php } ?>
|
146 |
-
<?php if ( isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
|
147 |
-
<li>
|
148 |
-
<a class="s_pk" target="_blank" href="https://getpocket.com/save?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
149 |
-
</li>
|
150 |
-
<?php } ?>
|
151 |
<?php if($redux_builder_amp['ampforwp-facebook-like-button']){?>
|
152 |
<li>
|
153 |
<?php if( ampforwp_is_non_amp() && isset($redux_builder_amp['ampforwp-amp-convert-to-wp']) && $redux_builder_amp['ampforwp-amp-convert-to-wp']) { ?>
|
@@ -374,16 +364,6 @@ do_action("ampforwp_single_design_type_handle");
|
|
374 |
<a class="s_vb" target="_blank" href="viber://forward?text=<?php the_permalink(); ?>"></a>
|
375 |
</li>
|
376 |
<?php } ?>
|
377 |
-
<?php if ( isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
|
378 |
-
<li>
|
379 |
-
<a class="s_hb" target="_blank" href="http://b.hatena.ne.jp/entry/<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
380 |
-
</li>
|
381 |
-
<?php } ?>
|
382 |
-
<?php if ( isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
|
383 |
-
<li>
|
384 |
-
<a class="s_pk" target="_blank" href="https://getpocket.com/save?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
|
385 |
-
</li>
|
386 |
-
<?php } ?>
|
387 |
<?php if ( isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
|
388 |
<li>
|
389 |
<a class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
|
138 |
<a class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
|
139 |
</li>
|
140 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
<?php if($redux_builder_amp['ampforwp-facebook-like-button']){?>
|
142 |
<li>
|
143 |
<?php if( ampforwp_is_non_amp() && isset($redux_builder_amp['ampforwp-amp-convert-to-wp']) && $redux_builder_amp['ampforwp-amp-convert-to-wp']) { ?>
|
364 |
<a class="s_vb" target="_blank" href="viber://forward?text=<?php the_permalink(); ?>"></a>
|
365 |
</li>
|
366 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
<?php if ( isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
|
368 |
<li>
|
369 |
<a class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
|
templates/design-manager/swift/style.php
CHANGED
@@ -18,7 +18,7 @@ a:hover, a:active, a:focus{}
|
|
18 |
pre{ white-space: pre-wrap;}
|
19 |
.left{float:left}
|
20 |
.right{float:right}
|
21 |
-
.hidden
|
22 |
.clearfix{ clear:both }
|
23 |
blockquote{ background: #f1f1f1; margin: 10px 0 20px 0; padding: 15px;}
|
24 |
blockquote p:last-child {margin-bottom: 0;}
|
@@ -31,7 +31,6 @@ box-sizing: border-box;-webkit-box-sizing: border-box;-moz-box-sizing: border-bo
|
|
31 |
.alignleft {float: left;margin-right:10px;}
|
32 |
.aligncenter {display: block;margin-left: auto;margin-right: auto;}
|
33 |
amp-iframe { max-width: 100%; margin-bottom : 20px; }
|
34 |
-
amp-wistia-player {margin:5px 0px;}
|
35 |
.wp-caption {padding: 0;}
|
36 |
.wp-caption-text {font-size: 12px;line-height: 1.5em;margin: 0;padding: .66em 10px .75em;text-align: center;}
|
37 |
amp-carousel > amp-img > img {object-fit: contain;}
|
@@ -179,34 +178,12 @@ if($redux_builder_amp['menu-type'] == '1'){?>
|
|
179 |
|
180 |
if($redux_builder_amp['primary-menu']){?>
|
181 |
.p-m-fl{width:100%;border-bottom: 1px solid rgba(0, 0, 0, 0.05);<?php if($redux_builder_amp['primary-menu-background-scheme']['rgba']){?>background:<?php echo $redux_builder_amp['primary-menu-background-scheme']['rgba']; ?><?php } ?>}
|
182 |
-
.p-menu{width:100%;text-align:center;margin: 0px auto;max-width: 1100px;<?php if($redux_builder_amp['primary-menu-padding-control']){?>padding: <?php echo '
|
183 |
::-webkit-scrollbar {display: none;}
|
184 |
.p-menu ul li{display: inline-block;margin-right: 21px;font-size: 12px;line-height: 20px;letter-spacing: 1px;font-weight: 400;}
|
185 |
-
.p-menu ul li a{
|
186 |
-
|
187 |
-
<?php // Dropdown CSS
|
188 |
-
if($redux_builder_amp['drp-dwn']){?>
|
189 |
-
.p-menu ul li:hover>ul{display:block;z-index:9;padding: 7px 0px 7px 7px;
|
190 |
-
box-shadow: 1px 1px 15px 1px rgba(0, 0, 0, 0.30);background: #fff;border-radius: 4px;}
|
191 |
-
.p-menu li a{transition: all 0.3s ease-in-out 0s;}
|
192 |
-
.p-menu .amp-menu li ul{background: <?php echo $redux_builder_amp['primary-menu-background-scheme']['rgba']; ?>;left: 0;min-width: 200px;opacity: 1;position: absolute;top: 100%;transform: translateY(15px);transition: all 0.3s ease-in-out 0s;visibility: hidden;text-align:left;}
|
193 |
-
.p-menu .amp-menu li ul li ul{left: 100%;top: 0;}
|
194 |
-
.p-menu li:hover > ul{opacity: 1;transform: translateY(0px);visibility: visible;transition: all 0.2s ease-in-out 0s;}
|
195 |
-
.p-menu li ul li{display: block;position: relative;}
|
196 |
-
.p-menu ul li.menu-item-has-children .sub-menu li a{padding:7px;}
|
197 |
-
.p-menu ul li.menu-item-has-children > a:after{content: "\e313";font-family: 'icomoon';background-size: 16px;display: inline-block;top: 3px;font-size: 16px;color: rgba(0,41,96,1);position:relative;padding-left: 10px;line-height:0;right:10px;color:<?php echo $redux_builder_amp['primary-menu-text-scheme']['rgba']?>;}
|
198 |
-
.p-menu .amp-menu li.menu-item-has-children>ul>li {padding-left: 0px;margin-right:0;}
|
199 |
-
.p-menu li.menu-item-has-children:hover > a:after{transform:rotate(180deg);right:0px;}
|
200 |
-
<?php } else { ?>
|
201 |
-
.p-menu ul li.menu-item-has-children:hover > ul{display:none;}
|
202 |
-
.p-menu{overflow-x: auto;overflow-y:hidden;white-space: nowrap;}
|
203 |
-
<?php } ?>
|
204 |
.p-menu ul li.menu-item-has-children:after{display:none;}
|
205 |
-
@media(max-width:768px){
|
206 |
-
.p-menu ul li.menu-item-has-children:hover > ul{display:none;}
|
207 |
-
.p-menu{overflow-x: auto;overflow-y:hidden;white-space: nowrap;}
|
208 |
-
.p-menu ul li.menu-item-has-children > a:after{display:none;}
|
209 |
-
}
|
210 |
<?php } ?>
|
211 |
<?php //Home and Archive
|
212 |
|
@@ -272,7 +249,6 @@ if( is_home() || is_archive() || is_search() || (function_exists('is_shop') && i
|
|
272 |
.arch-tlt{margin:20px 0px;}
|
273 |
.amp-loop-label {font-size: 16px;}
|
274 |
.loop-wrapper h2 {font-size: 24px;font-weight:600;}
|
275 |
-
|
276 |
}
|
277 |
@media(max-width:480px){
|
278 |
.cntr.b-w{padding:0px;}
|
@@ -321,12 +297,6 @@ if( is_page() || ampforwp_is_front_page() || ampforwp_polylang_front_page() ){?>
|
|
321 |
<?php // Single
|
322 |
|
323 |
if(is_single() ) { ?>
|
324 |
-
.content-wrapper{
|
325 |
-
<?php $fontFamily = "font-family: 'Poppins', sans-serif;";
|
326 |
-
if(isset($redux_builder_amp['amp_font_selector_content_single']) && $redux_builder_amp['amp_font_selector_content_single'] != 1 && !empty($redux_builder_amp['amp_font_selector_content_single'])){
|
327 |
-
$fontFamily = "font-family: '".$redux_builder_amp['amp_font_selector_content_single']."';"; }
|
328 |
-
echo $fontFamily;?>
|
329 |
-
}
|
330 |
.tl-exc{font-size: 16px;color: #444;margin-top: 10px;line-height:20px;}
|
331 |
.amp-category span:nth-child(1) {display: none;}
|
332 |
.amp-category span a, .amp-category span{color: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;font-size: 12px;font-weight: 500;text-transform: uppercase;}
|
@@ -361,27 +331,6 @@ echo $fontFamily;?>
|
|
361 |
|
362 |
.cntn-wrp{font-size:18px;color:#000;line-height:1.7;}
|
363 |
.sp-artl h1, h2, h3, h4, h5, h6{margin-bottom:5px;}
|
364 |
-
<?php // H1 - H6 Font Sizes
|
365 |
-
if($redux_builder_amp['swift_cnt']){
|
366 |
-
if($redux_builder_amp['swift_cnt_h1']){ ?>
|
367 |
-
.cntn-wrp h1{font-size:<?php echo $redux_builder_amp['swift_h1_sz']?>;}
|
368 |
-
<?php } //H1 ends
|
369 |
-
if($redux_builder_amp['swift_cnt_h2']){ ?>
|
370 |
-
.cntn-wrp h2{font-size:<?php echo $redux_builder_amp['swift_h2_sz']?>;}
|
371 |
-
<?php } //H2 ends
|
372 |
-
if($redux_builder_amp['swift_cnt_h3']){ ?>
|
373 |
-
.cntn-wrp h3{font-size:<?php echo $redux_builder_amp['swift_h3_sz']?>;}
|
374 |
-
<?php } //H3 ends
|
375 |
-
if($redux_builder_amp['swift_cnt_h4']){ ?>
|
376 |
-
.cntn-wrp h4{font-size:<?php echo $redux_builder_amp['swift_h4_sz']?>;}
|
377 |
-
<?php } //H4 ends
|
378 |
-
if($redux_builder_amp['swift_cnt_h5']){ ?>
|
379 |
-
.cntn-wrp h5{font-size:<?php echo $redux_builder_amp['swift_h5_sz']?>;}
|
380 |
-
<?php } //H5 ends
|
381 |
-
if($redux_builder_amp['swift_cnt_h6']){ ?>
|
382 |
-
.cntn-wrp h6{font-size:<?php echo $redux_builder_amp['swift_h6_sz']?>;}
|
383 |
-
<?php } //H6 ends
|
384 |
-
} // swift Content Heading Sizes Ends?>
|
385 |
.cntn-wrp p{margin:0px 0px 30px 0px;}
|
386 |
.sp-rt p strong, .pg p strong{font-weight: 700;}
|
387 |
.srp .amp-related-posts amp-img{float: left;width: 100%;margin: 0px;height:100%;}
|
@@ -393,33 +342,12 @@ if($redux_builder_amp['swift_cnt']){
|
|
393 |
.related_link a{color:#333;}
|
394 |
.amp-related-posts ul{list-style-type:none;}
|
395 |
.r-pf{margin-top: 40px;display: inline-block;width: 100%;}
|
|
|
396 |
<?php if( 1 == $redux_builder_amp['ampforwp-inline-related-posts'] && is_single() ){ ?>
|
397 |
/** In content releated post desing styles **/
|
398 |
-
.related_posts .
|
399 |
-
|
400 |
-
|
401 |
-
color: #666;
|
402 |
-
font-weight: 400;
|
403 |
-
}
|
404 |
-
.related_posts .related_link a{
|
405 |
-
color:#191919;
|
406 |
-
margin: 0px 0px 5px 0px;
|
407 |
-
font-size: 18px;
|
408 |
-
font-weight: 500;
|
409 |
-
display: inline-block;
|
410 |
-
line-height: 1.5;
|
411 |
-
}
|
412 |
-
.related_posts .related_link {
|
413 |
-
padding: 0px;
|
414 |
-
margin: 0;
|
415 |
-
}
|
416 |
-
.related_posts .has_related_thumbnail{display: inline-flex;width: 29%;flex-direction: column;margin:0px 30px 30px 0px;justify-content: space-evenly;padding:0;}
|
417 |
-
.related_posts .related_link p{color: #444;font-size: 13px;line-height: 20px;letter-spacing: 0.10px;}
|
418 |
-
<?php } ?>
|
419 |
-
<?php if(is_single() && $redux_builder_amp['enable-single-social-icons'] ){?>
|
420 |
-
.body.single-post{
|
421 |
-
padding-bottom:40px;
|
422 |
-
}
|
423 |
<?php } ?>
|
424 |
<?php if( 1 == $redux_builder_amp['amp-author-description'] ) {?>
|
425 |
.sp-rt .amp-author {padding: 20px 20px;border-radius: 0;background: #f9f9f9;border: 1px solid #ececec;display: inline-block;width: 100%;}
|
@@ -453,7 +381,7 @@ border-bottom: 1px solid #eee;
|
|
453 |
.ampforwp_post_pagination p{margin: 0;font-size: 18px;color: #444;font-weight: 500;margin-bottom:10px;}
|
454 |
.ampforwp_post_pagination p a{color:#005be2;padding:0px 10px;}
|
455 |
.cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
|
456 |
-
.amp-comment-button{background-color: <?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;font-size: 15px;float: none;margin: 30px auto 0px auto;text-align: center;border-radius: 3px;font-weight: 600;width:250px;}
|
457 |
.form-submit #submit{background-color: #005be2;font-size: 14px;text-align: center;border-radius: 3px;font-weight: 500;color: #fff;cursor: pointer;margin: 0;border: 0;padding: 11px 21px;}
|
458 |
#respond p {margin: 12px 0;}
|
459 |
.amp-comment-button a{color: #fff;display: block;padding: 7px 0px 8px 0px;}
|
@@ -499,6 +427,7 @@ if( isset($redux_builder_amp['wordpress-comments-support']) && 1 == $redux_build
|
|
499 |
.cmts-wrap a{color:#333;}
|
500 |
.cmts-wrap a:hover{color:<?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;}
|
501 |
.cmts-wrap .current{color:<?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;}
|
|
|
502 |
<?php } // Comments Pagination CSS Ends
|
503 |
if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
|
504 |
.amp-disqus-comments { text-align:center } <?php
|
@@ -563,7 +492,7 @@ if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_bui
|
|
563 |
}
|
564 |
<?php } } ?>
|
565 |
<?php if ( isset($redux_builder_amp['ampforwp-dropcap']) && $redux_builder_amp['ampforwp-dropcap'] ) { ?>
|
566 |
-
.cntn-wrp
|
567 |
float: left;
|
568 |
font-size: 75px;
|
569 |
line-height: 1;
|
@@ -770,7 +699,7 @@ if (isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'
|
|
770 |
|
771 |
}
|
772 |
<?php }
|
773 |
-
if (
|
774 |
/*** Sidebar CSS ***/
|
775 |
<?php if ( is_active_sidebar( 'swift-sidebar' ) ) : ?>
|
776 |
.sdbr-right{
|
@@ -858,7 +787,7 @@ if(isset($redux_builder_amp['ftr2-gapping'])){
|
|
858 |
}
|
859 |
?>;
|
860 |
}
|
861 |
-
.w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 30px;line-height:1.
|
862 |
.w-bl h4{font-size: <?php echo $redux_builder_amp['swift-head-size'] ?>;font-weight: <?php echo $redux_builder_amp['swift-head-fntwgth'] ?>;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
|
863 |
.w-bl ul li, .ampforwp_wc_shortcode_title{list-style-type: none;margin-bottom: 15px;}
|
864 |
.w-bl ul li:last-child{margin-bottom:0;}
|
@@ -997,7 +926,7 @@ if( isset($redux_builder_amp['footer-customize-options']) && true == $redux_bui
|
|
997 |
<?php
|
998 |
|
999 |
//Sticky Social Icons
|
1000 |
-
if(is_single()
|
1001 |
.ss-ic ul li{font-family: 'icomoon';list-style-type:none;display:inline-block;}
|
1002 |
.ss-ic li a{color: #fff;padding: 5px;border-radius: 3px;margin: 0px 10px 10px 0px;display: inline-block;}
|
1003 |
<?php if($redux_builder_amp['enable-single-facebook-share'] || $redux_builder_amp['enbl-fb'] ){?>
|
@@ -1067,25 +996,13 @@ if($redux_builder_amp['enable-single-viber-share']){?>
|
|
1067 |
if(isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
|
1068 |
.s_ym{background:#e26426}
|
1069 |
.s_ym:after{content: "\e948";}
|
1070 |
-
<?php }
|
1071 |
-
if(isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
|
1072 |
-
.s_hb{background:#00a4de}
|
1073 |
-
.s_hb:after{content: "\e948";}
|
1074 |
-
<?php }
|
1075 |
-
if(isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
|
1076 |
-
.s_pk{background:#ef3f56}
|
1077 |
-
.s_pk:after{content: "\e949";}
|
1078 |
<?php } ?>
|
1079 |
.s_stk{background: #f1f1f1;display:inline-block;width: 100%;padding:0;position:fixed;bottom: 0;text-align: center;border: 0;}
|
1080 |
.s_stk ul{width:100%;display:inline-flex;}
|
1081 |
.s_stk ul li{flex-direction: column;flex-basis: 0;flex: 1 0 5%;max-width: calc(100% - 10px);display: flex;}
|
1082 |
.s_stk li a{margin:0;border-radius: 0;padding:12px;}
|
|
|
1083 |
|
1084 |
-
<?php } ?>
|
1085 |
-
<?php if(is_single() && $redux_builder_amp['enable-single-social-icons'] ){?>
|
1086 |
-
.body.single-post{
|
1087 |
-
padding-bottom:40px;
|
1088 |
-
}
|
1089 |
<?php } ?>
|
1090 |
.content-wrapper a, .breadcrumb ul li a, .srp ul li, .rr a{transition: all 0.3s ease-in-out 0s;}
|
1091 |
[class^="icon-"], [class*=" icon-"] {font-family: 'icomoon';speak: none;font-style: normal;font-weight: normal;font-variant: normal;text-transform: none;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
|
@@ -1199,5 +1116,4 @@ a.lb-x{
|
|
1199 |
right: auto;
|
1200 |
left:0;
|
1201 |
}
|
1202 |
-
.amp-ad-wrapper{direction:ltr;}
|
1203 |
<?php } //RTL End ?>
|
18 |
pre{ white-space: pre-wrap;}
|
19 |
.left{float:left}
|
20 |
.right{float:right}
|
21 |
+
.hidden{ display:none }
|
22 |
.clearfix{ clear:both }
|
23 |
blockquote{ background: #f1f1f1; margin: 10px 0 20px 0; padding: 15px;}
|
24 |
blockquote p:last-child {margin-bottom: 0;}
|
31 |
.alignleft {float: left;margin-right:10px;}
|
32 |
.aligncenter {display: block;margin-left: auto;margin-right: auto;}
|
33 |
amp-iframe { max-width: 100%; margin-bottom : 20px; }
|
|
|
34 |
.wp-caption {padding: 0;}
|
35 |
.wp-caption-text {font-size: 12px;line-height: 1.5em;margin: 0;padding: .66em 10px .75em;text-align: center;}
|
36 |
amp-carousel > amp-img > img {object-fit: contain;}
|
178 |
|
179 |
if($redux_builder_amp['primary-menu']){?>
|
180 |
.p-m-fl{width:100%;border-bottom: 1px solid rgba(0, 0, 0, 0.05);<?php if($redux_builder_amp['primary-menu-background-scheme']['rgba']){?>background:<?php echo $redux_builder_amp['primary-menu-background-scheme']['rgba']; ?><?php } ?>}
|
181 |
+
.p-menu{width:100%;text-align:center;margin: 0px auto;max-width: 1100px;overflow-x: auto;overflow-y:hidden;white-space: nowrap;<?php if($redux_builder_amp['primary-menu-padding-control']){?>padding: <?php echo $redux_builder_amp['primary-menu-padding-control']['padding-top'] .' '.$redux_builder_amp['primary-menu-padding-control']['padding-right'] .' '.$redux_builder_amp['primary-menu-padding-control']['padding-bottom'] .' '.$redux_builder_amp['primary-menu-padding-control']['padding-left'] ; ?>;<?php } ?>}
|
182 |
::-webkit-scrollbar {display: none;}
|
183 |
.p-menu ul li{display: inline-block;margin-right: 21px;font-size: 12px;line-height: 20px;letter-spacing: 1px;font-weight: 400;}
|
184 |
+
.p-menu ul li a{padding:0;<?php if($redux_builder_amp['primary-menu-text-scheme']['rgba']){?>color:<?php echo $redux_builder_amp['primary-menu-text-scheme']['rgba']?>;<?php } ?>text-transform:uppercase;}
|
185 |
+
.p-menu ul li.menu-item-has-children:hover > ul{display:none;font-size:13px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
.p-menu ul li.menu-item-has-children:after{display:none;}
|
|
|
|
|
|
|
|
|
|
|
187 |
<?php } ?>
|
188 |
<?php //Home and Archive
|
189 |
|
249 |
.arch-tlt{margin:20px 0px;}
|
250 |
.amp-loop-label {font-size: 16px;}
|
251 |
.loop-wrapper h2 {font-size: 24px;font-weight:600;}
|
|
|
252 |
}
|
253 |
@media(max-width:480px){
|
254 |
.cntr.b-w{padding:0px;}
|
297 |
<?php // Single
|
298 |
|
299 |
if(is_single() ) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
.tl-exc{font-size: 16px;color: #444;margin-top: 10px;line-height:20px;}
|
301 |
.amp-category span:nth-child(1) {display: none;}
|
302 |
.amp-category span a, .amp-category span{color: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;font-size: 12px;font-weight: 500;text-transform: uppercase;}
|
331 |
|
332 |
.cntn-wrp{font-size:18px;color:#000;line-height:1.7;}
|
333 |
.sp-artl h1, h2, h3, h4, h5, h6{margin-bottom:5px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
.cntn-wrp p{margin:0px 0px 30px 0px;}
|
335 |
.sp-rt p strong, .pg p strong{font-weight: 700;}
|
336 |
.srp .amp-related-posts amp-img{float: left;width: 100%;margin: 0px;height:100%;}
|
342 |
.related_link a{color:#333;}
|
343 |
.amp-related-posts ul{list-style-type:none;}
|
344 |
.r-pf{margin-top: 40px;display: inline-block;width: 100%;}
|
345 |
+
.r-pf .loop-wrapper{margin:0;}
|
346 |
<?php if( 1 == $redux_builder_amp['ampforwp-inline-related-posts'] && is_single() ){ ?>
|
347 |
/** In content releated post desing styles **/
|
348 |
+
.related_posts .has_related_thumbnail{display: inline-flex;width: 29%;flex-direction: column;margin:0px 30px 30px 0px;justify-content: space-evenly;}
|
349 |
+
.related_link a{color: #000;font-size: 14px;line-height: 1.5;font-weight: 400;margin-top: 7px;display: inline-block;}
|
350 |
+
.related_link p{font-size: 12px;margin: 0;padding-top: 10px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
<?php } ?>
|
352 |
<?php if( 1 == $redux_builder_amp['amp-author-description'] ) {?>
|
353 |
.sp-rt .amp-author {padding: 20px 20px;border-radius: 0;background: #f9f9f9;border: 1px solid #ececec;display: inline-block;width: 100%;}
|
381 |
.ampforwp_post_pagination p{margin: 0;font-size: 18px;color: #444;font-weight: 500;margin-bottom:10px;}
|
382 |
.ampforwp_post_pagination p a{color:#005be2;padding:0px 10px;}
|
383 |
.cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
|
384 |
+
.amp-comment-button{background-color: <?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;font-size: 15px;float: none;width: 100%;margin: 30px auto 0px auto;text-align: center;border-radius: 3px;font-weight: 600;width:250px;}
|
385 |
.form-submit #submit{background-color: #005be2;font-size: 14px;text-align: center;border-radius: 3px;font-weight: 500;color: #fff;cursor: pointer;margin: 0;border: 0;padding: 11px 21px;}
|
386 |
#respond p {margin: 12px 0;}
|
387 |
.amp-comment-button a{color: #fff;display: block;padding: 7px 0px 8px 0px;}
|
427 |
.cmts-wrap a{color:#333;}
|
428 |
.cmts-wrap a:hover{color:<?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;}
|
429 |
.cmts-wrap .current{color:<?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;}
|
430 |
+
.cmts-btn-wrap {margin-top: 15px;text-align: center;}
|
431 |
<?php } // Comments Pagination CSS Ends
|
432 |
if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
|
433 |
.amp-disqus-comments { text-align:center } <?php
|
492 |
}
|
493 |
<?php } } ?>
|
494 |
<?php if ( isset($redux_builder_amp['ampforwp-dropcap']) && $redux_builder_amp['ampforwp-dropcap'] ) { ?>
|
495 |
+
.cntn-wrp:first-child::first-letter {
|
496 |
float: left;
|
497 |
font-size: 75px;
|
498 |
line-height: 1;
|
699 |
|
700 |
}
|
701 |
<?php }
|
702 |
+
if (isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] ||isset($redux_builder_amp['swift-sidebar']) && $redux_builder_amp['swift-sidebar'] ) { ?>
|
703 |
/*** Sidebar CSS ***/
|
704 |
<?php if ( is_active_sidebar( 'swift-sidebar' ) ) : ?>
|
705 |
.sdbr-right{
|
787 |
}
|
788 |
?>;
|
789 |
}
|
790 |
+
.w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 30px;line-height:1.4;}
|
791 |
.w-bl h4{font-size: <?php echo $redux_builder_amp['swift-head-size'] ?>;font-weight: <?php echo $redux_builder_amp['swift-head-fntwgth'] ?>;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
|
792 |
.w-bl ul li, .ampforwp_wc_shortcode_title{list-style-type: none;margin-bottom: 15px;}
|
793 |
.w-bl ul li:last-child{margin-bottom:0;}
|
926 |
<?php
|
927 |
|
928 |
//Sticky Social Icons
|
929 |
+
if(is_single()){ ?>
|
930 |
.ss-ic ul li{font-family: 'icomoon';list-style-type:none;display:inline-block;}
|
931 |
.ss-ic li a{color: #fff;padding: 5px;border-radius: 3px;margin: 0px 10px 10px 0px;display: inline-block;}
|
932 |
<?php if($redux_builder_amp['enable-single-facebook-share'] || $redux_builder_amp['enbl-fb'] ){?>
|
996 |
if(isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
|
997 |
.s_ym{background:#e26426}
|
998 |
.s_ym:after{content: "\e948";}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
999 |
<?php } ?>
|
1000 |
.s_stk{background: #f1f1f1;display:inline-block;width: 100%;padding:0;position:fixed;bottom: 0;text-align: center;border: 0;}
|
1001 |
.s_stk ul{width:100%;display:inline-flex;}
|
1002 |
.s_stk ul li{flex-direction: column;flex-basis: 0;flex: 1 0 5%;max-width: calc(100% - 10px);display: flex;}
|
1003 |
.s_stk li a{margin:0;border-radius: 0;padding:12px;}
|
1004 |
+
.rr {margin-bottom: 30px;display: inline-block;}
|
1005 |
|
|
|
|
|
|
|
|
|
|
|
1006 |
<?php } ?>
|
1007 |
.content-wrapper a, .breadcrumb ul li a, .srp ul li, .rr a{transition: all 0.3s ease-in-out 0s;}
|
1008 |
[class^="icon-"], [class*=" icon-"] {font-family: 'icomoon';speak: none;font-style: normal;font-weight: normal;font-variant: normal;text-transform: none;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
|
1116 |
right: auto;
|
1117 |
left:0;
|
1118 |
}
|
|
|
1119 |
<?php } //RTL End ?>
|
templates/features.php
CHANGED
@@ -236,26 +236,8 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
236 |
return;
|
237 |
}
|
238 |
}
|
239 |
-
// no-amphtml for search
|
240 |
-
if(is_search()){
|
241 |
-
return;
|
242 |
-
}
|
243 |
// #872 no-amphtml if selected as hide from settings
|
244 |
if(is_archive() && $redux_builder_amp['ampforwp-archive-support']){
|
245 |
-
if(is_tag() && is_array($redux_builder_amp['hide-amp-tags-bulk-option'])) {
|
246 |
-
$all_tags = get_the_tags();
|
247 |
-
$tagsOnPost = array();
|
248 |
-
foreach ($all_tags as $tagskey => $tagsvalue) {
|
249 |
-
$tagsOnPost[] = $tagsvalue->term_id;
|
250 |
-
}
|
251 |
-
$get_tags_checkbox = array_keys(array_filter($redux_builder_amp['hide-amp-tags-bulk-option']));
|
252 |
-
|
253 |
-
if( count(array_intersect($get_tags_checkbox,$tagsOnPost))>0 ){
|
254 |
-
return;
|
255 |
-
}
|
256 |
-
}//tags area closed
|
257 |
-
|
258 |
-
|
259 |
$selected_cats = array();
|
260 |
$categories = get_the_category();
|
261 |
if ( $categories ) {
|
@@ -432,13 +414,14 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
432 |
|
433 |
if ( 'single' === $type ) {
|
434 |
// Homepage and FrontPage
|
435 |
-
if ( is_home()
|
436 |
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
|
|
442 |
|
443 |
if ( ampforwp_is_front_page() || ( true == $redux_builder_amp['ampforwp-amp-takeover'] && is_front_page() && $redux_builder_amp['amp-frontpage-select-option']) ) {
|
444 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
|
@@ -450,7 +433,11 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
450 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/archive.php';
|
451 |
}
|
452 |
// Search pages
|
453 |
-
if ( is_search()
|
|
|
|
|
|
|
|
|
454 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/search.php';
|
455 |
}
|
456 |
// 404 Pages #2042
|
@@ -472,6 +459,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
472 |
if ( 'single' === $type && ampforwp_polylang_front_page() && true == $redux_builder_amp['amp-frontpage-select-option'] ) {
|
473 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
|
474 |
}
|
|
|
475 |
return $file;
|
476 |
}
|
477 |
|
@@ -545,10 +533,7 @@ function ampforwp_new_dir( $dir ) {
|
|
545 |
add_filter('amp_post_template_data','ampforwp_add_amp_social_share_script', 20);
|
546 |
function ampforwp_add_amp_social_share_script( $data ){
|
547 |
global $redux_builder_amp;
|
548 |
-
$social_check =
|
549 |
-
if ( is_page() && isset($redux_builder_amp['ampforwp-page-social']) && $redux_builder_amp['ampforwp-page-social'] ) {
|
550 |
-
$social_check_page = true;
|
551 |
-
}
|
552 |
if ( '4' === $redux_builder_amp['amp-design-selector'] ) {
|
553 |
$social_check = true;
|
554 |
}
|
@@ -556,7 +541,7 @@ function ampforwp_new_dir( $dir ) {
|
|
556 |
$social_check = true;
|
557 |
}
|
558 |
if( $redux_builder_amp['enable-single-social-icons'] == true || defined('AMPFORWP_DM_SOCIAL_CHECK') && AMPFORWP_DM_SOCIAL_CHECK === 'true' ) {
|
559 |
-
if(
|
560 |
if ( empty( $data['amp_component_scripts']['amp-social-share'] ) ) {
|
561 |
$data['amp_component_scripts']['amp-social-share'] = 'https://cdn.ampproject.org/v0/amp-social-share-0.1.js';
|
562 |
}
|
@@ -564,7 +549,7 @@ function ampforwp_new_dir( $dir ) {
|
|
564 |
}
|
565 |
|
566 |
// Facebook Like Script
|
567 |
-
if( true == $redux_builder_amp['ampforwp-facebook-like-button'] &&
|
568 |
if(empty($data['amp_component_scripts']['amp-facebook-like'])){
|
569 |
$data['amp_component_scripts']['amp-facebook-like'] = 'https://cdn.ampproject.org/v0/amp-facebook-like-0.1.js';
|
570 |
}
|
@@ -617,7 +602,7 @@ function ampforwp_new_dir( $dir ) {
|
|
617 |
function ampforwp_footer() {
|
618 |
global $redux_builder_amp; ?>
|
619 |
<!--Plugin Version :<?php echo (AMPFORWP_VERSION); ?> -->
|
620 |
-
<?php if($redux_builder_amp['amp-enable-notifications'] == true
|
621 |
<!-- Thanks to @nicholasgriffintn for Cookie Notification Code-->
|
622 |
<amp-user-notification layout=nodisplay id="amp-user-notification1">
|
623 |
<p><?php echo $redux_builder_amp['amp-notification-text']; ?> </p>
|
@@ -637,8 +622,6 @@ function ampforwp_new_dir( $dir ) {
|
|
637 |
function ampforwp_header_advert() {
|
638 |
global $redux_builder_amp;
|
639 |
$optimize = '';
|
640 |
-
$is_dboc = '';
|
641 |
-
$is_dboc = ampforwp_get_data_consent();
|
642 |
$post_id = get_the_ID();
|
643 |
if ( ampforwp_is_front_page() ) {
|
644 |
$post_id = ampforwp_get_frontpage_id();
|
@@ -682,14 +665,11 @@ function ampforwp_new_dir( $dir ) {
|
|
682 |
$advert_height = '320';
|
683 |
}
|
684 |
$output = '<div class="amp-ad-wrapper amp_ad_1">';
|
685 |
-
$output .= '<amp-ad class="amp-ad-1"
|
686 |
type="adsense" '. $optimize .'
|
687 |
width='. $advert_width .' height='. $advert_height . '
|
688 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-1'].'"
|
689 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-1'] .'"';
|
690 |
-
if($is_dboc){
|
691 |
-
$output .= 'data-block-on-consent';
|
692 |
-
}
|
693 |
if ( $responsive ) {
|
694 |
$output .= 'data-auto-format="rspv"
|
695 |
data-full-width>';
|
@@ -710,8 +690,6 @@ function ampforwp_new_dir( $dir ) {
|
|
710 |
function ampforwp_footer_advert() {
|
711 |
global $redux_builder_amp;
|
712 |
$optimize = '';
|
713 |
-
$is_dboc = '';
|
714 |
-
$is_dboc = ampforwp_get_data_consent();
|
715 |
$post_id = get_the_ID();
|
716 |
if ( ampforwp_is_front_page() ) {
|
717 |
$post_id = ampforwp_get_frontpage_id();
|
@@ -755,14 +733,11 @@ function ampforwp_new_dir( $dir ) {
|
|
755 |
$advert_height = '320';
|
756 |
}
|
757 |
$output = '<div class="amp-ad-wrapper amp_ad_2">';
|
758 |
-
$output .= '<amp-ad class="amp-ad-2"
|
759 |
type="adsense" '. $optimize .'
|
760 |
width='. $advert_width .' height='. $advert_height . '
|
761 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-2'].'"
|
762 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-2'] .'"';
|
763 |
-
if($is_dboc){
|
764 |
-
$output .= 'data-block-on-consent';
|
765 |
-
}
|
766 |
if ( $responsive ) {
|
767 |
$output .= 'data-auto-format="rspv"
|
768 |
data-full-width>';
|
@@ -784,10 +759,6 @@ function ampforwp_new_dir( $dir ) {
|
|
784 |
function ampforwp_before_post_content_advert() {
|
785 |
global $redux_builder_amp;
|
786 |
$optimize = '';
|
787 |
-
$is_global = '';
|
788 |
-
$display_on = '';
|
789 |
-
$is_dboc = '';
|
790 |
-
$is_dboc = ampforwp_get_data_consent();
|
791 |
$post_id = get_the_ID();
|
792 |
// If page builder is enabled then 'Return' and show no ads
|
793 |
if ( checkAMPforPageBuilderStatus( $post_id ) ) {
|
@@ -800,77 +771,50 @@ function ampforwp_new_dir( $dir ) {
|
|
800 |
$client_id = $redux_builder_amp['enable-amp-ads-text-feild-client-3'];
|
801 |
$data_slot = $redux_builder_amp['enable-amp-ads-text-feild-slot-3'];
|
802 |
$optimize = ampforwp_ad_optimize();
|
803 |
-
if(isset($redux_builder_amp['
|
804 |
-
if($redux_builder_amp['
|
805 |
-
$
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
$advert_height = '100';
|
841 |
-
} elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 6) {
|
842 |
-
$advert_width = '200';
|
843 |
-
$advert_height = '50';
|
844 |
-
} elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 7) {
|
845 |
-
$advert_width = '320';
|
846 |
-
$advert_height = '50';
|
847 |
-
}
|
848 |
-
if ( $responsive ) {
|
849 |
-
$advert_width = '100vw';
|
850 |
-
$advert_height = '320';
|
851 |
-
}
|
852 |
-
$output = '<div class="amp-ad-wrapper amp_ad_3">';
|
853 |
-
$output .= '<amp-ad class="amp-ad-3"
|
854 |
-
type="adsense" '. $optimize .'
|
855 |
-
width='. $advert_width .' height='. $advert_height . '
|
856 |
-
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-3'].'"
|
857 |
-
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-3'] .'"';
|
858 |
-
if($is_dboc){
|
859 |
-
$output .= 'data-block-on-consent';
|
860 |
-
}
|
861 |
-
if ( $responsive ) {
|
862 |
-
$output .= 'data-auto-format="rspv"
|
863 |
-
data-full-width>';
|
864 |
-
$output .= '<div overflow></div></amp-ad>';
|
865 |
-
}
|
866 |
-
else
|
867 |
-
$output .= '></amp-ad>';
|
868 |
-
$output .= ampforwp_ads_sponsorship();
|
869 |
-
$output .= ' </div>';
|
870 |
-
$output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
|
871 |
-
echo $output;
|
872 |
-
}
|
873 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
874 |
}
|
875 |
}
|
876 |
|
@@ -882,8 +826,6 @@ function ampforwp_new_dir( $dir ) {
|
|
882 |
global $redux_builder_amp;
|
883 |
$optimize = '';
|
884 |
$post_id = get_the_ID();
|
885 |
-
$is_dboc = '';
|
886 |
-
$is_dboc = ampforwp_get_data_consent();
|
887 |
// If page builder is enabled then 'Return' and show no ads
|
888 |
if ( checkAMPforPageBuilderStatus( $post_id ) ) {
|
889 |
return;
|
@@ -923,14 +865,11 @@ function ampforwp_new_dir( $dir ) {
|
|
923 |
$advert_height = '320';
|
924 |
}
|
925 |
$output = '<div class="amp-ad-wrapper amp_ad_4">';
|
926 |
-
$output .= '<amp-ad class="amp-ad-4"
|
927 |
type="adsense" '. $optimize .'
|
928 |
width='. $advert_width .' height='. $advert_height . '
|
929 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-4'].'"
|
930 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-4'] .'"';
|
931 |
-
if($is_dboc){
|
932 |
-
$output .= 'data-block-on-consent';
|
933 |
-
}
|
934 |
if ( $responsive ) {
|
935 |
$output .= 'data-auto-format="rspv"
|
936 |
data-full-width>';
|
@@ -953,8 +892,6 @@ function ampforwp_new_dir( $dir ) {
|
|
953 |
function ampforwp_below_the_title_advert() {
|
954 |
global $redux_builder_amp;
|
955 |
$optimize = '';
|
956 |
-
$is_dboc = '';
|
957 |
-
$is_dboc = ampforwp_get_data_consent();
|
958 |
$post_id = get_the_ID();
|
959 |
// If page builder is enabled then 'Return' and show no ads
|
960 |
if ( checkAMPforPageBuilderStatus( $post_id ) ) {
|
@@ -995,14 +932,11 @@ function ampforwp_new_dir( $dir ) {
|
|
995 |
$advert_height = '320';
|
996 |
}
|
997 |
$output = '<div class="amp-ad-wrapper amp_ad_5">';
|
998 |
-
$output .= '<amp-ad class="amp-ad-5"
|
999 |
type="adsense" '. $optimize .'
|
1000 |
width='. $advert_width .' height='. $advert_height . '
|
1001 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-5'].'"
|
1002 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-5'] .'"';
|
1003 |
-
if($is_dboc){
|
1004 |
-
$output .= 'data-block-on-consent';
|
1005 |
-
}
|
1006 |
if ( $responsive ) {
|
1007 |
$output .= 'data-auto-format="rspv"
|
1008 |
data-full-width>';
|
@@ -1026,8 +960,6 @@ function ampforwp_new_dir( $dir ) {
|
|
1026 |
function ampforwp_above_related_post_advert() {
|
1027 |
global $redux_builder_amp;
|
1028 |
$optimize = '';
|
1029 |
-
$is_dboc = '';
|
1030 |
-
$is_dboc = ampforwp_get_data_consent();
|
1031 |
$post_id = get_the_ID();
|
1032 |
// If page builder is enabled then 'Return' and show no ads
|
1033 |
if ( checkAMPforPageBuilderStatus( $post_id ) ) {
|
@@ -1068,14 +1000,11 @@ function ampforwp_new_dir( $dir ) {
|
|
1068 |
$advert_height = '320';
|
1069 |
}
|
1070 |
$output = '<div class="amp-ad-wrapper amp_ad_6">';
|
1071 |
-
$output .= '<amp-ad class="amp-ad-6"
|
1072 |
type="adsense" '. $optimize .'
|
1073 |
width='. $advert_width .' height='. $advert_height . '
|
1074 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-6'].'"
|
1075 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-6'] .'"';
|
1076 |
-
if($is_dboc){
|
1077 |
-
$output .= 'data-block-on-consent';
|
1078 |
-
}
|
1079 |
if ( $responsive ) {
|
1080 |
$output .= 'data-auto-format="rspv"
|
1081 |
data-full-width>';
|
@@ -1121,7 +1050,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1121 |
$ga_account = str_replace(' ', '', $ga_account);
|
1122 |
$ga_fields = array(
|
1123 |
'vars'=>array(
|
1124 |
-
'account'=>$ga_account
|
1125 |
),
|
1126 |
'triggers'=> array(
|
1127 |
'trackPageview'=> array(
|
@@ -1130,13 +1059,10 @@ function ampforwp_new_dir( $dir ) {
|
|
1130 |
)
|
1131 |
)
|
1132 |
);
|
1133 |
-
if ( isset($redux_builder_amp['ampforwp-ga-field-anonymizeIP']) && true == $redux_builder_amp['ampforwp-ga-field-anonymizeIP'] ) {
|
1134 |
-
$ga_fields['vars']['anonymizeIP'] = 'true';
|
1135 |
-
}
|
1136 |
$ampforwp_ga_fields = json_encode( $ga_fields);
|
1137 |
$ampforwp_ga_fields = apply_filters('ampforwp_advance_google_analytics', $ampforwp_ga_fields );
|
1138 |
?>
|
1139 |
-
<amp-analytics
|
1140 |
<script type="application/json">
|
1141 |
<?php echo $ampforwp_ga_fields; ?>
|
1142 |
</script>
|
@@ -1146,7 +1072,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1146 |
|
1147 |
// 10.2 Analytics Support added for segment.com
|
1148 |
if ( true == $redux_builder_amp['ampforwp-Segment-switch'] ) { ?>
|
1149 |
-
<amp-analytics
|
1150 |
<script type="application/json">
|
1151 |
{
|
1152 |
"vars": {
|
@@ -1161,12 +1087,12 @@ function ampforwp_new_dir( $dir ) {
|
|
1161 |
|
1162 |
// 10.3 Analytics Support added for Piwik
|
1163 |
if( true == $redux_builder_amp['ampforwp-Piwik-switch'] ) { ?>
|
1164 |
-
<amp-pixel
|
1165 |
<?php }
|
1166 |
|
1167 |
// 10.4 Analytics Support added for quantcast
|
1168 |
if ( true == $redux_builder_amp['ampforwp-Quantcast-switch'] ) { ?>
|
1169 |
-
<amp-analytics
|
1170 |
<script type="application/json">
|
1171 |
{
|
1172 |
"vars": {
|
@@ -1181,7 +1107,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1181 |
|
1182 |
// 10.5 Analytics Support added for comscore
|
1183 |
if ( true == $redux_builder_amp['ampforwp-comScore-switch'] ) { ?>
|
1184 |
-
<amp-analytics
|
1185 |
<script type="application/json">
|
1186 |
{
|
1187 |
"vars": {
|
@@ -1197,7 +1123,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1197 |
// 10.6 Analytics Support added for Effective Measure
|
1198 |
if( true == $redux_builder_amp['ampforwp-Effective-switch'] ) { ?>
|
1199 |
<!-- BEGIN EFFECTIVE MEASURE CODE -->
|
1200 |
-
<amp-pixel
|
1201 |
<!--END EFFECTIVE MEASURE CODE -->
|
1202 |
<?php }
|
1203 |
|
@@ -1205,7 +1131,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1205 |
if( true == $redux_builder_amp['ampforwp-StatCounter-switch'] ) { ?>
|
1206 |
<!-- BEGIN StatCounter CODE -->
|
1207 |
<div id="statcounter">
|
1208 |
-
<amp-pixel
|
1209 |
</amp-pixel>
|
1210 |
</div>
|
1211 |
<!--END StatCounter CODE -->
|
@@ -1215,7 +1141,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1215 |
if( true == $redux_builder_amp['ampforwp-Histats-switch'] ) { ?>
|
1216 |
<!-- BEGIN Histats CODE -->
|
1217 |
<div id="histats">
|
1218 |
-
<amp-pixel
|
1219 |
</amp-pixel>
|
1220 |
</div>
|
1221 |
<!--END Histats CODE -->
|
@@ -1223,7 +1149,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1223 |
|
1224 |
// 10.9 Analytics Support added for Yandex Metrika Analytics
|
1225 |
if ( true == $redux_builder_amp['ampforwp-Yandex-switch'] ){ ?>
|
1226 |
-
<amp-analytics
|
1227 |
<script type="application/json">
|
1228 |
{
|
1229 |
"vars": {
|
@@ -1247,7 +1173,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1247 |
|
1248 |
// 10.10 Analytics Support added for Chartbeat Analytics
|
1249 |
if ( true == $redux_builder_amp['ampforwp-Chartbeat-switch'] ){ ?>
|
1250 |
-
<amp-analytics
|
1251 |
<script type="application/json">
|
1252 |
{
|
1253 |
'vars': {
|
@@ -1265,7 +1191,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1265 |
// 10.11 Analytics Support added for Alexa Metrics
|
1266 |
if ( true == $redux_builder_amp['ampforwp-Alexa-switch'] ) { ?>
|
1267 |
<!-- Start Alexa AMP Certify Javascript -->
|
1268 |
-
<amp-analytics
|
1269 |
<script type="application/json">
|
1270 |
{
|
1271 |
"vars": {
|
@@ -1303,7 +1229,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1303 |
if ($afs_account > 999999)
|
1304 |
$afs_server = 'www10'; ?>
|
1305 |
<!-- Start AFS Analytics Javascript -->
|
1306 |
-
<amp-analytics
|
1307 |
<script type="application/json">
|
1308 |
{
|
1309 |
"vars": {
|
@@ -1357,14 +1283,6 @@ function ampforwp_new_dir( $dir ) {
|
|
1357 |
/* Removed So Inline style can work
|
1358 |
$content = preg_replace('#<style scoped.*?>(.*?)</style>#i', '', $content); */
|
1359 |
$content = preg_replace('/href="javascript:void*/', ' ', $content);
|
1360 |
-
// Convert the Wistia embed into URL to build amp-wistia-player and remove unnecesarry wistia code
|
1361 |
-
$content = preg_replace('/<script src="(https?).*(\/\/fast|support)(\.wistia\.com\/)(embed\/medias\/)([0-9|\w]+)(.*?)<\/script>/', "$1:$2$3$4$5\n", $content);
|
1362 |
-
$content = preg_replace('/<div class="wistia_responsive_padding" (.*?)>/', "", $content);
|
1363 |
-
$content = preg_replace('/<div class="wistia_responsive_wrapper" (.*?)>/', "", $content);
|
1364 |
-
$content = preg_replace('/<div class="wistia_embed (.*?)>/', "", $content);
|
1365 |
-
$content = preg_replace('/<div class="wistia_swatch" (.*?)>/', "", $content);
|
1366 |
-
$content = preg_replace('/<img(.*?)src="https:\/\/fast.wistia.com\/embed\/(.*?)"(.*?)\/>/', "", $content);
|
1367 |
-
|
1368 |
$content = preg_replace('/<script[^>]*>.*?<\/script>/i', '', $content);
|
1369 |
//for removing attributes within html tags
|
1370 |
$content = preg_replace('/(<[^>]+) onclick=".*?"/', '$1', $content);
|
@@ -1373,8 +1291,6 @@ function ampforwp_new_dir( $dir ) {
|
|
1373 |
*/
|
1374 |
$content = preg_replace('/(<[^>]+) rel="(.*?) noopener(.*?)"/', '$1 rel="$2$3"', $content);
|
1375 |
$content = preg_replace('/<div(.*?) rel=".*?"(.*?)/', '<div $1', $content);
|
1376 |
-
// Remove alt attribute from the div tag #2093
|
1377 |
-
$content = preg_replace('/<div(.*?) alt=".*?"(.*?)/', '<div $1', $content);
|
1378 |
$content = preg_replace('/(<[^>]+) ref=".*?"/', '$1', $content);
|
1379 |
/*$content = preg_replace('/(<[^>]+) date=".*?"/', '$1', $content);
|
1380 |
$content = preg_replace('/(<[^>]+) time=".*?"/', '$1', $content);
|
@@ -1434,8 +1350,6 @@ function ampforwp_new_dir( $dir ) {
|
|
1434 |
$content = preg_replace('/(<[^>]+) aria-current=".*?"/', '$1', $content);
|
1435 |
// Gallery Break fix
|
1436 |
$content = preg_replace('/\[gallery(.*?)\]/', '</p>[gallery$1]</p>', $content);
|
1437 |
-
// value attribute from anchor tag #2262
|
1438 |
-
$content = preg_replace('/<a(.*?)(value=".*?")(.*?)>/', '<a$1$3>', $content);
|
1439 |
|
1440 |
return $content;
|
1441 |
}
|
@@ -1673,7 +1587,7 @@ function ampforwp_title_callback( $post ) {
|
|
1673 |
wp_nonce_field( basename( __FILE__ ), 'ampforwp_title_nonce' );
|
1674 |
$ampforwp_stored_meta = get_post_meta( $post->ID );
|
1675 |
$preview_query_args = array();
|
1676 |
-
$preview_link =
|
1677 |
$preview_query_args = array(AMPFORWP_AMP_QUERY_VAR => 1);
|
1678 |
$preview_link = get_preview_post_link($post, $preview_query_args );
|
1679 |
|
@@ -1707,13 +1621,6 @@ function ampforwp_title_callback( $post ) {
|
|
1707 |
if ( empty( $ampforwp_stored_meta['ampforwp-amp-on-off'][0] ) && $post->post_type == 'page' && ( isset($redux_builder_amp['amp-pages-meta-default']) && $redux_builder_amp['amp-pages-meta-default'] == 'hide' ) ) {
|
1708 |
$ampforwp_stored_meta['ampforwp-amp-on-off'][0] = 'hide-amp';
|
1709 |
}
|
1710 |
-
$list_of_posts = ampforwp_posts_to_remove();
|
1711 |
-
if ( $list_of_posts && $post->post_type == 'post' ) {
|
1712 |
-
$skip_this_post = in_array($post->ID, $list_of_posts);
|
1713 |
-
}
|
1714 |
-
if ( $skip_this_post ) {
|
1715 |
-
$ampforwp_stored_meta['ampforwp-amp-on-off'][0] = 'hide-amp';
|
1716 |
-
}
|
1717 |
?>
|
1718 |
<p>
|
1719 |
<div class="prfx-row-content">
|
@@ -2045,8 +1952,6 @@ function ampforwp_remove_schema_data() {
|
|
2045 |
// SmartMag Compatibility
|
2046 |
ampforwp_remove_filters_for_class( 'amp_post_template_dir', 'Bunyad_Theme_Amp', 'template_dir', 10 );
|
2047 |
ampforwp_remove_filters_for_class( 'amp_post_template_data', 'Bunyad_Theme_Amp', 'setup_data', 10 );
|
2048 |
-
// Remove Jannah Image Lazy Load #2224
|
2049 |
-
ampforwp_remove_filters_for_class( 'wp_get_attachment_image_attributes', 'TIELABS_FILTERS', 'lazyload_image_attributes', 8 );
|
2050 |
//SiteOrigin Page builder compatibilty with AMP Frontpage
|
2051 |
if ( ampforwp_is_front_page() ) {
|
2052 |
ampforwp_remove_filters_for_class( 'the_content', 'SiteOrigin_Panels', 'generate_post_content', 10 );
|
@@ -2114,7 +2019,7 @@ function ampforwp_sticky_social_icons(){
|
|
2114 |
global $redux_builder_amp;
|
2115 |
/* include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
2116 |
if( !is_plugin_active( 'amp-cta/amp-cta.php' ) ) {*/
|
2117 |
-
if(
|
2118 |
$image = '';
|
2119 |
if ( ampforwp_has_post_thumbnail( ) ){
|
2120 |
$image = ampforwp_get_post_thumbnail( 'url', 'full' );
|
@@ -2228,20 +2133,6 @@ function ampforwp_sticky_social_icons(){
|
|
2228 |
</div>
|
2229 |
</a>
|
2230 |
<?php } ?>
|
2231 |
-
<?php if ( true == $redux_builder_amp['enable-single-hatena-bookmarks'] ) { ?>
|
2232 |
-
<a href="http://b.hatena.ne.jp/entry/<?php echo esc_url(get_the_permalink()); ?>" target="_blank">
|
2233 |
-
<div class="amp-social-icon amp-social-hatena">
|
2234 |
-
<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512' viewBox='0 0 512 512'%3e%3cpath d='M 64 96 L 64 416 L 212 416 C 252 416 292 404 308 368 C 328 332 320 276 284 252 C 272 244 260 240 248 236 C 276 232 300 212 300 184 C 304 156 296 120 268 108 C 236 96 192 96 160 96 L 64 96 z M 364 96 L 364 308 L 444 308 L 444 96 L 364 96 z M 144 156 C 144 156 188 156 200 160 C 224 168 224 208 196 212 C 188 216 144 216 144 216 L 144 156 z M 144 280 C 144 280 188 280 208 284 C 232 288 240 312 228 332 C 220 348 204 348 188 348 L 144 348 L 144 280 z M 404 328 A 44 44 0 0 0 360 372 A 44 44 0 0 0 404 416 A 44 44 0 0 0 448 372 A 44 44 0 0 0 404 328 z' style='fill:%23ffffff'/%3e%3c/svg%3e" width="50" height="20" />
|
2235 |
-
</div>
|
2236 |
-
</a>
|
2237 |
-
<?php } ?>
|
2238 |
-
<?php if ( true == $redux_builder_amp['enable-single-pocket-share'] ) { ?>
|
2239 |
-
<a href="https://getpocket.com/save?url=<?php echo esc_url(get_the_permalink()); ?>" target="_blank">
|
2240 |
-
<div class="amp-social-icon amp-social-pocket">
|
2241 |
-
<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='2500' height='2251' viewBox='75.247 261.708 445.529 401.074'%3e%3cpath fill='%23EF4056' d='M114.219 261.708c-24.275 1.582-38.972 15.44-38.972 40.088v147.611c0 119.893 119.242 214.114 222.393 213.37 115.986-.837 223.137-98.779 223.137-213.37V301.796c0-24.741-15.626-38.693-40.088-40.088h-366.47zm93.943 120.079L297.64 466.8l89.571-85.013c40.088-16.835 57.574 28.927 41.111 42.321L311.685 535.443c-3.813 3.628-24.183 3.628-27.996 0L167.051 424.107c-15.72-14.789 4.743-61.295 41.111-42.32z'/%3e%3c/svg%3e" width="50" height="20" />
|
2242 |
-
</div>
|
2243 |
-
</a>
|
2244 |
-
<?php } ?>
|
2245 |
</div>
|
2246 |
<?php }
|
2247 |
//}
|
@@ -2543,7 +2434,7 @@ function ampforwp_frontpage_title_markup () {
|
|
2543 |
}
|
2544 |
return $content_buffer;
|
2545 |
}
|
2546 |
-
|
2547 |
|
2548 |
|
2549 |
|
@@ -2692,6 +2583,7 @@ function amp_gtm_add_gtm_support( $analytics ) {
|
|
2692 |
if ( ! is_array( $analytics ) ) {
|
2693 |
$analytics = array();
|
2694 |
}
|
|
|
2695 |
$analytics['amp-gtm-googleanalytics'] = array(
|
2696 |
'type' => $redux_builder_amp['amp-gtm-analytics-type'],
|
2697 |
'attributes' => array(
|
@@ -2700,7 +2592,7 @@ function amp_gtm_add_gtm_support( $analytics ) {
|
|
2700 |
),
|
2701 |
'config_data' => array(
|
2702 |
'vars' => array(
|
2703 |
-
'account' => $redux_builder_amp['amp-gtm-analytics-code']
|
2704 |
),
|
2705 |
'triggers' => array(
|
2706 |
'trackPageview' => array(
|
@@ -2710,9 +2602,6 @@ function amp_gtm_add_gtm_support( $analytics ) {
|
|
2710 |
),
|
2711 |
),
|
2712 |
);
|
2713 |
-
if ( isset($redux_builder_amp['ampforwp-gtm-field-anonymizeIP']) && true == $redux_builder_amp['ampforwp-gtm-field-anonymizeIP'] ) {
|
2714 |
-
$analytics['amp-gtm-googleanalytics']['config_data']['vars']['anonymizeIP'] = 'true';
|
2715 |
-
}
|
2716 |
|
2717 |
return $analytics;
|
2718 |
}
|
@@ -2731,8 +2620,6 @@ function ampforwp_add_disqus_support() {
|
|
2731 |
$width = $height = 420;
|
2732 |
$layout = "";
|
2733 |
$layout = 'responsive';
|
2734 |
-
$display_comments_on = "";
|
2735 |
-
$display_comments_on = ampforwp_get_comments_status();
|
2736 |
if ( isset($redux_builder_amp['ampforwp-disqus-layout']) && 'fixed' == $redux_builder_amp['ampforwp-disqus-layout'] ) {
|
2737 |
$layout = 'fixed';
|
2738 |
|
@@ -2743,7 +2630,7 @@ function ampforwp_add_disqus_support() {
|
|
2743 |
//if ( !comments_open() ){
|
2744 |
// return;
|
2745 |
//}//931
|
2746 |
-
if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && 4 != $redux_builder_amp['amp-design-selector']
|
2747 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
2748 |
global $post; $post_slug=$post->post_name;
|
2749 |
|
@@ -2798,20 +2685,17 @@ function ampforwp_facebook_comments_support() {
|
|
2798 |
function ampforwp_facebook_comments_markup() {
|
2799 |
|
2800 |
global $redux_builder_amp;
|
2801 |
-
$facebook_comments_markup =
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
$
|
2806 |
-
if ( $redux_builder_amp['ampforwp-facebook-comments-support'] && $display_comments_on ) {
|
2807 |
|
2808 |
$facebook_comments_markup = '<section class="amp-wp-content post-comments amp-wp-article-content amp-facebook-comments" id="comments">';
|
2809 |
-
$facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
|
2810 |
-
layout="responsive"
|
2811 |
$facebook_comments_markup .= '"'. $redux_builder_amp['ampforwp-number-of-fb-no-of-comments']. '" ';
|
2812 |
-
|
2813 |
-
$facebook_comments_markup .= 'data-block-on-consent';
|
2814 |
-
}
|
2815 |
$facebook_comments_markup .= 'data-href=" ' . get_permalink() . ' "';
|
2816 |
$facebook_comments_markup .= '></amp-facebook-comments> </section>';
|
2817 |
|
@@ -2826,7 +2710,7 @@ function ampforwp_add_fbcomments_scripts( $data ) {
|
|
2826 |
$facebook_comments_check = "";
|
2827 |
$facebook_comments_check = ampforwp_facebook_comments_markup();
|
2828 |
|
2829 |
-
if ( $facebook_comments_check && $redux_builder_amp['ampforwp-facebook-comments-support'] && ( is_singular() || ampforwp_is_front_page() )
|
2830 |
if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) {
|
2831 |
$data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js';
|
2832 |
}
|
@@ -3176,103 +3060,43 @@ function ampforwp_sidebars_carousel_content($content){
|
|
3176 |
}
|
3177 |
// Sidebar Content Sanitizer
|
3178 |
function ampforwp_sidebar_content_sanitizer($sidebar){
|
3179 |
-
global $redux_builder_amp;
|
3180 |
$sanitized_sidebar = "";
|
3181 |
$non_sanitized_sidebar = "";
|
3182 |
-
$sidebar_data = array();
|
|
|
3183 |
ob_start();
|
3184 |
dynamic_sidebar( $sidebar );
|
3185 |
$non_sanitized_sidebar = ob_get_contents();
|
3186 |
ob_end_clean();
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
);
|
3214 |
-
}
|
3215 |
-
|
3216 |
-
if ( is_active_widget(false,false,'search') && $sanitized_sidebar) {
|
3217 |
-
add_filter('amp_blacklisted_tags','ampforwp_sidebar_blacklist_tags');
|
3218 |
-
add_filter('ampforwp_modify_sidebars_content','ampforwp_modified_search_sidebar');
|
3219 |
-
}
|
3220 |
-
return $sanitized_sidebar;
|
3221 |
-
}
|
3222 |
-
|
3223 |
-
function ampforwp_modified_search_sidebar( $content ) {
|
3224 |
-
global $redux_builder_amp;
|
3225 |
-
$dom = '';
|
3226 |
-
$dom = AMP_DOM_Utils::get_dom_from_content($content);
|
3227 |
-
$nodes = $dom->getElementsByTagName( 'form' );
|
3228 |
-
$num_nodes = $nodes->length;
|
3229 |
-
if ( 0 !== $num_nodes ) {
|
3230 |
-
for ( $i = 0; $i < $nodes->length; ++$i ) {
|
3231 |
-
$element = $nodes->item( $i );
|
3232 |
-
if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && !$redux_builder_amp['ampforwp-amp-takeover'] ) {
|
3233 |
-
$amp_query_variable = 'amp';
|
3234 |
-
$amp_query_variable_val = '1';
|
3235 |
-
}
|
3236 |
-
$input = $dom->createElement('input');
|
3237 |
-
$input->setAttribute('type', 'text');
|
3238 |
-
$input->setAttribute('placeholder', 'AMP');
|
3239 |
-
$input->setAttribute('value', $amp_query_variable_val);
|
3240 |
-
$input->setAttribute('name', $amp_query_variable);
|
3241 |
-
$input->setAttribute('class', 'hide');
|
3242 |
-
$input->setAttribute('id', 'ampforwp_search_query_item');
|
3243 |
-
$element->appendChild($input);
|
3244 |
-
if ( ! $element->hasAttribute('action-xhr') ){
|
3245 |
-
$action_url = $element->getAttribute('action');
|
3246 |
-
$action_url = preg_replace('#^http?:#', '', $action_url);
|
3247 |
-
$element->setAttribute('action', $action_url);
|
3248 |
-
}
|
3249 |
-
$element->setAttribute('target', '_top');
|
3250 |
-
}
|
3251 |
-
}
|
3252 |
-
$content = AMP_DOM_Utils::get_content_from_dom($dom);
|
3253 |
-
return $content;
|
3254 |
}
|
3255 |
|
3256 |
-
|
3257 |
-
$form = array_search('form', $tags);
|
3258 |
-
$input = array_search('input', $tags);
|
3259 |
-
$label = array_search('label', $tags);
|
3260 |
-
$textarea = array_search('textarea', $tags);
|
3261 |
-
$select = array_search('select', $tags);
|
3262 |
-
$option = array_search('option', $tags);
|
3263 |
-
if ( $form ) {
|
3264 |
-
unset($tags[$form]);
|
3265 |
-
}
|
3266 |
-
if ( $input ) {
|
3267 |
-
unset($tags[$input]);
|
3268 |
-
}
|
3269 |
-
if ( $label ) {
|
3270 |
-
unset($tags[$label]);
|
3271 |
-
}
|
3272 |
-
if ( $textarea ) { unset($tags[$textarea]); }
|
3273 |
-
if ( $select ) { unset($tags[$select]); }
|
3274 |
-
if ( $option ) { unset($tags[$option]); }
|
3275 |
-
return $tags;
|
3276 |
}
|
3277 |
// Sidebar Scripts
|
3278 |
add_filter( 'amp_post_template_data', 'ampforwp_add_sidebar_data' );
|
@@ -3480,7 +3304,7 @@ function ampforwp_search_or_homepage_or_staticpage_metadata( $metadata, $post )
|
|
3480 |
$metadata['headline'] = $headline; // proper headline added
|
3481 |
}
|
3482 |
// Description for Structured Data
|
3483 |
-
$desc = esc_attr( convert_chars( stripslashes( ampforwp_generate_meta_desc(
|
3484 |
$metadata['description'] = $desc;
|
3485 |
return $metadata;
|
3486 |
}
|
@@ -3519,7 +3343,7 @@ add_filter( 'amp_post_template_data', 'ampforwp_add_ads_scripts' );
|
|
3519 |
function ampforwp_add_ads_scripts( $data ) {
|
3520 |
global $redux_builder_amp;
|
3521 |
|
3522 |
-
if ( (isset($redux_builder_amp['enable-amp-ads-1'] ) && $redux_builder_amp['enable-amp-ads-1']) || (isset( $redux_builder_amp['enable-amp-ads-2'] ) && $redux_builder_amp['enable-amp-ads-2']) || (isset($redux_builder_amp['enable-amp-ads-3']) && $redux_builder_amp['enable-amp-ads-3']) || (isset($redux_builder_amp['enable-amp-ads-4']) && $redux_builder_amp['enable-amp-ads-4'])
|
3523 |
if ( empty( $data['amp_component_scripts']['amp-ad'] ) ) {
|
3524 |
$data['amp_component_scripts']['amp-ad'] = 'https://cdn.ampproject.org/v0/amp-ad-0.1.js';
|
3525 |
}
|
@@ -3556,7 +3380,7 @@ add_filter( 'amp_post_template_data', 'ampforwp_add_notification_scripts', 75 );
|
|
3556 |
function ampforwp_add_notification_scripts( $data ) {
|
3557 |
global $redux_builder_amp;
|
3558 |
|
3559 |
-
if ( $redux_builder_amp['amp-enable-notifications'] == true
|
3560 |
if ( empty( $data['amp_component_scripts']['amp-user-notification'] ) ) {
|
3561 |
$data['amp_component_scripts']['amp-user-notification'] = 'https://cdn.ampproject.org/v0/amp-user-notification-0.1.js';
|
3562 |
}
|
@@ -3797,16 +3621,12 @@ function ampforwp_comment_button_url(){
|
|
3797 |
}
|
3798 |
|
3799 |
// 60. Remove Category Layout modification code added by TagDiv #842 and #796
|
3800 |
-
|
3801 |
-
add_action('pre_amp_render_post', 'ampforwp_remove_tagdiv_category_layout');
|
3802 |
-
function ampforwp_remove_tagdiv_category_layout(){
|
3803 |
if ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
|
3804 |
-
|
3805 |
}
|
3806 |
}
|
3807 |
-
|
3808 |
-
remove_action('pre_get_posts', 'td_modify_main_query_for_category_page');
|
3809 |
-
}
|
3810 |
|
3811 |
// 61. Add Gist Support
|
3812 |
add_shortcode('amp-gist', 'ampforwp_gist_shortcode_generator');
|
@@ -3999,7 +3819,7 @@ function ampforwp_apply_layout_builder_on_pages($post_id) {
|
|
3999 |
}
|
4000 |
$sidebar_check = get_post_meta( $post_id,'ampforwp_custom_sidebar_select',true);
|
4001 |
|
4002 |
-
if ( $redux_builder_amp['ampforwp-content-builder'] ) {
|
4003 |
// Add Styling Builder Elements
|
4004 |
add_action('amp_post_template_css', 'ampforwp_pagebuilder_styling', 20);
|
4005 |
|
@@ -4229,7 +4049,7 @@ function ampforwp_view_nonamp(){
|
|
4229 |
}
|
4230 |
else{
|
4231 |
$ampforwp_backto_nonamp = untrailingslashit( home_url( $wp->request ) );
|
4232 |
-
$ampforwp_backto_nonamp =
|
4233 |
$ampforwp_backto_nonamp = user_trailingslashit($ampforwp_backto_nonamp);
|
4234 |
|
4235 |
if('' == $permalink_structure){
|
@@ -4274,21 +4094,7 @@ function ampforwp_post_pagination( $args = '' ) {
|
|
4274 |
|
4275 |
wp_reset_postdata();
|
4276 |
global $page, $numpages, $multipage, $more, $redux_builder_amp;
|
4277 |
-
|
4278 |
-
$id = ampforwp_get_frontpage_id();
|
4279 |
-
$content_post = get_post($id);
|
4280 |
-
$content = $content_post->post_content;
|
4281 |
-
$checker = preg_match('/<!--nextpage-->/', $content);
|
4282 |
-
if ( 1 === $checker ) {
|
4283 |
-
$multipage = $more = 1;
|
4284 |
-
$ampforwp_new_content = explode('<!--nextpage-->', $content);
|
4285 |
-
$queried_var = get_query_var('paged');
|
4286 |
-
if ( $queried_var > 1 ) {
|
4287 |
-
$page = $queried_var;
|
4288 |
-
}
|
4289 |
-
$numpages = count($ampforwp_new_content);
|
4290 |
-
}
|
4291 |
-
}
|
4292 |
$defaults = array(
|
4293 |
'before' => '<div class="ampforwp_post_pagination" ><p>' . '<span>' . ampforwp_translation($redux_builder_amp['amp-translator-page-text'], 'Page') . ':</span>',
|
4294 |
'after' => '</p></div>',
|
@@ -4382,25 +4188,14 @@ function ampforwp_post_pagination( $args = '' ) {
|
|
4382 |
function ampforwp_post_paginated_link_generator( $i ) {
|
4383 |
global $wp_rewrite;
|
4384 |
$post = get_post();
|
4385 |
-
if ( ampforwp_is_front_page() ) {
|
4386 |
-
$id = ampforwp_get_frontpage_id();
|
4387 |
-
$post = get_post($id);
|
4388 |
-
}
|
4389 |
$query_args = array();
|
4390 |
if ( 1 == $i ) {
|
4391 |
$url = get_permalink();
|
4392 |
-
if(ampforwp_is_front_page()){
|
4393 |
-
$url = get_home_url();
|
4394 |
-
}
|
4395 |
} else {
|
4396 |
-
if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
|
4397 |
$url = add_query_arg( 'page', $i, get_permalink() );
|
4398 |
-
|
4399 |
-
|
4400 |
-
}
|
4401 |
-
}
|
4402 |
-
elseif ( ampforwp_is_front_page() )
|
4403 |
-
$url = trailingslashit(get_home_url()) . user_trailingslashit("$wp_rewrite->pagination_base/" . $i, 'single_paged');
|
4404 |
else
|
4405 |
$url = trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged');
|
4406 |
}
|
@@ -4418,35 +4213,6 @@ function ampforwp_post_paginated_link_generator( $i ) {
|
|
4418 |
$url = add_query_arg(AMPFORWP_AMP_QUERY_VAR,'1',$url);
|
4419 |
return '<a href="' . esc_url( $url ) . '">';
|
4420 |
}
|
4421 |
-
// Modify the content to make Pagination work on Pages and FrontPage #2253
|
4422 |
-
add_filter('ampforwp_modify_the_content','ampforwp_post_paginated_content');
|
4423 |
-
function ampforwp_post_paginated_content($content){
|
4424 |
-
if ( is_page() || ampforwp_is_front_page() ){
|
4425 |
-
global $redux_builder_amp, $page, $multipage;
|
4426 |
-
$ampforwp_new_content = $ampforwp_the_content = $checker = '';
|
4427 |
-
$ampforwp_the_content = $content;
|
4428 |
-
$checker = preg_match('/<!--nextpage-->/', $ampforwp_the_content);
|
4429 |
-
if ( 1 === $checker ) {
|
4430 |
-
$multipage = 1;
|
4431 |
-
$ampforwp_new_content = explode('<!--nextpage-->', $ampforwp_the_content);
|
4432 |
-
$queried_var = get_query_var('page');
|
4433 |
-
if ( ampforwp_is_front_page() ) {
|
4434 |
-
$queried_var = get_query_var('paged');
|
4435 |
-
}
|
4436 |
-
if ( $queried_var > 1 ) {
|
4437 |
-
$queried_var = $queried_var -1 ;
|
4438 |
-
}
|
4439 |
-
else {
|
4440 |
-
$queried_var = 0;
|
4441 |
-
}
|
4442 |
-
return $ampforwp_new_content[$queried_var];
|
4443 |
-
}
|
4444 |
-
else {
|
4445 |
-
return $ampforwp_the_content;
|
4446 |
-
}
|
4447 |
-
}
|
4448 |
-
return $content;
|
4449 |
-
}
|
4450 |
|
4451 |
add_filter('ampforwp_modify_rel_canonical','ampforwp_modify_rel_amphtml_paginated_post');
|
4452 |
function ampforwp_modify_rel_amphtml_paginated_post($url) {
|
@@ -4629,7 +4395,7 @@ function ampforwp_add_blacklist_sanitizer($data){
|
|
4629 |
}
|
4630 |
|
4631 |
//Meta description #1013
|
4632 |
-
function ampforwp_generate_meta_desc(
|
4633 |
global $post, $redux_builder_amp;
|
4634 |
$desc = $post_id = '';
|
4635 |
if ( $redux_builder_amp['ampforwp-seo-meta-description'] ) {
|
@@ -4674,9 +4440,7 @@ function ampforwp_generate_meta_desc($json=""){
|
|
4674 |
if ( is_search() ) {
|
4675 |
$yoast_desc = addslashes( ampforwp_translation($redux_builder_amp['amp-translator-search-text'], 'You searched for:') . ' ' . get_search_query() );
|
4676 |
}
|
4677 |
-
|
4678 |
-
$yoast_desc = '';
|
4679 |
-
}
|
4680 |
if ( $yoast_desc ) {
|
4681 |
$desc = $yoast_desc;
|
4682 |
}
|
@@ -4770,22 +4534,6 @@ function is_category_amp_disabled(){
|
|
4770 |
global $redux_builder_amp;
|
4771 |
|
4772 |
if(is_archive() && $redux_builder_amp['ampforwp-archive-support']==1){
|
4773 |
-
if(is_tag() && is_array($redux_builder_amp['hide-amp-tags-bulk-option'])) {
|
4774 |
-
$all_tags = get_the_tags();
|
4775 |
-
$tagsOnPost = array();
|
4776 |
-
foreach ($all_tags as $tagskey => $tagsvalue) {
|
4777 |
-
$tagsOnPost[] = $tagsvalue->term_id;
|
4778 |
-
}
|
4779 |
-
$get_tags_checkbox = array_keys(array_filter($redux_builder_amp['hide-amp-tags-bulk-option']));
|
4780 |
-
|
4781 |
-
if( count(array_intersect($get_tags_checkbox,$tagsOnPost))>0 ){
|
4782 |
-
return true;
|
4783 |
-
}
|
4784 |
-
else{
|
4785 |
-
return false;
|
4786 |
-
}
|
4787 |
-
}//tags check area closed
|
4788 |
-
|
4789 |
$categories = get_the_category();
|
4790 |
$selected_cats = array();
|
4791 |
if ( $categories) {
|
@@ -5120,41 +4868,36 @@ function ampforwp_enable_post_and_featured_image($show_image){
|
|
5120 |
|
5121 |
return $show_image;
|
5122 |
}
|
5123 |
-
|
5124 |
// 82. Grab Featured Image from The Content
|
5125 |
-
function ampforwp_get_featured_image_from_content(
|
5126 |
global $post, $posts;
|
5127 |
-
$image_url
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5128 |
ob_start();
|
5129 |
ob_end_clean();
|
5130 |
// Match all the images from the content
|
5131 |
if(is_object($post)){
|
5132 |
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*.+width=[\'"]([^\'"]+)[\'"].*.+height=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
|
5133 |
-
// Match all the figure tags from the content
|
5134 |
-
$output_fig = preg_match_all('/\[caption.+id=[\'"]([^\'"]+).*]/i', $post->post_content, $matches_fig);
|
5135 |
-
if ( $output_fig && $matches_fig[0][0] ) {
|
5136 |
-
$output_fig_image = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*.+width=[\'"]([^\'"]+)[\'"].*.+height=[\'"]([^\'"]+)[\'"].*>(.*)\[/i', $matches_fig[0][0], $matches_fig_img);
|
5137 |
-
// Check if the first image is inside the figure and it got caption
|
5138 |
-
if ( $matches_fig_img[1][0] == $matches[1][0] && $matches_fig_img[4][0]) {
|
5139 |
-
$figure = true;
|
5140 |
-
}
|
5141 |
-
}
|
5142 |
}
|
5143 |
//Grab the First Image
|
5144 |
-
if (is_array($matches) &&
|
5145 |
$image_url = $matches[1][0];
|
5146 |
$image_html = $matches[0][0];
|
5147 |
$image_width = $matches[2][0];
|
5148 |
$image_height = $matches[3][0];
|
5149 |
// Sanitize it
|
5150 |
-
$amp_html_sanitizer = new AMPFORWP_Content( $image_html, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array()
|
5151 |
$amp_html = $amp_html_sanitizer->get_amp_content();
|
5152 |
-
// If its figure then add the figcaption inside the figure
|
5153 |
-
if ( $figure ) {
|
5154 |
-
$amp_html = $amp_html . '<figcaption class="wp-caption-text">' . esc_attr($matches_fig_img[4][0]) . '</figcaption>';
|
5155 |
-
}
|
5156 |
// Filter to remove that image from the content
|
5157 |
add_filter('ampforwp_modify_the_content','featured_image_content_filter');
|
|
|
5158 |
|
5159 |
if ( isset( $size ) && '' !== $size ) {
|
5160 |
$image_id = attachment_url_to_postid( $image_url );
|
@@ -5170,15 +4913,19 @@ function ampforwp_get_featured_image_from_content( $featured_image = "", $size="
|
|
5170 |
case 'image':
|
5171 |
$featured_image_output = $amp_html;
|
5172 |
break;
|
|
|
5173 |
case 'url':
|
5174 |
$featured_image_output = $image_url;
|
5175 |
break;
|
|
|
5176 |
case 'width':
|
5177 |
$featured_image_output = $image_width;
|
5178 |
break;
|
|
|
5179 |
case 'height':
|
5180 |
$featured_image_output = $image_height;
|
5181 |
break;
|
|
|
5182 |
default:
|
5183 |
$featured_image_output = $amp_html;
|
5184 |
break;
|
@@ -5194,10 +4941,10 @@ if( ! function_exists( 'featured_image_content_filter' ) ){
|
|
5194 |
if( $featured_image && false == $redux_builder_amp['ampforwp-duplicate-featured-image']){
|
5195 |
// Change the src to use it in the pattern
|
5196 |
$featured_image = str_replace('/', '\/', $featured_image);
|
5197 |
-
// Remove the figure (due to caption)
|
5198 |
-
$content = preg_replace('/<figure(.*)src="'.$featured_image.'"(.*?)<\/figure>/', '', $content);
|
5199 |
// Remove the amp-img
|
5200 |
-
$content = preg_replace('/<amp-img(.*)src="'.$featured_image.'"(
|
|
|
|
|
5201 |
}
|
5202 |
return $content;
|
5203 |
}
|
@@ -5299,44 +5046,44 @@ function ampforwp_inline_related_posts(){
|
|
5299 |
<span class="related-title">'.ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ).'</span>';
|
5300 |
|
5301 |
while( $my_query->have_posts() ) {
|
5302 |
-
|
5303 |
-
|
5304 |
-
|
5305 |
-
|
5306 |
-
|
5307 |
-
|
5308 |
-
|
5309 |
-
|
5310 |
-
|
5311 |
-
|
5312 |
-
|
5313 |
-
|
5314 |
|
5315 |
-
|
5316 |
|
5317 |
-
|
5318 |
-
|
5319 |
-
|
5320 |
-
|
5321 |
-
|
5322 |
-
|
5323 |
-
|
5324 |
-
|
5325 |
-
|
5326 |
-
|
5327 |
-
|
5328 |
-
|
5329 |
-
|
5330 |
-
|
5331 |
-
|
5332 |
-
|
5333 |
-
|
5334 |
-
|
5335 |
-
|
5336 |
-
|
5337 |
-
|
5338 |
-
|
5339 |
-
|
5340 |
</div>
|
5341 |
</div>';
|
5342 |
}
|
@@ -5681,11 +5428,7 @@ add_action('amp_post_template_footer','ampforwp_facebook_pixel',11);
|
|
5681 |
|
5682 |
global $redux_builder_amp;
|
5683 |
if( isset($redux_builder_amp['amp-fb-pixel']) && $redux_builder_amp['amp-fb-pixel'] ){
|
5684 |
-
$amp_pixel = '<amp-pixel';
|
5685 |
-
if(ampforwp_get_data_consent()){
|
5686 |
-
$amp_pixel .= 'data-block-on-consent';
|
5687 |
-
}
|
5688 |
-
$amp_pixel .= 'src="https://www.facebook.com/tr?id='.$redux_builder_amp['amp-fb-pixel-id'].'&ev=PageView&noscript=1"></amp-pixel>';
|
5689 |
echo $amp_pixel;
|
5690 |
|
5691 |
}
|
@@ -5707,10 +5450,6 @@ function ampforwp_addAmpLastModifiedHeader($headers) {
|
|
5707 |
// 91. Comment Author Gravatar URL
|
5708 |
if( ! function_exists('ampforwp_get_comments_gravatar') ){
|
5709 |
function ampforwp_get_comments_gravatar( $comment ) {
|
5710 |
-
global $redux_builder_amp;
|
5711 |
-
if(isset($redux_builder_amp['ampforwp-display-avatar']) && $redux_builder_amp['ampforwp-display-avatar']==0){
|
5712 |
-
return '';
|
5713 |
-
}
|
5714 |
$gravatar_exists = '';
|
5715 |
$gravatar_exists = ampforwp_gravatar_checker($comment->comment_author_email);
|
5716 |
if($gravatar_exists == true){
|
@@ -5725,18 +5464,7 @@ if ( ! function_exists('ampforwp_gravatar_checker') ) {
|
|
5725 |
function ampforwp_gravatar_checker( $email ) {
|
5726 |
// Craft a potential url and test its headers
|
5727 |
$hash = md5(strtolower(trim($email)));
|
5728 |
-
|
5729 |
-
$gravatar_server = 0;
|
5730 |
-
if ( $hash ) {
|
5731 |
-
$gravatar_server = hexdec( $hash[0] ) % 3;
|
5732 |
-
} else {
|
5733 |
-
$gravatar_server = rand( 0, 2 );
|
5734 |
-
}
|
5735 |
-
if ( is_ssl() ) {
|
5736 |
-
$uri = 'https://secure.gravatar.com/avatar/' . $hash;
|
5737 |
-
} else {
|
5738 |
-
$uri = sprintf( 'http://%d.gravatar.com/avatar/%s', $gravatar_server, $hash );
|
5739 |
-
}
|
5740 |
$headers = @get_headers($uri);
|
5741 |
// If its 404
|
5742 |
if (!preg_match("|200|", $headers[0])) {
|
@@ -5787,82 +5515,79 @@ if( ! function_exists( 'ampforwp_view_amp_admin_bar' ) ) {
|
|
5787 |
}
|
5788 |
//93. added AMP url purifire for amphtml
|
5789 |
function ampforwp_url_purifier($url){
|
5790 |
-
|
5791 |
-
|
5792 |
-
|
5793 |
-
|
5794 |
-
|
5795 |
-
|
5796 |
-
|
5797 |
-
|
5798 |
-
|
5799 |
-
|
5800 |
-
|
5801 |
-
|
5802 |
-
|
5803 |
-
|
5804 |
-
|
5805 |
-
|
5806 |
-
|
5807 |
-
|
5808 |
-
|
5809 |
-
|
5810 |
-
|
5811 |
-
|
5812 |
-
|
|
|
5813 |
}
|
5814 |
-
}
|
5815 |
-
if ( is_archive() ) {
|
5816 |
-
|
5817 |
if ( is_archive() ) {
|
5818 |
-
|
5819 |
-
|
5820 |
-
|
5821 |
-
|
5822 |
-
|
5823 |
-
|
5824 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5825 |
}
|
5826 |
-
if (
|
5827 |
-
$
|
|
|
|
|
|
|
|
|
|
|
5828 |
}
|
5829 |
-
|
5830 |
-
$url = add_query_arg($queried_var,$quried_value, $url);
|
5831 |
-
//$url = $url .'&'. $queried_var .'='. $quried_value;
|
5832 |
-
}
|
5833 |
-
/*if ( is_home() && get_query_var('paged') > 1 ) {
|
5834 |
-
$quried_value = get_query_var('paged');
|
5835 |
-
$url = add_query_arg('paged',$quried_value, $url);
|
5836 |
-
if ( get_query_var('page_id') == ampforwp_get_blog_details('id') ) {
|
5837 |
$quried_value2 = get_query_var('page_id');
|
5838 |
$url = add_query_arg('page_id',$quried_value2, $url);
|
5839 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5840 |
}
|
5841 |
-
elseif ( is_home() && get_query_var('paged') < 1 && get_query_var('page_id') == ampforwp_get_blog_details('id') ) {
|
5842 |
-
$quried_value2 = get_query_var('page_id');
|
5843 |
-
$url = add_query_arg('page_id',$quried_value2, $url);
|
5844 |
-
}*/
|
5845 |
-
} else {
|
5846 |
-
if ( is_singular() && true == $checker ) {
|
5847 |
-
$url = untrailingslashit($url);
|
5848 |
-
}
|
5849 |
-
if ( is_home() || is_archive() || is_front_page() ) {
|
5850 |
-
if ( is_archive() && get_query_var('paged') > 1 || is_home() && get_query_var('paged') > 1 ) {
|
5851 |
-
if ( true == $checker )
|
5852 |
-
$url = trailingslashit($url).$endpointq;
|
5853 |
-
else
|
5854 |
-
$url = user_trailingslashit( trailingslashit($url) );
|
5855 |
-
} else {
|
5856 |
-
if ( true == $checker )
|
5857 |
-
$url = trailingslashit($url) . $endpointq;
|
5858 |
-
else
|
5859 |
-
$url = user_trailingslashit( trailingslashit($url) . $endpoint );
|
5860 |
-
}
|
5861 |
-
}
|
5862 |
-
}
|
5863 |
-
if ( is_singular() && !empty($_SERVER['QUERY_STRING']) ) {
|
5864 |
-
$url = add_query_arg( $_SERVER['QUERY_STRING'], '', $url);
|
5865 |
-
}
|
5866 |
return $url;
|
5867 |
}
|
5868 |
|
@@ -6015,7 +5740,7 @@ function ampforwp_is_front_page(){
|
|
6015 |
return true;
|
6016 |
|
6017 |
// TRUE: When we have " A static page" in reading settings and custom frontpage in amp
|
6018 |
-
if ( 'page' == get_option( 'show_on_front') &&
|
6019 |
|
6020 |
$current_page = get_queried_object();
|
6021 |
if ( $current_page ) {
|
@@ -6050,7 +5775,7 @@ function ampforwp_is_blog(){
|
|
6050 |
// Polylang frontpage
|
6051 |
function ampforwp_polylang_front_page() {
|
6052 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
6053 |
-
if( is_plugin_active( 'polylang/polylang.php' )
|
6054 |
global $polylang;
|
6055 |
$page_id = $polylang->curlang->page_on_front;
|
6056 |
$frontpage_id = get_option('page_on_front');
|
@@ -6084,7 +5809,6 @@ if( ! function_exists( 'ampforwp_full_post_date_loops' ) ){
|
|
6084 |
$full_date = $redux_builder_amp['ampforwp-post-date-format-text'];
|
6085 |
// Change the % days into the actual number of days
|
6086 |
$full_date = str_replace('% days', $date, $full_date);
|
6087 |
-
$full_date = str_replace('ago', ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago'), $full_date);
|
6088 |
}
|
6089 |
}
|
6090 |
}
|
@@ -6475,9 +6199,6 @@ function ampforwp_is_non_amp( $type="" ) {
|
|
6475 |
if ( is_home() && false == $redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
|
6476 |
return false;
|
6477 |
}
|
6478 |
-
if ( is_front_page() && false == $redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
|
6479 |
-
return false;
|
6480 |
-
}
|
6481 |
if ( is_feed() ) {
|
6482 |
return false;
|
6483 |
}
|
@@ -6523,7 +6244,7 @@ function ampforwp_end_point_controller( $url, $check='' ) {
|
|
6523 |
|
6524 |
// Allow AMP Components in "The Content" #1588
|
6525 |
// Check for amp-components in the_content
|
6526 |
-
|
6527 |
if ( ! function_exists('ampforwp_amp_component_checker') ) {
|
6528 |
function ampforwp_amp_component_checker( $content ) {
|
6529 |
if ( function_exists('ampforwp_is_amp_endpoint') && ampforwp_is_amp_endpoint() ) {
|
@@ -6546,7 +6267,7 @@ if ( ! function_exists('ampforwp_amp_component_checker') ) {
|
|
6546 |
else
|
6547 |
return $content;
|
6548 |
}
|
6549 |
-
}
|
6550 |
|
6551 |
// Remove wpautop from specific posts which contain amp-components
|
6552 |
add_action('pre_amp_render_post','ampforwp_custom_wpautop');
|
@@ -6570,7 +6291,30 @@ function ampforwp_custom_wpautop(){
|
|
6570 |
// }
|
6571 |
//}
|
6572 |
// Get the AMP components
|
6573 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6574 |
|
6575 |
// Backward Compatibility for AMP Preview #1529
|
6576 |
if ( ! function_exists('get_preview_post_link') ) {
|
@@ -6826,15 +6570,19 @@ if ( ! function_exists('ampforwp_gdpr_data') ) {
|
|
6826 |
function ampforwp_gdpr_data( $data ) {
|
6827 |
global $redux_builder_amp;
|
6828 |
if ( empty( $data['amp_component_scripts']['amp-consent'] ) ) {
|
6829 |
-
|
6830 |
}
|
6831 |
if ( empty( $data['amp_component_scripts']['amp-form'] ) ) {
|
6832 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6833 |
}
|
6834 |
-
if ( empty( $data['amp_component_scripts']['amp-geo'] ) ) {
|
6835 |
-
$data['amp_component_scripts']['amp-geo'] = 'https://cdn.ampproject.org/v0/amp-geo-0.1.js';
|
6836 |
-
}
|
6837 |
-
|
6838 |
return $data;
|
6839 |
}
|
6840 |
}
|
@@ -6860,25 +6608,72 @@ if ( ! function_exists('ampforwp_gdpr_amp_consent') ) {
|
|
6860 |
if(isset($redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text']) && $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text']){
|
6861 |
$privacy_button_text = $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text'];
|
6862 |
}
|
6863 |
-
$gdpr_countries = array("AT","BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT", "LU", "MT", "NL", "NO", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "GB", "AX", "IC", "EA", "GF", "PF", "TF", "GI", "GP", "GG", "JE", "MQ", "YT", "NC", "RE", "BL", "MF", "PM", "SJ", "VA", "WF", "EZ", "CH");
|
6864 |
-
$gdpr_countries = apply_filters( 'ampforwp_gdpr_country_list' , $gdpr_countries );
|
6865 |
-
?>
|
6866 |
|
6867 |
-
|
6868 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6869 |
{
|
|
|
6870 |
"ISOCountryGroups": {
|
6871 |
-
|
6872 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6873 |
}
|
6874 |
-
|
6875 |
-
|
6876 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6877 |
<amp-consent id="ampforwpConsent" layout="nodisplay">
|
6878 |
<script type="application/json">{
|
6879 |
"consents": {
|
6880 |
"consent1": {
|
6881 |
-
"
|
6882 |
"promptUI": "gdpr_c"
|
6883 |
}
|
6884 |
},
|
@@ -6915,16 +6710,18 @@ if ( ! function_exists('ampforwp_gdpr_amp_consent') ) {
|
|
6915 |
</amp-consent>
|
6916 |
|
6917 |
<?php }
|
6918 |
-
|
6919 |
}
|
6920 |
|
6921 |
// AMP GDPR compliancy Styling
|
6922 |
if ( ! function_exists('ampforwp_gdpr_css') ) {
|
6923 |
function ampforwp_gdpr_css(){
|
6924 |
global $redux_builder_amp;
|
|
|
|
|
|
|
6925 |
// GDPR popup Design
|
6926 |
if($redux_builder_amp['gdpr-type'] == '1'){?>
|
6927 |
-
|
6928 |
.gdpr{position: fixed; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.7);color: #333;z-index:9999999;line-height:1.3}
|
6929 |
.gdpr_w{padding: 2rem;background: #fff;max-width: 700px;width: 95%;position: relative;margin: 5% auto;text-align: center;}
|
6930 |
.gdpr_t{margin-bottom:15px;}
|
@@ -7063,6 +6860,13 @@ if ( ! function_exists('ampforwp_gdpr_css') ) {
|
|
7063 |
}
|
7064 |
}
|
7065 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7066 |
// Consent Submission
|
7067 |
add_action('wp_ajax_amp_consent_submission','amp_consent_submission');
|
7068 |
add_action('wp_ajax_nopriv_amp_consent_submission','amp_consent_submission');
|
@@ -7098,232 +6902,4 @@ if ( ! function_exists('ampforwp_skip_thrive_leads') ) {
|
|
7098 |
|
7099 |
return $skip;
|
7100 |
}
|
7101 |
-
}
|
7102 |
-
|
7103 |
-
// Re-save permalink once the post value changed in Redading Settings #2190
|
7104 |
-
|
7105 |
-
add_action( 'update_option', 'ampforwp_resave_permalink', 10, 3 );
|
7106 |
-
function ampforwp_resave_permalink( $option, $old_value, $value ){
|
7107 |
-
if('posts_per_page' === $option){
|
7108 |
-
if($old_value != $value){
|
7109 |
-
delete_transient( 'ampforwp_current_version_check' );
|
7110 |
-
}
|
7111 |
-
}
|
7112 |
-
}
|
7113 |
-
|
7114 |
-
// Canonical From Yoast #2118 and All in One SEO #1720
|
7115 |
-
function ampforwp_generate_canonical(){
|
7116 |
-
global $redux_builder_amp;
|
7117 |
-
$canonical = '';
|
7118 |
-
$canonical = $WPSEO_Frontend = $All_in_One_SEO_Pack = $opts = '';
|
7119 |
-
if ( isset($redux_builder_amp['ampforwp-seo-yoast-canonical']) && true == $redux_builder_amp['ampforwp-seo-yoast-canonical'] && class_exists('WPSEO_Frontend') ) {
|
7120 |
-
$WPSEO_Frontend = WPSEO_Frontend::get_instance();
|
7121 |
-
$canonical = $WPSEO_Frontend->canonical(false);
|
7122 |
-
}
|
7123 |
-
elseif ( isset($redux_builder_amp['ampforwp-seo-aioseo-canonical']) && true == $redux_builder_amp['ampforwp-seo-aioseo-canonical'] && class_exists('All_in_One_SEO_Pack') ) {
|
7124 |
-
$All_in_One_SEO_Pack = new All_in_One_SEO_Pack();
|
7125 |
-
$opts = $All_in_One_SEO_Pack->get_current_options( array(), 'aiosp' );
|
7126 |
-
$canonical = $opts['aiosp_custom_link'];
|
7127 |
-
}
|
7128 |
-
return $canonical;
|
7129 |
-
}
|
7130 |
-
add_filter('amp_post_template_data', 'ampforwp_modified_canonical', 85);
|
7131 |
-
function ampforwp_modified_canonical( $data ) {
|
7132 |
-
$canonical = '';
|
7133 |
-
$canonical = ampforwp_generate_canonical();
|
7134 |
-
if ( !empty($canonical) ) {
|
7135 |
-
$data['canonical_url'] = $canonical;
|
7136 |
-
}
|
7137 |
-
return $data;
|
7138 |
-
}
|
7139 |
-
|
7140 |
-
function ampforwp_get_data_consent(){
|
7141 |
-
global $redux_builder_amp;
|
7142 |
-
$dboc = false;
|
7143 |
-
$is_dboc = '';
|
7144 |
-
if(isset($redux_builder_amp['amp-gdpr-compliance-switch']) && $redux_builder_amp['amp-gdpr-compliance-switch'] ){
|
7145 |
-
|
7146 |
-
$dboc = true;
|
7147 |
-
}
|
7148 |
-
return $dboc;
|
7149 |
-
}
|
7150 |
-
|
7151 |
-
function ampforwp_amp_consent_check($attrs){
|
7152 |
-
|
7153 |
-
if( ampforwp_get_data_consent() ){
|
7154 |
-
$attrs['data-block-on-consent'] = '';
|
7155 |
-
}
|
7156 |
-
$attrs = apply_filters( 'ampforwp_embedd_attrs_handler', $attrs );
|
7157 |
-
return $attrs;
|
7158 |
-
}
|
7159 |
-
// #2220 Remove Space Shortcode by Pro Theme from THEMCO
|
7160 |
-
add_action('pre_amp_render_post','ampforwp_remove_space_shortcodes');
|
7161 |
-
function ampforwp_remove_space_shortcodes(){
|
7162 |
-
add_filter('the_content','ampforwp_remove_pro_theme_space_shortcodes');
|
7163 |
-
}
|
7164 |
-
|
7165 |
-
function ampforwp_remove_pro_theme_space_shortcodes($content){
|
7166 |
-
if(has_shortcode( $content, 'gap' )){
|
7167 |
-
remove_shortcode( 'gap' );
|
7168 |
-
// to remove the useless shortcode from the AMP Content
|
7169 |
-
add_shortcode( 'gap', 'ampforwp_return_no_gap' );
|
7170 |
-
}
|
7171 |
-
return $content;
|
7172 |
-
}
|
7173 |
-
|
7174 |
-
function ampforwp_return_no_gap(){
|
7175 |
-
return;
|
7176 |
-
}
|
7177 |
-
|
7178 |
-
/*
|
7179 |
-
#2229 Function to check the option for comments to display on post, page or both.
|
7180 |
-
*/
|
7181 |
-
function ampforwp_get_comments_status(){
|
7182 |
-
global $redux_builder_amp;
|
7183 |
-
$display_comments_on = "";
|
7184 |
-
if ( (isset($redux_builder_amp['ampforwp-display-on-pages']) && $redux_builder_amp['ampforwp-display-on-pages']==false ) && (isset($redux_builder_amp['ampforwp-display-on-posts']) && $redux_builder_amp['ampforwp-display-on-posts']==true ) ) {
|
7185 |
-
$display_comments_on = is_single();
|
7186 |
-
}
|
7187 |
-
if ( (isset($redux_builder_amp['ampforwp-display-on-pages']) && $redux_builder_amp['ampforwp-display-on-pages']==true ) && (isset($redux_builder_amp['ampforwp-display-on-posts']) && $redux_builder_amp['ampforwp-display-on-posts']==false ) ) {
|
7188 |
-
$display_comments_on = is_page();
|
7189 |
-
}
|
7190 |
-
if ( (isset($redux_builder_amp['ampforwp-display-on-pages']) && $redux_builder_amp['ampforwp-display-on-pages']==true ) && (isset($redux_builder_amp['ampforwp-display-on-posts']) && $redux_builder_amp['ampforwp-display-on-posts']==true ) ) {
|
7191 |
-
$display_comments_on = is_singular();
|
7192 |
-
}
|
7193 |
-
$display_comments_on = apply_filters('ampforwp_comments_visibility', $display_comments_on);
|
7194 |
-
return $display_comments_on;
|
7195 |
-
}
|
7196 |
-
|
7197 |
-
// Vuukle Comments Support #2075
|
7198 |
-
|
7199 |
-
add_action('ampforwp_post_after_design_elements','ampforwp_vuukle_comments_support');
|
7200 |
-
function ampforwp_vuukle_comments_support() {
|
7201 |
-
global $redux_builder_amp;
|
7202 |
-
if ( 4 != $redux_builder_amp['amp-design-selector']
|
7203 |
-
&& isset($redux_builder_amp['ampforwp-vuukle-comments-support'])
|
7204 |
-
&& $redux_builder_amp['ampforwp-vuukle-comments-support']==1
|
7205 |
-
&& comments_open()
|
7206 |
-
) {
|
7207 |
-
echo ampforwp_vuukle_comments_markup();
|
7208 |
-
}
|
7209 |
-
}
|
7210 |
-
function ampforwp_vuukle_comments_markup() {
|
7211 |
-
global $redux_builder_amp;
|
7212 |
-
$apiKey = $locale = '';
|
7213 |
-
if( isset($redux_builder_amp['ampforwp-vuukle-comments-apiKey']) && $redux_builder_amp['ampforwp-vuukle-comments-apiKey'] !== ""){
|
7214 |
-
$apiKey = $redux_builder_amp['ampforwp-vuukle-comments-apiKey'];
|
7215 |
-
}
|
7216 |
-
$display_comments_on = false;
|
7217 |
-
$display_comments_on = ampforwp_get_comments_status();
|
7218 |
-
|
7219 |
-
$srcUrl = 'https://cdn.vuukle.com/amp.html?';
|
7220 |
-
$srcUrl = add_query_arg('url' ,get_permalink(), $srcUrl);
|
7221 |
-
$srcUrl = add_query_arg('host' ,site_url(), $srcUrl);
|
7222 |
-
$srcUrl = add_query_arg('id' , $post->ID, $srcUrl);
|
7223 |
-
$srcUrl = add_query_arg('apiKey' , $apiKey, $srcUrl);
|
7224 |
-
$srcUrl = add_query_arg('title' , $post->post_title, $srcUrl);
|
7225 |
-
|
7226 |
-
$vuukle_html ='';
|
7227 |
-
if ( $display_comments_on ) {
|
7228 |
-
$vuukle_html .= '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.$srcUrl.'">
|
7229 |
-
|
7230 |
-
<div overflow tabindex="0" role="button" aria-label="Show comments" class="afwp-vuukle-support">Show comments</div>';
|
7231 |
-
}
|
7232 |
-
return $vuukle_html;
|
7233 |
-
}
|
7234 |
-
add_filter( 'amp_post_template_data', 'ampforwp_add_vuukle_scripts' );
|
7235 |
-
function ampforwp_add_vuukle_scripts( $data ) {
|
7236 |
-
global $redux_builder_amp;
|
7237 |
-
$display_comments_on = "";
|
7238 |
-
$display_comments_on = ampforwp_get_comments_status();
|
7239 |
-
if ( 4 != $redux_builder_amp['amp-design-selector']
|
7240 |
-
&& isset($redux_builder_amp['ampforwp-vuukle-comments-support'])
|
7241 |
-
&& $redux_builder_amp['ampforwp-vuukle-comments-support']
|
7242 |
-
&& $display_comments_on && comments_open()
|
7243 |
-
) {
|
7244 |
-
if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
|
7245 |
-
$data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
|
7246 |
-
}
|
7247 |
-
if ($redux_builder_amp['ampforwp-vuukle-Ads-before-comments']==1
|
7248 |
-
&& empty( $data['amp_component_scripts']['amp-ad'] ) ) {
|
7249 |
-
$data['amp_component_scripts']['amp-ad'] = 'https://cdn.ampproject.org/v0/amp-ad-0.1.js';
|
7250 |
-
}
|
7251 |
-
}
|
7252 |
-
return $data;
|
7253 |
-
}
|
7254 |
-
//spotim #2076
|
7255 |
-
add_action('ampforwp_post_after_design_elements','ampforwp_spotim_comments_support');
|
7256 |
-
function ampforwp_spotim_comments_support() {
|
7257 |
-
global $redux_builder_amp;
|
7258 |
-
if ( 4 != $redux_builder_amp['amp-design-selector']
|
7259 |
-
&& isset($redux_builder_amp['ampforwp-spotim-comments-support'])
|
7260 |
-
&& $redux_builder_amp['ampforwp-spotim-comments-support']==1
|
7261 |
-
) {
|
7262 |
-
echo ampforwp_spotim_comments_markup();
|
7263 |
-
echo "called";die;
|
7264 |
-
}
|
7265 |
-
}
|
7266 |
-
function ampforwp_spotim_comments_markup() {
|
7267 |
-
global $post, $redux_builder_amp;
|
7268 |
-
$display_comments_on = false;
|
7269 |
-
$display_comments_on = ampforwp_get_comments_status();
|
7270 |
-
if (! $display_comments_on ) {
|
7271 |
-
return '';
|
7272 |
-
}
|
7273 |
-
$spotId ='';
|
7274 |
-
if( isset($redux_builder_amp['ampforwp-spotim-comments-apiKey']) && $redux_builder_amp['ampforwp-spotim-comments-apiKey'] !== ""){
|
7275 |
-
$spotId = $redux_builder_amp['ampforwp-spotim-comments-apiKey'];
|
7276 |
-
}
|
7277 |
-
$srcUrl = 'https://amp.spot.im/production.html?';
|
7278 |
-
$srcUrl = add_query_arg('spotId' ,get_permalink(), $srcUrl);
|
7279 |
-
$srcUrl = add_query_arg('postId' , $post->ID, $srcUrl);
|
7280 |
-
$spotim_html = '<amp-iframe width="375" height="815" resizable sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation" layout="responsive"
|
7281 |
-
frameborder="0" src="'.$srcUrl.'">
|
7282 |
-
<amp-img placeholder height="815" layout="fill" src="//amp.spot.im/loader.png"></amp-img>
|
7283 |
-
<div overflow class="spot-im-amp-overflow" tabindex="0" role="button" aria-label="Read more">Load more...</div>
|
7284 |
-
</amp-iframe>';
|
7285 |
-
return $spotim_html;
|
7286 |
-
}
|
7287 |
-
//spotim script
|
7288 |
-
add_filter( 'amp_post_template_data', 'ampforwp_add_spotim_scripts' );
|
7289 |
-
function ampforwp_add_spotim_scripts( $data ) {
|
7290 |
-
global $redux_builder_amp;
|
7291 |
-
$display_comments_on = "";
|
7292 |
-
$display_comments_on = ampforwp_get_comments_status();
|
7293 |
-
if ( 4 != $redux_builder_amp['amp-design-selector']
|
7294 |
-
&& isset($redux_builder_amp['ampforwp-spotim-comments-support'])
|
7295 |
-
&& $redux_builder_amp['ampforwp-spotim-comments-support']
|
7296 |
-
&& $display_comments_on && comments_open()
|
7297 |
-
) {
|
7298 |
-
if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
|
7299 |
-
$data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
|
7300 |
-
}
|
7301 |
-
}
|
7302 |
-
return $data;
|
7303 |
-
}
|
7304 |
-
//spotim css
|
7305 |
-
add_action('amp_post_template_css','ampforwp_spotim_vuukle_styling',60);
|
7306 |
-
function ampforwp_spotim_vuukle_styling(){
|
7307 |
-
global $redux_builder_amp;
|
7308 |
-
$display_comments_on = "";
|
7309 |
-
$display_comments_on = ampforwp_get_comments_status();
|
7310 |
-
if ( isset($redux_builder_amp['ampforwp-spotim-comments-support'])
|
7311 |
-
&& $redux_builder_amp['ampforwp-spotim-comments-support']
|
7312 |
-
&& $display_comments_on && comments_open() ) {
|
7313 |
-
?>.spot-im-amp-overflow {
|
7314 |
-
background: white;
|
7315 |
-
font-size: 15px;
|
7316 |
-
padding: 15px 0;
|
7317 |
-
text-align: center;
|
7318 |
-
font-family: Helvetica, Arial, sans-serif;
|
7319 |
-
color: #307fe2;
|
7320 |
-
}<?php
|
7321 |
-
}
|
7322 |
-
if ( isset($redux_builder_amp['ampforwp-vuukle-comments-support'])
|
7323 |
-
&& $redux_builder_amp['ampforwp-vuukle-comments-support']
|
7324 |
-
&& $display_comments_on && comments_open() ) { ?>
|
7325 |
-
.afwp-vuukle-support{
|
7326 |
-
display: block;text-align: center;background: #1f87e5;color: #fff;border-radius: 4px;
|
7327 |
-
} <?php
|
7328 |
-
}
|
7329 |
}
|
236 |
return;
|
237 |
}
|
238 |
}
|
|
|
|
|
|
|
|
|
239 |
// #872 no-amphtml if selected as hide from settings
|
240 |
if(is_archive() && $redux_builder_amp['ampforwp-archive-support']){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
$selected_cats = array();
|
242 |
$categories = get_the_category();
|
243 |
if ( $categories ) {
|
414 |
|
415 |
if ( 'single' === $type ) {
|
416 |
// Homepage and FrontPage
|
417 |
+
if ( is_home() ) {
|
418 |
|
419 |
+
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/index.php';
|
420 |
+
|
421 |
+
if ( ampforwp_is_blog() ) {
|
422 |
+
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/index.php';
|
423 |
+
}
|
424 |
+
}
|
425 |
|
426 |
if ( ampforwp_is_front_page() || ( true == $redux_builder_amp['ampforwp-amp-takeover'] && is_front_page() && $redux_builder_amp['amp-frontpage-select-option']) ) {
|
427 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
|
433 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/archive.php';
|
434 |
}
|
435 |
// Search pages
|
436 |
+
if ( is_search() &&
|
437 |
+
( $redux_builder_amp['amp-design-1-search-feature'] ||
|
438 |
+
$redux_builder_amp['amp-design-2-search-feature'] ||
|
439 |
+
$redux_builder_amp['amp-design-3-search-feature'] )
|
440 |
+
) {
|
441 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/search.php';
|
442 |
}
|
443 |
// 404 Pages #2042
|
459 |
if ( 'single' === $type && ampforwp_polylang_front_page() && true == $redux_builder_amp['amp-frontpage-select-option'] ) {
|
460 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
|
461 |
}
|
462 |
+
|
463 |
return $file;
|
464 |
}
|
465 |
|
533 |
add_filter('amp_post_template_data','ampforwp_add_amp_social_share_script', 20);
|
534 |
function ampforwp_add_amp_social_share_script( $data ){
|
535 |
global $redux_builder_amp;
|
536 |
+
$social_check = false;
|
|
|
|
|
|
|
537 |
if ( '4' === $redux_builder_amp['amp-design-selector'] ) {
|
538 |
$social_check = true;
|
539 |
}
|
541 |
$social_check = true;
|
542 |
}
|
543 |
if( $redux_builder_amp['enable-single-social-icons'] == true || defined('AMPFORWP_DM_SOCIAL_CHECK') && AMPFORWP_DM_SOCIAL_CHECK === 'true' ) {
|
544 |
+
if( is_single() && is_socialshare_or_socialsticky_enabled_in_ampforwp() ) {
|
545 |
if ( empty( $data['amp_component_scripts']['amp-social-share'] ) ) {
|
546 |
$data['amp_component_scripts']['amp-social-share'] = 'https://cdn.ampproject.org/v0/amp-social-share-0.1.js';
|
547 |
}
|
549 |
}
|
550 |
|
551 |
// Facebook Like Script
|
552 |
+
if( true == $redux_builder_amp['ampforwp-facebook-like-button'] && is_single() && $social_check && (! checkAMPforPageBuilderStatus( get_the_ID() ) ) ){
|
553 |
if(empty($data['amp_component_scripts']['amp-facebook-like'])){
|
554 |
$data['amp_component_scripts']['amp-facebook-like'] = 'https://cdn.ampproject.org/v0/amp-facebook-like-0.1.js';
|
555 |
}
|
602 |
function ampforwp_footer() {
|
603 |
global $redux_builder_amp; ?>
|
604 |
<!--Plugin Version :<?php echo (AMPFORWP_VERSION); ?> -->
|
605 |
+
<?php if($redux_builder_amp['amp-enable-notifications'] == true) { ?>
|
606 |
<!-- Thanks to @nicholasgriffintn for Cookie Notification Code-->
|
607 |
<amp-user-notification layout=nodisplay id="amp-user-notification1">
|
608 |
<p><?php echo $redux_builder_amp['amp-notification-text']; ?> </p>
|
622 |
function ampforwp_header_advert() {
|
623 |
global $redux_builder_amp;
|
624 |
$optimize = '';
|
|
|
|
|
625 |
$post_id = get_the_ID();
|
626 |
if ( ampforwp_is_front_page() ) {
|
627 |
$post_id = ampforwp_get_frontpage_id();
|
665 |
$advert_height = '320';
|
666 |
}
|
667 |
$output = '<div class="amp-ad-wrapper amp_ad_1">';
|
668 |
+
$output .= '<amp-ad class="amp-ad-1" data-block-on-consent
|
669 |
type="adsense" '. $optimize .'
|
670 |
width='. $advert_width .' height='. $advert_height . '
|
671 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-1'].'"
|
672 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-1'] .'"';
|
|
|
|
|
|
|
673 |
if ( $responsive ) {
|
674 |
$output .= 'data-auto-format="rspv"
|
675 |
data-full-width>';
|
690 |
function ampforwp_footer_advert() {
|
691 |
global $redux_builder_amp;
|
692 |
$optimize = '';
|
|
|
|
|
693 |
$post_id = get_the_ID();
|
694 |
if ( ampforwp_is_front_page() ) {
|
695 |
$post_id = ampforwp_get_frontpage_id();
|
733 |
$advert_height = '320';
|
734 |
}
|
735 |
$output = '<div class="amp-ad-wrapper amp_ad_2">';
|
736 |
+
$output .= '<amp-ad class="amp-ad-2" data-block-on-consent
|
737 |
type="adsense" '. $optimize .'
|
738 |
width='. $advert_width .' height='. $advert_height . '
|
739 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-2'].'"
|
740 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-2'] .'"';
|
|
|
|
|
|
|
741 |
if ( $responsive ) {
|
742 |
$output .= 'data-auto-format="rspv"
|
743 |
data-full-width>';
|
759 |
function ampforwp_before_post_content_advert() {
|
760 |
global $redux_builder_amp;
|
761 |
$optimize = '';
|
|
|
|
|
|
|
|
|
762 |
$post_id = get_the_ID();
|
763 |
// If page builder is enabled then 'Return' and show no ads
|
764 |
if ( checkAMPforPageBuilderStatus( $post_id ) ) {
|
771 |
$client_id = $redux_builder_amp['enable-amp-ads-text-feild-client-3'];
|
772 |
$data_slot = $redux_builder_amp['enable-amp-ads-text-feild-slot-3'];
|
773 |
$optimize = ampforwp_ad_optimize();
|
774 |
+
if ( isset($redux_builder_amp['enable-amp-ads-3']) && true == $redux_builder_amp['enable-amp-ads-3'] && is_single() ) {
|
775 |
+
if($redux_builder_amp['enable-amp-ads-select-3'] == 1) {
|
776 |
+
$advert_width = '300';
|
777 |
+
$advert_height = '250';
|
778 |
+
} elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 2) {
|
779 |
+
$advert_width = '336';
|
780 |
+
$advert_height = '280';
|
781 |
+
} elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 3) {
|
782 |
+
$advert_width = '728';
|
783 |
+
$advert_height = '90';
|
784 |
+
} elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 4) {
|
785 |
+
$advert_width = '300';
|
786 |
+
$advert_height = '600';
|
787 |
+
} elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 5) {
|
788 |
+
$advert_width = '320';
|
789 |
+
$advert_height = '100';
|
790 |
+
} elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 6) {
|
791 |
+
$advert_width = '200';
|
792 |
+
$advert_height = '50';
|
793 |
+
} elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 7) {
|
794 |
+
$advert_width = '320';
|
795 |
+
$advert_height = '50';
|
796 |
+
}
|
797 |
+
if ( $responsive ) {
|
798 |
+
$advert_width = '100vw';
|
799 |
+
$advert_height = '320';
|
800 |
+
}
|
801 |
+
$output = '<div class="amp-ad-wrapper amp_ad_3">';
|
802 |
+
$output .= '<amp-ad class="amp-ad-3" data-block-on-consent
|
803 |
+
type="adsense" '. $optimize .'
|
804 |
+
width='. $advert_width .' height='. $advert_height . '
|
805 |
+
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-3'].'"
|
806 |
+
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-3'] .'"';
|
807 |
+
if ( $responsive ) {
|
808 |
+
$output .= 'data-auto-format="rspv"
|
809 |
+
data-full-width>';
|
810 |
+
$output .= '<div overflow></div></amp-ad>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
811 |
}
|
812 |
+
else
|
813 |
+
$output .= '></amp-ad>';
|
814 |
+
$output .= ampforwp_ads_sponsorship();
|
815 |
+
$output .= ' </div>';
|
816 |
+
$output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
|
817 |
+
echo $output;
|
818 |
}
|
819 |
}
|
820 |
|
826 |
global $redux_builder_amp;
|
827 |
$optimize = '';
|
828 |
$post_id = get_the_ID();
|
|
|
|
|
829 |
// If page builder is enabled then 'Return' and show no ads
|
830 |
if ( checkAMPforPageBuilderStatus( $post_id ) ) {
|
831 |
return;
|
865 |
$advert_height = '320';
|
866 |
}
|
867 |
$output = '<div class="amp-ad-wrapper amp_ad_4">';
|
868 |
+
$output .= '<amp-ad class="amp-ad-4" data-block-on-consent
|
869 |
type="adsense" '. $optimize .'
|
870 |
width='. $advert_width .' height='. $advert_height . '
|
871 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-4'].'"
|
872 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-4'] .'"';
|
|
|
|
|
|
|
873 |
if ( $responsive ) {
|
874 |
$output .= 'data-auto-format="rspv"
|
875 |
data-full-width>';
|
892 |
function ampforwp_below_the_title_advert() {
|
893 |
global $redux_builder_amp;
|
894 |
$optimize = '';
|
|
|
|
|
895 |
$post_id = get_the_ID();
|
896 |
// If page builder is enabled then 'Return' and show no ads
|
897 |
if ( checkAMPforPageBuilderStatus( $post_id ) ) {
|
932 |
$advert_height = '320';
|
933 |
}
|
934 |
$output = '<div class="amp-ad-wrapper amp_ad_5">';
|
935 |
+
$output .= '<amp-ad class="amp-ad-5" data-block-on-consent
|
936 |
type="adsense" '. $optimize .'
|
937 |
width='. $advert_width .' height='. $advert_height . '
|
938 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-5'].'"
|
939 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-5'] .'"';
|
|
|
|
|
|
|
940 |
if ( $responsive ) {
|
941 |
$output .= 'data-auto-format="rspv"
|
942 |
data-full-width>';
|
960 |
function ampforwp_above_related_post_advert() {
|
961 |
global $redux_builder_amp;
|
962 |
$optimize = '';
|
|
|
|
|
963 |
$post_id = get_the_ID();
|
964 |
// If page builder is enabled then 'Return' and show no ads
|
965 |
if ( checkAMPforPageBuilderStatus( $post_id ) ) {
|
1000 |
$advert_height = '320';
|
1001 |
}
|
1002 |
$output = '<div class="amp-ad-wrapper amp_ad_6">';
|
1003 |
+
$output .= '<amp-ad class="amp-ad-6" data-block-on-consent
|
1004 |
type="adsense" '. $optimize .'
|
1005 |
width='. $advert_width .' height='. $advert_height . '
|
1006 |
data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-6'].'"
|
1007 |
data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-6'] .'"';
|
|
|
|
|
|
|
1008 |
if ( $responsive ) {
|
1009 |
$output .= 'data-auto-format="rspv"
|
1010 |
data-full-width>';
|
1050 |
$ga_account = str_replace(' ', '', $ga_account);
|
1051 |
$ga_fields = array(
|
1052 |
'vars'=>array(
|
1053 |
+
'account'=>$ga_account
|
1054 |
),
|
1055 |
'triggers'=> array(
|
1056 |
'trackPageview'=> array(
|
1059 |
)
|
1060 |
)
|
1061 |
);
|
|
|
|
|
|
|
1062 |
$ampforwp_ga_fields = json_encode( $ga_fields);
|
1063 |
$ampforwp_ga_fields = apply_filters('ampforwp_advance_google_analytics', $ampforwp_ga_fields );
|
1064 |
?>
|
1065 |
+
<amp-analytics data-block-on-consent type="googleanalytics" id="analytics1">
|
1066 |
<script type="application/json">
|
1067 |
<?php echo $ampforwp_ga_fields; ?>
|
1068 |
</script>
|
1072 |
|
1073 |
// 10.2 Analytics Support added for segment.com
|
1074 |
if ( true == $redux_builder_amp['ampforwp-Segment-switch'] ) { ?>
|
1075 |
+
<amp-analytics data-block-on-consent type="segment">
|
1076 |
<script type="application/json">
|
1077 |
{
|
1078 |
"vars": {
|
1087 |
|
1088 |
// 10.3 Analytics Support added for Piwik
|
1089 |
if( true == $redux_builder_amp['ampforwp-Piwik-switch'] ) { ?>
|
1090 |
+
<amp-pixel data-block-on-consent src="<?php global $redux_builder_amp; echo $redux_builder_amp['pa-feild']; ?>"></amp-pixel>
|
1091 |
<?php }
|
1092 |
|
1093 |
// 10.4 Analytics Support added for quantcast
|
1094 |
if ( true == $redux_builder_amp['ampforwp-Quantcast-switch'] ) { ?>
|
1095 |
+
<amp-analytics data-block-on-consent type="quantcast">
|
1096 |
<script type="application/json">
|
1097 |
{
|
1098 |
"vars": {
|
1107 |
|
1108 |
// 10.5 Analytics Support added for comscore
|
1109 |
if ( true == $redux_builder_amp['ampforwp-comScore-switch'] ) { ?>
|
1110 |
+
<amp-analytics data-block-on-consent type="comscore">
|
1111 |
<script type="application/json">
|
1112 |
{
|
1113 |
"vars": {
|
1123 |
// 10.6 Analytics Support added for Effective Measure
|
1124 |
if( true == $redux_builder_amp['ampforwp-Effective-switch'] ) { ?>
|
1125 |
<!-- BEGIN EFFECTIVE MEASURE CODE -->
|
1126 |
+
<amp-pixel data-block-on-consent src="<?php global $redux_builder_amp; echo $redux_builder_amp['eam-feild']; ?>" />
|
1127 |
<!--END EFFECTIVE MEASURE CODE -->
|
1128 |
<?php }
|
1129 |
|
1131 |
if( true == $redux_builder_amp['ampforwp-StatCounter-switch'] ) { ?>
|
1132 |
<!-- BEGIN StatCounter CODE -->
|
1133 |
<div id="statcounter">
|
1134 |
+
<amp-pixel data-block-on-consent src="<?php global $redux_builder_amp; echo $redux_builder_amp['sc-feild']; ?>" >
|
1135 |
</amp-pixel>
|
1136 |
</div>
|
1137 |
<!--END StatCounter CODE -->
|
1141 |
if( true == $redux_builder_amp['ampforwp-Histats-switch'] ) { ?>
|
1142 |
<!-- BEGIN Histats CODE -->
|
1143 |
<div id="histats">
|
1144 |
+
<amp-pixel data-block-on-consent src="//sstatic1.histats.com/0.gif?<?php global $redux_builder_amp; echo $redux_builder_amp['histats-feild']; ?>&101" >
|
1145 |
</amp-pixel>
|
1146 |
</div>
|
1147 |
<!--END Histats CODE -->
|
1149 |
|
1150 |
// 10.9 Analytics Support added for Yandex Metrika Analytics
|
1151 |
if ( true == $redux_builder_amp['ampforwp-Yandex-switch'] ){ ?>
|
1152 |
+
<amp-analytics data-block-on-consent type="metrika">
|
1153 |
<script type="application/json">
|
1154 |
{
|
1155 |
"vars": {
|
1173 |
|
1174 |
// 10.10 Analytics Support added for Chartbeat Analytics
|
1175 |
if ( true == $redux_builder_amp['ampforwp-Chartbeat-switch'] ){ ?>
|
1176 |
+
<amp-analytics data-block-on-consent type="chartbeat">
|
1177 |
<script type="application/json">
|
1178 |
{
|
1179 |
'vars': {
|
1191 |
// 10.11 Analytics Support added for Alexa Metrics
|
1192 |
if ( true == $redux_builder_amp['ampforwp-Alexa-switch'] ) { ?>
|
1193 |
<!-- Start Alexa AMP Certify Javascript -->
|
1194 |
+
<amp-analytics data-block-on-consent type="alexametrics">
|
1195 |
<script type="application/json">
|
1196 |
{
|
1197 |
"vars": {
|
1229 |
if ($afs_account > 999999)
|
1230 |
$afs_server = 'www10'; ?>
|
1231 |
<!-- Start AFS Analytics Javascript -->
|
1232 |
+
<amp-analytics data-block-on-consent type="afsanalytics">
|
1233 |
<script type="application/json">
|
1234 |
{
|
1235 |
"vars": {
|
1283 |
/* Removed So Inline style can work
|
1284 |
$content = preg_replace('#<style scoped.*?>(.*?)</style>#i', '', $content); */
|
1285 |
$content = preg_replace('/href="javascript:void*/', ' ', $content);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1286 |
$content = preg_replace('/<script[^>]*>.*?<\/script>/i', '', $content);
|
1287 |
//for removing attributes within html tags
|
1288 |
$content = preg_replace('/(<[^>]+) onclick=".*?"/', '$1', $content);
|
1291 |
*/
|
1292 |
$content = preg_replace('/(<[^>]+) rel="(.*?) noopener(.*?)"/', '$1 rel="$2$3"', $content);
|
1293 |
$content = preg_replace('/<div(.*?) rel=".*?"(.*?)/', '<div $1', $content);
|
|
|
|
|
1294 |
$content = preg_replace('/(<[^>]+) ref=".*?"/', '$1', $content);
|
1295 |
/*$content = preg_replace('/(<[^>]+) date=".*?"/', '$1', $content);
|
1296 |
$content = preg_replace('/(<[^>]+) time=".*?"/', '$1', $content);
|
1350 |
$content = preg_replace('/(<[^>]+) aria-current=".*?"/', '$1', $content);
|
1351 |
// Gallery Break fix
|
1352 |
$content = preg_replace('/\[gallery(.*?)\]/', '</p>[gallery$1]</p>', $content);
|
|
|
|
|
1353 |
|
1354 |
return $content;
|
1355 |
}
|
1587 |
wp_nonce_field( basename( __FILE__ ), 'ampforwp_title_nonce' );
|
1588 |
$ampforwp_stored_meta = get_post_meta( $post->ID );
|
1589 |
$preview_query_args = array();
|
1590 |
+
$preview_link = '';
|
1591 |
$preview_query_args = array(AMPFORWP_AMP_QUERY_VAR => 1);
|
1592 |
$preview_link = get_preview_post_link($post, $preview_query_args );
|
1593 |
|
1621 |
if ( empty( $ampforwp_stored_meta['ampforwp-amp-on-off'][0] ) && $post->post_type == 'page' && ( isset($redux_builder_amp['amp-pages-meta-default']) && $redux_builder_amp['amp-pages-meta-default'] == 'hide' ) ) {
|
1622 |
$ampforwp_stored_meta['ampforwp-amp-on-off'][0] = 'hide-amp';
|
1623 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1624 |
?>
|
1625 |
<p>
|
1626 |
<div class="prfx-row-content">
|
1952 |
// SmartMag Compatibility
|
1953 |
ampforwp_remove_filters_for_class( 'amp_post_template_dir', 'Bunyad_Theme_Amp', 'template_dir', 10 );
|
1954 |
ampforwp_remove_filters_for_class( 'amp_post_template_data', 'Bunyad_Theme_Amp', 'setup_data', 10 );
|
|
|
|
|
1955 |
//SiteOrigin Page builder compatibilty with AMP Frontpage
|
1956 |
if ( ampforwp_is_front_page() ) {
|
1957 |
ampforwp_remove_filters_for_class( 'the_content', 'SiteOrigin_Panels', 'generate_post_content', 10 );
|
2019 |
global $redux_builder_amp;
|
2020 |
/* include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
2021 |
if( !is_plugin_active( 'amp-cta/amp-cta.php' ) ) {*/
|
2022 |
+
if($redux_builder_amp['enable-single-social-icons'] == true && is_single() ) {
|
2023 |
$image = '';
|
2024 |
if ( ampforwp_has_post_thumbnail( ) ){
|
2025 |
$image = ampforwp_get_post_thumbnail( 'url', 'full' );
|
2133 |
</div>
|
2134 |
</a>
|
2135 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2136 |
</div>
|
2137 |
<?php }
|
2138 |
//}
|
2434 |
}
|
2435 |
return $content_buffer;
|
2436 |
}
|
2437 |
+
ob_start('ampforwp_the_content_filter_full');
|
2438 |
|
2439 |
|
2440 |
|
2583 |
if ( ! is_array( $analytics ) ) {
|
2584 |
$analytics = array();
|
2585 |
}
|
2586 |
+
|
2587 |
$analytics['amp-gtm-googleanalytics'] = array(
|
2588 |
'type' => $redux_builder_amp['amp-gtm-analytics-type'],
|
2589 |
'attributes' => array(
|
2592 |
),
|
2593 |
'config_data' => array(
|
2594 |
'vars' => array(
|
2595 |
+
'account' => $redux_builder_amp['amp-gtm-analytics-code']
|
2596 |
),
|
2597 |
'triggers' => array(
|
2598 |
'trackPageview' => array(
|
2602 |
),
|
2603 |
),
|
2604 |
);
|
|
|
|
|
|
|
2605 |
|
2606 |
return $analytics;
|
2607 |
}
|
2620 |
$width = $height = 420;
|
2621 |
$layout = "";
|
2622 |
$layout = 'responsive';
|
|
|
|
|
2623 |
if ( isset($redux_builder_amp['ampforwp-disqus-layout']) && 'fixed' == $redux_builder_amp['ampforwp-disqus-layout'] ) {
|
2624 |
$layout = 'fixed';
|
2625 |
|
2630 |
//if ( !comments_open() ){
|
2631 |
// return;
|
2632 |
//}//931
|
2633 |
+
if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && 4 != $redux_builder_amp['amp-design-selector'] ) {
|
2634 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
2635 |
global $post; $post_slug=$post->post_name;
|
2636 |
|
2685 |
function ampforwp_facebook_comments_markup() {
|
2686 |
|
2687 |
global $redux_builder_amp;
|
2688 |
+
$facebook_comments_markup = '';
|
2689 |
+
//if ( !comments_open() ){
|
2690 |
+
//return;
|
2691 |
+
//}
|
2692 |
+
if ( $redux_builder_amp['ampforwp-facebook-comments-support'] ) {
|
|
|
2693 |
|
2694 |
$facebook_comments_markup = '<section class="amp-wp-content post-comments amp-wp-article-content amp-facebook-comments" id="comments">';
|
2695 |
+
$facebook_comments_markup .= '<amp-facebook-comments data-block-on-consent width=486 height=357
|
2696 |
+
layout="responsive" data-numposts=';
|
2697 |
$facebook_comments_markup .= '"'. $redux_builder_amp['ampforwp-number-of-fb-no-of-comments']. '" ';
|
2698 |
+
|
|
|
|
|
2699 |
$facebook_comments_markup .= 'data-href=" ' . get_permalink() . ' "';
|
2700 |
$facebook_comments_markup .= '></amp-facebook-comments> </section>';
|
2701 |
|
2710 |
$facebook_comments_check = "";
|
2711 |
$facebook_comments_check = ampforwp_facebook_comments_markup();
|
2712 |
|
2713 |
+
if ( $facebook_comments_check && $redux_builder_amp['ampforwp-facebook-comments-support'] && ( is_singular() || ampforwp_is_front_page() ) ) {
|
2714 |
if ( empty( $data['amp_component_scripts']['amp-facebook-comments'] ) ) {
|
2715 |
$data['amp_component_scripts']['amp-facebook-comments'] = 'https://cdn.ampproject.org/v0/amp-facebook-comments-0.1.js';
|
2716 |
}
|
3060 |
}
|
3061 |
// Sidebar Content Sanitizer
|
3062 |
function ampforwp_sidebar_content_sanitizer($sidebar){
|
|
|
3063 |
$sanitized_sidebar = "";
|
3064 |
$non_sanitized_sidebar = "";
|
3065 |
+
$sidebar_data = array();
|
3066 |
+
|
3067 |
ob_start();
|
3068 |
dynamic_sidebar( $sidebar );
|
3069 |
$non_sanitized_sidebar = ob_get_contents();
|
3070 |
ob_end_clean();
|
3071 |
+
if ( $non_sanitized_sidebar ) {
|
3072 |
+
$sanitized_sidebar = new AMPFORWP_Content( $non_sanitized_sidebar,
|
3073 |
+
apply_filters( 'amp_content_embed_handlers', array(
|
3074 |
+
'AMP_Twitter_Embed_Handler' => array(),
|
3075 |
+
'AMP_YouTube_Embed_Handler' => array(),
|
3076 |
+
'AMP_DailyMotion_Embed_Handler' => array(),
|
3077 |
+
'AMP_Vimeo_Embed_Handler' => array(),
|
3078 |
+
'AMP_SoundCloud_Embed_Handler' => array(),
|
3079 |
+
'AMP_Instagram_Embed_Handler' => array(),
|
3080 |
+
'AMP_Vine_Embed_Handler' => array(),
|
3081 |
+
'AMP_Facebook_Embed_Handler' => array(),
|
3082 |
+
'AMP_Pinterest_Embed_Handler' => array(),
|
3083 |
+
'AMP_Gallery_Embed_Handler' => array(),
|
3084 |
+
) ),
|
3085 |
+
apply_filters( 'amp_content_sanitizers', array(
|
3086 |
+
'AMP_Style_Sanitizer' => array(),
|
3087 |
+
'AMP_Blacklist_Sanitizer' => array(),
|
3088 |
+
'AMP_Img_Sanitizer' => array(),
|
3089 |
+
'AMP_Video_Sanitizer' => array(),
|
3090 |
+
'AMP_Audio_Sanitizer' => array(),
|
3091 |
+
'AMP_Playbuzz_Sanitizer' => array(),
|
3092 |
+
'AMP_Iframe_Sanitizer' => array(
|
3093 |
+
'add_placeholder' => true,
|
3094 |
+
),
|
3095 |
+
) ), array('non-content'=>'non-content')
|
3096 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3097 |
}
|
3098 |
|
3099 |
+
return $sanitized_sidebar;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3100 |
}
|
3101 |
// Sidebar Scripts
|
3102 |
add_filter( 'amp_post_template_data', 'ampforwp_add_sidebar_data' );
|
3304 |
$metadata['headline'] = $headline; // proper headline added
|
3305 |
}
|
3306 |
// Description for Structured Data
|
3307 |
+
$desc = esc_attr( convert_chars( stripslashes( ampforwp_generate_meta_desc())) );
|
3308 |
$metadata['description'] = $desc;
|
3309 |
return $metadata;
|
3310 |
}
|
3343 |
function ampforwp_add_ads_scripts( $data ) {
|
3344 |
global $redux_builder_amp;
|
3345 |
|
3346 |
+
if ( (isset($redux_builder_amp['enable-amp-ads-1'] ) && $redux_builder_amp['enable-amp-ads-1']) || (isset( $redux_builder_amp['enable-amp-ads-2'] ) && $redux_builder_amp['enable-amp-ads-2']) || (isset($redux_builder_amp['enable-amp-ads-3']) && $redux_builder_amp['enable-amp-ads-3']) || (isset($redux_builder_amp['enable-amp-ads-4']) && $redux_builder_amp['enable-amp-ads-4']) ) {
|
3347 |
if ( empty( $data['amp_component_scripts']['amp-ad'] ) ) {
|
3348 |
$data['amp_component_scripts']['amp-ad'] = 'https://cdn.ampproject.org/v0/amp-ad-0.1.js';
|
3349 |
}
|
3380 |
function ampforwp_add_notification_scripts( $data ) {
|
3381 |
global $redux_builder_amp;
|
3382 |
|
3383 |
+
if ( $redux_builder_amp['amp-enable-notifications'] == true ) {
|
3384 |
if ( empty( $data['amp_component_scripts']['amp-user-notification'] ) ) {
|
3385 |
$data['amp_component_scripts']['amp-user-notification'] = 'https://cdn.ampproject.org/v0/amp-user-notification-0.1.js';
|
3386 |
}
|
3621 |
}
|
3622 |
|
3623 |
// 60. Remove Category Layout modification code added by TagDiv #842 and #796
|
3624 |
+
function ampforwp_remove_support_tagdiv_cateroy_layout(){
|
|
|
|
|
3625 |
if ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
|
3626 |
+
remove_action('pre_get_posts', 'td_modify_main_query_for_category_page');
|
3627 |
}
|
3628 |
}
|
3629 |
+
add_action('pre_get_posts','ampforwp_remove_support_tagdiv_cateroy_layout',9);
|
|
|
|
|
3630 |
|
3631 |
// 61. Add Gist Support
|
3632 |
add_shortcode('amp-gist', 'ampforwp_gist_shortcode_generator');
|
3819 |
}
|
3820 |
$sidebar_check = get_post_meta( $post_id,'ampforwp_custom_sidebar_select',true);
|
3821 |
|
3822 |
+
if ( $redux_builder_amp['ampforwp-content-builder'] && $sidebar_check === 'layout-builder') {
|
3823 |
// Add Styling Builder Elements
|
3824 |
add_action('amp_post_template_css', 'ampforwp_pagebuilder_styling', 20);
|
3825 |
|
4049 |
}
|
4050 |
else{
|
4051 |
$ampforwp_backto_nonamp = untrailingslashit( home_url( $wp->request ) );
|
4052 |
+
$ampforwp_backto_nonamp = preg_replace('/\bamp\b/','',$ampforwp_backto_nonamp);
|
4053 |
$ampforwp_backto_nonamp = user_trailingslashit($ampforwp_backto_nonamp);
|
4054 |
|
4055 |
if('' == $permalink_structure){
|
4094 |
|
4095 |
wp_reset_postdata();
|
4096 |
global $page, $numpages, $multipage, $more, $redux_builder_amp;
|
4097 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4098 |
$defaults = array(
|
4099 |
'before' => '<div class="ampforwp_post_pagination" ><p>' . '<span>' . ampforwp_translation($redux_builder_amp['amp-translator-page-text'], 'Page') . ':</span>',
|
4100 |
'after' => '</p></div>',
|
4188 |
function ampforwp_post_paginated_link_generator( $i ) {
|
4189 |
global $wp_rewrite;
|
4190 |
$post = get_post();
|
|
|
|
|
|
|
|
|
4191 |
$query_args = array();
|
4192 |
if ( 1 == $i ) {
|
4193 |
$url = get_permalink();
|
|
|
|
|
|
|
4194 |
} else {
|
4195 |
+
if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
|
4196 |
$url = add_query_arg( 'page', $i, get_permalink() );
|
4197 |
+
elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') == $post->ID )
|
4198 |
+
$url = trailingslashit(get_permalink()) . user_trailingslashit("$wp_rewrite->pagination_base/" . $i, 'single_paged');
|
|
|
|
|
|
|
|
|
4199 |
else
|
4200 |
$url = trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged');
|
4201 |
}
|
4213 |
$url = add_query_arg(AMPFORWP_AMP_QUERY_VAR,'1',$url);
|
4214 |
return '<a href="' . esc_url( $url ) . '">';
|
4215 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4216 |
|
4217 |
add_filter('ampforwp_modify_rel_canonical','ampforwp_modify_rel_amphtml_paginated_post');
|
4218 |
function ampforwp_modify_rel_amphtml_paginated_post($url) {
|
4395 |
}
|
4396 |
|
4397 |
//Meta description #1013
|
4398 |
+
function ampforwp_generate_meta_desc(){
|
4399 |
global $post, $redux_builder_amp;
|
4400 |
$desc = $post_id = '';
|
4401 |
if ( $redux_builder_amp['ampforwp-seo-meta-description'] ) {
|
4440 |
if ( is_search() ) {
|
4441 |
$yoast_desc = addslashes( ampforwp_translation($redux_builder_amp['amp-translator-search-text'], 'You searched for:') . ' ' . get_search_query() );
|
4442 |
}
|
4443 |
+
|
|
|
|
|
4444 |
if ( $yoast_desc ) {
|
4445 |
$desc = $yoast_desc;
|
4446 |
}
|
4534 |
global $redux_builder_amp;
|
4535 |
|
4536 |
if(is_archive() && $redux_builder_amp['ampforwp-archive-support']==1){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4537 |
$categories = get_the_category();
|
4538 |
$selected_cats = array();
|
4539 |
if ( $categories) {
|
4868 |
|
4869 |
return $show_image;
|
4870 |
}
|
|
|
4871 |
// 82. Grab Featured Image from The Content
|
4872 |
+
function ampforwp_get_featured_image_from_content($featured_image = "", $size="") {
|
4873 |
global $post, $posts;
|
4874 |
+
$image_url = '';
|
4875 |
+
$image_width = '';
|
4876 |
+
$image_height = '';
|
4877 |
+
$output = '';
|
4878 |
+
$matches = '';
|
4879 |
+
$amp_html_sanitizer = '';
|
4880 |
+
$amp_html = '';
|
4881 |
+
$image_html = '';
|
4882 |
+
$featured_image_output = '';
|
4883 |
ob_start();
|
4884 |
ob_end_clean();
|
4885 |
// Match all the images from the content
|
4886 |
if(is_object($post)){
|
4887 |
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*.+width=[\'"]([^\'"]+)[\'"].*.+height=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4888 |
}
|
4889 |
//Grab the First Image
|
4890 |
+
if (is_array($matches) && $matches[0] ) {
|
4891 |
$image_url = $matches[1][0];
|
4892 |
$image_html = $matches[0][0];
|
4893 |
$image_width = $matches[2][0];
|
4894 |
$image_height = $matches[3][0];
|
4895 |
// Sanitize it
|
4896 |
+
$amp_html_sanitizer = new AMPFORWP_Content( $image_html, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array() ) ) );
|
4897 |
$amp_html = $amp_html_sanitizer->get_amp_content();
|
|
|
|
|
|
|
|
|
4898 |
// Filter to remove that image from the content
|
4899 |
add_filter('ampforwp_modify_the_content','featured_image_content_filter');
|
4900 |
+
|
4901 |
|
4902 |
if ( isset( $size ) && '' !== $size ) {
|
4903 |
$image_id = attachment_url_to_postid( $image_url );
|
4913 |
case 'image':
|
4914 |
$featured_image_output = $amp_html;
|
4915 |
break;
|
4916 |
+
|
4917 |
case 'url':
|
4918 |
$featured_image_output = $image_url;
|
4919 |
break;
|
4920 |
+
|
4921 |
case 'width':
|
4922 |
$featured_image_output = $image_width;
|
4923 |
break;
|
4924 |
+
|
4925 |
case 'height':
|
4926 |
$featured_image_output = $image_height;
|
4927 |
break;
|
4928 |
+
|
4929 |
default:
|
4930 |
$featured_image_output = $amp_html;
|
4931 |
break;
|
4941 |
if( $featured_image && false == $redux_builder_amp['ampforwp-duplicate-featured-image']){
|
4942 |
// Change the src to use it in the pattern
|
4943 |
$featured_image = str_replace('/', '\/', $featured_image);
|
|
|
|
|
4944 |
// Remove the amp-img
|
4945 |
+
$content = preg_replace('/<amp-img(.*)src="'.$featured_image.'"(.*)<\/amp-img>/', '', $content);
|
4946 |
+
// Remove the figure (due to caption)
|
4947 |
+
$content = preg_replace('/<figure(.*)href="'.$featured_image.'"(.*)<\/figure>/', '', $content);
|
4948 |
}
|
4949 |
return $content;
|
4950 |
}
|
5046 |
<span class="related-title">'.ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ).'</span>';
|
5047 |
|
5048 |
while( $my_query->have_posts() ) {
|
5049 |
+
$my_query->the_post();
|
5050 |
+
$related_post_permalink = get_permalink();
|
5051 |
+
$related_post_permalink = trailingslashit($related_post_permalink);
|
5052 |
+
$related_post_permalink = ampforwp_url_controller( $related_post_permalink );
|
5053 |
+
if ( ampforwp_has_post_thumbnail() ) {
|
5054 |
+
$title_class = 'has_related_thumbnail';
|
5055 |
+
} else {
|
5056 |
+
$title_class = 'no_related_thumbnail';
|
5057 |
+
}
|
5058 |
+
|
5059 |
+
$inline_related_posts .= '<li class="'.$title_class.'">
|
5060 |
+
<a href="'.esc_url( $related_post_permalink ).'" rel="bookmark" title="'.get_the_title().'">';
|
5061 |
|
5062 |
+
$thumb_url_2 = ampforwp_get_post_thumbnail('url');
|
5063 |
|
5064 |
+
if ( ampforwp_has_post_thumbnail() ) {
|
5065 |
+
if( 4 == $redux_builder_amp['amp-design-selector'] ){
|
5066 |
+
$thumb_url_2 = ampforwp_aq_resize( $thumb_url_2, 220 , 134 , true, false );
|
5067 |
+
$inline_related_posts .= '<amp-img src="'.esc_url( $thumb_url_2[0] ).'" width="' . $thumb_url_2[1] . '" height="' . $thumb_url_2[2] . '" layout="responsive"></amp-img>';
|
5068 |
+
}
|
5069 |
+
else{
|
5070 |
+
$inline_related_posts .= '<amp-img src="'.esc_url( $thumb_url_2 ).'" width="150" height="150" layout="responsive"></amp-img>';
|
5071 |
+
}
|
5072 |
+
}
|
5073 |
+
$inline_related_posts .='</a>';
|
5074 |
+
$inline_related_posts .='<div class="related_link">';
|
5075 |
+
$inline_related_posts .='<a href="'.esc_url( $related_post_permalink ).'">'.get_the_title().'</a>';
|
5076 |
+
if( has_excerpt() ){
|
5077 |
+
$content ='<p>'.get_the_excerpt().'</p>';
|
5078 |
+
}else{
|
5079 |
+
$content ='<p>'.get_the_content().'</p>';
|
5080 |
+
}
|
5081 |
+
$inline_related_posts .= '<p>'. wp_trim_words( strip_shortcodes( $content ) , '15' ).'</p>
|
5082 |
+
</div>
|
5083 |
+
</li>';
|
5084 |
+
|
5085 |
+
}
|
5086 |
+
$inline_related_posts .= '</ol>
|
5087 |
</div>
|
5088 |
</div>';
|
5089 |
}
|
5428 |
|
5429 |
global $redux_builder_amp;
|
5430 |
if( isset($redux_builder_amp['amp-fb-pixel']) && $redux_builder_amp['amp-fb-pixel'] ){
|
5431 |
+
$amp_pixel = '<amp-pixel data-block-on-consent src="https://www.facebook.com/tr?id='.$redux_builder_amp['amp-fb-pixel-id'].'&ev=PageView&noscript=1"></amp-pixel>';
|
|
|
|
|
|
|
|
|
5432 |
echo $amp_pixel;
|
5433 |
|
5434 |
}
|
5450 |
// 91. Comment Author Gravatar URL
|
5451 |
if( ! function_exists('ampforwp_get_comments_gravatar') ){
|
5452 |
function ampforwp_get_comments_gravatar( $comment ) {
|
|
|
|
|
|
|
|
|
5453 |
$gravatar_exists = '';
|
5454 |
$gravatar_exists = ampforwp_gravatar_checker($comment->comment_author_email);
|
5455 |
if($gravatar_exists == true){
|
5464 |
function ampforwp_gravatar_checker( $email ) {
|
5465 |
// Craft a potential url and test its headers
|
5466 |
$hash = md5(strtolower(trim($email)));
|
5467 |
+
$uri = 'http://www.gravatar.com/avatar/' . $hash . '?d=404';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5468 |
$headers = @get_headers($uri);
|
5469 |
// If its 404
|
5470 |
if (!preg_match("|200|", $headers[0])) {
|
5515 |
}
|
5516 |
//93. added AMP url purifire for amphtml
|
5517 |
function ampforwp_url_purifier($url){
|
5518 |
+
global $wp_query,$wp,$redux_builder_amp;
|
5519 |
+
$get_permalink_structure = "";
|
5520 |
+
$endpoint = "";
|
5521 |
+
$endpointq = "";
|
5522 |
+
$queried_var = "";
|
5523 |
+
$quried_value = "";
|
5524 |
+
$endpoint = AMPFORWP_AMP_QUERY_VAR;
|
5525 |
+
$get_permalink_structure = get_option('permalink_structure');
|
5526 |
+
$checker = $redux_builder_amp['amp-core-end-point'];
|
5527 |
+
$endpointq = '?' . $endpoint;
|
5528 |
+
|
5529 |
+
if ( empty( $get_permalink_structure ) ) {
|
5530 |
+
|
5531 |
+
if ( is_home() || is_archive() || is_front_page() ) {
|
5532 |
+
$url = add_query_arg(AMPFORWP_AMP_QUERY_VAR,'1', $url);
|
5533 |
+
if ( is_home() && get_query_var('page_id') == ampforwp_get_blog_details('id') ) {
|
5534 |
+
$quried_value = get_query_var('page_id');
|
5535 |
+
if ( '' != $quried_value)
|
5536 |
+
$url = add_query_arg('page_id',$quried_value, $url);
|
5537 |
+
}
|
5538 |
+
if ( get_query_var('paged') >= 2 ) {
|
5539 |
+
$quried_value = get_query_var('paged');
|
5540 |
+
$url = add_query_arg('paged',$quried_value, $url);
|
5541 |
+
}
|
5542 |
}
|
|
|
|
|
|
|
5543 |
if ( is_archive() ) {
|
5544 |
+
|
5545 |
+
if ( is_archive() ) {
|
5546 |
+
$queried_var = 'm';
|
5547 |
+
}
|
5548 |
+
if ( is_tag() ) {
|
5549 |
+
$queried_var = 'tag';
|
5550 |
+
}
|
5551 |
+
if ( is_category() ) {
|
5552 |
+
$queried_var = 'cat';
|
5553 |
+
}
|
5554 |
+
if ( is_author() ) {
|
5555 |
+
$queried_var = 'author';
|
5556 |
+
}
|
5557 |
+
$quried_value = get_query_var($queried_var);
|
5558 |
+
$url = add_query_arg($queried_var,$quried_value, $url);
|
5559 |
+
//$url = $url .'&'. $queried_var .'='. $quried_value;
|
5560 |
}
|
5561 |
+
/*if ( is_home() && get_query_var('paged') > 1 ) {
|
5562 |
+
$quried_value = get_query_var('paged');
|
5563 |
+
$url = add_query_arg('paged',$quried_value, $url);
|
5564 |
+
if ( get_query_var('page_id') == ampforwp_get_blog_details('id') ) {
|
5565 |
+
$quried_value2 = get_query_var('page_id');
|
5566 |
+
$url = add_query_arg('page_id',$quried_value2, $url);
|
5567 |
+
}
|
5568 |
}
|
5569 |
+
elseif ( is_home() && get_query_var('paged') < 1 && get_query_var('page_id') == ampforwp_get_blog_details('id') ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5570 |
$quried_value2 = get_query_var('page_id');
|
5571 |
$url = add_query_arg('page_id',$quried_value2, $url);
|
5572 |
+
}*/
|
5573 |
+
} else {
|
5574 |
+
if ( is_singular() && true == $checker ) {
|
5575 |
+
$url = untrailingslashit($url);
|
5576 |
+
}
|
5577 |
+
if ( is_home() || is_archive() || is_front_page() ) {
|
5578 |
+
if ( is_archive() && get_query_var('paged') > 1 || is_home() && get_query_var('paged') > 1 ) {
|
5579 |
+
if ( true == $checker )
|
5580 |
+
$url = trailingslashit($url).$endpointq;
|
5581 |
+
else
|
5582 |
+
$url = user_trailingslashit( trailingslashit($url) );
|
5583 |
+
} else {
|
5584 |
+
if ( true == $checker )
|
5585 |
+
$url = trailingslashit($url) . $endpointq;
|
5586 |
+
else
|
5587 |
+
$url = user_trailingslashit( trailingslashit($url) . $endpoint );
|
5588 |
+
}
|
5589 |
+
}
|
5590 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5591 |
return $url;
|
5592 |
}
|
5593 |
|
5740 |
return true;
|
5741 |
|
5742 |
// TRUE: When we have " A static page" in reading settings and custom frontpage in amp
|
5743 |
+
if ( 'page' == get_option( 'show_on_front') && is_home() && $get_front_page_reading_settings && $get_amp_homepage_settings && $get_custom_frontpage_settings && $get_amp_custom_frontpage_id) {
|
5744 |
|
5745 |
$current_page = get_queried_object();
|
5746 |
if ( $current_page ) {
|
5775 |
// Polylang frontpage
|
5776 |
function ampforwp_polylang_front_page() {
|
5777 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
5778 |
+
if( is_plugin_active( 'polylang/polylang.php' )){
|
5779 |
global $polylang;
|
5780 |
$page_id = $polylang->curlang->page_on_front;
|
5781 |
$frontpage_id = get_option('page_on_front');
|
5809 |
$full_date = $redux_builder_amp['ampforwp-post-date-format-text'];
|
5810 |
// Change the % days into the actual number of days
|
5811 |
$full_date = str_replace('% days', $date, $full_date);
|
|
|
5812 |
}
|
5813 |
}
|
5814 |
}
|
6199 |
if ( is_home() && false == $redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
|
6200 |
return false;
|
6201 |
}
|
|
|
|
|
|
|
6202 |
if ( is_feed() ) {
|
6203 |
return false;
|
6204 |
}
|
6244 |
|
6245 |
// Allow AMP Components in "The Content" #1588
|
6246 |
// Check for amp-components in the_content
|
6247 |
+
add_filter('the_content','ampforwp_amp_component_checker');
|
6248 |
if ( ! function_exists('ampforwp_amp_component_checker') ) {
|
6249 |
function ampforwp_amp_component_checker( $content ) {
|
6250 |
if ( function_exists('ampforwp_is_amp_endpoint') && ampforwp_is_amp_endpoint() ) {
|
6267 |
else
|
6268 |
return $content;
|
6269 |
}
|
6270 |
+
}
|
6271 |
|
6272 |
// Remove wpautop from specific posts which contain amp-components
|
6273 |
add_action('pre_amp_render_post','ampforwp_custom_wpautop');
|
6291 |
// }
|
6292 |
//}
|
6293 |
// Get the AMP components
|
6294 |
+
function ampforwp_get_amp_components() {
|
6295 |
+
$components = array();
|
6296 |
+
$components = array('amp-carousel','amp-selector','amp-apester-media');
|
6297 |
+
return $components;
|
6298 |
+
}
|
6299 |
+
// Add the required scripts for amp-components
|
6300 |
+
add_filter('amp_post_template_data', 'ampforwp_add_amp_component_scripts',PHP_INT_MAX);
|
6301 |
+
if ( ! function_exists('ampforwp_add_amp_component_scripts') ) {
|
6302 |
+
function ampforwp_add_amp_component_scripts( $data ) {
|
6303 |
+
if ( is_single() ) {
|
6304 |
+
$components = ampforwp_get_amp_components();
|
6305 |
+
foreach ( $components as $component ) {
|
6306 |
+
// check if the post has amp-component meta
|
6307 |
+
$post_meta = get_post_meta(get_the_ID(), $component , true);
|
6308 |
+
if ( 'true' == $post_meta ) {
|
6309 |
+
if ( empty( $data['amp_component_scripts'][$component] ) ) {
|
6310 |
+
$data['amp_component_scripts'][$component] = 'https://cdn.ampproject.org/v0/'.$component.'-0.1.js';
|
6311 |
+
}
|
6312 |
+
}
|
6313 |
+
}
|
6314 |
+
}
|
6315 |
+
return $data;
|
6316 |
+
}
|
6317 |
+
}
|
6318 |
|
6319 |
// Backward Compatibility for AMP Preview #1529
|
6320 |
if ( ! function_exists('get_preview_post_link') ) {
|
6570 |
function ampforwp_gdpr_data( $data ) {
|
6571 |
global $redux_builder_amp;
|
6572 |
if ( empty( $data['amp_component_scripts']['amp-consent'] ) ) {
|
6573 |
+
$data['amp_component_scripts']['amp-consent'] = 'https://cdn.ampproject.org/v0/amp-consent-0.1.js';
|
6574 |
}
|
6575 |
if ( empty( $data['amp_component_scripts']['amp-form'] ) ) {
|
6576 |
+
$data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
|
6577 |
+
}
|
6578 |
+
if(isset( $redux_builder_amp['audience-for-amp-gdpr-compliance'] ) && ($redux_builder_amp['audience-for-amp-gdpr-compliance'] == '2' || $redux_builder_amp['audience-for-amp-gdpr-compliance'] == '3')){
|
6579 |
+
if ( empty( $data['amp_component_scripts']['amp-geo'] ) ) {
|
6580 |
+
$data['amp_component_scripts']['amp-geo'] = 'https://cdn.ampproject.org/v0/amp-geo-0.1.js';
|
6581 |
+
}
|
6582 |
+
}
|
6583 |
+
if ( empty( $data['amp_component_scripts']['amp-bind'] ) ) {
|
6584 |
+
$data['amp_component_scripts']['amp-bind'] = 'https://cdn.ampproject.org/v0/amp-bind-0.1.js';
|
6585 |
}
|
|
|
|
|
|
|
|
|
6586 |
return $data;
|
6587 |
}
|
6588 |
}
|
6608 |
if(isset($redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text']) && $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text']){
|
6609 |
$privacy_button_text = $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text'];
|
6610 |
}
|
|
|
|
|
|
|
6611 |
|
6612 |
+
$all_eu_countries = $redux_builder_amp['amp-gdpr-compliance-privacy-geo-location'];
|
6613 |
+
if(isset($redux_builder_amp['audience-for-amp-gdpr-compliance']) && $redux_builder_amp['audience-for-amp-gdpr-compliance']){
|
6614 |
+
///////////////////////////
|
6615 |
+
// Start For Only EU Countries //
|
6616 |
+
///////////////////////////
|
6617 |
+
if($redux_builder_amp['audience-for-amp-gdpr-compliance'] === '2'){?>
|
6618 |
+
<amp-geo layout="nodisplay">
|
6619 |
+
<script type="application/json">
|
6620 |
{
|
6621 |
+
"AmpBind": true,
|
6622 |
"ISOCountryGroups": {
|
6623 |
+
"eu": [ <?php echo '"'.implode('","', array_keys($all_eu_countries)).'"';?> ] ,
|
6624 |
+
"noneu": [ "unknown" ]
|
6625 |
+
}
|
6626 |
+
}
|
6627 |
+
</script>
|
6628 |
+
</amp-geo>
|
6629 |
+
|
6630 |
+
<?php
|
6631 |
+
///////////////////////////////
|
6632 |
+
// End For Only EU Countries //
|
6633 |
+
///////////////////////////////
|
6634 |
+
}
|
6635 |
+
|
6636 |
+
/////////////////////////////
|
6637 |
+
// Start For Custom EU Countries //
|
6638 |
+
/////////////////////////////
|
6639 |
+
if($redux_builder_amp['audience-for-amp-gdpr-compliance'] === '3'){
|
6640 |
+
?>
|
6641 |
+
<amp-geo layout="nodisplay">
|
6642 |
+
<script type="application/json">
|
6643 |
+
{
|
6644 |
+
"AmpBind": true,
|
6645 |
+
"ISOCountryGroups": {
|
6646 |
+
"eu": [ <?php $eu_countries = array_filter($redux_builder_amp['amp-gdpr-compliance-privacy-geo-location']);
|
6647 |
+
if(NULL == $eu_countries || 0 == count($eu_countries)){
|
6648 |
+
echo '"'.implode('","', array_keys($all_eu_countries)).'"';?> ] ,<?php
|
6649 |
+
}
|
6650 |
+
else{
|
6651 |
+
echo '"'.implode('","', array_keys($eu_countries)).'"';
|
6652 |
+
?> ] ,<?php } ?>
|
6653 |
+
"noneu": [ "unknown" ]
|
6654 |
+
}
|
6655 |
}
|
6656 |
+
</script>
|
6657 |
+
</amp-geo>
|
6658 |
+
|
6659 |
+
<amp-state id="ampGeo">
|
6660 |
+
<script type="application/json">{
|
6661 |
+
"ISOCountry":[ <?php echo '"'.implode('","', array_keys($all_eu_countries)).'"';?> ] ,
|
6662 |
+
"eu": true
|
6663 |
+
}
|
6664 |
+
</script>
|
6665 |
+
</amp-state>
|
6666 |
+
<?php }
|
6667 |
+
/////////////////////////////
|
6668 |
+
// END Custom EU Countries //
|
6669 |
+
/////////////////////////////
|
6670 |
+
?>
|
6671 |
+
|
6672 |
<amp-consent id="ampforwpConsent" layout="nodisplay">
|
6673 |
<script type="application/json">{
|
6674 |
"consents": {
|
6675 |
"consent1": {
|
6676 |
+
"checkConsentHref": "<?php echo admin_url('admin-ajax.php?action=ampforwp_check_consent_href_process');?>",
|
6677 |
"promptUI": "gdpr_c"
|
6678 |
}
|
6679 |
},
|
6710 |
</amp-consent>
|
6711 |
|
6712 |
<?php }
|
6713 |
+
}
|
6714 |
}
|
6715 |
|
6716 |
// AMP GDPR compliancy Styling
|
6717 |
if ( ! function_exists('ampforwp_gdpr_css') ) {
|
6718 |
function ampforwp_gdpr_css(){
|
6719 |
global $redux_builder_amp;
|
6720 |
+
if($redux_builder_amp['audience-for-amp-gdpr-compliance'] == '2' || $redux_builder_amp['audience-for-amp-gdpr-compliance'] == '3'){ ?>
|
6721 |
+
#ampforwpConsent{visibility: hidden}
|
6722 |
+
.amp-geo-group-eu #ampforwpConsent{visibility: visible} <?php }
|
6723 |
// GDPR popup Design
|
6724 |
if($redux_builder_amp['gdpr-type'] == '1'){?>
|
|
|
6725 |
.gdpr{position: fixed; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.7);color: #333;z-index:9999999;line-height:1.3}
|
6726 |
.gdpr_w{padding: 2rem;background: #fff;max-width: 700px;width: 95%;position: relative;margin: 5% auto;text-align: center;}
|
6727 |
.gdpr_t{margin-bottom:15px;}
|
6860 |
}
|
6861 |
}
|
6862 |
|
6863 |
+
// Consent Submission
|
6864 |
+
add_action('wp_ajax_ampforwp_check_consent_href_process','ampforwp_check_consent_href_process');
|
6865 |
+
add_action('wp_ajax_nopriv_ampforwp_check_consent_href_process','ampforwp_check_consent_href_process');
|
6866 |
+
function ampforwp_check_consent_href_process(){
|
6867 |
+
echo '{"promptIfUnknown": true}';
|
6868 |
+
wp_die();
|
6869 |
+
}
|
6870 |
// Consent Submission
|
6871 |
add_action('wp_ajax_amp_consent_submission','amp_consent_submission');
|
6872 |
add_action('wp_ajax_nopriv_amp_consent_submission','amp_consent_submission');
|
6902 |
|
6903 |
return $skip;
|
6904 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6905 |
}
|
templates/frontpage-elements.php
CHANGED
@@ -70,7 +70,7 @@ function ampforwp_design_1_frontpage_content( $template, $post_id ){
|
|
70 |
$ampforwp_the_content = $template->get('ampforwp_amp_content');
|
71 |
}
|
72 |
// Muffin Builder Compatibility #1455 #1893
|
73 |
-
if ( function_exists('mfn_builder_print')
|
74 |
ob_start();
|
75 |
mfn_builder_print( $post_id );
|
76 |
$content = ob_get_contents();
|
@@ -89,15 +89,7 @@ function ampforwp_design_1_frontpage_content( $template, $post_id ){
|
|
89 |
)
|
90 |
)
|
91 |
);
|
92 |
-
|
93 |
-
$ampforwp_custom_amp_editor_content = '';
|
94 |
-
$ampforwp_custom_amp_editor_content = $ampforwp_the_content;
|
95 |
-
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
96 |
-
$ampforwp_the_content .= $ampforwp_custom_amp_editor_content;
|
97 |
-
}
|
98 |
-
else{
|
99 |
-
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
100 |
-
}
|
101 |
}
|
102 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
|
103 |
echo $ampforwp_the_content;
|
@@ -154,7 +146,7 @@ function ampforwp_design_2_frontpage_content($template, $post_id){
|
|
154 |
$ampforwp_the_content = $template->get('ampforwp_amp_content');
|
155 |
}
|
156 |
// Muffin Builder Compatibility #1455 #1893
|
157 |
-
if ( function_exists('mfn_builder_print')
|
158 |
ob_start();
|
159 |
mfn_builder_print( $post_id );
|
160 |
$content = ob_get_contents();
|
@@ -173,15 +165,7 @@ function ampforwp_design_2_frontpage_content($template, $post_id){
|
|
173 |
)
|
174 |
)
|
175 |
);
|
176 |
-
|
177 |
-
$ampforwp_custom_amp_editor_content = '';
|
178 |
-
$ampforwp_custom_amp_editor_content = $ampforwp_the_content;
|
179 |
-
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
180 |
-
$ampforwp_the_content .= $ampforwp_custom_amp_editor_content;
|
181 |
-
}
|
182 |
-
else{
|
183 |
-
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
184 |
-
}
|
185 |
}
|
186 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
|
187 |
echo $ampforwp_the_content;
|
@@ -240,7 +224,7 @@ function ampforwp_design_3_frontpage_content($template, $post_id){
|
|
240 |
$ampforwp_the_content = $template->get('ampforwp_amp_content');
|
241 |
}
|
242 |
// Muffin Builder Compatibility #1455 #1893
|
243 |
-
if ( function_exists('mfn_builder_print')
|
244 |
ob_start();
|
245 |
mfn_builder_print( $post_id );
|
246 |
$content = ob_get_contents();
|
@@ -259,15 +243,7 @@ function ampforwp_design_3_frontpage_content($template, $post_id){
|
|
259 |
)
|
260 |
)
|
261 |
);
|
262 |
-
|
263 |
-
$ampforwp_custom_amp_editor_content = '';
|
264 |
-
$ampforwp_custom_amp_editor_content = $ampforwp_the_content;
|
265 |
-
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
266 |
-
$ampforwp_the_content .= $ampforwp_custom_amp_editor_content;
|
267 |
-
}
|
268 |
-
else{
|
269 |
-
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
270 |
-
}
|
271 |
}
|
272 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
|
273 |
echo $ampforwp_the_content;
|
70 |
$ampforwp_the_content = $template->get('ampforwp_amp_content');
|
71 |
}
|
72 |
// Muffin Builder Compatibility #1455 #1893
|
73 |
+
if ( function_exists('mfn_builder_print') ) {
|
74 |
ob_start();
|
75 |
mfn_builder_print( $post_id );
|
76 |
$content = ob_get_contents();
|
89 |
)
|
90 |
)
|
91 |
);
|
92 |
+
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
|
95 |
echo $ampforwp_the_content;
|
146 |
$ampforwp_the_content = $template->get('ampforwp_amp_content');
|
147 |
}
|
148 |
// Muffin Builder Compatibility #1455 #1893
|
149 |
+
if ( function_exists('mfn_builder_print') ) {
|
150 |
ob_start();
|
151 |
mfn_builder_print( $post_id );
|
152 |
$content = ob_get_contents();
|
165 |
)
|
166 |
)
|
167 |
);
|
168 |
+
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
}
|
170 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
|
171 |
echo $ampforwp_the_content;
|
224 |
$ampforwp_the_content = $template->get('ampforwp_amp_content');
|
225 |
}
|
226 |
// Muffin Builder Compatibility #1455 #1893
|
227 |
+
if ( function_exists('mfn_builder_print') ) {
|
228 |
ob_start();
|
229 |
mfn_builder_print( $post_id );
|
230 |
$content = ob_get_contents();
|
243 |
)
|
244 |
)
|
245 |
);
|
246 |
+
$ampforwp_the_content = $sanitizer_obj->get_amp_content();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
}
|
248 |
$ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
|
249 |
echo $ampforwp_the_content;
|