AMP for WP – Accelerated Mobile Pages - Version 0.9.97.8

Version Description

(24th July 2018) = * Fixed: AMP renders with ?q after the /amp #2361 * Fixed: iThemes Sync can not connect to the site. #2380 * Fixed: H1 to H6 styling is not reflecting in the Swift theme #2383 * Fixed: Underline on Links function is not working. #2372 * Fixed: WordPress Admin Color Scheme not applying #2390 * Fixed: Breadcrumbs are not disabling when the sidebar template is selected #2376 * Fixed: All the Images are Adding AMP at the End of their URL. #2391

Download this release

Release Info

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

Code changes from version 0.9.97.7 to 0.9.97.8

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: 4.9.5
7
- Stable tag: 0.9.97.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -183,12 +183,20 @@ You can contact us from [here](https://ampforwp.com/contact/)
183
 
184
  == Changelog ==
185
 
 
 
 
 
 
 
 
 
 
186
  = 0.9.97.7 (18th July 2018) =
187
  * Fixed: PageBuilder not loading on frontpage #2360
188
  * Fixed: 500 error on somepages due to open wp_query by other plugins
189
  * Fixed: License key reupdating #2261
190
  * Fixed: AMP renders with ?q after the /amp #2361
191
-
192
 
193
  = 0.9.97.6 (14th July 2018) =
194
  * Fixed: Error and Warning on Structured Data for Logo. #2360
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.97.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
183
 
184
  == Changelog ==
185
 
186
+ = 0.9.97.8 (24th July 2018) =
187
+ * Fixed: AMP renders with ?q after the /amp #2361
188
+ * Fixed: iThemes Sync can not connect to the site. #2380
189
+ * Fixed: H1 to H6 styling is not reflecting in the Swift theme #2383
190
+ * Fixed: Underline on Links function is not working. #2372
191
+ * Fixed: WordPress Admin Color Scheme not applying #2390
192
+ * Fixed: Breadcrumbs are not disabling when the sidebar template is selected #2376
193
+ * Fixed: All the Images are Adding AMP at the End of their URL. #2391
194
+
195
  = 0.9.97.7 (18th July 2018) =
196
  * Fixed: PageBuilder not loading on frontpage #2360
197
  * Fixed: 500 error on somepages due to open wp_query by other plugins
198
  * Fixed: License key reupdating #2261
199
  * Fixed: AMP renders with ?q after the /amp #2361
 
200
 
201
  = 0.9.97.6 (14th July 2018) =
202
  * Fixed: Error and Warning on Structured Data for Logo. #2360
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.97.7
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.97.7');
23
  // any changes to AMP_QUERY_VAR should be refelected here
24
  function ampforwp_generate_endpoint(){
25
  $ampforwp_slug = '';
@@ -363,7 +363,7 @@ function ampforwp_parent_plugin_check() {
363
  delete_option( 'ampforwp_parent_plugin_check');
364
  }
365
  }
366
- if(!function_exists('ampforwp_upcomming_layouts_demo') && is_admin()){
367
  function ampforwp_upcomming_layouts_demo(){
368
  return array(
369
  array(
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.97.8
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.97.8');
23
  // any changes to AMP_QUERY_VAR should be refelected here
24
  function ampforwp_generate_endpoint(){
25
  $ampforwp_slug = '';
363
  delete_option( 'ampforwp_parent_plugin_check');
364
  }
365
  }
366
+ if( !function_exists('ampforwp_upcomming_layouts_demo') ){
367
  function ampforwp_upcomming_layouts_demo(){
368
  return array(
369
  array(
components/categories-tags/categories-tags.php CHANGED
@@ -23,7 +23,7 @@ function ampforwp_framework_get_categories_list(){
23
  function ampforwp_framework_get_tags_list(){
24
  global $post, $redux_builder_amp;
25
  $ampforwp_tags = get_the_terms( $post->ID, 'post_tag' );
26
- if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
27
  <div class="amp-tags">
28
  <?php /* if($redux_builder_amp['amp-rtl-select-option']==0) {
29
  global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'] .' ', 'accelerated-mobile-pages' ));
23
  function ampforwp_framework_get_tags_list(){
24
  global $post, $redux_builder_amp;
25
  $ampforwp_tags = get_the_terms( $post->ID, 'post_tag' );
26
+ if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
27
  <div class="amp-tags">
28
  <?php /* if($redux_builder_amp['amp-rtl-select-option']==0) {
29
  global $redux_builder_amp; printf( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'] .' ', 'accelerated-mobile-pages' ));
includes/options/admin-config.php CHANGED
@@ -856,7 +856,10 @@ $single_extension_listing = '
856
  ';
857
 
858
  $upcomingLayoutsDesign = '';
859
- $layouts = ampforwp_upcomming_layouts_demo();
 
 
 
860
  if(is_array($layouts)){
861
  foreach($layouts as $k=>$val){
862
  $upcomingLayoutsDesign .= '<div class="amp_layout_upcomming">
856
  ';
857
 
858
  $upcomingLayoutsDesign = '';
859
+ $layouts = array();
860
+ if( is_admin() ){
861
+ $layouts = ampforwp_upcomming_layouts_demo();
862
+ }
863
  if(is_array($layouts)){
864
  foreach($layouts as $k=>$val){
865
  $upcomingLayoutsDesign .= '<div class="amp_layout_upcomming">
includes/options/extensions/vendor_support/extension_vendor_support.php CHANGED
@@ -1,32 +1,32 @@
1
- <?php
2
- /**
3
- * The Redux Framework Plugin
4
- * A simple, truly extensible and fully responsive options framework
5
- * for WordPress themes and plugins. Developed with WordPress coding
6
- * standards and PHP best practices in mind.
7
- * Plugin Name: Redux Vendor Support
8
- * Plugin URI: http://reduxframeworks.com/vendor-support
9
- * Description: Registration of Redux support libraries for local installations.
10
- * Author: Team Redux
11
- * Author URI: http://reduxframework.com
12
- * Version: 1.0.1
13
- * Text Domain: redux-framework
14
- * License: GPL3+
15
- * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
16
- * Domain Path: /ReduxFramework/ReduxCore/languages
17
- * Depends: ReduxFramework
18
- *
19
- * @copyright 2012-2015 Redux Framework
20
- */
21
-
22
- // Exit if accessed directly
23
- if ( ! defined( 'ABSPATH' ) ) {
24
- die;
25
- }
26
-
27
- if ( ! class_exists( 'ReduxFramework_extension_vendor_support' ) ) {
28
- if ( file_exists( dirname( __FILE__ ) . '/vendor_support/extension_vendor_support.php' ) ) {
29
- require dirname( __FILE__ ) . '/vendor_support/extension_vendor_support.php';
30
- new ReduxFramework_extension_vendor_support();
31
- }
32
  }
1
+ <?php
2
+ /**
3
+ * The Redux Framework Plugin
4
+ * A simple, truly extensible and fully responsive options framework
5
+ * for WordPress themes and plugins. Developed with WordPress coding
6
+ * standards and PHP best practices in mind.
7
+ * Plugin Name: Redux Vendor Support
8
+ * Plugin URI: http://reduxframeworks.com/vendor-support
9
+ * Description: Registration of Redux support libraries for local installations.
10
+ * Author: Team Redux
11
+ * Author URI: http://reduxframework.com
12
+ * Version: 1.0.1
13
+ * Text Domain: redux-framework
14
+ * License: GPL3+
15
+ * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
16
+ * Domain Path: /ReduxFramework/ReduxCore/languages
17
+ * Depends: ReduxFramework
18
+ *
19
+ * @copyright 2012-2015 Redux Framework
20
+ */
21
+
22
+ // Exit if accessed directly
23
+ if ( ! defined( 'ABSPATH' ) ) {
24
+ die;
25
+ }
26
+
27
+ if ( ! class_exists( 'ReduxFramework_extension_vendor_support' ) ) {
28
+ if ( file_exists( dirname( __FILE__ ) . '/vendor_support/extension_vendor_support.php' ) ) {
29
+ require dirname( __FILE__ ) . '/vendor_support/extension_vendor_support.php';
30
+ new ReduxFramework_extension_vendor_support();
31
+ }
32
  }
includes/options/extensions/vendor_support/vendor_support/class.vendor-url.php CHANGED
@@ -1,27 +1,27 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
6
-
7
- if ( ! class_exists( 'Redux_VendorURL' ) ) {
8
- class Redux_VendorURL {
9
- static public $url;
10
- static public $dir;
11
-
12
- public static function get_url( $handle ) {
13
- $min = Redux_Functions::isMin();
14
- $ace = self::$dir . 'vendor/ace_editor/ace.js';
15
- $s2js = self::$dir . 'vendor/select2/select2' . $min . '.js';
16
- $s2css = self::$dir . 'vendor/select2/select2.css';
17
-
18
- if ( $handle == 'ace-editor-js' && file_exists( $ace ) ) {
19
- return self::$url . 'vendor/ace_editor/ace.js';
20
- } elseif ( $handle == 'select2-js' && file_exists( $s2js ) ) {
21
- return self::$url . 'vendor/select2/select2.js';
22
- } elseif ( $handle == 'select2-css' && file_exists( $s2css ) ) {
23
- return self::$url . 'vendor/select2/select2.css';
24
- }
25
- }
26
- }
27
  }
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ if ( ! class_exists( 'Redux_VendorURL' ) ) {
8
+ class Redux_VendorURL {
9
+ static public $url;
10
+ static public $dir;
11
+
12
+ public static function get_url( $handle ) {
13
+ $min = Redux_Functions::isMin();
14
+ $ace = self::$dir . 'vendor/ace_editor/ace.js';
15
+ $s2js = self::$dir . 'vendor/select2/select2' . $min . '.js';
16
+ $s2css = self::$dir . 'vendor/select2/select2.css';
17
+
18
+ if ( $handle == 'ace-editor-js' && file_exists( $ace ) ) {
19
+ return self::$url . 'vendor/ace_editor/ace.js';
20
+ } elseif ( $handle == 'select2-js' && file_exists( $s2js ) ) {
21
+ return self::$url . 'vendor/select2/select2.js';
22
+ } elseif ( $handle == 'select2-css' && file_exists( $s2css ) ) {
23
+ return self::$url . 'vendor/select2/select2.css';
24
+ }
25
+ }
26
+ }
27
  }
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -159,6 +159,127 @@ background: rgb(245, 246, 250);
159
  .admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections a:after, .wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{
160
  display: none
161
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  #redux_save,
163
  #redux-defaults-section,
164
  #redux-defaults {
@@ -182,8 +303,8 @@ background: rgb(245, 246, 250);
182
  }
183
  #redux-defaults-section,
184
  #redux-defaults {
185
- background: #f2f2f2;
186
- color: #999;
187
  border: 1px solid #f6f6fa;
188
 
189
  }
@@ -191,7 +312,7 @@ background: rgb(245, 246, 250);
191
  #redux-defaults:hover {
192
  border: 1px solid #e8e7e8;
193
  background: #f4f4f4;
194
- color: #555
195
  }
196
 
197
 
@@ -252,7 +373,7 @@ background: rgb(245, 246, 250);
252
  margin-bottom:20px;
253
  }
254
  #footer-thankyou {
255
- display: none;
256
  }
257
  img.ampforwp-post-builder-img{
258
  height: 72px
@@ -939,6 +1060,7 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
939
  display: inline-block;
940
  margin-top: 15px;
941
  }
 
942
  @media(max-width:1366px){
943
  .pri-tb a{padding: 20px;}
944
  .amp-upg{padding: 60px 0px 0px 0px}
@@ -949,4 +1071,4 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
949
  top: 1%;
950
  }
951
 
952
- }
159
  .admin-color-fresh .redux-sidebar .redux-group-menu li.active.hasSubSections a:after, .wp-customizer .redux-sidebar .redux-group-menu li.active.hasSubSections a:after{
160
  display: none
161
  }
162
+
163
+ /* Wordpress Default Colors overide AMP option colors */
164
+ /** Light **/
165
+ .admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a, .admin-color-light .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{
166
+ background: #fff !important;
167
+ }
168
+ .admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover {
169
+ color: #fff !important;
170
+ background: #6f6f6f !important;
171
+ }
172
+ .admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
173
+ text-shadow: none !important;
174
+ color: #444 !important;
175
+ }
176
+ .admin-color-light .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a {
177
+ background: #6f6f6f !important;
178
+ color:#fff !important;
179
+ }
180
+ .admin-color-light #redux-header, .admin-color-blue #redux-header, .admin-color-coffee #redux-header, .admin-color-ectoplasm #redux-header, .admin-color-midnight #redux-header, .admin-color-ocean #redux-header, .admin-color-sunrise #redux-header {
181
+ background: #fff !important;
182
+ }
183
+ .admin-color-light #redux-header .display_header span, .admin-color-blue #redux-header .display_header span, .admin-color-coffee #redux-header .display_header span, .admin-color-ectoplasm #redux-header .display_header span, .admin-color-midnight #redux-header .display_header span, .admin-color-ocean #redux-header .display_header span, .admin-color-sunrise #redux-header .display_header span {
184
+ color: #888;
185
+ }
186
+ /** Blue **/
187
+ .admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a, .admin-color-blue .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{
188
+ background: #fff !important;
189
+ }
190
+ .admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
191
+ text-shadow: none !important;
192
+ color: #444 !important;
193
+ }
194
+ .admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover {
195
+ color: #fff !important;
196
+ background: #4796B3 !important;
197
+ }
198
+ .admin-color-blue .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a {
199
+ background: #096484 !important;
200
+ color:#fff !important;
201
+ }
202
+ /** Coffee **/
203
+ .admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a, .admin-color-coffee .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{
204
+ background: #fff !important;
205
+ }
206
+ .admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
207
+ text-shadow: none !important;
208
+ color: #444 !important;
209
+ }
210
+ .admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover {
211
+ color: #fff !important;
212
+ background: #46403C !important;
213
+ }
214
+ .admin-color-coffee .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a {
215
+ background: #c7a589 !important;
216
+ color:#fff !important;
217
+ }
218
+ /** Ectoplasm**/
219
+ .admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a, .admin-color-ectoplasm .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{
220
+ background: #fff !important;
221
+ }
222
+ .admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
223
+ text-shadow: none !important;
224
+ color: #444 !important;
225
+ }
226
+ .admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover {
227
+ color: #fff !important;
228
+ background: #413256 !important;
229
+ }
230
+ .admin-color-ectoplasm .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a {
231
+ background: #a3b745 !important;
232
+ color:#fff !important;
233
+ }
234
+ /** Midnight**/
235
+ .admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a, .admin-color-midnight .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{
236
+ background: #fff !important;
237
+ }
238
+ .admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
239
+ text-shadow: none !important;
240
+ color: #444 !important;
241
+ }
242
+ .admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover {
243
+ color: #fff !important;
244
+ background: #26292C !important;
245
+ }
246
+ .admin-color-midnight .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a {
247
+ background: #e14d43 !important;
248
+ color:#fff !important;
249
+ }
250
+ /** Ocean **/
251
+ .admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a, .admin-color-ocean .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{
252
+ background: #fff !important;
253
+ }
254
+ .admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
255
+ text-shadow: none !important;
256
+ color: #444 !important;
257
+ }
258
+ .admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover {
259
+ color: #fff !important;
260
+ background: #627C83 !important;
261
+ }
262
+ .admin-color-ocean .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a {
263
+ background: #9ebaa0 !important;
264
+ color:#fff !important;
265
+ }
266
+ /** Sunrise **/
267
+ .admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a, .admin-color-sunrise .redux-sidebar .redux-group-menu li.active.hasSubSections ul.subsection li a{
268
+ background: #fff !important;
269
+ }
270
+ .admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections a {
271
+ text-shadow: none !important;
272
+ color: #444 !important;
273
+ }
274
+ .admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover {
275
+ color: #fff !important;
276
+ background: #b43c38 !important;
277
+ }
278
+ .admin-color-sunrise .redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a {
279
+ background: #dd823b !important;
280
+ color:#fff !important;
281
+ }
282
+
283
  #redux_save,
