Make WordPress Core


Ignore:
Timestamp:
09/27/2011 08:52:07 PM (13 years ago)
Author:
nacin
Message:

Release a user's post lock when the user leaves a post. see #18515.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r18790 r18796  
    12401240 *
    12411241 * @param int $post_id ID of the post to being edited
    1242  * @return bool Returns false if the post doesn't exist of there is no current user
     1242 * @return bool|array Returns false if the post doesn't exist of there is no current user, or
     1243 *  an array of the lock time and the user ID.
    12431244 */
    12441245function wp_set_post_lock( $post_id ) {
     
    12521253
    12531254    update_post_meta( $post->ID, '_edit_lock', $lock );
     1255    return array( $now, $user_id );
    12541256}
    12551257
Note: See TracChangeset for help on using the changeset viewer.