AMP for WP – Accelerated Mobile Pages - Version 1.0.77.48

Version Description

(11th August 2022) = * Improvements: Added Super Related Posts plugin compatibility #5298 * Improvements: Added Inline Related Post plugin compatibility #5296 * Fixed: Fatal error while activating official AMP. #5300 * Fixed: Spotify Embed not working after 1.0.77.46 version #5294 * Fixed: AMP Pagebuilder not loading with All in One SEO latest update #5299

Download this release

Release Info

Developer mohammed_kaludi
Plugin Icon 128x128 AMP for WP – Accelerated Mobile Pages
Version 1.0.77.48
Comparing to
See all releases

Code changes from version 1.0.77.47 to 1.0.77.48

README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 6.0
7
- Stable tag: 1.0.77.47
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -197,6 +197,13 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
197
 
198
  == Changelog ==
199
 
 
 
 
 
 
 
 
200
  = 1.0.77.47 (5th July 2022) =
201
  * Fixed: AMP validation error when youtube video is embeded with query parameters #5292
202
  * Fixed: Instagram embeds not working when added with blockquote tags #5289
@@ -208,11 +215,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
208
  * Fixed: Incorrect default value in TPD #5286
209
  * Fixed: Debug Warnings - Undefined array-key: row #5283
210
 
211
- = 1.0.77.45 (13th June 2022) =
212
- * Fixed: Conflict issue with WPML #5274
213
- * Fixed: Page builder modal is getting hidden below the header of the post/page editor. #5279
214
- * Fixed: FAQ Schema For Pages And Posts compatibility #5278
215
- * Fixed: Debug Warnings - Trying to access array offset on value of type null #5277
216
- * Fixed: fatal error #5280
217
-
218
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 6.0
7
+ Stable tag: 1.0.77.48
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
197
 
198
  == Changelog ==
199
 
200
+ = 1.0.77.48 (11th August 2022) =
201
+ * Improvements: Added Super Related Posts plugin compatibility #5298
202
+ * Improvements: Added Inline Related Post plugin compatibility #5296
203
+ * Fixed: Fatal error while activating official AMP. #5300
204
+ * Fixed: Spotify Embed not working after 1.0.77.46 version #5294
205
+ * Fixed: AMP Pagebuilder not loading with All in One SEO latest update #5299
206
+
207
  = 1.0.77.47 (5th July 2022) =
208
  * Fixed: AMP validation error when youtube video is embeded with query parameters #5292
209
  * Fixed: Instagram embeds not working when added with blockquote tags #5289
215
  * Fixed: Incorrect default value in TPD #5286
216
  * Fixed: Debug Warnings - Undefined array-key: row #5283
217
 
 
 
 
 
 
 
 
218
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
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: 1.0.77.47
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.77.47');
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.77.48
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.77.48');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
changelog.txt CHANGED
@@ -1,5 +1,12 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
3
  = 1.0.77.47 (5th July 2022) =
4
  * Fixed: AMP validation error when youtube video is embeded with query parameters #5292
5
  * Fixed: Instagram embeds not working when added with blockquote tags #5289
1
  == Changelog ==
2
 
3
+ = 1.0.77.48 (11th August 2022) =
4
+ * Improvements: Added Super Related Posts plugin compatibility #5298
5
+ * Improvements: Added Inline Related Post plugin compatibility #5296
6
+ * Fixed: Fatal error while activating official AMP. #5300
7
+ * Fixed: Spotify Embed not working after 1.0.77.46 version #5294
8
+ * Fixed: AMP Pagebuilder not loading with All in One SEO latest update #5299
9
+
10
  = 1.0.77.47 (5th July 2022) =
11
  * Fixed: AMP validation error when youtube video is embeded with query parameters #5292
12
  * Fixed: Instagram embeds not working when added with blockquote tags #5289
