<?php
defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );

$plugins = get_plugins();

if ( isset( $plugins['wp-rocket/wp-rocket.php'] ) ) {
	return '';
}

$notice  = 'wp-rocket';
$user_id = get_current_user_id();
$notices = get_user_meta( $user_id, '_imagify_ignore_ads', true );
$notices = $notices && is_array( $notices ) ? array_flip( $notices ) : array();

if ( isset( $notices[ $notice ] ) ) {
	return;
}

$discount_percent = '20%';
$dismiss_url      = wp_nonce_url( admin_url( 'admin-post.php?action=imagify_dismiss_ad&ad=' . $notice ), 'imagify-dismiss-ad' );
?>

<?php
