Changeset 57985 for trunk/src/wp-includes/compat.php
- Timestamp:
- 04/11/2024 09:09:49 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/compat.php
r57524 r57985 360 360 } 361 361 362 if ( ! function_exists( 'is_iterable' ) ) {363 /**364 * Polyfill for is_iterable() function added in PHP 7.1.365 *366 * Verify that the content of a variable is an array or an object367 * implementing the Traversable interface.368 *369 * @since 4.9.6370 *371 * @param mixed $value The value to check.372 * @return bool True if `$value` is iterable, false otherwise.373 */374 function is_iterable( $value ) {375 return ( is_array( $value ) || $value instanceof Traversable );376 }377 }378 379 362 if ( ! function_exists( 'array_key_first' ) ) { 380 363 /** … … 521 504 } 522 505 523 // IMAGETYPE_WEBP constant is only defined in PHP 7.1 or later.524 if ( ! defined( 'IMAGETYPE_WEBP' ) ) {525 define( 'IMAGETYPE_WEBP', 18 );526 }527 528 // IMG_WEBP constant is only defined in PHP 7.0.10 or later.529 if ( ! defined( 'IMG_WEBP' ) ) {530 define( 'IMG_WEBP', IMAGETYPE_WEBP );531 }532 533 506 // IMAGETYPE_AVIF constant is only defined in PHP 8.x or later. 534 507 if ( ! defined( 'IMAGETYPE_AVIF' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.