Make WordPress Core

Changeset 24886


Ignore:
Timestamp:
07/29/2013 07:48:46 PM (11 years 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 3.6.

Location:
branches/3.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6

  • branches/3.6/wp-admin/includes/post.php

    r24879 r24886  
    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;
     
    12561263        <div class="post-locked-avatar"><?php echo get_avatar( $user->ID, 64 ); ?></div>
    12571264        <p class="currently-editing wp-tab-first" tabindex="0"><?php echo esc_html( sprintf( __( 'This content is currently locked. If you take over, %s will be blocked from continuing to edit.' ), $user->display_name ) ); ?></p>
    1258         <?php do_action( 'post_lock_text', $post ); ?>
     1265        <?php do_action( 'post_locked_dialog', $post ); ?>
    12591266        <p>
    12601267        <a class="button" href="<?php echo esc_url( $sendback ); ?>"><?php echo $sendback_text; ?></a>
     
    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( 'post_lock_lost_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.