WordPress.org

Make WordPress Core

Changeset 24883


Ignore:
Timestamp:
07/29/13 19:25:26 (9 months ago)
Author:
aaroncampbell
Message:

Make the show_post_locked_dialog filter hide both the post locked and post taken over dialogs

props azaozz, DH-Shredder. Fixes #24830 for trunk.

File:
1 edited

Legend:

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

    r24878 r24883  
    12081208        return; 
    12091209 
    1210     if ( ( $user_id = wp_check_post_lock( $post->ID ) ) && ( $user = get_userdata( $user_id ) ) ) { 
    1211         $locked = apply_filters( 'show_post_locked_dialog', true, $post, $user ); 
     1210    $user = null; 
     1211    if (  $user_id = wp_check_post_lock( $post->ID ) ) 
     1212        $user = get_userdata( $user_id ); 
     1213 
     1214    if ( $user ) { 
     1215        if ( ! apply_filters( 'show_post_locked_dialog', true, $post, $user ) ) 
     1216            return; 
     1217 
     1218        $locked = true; 
    12121219    } else { 
    12131220        $locked = false; 
     
    12841291            <span class="locked-saved hidden"><?php _e('Your latest changes were saved as a revision.'); ?></span> 
    12851292            </p> 
    1286             <?php do_action( 'post_lock_text', $post ); ?> 
     1293            <?php do_action( 'lock_taken_over_dialog', $post ); ?> 
    12871294            <p><a class="button button-primary wp-tab-last" href="<?php echo esc_url( $sendback ); ?>"><?php echo $sendback_text; ?></a></p> 
    12881295        </div> 
Note: See TracChangeset for help on using the changeset viewer.