Make WordPress Core

Ticket #40138: 40138.2015.diff

File 40138.2015.diff, 1.4 KB (added by xkon, 7 years ago)

TwentyFifteen ul fix for tag cloud

  • src/wp-content/themes/twentyfifteen/functions.php

     
    386386add_filter( 'get_search_form', 'twentyfifteen_search_form_modify' );
    387387
    388388/**
     389 * Modifies tag cloud widget arguments to have all tags in the widget same font size and use list format for better accessibility.
     390 *
     391 * @since Twenty Fifteen 1.8
     392 *
     393 * @param array $args Arguments for tag cloud widget.
     394 * @return array A new modified arguments.
     395 */
     396function twentyfifteen_widget_tag_cloud_args( $args ) {
     397    $args['largest']  = 22;
     398    $args['smallest'] = 8;
     399    $args['unit']     = 'pt';
     400    $args['format']   = 'list';
     401    return $args;
     402}
     403add_filter( 'widget_tag_cloud_args', 'twentyfifteen_widget_tag_cloud_args' );
     404
     405
     406/**
    389407 * Implement the Custom Header feature.
    390408 *
    391409 * @since Twenty Fifteen 1.0
  • src/wp-content/themes/twentyfifteen/style.css

     
    26812681        margin-bottom: 0;
    26822682}
    26832683
     2684.tagcloud ul {
     2685        list-style-type: none;
     2686}
    26842687
     2688.tagcloud ul li {
     2689        display: inline-block;
     2690        margin: 4px 4px 0 0;
     2691}
     2692
     2693
    26852694/**
    26862695 * 16.0 Media Queries
    26872696 */