Version Description
(13th July 2017) = * View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/ * Disqus Comments show up even when disabled per post #931 * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929 * H3 inside OL in Related-Posts.php #930 * Advertisement Options in Instant Articles #943 * Incompatible with bootstrap plugin #525 * Error in tag and category links #934 * Pagebuilder Button module link had issues #951 * Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929 * WPtouch Pro Compatibility Issues #927 * Better scripts compatibility in Single of post types #757 * Instant Articles Error: "The HTML element does not contain any text" #949 * added a filter in all the dates so a user can change the date format and modify #962 * Design3 Menu Arrows are clickable along with the links #952
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.55 |
Comparing to | |
See all releases |
Code changes from version 0.9.54.2 to 0.9.55
- accelerated-moblie-pages.php +2 -2
- includes/modules/ampforwp-button.php +2 -2
- includes/options/admin-config.php +18 -2
- readme.txt +18 -1
- templates/design-manager/design-1/archive.php +3 -3
- templates/design-manager/design-1/elements/meta-taxonomy.php +2 -3
- templates/design-manager/design-1/elements/related-posts.php +1 -1
- templates/design-manager/design-1/index.php +4 -4
- templates/design-manager/design-1/search.php +5 -1
- templates/design-manager/design-1/style.php +1 -1
- templates/design-manager/design-2/elements/meta-info.php +1 -1
- templates/design-manager/design-2/elements/meta-taxonomy.php +1 -1
- templates/design-manager/design-2/elements/related-posts.php +1 -1
- templates/design-manager/design-2/style.php +5 -2
- templates/design-manager/design-3/archive.php +3 -4
- templates/design-manager/design-3/elements/meta-info.php +1 -1
- templates/design-manager/design-3/elements/meta-taxonomy.php +1 -1
- templates/design-manager/design-3/elements/related-posts.php +1 -1
- templates/design-manager/design-3/index.php +8 -2
- templates/design-manager/design-3/search.php +5 -1
- templates/design-manager/design-3/style.php +4 -2
- templates/features.php +42 -124
- templates/instant-articles/instant-article-sanitizer.php +6 -0
- templates/instant-articles/instant-article.php +23 -5
@@ -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: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
@@ -17,7 +17,7 @@ define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
|
|
17 |
define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
|
18 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
|
19 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
20 |
-
define('AMPFORWP_VERSION','0.9.
|
21 |
// any changes to AMP_QUERY_VAR should be refelected here
|
22 |
define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
|
23 |
|
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.55
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
17 |
define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
|
18 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
|
19 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
20 |
+
define('AMPFORWP_VERSION','0.9.55');
|
21 |
// any changes to AMP_QUERY_VAR should be refelected here
|
22 |
define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
|
23 |
|
@@ -74,8 +74,8 @@ class AMPFORWP_Button_Widget extends WP_Widget {
|
|
74 |
} elseif( $feature['size'] == '3' ){
|
75 |
$size = "l_btn";
|
76 |
}
|
77 |
-
|
78 |
-
$output .= '<a href="
|
79 |
}
|
80 |
$output .= '</div>';
|
81 |
|
74 |
} elseif( $feature['size'] == '3' ){
|
75 |
$size = "l_btn";
|
76 |
}
|
77 |
+
//Corrected the URL in button module #951
|
78 |
+
$output .= '<a href=" '. $feature['url'] .'" class="' . $size . '" target="' . $target . '" >'. $feature['title'] .'</a>';
|
79 |
}
|
80 |
$output .= '</div>';
|
81 |
|
@@ -2487,8 +2487,24 @@ Redux::setSection( $opt_name, array(
|
|
2487 |
'desc' => fb_instant_article(),
|
2488 |
'title' => __('Facebook Instant Articles Feed URL', 'accelerated-mobile-pages'),
|
2489 |
'required' => array('fb-instant-article-switch', '=', 1)
|
2490 |
-
),
|
2491 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2492 |
),
|
2493 |
)
|
2494 |
);
|
2487 |
'desc' => fb_instant_article(),
|
2488 |
'title' => __('Facebook Instant Articles Feed URL', 'accelerated-mobile-pages'),
|
2489 |
'required' => array('fb-instant-article-switch', '=', 1)
|
2490 |
+
),
|
2491 |
+
array(
|
2492 |
+
'id' => 'fb-instant-article-ads',
|
2493 |
+
'type' => 'switch',
|
2494 |
+
'title' => __('Advertisement', 'accelerated-mobile-pages'),
|
2495 |
+
'default' => 0,
|
2496 |
+
'true' => 'true',
|
2497 |
+
'false' => 'false',
|
2498 |
+
'desc' => __('Switch this on to enable advertising on Instant Article pages.', 'accelerated-mobile-pages'),
|
2499 |
+
'required' => array('fb-instant-article-switch', '=', 1)
|
2500 |
+
),
|
2501 |
+
array(
|
2502 |
+
'id' => 'fb-instant-article-ad-id',
|
2503 |
+
'type' => 'text',
|
2504 |
+
'title' => __('Enter your Audience Network Placement ID', 'accelerated-mobile-pages'),
|
2505 |
+
'subtitle' => __('You can find out more about this <a href="https://developers.facebook.com/docs/instant-articles/monetization/audience-network">here</a>. ', 'accelerated-mobile-pages'),
|
2506 |
+
'required' => array('fb-instant-article-ads', '=', 1)
|
2507 |
+
),
|
2508 |
),
|
2509 |
)
|
2510 |
);
|
@@ -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/5
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.8
|
7 |
-
Stable tag: 0.9.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -136,6 +136,23 @@ You can contact me using this url: http://ampforwp.com/contact/
|
|
136 |
|
137 |
== Changelog ==
|
138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
= 0.9.54.2 (4th July 2017) =
|
140 |
* Minor bug post 0.9.54 bug fixed
|
141 |
|
4 |
Donate link: https://www.paypal.me/Kaludi/5
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 0.9.55
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
136 |
|
137 |
== Changelog ==
|
138 |
|
139 |
+
= 0.9.55 (13th July 2017) =
|
140 |
+
* View more details on https://ampforwp.com/0-9-55-released-improvement-update-61st-update/
|
141 |
+
* Disqus Comments show up even when disabled per post #931
|
142 |
+
* Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
|
143 |
+
* H3 inside OL in Related-Posts.php #930
|
144 |
+
* Advertisement Options in Instant Articles #943
|
145 |
+
* Incompatible with bootstrap plugin #525
|
146 |
+
* Error in tag and category links #934
|
147 |
+
* Pagebuilder Button module link had issues #951
|
148 |
+
* Unnecessary: Adding the Markup for AMP Woocommerce latest Products #929
|
149 |
+
* WPtouch Pro Compatibility Issues #927
|
150 |
+
* Better scripts compatibility in Single of post types #757
|
151 |
+
* Instant Articles Error: "The HTML element does not contain any text" #949
|
152 |
+
* added a filter in all the dates so a user can change the date format and modify #962
|
153 |
+
* Design3 Menu Arrows are clickable along with the links #952
|
154 |
+
|
155 |
+
|
156 |
= 0.9.54.2 (4th July 2017) =
|
157 |
* Minor bug post 0.9.54 bug fixed
|
158 |
|
@@ -85,9 +85,9 @@
|
|
85 |
|
86 |
<div class="amp-wp-meta">
|
87 |
<time> <?php
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
</time>
|
92 |
</div>
|
93 |
|
85 |
|
86 |
<div class="amp-wp-meta">
|
87 |
<time> <?php
|
88 |
+
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
89 |
+
$post_date = apply_filters('ampforwp_modify_post_date',$post_date);
|
90 |
+
echo $post_date ; ?>
|
91 |
</time>
|
92 |
</div>
|
93 |
|
@@ -9,7 +9,7 @@
|
|
9 |
<span><?php global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-categories-text'] .' ', 'accelerated-mobile-pages' )); ?></span>
|
10 |
<?php foreach ($ampforwp_categories as $cat ) {
|
11 |
if($redux_builder_amp['ampforwp-archive-support']){
|
12 |
-
echo ('<span class="amp-cat-'.$cat->term_id.'"><a href="'.trailingslashit( trailingslashit( get_category_link( $cat->
|
13 |
} else {
|
14 |
echo '<span>'. $cat->name .'</span>';
|
15 |
}
|
@@ -26,8 +26,7 @@
|
|
26 |
}
|
27 |
foreach ($ampforwp_tags as $tag) {
|
28 |
if($redux_builder_amp['ampforwp-archive-support']){
|
29 |
-
echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.trailingslashit( trailingslashit( get_tag_link( $tag->
|
30 |
-
|
31 |
} else {
|
32 |
echo ('<span>'.$tag->name.'</span>');
|
33 |
}
|
9 |
<span><?php global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-categories-text'] .' ', 'accelerated-mobile-pages' )); ?></span>
|
10 |
<?php foreach ($ampforwp_categories as $cat ) {
|
11 |
if($redux_builder_amp['ampforwp-archive-support']){
|
12 |
+
echo ('<span class="amp-cat-'.$cat->term_id.'"><a href="'.trailingslashit( trailingslashit( get_category_link( $cat->term_id ) ) . AMPFORWP_AMP_QUERY_VAR ) .'" > '. $cat->name .'</a></span>');//#934
|
13 |
} else {
|
14 |
echo '<span>'. $cat->name .'</span>';
|
15 |
}
|
26 |
}
|
27 |
foreach ($ampforwp_tags as $tag) {
|
28 |
if($redux_builder_amp['ampforwp-archive-support']){
|
29 |
+
echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.trailingslashit( trailingslashit( get_tag_link( $tag->term_id ) ) .'amp' ).'" >'.$tag->name .'</a></span>');//#934
|
|
|
30 |
} else {
|
31 |
echo ('<span>'.$tag->name.'</span>');
|
32 |
}
|
@@ -43,7 +43,7 @@
|
|
43 |
<div class="amp-wp-content relatedpost">
|
44 |
<div class="related_posts">
|
45 |
<ol class="clearfix">
|
46 |
-
<
|
47 |
<?php
|
48 |
while( $my_query->have_posts() ) {
|
49 |
$my_query->the_post();
|
43 |
<div class="amp-wp-content relatedpost">
|
44 |
<div class="related_posts">
|
45 |
<ol class="clearfix">
|
46 |
+
<span><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></span><!--#930-->
|
47 |
<?php
|
48 |
while( $my_query->have_posts() ) {
|
49 |
$my_query->the_post();
|
@@ -65,10 +65,10 @@
|
|
65 |
<div class="amp-wp-meta">
|
66 |
<?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author') ) ); ?>
|
67 |
<time> <?php
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
</div>
|
73 |
|
74 |
|
65 |
<div class="amp-wp-meta">
|
66 |
<?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author') ) ); ?>
|
67 |
<time> <?php
|
68 |
+
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
69 |
+
$post_date = apply_filters('ampforwp_modify_post_date',$post_date);
|
70 |
+
echo $post_date ; ?>
|
71 |
+
</time>
|
72 |
</div>
|
73 |
|
74 |
|
@@ -66,7 +66,11 @@
|
|
66 |
<div class="amp-wp-content-loop">
|
67 |
|
68 |
<div class="amp-wp-meta">
|
69 |
-
<time> <?php
|
|
|
|
|
|
|
|
|
70 |
</div>
|
71 |
|
72 |
<?php if ( has_post_thumbnail() ) { ?>
|
66 |
<div class="amp-wp-content-loop">
|
67 |
|
68 |
<div class="amp-wp-meta">
|
69 |
+
<time> <?php
|
70 |
+
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
71 |
+
$post_date = apply_filters('ampforwp_modify_post_date',$post_date);
|
72 |
+
echo $post_date ; ?>
|
73 |
+
</time>
|
74 |
</div>
|
75 |
|
76 |
<?php if ( has_post_thumbnail() ) { ?>
|
@@ -32,7 +32,7 @@ blockquote {color: <?php echo sanitize_hex_color( $text_color ); ?>;background:
|
|
32 |
.amp-wp-footer p {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .8em;line-height: 1.5em;margin: 0 15px 0 0;}
|
33 |
.amp-wp-footer a{text-decoration:none}.copyright_txt{float:left}.back-to-top{float:right}.amp-wp-header .nav_container{float: right;top: 16px;line-height: 1; right: 65px; position: absolute}.toggle-text{position:absolute;right:0;height:22px;width:28px}.toggle-text span{display:block;position:absolute;height:2px;width:25px;background:#fff;border-radius:19px;opacity:1;left:0}.toggle-text span:nth-child(2){top:9px}.toggle-text span:nth-child(3){top:18px}.amp-wp-home .amp-wp-meta{margin:5px 0}.amp-wp-home .amp-wp-content p{display:inline-block;width:100%}.ampforwp-custom-index .amp-wp-title a {text-decoration: none;color: <?php echo sanitize_hex_color( $text_color ); ?>;}.comment-button-wrapper a,.related_posts ol{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.amp-wp-meta{display:flex}.amp-wp-posted-on{display:initial}#pagination .next,#pagination .prev{display:inline-block}.ampforwp-custom-index .amp-wp-content{margin-bottom:30px}.pagination-holder{margin:1.5em 16px}#pagination .next{float:right}.amp-wp-home .amp-wp-content p{display:inline}.home-post-image{float:right;margin:0 0 10px 20px}.amp-wp-article-content amp-img{max-width:100%}.amp-wp-meta.amp-wp-tax-category,.amp-wp-meta.amp-wp-tax-tag{margin:0}.amp-wp-meta.amp-wp-tax-tag{display:initial}.ampforwp-social-icons{margin:1.5em 16px}.custom-amp-socialsharing-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; }
|
34 |
.custom-amp-socialsharing-icon amp-img{ top: 4px; }
|
35 |
-
.custom-amp-socialsharing-line{background:#00b900}.comment-button-wrapper a{border-style:solid;border-color:#c2c2c2;border-width:1px 1px 2px;border-radius:4px;background-color:transparent;color:#0a89c0;cursor:pointer;display:block;font-size:14px;font-weight:600;text-align:center;line-height:18px;margin:0 auto;max-width:200px;padding:11px 16px;text-decoration:none;width:50%;-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.close-nav,.comments_list div,.related_posts ol li,.toggle-navigation ul,.toggle-navigationv2 ul li a{display:inline-block}main .amp-wp-content.comments_list,main .amp-wp-content.relatedpost{background:0 0;box-shadow:none;max-width:1030px}.relatedpost{margin:2em 16px}.comments_list h3,.related_posts
|
36 |
.comments_list ul li p{margin:0;font-size:14px;clear:both;padding-top:5px; word-break:break-word;}
|
37 |
.comments_list ul li{font-family:sans-serif;font-size:11px;list-style-type:none;margin-bottom:12px;background:#fefefe;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 2px 3px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.05);box-shadow:0 2px 3px rgba(0,0,0,.05);padding:0;max-width:1000px;width:96%}.comments_list ul li .says{margin-right:4px}.comments_list li li,.comments_list li li li{margin:20px 20px 10px}.comments_list ul li p{font-family:Merriweather,'Times New Roman',Times,Serif}.comments_list ul li .comment-body{padding:10px 0 15px}.comment-author{float:left}.single-post footer.comment-meta{padding-bottom:0}.comments_list li li{background:#f7f7f7;box-shadow:none;border:1px solid #eee} .page-numbers{ padding: 9px 10px; background: #fff; font-size: 14px; } .comment-content amp-img{max-width: 300px;} amp-sidebar{width:250px}.amp-sidebar-image{line-height:100px;vertical-align:middle}.amp-close-image{top:15px;left:225px;cursor:pointer}.toggle-navigationv2 ul{list-style-type:none;margin:0;font-family:sans-serif;padding:0}.toggle-navigationv2 ul ul li a{padding-left:35px;background:#fff;display:inline-block}.toggle-navigationv2 ul li a{padding:10px 15px 10px 25px;width:88%;text-decoration:none;background:#fafafa;font-size:13px;border-bottom:1px solid #efefef}.close-nav{font-size:12px;font-family:sans-serif;background:rgba(0,0,0,.25);letter-spacing:1px;padding:10px;border-radius:100px;line-height:8px;margin:14px;left:191px;color:#fff}.close-nav:hover{background:rgba(0,0,0,.45)}.toggle-navigation ul{list-style-type:none;margin:0;padding:0;width:100%}.menu-all-pages-container:after{content:"";clear:both}.toggle-navigation ul li{font-size:13px;border-bottom:1px solid rgba(0,0,0,.11);padding:11px 0;width:25%;float:left;text-align:center;margin-top:6px}.toggle-navigation ul ul{display:none}.toggle-navigation ul li a{color:#eee;padding:15px}.toggle-navigation{display:none;background:#444}.nav_container:hover+.toggle-navigation,.toggle-navigation:active,.toggle-navigation:focus,.toggle-navigation:hover{display:inline-block;width:100%}#amp-user-notification1 p{display:inline-block}amp-user-notification{padding:5px;text-align:center;background:#fff;border-top:1px solid} amp-user-notification button {padding: 8px 10px;background: <?php echo sanitize_hex_color( $header_background_color ); ?>;color: <?php echo sanitize_hex_color( $header_color ); ?>;margin-left: 5px;border: 0;}amp-user-notification button:hover {cursor: pointer} .amp-ad-wrapper {text-align: center} <?php if( $redux_builder_amp['enable-single-social-icons'] == true && is_single() ) { ?>body {padding-bottom: 43px;}<?php } ?> .sticky_social a{text-decoration:none}.sticky_social{width:100%;bottom:0;display:block;left:0;box-shadow:0 4px 7px #000;background:#fff;padding:7px 0 0;position:fixed;margin:0;z-index:10;text-align:center}.whatsapp-share-icon{width:50px;height:28px;display:inline-block;background:#5cbe4a;padding:4px 0;position:relative;top:-4px}.amp-wp-tax-category span:first-child:after{content:' '}.amp-wp-tax-category span:after,.amp-wp-tax-tag span:after{content:', '}.amp-wp-tax-category span:last-child:after,.amp-wp-tax-tag span:last-child:after{content:' '}pre{white-space:pre-wrap}.amp-ad-wrapper.amp_ad_1{padding-top:20px}
|
38 |
.amp-wp-content-loop{width:100%} .ampforwp_single_excerpt { margin-bottom:15px; }
|
32 |
.amp-wp-footer p {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .8em;line-height: 1.5em;margin: 0 15px 0 0;}
|
33 |
.amp-wp-footer a{text-decoration:none}.copyright_txt{float:left}.back-to-top{float:right}.amp-wp-header .nav_container{float: right;top: 16px;line-height: 1; right: 65px; position: absolute}.toggle-text{position:absolute;right:0;height:22px;width:28px}.toggle-text span{display:block;position:absolute;height:2px;width:25px;background:#fff;border-radius:19px;opacity:1;left:0}.toggle-text span:nth-child(2){top:9px}.toggle-text span:nth-child(3){top:18px}.amp-wp-home .amp-wp-meta{margin:5px 0}.amp-wp-home .amp-wp-content p{display:inline-block;width:100%}.ampforwp-custom-index .amp-wp-title a {text-decoration: none;color: <?php echo sanitize_hex_color( $text_color ); ?>;}.comment-button-wrapper a,.related_posts ol{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.amp-wp-meta{display:flex}.amp-wp-posted-on{display:initial}#pagination .next,#pagination .prev{display:inline-block}.ampforwp-custom-index .amp-wp-content{margin-bottom:30px}.pagination-holder{margin:1.5em 16px}#pagination .next{float:right}.amp-wp-home .amp-wp-content p{display:inline}.home-post-image{float:right;margin:0 0 10px 20px}.amp-wp-article-content amp-img{max-width:100%}.amp-wp-meta.amp-wp-tax-category,.amp-wp-meta.amp-wp-tax-tag{margin:0}.amp-wp-meta.amp-wp-tax-tag{display:initial}.ampforwp-social-icons{margin:1.5em 16px}.custom-amp-socialsharing-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; }
|
34 |
.custom-amp-socialsharing-icon amp-img{ top: 4px; }
|
35 |
+
.custom-amp-socialsharing-line{background:#00b900}.comment-button-wrapper a{border-style:solid;border-color:#c2c2c2;border-width:1px 1px 2px;border-radius:4px;background-color:transparent;color:#0a89c0;cursor:pointer;display:block;font-size:14px;font-weight:600;text-align:center;line-height:18px;margin:0 auto;max-width:200px;padding:11px 16px;text-decoration:none;width:50%;-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.close-nav,.comments_list div,.related_posts ol li,.toggle-navigation ul,.toggle-navigationv2 ul li a{display:inline-block}main .amp-wp-content.comments_list,main .amp-wp-content.relatedpost{background:0 0;box-shadow:none;max-width:1030px}.relatedpost{margin:2em 16px}.comments_list h3,.related_posts span{font-size:14px;font-weight:700;letter-spacing:.4px;margin:25px 0 10px;color:#333} .related_posts span { display: block;} .related_posts ol{list-style-type:none;margin:0;padding:0}.related_posts ol li{width:100%;margin-bottom:12px;padding:0}.related_posts .related_link a{color:#000;font-size:18px}.related_posts ol li amp-img{width:100px;float:left;margin-right:15px}.related_posts ol li p{font-size:12px;color:#999;line-height:1.2;margin:12px 0 0}.no_related_thumbnail{padding:15px 18px}.comments_list{margin:2.5em 16px}.comments_list ul{margin:0;padding:0}.comments_list ul.children{padding-bottom:10px;margin-left:4%;width:96%}
|
36 |
.comments_list ul li p{margin:0;font-size:14px;clear:both;padding-top:5px; word-break:break-word;}
|
37 |
.comments_list ul li{font-family:sans-serif;font-size:11px;list-style-type:none;margin-bottom:12px;background:#fefefe;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 2px 3px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.05);box-shadow:0 2px 3px rgba(0,0,0,.05);padding:0;max-width:1000px;width:96%}.comments_list ul li .says{margin-right:4px}.comments_list li li,.comments_list li li li{margin:20px 20px 10px}.comments_list ul li p{font-family:Merriweather,'Times New Roman',Times,Serif}.comments_list ul li .comment-body{padding:10px 0 15px}.comment-author{float:left}.single-post footer.comment-meta{padding-bottom:0}.comments_list li li{background:#f7f7f7;box-shadow:none;border:1px solid #eee} .page-numbers{ padding: 9px 10px; background: #fff; font-size: 14px; } .comment-content amp-img{max-width: 300px;} amp-sidebar{width:250px}.amp-sidebar-image{line-height:100px;vertical-align:middle}.amp-close-image{top:15px;left:225px;cursor:pointer}.toggle-navigationv2 ul{list-style-type:none;margin:0;font-family:sans-serif;padding:0}.toggle-navigationv2 ul ul li a{padding-left:35px;background:#fff;display:inline-block}.toggle-navigationv2 ul li a{padding:10px 15px 10px 25px;width:88%;text-decoration:none;background:#fafafa;font-size:13px;border-bottom:1px solid #efefef}.close-nav{font-size:12px;font-family:sans-serif;background:rgba(0,0,0,.25);letter-spacing:1px;padding:10px;border-radius:100px;line-height:8px;margin:14px;left:191px;color:#fff}.close-nav:hover{background:rgba(0,0,0,.45)}.toggle-navigation ul{list-style-type:none;margin:0;padding:0;width:100%}.menu-all-pages-container:after{content:"";clear:both}.toggle-navigation ul li{font-size:13px;border-bottom:1px solid rgba(0,0,0,.11);padding:11px 0;width:25%;float:left;text-align:center;margin-top:6px}.toggle-navigation ul ul{display:none}.toggle-navigation ul li a{color:#eee;padding:15px}.toggle-navigation{display:none;background:#444}.nav_container:hover+.toggle-navigation,.toggle-navigation:active,.toggle-navigation:focus,.toggle-navigation:hover{display:inline-block;width:100%}#amp-user-notification1 p{display:inline-block}amp-user-notification{padding:5px;text-align:center;background:#fff;border-top:1px solid} amp-user-notification button {padding: 8px 10px;background: <?php echo sanitize_hex_color( $header_background_color ); ?>;color: <?php echo sanitize_hex_color( $header_color ); ?>;margin-left: 5px;border: 0;}amp-user-notification button:hover {cursor: pointer} .amp-ad-wrapper {text-align: center} <?php if( $redux_builder_amp['enable-single-social-icons'] == true && is_single() ) { ?>body {padding-bottom: 43px;}<?php } ?> .sticky_social a{text-decoration:none}.sticky_social{width:100%;bottom:0;display:block;left:0;box-shadow:0 4px 7px #000;background:#fff;padding:7px 0 0;position:fixed;margin:0;z-index:10;text-align:center}.whatsapp-share-icon{width:50px;height:28px;display:inline-block;background:#5cbe4a;padding:4px 0;position:relative;top:-4px}.amp-wp-tax-category span:first-child:after{content:' '}.amp-wp-tax-category span:after,.amp-wp-tax-tag span:after{content:', '}.amp-wp-tax-category span:last-child:after,.amp-wp-tax-tag span:last-child:after{content:' '}pre{white-space:pre-wrap}.amp-ad-wrapper.amp_ad_1{padding-top:20px}
|
38 |
.amp-wp-content-loop{width:100%} .ampforwp_single_excerpt { margin-bottom:15px; }
|
@@ -36,7 +36,7 @@
|
|
36 |
</span>
|
37 |
<?php foreach ($ampforwp_categories as $cat ) {
|
38 |
if($redux_builder_amp['ampforwp-archive-support']){
|
39 |
-
echo ('<span class="amp-cat-'.$cat->term_id.'"><a href="'. trailingslashit( trailingslashit( get_category_link( $cat->
|
40 |
} else {
|
41 |
echo ('<span>'.$cat->name .'</span>');
|
42 |
}
|
36 |
</span>
|
37 |
<?php foreach ($ampforwp_categories as $cat ) {
|
38 |
if($redux_builder_amp['ampforwp-archive-support']){
|
39 |
+
echo ('<span class="amp-cat-'.$cat->term_id.'"><a href="'. trailingslashit( trailingslashit( get_category_link( $cat->term_id ) ) .'amp' ) . '" >'.$cat->name .'</a></span>');//#934
|
40 |
} else {
|
41 |
echo ('<span>'.$cat->name .'</span>');
|
42 |
}
|
@@ -12,7 +12,7 @@
|
|
12 |
|
13 |
foreach ($ampforwp_tags as $tag) {
|
14 |
if($redux_builder_amp['ampforwp-archive-support']){
|
15 |
-
echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.trailingslashit( trailingslashit( get_tag_link( $tag->
|
16 |
} else {
|
17 |
echo ('<span>'.$tag->name .'</span>');
|
18 |
}
|
12 |
|
13 |
foreach ($ampforwp_tags as $tag) {
|
14 |
if($redux_builder_amp['ampforwp-archive-support']){
|
15 |
+
echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.trailingslashit( trailingslashit( get_tag_link( $tag->term_id ) ) . 'amp' ) . '" >'.$tag->name .'</a></span>');//#934
|
16 |
} else {
|
17 |
echo ('<span>'.$tag->name .'</span>');
|
18 |
}
|
@@ -42,7 +42,7 @@
|
|
42 |
<div class="amp-wp-content relatedpost">
|
43 |
<div class="related_posts">
|
44 |
<ol class="clearfix">
|
45 |
-
<
|
46 |
<?php
|
47 |
while( $my_query->have_posts() ) {
|
48 |
$my_query->the_post();
|
42 |
<div class="amp-wp-content relatedpost">
|
43 |
<div class="related_posts">
|
44 |
<ol class="clearfix">
|
45 |
+
<span class="related-title"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></span><!--#930-->
|
46 |
<?php
|
47 |
while( $my_query->have_posts() ) {
|
48 |
$my_query->the_post();
|
@@ -153,7 +153,10 @@ main .amp-wp-content.featured-image-content{ padding: 0px; border: 0; margin-bot
|
|
153 |
.single-post .amp_author_area .amp_author_area_wrapper{ display: inline-block; width: 100%; line-height: 1.4; margin-top: 22px; font-size: 13px; color:#333; font-family: sans-serif; }
|
154 |
/* Related Posts */
|
155 |
main .amp-wp-content.relatedpost{ background: none; box-shadow: none; max-width: 1030px; padding:0px 0 0 0; margin:1.8em auto 1.5em auto }
|
156 |
-
.related_posts
|
|
|
|
|
|
|
157 |
.related_posts ol{ list-style-type:none; margin:0; padding:0 }
|
158 |
.related_posts ol li{ display:inline-block; width:100%; margin-bottom: 12px; background: #fefefe; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -moz-box-shadow: 0 2px 3px rgba(0,0,0,.05); -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.05); box-shadow: 0 2px 3px rgba(0,0,0,.05); padding: 0px; }
|
159 |
.related_posts .related_link{ margin-top:18px; margin-bottom:10px; margin-right:10px }
|
@@ -221,7 +224,7 @@ table tr:hover td { background: #f2f2f2; background: -webkit-gradient(linear, le
|
|
221 |
.comments_list ul li .comment-body{ width:auto }
|
222 |
}
|
223 |
@media screen and (max-width: 425px) { .related_posts .related_link p{ display:none } .alignright, .alignleft {float: none;} .related_posts .related_link { margin: 13px 18px 14px 19px; } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .amp-meta-wrapper{ display: inline-block; margin-bottom: 0px; margin-top: 8px; width:100% } .ampforwp-tax-category{ padding-bottom:0 } h1.amp-wp-title{ margin: 16px 0px 13px 0px; } .amp-wp-byline{ padding:0 } .amp-meta-wrapper .amp-wp-meta-date{ display:none } .related_posts .related_link a { font-size: 17px; line-height: 1.5; } }
|
224 |
-
@media screen and (max-width: 375px) { #pagination .next a, #pagination .prev a{ padding: 10px 6px; font-size: 11px; color: #666; } .related_posts
|
225 |
@media screen and (max-width: 340px) { .related_posts .related_link a { font-size: 15px; } .single-post main{ padding: 10px 5px 10px 5px } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } .amp-category-post {line-height: 1.45;font-size: 12px; } .amp-category-block li:nth-child(3) {margin:0%} }
|
226 |
@media screen and (max-width: 320px) { .related_posts .related_link a { font-size: 13px; } h1.amp-wp-title{ font-size:17px; padding:0px 4px } }
|
227 |
@media screen and (max-width: 400px) { .amp-wp-title{ font-size: 19px; margin: 21px 10px -1px 10px; } }
|
153 |
.single-post .amp_author_area .amp_author_area_wrapper{ display: inline-block; width: 100%; line-height: 1.4; margin-top: 22px; font-size: 13px; color:#333; font-family: sans-serif; }
|
154 |
/* Related Posts */
|
155 |
main .amp-wp-content.relatedpost{ background: none; box-shadow: none; max-width: 1030px; padding:0px 0 0 0; margin:1.8em auto 1.5em auto }
|
156 |
+
.related_posts .related-title, .comments_list h3{ font-size: 14px; font-weight: bold; letter-spacing: 0.4px; margin: 15px 0 10px 0; color: #333; }
|
157 |
+
.related_posts .related-title {
|
158 |
+
display: block;
|
159 |
+
}
|
160 |
.related_posts ol{ list-style-type:none; margin:0; padding:0 }
|
161 |
.related_posts ol li{ display:inline-block; width:100%; margin-bottom: 12px; background: #fefefe; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -moz-box-shadow: 0 2px 3px rgba(0,0,0,.05); -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.05); box-shadow: 0 2px 3px rgba(0,0,0,.05); padding: 0px; }
|
162 |
.related_posts .related_link{ margin-top:18px; margin-bottom:10px; margin-right:10px }
|
224 |
.comments_list ul li .comment-body{ width:auto }
|
225 |
}
|
226 |
@media screen and (max-width: 425px) { .related_posts .related_link p{ display:none } .alignright, .alignleft {float: none;} .related_posts .related_link { margin: 13px 18px 14px 19px; } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .amp-meta-wrapper{ display: inline-block; margin-bottom: 0px; margin-top: 8px; width:100% } .ampforwp-tax-category{ padding-bottom:0 } h1.amp-wp-title{ margin: 16px 0px 13px 0px; } .amp-wp-byline{ padding:0 } .amp-meta-wrapper .amp-wp-meta-date{ display:none } .related_posts .related_link a { font-size: 17px; line-height: 1.5; } }
|
227 |
+
@media screen and (max-width: 375px) { #pagination .next a, #pagination .prev a{ padding: 10px 6px; font-size: 11px; color: #666; } .related_posts .related-title, .comments_list h3{ margin-top:15px; } #pagination .next{ margin-bottom:15px;} .related_posts .related_link a { font-size: 15px; line-height: 1.6; } }
|
228 |
@media screen and (max-width: 340px) { .related_posts .related_link a { font-size: 15px; } .single-post main{ padding: 10px 5px 10px 5px } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } .amp-category-post {line-height: 1.45;font-size: 12px; } .amp-category-block li:nth-child(3) {margin:0%} }
|
229 |
@media screen and (max-width: 320px) { .related_posts .related_link a { font-size: 13px; } h1.amp-wp-title{ font-size:17px; padding:0px 4px } }
|
230 |
@media screen and (max-width: 400px) { .amp-wp-title{ font-size: 19px; margin: 21px 10px -1px 10px; } }
|
@@ -133,10 +133,9 @@ if ( get_query_var( 'paged' ) ) {
|
|
133 |
<p><?php echo wp_trim_words( strip_shortcodes( $content ) , '15' ); ?></p>
|
134 |
<div class="featured_time">
|
135 |
<?php
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
?>
|
140 |
</div>
|
141 |
|
142 |
</div>
|
133 |
<p><?php echo wp_trim_words( strip_shortcodes( $content ) , '15' ); ?></p>
|
134 |
<div class="featured_time">
|
135 |
<?php
|
136 |
+
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
137 |
+
$post_date = apply_filters('ampforwp_modify_post_date',$post_date);
|
138 |
+
echo $post_date ;?>
|
|
|
139 |
</div>
|
140 |
|
141 |
</div>
|
@@ -23,7 +23,7 @@
|
|
23 |
global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-in-designthree'] .' ', 'accelerated-mobile-pages' )); } ?>
|
24 |
<?php foreach ($ampforwp_categories as $cat ) {
|
25 |
if($redux_builder_amp['ampforwp-archive-support']){
|
26 |
-
echo ('<span class="amp-cat-'.$cat->term_id.'"><a href="'.trailingslashit( trailingslashit(get_category_link($cat->
|
27 |
} else {
|
28 |
echo ('<span>'.$cat->name .'</span>');
|
29 |
}
|
23 |
global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-in-designthree'] .' ', 'accelerated-mobile-pages' )); } ?>
|
24 |
<?php foreach ($ampforwp_categories as $cat ) {
|
25 |
if($redux_builder_amp['ampforwp-archive-support']){
|
26 |
+
echo ('<span class="amp-cat-'.$cat->term_id.'"><a href="'.trailingslashit( trailingslashit(get_category_link($cat->term_id)).'amp') . '" >'.$cat->name .'</a></span>');//#934
|
27 |
} else {
|
28 |
echo ('<span>'.$cat->name .'</span>');
|
29 |
}
|
@@ -6,7 +6,7 @@
|
|
6 |
<div class="amp-wp-meta amp-wp-content ampforwp-tax-tag">
|
7 |
<?php foreach ($ampforwp_tags as $tag) {
|
8 |
if($redux_builder_amp['ampforwp-archive-support']){
|
9 |
-
echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.trailingslashit( trailingslashit(get_tag_link($tag->
|
10 |
} else {
|
11 |
echo '<span>'. $tag->name .'</span>';
|
12 |
}
|
6 |
<div class="amp-wp-meta amp-wp-content ampforwp-tax-tag">
|
7 |
<?php foreach ($ampforwp_tags as $tag) {
|
8 |
if($redux_builder_amp['ampforwp-archive-support']){
|
9 |
+
echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.trailingslashit( trailingslashit(get_tag_link($tag->term_id)).'amp') .'" >'. $tag->name .'</a></span>');//#934
|
10 |
} else {
|
11 |
echo '<span>'. $tag->name .'</span>';
|
12 |
}
|
@@ -43,7 +43,7 @@
|
|
43 |
<div class="amp-wp-content relatedpost">
|
44 |
<div class="related_posts">
|
45 |
<ol class="clearfix">
|
46 |
-
<
|
47 |
<?php
|
48 |
while( $my_query->have_posts() ) {
|
49 |
$my_query->the_post();
|
43 |
<div class="amp-wp-content relatedpost">
|
44 |
<div class="related_posts">
|
45 |
<ol class="clearfix">
|
46 |
+
<span class="related-title"><?php echo ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' ); ?></span><!--#930-->
|
47 |
<?php
|
48 |
while( $my_query->have_posts() ) {
|
49 |
$my_query->the_post();
|
@@ -80,7 +80,10 @@ if ( get_query_var( 'paged' ) ) {
|
|
80 |
<?php } ?>
|
81 |
<a href="<?php echo trailingslashit( trailingslashit( get_the_permalink() ) . AMPFORWP_AMP_QUERY_VAR ); ?>">
|
82 |
<div class="featured_title">
|
83 |
-
<div class="featured_time"><?php
|
|
|
|
|
|
|
84 |
<h1><?php the_title() ?></h1>
|
85 |
</div>
|
86 |
</a>
|
@@ -149,7 +152,10 @@ if ( get_query_var( 'paged' ) ) {
|
|
149 |
}
|
150 |
?>
|
151 |
<p><?php echo wp_trim_words( strip_shortcodes( $content ) , '15' ); ?></p>
|
152 |
-
<div class="featured_time"><?php
|
|
|
|
|
|
|
153 |
|
154 |
</div>
|
155 |
<div class="cb"></div>
|
80 |
<?php } ?>
|
81 |
<a href="<?php echo trailingslashit( trailingslashit( get_the_permalink() ) . AMPFORWP_AMP_QUERY_VAR ); ?>">
|
82 |
<div class="featured_title">
|
83 |
+
<div class="featured_time"><?php
|
84 |
+
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
85 |
+
$post_date = apply_filters('ampforwp_modify_post_date',$post_date);
|
86 |
+
echo $post_date ; ?></div>
|
87 |
<h1><?php the_title() ?></h1>
|
88 |
</div>
|
89 |
</a>
|
152 |
}
|
153 |
?>
|
154 |
<p><?php echo wp_trim_words( strip_shortcodes( $content ) , '15' ); ?></p>
|
155 |
+
<div class="featured_time"><?php
|
156 |
+
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
157 |
+
$post_date = apply_filters('ampforwp_modify_post_date',$post_date);
|
158 |
+
echo $post_date ; ?></div>
|
159 |
|
160 |
</div>
|
161 |
<div class="cb"></div>
|
@@ -87,7 +87,11 @@
|
|
87 |
}
|
88 |
?>
|
89 |
<p><?php echo wp_trim_words( strip_shortcodes( $content ) , '15' ); ?></p>
|
90 |
-
<div class="featured_time"><?php
|
|
|
|
|
|
|
|
|
91 |
|
92 |
</div>
|
93 |
<div class="cb"></div>
|
87 |
}
|
88 |
?>
|
89 |
<p><?php echo wp_trim_words( strip_shortcodes( $content ) , '15' ); ?></p>
|
90 |
+
<div class="featured_time"><?php
|
91 |
+
$post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
|
92 |
+
$post_date = apply_filters('ampforwp_modify_post_date',$post_date);
|
93 |
+
echo $post_date ; ?>
|
94 |
+
</div>
|
95 |
|
96 |
</div>
|
97 |
<div class="cb"></div>
|
@@ -53,6 +53,7 @@ amp-accordion>section[expanded] li a:before{ content: "\25b8"; left: -7px; top:
|
|
53 |
.toggle-navigationv2 ul h6{ padding: 10px 15px 10px 20px; background: #131313; border:0; font-size: 14px; font-weight:normal; }
|
54 |
.toggle-navigationv2 ul h6 a:after{ position: absolute; right: 20px; top: 0; color: #999; font-size: 13px; line-height: 38px; transition: 1s all; transform:rotate(-90deg); content: '\25be'; }
|
55 |
.toggle-navigationv2 ul h6 a{ color:#eee; }
|
|
|
56 |
.toggle-navigationv2 section[expanded] h6 a:after{ content: '\25be'; font-size: 13px; transform:rotate(0); transition: 1s all; color:#ccc }
|
57 |
.toggle-navigationv2 section[expanded] h6{ transition: 1s all; background:#666 }
|
58 |
.toggle-navigationv2 .social_icons{ margin-top: 25px; border-top: 1px solid #555; padding: 25px 0px; color: #fff; width: 100%; }
|
@@ -155,7 +156,8 @@ main .amp-wp-content.featured-image-content{ padding: 0px; border: 0; margin-bot
|
|
155 |
.archives_body main{ margin-top:30px }
|
156 |
/* Related Posts */
|
157 |
main .amp-wp-content.relatedpost{ background: none; box-shadow: none; padding:0px 0 0 0; margin:1.8em auto 1.5em auto }
|
158 |
-
.single-post
|
|
|
159 |
.related_posts ol{ list-style-type:none; margin:0; padding:0 }
|
160 |
.related_posts ol li{ display:inline-block; width:100%; margin-bottom: 12px; padding: 0px; }
|
161 |
.related_posts .related_link a{ color: #444; font-size: 16px; font-family: 'Roboto Slab', serif; font-weight: 600; }
|
@@ -297,7 +299,7 @@ table tr:hover td { background: #f2f2f2; background: -webkit-gradient(linear, le
|
|
297 |
@media screen and (max-width: 530px){ .home-post_image{ width: 35%; } .amp-loop-list .amp-wp-post-content{ width: 63%; } .amp-wp-post-content p { font-size: 12px; } .related_posts ol li p { line-height: 1.6; margin: 7px 0 0 0;} .comments_list ul li .comment-body {width:auto} .amp-category-block li:nth-child(3) {margin:0} }
|
298 |
@media screen and (max-width: 425px){ .home-post_image{ /* width: 125px;*/ width: 31.6%; overflow: hidden; height: 100px; /* margin-right: 13px; */ margin-right: 3%; } .home-post_image amp-img{ width: 144%; left: -20%; } h2.amp-wp-title{ margin-bottom: 7px; line-height: 1.31578947; font-size: 19px; position:relative;top:-3px } h2.amp-wp-title a{ color:#262626} .amp-loop-list{padding:25px 15px 22px 15px} .amp-loop-list .amp-wp-post-content{ width: 63%; } .amp-loop-list .amp-wp-post-content p, .related_posts .related_link p{ display:none } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .ampforwp-tax-category{ padding-bottom:0 } .amp-wp-byline{ padding:0 } .related_posts .related_link a{ font-size: 17px; line-height: 1.5; } .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 26px;} .icono-share{display:none} .ampforwp-social-icons amp-social-share{ margin-right: 3px;} main .amp-wp-content{ font-size: 16px; line-height: 26px;} .single-post .amp_author_area .amp_author_area_wrapper{font-size:13px;} .amp-category-post{ font-size:12px; color:#666 } }
|
299 |
@media screen and (max-width: 400px){ .amp-wp-title{ font-size: 19px; } }
|
300 |
-
@media screen and (max-width: 375px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 24px;} .home-post_image{ height: 79px; } .amp-carousel-slide h1{ font-size: 28px; line-height: 32px; } #pagination .next a, #pagination .prev a{ color: #666; font-size: 14px; padding: 15px 0px; margin-top: -5px; }
|
301 |
@media screen and (max-width: 340px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 22px;} .amp-loop-list{ padding: 20px 15px 18px 15px; } h2.amp-wp-title{ line-height: 1.31578947; font-size: 17px; } .related_posts .related_link a{ font-size: 15px; } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } }
|
302 |
@media screen and (max-width: 320px){ .related_posts .related_link a{ font-size: 13px; } .ampforwp-social-icons amp-social-share{ margin-right: 1px; } }
|
303 |
.entry-content amp-anim{display:table-cell;}
|
53 |
.toggle-navigationv2 ul h6{ padding: 10px 15px 10px 20px; background: #131313; border:0; font-size: 14px; font-weight:normal; }
|
54 |
.toggle-navigationv2 ul h6 a:after{ position: absolute; right: 20px; top: 0; color: #999; font-size: 13px; line-height: 38px; transition: 1s all; transform:rotate(-90deg); content: '\25be'; }
|
55 |
.toggle-navigationv2 ul h6 a{ color:#eee; }
|
56 |
+
.toggle-navigationv2 ul h6:after { content: ""; height: 20px; position: absolute; right: 10px; width: 20px; z-index: 999; }
|
57 |
.toggle-navigationv2 section[expanded] h6 a:after{ content: '\25be'; font-size: 13px; transform:rotate(0); transition: 1s all; color:#ccc }
|
58 |
.toggle-navigationv2 section[expanded] h6{ transition: 1s all; background:#666 }
|
59 |
.toggle-navigationv2 .social_icons{ margin-top: 25px; border-top: 1px solid #555; padding: 25px 0px; color: #fff; width: 100%; }
|
156 |
.archives_body main{ margin-top:30px }
|
157 |
/* Related Posts */
|
158 |
main .amp-wp-content.relatedpost{ background: none; box-shadow: none; padding:0px 0 0 0; margin:1.8em auto 1.5em auto }
|
159 |
+
.single-post ,.related-title,.single-post .comments_list h3{ font-size: 20px; color: #777; font-family:'Roboto Slab', serif; border-bottom: 1px solid #eee; font-weight: 400; padding-bottom: 1px; margin-bottom: 10px; }
|
160 |
+
.related-title {display:block}
|
161 |
.related_posts ol{ list-style-type:none; margin:0; padding:0 }
|
162 |
.related_posts ol li{ display:inline-block; width:100%; margin-bottom: 12px; padding: 0px; }
|
163 |
.related_posts .related_link a{ color: #444; font-size: 16px; font-family: 'Roboto Slab', serif; font-weight: 600; }
|
299 |
@media screen and (max-width: 530px){ .home-post_image{ width: 35%; } .amp-loop-list .amp-wp-post-content{ width: 63%; } .amp-wp-post-content p { font-size: 12px; } .related_posts ol li p { line-height: 1.6; margin: 7px 0 0 0;} .comments_list ul li .comment-body {width:auto} .amp-category-block li:nth-child(3) {margin:0} }
|
300 |
@media screen and (max-width: 425px){ .home-post_image{ /* width: 125px;*/ width: 31.6%; overflow: hidden; height: 100px; /* margin-right: 13px; */ margin-right: 3%; } .home-post_image amp-img{ width: 144%; left: -20%; } h2.amp-wp-title{ margin-bottom: 7px; line-height: 1.31578947; font-size: 19px; position:relative;top:-3px } h2.amp-wp-title a{ color:#262626} .amp-loop-list{padding:25px 15px 22px 15px} .amp-loop-list .amp-wp-post-content{ width: 63%; } .amp-loop-list .amp-wp-post-content p, .related_posts .related_link p{ display:none } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .ampforwp-tax-category{ padding-bottom:0 } .amp-wp-byline{ padding:0 } .related_posts .related_link a{ font-size: 17px; line-height: 1.5; } .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 26px;} .icono-share{display:none} .ampforwp-social-icons amp-social-share{ margin-right: 3px;} main .amp-wp-content{ font-size: 16px; line-height: 26px;} .single-post .amp_author_area .amp_author_area_wrapper{font-size:13px;} .amp-category-post{ font-size:12px; color:#666 } }
|
301 |
@media screen and (max-width: 400px){ .amp-wp-title{ font-size: 19px; } }
|
302 |
+
@media screen and (max-width: 375px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 24px;} .home-post_image{ height: 79px; } .amp-carousel-slide h1{ font-size: 28px; line-height: 32px; } #pagination .next a, #pagination .prev a{ color: #666; font-size: 14px; padding: 15px 0px; margin-top: -5px; }.related-title,.comments_list h3{ margin-top:15px; } #pagination .next{ margin-bottom:15px; } .related_posts .related_link a{ font-size: 15px; line-height: 1.6; } }
|
303 |
@media screen and (max-width: 340px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 22px;} .amp-loop-list{ padding: 20px 15px 18px 15px; } h2.amp-wp-title{ line-height: 1.31578947; font-size: 17px; } .related_posts .related_link a{ font-size: 15px; } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } }
|
304 |
@media screen and (max-width: 320px){ .related_posts .related_link a{ font-size: 13px; } .ampforwp-social-icons amp-social-share{ margin-right: 1px; } }
|
305 |
.entry-content amp-anim{display:table-cell;}
|
@@ -62,7 +62,7 @@
|
|
62 |
50. Properly adding noditification Scritps the AMP way
|
63 |
51. Adding Digg Digg compatibility with AMP
|
64 |
52. Adding a generalized sanitizer function for purifiying normal html to amp-html
|
65 |
-
53.
|
66 |
54. Change the default values of post meta for AMP pages.
|
67 |
55. Call Now Button Feature added
|
68 |
56. Multi Translation Feature #540
|
@@ -102,6 +102,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', $redux_builder_amp['ampforwp-number-of-comm
|
|
102 |
add_action( 'wp', 'ampforwp_add_endpoint_actions' );
|
103 |
}
|
104 |
|
|
|
105 |
function ampforwp_add_endpoint_actions() {
|
106 |
|
107 |
$ampforwp_is_amp_endpoint = ampforwp_is_amp_endpoint();
|
@@ -352,11 +353,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', $redux_builder_amp['ampforwp-number-of-comm
|
|
352 |
add_action('amp_post_template_head','ampforwp_register_additional_scripts', 20);
|
353 |
function ampforwp_register_additional_scripts() {
|
354 |
global $redux_builder_amp;
|
355 |
-
|
356 |
-
<script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
|
357 |
-
<?php } ?>
|
358 |
-
|
359 |
-
<?php if( $redux_builder_amp['enable-single-social-icons'] == true || AMPFORWP_DM_SOCIAL_CHECK === 'true' ) { ?>
|
360 |
<?php if( is_single() ) {
|
361 |
if( is_socialshare_or_socialsticky_enabled_in_ampforwp() ) { ?>
|
362 |
<script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
|
@@ -1402,7 +1399,11 @@ function ampforwp_remove_schema_data() {
|
|
1402 |
//Removing the Monarch social share icons from AMP
|
1403 |
ampforwp_remove_filters_for_class( 'the_content', 'ET_Monarch', 'display_inline', 10 );
|
1404 |
ampforwp_remove_filters_for_class( 'the_content', 'ET_Monarch', 'display_media', 9999 );
|
|
|
|
|
1405 |
}
|
|
|
|
|
1406 |
}
|
1407 |
|
1408 |
// 22. Removing author links from comments Issue #180
|
@@ -1730,10 +1731,23 @@ function ampforwp_skip_amp_post( $skip, $post_id, $post ) {
|
|
1730 |
}
|
1731 |
}
|
1732 |
|
1733 |
-
//31. removing scripts added by cleantalk
|
|
|
1734 |
add_action('amp_init','ampforwp_remove_js_script_cleantalk');
|
1735 |
function ampforwp_remove_js_script_cleantalk() {
|
1736 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1737 |
}
|
1738 |
|
1739 |
//32. various lazy loading plugins Support
|
@@ -1844,11 +1858,13 @@ function social_sharing_removal_code() {
|
|
1844 |
add_action('amp_init','social_sharing_removal_code', 9);
|
1845 |
|
1846 |
|
1847 |
-
//35. Disqus Comments Support
|
1848 |
add_action('ampforwp_post_after_design_elements','ampforwp_add_disqus_support');
|
1849 |
function ampforwp_add_disqus_support() {
|
1850 |
-
|
1851 |
global $redux_builder_amp;
|
|
|
|
|
|
|
1852 |
if ( $redux_builder_amp['ampforwp-disqus-comments-support'] ) {
|
1853 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
1854 |
global $post; $post_slug=$post->post_name;
|
@@ -1880,7 +1896,7 @@ function ampforwp_add_disqus_support() {
|
|
1880 |
add_filter( 'amp_post_template_data', 'ampforwp_add_disqus_scripts' );
|
1881 |
function ampforwp_add_disqus_scripts( $data ) {
|
1882 |
global $redux_builder_amp;
|
1883 |
-
if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && is_singular() ) {
|
1884 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
1885 |
if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
|
1886 |
$data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
|
@@ -2409,120 +2425,22 @@ function ampforwp_content_sanitizer( $content ) {
|
|
2409 |
}
|
2410 |
|
2411 |
|
2412 |
-
//53.
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
if( array_key_exists( 'link' , $atts ) ) {
|
2429 |
-
$atts[] = shortcode_atts( array(
|
2430 |
-
'num' => get_permalink($atts['num']),
|
2431 |
-
'link' => get_permalink($atts['link'])
|
2432 |
-
), $atts );
|
2433 |
-
} else {
|
2434 |
-
$atts[] = shortcode_atts( array(
|
2435 |
-
'num' => get_permalink($atts['num']),
|
2436 |
-
), $atts );
|
2437 |
-
$atts['link'] = 'noamp';
|
2438 |
-
}
|
2439 |
-
|
2440 |
-
$exclude_ids = get_option('ampforwp_exclude_post');
|
2441 |
-
$number_of_latest_prcts = $atts['num'] ;
|
2442 |
-
|
2443 |
-
$q = new WP_Query( array(
|
2444 |
-
'post_type' => 'product',
|
2445 |
-
'orderby' => 'date',
|
2446 |
-
'post__not_in' => $exclude_ids,
|
2447 |
-
'has_password' => false,
|
2448 |
-
'post_status'=> 'publish',
|
2449 |
-
'posts_per_page' => $number_of_latest_prcts
|
2450 |
-
) );
|
2451 |
-
|
2452 |
-
if ( $q->have_posts() ) : $content = '<ul class="ampforwp_wc_shortcode">';
|
2453 |
-
while ( $q->have_posts() ) : $q->the_post();
|
2454 |
-
global $post;
|
2455 |
-
global $product;
|
2456 |
-
if( $atts['link'] === 'amp' ) {
|
2457 |
-
$ampforwp_post_url = trailingslashit( get_permalink() ) . AMPFORWP_AMP_QUERY_VAR ;
|
2458 |
-
} else {
|
2459 |
-
$ampforwp_post_url = trailingslashit( get_permalink() ) ;
|
2460 |
-
}
|
2461 |
-
$content .= '<li class="ampforwp_wc_shortcode_child"><a href="'.$ampforwp_post_url.'">';
|
2462 |
-
|
2463 |
-
// $content .= '<div class="amp-wp-content ampforwp-wc-parent"><div class="amp-wp-content featured-image-content">';
|
2464 |
-
if ( has_post_thumbnail() ) {
|
2465 |
-
$thumb_id = get_post_thumbnail_id();
|
2466 |
-
$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail', true);
|
2467 |
-
$thumb_url = $thumb_url_array[0];
|
2468 |
-
|
2469 |
-
$content .= '<amp-img src='.$thumb_url.' width="150" height="150" layout="responsive"></amp-img>' ;
|
2470 |
-
}
|
2471 |
-
if ( $product->is_on_sale() ) {
|
2472 |
-
$content .= '<span class="onsale">' . 'Sale!' . '</span>';
|
2473 |
-
}
|
2474 |
-
// $content .= '</div>';
|
2475 |
-
$content .= '<div class="ampforwp-wc-title">'.get_the_title().'</div>';
|
2476 |
-
if ( class_exists( 'WooCommerce' ) ) {
|
2477 |
-
// $content .= '<div class="ampforwp-wc-price">';
|
2478 |
-
$amp_product_price = $woocommerce->product_factory->get_product()->get_price_html();
|
2479 |
-
$context = '';
|
2480 |
-
$allowed_tags = wp_kses_allowed_html( $context );
|
2481 |
-
|
2482 |
-
$stock_status = $product->is_in_stock() ? 'InStock' : 'OutOfStock' ;
|
2483 |
-
if ( $amp_product_price && $stock_status = 'InStock' ) {
|
2484 |
-
$content .= '<div class="ampforwp-wc-price">' . wp_kses( $amp_product_price , $allowed_tags ) . '</div>' ;
|
2485 |
-
}
|
2486 |
-
|
2487 |
-
$rating_count = $product->get_rating_count();
|
2488 |
-
$rating = $product->get_average_rating();
|
2489 |
-
if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' && $rating_count ) {
|
2490 |
-
$content .= '<div class="ampforwp_wc_star_rating" class="star-rating" title="Rated '.$rating.' out of 5' . '">';
|
2491 |
-
$content .= '<span class="ampforwp_wc_star_rating_text" ><strong>'.$rating.'</strong>'.__(' out of 5 </span>','accelerated-mobile-pages');
|
2492 |
-
$content .= '</div>';
|
2493 |
-
}
|
2494 |
|
2495 |
-
}
|
2496 |
-
$content .= '</a></li>'; ?>
|
2497 |
-
<?php endwhile; $content .= '</ul>'; ?>
|
2498 |
-
<?php endif; ?>
|
2499 |
-
<?php wp_reset_postdata();
|
2500 |
-
|
2501 |
-
// Add AMP Woocommerce latest Products only on AMP Endpoint
|
2502 |
-
$endpoint_check = is_amp_endpoint();
|
2503 |
-
if ( $endpoint_check ) {
|
2504 |
-
return $content;
|
2505 |
-
}
|
2506 |
-
}
|
2507 |
-
|
2508 |
-
// Generating Short code for AMP Woocommerce latest Products
|
2509 |
-
function ampforwp_latest_products_register_shortcodes() {
|
2510 |
-
add_shortcode('amp-woocommerce', 'get_amp_latest_prodcuts_markup');
|
2511 |
-
}
|
2512 |
-
add_action( 'amp_init', 'ampforwp_latest_products_register_shortcodes');
|
2513 |
-
|
2514 |
-
// Adding the styling for AMP Woocommerce latest Products
|
2515 |
-
add_action('amp_post_template_css','amp_latest_products_styling',PHP_INT_MAX);
|
2516 |
-
function amp_latest_products_styling() { ?>
|
2517 |
-
.ampforwp_wc_shortcode{margin-top: 0;padding:0;display:inline-block;width: 100%;}
|
2518 |
-
.ampforwp_wc_shortcode li{position: relative;width:29%; font-size:12px; line-height: 1; float: left;list-style-type: none;margin:2%;}
|
2519 |
-
.ampforwp_wc_shortcode .onsale{position: absolute;top: 0;right: 0;background: #ddd;padding: 7px;font-size: 12px;}
|
2520 |
-
.single-post .ampforwp_wc_shortcode li amp-img{margin:0}
|
2521 |
-
.ampforwp-wc-title{margin: 8px 0px 10px 0px;font-size: 13px;}
|
2522 |
-
.ampforwp-wc-price{color:#444}
|
2523 |
-
.wc_widgettitle{text-align:center;margin-bottom: 0px;}
|
2524 |
-
.ampforwp-wc-price, .ampforwp_wc_star_rating{float:left;margin-right: 10px;}
|
2525 |
-
<?php }
|
2526 |
|
2527 |
// 54. Change the default values of post meta for AMP pages. #746
|
2528 |
add_action('admin_head','ampforwp_change_default_amp_page_meta');
|
62 |
50. Properly adding noditification Scritps the AMP way
|
63 |
51. Adding Digg Digg compatibility with AMP
|
64 |
52. Adding a generalized sanitizer function for purifiying normal html to amp-html
|
65 |
+
53. Removed AMP-WooCommerce Code and added it in AMP-WooCommerce #929
|
66 |
54. Change the default values of post meta for AMP pages.
|
67 |
55. Call Now Button Feature added
|
68 |
56. Multi Translation Feature #540
|
102 |
add_action( 'wp', 'ampforwp_add_endpoint_actions' );
|
103 |
}
|
104 |
|
105 |
+
|
106 |
function ampforwp_add_endpoint_actions() {
|
107 |
|
108 |
$ampforwp_is_amp_endpoint = ampforwp_is_amp_endpoint();
|
353 |
add_action('amp_post_template_head','ampforwp_register_additional_scripts', 20);
|
354 |
function ampforwp_register_additional_scripts() {
|
355 |
global $redux_builder_amp;
|
356 |
+
if( $redux_builder_amp['enable-single-social-icons'] == true || AMPFORWP_DM_SOCIAL_CHECK === 'true' ) { ?>
|
|
|
|
|
|
|
|
|
357 |
<?php if( is_single() ) {
|
358 |
if( is_socialshare_or_socialsticky_enabled_in_ampforwp() ) { ?>
|
359 |
<script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
|
1399 |
//Removing the Monarch social share icons from AMP
|
1400 |
ampforwp_remove_filters_for_class( 'the_content', 'ET_Monarch', 'display_inline', 10 );
|
1401 |
ampforwp_remove_filters_for_class( 'the_content', 'ET_Monarch', 'display_media', 9999 );
|
1402 |
+
//Compatibility with wordpress twitter bootstrap #525
|
1403 |
+
ampforwp_remove_filters_for_class( 'the_content', 'ICWP_WPTB_CssProcessor_V1', 'run', 10 );
|
1404 |
}
|
1405 |
+
//Removing the WPTouch Pro social share links from AMP
|
1406 |
+
remove_filter( 'the_content', 'foundation_handle_share_links_bottom', 100 );
|
1407 |
}
|
1408 |
|
1409 |
// 22. Removing author links from comments Issue #180
|
1731 |
}
|
1732 |
}
|
1733 |
|
1734 |
+
//31. removing scripts added by cleantalk and
|
1735 |
+
// #525 WordPress Twitter Bootstrap CSS
|
1736 |
add_action('amp_init','ampforwp_remove_js_script_cleantalk');
|
1737 |
function ampforwp_remove_js_script_cleantalk() {
|
1738 |
+
$current_url = '';
|
1739 |
+
$amp_check = '';
|
1740 |
+
|
1741 |
+
$current_url = $_SERVER['REQUEST_URI'];
|
1742 |
+
$current_url = explode('/', $current_url);
|
1743 |
+
$current_url = array_filter($current_url);
|
1744 |
+
$amp_check = in_array('amp', $current_url);
|
1745 |
+
if ( true === $amp_check ) {
|
1746 |
+
ampforwp_remove_filters_for_class( 'wp_loaded', 'ICWP_WPTB_CssProcessor', 'onWpLoaded', 0 );
|
1747 |
+
}
|
1748 |
+
|
1749 |
+
remove_action('wp_loaded', 'ct_add_nocache_script', 1);
|
1750 |
+
|
1751 |
}
|
1752 |
|
1753 |
//32. various lazy loading plugins Support
|
1858 |
add_action('amp_init','social_sharing_removal_code', 9);
|
1859 |
|
1860 |
|
1861 |
+
//35. Disqus Comments Support
|
1862 |
add_action('ampforwp_post_after_design_elements','ampforwp_add_disqus_support');
|
1863 |
function ampforwp_add_disqus_support() {
|
|
|
1864 |
global $redux_builder_amp;
|
1865 |
+
if ( !comments_open() ){
|
1866 |
+
return;
|
1867 |
+
}//931
|
1868 |
if ( $redux_builder_amp['ampforwp-disqus-comments-support'] ) {
|
1869 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
1870 |
global $post; $post_slug=$post->post_name;
|
1896 |
add_filter( 'amp_post_template_data', 'ampforwp_add_disqus_scripts' );
|
1897 |
function ampforwp_add_disqus_scripts( $data ) {
|
1898 |
global $redux_builder_amp;
|
1899 |
+
if ( $redux_builder_amp['ampforwp-disqus-comments-support'] && is_singular() && comments_open() ) {
|
1900 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
1901 |
if ( empty( $data['amp_component_scripts']['amp-iframe'] ) ) {
|
1902 |
$data['amp_component_scripts']['amp-iframe'] = 'https://cdn.ampproject.org/v0/amp-iframe-0.1.js';
|
2425 |
}
|
2426 |
|
2427 |
|
2428 |
+
//53. Removed AMP-WooCommerce Code and added it in AMP-WooCommerce #929
|
2429 |
+
// Adding the styling for AMP Woocommerce latest Products(AMP-WooCommerce Widgets)
|
2430 |
+
add_action('amp_post_template_css','amp_latest_products_styling',PHP_INT_MAX);
|
2431 |
+
function amp_latest_products_styling() {
|
2432 |
+
if ( class_exists( 'woocommerce' ) ) { ?>
|
2433 |
+
.ampforwp_wc_shortcode{margin-top: 0;padding:0;display:inline-block;width: 100%;}
|
2434 |
+
.ampforwp_wc_shortcode li{position: relative;width:29%; font-size:12px; line-height: 1; float: left;list-style-type: none;margin:2%;}
|
2435 |
+
.ampforwp_wc_shortcode .onsale{position: absolute;top: 0;right: 0;background: #ddd;padding: 7px;font-size: 12px;}
|
2436 |
+
.single-post .ampforwp_wc_shortcode li amp-img{margin:0}
|
2437 |
+
.ampforwp-wc-title{margin: 8px 0px 10px 0px;font-size: 13px;}
|
2438 |
+
.ampforwp-wc-price{color:#444}
|
2439 |
+
.wc_widgettitle{text-align:center;margin-bottom: 0px;}
|
2440 |
+
.ampforwp-wc-price, .ampforwp_wc_star_rating{float:left;margin-right: 10px;}
|
2441 |
+
<?php }
|
2442 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2444 |
|
2445 |
// 54. Change the default values of post meta for AMP pages. #746
|
2446 |
add_action('admin_head','ampforwp_change_default_amp_page_meta');
|
@@ -226,6 +226,12 @@ function no_empty_p_tags($DOMDocument){
|
|
226 |
}
|
227 |
|
228 |
return $DOMDocument;
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
}
|
230 |
/*function fb_gallery_shortcode($output, $attr, $instance){
|
231 |
$post = get_post();
|
226 |
}
|
227 |
|
228 |
return $DOMDocument;
|
229 |
+
}
|
230 |
+
|
231 |
+
function get_ia_placement_id(){
|
232 |
+
global $redux_builder_amp;
|
233 |
+
$instant_article_ad_id = $redux_builder_amp['fb-instant-article-ad-id'];
|
234 |
+
return $instant_article_ad_id;
|
235 |
}
|
236 |
/*function fb_gallery_shortcode($output, $attr, $instance){
|
237 |
$post = get_post();
|
@@ -1,9 +1,14 @@
|
|
1 |
<!doctype html>
|
2 |
<html lang="en" prefix="op: http://media.facebook.com/op#">
|
|
|
3 |
<head>
|
4 |
<meta charset="utf-8">
|
5 |
<link rel="canonical" href="<?php the_permalink(); ?>">
|
6 |
<meta property="op:markup_version" content="v1.0">
|
|
|
|
|
|
|
|
|
7 |
</head>
|
8 |
<body>
|
9 |
<article>
|
@@ -12,7 +17,12 @@
|
|
12 |
<h1><?php the_title(); ?></h1>
|
13 |
|
14 |
<!-- kicker -->
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
<!-- publication date/time -->
|
18 |
<time class="op-published" datetime="<?php echo get_the_date("c"); ?>"><?php echo get_the_date(get_option('date_format') . ", " . get_option('time_format')); ?></time>
|
@@ -34,12 +44,20 @@
|
|
34 |
?>
|
35 |
<figure>
|
36 |
<img src="<?php echo $thumbnail_url; ?>" />
|
37 |
-
<?php if (strlen(apply_filters("the_content", $attachment->post_excerpt)) > 0):
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
40 |
</figure>
|
41 |
<?php endif; ?>
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
43 |
</header>
|
44 |
|
45 |
<!-- body -->
|
1 |
<!doctype html>
|
2 |
<html lang="en" prefix="op: http://media.facebook.com/op#">
|
3 |
+
<?php global $redux_builder_amp; ?>
|
4 |
<head>
|
5 |
<meta charset="utf-8">
|
6 |
<link rel="canonical" href="<?php the_permalink(); ?>">
|
7 |
<meta property="op:markup_version" content="v1.0">
|
8 |
+
<?php if ( $redux_builder_amp['fb-instant-article-ads'] ){ ?>
|
9 |
+
<!-- automatic ad placement -->
|
10 |
+
<meta property="fb:use_automatic_ad_placement" content="true">
|
11 |
+
<?php } ?>
|
12 |
</head>
|
13 |
<body>
|
14 |
<article>
|
17 |
<h1><?php the_title(); ?></h1>
|
18 |
|
19 |
<!-- kicker -->
|
20 |
+
<h3 class="op-kicker">
|
21 |
+
<?php $categories = get_the_category();
|
22 |
+
if ( ! empty( $categories ) ) {
|
23 |
+
echo esc_html( $categories[0]->name );
|
24 |
+
} ?>
|
25 |
+
</h3>
|
26 |
|
27 |
<!-- publication date/time -->
|
28 |
<time class="op-published" datetime="<?php echo get_the_date("c"); ?>"><?php echo get_the_date(get_option('date_format') . ", " . get_option('time_format')); ?></time>
|
44 |
?>
|
45 |
<figure>
|
46 |
<img src="<?php echo $thumbnail_url; ?>" />
|
47 |
+
<?php if (strlen(apply_filters("the_content", $attachment->post_excerpt)) > 0):
|
48 |
+
if ( $attachment->post_excerpt ) { ?>
|
49 |
+
<figcaption><?php echo apply_filters("the_content", $attachment->post_excerpt); ?></figcaption>
|
50 |
+
<?php
|
51 |
+
}
|
52 |
+
endif; ?>
|
53 |
</figure>
|
54 |
<?php endif; ?>
|
55 |
+
<?php if ( $redux_builder_amp['fb-instant-article-ads'] ){ ?>
|
56 |
+
<!-- facebook audience network ad -->
|
57 |
+
<figure class="op-ad">
|
58 |
+
<iframe width="300" height="250" style="border:0; margin:0;" src="https://www.facebook.com/adnw_request?placement=<?php echo get_ia_placement_id(); ?>&adtype=banner300x250"></iframe>
|
59 |
+
</figure>
|
60 |
+
<?php } ?>
|
61 |
</header>
|
62 |
|
63 |
<!-- body -->
|