rebase code on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:51:46 -04:00
parent b16ad94b69
commit 8f1a2c3a66
2197 changed files with 184921 additions and 35568 deletions

View File

@@ -259,23 +259,12 @@ function wpcf7_is_file_path_in_content_dir( $path ) {
return false;
}
if (
str_starts_with( $path, trailingslashit( realpath( WP_CONTENT_DIR ) ) )
) {
if ( 0 === strpos( $path, realpath( WP_CONTENT_DIR ) ) ) {
return true;
}
if (
defined( 'UPLOADS' ) and
str_starts_with( $path, trailingslashit( realpath( ABSPATH . UPLOADS ) ) )
) {
return true;
}
if (
defined( 'WP_TEMP_DIR' ) and
str_starts_with( $path, trailingslashit( realpath( WP_TEMP_DIR ) ) )
) {
if ( defined( 'UPLOADS' )
and 0 === strpos( $path, realpath( ABSPATH . UPLOADS ) ) ) {
return true;
}