WP Table Builder – WordPress Table Plugin - Version 1.1.1

Version Description

  • FIX: Table not showing in some cases.
Download this release

Release Info

Developer imtiazrayhan
Plugin Icon 128x128 WP Table Builder – WordPress Table Plugin
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.1

inc/admin/class-admin.php CHANGED
@@ -101,4 +101,68 @@ class Admin {
101
 
102
  }
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  }
101
 
102
  }
103
 
104
+ /**
105
+ * Generating the review notice.
106
+ *
107
+ * @since 2.0
108
+ */
109
+ public function review_notice() {
110
+
111
+ $tables_count = wp_count_posts( 'wptb-tables' );
112
+ $tables_number = $tables_count->draft;
113
+
114
+ if ( $tables_number >= 10 && get_option( 'wptb_review_notify' ) == "no" ) {
115
+ ?>
116
+ <div class="wptb-review-notice notice notice-info">
117
+ <p style="font-size: 14px;">
118
+ <?php _e( 'Hey,<br> I noticed that you have already created ' . $tables_number . ' tables with WP Table Builder plugin - that’s awesome! Could you please do me a BIG favor and <b>give it a 5-star rating on WordPress</b>? Just to help us spread the word and boost our motivation. Thank you. <br>~ Imtiaz Rayhan', 'wp-table-builder' ); ?>
119
+ </p>
120
+ <ul>
121
+ <li>
122
+ <a style="margin-right: 5px; margin-bottom: 5px;" class="button-primary"
123
+ href="https://wordpress.org/support/plugin/wp-table-builder/reviews/#new-post"
124
+ target="_blank">Sure, you deserve it.</a>
125
+ <a style="margin-right: 5px;" class="wptb_HideReview_Notice button" href="javascript:void(0);">I already did.</a>
126
+ <a class="wptb_HideReview_Notice button" href="javascript:void(0);">No, not good enough.</a>
127
+ </li>
128
+ </ul>
129
+ </div>
130
+ <script>
131
+ jQuery(document).ready(function ($) {
132
+ jQuery('.wptb_HideReview_Notice').click(function () {
133
+ var data = {'action': 'wptbReviewNoticeHide'};
134
+ jQuery.ajax({
135
+ url: "<?php echo admin_url( 'admin-ajax.php' ); ?>",
136
+ type: "post",
137
+ data: data,
138
+ dataType: "json",
139
+ async: !0,
140
+ success: function (notice_hide) {
141
+ if (notice_hide == "success") {
142
+ jQuery('.wptb-review-notice').slideUp('fast');
143
+ }
144
+ }
145
+ });
146
+ });
147
+ });
148
+ </script>
149
+ <?php
150
+
151
+ }
152
+
153
+ }
154
+
155
+ /**
156
+ * Hides the review notice.
157
+ *
158
+ * @since 2.0
159
+ */
160
+ public function wptb_hide_review_notify() {
161
+
162
+ update_option( 'wptb_review_notify', 'yes' );
163
+ echo json_encode( array( "success" ) );
164
+ exit;
165
+
166
+ }
167
+
168
  }
inc/admin/class-tables.php CHANGED
@@ -105,13 +105,6 @@ class Tables {
105
  $html = get_post_meta( $args['id'] , '_wptb_content_', true );
106
  //$html = json_decode( $html );
107
  $html = '<div class="wptb-table-container"><div class="wptb-table-container-matrix">' . $html . '</div></div>';
108
- $html .= '<script>'
109
- . 'var wptbPreviewTable = document.getElementsByClassName( "wptb-preview-table" );'
110
- . 'if( wptbPreviewTable.length > 0 ) {'
111
- . ' wptbPreviewTable[0].classList.remove( "wptb-table-preview-static-indic" );'
112
- . ' wptbPreviewTable[0].style.display = "none";'
113
- . '}'
114
- . '</script>';
115
  return ( $html );
116
  }
117
 
105
  $html = get_post_meta( $args['id'] , '_wptb_content_', true );
106
  //$html = json_decode( $html );
107
  $html = '<div class="wptb-table-container"><div class="wptb-table-container-matrix">' . $html . '</div></div>';
 
 
 
 
 
 
 
108
  return ( $html );
109
  }
110
 
inc/core/class-activator.php CHANGED
@@ -31,6 +31,9 @@ class Activator {
31
  wp_die( 'WP Table Builder requires a minmum PHP Version of ' . $min_php );
32
  }
