Make WordPress Core

Ticket #37231: 37231.5.diff

File 37231.5.diff, 2.3 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..1bc7d92 100644
    a b span.wp-media-buttons-icon:before { 
    616616        position: absolute;
    617617}
    618618
    619 #poststuff h3.hndle, /* Back-compat for pre-4.4 */
     619#poststuff .hndle,
    620620#poststuff .stuffbox > h3, /* Back-compat for pre-4.4 */
    621621#poststuff h2 {
    622622        font-size: 14px;
  • wp-admin/includes/template.php

    diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
    index cc590e3..66b4024 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 $args parameter with support for the $heading_level arg.
    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 array            $args    {
     990 *        Other args.
     991 *
     992 *        @param int $heading_level What level heading to use for the meta box titles. Default is 2 (h2).
     993 * }
    988994 * @return int number of meta_boxes
    989995 */
    990 function do_meta_boxes( $screen, $context, $object ) {
     996function do_meta_boxes( $screen, $context, $object, $args = array() ) {
    991997        global $wp_meta_boxes;
    992998        static $already_sorted = false;
    993999
     1000        $args = array_merge( array( 'heading_level' => 2 ), $args );
     1001
     1002        if ( $args['heading_level'] < 1 || $args['heading_level'] > 6 ) {
     1003                $args['heading_level'] = 2;
     1004        }
     1005
    9941006        if ( empty( $screen ) )
    9951007                $screen = get_current_screen();
    9961008        elseif ( is_string( $screen ) )
    function do_meta_boxes( $screen, $context, $object ) { 
    10321044                                                echo '<span class="toggle-indicator" aria-hidden="true"></span>';
    10331045                                                echo '</button>';
    10341046                                        }
    1035                                         echo "<h2 class='hndle'><span>{$box['title']}</span></h2>\n";
     1047                                        echo "<h{$args['heading_level']} class='hndle'><span>{$box['title']}</span></h{$args['heading_level']}>\n";
    10361048                                        echo '<div class="inside">' . "\n";
    10371049                                        call_user_func($box['callback'], $object, $box);
    10381050                                        echo "</div>\n";