components/components-core.php CHANGED
@@ -733,6 +733,33 @@ function ampforwp_backtotop_global_css(){?>
733
  <?php if (class_exists('UAGB_Admin')) {?>
734
  .wp-block-uagb-faq svg {display: none;}
735
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
736
  <?php if (function_exists('on_bsf_aiosrs_pro_activate')) {?>
737
  span.wpsp-icon.wpsp-faq-icon-wrap svg , span.wpsp-icon-active.wpsp-faq-icon-wrap svg{
738
  display: none;}
733
  <?php if (class_exists('UAGB_Admin')) {?>
734
  .wp-block-uagb-faq svg {display: none;}
735
  <?php } ?>
736
+ <?php if (function_exists('irp_block_category')) {?>
737
+ h3.uagb-post__title a {
738
+ color: #000;
739
+ font-weight: 500;
740
+ }
741
+ .uagb-post__items article {
742
+ width: 50%;
743
+ float: left;
744
+ padding: 2px;
745
+ }
746
+ p.has-background {
747
+ padding: 25px 10px 25px;
748
+ background-color: #1e73be;
749
+ color: #fff;
750
+ margin: 40px 0px;
751
+ }
752
+ @media only screen and (max-width: 600px) {
753
+ .uagb-post__items article {
754
+ width: 100%;
755
+ float: inherit;
756
+ padding: 2px;
757
+ }
758
+ .cntn-wrp.artl-cnt p.has-background {
759
+ margin: 100px 0px 20px;
760
+ }
761
+ }
762
+ <?php } ?>
763
  <?php if (function_exists('on_bsf_aiosrs_pro_activate')) {?>
764
  span.wpsp-icon.wpsp-faq-icon-wrap svg , span.wpsp-icon-active.wpsp-faq-icon-wrap svg{
765
  display: none;}
includes/features/performance/performance-functions.php CHANGED
@@ -102,10 +102,10 @@ function ampforwp_minify_html_output($content_buffer){
102
  $content_buffer = preg_replace('/<\/p>/s', '</p></section>', $content_buffer);
103
  $content_buffer = preg_replace('/<div\sclass="wp-faq-schema-items">(.*?)<\/div>/s', '<amp-accordion expand-single-section>$1</amp-accordion>', $content_buffer);
104
  }
105
- if(preg_match('/<amp-iframe(.*?)src="(.*?)embed\/(.*?)"(.*?)width="(.*?)"(.*?)height="(.*?)"(.*?)<\/amp-iframe>/', $content_buffer)){
106
  // Youtube Embed with Query Parameters
107
  $content_buffer = preg_replace('/<amp-iframe(.*?)src="(.*?)youtube.com\/embed\/(.*?)\?(.*?)"(.*?)width="(.*?)"(.*?)height="(.*?)"(.*?)<\/amp-iframe>/', '<amp-youtube data-videoid="$3" layout="responsive" width="$6" height="$8"></amp-youtube>', $content_buffer);
108
- $content_buffer = preg_replace('/<amp-iframe(.*?)src="(.*?)embed\/(.*?)"(.*?)width="(.*?)"(.*?)height="(.*?)"(.*?)<\/amp-iframe>/', '<amp-youtube data-videoid="$3" layout="responsive" width="$5" height="$7"></amp-youtube>', $content_buffer);
109
  }
110
  if(preg_match('/<amp-iframe\sclass="instagram-media(.*?)"(.*?)src="https:\/\/instagram.com\/p\/(.*?)\/(.*?)"(.*?)><\/amp-iframe>/', $content_buffer)){
111
  $content_buffer = preg_replace('/<amp-iframe\sclass="instagram-media(.*?)"(.*?)src="https:\/\/instagram.com\/p\/(.*?)\/(.*?)"(.*?)><\/amp-iframe>/', '<amp-instagram data-shortcode="$3" data-captioned width="400" height="400"layout="responsive"></amp-instagram>', $content_buffer);
102
  $content_buffer = preg_replace('/<\/p>/s', '</p></section>', $content_buffer);
103
  $content_buffer = preg_replace('/<div\sclass="wp-faq-schema-items">(.*?)<\/div>/s', '<amp-accordion expand-single-section>$1</amp-accordion>', $content_buffer);
104
  }
105
+ if(preg_match('/<amp-iframe(.*?)src="(.*?)youtube.com\/embed\/(.*?)"(.*?)width="(.*?)"(.*?)height="(.*?)"(.*?)<\/amp-iframe>/', $content_buffer)){
106
  // Youtube Embed with Query Parameters
107
  $content_buffer = preg_replace('/<amp-iframe(.*?)src="(.*?)youtube.com\/embed\/(.*?)\?(.*?)"(.*?)width="(.*?)"(.*?)height="(.*?)"(.*?)<\/amp-iframe>/', '<amp-youtube data-videoid="$3" layout="responsive" width="$6" height="$8"></amp-youtube>', $content_buffer);
108
+ $content_buffer = preg_replace('/<amp-iframe(.*?)src="(.*?)youtube.com\/embed\/(.*?)"(.*?)width="(.*?)"(.*?)height="(.*?)"(.*?)<\/amp-iframe>/', '<amp-youtube data-videoid="$3" layout="responsive" width="$5" height="$7"></amp-youtube>', $content_buffer);
109
  }
110
  if(preg_match('/<amp-iframe\sclass="instagram-media(.*?)"(.*?)src="https:\/\/instagram.com\/p\/(.*?)\/(.*?)"(.*?)><\/amp-iframe>/', $content_buffer)){
111
  $content_buffer = preg_replace('/<amp-iframe\sclass="instagram-media(.*?)"(.*?)src="https:\/\/instagram.com\/p\/(.*?)\/(.*?)"(.*?)><\/amp-iframe>/', '<amp-instagram data-shortcode="$3" data-captioned width="400" height="400"layout="responsive"></amp-instagram>', $content_buffer);
includes/super-related-posts.css ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .sprp-wrpr {
2
+
3
+ border-bottom: 1px solid #d8d8d8;
4
+
5
+ display: flex;
6
+
7
+ flex-direction: row;
8
+
9
+ margin: 7px 0 15px;
10
+
11
+ max-width: 100%;
12
+
13
+ order: 1;
14
+
15
+ padding-bottom: 15px;
16
+
17
+ width: 100%;
18
+
19
+ }
20
+
21
+ .sprp.d1 .sprp-wrpr {
22
+
23
+ justify-content: space-around;
24
+
25
+ }
26
+
27
+ .sprp-wrpr .sprp-txt {
28
+
29
+ display: flex;
30
+
31
+ flex: 0 1 auto;
32
+
33
+ flex-direction: column;
34
+
35
+ justify-content: center;
36
+
37
+ width: calc(75% - 8px);
38
+
39
+ font-size: 14px;
40
+ line-height: 1.5;
41
+
42
+ }
43
+
44
+ .sprp.d1 .sprp-img {
45
+
46
+ order: 2;
47
+ width: 135px;
48
+ max-height: 90px;
49
+ line-height: 0;
50
+ overflow: hidden;
51
+ margin-left: 16px;
52
+
53
+ }
54
+
55
+ .sprp.d2 .sprp-img {
56
+
57
+ order: 1;
58
+
59
+ width: 75px;
60
+
61
+ height: 70px;
62
+
63
+ }
64
+
65
+ #content-main .sprp-wrpr h3, .sprp-wrpr h3 {
66
+
67
+ color: #000;
68
+
69
+ font-size: 0.9em;
70
+
71
+ }
72
+
73
+ li {
74
+
75
+ list-style: none;
76
+
77
+ }
78
+
79
+ .sprp.d2 .sprp-wrpr {
80
+
81
+ margin: 0;
82
+
83
+ padding: 0;
84
+
85
+ justify-content: left;
86
+
87
+ }
88
+
89
+ .sprp.d2 .sprp-txt {
90
+
91
+ order: 2;
92
+
93
+ margin-left: 16px;
94
+
95
+ }
96
+
97
+ .sprp h2 {
98
+
99
+ font-size: 1.5em;
100
+
101
+ font-weight: 500;
102
+
103
+ margin-bottom: 25px;
104
+
105
+ text-transform: uppercase;
106
+
107
+ }
108
+
109
+ .d1 h2 {
110
+
111
+ text-align: center;
112
+
113
+ }
114
+
115
+ .d2 h2 {
116
+
117
+ text-align: left;
118
+
119
+ border-bottom: 1px solid;
120
+
121
+ }
122
+
123
+ .sprp ul {
124
+
125
+ margin: 0;
126
+
127
+ padding: 0;
128
+
129
+ }
130
+
131
+ .sprp.d3 .sprp-wrpr {
132
+
133
+ flex-direction: column-reverse;
134
+ text-align: center;
135
+
136
+ }
137
+
138
+ .sprp.d3 li {
139
+
140
+ width: calc(30% - 8px);
141
+
142
+ display: inline-block;
143
+
144
+ }
145
+
146
+ @media(max-width:475px){
147
+ .sprp.d3 li {
148
+ width: calc(100% - 8px);
149
+ }
150
+ }
151
+
152
+ .sprp.d3 .sprp-txt {
153
+
154
+ width: 100%;
155
+ margin-top: 10px;
156
+
157
+ }
158
+
159
+ .sprp-wrpr .sprp-txt a {
160
+ color: #222222;
161
+ }
162
+
163
+ .single .sprp-wrpr img {
164
+
165
+ max-width: 100%;
166
+
167
+ height: 100%;
168
+
169
+ object-fit: cover;
170
+
171
+ }
172
+
173
+ .sprp.d3 .sprp-img {
174
+ width: 100%;
175
+ max-height: 130px;
176
+ line-height: 0;
177
+ overflow: hidden;
178
+ }
179
+ /* .sprp ul li, .single #content-main ul li {
180
+ margin: 0 5px;
181
+ padding: 0;
182
+ } */
183
+ .sprp ul li {
184
+ margin: 0 5px;
185
+ padding: 0;
186
+ }
187
+
188
+ .cntn-wrp.artl-cnt .sprp ul li:before {
189
+ height: inherit;
190
+ }
includes/vendor/css-parser/autoload.php CHANGED
@@ -5,5 +5,6 @@ if ( ! defined( 'ABSPATH' ) ) {
5
  // autoload.php @generated by Composer
6
 
7
  require_once __DIR__ . '/composer/autoload_real.php';
8
-
9
- return ComposerAutoloaderInit36c553b877d93c41f97bfeeed7ef5433::getLoader();
 
5
  // autoload.php @generated by Composer
6
 
7
  require_once __DIR__ . '/composer/autoload_real.php';
8
+ if (!function_exists('amp_activate')){
9
+ return ComposerAutoloaderInit36c553b877d93c41f97bfeeed7ef5433::getLoader();
10
+ }
pagebuilder/inc/admin-amp-page-builder.css CHANGED
@@ -731,7 +731,7 @@ position: fixed;
731
  color: #23282d;
732
  font-weight: 600;
733
  }
734
- .modal-mask .modal-body {
735
  overflow-y: auto;
736
  height: 92%;
737
  position: absolute;
731
  color: #23282d;
732
  font-weight: 600;
733
  }
734
+ #amp-page-builder .modal-mask .modal-body {
735
  overflow-y: auto;
736
  height: 92%;
737
  position: absolute;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 6.0
7
- Stable tag: 1.0.77.47
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,13 @@ You can contact us from [here](https://ampforwp.com/contact/)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
197
  = 1.0.77.47 (5th July 2022) =
198
  * Fixed: AMP validation error when youtube video is embeded with query parameters #5292
199
  * Fixed: Instagram embeds not working when added with blockquote tags #5289
@@ -205,11 +212,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
205
  * Fixed: Incorrect default value in TPD #5286
206
  * Fixed: Debug Warnings - Undefined array-key: row #5283
207
 
208
- = 1.0.77.45 (13th June 2022) =
209
- * Fixed: Conflict issue with WPML #5274
210
- * Fixed: Page builder modal is getting hidden below the header of the post/page editor. #5279
211
- * Fixed: FAQ Schema For Pages And Posts compatibility #5278
212
- * Fixed: Debug Warnings - Trying to access array offset on value of type null #5277
213
- * Fixed: fatal error #5280
214
-
215
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 6.0
7
+ Stable tag: 1.0.77.48
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.77.48 (11th August 2022) =
198
+ * Improvements: Added Super Related Posts plugin compatibility #5298
199
+ * Improvements: Added Inline Related Post plugin compatibility #5296
200
+ * Fixed: Fatal error while activating official AMP. #5300
201
+ * Fixed: Spotify Embed not working after 1.0.77.46 version #5294
202
+ * Fixed: AMP Pagebuilder not loading with All in One SEO latest update #5299
203
+
204
  = 1.0.77.47 (5th July 2022) =
205
  * Fixed: AMP validation error when youtube video is embeded with query parameters #5292
206
  * Fixed: Instagram embeds not working when added with blockquote tags #5289
212
  * Fixed: Incorrect default value in TPD #5286
213
  * Fixed: Debug Warnings - Undefined array-key: row #5283
214
 
 
 
 
 
 
 
 
215
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -9750,4 +9750,22 @@ function ampforwp_wpml_takeover_compatibility($return) {
9750
  return false;
9751
  }
9752
  return $return;
9753
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9750
  return false;
9751
  }
9752
  return $return;
9753
+ };
9754
+
9755
+ if(class_exists('SuperRelatedPosts')){
9756
+ add_action('amp_post_template_css', 'ampforwp_super_related_posts_style');
9757
+ }
9758
+ function ampforwp_super_related_posts_style(){
9759
+ global $wp_filesystem;
9760
+ $css = get_transient('ampforwp_super_related_posts');
9761
+ if($css == false){
9762
+ if(!is_object($wp_filesystem)){
9763
+ require_once ABSPATH . '/wp-admin/includes/class-wp-filesystem-base.php';
9764
+ require_once ABSPATH . '/wp-admin/includes/class-wp-filesystem-direct.php';
9765
+ $wp_filesystem = new WP_Filesystem_Direct( array() );
9766
+ }
9767
+ $css = $wp_filesystem->get_contents(AMPFORWP_PLUGIN_DIR."/includes/super-related-posts.css");
9768
+ set_transient('ampforwp_super_related_posts', $css);
9769
+ }
9770
+ echo ampforwp_css_sanitizer($css);
9771
+ }