get_slug(); /** * @var FS_Plugin_Tag $update */ $update = $fs->get_update( false, false, WP_FS__TIME_24_HOURS_IN_SEC / 24 ); $is_paying = $fs->is_paying(); $user = $fs->get_user(); $site = $fs->get_site(); $name = $user->get_name(); $license = $fs->_get_license(); $subscription = $fs->_get_subscription(); $plan = $fs->get_plan(); $is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() ); $is_paid_trial = $fs->is_paid_trial(); $show_upgrade = ( $fs->has_paid_plan() && ! $is_paying && ! $is_paid_trial ); if ( $fs->has_paid_plan() ) { $fs->_add_license_activation_dialog_box(); } if ( fs_request_get_bool( 'auto_install' ) ) { $fs->_add_auto_installation_dialog_box(); } $has_tabs = $fs->_add_tabs_before_content(); if ( $has_tabs ) { $query_params['tabs'] = 'true'; } // Aliases. $download_latest_text = fs_text_x_inline( 'Download Latest', 'as download latest version', 'download-latest', $slug ); $downgrade_x_confirm_text = fs_text_inline( 'Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'downgrade-x-confirm', $slug ); $cancel_trial_confirm_text = fs_text_inline( 'Cancelling the trial will immediately block access to all premium features. Are you sure?', 'cancel-trial-confirm', $slug ); $after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s updates and support.', 'after-downgrade-non-blocking', $slug ); $after_downgrade_blocking_text = fs_text_inline( 'Once your license expires you can still use the Free version but you will NOT have access to the %s features.', 'after-downgrade-blocking', $slug ); /* translators: %s: Plan title (e.g. "Professional") */ $activate_plan_text = fs_text_inline( 'Activate %s Plan', 'activate-x-plan', $slug ); $version_text = fs_text_x_inline( 'Version', 'product version', 'version', $slug ); /* translators: %s: Time period (e.g. Auto renews in "2 months") */ $renews_in_text = fs_text_inline( 'Auto renews in %s', 'renews-in', $slug ); /* translators: %s: Time period (e.g. Expires in "2 months") */ $expires_in_text = fs_text_inline( 'Expires in %s', 'expires-in', $slug ); $sync_license_text = fs_text_x_inline( 'Sync License', 'as synchronize license', 'sync-license', $slug ); $cancel_trial_text = fs_text_inline( 'Cancel Trial', 'cancel-trial', $slug ); $change_plan_text = fs_text_inline( 'Change Plan', 'change-plan', $slug ); $upgrade_text = fs_text_x_inline( 'Upgrade', 'verb', 'upgrade', $slug ); $addons_text = fs_text_inline( 'Add-Ons', 'add-ons', $slug ); $downgrade_text = fs_text_x_inline( 'Downgrade', 'verb', 'downgrade', $slug ); $trial_text = fs_text_x_inline( 'Trial', 'trial period', 'trial', $slug ); $free_text = fs_text_inline( 'Free', 'free', $slug ); $activate_text = fs_text_inline( 'Activate', 'activate', $slug ); $plan_text = fs_text_x_inline( 'Plan', 'as product pricing plan', 'plan', $slug ); ?>
apply_filters( 'hide_account_tabs', false ) ) : ?>

