WordPress.org

Make WordPress Core

Ticket #19736: revised-body-class-defaults.patch

File revised-body-class-defaults.patch, 805 bytes (added by cais, 6 years ago)

Uses get_option versus get_theme_data

  • wp-includes/post-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    536536                        $classes[] = 'post-type-paged-' . $page;
    537537        }
    538538
     539    /** Add child-theme-<Name> to default body classes */
     540    if ( is_child_theme() ) {
     541        $classes[] = 'child-theme-' . sanitize_html_class( get_option( 'stylesheet' ) );
     542    }
     543
     544    /** Add theme-<Name> to default body classes */
     545    $classes[] = 'theme-' . sanitize_html_class( get_option( 'template' ) );
     546
    539547        if ( ! empty( $class ) ) {
    540548                if ( !is_array( $class ) )
    541549                        $class = preg_split( '#\s+#', $class );