Make WordPress Core

Ticket #40138: 40138.2012.diff

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

Twenty Twelve ul fix for tag cloud

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

     
    559559        wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true );
    560560}
    561561add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' );
     562
     563
     564/**
     565 * Modifies tag cloud widget arguments to have all tags in the widget same font size and use list format for better accessibility.
     566 *
     567 * @since Twenty Twelve 2.3
     568 *
     569 * @param array $args Arguments for tag cloud widget.
     570 * @return array A new modified arguments.
     571 */
     572function twentytwelve_widget_tag_cloud_args( $args ) {
     573    $args['largest']  = 22;
     574    $args['smallest'] = 8;
     575    $args['unit']     = 'pt';
     576    $args['format']   = 'list';
     577    return $args;
     578}
     579add_filter( 'widget_tag_cloud_args', 'twentytwelve_widget_tag_cloud_args' );
     580 No newline at end of file
  • src/wp-content/themes/twentytwelve/style.css

     
    14601460        margin: 0 auto 1.714285714rem;
    14611461}
    14621462
     1463.tagcloud ul {
     1464        list-style-type: none;
     1465}
    14631466
     1467.tagcloud ul li {
     1468        display: inline-block;
     1469}
     1470
    14641471/* =Media queries
    14651472-------------------------------------------------------------- */
    14661473