From be4448d4e54396b1dac5c3aef87a260e2311a20e Mon Sep 17 00:00:00 2001 From: Matthew Batchelder Date: Sat, 13 Jul 2024 18:33:19 -0400 Subject: [PATCH] PHP 7.4 compatibility change - replace str_contains --- src/Assets/Asset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Assets/Asset.php b/src/Assets/Asset.php index f7abc8f..30d52c0 100644 --- a/src/Assets/Asset.php +++ b/src/Assets/Asset.php @@ -524,7 +524,7 @@ public function call_after_enqueue( $callable ) { * @return static */ public function add_localize_script( string $object_name, $data ) { - if ( str_contains( $object_name, '.' ) ) { + if ( strpos( $object_name, '.' ) !== false ) { $this->custom_localize_script_objects[] = [ $object_name, $data ]; } else { $this->wp_localize_script_objects[ $object_name ] = $data;