284
  #redux-defaults-section,
285
  #redux-defaults {
303
  }
304
  #redux-defaults-section,
305
  #redux-defaults {
306
+ background: #f2f2f2;
307
+ color: #999;
308
  border: 1px solid #f6f6fa;
309
 
310
  }
312
  #redux-defaults:hover {
313
  border: 1px solid #e8e7e8;
314
  background: #f4f4f4;
315
+ color: #555
316
  }
317
 
318
 
373
  margin-bottom:20px;
374
  }
375
  #footer-thankyou {
376
+ display: none;
377
  }
378
  img.ampforwp-post-builder-img{
379
  height: 72px
1060
  display: inline-block;
1061
  margin-top: 15px;
1062
  }
1063
+
1064
  @media(max-width:1366px){
1065
  .pri-tb a{padding: 20px;}
1066
  .amp-upg{padding: 60px 0px 0px 0px}
1071
  top: 1%;
1072
  }
1073
 
1074
+ }
includes/thirdparty-compatibility.php CHANGED
@@ -373,64 +373,82 @@ function ampforwp_add_upcomminglayouts($layoutTemplate){
373
 
374
 
375
 
376
- if(!function_exists('ampforwp_isexternal')){
377
- function ampforwp_isexternal($url) {
378
- $components = parse_url($url);
379
- if ( empty($components['host']) ) return false; // we will treat url like '/relative.php' as relative
380
- if ( strcasecmp($components['host'], $_SERVER['HTTP_HOST']) === 0 ) return false; // url host looks exactly like the local host
381
- return strrpos(strtolower($components['host']), $_SERVER['HTTP_HOST']) !== strlen($components['host']) - strlen($_SERVER['HTTP_HOST']); // check if the url host is a subdomain
382
- }//Function function_exists
383
- }// ampforwp_isexternal function_exists close
 
 
 
 
 
 
 
384
  if(!function_exists('ampforwp_findInternalUrl')){
385
- function ampforwp_findInternalUrl($url){
386
- global $redux_builder_amp;
387
- if(isset($redux_builder_amp['convert-internal-nonamplinks-to-amp']) && ! $redux_builder_amp['convert-internal-nonamplinks-to-amp']){
388
- return $url;
389
- }
390
-
391
- if($url=='#'){ return $url; }
392
-
393
- if(!ampforwp_isexternal($url) && ampforwp_is_amp_inURL($url)===false){
394
- // Skip the URL's that have edit link to it
395
- $parts = parse_url($url);
396
- parse_str($parts['query'], $query);
397
- if ( (isset( $query['action'] ) && $query['action']) || (isset( $query['amp'] ) && $query['amp'] ) ) {
398
- return $url;
399
- }
400
-
401
- $qmarkAmp = (isset($redux_builder_amp['amp-core-end-point']) ? $redux_builder_amp['amp-core-end-point']: false );//amp-core-end-point
402
- if ( $qmarkAmp ){
403
- $url = add_query_arg( 'amp', '1', $url);
404
- return $url;
405
-
406
- }
407
-
408
- if(strpos($url, "#")!==false){
409
- $url = explode("#",$url);
410
- $url = trailingslashit($url[0]).user_trailingslashit(AMPFORWP_AMP_QUERY_VAR).'#'.$url[1];
411
- }else{
412
- if ( get_option('permalink_structure') ) {
413
- if ( strpos($url, "?") && strpos($url, "=") ){
414
- $url = explode('?', $url);
415
- $url = ampforwp_url_controller($url[0]).'?'.$url[1];
 
 
 
 
 
 
 
 
 
 
 
 
 
416
  }
417
  else
418
- $url = ampforwp_url_controller($url);
419
- }
420
- else
421
- $url = add_query_arg( 'amp', '1', $url );
422
- }
423
- return $url;
424
- }
425
- return $url;
426
- }// function Close
427
- }// function_exists ampforwp_findInternalUrl close
428
  function ampforwp_is_amp_inURL($url){
429
- $urlArray = explode("/", $url);
430
- if(!in_array(AMPFORWP_AMP_QUERY_VAR, $urlArray)){
431
- return false;
432
- }
433
- return true;
434
  }
435
 
436
  if(is_admin()){
373
 
374
 
375
 
376
+ if ( ! function_exists( 'ampforwp_isexternal ') ) {
377
+ function ampforwp_isexternal($url) {
378
+ $components = parse_url($url);
379
+
380
+ // we will treat url like '/relative.php' as relative
381
+ if ( empty($components['host']) ) return false;
382
+
383
+ // url host looks exactly like the local host
384
+ if ( strcasecmp($components['host'], $_SERVER['HTTP_HOST']) === 0 ) return false;
385
+
386
+ // check if the url host is a subdomain
387
+ return strrpos(strtolower($components['host']), $_SERVER['HTTP_HOST']) !== strlen($components['host']) - strlen($_SERVER['HTTP_HOST']);
388
+ }
389
+ } // end ampforwp_isexternal
390
+
391
  if(!function_exists('ampforwp_findInternalUrl')){
392
+ function ampforwp_findInternalUrl($url){
393
+ global $redux_builder_amp;
394
+ if(isset($redux_builder_amp['convert-internal-nonamplinks-to-amp']) && ! $redux_builder_amp['convert-internal-nonamplinks-to-amp']){
395
+ return $url;
396
+ }
397
+ $get_skip_meida_path = array();
398
+ $skip_media_extensions = array();
399
+ $get_skip_meida_path = pathinfo($url);
400
+ $skip_media_extensions = array('jpg','jpeg','gif','png');
401
+ if(!in_array($get_skip_meida_path['extension'],$skip_media_extensions)){
402
+ $skip_media_extensions[] = $get_skip_meida_path['extension'];
403
+ }
404
+ $skip_media_extensions = apply_filters( 'ampforwp_internal_links_skip_media', $skip_media_extensions );
405
+
406
+ if(in_array($get_skip_meida_path['extension'],$skip_media_extensions)){
407
+ return $url;
408
+ }
409
+ if($url=='#'){ return $url; }
410
+
411
+ if(!ampforwp_isexternal($url) && ampforwp_is_amp_inURL($url)===false){
412
+ // Skip the URL's that have edit link to it
413
+ $parts = parse_url($url);
414
+ parse_str($parts['query'], $query);
415
+ if ( (isset( $query['action'] ) && $query['action']) || (isset( $query['amp'] ) && $query['amp'] ) ) {
416
+ return $url;
417
+ }
418
+
419
+ $qmarkAmp = (isset($redux_builder_amp['amp-core-end-point']) ? $redux_builder_amp['amp-core-end-point']: false );//amp-core-end-point
420
+ if ( $qmarkAmp ){
421
+ $url = add_query_arg( 'amp', '1', $url);
422
+ return $url;
423
+ }
424
+
425
+ if(strpos($url, "#")!==false){
426
+ $url = explode("#",$url);
427
+ $url = trailingslashit($url[0]).user_trailingslashit(AMPFORWP_AMP_QUERY_VAR).'#'.$url[1];
428
+ }else{
429
+ if ( get_option('permalink_structure') ) {
430
+ if ( strpos($url, "?") && strpos($url, "=") ){
431
+ $url = explode('?', $url);
432
+ $url = ampforwp_url_controller($url[0]).'?'.$url[1];
433
+ }
434
+ else
435
+ $url = ampforwp_url_controller($url);
436
  }
437
  else
438
+ $url = add_query_arg( 'amp', '1', $url );
439
+ }
440
+ return $url;
441
+ }
442
+ return $url;
443
+ }
444
+ } // end ampforwp_findInternalUrl
445
+
 
 
446
  function ampforwp_is_amp_inURL($url){
447
+ $urlArray = explode("/", $url);
448
+ if( !in_array( AMPFORWP_AMP_QUERY_VAR , $urlArray ) ) {
449
+ return false;
450
+ }
451
+ return true;
452
  }
453
 
454
  if(is_admin()){
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: 4.9.5
7
- Stable tag: 0.9.97.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -183,12 +183,20 @@ You can contact us from [here](https://ampforwp.com/contact/)
183
 
184
  == Changelog ==
185
 
 
 
 
 
 
 
 
 
 
186
  = 0.9.97.7 (18th July 2018) =
187
  * Fixed: PageBuilder not loading on frontpage #2360
188
  * Fixed: 500 error on somepages due to open wp_query by other plugins
189
  * Fixed: License key reupdating #2261
190
  * Fixed: AMP renders with ?q after the /amp #2361
191
-
192
 
193
  = 0.9.97.6 (14th July 2018) =
194
  * Fixed: Error and Warning on Structured Data for Logo. #2360
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.97.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
183
 
184
  == Changelog ==
185
 
186
+ = 0.9.97.8 (24th July 2018) =
187
+ * Fixed: AMP renders with ?q after the /amp #2361
188
+ * Fixed: iThemes Sync can not connect to the site. #2380
189
+ * Fixed: H1 to H6 styling is not reflecting in the Swift theme #2383
190
+ * Fixed: Underline on Links function is not working. #2372
191
+ * Fixed: WordPress Admin Color Scheme not applying #2390
192
+ * Fixed: Breadcrumbs are not disabling when the sidebar template is selected #2376
193
+ * Fixed: All the Images are Adding AMP at the End of their URL. #2391
194
+
195
  = 0.9.97.7 (18th July 2018) =
196
  * Fixed: PageBuilder not loading on frontpage #2360
197
  * Fixed: 500 error on somepages due to open wp_query by other plugins
198
  * Fixed: License key reupdating #2261
199
  * Fixed: AMP renders with ?q after the /amp #2361
 
200
 
201
  = 0.9.97.6 (14th July 2018) =
202
  * Fixed: Error and Warning on Structured Data for Logo. #2360
templates/design-manager/swift/single.php CHANGED
@@ -25,7 +25,7 @@
25
  <div class="cntr">
26
  <div class="sp-rl">
27
  <div class="sp-rt">
28
- <div class="cntn-wrp">
29
  <?php amp_content(); ?>
30
  </div>
31
  <?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
@@ -265,7 +265,9 @@ do_action("ampforwp_single_design_type_handle");
265
  <div class="sp-artl">
266
  <div class="sp-left">
267
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
268
- <?php amp_breadcrumb();?>
 
 
269
  <?php amp_categories_list();?>
270
  <?php amp_title(); ?>
271
  <?php if( true == $redux_builder_amp['enable-excerpt-single'] ){ ?>
@@ -282,7 +284,7 @@ do_action("ampforwp_single_design_type_handle");
282
  <div class="sp-cnt">
283
  <div class="sp-rl">
284
  <div class="sp-rt">
285
- <div class="cntn-wrp">
286
  <?php amp_content(); ?>
287
  </div>
288
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
25
  <div class="cntr">
26
  <div class="sp-rl">
27
  <div class="sp-rt">
28
+ <div class="cntn-wrp artl-cnt">
29
  <?php amp_content(); ?>
30
  </div>
31
  <?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
265
  <div class="sp-artl">
266
  <div class="sp-left">
267
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
268
+ <?php if ( true == $redux_builder_amp['ampforwp-bread-crumb'] ) {
269
+ amp_breadcrumb();
270
+ }?>
271
  <?php amp_categories_list();?>
272
  <?php amp_title(); ?>
273
  <?php if( true == $redux_builder_amp['enable-excerpt-single'] ){ ?>
284
  <div class="sp-cnt">
285
  <div class="sp-rl">
286
  <div class="sp-rt">
287
+ <div class="cntn-wrp artl-cnt">
288
  <?php amp_content(); ?>
289
  </div>
290
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
templates/design-manager/swift/style.php CHANGED
@@ -327,6 +327,11 @@ if(isset($redux_builder_amp['amp_font_selector_content_single']) && $redux_build
327
  $fontFamily = "font-family: '".$redux_builder_amp['amp_font_selector_content_single']."';"; }
328
  echo $fontFamily;?>
329
  }
 
 
 
 
 
330
  .tl-exc{font-size: 16px;color: #444;margin-top: 10px;line-height:20px;}
331
  .amp-category span:nth-child(1) {display: none;}
332
  .amp-category span a, .amp-category span{color: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;font-size: 12px;font-weight: 500;text-transform: uppercase;}
@@ -362,26 +367,37 @@ echo $fontFamily;?>
362
  .cntn-wrp{font-size:18px;color:#000;line-height:1.7;}
363
  .sp-artl h1, h2, h3, h4, h5, h6{margin-bottom:5px;}
364
  <?php // H1 - H6 Font Sizes
365
- if($redux_builder_amp['swift_cnt']){
366
- if($redux_builder_amp['swift_cnt_h1']){ ?>
367
  .cntn-wrp h1{font-size:<?php echo $redux_builder_amp['swift_h1_sz']?>;}
368
- <?php } //H1 ends
369
- if($redux_builder_amp['swift_cnt_h2']){ ?>
 
 
370
  .cntn-wrp h2{font-size:<?php echo $redux_builder_amp['swift_h2_sz']?>;}
371
- <?php } //H2 ends
372
- if($redux_builder_amp['swift_cnt_h3']){ ?>
 
 
373
  .cntn-wrp h3{font-size:<?php echo $redux_builder_amp['swift_h3_sz']?>;}
374
- <?php } //H3 ends
375
- if($redux_builder_amp['swift_cnt_h4']){ ?>
 
 
376
  .cntn-wrp h4{font-size:<?php echo $redux_builder_amp['swift_h4_sz']?>;}
377
- <?php } //H4 ends
378
- if($redux_builder_amp['swift_cnt_h5']){ ?>
 
 
379
  .cntn-wrp h5{font-size:<?php echo $redux_builder_amp['swift_h5_sz']?>;}
380
- <?php } //H5 ends
381
- if($redux_builder_amp['swift_cnt_h6']){ ?>
 
 
382
  .cntn-wrp h6{font-size:<?php echo $redux_builder_amp['swift_h6_sz']?>;}
383
- <?php } //H6 ends
384
- } // swift Content Heading Sizes Ends?>
 
 
385
  .cntn-wrp p{margin:0px 0px 30px 0px;}
386
  .sp-rt p strong, .pg p strong{font-weight: 700;}
387
  .srp .amp-related-posts amp-img{float: left;width: 100%;margin: 0px;height:100%;}
327
  $fontFamily = "font-family: '".$redux_builder_amp['amp_font_selector_content_single']."';"; }
328
  echo $fontFamily;?>
329
  }
330
+ <?php if($redux_builder_amp['single-new-features'] && $redux_builder_amp['ampforwp-underline-content-links']){ ?>
331
+ .artl-cnt a{
332
+ text-decoration: underline;
333
+ }
334
+ <?php } // Underline CSS Ends?>
335
  .tl-exc{font-size: 16px;color: #444;margin-top: 10px;line-height:20px;}
336
  .amp-category span:nth-child(1) {display: none;}
337
  .amp-category span a, .amp-category span{color: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;font-size: 12px;font-weight: 500;text-transform: uppercase;}
367
  .cntn-wrp{font-size:18px;color:#000;line-height:1.7;}
368
  .sp-artl h1, h2, h3, h4, h5, h6{margin-bottom:5px;}
369
  <?php // H1 - H6 Font Sizes
370
+ if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h1']){ ?>
 
371
  .cntn-wrp h1{font-size:<?php echo $redux_builder_amp['swift_h1_sz']?>;}
372
+ <?php } else { ?>
373
+ .cntn-wrp h1 {font-size: 32px;}
374
+ <?php } //H1 ends
375
+ if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h2']){ ?>
376
  .cntn-wrp h2{font-size:<?php echo $redux_builder_amp['swift_h2_sz']?>;}
377
+ <?php } else { ?>
378
+ .cntn-wrp h2 {font-size: 27px;}
379
+ <?php } // H2 Ends
380
+ if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h3']){ ?>
381
  .cntn-wrp h3{font-size:<?php echo $redux_builder_amp['swift_h3_sz']?>;}
382
+ <?php } else { ?>
383
+ .cntn-wrp h3 {font-size: 24px;}
384
+ <?php } // H3 Ends
385
+ if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h4']){ ?>
386
  .cntn-wrp h4{font-size:<?php echo $redux_builder_amp['swift_h4_sz']?>;}
387
+ <?php } else { ?>
388
+ .cntn-wrp h4 {font-size: 20px;}
389
+ <?php } // H4 Ends
390
+ if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h5']){ ?>
391
  .cntn-wrp h5{font-size:<?php echo $redux_builder_amp['swift_h5_sz']?>;}
392
+ <?php } else { ?>
393
+ .cntn-wrp h5 {font-size: 17px;}
394
+ <?php } // H5 Ends
395
+ if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h6']){ ?>
396
  .cntn-wrp h6{font-size:<?php echo $redux_builder_amp['swift_h6_sz']?>;}
397
+ <?php } else { ?>
398
+ .cntn-wrp h6 {font-size: 15px;}
399
+ <?php } // H6 Ends
400
+ // swift Content Heading Sizes Ends?>
401
  .cntn-wrp p{margin:0px 0px 30px 0px;}
402
  .sp-rt p strong, .pg p strong{font-weight: 700;}
403
  .srp .amp-related-posts amp-img{float: left;width: 100%;margin: 0px;height:100%;}
templates/features.php CHANGED
@@ -5811,6 +5811,7 @@ if( ! function_exists( 'ampforwp_view_amp_admin_bar' ) ) {
5811
  }
5812
  }
