[wp-trac] [WordPress Trac] #48725: Additional Capabilities list displayed in user-edit broke after 5.3 update
WordPress Trac
noreply at wordpress.org
Tue Nov 19 13:44:23 UTC 2019
#48725: Additional Capabilities list displayed in user-edit broke after 5.3 update
--------------------------+------------------------------
Reporter: aravindajith | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 5.3
Severity: critical | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by wpgurudev):
Steps to reproduce the issue.
1. Login to site
2. Add this code to functions.php of theme.
{{{#!php
<?php
/**
* Assign additional capabilities.
*
*/
function custom_cap_48725() {
$user = new WP_User( get_current_user_id() );
$user->add_cap( 'can_create_plugins' );
$user->add_cap( 'can_create_themes' );
}
add_action( 'init', 'custom_cap_48725' );
}}}
3. Go to `Users > Your profile`, check `Additional Capabilities` section.
You will see `1, 1`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48725#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list