WordPress.org

Ready to get started?Download WordPress

Forums

Hack/plugin to adjust User Levels capabilities? (6 posts)

  1. 3stripe
    Member
    Posted 8 years ago #

    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

  2. 3stripe
    Member
    Posted 8 years ago #

    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...

  3. McShelby
    Member
    Posted 8 years ago #

    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.

  4. 3stripe
    Member
    Posted 8 years ago #

    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) ) {

  5. MichaelH
    Member
    Posted 8 years ago #

    See comment from hallsey about the above fix:

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

  6. 3stripe
    Member
    Posted 8 years ago #

    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)

Topic Closed

This topic has been closed to new replies.

About this Topic