Opened 12 years ago
Closed 12 years ago
#30358 closed defect (bug) (fixed)
Twenty Fifteen: Improve site description handling within the Customizer.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.1 | Priority: | normal |
| Severity: | normal | Version: | 4.1 |
| Component: | Bundled Theme | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
Right now, this is the code that’s used to output site descriptions in Twenty Fifteen:
<?php $description = get_bloginfo( 'description', 'display' ); if ( ! empty( $description ) ) : ?> <p class="site-description"><?php echo esc_html( $description ); ?></p> <?php endif;
That’s nice because junky markup isn’t added into the front-end when a blog description is empty. This is problematic, though, inside of the Customizer when using postMessage.
- Make your site description blank.
- Reload your Customizer.
- Try to add a description into the site.
- Nothing is reflected inside of the customizer.
Because no markup is present for postMessage when a site description is empty we either need to a) revert get_setting( 'blogdescription' )->transport to refresh by removing that line altogether (since refresh is the default) or b) add some logic into header.php that outputs markup when we’re inside of the customizer and a site title is empty.
Attachments (3)
Change History (8)
This ticket was mentioned in Slack in #core-themes by iandstewart. View the logs.
12 years ago
Note: See
TracTickets for help on using
tickets.
Let's do the second option - just change the conditional to
if ( ! empty( $description ) || is_customize_preview() )and we should be good to go.