diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
index b7f6fad..0034606 100644
a
|
b
|
do_action( 'edit_form_top', $post ); |
487 | 487 | $title_placeholder = apply_filters( 'enter_title_here', __( 'Add title' ), $post ); |
488 | 488 | ?> |
489 | 489 | <label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo $title_placeholder; ?></label> |
490 | | <input type="text" name="post_title" size="30" value="<?php echo esc_attr( $post->post_title ); ?>" id="title" spellcheck="true" autocomplete="off" /> |
| 490 | <input type="text" name="post_title" size="30" value="<?php echo esc_attr( $post->post_title ); ?>" id="title" placeholder="<?php echo $title_placeholder; ?>" spellcheck="true" autocomplete="off" /> |
491 | 491 | </div> |
492 | 492 | <?php |
493 | 493 | /** |
diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js
index 3168fec..7c66a30 100644
a
|
b
|
jQuery(document).ready( function($) { |
1039 | 1039 | editPermalink(); |
1040 | 1040 | }); |
1041 | 1041 | |
1042 | | /** |
1043 | | * Adds screen reader text to the title label when needed. |
1044 | | * |
1045 | | * Use the 'screen-reader-text' class to emulate a placeholder attribute |
1046 | | * and hide the label when entering a value. |
1047 | | * |
1048 | | * @param {string} id Optional. HTML ID to add the screen reader helper text to. |
1049 | | * |
1050 | | * @global |
1051 | | * |
1052 | | * @returns void |
1053 | | */ |
1054 | | window.wptitlehint = function( id ) { |
1055 | | id = id || 'title'; |
1056 | | |
1057 | | var title = $( '#' + id ), titleprompt = $( '#' + id + '-prompt-text' ); |
1058 | | |
1059 | | if ( '' === title.val() ) { |
1060 | | titleprompt.removeClass( 'screen-reader-text' ); |
1061 | | } |
1062 | | |
1063 | | title.on( 'input', function() { |
1064 | | if ( '' === this.value ) { |
1065 | | titleprompt.removeClass( 'screen-reader-text' ); |
1066 | | return; |
1067 | | } |
1068 | | |
1069 | | titleprompt.addClass( 'screen-reader-text' ); |
1070 | | } ); |
1071 | | }; |
1072 | | |
1073 | | wptitlehint(); |
1074 | | |
1075 | 1042 | // Resize the WYSIWYG and plain text editors. |
1076 | 1043 | ( function() { |
1077 | 1044 | var editor, offset, mce, |