Making WordPress.org

Changeset 12372


Ignore:
Timestamp:
01/27/2023 03:43:26 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Theme Directory: API: Add style-variations tag for WordPress 6.0+.

Props dufresnesteven, poena, joyously, tellyworth.
Fixes #6545. See #WP56869.

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php

    r12339 r12372  
    391391        }
    392392
     393        // See https://core.trac.wordpress.org/ticket/56869.
     394        if ( ! isset( $wp_version ) || version_compare( $wp_version, '6.0-alpha', '>=' ) ) {
     395            $tags[ __( 'Features' ) ]['style-variations'] = __( 'Style Variations' );
     396            asort( $tags[ __( 'Features' ) ] );
     397        }
     398
    393399        // Only return tag slugs, to stay compatible with bbpress-version of Themes API.
    394400        foreach ( $tags as $title => $group ) {
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    r12338 r12372  
    413413                'rtl-language-support'  => __( 'RTL Language Support', 'wporg-themes' ),
    414414                'sticky-post'           => __( 'Sticky Post', 'wporg-themes' ),
     415                'style-variations'      => __( 'Style Variations', 'wporg-themes' ),
    415416                'template-editing'      => __( 'Template Editing', 'wporg-themes' ),
    416417                'theme-options'         => __( 'Theme Options', 'wporg-themes' ),
Note: See TracChangeset for help on using the changeset viewer.