Making WordPress.org


Ignore:
Timestamp:
05/14/2020 02:39:27 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Theme Directory: API: Add full-site-editing and block-patterns tags for WordPress 5.5+.

Props dingo_d.
Fixes #5212. See #WP50164.

File:
1 edited

Legend:

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

    r9590 r9876  
    294294        }
    295295
    296         // Pending https://core.trac.wordpress.org/ticket/46272
     296        // See https://core.trac.wordpress.org/ticket/46272.
    297297        if ( ! isset( $wp_version ) || version_compare( $wp_version, '5.2-alpha', '>=' ) ) {
    298298            $tags[ __( 'Layout' ) ]['wide-blocks']    = __( 'Wide Blocks' );
    299299            $tags[ __( 'Features' ) ]['block-styles'] = __( 'Block Editor Styles' );
    300300            asort( $tags[ __( 'Features' ) ] ); // To move block-styles to the right place.
     301        }
     302
     303        // See https://core.trac.wordpress.org/ticket/50164.
     304        if ( ! isset( $wp_version ) || version_compare( $wp_version, '5.5-alpha', '>=' ) ) {
     305            $tags[ __( 'Features' ) ]['block-patterns']    = __( 'Block Editor Patterns' );
     306            $tags[ __( 'Features' ) ]['full-site-editing'] = __( 'Full Site Editing' );
     307            asort( $tags[ __( 'Features' ) ] );
    301308        }
    302309
Note: See TracChangeset for help on using the changeset viewer.