Version Description
Download this release
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.85.1 |
Comparing to | |
See all releases |
Code changes from version 0.9.85.0 to 0.9.85.1
- README.md +2 -2
- accelerated-moblie-pages.php +2 -2
- components/comments/comments.php +9 -3
- includes/options/admin-config.php +12 -1
- includes/vendor/amp/includes/class-amp-post-template.php +3 -1
- readme.txt +2 -2
- templates/design-manager/design-1/style.php +5 -1
- templates/design-manager/design-2/style.php +3 -0
- templates/design-manager/design-3/style.php +3 -0
- templates/design-manager/swift/style.php +5 -1
- templates/features.php +18 -5
README.md
CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
|
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 0.9.85.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 4.9.5
|
7 |
+
Stable tag: 0.9.85.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
accelerated-moblie-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP for WP - Accelerated Mobile Pages for WordPress
|
6 |
-
Version: 0.9.85.
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
@@ -19,7 +19,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
|
|
19 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
20 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
21 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
22 |
-
define('AMPFORWP_VERSION','0.9.85.
|
23 |
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
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.85.1
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
19 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
20 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
21 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
22 |
+
define('AMPFORWP_VERSION','0.9.85.1');
|
23 |
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
components/comments/comments.php
CHANGED
@@ -147,8 +147,14 @@ function ampforwp_framework_get_disqus_comments(){
|
|
147 |
global $redux_builder_amp;
|
148 |
$width = $height = 420;
|
149 |
|
150 |
-
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
}
|
153 |
|
154 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
@@ -166,7 +172,7 @@ function ampforwp_framework_get_disqus_comments(){
|
|
166 |
<amp-iframe
|
167 |
height=<?php echo $height ?>
|
168 |
width=<?php echo $width ?>
|
169 |
-
layout="
|
170 |
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
|
171 |
frameborder="0"
|
172 |
src="<?php echo $disqus_url ?>" >
|
147 |
global $redux_builder_amp;
|
148 |
$width = $height = 420;
|
149 |
|
150 |
+
$layout = "";
|
151 |
+
$layout = 'responsive';
|
152 |
+
if ( isset($redux_builder_amp['ampforwp-disqus-layout']) && 'fixed' == $redux_builder_amp['ampforwp-disqus-layout'] ) {
|
153 |
+
$layout = 'fixed';
|
154 |
+
|
155 |
+
if ( isset($redux_builder_amp['ampforwp-disqus-height']) && $redux_builder_amp['ampforwp-disqus-height'] ) {
|
156 |
+
$height = $redux_builder_amp['ampforwp-disqus-height'];
|
157 |
+
}
|
158 |
}
|
159 |
|
160 |
if( $redux_builder_amp['ampforwp-disqus-comments-name'] !== '' ) {
|
172 |
<amp-iframe
|
173 |
height=<?php echo $height ?>
|
174 |
width=<?php echo $width ?>
|
175 |
+
layout="<?php echo $layout ?>"
|
176 |
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
|
177 |
frameborder="0"
|
178 |
src="<?php echo $disqus_url ?>" >
|
includes/options/admin-config.php
CHANGED
@@ -2138,13 +2138,24 @@ $forms_support[]= array(
|
|
2138 |
'placeholder' => 'https://comments.example.com/disqus.php',
|
2139 |
'required' => array('ampforwp-disqus-host-position', '=' , '0'),
|
2140 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2141 |
array(
|
2142 |
'id' => 'ampforwp-disqus-height',
|
2143 |
'type' => 'text',
|
2144 |
'title' => __('Disqus Iframe Height', 'accelerated-mobile-pages'),
|
2145 |
'placeholder' => 'Enter the height',
|
2146 |
'default' => '420',
|
2147 |
-
'required' => array('ampforwp-disqus-
|
2148 |
),
|
2149 |
array(
|
2150 |
'id' => 'ampforwp-facebook-comments-support',
|
2138 |
'placeholder' => 'https://comments.example.com/disqus.php',
|
2139 |
'required' => array('ampforwp-disqus-host-position', '=' , '0'),
|
2140 |
),
|
2141 |
+
array(
|
2142 |
+
'id' => 'ampforwp-disqus-layout',
|
2143 |
+
'title' => __('Disqus Layout', 'accelerated-mobile-pages'),
|
2144 |
+
'type' => 'select',
|
2145 |
+
'options' => array(
|
2146 |
+
'fixed' => 'Fixed',
|
2147 |
+
'responsive' => 'Responsive'
|
2148 |
+
),
|
2149 |
+
'default' => 'responsive',
|
2150 |
+
'required'=>array('ampforwp-disqus-comments-support','=','1'),
|
2151 |
+
),
|
2152 |
array(
|
2153 |
'id' => 'ampforwp-disqus-height',
|
2154 |
'type' => 'text',
|
2155 |
'title' => __('Disqus Iframe Height', 'accelerated-mobile-pages'),
|
2156 |
'placeholder' => 'Enter the height',
|
2157 |
'default' => '420',
|
2158 |
+
'required' => array('ampforwp-disqus-layout', '=' , 'fixed'),
|
2159 |
),
|
2160 |
array(
|
2161 |
'id' => 'ampforwp-facebook-comments-support',
|
includes/vendor/amp/includes/class-amp-post-template.php
CHANGED
@@ -435,7 +435,9 @@ class AMP_Post_Template {
|
|
435 |
|
436 |
|
437 |
private function locate_template( $file ) {
|
438 |
-
$
|
|
|
|
|
439 |
return locate_template( array( $search_file ), false );
|
440 |
}
|
441 |
|
435 |
|
436 |
|
437 |
private function locate_template( $file ) {
|
438 |
+
$location = 'ampforwp';
|
439 |
+
$location = apply_filters("ampforwp_tamplate_locat",$location);
|
440 |
+
$search_file = sprintf( $location.'/%s', basename( $file ) );
|
441 |
return locate_template( array( $search_file ), false );
|
442 |
}
|
443 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
|
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 0.9.85.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 4.9.5
|
7 |
+
Stable tag: 0.9.85.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
templates/design-manager/design-1/style.php
CHANGED
@@ -62,7 +62,11 @@ blockquote {color: <?php echo sanitize_hex_color( $text_color ); ?>;background:
|
|
62 |
.amp-wp-title {color: <?php echo sanitize_hex_color( $text_color ); ?>;display: block;flex: 1 0 100%;font-weight: 900;margin: 0;width: 100%;}.amp-wp-meta {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;display: inline-block;flex: 2 1 50%;font-size: .875em;line-height: 1.7em;margin: 0;padding: 0;}.ampforwp-meta-info{margin-top: 0px;}.amp-wp-article-header .amp-wp-meta:last-of-type {text-align: right;}.amp-wp-article-header .amp-wp-meta:first-of-type {text-align: left;}.amp-wp-byline amp-img,.amp-wp-byline .amp-wp-author {display: inline-block;vertical-align: middle;}.amp-wp-byline amp-img {border: 1px solid <?php echo sanitize_hex_color( $link_color ); ?>;border-radius: 50%;position: relative;margin-right: 6px;}.amp-wp-posted-on {text-align: right;}.hide-meta-info{ display: none; }
|
63 |
.amp-wp-article-featured-image {margin: 1.5em 16px 1.5em;}.amp-wp-article-featured-image amp-img {margin: 0 auto;}.amp-wp-article-featured-image.wp-caption .wp-caption-text, .ampforwp-gallery-item .wp-caption-text {margin: 0 18px;}.amp-wp-frontpage .the_content {padding: 10px;}
|
64 |
.ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
|
65 |
-
.amp-wp-frontpage .ampforwp-title {margin-left:10px;}.amp-wp-article a{text-decoration:none}.amp-wp-article-content {margin: 0 16px;}.amp-wp-article-content ul,.amp-wp-article-content ol {margin-left: 1em;}.amp-wp-article-content amp-img {margin: 0 auto;}.amp-wp-article-content amp-img.alignright {margin: 0 0 1em 16px;}.amp-wp-article-content amp-img.alignleft {margin: 0 16px 1em 0;}
|
|
|
|
|
|
|
|
|
66 |
.amp-wp-footer div{margin:0 auto;max-width:calc(840px - 32px);padding:1.25em 16px;position:relative}.amp-wp-footer h2{font-size:1em;line-height:1.375em;margin:0 0 .5em}
|
67 |
.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;}
|
68 |
.amp-wp-footer a{text-decoration:none}.copyright_txt{float:left}.back-to-top{float:right}.amp-wp-header .nav_container{float: right;top: 16px;line-height: 1; right: 65px; position: absolute}.toggle-text{position:absolute;right:0;height:22px;width:28px}.toggle-text span{display:block;position:absolute;height:2px;width:25px;background:#fff;border-radius:19px;opacity:1;left:0}.toggle-text span:nth-child(2){top:9px}.toggle-text span:nth-child(3){top:18px}.amp-wp-home .amp-wp-meta{margin:5px 0}.amp-wp-home .amp-wp-content p{display:inline-block;width:100%}.ampforwp-custom-index .amp-wp-title a {text-decoration: none;color: <?php echo sanitize_hex_color( $text_color ); ?>;}.comment-button-wrapper a,.related_posts ol{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.amp-wp-meta{display:flex}.amp-wp-posted-on{display:initial}#pagination .next,#pagination .prev{display:inline-block}.ampforwp-custom-index .amp-wp-content{margin-bottom:30px}.pagination-holder{margin:1.5em 16px}#pagination .next{float:right}.amp-wp-home .amp-wp-content p{display:inline}.home-post-image{float:right;margin:0 0 10px 20px}.amp-wp-article-content amp-img{max-width:100%}.amp-wp-meta.amp-wp-tax-category,.amp-wp-meta.amp-wp-tax-tag{margin:0}.amp-wp-meta.amp-wp-tax-tag{display:initial}.ampforwp-social-icons{margin:1.5em 16px}.amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; margin-bottom:5px; }
|
62 |
.amp-wp-title {color: <?php echo sanitize_hex_color( $text_color ); ?>;display: block;flex: 1 0 100%;font-weight: 900;margin: 0;width: 100%;}.amp-wp-meta {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;display: inline-block;flex: 2 1 50%;font-size: .875em;line-height: 1.7em;margin: 0;padding: 0;}.ampforwp-meta-info{margin-top: 0px;}.amp-wp-article-header .amp-wp-meta:last-of-type {text-align: right;}.amp-wp-article-header .amp-wp-meta:first-of-type {text-align: left;}.amp-wp-byline amp-img,.amp-wp-byline .amp-wp-author {display: inline-block;vertical-align: middle;}.amp-wp-byline amp-img {border: 1px solid <?php echo sanitize_hex_color( $link_color ); ?>;border-radius: 50%;position: relative;margin-right: 6px;}.amp-wp-posted-on {text-align: right;}.hide-meta-info{ display: none; }
|
63 |
.amp-wp-article-featured-image {margin: 1.5em 16px 1.5em;}.amp-wp-article-featured-image amp-img {margin: 0 auto;}.amp-wp-article-featured-image.wp-caption .wp-caption-text, .ampforwp-gallery-item .wp-caption-text {margin: 0 18px;}.amp-wp-frontpage .the_content {padding: 10px;}
|
64 |
.ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
|
65 |
+
.amp-wp-frontpage .ampforwp-title {margin-left:10px;}.amp-wp-article a{text-decoration:none}.amp-wp-article-content {margin: 0 16px;}.amp-wp-article-content ul,.amp-wp-article-content ol {margin-left: 1em;}.amp-wp-article-content amp-img {margin: 0 auto;}.amp-wp-article-content amp-img.alignright {margin: 0 0 1em 16px;}.amp-wp-article-content amp-img.alignleft {margin: 0 16px 1em 0;}
|
66 |
+
<?php if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
|
67 |
+
.amp-disqus-comments { text-align:center } .amp-disqus-comments {padding: 15px;}.amp-disqus-comments amp-iframe{background: none;} <?php
|
68 |
+
} ?>
|
69 |
+
.wp-caption {padding: 0;}.wp-caption.alignleft {margin-right: 16px;}.wp-caption.alignright { margin-left: 16px;}.wp-caption-text {border-bottom: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 0;padding: .66em 10px .75em;text-align: center;} amp-carousel {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em;} amp-iframe,amp-youtube,amp-instagram,amp-vine {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em; } .amp-wp-article-content amp-carousel amp-img {border: none;} amp-carousel > amp-img > img {object-fit: contain; } .amp-wp-iframe-placeholder { background: <?php echo sanitize_hex_color( $border_color ); ?> url( <?php echo esc_url( $get_customizer->get( 'placeholder_image_url' ) ); ?> ) no-repeat center 40%;background-size: 48px 48px;min-height: 48px;} .amp-wp-article-footer .amp-wp-meta {display: block;} .amp-wp-tags{ list-style-type: none; padding: 0; margin: 0 0 9px 0; display: inline-flex; } .amp-wp-tags li{display:inline; padding-left: 5px; } .amp-wp-tax-category span{margin-right:5px;} .amp-wp-tax-category, .amp-wp-tax-tag { color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 1.5em 16px;}.ampforwp-comment-button {margin-bottom:20px;} .amp-wp-comments-link {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;text-align: center;margin: 2.25em 0 1.5em;} .amp-wp-comments-link a { border-style: solid;border-color: <?php echo sanitize_hex_color( $border_color ); ?>;border-width: 1px 1px 2px;border-radius: 4px;background-color: transparent;color: <?php echo sanitize_hex_color( $link_color ); ?>;cursor: pointer; display: block;font-size: 14px;font-weight: 600;line-height: 18px;margin: 0 auto;max-width: 200px;padding: 11px 16px;text-decoration: none;width: 50%;-webkit-transition: background-color 0.2s ease;transition: background-color 0.2s ease;} .page-title {margin: 0 15px; font-size: 1.17em; }.amp-sub-archives li{width: 50%;} .amp-sub-archives ul{padding: 0;list-style: none;display: flex;font-size: 12px;line-height: 1.2;margin: 5px 1.5em 10px 1.5em;} .author-archive amp-img{border-radius: 50%;margin: 0px 8px 10px;display: block;}.author-archive{float: left;} .amp-wp-footer {border-top: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;margin: calc(1.5em - 1px) 0 0;padding-bottom:25px;}
|
70 |
.amp-wp-footer div{margin:0 auto;max-width:calc(840px - 32px);padding:1.25em 16px;position:relative}.amp-wp-footer h2{font-size:1em;line-height:1.375em;margin:0 0 .5em}
|
71 |
.amp-wp-footer p {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .8em;line-height: 1.5em;margin: 0 15px 0 0;}
|
72 |
.amp-wp-footer a{text-decoration:none}.copyright_txt{float:left}.back-to-top{float:right}.amp-wp-header .nav_container{float: right;top: 16px;line-height: 1; right: 65px; position: absolute}.toggle-text{position:absolute;right:0;height:22px;width:28px}.toggle-text span{display:block;position:absolute;height:2px;width:25px;background:#fff;border-radius:19px;opacity:1;left:0}.toggle-text span:nth-child(2){top:9px}.toggle-text span:nth-child(3){top:18px}.amp-wp-home .amp-wp-meta{margin:5px 0}.amp-wp-home .amp-wp-content p{display:inline-block;width:100%}.ampforwp-custom-index .amp-wp-title a {text-decoration: none;color: <?php echo sanitize_hex_color( $text_color ); ?>;}.comment-button-wrapper a,.related_posts ol{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.amp-wp-meta{display:flex}.amp-wp-posted-on{display:initial}#pagination .next,#pagination .prev{display:inline-block}.ampforwp-custom-index .amp-wp-content{margin-bottom:30px}.pagination-holder{margin:1.5em 16px}#pagination .next{float:right}.amp-wp-home .amp-wp-content p{display:inline}.home-post-image{float:right;margin:0 0 10px 20px}.amp-wp-article-content amp-img{max-width:100%}.amp-wp-meta.amp-wp-tax-category,.amp-wp-meta.amp-wp-tax-tag{margin:0}.amp-wp-meta.amp-wp-tax-tag{display:initial}.ampforwp-social-icons{margin:1.5em 16px}.amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; margin-bottom:5px; }
|
templates/design-manager/design-2/style.php
CHANGED
@@ -215,6 +215,9 @@ main .amp-wp-content.comments_list {background: none;box-shadow: none;max-width:
|
|
215 |
.comments_list li li li{ margin:20px 20px 10px 20px}
|
216 |
.comment-content amp-img{max-width: 300px;}
|
217 |
<?php } ?>
|
|
|
|
|
|
|
218 |
.amp-facebook-comments{margin-top:45px}
|
219 |
/* ADS */
|
220 |
.amp_home_body .amp_ad_1{ margin-top: 10px; margin-bottom: -20px; }
|
215 |
.comments_list li li li{ margin:20px 20px 10px 20px}
|
216 |
.comment-content amp-img{max-width: 300px;}
|
217 |
<?php } ?>
|
218 |
+
<?php if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
|
219 |
+
.amp-disqus-comments { text-align:center } <?php
|
220 |
+
} ?>
|
221 |
.amp-facebook-comments{margin-top:45px}
|
222 |
/* ADS */
|
223 |
.amp_home_body .amp_ad_1{ margin-top: 10px; margin-bottom: -20px; }
|
templates/design-manager/design-3/style.php
CHANGED
@@ -221,6 +221,9 @@ main .amp-wp-content.comments_list{ background: none; box-shadow: none; padding:
|
|
221 |
.comments_list li li li{ margin:20px 20px 10px 20px }
|
222 |
.comment-content amp-img{max-width: 300px;}
|
223 |
<?php } ?>
|
|
|
|
|
|
|
224 |
/* ADS */
|
225 |
.amp_ad_1{ margin-top: 15px; margin-bottom: 10px; }
|
226 |
.single-post .amp_ad_1{ margin-bottom: -15px; }
|
221 |
.comments_list li li li{ margin:20px 20px 10px 20px }
|
222 |
.comment-content amp-img{max-width: 300px;}
|
223 |
<?php } ?>
|
224 |
+
<?php if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
|
225 |
+
.amp-disqus-comments { text-align:center } <?php
|
226 |
+
} ?>
|
227 |
/* ADS */
|
228 |
.amp_ad_1{ margin-top: 15px; margin-bottom: 10px; }
|
229 |
.single-post .amp_ad_1{ margin-bottom: -15px; }
|
templates/design-manager/swift/style.php
CHANGED
@@ -407,7 +407,11 @@ if( 1 == $redux_builder_amp['wordpress-comments-support']){?>
|
|
407 |
.cmts-wrap a{color:#333;}
|
408 |
.cmts-wrap a:hover{color:<?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;}
|
409 |
.cmts-wrap .current{color:<?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;}
|
410 |
-
<?php } // Comments Pagination CSS Ends
|
|
|
|
|
|
|
|
|
411 |
@media(max-width:1110px){
|
412 |
.cntr{width:100%;padding:0px 20px;}
|
413 |
.sp-rt {margin-left: 30px;}
|
407 |
.cmts-wrap a{color:#333;}
|
408 |
.cmts-wrap a:hover{color:<?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;}
|
409 |
.cmts-wrap .current{color:<?php echo $redux_builder_amp['swift-color-scheme']['color'] ?>;}
|
410 |
+
<?php } // Comments Pagination CSS Ends
|
411 |
+
if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
|
412 |
+
.amp-disqus-comments { text-align:center } <?php
|
413 |
+
} ?>
|
414 |
+
|
415 |
@media(max-width:1110px){
|
416 |
.cntr{width:100%;padding:0px 20px;}
|
417 |
.sp-rt {margin-left: 30px;}
|
templates/features.php
CHANGED
@@ -255,7 +255,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
255 |
if ( is_page() && ! $redux_builder_amp['amp-on-off-for-all-pages'] && ! is_home() && ! is_front_page() ) {
|
256 |
return;
|
257 |
}
|
258 |
-
if ( is_home() && ! ampforwp_is_blog() ) {
|
259 |
return;
|
260 |
}
|
261 |
$query_arg_array = $wp->query_vars;
|
@@ -2561,8 +2561,14 @@ add_action('ampforwp_post_after_design_elements','ampforwp_add_disqus_support');
|
|
2561 |
function ampforwp_add_disqus_support() {
|
2562 |
global $redux_builder_amp;
|
2563 |
$width = $height = 420;
|
2564 |
-
|
2565 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2566 |
}
|
2567 |
//if ( !comments_open() ){
|
2568 |
// return;
|
@@ -2583,7 +2589,7 @@ function ampforwp_add_disqus_support() {
|
|
2583 |
<amp-iframe
|
2584 |
height=<?php echo $height ?>
|
2585 |
width=<?php echo $width ?>
|
2586 |
-
layout="
|
2587 |
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
|
2588 |
frameborder="0"
|
2589 |
src="<?php echo $disqus_url ?>" >
|
@@ -5404,7 +5410,7 @@ function ampforwp_url_purifier($url){
|
|
5404 |
$url = add_query_arg('page_id',$quried_value2, $url);
|
5405 |
}*/
|
5406 |
} else {
|
5407 |
-
if (
|
5408 |
$url = untrailingslashit($url);
|
5409 |
}
|
5410 |
if ( is_home() || is_archive() || is_front_page() ) {
|
@@ -5756,6 +5762,13 @@ function ampforwp_default_logo($param=""){
|
|
5756 |
$logo_id = get_theme_mod( 'custom_logo' );
|
5757 |
$logo_alt = get_post_meta( $logo_id, '_wp_attachment_image_alt', true) ;
|
5758 |
$image = getimagesize($redux_builder_amp['opt-media']['url']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5759 |
|
5760 |
switch ($param) {
|
5761 |
case 'url':
|
255 |
if ( is_page() && ! $redux_builder_amp['amp-on-off-for-all-pages'] && ! is_home() && ! is_front_page() ) {
|
256 |
return;
|
257 |
}
|
258 |
+
if ( is_home() && ! ampforwp_is_blog() && !$redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
|
259 |
return;
|
260 |
}
|
261 |
$query_arg_array = $wp->query_vars;
|
2561 |
function ampforwp_add_disqus_support() {
|
2562 |
global $redux_builder_amp;
|
2563 |
$width = $height = 420;
|
2564 |
+
$layout = "";
|
2565 |
+
$layout = 'responsive';
|
2566 |
+
if ( isset($redux_builder_amp['ampforwp-disqus-layout']) && 'fixed' == $redux_builder_amp['ampforwp-disqus-layout'] ) {
|
2567 |
+
$layout = 'fixed';
|
2568 |
+
|
2569 |
+
if ( isset($redux_builder_amp['ampforwp-disqus-height']) && $redux_builder_amp['ampforwp-disqus-height'] ) {
|
2570 |
+
$height = $redux_builder_amp['ampforwp-disqus-height'];
|
2571 |
+
}
|
2572 |
}
|
2573 |
//if ( !comments_open() ){
|
2574 |
// return;
|
2589 |
<amp-iframe
|
2590 |
height=<?php echo $height ?>
|
2591 |
width=<?php echo $width ?>
|
2592 |
+
layout="<?php echo $layout ?>"
|
2593 |
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
|
2594 |
frameborder="0"
|
2595 |
src="<?php echo $disqus_url ?>" >
|
5410 |
$url = add_query_arg('page_id',$quried_value2, $url);
|
5411 |
}*/
|
5412 |
} else {
|
5413 |
+
if ( is_singular() && true == $checker ) {
|
5414 |
$url = untrailingslashit($url);
|
5415 |
}
|
5416 |
if ( is_home() || is_archive() || is_front_page() ) {
|
5762 |
$logo_id = get_theme_mod( 'custom_logo' );
|
5763 |
$logo_alt = get_post_meta( $logo_id, '_wp_attachment_image_alt', true) ;
|
5764 |
$image = getimagesize($redux_builder_amp['opt-media']['url']);
|
5765 |
+
|
5766 |
+
if(empty($image) || $image==false){
|
5767 |
+
$logo_id = attachment_url_to_postid($redux_builder_amp['opt-media']['url']);
|
5768 |
+
$imageDetail = wp_get_attachment_image_src( $logo_id , 'full');
|
5769 |
+
$image[0] = $imageDetail[1];
|
5770 |
+
$image[1] = $imageDetail[2];
|
5771 |
+
}
|
5772 |
|
5773 |
switch ($param) {
|
5774 |
case 'url':
|