Make WordPress Core


Ignore:
Timestamp:
03/29/2022 01:07:07 PM (5 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.
Merges [53012] to the 5.9 branch.
See #55474.

Location:
branches/5.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

  • branches/5.9/src/wp-includes/block-supports/duotone.php

    r52769 r53013  
    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.