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 526adaaf..537b11ba 100644 --- a/readme.txt +++ b/readme.txt @@ -126,6 +126,19 @@ 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 +* 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 +* 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..a16e5f8d 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 @@ -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' ); + } /**