[wp-trac] [WordPress Trac] #27406: Widget Customizer: Organize all widget area sections into a meta customizer section
WordPress Trac
noreply at wordpress.org
Fri Jun 13 05:08:59 UTC 2014
#27406: Widget Customizer: Organize all widget area sections into a meta customizer
section
-------------------------------------------------+-------------------------
Reporter: westonruter | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future
Component: Appearance | Release
Severity: normal | Version: 3.9
Keywords: has-patch dev-feedback needs- | Resolution:
testing | Focuses: ui,
| javascript
-------------------------------------------------+-------------------------
Comment (by westonruter):
I think the customizer accordion should be cleaned up to support nested
sections, so that the sections within a page can be output as child
elements of the `accordion-section-content`, i.e.:
{{{
/**
* Render the page, and the sections that have been added to it.
*
* @since 4.0.0
*/
protected function render() {
?>
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>"
class="control-section control-page accordion-section">
<span class="preview-notice"><?php _e( 'You are editing
your site’s' ); ?></span>
<h3 class="accordion-section-title" tabindex="0"><?php
echo esc_html( $this->title ); ?></h3>
<ul class="accordion-section-content">
<?php if ( ! empty( $this->description ) ) : ?>
<li><p class="description"><?php echo
$this->description; ?></p></li>
<?php endif; ?>
<?php
foreach ( $this->sections as $section ) {
$section->maybe_render();
}
?>
</ul>
</li>
<?php
}
}}}
This would make it much easier to show/hide the pages since they'd all be
logically contained within a common parent `ul` element, following the
page's description if supplied.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27406#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list