Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/content-.../inc/freemius/template...
File: account.php
?>
[500] Fix | Delete
<?php $odd = true;
[501] Fix | Delete
foreach ( $profile as $p ) : ?>
[502] Fix | Delete
<?php
[503] Fix | Delete
if ( 'plan' === $p['id'] && ! $has_paid_plan ) {
[504] Fix | Delete
// If plugin don't have any paid plans, there's no reason
[505] Fix | Delete
// to show current plan.
[506] Fix | Delete
continue;
[507] Fix | Delete
}
[508] Fix | Delete
?>
[509] Fix | Delete
<tr class="fs-field-<?php echo esc_attr( $p['id'] ) ?><?php if ( $odd ) : ?> alternate<?php endif ?>">
[510] Fix | Delete
<td>
[511] Fix | Delete
<nobr><?php echo esc_attr( $p['title'] ) ?><?php echo ( ! empty( $p['title'] ) ) ? ':' : '' ?></nobr>
[512] Fix | Delete
</td>
[513] Fix | Delete
<td<?php if ( 'plan' === $p['id'] || 'bundle_plan' === $p['id'] ) { echo ' colspan="2"'; }?>>
[514] Fix | Delete
<?php if ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
[515] Fix | Delete
<code><?php echo FS_Plugin_License::mask_secret_key_for_html( $p['value'] ) ?></code>
[516] Fix | Delete
<?php if ( ! $is_whitelabeled ) : ?>
[517] Fix | Delete
<input type="text" value="<?php echo htmlspecialchars( $p['value'] ) ?>" style="display: none"
[518] Fix | Delete
readonly/>
[519] Fix | Delete
<?php endif ?>
[520] Fix | Delete
<?php elseif ( 'beta_program' === $p['id'] ) : ?>
[521] Fix | Delete
<label>
[522] Fix | Delete
<input type="checkbox" class="fs-toggle-beta-mode" <?php checked( true, $p['value'] ) ?>/><span><?php
[523] Fix | Delete
fs_esc_html_echo_inline( 'Join the Beta program', 'join-beta', $slug )
[524] Fix | Delete
?></span></label>
[525] Fix | Delete
<?php else : ?>
[526] Fix | Delete
<code><?php echo htmlspecialchars( $p['value'] ) ?></code>
[527] Fix | Delete
<?php endif ?>
[528] Fix | Delete
<?php if ( 'email' === $p['id'] && ! $user->is_verified() ) : ?>
[529] Fix | Delete
<label class="fs-tag fs-warn"><?php fs_esc_html_echo_inline( 'not verified', 'not-verified', $slug ) ?></label>
[530] Fix | Delete
<?php endif ?>
[531] Fix | Delete
<?php if ( 'plan' === $p['id'] ) : ?>
[532] Fix | Delete
<?php if ( $fs->is_trial() ) : ?>
[533] Fix | Delete
<label class="fs-tag fs-success"><?php echo esc_html( $trial_text ) ?></label>
[534] Fix | Delete
<?php endif ?>
[535] Fix | Delete
<?php if ( is_object( $license ) && ! $license->is_lifetime() ) : ?>
[536] Fix | Delete
<?php if ( ! $is_active_subscription && ! $is_active_bundle_subscription && ! $license->is_first_payment_pending() ) : ?>
[537] Fix | Delete
<?php $is_license_expired = $license->is_expired() ?>
[538] Fix | Delete
<?php $expired_ago_text = ( fs_text_inline( 'Expired', 'expired', $slug ) . ' ' . fs_text_x_inline( '%s ago', 'x-ago', $slug ) ) ?>
[539] Fix | Delete
<label
[540] Fix | Delete
class="fs-tag <?php echo $is_license_expired ? 'fs-error' : 'fs-warn' ?>"><?php
[541] Fix | Delete
echo esc_html( sprintf( $is_license_expired ? $expired_ago_text : $expires_in_text, human_time_diff( time(), strtotime( $license->expiration ) ) ) )
[542] Fix | Delete
?></label>
[543] Fix | Delete
<?php elseif ( $is_active_subscription && ! $subscription->is_first_payment_pending() ) : ?>
[544] Fix | Delete
<label class="fs-tag fs-success"><?php echo esc_html( sprintf( $renews_in_text, human_time_diff( time(), strtotime( $subscription->next_payment ) ) ) ) ?></label>
[545] Fix | Delete
<?php endif ?>
[546] Fix | Delete
<?php elseif ( $fs->is_trial() ) : ?>
[547] Fix | Delete
<label class="fs-tag fs-warn"><?php echo esc_html( sprintf( $expires_in_text, human_time_diff( time(), strtotime( $site->trial_ends ) ) ) ) ?></label>
[548] Fix | Delete
<?php endif ?>
[549] Fix | Delete
<?php if ( ! $is_whitelabeled ) : ?>
[550] Fix | Delete
<div class="button-group">
[551] Fix | Delete
<?php if ( is_object( $available_license ) ) : ?>
[552] Fix | Delete
<?php
[553] Fix | Delete
$view_params = array(
[554] Fix | Delete
'freemius' => $fs,
[555] Fix | Delete
'slug' => $slug,
[556] Fix | Delete
'license' => $available_license,
[557] Fix | Delete
'plan' => $available_license_paid_plan,
[558] Fix | Delete
'is_localhost' => $site->is_localhost(),
[559] Fix | Delete
'install_id' => $site->id,
[560] Fix | Delete
'class' => 'button-primary',
[561] Fix | Delete
);
[562] Fix | Delete
fs_require_template( 'account/partials/activate-license-button.php', $view_params ); ?>
[563] Fix | Delete
<?php else : ?>
[564] Fix | Delete
<form action="<?php echo esc_url( $fs->_get_admin_page_url( 'account' ) ) ?>"
[565] Fix | Delete
method="POST" class="button-group">
[566] Fix | Delete
<?php if ( $show_upgrade && $is_premium ) : ?>
[567] Fix | Delete
<a class="button activate-license-trigger <?php echo esc_attr( $fs->get_unique_affix() ) ?>" href="#"><?php fs_esc_html_echo_inline( 'Activate License', 'activate-license', $slug ) ?></a>
[568] Fix | Delete
<?php endif ?>
[569] Fix | Delete
<input type="submit" class="button"
[570] Fix | Delete
value="<?php echo esc_attr( $sync_license_text ) ?>">
[571] Fix | Delete
<input type="hidden" name="fs_action"
[572] Fix | Delete
value="<?php echo esc_attr( $fs->get_unique_affix() ) ?>_sync_license">
[573] Fix | Delete
<?php wp_nonce_field( $fs->get_unique_affix() . '_sync_license' ) ?>
[574] Fix | Delete
<?php if ( $show_upgrade || $is_plan_change_supported ) : ?>
[575] Fix | Delete
<a href="<?php echo esc_url( $fs->get_upgrade_url() ) ?>"
[576] Fix | Delete
class="button<?php
[577] Fix | Delete
echo $show_upgrade ?
[578] Fix | Delete
' button-primary fs-upgrade' :
[579] Fix | Delete
' fs-change-plan'; ?> button-upgrade"><i
[580] Fix | Delete
class="dashicons dashicons-cart"></i> <?php echo esc_html( $show_upgrade ? $upgrade_text : $change_plan_text ) ?></a>
[581] Fix | Delete
<?php endif ?>
[582] Fix | Delete
</form>
[583] Fix | Delete
<?php endif ?>
[584] Fix | Delete
</div>
[585] Fix | Delete
<?php endif ?>
[586] Fix | Delete
<?php elseif ( 'bundle_plan' === $p['id'] ) : ?>
[587] Fix | Delete
<?php if ( is_object( $bundle_subscription ) ) : ?>
[588] Fix | Delete
<?php if ( $is_active_bundle_subscription && ! $is_bundle_first_payment_pending ) : ?>
[589] Fix | Delete
<label class="fs-tag fs-success"><?php echo esc_html( sprintf( $renews_in_text, human_time_diff( time(), strtotime( $bundle_subscription->next_payment ) ) ) ) ?></label>
[590] Fix | Delete
<?php endif ?>
[591] Fix | Delete
<?php endif ?>
[592] Fix | Delete
<?php elseif ( 'version' === $p['id'] && $has_paid_plan ) : ?>
[593] Fix | Delete
<?php if ( $fs->has_premium_version() ) : ?>
[594] Fix | Delete
<?php if ( $is_premium ) : ?>
[595] Fix | Delete
<label
[596] Fix | Delete
class="fs-tag fs-<?php echo $fs->can_use_premium_code() ? 'success' : 'warn' ?>"><?php fs_esc_html_echo_inline( 'Premium version', 'premium-version', $slug ) ?></label>
[597] Fix | Delete
<?php elseif ( $fs->can_use_premium_code() ) : ?>
[598] Fix | Delete
<label class="fs-tag fs-warn"><?php fs_esc_html_echo_inline( 'Free version', 'free-version', $slug ) ?></label>
[599] Fix | Delete
<?php endif ?>
[600] Fix | Delete
<?php endif ?>
[601] Fix | Delete
<?php endif ?>
[602] Fix | Delete
</td>
[603] Fix | Delete
<?php if ( 'plan' !== $p['id'] && 'bundle_plan' !== $p['id'] ) : ?>
[604] Fix | Delete
<td class="fs-right">
[605] Fix | Delete
<?php if ( 'email' === $p['id'] && ! $user->is_verified() ) : ?>
[606] Fix | Delete
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
[607] Fix | Delete
<input type="hidden" name="fs_action" value="verify_email">
[608] Fix | Delete
<?php wp_nonce_field( 'verify_email' ) ?>
[609] Fix | Delete
<input type="submit" class="button button-small"
[610] Fix | Delete
value="<?php fs_esc_attr_echo_inline( 'Verify Email', 'verify-email', $slug ) ?>">
[611] Fix | Delete
</form>
[612] Fix | Delete
<?php endif ?>
[613] Fix | Delete
<?php if ( 'version' === $p['id'] ) : ?>
[614] Fix | Delete
<?php if ( $fs->has_release_on_freemius() ) : ?>
[615] Fix | Delete
<div class="button-group">
[616] Fix | Delete
<?php if ( $is_paying || $fs->is_trial() ) : ?>
[617] Fix | Delete
<?php if ( ! $fs->is_allowed_to_install() ) : ?>
[618] Fix | Delete
<a target="_blank" rel="noopener" class="button button-primary"
[619] Fix | Delete
href="<?php echo $fs->_get_latest_download_local_url() ?>"><?php
[620] Fix | Delete
$download_version_text_suffix = ( is_object( $update ) ? ' [' . $update->version . ']' : '' );
[621] Fix | Delete
[622] Fix | Delete
$download_version_text = sprintf(
[623] Fix | Delete
/* translators: %s: plan name (e.g. Download "Professional" Version) */
[624] Fix | Delete
fs_text_inline( 'Download %s Version', 'download-x-version', $slug ),
[625] Fix | Delete
( $fs->is_trial() ? $trial_plan->title : $plan->title )
[626] Fix | Delete
) .
[627] Fix | Delete
$download_version_text_suffix;
[628] Fix | Delete
[629] Fix | Delete
$download_version_text_length = function_exists( 'mb_strlen' ) ?
[630] Fix | Delete
mb_strlen( $download_version_text ) :
[631] Fix | Delete
strlen( $download_version_text );
[632] Fix | Delete
[633] Fix | Delete
if ( $download_version_text_length > 31 ) {
[634] Fix | Delete
/**
[635] Fix | Delete
* Try to limit the number of characters to 31 for now.
[636] Fix | Delete
*
[637] Fix | Delete
* @author Leo Fajardo (@leorw)
[638] Fix | Delete
* @aince 2.3.2
[639] Fix | Delete
*/
[640] Fix | Delete
$download_version_text = fs_text_inline( 'Download Paid Version', 'download-paid-version', $slug ) . $download_version_text_suffix;
[641] Fix | Delete
}
[642] Fix | Delete
[643] Fix | Delete
echo $download_version_text;
[644] Fix | Delete
?></a>
[645] Fix | Delete
<?php elseif ( is_object( $update ) ) : ?>
[646] Fix | Delete
<?php
[647] Fix | Delete
$module_type = $fs->get_module_type();
[648] Fix | Delete
?>
[649] Fix | Delete
<a class="button button-primary"
[650] Fix | Delete
href="<?php echo wp_nonce_url( self_admin_url( "update.php?action=upgrade-{$module_type}&{$module_type}=" . $fs->get_plugin_basename() ), "upgrade-{$module_type}_" . $fs->get_plugin_basename() ) ?>"><?php echo fs_esc_html_inline( 'Install Update Now', 'install-update-now', $slug ) . ' [' . $update->version . ']' ?></a>
[651] Fix | Delete
<?php endif ?>
[652] Fix | Delete
<?php endif; ?>
[653] Fix | Delete
</div>
[654] Fix | Delete
<?php endif ?>
[655] Fix | Delete
<?php
[656] Fix | Delete
elseif ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
[657] Fix | Delete
<?php if ( ! $is_whitelabeled && ( 'site_secret_key' === $p['id'] || ! $is_license_foreign ) ) : ?>
[658] Fix | Delete
<button class="button button-small fs-toggle-visibility"><?php fs_esc_html_echo_x_inline( 'Show', 'verb', 'show', $slug ) ?></button>
[659] Fix | Delete
<?php endif ?>
[660] Fix | Delete
<?php if ('license_key' === $p['id']) : ?>
[661] Fix | Delete
<button class="button button-small activate-license-trigger <?php echo $fs->get_unique_affix() ?>"><?php fs_esc_html_echo_inline( 'Change License', 'change-license', $slug ) ?></button>
[662] Fix | Delete
<?php endif ?>
[663] Fix | Delete
<?php
[664] Fix | Delete
elseif (/*in_array($p['id'], array('site_secret_key', 'site_id', 'site_public_key')) ||*/
[665] Fix | Delete
( is_string( $user->secret_key ) && in_array( $p['id'], array(
[666] Fix | Delete
'email',
[667] Fix | Delete
'user_name'
[668] Fix | Delete
) ) )
[669] Fix | Delete
) : ?>
[670] Fix | Delete
<?php if ( 'email' !== $p['id'] || ! fs_is_network_admin() ) : ?>
[671] Fix | Delete
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST"
[672] Fix | Delete
onsubmit="var val = prompt('<?php echo esc_attr( sprintf(
[673] Fix | Delete
/* translators: %s: User's account property (e.g. name, email) */
[674] Fix | Delete
fs_text_inline( 'What is your %s?', 'what-is-your-x', $slug ),
[675] Fix | Delete
$p['title']
[676] Fix | Delete
) ) ?>', '<?php echo $p['value'] ?>'); if (null == val || '' === val) return false; jQuery('input[name=fs_<?php echo $p['id'] ?>_<?php echo $fs->get_unique_affix() ?>]').val(val); return true;">
[677] Fix | Delete
<input type="hidden" name="fs_action" value="update_<?php echo $p['id'] ?>">
[678] Fix | Delete
<input type="hidden" name="fs_<?php echo $p['id'] ?>_<?php echo $fs->get_unique_affix() ?>"
[679] Fix | Delete
value="">
[680] Fix | Delete
<?php wp_nonce_field( 'update_' . $p['id'] ) ?>
[681] Fix | Delete
<input type="submit" class="button button-small <?php if ( 'email' === $p['id'] ) echo 'button-edit-email-address' ?>"
[682] Fix | Delete
value="<?php echo fs_esc_attr_x_inline( 'Edit', 'verb', 'edit', $slug ) ?>">
[683] Fix | Delete
</form>
[684] Fix | Delete
<?php endif ?>
[685] Fix | Delete
<?php elseif ( 'user_id' === $p['id'] && ! empty( $ids_of_installs_activated_with_foreign_licenses ) ) : ?>
[686] Fix | Delete
<input id="fs_change_user" type="submit" class="button button-small"
[687] Fix | Delete
value="<?php echo fs_esc_attr_inline( 'Change User', 'change-user', $slug ) ?>">
[688] Fix | Delete
<?php endif ?>
[689] Fix | Delete
</td>
[690] Fix | Delete
<?php endif ?>
[691] Fix | Delete
</tr>
[692] Fix | Delete
<?php
[693] Fix | Delete
if ( 'version' === $p['id'] && $is_premium ) {
[694] Fix | Delete
/**
[695] Fix | Delete
* If there's a row for the beta program, keep its background color
[696] Fix | Delete
* the same as the version info row.
[697] Fix | Delete
*
[698] Fix | Delete
* @author Leo Fajardo (@leorw)
[699] Fix | Delete
* @since 2.3.0
[700] Fix | Delete
*/
[701] Fix | Delete
continue;
[702] Fix | Delete
}
[703] Fix | Delete
[704] Fix | Delete
$odd = ! $odd;
[705] Fix | Delete
endforeach ?>
[706] Fix | Delete
</table>
[707] Fix | Delete
</div>
[708] Fix | Delete
</div>
[709] Fix | Delete
<?php if ( fs_is_network_admin() ) : ?>
[710] Fix | Delete
<div id="fs_sites" class="postbox">
[711] Fix | Delete
<h3><span class="dashicons dashicons-networking"></span> <?php fs_esc_html_echo_inline( 'Sites', 'sites', $slug ) ?></h3>
[712] Fix | Delete
<div class="fs-header-actions">
[713] Fix | Delete
<?php if ( ! $is_whitelabeled ) : ?>
[714] Fix | Delete
<?php $has_license = is_object( $license ) ?>
[715] Fix | Delete
<?php if ( $has_license || ( $show_upgrade && $is_premium ) ) : ?>
[716] Fix | Delete
<?php
[717] Fix | Delete
$activate_license_button_text = $has_license ?
[718] Fix | Delete
fs_esc_html_inline( 'Change License', 'change-license', $slug ) :
[719] Fix | Delete
fs_esc_html_inline( 'Activate License', 'activate-license', $slug );
[720] Fix | Delete
?>
[721] Fix | Delete
<a class="button<?php echo ( ! $has_license ? ' button-primary' : '' ) ?> activate-license-trigger <?php echo $fs->get_unique_affix() ?>" href="#"><?php echo $activate_license_button_text ?></a>
[722] Fix | Delete
<?php endif ?>
[723] Fix | Delete
<?php endif ?>
[724] Fix | Delete
<input class="fs-search" type="text" placeholder="<?php fs_esc_attr_echo_inline( 'Search by address', 'search-by-address', $slug ) ?>..."><span class="dashicons dashicons-search"></span>
[725] Fix | Delete
</div>
[726] Fix | Delete
<div class="inside">
[727] Fix | Delete
<div id="" class="fs-scrollable-table">
[728] Fix | Delete
<div class="fs-table-head">
[729] Fix | Delete
<table class="widefat">
[730] Fix | Delete
<thead>
[731] Fix | Delete
<tr>
[732] Fix | Delete
<td><?php fs_esc_html_echo_inline('ID', 'id', $slug) ?></td>
[733] Fix | Delete
<td><?php fs_esc_html_echo_inline('Address', 'address', $slug) ?></td>
[734] Fix | Delete
<td><?php fs_esc_html_echo_inline('License', 'license', $slug) ?></td>
[735] Fix | Delete
<td><?php fs_esc_html_echo_inline('Plan', 'plan', $slug) ?></td>
[736] Fix | Delete
<td></td>
[737] Fix | Delete
</tr>
[738] Fix | Delete
</thead>
[739] Fix | Delete
</table>
[740] Fix | Delete
</div>
[741] Fix | Delete
<div class="fs-table-body">
[742] Fix | Delete
<table class="widefat">
[743] Fix | Delete
<?php
[744] Fix | Delete
$current_blog_id = get_current_blog_id();
[745] Fix | Delete
[746] Fix | Delete
foreach ( $site_view_params as $view_params ) {
[747] Fix | Delete
fs_require_template(
[748] Fix | Delete
'account/partials/site.php',
[749] Fix | Delete
$view_params
[750] Fix | Delete
);
[751] Fix | Delete
}
[752] Fix | Delete
[753] Fix | Delete
/**
[754] Fix | Delete
* It's possible for the `Freemius::switch_to_blog()` method to be called within the `site.php` template and this changes the Freemius instance's context, so this check is for restoring the previous context based on the previously retrieved site.
[755] Fix | Delete
*
[756] Fix | Delete
* @author Leo Fajardo (@leorw)
[757] Fix | Delete
* @since 2.5.0
[758] Fix | Delete
*/
[759] Fix | Delete
$current_install = $fs->get_site();
[760] Fix | Delete
[761] Fix | Delete
if (
[762] Fix | Delete
is_object( $site ) &&
[763] Fix | Delete
( ! is_object( $current_install ) || $current_install->id != $site->id )
[764] Fix | Delete
) {
[765] Fix | Delete
$fs->switch_to_blog( $current_blog_id, $site, true );
[766] Fix | Delete
}
[767] Fix | Delete
?>
[768] Fix | Delete
</table>
[769] Fix | Delete
</div>
[770] Fix | Delete
</div>
[771] Fix | Delete
</div>
[772] Fix | Delete
</div>
[773] Fix | Delete
<?php endif ?>
[774] Fix | Delete
<?php if ( 0 < count( $addons_to_show ) ) : ?>
[775] Fix | Delete
<!-- Add-Ons -->
[776] Fix | Delete
<div class="postbox">
[777] Fix | Delete
<div class="">
[778] Fix | Delete
<!-- <div class="inside">-->
[779] Fix | Delete
<table id="fs_addons" class="widefat">
[780] Fix | Delete
<thead>
[781] Fix | Delete
<tr>
[782] Fix | Delete
<th><h3><?php echo esc_html( $addons_text ) ?></h3></th>
[783] Fix | Delete
<th><?php fs_esc_html_echo_inline( 'ID', 'id', $slug ) ?></th>
[784] Fix | Delete
<th><?php echo esc_html( $version_text ) ?></th>
[785] Fix | Delete
<th><?php echo esc_html( $plan_text ) ?></th>
[786] Fix | Delete
<th><?php fs_esc_html_echo_x_inline( 'License', 'as software license', 'license', $slug ) ?></th>
[787] Fix | Delete
<th></th>
[788] Fix | Delete
<?php if ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE ) : ?>
[789] Fix | Delete
<th></th>
[790] Fix | Delete
<?php endif ?>
[791] Fix | Delete
</tr>
[792] Fix | Delete
</thead>
[793] Fix | Delete
<tbody>
[794] Fix | Delete
<?php
[795] Fix | Delete
$odd = true;
[796] Fix | Delete
[797] Fix | Delete
$installed_addons_ids_map = array_flip( $installed_addons_ids );
[798] Fix | Delete
[799] Fix | Delete
$addon_info_by_id = array();
[800] Fix | Delete
$hide_all_addons_data = false;
[801] Fix | Delete
[802] Fix | Delete
if ( $fs->is_whitelabeled_by_flag() ) {
[803] Fix | Delete
$hide_all_addons_data = true;
[804] Fix | Delete
[805] Fix | Delete
foreach ( $addons_to_show as $addon_id ) {
[806] Fix | Delete
$is_addon_installed = isset( $installed_addons_ids_map[ $addon_id ] );
[807] Fix | Delete
$addon_info = $fs->_get_addon_info( $addon_id, $is_addon_installed );
[808] Fix | Delete
$is_addon_connected = $addon_info['is_connected'];
[809] Fix | Delete
[810] Fix | Delete
$fs_addon = ( $is_addon_connected && $is_addon_installed ) ?
[811] Fix | Delete
freemius( $addon_id ) :
[812] Fix | Delete
null;
[813] Fix | Delete
[814] Fix | Delete
$is_whitelabeled = is_object( $fs_addon ) ?
[815] Fix | Delete
$fs_addon->is_whitelabeled( true ) :
[816] Fix | Delete
$addon_info['is_whitelabeled'];
[817] Fix | Delete
[818] Fix | Delete
if ( ! $is_whitelabeled ) {
[819] Fix | Delete
$hide_all_addons_data = false;
[820] Fix | Delete
}
[821] Fix | Delete
[822] Fix | Delete
if ( $is_data_debug_mode ) {
[823] Fix | Delete
$is_whitelabeled = false;
[824] Fix | Delete
}
[825] Fix | Delete
[826] Fix | Delete
$addon_info_by_id[ $addon_id ] = $addon_info;
[827] Fix | Delete
}
[828] Fix | Delete
}
[829] Fix | Delete
[830] Fix | Delete
foreach ( $addons_to_show as $addon_id ) {
[831] Fix | Delete
$is_addon_installed = isset( $installed_addons_ids_map[ $addon_id ] );
[832] Fix | Delete
[833] Fix | Delete
if (
[834] Fix | Delete
$hide_all_addons_data &&
[835] Fix | Delete
! $is_addon_installed &&
[836] Fix | Delete
! file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $fs->get_addon_basename( $addon_id ) ) )
[837] Fix | Delete
) {
[838] Fix | Delete
continue;
[839] Fix | Delete
}
[840] Fix | Delete
[841] Fix | Delete
$addon_view_params = array(
[842] Fix | Delete
'parent_fs' => $fs,
[843] Fix | Delete
'addon_id' => $addon_id,
[844] Fix | Delete
'odd' => $odd,
[845] Fix | Delete
'fs_blog_id' => $fs_blog_id,
[846] Fix | Delete
'active_plugins_directories_map' => &$active_plugins_directories_map,
[847] Fix | Delete
'is_addon_installed' => $is_addon_installed,
[848] Fix | Delete
'addon_info' => isset( $addon_info_by_id[ $addon_id ] ) ?
[849] Fix | Delete
$addon_info_by_id[ $addon_id ] :
[850] Fix | Delete
$fs->_get_addon_info( $addon_id, $is_addon_installed ),
[851] Fix | Delete
'is_whitelabeled' => ( $is_whitelabeled && ! $is_data_debug_mode )
[852] Fix | Delete
);
[853] Fix | Delete
[854] Fix | Delete
fs_require_template(
[855] Fix | Delete
'account/partials/addon.php',
[856] Fix | Delete
$addon_view_params
[857] Fix | Delete
);
[858] Fix | Delete
[859] Fix | Delete
$odd = ! $odd;
[860] Fix | Delete
} ?>
[861] Fix | Delete
</tbody>
[862] Fix | Delete
</table>
[863] Fix | Delete
</div>
[864] Fix | Delete
</div>
[865] Fix | Delete
<?php endif ?>
[866] Fix | Delete
[867] Fix | Delete
<?php $fs->do_action( 'after_account_details' ) ?>
[868] Fix | Delete
[869] Fix | Delete
<?php
[870] Fix | Delete
if ( $show_billing ) {
[871] Fix | Delete
$view_params = array( 'id' => $VARS['id'], 'payments' => $payments );
[872] Fix | Delete
fs_require_once_template( 'account/billing.php', $view_params );
[873] Fix | Delete
fs_require_once_template( 'account/payments.php', $view_params );
[874] Fix | Delete
}
[875] Fix | Delete
?>
[876] Fix | Delete
</div>
[877] Fix | Delete
</div>
[878] Fix | Delete
</div>
[879] Fix | Delete
</div>
[880] Fix | Delete
</div>
[881] Fix | Delete
<?php
[882] Fix | Delete
$subscription_cancellation_dialog_box_template_params = $fs->_get_subscription_cancellation_dialog_box_template_params( true );
[883] Fix | Delete
if ( ! empty( $subscription_cancellation_dialog_box_template_params ) ) {
[884] Fix | Delete
fs_require_template( 'forms/subscription-cancellation.php', $subscription_cancellation_dialog_box_template_params );
[885] Fix | Delete
}
[886] Fix | Delete
?>
[887] Fix | Delete
<script type="text/javascript">
[888] Fix | Delete
(function ($) {
[889] Fix | Delete
var setLoading = function ($this, label) {
[890] Fix | Delete
// Set loading mode.
[891] Fix | Delete
$(document.body).css({'cursor': 'wait'});
[892] Fix | Delete
[893] Fix | Delete
$this.css({'cursor': 'wait'});
[894] Fix | Delete
[895] Fix | Delete
if ($this.is('input'))
[896] Fix | Delete
$this.val(label);
[897] Fix | Delete
else
[898] Fix | Delete
$this.html(label);
[899] Fix | Delete
[900] Fix | Delete
setTimeout(function () {
[901] Fix | Delete
$this.attr('disabled', 'disabled');
[902] Fix | Delete
}, 200);
[903] Fix | Delete
};
[904] Fix | Delete
[905] Fix | Delete
$('.fs-toggle-visibility').click(function () {
[906] Fix | Delete
var
[907] Fix | Delete
$this = $(this),
[908] Fix | Delete
$parent = $this.closest('tr'),
[909] Fix | Delete
$input = $parent.find('input');
[910] Fix | Delete
[911] Fix | Delete
$parent.find('code').toggle();
[912] Fix | Delete
$input.toggle();
[913] Fix | Delete
[914] Fix | Delete
if ($input.is(':visible')) {
[915] Fix | Delete
$this.html('<?php fs_esc_js_echo_x_inline( 'Hide', 'verb', 'hide', $slug ) ?>');
[916] Fix | Delete
setTimeout(function () {
[917] Fix | Delete
$input.select().focus();
[918] Fix | Delete
}, 100);
[919] Fix | Delete
}
[920] Fix | Delete
else {
[921] Fix | Delete
$this.html( '<?php fs_esc_js_echo_x_inline( 'Show', 'verb', 'show', $slug ) ?>' );
[922] Fix | Delete
}
[923] Fix | Delete
});
[924] Fix | Delete
[925] Fix | Delete
$('.fs-toggle-tracking').click(function () {
[926] Fix | Delete
setLoading(
[927] Fix | Delete
$(this),
[928] Fix | Delete
($(this).data('is-disconnected') ?
[929] Fix | Delete
'<?php fs_esc_js_echo_inline('Opting in', 'opting-in' ) ?>' :
[930] Fix | Delete
'<?php fs_esc_js_echo_inline('Opting out', 'opting-out' ) ?>') +
[931] Fix | Delete
'...'
[932] Fix | Delete
);
[933] Fix | Delete
});
[934] Fix | Delete
[935] Fix | Delete
<?php
[936] Fix | Delete
$plugin_title = $fs->get_plugin_title();
[937] Fix | Delete
$processing_text = fs_esc_js_inline( 'Processing', 'processing' );
[938] Fix | Delete
$confirmation_message = sprintf(
[939] Fix | Delete
'%s %s',
[940] Fix | Delete
sprintf( fs_esc_attr_inline( 'Get updates for bleeding edge Beta versions of %s.', 'get-beta-versions', $slug ), $plugin_title ),
[941] Fix | Delete
sprintf( fs_esc_attr_inline( 'An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned.', 'beta-version-update-caution', $slug ), $plugin_title )
[942] Fix | Delete
);
[943] Fix | Delete
?>
[944] Fix | Delete
[945] Fix | Delete
$( '.fs-toggle-beta-mode' ).click( function () {
[946] Fix | Delete
var $checkbox = $( this ),
[947] Fix | Delete
isChecked = $checkbox.is( ':checked' );
[948] Fix | Delete
[949] Fix | Delete
if ( ! isChecked || confirm( '<?php echo $confirmation_message ?>' ) ) {
[950] Fix | Delete
$.ajax( {
[951] Fix | Delete
url : <?php echo Freemius::ajax_url() ?>,
[952] Fix | Delete
method: 'POST',
[953] Fix | Delete
data : {
[954] Fix | Delete
action : '<?php echo $fs->get_ajax_action( 'set_beta_mode' ) ?>',
[955] Fix | Delete
security : '<?php echo $fs->get_ajax_security( 'set_beta_mode' ) ?>',
[956] Fix | Delete
is_beta : isChecked,
[957] Fix | Delete
module_id: <?php echo $fs->get_id() ?>
[958] Fix | Delete
},
[959] Fix | Delete
beforeSend: function () {
[960] Fix | Delete
$checkbox.prop( 'disabled', true );
[961] Fix | Delete
$checkbox.parent().find( 'span' ).text( '<?php echo $processing_text ?>' + '...' );
[962] Fix | Delete
},
[963] Fix | Delete
complete: function () {
[964] Fix | Delete
$checkbox.prop( 'disabled', false );
[965] Fix | Delete
$checkbox.parent().find( 'span' ).text( '<?php fs_esc_js_echo_inline( 'Join the Beta Program', 'join-beta', $slug ) ?>' );
[966] Fix | Delete
}
[967] Fix | Delete
} );
[968] Fix | Delete
[969] Fix | Delete
return true;
[970] Fix | Delete
}
[971] Fix | Delete
[972] Fix | Delete
return false;
[973] Fix | Delete
});
[974] Fix | Delete
[975] Fix | Delete
$('.fs-opt-in').click(function () {
[976] Fix | Delete
setLoading($(this), '<?php fs_esc_js_echo_inline('Opting in', 'opting-in' ) ?>...');
[977] Fix | Delete
});
[978] Fix | Delete
[979] Fix | Delete
$( '#fs_downgrade' ).submit(function( event ) {
[980] Fix | Delete
event.preventDefault();
[981] Fix | Delete
[982] Fix | Delete
setLoading( $( this ).find( '.button' ), '<?php fs_esc_js_echo_inline( 'Downgrading', 'downgrading' ) ?>...' );
[983] Fix | Delete
});
[984] Fix | Delete
[985] Fix | Delete
$('.fs-activate-license').click(function () {
[986] Fix | Delete
setLoading($(this), '<?php fs_esc_js_echo_inline('Activating', 'activating' ) ?>...');
[987] Fix | Delete
});
[988] Fix | Delete
[989] Fix | Delete
var $deactivateLicenseOrCancelTrial = $( '.fs-deactivate-license, .fs-cancel-trial' ),
[990] Fix | Delete
$subscriptionCancellationModal = $( '.fs-modal-subscription-cancellation-<?php echo $fs->get_id() ?>' );
[991] Fix | Delete
[992] Fix | Delete
if ( 0 !== $subscriptionCancellationModal.length ) {
[993] Fix | Delete
$subscriptionCancellationModal.on( '<?php echo $fs->get_action_tag( 'subscription_cancellation_action' ) ?>', function( evt, cancelSubscription ) {
[994] Fix | Delete
setLoading(
[995] Fix | Delete
$deactivateLicenseOrCancelTrial,
[996] Fix | Delete
( ! $deactivateLicenseOrCancelTrial.hasClass( 'fs-cancel-trial' ) ?
[997] Fix | Delete
'<?php fs_esc_js_echo_inline( 'Deactivating', 'deactivating', $slug ) ?>' :
[998] Fix | Delete
'<?php echo esc_html( sprintf( fs_text_inline( 'Cancelling %s', 'cancelling-x', $slug ), fs_text_inline( 'trial', 'trial', $slug ) ) ) ?>' ) + '...'
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function