• Well im the Level 10 users and I have others I would like to be able to edit my posts. But everyone I set to lvl 9 can not click edit to edit posts ive made.

    How can this be done?

    Thanks.. Andy

Viewing 9 replies - 1 through 9 (of 9 total)
  • You’ll need to make a small change to the core source.

    Around line 350 in wp-includes/functions-post.php, look for the user_can_edit_post() function, and change this in the if statement:

    $author_data->user_level >= 10

    to

    $author_data->user_level >= 9

    Note: Back up source files before editing, and comment changes for future reference.

    Thread Starter ataylor20

    (@ataylor20)

    I honestly dont have this file. Could it be named something else?

    I have searched for:

    user_can_edit_post() and $author_data->user_level >= 10

    in these files and have not found anything..

    template-functions.php
    functions.php

    help.. ??

    heh it should be in the wp-includes folder. you sure you’re WP installation is working correctly if it’s not in there?

    He’s apparently on WordPress 1.2.1. Be sure to let us know what version you’re running, otherwise people will assume you’re on the latest.

    ataylor, read this before posting next time.
    So people will know you are using WP 1.2.1.

    Thread Starter ataylor20

    (@ataylor20)

    sorry yes, i am using WP 1.2.1.

    ataylor, you’ll need to edit wp-admin/post.php in that case. Go to around line 220 in that file and look for this section:

    if ($user_level < $authordata->user_level)
    die ('You don&amp;#8217;t have the right to edit <strong>'.$authordata[1].'</strong>’s posts.');

    Change the if statement to:

    if ($user_level < 9)

    .echo.

    (Now at least you know how to change it when you finally get around to upgrading…)

    Thread Starter ataylor20

    (@ataylor20)

    Well I could tell you this worked but I didnt find the above code listed as it is here. Tried editing it like you asked and it didnt solve the problem. If no other suggestions, I guess I can just move on.

    It now reads:
    if ($user_level > 0) {
    $postdata = $wpdb->get_row(“SELECT * FROM $tableposts WHERE ID = ‘$post_ID'”);
    $authordata = get_userdata($postdata->post_author);
    if ($user_level < 9)
    die (‘You don’t have the right to edit ‘.$authordata[1].’’s posts.’);

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Users lvl 10 being editable for lvl 9’ is closed to new replies.