help-tab
5 years ago
page
5 years ago
edit-actions.php
5 years ago
edit-addon.php
5 years ago
edit-column.php
5 years ago
edit-columns.php
5 years ago
edit-menu.php
5 years ago
edit-submenu.php
5 years ago
edit-tabmenu.php
5 years ago
loading-message.php
5 years ago
menu.php
5 years ago
mini-tooltip.php
5 years ago
modal-pro.php
5 years ago
side-banner.php
5 years ago
side-feedback.php
5 years ago
side-support.php
5 years ago
table.php
5 years ago
tooltip-body.php
5 years ago
tooltip-label.php
5 years ago
wrap.php
5 years ago
side-banner.php
122 lines
| 1 | <?php |
| 2 | |
| 3 | use AC\Type\Url\Site; |
| 4 | use AC\Type\Url\UtmTags; |
| 5 | |
| 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | exit; |
| 8 | } |
| 9 | |
| 10 | /** |
| 11 | * @global \AC\Promo $promo |
| 12 | * @global \AC\Integration[] $integrations |
| 13 | * @global int $discount |
| 14 | * @global string $price |
| 15 | */ |
| 16 | |
| 17 | $integrations = $this->integrations; |
| 18 | $promo = $this->promo; |
| 19 | $discount = $this->discount; |
| 20 | |
| 21 | $is_promo_active = $promo && $promo->is_active(); |
| 22 | |
| 23 | $upgrade_page_url = new UtmTags( new Site( Site::PAGE_ABOUT_PRO ), 'banner' ); |
| 24 | |
| 25 | ?> |
| 26 | |
| 27 | <div class="sidebox" id="ac-pro-version"> |
| 28 | <div class="padding-box"> |
| 29 | <h3> |
| 30 | <a href="<?= esc_url( $upgrade_page_url->add_content( 'title' )->get_url() ); ?>"> |
| 31 | <?php _e( 'Upgrade to', 'codepress-admin-columns' ); ?> <span><?php _e( 'Pro', 'codepress-admin-columns' ); ?></span> |
| 32 | </a> |
| 33 | </h3> |
| 34 | |
| 35 | <div class="inside"> |
| 36 | <p><?php _e( 'Take Admin Columns to the next level:', 'codepress-admin-columns' ); ?></p> |
| 37 | <ul class="features"> |
| 38 | <?php |
| 39 | |
| 40 | $items = [ |
| 41 | 'search' => __( 'Search any content', 'codepress-admin-columns' ), |
| 42 | 'editing' => __( 'Inline Edit any content', 'codepress-admin-columns' ), |
| 43 | 'bulk-edit' => __( 'Bulk Edit any content', 'codepress-admin-columns' ), |
| 44 | 'sorting' => __( 'Sort any content', 'codepress-admin-columns' ), |
| 45 | 'filter' => __( 'Filter any content', 'codepress-admin-columns' ), |
| 46 | 'column-sets' => __( 'Create multiple columns sets', 'codepress-admin-columns' ), |
| 47 | 'export' => __( 'Export table contents to CSV', 'codepress-admin-columns' ), |
| 48 | ]; |
| 49 | |
| 50 | foreach ( $items as $utm_content => $label ) : ?> |
| 51 | <li> |
| 52 | <a target="_blank" href="<?= esc_url( $upgrade_page_url->add_content( 'usp-' . $utm_content )->get_url() ); ?>"><?= esc_html( $label ); ?></a> |
| 53 | </li> |
| 54 | <?php endforeach; ?> |
| 55 | |
| 56 | </ul> |
| 57 | |
| 58 | <?php |
| 59 | if ( $integrations ) : ?> |
| 60 | <strong class="extra"><?php _e( 'Includes special integrations for:', 'codepress-admin-columns' ); ?></strong> |
| 61 | <ul> |
| 62 | <?php foreach ( $integrations as $integration ) : ?> |
| 63 | <li class="acp-integration"> |
| 64 | <a href="<?= esc_url( $integration->get_link() ); ?>" target="_blank"> |
| 65 | <strong><?= $integration->get_title(); ?></strong> |
| 66 | </a> |
| 67 | </li> |
| 68 | <?php endforeach; ?> |
| 69 | </ul> |
| 70 | <?php endif; ?> |
| 71 | <p class="center nopadding"> |
| 72 | <?php if ( ! $is_promo_active ) : ?> |
| 73 | <a target="_blank" href="<?= esc_url( $upgrade_page_url->get_url() ); ?>" class="acp-button"> |
| 74 | <?php _e( 'Get Admin Columns Pro', 'codepress-admin-columns' ); ?> |
| 75 | </a> |
| 76 | <?php endif; ?> |
| 77 | </p> |
| 78 | <p class="center ac-pro-prices"> |
| 79 | <?php if ( $this->price ) : ?> |
| 80 | <?php printf( __( 'Prices starting from %s', 'codepress-admin-columns' ), '$' . $this->price ); ?> |
| 81 | <?php endif; ?> |
| 82 | </p> |
| 83 | </div> |
| 84 | </div> |
| 85 | |
| 86 | <?php if ( $is_promo_active ) : ?> |
| 87 | |
| 88 | <div class="padding-box ac-pro-deal"> |
| 89 | <h3> |
| 90 | <?php echo esc_html( $promo->get_title() ); ?> |
| 91 | </h3> |
| 92 | <a target="_blank" href="<?php echo esc_url( $promo->get_url() ); ?>" class="acp-button"> |
| 93 | <?php echo esc_html( sprintf( __( 'Get %s Off!', 'codepress-admin-columns' ), $promo->get_discount() . '%' ) ); ?> |
| 94 | </a> |
| 95 | <p class="nomargin"> |
| 96 | <?php echo esc_html( sprintf( __( "Discount is valid until %s", 'codepress-admin-columns' ), $promo->get_date_range()->get_end()->format( 'j F Y' ) ) ); ?> |
| 97 | </p> |
| 98 | </div> |
| 99 | |
| 100 | <?php else : ?> |
| 101 | |
| 102 | <div class="padding-box ac-pro-newsletter"> |
| 103 | <h3> |
| 104 | <?php echo esc_html( sprintf( __( 'Get %s Off!', 'codepress-admin-columns' ), $discount . '%' ) ); ?> |
| 105 | </h3> |
| 106 | <div class="inside"> |
| 107 | <p> |
| 108 | <?php echo esc_html( sprintf( __( "Submit your email and we'll send you a discount for %s off.", 'codepress-admin-columns' ), $discount . '%' ) ); ?> |
| 109 | </p> |
| 110 | <?php $user_data = wp_get_current_user(); ?> |
| 111 | <form method="post" action="<?= esc_url( $upgrade_page_url->add_medium( 'send-coupon' )->get_url() ); ?>" target="_blank"> |
| 112 | <input name="action" type="hidden" value="mc_upgrade_pro"> |
| 113 | <input type="text" name="EMAIL" placeholder="<?php esc_attr_e( "Your Email", 'codepress-admin-columns' ); ?>" value="<?= esc_attr( $user_data->user_email ); ?>" required> |
| 114 | <input type="text" name="FNAME" placeholder="<?php esc_attr_e( "Your First Name", 'codepress-admin-columns' ); ?>" value="<?= esc_attr( $user_data->first_name ); ?>" required> |
| 115 | <input type="submit" value="<?php esc_attr_e( "Send me the discount", 'codepress-admin-columns' ); ?>" class="acp-button"> |
| 116 | </form> |
| 117 | </div> |
| 118 | </div> |
| 119 | |
| 120 | <?php endif; ?> |
| 121 | |
| 122 | </div> |