WordPress.org

Support

Support » Plugins and Hacks » Hack/plugin to adjust User Levels capabilities?

Hack/plugin to adjust User Levels capabilities?

  • 3stripe
    Participant

    @3stripe

    Hello folks!

    I want to adjust the way that certain user levels work, but can’t find any plugins that do what I want…

    For example, would it be possible to change WordPress so that Level 5 users:

    1. CAN edit stories by other users
    2. Could NOT see the ‘Links’ section
    3. Do NOT see ‘Advanced’ options when writing a post, even if this is the selected option in options-writing.php. (I need this because I’m using the meta image plugin from http://no.oneslistening.com/151)

    Would this be hard?!

    Cheers,

    3stripe

Viewing 5 replies - 1 through 5 (of 5 total)
  • 3stripe
    Participant

    @3stripe

    Thinking more about point 3:

    You could write a plugin to find $user_level and then change the CSS for Level 5 users to hide the div containing the ‘Advanced’ options ????

    This poses the problem that the ‘Advanced’ options div doesn’t have a unique id… another hack required!

    Not sure if this would work as I’ve never done any mods like this…

    Because the user level implementation will change totally in the upcoming version of WP, I guess there will be not much intention by the plugin writers to write such a plugin from scratch now. I am not aware of any plugin doing this right now.

    3stripe
    Participant

    @3stripe

    Ok I worked out point 1, which means point 2 can be ignored 🙂

    My hack to allow users of level ‘xx’ to edit any other user’s posts… use with caution…

    Line 354 of functions-post.php:

    Change this :
    || ($author_data->user_level >= 10) ) {

    To:
    || ($author_data->user_level >= xx) ) {

    See comment from hallsey about the above fix:

    http://wordpress.org/support/topic/52097#post-285417

    3stripe
    Participant

    @3stripe

    Haha well I tried my best, maybe Smultron gave me the wrong line number. It worked for me anyhow, the fix is even easier!

    (So guys, that shoulda been line 353, not 354)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hack/plugin to adjust User Levels capabilities?’ is closed to new replies.