All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Fix method param and return types.
- Removed role default caps false values.
- Default caps has been listed in wiki page from now on.
- Fixed role renaming
rename()
(props @jmaekki).
- Optimized admin screenshot.
grant_post_edit()
hotfix to handle only post type related caps inside map_meta_cap().- Added parameter $post_types to the function
grant_post_edit()
.
- grant_post_edit() to grant posts with the given ids and caps.
- You can also define caps for the blocked posts.
- Removed hook that resets roles on wp-geniem-roles admin page. This might cause undesired situations if users reset roles by accident. Use these methods instead https://github.com/devgeniem/wp-geniem-roles#reset-roles-with-wp-geniem-roles.
- Added a method
remove_admin_bar_nodes()
. This method removes admin bar nodes by node id.
- Fixed functions
add_caps()
andremove_caps()
for the default WordPress roles.
- Added global
$menu
variable empty check when removing menu pages.
- Adds functions which makes possible to restrict roles available templates.
- Adds support for array of capabilities for
restrict_post_edit()
.
- Fixes a bug with a cap
add_user�
�and functionrestrict_user_management_by_role()
.
- Support for resetting roles on multisite with CLI command
wp eval "\Geniem\Roles::reset_roles();"
- Version bump.
- Reset roles on wp-geniem-roles admin page on load.
- Fixed wp-geniem-roles option page rename issue.
- remove_menu_pages() removes now also admin_bar menu pages.
- Better documentation.
- Escaping strings.
- Role reset function
reset_to_default_roles()
to reset roles to the WordPress standard roles. - Role reseting function for development
reset_roles()
to reset roles after changes.
- Enhanced documentation for
get_default_caps()
andREADME.md
heading for networks.
- Added function
restrict_user_management_by_role()
. - Added documentation for
restrict_user_management_by_role()
. - Hotfix for role rename function.
- Added support for removing WordPress customizer menu page
customize.php
from the admin menu. Changes implemented in the functionremove_menu_pages()
.
- Singleton is now woken in plugin.php. User doesn't need to create singleton in the theme code anymore. Singleton is initialized when Geniem Roles has been activated.
- Function
load_current_roles()
runs now onsetup_theme
hook. Global$wp_roles
isn't avalaible beforesetup_theme
hook. remove_menu_pages()
can now remove also submenu pages. See the documentation for the details.- Added check for function
add_caps()
. If cap already exists for the role -> do not try to add the cap. - Added check for function
remove_caps()
. If cap is already removed from the role -> do not try to remove the cap.
- Removed function
init()
. - Removed function
remove_submenu_pages()
.remove_menu_pages()
does now the same thing in more intuitive way. - Removed documentation for
remove_submenu_pages()
.
- Menu slugs page that lists all admin menu page slugs
- CHANGELOG.MD
- Documentation: How to remove plugin pages from admin menu with function
remove_menu_pages()
.