Merged in feature/from-pantheon (pull request #16)

code from pantheon

* code from pantheon
This commit is contained in:
Tony Volpe
2024-01-10 17:03:02 +00:00
parent 054b4fffc9
commit 4eb982d7a8
16492 changed files with 3475854 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
if ( defined( 'IS_PRESSABLE' ) ) :
add_filter( 'imagify_site_root', 'imagify_pressable_site_root', IMAGIFY_INT_MAX );
/**
* Filter the path to the site's root.
*
* @since 1.9.4
* @author Grégory Viguier
*
* @param string|null $root_path Path to the site's root. Default is null.
* @return string
*/
function imagify_pressable_site_root( $root_path ) {
$upload_basedir = trim( wp_normalize_path( WP_CONTENT_DIR ), '/' );
$upload_basedir = explode( '/', $upload_basedir );
$upload_basedir = reset( $upload_basedir );
return '/' . $upload_basedir . '/';
}
endif;