Version Description
(7th February 2020) = * Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145 * Fixed: Iframe error due to Jetpack #4125 * Fixed: Menu transient increased to avoid deadlock error #4133 * Fixed: Moved "Breadcrumbs From Yoast" to SEO option Panel section. #3600 * Fixed: Featured Image from the content is not fetching the image when height and width is not present in the image code in Classic editor. #4096 * Improvement: Sorting option for Pagebuilder slider/gallery #2014 * Improvement: Option for showing no. of words in the excerpt of Recent Posts and Related Posts #3640 * Improvement: Link Comments section with comments order #3740 * Improvement: Default fallback images Added #3719 * Improvement: subscript and superscript support #4137 * Improvement: Message added if no seo option is selected but seo plugin is active #4124
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.23 |
Comparing to | |
See all releases |
Code changes from version 1.0.22 to 1.0.23
- README.md +14 -1
- accelerated-moblie-pages.php +2 -2
- changelog.txt +13 -0
- components/comments/comments.php +2 -0
- components/components-core.php +2 -0
- components/menu/menu.php +2 -2
- components/theme-loader.php +1 -1
- includes/options/admin-config.php +55 -12
- pagebuilder/components/modulePopupTemplate.php +57 -41
- pagebuilder/inc/admin-amp-page-builder.css +18 -2
- pagebuilder/inc/admin-amp-page-builder.js +17 -5
- readme.txt +14 -1
- templates/design-manager/design-1/elements/comments.php +2 -1
- templates/design-manager/design-1/style.php +1 -1
- templates/design-manager/design-2/elements/comments.php +2 -1
- templates/design-manager/design-2/style.php +1 -1
- templates/design-manager/design-3/elements/comments.php +2 -1
- templates/design-manager/design-3/single.php +9 -0
- templates/design-manager/design-3/style.php +1 -1
- templates/design-manager/swift/single.php +5 -1
- templates/design-manager/swift/style.php +1 -1
- templates/features.php +61 -8
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3.2
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -194,6 +194,19 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
= 1.0.22 (6th February 2020) =
|
198 |
* Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
|
199 |
* Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3.2
|
7 |
+
Stable tag: 1.0.23
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
194 |
|
195 |
== Changelog ==
|
196 |
|
197 |
+
= 1.0.23 (7th February 2020) =
|
198 |
+
* Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
|
199 |
+
* Fixed: Iframe error due to Jetpack #4125
|
200 |
+
* Fixed: Menu transient increased to avoid deadlock error #4133
|
201 |
+
* Fixed: Moved "Breadcrumbs From Yoast" to SEO option Panel section. #3600
|
202 |
+
* Fixed: Featured Image from the content is not fetching the image when height and width is not present in the image code in Classic editor. #4096
|
203 |
+
* Improvement: Sorting option for Pagebuilder slider/gallery #2014
|
204 |
+
* Improvement: Option for showing no. of words in the excerpt of Recent Posts and Related Posts #3640
|
205 |
+
* Improvement: Link Comments section with comments order #3740
|
206 |
+
* Improvement: Default fallback images Added #3719
|
207 |
+
* Improvement: subscript<sub> and superscript<sup> support #4137
|
208 |
+
* Improvement: Message added if no seo option is selected but seo plugin is active #4124
|
209 |
+
|
210 |
= 1.0.22 (6th February 2020) =
|
211 |
* Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
|
212 |
* Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
|
@@ -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: 1.0.
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
|
|
20 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
21 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
22 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
23 |
-
define('AMPFORWP_VERSION','1.0.
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
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: 1.0.23
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: https://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/25
|
20 |
define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
|
21 |
define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
|
22 |
define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
|
23 |
+
define('AMPFORWP_VERSION','1.0.23');
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
@@ -1,5 +1,18 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.22 (6th February 2020) =
|
4 |
* Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
|
5 |
* Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.23 (7th February 2020) =
|
4 |
+
* Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
|
5 |
+
* Fixed: Iframe error due to Jetpack #4125
|
6 |
+
* Fixed: Menu transient increased to avoid deadlock error #4133
|
7 |
+
* Fixed: Moved "Breadcrumbs From Yoast" to SEO option Panel section. #3600
|
8 |
+
* Fixed: Featured Image from the content is not fetching the image when height and width is not present in the image code in Classic editor. #4096
|
9 |
+
* Improvement: Sorting option for Pagebuilder slider/gallery #2014
|
10 |
+
* Improvement: Option for showing no. of words in the excerpt of Recent Posts and Related Posts #3640
|
11 |
+
* Improvement: Link Comments section with comments order #3740
|
12 |
+
* Improvement: Default fallback images Added #3719
|
13 |
+
* Improvement: subscript<sub> and superscript<sup> support #4137
|
14 |
+
* Improvement: Message added if no seo option is selected but seo plugin is active #4124
|
15 |
+
|
16 |
= 1.0.22 (6th February 2020) =
|
17 |
* Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
|
18 |
* Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
|
@@ -31,8 +31,10 @@ function ampforwp_framework_get_comments(){
|
|
31 |
if ( ampforwp_is_front_page() ) {
|
32 |
$postID = ampforwp_get_frontpage_id();
|
33 |
}
|
|
|
34 |
$comments = get_comments(array(
|
35 |
'post_id' => $postID,
|
|
|
36 |
'status' => 'approve' //Change this to the type of comments to be displayed
|
37 |
));
|
38 |
|
31 |
if ( ampforwp_is_front_page() ) {
|
32 |
$postID = ampforwp_get_frontpage_id();
|
33 |
}
|
34 |
+
$comment_order = get_option( 'comment_order' );
|
35 |
$comments = get_comments(array(
|
36 |
'post_id' => $postID,
|
37 |
+
'order' => esc_attr($comment_order),
|
38 |
'status' => 'approve' //Change this to the type of comments to be displayed
|
39 |
));
|
40 |
|
@@ -707,6 +707,8 @@ function ampforwp_backtotop_global_css(){?>
|
|
707 |
.rtl amp-carousel {direction: ltr;}
|
708 |
.rtl .amp-menu .toggle:after{left:0;right:unset;}
|
709 |
.sharedaddy li{display:none}
|
|
|
|
|
710 |
<?php if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
|
711 |
.btt{
|
712 |
position: fixed;
|
707 |
.rtl amp-carousel {direction: ltr;}
|
708 |
.rtl .amp-menu .toggle:after{left:0;right:unset;}
|
709 |
.sharedaddy li{display:none}
|
710 |
+
sub {vertical-align: sub;font-size: small;}
|
711 |
+
sup {vertical-align: super;font-size: small;}
|
712 |
<?php if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
|
713 |
.btt{
|
714 |
position: fixed;
|
@@ -38,10 +38,10 @@ function amp_menu_html($echo, $menu_args, $type){
|
|
38 |
$menu_cache = apply_filters('ampforwp_menu_cache',$menu_cache);
|
39 |
if ($menu_cache) {
|
40 |
if ( 'header' == $type ) {
|
41 |
-
set_transient('ampforwp_header_menu', $sanitized_menu,
|
42 |
}
|
43 |
elseif ('footer' == $type) {
|
44 |
-
set_transient('ampforwp_footer_menu', $sanitized_menu,
|
45 |
}
|
46 |
}
|
47 |
return $sanitized_menu;
|
38 |
$menu_cache = apply_filters('ampforwp_menu_cache',$menu_cache);
|
39 |
if ($menu_cache) {
|
40 |
if ( 'header' == $type ) {
|
41 |
+
set_transient('ampforwp_header_menu', $sanitized_menu, 14*DAY_IN_SECONDS );
|
42 |
}
|
43 |
elseif ('footer' == $type) {
|
44 |
+
set_transient('ampforwp_footer_menu', $sanitized_menu, 15*DAY_IN_SECONDS );
|
45 |
}
|
46 |
}
|
47 |
return $sanitized_menu;
|
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
}
|
5 |
$amp_main_dir = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/swift';
|
6 |
if ( 4 != $ampforwp_design_selector ) {
|
7 |
-
$amp_main_dir =
|
8 |
}
|
9 |
$amp_theme_dir = apply_filters('ampforwp_theme_dir', $amp_main_dir);
|
10 |
if ( ! is_dir($amp_theme_dir)) {
|
4 |
}
|
5 |
$amp_main_dir = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/swift';
|
6 |
if ( 4 != $ampforwp_design_selector ) {
|
7 |
+
$amp_main_dir = WP_PLUGIN_DIR.'/'. esc_attr($ampforwp_design_selector);
|
8 |
}
|
9 |
$amp_theme_dir = apply_filters('ampforwp_theme_dir', $amp_main_dir);
|
10 |
if ( ! is_dir($amp_theme_dir)) {
|
@@ -1986,6 +1986,17 @@ function ampforwp_get_all_tags($id){
|
|
1986 |
'default' => 0,
|
1987 |
'required' => array('ampforwp-seo-selection', '=' , 'yoast'),
|
1988 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1989 |
array(
|
1990 |
'class' => 'child_opt',
|
1991 |
'id' => 'ampforwp-seo-yoast-schema',
|
@@ -2765,6 +2776,15 @@ Redux::setSection( $opt_name, array(
|
|
2765 |
'false' => 'false',
|
2766 |
'default' => 0,
|
2767 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2768 |
// Retina Images
|
2769 |
array(
|
2770 |
'id' => 'ampforwp-retina-images',
|
@@ -5303,17 +5323,6 @@ Redux::setSection( $opt_name, array(
|
|
5303 |
),
|
5304 |
)
|
5305 |
));
|
5306 |
-
$yoast_breadcrumbs = '';
|
5307 |
-
if ( defined('WPSEO_FILE') ) {
|
5308 |
-
$yoast_breadcrumbs = array(
|
5309 |
-
'id' => 'ampforwp-yoast-bread-crumb',
|
5310 |
-
'type' => 'switch',
|
5311 |
-
'default' => false,
|
5312 |
-
'title' => esc_html__('Breadcrumbs From Yoast', 'accelerated-mobile-pages'),
|
5313 |
-
'required' => array('ampforwp-bread-crumb' , '=' , 1),
|
5314 |
-
'class' => 'child_opt child_opt_arrow',
|
5315 |
-
);
|
5316 |
-
}
|
5317 |
if(!is_plugin_active( 'amp-newspaper-theme/ampforwp-custom-theme.php' ) ){
|
5318 |
$single_page_options = array(
|
5319 |
array(
|
@@ -5451,7 +5460,6 @@ $single_page_options = array(
|
|
5451 |
'default' => '0',
|
5452 |
'required' => array('ampforwp-bread-crumb' , '=' , 1),
|
5453 |
),
|
5454 |
-
$yoast_breadcrumbs,
|
5455 |
//Categories ON/OFF
|
5456 |
array(
|
5457 |
'id' => 'ampforwp-cats-single',
|
@@ -5613,6 +5621,19 @@ $single_page_options = array(
|
|
5613 |
'tooltip-subtitle' => esc_html__('Enable this option to show excerpt for each post of Recent post loop'),
|
5614 |
'required' => array('ampforwp-swift-recent-posts' , '=' , '1'),
|
5615 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5616 |
array(
|
5617 |
'id' => 'ampforwp-recentpost-posts-link',
|
5618 |
'type' => 'switch',
|
@@ -5822,6 +5843,28 @@ $single_page_options = array(
|
|
5822 |
'tooltip-subtitle' => esc_html__('Enable this option to show image for each post of Recent post loop'),
|
5823 |
'required' => array('ampforwp-design3-recent-posts' , '=' , '1'),
|
5824 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5825 |
array(
|
5826 |
'id' => 'ampforwp-design3-number-of-recent-posts',
|
5827 |
'type' => 'text',
|
1986 |
'default' => 0,
|
1987 |
'required' => array('ampforwp-seo-selection', '=' , 'yoast'),
|
1988 |
),
|
1989 |
+
array(
|
1990 |
+
'id' => 'ampforwp-yoast-bread-crumb',
|
1991 |
+
'class' => 'child_opt child_opt_arrow',
|
1992 |
+
'type' => 'switch',
|
1993 |
+
'default' => false,
|
1994 |
+
'title' => esc_html__('Breadcrumbs From Yoast', 'accelerated-mobile-pages'),
|
1995 |
+
'required' => array(
|
1996 |
+
array('ampforwp-bread-crumb', '=' , '1'),
|
1997 |
+
array('ampforwp-seo-selection', '=' , 'yoast')
|
1998 |
+
),
|
1999 |
+
),
|
2000 |
array(
|
2001 |
'class' => 'child_opt',
|
2002 |
'id' => 'ampforwp-seo-yoast-schema',
|
2776 |
'false' => 'false',
|
2777 |
'default' => 0,
|
2778 |
),
|
2779 |
+
// DEFAULT FALLBACK IMAGE
|
2780 |
+
array(
|
2781 |
+
'id' => 'ampforwp_default_fallback_image',
|
2782 |
+
'type' => 'media',
|
2783 |
+
'url' => true,
|
2784 |
+
'title' => esc_html__('Default Fallback Image', 'accelerated-mobile-pages'),
|
2785 |
+
'tooltip-subtitle'=>esc_html__('Update the image you want show as default fallback image)', 'accelerated-mobile-pages'),
|
2786 |
+
'default' => array('url' => AMPFORWP_IMAGE_DIR . '/SD-default-image.png' ),
|
2787 |
+
),
|
2788 |
// Retina Images
|
2789 |
array(
|
2790 |
'id' => 'ampforwp-retina-images',
|
5323 |
),
|
5324 |
)
|
5325 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5326 |
if(!is_plugin_active( 'amp-newspaper-theme/ampforwp-custom-theme.php' ) ){
|
5327 |
$single_page_options = array(
|
5328 |
array(
|
5460 |
'default' => '0',
|
5461 |
'required' => array('ampforwp-bread-crumb' , '=' , 1),
|
5462 |
),
|
|
|
5463 |
//Categories ON/OFF
|
5464 |
array(
|
5465 |
'id' => 'ampforwp-cats-single',
|
5621 |
'tooltip-subtitle' => esc_html__('Enable this option to show excerpt for each post of Recent post loop'),
|
5622 |
'required' => array('ampforwp-swift-recent-posts' , '=' , '1'),
|
5623 |
),
|
5624 |
+
array(
|
5625 |
+
'id' =>'amp-swift-recentpost-excerpt-len',
|
5626 |
+
'class' => 'child_opt',
|
5627 |
+
'type' =>'text',
|
5628 |
+
'tooltip-subtitle' => esc_html__('Enter the number of words Eg: 15','accelerated-mobile-pages'),
|
5629 |
+
'title' => esc_html__('Excerpt Length','accelerated-mobile-pages'),
|
5630 |
+
'required' => array(
|
5631 |
+
array('amp-design-selector', '=' , '4'),
|
5632 |
+
array('amforwp-recentpost-excerpt-switch', '=' , '1'),
|
5633 |
+
),
|
5634 |
+
'validate' =>'numeric',
|
5635 |
+
'default' =>'15',
|
5636 |
+
),
|
5637 |
array(
|
5638 |
'id' => 'ampforwp-recentpost-posts-link',
|
5639 |
'type' => 'switch',
|
5843 |
'tooltip-subtitle' => esc_html__('Enable this option to show image for each post of Recent post loop'),
|
5844 |
'required' => array('ampforwp-design3-recent-posts' , '=' , '1'),
|
5845 |
),
|
5846 |
+
array(
|
5847 |
+
'id' => 'amforwp-design3-recentpost-excerpt-switch',
|
5848 |
+
'type' => 'switch',
|
5849 |
+
'class' => 'child_opt child_opt_arrow',
|
5850 |
+
'title' => esc_html__('Excerpt', 'accelerated-mobile-pages'),
|
5851 |
+
'default' => 1,
|
5852 |
+
'tooltip-subtitle' => esc_html__('Enable this option to show excerpt for each post of Recent post loop'),
|
5853 |
+
'required' => array('ampforwp-design3-recent-posts' , '=' , '1'),
|
5854 |
+
),
|
5855 |
+
array(
|
5856 |
+
'id' =>'amp-design3-recentpost-excerpt-len',
|
5857 |
+
'class' => 'child_opt',
|
5858 |
+
'type' =>'text',
|
5859 |
+
'tooltip-subtitle' => esc_html__('Enter the number of words Eg: 15','accelerated-mobile-pages'),
|
5860 |
+
'title' => esc_html__('Excerpt Length','accelerated-mobile-pages'),
|
5861 |
+
'required' => array(
|
5862 |
+
array('amp-design-selector', '=' , '3'),
|
5863 |
+
array('amforwp-design3-recentpost-excerpt-switch', '=' , '1'),
|
5864 |
+
),
|
5865 |
+
'validate' =>'numeric',
|
5866 |
+
'default' =>'15',
|
5867 |
+
),
|
5868 |
array(
|
5869 |
'id' => 'ampforwp-design3-number-of-recent-posts',
|
5870 |
'type' => 'text',
|
@@ -2,28 +2,28 @@
|
|
2 |
if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
3 |
<!-- template for the modal component -->
|
4 |
<script type="x/template" id="amp-pagebuilder-module-modal-template">
|
5 |
-
|
6 |
<div class="modal-mask">
|
7 |
-
|
8 |
-
|
9 |
<button type="button" class="media-modal-close" @click="hideModulePopUp()">
|
10 |
<span class="media-modal-icon"></span>
|
11 |
</button>
|
12 |
<div class="modal-content">
|
13 |
<div class="modal-sidebar">
|
14 |
<ul>
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
</li>
|
21 |
</ul>
|
22 |
</div>
|
23 |
<div class="modal-header">
|
24 |
<h3>{{modalcontent.label}}
|
25 |
<em v-if="editModuleTempTitle==false"> : {{modalcontent.cell_identity_name}}
|
26 |
-
|
27 |
</em>
|
28 |
<em v-if="editModuleTempTitle!=false">
|
29 |
<input type="text" v-model="modalcontent.cell_identity_name">
|
@@ -33,41 +33,57 @@ if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
|
33 |
</h3>
|
34 |
</div>
|
35 |
<div class="modal-body">
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
</div>
|
49 |
-
|
50 |
-
<div v-for="(repeaterfields, key, index) in modalcontent.repeater.showFields" class="amp-repeat-field" :class="[{'amp-repeat-active': (key==0)}, 'repeater-'+ key]" >
|
51 |
-
<div class="amp-accordion-head amppb_accordion__panel" v-on:click="repeaterAcoordian($event);"><span class="repeater_num">{{key+1}}</span> {{modalcontent.label}} Field
|
52 |
-
<span class="amp-accordion-label"> {{(key==0)? '(Hide)': '(Show)'}}</span>
|
53 |
-
<div class="right"
|
54 |
-
v-on:click="removeRepeaterSection(key, modalcontent.repeater.showFields)">Remove</div>
|
55 |
</div>
|
56 |
-
<
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
</div>
|
66 |
-
|
67 |
-
</div>
|
68 |
-
<div class="amp_repeater_addmore">
|
69 |
-
<input type="button" class="button" @click="duplicateRepeaterField(modalcontent.repeater)" :value="'Add '+modalcontent.label+' Field'">
|
70 |
-
</div>
|
71 |
</div>
|
72 |
</div>
|
73 |
</div>
|
2 |
if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
3 |
<!-- template for the modal component -->
|
4 |
<script type="x/template" id="amp-pagebuilder-module-modal-template">
|
5 |
+
<transition name="amp-pagebuilder-module-modal">
|
6 |
<div class="modal-mask">
|
7 |
+
<div class="modal-wrapper">
|
8 |
+
<div class="modal-container">
|
9 |
<button type="button" class="media-modal-close" @click="hideModulePopUp()">
|
10 |
<span class="media-modal-icon"></span>
|
11 |
</button>
|
12 |
<div class="modal-content">
|
13 |
<div class="modal-sidebar">
|
14 |
<ul>
|
15 |
+
<li v-for="(tab, key, index) in modalcontent.tabs"
|
16 |
+
@click="showtabs(key)"
|
17 |
+
class="link"
|
18 |
+
:class="{'active': modalcontent.default_tab==key}">
|
19 |
+
{{tab}}
|
20 |
</li>
|
21 |
</ul>
|
22 |
</div>
|
23 |
<div class="modal-header">
|
24 |
<h3>{{modalcontent.label}}
|
25 |
<em v-if="editModuleTempTitle==false"> : {{modalcontent.cell_identity_name}}
|
26 |
+
<i class="dashicons-head dashicons dashicons-edit" v-on:click="editModuleTempTitle = modalcontent.cell_identity_name"></i>
|
27 |
</em>
|
28 |
<em v-if="editModuleTempTitle!=false">
|
29 |
<input type="text" v-model="modalcontent.cell_identity_name">
|
33 |
</h3>
|
34 |
</div>
|
35 |
<div class="modal-body">
|
36 |
+
<div class="modal-settings">
|
37 |
+
<fields-data v-for="(field, key, index) in modalcontent.fields"
|
38 |
+
:field="field"
|
39 |
+
:key="key"
|
40 |
+
:fieldkey="key"
|
41 |
+
:completeFields="modalcontent.fields"
|
42 |
+
:repeater="0"
|
43 |
+
:defaulttab="modalcontent.default_tab"
|
44 |
+
></fields-data>
|
45 |
+
<div v-if="modalcontent.repeater && modalcontent.repeater.tab==modalcontent.default_tab" class="amp-repeaters" v-show="repeaterShowHideCheck(modalcontent)">
|
46 |
|
47 |
+
<div class="heading">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
</div>
|
49 |
+
<!-- <drop class="drop" :class="{'row-dropping':rowOverDrop}" @drop="handleDrop" @dragover="rowOverDrop = true"-->
|
50 |
+
<!-- @dragleave="rowOverDrop = false">-->
|
51 |
+
<draggable :element="'div'" class="dragrow"
|
52 |
+
v-model="modalcontent.repeater.showFields"
|
53 |
+
:options="{
|
54 |
+
animation:200,
|
55 |
+
draggable:'.amp-repeat-field',
|
56 |
+
handle: '.amppb-repeaterfields-handle',
|
57 |
+
ghostClass: 'ghost',
|
58 |
+
group:{name:'.amp-repeat-field'}
|
59 |
+
}"
|
60 |
+
@start="rowdrag=true"
|
61 |
+
@end="rowdrag=false;repeater_rows_moved($event)">
|
62 |
+
|
63 |
+
<div v-for="(repeaterfields, key, index) in modalcontent.repeater.showFields" class="amp-repeat-field" :class="[{'amp-repeat-active': (key==0)}, 'repeater-'+ key]" >
|
64 |
+
<div class="amp-accordion-head amppb_accordion__panel" v-on:click="repeaterAcoordian($event);">
|
65 |
+
<span class="amppb-repeaterfields-handle dashicons dashicons-move"></span>
|
66 |
+
<span class="repeater_num">{{key+1}}</span> {{modalcontent.label}} Field
|
67 |
+
<span class="amp-accordion-label"> {{(key==0)? '(Hide)': '(Show)'}}</span>
|
68 |
+
<div class="right"
|
69 |
+
v-on:click="removeRepeaterSection(key, modalcontent.repeater.showFields)">Remove</div>
|
70 |
+
</div>
|
71 |
+
<div class="amp-accordion-content" v-bind:class="{ active: (key==0),'hide': (key!=0) }">
|
72 |
+
<fields-data v-for="(rfield, key, index) in repeaterfields"
|
73 |
+
:field="rfield"
|
74 |
+
:key="key"
|
75 |
+
:fieldkey="key"
|
76 |
+
:completeFields="modalcontent.fields"
|
77 |
+
:repeater="1"
|
78 |
+
:defaulttab="modalcontent.default_tab"
|
79 |
+
></fields-data>
|
80 |
+
</div>
|
81 |
+
|
82 |
+
</div>
|
83 |
+
</draggable>
|
84 |
+
<div class="amp_repeater_addmore">
|
85 |
+
<input type="button" class="button" @click="duplicateRepeaterField(modalcontent.repeater)" :value="'Add '+modalcontent.label+' Field'">
|
86 |
</div>
|
|
|
|
|
|
|
|
|
|
|
87 |
</div>
|
88 |
</div>
|
89 |
</div>
|
@@ -671,7 +671,7 @@ position: fixed;
|
|
671 |
.modal-header{
|
672 |
background: #fff;
|
673 |
width: 100%;
|
674 |
-
z-index:
|
675 |
border-bottom: 1px solid #D8D8D8;
|
676 |
position: relative;
|
677 |
padding-left: 20px;
|
@@ -1259,7 +1259,7 @@ a.amppb_accordion__panel:hover {
|
|
1259 |
/*** Backend CSS ***/
|
1260 |
.amp-accordion-head .amp-accordion-label{
|
1261 |
display:none;
|
1262 |
-
top:
|
1263 |
right: 0;
|
1264 |
position: absolute;
|
1265 |
right: 79px;
|
@@ -1291,6 +1291,7 @@ a.amppb_accordion__panel:hover {
|
|
1291 |
.amp-repeat-active .amp-accordion-content{
|
1292 |
padding: 0px 10px;
|
1293 |
border: 5px solid #23282d;
|
|
|
1294 |
}
|
1295 |
|
1296 |
/*** RTL CSS ***/
|
@@ -1418,3 +1419,18 @@ body .modal-footer .del-btn-modal{
|
|
1418 |
top: -27px;
|
1419 |
right: -18px;
|
1420 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
.modal-header{
|
672 |
background: #fff;
|
673 |
width: 100%;
|
674 |
+
z-index: 100;
|
675 |
border-bottom: 1px solid #D8D8D8;
|
676 |
position: relative;
|
677 |
padding-left: 20px;
|
1259 |
/*** Backend CSS ***/
|
1260 |
.amp-accordion-head .amp-accordion-label{
|
1261 |
display:none;
|
1262 |
+
top: 24px;
|
1263 |
right: 0;
|
1264 |
position: absolute;
|
1265 |
right: 79px;
|
1291 |
.amp-repeat-active .amp-accordion-content{
|
1292 |
padding: 0px 10px;
|
1293 |
border: 5px solid #23282d;
|
1294 |
+
border-width: 0px 5px 5px 5px;
|
1295 |
}
|
1296 |
|
1297 |
/*** RTL CSS ***/
|
1419 |
top: -27px;
|
1420 |
right: -18px;
|
1421 |
}
|
1422 |
+
.amppb-repeaterfields-handle {
|
1423 |
+
position: relative;
|
1424 |
+
top: 7px;
|
1425 |
+
left: -5px;
|
1426 |
+
color: #23282d;
|
1427 |
+
cursor: grab;
|
1428 |
+
opacity: 0;
|
1429 |
+
}
|
1430 |
+
..amp-repeat-field.amp-repeat-active .amppb-repeaterfields-handle {
|
1431 |
+
color: #fcfcfc;
|
1432 |
+
}
|
1433 |
+
.amp-accordion-head.amppb_accordion__panel:hover .amppb-repeaterfields-handle {
|
1434 |
+
opacity: 1;
|
1435 |
+
transition: 0.2s;
|
1436 |
+
}
|
@@ -239,10 +239,17 @@ Vue.component('amp-pagebuilder-module-modal', {
|
|
239 |
app.modalcontent.repeater.showFields.forEach(function(repeatWrapper,repKey){
|
240 |
var repeaterData = {};
|
241 |
repeatWrapper.forEach(function(repeatField,repFieldKey){
|
242 |
-
|
243 |
-
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
|
|
|
|
246 |
});
|
247 |
repeaterData['index'] = (repKey+1);
|
248 |
moduleData.repeater.push(repeaterData);
|
@@ -253,7 +260,7 @@ Vue.component('amp-pagebuilder-module-modal', {
|
|
253 |
}else if(app.modalType=='rowSetting'){
|
254 |
var a = {};
|
255 |
fields.forEach(function(fieldData,fieldKey){
|
256 |
-
a[fieldData.name] = fieldData.default
|
257 |
if(fieldData[fieldData.name+"_image_data"]){
|
258 |
a[fieldData.name+"_image_data"] = fieldData[fieldData.name+"_image_data"];
|
259 |
}
|
@@ -309,7 +316,12 @@ Vue.component('amp-pagebuilder-module-modal', {
|
|
309 |
}
|
310 |
return returnOpt;
|
311 |
},
|
312 |
-
|
|
|
|
|
|
|
|
|
|
|
313 |
|
314 |
|
315 |
editModuleTitle: function(modalcontent){
|
239 |
app.modalcontent.repeater.showFields.forEach(function(repeatWrapper,repKey){
|
240 |
var repeaterData = {};
|
241 |
repeatWrapper.forEach(function(repeatField,repFieldKey){
|
242 |
+
var stringToArray = repeatField.name.split("_");
|
243 |
+
stringToArray.pop();
|
244 |
+
var arrayToString = stringToArray.join('_');
|
245 |
+
var finalString = arrayToString+"_"+repKey;
|
246 |
+
repeaterData[finalString] = repeatField.default;
|
247 |
+
if(repeatField[finalString+"_image_data"]){
|
248 |
+
repeaterData[finalString+"_image_data"] = repeatField[finalString+"_image_data"];
|
249 |
+
|
250 |
}
|
251 |
+
|
252 |
+
|
253 |
});
|
254 |
repeaterData['index'] = (repKey+1);
|
255 |
moduleData.repeater.push(repeaterData);
|
260 |
}else if(app.modalType=='rowSetting'){
|
261 |
var a = {};
|
262 |
fields.forEach(function(fieldData,fieldKey){
|
263 |
+
a[fieldData.name] = fieldData.default;
|
264 |
if(fieldData[fieldData.name+"_image_data"]){
|
265 |
a[fieldData.name+"_image_data"] = fieldData[fieldData.name+"_image_data"];
|
266 |
}
|
316 |
}
|
317 |
return returnOpt;
|
318 |
},
|
319 |
+
repeater_rows_moved: function(evt){
|
320 |
+
if(evt && evt.type=='end'){
|
321 |
+
this.$forceUpdate();
|
322 |
+
}
|
323 |
+
return true;
|
324 |
+
},
|
325 |
|
326 |
|
327 |
editModuleTitle: function(modalcontent){
|
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3.2
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -191,6 +191,19 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 1.0.22 (6th February 2020) =
|
195 |
* Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
|
196 |
* Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3.2
|
7 |
+
Stable tag: 1.0.23
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
191 |
|
192 |
== Changelog ==
|
193 |
|
194 |
+
= 1.0.23 (7th February 2020) =
|
195 |
+
* Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
|
196 |
+
* Fixed: Iframe error due to Jetpack #4125
|
197 |
+
* Fixed: Menu transient increased to avoid deadlock error #4133
|
198 |
+
* Fixed: Moved "Breadcrumbs From Yoast" to SEO option Panel section. #3600
|
199 |
+
* Fixed: Featured Image from the content is not fetching the image when height and width is not present in the image code in Classic editor. #4096
|
200 |
+
* Improvement: Sorting option for Pagebuilder slider/gallery #2014
|
201 |
+
* Improvement: Option for showing no. of words in the excerpt of Recent Posts and Related Posts #3640
|
202 |
+
* Improvement: Link Comments section with comments order #3740
|
203 |
+
* Improvement: Default fallback images Added #3719
|
204 |
+
* Improvement: subscript<sub> and superscript<sup> support #4137
|
205 |
+
* Improvement: Message added if no seo option is selected but seo plugin is active #4124
|
206 |
+
|
207 |
= 1.0.22 (6th February 2020) =
|
208 |
* Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
|
209 |
* Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
|
@@ -15,8 +15,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
// Gather comments for a specific page/post
|
16 |
$postID = $comments = "";
|
17 |
$postID = get_the_ID();
|
|
|
18 |
$comments = get_comments(
|
19 |
-
array( 'post_id' => $postID, 'status' => 'approve' )
|
20 |
);
|
21 |
if ( $comments ) {
|
22 |
$comment_nums = '';
|
15 |
// Gather comments for a specific page/post
|
16 |
$postID = $comments = "";
|
17 |
$postID = get_the_ID();
|
18 |
+
$comment_order = get_option( 'comment_order' );
|
19 |
$comments = get_comments(
|
20 |
+
array( 'post_id' => $postID, 'order' => esc_attr($comment_order), 'status' => 'approve' )
|
21 |
);
|
22 |
if ( $comments ) {
|
23 |
$comment_nums = '';
|
@@ -159,7 +159,7 @@ echo sanitize_text_field($fontFamily); // secondary font family ends here ?>
|
|
159 |
<?php if( !ampforwp_woocommerce_conditional_check() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
|
160 |
.amp-wp-article {color: <?php echo sanitize_hex_color( $text_color ); ?>;font-weight: 400;margin: 1.5em auto;max-width: 840px;overflow-wrap: break-word;word-wrap: break-word;} .amp-wp-article-header {align-items: center;align-content: stretch;display: flex;flex-wrap: wrap;justify-content: space-between;margin: 1.5em 16px 1.5em;}
|
161 |
.amp-wp-title {color: <?php echo sanitize_hex_color( $text_color ); ?>;display: block;flex: 1 0 100%;font-weight: 900;font-size:1.5em;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;float:right;display:initial}.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; }
|
162 |
-
.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;}
|
163 |
.ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
|
164 |
.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;}
|
165 |
<?php if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
|
159 |
<?php if( !ampforwp_woocommerce_conditional_check() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
|
160 |
.amp-wp-article {color: <?php echo sanitize_hex_color( $text_color ); ?>;font-weight: 400;margin: 1.5em auto;max-width: 840px;overflow-wrap: break-word;word-wrap: break-word;} .amp-wp-article-header {align-items: center;align-content: stretch;display: flex;flex-wrap: wrap;justify-content: space-between;margin: 1.5em 16px 1.5em;}
|
161 |
.amp-wp-title {color: <?php echo sanitize_hex_color( $text_color ); ?>;display: block;flex: 1 0 100%;font-weight: 900;font-size:1.5em;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;float:right;display:initial}.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; }
|
162 |
+
.amp-wp-article-featured-image {margin: 1.5em 16px 1.5em;text-align:center;}.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;}
|
163 |
.ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
|
164 |
.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;}
|
165 |
<?php if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
|
@@ -15,8 +15,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
// Gather comments for a specific page/post
|
16 |
$postID = $comments = "";
|
17 |
$postID = get_the_ID();
|
|
|
18 |
$comments = get_comments(
|
19 |
-
array( 'post_id' => $postID, 'status' => 'approve' )
|
20 |
);
|
21 |
if ( $comments ) {
|
22 |
$comment_nums = '';
|
15 |
// Gather comments for a specific page/post
|
16 |
$postID = $comments = "";
|
17 |
$postID = get_the_ID();
|
18 |
+
$comment_order = get_option( 'comment_order' );
|
19 |
$comments = get_comments(
|
20 |
+
array( 'post_id' => $postID, 'order' =>esc_attr($comment_order), 'status' => 'approve' )
|
21 |
);
|
22 |
if ( $comments ) {
|
23 |
$comment_nums = '';
|
@@ -360,7 +360,7 @@ figcaption{ font-size: 11px; margin-bottom: 11px; background: #eee; padding: 6px
|
|
360 |
.the_content p{ margin-top: 5px; color: #333; font-size: 15px; line-height: 26px; margin-bottom: 15px;word-break: break-word; }
|
361 |
.the_content small{font-size:11px;line-height:1.2;color:#111;margin-bottom: 5px;display: inline-block;}
|
362 |
.amp-wp-tax-tag{ font-size: 13px; border: 0; display: inline-block; margin: 0.5em 0px 0.7em 0px; width: 100%; }
|
363 |
-
main .amp-wp-content.featured-image-content{ padding: 0px; border: 0; margin-bottom: 0; box-shadow: none }
|
364 |
.amp-wp-article-featured-image amp-img {margin: 0 auto;}
|
365 |
.amp-wp-article-featured-image.wp-caption .wp-caption-text, .ampforwp-gallery-item .wp-caption-text{color: #696969; font-size: 11px; line-height: 15px; background: #eee; margin: 0; padding: .66em .75em; text-align: center;}
|
366 |
.ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
|
360 |
.the_content p{ margin-top: 5px; color: #333; font-size: 15px; line-height: 26px; margin-bottom: 15px;word-break: break-word; }
|
361 |
.the_content small{font-size:11px;line-height:1.2;color:#111;margin-bottom: 5px;display: inline-block;}
|
362 |
.amp-wp-tax-tag{ font-size: 13px; border: 0; display: inline-block; margin: 0.5em 0px 0.7em 0px; width: 100%; }
|
363 |
+
main .amp-wp-content.featured-image-content{ padding: 0px; border: 0; margin-bottom: 0; box-shadow: none;text-align: center; }
|
364 |
.amp-wp-article-featured-image amp-img {margin: 0 auto;}
|
365 |
.amp-wp-article-featured-image.wp-caption .wp-caption-text, .ampforwp-gallery-item .wp-caption-text{color: #696969; font-size: 11px; line-height: 15px; background: #eee; margin: 0; padding: .66em .75em; text-align: center;}
|
366 |
.ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
|
@@ -15,8 +15,9 @@ do_action('ampforwp_before_comment_hook',$this);
|
|
15 |
// Gather comments for a specific page/post
|
16 |
$postID = $comments = "";
|
17 |
$postID = get_the_ID();
|
|
|
18 |
$comments = get_comments(
|
19 |
-
array( 'post_id' => $postID, 'status' => 'approve' )
|
20 |
);
|
21 |
if ( $comments ) {
|
22 |
$comment_nums = '';
|
15 |
// Gather comments for a specific page/post
|
16 |
$postID = $comments = "";
|
17 |
$postID = get_the_ID();
|
18 |
+
$comment_order = get_option( 'comment_order' );
|
19 |
$comments = get_comments(
|
20 |
+
array( 'post_id' => $postID, 'order' => esc_attr($comment_order), 'status' => 'approve' )
|
21 |
);
|
22 |
if ( $comments ) {
|
23 |
$comment_nums = '';
|
@@ -55,6 +55,15 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
55 |
<div class="related_link">
|
56 |
<?php $title = get_the_title(); ?>
|
57 |
<a href="<?php echo esc_url( amp_loop_permalink() ); ?>" title="<?php echo esc_html( $title ); ?>" ><?php the_title(); ?></a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
<?php
|
59 |
if (true == ampforwp_get_setting('amforwp-design3-recentpost-date-switch') ) {
|
60 |
amp_loop_date();
|
55 |
<div class="related_link">
|
56 |
<?php $title = get_the_title(); ?>
|
57 |
<a href="<?php echo esc_url( amp_loop_permalink() ); ?>" title="<?php echo esc_html( $title ); ?>" ><?php the_title(); ?></a>
|
58 |
+
<?php
|
59 |
+
if( true == ampforwp_get_setting('amforwp-design3-recentpost-excerpt-switch') ){
|
60 |
+
$excep_len = 15;
|
61 |
+
if(ampforwp_get_setting('amp-design3-recentpost-excerpt-len') && is_numeric(ampforwp_get_setting('amp-design3-recentpost-excerpt-len'))){
|
62 |
+
$excep_len = intval(ampforwp_get_setting('amp-design3-recentpost-excerpt-len'));
|
63 |
+
}
|
64 |
+
amp_loop_excerpt($excep_len);
|
65 |
+
}
|
66 |
+
?>
|
67 |
<?php
|
68 |
if (true == ampforwp_get_setting('amforwp-design3-recentpost-date-switch') ) {
|
69 |
amp_loop_date();
|
@@ -401,7 +401,7 @@ figcaption{ font-size: 11px; line-height: 1.6; margin-bottom: 11px; background:
|
|
401 |
.the_content p{ margin-top: 0px; margin-bottom: 30px; word-break: break-word; }
|
402 |
.the_content small{font-size:11px;line-height:1.2;color:#111;margin-bottom: 5px;display: inline-block;}
|
403 |
.amp-wp-tax-tag{ }
|
404 |
-
main .amp-wp-content.featured-image-content{ padding: 0px; border: 0; margin-bottom: 0; box-shadow: none }
|
405 |
.amp-wp-content .amp-wp-article-featured-image amp-img {margin: 0 auto;}
|
406 |
.single-post .amp-wp-article-content amp-img{ max-width:100% }
|
407 |
<?php if ( is_single() ) {
|
401 |
.the_content p{ margin-top: 0px; margin-bottom: 30px; word-break: break-word; }
|
402 |
.the_content small{font-size:11px;line-height:1.2;color:#111;margin-bottom: 5px;display: inline-block;}
|
403 |
.amp-wp-tax-tag{ }
|
404 |
+
main .amp-wp-content.featured-image-content{ padding: 0px; border: 0; margin-bottom: 0; box-shadow: none; text-align: center; }
|
405 |
.amp-wp-content .amp-wp-article-featured-image amp-img {margin: 0 auto;}
|
406 |
.single-post .amp-wp-article-content amp-img{ max-width:100% }
|
407 |
<?php if ( is_single() ) {
|
@@ -282,7 +282,11 @@ do_action("ampforwp_single_design_type_handle_d1");
|
|
282 |
<?php amp_loop_category(); ?>
|
283 |
<?php amp_loop_title(); ?>
|
284 |
<?php if( true == ampforwp_get_setting('amforwp-recentpost-excerpt-switch') ){
|
285 |
-
|
|
|
|
|
|
|
|
|
286 |
}
|
287 |
if( true == ampforwp_get_setting('amforwp-recentpost-date-switch')){ ?>
|
288 |
<div class="pt-dt">
|
282 |
<?php amp_loop_category(); ?>
|
283 |
<?php amp_loop_title(); ?>
|
284 |
<?php if( true == ampforwp_get_setting('amforwp-recentpost-excerpt-switch') ){
|
285 |
+
$excep_len = 15;
|
286 |
+
if(ampforwp_get_setting('amp-swift-recentpost-excerpt-len') && is_numeric(ampforwp_get_setting('amp-swift-recentpost-excerpt-len'))){
|
287 |
+
$excep_len = intval(ampforwp_get_setting('amp-swift-recentpost-excerpt-len'));
|
288 |
+
}
|
289 |
+
amp_loop_excerpt($excep_len);
|
290 |
}
|
291 |
if( true == ampforwp_get_setting('amforwp-recentpost-date-switch')){ ?>
|
292 |
<div class="pt-dt">
|
@@ -628,7 +628,7 @@ p.nocomments {padding: 10px;color: #fff;}
|
|
628 |
.amp-category span:last-child:after{display:none;}
|
629 |
.sp{width:100%;margin-top:20px;display:inline-block;}
|
630 |
.amp-post-title{font-size:48px;line-height:58px;color: #333;margin:0;padding-top:15px;}
|
631 |
-
.sf-img {width: 100%;display: inline-block;height: auto;
|
632 |
<?php if ( ampforwp_get_setting('swift-featued-image-type') == 1) { ?>
|
633 |
margin-top: 33px;
|
634 |
<?php }
|
628 |
.amp-category span:last-child:after{display:none;}
|
629 |
.sp{width:100%;margin-top:20px;display:inline-block;}
|
630 |
.amp-post-title{font-size:48px;line-height:58px;color: #333;margin:0;padding-top:15px;}
|
631 |
+
.sf-img {text-align: center;width: 100%;display: inline-block;height: auto;
|
632 |
<?php if ( ampforwp_get_setting('swift-featued-image-type') == 1) { ?>
|
633 |
margin-top: 33px;
|
634 |
<?php }
|
@@ -3391,8 +3391,10 @@ function ampforwp_frontpage_comments() {
|
|
3391 |
$postID = '';
|
3392 |
// Gather comments for a Front from post id
|
3393 |
$postID = ampforwp_get_frontpage_id();
|
|
|
3394 |
$comments = get_comments(array(
|
3395 |
'post_id' => $postID,
|
|
|
3396 |
'status' => 'approve' //Change this to the type of comments to be displayed
|
3397 |
));
|
3398 |
$comment_button_url = get_permalink( $post_id );
|
@@ -4517,6 +4519,14 @@ function ampforwp_get_featured_image_from_content( $featured_image = "", $size="
|
|
4517 |
}
|
4518 |
}
|
4519 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4520 |
}
|
4521 |
}
|
4522 |
// Sanitize it
|
@@ -6659,8 +6669,10 @@ function ampforwp_comments_sanitizer(){
|
|
6659 |
$postID = ampforwp_get_frontpage_id();
|
6660 |
}
|
6661 |
if ( ampforwp_get_comments_status() && true == ampforwp_get_setting('wordpress-comments-support') ) {
|
|
|
6662 |
$comments = get_comments(array(
|
6663 |
'post_id' => $postID,
|
|
|
6664 |
'status' => 'approve' //Change this to the type of comments to be displayed
|
6665 |
) );
|
6666 |
foreach ($comments as $comment) {
|
@@ -7386,7 +7398,7 @@ function ampforwp_head_css(){
|
|
7386 |
}
|
7387 |
|
7388 |
function ampforwp_remove_admin_menu_front($wp){
|
7389 |
-
$node_arr = ['search'];
|
7390 |
for($i=0;$i<count($node_arr);$i++){
|
7391 |
$wp->remove_node($node_arr[$i]);
|
7392 |
}
|
@@ -7812,7 +7824,7 @@ if(!function_exists('ampforwp_add_fallback_element')){
|
|
7812 |
$m_content = $matches[1][$i];
|
7813 |
$m_content = ampforwp_imagify_webp_compatibility($m_content);
|
7814 |
$m_content = ampforwp_ewww_webp_compatibility($m_content);
|
7815 |
-
$m1_content =
|
7816 |
preg_match_all('/src="(.*?)"/', $m1_content,$fimgsrc);
|
7817 |
preg_match_all('/width="(.*?)"/', $m1_content,$fimgwidth);
|
7818 |
preg_match_all('/height="(.*?)"/', $m1_content,$fimgheight);
|
@@ -7879,13 +7891,17 @@ if(!function_exists('ampforwp_imagify_webp_compatibility')){
|
|
7879 |
return $content;
|
7880 |
}
|
7881 |
}
|
7882 |
-
if(!function_exists('
|
7883 |
-
function
|
7884 |
if(!function_exists('_imagify_init') && !function_exists('ewww_image_optimizer_webp_initialize')){
|
7885 |
-
preg_match_all('/src
|
7886 |
-
if(isset($cc[
|
7887 |
-
$
|
7888 |
-
$
|
|
|
|
|
|
|
|
|
7889 |
}
|
7890 |
|
7891 |
}
|
@@ -7912,4 +7928,41 @@ function ampforwp_ewww_webp_compatibility($content){
|
|
7912 |
}
|
7913 |
return $content;
|
7914 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7915 |
}
|
3391 |
$postID = '';
|
3392 |
// Gather comments for a Front from post id
|
3393 |
$postID = ampforwp_get_frontpage_id();
|
3394 |
+
$comment_order = get_option( 'comment_order' );
|
3395 |
$comments = get_comments(array(
|
3396 |
'post_id' => $postID,
|
3397 |
+
'order' => esc_attr($comment_order),
|
3398 |
'status' => 'approve' //Change this to the type of comments to be displayed
|
3399 |
));
|
3400 |
$comment_button_url = get_permalink( $post_id );
|
4519 |
}
|
4520 |
}
|
4521 |
}
|
4522 |
+
}else{
|
4523 |
+
preg_match_all('/<img(.*?)src=[\'"]([^\'"]+)[\'"].*.>/i', $post->post_content, $matches);
|
4524 |
+
if(isset($matches[2][0])){
|
4525 |
+
$image_html = $matches[0][0];
|
4526 |
+
$image_url = $matches[2][0];
|
4527 |
+
$image_width = 1366;
|
4528 |
+
$image_height = 600;
|
4529 |
+
}
|
4530 |
}
|
4531 |
}
|
4532 |
// Sanitize it
|
6669 |
$postID = ampforwp_get_frontpage_id();
|
6670 |
}
|
6671 |
if ( ampforwp_get_comments_status() && true == ampforwp_get_setting('wordpress-comments-support') ) {
|
6672 |
+
$comment_order = get_option( 'comment_order' );
|
6673 |
$comments = get_comments(array(
|
6674 |
'post_id' => $postID,
|
6675 |
+
'order' => esc_attr($comment_order),
|
6676 |
'status' => 'approve' //Change this to the type of comments to be displayed
|
6677 |
) );
|
6678 |
foreach ($comments as $comment) {
|
7398 |
}
|
7399 |
|
7400 |
function ampforwp_remove_admin_menu_front($wp){
|
7401 |
+
$node_arr = ['search','admin-bar-likes-widget'];
|
7402 |
for($i=0;$i<count($node_arr);$i++){
|
7403 |
$wp->remove_node($node_arr[$i]);
|
7404 |
}
|
7824 |
$m_content = $matches[1][$i];
|
7825 |
$m_content = ampforwp_imagify_webp_compatibility($m_content);
|
7826 |
$m_content = ampforwp_ewww_webp_compatibility($m_content);
|
7827 |
+
$m1_content = ampforwp_set_default_fallback_image($matches[1][$i]);
|
7828 |
preg_match_all('/src="(.*?)"/', $m1_content,$fimgsrc);
|
7829 |
preg_match_all('/width="(.*?)"/', $m1_content,$fimgwidth);
|
7830 |
preg_match_all('/height="(.*?)"/', $m1_content,$fimgheight);
|
7891 |
return $content;
|
7892 |
}
|
7893 |
}
|
7894 |
+
if(!function_exists('ampforwp_set_default_fallback_image')){
|
7895 |
+
function ampforwp_set_default_fallback_image($content){
|
7896 |
if(!function_exists('_imagify_init') && !function_exists('ewww_image_optimizer_webp_initialize')){
|
7897 |
+
preg_match_all('/src="(.*?)"/', $content,$cc); // need to check extenstion for fallback.
|
7898 |
+
if(isset($cc[1][0])){
|
7899 |
+
$img = $cc[1][0];
|
7900 |
+
$defaul_fallback_img = ampforwp_get_setting('ampforwp_default_fallback_image');
|
7901 |
+
if(isset($defaul_fallback_img['url']) && $defaul_fallback_img['url']!=''){
|
7902 |
+
$defaul_fallback_img = esc_url($defaul_fallback_img['url']);
|
7903 |
+
$content = str_replace($img, $defaul_fallback_img, $content); // need to change fallback extenstion.
|
7904 |
+
}
|
7905 |
}
|
7906 |
|
7907 |
}
|
7928 |
}
|
7929 |
return $content;
|
7930 |
}
|
7931 |
+
}
|
7932 |
+
add_action( 'admin_notices', 'ampforwp_seo_selection_notice' );
|
7933 |
+
function ampforwp_seo_selection_notice() {
|
7934 |
+
if('' != ampforwp_get_setting('ampforwp-seo-selection')){
|
7935 |
+
return;
|
7936 |
+
}
|
7937 |
+
$seo = '';
|
7938 |
+
if(class_exists('WPSEO_Options')){
|
7939 |
+
$seo = 'Yoast SEO';
|
7940 |
+
}
|
7941 |
+
if(class_exists('All_in_One_SEO_Pack')){
|
7942 |
+
$seo = 'All in One SEO';
|
7943 |
+
}
|
7944 |
+
if(function_exists( 'the_seo_framework' )){
|
7945 |
+
$seo = 'The SEO Framework';
|
7946 |
+
}
|
7947 |
+
if(function_exists('genesis_theme_support')){
|
7948 |
+
$seo = 'Genesis';
|
7949 |
+
}
|
7950 |
+
if(function_exists('qode_header_meta')){
|
7951 |
+
$seo = 'Bridge Qode SEO';
|
7952 |
+
}
|
7953 |
+
if(defined( 'RANK_MATH_FILE' )){
|
7954 |
+
$seo = 'Rank Math SEO';
|
7955 |
+
}
|
7956 |
+
if(defined( 'SQ_ALL_PATTERNS' )){
|
7957 |
+
$seo = 'Squirrly SEO';
|
7958 |
+
}
|
7959 |
+
if(class_exists('Smartcrawl_Loader')){
|
7960 |
+
$seo = 'Smartcrawl SEO';
|
7961 |
+
}
|
7962 |
+
if(function_exists('seopress_activation')){
|
7963 |
+
$seo = 'SEO Press';
|
7964 |
+
}
|
7965 |
+
if(!empty($seo)){
|
7966 |
+
echo sprintf(('<div class="notice notice-error"><p>%s <a href="%s">%s</a></p></div>'), esc_html__('The configuration of AMPforWP and '.esc_html($seo).' plugin is seems incorrect. Please go to AMPforWP plugin settings and select '.esc_html($seo).' from SEO Plugin Integration or ','accelerated-mobile-pages'),esc_url(admin_url('admin.php?page=amp_options&tab=5')),esc_html__('Click Here','accelerated-mobile-pages'));
|
7967 |
+
}
|
7968 |
}
|