mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
eeefec932f
Introduces some consistency in the usage of the button CSS classes, fixes the focus style for accessibility and responsiveness of the buttons. - Adds the `button` class to all primary buttons make them responsive - Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons - Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary - Adjusts `get_submit_button()` to remove empty items Props iseulde, dimchik, chris_d2d, mhowell, afercia. Fixes #27314, #37138, #37448. Built from https://develop.svn.wordpress.org/trunk@38672 git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
47 lines
965 B
PHP
47 lines
965 B
PHP
<?php
|
|
/**
|
|
* Customize API: WP_Customize_New_Menu_Section class
|
|
*
|
|
* @package WordPress
|
|
* @subpackage Customize
|
|
* @since 4.4.0
|
|
*/
|
|
|
|
/**
|
|
* Customize Menu Section Class
|
|
*
|
|
* Implements the new-menu-ui toggle button instead of a regular section.
|
|
*
|
|
* @since 4.3.0
|
|
*
|
|
* @see WP_Customize_Section
|
|
*/
|
|
class WP_Customize_New_Menu_Section extends WP_Customize_Section {
|
|
|
|
/**
|
|
* Control type.
|
|
*
|
|
* @since 4.3.0
|
|
* @access public
|
|
* @var string
|
|
*/
|
|
public $type = 'new_menu';
|
|
|
|
/**
|
|
* Render the section, and the controls that have been added to it.
|
|
*
|
|
* @since 4.3.0
|
|
* @access protected
|
|
*/
|
|
protected function render() {
|
|
?>
|
|
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section-new-menu">
|
|
<button type="button" class="button add-new-menu-item add-menu-toggle" aria-expanded="false">
|
|
<?php echo esc_html( $this->title ); ?>
|
|
</button>
|
|
<ul class="new-menu-section-content"></ul>
|
|
</li>
|
|
<?php
|
|
}
|
|
}
|