diff --git a/src/wp-includes/compat.php b/src/wp-includes/compat.php index d51b37cfbf..696642f8d2 100644 --- a/src/wp-includes/compat.php +++ b/src/wp-includes/compat.php @@ -488,7 +488,7 @@ if ( ! function_exists( 'str_ends_with' ) ) { $len = strlen( $needle ); - return $needle === substr( $haystack, -$len, $len ); + return substr( $haystack, -$len, $len ) === $needle; } }