Making WordPress.org

Ticket #5212: 5212.diff

File 5212.diff, 2.5 KB (added by dingo_d, 4 years ago)

Added new tags to the themes API

  • wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php

    diff --git wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php
    index 075daf04a..622b960af 100644
    class Themes_API { 
    295295
    296296                // Pending https://core.trac.wordpress.org/ticket/46272
    297297                if ( ! isset( $wp_version ) || version_compare( $wp_version, '5.2-alpha', '>=' ) ) {
    298                         $tags[ __( 'Layout' ) ]['wide-blocks']    = __( 'Wide Blocks' );
    299                         $tags[ __( 'Features' ) ]['block-styles'] = __( 'Block Editor Styles' );
     298                        $tags[ __( 'Layout' ) ]['wide-blocks']         = __( 'Wide Blocks' );
     299                        $tags[ __( 'Features' ) ]['block-styles']      = __( 'Block Editor Styles' );
     300                        $tags[ __( 'Features' ) ]['block-patterns']    = __( 'Block Editor Patterns' );
     301                        $tags[ __( 'Features' ) ]['full-site-editing'] = __( 'Full Site Editing Feature' );
    300302                        asort( $tags[ __( 'Features' ) ] ); // To move block-styles to the right place.
    301303                }
    302304
  • wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
    index c69069485..a52d3dd5d 100644
    function wporg_themes_get_feature_list( $include = 'active' ) { 
    335335                        ),
    336336                        __( 'Features', 'wporg-themes' ) => array(
    337337                                'accessibility-ready'   => __( 'Accessibility Ready', 'wporg-themes' ),
     338                                'block-patterns'        => __( 'Block Editor Patterns', 'wporg-themes' ),
    338339                                'block-styles'          => __( 'Block Editor Styles', 'wporg-themes' ),
    339340                                'buddypress'            => __( 'BuddyPress', 'wporg-themes' ),
    340341                                'custom-background'     => __( 'Custom Background', 'wporg-themes' ),
    function wporg_themes_get_feature_list( $include = 'active' ) { 
    348349                                'flexible-header'       => __( 'Flexible Header', 'wporg-themes' ),
    349350                                'footer-widgets'        => __( 'Footer Widgets', 'wporg-themes' ),
    350351                                'front-page-post-form'  => __( 'Front Page Posting', 'wporg-themes' ),
     352                                'full-site-editing'     => __( 'Full Site Editing Feature', 'wporg-themes' ),
    351353                                'full-width-template'   => __( 'Full Width Template', 'wporg-themes' ),
    352354                                'microformats'          => __( 'Microformats', 'wporg-themes' ),
    353355                                'post-formats'          => __( 'Post Formats', 'wporg-themes' ),