Changeset 31566
- Timestamp:
- 02/27/2015 02:49:05 AM (10 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/press-this.css
r31565 r31566 218 218 219 219 fieldset { 220 border: 1px solid #c0c0c0;221 margin: 0 2px;222 padding: 0 .35em 0.625em 0.75em;220 border: 0; 221 margin: 0; 222 padding: 0; 223 223 } 224 224 -
trunk/src/wp-admin/includes/class-wp-press-this.php
r31556 r31566 538 538 ?> 539 539 <div id="post-formats-select"> 540 <fieldset><legend class="screen-reader-text"><?php _e( 'Post formats' ); ?></legend> 540 541 <input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> /> 541 542 <label for="post-format-0" class="post-format-icon post-format-standard"><?php echo get_post_format_string( 'standard' ); ?></label> … … 551 552 } 552 553 ?> 554 </fieldset> 553 555 </div> 554 556 <?php … … 570 572 if ( current_user_can( $taxonomy->cap->edit_terms ) ) { 571 573 ?> 572 <button type="button" class="add-cat-toggle button-subtle" >573 <span class="dashicons dashicons-plus"></span> 574 <button type="button" class="add-cat-toggle button-subtle" aria-expanded="false"> 575 <span class="dashicons dashicons-plus"></span><span class="screen-reader-text"><?php _e( 'Toggle add category' ); ?></span> 574 576 </button> 575 577 <div class="add-category is-hidden"> … … 593 595 <?php } ?> 594 596 <div class="categories-search-wrapper"> 595 <input id="categories-search" type="search" class="categories-search" placeholder="<?php esc_attr_e( 'Search categories ' ) ?>">597 <input id="categories-search" type="search" class="categories-search" placeholder="<?php esc_attr_e( 'Search categories by name' ) ?>"> 596 598 <label for="categories-search"> 597 <span class="dashicons dashicons-search"></span> 599 <span class="dashicons dashicons-search"></span><span class="screen-reader-text"><?php _e( 'Search categories' ); ?></span> 598 600 </label> 599 601 </div> 600 <ul class="categories-select" >602 <ul class="categories-select" aria-label="<?php esc_attr_e( 'Categories' ); ?>"> 601 603 <?php wp_terms_checklist( $post->ID, array( 'taxonomy' => 'category' ) ); ?> 602 604 </ul> … … 646 648 if ( $user_can_assign_terms ) { 647 649 ?> 648 <p> 649 <a href="#titlediv" class="tagcloud-link" id="link-post_tag"><?php echo $taxonomy->labels->choose_from_most_used; ?></a> 650 </p> 650 <button type="button" class="button-reset button-link tagcloud-link" id="link-post_tag"><?php echo $taxonomy->labels->choose_from_most_used; ?></button> 651 651 <?php 652 652 } … … 757 757 <div id="scanbar" class="scan"> 758 758 <form method="GET"> 759 <label for="url-scan" class="screen-reader-text"><?php _e( 'Scan site for content' ); ?></label> 759 760 <input type="url" name="u" id="url-scan" class="scan-url" value="" placeholder="<?php esc_attr_e( 'Enter a URL to scan' ) ?>" /> 760 761 <input type="submit" name="url-scan-submit" id="url-scan-submit" class="scan-submit" value="<?php esc_attr_e( 'Scan' ) ?>" /> … … 843 844 <div class="setting-modal is-off-screen is-hidden"> 844 845 <button type="button" class="button-reset modal-close"> 845 <span class="dashicons dashicons-arrow-left-alt2"></span><span class="setting-title"><?php _e( 'Post format' ); ?></span> 846 <span class="dashicons dashicons-arrow-left-alt2"></span> 847 <span class="setting-title" aria-hidden="true"><?php _e( 'Post format' ); ?></span> 848 <span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span> 846 849 </button> 847 850 <?php $this->post_formats_html( $post ); ?> … … 850 853 851 854 <div class="setting-modal is-off-screen is-hidden"> 852 <button type="button" class="button-reset modal-close"><span class="dashicons dashicons-arrow-left-alt2"></span><span class="setting-title"><?php _e( 'Categories' ); ?></span></button> 855 <button type="button" class="button-reset modal-close"> 856 <span class="dashicons dashicons-arrow-left-alt2"></span> 857 <span class="setting-title" aria-hidden="true"><?php _e( 'Categories' ); ?></span> 858 <span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span> 859 </button> 853 860 <?php $this->categories_html( $post ); ?> 854 861 </div> 855 862 856 863 <div class="setting-modal tags is-off-screen is-hidden"> 857 <button type="button" class="button-reset modal-close"><span class="dashicons dashicons-arrow-left-alt2"></span><span class="setting-title"><?php _e( 'Tags' ); ?></span></button> 864 <button type="button" class="button-reset modal-close"> 865 <span class="dashicons dashicons-arrow-left-alt2"></span> 866 <span class="setting-title" aria-hidden="true"><?php _e( 'Tags' ); ?></span> 867 <span class="screen-reader-text"><?php _e( 'Back to post options' ) ?></span> 868 </button> 858 869 <?php $this->tags_html( $post ); ?> 859 870 </div> … … 877 888 <?php 878 889 879 // TODO: consider running "special" press-this hooks here?880 // Maybe better so we don't output stuff accidentally added by plugins. Would probably prevent some errors.881 890 do_action( 'admin_footer', '' ); 882 891 do_action( 'admin_print_footer_scripts' ); -
trunk/src/wp-admin/js/press-this.js
r31549 r31566 541 541 */ 542 542 function saveNewCategory() { 543 var data = { 543 var data, 544 name = $( '#new-category' ).val(); 545 546 if ( ! name ) { 547 return; 548 } 549 550 data = { 544 551 action: 'press-this-add-category', 545 552 post_id: $( '#post_ID' ).val() || 0, 546 name: $( '#new-category' ).val() || '',553 name: name, 547 554 new_cat_nonce: $( '#_ajax_nonce-add-category' ).val() || '', 548 555 parent: $( '#new-category-parent' ).val() || 0 … … 811 818 .removeClass( isOffScreen + ' ' + isHidden ) 812 819 .one( transitionEndEvent, function() { 813 $( this ).find( $modalClose).focus();820 $( this ).find( '.modal-close' ).focus(); 814 821 } ); 815 822 } ); … … 828 835 .one( transitionEndEvent, function() { 829 836 $( this ).addClass( isHidden ); 837 $postOption.eq( index - 1 ).focus(); 830 838 } ); 831 839 … … 834 842 setTimeout( function() { 835 843 $targetSettingModal.addClass( isHidden ); 844 $postOption.eq( index - 1 ).focus(); 836 845 }, 350 ); 837 846 } 838 839 $postOption.eq( index - 1 ).focus();840 847 } ); 841 848 } … … 964 971 965 972 $( 'button.add-cat-toggle' ).on( 'click.press-this', function() { 966 $( this ).toggleClass( 'is-toggled' ); 967 $( '.setting-modal .add-category' ).toggleClass( 'is-hidden' ); 968 $( '.categories-search-wrapper' ).toggleClass( 'is-hidden' ); 973 var $this = $( this ); 974 975 $this.toggleClass( 'is-toggled' ); 976 $this.attr( 'aria-expanded', ! $this.attr( 'aria-expanded' ) ); 977 $( '.setting-modal .add-category, .categories-search-wrapper' ).toggleClass( 'is-hidden' ); 969 978 } ); 970 979 971 980 $( 'button.add-cat-submit' ).on( 'click.press-this', saveNewCategory ); 972 981 973 $( '.categories-search' ).on( 'keyup ', function() {982 $( '.categories-search' ).on( 'keyup.press-this', function() { 974 983 var search = $( this ).val().toLowerCase() || ''; 975 984 -
trunk/src/wp-admin/js/tags-box.js
r31538 r31566 19 19 return out; 20 20 }; 21 21 22 22 tagBox = { 23 23 clean : function(tags) { … … 194 194 195 195 // tag cloud 196 $(' a.tagcloud-link').click(function(){196 $('.tagcloud-link').click(function(){ 197 197 tagBox.get( $(this).attr('id') ); 198 198 $(this).unbind().click(function(){ -
trunk/src/wp-admin/tools.php
r31534 r31566 58 58 </p> 59 59 60 <div class="hidden js-pressthis-code-wrap" >60 <div class="hidden js-pressthis-code-wrap" id="pressthis-code-wrap"> 61 61 <p id="pressthis-code-desc"> 62 62 <?php _e( 'If you can\'t drag it to your bookmarks, copy the following code and create new bookmark. Paste the code into the new bookmark\'s URL field.' ) ?>
Note: See TracChangeset
for help on using the changeset viewer.