/
var/
www/
html/
wp-content/
plugins/
imsanity/
OS : Linux
PHP Version : 7.4.33
Software : Apache/2.4.6 (CentOS) PHP/7.4.33
Information System : Linux apprendre2 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Disable Function : ';
if ( false && function_exists( 'print_r' ) ) {
$print_meta = print_r( $meta, true );
$print_meta = preg_replace( array( '/ /', '/\n+/' ), array( ' ', '
' ), $print_meta );
echo "" . wp_kses_post( $print_meta ) . '
';
}
if ( is_array( $meta ) && ! empty( $meta['file'] ) && false !== strpos( $meta['file'], 'https://images-na.ssl-images-amazon.com' ) ) {
echo esc_html__( 'Amazon-hosted image', 'imsanity' ) . '
';
return;
}
if ( is_array( $meta ) && ! empty( $meta['cloudinary'] ) ) {
echo esc_html__( 'Cloudinary image', 'imsanity' ) . '
';
return;
}
if ( is_array( $meta ) & class_exists( 'WindowsAzureStorageUtil' ) && ! empty( $meta['url'] ) ) {
echo '
' . esc_html__( 'Azure Storage image', 'imsanity' ) . '
';
return;
}
if ( is_array( $meta ) && class_exists( 'Amazon_S3_And_CloudFront' ) && preg_match( '/^(http|s3|gs)\w*:/', get_attached_file( $id ) ) ) {
echo '
' . esc_html__( 'Offloaded Media', 'imsanity' ) . '
';
return;
}
if ( is_array( $meta ) && class_exists( 'S3_Uploads' ) && preg_match( '/^(http|s3|gs)\w*:/', get_attached_file( $id ) ) ) {
echo '
' . esc_html__( 'Amazon S3 image', 'imsanity' ) . '
';
return;
}
if ( is_array( $meta ) & class_exists( 'wpCloud\StatelessMedia' ) && ! empty( $meta['gs_link'] ) ) {
echo '
' . esc_html__( 'WP Stateless image', 'imsanity' ) . '
';
return;
}
$file_path = imsanity_attachment_path( $meta, $id );
if ( is_array( $meta ) & function_exists( 'ilab_get_image_sizes' ) && ! empty( $meta['s3'] ) && empty( $file_path ) ) {
echo esc_html__( 'Media Cloud image', 'imsanity' ) . '
';
return;
}
// If the file does not exist.
if ( empty( $file_path ) ) {
echo esc_html__( 'Could not retrieve file path.', 'imsanity' ) . '
';
return;
}
// Let folks filter the allowed mime-types for resizing.
$allowed_types = apply_filters( 'imsanity_allowed_mimes', array( 'image/png', 'image/gif', 'image/jpeg' ), $file_path );
if ( is_string( $allowed_types ) ) {
$allowed_types = array( $allowed_types );
} elseif ( ! is_array( $allowed_types ) ) {
$allowed_types = array();
}
$ftype = imsanity_quick_mimetype( $file_path );
if ( ! in_array( $ftype, $allowed_types, true ) ) {
echo '