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. git-svn-id: https://develop.svn.wordpress.org/trunk@24883 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d3363d11bf
commit
cf89623e16
@ -1207,8 +1207,15 @@ function _admin_notice_post_locked() {
|
||||
if ( ! $post = get_post() )
|
||||
return;
|
||||
|
||||
if ( ( $user_id = wp_check_post_lock( $post->ID ) ) && ( $user = get_userdata( $user_id ) ) ) {
|
||||
$locked = apply_filters( 'show_post_locked_dialog', true, $post, $user );
|
||||
$user = null;
|
||||
if ( $user_id = wp_check_post_lock( $post->ID ) )
|
||||
$user = get_userdata( $user_id );
|
||||
|
||||
if ( $user ) {
|
||||
if ( ! apply_filters( 'show_post_locked_dialog', true, $post, $user ) )
|
||||
return;
|
||||
|
||||
$locked = true;
|
||||
} else {
|
||||
$locked = false;
|
||||
}
|
||||
@ -1283,7 +1290,7 @@ function _admin_notice_post_locked() {
|
||||
<span class="locked-saving hidden"><img src="images/wpspin_light-2x.gif" width="16" height="16" /> <?php _e('Saving revision...'); ?></span>
|
||||
<span class="locked-saved hidden"><?php _e('Your latest changes were saved as a revision.'); ?></span>
|
||||
</p>
|
||||
<?php do_action( 'post_lock_text', $post ); ?>
|
||||
<?php do_action( 'lock_taken_over_dialog', $post ); ?>
|
||||
<p><a class="button button-primary wp-tab-last" href="<?php echo esc_url( $sendback ); ?>"><?php echo $sendback_text; ?></a></p>
|
||||
</div>
|
||||
<?php
|
||||
|
Loading…
Reference in New Issue
Block a user