Making WordPress.org

Changeset 11652


Ignore:
Timestamp:
03/08/2022 09:04:30 PM (2 years ago)
Author:
ryelle
Message:

Pattern Directory: Sync with git WordPress/pattern-directory@d7f27feb58fcdcf3f9db796b7851f6b2da72988c

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/functions.php

    r11451 r11652  
    55use const WordPressdotorg\Pattern_Directory\Pattern_Post_Type\POST_TYPE;
    66use const WordPressdotorg\Pattern_Directory\Pattern_Flag_Post_Type\POST_TYPE as FLAG_POST_TYPE;
     7
     8require_once __DIR__ . '/includes/inline-styles.php';
    79
    810add_action( 'after_setup_theme', __NAMESPACE__ . '\setup' );
     
    2729 */
    2830function setup() {
    29     add_theme_support( 'post-thumbnails' );
    30 
    3131    // Add gutenberg styling supports.
    3232    add_theme_support( 'align-wide' );
    33     add_theme_support( 'custom-spacing' );
    34     add_theme_support( 'custom-line-height' );
    35     add_theme_support( 'experimental-link-color' );
    3633
    3734    // The parent wporg theme is designed for use on wordpress.org/* and assumes locale-domains are available.
     
    116113 */
    117114function generate_block_editor_styles_html() {
    118     $handles = array( 'wp-block-library' );
     115    wp_enqueue_global_styles();
     116    $handles = array( 'wp-block-library', 'global-styles' );
    119117
    120118    $block_registry = \WP_Block_Type_Registry::get_instance();
     
    147145        'before'
    148146    );
     147
     148    wp_dequeue_style( 'global-styles' );
     149    wp_deregister_style( 'global-styles' );
    149150}
    150151
Note: See TracChangeset for help on using the changeset viewer.