User Role Editor Pro version 4.59.3 was published at April 7th, 2021. It’s mainly existing functionality enhancement update.
Changes List
Core version: 4.59
- New: custom filter ‘ure_set_cpt_own_caps‘ was added. It takes 2 input parameters: $do_it (bool, TRUE by default) and $post_type (string). Return FALSE for this filter in order to leave the default capability type for selected custom post type when option “Force custom post types to use their own capabilities” is turned ON at URE’s options. If custom post type capabilities are not changed, related taxonomy capabilities are not changed too.
- New: custom filter ‘ure_set_cpt_taxonomy_own_caps‘ was added. It takes 3 input parameters: $do_it (bool, TRUE by default), $taxonomy (string, like ‘product_cat’) and $post_type (string, like ‘product’). Return FALSE for this filter in order to leave the default capabilities for selected taxonomy even if related custom post type will get own capabilities when option “Force custom post types to use their own capabilities” is turned ON at URE’s options.
- Update: PHP constant URE_WP_ADMIN_URL was replaced with direct ‘admin_url()’ call to respect the ‘admin_url’ filter applied at get_admin_url() function.
- Core version was updated to 4.59
- Update: Editing roles and capabilities granted to selected user (“Capabilities” link under user row at the “Users” list) executes ‘add_user_role’ or ‘remove_user_role’ actions only in case it really grants or revokes roles and/or capabilities.
Previous versions fully revoked and granted again all roles during user permissions update even in case roles list was not changed. It was leaded to the false execution of the mentioned add/remove role actions.