function get_upgrade_url($plan = WP_FS__PLAN_DEFAULT_PAID, $period = WP_FS__PERIOD_ANNUALLY) { $this->_logger->entrance(); if (!$this->_site->secret_key || !defined('WP_RW__SITE_ID')) { // Backwards compatibility ////////////////////////////////////// $params = array('uid' => WP_RW__SITE_PUBLIC_KEY); $relative = '/get-the-word-press-plugin/?' . http_build_query($params); return rw_get_site_url($relative); } else { // New in-plugin pricing page //////////////////////////////////////////// return fs_get_admin_plugin_url('pricing'); } }
function fs_admin_plugin_url($page) { echo fs_get_admin_plugin_url($page); }
$slug = $VARS['slug']; $fs = fs($slug); ?> <div class="wrap"> <h2 class="nav-tab-wrapper"> <a href="<?php echo $fs->get_account_url(); ?> " class="nav-tab nav-tab-active"><?php _e('Account', WP_FS__SLUG); ?> </a> <a href="<?php echo fs_get_admin_plugin_url('addons'); ?> " class="nav-tab"><?php _e('Add Ons', WP_FS__SLUG); ?> </a> <?php if (!$fs->_rw_execute_over()) { ?> <a href="<?php echo $fs->get_upgrade_url(); ?> " class="nav-tab"><?php _e('Upgrade', WP_FS__SLUG); ?> </a>
<?php $slug = $VARS['slug']; $fs = fs($slug); fs_enqueue_local_script('jquery-postmessage', 'jquery.ba-postmessage.min.js'); $timestamp = time(); $site = $fs->get_site(); $params = array('context_site' => $site->id, 's_ctx_ts' => $timestamp, 's_ctx_secure' => md5($timestamp . $site->id . $site->secret_key . $site->public_key . 'upgrade'), 'next' => fs_get_admin_plugin_url('account') . '&action=sync_license'); ?> <div> <div id="iframe"></div> <form action="" method="POST"> <input type="hidden" name="user_id" /> <input type="hidden" name="user_email" /> <input type="hidden" name="site_id" /> <input type="hidden" name="public_key" /> <input type="hidden" name="secret_key" /> <input type="hidden" name="action" value="account" /> </form> <script type="text/javascript"> (function($) { $(function () { var // Keep track of the iframe height. iframe_height = 800, domain = '<?php echo WP_RW__LOCALHOST_SCRIPTS ? WP_RW__ADDRESS : WP_RW__SECURE_ADDRESS; ?> ',