| 1 |
<?php |
| 2 |
defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); |
| 3 |
|
| 4 |
$plugins = get_plugins(); |
| 5 |
|
| 6 |
if ( isset( $plugins['wp-rocket/wp-rocket.php'] ) ) { |
| 7 |
return ''; |
| 8 |
} |
| 9 |
|
| 10 |
$notice = 'wp-rocket'; |
| 11 |
$user_id = get_current_user_id(); |
| 12 |
$notices = get_user_meta( $user_id, '_imagify_ignore_ads', true ); |
| 13 |
$notices = $notices && is_array( $notices ) ? array_flip( $notices ) : array(); |
| 14 |
|
| 15 |
if ( isset( $notices[ $notice ] ) ) { |
| 16 |
return; |
| 17 |
} |
| 18 |
|
| 19 |
$discount_percent = '20%'; |
| 20 |
$dismiss_url = wp_nonce_url( admin_url( 'admin-post.php?action=imagify_dismiss_ad&ad=' . $notice ), 'imagify-dismiss-ad' ); |
| 21 |
?> |
| 22 |
|
| 23 |
<div class="imagify-col imagify-sidebar"> |
| 24 |
<div class="imagify-sidebar-section"> |
| 25 |
<p class="imagify-sidebar-title"> |
| 26 |
<?php _e( 'We recommend for you', 'corporate' ); ?> |
| 27 |
</p> |
| 28 |
|
| 29 |
<img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>logo-wprocket.png" srcset="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>logo-wprocket.svg 1x, <?php echo IMAGIFY_ASSETS_IMG_URL; ?>logo-wprocket.svg 2x" alt="WP Rocket" width="232" height="63"> |
| 30 |
|
| 31 |
<p class="imagify-sidebar-description"> |
| 32 |
<?php |
| 33 |
/* translators: 1 is a "bold" tag opening, 2 is the "bold" tag closing. Please use a non-breaking space for WP Rocket. */ |
| 34 |
printf( __( 'WP Rocket is a %1$sspeed optimization plugin for WordPress%2$s helping you to implement a variety of speed-boosting features to your WordPress site.', 'imagify' ), '<strong>', '</strong>' ); |
| 35 |
?> |
| 36 |
</p> |
| 37 |
|
| 38 |
<p> |
| 39 |
<a class="btn btn-rocket" href="<?php echo esc_url( imagify_get_wp_rocket_url() ); ?>" target="_blank"> |
| 40 |
<?php |
| 41 |
/* translators: %s is a percentage. */ |
| 42 |
printf( __( 'Get %s OFF Now!', 'imagify' ), $discount_percent ); |
| 43 |
?> |
| 44 |
</a> |
| 45 |
</p> |
| 46 |
|
| 47 |
<ul> |
| 48 |
<li><?php _e( 'Improve your Google PageSpeed Score.', 'imagify' ); ?></li> |
| 49 |
<li><?php _e( 'Boost your SEO.', 'imagify' ); ?></li> |
| 50 |
<li><?php _e( 'WooCommerce compatibility.', 'imagify' ); ?></li> |
| 51 |
<li><?php _e( 'Immediate results.', 'imagify' ); ?></li> |
| 52 |
</ul> |
| 53 |
|
| 54 |
<a class="imagify-sidebar-close" href="<?php echo esc_url( $dismiss_url ); ?>"><span class="screen-reader-text"><?php _e( 'Remove the ad', 'imagify' ); ?></span><i class="dashicons dashicons-no-alt" aria-hidden="true"></i></a> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
|
| 58 |
<?php |
| 59 |
|