Skip to content

Commit

Permalink
PHP 7.4 compatibility change - replace str_contains
Browse files Browse the repository at this point in the history
  • Loading branch information
borkweb authored Jul 13, 2024
1 parent 63fb44d commit be4448d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Assets/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit be4448d

Please sign in to comment.