Customize: Ensure id for section and panel is passed among params to respective templates.

Fixes issue where JS-added Publish Settings section failed to get container element ID set properly to hide its section-meta.

Amends [42025].
See #42337, #42083.

Built from https://develop.svn.wordpress.org/trunk@42035


git-svn-id: http://core.svn.wordpress.org/trunk@41869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-10-28 06:37:47 +00:00
parent 685e3c1a67
commit 84b969efea
3 changed files with 13 additions and 7 deletions

View File

@ -1302,7 +1302,10 @@
template = wp.template( 'customize-' + container.containerType + '-default' );
}
if ( template && container.container ) {
return $.trim( template( container.params ) );
return $.trim( template( _.extend(
{ id: container.id },
container.params
) ) );
}
return '<li></li>';
@ -2968,7 +2971,10 @@
template = wp.template( 'customize-panel-default-content' );
}
if ( template && panel.headContainer ) {
panel.contentContainer.html( template( panel.params ) );
panel.contentContainer.html( template( _.extend(
{ id: panel.id },
panel.params
) ) );
}
}
});

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta4-42034';
$wp_version = '4.9-beta4-42035';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.