plugin-info
10 years ago
account.php
10 years ago
add-ons.php
10 years ago
admin-notice.php
10 years ago
all-admin-notice.php
10 years ago
checkout.php
10 years ago
connect.php
10 years ago
contact.php
10 years ago
deactivation-feedback-modal.php
10 years ago
debug.php
10 years ago
email.php
10 years ago
firewall-issues-js.php
10 years ago
pending-activation.php
10 years ago
plugin-icon.php
10 years ago
powered-by.php
10 years ago
pricing.php
10 years ago
sticky-admin-notice-js.php
10 years ago
pending-activation.php
146 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package Freemius |
| 4 | * @copyright Copyright (c) 2015, Freemius, Inc. |
| 5 | * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 6 | * @since 1.0.9 |
| 7 | */ |
| 8 | |
| 9 | wp_enqueue_script( 'jquery' ); |
| 10 | wp_enqueue_script( 'json2' ); |
| 11 | fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' ); |
| 12 | fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' ); |
| 13 | |
| 14 | fs_enqueue_local_style( 'fs_connect', '/admin/connect.css' ); |
| 15 | |
| 16 | $slug = $VARS['slug']; |
| 17 | $fs = freemius( $slug ); |
| 18 | $current_user = wp_get_current_user(); |
| 19 | |
| 20 | $first_name = $current_user->user_firstname; |
| 21 | if ( empty( $first_name ) ) { |
| 22 | $first_name = $current_user->nickname; |
| 23 | } |
| 24 | |
| 25 | $site_url = get_site_url(); |
| 26 | $protocol_pos = strpos( $site_url, '://' ); |
| 27 | if ( false !== $protocol_pos ) { |
| 28 | $site_url = substr( $site_url, $protocol_pos + 3 ); |
| 29 | } |
| 30 | ?> |
| 31 | <div id="fs_connect" class="wrap fs-anonymous-disabled"> |
| 32 | <div class="fs-visual"> |
| 33 | <b class="fs-site-icon"><i class="dashicons dashicons-wordpress"></i></b> |
| 34 | <i class="dashicons dashicons-plus fs-first"></i> |
| 35 | |
| 36 | <div class="fs-plugin-icon"> |
| 37 | <object data="//plugins.svn.wordpress.org/<?php echo $slug ?>/assets/icon-128x128.png" type="image/png"> |
| 38 | <object data="//plugins.svn.wordpress.org/<?php echo $slug ?>/assets/icon-128x128.jpg" type="image/png"> |
| 39 | <object data="//plugins.svn.wordpress.org/<?php echo $slug ?>/assets/icon-256x256.png" |
| 40 | type="image/png"> |
| 41 | <object data="//plugins.svn.wordpress.org/<?php echo $slug ?>/assets/icon-256x256.jpg" |
| 42 | type="image/png"> |
| 43 | <img src="//wimg.freemius.com/plugin-icon.png"/> |
| 44 | </object> |
| 45 | </object> |
| 46 | </object> |
| 47 | </object> |
| 48 | </div> |
| 49 | <i class="dashicons dashicons-plus fs-second"></i> |
| 50 | <img class="fs-connect-logo" width="80" height="80" src="//img.freemius.com/connect-logo.png"/> |
| 51 | </div> |
| 52 | <div class="fs-content"> |
| 53 | <p><?php |
| 54 | echo $fs->apply_filters( 'pending_activation_message', sprintf( |
| 55 | __fs( 'thanks-x' ) . '<br>' . |
| 56 | __fs( 'pending-activation-message' ), |
| 57 | $first_name, |
| 58 | '<b>' . $fs->get_plugin_name() . '</b>', |
| 59 | '<b>' . $current_user->user_email . '</b>' |
| 60 | ) ) |
| 61 | ?></p> |
| 62 | </div> |
| 63 | <div class="fs-actions"> |
| 64 | <?php $fs_user = Freemius::_get_user_by_email( $current_user->user_email ) ?> |
| 65 | <form method="post" action="<?php echo WP_FS__ADDRESS ?>/action/service/user/install/"> |
| 66 | <?php |
| 67 | $params = array( |
| 68 | 'user_firstname' => $current_user->user_firstname, |
| 69 | 'user_lastname' => $current_user->user_lastname, |
| 70 | 'user_nickname' => $current_user->user_nicename, |
| 71 | 'user_email' => $current_user->user_email, |
| 72 | 'plugin_slug' => $slug, |
| 73 | 'plugin_id' => $fs->get_id(), |
| 74 | 'plugin_public_key' => $fs->get_public_key(), |
| 75 | 'plugin_version' => $fs->get_plugin_version(), |
| 76 | 'return_url' => wp_nonce_url( $fs->_get_admin_page_url( |
| 77 | '', |
| 78 | array( 'fs_action' => $slug . '_activate_new' ) |
| 79 | ), $slug . '_activate_new' ), |
| 80 | 'account_url' => wp_nonce_url( $fs->_get_admin_page_url( |
| 81 | 'account', |
| 82 | array( 'fs_action' => 'sync_user' ) |
| 83 | ), 'sync_user' ), |
| 84 | 'site_url' => get_site_url(), |
| 85 | 'site_name' => get_bloginfo( 'name' ), |
| 86 | 'platform_version' => get_bloginfo( 'version' ), |
| 87 | 'language' => get_bloginfo( 'language' ), |
| 88 | 'charset' => get_bloginfo( 'charset' ), |
| 89 | ); |
| 90 | ?> |
| 91 | <?php foreach ( $params as $name => $value ) : ?> |
| 92 | <input type="hidden" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>"> |
| 93 | <?php endforeach ?> |
| 94 | <button class="button button-primary" tabindex="1" |
| 95 | type="submit"><?php _efs( 'resend-activation-email' ) ?></button> |
| 96 | </form> |
| 97 | </div> |
| 98 | <div class="fs-permissions"> |
| 99 | <a class="fs-trigger" href="#"><?php _efs( 'what-permissions' ) ?></a> |
| 100 | <ul> |
| 101 | <li> |
| 102 | <i class="dashicons dashicons-admin-users"></i> |
| 103 | |
| 104 | <div> |
| 105 | <span><?php _efs( 'permissions-profile' ) ?></span> |
| 106 | |
| 107 | <p><?php _efs( 'permissions-profile_desc' ) ?></p> |
| 108 | </div> |
| 109 | </li> |
| 110 | <li> |
| 111 | <i class="dashicons dashicons-wordpress"></i> |
| 112 | |
| 113 | <div> |
| 114 | <span><?php _efs( 'permissions-site' ) ?></span> |
| 115 | |
| 116 | <p><?php _efs( 'permissions-site_desc' ) ?></p> |
| 117 | </div> |
| 118 | </li> |
| 119 | <li> |
| 120 | <i class="dashicons dashicons-admin-plugins"></i> |
| 121 | |
| 122 | <div> |
| 123 | <span><?php _efs( 'permissions-events' ) ?></span> |
| 124 | |
| 125 | <p><?php _efs( 'permissions-events_desc' ) ?></p> |
| 126 | </div> |
| 127 | </li> |
| 128 | </ul> |
| 129 | </div> |
| 130 | <div class="fs-terms"> |
| 131 | <a href="https://freemius.com/privacy/" target="_blank"><?php _efs( 'privacy-policy' ) ?></a> |
| 132 | - |
| 133 | <a href="https://freemius.com/terms/" target="_blank"><?php _efs( 'tos' ) ?></a> |
| 134 | </div> |
| 135 | </div> |
| 136 | <script type="text/javascript"> |
| 137 | (function ($) { |
| 138 | $('.button.button-primary').on('click', function () { |
| 139 | $(document.body).css({'cursor': 'wait'}); |
| 140 | $(this).html('Sending email...').css({'cursor': 'wait'}); |
| 141 | }); |
| 142 | $('.fs-permissions .fs-trigger').on('click', function () { |
| 143 | $('.fs-permissions').toggleClass('fs-open'); |
| 144 | }); |
| 145 | })(jQuery); |
| 146 | </script> |