5813
  }
 
5814
  //93. added AMP url purifire for amphtml
5815
  function ampforwp_url_purifier($url){
5816
  global $wp_query,$wp,$redux_builder_amp;
@@ -5824,9 +5825,7 @@ function ampforwp_url_purifier($url){
5824
  $get_permalink_structure = get_option('permalink_structure');
5825
  $checker = $redux_builder_amp['amp-core-end-point'];
5826
  $endpointq = '?' . $endpoint;
5827
-
5828
  if ( empty( $get_permalink_structure ) ) {
5829
-
5830
  if ( is_home() || is_archive() || is_front_page() ) {
5831
  $url = add_query_arg(AMPFORWP_AMP_QUERY_VAR,'1', $url);
5832
  if ( is_home() && get_query_var('page_id') == ampforwp_get_blog_details('id') ) {
@@ -5840,7 +5839,6 @@ function ampforwp_url_purifier($url){
5840
  }
5841
  }
5842
  if ( is_archive() ) {
5843
-
5844
  if ( is_archive() ) {
5845
  $queried_var = 'm';
5846
  }
@@ -5857,18 +5855,6 @@ function ampforwp_url_purifier($url){
5857
  $url = add_query_arg($queried_var,$quried_value, $url);
5858
  //$url = $url .'&'. $queried_var .'='. $quried_value;
5859
  }
5860
- /*if ( is_home() && get_query_var('paged') > 1 ) {
5861
- $quried_value = get_query_var('paged');
5862
- $url = add_query_arg('paged',$quried_value, $url);
5863
- if ( get_query_var('page_id') == ampforwp_get_blog_details('id') ) {
5864
- $quried_value2 = get_query_var('page_id');
5865
- $url = add_query_arg('page_id',$quried_value2, $url);
5866
- }
5867
- }
5868
- elseif ( is_home() && get_query_var('paged') < 1 && get_query_var('page_id') == ampforwp_get_blog_details('id') ) {
5869
- $quried_value2 = get_query_var('page_id');
5870
- $url = add_query_arg('page_id',$quried_value2, $url);
5871
- }*/
5872
  } else {
5873
  if ( is_singular() && true == $checker ) {
5874
  $url = untrailingslashit($url);
@@ -5888,8 +5874,13 @@ function ampforwp_url_purifier($url){
5888
  }
5889
  }
5890
  if ( is_singular() && !empty($_SERVER['QUERY_STRING']) ) {
5891
- $query_arg = wp_parse_args($_SERVER['QUERY_STRING']);
5892
- $url = add_query_arg( $query_arg, $url);
 
 
 
 
 
5893
  }
5894
  return $url;
5895
  }
@@ -7405,4 +7396,14 @@ function ampforwp_check_excerpt(){
7405
  }
7406
 
7407
  return $value;
7408
- }
 
 
 
 
 
 
 
 
 
 
5811
  }
5812
  }
5813
  }
