Make WordPress Core

Ticket #24830: 24830.patch

File 24830.patch, 2.0 KB (added by azaozz, 11 years ago)
  • wp-admin/includes/post.php

     
    12071207        if ( ! $post = get_post() )
    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 );
    1212         } else {
    1213                 $locked = false;
    1214         }
     1210        $locked = false;
     1211        if ( ( $user_id = wp_check_post_lock( $post->ID ) ) && ( $user = get_userdata( $user_id ) ) )
     1212                $locked = true;
    12151213
    12161214        if ( $locked && ( $sendback = wp_get_referer() ) &&
    12171215                false === strpos( $sendback, 'post.php' ) && false === strpos( $sendback, 'post-new.php' ) ) {
     
    12511249                <div class="post-locked-message">
    12521250                <div class="post-locked-avatar"><?php echo get_avatar( $user->ID, 64 ); ?></div>
    12531251                <p class="currently-editing wp-tab-first" tabindex="0"><?php esc_html_e( sprintf( __( 'This content is currently locked. If you take over, %s will be blocked from continuing to edit.' ), $user->display_name ) ); ?></p>
    1254                 <?php do_action( 'post_lock_text', $post ); ?>
     1252                <?php do_action( 'post_locked_text', $post ); ?>
    12551253                <p>
    12561254                <a class="button" href="<?php echo esc_url( $sendback ); ?>"><?php echo $sendback_text; ?></a>
    12571255                <a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e('Preview'); ?></a>
     
    12771275                        <span class="locked-saving hidden"><img src="images/wpspin_light-2x.gif" width="16" height="16" /> <?php _e('Saving revision...'); ?></span>
    12781276                        <span class="locked-saved hidden"><?php _e('Your latest changes were saved as a revision.'); ?></span>
    12791277                        </p>
    1280                         <?php do_action( 'post_lock_text', $post ); ?>
     1278                        <?php do_action( 'post_lock_taken_over_text', $post ); ?>
    12811279                        <p><a class="button button-primary wp-tab-last" href="<?php echo esc_url( $sendback ); ?>"><?php echo $sendback_text; ?></a></p>
    12821280                </div>
    12831281                <?php