Changeset 55726 for trunk/src/wp-includes/compat.php
- Timestamp:
- 05/07/2023 11:42:18 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/compat.php
r55136 r55726 435 435 * 436 436 * @param string $haystack The string to search in. 437 * @param string $needle The substring to search for in the haystack.437 * @param string $needle The substring to search for in the `$haystack`. 438 438 * @return bool True if `$needle` is in `$haystack`, otherwise false. 439 439 */ 440 440 function str_contains( $haystack, $needle ) { 441 return ( '' === $needle || false !== strpos( $haystack, $needle ) ); 441 if ( '' === $needle ) { 442 return true; 443 } 444 445 return false !== strpos( $haystack, $needle ); 442 446 } 443 447 }
Note: See TracChangeset
for help on using the changeset viewer.