Make WordPress Core

Changeset 54125


Ignore:
Timestamp:
09/11/2022 09:55:28 PM (2 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-links.php

    r49108 r54125  
    4949        $limit            = isset( $instance['limit'] ) ? $instance['limit'] : -1;
    5050
    51         $before_widget = preg_replace( '/id="[^"]*"/', 'id="%id"', $args['before_widget'] );
     51        $before_widget = preg_replace( '/ id="[^"]*"/', ' id="%id"', $args['before_widget'] );
    5252
    5353        $widget_links_args = array(
Note: See TracChangeset for help on using the changeset viewer.