WordPress/wp-includes/rest-api
Peter Wilson dd21bf5f22 General: Introduce `wp_get_wp_version()` to get unmodified version.
Introduces `wp_get_wp_version()` to get an unmodified value of `$wp_version` from `wp-includes/version.php`. Some plugins modify the global in an attempt to improve security through obscurity. This practice can cause errors in WordPress so the ability to get an unmodified version is needed.

Replaces instances within the code base in which `version.php` was required in order to get an unmodified value. `script-loader.php` is intentionally excluded from the replacements as the function is not always available to the file.

Props debarghyabanerjee, afragen, costdev.
See #61627.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-27 00:27:16 +00:00
..
endpoints General: Introduce `wp_get_wp_version()` to get unmodified version. 2024-07-27 00:27:16 +00:00
fields REST API: Improve error handling in REST meta fields 2024-02-13 09:57:08 +00:00
search REST API: Remove post status prefix from REST API responses. 2024-07-23 07:51:12 +00:00
class-wp-rest-request.php Docs: Fix typos in various REST API DocBlocks and comments. 2024-07-11 06:24:17 +00:00
class-wp-rest-response.php Coding Standards: Always use parentheses when instantiating an object. 2022-11-29 15:51:14 +00:00
class-wp-rest-server.php REST API: Correct variable type in `WP_Rest_Server::serve_batch_request_v1()`. 2024-07-08 13:25:18 +00:00