meta-box.php
123 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Pro features meta box. |
| 4 | * |
| 5 | * @package WP_Smush |
| 6 | */ |
| 7 | |
| 8 | use Smush\Core\Helper; |
| 9 | |
| 10 | if ( ! defined( 'WPINC' ) ) { |
| 11 | die; |
| 12 | } |
| 13 | |
| 14 | ?> |
| 15 | |
| 16 | <div class="smush-pro-features-header"> |
| 17 | <div> |
| 18 | <h2><?php esc_html_e( 'Optimize unlimited images with Smush Pro', 'wp-smushit' ); ?></h2> |
| 19 | <p class="sui-description"><?php esc_html_e( 'Get Smush Pro and bulk optimize every image you’ve ever added to your site with one-click and fix your Google PageSpeed with the best image optimizer WordPress has ever known. Upgrade to unlock all Pro features today!', 'wp-smushit' ); ?></p> |
| 20 | <div> |
| 21 | <a href="<?php echo esc_url( Helper::get_url( 'smush-advanced-settings-video-button' ) ); ?>" target="_blank" class="sui-button sui-button-purple"> |
| 22 | <?php esc_html_e( 'Try Pro for Free', 'wp-smushit' ); ?> |
| 23 | </a> |
| 24 | <div> |
| 25 | <button role="button" class="sui-button sui-button-ghost sui-button-purple" id="wistia-play-button"> |
| 26 | <span class="sui-icon-play" aria-hidden="true"></span> <?php esc_html_e( 'Watch Video', 'wp-smushit' ); ?> |
| 27 | </button> |
| 28 | <small><?php esc_html_e( 'less than 2 minutes', 'wp-smushit' ); ?></small> |
| 29 | </div> |
| 30 | </div> |
| 31 | </div> |
| 32 | |
| 33 | <span id="wistia_oegnwrdag1"></span> |
| 34 | |
| 35 | <script> |
| 36 | document.addEventListener("DOMContentLoaded", function() { |
| 37 | var trigger = document.getElementById("wistia-play-button"); |
| 38 | |
| 39 | window.wistiaSmushEmbed = null; |
| 40 | window.wistiaInit = function(Wistia) { |
| 41 | window.wistiaSmushEmbed = Wistia.embed("oegnwrdag1", { |
| 42 | version: "v2", |
| 43 | videoWidth: 1280, |
| 44 | videoHeight: 720, |
| 45 | playerColor: "14485f", |
| 46 | videoQuality: "hd-only", |
| 47 | popover: true, |
| 48 | popoverPreventScroll: true, |
| 49 | popoverContent: 'html' |
| 50 | }); |
| 51 | }; |
| 52 | |
| 53 | if (trigger) { |
| 54 | trigger.addEventListener("click", function(e) { |
| 55 | e.preventDefault(); |
| 56 | if (window.wistiaSmushEmbed) { |
| 57 | window.wistiaSmushEmbed.play(); |
| 58 | } |
| 59 | }); |
| 60 | } |
| 61 | }); |
| 62 | </script> |
| 63 | </div> |
| 64 | |
| 65 | <p class="sui-description" style="margin-bottom: 20px"> |
| 66 | <?php esc_html_e( 'Upgrading to Pro will get you the following benefits.', 'wp-smushit' ); ?> |
| 67 | </p> |
| 68 | |
| 69 | <ol class="sui-upsell-list"> |
| 70 | <li> |
| 71 | <span class="sui-icon-check sui-md" aria-hidden="true"></span> |
| 72 | <?php esc_html_e( 'Super-smush lossy compression', 'wp-smushit' ); ?> |
| 73 | <p class="sui-description"> |
| 74 | <?php esc_html_e( 'Optimize images 2x more than regular smushing and with no visible loss in quality using Smush’s intelligent multi-pass lossy compression.', 'wp-smushit' ); ?> |
| 75 | </p> |
| 76 | </li> |
| 77 | <li> |
| 78 | <span class="sui-icon-check sui-md" aria-hidden="true"></span> |
| 79 | <?php esc_html_e( 'Streamline your images with Smush CDN', 'wp-smushit' ); ?> |
| 80 | <p class="sui-description"> |
| 81 | <?php esc_html_e( 'Serve your images from our CDN from 45 blazing fast servers around the world. Enable automatic image sizing and WebP support and your website will be absolute flying.', 'wp-smushit' ); ?> |
| 82 | </p> |
| 83 | </li> |
| 84 | <li> |
| 85 | <span class="sui-icon-check sui-md" aria-hidden="true"></span> |
| 86 | <?php esc_html_e( 'Serve next-gen WebP images (without Smush CDN)', 'wp-smushit' ); ?> |
| 87 | <p class="sui-description"> |
| 88 | <?php esc_html_e( 'Rather not use Smush CDN? Our standalone WebP feature allows you to serve next-gen images that are around 26% smaller than JPG and PNG formats. All without sacrificing image quality.', 'wp-smushit' ); ?> |
| 89 | </p> |
| 90 | </li> |
| 91 | <li> |
| 92 | <span class="sui-icon-check sui-md" aria-hidden="true"></span> |
| 93 | <?php esc_html_e( 'No limits, no restrictions', 'wp-smushit' ); ?> |
| 94 | <p class="sui-description"> |
| 95 | <?php esc_html_e( 'Need a one-click bulk optimization solution for compressing your entire existing image library fast and easy? Pro unlocks unlimited bulk smushing, and lifts the image size limit from 5Mb to 32Mb.', 'wp-smushit' ); ?> |
| 96 | </p> |
| 97 | </li> |
| 98 | <li> |
| 99 | <span class="sui-icon-check sui-md" aria-hidden="true"></span> |
| 100 | <?php esc_html_e( 'Auto-convert PNGs to JPEGs (lossy)', 'wp-smushit' ); ?> |
| 101 | <p class="sui-description"> |
| 102 | <?php esc_html_e( 'When you compress a PNG, Smush will check if converting it to JPEG could further reduce its size, and do so if necessary.', 'wp-smushit' ); ?> |
| 103 | </p> |
| 104 | </li> |
| 105 | <li> |
| 106 | <span class="sui-icon-check sui-md" aria-hidden="true"></span> |
| 107 | <?php esc_html_e( 'NextGen Gallery Integration', 'wp-smushit' ); ?> |
| 108 | <p class="sui-description"> |
| 109 | <?php esc_html_e( 'Allow smushing images directly through NextGen Gallery settings.', 'wp-smushit' ); ?> |
| 110 | </p> |
| 111 | </li> |
| 112 | </ol> |
| 113 | |
| 114 | <?php if ( class_exists( '\C_NextGEN_Bootstrap' ) ) : ?> |
| 115 | <li> |
| 116 | <span class="sui-icon-check sui-md" aria-hidden="true"></span> |
| 117 | <?php esc_html_e( 'NextGen Gallery Integration', 'wp-smushit' ); ?> |
| 118 | <p class="sui-description"> |
| 119 | <?php esc_html_e( 'Allow smushing images directly through NextGen Gallery settings.', 'wp-smushit' ); ?> |
| 120 | </p> |
| 121 | </li> |
| 122 | <?php endif; ?> |
| 123 |