Make WordPress Core


Ignore:
Timestamp:
10/14/2016 10:39:49 PM (8 years ago)
Author:
azaozz
Message:

Accessible Tags autocomplete:

  • Replace suggest.js with UI Autocomplete.
  • Use the same settings like in the editor link toolbar.
  • Abstract it and add in a new file, tags-suggest.js. Then make it a dependency for the Tags postbox(es) and Quick and Bulk Edit.
  • Add data-wp-taxonomy on all input elements to improve handling in the UI for custom taxonomies.

Props afercia, azaozz.
See #33902.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r38672 r38797  
    15511551
    15521552    <?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
    1553         <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) : ?>
     1553        <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) :
     1554            $taxonomy_name = esc_attr( $taxonomy->name );
     1555   
     1556            ?>
    15541557            <label class="inline-edit-tags">
    15551558                <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span>
    1556                 <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr( $taxonomy->name )?>]" class="tax_input_<?php echo esc_attr( $taxonomy->name )?>"></textarea>
     1559                <textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
    15571560            </label>
    15581561        <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.