Make WordPress Core

Ticket #40187: 40187.2.diff

File 40187.2.diff, 5.2 KB (added by audrasjb, 6 years ago)

40187-2 : most used tags

  • src/wp-admin/css/edit.css

    diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css
    index 64b98ae..0b3ea2d 100644
    a b span.wp-media-buttons-icon:before { 
    574574        position: absolute;
    575575}
    576576
    577 .tagchecklist > span {
     577.tagchecklist > li {
     578        display: inline-block;
    578579        float: left;
    579580        margin-right: 25px;
    580581        font-size: 13px;
    p.popular-tags a { 
    10511052        margin: 2px 0 12px;
    10521053}
    10531054
     1055.the-tagcloud ul {
     1056        margin: 0;
     1057}
     1058
     1059.the-tagcloud ul li {
     1060        display: inline-block;
     1061}
     1062
    10541063/* Suggest.js autocomplete, no more used by core. */
    10551064.ac_results {
    10561065        display: none;
    table.links-table { 
    14401449                margin: 25px 10px;
    14411450        }
    14421451
    1443         .tagchecklist > span {
     1452        .tagchecklist > li {
    14441453                font-size: 16px;
    14451454                line-height: 1.4;
    14461455        }
  • src/wp-admin/css/press-this.css

    diff --git a/src/wp-admin/css/press-this.css b/src/wp-admin/css/press-this.css
    index bafea24..68cc31b 100644
    a b dd { 
    765765
    766766/* Tags */
    767767.tagchecklist {
     768        margin: 0;
    768769        padding: 16px 28px 5px;
     770        list-style: none;
    769771}
    770772
    771773.tagchecklist:before,
    dd { 
    778780        clear: both;
    779781}
    780782
    781 .tagchecklist > span {
     783.tagchecklist > li {
     784        display: inline-block;
    782785        float: left;
    783786        margin-right: 25px;
    784787        font-size: 13px;
    dd { 
    788791}
    789792
    790793@media (max-width: 600px) {
    791         .tagchecklist > span {
     794        .tagchecklist > li {
    792795                margin-bottom: 15px;
    793796                font-size: 16px;
    794797                line-height: 1.3;
    dd { 
    877880        padding: 16px;
    878881}
    879882
     883.the-tagcloud ul {
     884        margin: 0;
     885        list-style: none;
     886}
     887
     888.the-tagcloud ul li {
     889        display: inline-block;
     890}
     891
    880892.the-tagcloud a {
    881893        text-decoration: none;
    882894        outline: 0;
  • src/wp-admin/includes/ajax-actions.php

    diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
    index 3f3c0fc..f692d08 100644
    a b function wp_ajax_get_tagcloud() { 
    963963        }
    964964
    965965        // We need raw tag names here, so don't filter the output
    966         $return = wp_generate_tag_cloud( $tags, array('filter' => 0) );
     966        $return = wp_generate_tag_cloud( $tags, array('filter' => 0, 'format' => 'list') );
    967967
    968968        if ( empty($return) )
    969969                wp_die( 0 );
  • src/wp-admin/includes/class-wp-press-this.php

    diff --git a/src/wp-admin/includes/class-wp-press-this.php b/src/wp-admin/includes/class-wp-press-this.php
    index 7f268ea..4931840 100644
    a b class WP_Press_This { 
    947947
    948948                        ?>
    949949                        </div>
    950                         <div class="tagchecklist"></div>
     950                        <ul class="tagchecklist"></ul>
    951951                </div>
    952952                <?php
    953953
  • src/wp-admin/includes/meta-boxes.php

    diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php
    index 1d9b283..104cb64 100644
    a b function post_tags_meta_box( $post, $box ) { 
    453453                <p><?php echo $taxonomy->labels->no_terms; ?></p>
    454454        <?php endif; ?>
    455455        </div>
    456         <div class="tagchecklist"></div>
     456        <ul class="tagchecklist"></ul>
    457457</div>
    458458<?php if ( $user_can_assign_terms ) : ?>
    459459<p class="hide-if-no-js"><button type="button" class="button-link tagcloud-link" id="link-<?php echo $tax_name; ?>" aria-expanded="false"><?php echo $taxonomy->labels->choose_from_most_used; ?></button></p>
  • src/wp-admin/js/tags-box.js

    diff --git a/src/wp-admin/js/tags-box.js b/src/wp-admin/js/tags-box.js
    index 3867c7d..d7d3c40 100644
    a b var tagBox, array_unique_noempty; 
    7474                        tagchecklist.empty();
    7575
    7676                        $.each( current_tags, function( key, val ) {
    77                                 var span, xbutton;
     77                                var item, xbutton;
    7878
    7979                                val = $.trim( val );
    8080
    8181                                if ( ! val )
    8282                                        return;
    8383
    84                                 // Create a new span, and ensure the text is properly escaped.
    85                                 span = $('<span />').text( val );
     84                                // Create a new item, and ensure the text is properly escaped.
     85                                item = $('<li />').text( val );
    8686
    8787                                // If tags editing isn't disabled, create the X button.
    8888                                if ( ! disabled ) {
    var tagBox, array_unique_noempty; 
    9292                                         */
    9393                                        xbutton = $( '<button type="button" id="' + id + '-check-num-' + key + '" class="ntdelbutton">' +
    9494                                                '<span class="remove-tag-icon" aria-hidden="true"></span>' +
    95                                                 '<span class="screen-reader-text">' + window.tagsSuggestL10n.removeTerm + ' ' + span.html() + '</span>' +
     95                                                '<span class="screen-reader-text">' + window.tagsSuggestL10n.removeTerm + ' ' + item.html() + '</span>' +
    9696                                                '</button>' );
    9797
    9898                                        xbutton.on( 'click keypress', function( e ) {
    var tagBox, array_unique_noempty; 
    112112                                                }
    113113                                        });
    114114
    115                                         span.prepend( '&nbsp;' ).prepend( xbutton );
     115                                        item.prepend( '&nbsp;' ).prepend( xbutton );
    116116                                }
    117117
    118                                 // Append the span to the tag list.
    119                                 tagchecklist.append( span );
     118                                // Append the item to the tag list.
     119                                tagchecklist.append( item );
    120120                        });
    121121                        // The buttons list is built now, give feedback to screen reader users.
    122122                        tagBox.screenReadersMessage();
    var tagBox, array_unique_noempty; 
    166166                                        return;
    167167                                }
    168168
    169                                 r = $( '<p id="tagcloud-' + tax + '" class="the-tagcloud">' + r + '</p>' );
     169                                r = $( '<div id="tagcloud-' + tax + '" class="the-tagcloud">' + r + '</div>' );
    170170
    171171                                $( 'a', r ).click( function() {
    172172                                        tagBox.userAction = 'add';