Only focus the title field when it is empty. Remove ancient code that provided for an alternate condition.

props scruffian for initial patches.
props helen.
fixes #24423.

Built from https://develop.svn.wordpress.org/trunk@25459


git-svn-id: http://core.svn.wordpress.org/trunk@25380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-09-16 20:37:09 +00:00
parent 354884205b
commit 737bcf1123

View File

@ -469,7 +469,7 @@ if ( post_type_supports( $post_type, 'comments' ) )
wp_comment_reply();
?>
<?php if ( (isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message']) ) : ?>
<?php if ( '' === $post->post_title ) : ?>
<script type="text/javascript">
try{document.post.title.focus();}catch(e){}
</script>