Make WordPress Core

Ticket #40138: 40138.3.patch

File 40138.3.patch, 14.2 KB (added by davidakennedy, 7 years ago)

Adds changes from https://core.trac.wordpress.org/ticket/40138#comment:26

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

     
    743743
    744744        return $images;
    745745}
     746
     747/**
     748 * Modifies tag cloud widget arguments to have all tags in the widget same font size and use list format for better accessibility.
     749 *
     750 * @since Twenty Eleven 2.7
     751 *
     752 * @param array $args Arguments for tag cloud widget.
     753 * @return array A new modified arguments.
     754 */
     755function twentyeleven_widget_tag_cloud_args( $args ) {
     756        $args['largest']  = 22;
     757        $args['smallest'] = 8;
     758        $args['unit']     = 'pt';
     759        $args['format']   = 'list';
     760        return $args;
     761}
     762add_filter( 'widget_tag_cloud_args', 'twentyeleven_widget_tag_cloud_args' );
  • src/wp-content/themes/twentyeleven/style.css

     
    19221922}
    19231923
    19241924/* Calendar Widget */
    1925 
    19261925.widget_calendar #wp-calendar {
    19271926        color: #555;
    19281927        width: 95%;
     
    19521951}
    19531952
    19541953/* Text Widget */
    1955 
    19561954.widget_text ul,
    19571955.widget_text ol {
    19581956        margin: 0 0 1.625em 2.5em;
     
    19641962        margin-bottom: 0;
    19651963}
    19661964
     1965/* Tag Cloud Widget */
     1966.tagcloud ul {
     1967        list-style-type: none;
     1968}
     1969
     1970.tagcloud ul li {
     1971        display: inline-block;
     1972}
     1973
    19671974/* =Comments
    19681975----------------------------------------------- */
    19691976
     
    23322339        font-weight: bold;
    23332340}
    23342341
    2335 
    23362342/* =Responsive Structure
    23372343----------------------------------------------- */
    23382344
  • 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.9
     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/inc/template-tags.php

     
    9797                }
    9898
    9999                $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
    100                 if ( $tags_list ) {
     100                if ( $tags_list && ! is_wp_error( $tags_list ) ) {
    101101                        printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    102102                                _x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
    103103                                $tags_list
  • src/wp-content/themes/twentyfifteen/style.css

     
    15591559        margin-left: 1.6em;
    15601560}
    15611561
     1562.tagcloud ul {
     1563        list-style-type: none;
     1564}
     1565
     1566.tagcloud ul li {
     1567        display: inline-block;
     1568}
    15621569
    15631570/**
    15641571 * 12.0 Content
  • 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.1
     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

     
    25832583        padding-bottom: 0;
    25842584}
    25852585
     2586.tagcloud ul {
     2587        list-style-type: none;
     2588}
     2589
     2590.tagcloud ul li {
     2591        display: inline-block;
     2592}
     2593
    25862594/* Recent Posts Widget */
    25872595
    25882596.widget_recent_entries .post-date {
  • src/wp-content/themes/twentyseventeen/inc/template-tags.php

     
    8484                                                        echo '<span class="cat-links">' . twentyseventeen_get_svg( array( 'icon' => 'folder-open' ) ) . '<span class="screen-reader-text">' . __( 'Categories', 'twentyseventeen' ) . '</span>' . $categories_list . '</span>';
    8585                                                }
    8686
    87                                                 if ( $tags_list ) {
     87                                                if ( $tags_list && ! is_wp_error( $tags_list ) ) {
    8888                                                        echo '<span class="tags-links">' . twentyseventeen_get_svg( array( 'icon' => 'hashtag' ) ) . '<span class="screen-reader-text">' . __( 'Tags', 'twentyseventeen' ) . '</span>' . $tags_list . '</span>';
    8989                                                }
    9090
  • src/wp-content/themes/twentysixteen/functions.php

     
    417417/**
    418418 * Modifies tag cloud widget arguments to have all tags in the widget same font size.
    419419 *
    420  * @since Twenty Sixteen 1.1
     420 * @since Twenty Sixteen 1.4
    421421 *
    422422 * @param array $args Arguments for tag cloud widget.
    423423 * @return array A new modified arguments.
    424424 */
    425425function twentysixteen_widget_tag_cloud_args( $args ) {
    426         $args['largest'] = 1;
     426        $args['largest']  = 1;
    427427        $args['smallest'] = 1;
    428         $args['unit'] = 'em';
     428        $args['unit']     = 'em';
     429        $args['format']   = 'list';
    429430        return $args;
    430431}
    431432add_filter( 'widget_tag_cloud_args', 'twentysixteen_widget_tag_cloud_args' );
  • src/wp-content/themes/twentysixteen/inc/template-tags.php

     
    101101        }
    102102
    103103        $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
    104         if ( $tags_list ) {
     104        if ( $tags_list && ! is_wp_error( $tags_list ) ) {
    105105                printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    106106                        _x( 'Tags', 'Used before tag names.', 'twentysixteen' ),
    107107                        $tags_list
  • src/wp-content/themes/twentysixteen/rtl.css

     
    315315        margin-left: 0.1875em;
    316316}
    317317
     318.tagcloud ul {
     319        margin-right: 0;
     320}
     321
    318322
    319323/**
    320324 * 8.0 - Content
  • src/wp-content/themes/twentysixteen/style.css

     
    15141514        padding: 0.5625em 0.4375em 0.5em;
    15151515}
    15161516
     1517.tagcloud ul {
     1518        list-style-type: none;
     1519        margin-left: 0;
     1520}
     1521
     1522.tagcloud ul li {
     1523        display: inline-block;
     1524}
     1525
    15171526.tagcloud a:hover,
    15181527.tagcloud a:focus {
    15191528        border-color: #007acc;
  • src/wp-content/themes/twentyten/functions.php

     
    536536function twentyten_posted_in() {
    537537        // Retrieves tag list of current post, separated by commas.
    538538        $tag_list = get_the_tag_list( '', ', ' );
    539         if ( $tag_list ) {
     539        if ( $tag_list && ! is_wp_error( $tag_list ) ) {
    540540                $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
    541541        } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
    542542                $posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
     
    593593
    594594        return $images;
    595595}
     596
     597/**
     598 * Modifies tag cloud widget arguments to have all tags in the widget same font size and use list format for better accessibility.
     599 *
     600 * @since Twenty Ten 2.4
     601 *
     602 * @param array $args Arguments for tag cloud widget.
     603 * @return array A new modified arguments.
     604 */
     605function twentyten_widget_tag_cloud_args( $args ) {
     606        $args['largest']  = 22;
     607        $args['smallest'] = 8;
     608        $args['unit']     = 'pt';
     609        $args['format']   = 'list';
     610        return $args;
     611}
     612add_filter( 'widget_tag_cloud_args', 'twentyten_widget_tag_cloud_args' );
  • src/wp-content/themes/twentyten/rtl.css

     
    270270        margin-right: 1.3em;
    271271}
    272272
     273#main .widget-area .tagcloud ul,
     274.widget-area .tagcloud ul {
     275        margin-right: 0;
     276}
     277
    273278/* =Footer
    274279-------------------------------------------------------------- */
    275280#site-generator {
  • src/wp-content/themes/twentyten/style.css

     
    12381238.widget_media_video video {
    12391239        max-width: 100%;
    12401240}
     1241.tagcloud ul {
     1242        list-style-type: none;
     1243        margin-left: 0 !important;
     1244}
     1245.tagcloud ul li {
     1246        display: inline-block;
     1247}
    12411248
    12421249/* Main sidebars */
    12431250#main .widget-area ul {
  • 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.3
     623 *
     624 * @param array $args Arguments for tag cloud widget.
     625 * @return array A new modified arguments.
     626 */
     627function twentythirteen_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', 'twentythirteen_widget_tag_cloud_args' );
  • src/wp-content/themes/twentythirteen/style.css

     
    25622562}
    25632563
    25642564/* Text widget */
    2565 
    25662565.widget_text ul,
    25672566.widget_text ol {
    25682567        padding-left: 20px;
     
    25862585        list-style: decimal;
    25872586}
    25882587
     2588/* Tag Cloud widget */
     2589.tagcloud ul {
     2590        list-style-type: none;
     2591}
     2592
     2593.tagcloud ul li {
     2594        display: inline-block;
     2595        padding: 0;
     2596}
     2597
    25892598/**
    25902599 * 7.0 Footer
    25912600 * ----------------------------------------------------------------------------
  • 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.4
     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' );
  • src/wp-content/themes/twentytwelve/style.css

     
    14501450        display: block;
    14511451        text-align: right;
    14521452}
     1453.tagcloud ul {
     1454        list-style-type: none;
     1455}
     1456
     1457.tagcloud ul li {
     1458        display: inline-block;
     1459}
     1460
     1461.widget-area .widget.widget_tag_cloud li {
     1462        line-height: 1;
     1463}
     1464.template-front-page .widget-area .widget.widget_tag_cloud li {
     1465        margin: 0;
     1466}
    14531467
    14541468/* =Plugins
    14551469----------------------------------------------- */
     
    14601474        margin: 0 auto 1.714285714rem;
    14611475}
    14621476
    1463 
    14641477/* =Media queries
    14651478-------------------------------------------------------------- */
    14661479