mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@53012 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -11,7 +11,7 @@ class Tests_Block_Supports_Elements extends WP_UnitTestCase {
|
||||
* @return string String where the unique id classes were replaced with "wp-elements-1".
|
||||
*/
|
||||
private static function make_unique_id_one( $string ) {
|
||||
return preg_replace( '/wp-elements-.{13}/', 'wp-elements-1', $string );
|
||||
return preg_replace( '/wp-elements-\d+/', 'wp-elements-1', $string );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user