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: http://core.svn.wordpress.org/trunk@24883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Campbell 2013-07-29 19:25:26 +00:00
parent ee1e8501d1
commit f055ac27d1

View File

@ -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