Make WordPress Core

Ticket #56990: 56990-inline-style.diff

File 56990-inline-style.diff, 2.0 KB (added by wpgurudev, 18 months ago)

Add inline style on page

  • src/wp-includes/default-filters.php

    diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php
    index 4e6340700c..2345f19059 100644
    a b add_action( 'wp_default_scripts', 'wp_default_packages' ); 
    557557
    558558add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
    559559add_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
    560 add_action( 'wp_enqueue_scripts', 'wp_enqueue_classic_theme_styles' );
     560add_action( 'wp_head', 'wp_enqueue_classic_theme_styles' );
    561561add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
    562562add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
    563563add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' );
  • src/wp-includes/script-loader.php

    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    index de52578936..1af6c0364f 100644
    a b function _wp_theme_json_webfonts_handler() { 
    36673667 * @since 6.1.0
    36683668 */
    36693669function wp_enqueue_classic_theme_styles() {
    3670         if ( ! wp_theme_has_theme_json() ) {
    3671                 $suffix = wp_scripts_get_suffix();
    3672                 wp_register_style( 'classic-theme-styles', '/' . WPINC . "/css/classic-themes$suffix.css", array(), true );
    3673                 wp_enqueue_style( 'classic-theme-styles' );
     3670        if ( ! wp_theme_has_theme_json() ) {?>
     3671                <style>
     3672                        .wp-block-button__link {
     3673                        color: #ffffff;
     3674                        background-color: #32373c;
     3675                        border-radius: 9999px; /* 100% causes an oval, but any explicit but really high value retains the pill shape. */
     3676                        /* This needs a low specificity so it won't override the rules from the button element if defined in theme.json. */
     3677                        box-shadow: none;
     3678                        text-decoration: none;
     3679                        /* The extra 2px are added to size solids the same as the outline versions.*/
     3680                        padding: calc(0.667em + 2px) calc(1.333em + 2px);
     3681                        font-size: 1.125em;
     3682                }
     3683                </style>
     3684                <?php
    36743685        }
    36753686}
    36763687