Make WordPress Core


Ignore:
Timestamp:
07/18/2013 05:42:53 PM (13 years ago)
Author:
markjaquith
Message:

Fixes and tweaks for the metabox accordion.

  • Fixed hover issues in Customizer.
  • Toned down the default active/hover style (as it is normally not the top level menu, and should not be so prominent).
  • Allow the active section to be closed.
  • Other misc fixes.

Props ocean90, helen. Fixes #23449.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r24680 r24734  
    10011001        <?php
    10021002        $i = 0;
     1003        $first_open = false;
    10031004        do {
    10041005                if ( ! isset( $wp_meta_boxes ) || ! isset( $wp_meta_boxes[$page] ) || ! isset( $wp_meta_boxes[$page][$context] ) )
    … …  
    10121013                                        $i++;
    10131014                                        $hidden_class = in_array( $box['id'], $hidden ) ? 'hide-if-js' : '';
     1015
     1016                                        $open_class = '';
     1017                                        if ( ! $first_open && empty( $hidden_class ) ) {
     1018                                                $first_open = true;
     1019                                                $open_class = 'open';
     1020                                        }
    10141021                                        ?>
    1015                                         <li class="control-section accordion-section <?php echo $hidden_class; ?> <?php echo esc_attr( $box['id'] ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>">
     1022                                        <li class="control-section accordion-section <?php echo $hidden_class; ?> <?php echo $open_class; ?> <?php echo esc_attr( $box['id'] ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>">
    10161023                                                <h3 class="accordion-section-title hndle" tabindex="0" title="<?php echo esc_attr( $box['title'] ); ?>"><?php echo esc_html( $box['title'] ); ?></h3>
    10171024                                                <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>">
Note: See TracChangeset for help on using the changeset viewer.