5814
+
5815
  //93. added AMP url purifire for amphtml
5816
  function ampforwp_url_purifier($url){
5817
  global $wp_query,$wp,$redux_builder_amp;
5825
  $get_permalink_structure = get_option('permalink_structure');
5826
  $checker = $redux_builder_amp['amp-core-end-point'];
5827
  $endpointq = '?' . $endpoint;
 
5828
  if ( empty( $get_permalink_structure ) ) {
 
5829
  if ( is_home() || is_archive() || is_front_page() ) {
5830
  $url = add_query_arg(AMPFORWP_AMP_QUERY_VAR,'1', $url);
5831
  if ( is_home() && get_query_var('page_id') == ampforwp_get_blog_details('id') ) {
5839
  }
5840
  }
5841
  if ( is_archive() ) {
 
5842
  if ( is_archive() ) {
5843
  $queried_var = 'm';
5844
  }
5855
  $url = add_query_arg($queried_var,$quried_value, $url);
5856
  //$url = $url .'&'. $queried_var .'='. $quried_value;
5857
  }
 
 
 
 
 
 
 
 
 
 
 
 
5858
  } else {
5859
  if ( is_singular() && true == $checker ) {
5860
  $url = untrailingslashit($url);
5874
  }
5875
  }
5876
  if ( is_singular() && !empty($_SERVER['QUERY_STRING']) ) {
5877
+ $query_arg = wp_parse_args($_SERVER['QUERY_STRING']);
5878
+ $query_name = $wp_query->query['name'];
5879
+ if(strpos($_SERVER['QUERY_STRING'],$query_name) && (isset($query_arg['q']) && strpos($query_arg['q'],$query_name))){
5880
+ unset($query_arg['q']);
5881
+ }
5882
+
5883
+ $url = add_query_arg( $query_arg, $url);
5884
  }
5885
  return $url;
5886
  }
7396
  }
7397
 
7398
  return $value;
7399
+ }
7400
+
7401
+ // Get Settings from Redux #2177
7402
+ function ampforwp_get_setting( $opt_name='' ){
7403
+ global $redux_builder_amp;
7404
+ $opt_value = '';
7405
+ if ( isset($redux_builder_amp[$opt_name]) ) {
7406
+ $opt_value = $redux_builder_amp[$opt_name];
7407
+ }
7408
+ return $opt_value;
7409
+ }