Skip to content

Commit

Permalink
Merge pull request #32 from codersaiful/2.7.0.38
Browse files Browse the repository at this point in the history
2.7.0.38 - Capability Issue fixed
  • Loading branch information
codersaiful authored Sep 27, 2020
2 parents b02b2a2 + cf923e4 commit f01cdde
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
2 changes: 2 additions & 0 deletions admin/post_metabox_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
12 changes: 11 additions & 1 deletion admin/wpt_product_table_post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
13 changes: 13 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 13 additions & 2 deletions woo-product-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 );
}

Expand Down Expand Up @@ -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' );

}

/**
Expand Down

0 comments on commit f01cdde

Please sign in to comment.