Skip to content

Commit

Permalink
Bootstrap/Load: Give more context and warning about editing compat.php.
Browse files Browse the repository at this point in the history
As indicated by name, this is a compatibility file which warrants more care to begin with, but it's still worth warning folks about how narrow function availability is in this file.

Props jorbin, dmsnell, helen.
See #61694.


git-svn-id: https://develop.svn.wordpress.org/trunk@59043 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
helen committed Sep 17, 2024
1 parent 8f6ec89 commit 36f6f64
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/wp-includes/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
/**
* WordPress implementation for PHP functions either missing from older PHP versions or not included by default.
*
* This file is loaded extremely early and the functions can be relied upon by drop-ins.
* Ergo, please ensure you do not rely on external functions when writing code for this file.
* Only use functions built into PHP or are defined in this file and have adequate testing
* and error suppression to ensure the file will run correctly and not break websites.
*
* @package PHP
* @access private
*/
Expand Down

0 comments on commit 36f6f64

Please sign in to comment.