Naming convention for capabilities created by Role Manager (2 posts)

  1. geoffschultz
    Posted 6 years ago #

    I utilize the "Role Manager" plugin. I posted the following on the plugin website, but haven't received any answer.


    I have created several capabilities which I am trying to utilize. When I entered the names, they were formatted like “XYZ Foo Bar”, but they appear as “Xyz Foo Bar” in the role manager.

    I’ve assigned these to roles and am trying to utilize current_user_can(”Xyz Foo Bar”), but it always returns false. What is the correct naming of “Xyz Foo Bar” to utilize in current_user_can()? Is it “xyz_foo_bar” or “Xyz Foo Bar” or “XYZ Foo Bar” or what?

    -- Geoff

  2. s_ha_dum
    Posted 6 years ago #

    All lower case separated by underscores. This one-- 'xyz_foo_bar'.

Topic Closed

This topic has been closed to new replies.

About this Topic