Make WordPress Core

Ticket #40138: 40138.2013.diff

File 40138.2013.diff, 1.6 KB (added by xkon, 7 years ago)

Twenty Thirteen ul fix for tag cloud

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

     
    615615        wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true );
    616616}
    617617add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' );
     618
     619/**
     620 * Modifies tag cloud widget arguments to have all tags in the widget same font size and use list format for better accessibility.
     621 *
     622 * @since Twenty Thirteen 2.2
     623 *
     624 * @param array $args Arguments for tag cloud widget.
     625 * @return array A new modified arguments.
     626 */
     627function twentyfourteen_widget_tag_cloud_args( $args ) {
     628    $args['largest']  = 22;
     629    $args['smallest'] = 8;
     630    $args['unit']     = 'pt';
     631    $args['format']   = 'list';
     632    return $args;
     633}
     634add_filter( 'widget_tag_cloud_args', 'twentyfourteen_widget_tag_cloud_args' );
     635 No newline at end of file
  • src/wp-content/themes/twentythirteen/style.css

     
    26632663        margin: -10px auto 0;
    26642664}
    26652665
     2666.tagcloud ul {
     2667        list-style-type: none;
     2668}
    26662669
     2670.tagcloud ul li {
     2671        display: inline-block;
     2672}
     2673
     2674
    26672675/**
    26682676 * 8.0 Media Queries
    26692677 * ----------------------------------------------------------------------------