Make WordPress Core


Ignore:
Timestamp:
03/29/2022 01:04:24 PM (3 years ago)
Author:
audrasjb
Message:

Editor: Use wp_unique_id() instead of uniqid() to generate CSS class names.

Backports changes from https://github.com/WordPress/gutenberg/pull/38891.
See https://github.com/WordPress/gutenberg/issues/38889.

Props westonruter, mamaduka.
See #55474.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-supports/duotone.php

    r52768 r53012  
    521521
    522522    $filter_preset   = array(
    523         'slug'   => uniqid(),
     523        'slug'   => wp_unique_id( sanitize_key( implode( '-', $block['attrs']['style']['color']['duotone'] ) . '-' ) ),
    524524        'colors' => $block['attrs']['style']['color']['duotone'],
    525525    );
Note: See TracChangeset for help on using the changeset viewer.