Commit Graph

6 Commits

Author SHA1 Message Date
isabel_brison
cf50fd40f5 Themes: fix documentation link.
Removes a period from an inline comment of `wp_block_theme_activate_nonce` that broke a link in the comment.

Props stevenlinx, mukesh27.
Fixes #60034.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-08 06:32:24 +00:00
Sergey Biryukov
747b2c9f11 Docs: Replace incorrect @private tags.
The `@private` tag does not exist and is not supported. To indicate that something is private when in the global namespace, `@access private` should be used instead.

Reference: [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#phpdoc-tags PHP Documentation Standards: PHPDoc tags].

Props jrf.
See #59651.
Built from https://develop.svn.wordpress.org/trunk@57065


git-svn-id: http://core.svn.wordpress.org/trunk@56576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-11-06 09:27:23 +00:00
danielbachhuber
e249e1aa28 Editor: Add function prefix to avoid conflicts.
Transforms `initialize_theme_preview_hooks` to `wp_initialize_theme_preview_hooks` to avoid conflicts with third-party code.

Follow up to [56529].

Props okat.
See #59000.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-02 22:42:24 +00:00
Andrew Ozz
91167c488d Editor: Prevent possibility of a fatal error when previewing block themes.
Ensures that preview callbacks attached to the `stylesheet` and `template` filters do not run before `pluggable.php` has been included. These callbacks need functionality from `pluggable.php`.

Props: scruffian, johnbillion, SergeyBiryukov, okat, okat.
Fixes: #59000.
Built from https://develop.svn.wordpress.org/trunk@56529


git-svn-id: http://core.svn.wordpress.org/trunk@56041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-09-06 21:48:17 +00:00
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