mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54125 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
db0290b042
commit
4b3476530d
@ -48,7 +48,7 @@ class WP_Widget_Links extends WP_Widget {
|
||||
$order = 'rating' === $orderby ? 'DESC' : 'ASC';
|
||||
$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(
|
||||
'title_before' => $args['before_title'],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user