Make WordPress Core

Ticket #40138: 40138.2014.diff

File 40138.2014.diff, 1.5 KB (added by xkon, 7 years ago)

Twenty Fourteen ul fix for tag cloud

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

     
    527527}
    528528add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
    529529
     530
     531/**
     532 * Modifies tag cloud widget arguments to have all tags in the widget same font size and use list format for better accessibility.
     533 *
     534 * @since Twenty Fourteen 2.0
     535 *
     536 * @param array $args Arguments for tag cloud widget.
     537 * @return array A new modified arguments.
     538 */
     539function twentyfourteen_widget_tag_cloud_args( $args ) {
     540    $args['largest']  = 22;
     541    $args['smallest'] = 8;
     542    $args['unit']     = 'pt';
     543    $args['format']   = 'list';
     544    return $args;
     545}
     546add_filter( 'widget_tag_cloud_args', 'twentyfourteen_widget_tag_cloud_args' );
     547
     548
    530549// Implement Custom Header features.
    531550require get_template_directory() . '/inc/custom-header.php';
    532551
  • src/wp-content/themes/twentyfourteen/style.css

     
    31203120        width: auto;
    31213121}
    31223122
     3123.tagcloud ul {
     3124        list-style-type: none;
     3125}
    31233126
     3127.tagcloud ul li {
     3128        display: inline-block;
     3129        margin: 4px 4px 0 0;
     3130}
     3131
     3132
    31243133/**
    31253134 * 11.0 Media Queries
    31263135 * -----------------------------------------------------------------------------