Ticket #42390: 42390.patch
| File 42390.patch, 4.7 KB (added by , 8 years ago) |
|---|
-
wp-admin/edit-form-advanced.php
571 571 $title_placeholder = apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); 572 572 ?> 573 573 <label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo $title_placeholder; ?></label> 574 <input type="text" name="post_title" size="30" value="<?php echo esc_attr( $post->post_title ); ?>" id="title" spellcheck="true" autocomplete="off" />574 <input type="text" placeholder="<?php echo esc_attr( $title_placeholder ); ?>" name="post_title" size="30" value="<?php echo esc_attr( $post->post_title ); ?>" id="title" spellcheck="true" autocomplete="off" /> 575 575 </div> 576 576 <?php 577 577 /** -
wp-admin/includes/dashboard.php
501 501 <?php endif; ?> 502 502 503 503 <div class="input-text-wrap" id="title-wrap"> 504 < label class="screen-reader-text prompt" for="title" id="title-prompt-text">505 506 <?php507 /** This filter is documented in wp-admin/edit-form-advanced.php */508 echo apply_filters( 'enter_title_here', __( 'Title' ), $post );509 ?>504 <?php 505 /** This filter is documented in wp-admin/edit-form-advanced.php */ 506 $title_placeholder = apply_filters( 'enter_title_here', __( 'Title' ), $post ); 507 ?> 508 <label class="screen-reader-text" for="title" id="title-prompt-text"> 509 <?php echo esc_html( $title_placeholder ); ?> 510 510 </label> 511 <input type="text" name="post_title" id="title" autocomplete="off" />511 <input type="text" name="post_title" id="title" autocomplete="off" placeholder="<?php echo esc_attr( $title_placeholder ); ?>" /> 512 512 </div> 513 513 514 514 <div class="textarea-wrap" id="description-wrap"> 515 <label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php _e( 'What’s on your mind?' ); ?></label> 516 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea> 515 <?php $textarea_placeholder = __( 'What’s on your mind?' ); ?> 516 <label class="screen-reader-text prompt" for="content" id="content-prompt-text"> 517 <?php echo esc_html( $textarea_placeholder ); ?> 518 </label> 519 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off" placeholder="<?php echo esc_attr( $textarea_placeholder ); ?>"></textarea> 517 520 </div> 518 521 519 522 <p class="submit"> -
wp-admin/js/dashboard.js
93 93 94 94 $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); 95 95 96 $('#title, #tags-input, #content').each( function() {97 var input = $(this), prompt = $('#' + this.id + '-prompt-text');98 99 if ( '' === this.value ) {100 prompt.removeClass('screen-reader-text');101 }102 103 prompt.click( function() {104 $(this).addClass('screen-reader-text');105 input.focus();106 });107 108 input.blur( function() {109 if ( '' === this.value ) {110 prompt.removeClass('screen-reader-text');111 }112 });113 114 input.focus( function() {115 prompt.addClass('screen-reader-text');116 });117 });118 119 96 $('#quick-press').on( 'click focusin', function() { 120 97 wpActiveEditor = 'content'; 121 98 }); -
wp-admin/js/post.js
1032 1032 editPermalink(); 1033 1033 }); 1034 1034 1035 /**1036 * Add screen reader text to the title prompt when needed.1037 *1038 * @summary Title screen reader text handler.1039 *1040 * @param {string} id Optional. HTML ID to add the screen reader helper text to.1041 *1042 * @global1043 *1044 * @returns void1045 */1046 wptitlehint = function(id) {1047 id = id || 'title';1048 1049 var title = $('#' + id), titleprompt = $('#' + id + '-prompt-text');1050 1051 if ( '' === title.val() )1052 titleprompt.removeClass('screen-reader-text');1053 1054 titleprompt.click(function(){1055 $(this).addClass('screen-reader-text');1056 title.focus();1057 });1058 1059 title.blur(function(){1060 if ( '' === this.value )1061 titleprompt.removeClass('screen-reader-text');1062 }).focus(function(){1063 titleprompt.addClass('screen-reader-text');1064 }).keydown(function(e){1065 titleprompt.addClass('screen-reader-text');1066 $(this).unbind(e);1067 });1068 };1069 1070 wptitlehint();1071 1072 1035 // Resize the WYSIWYG and plain text editors. 1073 1036 ( function() { 1074 1037 var editor, offset, mce,