apply_filters( 'hide_license_key', false ); $profile = array(); $profile[] = array( 'id' => 'user_name', 'title' => fs_text_inline( 'Name', 'name', $slug ), 'value' => $name ); // if (isset($user->email) && false !== strpos($user->email, '@')) $profile[] = array( 'id' => 'email', 'title' => fs_text_inline( 'Email', 'email', $slug ), 'value' => $user->email ); if ( is_numeric( $user->id ) ) { $profile[] = array( 'id' => 'user_id', 'title' => fs_text_inline( 'User ID', 'user-id', $slug ), 'value' => $user->id ); } $profile[] = array( 'id' => 'site_id', 'title' => fs_text_inline( 'Site ID', 'site-id', $slug ), 'value' => is_string( $site->id ) ? $site->id : fs_text_inline( 'No ID', 'no-id', $slug ) ); $profile[] = array( 'id' => 'site_public_key', 'title' => fs_text_inline( 'Public Key', 'public-key', $slug ), 'value' => $site->public_key ); $profile[] = array( 'id' => 'site_secret_key', 'title' => fs_text_inline( 'Secret Key', 'secret-key', $slug ), 'value' => ( ( is_string( $site->secret_key ) ) ? $site->secret_key : fs_text_x_inline( 'No Secret', 'as secret encryption key missing', 'no-secret', $slug ) ) ); $profile[] = array( 'id' => 'version', 'title' => $version_text, 'value' => $fs->get_plugin_version() ); if ( $fs->has_paid_plan() ) { if ( $fs->is_trial() ) { $trial_plan = $fs->get_trial_plan(); $profile[] = array( 'id' => 'plan', 'title' => $plan_text, 'value' => ( is_string( $trial_plan->name ) ? strtoupper( $trial_plan->title ) : fs_text_inline( 'Trial', 'trial', $slug ) ) ); } else { $profile[] = array( 'id' => 'plan', 'title' => $plan_text, 'value' => strtoupper( is_string( $site->plan->name ) ? $site->plan->title : strtoupper( $free_text ) ) ); if ( is_object( $license ) ) { if ( ! $hide_license_key ) { $profile[] = array( 'id' => 'license_key', 'title' => fs_text_inline( 'License Key', $slug ), 'value' => $license->secret_key, ); } } } } ?> has_paid_plan() ) { // If plugin don't have any paid plans, there's no reason // to show current plan. continue; } ?> > is_verified() ) : ?> is_trial() ) : ?> is_lifetime() ) : ?> is_first_payment_pending() ) : ?> is_first_payment_pending() ) : ?> is_trial() ) : ?>
is_free_plan() ? $fs->_get_available_premium_license() : false ?> left() > 0 || ( $site->is_localhost() && $available_license->is_free_localhost ) ) ) : ?> _get_plan_by_id( $available_license->plan_id ) ?>
is_premium() ) : ?> get_unique_affix() . '_sync_license' ) ?> is_single_plan() ) : ?>
has_paid_plan() ) : ?> has_premium_version() ) : ?> is_premium() ) : ?> can_use_premium_code() ) : ?>
: is_verified() ) : ?>
has_release_on_freemius() ) : ?> secret_key ) && in_array( $p['id'], array( 'email', 'user_name' ) ) ) ) : ?>
get_account_addons(); if ( ! is_array( $account_addons ) ) { $account_addons = array(); } $installed_addons = $fs->get_installed_addons(); $installed_addons_ids = array(); foreach ( $installed_addons as $fs_addon ) { $installed_addons_ids[] = $fs_addon->get_id(); } $addons_to_show = array_unique( array_merge( $installed_addons_ids, $account_addons ) ); ?>
get_addon( $addon_id ); $is_addon_activated = $fs->is_addon_activated( $addon_id ); $is_addon_connected = $fs->is_addon_connected( $addon_id ); $fs_addon = $is_addon_connected ? freemius( $addon_id ) : false; if ( is_object( $fs_addon ) ) { $is_paying = $fs_addon->is_paying(); $user = $fs_addon->get_user(); $site = $fs_addon->get_site(); $license = $fs_addon->_get_license(); $subscription = $fs_addon->_get_subscription(); $plan = $fs_addon->get_plan(); $is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() ); $is_paid_trial = $fs_addon->is_paid_trial(); $show_upgrade = ( ! $is_paying && ! $is_paid_trial && ! $fs_addon->_has_premium_license() ); $is_current_license_expired = is_object( $license ) && $license->is_expired(); } // var_dump( $is_paid_trial, $license, $site, $subscription ); ?> > get_site(); ?> get_id(), 'account', 'deactivate_license', fs_text_inline( 'Deactivate License', 'deactivate-license', $slug ), array( 'plugin_id' => $addon_id ), false ); $human_readable_license_expiration = human_time_diff( time(), strtotime( $license->expiration ) ); $downgrade_confirmation_message = sprintf( $downgrade_x_confirm_text, $plan->title, $human_readable_license_expiration ); $after_downgrade_message = ! $license->is_block_features ? sprintf( $after_downgrade_non_blocking_text, $plan->title, $fs_addon->get_module_label( true ) ) : sprintf( $after_downgrade_blocking_text, $plan->title ); if ( ! $license->is_lifetime() && $is_active_subscription ) { $buttons[] = fs_ui_get_action_button( $fs->get_id(), 'account', 'downgrade_account', $downgrade_text, array( 'plugin_id' => $addon_id ), false, false, ( $downgrade_confirmation_message . ' ' . $after_downgrade_message ), 'POST' ); } } else if ( $is_paid_trial ) { $buttons[] = fs_ui_get_action_button( $fs->get_id(), 'account', 'cancel_trial', $cancel_trial_text, array( 'plugin_id' => $addon_id ), false, 'dashicons dashicons-download', $cancel_trial_confirm_text, 'POST' ); } else { $premium_license = $fs_addon->_get_available_premium_license(); if ( is_object( $premium_license ) ) { $site = $fs_addon->get_site(); $buttons[] = fs_ui_get_action_button( $fs->get_id(), 'account', 'activate_license', sprintf( $activate_plan_text, $fs_addon->get_plan_title(), ( $site->is_localhost() && $premium_license->is_free_localhost ) ? '[localhost]' : ( 1 < $premium_license->left() ? $premium_license->left() . ' left' : '' ) ), array( 'plugin_id' => $addon_id, 'license_id' => $premium_license->id, ) ); } } if ( 0 == count( $buttons ) ) { // Add sync license only if non of the other CTAs are visible. $buttons[] = fs_ui_get_action_button( $fs->get_id(), 'account', $fs->get_unique_affix() . '_sync_license', $sync_license_text, array( 'plugin_id' => $addon_id ), false ); } } else if ( ! $show_upgrade ) { if ( $fs->is_addon_installed( $addon_id ) ) { $addon_file = $fs->get_addon_basename( $addon_id ); $buttons[] = sprintf( '%s', wp_nonce_url( 'plugins.php?action=activate&plugin=' . $addon_file, 'activate-plugin_' . $addon_file ), fs_esc_attr_inline( 'Activate this add-on', 'activate-this-addon', $slug ), $activate_text ); } else { if ( $fs->is_allowed_to_install() ) { $buttons[] = sprintf( '%s', wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $addon->slug ), 'install-plugin_' . $addon->slug ), fs_text_inline( 'Install Now', 'install-now', $slug ) ); } else { $buttons[] = sprintf( '%s', $fs->_get_latest_download_local_url( $addon_id ), esc_html( $download_latest_text ) ); } } } if ( $show_upgrade ) { $buttons[] = sprintf( ' %s', esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&parent_plugin_id=' . $fs->get_id() . '&plugin=' . $addon->slug . '&TB_iframe=true&width=600&height=550' ) ), esc_attr( sprintf( fs_text_inline( 'More information about %s', 'more-information-about-x', $slug ), $addon->title ) ), esc_attr( $addon->title ), ( $fs_addon->has_free_plan() ? $upgrade_text : fs_text_x_inline( 'Purchase', 'verb', 'purchase', $slug ) ) ); } $buttons_count = count( $buttons ); ?>

