WordPress.org

Make WordPress Core

Ticket #40184: 40184.1.diff

File 40184.1.diff, 2.2 KB (added by sami.keijonen, 3 years ago)
  • src/wp-content/themes/twentyseventeen/functions.php

     
    542542add_filter( 'frontpage_template',  'twentyseventeen_front_page_template' );
    543543
    544544/**
     545 * Modifies tag cloud widget arguments to have all tags in the widget same font size and use list format for better accessibility.
     546 *
     547 * @since Twenty Seventeen 1.3
     548 *
     549 * @param array $args Arguments for tag cloud widget.
     550 * @return array A new modified arguments.
     551 */
     552function twentyseventeen_widget_tag_cloud_args( $args ) {
     553        $args['largest']  = 1;
     554        $args['smallest'] = 1;
     555        $args['unit']     = 'em';
     556        $args['format']   = 'list';
     557        return $args;
     558}
     559add_filter( 'widget_tag_cloud_args', 'twentyseventeen_widget_tag_cloud_args' );
     560
     561/**
    545562 * Implement the Custom Header feature.
    546563 */
    547564require get_parent_theme_file_path( '/inc/custom-header.php' );
  • src/wp-content/themes/twentyseventeen/style.css

     
    25392539        padding: 0.5em 0;
    25402540}
    25412541
    2542 .widget ul li + li {
     2542.widget:not(.widget_tag_cloud) ul li + li {
    25432543        margin-top: -1px;
    25442544}
    25452545
     
    26962696
    26972697/* Tag cloud widget */
    26982698
     2699.tagcloud ul li {
     2700        float: left;
     2701        border-top: 0;
     2702        border-bottom: 0;
     2703        padding: 0;
     2704        margin: 4px 4px 0 0;
     2705}
     2706
    26992707.tagcloud,
    27002708.widget_tag_cloud,
    27012709.wp_widget_tag_cloud {
     
    27082716        border: 1px solid #ddd;
    27092717        -webkit-box-shadow: none;
    27102718        box-shadow: none;
    2711         display: inline-block;
    2712         float: left;
    2713         font-size: 14px !important; /* !important to overwrite inline styles */
    2714         font-size: 0.875rem !important;
    2715         margin: 4px 4px 0 0 !important;
    2716         padding: 4px 10px 5px !important;
     2719        display: block;
     2720        padding: 4px 10px 5px;
    27172721        position: relative;
    27182722        -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;
    27192723        transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.3s ease-in-out;