AMP for WP – Accelerated Mobile Pages - Version 0.9.97.19

Version Description

(4th October 2018) = * Fixed: Tables overflow not working in swift theme #2392 * Fixed: Null check added to fix null reference exception #2526 * Fixed: Minor Bug related with menu

Download this release

Release Info

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

Code changes from version 0.9.97.18 to 0.9.97.19

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.8
7
- Stable tag: 0.9.97.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -183,6 +183,14 @@ You can contact us from [here](https://ampforwp.com/contact/)
183
 
184
  == Changelog ==
185
 
 
 
 
 
 
 
 
 
186
  = 0.9.97.17 (28th September 2018) =
187
  * Added: Featured Slider "Tag" support #954
188
  * Added: Marfeel plugin is blocking Internal pages of AMP and rendering 503 error #2423
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 4.9.8
7
+ Stable tag: 0.9.97.19
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.19 (4th October 2018) =
187
+ * Fixed: Tables overflow not working in swift theme #2392
188
+ * Fixed: Null check added to fix null reference exception #2526
189
+ * Fixed: Minor Bug related with menu
190
+
191
+ = 0.9.97.18 (29th September 2018) =
192
+ * Fixed: Minor Bug related with menu
193
+
194
  = 0.9.97.17 (28th September 2018) =
195
  * Added: Featured Slider "Tag" support #954
196
  * Added: Marfeel plugin is blocking Internal pages of AMP and rendering 503 error #2423
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.18
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','0.9.97.18');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
@@ -733,6 +733,9 @@ require_once( AMP_FRAMEWORK_COMOPNENT_DIR_PATH . '/components-core.php' );
733
  require_once( AMPFORWP_PLUGIN_DIR. 'pagebuilder/amp-page-builder.php' );
734
  require_once( AMPFORWP_PLUGIN_DIR. 'base_remover/base_remover.php' );
735
  require_once( AMPFORWP_PLUGIN_DIR. 'includes/thirdparty-compatibility.php' );
 
 
 
736
  require ( AMPFORWP_PLUGIN_DIR.'/install/index.php' );
737
 
738
  /**
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.19
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','0.9.97.19');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
733
  require_once( AMPFORWP_PLUGIN_DIR. 'pagebuilder/amp-page-builder.php' );
734
  require_once( AMPFORWP_PLUGIN_DIR. 'base_remover/base_remover.php' );
735
  require_once( AMPFORWP_PLUGIN_DIR. 'includes/thirdparty-compatibility.php' );
736
+ if(is_admin()){
737
+ require_once( AMPFORWP_PLUGIN_DIR. '/includes/modules-upgrade.php');
738
+ }
739
  require ( AMPFORWP_PLUGIN_DIR.'/install/index.php' );
740
 
741
  /**
classes/class-ampforwp-walker-nav-menu.php CHANGED
@@ -29,7 +29,7 @@
29
  $classes = empty( $item->classes ) ? array() : (array) $item->classes;
30
  $classes[] = 'menu-item-' . $item->ID;
31
 
32
- $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
33
  $class_names = ' class="' . esc_attr( $class_names ) . '"';
34
 
35
  $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
29
  $classes = empty( $item->classes ) ? array() : (array) $item->classes;
30
  $classes[] = 'menu-item-' . $item->ID;
31
 
32
+ $class_names = join( ' ', apply_filters( 'ampforwp_nav_menu_css_class', array_filter( $classes ), $item, $args ) );
33
  $class_names = ' class="' . esc_attr( $class_names ) . '"';
34
 
35
  $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
components/menu/menu.php CHANGED
@@ -9,7 +9,7 @@ function amp_menu_html($echo){
9
  'menu'=>'ul',
10
  'menu_class'=>'amp-menu',
11
  'echo' => false,
12
- // 'walker' => new Ampforwp_Walker_Nav_Menu()
13
  ) );
14
  $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
15
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
9
  'menu'=>'ul',
10
  'menu_class'=>'amp-menu',
11
  'echo' => false,
12
+ 'walker' => new Ampforwp_Walker_Nav_Menu()
13
  ) );
14
  $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
15
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
includes/admin-script.js CHANGED
@@ -601,4 +601,69 @@ var redux_title_modify = function(){
601
 
602
  function getQueryStringValue (key) {
603
  return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1"));
604
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
601
 
602
  function getQueryStringValue (key) {
603
  return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1"));
604
+ }
605
+
606
+
607
+ jQuery(document).ready(function($){
608
+
609
+ $('.ampforwp-activation-call-module-upgrade').click(function(){
610
+ if(pagenow == 'toplevel_page_amp_options' && $(this).hasClass('ampforwp-activation-call-module-upgrade')){// Check for current page
611
+ var self = $(this);
612
+ self.addClass('updating-message').removeClass('div.update-message');
613
+ var activate = '';
614
+ if($(this).attr('id')=='ampforwp-pwa-activation-call'){
615
+ activate = '&activate=pwa';
616
+ }else if($(this).attr('id')=='ampforwp-structure-data-activation-call'){
617
+ activate = '&activate=structure_data';
618
+ }
619
+ self.find('p').text('Updating...');
620
+ $.ajax({
621
+ url: ajaxurl,
622
+ type: 'post',
623
+ data: 'action=ampforwp_enable_modules_upgread'+activate,
624
+ dataType: 'json',
625
+ success: function (response){
626
+ if(response.status==200){
627
+ self.removeClass('update-message updating-message')
628
+ self.addClass('updated-message');
629
+ var msgplug = '';
630
+ if(self.attr('id')=='ampforwp-pwa-activation-call'){
631
+ msgplug = 'PWA';
632
+ }else if(self.attr('id')=='ampforwp-structure-data-activation-call'){
633
+ msgplug = 'Structure Data';
634
+ }
635
+ self.find('p').html('<a href="'+response.redirect_url+'">Installed! - Let\'s Go to '+msgplug+' Settings</a>')
636
+ self.removeClass('ampforwp-activation-call-module-upgrade');
637
+ }else{
638
+ alert(response.message)
639
+ }
640
+
641
+ }
642
+ });
643
+
644
+ }
645
+ });
646
+ //import default Settings
647
+ $("#finalized-import-structure-data-from-amp").click(function(){
648
+ var self = $(this);
649
+ self.text("please wait...");
650
+ $.ajax({
651
+ url : ajaxurl,
652
+ method : "POST",
653
+ dataType: 'json',
654
+ data: {
655
+ action: "ampforwp_import_structure_data",
656
+ from: 'ampforwp_basic_settings'
657
+ },
658
+ success: function(data){
659
+ console.log(data);
660
+ if(data.status==200){
661
+ self.text("Migration completed please wait...");
662
+ location.reload();
663
+ }else{
664
+ alert(data.message)
665
+ }
666
+ }
667
+ });
668
+ });
669
+ });//(document).ready Closed
includes/admin-style.css CHANGED
@@ -721,4 +721,99 @@ visibility: hidden;
721
  }
722
  span.switch-text {
723
  margin-left: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
724
  }
721
  }
722
  span.switch-text {
723
  margin-left: 5px;
724
+ }
725
+ #redux_builder_amp-ampforwp_pwa_module .redux_field_th{
726
+ padding: 0px 20% 0px 10px !important;
727
+ float: left; top: 5px;
728
+ position: relative;
729
+ }
730
+ .ampforwp-st-data-update{
731
+ color: #000;
732
+ font-size: 16px;
733
+ }
734
+ .ampforwp-st-data-update .row{width: 100%; font-size: 12px;}
735
+ .ampforwp-st-data-update .col-3{
736
+ width: 45%;
737
+ float: left;
738
+ font-size: 14px;
739
+ color: #333;}
740
+ .ampforwp-st-data-update .col-1{width: 30%;float: left;}
741
+ .ampforwp-st-data-update .col-3 li:before {
742
+ content: "\f147";
743
+ font-family: dashicons;
744
+ position: relative;
745
+ top: 1px;
746
+ left: -2px;
747
+ color: #4CAF50;
748
+ }
749
+ .ampforwp-recommendation-btn{
750
+ color: #555;
751
+ border-color: #ccc;
752
+ background: #f7f7f7;
753
+ box-shadow: 0 1px 0 #ccc;
754
+ vertical-align: top;
755
+ display: inline-block;
756
+ text-decoration: none;
757
+ font-size: 13px;
758
+ line-height: 26px;
759
+ height: 32px;
760
+ margin: 0;
761
+ padding: 1px 12px 1px 8px;
762
+ cursor: pointer;
763
+ border-width: 1px;
764
+ border-style: solid;
765
+ -webkit-appearance: none;
766
+ border-radius: 3px;
767
+ white-space: nowrap;
768
+ box-sizing: border-box;
769
+ }
770
+ .ampforwp-recommendation-btn .update-message p:before{
771
+
772
+ position: absolute;
773
+ top: 5px;
774
+ font-size: 18px;
775
+
776
+ }
777
+ .ampforwp-recommendation-btn p:before{
778
+ margin-right: 4px; content: "\f463"
779
+ }
780
+ .ampforwp-recommendation-btn.updated-message p:before{
781
+ color:#79ba49;
782
+ content: '\f147';
783
+ left: -3px;
784
+ position: relative;
785
+ font-size: 26px;
786
+ top: -1px;
787
+ }
788
+ .ampforwp-recommendation-btn .button-link{
789
+ padding-left:6px;
790
+ top: 0;
791
+ text-decoration: none;
792
+ font-size: 14px;
793
+ top: 4px;
794
+ letter-spacing: 0px;
795
+ color: #2c2c2c;
796
+ }
797
+ .ampforwp-recommendation-btn a{
798
+ text-decoration: none;
799
+ color: #333;
800
+ }
801
+ .ampforwp-recommendation-btn:active{
802
+ background: #eee;
803
+ border-color: #999;
804
+ box-shadow: inset 0 2px 5px -3px rgba(0,0,0,.5);
805
+ -webkit-transform: translateY(1px);
806
+ transform: translateY(1px);
807
+ }
808
+ #section-ampforwp-sd_modules_section h3{
809
+ background:#FFF9C4 !important
810
+ }
811
+ .amp_recommend_learnmore {
812
+ position: relative;
813
+ font-size: 14px;
814
+ top: 7px;
815
+ left: 12px;
816
+ }
817
+ #finalized-import-structure-data-from-amp{
818
+ margin-left:8px;vertical-align: baseline
819
  }
includes/modules-upgrade.php ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly.
3
+ if ( ! defined( 'ABSPATH' ) ) exit;
4
+ function ampforwp_enable_plugins_modules($plugins)
5
+ {
6
+ $args = array(
7
+ 'path' => ABSPATH.'wp-content/plugins/',
8
+ 'preserve_zip' => false
9
+ );
10
+ foreach($plugins as $plugin)
11
+ {
12
+ $is_downloaded = ampforwp_plugin_download($plugin['path'], $args['path'].$plugin['name'].'.zip');
13
+ if($is_downloaded){
14
+ ampforwp_plugin_unpack($args, $args['path'].$plugin['name'].'.zip');
15
+ ampforwp_plugin_activate($plugin['install']);
16
+ }
17
+ }
18
+ }
19
+ function ampforwp_plugin_download($url, $path)
20
+ {
21
+
22
+ $response = wp_remote_get( $url );
23
+ if ( is_array( $response ) ) {
24
+ $body = $response['body']; // use the content
25
+ if(file_put_contents($path, $body))
26
+ return true;
27
+ else
28
+ return false;
29
+ }else{
30
+ return false;
31
+ }
32
+ }
33
+ function ampforwp_plugin_unpack($args, $target)
34
+ {
35
+ if($zip = zip_open($target))
36
+ {
37
+ while($entry = zip_read($zip)){
38
+ $is_file = substr(zip_entry_name($entry), -1) == '/' ? false : true;
39
+ $file_path = $args['path'].zip_entry_name($entry);
40
+ if($is_file){
41
+ if(zip_entry_open($zip,$entry,"r")){
42
+ $fstream = zip_entry_read($entry, zip_entry_filesize($entry));
43
+ file_put_contents($file_path, $fstream );
44
+ chmod($file_path, 0777);
45
+ }
46
+ zip_entry_close($entry);
47
+ }
48
+ else{
49
+ if(zip_entry_name($entry)){
50
+ mkdir($file_path);
51
+ chmod($file_path, 0777);
52
+ }
53
+ }
54
+ }
55
+ zip_close($zip);
56
+ }
57
+ if($args['preserve_zip'] === false)
58
+ {
59
+ unlink($target);
60
+ }
61
+ }
62
+ function ampforwp_plugin_activate($installer)
63
+ {
64
+ $current = get_option('active_plugins');
65
+ $plugin = plugin_basename(trim($installer));
66
+ if(!in_array($plugin, $current))
67
+ {
68
+ $current[] = $plugin;
69
+ sort($current);
70
+ do_action('activate_plugin', trim($plugin));
71
+ update_option('active_plugins', $current);
72
+ do_action('activate_'.trim($plugin));
73
+ do_action('activated_plugin', trim($plugin));
74
+ return true;
75
+ }
76
+ else{
77
+ return false;
78
+ }
79
+ }
80
+ add_action('wp_ajax_ampforwp_enable_modules_upgread', 'ampforwp_enable_modules_upgread');
81
+ function ampforwp_enable_modules_upgread(){
82
+ $plugins = array();
83
+ $redirectSettingsUrl = '';
84
+ $currentActivateModule = $_REQUEST['activate'];
85
+ switch($currentActivateModule){
86
+ case 'pwa':
87
+ $plugins[] = array(
88
+ 'name' => 'pwa-for-wp',
89
+ 'path' => 'https://downloads.wordpress.org/plugin/pwa-for-wp.zip',
90
+ 'install' => 'pwa-for-wp/pwa-for-wp.php',
91
+ );
92
+ $redirectSettingsUrl = admin_url('admin.php?page=pwaforwp&reference=ampforwp');
93
+ break;
94
+ case 'structure_data':
95
+ $plugins[] = array(
96
+ 'name' => 'schema-and-structured-data-for-wp',
97
+ 'path' => 'https://downloads.wordpress.org/plugin/schema-and-structured-data-for-wp.zip',
98
+ 'install' => 'schema-and-structured-data-for-wp/structured-data-for-wp.php',
99
+ );
100
+ $redirectSettingsUrl = admin_url('admin.php?page=structured_data_options&tab=general&reference=ampforwp');
101
+ break;
102
+ default:
103
+ $plugins = array();
104
+ break;
105
+ }
106
+ if(count($plugins)>0){
107
+ ampforwp_enable_plugins_modules($plugins);
108
+ //Do's After Activation of plugins
109
+ if($currentActivateModule=='structure_data'){
110
+ ampforwp_import_structure_data();
111
+ }
112
+ echo json_encode( array( "status"=>200, "message"=>"Module successfully Added",'redirect_url'=>$redirectSettingsUrl ) );
113
+ }else{
114
+ echo json_encode(array("status"=>300, "message"=>"Modules not Found"));
115
+ }
116
+ wp_die();
117
+ }
118
+
119
+
120
+ function ampforwp_admin_notice_module_reference_install() {
121
+ $reference = isset($_GET['reference']) ? $_GET['reference'] : '';
122
+ $page = isset($_GET['page']) ? $_GET['page'] : '';
123
+ $message = '';
124
+ if($reference=='ampforwp'){
125
+ switch( $page ){
126
+ case 'pwaforwp':
127
+ $message = 'AMPforWP PWA Module has been activated. You may configure it below:';
128
+ break;
129
+ case 'structured_data_options':
130
+ $message = 'AMPforWP Structured data Module has been Upgraded. You may configure it below:';
131
+ break;
132
+ }
133
+ }
134
+ if($message){ ?>
135
+ <div class="notice notice-success is-dismissible">
136
+ <p><?php echo esc_html( $message, 'accelerated-mobile-pages' ); ?></p>
137
+ </div>
138
+ <?php }
139
+ }
140
+ add_action( 'admin_notices', 'ampforwp_admin_notice_module_reference_install' );
141
+
142
+
143
+
144
+
145
+ /**
146
+ * Finish setub and Import default settings
147
+ *
148
+ */
149
+ //On module upgrade
150
+ function ampforwp_import_structure_data(){
151
+ global $redux_builder_amp;
152
+ if(get_option('ampforwp_structure_data_module_upgrade')=='migrated'){
153
+ return false;
154
+ }
155
+ $sd_data_update = array();
156
+ //Structure Data
157
+ $sd_data_update['sd-data-logo-ampforwp'] = $redux_builder_amp['amp-structured-data-logo'];
158
+ $sd_data_update['saswp-logo-width'] = $redux_builder_amp['ampforwp-sd-logo-width'];
159
+ $sd_data_update['saswp-logo-height'] = $redux_builder_amp['ampforwp-sd-logo-height'];
160
+ $sd_data_update['saswp-logo-dimensions'] = ($redux_builder_amp['ampforwp-sd-logo-width'] && $redux_builder_amp['ampforwp-sd-logo-height']) ? 1: 0;
161
+ $sd_data_update['sd_default_image'] = $redux_builder_amp['amp-structured-data-placeholder-image'];
162
+ $sd_data_update['sd_default_image_width'] = $redux_builder_amp['amp-structured-data-placeholder-image-width'];
163
+ $sd_data_update['sd_default_image_height'] = $redux_builder_amp['amp-structured-data-placeholder-image-height'];
164
+ $sd_data_update['sd_default_video_thumbnail'] = $redux_builder_amp['amporwp-structured-data-video-thumb-url'];
165
+ $sd_data_update['saswp-for-amp'] = 1;
166
+ $sd_data_update['saswp-for-wordpress'] = 0;
167
+ $ampforwp_sd_type_posts = $redux_builder_amp['ampforwp-sd-type-posts'];
168
+ $ampforwp_sd_type_pages = $redux_builder_amp['ampforwp-sd-type-pages'];
169
+
170
+ $postarr = array(
171
+ 'post_type'=>'saswp',
172
+ 'post_title'=>'Page (Migrated from AMPforWP)',
173
+ 'post_status'=>'publish',
174
+ );
175
+ $insertedPageId = wp_insert_post( $postarr );
176
+ if($insertedPageId){
177
+ $post_data_array = array(
178
+ array(
179
+ 'key_1'=>'post_type',
180
+ 'key_2'=>'equal',
181
+ 'key_3'=>'page',
182
+ )
183
+ );
184
+ if(defined('SASWP_VERSION') && version_compare(SASWP_VERSION,'1.0.2', '>=')){
185
+ $post_data_array = array();
186
+ $post_data_array['group-0'] =array(
187
+ 'data_array' => array(
188
+ array(
189
+ 'key_1' => 'post_type',
190
+ 'key_2' => 'equal',
191
+ 'key_3' => 'page',
192
+ )
193
+ )
194
+ );
195
+ }
196
+
197
+ $schema_options_array = array('isAccessibleForFree'=>False,'notAccessibleForFree'=>0,'paywall_class_name'=>'');
198
+ update_post_meta( $insertedPageId, 'data_array', $post_data_array);
199
+ update_post_meta( $insertedPageId, 'schema_type', $ampforwp_sd_type_pages);
200
+ update_post_meta( $insertedPageId, 'schema_options', $schema_options_array);
201
+ }
202
+ $postarr = array(
203
+ 'post_type'=>'saswp',
204
+ 'post_title'=>'Post (Migrated from AMPforWP)',
205
+ 'post_status'=>'publish',
206
+ );
207
+ $insertedPageId = wp_insert_post( $postarr );
208
+ if($insertedPageId){
209
+ $post_data_array = array(
210
+ array(
211
+ 'key_1'=>'post_type',
212
+ 'key_2'=>'equal',
213
+ 'key_3'=>'post',
214
+ )
215
+ );
216
+ if(defined('SASWP_VERSION') && version_compare(SASWP_VERSION,'1.0.2', '>=')){
217
+ $post_data_array = array();
218
+ $post_data_array['group-0'] =array(
219
+ 'data_array' => array(
220
+ array(
221
+ 'key_1' => 'post_type',
222
+ 'key_2' => 'equal',
223
+ 'key_3' => 'post',
224
+ )
225
+ )
226
+ );
227
+ }
228
+ $schema_options_array = array('isAccessibleForFree'=>False,'notAccessibleForFree'=>0,'paywall_class_name'=>'');
229
+ update_post_meta( $insertedPageId, 'data_array', $post_data_array);
230
+ update_post_meta( $insertedPageId, 'schema_type', $ampforwp_sd_type_posts);
231
+ update_post_meta( $insertedPageId, 'schema_options', $schema_options_array);
232
+ }
233
+
234
+ update_option('sd_data', $sd_data_update);
235
+ update_option('ampforwp_structure_data_module_upgrade','migrated');
236
+ return true;
237
+ }
includes/options/admin-config.php CHANGED
@@ -34,7 +34,7 @@ $extension_listing_array = array(
34
  'name'=>'ADS for WP',
35
  'desc'=>'A Revolutionary way of adding ADS in your WordPress',
36
  'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
37
- 'price'=>'$29',
38
  'url_link'=>'http://ampforwp.com/ads-for-wp/#utm_source=options-panel&utm_medium=extension-tab_advanced-amp-ads&utm_campaign=AMP%20Plugin',
39
  'plugin_active_path'=> 'ads-for-wp/ads-for-wp.php',
40
  'item_name'=>'ADS for WP',
@@ -284,6 +284,17 @@ $extension_listing_array = array(
284
  'is_activated'=>(is_plugin_active('amp-stories/ampforwp-stories.php')? 1 : 2),
285
  'settingUrl'=>admin_url( 'edit.php?post_type=ampforwp_story' ),
286
  ),
 
 
 
 
 
 
 
 
 
 
 
287
  array(
288
  'name'=>'Structured Data for WP',
289
  'desc'=>'Structured Data for your site and for AMP',
@@ -1993,6 +2004,41 @@ Redux::setArgs( "redux_builder_amp", $args );
1993
  );
1994
 
1995
  // Performance SECTION
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1996
  Redux::setSection( $opt_name, array(
1997
  'title' => __( 'Performance', 'accelerated-mobile-pages' ),
1998
  'id' => 'amp-performance',
@@ -2536,7 +2582,50 @@ function ampforwp_add_sd_fields($fields){
2536
  return $fields;
2537
  }
2538
  else {
2539
- $fields[] = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2540
  'id' => 'ampforwp-sd_1',
2541
  'type' => 'section',
2542
  'title' => __('Schema & Structured Data', 'accelerated-mobile-pages'),
@@ -2544,94 +2633,102 @@ function ampforwp_add_sd_fields($fields){
2544
  'layout_type' => 'accordion',
2545
  'accordion-open'=> 1,
2546
  );
2547
- $fields[] = array(
2548
- 'id' => 'ampforwp-sd-type-posts',
2549
- 'type' => 'select',
2550
- 'title' => __('Posts', 'accelerated-mobile-pages'),
2551
- 'tooltip-subtitle' => __('Select the Structured Data Type for Posts', 'accelerated-mobile-pages'),
2552
- 'options' => ampforwp_get_sd_types(),
2553
- 'default' => 'BlogPosting',
2554
- );
2555
- $fields[] = array(
2556
- 'id' => 'ampforwp-sd-type-pages',
2557
- 'type' => 'select',
2558
- 'title' => __('Pages', 'accelerated-mobile-pages'),
2559
- 'tooltip-subtitle' => __('Select the Structured Data Type for Pages', 'accelerated-mobile-pages'),
2560
- 'options' => ampforwp_get_sd_types(),
2561
- 'default' => 'BlogPosting',
2562
- );
2563
- $fields[] = array(
2564
- 'id' => 'ampforwp-sd_2',
2565
- 'type' => 'section',
2566
- 'title' => __('Default Values Setup', 'accelerated-mobile-pages'),
2567
- 'indent' => true,
2568
- 'layout_type' => 'accordion',
2569
- 'accordion-open'=> 1,
2570
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2571
 
2572
- $fields[] = array(
2573
- 'id' => 'amp-structured-data-logo',
2574
- 'type' => 'media',
2575
- 'url' => true,
2576
- 'title' => __('Default Structured Data Logo', 'accelerated-mobile-pages'),
2577
- 'tooltip-subtitle' => __('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
2578
- );
2579
- $fields[] = array(
2580
- 'id' => 'ampforwp-sd-logo-dimensions',
2581
- 'title' => __('Custom Logo Size', 'accelerated-mobile-pages'),
2582
- 'type' => 'switch',
2583
- 'default' => 0,
2584
- );
2585
- $fields[] = array(
2586
- 'class'=>'child_opt child_opt_arrow',
2587
- 'id' => 'ampforwp-sd-logo-width',
2588
- 'type' => 'text',
2589
- 'title' => __('Logo Width', 'accelerated-mobile-pages'),
2590
- 'tooltip-subtitle' => __('Default width is 600 pixels', 'accelerated-mobile-pages'),
2591
- 'default' => '600',
2592
- 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
2593
- );
2594
- $fields[] = array(
2595
- 'class'=>'child_opt',
2596
- 'id' => 'ampforwp-sd-logo-height',
2597
- 'type' => 'text',
2598
- 'title' => __('Logo Height', 'accelerated-mobile-pages'),
2599
- 'tooltip-subtitle' => __('Default height is 60 pixels', 'accelerated-mobile-pages'),
2600
- 'default' => '60',
2601
- 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
2602
- );
2603
- $fields[] = array(
2604
- 'id' => 'amp-structured-data-placeholder-image',
2605
- 'type' => 'media',
2606
- 'url' => true,
2607
- 'title' => __('Default Post Image', 'accelerated-mobile-pages'),
2608
- 'tooltip-subtitle' => __('Upload the Image you want to show as Placeholder Image.', 'accelerated-mobile-pages'),
2609
- 'placeholder' => __('when there is no featured image set in the post','accelerated-mobile-pages'),
2610
- );
2611
- $fields[] = array(
2612
- 'id' => 'amp-structured-data-placeholder-image-width',
2613
- 'title' => __('Default Post Image Width', 'accelerated-mobile-pages'),
2614
- 'type' => 'text',
2615
- 'placeholder' => '550',
2616
- 'tooltip-subtitle' => __('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
2617
- 'default' => '700'
2618
- );
2619
- $fields[] = array(
2620
- 'id' => 'amp-structured-data-placeholder-image-height',
2621
- 'title' => __('Default Post Image Height', 'accelerated-mobile-pages'),
2622
- 'type' => 'text',
2623
- 'placeholder' => '350',
2624
- 'tooltip-subtitle' => __('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
2625
- 'default' => '550'
2626
- );
2627
- $fields[] = array(
2628
- 'id' => 'amporwp-structured-data-video-thumb-url',
2629
- 'type' => 'media',
2630
- 'url' => true,
2631
- 'title' => __('Default Thumbnail for VideoObject', 'accelerated-mobile-pages'),
2632
- 'tooltip-subtitle' => __('Upload the Thumbnail you want to show as Video Thumbnail.', 'accelerated-mobile-pages'),
2633
- 'placeholder' => __('When there is no thumbnail set for the video','accelerated-mobile-pages'),
2634
- );
2635
  return $fields;
2636
  }
2637
  }
@@ -2639,6 +2736,7 @@ function ampforwp_add_sd_fields($fields){
2639
  Redux::setSection( $opt_name, array(
2640
  'title' => __( 'Structured Data', 'accelerated-mobile-pages' ),
2641
  'id' => 'opt-structured-data',
 
2642
  'subsection' => true,
2643
  'fields' => apply_filters('ampforwp_sd_custom_fields', $fields = array()
2644
  ),
@@ -2650,7 +2748,6 @@ function ampforwp_add_sd_fields($fields){
2650
  'title' => __( 'Notice Bar & GDPR', 'accelerated-mobile-pages' ),
2651
  'desc' => $cta_desc ,
2652
  'id' => 'amp-notifications',
2653
- 'class' => 'ampforwp_new_features ',
2654
  'subsection' => true,
2655
  'fields' => array(
2656
  array(
34
  'name'=>'ADS for WP',
35
  'desc'=>'A Revolutionary way of adding ADS in your WordPress',
36
  'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
37
+ 'price'=>'Free',
38
  'url_link'=>'http://ampforwp.com/ads-for-wp/#utm_source=options-panel&utm_medium=extension-tab_advanced-amp-ads&utm_campaign=AMP%20Plugin',
39
  'plugin_active_path'=> 'ads-for-wp/ads-for-wp.php',
40
  'item_name'=>'ADS for WP',
284
  'is_activated'=>(is_plugin_active('amp-stories/ampforwp-stories.php')? 1 : 2),
285
  'settingUrl'=>admin_url( 'edit.php?post_type=ampforwp_story' ),
286
  ),
287
+ array(
288
+ 'name'=>'Shortcode Ultimate',
289
+ 'desc'=>'This is an extension of Shortcode Ultimate plugin for AMP Compatibility',
290
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/cache-icon.png',
291
+ 'price'=>'$19',
292
+ 'url_link'=>'https://ampforwp.com/shortcodes-ultimate/#utm_source=options-panel&utm_medium=extension-tab_shortcodes_ultimate&utm_campaign=AMP%20Plugin',
293
+ 'plugin_active_path'=> 'shortcodes-ultimate-for-amp/shortcode-ultimate-for-amp.php',
294
+ 'item_name'=>'Shortcode Ultimate',
295
+ 'store_url'=>'https://accounts.ampforwp.com',
296
+ 'is_activated'=>(is_plugin_active('shortcodes-ultimate-for-amp/shortcode-ultimate-for-amp.php')? 1 : 2),
297
+ ),
298
  array(
299
  'name'=>'Structured Data for WP',
300
  'desc'=>'Structured Data for your site and for AMP',
2004
  );
2005
 
2006
  // Performance SECTION
2007
+ Redux::setSection( $opt_name, array(
2008
+ 'title' => __( 'PWA', 'accelerated-mobile-pages' ),
2009
+ 'id' => 'pwa-for-wp',
2010
+ 'desc' => '',
2011
+ 'subsection' => true,
2012
+ 'class' => 'ampforwp_new_features ',
2013
+ 'fields' => array(
2014
+ array(
2015
+ 'id' => 'ampforwp-pwa-for-wp',
2016
+ 'type' => 'section',
2017
+ 'title' => __('Progressive Web App (PWA)', 'accelerated-mobile-pages'),
2018
+ 'indent' => true,
2019
+ 'layout_type' => 'accordion',
2020
+ 'accordion-open'=> 1,
2021
+ ),
2022
+
2023
+ array(
2024
+ 'id' => 'ampforwp_pwa_module',
2025
+ 'type' => 'raw',
2026
+ 'title' => __('PWA Support', 'accelerated-mobile-pages'),
2027
+ 'content' => (!is_plugin_active('pwa-for-wp/pwa-for-wp.php')?
2028
+ '<div class="ampforwp-recommendation-btn update-message ampforwp-modules ampforwp-activation-call-module-upgrade " id="ampforwp-pwa-activation-call"> <p>Activate this Module</p></div>'
2029
+ : '<div class="col-wrapper">
2030
+ <a href="'.admin_url('admin.php?page=pwaforwp&reference=ampforwp').'"> <div class="ampforwp-recommendation-btn updated-message"><p>Go to PWA Settings</p></div> </a>
2031
+ </div>
2032
+ ').'<a class="amp_recommend_learnmore" href="https://ampforwp.com/tutorials/article/what-is-pwa-for-wp-and-why-its-included-in-the-amp/" target="_blank">Learn more</a>'
2033
+ ),
2034
+
2035
+ )
2036
+
2037
+ )
2038
+
2039
+ );
2040
+
2041
+ // Performance SECTION
2042
  Redux::setSection( $opt_name, array(
2043
  'title' => __( 'Performance', 'accelerated-mobile-pages' ),
2044
  'id' => 'amp-performance',
2582
  return $fields;
2583
  }
2584
  else {
2585
+
2586
+ $fields[] = array(
2587
+ 'id' => 'ampforwp-sd_modules_section',
2588
+ 'type' => 'section',
2589
+ 'title' => __('Structured Data has been Improved!', 'accelerated-mobile-pages'),
2590
+ 'indent' => true,
2591
+ 'layout_type' => 'accordion',
2592
+ 'accordion-open'=> 1,
2593
+ );
2594
+ $fields[] = array(
2595
+ 'id' => 'ampforwp-sd-module',
2596
+ 'type' => 'raw',
2597
+ 'content' => '<div class="ampforwp-st-data-update">
2598
+ '.(!is_plugin_active('schema-and-structured-data-for-wp/structured-data-for-wp.php')? 'New Update available for Structured data:': 'Thank you for upgrading the Structured data').'
2599
+ <div class="row">
2600
+
2601
+ '.(!is_plugin_active('schema-and-structured-data-for-wp/structured-data-for-wp.php')? '
2602
+ <div class="col-3"><ul>
2603
+ <li>Add Unlimited Schemas</li>
2604
+ <li>New Schema Types</li>
2605
+ <li>Advanced Structured data options</li>
2606
+ </ul> </div>' : '')
2607
+ .'
2608
+ <div class="col-1">
2609
+ '.(!is_plugin_active('schema-and-structured-data-for-wp/structured-data-for-wp.php')?
2610
+ '
2611
+ <div class="ampforwp-recommendation-btn update-message ampforwp-modules ampforwp-activation-call-module-upgrade " id="ampforwp-structure-data-activation-call">
2612
+ <p>Upgrade for Free</p>
2613
+ </div>' :
2614
+ '<a href="'.admin_url('admin.php?page=structured_data_options&tab=general&reference=ampforwp').'"><div class="ampforwp-recommendation-btn updated-message"><p>Go to Structure Data settings</p></div></a>'
2615
+ )
2616
+ .'
2617
+ &nbsp;<a href="https://ampforwp.com/tutorials/article/what-is-the-structured-data-update-all-about/" class="amp_recommend_learnmore" target="_blank">Learn more</a>
2618
+ </div>
2619
+ </div>'
2620
+
2621
+ );
2622
+
2623
+
2624
+
2625
+
2626
+
2627
+ if( !is_plugin_active('schema-and-structured-data-for-wp/structured-data-for-wp.php') ) {
2628
+ $fields[] = array(
2629
  'id' => 'ampforwp-sd_1',
2630
  'type' => 'section',
2631
  'title' => __('Schema & Structured Data', 'accelerated-mobile-pages'),
2633
  'layout_type' => 'accordion',
2634
  'accordion-open'=> 1,
2635
  );
2636
+ $fields[] = array(
2637
+ 'id' => 'ampforwp-sd-type-posts',
2638
+ 'type' => 'select',
2639
+ 'title' => __('Posts', 'accelerated-mobile-pages'),
2640
+ 'tooltip-subtitle' => __('Select the Structured Data Type for Posts', 'accelerated-mobile-pages'),
2641
+ 'options' => ampforwp_get_sd_types(),
2642
+ 'default' => 'BlogPosting',
2643
+ );
2644
+ $fields[] = array(
2645
+ 'id' => 'ampforwp-sd-type-pages',
2646
+ 'type' => 'select',
2647
+ 'title' => __('Pages', 'accelerated-mobile-pages'),
2648
+ 'tooltip-subtitle' => __('Select the Structured Data Type for Pages', 'accelerated-mobile-pages'),
2649
+ 'options' => ampforwp_get_sd_types(),
2650
+ 'default' => 'BlogPosting',
2651
+ );
2652
+ $fields[] = array(
2653
+ 'id' => 'ampforwp-sd_2',
2654
+ 'type' => 'section',
2655
+ 'title' => __('Default Values Setup', 'accelerated-mobile-pages'),
2656
+ 'indent' => true,
2657
+ 'layout_type' => 'accordion',
2658
+ 'accordion-open'=> 1,
2659
+ );
2660
+
2661
+ $fields[] = array(
2662
+ 'id' => 'amp-structured-data-logo',
2663
+ 'type' => 'media',
2664
+ 'url' => true,
2665
+ 'title' => __('Default Structured Data Logo', 'accelerated-mobile-pages'),
2666
+ 'tooltip-subtitle' => __('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
2667
+ );
2668
+ $fields[] = array(
2669
+ 'id' => 'ampforwp-sd-logo-dimensions',
2670
+ 'title' => __('Custom Logo Size', 'accelerated-mobile-pages'),
2671
+ 'type' => 'switch',
2672
+ 'default' => 0,
2673
+ );
2674
+ $fields[] = array(
2675
+ 'class'=>'child_opt child_opt_arrow',
2676
+ 'id' => 'ampforwp-sd-logo-width',
2677
+ 'type' => 'text',
2678
+ 'title' => __('Logo Width', 'accelerated-mobile-pages'),
2679
+ 'tooltip-subtitle' => __('Default width is 600 pixels', 'accelerated-mobile-pages'),
2680
+ 'default' => '600',
2681
+ 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
2682
+ );
2683
+ $fields[] = array(
2684
+ 'class'=>'child_opt',
2685
+ 'id' => 'ampforwp-sd-logo-height',
2686
+ 'type' => 'text',
2687
+ 'title' => __('Logo Height', 'accelerated-mobile-pages'),
2688
+ 'tooltip-subtitle' => __('Default height is 60 pixels', 'accelerated-mobile-pages'),
2689
+ 'default' => '60',
2690
+ 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
2691
+ );
2692
+ $fields[] = array(
2693
+ 'id' => 'amp-structured-data-placeholder-image',
2694
+ 'type' => 'media',
2695
+ 'url' => true,
2696
+ 'title' => __('Default Post Image', 'accelerated-mobile-pages'),
2697
+ 'tooltip-subtitle' => __('Upload the Image you want to show as Placeholder Image.', 'accelerated-mobile-pages'),
2698
+ 'placeholder' => __('when there is no featured image set in the post','accelerated-mobile-pages'),
2699
+ );
2700
+ $fields[] = array(
2701
+ 'id' => 'amp-structured-data-placeholder-image-width',
2702
+ 'title' => __('Default Post Image Width', 'accelerated-mobile-pages'),
2703
+ 'type' => 'text',
2704
+ 'placeholder' => '550',
2705
+ 'tooltip-subtitle' => __('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
2706
+ 'default' => '700'
2707
+ );
2708
+ $fields[] = array(
2709
+ 'id' => 'amp-structured-data-placeholder-image-height',
2710
+ 'title' => __('Default Post Image Height', 'accelerated-mobile-pages'),
2711
+ 'type' => 'text',
2712
+ 'placeholder' => '350',
2713
+ 'tooltip-subtitle' => __('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
2714
+ 'default' => '550'
2715
+ );
2716
+ $fields[] = array(
2717
+ 'id' => 'amporwp-structured-data-video-thumb-url',
2718
+ 'type' => 'media',
2719
+ 'url' => true,
2720
+ 'title' => __('Default Thumbnail for VideoObject', 'accelerated-mobile-pages'),
2721
+ 'tooltip-subtitle' => __('Upload the Thumbnail you want to show as Video Thumbnail.', 'accelerated-mobile-pages'),
2722
+ 'placeholder' => __('When there is no thumbnail set for the video','accelerated-mobile-pages'),
2723
+ );
2724
+ }// is_plugin_active('schema-and-structured-data-for-wp/structured-data-for-wp.php') Closed
2725
 
2726
+
2727
+
2728
+
2729
+
2730
+
2731
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2732
  return $fields;
2733
  }
2734
  }
2736
  Redux::setSection( $opt_name, array(
2737
  'title' => __( 'Structured Data', 'accelerated-mobile-pages' ),
2738
  'id' => 'opt-structured-data',
2739
+ 'class' => 'ampforwp_new_features ',
2740
  'subsection' => true,
2741
  'fields' => apply_filters('ampforwp_sd_custom_fields', $fields = array()
2742
  ),
2748
  'title' => __( 'Notice Bar & GDPR', 'accelerated-mobile-pages' ),
2749
  'desc' => $cta_desc ,
2750
  'id' => 'amp-notifications',
 
2751
  'subsection' => true,
2752
  'fields' => array(
2753
  array(
includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php CHANGED
@@ -88,6 +88,7 @@ class AMP_Blacklist_Sanitizer extends AMP_Base_Sanitizer {
88
 
89
  for ( $i = $length - 1; $i >= 0; $i-- ) {
90
  $element = $elements->item( $i );
 
91
  // Allow script with application/ld+json #1958
92
  if ( $element->hasAttributes() ) {
93
  $attr = $element->getAttribute('type');
@@ -257,4 +258,4 @@ class AMP_Blacklist_Sanitizer extends AMP_Base_Sanitizer {
257
  'valign',
258
  ) );
259
  }
260
- }
88
 
89
  for ( $i = $length - 1; $i >= 0; $i-- ) {
90
  $element = $elements->item( $i );
91
+ if( is_null( $element ) ) continue; //Null check added.
92
  // Allow script with application/ld+json #1958
93
  if ( $element->hasAttributes() ) {
94
  $attr = $element->getAttribute('type');
258
  'valign',
259
  ) );
260
  }
261
+ }
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.8
7
- Stable tag: 0.9.97.18
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -183,6 +183,14 @@ You can contact us from [here](https://ampforwp.com/contact/)
183
 
184
  == Changelog ==
185
 
 
 
 
 
 
 
 
 
186
  = 0.9.97.17 (28th September 2018) =
187
  * Added: Featured Slider "Tag" support #954
188
  * Added: Marfeel plugin is blocking Internal pages of AMP and rendering 503 error #2423
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 4.9.8
7
+ Stable tag: 0.9.97.19
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.19 (4th October 2018) =
187
+ * Fixed: Tables overflow not working in swift theme #2392
188
+ * Fixed: Null check added to fix null reference exception #2526
189
+ * Fixed: Minor Bug related with menu
190
+
191
+ = 0.9.97.18 (29th September 2018) =
192
+ * Fixed: Minor Bug related with menu
193
+
194
  = 0.9.97.17 (28th September 2018) =
195
  * Added: Featured Slider "Tag" support #954
196
  * Added: Marfeel plugin is blocking Internal pages of AMP and rendering 503 error #2423
templates/design-manager/design-1/header-bar.php CHANGED
@@ -43,7 +43,7 @@
43
  'menu'=>'ul',
44
  'echo' => false,
45
  'menu_class' => 'menu amp-menu',
46
- // 'walker' => new Ampforwp_Walker_Nav_Menu()
47
  ) );
48
  $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
49
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
43
  'menu'=>'ul',
44
  'echo' => false,
45
  'menu_class' => 'menu amp-menu',
46
+ 'walker' => new Ampforwp_Walker_Nav_Menu()
47
  ) );
48
  $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
49
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
templates/design-manager/design-2/header-bar.php CHANGED
@@ -32,7 +32,7 @@
32
  'menu' =>'ul',
33
  'echo' => false,
34
  'menu_class' => 'menu amp-menu',
35
- // 'walker' => new Ampforwp_Walker_Nav_Menu()
36
  ) );
37
  $menu_html_content = apply_filters('ampforwp_menu_content',$menu_html_content);
38
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
32
  'menu' =>'ul',
33
  'echo' => false,
34
  'menu_class' => 'menu amp-menu',
35
+ 'walker' => new Ampforwp_Walker_Nav_Menu()
36
  ) );
37
  $menu_html_content = apply_filters('ampforwp_menu_content',$menu_html_content);
38
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
templates/design-manager/design-3/header-bar.php CHANGED
@@ -23,7 +23,7 @@ if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforw
23
  'menu'=>'ul',
24
  'menu_class'=>'amp-menu',
25
  'echo'=>false,
26
- // 'walker' => new Ampforwp_Walker_Nav_Menu()
27
  ) );
28
  $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
29
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
23
  'menu'=>'ul',
24
  'menu_class'=>'amp-menu',
25
  'echo'=>false,
26
+ 'walker' => new Ampforwp_Walker_Nav_Menu()
27
  ) );
28
  $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
29
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
templates/design-manager/swift/style.php CHANGED
@@ -365,6 +365,10 @@ if(isset($redux_builder_amp['amp_font_selector_content_single']) && $redux_build
365
  $fontFamily = "font-family: '".$redux_builder_amp['amp_font_selector_content_single']."';"; }
366
  echo $fontFamily;?>
367
  }
 
 
 
 
368
  <?php if($redux_builder_amp['single-new-features'] && $redux_builder_amp['ampforwp-underline-content-links']){ ?>
369
  .artl-cnt a{
370
  text-decoration: underline;
365
  $fontFamily = "font-family: '".$redux_builder_amp['amp_font_selector_content_single']."';"; }
366
  echo $fontFamily;?>
367
  }
368
+ table {
369
+ display: -webkit-box;
370
+ overflow-x: auto;
371
+ }
372
  <?php if($redux_builder_amp['single-new-features'] && $redux_builder_amp['ampforwp-underline-content-links']){ ?>
373
  .artl-cnt a{
374
  text-decoration: underline;
uninstall.php CHANGED
@@ -25,7 +25,8 @@ if(isset($redux_builder_amp['ampforwp-delete-on-uninstall']) && $redux_builder_a
25
  'ampforwp_installer_completed',
26
  'redux_builder_amp-transients',
27
  'widget_ampforwp_categories_widget',
28
- 'ampforwp_plugin_info'
 
29
  );
30
  $post_meta_array = array(
31
  'use_ampforwp_page_builder',
25
  'ampforwp_installer_completed',
26
  'redux_builder_amp-transients',
27
  'widget_ampforwp_categories_widget',
28
+ 'ampforwp_plugin_info',
29
+ 'ampforwp_structure_data_module_upgrade'
30
  );
31
  $post_meta_array = array(
32
  'use_ampforwp_page_builder',