Make WordPress Core

Ticket #46743: 46743.1.diff

File 46743.1.diff, 5.7 KB (added by whyisjake, 7 years ago)

Explicitly declare the theme supports in the function files of the existing themes.

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

     
    284284
    285285                // Indicate widget sidebars can use selective refresh in the Customizer.
    286286                add_theme_support( 'customize-selective-refresh-widgets' );
     287
     288                // Use the new body-open hook introduced in WordPress 5.2
     289                add_theme_support( 'body-open' );
    287290        }
    288291endif; // twentyeleven_setup
    289292
  • src/wp-content/themes/twentyfifteen/functions.php

     
    165165                        )
    166166                );
    167167
     168                // Add support for the body-open tag introduced in 5.2
     169                add_theme_support( 'body-open' );
     170
    168171                /*
    169172                 * This theme styles the visual editor to resemble the theme style,
    170173                 * specifically font, colors, icons, and column width.
  • src/wp-content/themes/twentyfourteen/functions.php

     
    7373                // Load regular editor styles into the new block-based editor.
    7474                add_theme_support( 'editor-styles' );
    7575
     76                // Add support for the body-open tag introduced in 5.2
     77                add_theme_support( 'body-open' );
     78
    7679                // Load default block styles.
    7780                add_theme_support( 'wp-block-styles' );
    7881
  • src/wp-content/themes/twentynineteen/functions.php

     
    3737                // Add default posts and comments RSS feed links to head.
    3838                add_theme_support( 'automatic-feed-links' );
    3939
     40                // Add support for the body-open tag introduced in 5.2
     41                add_theme_support( 'body-open' );
     42
    4043                /*
    4144                 * Let WordPress manage the document title.
    4245                 * By adding theme support, we declare that this theme does not use a
  • src/wp-content/themes/twentyseventeen/functions.php

     
    3636        // Add default posts and comments RSS feed links to head.
    3737        add_theme_support( 'automatic-feed-links' );
    3838
     39        // Add support for the body-open tag introduced in 5.2
     40        add_theme_support( 'body-open' );
     41
    3942        /*
    4043         * Let WordPress manage the document title.
    4144         * By adding theme support, we declare that this theme does not use a
  • src/wp-content/themes/twentysixteen/functions.php

     
    5656                // Add default posts and comments RSS feed links to head.
    5757                add_theme_support( 'automatic-feed-links' );
    5858
     59                // Add support for the body-open tag introduced in 5.2
     60                add_theme_support( 'body-open' );
     61
    5962                /*
    6063                 * Let WordPress manage the document title.
    6164                 * By adding theme support, we declare that this theme does not use a
  • src/wp-content/themes/twentythirteen/functions.php

     
    8080        // Load regular editor styles into the new block-based editor.
    8181        add_theme_support( 'editor-styles' );
    8282
     83        // Add support for the body-open tag introduced in 5.2
     84        add_theme_support( 'body-open' );
     85
    8386        // Load default block styles.
    8487        add_theme_support( 'wp-block-styles' );
    8588
  • src/wp-content/themes/twentytwelve/functions.php

     
    5757        // This theme styles the visual editor with editor-style.css to match the theme style.
    5858        add_editor_style();
    5959
     60        // Add support for the body-open tag introduced in 5.2
     61        add_theme_support( 'body-open' );
     62
    6063        // Load regular editor styles into the new block-based editor.
    6164        add_theme_support( 'editor-styles' );
    6265
  • src/wp-includes/theme.php

     
    23272327 * @since 5.0.0 The `responsive-embeds`, `align-wide`, `dark-editor-style`, `disable-custom-colors`,
    23282328 *              `disable-custom-font-sizes`, `editor-color-pallete`, `editor-font-sizes`,
    23292329 *              `editor-styles`, and `wp-block-styles` features were added.
     2330 * @since 5.2.0 The `body-open` feature was added.
    23302331 *
    23312332 * @global array $_wp_theme_features
    23322333 *
     
    23332334 * @param string $feature  The feature being added. Likely core values include 'post-formats',
    23342335 *                         'post-thumbnails', 'html5', 'custom-logo', 'custom-header-uploads',
    23352336 *                         'custom-header', 'custom-background', 'title-tag', 'starter-content',
    2336  *                         'responsive-embeds', etc.
     2337 *                         'responsive-embeds', 'body-open' etc.
    23372338 * @param mixed  $args,... Optional extra arguments to pass along with certain features.
    23382339 * @return void|bool False on failure, void otherwise.
    23392340 */