Version Description
(11th July 2018) = * Fixed: Title disappearing in Design 1,2,3 when legacy pagebuilder is enabled #2341 * Fixed: ld+json getting a broken when special characters are added in the image. #2346 * Fixed: Hide by Category Breaking post metabox #2330 * Fixed: Hiding excerpt when global $redux_builder_amp is empty #2330 * Fixed: When Google Tag Manager is enabled, only Google Analytics should get disabled but not other analytics. #2340
Download this release
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.97.5 |
Comparing to | |
See all releases |
Code changes from version 0.9.97.4 to 0.9.97.5
- README.md +8 -1
- accelerated-moblie-pages.php +2 -2
- includes/options/admin-config.php +4 -73
- includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php +1 -1
- includes/vendor/vendor-changelog.txt +2 -1
- readme.txt +8 -1
- templates/design-manager/design-1/archive.php +1 -1
- templates/design-manager/design-1/index.php +1 -1
- templates/design-manager/design-1/search.php +1 -1
- templates/design-manager/design-2/archive.php +1 -1
- templates/design-manager/design-2/index.php +1 -1
- templates/design-manager/design-2/search.php +1 -1
- templates/design-manager/design-3/archive.php +1 -1
- templates/design-manager/design-3/index.php +1 -1
- templates/design-manager/design-3/search.php +1 -1
- templates/design-manager/swift/index.php +2 -2
- templates/design-manager/swift/loop.php +1 -1
- templates/features.php +39 -16
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,6 +183,13 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
183 |
|
184 |
== Changelog ==
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
= 0.9.97.4 (09th July 2018) =
|
187 |
* Fixed: Huge Performance upgrade in the way fetching the logo url #2317
|
188 |
* Fixed: Fatal Error due to unable to modify values in Structured Data Object #2327
|
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.5
|
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.97.5 (11th July 2018) =
|
187 |
+
* Fixed: Title disappearing in Design 1,2,3 when legacy pagebuilder is enabled #2341
|
188 |
+
* Fixed: ld+json getting a broken when special characters are added in the image. #2346
|
189 |
+
* Fixed: Hide by Category Breaking post metabox #2330
|
190 |
+
* Fixed: Hiding excerpt when global $redux_builder_amp is empty #2330
|
191 |
+
* Fixed: When Google Tag Manager is enabled, only Google Analytics should get disabled but not other analytics. #2340
|
192 |
+
|
193 |
= 0.9.97.4 (09th July 2018) =
|
194 |
* Fixed: Huge Performance upgrade in the way fetching the logo url #2317
|
195 |
* Fixed: Fatal Error due to unable to modify values in Structured Data Object #2327
|
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 |
// any changes to AMP_QUERY_VAR should be refelected here
|
24 |
function ampforwp_generate_endpoint(){
|
25 |
$ampforwp_slug = '';
|
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.5
|
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.5');
|
23 |
// any changes to AMP_QUERY_VAR should be refelected here
|
24 |
function ampforwp_generate_endpoint(){
|
25 |
$ampforwp_slug = '';
|
includes/options/admin-config.php
CHANGED
@@ -186,19 +186,6 @@ $extension_listing_array = array(
|
|
186 |
'store_url'=>'https://accounts.ampforwp.com',
|
187 |
'is_activated'=>(is_plugin_active('amp-layouts/amp-layouts.php')? 1 : 2),
|
188 |
'settingUrl'=>'{amp-theme-settings}',
|
189 |
-
),
|
190 |
-
|
191 |
-
array(
|
192 |
-
'name'=>'AMP Layouts',
|
193 |
-
'desc'=>'layout system built for AMP that makes easy to create your own AMP templates.',
|
194 |
-
'img_src'=>AMPFORWP_IMAGE_DIR . '/email.png',
|
195 |
-
'price'=>'$89',
|
196 |
-
'url_link'=>'https://ampforwp.com/amp-layouts/',
|
197 |
-
'plugin_active_path'=> 'amp-layouts/amp-layouts.php',
|
198 |
-
'item_name'=>'AMP Layouts',
|
199 |
-
'store_url'=>'https://accounts.ampforwp.com',
|
200 |
-
'is_activated'=>(is_plugin_active('amp-layouts/amp-layouts.php')? 1 : 2),
|
201 |
-
'settingUrl'=>'',
|
202 |
),
|
203 |
|
204 |
array(
|
@@ -1995,7 +1982,7 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
1995 |
return false;
|
1996 |
}
|
1997 |
|
1998 |
-
|
1999 |
Redux::setSection( $opt_name, array(
|
2000 |
'title' => __('Analytics'),
|
2001 |
// 'icon' => 'el el-th-large',
|
@@ -2027,7 +2014,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2027 |
),
|
2028 |
'default' => '1',
|
2029 |
),
|
2030 |
-
|
2031 |
array(
|
2032 |
'id' => 'ampforwp-analytics_1',
|
2033 |
'type' => 'section',
|
@@ -2109,11 +2095,9 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2109 |
/**
|
2110 |
* Enter your Advanced Analytics code here
|
2111 |
*/
|
2112 |
-
|
2113 |
}
|
2114 |
}','accelerated-mobile-pages')
|
2115 |
),
|
2116 |
-
|
2117 |
//GTM
|
2118 |
array(
|
2119 |
'id' => 'amp-use-gtm-option',
|
@@ -2178,12 +2162,7 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2178 |
array('amp-use-gtm-option', '=' , '1'),
|
2179 |
),
|
2180 |
),
|
2181 |
-
|
2182 |
-
|
2183 |
array(
|
2184 |
-
'required' => array(
|
2185 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2186 |
-
),
|
2187 |
'id' => 'ampforwp-analytics_2',
|
2188 |
'type' => 'section',
|
2189 |
'title' => __('General Analytics Providers', 'accelerated-mobile-pages'),
|
@@ -2192,9 +2171,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2192 |
'accordion-open'=> 1,
|
2193 |
),
|
2194 |
array(
|
2195 |
-
'required' => array(
|
2196 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2197 |
-
),
|
2198 |
'id' =>'amp-fb-pixel',
|
2199 |
'type' => 'switch',
|
2200 |
'title' => __('Facebook Pixel','accelerated-mobile-pages'),
|
@@ -2214,9 +2190,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2214 |
'type' => 'switch',
|
2215 |
'title' => 'Segment Analytics',
|
2216 |
'default' => ampforwp_get_default_analytics('2'),
|
2217 |
-
'required' => array(
|
2218 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2219 |
-
),
|
2220 |
),
|
2221 |
array(
|
2222 |
'id' => 'sa-feild',
|
@@ -2224,7 +2197,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2224 |
'title' => __( 'Segment Analytics', 'accelerated-mobile-pages' ),
|
2225 |
'tooltip-subtitle' => __( 'Enter your Segment Analytics Key.', 'accelerated-mobile-pages' ),
|
2226 |
'required' => array(
|
2227 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2228 |
array('ampforwp-Segment-switch', '=' , '1')
|
2229 |
),
|
2230 |
'default' => 'SEGMENT-WRITE-KEY',
|
@@ -2235,16 +2207,12 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2235 |
'type' => 'switch',
|
2236 |
'title' => 'Matomo (Piwik) Analytics',
|
2237 |
'default' => ampforwp_get_default_analytics('3'),
|
2238 |
-
'required' => array(
|
2239 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2240 |
-
),
|
2241 |
),
|
2242 |
array(
|
2243 |
'id' => 'pa-feild',
|
2244 |
'type' => 'text',
|
2245 |
'title' => __( ' Matomo (Piwik) Analytics', 'accelerated-mobile-pages' ),
|
2246 |
'required' => array(
|
2247 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2248 |
array('ampforwp-Piwik-switch', '=' , '1')
|
2249 |
),
|
2250 |
'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' ),
|
@@ -2257,9 +2225,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2257 |
'type' => 'switch',
|
2258 |
'title' => 'Quantcast Measurement',
|
2259 |
'default' => ampforwp_get_default_analytics('4'),
|
2260 |
-
'required' => array(
|
2261 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2262 |
-
),
|
2263 |
),
|
2264 |
array(
|
2265 |
'id' =>'amp-quantcast-analytics-code',
|
@@ -2275,9 +2240,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2275 |
'type' => 'switch',
|
2276 |
'title' => 'comScore',
|
2277 |
'default' => ampforwp_get_default_analytics('5'),
|
2278 |
-
'required' => array(
|
2279 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2280 |
-
),
|
2281 |
),
|
2282 |
array(
|
2283 |
'id' =>'amp-comscore-analytics-code-c1',
|
@@ -2301,16 +2263,12 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2301 |
'type' => 'switch',
|
2302 |
'title' => 'Effective Measure',
|
2303 |
'default' => ampforwp_get_default_analytics('6'),
|
2304 |
-
'required' => array(
|
2305 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2306 |
-
),
|
2307 |
),
|
2308 |
array(
|
2309 |
'id' => 'eam-feild',
|
2310 |
'type' => 'text',
|
2311 |
'title' => __( 'Effective Measure Analytics', 'accelerated-mobile-pages' ),
|
2312 |
'required' => array(
|
2313 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2314 |
array('ampforwp-Effective-switch', '=' , '1')
|
2315 |
),
|
2316 |
'desc' => __( 'Example: https://s.effectivemeasure.net/d/6/i?pu=CANONICAL_URL&ru=DOCUMENT_REFERRER&rnd=RANDOM', 'accelerated-mobile-pages' ),
|
@@ -2323,16 +2281,12 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2323 |
'type' => 'switch',
|
2324 |
'title' => 'StatCounter',
|
2325 |
'default' => ampforwp_get_default_analytics('7'),
|
2326 |
-
'required' => array(
|
2327 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2328 |
-
),
|
2329 |
),
|
2330 |
array(
|
2331 |
'id' => 'sc-feild',
|
2332 |
'type' => 'text',
|
2333 |
'title' => __( 'StatCounter', 'accelerated-mobile-pages' ),
|
2334 |
'required' => array(
|
2335 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2336 |
array('ampforwp-StatCounter-switch', '=' , '1')
|
2337 |
),
|
2338 |
'desc' => __( 'Example: https://c.statcounter.com/PROJECT_ID/0/SECURITY_CODE/1/', 'accelerated-mobile-pages' ),
|
@@ -2345,16 +2299,12 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2345 |
'type' => 'switch',
|
2346 |
'title' => 'Histats Analytics',
|
2347 |
'default' => ampforwp_get_default_analytics('8'),
|
2348 |
-
'required' => array(
|
2349 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2350 |
-
),
|
2351 |
),
|
2352 |
array(
|
2353 |
'id' => 'histats-feild',
|
2354 |
'type' => 'text',
|
2355 |
'title' => __( 'Histats Analytics', 'accelerated-mobile-pages' ),
|
2356 |
'required' => array(
|
2357 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2358 |
array('ampforwp-Histats-switch', '=' , '1')
|
2359 |
),
|
2360 |
'tooltip-subtitle' => __( 'Enter your Histats Analytics ID.', 'accelerated-mobile-pages' ),
|
@@ -2367,9 +2317,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2367 |
'type' => 'switch',
|
2368 |
'title' => 'Yandex Metrika',
|
2369 |
'default' => ampforwp_get_default_analytics('9'),
|
2370 |
-
'required' => array(
|
2371 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2372 |
-
),
|
2373 |
),
|
2374 |
array(
|
2375 |
'id' =>'amp-Yandex-Metrika-analytics-code',
|
@@ -2377,7 +2324,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2377 |
'title' => __('Yandex Metrika Analytics ID','accelerated-mobile-pages'),
|
2378 |
'default' => '',
|
2379 |
'required' => array(
|
2380 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2381 |
array('ampforwp-Yandex-switch', '=' , '1')),
|
2382 |
'tooltip-subtitle' => __( 'Enter your Counter ID.', 'accelerated-mobile-pages' ),
|
2383 |
),
|
@@ -2387,9 +2333,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2387 |
'type' => 'switch',
|
2388 |
'title' => 'Chartbeat Analytics',
|
2389 |
'default' => ampforwp_get_default_analytics('10'),
|
2390 |
-
'required' => array(
|
2391 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2392 |
-
),
|
2393 |
),
|
2394 |
|
2395 |
array(
|
@@ -2398,7 +2341,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2398 |
'title' => __('Chartbeat Analytics ID','accelerated-mobile-pages'),
|
2399 |
'default' => '',
|
2400 |
'required' => array(
|
2401 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2402 |
array('ampforwp-Chartbeat-switch', '=' , '1')),
|
2403 |
'tooltip-subtitle' => __( 'Enter your Account ID.', 'accelerated-mobile-pages' ),
|
2404 |
),
|
@@ -2408,16 +2350,12 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2408 |
'type' => 'switch',
|
2409 |
'title' => 'Alexa Metrics',
|
2410 |
'default' => ampforwp_get_default_analytics('11'),
|
2411 |
-
'required' => array(
|
2412 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2413 |
-
),
|
2414 |
),
|
2415 |
array(
|
2416 |
'id' => 'ampforwp-alexa-account',
|
2417 |
'type' => 'text',
|
2418 |
'title' => __( 'Alexa Metrics Account', 'accelerated-mobile-pages' ),
|
2419 |
'required' => array(
|
2420 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2421 |
array('ampforwp-Alexa-switch', '=' , '1')
|
2422 |
),
|
2423 |
'tooltip-subtitle' => __( 'Enter Account Number given by Alexa Metrics', 'accelerated-mobile-pages' ),
|
@@ -2428,7 +2366,6 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2428 |
'type' => 'text',
|
2429 |
'title' => __( 'Alexa Metrics Domain', 'accelerated-mobile-pages' ),
|
2430 |
'required' => array(
|
2431 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2432 |
array('ampforwp-Alexa-switch', '=' , '1')
|
2433 |
),
|
2434 |
'tooltip-subtitle' => __( 'Enter the domain', 'accelerated-mobile-pages' ),
|
@@ -2440,26 +2377,20 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2440 |
'type' => 'switch',
|
2441 |
'title' => 'AFS Analytics',
|
2442 |
'default' => ampforwp_get_default_analytics('12'),
|
2443 |
-
'required' => array(
|
2444 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2445 |
-
),
|
2446 |
),
|
2447 |
array(
|
2448 |
'id' => 'ampforwp-afs-siteid',
|
2449 |
'type' => 'text',
|
2450 |
'title' => __( 'Website ID', 'accelerated-mobile-pages' ),
|
2451 |
'required' => array(
|
2452 |
-
array('amp-use-gtm-option', '=' , '0'),
|
2453 |
array('ampforwp-afs-analytics-switch', '=' , '1')
|
2454 |
),
|
2455 |
'tooltip-subtitle' => __( 'Enter the Website ID', 'accelerated-mobile-pages' ),
|
2456 |
'default' => '',
|
2457 |
'desc' => 'example: 00000003',
|
2458 |
-
),
|
2459 |
-
|
2460 |
-
|
2461 |
-
)
|
2462 |
-
)
|
2463 |
);
|
2464 |
//Get options for Structured Data Type
|
2465 |
if( !function_exists('ampforwp_get_sd_types') ){
|
186 |
'store_url'=>'https://accounts.ampforwp.com',
|
187 |
'is_activated'=>(is_plugin_active('amp-layouts/amp-layouts.php')? 1 : 2),
|
188 |
'settingUrl'=>'{amp-theme-settings}',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
),
|
190 |
|
191 |
array(
|
1982 |
return false;
|
1983 |
}
|
1984 |
|
1985 |
+
// Analytics SECTION
|
1986 |
Redux::setSection( $opt_name, array(
|
1987 |
'title' => __('Analytics'),
|
1988 |
// 'icon' => 'el el-th-large',
|
2014 |
),
|
2015 |
'default' => '1',
|
2016 |
),
|
|
|
2017 |
array(
|
2018 |
'id' => 'ampforwp-analytics_1',
|
2019 |
'type' => 'section',
|
2095 |
/**
|
2096 |
* Enter your Advanced Analytics code here
|
2097 |
*/
|
|
|
2098 |
}
|
2099 |
}','accelerated-mobile-pages')
|
2100 |
),
|
|
|
2101 |
//GTM
|
2102 |
array(
|
2103 |
'id' => 'amp-use-gtm-option',
|
2162 |
array('amp-use-gtm-option', '=' , '1'),
|
2163 |
),
|
2164 |
),
|
|
|
|
|
2165 |
array(
|
|
|
|
|
|
|
2166 |
'id' => 'ampforwp-analytics_2',
|
2167 |
'type' => 'section',
|
2168 |
'title' => __('General Analytics Providers', 'accelerated-mobile-pages'),
|
2171 |
'accordion-open'=> 1,
|
2172 |
),
|
2173 |
array(
|
|
|
|
|
|
|
2174 |
'id' =>'amp-fb-pixel',
|
2175 |
'type' => 'switch',
|
2176 |
'title' => __('Facebook Pixel','accelerated-mobile-pages'),
|
2190 |
'type' => 'switch',
|
2191 |
'title' => 'Segment Analytics',
|
2192 |
'default' => ampforwp_get_default_analytics('2'),
|
|
|
|
|
|
|
2193 |
),
|
2194 |
array(
|
2195 |
'id' => 'sa-feild',
|
2197 |
'title' => __( 'Segment Analytics', 'accelerated-mobile-pages' ),
|
2198 |
'tooltip-subtitle' => __( 'Enter your Segment Analytics Key.', 'accelerated-mobile-pages' ),
|
2199 |
'required' => array(
|
|
|
2200 |
array('ampforwp-Segment-switch', '=' , '1')
|
2201 |
),
|
2202 |
'default' => 'SEGMENT-WRITE-KEY',
|
2207 |
'type' => 'switch',
|
2208 |
'title' => 'Matomo (Piwik) Analytics',
|
2209 |
'default' => ampforwp_get_default_analytics('3'),
|
|
|
|
|
|
|
2210 |
),
|
2211 |
array(
|
2212 |
'id' => 'pa-feild',
|
2213 |
'type' => 'text',
|
2214 |
'title' => __( ' Matomo (Piwik) Analytics', 'accelerated-mobile-pages' ),
|
2215 |
'required' => array(
|
|
|
2216 |
array('ampforwp-Piwik-switch', '=' , '1')
|
2217 |
),
|
2218 |
'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' ),
|
2225 |
'type' => 'switch',
|
2226 |
'title' => 'Quantcast Measurement',
|
2227 |
'default' => ampforwp_get_default_analytics('4'),
|
|
|
|
|
|
|
2228 |
),
|
2229 |
array(
|
2230 |
'id' =>'amp-quantcast-analytics-code',
|
2240 |
'type' => 'switch',
|
2241 |
'title' => 'comScore',
|
2242 |
'default' => ampforwp_get_default_analytics('5'),
|
|
|
|
|
|
|
2243 |
),
|
2244 |
array(
|
2245 |
'id' =>'amp-comscore-analytics-code-c1',
|
2263 |
'type' => 'switch',
|
2264 |
'title' => 'Effective Measure',
|
2265 |
'default' => ampforwp_get_default_analytics('6'),
|
|
|
|
|
|
|
2266 |
),
|
2267 |
array(
|
2268 |
'id' => 'eam-feild',
|
2269 |
'type' => 'text',
|
2270 |
'title' => __( 'Effective Measure Analytics', 'accelerated-mobile-pages' ),
|
2271 |
'required' => array(
|
|
|
2272 |
array('ampforwp-Effective-switch', '=' , '1')
|
2273 |
),
|
2274 |
'desc' => __( 'Example: https://s.effectivemeasure.net/d/6/i?pu=CANONICAL_URL&ru=DOCUMENT_REFERRER&rnd=RANDOM', 'accelerated-mobile-pages' ),
|
2281 |
'type' => 'switch',
|
2282 |
'title' => 'StatCounter',
|
2283 |
'default' => ampforwp_get_default_analytics('7'),
|
|
|
|
|
|
|
2284 |
),
|
2285 |
array(
|
2286 |
'id' => 'sc-feild',
|
2287 |
'type' => 'text',
|
2288 |
'title' => __( 'StatCounter', 'accelerated-mobile-pages' ),
|
2289 |
'required' => array(
|
|
|
2290 |
array('ampforwp-StatCounter-switch', '=' , '1')
|
2291 |
),
|
2292 |
'desc' => __( 'Example: https://c.statcounter.com/PROJECT_ID/0/SECURITY_CODE/1/', 'accelerated-mobile-pages' ),
|
2299 |
'type' => 'switch',
|
2300 |
'title' => 'Histats Analytics',
|
2301 |
'default' => ampforwp_get_default_analytics('8'),
|
|
|
|
|
|
|
2302 |
),
|
2303 |
array(
|
2304 |
'id' => 'histats-feild',
|
2305 |
'type' => 'text',
|
2306 |
'title' => __( 'Histats Analytics', 'accelerated-mobile-pages' ),
|
2307 |
'required' => array(
|
|
|
2308 |
array('ampforwp-Histats-switch', '=' , '1')
|
2309 |
),
|
2310 |
'tooltip-subtitle' => __( 'Enter your Histats Analytics ID.', 'accelerated-mobile-pages' ),
|
2317 |
'type' => 'switch',
|
2318 |
'title' => 'Yandex Metrika',
|
2319 |
'default' => ampforwp_get_default_analytics('9'),
|
|
|
|
|
|
|
2320 |
),
|
2321 |
array(
|
2322 |
'id' =>'amp-Yandex-Metrika-analytics-code',
|
2324 |
'title' => __('Yandex Metrika Analytics ID','accelerated-mobile-pages'),
|
2325 |
'default' => '',
|
2326 |
'required' => array(
|
|
|
2327 |
array('ampforwp-Yandex-switch', '=' , '1')),
|
2328 |
'tooltip-subtitle' => __( 'Enter your Counter ID.', 'accelerated-mobile-pages' ),
|
2329 |
),
|
2333 |
'type' => 'switch',
|
2334 |
'title' => 'Chartbeat Analytics',
|
2335 |
'default' => ampforwp_get_default_analytics('10'),
|
|
|
|
|
|
|
2336 |
),
|
2337 |
|
2338 |
array(
|
2341 |
'title' => __('Chartbeat Analytics ID','accelerated-mobile-pages'),
|
2342 |
'default' => '',
|
2343 |
'required' => array(
|
|
|
2344 |
array('ampforwp-Chartbeat-switch', '=' , '1')),
|
2345 |
'tooltip-subtitle' => __( 'Enter your Account ID.', 'accelerated-mobile-pages' ),
|
2346 |
),
|
2350 |
'type' => 'switch',
|
2351 |
'title' => 'Alexa Metrics',
|
2352 |
'default' => ampforwp_get_default_analytics('11'),
|
|
|
|
|
|
|
2353 |
),
|
2354 |
array(
|
2355 |
'id' => 'ampforwp-alexa-account',
|
2356 |
'type' => 'text',
|
2357 |
'title' => __( 'Alexa Metrics Account', 'accelerated-mobile-pages' ),
|
2358 |
'required' => array(
|
|
|
2359 |
array('ampforwp-Alexa-switch', '=' , '1')
|
2360 |
),
|
2361 |
'tooltip-subtitle' => __( 'Enter Account Number given by Alexa Metrics', 'accelerated-mobile-pages' ),
|
2366 |
'type' => 'text',
|
2367 |
'title' => __( 'Alexa Metrics Domain', 'accelerated-mobile-pages' ),
|
2368 |
'required' => array(
|
|
|
2369 |
array('ampforwp-Alexa-switch', '=' , '1')
|
2370 |
),
|
2371 |
'tooltip-subtitle' => __( 'Enter the domain', 'accelerated-mobile-pages' ),
|
2377 |
'type' => 'switch',
|
2378 |
'title' => 'AFS Analytics',
|
2379 |
'default' => ampforwp_get_default_analytics('12'),
|
|
|
|
|
|
|
2380 |
),
|
2381 |
array(
|
2382 |
'id' => 'ampforwp-afs-siteid',
|
2383 |
'type' => 'text',
|
2384 |
'title' => __( 'Website ID', 'accelerated-mobile-pages' ),
|
2385 |
'required' => array(
|
|
|
2386 |
array('ampforwp-afs-analytics-switch', '=' , '1')
|
2387 |
),
|
2388 |
'tooltip-subtitle' => __( 'Enter the Website ID', 'accelerated-mobile-pages' ),
|
2389 |
'default' => '',
|
2390 |
'desc' => 'example: 00000003',
|
2391 |
+
),
|
2392 |
+
)
|
2393 |
+
)
|
|
|
|
|
2394 |
);
|
2395 |
//Get options for Structured Data Type
|
2396 |
if( !function_exists('ampforwp_get_sd_types') ){
|
includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php
CHANGED
@@ -92,7 +92,7 @@ class AMP_Blacklist_Sanitizer extends AMP_Base_Sanitizer {
|
|
92 |
if ( $element->hasAttributes() ) {
|
93 |
$attr = $element->getAttribute('type');
|
94 |
if ( '' !== $attr && 'application/ld+json' === $attr ) {
|
95 |
-
$element->nodeValue = $element->textContent;
|
96 |
continue;
|
97 |
}
|
98 |
}
|
92 |
if ( $element->hasAttributes() ) {
|
93 |
$attr = $element->getAttribute('type');
|
94 |
if ( '' !== $attr && 'application/ld+json' === $attr ) {
|
95 |
+
$element->nodeValue = htmlspecialchars($element->textContent);
|
96 |
continue;
|
97 |
}
|
98 |
}
|
includes/vendor/vendor-changelog.txt
CHANGED
@@ -49,4 +49,5 @@ Reason: To extend the functionality of sidebars and Pagebuilder
|
|
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
|
|
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
|
53 |
+
26. added htmlspecialchars($element->textContent); in includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php line no 95 check #2346
|
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,6 +183,13 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
183 |
|
184 |
== Changelog ==
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
= 0.9.97.4 (09th July 2018) =
|
187 |
* Fixed: Huge Performance upgrade in the way fetching the logo url #2317
|
188 |
* Fixed: Fatal Error due to unable to modify values in Structured Data Object #2327
|
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.5
|
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.97.5 (11th July 2018) =
|
187 |
+
* Fixed: Title disappearing in Design 1,2,3 when legacy pagebuilder is enabled #2341
|
188 |
+
* Fixed: ld+json getting a broken when special characters are added in the image. #2346
|
189 |
+
* Fixed: Hide by Category Breaking post metabox #2330
|
190 |
+
* Fixed: Hiding excerpt when global $redux_builder_amp is empty #2330
|
191 |
+
* Fixed: When Google Tag Manager is enabled, only Google Analytics should get disabled but not other analytics. #2340
|
192 |
+
|
193 |
= 0.9.97.4 (09th July 2018) =
|
194 |
* Fixed: Huge Performance upgrade in the way fetching the logo url #2317
|
195 |
* Fixed: Fatal Error due to unable to modify values in Structured Data Object #2327
|
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(
|
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( ampforwp_check_excerpt() ) {
|
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/index.php
CHANGED
@@ -92,7 +92,7 @@
|
|
92 |
$content = get_the_content();
|
93 |
} ?>
|
94 |
<p><?php global $redux_builder_amp;
|
95 |
-
if(
|
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( ampforwp_check_excerpt() ) {
|
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
@@ -83,7 +83,7 @@
|
|
83 |
$content = get_the_content();
|
84 |
} ?>
|
85 |
<p><?php global $redux_builder_amp;
|
86 |
-
if(
|
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 );
|
83 |
$content = get_the_content();
|
84 |
} ?>
|
85 |
<p><?php global $redux_builder_amp;
|
86 |
+
if( ampforwp_check_excerpt() ) {
|
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 );
|
templates/design-manager/design-2/archive.php
CHANGED
@@ -121,7 +121,7 @@
|
|
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(
|
125 |
$class = 'large-screen-excerpt';
|
126 |
if ( true == $redux_builder_amp['excerpt-option-design-2'] ) {
|
127 |
$class = 'small-screen-excerpt';
|
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( ampforwp_check_excerpt() ) {
|
125 |
$class = 'large-screen-excerpt';
|
126 |
if ( true == $redux_builder_amp['excerpt-option-design-2'] ) {
|
127 |
$class = 'small-screen-excerpt';
|
templates/design-manager/design-2/index.php
CHANGED
@@ -70,7 +70,7 @@
|
|
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(
|
74 |
$class = 'large-screen-excerpt';
|
75 |
if ( true == $redux_builder_amp['excerpt-option-design-2'] ) {
|
76 |
$class = 'small-screen-excerpt';
|
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( ampforwp_check_excerpt() ) {
|
74 |
$class = 'large-screen-excerpt';
|
75 |
if ( true == $redux_builder_amp['excerpt-option-design-2'] ) {
|
76 |
$class = 'small-screen-excerpt';
|
templates/design-manager/design-2/search.php
CHANGED
@@ -64,7 +64,7 @@
|
|
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(
|
68 |
if(has_excerpt()){
|
69 |
$content = get_the_excerpt();
|
70 |
}else{
|
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( ampforwp_check_excerpt() ) {
|
68 |
if(has_excerpt()){
|
69 |
$content = get_the_excerpt();
|
70 |
}else{
|
templates/design-manager/design-3/archive.php
CHANGED
@@ -154,7 +154,7 @@ if ( get_query_var( 'paged' ) ) {
|
|
154 |
|
155 |
|
156 |
<?php
|
157 |
-
if(
|
158 |
if(has_excerpt()){
|
159 |
$content = get_the_excerpt();
|
160 |
}else{
|
154 |
|
155 |
|
156 |
<?php
|
157 |
+
if( ampforwp_check_excerpt() ) {
|
158 |
if(has_excerpt()){
|
159 |
$content = get_the_excerpt();
|
160 |
}else{
|
templates/design-manager/design-3/index.php
CHANGED
@@ -161,7 +161,7 @@ if ( get_query_var( 'paged' ) ) {
|
|
161 |
|
162 |
|
163 |
<?php
|
164 |
-
if(
|
165 |
$class = 'large-screen-excerpt-design-3';
|
166 |
if ( true == $redux_builder_amp['excerpt-option-design-3'] ) {
|
167 |
$class = 'small-screen-excerpt-design-3';
|
161 |
|
162 |
|
163 |
<?php
|
164 |
+
if( ampforwp_check_excerpt() ) {
|
165 |
$class = 'large-screen-excerpt-design-3';
|
166 |
if ( true == $redux_builder_amp['excerpt-option-design-3'] ) {
|
167 |
$class = 'small-screen-excerpt-design-3';
|
templates/design-manager/design-3/search.php
CHANGED
@@ -87,7 +87,7 @@
|
|
87 |
|
88 |
|
89 |
<?php
|
90 |
-
if(
|
91 |
if(has_excerpt()){
|
92 |
$content = get_the_excerpt();
|
93 |
}else{
|
87 |
|
88 |
|
89 |
<?php
|
90 |
+
if( ampforwp_check_excerpt() ) {
|
91 |
if(has_excerpt()){
|
92 |
$content = get_the_excerpt();
|
93 |
}else{
|
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 if(
|
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 if(
|
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 if( ampforwp_check_excerpt() ) { 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 if( ampforwp_check_excerpt() ) { 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 if(
|
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 if( ampforwp_check_excerpt() ) { amp_loop_excerpt(20); } ?>
|
18 |
<div class="pt-dt">
|
19 |
<?php amp_loop_date(); ?>
|
20 |
</div>
|
templates/features.php
CHANGED
@@ -1113,6 +1113,7 @@ function ampforwp_new_dir( $dir ) {
|
|
1113 |
|
1114 |
// 10.1 Analytics Support added for Google Analytics
|
1115 |
global $redux_builder_amp;
|
|
|
1116 |
if ( true == $redux_builder_amp['ampforwp-ga-switch'] ){
|
1117 |
$ga_fields = array();
|
1118 |
$ampforwp_ga_fields = array();
|
@@ -1134,15 +1135,15 @@ function ampforwp_new_dir( $dir ) {
|
|
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 <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> type="googleanalytics" id="analytics1">
|
1140 |
<script type="application/json">
|
1141 |
<?php echo $ampforwp_ga_fields; ?>
|
1142 |
</script>
|
1143 |
</amp-analytics>
|
1144 |
<?php
|
1145 |
-
|
|
|
1146 |
|
1147 |
// 10.2 Analytics Support added for segment.com
|
1148 |
if ( true == $redux_builder_amp['ampforwp-Segment-switch'] ) { ?>
|
@@ -2676,14 +2677,20 @@ add_action('init', 'amp_gtm_remove_analytics_code');
|
|
2676 |
function amp_gtm_remove_analytics_code() {
|
2677 |
global $redux_builder_amp;
|
2678 |
if( isset($redux_builder_amp['amp-use-gtm-option']) && $redux_builder_amp['amp-use-gtm-option'] ) {
|
2679 |
-
|
2680 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2681 |
//Add GTM Analytics code right after the body tag
|
2682 |
add_action('ampforwp_body_beginning','amp_post_template_add_analytics_data',10);
|
2683 |
} else {
|
2684 |
remove_filter( 'amp_post_template_analytics', 'amp_gtm_add_gtm_support' );
|
2685 |
-
|
2686 |
}
|
|
|
2687 |
}
|
2688 |
//Remove other analytics if GTM is enable
|
2689 |
add_action('amp_post_template_footer','ampforwp_gtm_support', 9);
|
@@ -2816,11 +2823,11 @@ function ampforwp_facebook_comments_markup() {
|
|
2816 |
$facebook_comments_markup = '<section class="amp-wp-content post-comments amp-wp-article-content amp-facebook-comments" id="comments">';
|
2817 |
$facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
|
2818 |
layout="responsive" '.$locale.' data-numposts=';
|
2819 |
-
$facebook_comments_markup .= '"'. $redux_builder_amp['ampforwp-number-of-fb-no-of-comments']. '"
|
2820 |
if(ampforwp_get_data_consent()){
|
2821 |
-
$facebook_comments_markup .= 'data-block-on-consent';
|
2822 |
}
|
2823 |
-
$facebook_comments_markup .= 'data-href=" ' . get_permalink() . '
|
2824 |
$facebook_comments_markup .= '></amp-facebook-comments> </section>';
|
2825 |
|
2826 |
return $facebook_comments_markup;
|
@@ -4008,20 +4015,24 @@ function ampforwp_frontpage_comments() {
|
|
4008 |
add_action('pre_amp_render_post','ampforwp_apply_layout_builder_on_pages',20);
|
4009 |
function ampforwp_apply_layout_builder_on_pages($post_id) {
|
4010 |
global $redux_builder_amp;
|
4011 |
-
|
4012 |
if ( ampforwp_is_front_page() ) {
|
4013 |
$post_id = ampforwp_get_frontpage_id();
|
4014 |
}
|
4015 |
-
$sidebar_check = get_post_meta( $post_id,'ampforwp_custom_sidebar_select',true);
|
4016 |
|
4017 |
if ( $redux_builder_amp['ampforwp-content-builder'] ) {
|
|
|
|
|
|
|
4018 |
// Add Styling Builder Elements
|
4019 |
add_action('amp_post_template_css', 'ampforwp_pagebuilder_styling', 20);
|
4020 |
|
4021 |
-
|
4022 |
-
|
4023 |
-
|
4024 |
-
|
|
|
|
|
4025 |
}
|
4026 |
}
|
4027 |
|
@@ -4544,7 +4555,6 @@ function ampforwp_posts_to_remove () {
|
|
4544 |
'ignore_sticky_posts' => 1,
|
4545 |
'posts_per_page' => -1,
|
4546 |
'cat' => $new_selected_cats ,
|
4547 |
-
'fields' => 'ids',
|
4548 |
'post_type' => 'post',
|
4549 |
'post_status' => 'publish',
|
4550 |
)
|
@@ -7382,4 +7392,17 @@ function ampforwp_spotim_vuukle_styling(){
|
|
7382 |
display: block;text-align: center;background: #1f87e5;color: #fff;border-radius: 4px;
|
7383 |
} <?php
|
7384 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7385 |
}
|
1113 |
|
1114 |
// 10.1 Analytics Support added for Google Analytics
|
1115 |
global $redux_builder_amp;
|
1116 |
+
if( false == $redux_builder_amp['amp-use-gtm-option'] ) {
|
1117 |
if ( true == $redux_builder_amp['ampforwp-ga-switch'] ){
|
1118 |
$ga_fields = array();
|
1119 |
$ampforwp_ga_fields = array();
|
1135 |
$ga_fields['vars']['anonymizeIP'] = 'true';
|
1136 |
}
|
1137 |
$ampforwp_ga_fields = json_encode( $ga_fields);
|
1138 |
+
$ampforwp_ga_fields = apply_filters('ampforwp_advance_google_analytics', $ampforwp_ga_fields ); ?>
|
|
|
1139 |
<amp-analytics <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> type="googleanalytics" id="analytics1">
|
1140 |
<script type="application/json">
|
1141 |
<?php echo $ampforwp_ga_fields; ?>
|
1142 |
</script>
|
1143 |
</amp-analytics>
|
1144 |
<?php
|
1145 |
+
}
|
1146 |
+
}//code ends for supporting Google Analytics
|
1147 |
|
1148 |
// 10.2 Analytics Support added for segment.com
|
1149 |
if ( true == $redux_builder_amp['ampforwp-Segment-switch'] ) { ?>
|
2677 |
function amp_gtm_remove_analytics_code() {
|
2678 |
global $redux_builder_amp;
|
2679 |
if( isset($redux_builder_amp['amp-use-gtm-option']) && $redux_builder_amp['amp-use-gtm-option'] ) {
|
2680 |
+
|
2681 |
+
///////////////////////////////////////////////////////////////////////////
|
2682 |
+
// will add the scripts and analytics codes since #2340 version 0.9.97.5 //
|
2683 |
+
///////////////////////////////////////////////////////////////////////////
|
2684 |
+
|
2685 |
+
// remove_action('amp_post_template_footer','ampforwp_analytics',11);
|
2686 |
+
// remove_action('amp_post_template_head','ampforwp_register_analytics_script', 20);
|
2687 |
+
|
2688 |
//Add GTM Analytics code right after the body tag
|
2689 |
add_action('ampforwp_body_beginning','amp_post_template_add_analytics_data',10);
|
2690 |
} else {
|
2691 |
remove_filter( 'amp_post_template_analytics', 'amp_gtm_add_gtm_support' );
|
|
|
2692 |
}
|
2693 |
+
|
2694 |
}
|
2695 |
//Remove other analytics if GTM is enable
|
2696 |
add_action('amp_post_template_footer','ampforwp_gtm_support', 9);
|
2823 |
$facebook_comments_markup = '<section class="amp-wp-content post-comments amp-wp-article-content amp-facebook-comments" id="comments">';
|
2824 |
$facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
|
2825 |
layout="responsive" '.$locale.' data-numposts=';
|
2826 |
+
$facebook_comments_markup .= '"'. $redux_builder_amp['ampforwp-number-of-fb-no-of-comments']. '"';
|
2827 |
if(ampforwp_get_data_consent()){
|
2828 |
+
$facebook_comments_markup .= ' data-block-on-consent ';
|
2829 |
}
|
2830 |
+
$facebook_comments_markup .= 'data-href=" ' . get_permalink() . '"';
|
2831 |
$facebook_comments_markup .= '></amp-facebook-comments> </section>';
|
2832 |
|
2833 |
return $facebook_comments_markup;
|
4015 |
add_action('pre_amp_render_post','ampforwp_apply_layout_builder_on_pages',20);
|
4016 |
function ampforwp_apply_layout_builder_on_pages($post_id) {
|
4017 |
global $redux_builder_amp;
|
4018 |
+
$sidebar_check = null;
|
4019 |
if ( ampforwp_is_front_page() ) {
|
4020 |
$post_id = ampforwp_get_frontpage_id();
|
4021 |
}
|
|
|
4022 |
|
4023 |
if ( $redux_builder_amp['ampforwp-content-builder'] ) {
|
4024 |
+
if ( is_page() ) {
|
4025 |
+
$sidebar_check = get_post_meta( $post_id,'ampforwp_custom_sidebar_select',true);
|
4026 |
+
}
|
4027 |
// Add Styling Builder Elements
|
4028 |
add_action('amp_post_template_css', 'ampforwp_pagebuilder_styling', 20);
|
4029 |
|
4030 |
+
if ( 'layout-builder' == $sidebar_check ) {
|
4031 |
+
// Removed Titles for Pagebuilder elements
|
4032 |
+
remove_filter( 'ampforwp_design_elements', 'ampforwp_add_element_the_title' );
|
4033 |
+
remove_action('ampforwp_design_2_frontpage_title','ampforwp_design_2_frontpage_title');
|
4034 |
+
remove_action('ampforwp_design_2_frontpage_title','ampforwp_design_2_frontpage_title');
|
4035 |
+
}
|
4036 |
}
|
4037 |
}
|
4038 |
|
4555 |
'ignore_sticky_posts' => 1,
|
4556 |
'posts_per_page' => -1,
|
4557 |
'cat' => $new_selected_cats ,
|
|
|
4558 |
'post_type' => 'post',
|
4559 |
'post_status' => 'publish',
|
4560 |
)
|
7392 |
display: block;text-align: center;background: #1f87e5;color: #fff;border-radius: 4px;
|
7393 |
} <?php
|
7394 |
}
|
7395 |
+
}
|
7396 |
+
|
7397 |
+
|
7398 |
+
function ampforwp_check_excerpt(){
|
7399 |
+
global $redux_builder_amp;
|
7400 |
+
|
7401 |
+
$value = '';
|
7402 |
+
$value = ( isset( $redux_builder_amp['excerpt-option'] ) && $redux_builder_amp['excerpt-option'] ) ;
|
7403 |
+
if ( null == $value ) {
|
7404 |
+
$value = '1';
|
7405 |
+
}
|
7406 |
+
|
7407 |
+
return $value;
|
7408 |
}
|