Version Description
- Fix export/import for some hostings
- Better icon compatibility and some css fixes
- Small improvements in admin UI
Download this release
Release Info
Developer | wpsoul |
Plugin | Table Maker |
Version | 1.4 |
Comparing to | |
See all releases |
Code changes from version 1.3 to 1.4
- css/style.css +1 -3
- inc/class-wpsm-list-table.php +13 -13
- inc/class-wpsm-table-maker.php +38 -23
- readme.txt +11 -1
- table-maker.php +2 -2
css/style.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@font-face { font-family: 'wpsm-icons'; src: url('../font/wpsm-icons.eot?-jgkfsj'); src: url('../font/wpsm-icons.eot?#iefix-jgkfsj') format('embedded-opentype'), url('../font/wpsm-icons.woff?-jgkfsj') format('woff'), url('../font/wpsm-icons.ttf?-jgkfsj') format('truetype'), url('../font/wpsm-icons.svg?-jgkfsj#wpsm-icons') format('svg'); font-weight: normal; font-style: normal; }
|
2 |
-
webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
3 |
|
|
|
4 |
-
webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
5 |
|
|
|
|
|
1 |
|
2 |
+
@font-face { font-family: 'wpsm-icons'; src: url('../font/wpsm-icons.eot?-jgkfsj'); src: url('../font/wpsm-icons.eot?#iefix-jgkfsj') format('embedded-opentype'), url('../font/wpsm-icons.woff?-jgkfsj') format('woff'), url('../font/wpsm-icons.ttf?-jgkfsj') format('truetype'), url('../font/wpsm-icons.svg?-jgkfsj#wpsm-icons') format('svg'); font-weight: normal; font-style: normal; }
|
|
|
3 |
|
inc/class-wpsm-list-table.php
CHANGED
@@ -39,7 +39,9 @@ class WPSM_List_Table extends WP_List_Table {
|
|
39 |
'name' => __('Name', 'wpsm-tableplugin'),
|
40 |
'rows' => __('Rows', 'wpsm-tableplugin'),
|
41 |
'cols' => __('Columns', 'wpsm-tableplugin'),
|
42 |
-
'subs' => __('Sub-headers', 'wpsm-tableplugin')
|
|
|
|
|
43 |
);
|
44 |
return $columns;
|
45 |
}
|
@@ -51,7 +53,8 @@ class WPSM_List_Table extends WP_List_Table {
|
|
51 |
function column_name($item){
|
52 |
//Build row actions
|
53 |
$actions = array(
|
54 |
-
'edit' => sprintf('<a href="?page=%s&action=%s&table=%s">%s</a>', $_REQUEST['page'],'edit',$item['id'], __('Edit', 'wpsm-tableplugin') )
|
|
|
55 |
);
|
56 |
|
57 |
//Return the title contents
|
@@ -77,18 +80,15 @@ class WPSM_List_Table extends WP_List_Table {
|
|
77 |
}
|
78 |
|
79 |
function prepare_items() {
|
80 |
-
$per_page
|
81 |
-
$hidden
|
82 |
-
$columns
|
83 |
-
$sortable
|
84 |
-
$curr_page
|
85 |
-
|
86 |
-
$
|
87 |
-
$
|
88 |
-
|
89 |
-
$this->items = $data;
|
90 |
$this->_column_headers = array($columns, $hidden, $sortable);
|
91 |
-
|
92 |
$this->set_pagination_args( array(
|
93 |
'total_items' => $total_items,
|
94 |
'per_page' => $per_page,
|
39 |
'name' => __('Name', 'wpsm-tableplugin'),
|
40 |
'rows' => __('Rows', 'wpsm-tableplugin'),
|
41 |
'cols' => __('Columns', 'wpsm-tableplugin'),
|
42 |
+
'subs' => __('Sub-headers', 'wpsm-tableplugin'),
|
43 |
+
'color' => __('Color','wpsm-tableplugin'),
|
44 |
+
'responsive' => __('Responsive','wpsm-tableplugin')
|
45 |
);
|
46 |
return $columns;
|
47 |
}
|
53 |
function column_name($item){
|
54 |
//Build row actions
|
55 |
$actions = array(
|
56 |
+
'edit' => sprintf('<a href="?page=%s&action=%s&table=%s">%s</a>', $_REQUEST['page'],'edit',$item['id'], __('Edit', 'wpsm-tableplugin') ),
|
57 |
+
'delete' => sprintf('<a href="?page=%s&action=%s&table=%s">%s</a>', $_REQUEST['page'],'delete',$item['id'], __('Delete', 'wpsm-tableplugin') )
|
58 |
);
|
59 |
|
60 |
//Return the title contents
|
80 |
}
|
81 |
|
82 |
function prepare_items() {
|
83 |
+
$per_page = 25;
|
84 |
+
$hidden = array();
|
85 |
+
$columns = $this->get_columns();
|
86 |
+
$sortable = array();
|
87 |
+
$curr_page = $this->get_pagenum();
|
88 |
+
$total_items = $this->db->get_count();
|
89 |
+
$data = $this->db->get_page_items($curr_page, $per_page);
|
90 |
+
$this->items = $data;
|
|
|
|
|
91 |
$this->_column_headers = array($columns, $hidden, $sortable);
|
|
|
92 |
$this->set_pagination_args( array(
|
93 |
'total_items' => $total_items,
|
94 |
'per_page' => $per_page,
|
inc/class-wpsm-table-maker.php
CHANGED
@@ -27,6 +27,7 @@ class WPSM_Table_Maker
|
|
27 |
add_action( 'admin_menu', array($this, 'add_menu_items') );
|
28 |
add_action( 'admin_enqueue_scripts', array($this, 'backend_enqueue') );
|
29 |
add_action( 'admin_init', array($this, 'handle_requests') );
|
|
|
30 |
add_action( 'admin_notices', array($this, 'admin_notices') );
|
31 |
add_shortcode( 'wpsm_comparison_table', array($this, 'comparison_table_callback') );
|
32 |
add_action( 'init', array($this, 'wpsm_table_frontend_scripts') );
|
@@ -322,21 +323,14 @@ class WPSM_Table_Maker
|
|
322 |
}
|
323 |
}
|
324 |
|
325 |
-
|
326 |
-
$
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
$converter = new Array_XML();
|
334 |
-
$xmlStr = $converter->convert($result);
|
335 |
-
header( 'Content-Description: File Transfer' );
|
336 |
-
header( 'Content-Disposition: attachment; filename=' . $_POST['table_name'] . '.xml' );
|
337 |
-
header('Content-Length: ' . strlen($xmlStr));
|
338 |
-
echo $xmlStr;
|
339 |
-
}
|
340 |
|
341 |
If(isset($_POST['wpsm-import-table'])) {
|
342 |
if(isset($_FILES['upload_xml']) && $_FILES['upload_xml']['type'] = 'text/xml') {
|
@@ -367,6 +361,27 @@ class WPSM_Table_Maker
|
|
367 |
echo sprintf($format, __('The table has been deleted successfully!', 'wpsm-tableplugin') );
|
368 |
endif;
|
369 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
|
371 |
function comparison_table_callback( $atts ){
|
372 |
|
@@ -430,14 +445,14 @@ class WPSM_Table_Maker
|
|
430 |
|
431 |
public function replace_placeholders($str){
|
432 |
$values = array();
|
433 |
-
$values['tick'] = '<i class="wpsm-icon-tick"></i>';
|
434 |
-
$values['cross'] = '<i class="wpsm-icon-cross"></i>';
|
435 |
-
$values['info'] = '<i class="wpsm-icon-info"></i>';
|
436 |
-
$values['warning'] = '<i class="wpsm-icon-warning"></i>';
|
437 |
-
$values['heart'] = '<i class="wpsm-icon-heart"></i>';
|
438 |
-
$values['lock'] = '<i class="wpsm-icon-lock"></i>';
|
439 |
-
$values['star'] = '<i class="wpsm-icon-star"></i>';
|
440 |
-
$values['star-empty'] = '<i class="wpsm-icon-star-empty"></i>';
|
441 |
$values['col-choice'] = '<span class="badge_div_col"></span>';
|
442 |
$values['col-choice-image'] = '<span class="badge_div_col badge_div_col_img"></span>';
|
443 |
$values['row-choice'] = '<span class="badge_div_row"></span>';
|
27 |
add_action( 'admin_menu', array($this, 'add_menu_items') );
|
28 |
add_action( 'admin_enqueue_scripts', array($this, 'backend_enqueue') );
|
29 |
add_action( 'admin_init', array($this, 'handle_requests') );
|
30 |
+
add_action('plugins_loaded', array($this, 'xml_download'));
|
31 |
add_action( 'admin_notices', array($this, 'admin_notices') );
|
32 |
add_shortcode( 'wpsm_comparison_table', array($this, 'comparison_table_callback') );
|
33 |
add_action( 'init', array($this, 'wpsm_table_frontend_scripts') );
|
323 |
}
|
324 |
}
|
325 |
|
326 |
+
if($_GET['action'] == 'delete' && isset($_GET['table']) ){
|
327 |
+
if(is_array($_GET['table']) || is_numeric($_GET['table'])) {
|
328 |
+
$result = $this->db->delete( $_GET['table'] );
|
329 |
+
$sendback = add_query_arg( array( 'page' => $_GET['page'], 'deleted' => $result ), '' );
|
330 |
+
wp_redirect($sendback);
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
|
335 |
If(isset($_POST['wpsm-import-table'])) {
|
336 |
if(isset($_FILES['upload_xml']) && $_FILES['upload_xml']['type'] = 'text/xml') {
|
361 |
echo sprintf($format, __('The table has been deleted successfully!', 'wpsm-tableplugin') );
|
362 |
endif;
|
363 |
}
|
364 |
+
|
365 |
+
|
366 |
+
function xml_download() {
|
367 |
+
if(isset($_POST['wpsm-export-table'])) {
|
368 |
+
$result = $this->db->get( $_GET['table'] );
|
369 |
+
|
370 |
+
if(!$result)
|
371 |
+
return;
|
372 |
+
|
373 |
+
$converter = new Array_XML();
|
374 |
+
$xmlStr = $converter->convert($result);
|
375 |
+
|
376 |
+
header("Content-type: txt/xml",true,200);
|
377 |
+
header("Content-Disposition: attachment; filename=" . $_POST['table_name'] . ".xml" );
|
378 |
+
//header('Content-Length: ' . ob_get_length($xmlStr));
|
379 |
+
header("Pragma: no-cache");
|
380 |
+
header("Expires: 0");
|
381 |
+
echo $xmlStr;
|
382 |
+
exit();
|
383 |
+
}
|
384 |
+
}
|
385 |
|
386 |
function comparison_table_callback( $atts ){
|
387 |
|
445 |
|
446 |
public function replace_placeholders($str){
|
447 |
$values = array();
|
448 |
+
$values['tick'] = '<i class="wpsm-table-icon wpsm-icon-tick"></i>';
|
449 |
+
$values['cross'] = '<i class="wpsm-table-icon wpsm-icon-cross"></i>';
|
450 |
+
$values['info'] = '<i class="wpsm-table-icon wpsm-icon-info"></i>';
|
451 |
+
$values['warning'] = '<i class="wpsm-table-icon wpsm-icon-warning"></i>';
|
452 |
+
$values['heart'] = '<i class="wpsm-table-icon wpsm-icon-heart"></i>';
|
453 |
+
$values['lock'] = '<i class="wpsm-table-icon wpsm-icon-lock"></i>';
|
454 |
+
$values['star'] = '<i class="wpsm-table-icon wpsm-icon-star"></i>';
|
455 |
+
$values['star-empty'] = '<i class="wpsm-table-icon wpsm-icon-star-empty"></i>';
|
456 |
$values['col-choice'] = '<span class="badge_div_col"></span>';
|
457 |
$values['col-choice-image'] = '<span class="badge_div_col badge_div_col_img"></span>';
|
458 |
$values['row-choice'] = '<span class="badge_div_row"></span>';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: responsive tables, pricing tables, comparison tables, wordpress tables, ta
|
|
4 |
Donate link: http://wpsoul.com/
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.3.3
|
7 |
-
Stable tag: 1.
|
8 |
License: License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -29,6 +29,11 @@ Plugin helps you to create different comparison tables. It has some unique funct
|
|
29 |
* Option to upload and use images
|
30 |
* Optional center aligning
|
31 |
|
|
|
|
|
|
|
|
|
|
|
32 |
**How it works:**
|
33 |
|
34 |
[youtube https://www.youtube.com/watch?v=Z4r6TzWv8gU]
|
@@ -49,6 +54,11 @@ If you like this plugin please give it a good rating.
|
|
49 |
|
50 |
== Changelog ==
|
51 |
|
|
|
|
|
|
|
|
|
|
|
52 |
= 1.3 =
|
53 |
* Added export/import of table and some fixes
|
54 |
|
4 |
Donate link: http://wpsoul.com/
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.3.3
|
7 |
+
Stable tag: 1.3
|
8 |
License: License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
29 |
* Option to upload and use images
|
30 |
* Optional center aligning
|
31 |
|
32 |
+
> <strong>Additional functions</strong><br>
|
33 |
+
>Our themes have some additional functions for plugin: buttons, text highlights, countdown, option to hide values from non logged users.
|
34 |
+
>
|
35 |
+
>Check our theme if you need [best moneymaking solutions](http://themeforest.net/item/rehub-directory-shop-coupon-affiliate-theme/7646339 "Rehub theme").
|
36 |
+
|
37 |
**How it works:**
|
38 |
|
39 |
[youtube https://www.youtube.com/watch?v=Z4r6TzWv8gU]
|
54 |
|
55 |
== Changelog ==
|
56 |
|
57 |
+
= 1.4 =
|
58 |
+
* Fix export/import for some hostings
|
59 |
+
* Better icon compatibility and some css fixes
|
60 |
+
* Small improvements in admin UI
|
61 |
+
|
62 |
= 1.3 =
|
63 |
* Added export/import of table and some fixes
|
64 |
|
table-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Table Maker
|
4 |
Plugin URI: https://wordpress.org/plugins/table-maker/
|
5 |
Description: Create tables with just a few clicks.
|
6 |
-
Version: 1.
|
7 |
Author: Wpsoul
|
8 |
Author URI: https://wpsoul.com
|
9 |
License: GPL2
|
@@ -18,7 +18,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
18 |
require_once plugin_dir_path( __FILE__ ) . 'inc/class-wpsm-table-maker.php';
|
19 |
|
20 |
function wpsm_run_table_maker() {
|
21 |
-
$plugin_instance = new WPSM_Table_Maker('1.
|
22 |
register_activation_hook( __FILE__, array($plugin_instance, 'initialize') );
|
23 |
register_uninstall_hook( __FILE__, array('WPSM_Table_Maker', 'rollback') );
|
24 |
}
|
3 |
Plugin Name: Table Maker
|
4 |
Plugin URI: https://wordpress.org/plugins/table-maker/
|
5 |
Description: Create tables with just a few clicks.
|
6 |
+
Version: 1.4
|
7 |
Author: Wpsoul
|
8 |
Author URI: https://wpsoul.com
|
9 |
License: GPL2
|
18 |
require_once plugin_dir_path( __FILE__ ) . 'inc/class-wpsm-table-maker.php';
|
19 |
|
20 |
function wpsm_run_table_maker() {
|
21 |
+
$plugin_instance = new WPSM_Table_Maker('1.4');
|
22 |
register_activation_hook( __FILE__, array($plugin_instance, 'initialize') );
|
23 |
register_uninstall_hook( __FILE__, array('WPSM_Table_Maker', 'rollback') );
|
24 |
}
|