From 146d0fc343b3fe03ea14e989036b7080bcb6c2d0 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 27 Sep 2020 11:16:44 +0600 Subject: [PATCH 1/2] Plugin version 2.7 and change log adding --- readme.txt | 11 +++++++++++ woo-product-table.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 526adaaf..5bdbba16 100644 --- a/readme.txt +++ b/readme.txt @@ -126,6 +126,17 @@ You can easily show specific category products. While creating new table click o `/assets/screenshot-5.png` == Changelog == += 2.7 = +* Export Import Issue Fix +* Added lots of Filter Hooks +* Added lots of Action Hooks +* Lots of new Features Added +* Plugin Recommendation on/off features Added +* Device Wise Different Column Feature Added +* Jetpack Conflict/ Tab Conflic Issue Fixed +* JavaScript Bug Fix +* PHP Bug Fix + = 2.0 = * Auto Responsive for Mobile diff --git a/woo-product-table.php b/woo-product-table.php index 04c87770..dd94d3c2 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -7,7 +7,7 @@ * Author URI: https://codecanyon.net/user/codeastrology * Tags: woocommerce product,woocommerce product table, product table * - * Version: 2.6.1 + * Version: 2.7.0 * Requires at least: 4.0.0 * Tested up to: 5.5.1 * WC requires at least: 3.0.0 From cf923e4fa3ec32ecee39efc78f4a36804abebf1b Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 27 Sep 2020 12:32:33 +0600 Subject: [PATCH 2/2] capability for post, capabilty for manage and vertical and text-align added for css --- admin/post_metabox_form.php | 2 ++ admin/wpt_product_table_post.php | 12 +++++++++++- readme.txt | 2 ++ woo-product-table.php | 13 ++++++++++++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/admin/post_metabox_form.php b/admin/post_metabox_form.php index 351e4635..9b4eecd4 100644 --- a/admin/post_metabox_form.php +++ b/admin/post_metabox_form.php @@ -21,6 +21,8 @@ 'color' => 'Text Color', 'background-color'=>'Background Color', 'border'=>'Border', + 'text-align'=>'Text Align', + 'vertical-align'=>'Vertical Align', ); $supported_css_property = apply_filters( 'wpto_supported_css_property', $supported_css_property, $tab_array, $post ); diff --git a/admin/wpt_product_table_post.php b/admin/wpt_product_table_post.php index af939456..bd5d7146 100644 --- a/admin/wpt_product_table_post.php +++ b/admin/wpt_product_table_post.php @@ -56,7 +56,17 @@ function wpt_product_table_post() { 'has_archive' => false, 'exclude_from_search' => true, 'publicly_queryable' => true, - 'capability_type' => 'post', + 'capability_type' => 'post', + 'capabilities' => array( + 'edit_post' => 'edit_wpt_product_table', + 'edit_posts' => 'edit_wpt_product_tables', + 'edit_others_posts' => 'edit_others_wpt_product_tables', + 'publish_posts' => 'publish_wpt_product_tables', + 'read_post' => 'read_wpt_product_table', + 'read_private_posts' => 'read_private_wpt_product_tables', + 'delete_post' => 'delete_wpt_product_table', + ), + 'map_meta_cap' => true, 'register_meta_box_cb' => 'wpt_shortcode_metabox', ); register_post_type( 'wpt_product_table', $args ); diff --git a/readme.txt b/readme.txt index 5bdbba16..537b11ba 100644 --- a/readme.txt +++ b/readme.txt @@ -130,6 +130,8 @@ You can easily show specific category products. While creating new table click o * Export Import Issue Fix * Added lots of Filter Hooks * Added lots of Action Hooks +* Added User Role Administrator +* add User cap for edit,delete,private etc for Product Table * Lots of new Features Added * Plugin Recommendation on/off features Added * Device Wise Different Column Feature Added diff --git a/woo-product-table.php b/woo-product-table.php index dd94d3c2..a16e5f8d 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -34,7 +34,7 @@ } if( !defined( 'WPT_CAPABILITY' ) ){ - $wpt_capability = apply_filters( 'wpt_menu_capability', 'manage_woocommerce' ); + $wpt_capability = apply_filters( 'wpt_menu_capability', 'manage_wpt_product_table' ); define( 'WPT_CAPABILITY', $wpt_capability ); } @@ -661,6 +661,17 @@ public static function install() { update_option( 'wpt_configure_options', $default_value ); } + $role = get_role( 'administrator' ); + + $role->add_cap( 'edit_wpt_product_table' ); + $role->add_cap( 'edit_wpt_product_tables' ); + $role->add_cap( 'edit_others_wpt_product_tables' ); + $role->add_cap( 'publish_wpt_product_tables' ); + $role->add_cap( 'read_wpt_product_table' ); + $role->add_cap( 'read_private_wpt_product_tables' ); + $role->add_cap( 'delete_wpt_product_table' ); + $role->add_cap( 'manage_wpt_product_table' ); + } /**