: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
* Plugin compatibility for Amazon S3 Offload
* @link https://wordpress.org/plugins/amazon-s3-and-cloudfront/
class ET_Builder_Plugin_Compat_WP_Offload_S3 extends ET_Builder_Plugin_Compat_Base {
$this->plugin_id = 'amazon-s3-and-cloudfront/wordpress-s3.php';
* Hook methods to WordPress
* Latest plugin version: 1.1.6
// Bail if there's no version found
if ( ! $this->get_plugin_version() ) {
// Up to: latest theme version
add_action( 'et_fb_ajax_save_verification_result', array( $this, 'override_fb_ajax_save_verification' ) );
// Filter attachment IDs for images with an external/CDN URL.
add_filter( 'et_get_attachment_id_by_url_pre', array( $this, 'et_get_attachment_id_by_url_pre' ), 10, 2 );
* @param bool $verification
function override_fb_ajax_save_verification( $verification ) {
* Filter attachment ID in case it has an external/CDN URL.
* @param bool|int $attachment_id_pre Default value. Default is false.
* @param string $url URL of the image need to query.
public function et_get_attachment_id_by_url_pre( $attachment_id_pre, $url ) {
$as3cf_s3_to_local = new AS3CF_S3_To_Local( $as3cf );
$attachment_id = $as3cf_s3_to_local->get_attachment_id_from_url( $url );
return $attachment_id_pre;
new ET_Builder_Plugin_Compat_WP_Offload_S3();