title ?> id ?> get_plugin_version() ?> plan->name ) ? $addon_site->plan->title : $free_text ) ?> is_trial() ) { $tags[] = array( 'label' => $trial_text, 'type' => 'success' ); $tags[] = array( 'label' => sprintf( ( $is_paid_trial ? $renews_in_text : $expires_in_text ), human_time_diff( time(), strtotime( $site->trial_ends ) ) ), 'type' => ( $is_paid_trial ? 'success' : 'warn' ) ); } else { if ( is_object( $license ) ) { if ( $license->is_cancelled ) { $tags[] = array( 'label' => fs_text_inline( 'Cancelled', 'cancelled', $slug ), 'type' => 'error' ); } else if ( $license->is_expired() ) { $tags[] = array( 'label' => fs_text_inline( 'Expired', 'expired', $slug ), 'type' => 'error' ); } else if ( $license->is_lifetime() ) { $tags[] = array( 'label' => fs_text_inline( 'No expiration', 'no-expiration', $slug ), 'type' => 'success' ); } else if ( ! $is_active_subscription && ! $license->is_first_payment_pending() ) { $tags[] = array( 'label' => sprintf( $expires_in_text, human_time_diff( time(), strtotime( $license->expiration ) ) ), 'type' => 'warn' ); } else if ( $is_active_subscription && ! $subscription->is_first_payment_pending() ) { $tags[] = array( 'label' => sprintf( $renews_in_text, human_time_diff( time(), strtotime( $subscription->next_payment ) ) ), 'type' => 'success' ); } } } foreach ( $tags as $t ) { printf( '' . "\n", $t['type'], $t['label'] ); } ?> 1) : ?>
1) : ?>
is_addon_installed( $addon_id ) ) : ?> get_addon_basename( $addon_id ) ?> is_allowed_to_install() ) : ?> get_id(), 'account', 'delete_account', fs_text_x_inline( 'Delete', 'verb', 'delete', $slug ), array( 'plugin_id' => $addon_id ), false ); } ?>
do_action( 'after_account_details' ) ?> $VARS['id'] ); fs_require_once_template( 'account/billing.php', $view_params ); fs_require_once_template( 'account/payments.php', $view_params ); ?>
_add_tabs_after_content(); } $params = array( 'page' => 'account', 'module_id' => $fs->get_id(), 'module_type' => $fs->get_module_type(), 'module_slug' => $slug, 'module_version' => $fs->get_plugin_version(), ); fs_require_template( 'powered-by.php', $params );