Customize: Prevent JS error in Links widget when selective refresh is enabled
This prevents erroneously replacing the `data-customize-partial-id` when only the `id` attribute should be replaced. Props dlh, costdev, nikeo, greenshady. Fixes #39451. Built from https://develop.svn.wordpress.org/trunk@54125 git-svn-id: http://core.svn.wordpress.org/trunk@53684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6937c8d87e
commit
aee27cf6c0
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.1-alpha-54124';
|
$wp_version = '6.1-alpha-54125';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -48,7 +48,7 @@ class WP_Widget_Links extends WP_Widget {
|
||||||
$order = 'rating' === $orderby ? 'DESC' : 'ASC';
|
$order = 'rating' === $orderby ? 'DESC' : 'ASC';
|
||||||
$limit = isset( $instance['limit'] ) ? $instance['limit'] : -1;
|
$limit = isset( $instance['limit'] ) ? $instance['limit'] : -1;
|
||||||
|
|
||||||
$before_widget = preg_replace( '/id="[^"]*"/', 'id="%id"', $args['before_widget'] );
|
$before_widget = preg_replace( '/ id="[^"]*"/', ' id="%id"', $args['before_widget'] );
|
||||||
|
|
||||||
$widget_links_args = array(
|
$widget_links_args = array(
|
||||||
'title_before' => $args['before_title'],
|
'title_before' => $args['before_title'],
|
||||||
|
|
Loading…
Reference in New Issue