Commit Graph

5 Commits

Author SHA1 Message Date
Sergey Biryukov
f84e228196 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57065 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-06 09:25:02 +00:00
Daniel Bachhuber
a1852bd49b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@56757 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-02 22:40:36 +00:00
Andrew Ozz
e14213ebe9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56529 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-06 21:46:09 +00:00
Peter Wilson
44173677fa 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@56218 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-12 05:19:39 +00:00
Isabel Brison
eea94adc54 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@56201 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-11 05:17:56 +00:00