Ticket #31485: 31485.2.diff
File 31485.2.diff, 6.0 KB (added by , 10 years ago) |
---|
-
wp-admin/css/edit.css
1063 1063 13.0 - Tags 1064 1064 ------------------------------------------------------------------------------*/ 1065 1065 1066 .tagsdiv {1067 margin-top: -8px;1068 }1069 1066 1070 #poststuff .taghint {1071 color: #aaa;1072 margin: 15px 0 -24px 12px;1073 }1074 1075 1067 #poststuff .tagsdiv .howto { 1076 1068 margin: 0 0 6px 0; 1077 1069 } … … 1096 1088 margin: 0 5px; 1097 1089 } 1098 1090 1099 /* tag hints */1100 .taghint {1101 color: #aaa;1102 margin: -17px 0 0 7px;1103 visibility: hidden;1104 }1105 1091 1106 input.newtag ~ div.taghint {1107 visibility: visible;1108 }1109 1110 input.newtag:focus ~ div.taghint {1111 visibility: hidden;1112 }1113 1114 1092 p.popular-tags { 1115 1093 border: none; 1116 1094 line-height: 2em; -
wp-admin/css/press-this.css
258 258 display: none; 259 259 } 260 260 261 .screen-reader-text, 262 .taghint { 261 .screen-reader-text { 263 262 position: absolute; 264 263 margin: -1px; 265 264 padding: 0; -
wp-admin/includes/class-wp-press-this.php
31 31 * @return array Site settings. 32 32 */ 33 33 public function site_settings() { 34 $default_html = array(35 'quote' => '<blockquote>%1$s</blockquote>',36 'link' => '<p>' . _x( 'Source:', 'Used in Press This to indicate where the content comes from.' ) .37 ' <em><a href="%1$s">%2$s</a></em></p>',38 );39 40 34 return array( 41 35 // Used to trigger the bookmarklet update notice. 42 36 // Needs to be set here and in get_shortcut_link() in wp-includes/link-template.php. … … 47 41 * 48 42 * @since 4.2.0 49 43 * 50 * @param bool falseWhether to redirect in parent window or not. Default false.44 * @param bool $redir_in_parent Whether to redirect in parent window or not. Default false. 51 45 */ 52 'redirInParent' => apply_filters( 'press_this_redirect_in_parent', false ), 53 54 /** 55 * Filter the default HTML for the Press This editor. 56 * 57 * @since 4.2.0 58 * 59 * @param array $default_html Associative array with two keys: 'quote' where %1$s is replaced with the site description 60 * or the selected content, and 'link' there %1$s is link href, %2$s is link text. 61 */ 62 'html' => apply_filters( 'press_this_suggested_html', $default_html ), 46 'redir_in_parent' => apply_filters( 'press_this_redirect_in_parent', false ), 63 47 ); 64 48 } 65 49 66 50 /** 67 * Get the source 's images and save them locally, for posterity, unless we can't.51 * Get the sources images and save them locally, fr posterity, unless we can't. 68 52 * 69 53 * @since 4.2.0 70 54 * @access public … … 644 628 ?> 645 629 <div class="ajaxtag hide-if-no-js"> 646 630 <label class="screen-reader-text" for="new-tag-post_tag"><?php _e( 'Tags' ); ?></label> 647 <div class="taghint"><?php echo $taxonomy->labels->add_new_item; ?></div>648 631 <p> 649 632 <input type="text" id="new-tag-post_tag" name="newtag[post_tag]" class="newtag form-input-tip" size="16" autocomplete="off" value="" /> 650 633 <button type="button" class="button tagadd"><?php _e( 'Add' ); ?></button> … … 727 710 $post = get_default_post_to_edit( 'post', true ); 728 711 $post_ID = (int) $post->ID; 729 712 730 wp_enqueue_media( array( 'post' => $post_ID ) );731 713 wp_enqueue_style( 'press-this' ); 732 714 wp_enqueue_script( 'press-this' ); 733 715 wp_enqueue_script( 'json2' ); 716 wp_enqueue_media( array( 'post' => $post->ID ) ); 734 717 wp_enqueue_script( 'editor' ); 735 718 736 719 $supports_formats = false; … … 739 722 if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) { 740 723 $supports_formats = true; 741 724 742 if ( ! ( $post_format = get_post_format( $post _ID ) ) ) {725 if ( ! ( $post_format = get_post_format( $post->ID ) ) ) { 743 726 $post_format = 0; 744 727 } 745 728 } … … 798 781 </div> 799 782 800 783 <form id="pressthis-form" name="pressthis-form" method="POST" autocomplete="off"> 801 <input type="hidden" name="post_ID" id="post_ID" value="<?php echo $post_ID; ?>" />784 <input type="hidden" name="post_ID" id="post_ID" value="<?php echo esc_attr( $post_ID ); ?>" /> 802 785 <input type="hidden" name="action" value="press-this-save-post" /> 803 786 <input type="hidden" name="post_status" id="post_status" value="draft" /> 804 787 <?php -
wp-admin/includes/meta-boxes.php
418 418 <?php if ( $user_can_assign_terms ) : ?> 419 419 <div class="ajaxtag hide-if-no-js"> 420 420 <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label> 421 <div class="taghint"><?php echo $taxonomy->labels->add_new_item; ?></div>422 421 <p><input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" value="" /> 423 422 <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" /></p> 424 423 </div> -
wp-admin/js/tags-box.js
158 158 t.flushTags( $(this).closest('.tagsdiv') ); 159 159 }); 160 160 161 $('div.taghint', ajaxtag).click(function(){162 $(this).css('visibility', 'hidden').parent().siblings('.newtag').focus();163 });164 161 165 $('input.newtag', ajaxtag).blur(function() { 166 if ( '' === this.value ) 167 $(this).parent().siblings('.taghint').css('visibility', ''); 168 }).focus(function(){ 169 $(this).parent().siblings('.taghint').css('visibility', 'hidden'); 170 }).keyup(function(e){ 162 $('input.newtag', ajaxtag).keyup(function(e){ 171 163 if ( 13 == e.which ) { 172 164 tagBox.flushTags( $(this).closest('.tagsdiv') ); 173 165 return false;