Version Description
[16th December 2016] = * Proper Details at http://ampforwp.com/new/ * PHP7 Compatibility * Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 ) * Custom CSS not working in Design one (#249) * Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260) * How to remove Powered by WordPress from Design-1 of AMP ( #264 ) * Non-amp Homepage support added (#267) * using get_avatar() (#259) * Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268) * Validation Issue fixed: Script Tag removed from the content. * Featured image in Design 1 in single #261 * After Fresh installation - a save is required Fixed * Excerpt length controlled * Design One has thumbnails on the Homepage * Non-AMP link goes to the wrong page, issue fixed. * Archive pages were broken, fixed. * Option to Enable & Disable the Next/Previous links in Single * WhatsApp sharing not working, issue fixed. * Category Taxonomy has extra ':' in the word. * The word 'Ago' is now translatable. * Yoast SEO with AMP compatibility issue fixed. * Several Minor Polishing in the code * Footer Ad gets covered by Sticky Social Icons (#269) * Smaller image size when image caption is used in Design-2 (#263) * Footer ad with Sticky Social bar issue fix * Checked with WordPress 4.7 * Ad #1 was messing up with the title, issue fixed. * Compatibility improved with AMP WooCommerce.
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.1 |
Comparing to | |
See all releases |
Code changes from version 0.9 to 0.9.1
- README.md +33 -3
- accelerated-moblie-pages.php +3 -3
- includes/options/options-init.php +27 -6
- includes/options/redux-framework/inc/browser.php +45 -45
- includes/options/redux-framework/inc/fields/editor/field_editor_c.php +0 -0
- includes/options/redux-framework/inc/fields/textarea/field_textarea.php +79 -0
- includes/options/redux-framework/inc/validation/preg_replace/validation_preg_replace.php +2 -2
- readme.txt +34 -4
- templates/design-manager.php +20 -14
- templates/design-manager/design-1/elements/meta-info.php +12 -4
- templates/design-manager/design-1/elements/meta-taxonomy.php +26 -3
- templates/design-manager/design-1/elements/related-posts.php +2 -2
- templates/design-manager/design-1/elements/social-icons.php +3 -3
- templates/design-manager/design-1/footer.php +36 -4
- templates/design-manager/design-1/header-bar.php +19 -5
- templates/design-manager/design-1/index.php +35 -14
- templates/design-manager/design-1/style.php +25 -14
- templates/design-manager/design-2/elements/content.php +46 -23
- templates/design-manager/design-2/elements/meta-info.php +20 -3
- templates/design-manager/design-2/elements/meta-taxonomy.php +25 -13
- templates/design-manager/design-2/elements/related-posts.php +1 -1
- templates/design-manager/design-2/elements/social-icons.php +2 -2
- templates/design-manager/design-2/footer.php +34 -20
- templates/design-manager/design-2/header-bar.php +10 -5
- templates/design-manager/design-2/index.php +4 -5
- templates/design-manager/design-2/style.php +18 -4
- templates/features.php +74 -24
@@ -2,12 +2,12 @@
|
|
2 |
The Must have AMP plugin for WordPress. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. More details on https://wordpress.org/plugins/accelerated-mobile-pages/ & http://AMPforWP.com
|
3 |
|
4 |
=== AMP for WP - Accelerated Mobile Pages ===
|
5 |
-
Contributors: mohammed_kaludi, ahmedkaludi
|
6 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin
|
7 |
Donate link: https://www.paypal.me/Kaludi/5
|
8 |
Requires at least: 3.0
|
9 |
-
Tested up to: 4.
|
10 |
-
Stable tag: 0.9
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -124,6 +124,36 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
|
|
124 |
|
125 |
|
126 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
= 0.9 =
|
128 |
* Proper Details at http://ampforwp.com/amp-pagebuilder/
|
129 |
* Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
|
2 |
The Must have AMP plugin for WordPress. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. More details on https://wordpress.org/plugins/accelerated-mobile-pages/ & http://AMPforWP.com
|
3 |
|
4 |
=== AMP for WP - Accelerated Mobile Pages ===
|
5 |
+
Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
|
6 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin
|
7 |
Donate link: https://www.paypal.me/Kaludi/5
|
8 |
Requires at least: 3.0
|
9 |
+
Tested up to: 4.7
|
10 |
+
Stable tag: 0.9.1
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
124 |
|
125 |
|
126 |
== Changelog ==
|
127 |
+
= 0.9.1 [16th December 2016] =
|
128 |
+
* Proper Details at http://ampforwp.com/new/
|
129 |
+
* PHP7 Compatibility
|
130 |
+
* Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
|
131 |
+
* Custom CSS not working in Design one (#249)
|
132 |
+
* Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
|
133 |
+
* How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
|
134 |
+
* Non-amp Homepage support added (#267)
|
135 |
+
* using get_avatar() (#259)
|
136 |
+
* Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
|
137 |
+
* Validation Issue fixed: Script Tag removed from the content.
|
138 |
+
* Featured image in Design 1 in single #261
|
139 |
+
* After Fresh installation - a save is required Fixed
|
140 |
+
* Excerpt length controlled
|
141 |
+
* Design One has thumbnails on the Homepage
|
142 |
+
* Non-AMP link goes to the wrong page, issue fixed.
|
143 |
+
* Archive pages were broken, fixed.
|
144 |
+
* Option to Enable & Disable the Next/Previous links in Single
|
145 |
+
* WhatsApp sharing not working, issue fixed.
|
146 |
+
* Category Taxonomy has extra ':' in the word.
|
147 |
+
* The word 'Ago' is now translatable.
|
148 |
+
* Yoast SEO with AMP compatibility issue fixed.
|
149 |
+
* Several Minor Polishing in the code
|
150 |
+
* Footer Ad gets covered by Sticky Social Icons (#269)
|
151 |
+
* Smaller image size when “image caption” is used in Design-2 (#263)
|
152 |
+
* Footer ad with Sticky Social bar issue fix
|
153 |
+
* Checked with WordPress 4.7
|
154 |
+
* Ad #1 was messing up with the title, issue fixed.
|
155 |
+
* Compatibility improved with AMP WooCommerce.
|
156 |
+
|
157 |
= 0.9 =
|
158 |
* Proper Details at http://ampforwp.com/amp-pagebuilder/
|
159 |
* Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
|
@@ -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
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: http://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/5
|
@@ -26,7 +26,7 @@ add_action( 'init', 'ampforwp_add_custom_post_support',11);
|
|
26 |
|
27 |
define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
|
28 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
29 |
-
define('AMPFORWP_VERSION','0.
|
30 |
|
31 |
/*
|
32 |
* Load Files only in the backend
|
@@ -91,4 +91,4 @@ function ampforwp_plugin_init() {
|
|
91 |
new Ampforwp_Init;
|
92 |
}
|
93 |
}
|
94 |
-
add_action('init','ampforwp_plugin_init',9);
|
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.1
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: http://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/5
|
26 |
|
27 |
define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
|
28 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
29 |
+
define('AMPFORWP_VERSION','0.9.1');
|
30 |
|
31 |
/*
|
32 |
* Load Files only in the backend
|
91 |
new Ampforwp_Init;
|
92 |
}
|
93 |
}
|
94 |
+
add_action('init','ampforwp_plugin_init',9);
|
@@ -302,6 +302,13 @@
|
|
302 |
'subtitle' => __('Enable or Disable AMP on all Pages', 'redux-framework-demo'),
|
303 |
'default' => 1,
|
304 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
// array(
|
306 |
// 'id' => 'amp-design-selector',
|
307 |
// 'type' => 'select',
|
@@ -360,6 +367,7 @@
|
|
360 |
'title' => __( 'SEO', 'redux-framework-demo' ),
|
361 |
'desc' => __( '', 'redux-framework-demo'),
|
362 |
'id' => 'amp-seo',
|
|
|
363 |
'subsection' => true,
|
364 |
'fields' => array(
|
365 |
|
@@ -380,13 +388,11 @@
|
|
380 |
|
381 |
array(
|
382 |
'id' => 'ampforwp-seo-custom-additional-meta',
|
383 |
-
'type' => '
|
384 |
'title' => __('Additional tags for Head section AMP page', 'redux-framework-demo'),
|
385 |
'subtitle' => __('Adds additional Meta to the head section', 'redux-framework-demo', 'redux-framework-demo'),
|
386 |
-
'mode' => 'html',
|
387 |
-
'theme' => 'monokai',
|
388 |
'desc' => __('Only link and meta tags allowed', 'redux-framework-demo'),
|
389 |
-
'
|
390 |
),
|
391 |
|
392 |
)
|
@@ -622,6 +628,14 @@ if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
|
|
622 |
'default' => 1,
|
623 |
'subtitle' => __('Enable Social Icons in single', 'redux-framework-demo'),
|
624 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
// Width and Height of Image
|
626 |
array(
|
627 |
'id' => 'enable-single-featured-img-width',
|
@@ -864,9 +878,9 @@ if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
|
|
864 |
),
|
865 |
array(
|
866 |
'id' => 'amp-translator-footer-text',
|
867 |
-
'type' => '
|
868 |
'title' => __('Footer', 'redux-framework-demo'),
|
869 |
-
'default' => '
|
870 |
'placeholder'=>'write here'
|
871 |
),
|
872 |
array(
|
@@ -925,6 +939,13 @@ if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
|
|
925 |
'default' => 'Edit',
|
926 |
'placeholder'=>'write here'
|
927 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
928 |
)
|
929 |
) );
|
930 |
|
302 |
'subtitle' => __('Enable or Disable AMP on all Pages', 'redux-framework-demo'),
|
303 |
'default' => 1,
|
304 |
),
|
305 |
+
array(
|
306 |
+
'id' =>'amp-on-off-support-for-non-amp-home-page',
|
307 |
+
'type' => 'switch',
|
308 |
+
'title' => __('Non-AMP HomePage link in Header', 'redux-framework-demo'),
|
309 |
+
'subtitle' => __('If you want users in header to go to non-AMP website from the Header, then you can enable this option', 'redux-framework-demo'),
|
310 |
+
'default' => 0,
|
311 |
+
),
|
312 |
// array(
|
313 |
// 'id' => 'amp-design-selector',
|
314 |
// 'type' => 'select',
|
367 |
'title' => __( 'SEO', 'redux-framework-demo' ),
|
368 |
'desc' => __( '', 'redux-framework-demo'),
|
369 |
'id' => 'amp-seo',
|
370 |
+
'desc' => '<strong>Note : <br/> This section only works if Yoast SEO Plugin is Activated (Exception : Additional Meta Tags Section) </strong>',
|
371 |
'subsection' => true,
|
372 |
'fields' => array(
|
373 |
|
388 |
|
389 |
array(
|
390 |
'id' => 'ampforwp-seo-custom-additional-meta',
|
391 |
+
'type' => 'textarea',
|
392 |
'title' => __('Additional tags for Head section AMP page', 'redux-framework-demo'),
|
393 |
'subtitle' => __('Adds additional Meta to the head section', 'redux-framework-demo', 'redux-framework-demo'),
|
|
|
|
|
394 |
'desc' => __('Only link and meta tags allowed', 'redux-framework-demo'),
|
395 |
+
'placeholder' => "<!-- Paste your Additional HTML , that goes between <head> </head> tags -->"
|
396 |
),
|
397 |
|
398 |
)
|
628 |
'default' => 1,
|
629 |
'subtitle' => __('Enable Social Icons in single', 'redux-framework-demo'),
|
630 |
),
|
631 |
+
//deselectable next previous links
|
632 |
+
array(
|
633 |
+
'id' => 'enable-single-next-prev',
|
634 |
+
'type' => 'switch',
|
635 |
+
'title' => __('Next-Previous Links', 'redux-framework-demo'),
|
636 |
+
'default' => 1,
|
637 |
+
'subtitle' => __('Enable Next-Previous links in single', 'redux-framework-demo'),
|
638 |
+
),
|
639 |
// Width and Height of Image
|
640 |
array(
|
641 |
'id' => 'enable-single-featured-img-width',
|
878 |
),
|
879 |
array(
|
880 |
'id' => 'amp-translator-footer-text',
|
881 |
+
'type' => 'textarea',
|
882 |
'title' => __('Footer', 'redux-framework-demo'),
|
883 |
+
'default' => 'All Rights Reserved',
|
884 |
'placeholder'=>'write here'
|
885 |
),
|
886 |
array(
|
939 |
'default' => 'Edit',
|
940 |
'placeholder'=>'write here'
|
941 |
),
|
942 |
+
array(
|
943 |
+
'id' => 'amp-translator-ago-date-text',
|
944 |
+
'type' => 'text',
|
945 |
+
'title' => __('ago', 'redux-framework-demo'),
|
946 |
+
'default' => 'ago',
|
947 |
+
'placeholder'=>'write here'
|
948 |
+
),
|
949 |
)
|
950 |
) );
|
951 |
|
@@ -110,7 +110,7 @@ class Browser
|
|
110 |
|
111 |
const OPERATING_SYSTEM_UNKNOWN = 'unknown';
|
112 |
|
113 |
-
public function
|
114 |
{
|
115 |
$this->reset();
|
116 |
if ($userAgent != "") {
|
@@ -260,8 +260,8 @@ class Browser
|
|
260 |
* Is the browser from facebook?
|
261 |
* @return boolean True if the browser is from facebook otherwise false
|
262 |
*/
|
263 |
-
public function isFacebook()
|
264 |
-
{
|
265 |
return $this->_is_facebook;
|
266 |
}
|
267 |
|
@@ -305,9 +305,9 @@ class Browser
|
|
305 |
* Set the Browser to be a Facebook request
|
306 |
* @param boolean $value is the browser a robot or not
|
307 |
*/
|
308 |
-
protected function setFacebook($value = true)
|
309 |
-
{
|
310 |
-
$this->_is_facebook = $value;
|
311 |
}
|
312 |
|
313 |
/**
|
@@ -420,7 +420,7 @@ class Browser
|
|
420 |
$this->checkBrowserLynx() ||
|
421 |
$this->checkBrowserShiretoko() ||
|
422 |
$this->checkBrowserIceCat() ||
|
423 |
-
$this->checkBrowserIceweasel() ||
|
424 |
$this->checkBrowserW3CValidator() ||
|
425 |
$this->checkBrowserMozilla() /* Mozilla is such an open standard that you must check it last */
|
426 |
);
|
@@ -502,7 +502,7 @@ class Browser
|
|
502 |
}
|
503 |
return false;
|
504 |
}
|
505 |
-
|
506 |
/**
|
507 |
* Determine if the browser is the BingBot or not (last updated 1.9)
|
508 |
* @return boolean True if the browser is the BingBot otherwise false
|
@@ -1099,10 +1099,10 @@ class Browser
|
|
1099 |
* Detect Version for the Safari browser on iOS devices
|
1100 |
* @return boolean True if it detects the version correctly otherwise false
|
1101 |
*/
|
1102 |
-
protected function getSafariVersionOnIos()
|
1103 |
{
|
1104 |
$aresult = explode('/',stristr($this->_agent,'Version'));
|
1105 |
-
if( isset($aresult[1]) )
|
1106 |
{
|
1107 |
$aversion = explode(' ',$aresult[1]);
|
1108 |
$this->setVersion($aversion[0]);
|
@@ -1115,10 +1115,10 @@ class Browser
|
|
1115 |
* Detect Version for the Chrome browser on iOS devices
|
1116 |
* @return boolean True if it detects the version correctly otherwise false
|
1117 |
*/
|
1118 |
-
protected function getChromeVersionOnIos()
|
1119 |
{
|
1120 |
$aresult = explode('/',stristr($this->_agent,'CriOS'));
|
1121 |
-
if( isset($aresult[1]) )
|
1122 |
{
|
1123 |
$aversion = explode(' ',$aresult[1]);
|
1124 |
$this->setVersion($aversion[0]);
|
@@ -1209,71 +1209,71 @@ class Browser
|
|
1209 |
*/
|
1210 |
protected function checkPlatform()
|
1211 |
{
|
1212 |
-
if (stripos($this->_agent, 'windows') !== false)
|
1213 |
{
|
1214 |
$this->_platform = self::PLATFORM_WINDOWS;
|
1215 |
-
}
|
1216 |
-
else if (stripos($this->_agent, 'iPad') !== false)
|
1217 |
{
|
1218 |
$this->_platform = self::PLATFORM_IPAD;
|
1219 |
-
}
|
1220 |
-
else if (stripos($this->_agent, 'iPod') !== false)
|
1221 |
{
|
1222 |
$this->_platform = self::PLATFORM_IPOD;
|
1223 |
-
}
|
1224 |
-
else if (stripos($this->_agent, 'iPhone') !== false)
|
1225 |
{
|
1226 |
$this->_platform = self::PLATFORM_IPHONE;
|
1227 |
-
}
|
1228 |
-
elseif (stripos($this->_agent, 'mac') !== false)
|
1229 |
{
|
1230 |
$this->_platform = self::PLATFORM_APPLE;
|
1231 |
-
}
|
1232 |
-
elseif (stripos($this->_agent, 'android') !== false)
|
1233 |
{
|
1234 |
$this->_platform = self::PLATFORM_ANDROID;
|
1235 |
-
}
|
1236 |
-
elseif (stripos($this->_agent, 'linux') !== false)
|
1237 |
{
|
1238 |
$this->_platform = self::PLATFORM_LINUX;
|
1239 |
-
}
|
1240 |
-
else if (stripos($this->_agent, 'Nokia') !== false)
|
1241 |
{
|
1242 |
$this->_platform = self::PLATFORM_NOKIA;
|
1243 |
-
}
|
1244 |
-
else if (stripos($this->_agent, 'BlackBerry') !== false)
|
1245 |
{
|
1246 |
$this->_platform = self::PLATFORM_BLACKBERRY;
|
1247 |
-
}
|
1248 |
-
elseif (stripos($this->_agent, 'FreeBSD') !== false)
|
1249 |
{
|
1250 |
$this->_platform = self::PLATFORM_FREEBSD;
|
1251 |
-
}
|
1252 |
-
elseif (stripos($this->_agent, 'OpenBSD') !== false)
|
1253 |
{
|
1254 |
$this->_platform = self::PLATFORM_OPENBSD;
|
1255 |
-
}
|
1256 |
-
elseif (stripos($this->_agent, 'NetBSD') !== false)
|
1257 |
{
|
1258 |
$this->_platform = self::PLATFORM_NETBSD;
|
1259 |
-
}
|
1260 |
-
elseif (stripos($this->_agent, 'OpenSolaris') !== false)
|
1261 |
{
|
1262 |
$this->_platform = self::PLATFORM_OPENSOLARIS;
|
1263 |
-
}
|
1264 |
-
elseif (stripos($this->_agent, 'SunOS') !== false)
|
1265 |
{
|
1266 |
$this->_platform = self::PLATFORM_SUNOS;
|
1267 |
-
}
|
1268 |
-
elseif (stripos($this->_agent, 'OS\/2') !== false)
|
1269 |
{
|
1270 |
$this->_platform = self::PLATFORM_OS2;
|
1271 |
-
}
|
1272 |
-
elseif (stripos($this->_agent, 'BeOS') !== false)
|
1273 |
{
|
1274 |
$this->_platform = self::PLATFORM_BEOS;
|
1275 |
-
}
|
1276 |
-
elseif (stripos($this->_agent, 'win') !== false)
|
1277 |
{
|
1278 |
$this->_platform = self::PLATFORM_WINDOWS;
|
1279 |
}
|
110 |
|
111 |
const OPERATING_SYSTEM_UNKNOWN = 'unknown';
|
112 |
|
113 |
+
public function __construct($userAgent = "")
|
114 |
{
|
115 |
$this->reset();
|
116 |
if ($userAgent != "") {
|
260 |
* Is the browser from facebook?
|
261 |
* @return boolean True if the browser is from facebook otherwise false
|
262 |
*/
|
263 |
+
public function isFacebook()
|
264 |
+
{
|
265 |
return $this->_is_facebook;
|
266 |
}
|
267 |
|
305 |
* Set the Browser to be a Facebook request
|
306 |
* @param boolean $value is the browser a robot or not
|
307 |
*/
|
308 |
+
protected function setFacebook($value = true)
|
309 |
+
{
|
310 |
+
$this->_is_facebook = $value;
|
311 |
}
|
312 |
|
313 |
/**
|
420 |
$this->checkBrowserLynx() ||
|
421 |
$this->checkBrowserShiretoko() ||
|
422 |
$this->checkBrowserIceCat() ||
|
423 |
+
$this->checkBrowserIceweasel() ||
|
424 |
$this->checkBrowserW3CValidator() ||
|
425 |
$this->checkBrowserMozilla() /* Mozilla is such an open standard that you must check it last */
|
426 |
);
|
502 |
}
|
503 |
return false;
|
504 |
}
|
505 |
+
|
506 |
/**
|
507 |
* Determine if the browser is the BingBot or not (last updated 1.9)
|
508 |
* @return boolean True if the browser is the BingBot otherwise false
|
1099 |
* Detect Version for the Safari browser on iOS devices
|
1100 |
* @return boolean True if it detects the version correctly otherwise false
|
1101 |
*/
|
1102 |
+
protected function getSafariVersionOnIos()
|
1103 |
{
|
1104 |
$aresult = explode('/',stristr($this->_agent,'Version'));
|
1105 |
+
if( isset($aresult[1]) )
|
1106 |
{
|
1107 |
$aversion = explode(' ',$aresult[1]);
|
1108 |
$this->setVersion($aversion[0]);
|
1115 |
* Detect Version for the Chrome browser on iOS devices
|
1116 |
* @return boolean True if it detects the version correctly otherwise false
|
1117 |
*/
|
1118 |
+
protected function getChromeVersionOnIos()
|
1119 |
{
|
1120 |
$aresult = explode('/',stristr($this->_agent,'CriOS'));
|
1121 |
+
if( isset($aresult[1]) )
|
1122 |
{
|
1123 |
$aversion = explode(' ',$aresult[1]);
|
1124 |
$this->setVersion($aversion[0]);
|
1209 |
*/
|
1210 |
protected function checkPlatform()
|
1211 |
{
|
1212 |
+
if (stripos($this->_agent, 'windows') !== false)
|
1213 |
{
|
1214 |
$this->_platform = self::PLATFORM_WINDOWS;
|
1215 |
+
}
|
1216 |
+
else if (stripos($this->_agent, 'iPad') !== false)
|
1217 |
{
|
1218 |
$this->_platform = self::PLATFORM_IPAD;
|
1219 |
+
}
|
1220 |
+
else if (stripos($this->_agent, 'iPod') !== false)
|
1221 |
{
|
1222 |
$this->_platform = self::PLATFORM_IPOD;
|
1223 |
+
}
|
1224 |
+
else if (stripos($this->_agent, 'iPhone') !== false)
|
1225 |
{
|
1226 |
$this->_platform = self::PLATFORM_IPHONE;
|
1227 |
+
}
|
1228 |
+
elseif (stripos($this->_agent, 'mac') !== false)
|
1229 |
{
|
1230 |
$this->_platform = self::PLATFORM_APPLE;
|
1231 |
+
}
|
1232 |
+
elseif (stripos($this->_agent, 'android') !== false)
|
1233 |
{
|
1234 |
$this->_platform = self::PLATFORM_ANDROID;
|
1235 |
+
}
|
1236 |
+
elseif (stripos($this->_agent, 'linux') !== false)
|
1237 |
{
|
1238 |
$this->_platform = self::PLATFORM_LINUX;
|
1239 |
+
}
|
1240 |
+
else if (stripos($this->_agent, 'Nokia') !== false)
|
1241 |
{
|
1242 |
$this->_platform = self::PLATFORM_NOKIA;
|
1243 |
+
}
|
1244 |
+
else if (stripos($this->_agent, 'BlackBerry') !== false)
|
1245 |
{
|
1246 |
$this->_platform = self::PLATFORM_BLACKBERRY;
|
1247 |
+
}
|
1248 |
+
elseif (stripos($this->_agent, 'FreeBSD') !== false)
|
1249 |
{
|
1250 |
$this->_platform = self::PLATFORM_FREEBSD;
|
1251 |
+
}
|
1252 |
+
elseif (stripos($this->_agent, 'OpenBSD') !== false)
|
1253 |
{
|
1254 |
$this->_platform = self::PLATFORM_OPENBSD;
|
1255 |
+
}
|
1256 |
+
elseif (stripos($this->_agent, 'NetBSD') !== false)
|
1257 |
{
|
1258 |
$this->_platform = self::PLATFORM_NETBSD;
|
1259 |
+
}
|
1260 |
+
elseif (stripos($this->_agent, 'OpenSolaris') !== false)
|
1261 |
{
|
1262 |
$this->_platform = self::PLATFORM_OPENSOLARIS;
|
1263 |
+
}
|
1264 |
+
elseif (stripos($this->_agent, 'SunOS') !== false)
|
1265 |
{
|
1266 |
$this->_platform = self::PLATFORM_SUNOS;
|
1267 |
+
}
|
1268 |
+
elseif (stripos($this->_agent, 'OS\/2') !== false)
|
1269 |
{
|
1270 |
$this->_platform = self::PLATFORM_OS2;
|
1271 |
+
}
|
1272 |
+
elseif (stripos($this->_agent, 'BeOS') !== false)
|
1273 |
{
|
1274 |
$this->_platform = self::PLATFORM_BEOS;
|
1275 |
+
}
|
1276 |
+
elseif (stripos($this->_agent, 'win') !== false)
|
1277 |
{
|
1278 |
$this->_platform = self::PLATFORM_WINDOWS;
|
1279 |
}
|
File without changes
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* @package Redux_Framework
|
5 |
+
* @subpackage Fields
|
6 |
+
* @access public
|
7 |
+
* @global $optname
|
8 |
+
* @internal Internal Note string
|
9 |
+
* @link http://reduxframework.com
|
10 |
+
* @method Test
|
11 |
+
* @name $globalvariablename
|
12 |
+
* @param string $this->field['test'] This is cool.
|
13 |
+
* @param string|boolean $field[default] Default value for this field.
|
14 |
+
* @return Test
|
15 |
+
* @see ParentClass
|
16 |
+
* @since Redux 3.0.9
|
17 |
+
* @todo Still need to fix this!
|
18 |
+
* @var string cool
|
19 |
+
* @var int notcool
|
20 |
+
* @param string[] $options {
|
21 |
+
* @type boolean $required Whether this element is required
|
22 |
+
* @type string $label The display name for this element
|
23 |
+
*/
|
24 |
+
|
25 |
+
// Exit if accessed directly
|
26 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
27 |
+
exit;
|
28 |
+
}
|
29 |
+
|
30 |
+
if ( ! class_exists( 'ReduxFramework_textarea' ) ) {
|
31 |
+
class ReduxFramework_textarea {
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Field Constructor.
|
35 |
+
*
|
36 |
+
* @param $value Constructed by Redux class. Based on the passing in $field['defaults'] value and what is stored in the database.
|
37 |
+
* @param $parent ReduxFramework object is passed for easier pointing.
|
38 |
+
*
|
39 |
+
* @since ReduxFramework 1.0.0
|
40 |
+
* @type string $field [test] Description. Default <value>. Accepts <value>, <value>.
|
41 |
+
*/
|
42 |
+
function __construct( $field = array(), $value = '', $parent ) {
|
43 |
+
$this->parent = $parent;
|
44 |
+
$this->field = $field;
|
45 |
+
$this->value = $value;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Field Render Function.
|
50 |
+
* Takes the vars and outputs the HTML for the field in the settings
|
51 |
+
*
|
52 |
+
* @since ReduxFramework 1.0.0
|
53 |
+
*
|
54 |
+
* @param array $arr (See above)
|
55 |
+
*
|
56 |
+
* @return Object A new editor object.
|
57 |
+
**/
|
58 |
+
function render() {
|
59 |
+
|
60 |
+
$this->field['placeholder'] = isset( $this->field['placeholder'] ) ? $this->field['placeholder'] : "";
|
61 |
+
$this->field['rows'] = isset( $this->field['rows'] ) ? $this->field['rows'] : 6;
|
62 |
+
$readonly = ( isset( $this->field['readonly'] ) && $this->field['readonly']) ? ' readonly="readonly"' : '';
|
63 |
+
// The $this->field variables are already escaped in the ReduxFramework Class.
|
64 |
+
?>
|
65 |
+
<textarea <?php echo $readonly; ?> name="<?php echo esc_attr($this->field['name'] . $this->field['name_suffix']); ?>" id="<?php echo $this->field['id']; ?>-textarea" placeholder="<?php echo esc_attr( $this->field['placeholder'] ); ?>" class="large-text <?php echo esc_attr($this->field['class']); ?>" rows="<?php echo esc_attr($this->field['rows']); ?>"><?php echo esc_textarea( $this->value ); ?></textarea>
|
66 |
+
<?php
|
67 |
+
}
|
68 |
+
|
69 |
+
function sanitize( $field, $value ) {
|
70 |
+
if ( ! isset( $value ) || empty( $value ) ) {
|
71 |
+
$value = "";
|
72 |
+
} else {
|
73 |
+
$value = esc_textarea( $value );
|
74 |
+
}
|
75 |
+
|
76 |
+
return $value;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
@@ -26,8 +26,8 @@
|
|
26 |
* @since ReduxFramework 1.0.0
|
27 |
*/
|
28 |
function validate() {
|
29 |
-
|
30 |
$this->value = preg_replace( $this->field['preg']['pattern'], $this->field['preg']['replacement'], $this->value );
|
31 |
} //function
|
32 |
} //class
|
33 |
-
}
|
26 |
* @since ReduxFramework 1.0.0
|
27 |
*/
|
28 |
function validate() {
|
29 |
+
|
30 |
$this->value = preg_replace( $this->field['preg']['pattern'], $this->field['preg']['replacement'], $this->value );
|
31 |
} //function
|
32 |
} //class
|
33 |
+
}
|
@@ -1,10 +1,10 @@
|
|
1 |
=== AMP for WP - Accelerated Mobile Pages ===
|
2 |
-
Contributors: mohammed_kaludi, ahmedkaludi
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin
|
4 |
Donate link: https://www.paypal.me/Kaludi/5
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 0.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -121,6 +121,36 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
|
|
121 |
|
122 |
|
123 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
= 0.9 =
|
125 |
* Proper Details at http://ampforwp.com/amp-pagebuilder/
|
126 |
* Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
|
@@ -133,7 +163,7 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
|
|
133 |
* Added Option to turn on/off Page Support
|
134 |
* Related Posts Now use Custom Excerpt if it Exists
|
135 |
* Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
|
136 |
-
* pre Tag styling issue fixed for AMP pages
|
137 |
* Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
|
138 |
* WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
|
139 |
* 2 New Designs added
|
1 |
=== AMP for WP - Accelerated Mobile Pages ===
|
2 |
+
Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin
|
4 |
Donate link: https://www.paypal.me/Kaludi/5
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 4.7
|
7 |
+
Stable tag: 0.9.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
121 |
|
122 |
|
123 |
== Changelog ==
|
124 |
+
= 0.9.1 [16th December 2016] =
|
125 |
+
* Proper Details at http://ampforwp.com/new/
|
126 |
+
* PHP7 Compatibility
|
127 |
+
* Pagination URLs (Prev & Next) was going to 404 ( #244 | #251 )
|
128 |
+
* Custom CSS not working in Design one (#249)
|
129 |
+
* Enhanced the translation panel by adding Textarea from Redux, which means that we're able to allow HTML in footer like before (#260)
|
130 |
+
* How to remove “Powered by WordPress” from Design-1 of AMP ( #264 )
|
131 |
+
* Non-amp Homepage support added (#267)
|
132 |
+
* using get_avatar() (#259)
|
133 |
+
* Validation issue fixed: The attribute 'rel' may not appear in tag 'div' (#268)
|
134 |
+
* Validation Issue fixed: Script Tag removed from the content.
|
135 |
+
* Featured image in Design 1 in single #261
|
136 |
+
* After Fresh installation - a save is required Fixed
|
137 |
+
* Excerpt length controlled
|
138 |
+
* Design One has thumbnails on the Homepage
|
139 |
+
* Non-AMP link goes to the wrong page, issue fixed.
|
140 |
+
* Archive pages were broken, fixed.
|
141 |
+
* Option to Enable & Disable the Next/Previous links in Single
|
142 |
+
* WhatsApp sharing not working, issue fixed.
|
143 |
+
* Category Taxonomy has extra ':' in the word.
|
144 |
+
* The word 'Ago' is now translatable.
|
145 |
+
* Yoast SEO with AMP compatibility issue fixed.
|
146 |
+
* Several Minor Polishing in the code
|
147 |
+
* Footer Ad gets covered by Sticky Social Icons (#269)
|
148 |
+
* Smaller image size when “image caption” is used in Design-2 (#263)
|
149 |
+
* Footer ad with Sticky Social bar issue fix
|
150 |
+
* Checked with WordPress 4.7
|
151 |
+
* Ad #1 was messing up with the title, issue fixed.
|
152 |
+
* Compatibility improved with AMP WooCommerce.
|
153 |
+
|
154 |
= 0.9 =
|
155 |
* Proper Details at http://ampforwp.com/amp-pagebuilder/
|
156 |
* Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
|
163 |
* Added Option to turn on/off Page Support
|
164 |
* Related Posts Now use Custom Excerpt if it Exists
|
165 |
* Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
|
166 |
+
* <pre> Tag styling issue fixed for AMP pages
|
167 |
* Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
|
168 |
* WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
|
169 |
* 2 New Designs added
|
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
|
4 |
if ( is_customize_preview() ) {
|
5 |
-
|
6 |
// Load all the elements in the customizer as we want all the elements in design-manager
|
7 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_the_title' );
|
8 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_meta_info' );
|
@@ -12,15 +12,15 @@ if ( is_customize_preview() ) {
|
|
12 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_social_icons' );
|
13 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_comments' );
|
14 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_related_posts' );
|
15 |
-
}
|
16 |
|
17 |
|
18 |
$data = get_option( 'ampforwp_design' );
|
19 |
|
20 |
-
// Adding default Value
|
21 |
if ($data['elements'] == '') {
|
22 |
$data['elements'] = "meta_info:1,title:1,featured_image:1,content:1,meta_taxonomy:1,social_icons:1,comments:1,related_posts:1";
|
23 |
-
}
|
24 |
|
25 |
if( isset( $data['elements'] ) || ! empty( $data['elements'] ) ){
|
26 |
$options = explode( ',', $data['elements'] );
|
@@ -63,25 +63,31 @@ if ( is_customize_preview() ) {
|
|
63 |
// Design Selector
|
64 |
add_action('pre_amp_render_post','ampforwp_design_selector', 11 );
|
65 |
function ampforwp_design_selector() {
|
66 |
-
|
67 |
global $redux_builder_amp;
|
68 |
if ( $redux_builder_amp ) {
|
69 |
-
return $redux_builder_amp['amp-design-selector'];
|
70 |
} else {
|
71 |
return 2;
|
72 |
}
|
73 |
-
|
74 |
}
|
75 |
|
76 |
|
77 |
add_action('pre_amp_render_post','ampforwp_stylesheet_file_insertion', 12 );
|
78 |
function ampforwp_stylesheet_file_insertion() {
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
// Add StyleSheet
|
81 |
-
require AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector
|
82 |
-
}
|
83 |
|
84 |
-
// Post Title
|
85 |
function ampforwp_add_element_the_title( $meta_parts ) {
|
86 |
$meta_parts[] = 'ampforwp-the-title';
|
87 |
return $meta_parts;
|
@@ -144,7 +150,7 @@ function ampforwp_design_element_the_content( $file, $type, $post ) {
|
|
144 |
return $file;
|
145 |
}
|
146 |
|
147 |
-
// Meta Texonomy
|
148 |
function ampforwp_add_element_meta_taxonomy( $meta_parts ) {
|
149 |
$meta_parts[] = 'ampforwp-meta-taxonomy';
|
150 |
return $meta_parts;
|
@@ -158,7 +164,7 @@ function ampforwp_design_element_meta_taxonomy( $file, $type, $post ) {
|
|
158 |
return $file;
|
159 |
}
|
160 |
|
161 |
-
// Social Icons
|
162 |
function ampforwp_add_element_social_icons( $meta_parts ) {
|
163 |
$meta_parts[] = 'ampforwp-social-icons';
|
164 |
return $meta_parts;
|
@@ -187,7 +193,7 @@ function ampforwp_design_element_comments( $file, $type, $post ) {
|
|
187 |
return $file;
|
188 |
}
|
189 |
|
190 |
-
// Related Posts
|
191 |
function ampforwp_add_element_related_posts( $meta_parts ) {
|
192 |
$meta_parts[] = 'ampforwp-related-posts';
|
193 |
return $meta_parts;
|
@@ -201,7 +207,7 @@ function ampforwp_design_element_related_posts( $file, $type, $post ) {
|
|
201 |
return $file;
|
202 |
}
|
203 |
|
204 |
-
|
205 |
|
206 |
|
207 |
?>
|
2 |
|
3 |
|
4 |
if ( is_customize_preview() ) {
|
5 |
+
|
6 |
// Load all the elements in the customizer as we want all the elements in design-manager
|
7 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_the_title' );
|
8 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_meta_info' );
|
12 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_social_icons' );
|
13 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_comments' );
|
14 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_related_posts' );
|
15 |
+
}
|
16 |
|
17 |
|
18 |
$data = get_option( 'ampforwp_design' );
|
19 |
|
20 |
+
// Adding default Value
|
21 |
if ($data['elements'] == '') {
|
22 |
$data['elements'] = "meta_info:1,title:1,featured_image:1,content:1,meta_taxonomy:1,social_icons:1,comments:1,related_posts:1";
|
23 |
+
}
|
24 |
|
25 |
if( isset( $data['elements'] ) || ! empty( $data['elements'] ) ){
|
26 |
$options = explode( ',', $data['elements'] );
|
63 |
// Design Selector
|
64 |
add_action('pre_amp_render_post','ampforwp_design_selector', 11 );
|
65 |
function ampforwp_design_selector() {
|
66 |
+
|
67 |
global $redux_builder_amp;
|
68 |
if ( $redux_builder_amp ) {
|
69 |
+
return $redux_builder_amp['amp-design-selector'];
|
70 |
} else {
|
71 |
return 2;
|
72 |
}
|
73 |
+
|
74 |
}
|
75 |
|
76 |
|
77 |
add_action('pre_amp_render_post','ampforwp_stylesheet_file_insertion', 12 );
|
78 |
function ampforwp_stylesheet_file_insertion() {
|
79 |
+
|
80 |
+
if ( empty( ampforwp_design_selector() ) ) {
|
81 |
+
$ampforwp_design_selector = 2;
|
82 |
+
} else {
|
83 |
+
$ampforwp_design_selector = ampforwp_design_selector();
|
84 |
+
}
|
85 |
|
86 |
// Add StyleSheet
|
87 |
+
require AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. $ampforwp_design_selector . '/style.php';
|
88 |
+
}
|
89 |
|
90 |
+
// Post Title
|
91 |
function ampforwp_add_element_the_title( $meta_parts ) {
|
92 |
$meta_parts[] = 'ampforwp-the-title';
|
93 |
return $meta_parts;
|
150 |
return $file;
|
151 |
}
|
152 |
|
153 |
+
// Meta Texonomy
|
154 |
function ampforwp_add_element_meta_taxonomy( $meta_parts ) {
|
155 |
$meta_parts[] = 'ampforwp-meta-taxonomy';
|
156 |
return $meta_parts;
|
164 |
return $file;
|
165 |
}
|
166 |
|
167 |
+
// Social Icons
|
168 |
function ampforwp_add_element_social_icons( $meta_parts ) {
|
169 |
$meta_parts[] = 'ampforwp-social-icons';
|
170 |
return $meta_parts;
|
193 |
return $file;
|
194 |
}
|
195 |
|
196 |
+
// Related Posts
|
197 |
function ampforwp_add_element_related_posts( $meta_parts ) {
|
198 |
$meta_parts[] = 'ampforwp-related-posts';
|
199 |
return $meta_parts;
|
207 |
return $file;
|
208 |
}
|
209 |
|
210 |
+
|
211 |
|
212 |
|
213 |
?>
|
@@ -1,11 +1,17 @@
|
|
1 |
<div class="amp-wp-article-header ampforwp-meta-info">
|
2 |
|
3 |
<?php $post_author = $this->get( 'post_author' ); ?>
|
4 |
-
<?php
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
<div class="amp-wp-meta amp-wp-byline">
|
7 |
<?php if ( function_exists( 'get_avatar_url' ) ) : ?>
|
8 |
-
<amp-img
|
9 |
<?php endif; ?>
|
10 |
<span class="amp-wp-author author vcard"><?php echo esc_html( $post_author->display_name ); ?></span>
|
11 |
</div>
|
@@ -14,13 +20,15 @@
|
|
14 |
<div class="amp-wp-meta amp-wp-posted-on">
|
15 |
<time datetime="<?php echo esc_attr( date( 'c', $this->get( 'post_publish_timestamp' ) ) ); ?>">
|
16 |
<?php
|
|
|
17 |
echo esc_html(
|
18 |
sprintf(
|
19 |
-
_x( '%s ago', '%s = human-readable time difference', 'amp' ),
|
20 |
human_time_diff( $this->get( 'post_publish_timestamp' ), current_time( 'timestamp' ) )
|
21 |
)
|
22 |
);
|
23 |
?>
|
24 |
</time>
|
25 |
</div>
|
|
|
26 |
</div>
|
1 |
<div class="amp-wp-article-header ampforwp-meta-info">
|
2 |
|
3 |
<?php $post_author = $this->get( 'post_author' ); ?>
|
4 |
+
<?php
|
5 |
+
if ( $post_author ) : ?>
|
6 |
+
<?php
|
7 |
+
$string = get_avatar($post_author->user_email);
|
8 |
+
$token = strtok($string, " ");
|
9 |
+
$token = strtok(" ");
|
10 |
+
$token = strtok(" ");
|
11 |
+
?>
|
12 |
<div class="amp-wp-meta amp-wp-byline">
|
13 |
<?php if ( function_exists( 'get_avatar_url' ) ) : ?>
|
14 |
+
<amp-img <?php echo $token; ?> width="24" height="24" layout="fixed"></amp-img>
|
15 |
<?php endif; ?>
|
16 |
<span class="amp-wp-author author vcard"><?php echo esc_html( $post_author->display_name ); ?></span>
|
17 |
</div>
|
20 |
<div class="amp-wp-meta amp-wp-posted-on">
|
21 |
<time datetime="<?php echo esc_attr( date( 'c', $this->get( 'post_publish_timestamp' ) ) ); ?>">
|
22 |
<?php
|
23 |
+
global $redux_builder_amp;
|
24 |
echo esc_html(
|
25 |
sprintf(
|
26 |
+
_x( '%s '.$redux_builder_amp['amp-translator-ago-date-text'], '%s = human-readable time difference', 'amp' ),
|
27 |
human_time_diff( $this->get( 'post_publish_timestamp' ), current_time( 'timestamp' ) )
|
28 |
)
|
29 |
);
|
30 |
?>
|
31 |
</time>
|
32 |
</div>
|
33 |
+
|
34 |
</div>
|
@@ -1,16 +1,39 @@
|
|
1 |
<div class="amp-wp-article-header amp-wp-article-category ampforwp-meta-taxonomy ">
|
2 |
|
3 |
<?php global $redux_builder_amp; ?>
|
4 |
-
|
5 |
<?php $ampforwp_categories = get_the_terms( $this->ID, 'category' );
|
6 |
if ( $ampforwp_categories ) : ?>
|
7 |
<div class="amp-wp-meta amp-wp-tax-category">
|
8 |
-
<span><?php global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-categories-text'] .'
|
9 |
<?php foreach ($ampforwp_categories as $cat ) {
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
} ?>
|
12 |
</div>
|
13 |
<?php endif; ?>
|
14 |
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
</div>
|
1 |
<div class="amp-wp-article-header amp-wp-article-category ampforwp-meta-taxonomy ">
|
2 |
|
3 |
<?php global $redux_builder_amp; ?>
|
4 |
+
|
5 |
<?php $ampforwp_categories = get_the_terms( $this->ID, 'category' );
|
6 |
if ( $ampforwp_categories ) : ?>
|
7 |
<div class="amp-wp-meta amp-wp-tax-category">
|
8 |
+
<span><?php global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-categories-text'] .' ', 'amp' )); ?></span>
|
9 |
<?php foreach ($ampforwp_categories as $cat ) {
|
10 |
+
if($redux_builder_amp['ampforwp-amp-on-off-catgs-tags']){
|
11 |
+
echo (' <a href="'.get_category_link($cat->term_taxonomy_id).'" > '. $cat->name .'</a>');
|
12 |
+
} else {
|
13 |
+
echo (' <a href="'.trailingslashit(get_category_link($cat->term_taxonomy_id)).'?'. AMP_QUERY_VAR .'" > '. $cat->name .'</a>');
|
14 |
+
}
|
15 |
} ?>
|
16 |
</div>
|
17 |
<?php endif; ?>
|
18 |
|
19 |
|
20 |
+
<?php $ampforwp_tags= get_the_terms( $this->ID, 'post_tag' );
|
21 |
+
if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
|
22 |
+
<div class="amp-wp-meta amp-wp-tax-tag ampforwp-tax-tag">
|
23 |
+
<?php if($redux_builder_amp['amp-rtl-select-option']==0) {
|
24 |
+
global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-tags-text'] .' ', 'amp' ));
|
25 |
+
}
|
26 |
+
foreach ($ampforwp_tags as $tag) {
|
27 |
+
if($redux_builder_amp['ampforwp-amp-on-off-catgs-tags']){
|
28 |
+
echo ('<a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'">'.$tag->name .'</a>');
|
29 |
+
} else {
|
30 |
+
echo ('<a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'?amp" >'.$tag->name .'</a>');
|
31 |
+
}
|
32 |
+
}
|
33 |
+
if($redux_builder_amp['amp-rtl-select-option']) {
|
34 |
+
global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-tags-text'] .' ', 'amp' ));
|
35 |
+
}?>
|
36 |
+
</div>
|
37 |
+
<?php endif;?>
|
38 |
+
|
39 |
</div>
|
@@ -39,7 +39,7 @@
|
|
39 |
<?php
|
40 |
while( $my_query->have_posts() ) {
|
41 |
$my_query->the_post();?>
|
42 |
-
<li class="<?php if ( has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>"><a href="<?php the_permalink()
|
43 |
<?php if ( has_post_thumbnail() ) {
|
44 |
$thumb_id_2 = get_post_thumbnail_id();
|
45 |
$thumb_url_array_2 = wp_get_attachment_image_src($thumb_id_2, 'thumbnail', true);
|
@@ -47,7 +47,7 @@
|
|
47 |
<amp-img src="<?php echo $thumb_url_2 ?>" width="150" height="150" layout="responsive"></amp-img>
|
48 |
<?php } ?>
|
49 |
<div class="related_link">
|
50 |
-
<a href="<?php the_permalink(); ?><?php echo AMP_QUERY_VAR ;?>"><?php the_title(); ?></a>
|
51 |
<?php
|
52 |
if(has_excerpt()){
|
53 |
$content = the_excerpt();
|
39 |
<?php
|
40 |
while( $my_query->have_posts() ) {
|
41 |
$my_query->the_post();?>
|
42 |
+
<li class="<?php if ( has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>"><a href="<?php trailingslashit(the_permalink()); ?><?php echo AMP_QUERY_VAR ;?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
|
43 |
<?php if ( has_post_thumbnail() ) {
|
44 |
$thumb_id_2 = get_post_thumbnail_id();
|
45 |
$thumb_url_array_2 = wp_get_attachment_image_src($thumb_id_2, 'thumbnail', true);
|
47 |
<amp-img src="<?php echo $thumb_url_2 ?>" width="150" height="150" layout="responsive"></amp-img>
|
48 |
<?php } ?>
|
49 |
<div class="related_link">
|
50 |
+
<a href="<?php trailingslashit(the_permalink()); ?><?php echo AMP_QUERY_VAR ;?>"><?php the_title(); ?></a>
|
51 |
<?php
|
52 |
if(has_excerpt()){
|
53 |
$content = the_excerpt();
|
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php global $redux_builder_amp; ?>
|
2 |
<div class="ampforwp-social-icons">
|
3 |
<?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
|
4 |
<amp-social-share type="facebook" data-param-app_id="<?php echo $redux_builder_amp['amp-facebook-app-id']; ?>" width="50" height="28"></amp-social-share>
|
@@ -19,10 +19,10 @@
|
|
19 |
<amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
|
20 |
<?php } ?>
|
21 |
<?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
|
22 |
-
<a href="whatsapp://send">
|
23 |
<div class="whatsapp-share-icon">
|
24 |
<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dy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zUtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
|
25 |
</div>
|
26 |
</a>
|
27 |
<?php } ?>
|
28 |
-
</div>
|
1 |
+
<?php global $redux_builder_amp; ?>
|
2 |
<div class="ampforwp-social-icons">
|
3 |
<?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
|
4 |
<amp-social-share type="facebook" data-param-app_id="<?php echo $redux_builder_amp['amp-facebook-app-id']; ?>" width="50" height="28"></amp-social-share>
|
19 |
<amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
|
20 |
<?php } ?>
|
21 |
<?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
|
22 |
+
<a href="whatsapp://send?text=<?php echo get_the_permalink(); ?>">
|
23 |
<div class="whatsapp-share-icon">
|
24 |
<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXRzQXBwIiBkPSJNOTAsNDMuODQxYzAsMjQuMjEzLTE5Ljc3OSw0My44NDEtNDQuMTgyLDQzLjg0MWMtNy43NDcsMC0xNS4wMjUtMS45OC0yMS4zNTctNS40NTVMMCw5MGw3Ljk3NS0yMy41MjIgICBjLTQuMDIzLTYuNjA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wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
|
25 |
</div>
|
26 |
</a>
|
27 |
<?php } ?>
|
28 |
+
</div>
|
@@ -1,10 +1,42 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<footer class="amp-wp-footer">
|
3 |
<div>
|
4 |
<h2><?php echo esc_html( $this->get( 'blog_name' ) ); ?></h2>
|
5 |
-
<p>
|
6 |
-
|
|
|
|
|
|
|
7 |
</p>
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
</div>
|
10 |
</footer>
|
1 |
+
<?php
|
2 |
+
global $redux_builder_amp;
|
3 |
+
wp_reset_postdata();
|
4 |
+
|
5 |
+
$ampforwp_backto_nonamp = '';
|
6 |
+
if ( is_home() ) {
|
7 |
+
$ampforwp_backto_nonamp = home_url();
|
8 |
+
}
|
9 |
+
if ( is_single() ){
|
10 |
+
$ampforwp_backto_nonamp = get_permalink( $post->ID );
|
11 |
+
}
|
12 |
+
if( is_archive() ) {
|
13 |
+
global $wp;
|
14 |
+
$ampforwp_backto_nonamp = esc_url( home_url( $wp->request ) );
|
15 |
+
}
|
16 |
+
?>
|
17 |
<footer class="amp-wp-footer">
|
18 |
<div>
|
19 |
<h2><?php echo esc_html( $this->get( 'blog_name' ) ); ?></h2>
|
20 |
+
<p class="copyright_txt">
|
21 |
+
<?php
|
22 |
+
global $allowed_html;
|
23 |
+
echo wp_kses($redux_builder_amp['amp-translator-footer-text'],$allowed_html) ;
|
24 |
+
?>
|
25 |
</p>
|
26 |
+
|
27 |
+
<p class="back-to-top">
|
28 |
+
<a href="#top"> <?php echo esc_html( $redux_builder_amp['amp-translator-top-text'] ); ?>
|
29 |
+
</a>
|
30 |
+
<?php
|
31 |
+
//24. Added an options button for switching on/off link to non amp page
|
32 |
+
if($redux_builder_amp['amp-footer-link-non-amp-page']=='1'){
|
33 |
+
if ( $ampforwp_backto_nonamp ) { ?>
|
34 |
+
|
|
35 |
+
<a href="<?php echo $ampforwp_backto_nonamp; ?>"><?php echo esc_html( $redux_builder_amp['amp-translator-non-amp-page-text'] ) ;?>
|
36 |
+
</a> <?php
|
37 |
+
}//End of inner condition
|
38 |
+
}//End of outer condition?>
|
39 |
+
</p>
|
40 |
+
|
41 |
</div>
|
42 |
</footer>
|
@@ -1,17 +1,31 @@
|
|
1 |
<?php global $redux_builder_amp; ?>
|
2 |
<header id="#top" class="amp-wp-header">
|
3 |
<div class="ampforwp-logo-area" >
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
<a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) ) . '?' .AMP_QUERY_VAR; ?>">
|
6 |
<?php if (true == ($redux_builder_amp['opt-media']['url'])) { ?>
|
7 |
<amp-img src="<?php echo $redux_builder_amp['opt-media']['url']; ?>" width="190" height="36" alt="logo" class="amp-logo"></amp-img>
|
8 |
<?php } else {
|
9 |
-
echo esc_html( $this->get( 'blog_name' ) );
|
10 |
} ?>
|
11 |
</a>
|
12 |
-
|
13 |
|
|
|
|
|
|
|
14 |
<a href="<?php echo esc_url( $this->get( 'home_url' ) ); ?>">
|
|
|
|
|
|
|
15 |
<?php $site_icon_url = $this->get( 'site_icon_url' );
|
16 |
if ( $site_icon_url ) : ?>
|
17 |
<amp-img src="<?php echo esc_url( $site_icon_url ); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img>
|
@@ -22,13 +36,13 @@
|
|
22 |
<a href="#" class="toggle-text">
|
23 |
<span></span>
|
24 |
<span></span>
|
25 |
-
<span></span>
|
26 |
</a>
|
27 |
</div>
|
28 |
|
29 |
</div>
|
30 |
|
31 |
-
</header>
|
32 |
<amp-sidebar id='sidebar'
|
33 |
layout="nodisplay"
|
34 |
side="right">
|
1 |
<?php global $redux_builder_amp; ?>
|
2 |
<header id="#top" class="amp-wp-header">
|
3 |
<div class="ampforwp-logo-area" >
|
4 |
+
<?php
|
5 |
+
if($redux_builder_amp['amp-on-off-support-for-non-amp-home-page']){
|
6 |
+
?>
|
7 |
+
<a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) ); ?>">
|
8 |
+
<?php
|
9 |
+
}else{
|
10 |
+
?>
|
11 |
+
<a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) ) . '?' .AMP_QUERY_VAR; ?>">
|
12 |
+
|
13 |
+
<?php }?>
|
14 |
|
|
|
15 |
<?php if (true == ($redux_builder_amp['opt-media']['url'])) { ?>
|
16 |
<amp-img src="<?php echo $redux_builder_amp['opt-media']['url']; ?>" width="190" height="36" alt="logo" class="amp-logo"></amp-img>
|
17 |
<?php } else {
|
18 |
+
echo esc_html( $this->get( 'blog_name' ) );
|
19 |
} ?>
|
20 |
</a>
|
|
|
21 |
|
22 |
+
<?php
|
23 |
+
if($redux_builder_amp['amp-on-off-support-for-non-amp-home-page']){
|
24 |
+
?>
|
25 |
<a href="<?php echo esc_url( $this->get( 'home_url' ) ); ?>">
|
26 |
+
<?php }else{ ?>
|
27 |
+
<a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) ) . '?' .AMP_QUERY_VAR; ?>">
|
28 |
+
<?php } ?>
|
29 |
<?php $site_icon_url = $this->get( 'site_icon_url' );
|
30 |
if ( $site_icon_url ) : ?>
|
31 |
<amp-img src="<?php echo esc_url( $site_icon_url ); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img>
|
36 |
<a href="#" class="toggle-text">
|
37 |
<span></span>
|
38 |
<span></span>
|
39 |
+
<span></span>
|
40 |
</a>
|
41 |
</div>
|
42 |
|
43 |
</div>
|
44 |
|
45 |
+
</header>
|
46 |
<amp-sidebar id='sidebar'
|
47 |
layout="nodisplay"
|
48 |
side="right">
|
@@ -13,34 +13,54 @@
|
|
13 |
|
14 |
<body class="<?php echo esc_attr( $this->get( 'body_class' ) ); ?>">
|
15 |
|
16 |
-
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
17 |
-
|
18 |
<article class="amp-wp-article ampforwp-custom-index amp-wp-home">
|
19 |
|
|
|
|
|
20 |
<?php do_action('ampforwp_post_before_design_elements') ?>
|
21 |
|
22 |
<?php
|
23 |
if ( have_posts() ) :
|
24 |
while ( have_posts() ) : the_post(); ?>
|
25 |
-
<div class="amp-wp-content amp-wp-article-header">
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
<h1 class="amp-wp-title">
|
28 |
-
<?php $ampforwp_post_url = get_permalink(); ?>
|
29 |
-
<a href="<?php echo trailingslashit($ampforwp_post_url) . AMP_QUERY_VAR ;?>"><?php the_title() ?></a>
|
30 |
-
</h1>
|
31 |
|
32 |
-
<div class="amp-wp-meta">
|
33 |
-
<?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author', 'meta-time' ) ) ); ?>
|
34 |
-
</div>
|
35 |
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
if(has_excerpt()){
|
38 |
-
$content =
|
39 |
}else{
|
40 |
$content = get_the_content();
|
41 |
}
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
44 |
</div>
|
45 |
<?php endwhile; ?>
|
46 |
|
@@ -60,6 +80,7 @@
|
|
60 |
|
61 |
</article>
|
62 |
|
|
|
63 |
|
64 |
<?php $this->load_parts( array( 'footer' ) ); ?>
|
65 |
|
13 |
|
14 |
<body class="<?php echo esc_attr( $this->get( 'body_class' ) ); ?>">
|
15 |
|
|
|
|
|
16 |
<article class="amp-wp-article ampforwp-custom-index amp-wp-home">
|
17 |
|
18 |
+
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
19 |
+
|
20 |
<?php do_action('ampforwp_post_before_design_elements') ?>
|
21 |
|
22 |
<?php
|
23 |
if ( have_posts() ) :
|
24 |
while ( have_posts() ) : the_post(); ?>
|
25 |
+
<div class="amp-wp-content amp-wp-article-header amp-loop-list">
|
26 |
+
|
27 |
+
<h1 class="amp-wp-title">
|
28 |
+
<?php $ampforwp_post_url = get_permalink(); ?>
|
29 |
+
<a href="<?php echo trailingslashit($ampforwp_post_url) . AMP_QUERY_VAR ;?>"><?php the_title() ?></a>
|
30 |
+
</h1>
|
31 |
+
|
32 |
|
|
|
|
|
|
|
|
|
33 |
|
|
|
|
|
|
|
34 |
|
35 |
+
<div class="amp-wp-content-loop">
|
36 |
+
<div class="amp-wp-meta">
|
37 |
+
<?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author', 'meta-time' ) ) ); ?>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
|
41 |
+
<?php if ( has_post_thumbnail() ) { ?>
|
42 |
+
<?php
|
43 |
+
$thumb_id = get_post_thumbnail_id();
|
44 |
+
$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail', true);
|
45 |
+
$thumb_url = $thumb_url_array[0];
|
46 |
+
?>
|
47 |
+
<div class="home-post-image">
|
48 |
+
<a href="<?php echo trailingslashit($ampforwp_post_url) . AMP_QUERY_VAR ;?>">
|
49 |
+
<amp-img src=<?php echo $thumb_url ?> width=100 height=75></amp-img>
|
50 |
+
</a>
|
51 |
+
</div>
|
52 |
+
<?php } ?>
|
53 |
+
<?php
|
54 |
if(has_excerpt()){
|
55 |
+
$content = get_the_excerpt();
|
56 |
}else{
|
57 |
$content = get_the_content();
|
58 |
}
|
59 |
+
?>
|
60 |
+
<p><?php echo wp_trim_words( $content , '50'); ?></p>
|
61 |
+
|
62 |
+
</div>
|
63 |
+
|
64 |
</div>
|
65 |
<?php endwhile; ?>
|
66 |
|
80 |
|
81 |
</article>
|
82 |
|
83 |
+
|
84 |
|
85 |
<?php $this->load_parts( array( 'footer' ) ); ?>
|
86 |
|
@@ -277,6 +277,7 @@ blockquote p:last-child {
|
|
277 |
line-height: 1.5em;
|
278 |
margin: 0;
|
279 |
padding: .66em 10px .75em;
|
|
|
280 |
}
|
281 |
|
282 |
/* AMP Media */
|
@@ -357,6 +358,7 @@ amp-carousel > amp-img > img {
|
|
357 |
.amp-wp-footer {
|
358 |
border-top: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;
|
359 |
margin: calc(1.5em - 1px) 0 0;
|
|
|
360 |
}
|
361 |
|
362 |
.amp-wp-footer div {
|
@@ -376,21 +378,14 @@ amp-carousel > amp-img > img {
|
|
376 |
color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;
|
377 |
font-size: .8em;
|
378 |
line-height: 1.5em;
|
379 |
-
margin: 0
|
380 |
}
|
381 |
|
382 |
.amp-wp-footer a {
|
383 |
text-decoration: none;
|
384 |
}
|
385 |
-
|
386 |
-
.back-to-top {
|
387 |
-
bottom: 1.275em;
|
388 |
-
font-size: .8em;
|
389 |
-
font-weight: 600;
|
390 |
-
line-height: 2em;
|
391 |
-
position: absolute;
|
392 |
-
right: 16px;
|
393 |
-
}
|
394 |
|
395 |
|
396 |
/* Header */
|
@@ -456,6 +451,15 @@ amp-carousel > amp-img > img {
|
|
456 |
#pagination .prev {
|
457 |
display: inline-block;
|
458 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
|
460 |
/* Single */
|
461 |
.amp-wp-article-content amp-img {
|
@@ -471,7 +475,6 @@ amp-carousel > amp-img > img {
|
|
471 |
/* Social Icons */
|
472 |
.ampforwp-social-icons{
|
473 |
margin: 1.5em 16px 1.5em;
|
474 |
-
height: 30px;
|
475 |
}
|
476 |
.whatsapp-share-icon {
|
477 |
width: 50px;
|
@@ -767,9 +770,17 @@ amp-carousel > amp-img > img {
|
|
767 |
.amp-wp-tax-tag a:last-child:after {
|
768 |
content: ' ';
|
769 |
}
|
770 |
-
|
771 |
pre {
|
772 |
white-space: pre-wrap;
|
773 |
}
|
774 |
-
|
775 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
line-height: 1.5em;
|
278 |
margin: 0;
|
279 |
padding: .66em 10px .75em;
|
280 |
+
text-align: center;
|
281 |
}
|
282 |
|
283 |
/* AMP Media */
|
358 |
.amp-wp-footer {
|
359 |
border-top: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;
|
360 |
margin: calc(1.5em - 1px) 0 0;
|
361 |
+
padding-bottom:25px;
|
362 |
}
|
363 |
|
364 |
.amp-wp-footer div {
|
378 |
color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;
|
379 |
font-size: .8em;
|
380 |
line-height: 1.5em;
|
381 |
+
margin: 0 15px 0 0;
|
382 |
}
|
383 |
|
384 |
.amp-wp-footer a {
|
385 |
text-decoration: none;
|
386 |
}
|
387 |
+
.copyright_txt{ float:left }
|
388 |
+
.back-to-top { float:right }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
|
390 |
|
391 |
/* Header */
|
451 |
#pagination .prev {
|
452 |
display: inline-block;
|
453 |
}
|
454 |
+
.amp-wp-home .amp-wp-content p {
|
455 |
+
display: inline;
|
456 |
+
}
|
457 |
+
|
458 |
+
.home-post-image {
|
459 |
+
float: right ;
|
460 |
+
margin: 0 0 10px 20px;
|
461 |
+
|
462 |
+
}
|
463 |
|
464 |
/* Single */
|
465 |
.amp-wp-article-content amp-img {
|
475 |
/* Social Icons */
|
476 |
.ampforwp-social-icons{
|
477 |
margin: 1.5em 16px 1.5em;
|
|
|
478 |
}
|
479 |
.whatsapp-share-icon {
|
480 |
width: 50px;
|
770 |
.amp-wp-tax-tag a:last-child:after {
|
771 |
content: ' ';
|
772 |
}
|
773 |
+
|
774 |
pre {
|
775 |
white-space: pre-wrap;
|
776 |
}
|
777 |
+
|
778 |
+
<?php if($redux_builder_amp['enable-single-social-icons']){ ?>
|
779 |
+
footer {
|
780 |
+
padding-bottom: 50px;
|
781 |
+
}
|
782 |
+
<?php } ?>
|
783 |
+
|
784 |
+
/* Custom Style Code */
|
785 |
+
<?php echo $redux_builder_amp['css_editor'];
|
786 |
+
} ?>
|
@@ -1,26 +1,49 @@
|
|
1 |
<div class="amp-wp-article-content">
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
</div>
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
</div>
|
1 |
<div class="amp-wp-article-content">
|
2 |
+
|
3 |
+
<!--Post Content here-->
|
4 |
+
<div class="amp-wp-content the_content">
|
5 |
+
|
6 |
+
<?php do_action('ampforwp_before_post_content') //Post before Content here ?>
|
7 |
+
|
8 |
+
<?php echo $this->get( 'post_amp_content' ); // amphtml content; no kses ?>
|
9 |
+
|
10 |
+
<?php do_action('ampforwp_after_post_content') ; //Post After Content here ?>
|
11 |
+
|
12 |
+
</div>
|
13 |
+
<!--Post Content Ends here-->
|
14 |
+
|
15 |
+
<!--Post Next-Previous Links-->
|
16 |
+
<?php global $redux_builder_amp;
|
17 |
+
if($redux_builder_amp['enable-single-next-prev']) { ?>
|
18 |
+
<!--IF Starts here-->
|
19 |
+
<div class="amp-wp-content post-pagination-meta">
|
20 |
+
<div id="pagination">
|
21 |
+
|
22 |
+
<!--Next Link code-->
|
23 |
+
<div class="next">
|
24 |
+
<?php $next_post = get_next_post();
|
25 |
+
if (!empty( $next_post )) { ?>
|
26 |
+
<a href="<?php echo trailingslashit(get_permalink( $next_post->ID )) . AMP_QUERY_VAR; ?>"><?php echo $next_post->post_title; ?> »</a> <?php
|
27 |
+
} ?>
|
28 |
</div>
|
29 |
+
<!--Next Link code-->
|
30 |
+
|
31 |
+
<!--Prev Link code-->
|
32 |
+
<div class="prev">
|
33 |
+
<?php $prev_post = get_previous_post();
|
34 |
+
if (!empty( $prev_post )) { ?>
|
35 |
+
<a href="<?php echo trailingslashit(get_permalink( $prev_post->ID )). AMP_QUERY_VAR; ?>"> « <?php echo $prev_post->post_title ?></a> <?php
|
36 |
+
} ?>
|
37 |
+
</div>
|
38 |
+
<!--Prev Link code-->
|
39 |
+
|
40 |
+
<!--Clearfix code-->
|
41 |
+
<div class="clearfix"></div>
|
42 |
+
<!--Clearfix code-->
|
43 |
+
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
<!--IF Ends here-->
|
47 |
+
<?php } ?>
|
48 |
+
<!--Post Next-Previous Links End here-->
|
49 |
</div>
|
@@ -20,10 +20,27 @@
|
|
20 |
$ampforwp_categories = get_the_terms( $this->ID, 'category' );
|
21 |
if ( $ampforwp_categories ) : ?>
|
22 |
<div class="amp-wp-meta amp-wp-tax-category ampforwp-tax-category">
|
23 |
-
<span
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
<?php foreach ($ampforwp_categories as $cat ) {
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
</div>
|
28 |
<?php endif; ?>
|
29 |
|
20 |
$ampforwp_categories = get_the_terms( $this->ID, 'category' );
|
21 |
if ( $ampforwp_categories ) : ?>
|
22 |
<div class="amp-wp-meta amp-wp-tax-category ampforwp-tax-category">
|
23 |
+
<span>
|
24 |
+
<?php global $redux_builder_amp;
|
25 |
+
//if RTL is OFF
|
26 |
+
if(!$redux_builder_amp['amp-rtl-select-option']) {
|
27 |
+
global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-categories-text'] .' ', 'amp' ));
|
28 |
+
}
|
29 |
+
?>
|
30 |
+
</span>
|
31 |
<?php foreach ($ampforwp_categories as $cat ) {
|
32 |
+
if($redux_builder_amp['ampforwp-amp-on-off-catgs-tags']){
|
33 |
+
echo ('<a href="'.get_category_link($cat->term_taxonomy_id).'" >'.$cat->name .'</a>');
|
34 |
+
} else {
|
35 |
+
echo ('<a href="'.trailingslashit(get_category_link($cat->term_taxonomy_id)).'?amp" >'.$cat->name .'</a>');
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
//if RTL is ON
|
40 |
+
if($redux_builder_amp['amp-rtl-select-option']) {
|
41 |
+
global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-categories-text'] .' ', 'amp' ));
|
42 |
+
}
|
43 |
+
?>
|
44 |
</div>
|
45 |
<?php endif; ?>
|
46 |
|
@@ -1,16 +1,28 @@
|
|
1 |
<div class="amp-wp-article-header amp-wp-article-category ampforwp-meta-taxonomy ">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
</div>
|
14 |
-
<?php endif;?>
|
15 |
-
|
16 |
-
</div>
|
1 |
<div class="amp-wp-article-header amp-wp-article-category ampforwp-meta-taxonomy ">
|
2 |
+
<?php global $redux_builder_amp;
|
3 |
+
$ampforwp_tags= get_the_terms( $this->ID, 'post_tag' );
|
4 |
+
if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
|
5 |
+
<div class="amp-wp-meta amp-wp-tax-tag ampforwp-tax-tag">
|
6 |
+
<?php
|
7 |
+
//if RTL is OFF
|
8 |
+
if(!$redux_builder_amp['amp-rtl-select-option']) {
|
9 |
+
global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-tags-text'] .' ', 'amp' ));
|
10 |
+
}
|
11 |
|
12 |
+
foreach ($ampforwp_tags as $tag) {
|
13 |
+
if($redux_builder_amp['ampforwp-amp-on-off-catgs-tags']){
|
14 |
+
echo ('<a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'">'.$tag->name .'</a>');
|
15 |
+
} else {
|
16 |
+
echo ('<a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'?amp" >'.$tag->name .'</a>');
|
17 |
+
}
|
18 |
+
}
|
19 |
|
20 |
+
//if RTL is ON
|
21 |
+
if($redux_builder_amp['amp-rtl-select-option']) {
|
22 |
+
global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-tags-text'] .' ', 'amp' ));
|
23 |
+
}
|
24 |
+
?>
|
25 |
+
|
26 |
+
</div>
|
27 |
+
<?php endif;?>
|
28 |
+
</div>
|
|
|
|
|
|
|
|
@@ -55,7 +55,7 @@
|
|
55 |
<div class="related_link">
|
56 |
<a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
|
57 |
<?php if(has_excerpt()){
|
58 |
-
$content =
|
59 |
}else{
|
60 |
$content = get_the_content();
|
61 |
}
|
55 |
<div class="related_link">
|
56 |
<a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
|
57 |
<?php if(has_excerpt()){
|
58 |
+
$content = get_the_excerpt();
|
59 |
}else{
|
60 |
$content = get_the_content();
|
61 |
}
|
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php global $redux_builder_amp; ?>
|
2 |
<div class="amp-wp-content post-pagination-meta ampforwp-social-icons-wrapper ampforwp-social-icons">
|
3 |
<?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
|
4 |
<amp-social-share type="facebook" data-param-app_id="<?php echo $redux_builder_amp['amp-facebook-app-id']; ?>" width="50" height="28"></amp-social-share>
|
@@ -19,7 +19,7 @@
|
|
19 |
<amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
|
20 |
<?php } ?>
|
21 |
<?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
|
22 |
-
<a href="whatsapp://send">
|
23 |
<div class="whatsapp-share-icon">
|
24 |
<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwI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WMtMC42MzEtMS4wNzUtMC4wNjYtMS42NTYsMC40NzUtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
|
25 |
</div>
|
1 |
+
<?php global $redux_builder_amp; ?>
|
2 |
<div class="amp-wp-content post-pagination-meta ampforwp-social-icons-wrapper ampforwp-social-icons">
|
3 |
<?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
|
4 |
<amp-social-share type="facebook" data-param-app_id="<?php echo $redux_builder_amp['amp-facebook-app-id']; ?>" width="50" height="28"></amp-social-share>
|
19 |
<amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
|
20 |
<?php } ?>
|
21 |
<?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
|
22 |
+
<a href="whatsapp://send?text=<?php echo get_the_permalink();?>">
|
23 |
<div class="whatsapp-share-icon">
|
24 |
<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXRzQXBwIiBkPSJNOTAsNDMuODQxYzAsMjQuMjEzLTE5Ljc3OSw0My44NDEtNDQuMTgyLDQzLjg0MWMtNy43NDcsMC0xNS4wMjUtMS45OC0yMS4zNTctNS40NTVMMCw5MGw3Ljk3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AzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
|
25 |
</div>
|
@@ -1,21 +1,35 @@
|
|
1 |
-
<?php global $redux_builder_amp;
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
<?php do_action('ampforwp_global_after_footer'); ?>
|
1 |
+
<?php global $redux_builder_amp;
|
2 |
+
wp_reset_postdata();
|
3 |
+
|
4 |
+
$ampforwp_backto_nonamp = " ";
|
5 |
+
if ( is_home() ) {
|
6 |
+
$ampforwp_backto_nonamp = home_url();
|
7 |
+
}
|
8 |
+
if ( is_single() ){
|
9 |
+
$ampforwp_backto_nonamp = get_permalink( $post->ID );
|
10 |
+
}
|
11 |
+
if ( is_page() ){
|
12 |
+
$ampforwp_backto_nonamp = get_permalink( $post->ID );
|
13 |
+
}
|
14 |
+
if( is_archive() ) {
|
15 |
+
global $wp;
|
16 |
+
$ampforwp_backto_nonamp = esc_url( home_url( $wp->request ) );
|
17 |
+
}
|
18 |
+
?>
|
19 |
+
<footer class="container">
|
20 |
+
<div id="footer">
|
21 |
+
<p><a href="#header"> <?php echo esc_html( $redux_builder_amp['amp-translator-top-text'] ); ?></a> <?php
|
22 |
+
//24. Added an options button for switching on/off link to non amp page
|
23 |
+
if($redux_builder_amp['amp-footer-link-non-amp-page']=='1'){ if ( $ampforwp_backto_nonamp ) { ?>
|
24 |
+
|
|
25 |
+
<a href="<?php echo $ampforwp_backto_nonamp; ?>"><?php echo esc_html( $redux_builder_amp['amp-translator-non-amp-page-text'] ) ;?> </a> <?php } }?>
|
26 |
+
</p>
|
27 |
+
<p>
|
28 |
+
<?php
|
29 |
+
global $allowed_html;
|
30 |
+
echo wp_kses($redux_builder_amp['amp-translator-footer-text'],$allowed_html) ;
|
31 |
+
?>
|
32 |
+
</p>
|
33 |
+
</div>
|
34 |
+
</footer>
|
35 |
<?php do_action('ampforwp_global_after_footer'); ?>
|
@@ -1,9 +1,14 @@
|
|
1 |
-
<header class="container">
|
2 |
<div id="headerwrap">
|
3 |
<div id="header">
|
4 |
-
|
5 |
-
<?php global $redux_builder_amp;
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
7 |
?>
|
8 |
|
9 |
<?php if ( true == ($redux_builder_amp['opt-media']['url']) ) { ?>
|
@@ -23,7 +28,7 @@
|
|
23 |
<a href="#" class="toggle-text"><?php echo esc_html( $redux_builder_amp['amp-translator-navigate-text'] ); ?></a>
|
24 |
</div>
|
25 |
|
26 |
-
|
27 |
<amp-sidebar id='sidebar'
|
28 |
layout="nodisplay"
|
29 |
side="right">
|
1 |
+
<header class="container">
|
2 |
<div id="headerwrap">
|
3 |
<div id="header">
|
4 |
+
|
5 |
+
<?php global $redux_builder_amp;
|
6 |
+
|
7 |
+
if ($redux_builder_amp['amp-on-off-support-for-non-amp-home-page']) {
|
8 |
+
$ampforwp_home_url = trailingslashit( get_bloginfo('url') );
|
9 |
+
}else{
|
10 |
+
$ampforwp_home_url = trailingslashit( get_bloginfo('url') ) . '?' . AMP_QUERY_VAR;
|
11 |
+
}
|
12 |
?>
|
13 |
|
14 |
<?php if ( true == ($redux_builder_amp['opt-media']['url']) ) { ?>
|
28 |
<a href="#" class="toggle-text"><?php echo esc_html( $redux_builder_amp['amp-translator-navigate-text'] ); ?></a>
|
29 |
</div>
|
30 |
|
31 |
+
|
32 |
<amp-sidebar id='sidebar'
|
33 |
layout="nodisplay"
|
34 |
side="right">
|
@@ -11,7 +11,7 @@
|
|
11 |
<?php do_action( 'amp_post_template_css', $this ); ?>
|
12 |
</style>
|
13 |
</head>
|
14 |
-
<body>
|
15 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
16 |
|
17 |
<?php do_action( 'ampforwp_after_header', $this ); ?>
|
@@ -50,9 +50,8 @@
|
|
50 |
<p><?php echo wp_trim_words( $content , '15' ); ?></p>
|
51 |
|
52 |
</div>
|
53 |
-
|
54 |
-
|
55 |
-
</div>
|
56 |
|
57 |
<?php endwhile; ?>
|
58 |
|
@@ -65,7 +64,6 @@
|
|
65 |
|
66 |
<div class="clearfix"></div>
|
67 |
</div>
|
68 |
-
|
69 |
</div>
|
70 |
|
71 |
<?php endif; ?>
|
@@ -73,4 +71,5 @@
|
|
73 |
<?php $this->load_parts( array( 'footer' ) ); ?>
|
74 |
<?php do_action( 'amp_post_template_footer', $this ); ?>
|
75 |
</body>
|
|
|
76 |
</html>
|
11 |
<?php do_action( 'amp_post_template_css', $this ); ?>
|
12 |
</style>
|
13 |
</head>
|
14 |
+
<body class="amp_home_body">
|
15 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
16 |
|
17 |
<?php do_action( 'ampforwp_after_header', $this ); ?>
|
50 |
<p><?php echo wp_trim_words( $content , '15' ); ?></p>
|
51 |
|
52 |
</div>
|
53 |
+
<div class="cb"></div>
|
54 |
+
</div>
|
|
|
55 |
|
56 |
<?php endwhile; ?>
|
57 |
|
64 |
|
65 |
<div class="clearfix"></div>
|
66 |
</div>
|
|
|
67 |
</div>
|
68 |
|
69 |
<?php endif; ?>
|
71 |
<?php $this->load_parts( array( 'footer' ) ); ?>
|
72 |
<?php do_action( 'amp_post_template_footer', $this ); ?>
|
73 |
</body>
|
74 |
+
|
75 |
</html>
|
@@ -317,6 +317,9 @@ h1.amp-wp-title {
|
|
317 |
.single-post .post-pagination-meta{
|
318 |
min-height:auto
|
319 |
}
|
|
|
|
|
|
|
320 |
.post-pagination-meta .amp-wp-tax-category,
|
321 |
.post-title-meta .amp-wp-tax-tag {
|
322 |
display : none;
|
@@ -349,6 +352,15 @@ li.amp-wp-tax-category {
|
|
349 |
.amp-wp-content amp-img {
|
350 |
max-width: 100%;
|
351 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
.amp-wp-byline amp-img {
|
353 |
display: none;
|
354 |
}
|
@@ -514,12 +526,13 @@ main .amp-wp-content.comments_list {
|
|
514 |
}
|
515 |
|
516 |
/* ADS */
|
517 |
-
.amp_ad_1{
|
518 |
-
margin-top:
|
519 |
-
margin-bottom:
|
520 |
}
|
521 |
.single-post .amp_ad_1{
|
522 |
-
margin-top:
|
|
|
523 |
}
|
524 |
.amp-ad-4{
|
525 |
margin-top:10px;
|
@@ -741,6 +754,7 @@ amp-user-notification button {
|
|
741 |
.single-post footer {
|
742 |
padding-bottom: 40px;
|
743 |
}
|
|
|
744 |
<?php } ?>
|
745 |
/**/
|
746 |
.alignleft{
|
317 |
.single-post .post-pagination-meta{
|
318 |
min-height:auto
|
319 |
}
|
320 |
+
.single-post .ampforwp-social-icons{
|
321 |
+
display:inline-block
|
322 |
+
}
|
323 |
.post-pagination-meta .amp-wp-tax-category,
|
324 |
.post-title-meta .amp-wp-tax-tag {
|
325 |
display : none;
|
352 |
.amp-wp-content amp-img {
|
353 |
max-width: 100%;
|
354 |
}
|
355 |
+
figure{
|
356 |
+
margin: 0;
|
357 |
+
}
|
358 |
+
figcaption{
|
359 |
+
font-size: 11px;
|
360 |
+
margin-bottom: 11px;
|
361 |
+
background: #eee;
|
362 |
+
padding: 6px 8px;
|
363 |
+
}
|
364 |
.amp-wp-byline amp-img {
|
365 |
display: none;
|
366 |
}
|
526 |
}
|
527 |
|
528 |
/* ADS */
|
529 |
+
.amp_home_body .amp_ad_1{
|
530 |
+
margin-top: 10px;
|
531 |
+
margin-bottom: -20px;
|
532 |
}
|
533 |
.single-post .amp_ad_1{
|
534 |
+
margin-top: 10px;
|
535 |
+
margin-bottom: -20px;
|
536 |
}
|
537 |
.amp-ad-4{
|
538 |
margin-top:10px;
|
754 |
.single-post footer {
|
755 |
padding-bottom: 40px;
|
756 |
}
|
757 |
+
.amp-ad-2{ margin-bottom: 50px; }
|
758 |
<?php } ?>
|
759 |
/**/
|
760 |
.alignleft{
|
@@ -33,6 +33,7 @@
|
|
33 |
23. The analytics tag appears more than once in the document. This will soon be an error
|
34 |
24. Seperate Sticky Single Social Icons
|
35 |
25. Yoast meta Support
|
|
|
36 |
*/
|
37 |
// Adding AMP-related things to the main theme
|
38 |
global $redux_builder_amp;
|
@@ -105,11 +106,17 @@
|
|
105 |
}
|
106 |
}
|
107 |
} elseif ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
|
108 |
-
if ( is_home()
|
109 |
if ( 'single' === $type ) {
|
110 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
|
111 |
}
|
112 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
114 |
// Custom Single file
|
115 |
if ( is_single() || is_page() ) {
|
@@ -117,11 +124,6 @@
|
|
117 |
if('single' === $type && !('product' === $post->post_type )) {
|
118 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/single.php';
|
119 |
}
|
120 |
-
else if ( class_exists( 'WooCommerce' ) ) {
|
121 |
-
if('single' === $type && 'product' === $post->post_type ) {
|
122 |
-
$file = AMPFORWP_PLUGIN_DIR . '/templates/wc.php';
|
123 |
-
}
|
124 |
-
}
|
125 |
}
|
126 |
return $file;
|
127 |
}
|
@@ -455,11 +457,17 @@
|
|
455 |
$content = preg_replace('#<table.*?>#i', '<table width="100%">', $content);
|
456 |
$content = preg_replace('#<style scoped.*?>(.*?)</style>#i', '', $content);
|
457 |
$content = preg_replace('/href="javascript:void*/', ' ', $content);
|
|
|
458 |
//for removing attributes within html tags
|
459 |
$content = preg_replace('/(<[^>]+) onclick=".*?"/', '$1', $content);
|
460 |
$content = preg_replace('/(<[^>]+) rel=".*?"/', '$1', $content);
|
461 |
$content = preg_replace('/(<[^>]+) date/', '$1', $content);
|
462 |
|
|
|
|
|
|
|
|
|
|
|
463 |
// $content = preg_replace('/<img*/', '<amp-img', $content); // Fallback for plugins
|
464 |
return $content;
|
465 |
}
|
@@ -498,8 +506,7 @@
|
|
498 |
//code for adding 'description' meta from Yoast SEO
|
499 |
|
500 |
if($redux_builder_amp['ampforwp-seo-yoast-custom-description']){
|
501 |
-
|
502 |
-
if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) {
|
503 |
$front = WPSEO_Frontend::get_instance();
|
504 |
$desc = $front->metadesc( false );
|
505 |
if ( $desc ) {
|
@@ -767,7 +774,7 @@ function ampforwp_sticky_social_icons(){
|
|
767 |
<amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
|
768 |
<?php } ?>
|
769 |
<?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
|
770 |
-
<a href="whatsapp://send">
|
771 |
<div class="whatsapp-share-icon">
|
772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MTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
|
773 |
</div>
|
@@ -792,21 +799,64 @@ function ampforwp_register_social_sharing_script() {
|
|
792 |
// 25. Yoast meta Support
|
793 |
function ampforwp_custom_yoast_meta(){
|
794 |
global $redux_builder_amp;
|
795 |
-
$is_amp_endpoint = is_amp_endpoint();
|
796 |
if ($redux_builder_amp['ampforwp-seo-yoast-meta']) {
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
}
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
809 |
}
|
810 |
-
|
811 |
-
add_action( 'amp_post_template_head', 'ampforwp_custom_yoast_meta' );
|
812 |
-
}
|
33 |
23. The analytics tag appears more than once in the document. This will soon be an error
|
34 |
24. Seperate Sticky Single Social Icons
|
35 |
25. Yoast meta Support
|
36 |
+
26. Extending Title Tagand De-Hooking the Standard one from AMP
|
37 |
*/
|
38 |
// Adding AMP-related things to the main theme
|
39 |
global $redux_builder_amp;
|
106 |
}
|
107 |
}
|
108 |
} elseif ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
|
109 |
+
if ( is_home() ) {
|
110 |
if ( 'single' === $type ) {
|
111 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
|
112 |
}
|
113 |
}
|
114 |
+
if ( is_archive() ) {
|
115 |
+
if ( 'single' === $type ) {
|
116 |
+
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/index.php';
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
}
|
121 |
// Custom Single file
|
122 |
if ( is_single() || is_page() ) {
|
124 |
if('single' === $type && !('product' === $post->post_type )) {
|
125 |
$file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/single.php';
|
126 |
}
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
return $file;
|
129 |
}
|
457 |
$content = preg_replace('#<table.*?>#i', '<table width="100%">', $content);
|
458 |
$content = preg_replace('#<style scoped.*?>(.*?)</style>#i', '', $content);
|
459 |
$content = preg_replace('/href="javascript:void*/', ' ', $content);
|
460 |
+
$content = preg_replace('/<script[^>]*>.*?<\/script>/i', '', $content);
|
461 |
//for removing attributes within html tags
|
462 |
$content = preg_replace('/(<[^>]+) onclick=".*?"/', '$1', $content);
|
463 |
$content = preg_replace('/(<[^>]+) rel=".*?"/', '$1', $content);
|
464 |
$content = preg_replace('/(<[^>]+) date/', '$1', $content);
|
465 |
|
466 |
+
//removing scripts and rel="nofollow" from Body and from divs
|
467 |
+
//issue #268
|
468 |
+
$content = str_replace(' rel="nofollow"',"",$content);
|
469 |
+
$content = preg_replace('/<script[^>]*>.*?<\/script>/i', '', $content);
|
470 |
+
|
471 |
// $content = preg_replace('/<img*/', '<amp-img', $content); // Fallback for plugins
|
472 |
return $content;
|
473 |
}
|
506 |
//code for adding 'description' meta from Yoast SEO
|
507 |
|
508 |
if($redux_builder_amp['ampforwp-seo-yoast-custom-description']){
|
509 |
+
if ( class_exists('WPSEO_Frontend') ) {
|
|
|
510 |
$front = WPSEO_Frontend::get_instance();
|
511 |
$desc = $front->metadesc( false );
|
512 |
if ( $desc ) {
|
774 |
<amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
|
775 |
<?php } ?>
|
776 |
<?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
|
777 |
+
<a href="whatsapp://send?text=<?php echo get_the_permalink();?>">
|
778 |
<div class="whatsapp-share-icon">
|
779 |
<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXR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UsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
|
780 |
</div>
|
799 |
// 25. Yoast meta Support
|
800 |
function ampforwp_custom_yoast_meta(){
|
801 |
global $redux_builder_amp;
|
|
|
802 |
if ($redux_builder_amp['ampforwp-seo-yoast-meta']) {
|
803 |
+
if(! class_exists('YoastSEO_AMP') ) {
|
804 |
+
if ( class_exists('WPSEO_Options')) {
|
805 |
+
$options = WPSEO_Options::get_option( 'wpseo_social' );
|
806 |
+
if ( $options['twitter'] === true ) {
|
807 |
+
WPSEO_Twitter::get_instance();
|
808 |
+
}
|
809 |
+
if ( $options['opengraph'] === true ) {
|
810 |
+
$GLOBALS['wpseo_og'] = new WPSEO_OpenGraph;
|
811 |
+
}
|
812 |
+
do_action( 'wpseo_opengraph' );
|
813 |
+
}
|
814 |
+
}//execute only if Glue is deactive
|
815 |
+
echo strip_tags($redux_builder_amp['ampforwp-seo-custom-additional-meta'], '<link><meta>' );
|
816 |
+
} else {
|
817 |
+
echo strip_tags($redux_builder_amp['ampforwp-seo-custom-additional-meta'], '<link><meta>' );
|
818 |
+
}
|
819 |
+
}
|
820 |
+
|
821 |
+
add_action( 'amp_post_template_head', 'ampforwp_custom_yoast_meta' );
|
822 |
+
|
823 |
+
|
824 |
+
//26. Extending Title Tagand De-Hooking the Standard one from AMP
|
825 |
+
add_action('amp_post_template_include_single','remove_this');
|
826 |
+
function remove_this(){
|
827 |
+
remove_action('amp_post_template_head','amp_post_template_add_title');
|
828 |
+
add_action('amp_post_template_head','ampforwp_custom_title_tag');
|
829 |
+
|
830 |
+
function ampforwp_custom_title_tag(){
|
831 |
+
?>
|
832 |
+
<title>
|
833 |
+
<?php
|
834 |
+
global $redux_builder_amp;
|
835 |
+
|
836 |
+
// title for a single post and single page
|
837 |
+
if( is_single() || is_page() ){
|
838 |
+
global $post;
|
839 |
+
$titl = $post->post_title;
|
840 |
+
echo $titl;
|
841 |
+
}
|
842 |
+
// title for archive pages
|
843 |
+
if ( is_archive() ) {
|
844 |
+
the_archive_title( '' );
|
845 |
+
the_archive_description( '' );
|
846 |
}
|
847 |
+
// title for Static front page
|
848 |
+
if ( $redux_builder_amp['amp-frontpage-select-option']== 1 && ( is_front_page() ) ) {
|
849 |
+
$ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
|
850 |
+
echo get_the_title( $ID );
|
851 |
+
|
852 |
+
}
|
853 |
+
// title for index page
|
854 |
+
if ( is_front_page() && $redux_builder_amp['amp-frontpage-select-option']== 0 ) {
|
855 |
+
echo bloginfo('name') ;
|
856 |
+
}
|
857 |
+
?>
|
858 |
+
</title>
|
859 |
+
<?php
|
860 |
+
}
|
861 |
}
|
862 |
+
//End of 26
|
|
|
|