WordPress.org

Support

Support » Plugins and Hacks » [Plugin: User Role Editor] Add new capability in a plugin

[Plugin: User Role Editor] Add new capability in a plugin

  • I would edit the “quotes collection” plugin (or others) to add a new capability defined in URE.
    So, first I added a new role “quote_collection”.
    Then, in the plugin I edit the code as follow:
    from
    add_action('admin_menu', 'schedeais_admin_menu');

    to

    if (current_user_can('quote_collection')) {
    	add_action('admin_menu', 'schedeais_admin_menu');
    }

    But, when I reload the wp-admin this error appears:
    Call to undefined function wp_get_current_user() in /home/server/site/wp-includes/capabilities.php on line 1028

    So, someone can help me to add a capability to a plugin?
    tnx

    http://wordpress.org/extend/plugins/user-role-editor/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: User Role Editor] Add new capability in a plugin’ is closed to new replies.