33
 
 
 
 
34
  }
35
 
36
  }
31
  wp_die( 'WP Table Builder requires a minmum PHP Version of ' . $min_php );
32
  }
33
 
34
+ // Adds the option to check if user is notified for review.
35
+ add_option( 'wptb_review_notify', 'no' );
36
+
37
  }
38
 
39
  }
inc/core/class-init.php CHANGED
@@ -107,6 +107,7 @@ class Init {
107
  * @access private
108
  */
109
  private function define_admin_hooks() {
 
110
  $plugin_admin = new Admin\Admin( $this->get_plugin_name(), $this->get_version(), $this->get_plugin_text_domain() );
111
 
112
  $tables = new Admin\Tables;
@@ -114,19 +115,9 @@ class Init {
114
 
115
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
116
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
 
 
117
 
118
- /*
119
- * Additional Hooks go here
120
- *
121
- * e.g.
122
- *
123
- * //admin menu pages
124
- * $this->loader->add_action('admin_menu', $plugin_admin, 'add_plugin_admin_menu');
125
- *
126
- * //plugin action links
127
- * $this->loader->add_filter( 'plugin_action_links_' . $this->plugin_basename, $plugin_admin, 'add_additional_action_link' );
128
- *
129
- */
130
  }
131
 
132
  /**
107
  * @access private
108
  */
109
  private function define_admin_hooks() {
110
+
111
  $plugin_admin = new Admin\Admin( $this->get_plugin_name(), $this->get_version(), $this->get_plugin_text_domain() );
112
 
113
  $tables = new Admin\Tables;
115
 
116
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
117
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
118
+ $this->loader->add_action( 'admin_notices', $plugin_admin, 'review_notice' );
119
+ $this->loader->add_action( 'wp_ajax_wptbReviewNoticeHide', $plugin_admin, 'wptb_hide_review_notify' );
120
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  }
122
 
123
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: wptb, imtiazrayhan, istiakrayhan, ultimateblocks, wpcdplugin, wple
3
  Tags: table, table builder, drag and drop
4
  Requires at least: 4.9
5
  Tested up to: 5.2
6
- Stable tag: 1.1.0
7
  Requires PHP: 5.6
8
  License: GPL3+
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -71,6 +71,10 @@ That's it. You're done!
71
 
72
  == Changelog ==
73
 
 
 
 
 
74
  = 1.1.0 =
75
 
76
  * NEW: Option to add images from URL.
3
  Tags: table, table builder, drag and drop
4
  Requires at least: 4.9
5
  Tested up to: 5.2
6
+ Stable tag: 1.1.1
7
  Requires PHP: 5.6
8
  License: GPL3+
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
71
 
72
  == Changelog ==
73
 
74
+ = 1.1.1 =
75
+
76
+ * FIX: Table not showing in some cases.
77
+
78
  = 1.1.0 =
79
 
80
  * NEW: Option to add images from URL.
wp-table-builder.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: WP Table Builder
16
  * Plugin URI: https://wptablebuilder.com/
17
  * Description: Drag and Drop Table Builder Plugin for WordPress.
18
- * Version: 1.1.0
19
  * Author: WP Table Builder
20
  * Author URI: https://wptablebuilder.com//
21
  * License: GPL-3.0+
@@ -39,7 +39,7 @@ define( __NAMESPACE__ . '\NS', __NAMESPACE__ . '\\' );
39
 
40
  define( NS . 'WP_TABLE_BUILDER', 'wp-table-builder' );
41
 
42
- define( NS . 'PLUGIN_VERSION', '1.1.0' );
43
 
44
  define( NS . 'WP_TABLE_BUILDER_DIR', plugin_dir_path( __FILE__ ) );
45
 
15
  * Plugin Name: WP Table Builder
16
  * Plugin URI: https://wptablebuilder.com/
17
  * Description: Drag and Drop Table Builder Plugin for WordPress.
18
+ * Version: 1.1.1
19
  * Author: WP Table Builder
20
  * Author URI: https://wptablebuilder.com//
21
  * License: GPL-3.0+
39
 
40
  define( NS . 'WP_TABLE_BUILDER', 'wp-table-builder' );
41
 
42
+ define( NS . 'PLUGIN_VERSION', '1.1.1' );
43
 
44
  define( NS . 'WP_TABLE_BUILDER_DIR', plugin_dir_path( __FILE__ ) );
45