Customize: Move control's fallback selection of default content template to renderContent method to align with sections and panels.

* Only use default control content template when a more specific template doesn't exist.
* Remove extraneous whitespace from being output in `WP_Customize_Control::render()` method.
* Move Custom Header template printing to `customize_controls_print_footer_scripts` action.

See #30738.


git-svn-id: https://develop.svn.wordpress.org/trunk@41935 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2017-10-19 03:03:19 +00:00
parent b1f20b6763
commit 1c04006909
4 changed files with 38 additions and 32 deletions
+1 -1
View File
@@ -421,7 +421,7 @@ class Tests_WP_Customize_Widgets extends WP_UnitTestCase {
$params = $control->json();
$this->assertEquals( 'widget_form', $params['type'] );
$this->assertRegExp( '#^<li[^>]+>\s+</li>$#', $params['content'] );
$this->assertRegExp( '#^<li[^>]+>\s*</li>$#', $params['content'] );
$this->assertRegExp( '#^<div[^>]*class=\'widget\'[^>]*#s', $params['widget_control'] );
$this->assertContains( '<div class="widget-content"></div>', $params['widget_control'] );
$this->assertNotContains( '<input class="widefat"', $params['widget_control'] );