Make WordPress Core

Ticket #37231: 37231.4.diff

File 37231.4.diff, 2.1 KB (added by jdgrimes, 7 years ago)

Patch from https://github.com/WordPress/WordPress/pull/220

  • wp-admin/css/edit.css

    diff --git a/wp-admin/css/edit.css b/wp-admin/css/edit.css
    index bbdb79d..03dc9b7 100644
    a b span.wp-media-buttons-icon:before { 
    618618
    619619#poststuff h3.hndle, /* Back-compat for pre-4.4 */
    620620#poststuff .stuffbox > h3, /* Back-compat for pre-4.4 */
     621#poststuff h1.hndle,
     622#poststuff h4.hndle,
     623#poststuff h5.hndle,
     624#poststuff h6.hndle,
    621625#poststuff h2 {
    622626        font-size: 14px;
    623627        padding: 8px 12px;
  • wp-admin/includes/template.php

    diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
    index cc590e3..a1fdb18 100644
    a b function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advan 
    978978 * Meta-Box template function
    979979 *
    980980 * @since 2.5.0
     981 * @since 4.6.0 Added the $heading_level parameter.
    981982 *
    982983 * @global array $wp_meta_boxes
    983984 *
    function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advan 
    985986 * @param string|WP_Screen $screen  Screen identifier
    986987 * @param string           $context box context
    987988 * @param mixed            $object  gets passed to the box callback function as first parameter
     989 * @param int              $heading_level What level heading to use for the meta box titles.
    988990 * @return int number of meta_boxes
    989991 */
    990 function do_meta_boxes( $screen, $context, $object ) {
     992function do_meta_boxes( $screen, $context, $object, $heading_level = 2 ) {
    991993        global $wp_meta_boxes;
    992994        static $already_sorted = false;
    993995
     996        if ( $heading_level < 1 || $heading_level > 6 ) {
     997                $heading_level = 2;
     998        }
     999
    9941000        if ( empty( $screen ) )
    9951001                $screen = get_current_screen();
    9961002        elseif ( is_string( $screen ) )
    function do_meta_boxes( $screen, $context, $object ) { 
    10321038                                                echo '<span class="toggle-indicator" aria-hidden="true"></span>';
    10331039                                                echo '</button>';
    10341040                                        }
    1035                                         echo "<h2 class='hndle'><span>{$box['title']}</span></h2>\n";
     1041                                        echo "<h{$heading_level} class='hndle'><span>{$box['title']}</span></h{$heading_level}>\n";
    10361042                                        echo '<div class="inside">' . "\n";
    10371043                                        call_user_func($box['callback'], $object, $box);
    10381044                                        echo "</div>\n";