Commit Graph

2 Commits

Author SHA1 Message Date
Peter Wilson
fd1dfbc113 General: Escape nonce used for block theme activation.
Add `wp_json_encode()` as an escaping function when setting the `WP_BLOCK_THEME_ACTIVATE_NONCE` global on the block theme preview screen.

This account for custom nonce implementations making use of special characters that require escaping in JavaScript strings.

Props antonvlasenko, ramonopoly.
Fixes #58712.


Built from https://develop.svn.wordpress.org/trunk@56218


git-svn-id: http://core.svn.wordpress.org/trunk@55730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-12 05:21:23 +00:00
isabel_brison
bf41190659 General: fix botched file move in r56199.
Moves `src/wp-admin/includes/theme-previews.php` to `src/wp-includes/theme-previews.php`.

Props peterwilsoncc.
See #58712.

Built from https://develop.svn.wordpress.org/trunk@56201


git-svn-id: http://core.svn.wordpress.org/trunk@55713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-11 05:19:23 +00:00