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
/home/sportsfe.../httpdocs/wp-conte.../plugins/content-.../inc/freemius/template...
File: connect.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* @package Freemius
[2] Fix | Delete
* @copyright Copyright (c) 2015, Freemius, Inc.
[3] Fix | Delete
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
[4] Fix | Delete
* @since 1.0.7
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[8] Fix | Delete
exit;
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* @var array $VARS
[13] Fix | Delete
* @var Freemius $fs
[14] Fix | Delete
*/
[15] Fix | Delete
$fs = freemius( $VARS['id'] );
[16] Fix | Delete
$slug = $fs->get_slug();
[17] Fix | Delete
[18] Fix | Delete
$is_pending_activation = $fs->is_pending_activation();
[19] Fix | Delete
$is_premium_only = $fs->is_only_premium();
[20] Fix | Delete
$has_paid_plans = $fs->has_paid_plan();
[21] Fix | Delete
$is_premium_code = $fs->is_premium();
[22] Fix | Delete
$is_freemium = $fs->is_freemium();
[23] Fix | Delete
[24] Fix | Delete
$fs->_enqueue_connect_essentials();
[25] Fix | Delete
[26] Fix | Delete
/**
[27] Fix | Delete
* Enqueueing the styles in `_enqueue_connect_essentials()` is too late, as we need them in the HEADER. Therefore, inject the styles inline to avoid FOUC.
[28] Fix | Delete
*
[29] Fix | Delete
* @author Vova Feldman (@svovaf)
[30] Fix | Delete
*/
[31] Fix | Delete
echo "<style>\n";
[32] Fix | Delete
include WP_FS__DIR_CSS . '/admin/connect.css';
[33] Fix | Delete
echo "</style>\n";
[34] Fix | Delete
[35] Fix | Delete
$current_user = Freemius::_get_current_wp_user();
[36] Fix | Delete
[37] Fix | Delete
$first_name = $current_user->user_firstname;
[38] Fix | Delete
if ( empty( $first_name ) ) {
[39] Fix | Delete
$first_name = $current_user->nickname;
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
$site_url = Freemius::get_unfiltered_site_url();
[43] Fix | Delete
$protocol_pos = strpos( $site_url, '://' );
[44] Fix | Delete
if ( false !== $protocol_pos ) {
[45] Fix | Delete
$site_url = substr( $site_url, $protocol_pos + 3 );
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
$freemius_usage_tracking_url = $fs->get_usage_tracking_terms_url();
[49] Fix | Delete
$freemius_plugin_terms_url = $fs->get_eula_url();
[50] Fix | Delete
[51] Fix | Delete
$error = fs_request_get( 'error' );
[52] Fix | Delete
[53] Fix | Delete
$has_release_on_freemius = $fs->has_release_on_freemius();
[54] Fix | Delete
[55] Fix | Delete
$require_license_key = $is_premium_only ||
[56] Fix | Delete
(
[57] Fix | Delete
$is_freemium &&
[58] Fix | Delete
( $is_premium_code || ! $has_release_on_freemius ) &&
[59] Fix | Delete
fs_request_get_bool( 'require_license', ( $is_premium_code || $has_release_on_freemius ) )
[60] Fix | Delete
);
[61] Fix | Delete
[62] Fix | Delete
$freemius_activation_terms_url = ($fs->is_premium() && $require_license_key) ?
[63] Fix | Delete
$fs->get_license_activation_terms_url() :
[64] Fix | Delete
$freemius_usage_tracking_url;
[65] Fix | Delete
[66] Fix | Delete
$freemius_activation_terms_html = '<a href="' . esc_url( $freemius_activation_terms_url ) . '" target="_blank" rel="noopener" tabindex="1">freemius.com</a>';
[67] Fix | Delete
[68] Fix | Delete
if ( $is_pending_activation ) {
[69] Fix | Delete
$require_license_key = false;
[70] Fix | Delete
}
[71] Fix | Delete
[72] Fix | Delete
if ( $require_license_key ) {
[73] Fix | Delete
$fs->_add_license_activation_dialog_box();
[74] Fix | Delete
}
[75] Fix | Delete
[76] Fix | Delete
$is_optin_dialog = (
[77] Fix | Delete
$fs->is_theme() &&
[78] Fix | Delete
$fs->is_themes_page() &&
[79] Fix | Delete
$fs->show_opt_in_on_themes_page()
[80] Fix | Delete
);
[81] Fix | Delete
[82] Fix | Delete
if ( $is_optin_dialog ) {
[83] Fix | Delete
$show_close_button = false;
[84] Fix | Delete
$previous_theme_activation_url = '';
[85] Fix | Delete
[86] Fix | Delete
if ( ! $is_premium_code ) {
[87] Fix | Delete
$show_close_button = true;
[88] Fix | Delete
} else if ( $is_premium_only ) {
[89] Fix | Delete
$previous_theme_activation_url = $fs->get_previous_theme_activation_url();
[90] Fix | Delete
$show_close_button = ( ! empty( $previous_theme_activation_url ) );
[91] Fix | Delete
}
[92] Fix | Delete
}
[93] Fix | Delete
[94] Fix | Delete
$is_network_level_activation = (
[95] Fix | Delete
fs_is_network_admin() &&
[96] Fix | Delete
$fs->is_network_active() &&
[97] Fix | Delete
! $fs->is_network_delegated_connection()
[98] Fix | Delete
);
[99] Fix | Delete
[100] Fix | Delete
$fs_user = Freemius::_get_user_by_email( $current_user->user_email );
[101] Fix | Delete
[102] Fix | Delete
$activate_with_current_user = (
[103] Fix | Delete
is_object( $fs_user ) &&
[104] Fix | Delete
! $is_pending_activation &&
[105] Fix | Delete
// If requires a license for activation, use the user associated with the license for the opt-in.
[106] Fix | Delete
! $require_license_key &&
[107] Fix | Delete
! $is_network_level_activation
[108] Fix | Delete
);
[109] Fix | Delete
[110] Fix | Delete
$optin_params = $fs->get_opt_in_params( array(), $is_network_level_activation );
[111] Fix | Delete
$sites = isset( $optin_params['sites'] ) ? $optin_params['sites'] : array();
[112] Fix | Delete
[113] Fix | Delete
$is_network_upgrade_mode = ( fs_is_network_admin() && $fs->is_network_upgrade_mode() );
[114] Fix | Delete
[115] Fix | Delete
/* translators: %s: name (e.g. Hey John,) */
[116] Fix | Delete
$hey_x_text = esc_html( sprintf( fs_text_x_inline( 'Hey %s,', 'greeting', 'hey-x', $slug ), $first_name ) );
[117] Fix | Delete
[118] Fix | Delete
$activation_state = array(
[119] Fix | Delete
'is_license_activation' => $require_license_key,
[120] Fix | Delete
'is_pending_activation' => $is_pending_activation,
[121] Fix | Delete
'is_gdpr_required' => true,
[122] Fix | Delete
'is_network_level_activation' => $is_network_level_activation,
[123] Fix | Delete
'is_dialog' => $is_optin_dialog,
[124] Fix | Delete
);
[125] Fix | Delete
?>
[126] Fix | Delete
<?php
[127] Fix | Delete
if ( $is_optin_dialog ) { ?>
[128] Fix | Delete
<div id="fs_theme_connect_wrapper">
[129] Fix | Delete
<?php
[130] Fix | Delete
if ( $show_close_button ) { ?>
[131] Fix | Delete
<button class="close dashicons dashicons-no"><span class="screen-reader-text">Close connect dialog</span>
[132] Fix | Delete
</button>
[133] Fix | Delete
<?php
[134] Fix | Delete
}
[135] Fix | Delete
?>
[136] Fix | Delete
<?php
[137] Fix | Delete
}
[138] Fix | Delete
[139] Fix | Delete
/**
[140] Fix | Delete
* Allows developers to include custom HTML before the opt-in content.
[141] Fix | Delete
*
[142] Fix | Delete
* @author Vova Feldman
[143] Fix | Delete
* @since 2.3.2
[144] Fix | Delete
*/
[145] Fix | Delete
$fs->do_action( 'connect/before', $activation_state );
[146] Fix | Delete
?>
[147] Fix | Delete
<div id="fs_connect"
[148] Fix | Delete
class="wrap<?php if ( ! fs_is_network_admin() && ( ! $fs->is_enable_anonymous() || $is_pending_activation || $require_license_key ) ) {
[149] Fix | Delete
echo ' fs-anonymous-disabled';
[150] Fix | Delete
} ?><?php echo $require_license_key ? ' require-license-key' : '' ?>">
[151] Fix | Delete
<div class="fs-header">
[152] Fix | Delete
<!-- <b class="fs-site-icon"><i class="dashicons dashicons-wordpress-alt"></i></b>-->
[153] Fix | Delete
<?php
[154] Fix | Delete
$size = 50;
[155] Fix | Delete
$vars = array(
[156] Fix | Delete
'id' => $fs->get_id(),
[157] Fix | Delete
'size' => $size,
[158] Fix | Delete
);
[159] Fix | Delete
[160] Fix | Delete
fs_require_once_template( 'plugin-icon.php', $vars );
[161] Fix | Delete
?>
[162] Fix | Delete
<!-- <img class="fs-connect-logo" width="--><?php //echo $size ?><!--" height="--><?php //echo $size ?><!--" src="//img.freemius.com/logo/connect.svg"/>-->
[163] Fix | Delete
</div>
[164] Fix | Delete
<div class="fs-box-container">
[165] Fix | Delete
<div class="fs-content">
[166] Fix | Delete
<?php $fs->do_action( 'connect/before_message', $activation_state ) ?>
[167] Fix | Delete
[168] Fix | Delete
<?php if ( ! empty( $error ) ) : ?>
[169] Fix | Delete
<div class="fs-error"><?php echo $fs->apply_filters( 'connect_error_esc_html', esc_html( $error ) ) ?></div>
[170] Fix | Delete
<?php endif ?>
[171] Fix | Delete
<?php
[172] Fix | Delete
if ( ! $is_pending_activation && ! $require_license_key ) {
[173] Fix | Delete
if ( ! $fs->is_plugin_update() ) {
[174] Fix | Delete
echo $fs->apply_filters( 'connect-header', sprintf(
[175] Fix | Delete
'<h2 style="text-align: center">%s</h2>',
[176] Fix | Delete
esc_html( fs_text_inline( 'Never miss an important update', 'connect-header' ) )
[177] Fix | Delete
) );
[178] Fix | Delete
} else {
[179] Fix | Delete
echo $fs->apply_filters( 'connect-header_on-update', sprintf(
[180] Fix | Delete
'<h2>%s</h2>',
[181] Fix | Delete
sprintf(
[182] Fix | Delete
esc_html(
[183] Fix | Delete
/* translators: %1$s: plugin name (e.g., "Awesome Plugin"); %2$s: version (e.g., "1.2.3") */
[184] Fix | Delete
fs_text_inline('Thank you for updating to %1$s v%2$s!', 'connect-header_on-update' )
[185] Fix | Delete
),
[186] Fix | Delete
esc_html( $fs->get_plugin_name() ),
[187] Fix | Delete
$fs->get_plugin_version()
[188] Fix | Delete
)
[189] Fix | Delete
) );
[190] Fix | Delete
}
[191] Fix | Delete
}
[192] Fix | Delete
?>
[193] Fix | Delete
<p><?php
[194] Fix | Delete
$button_label = fs_text_inline( 'Allow & Continue', 'opt-in-connect', $slug );
[195] Fix | Delete
$message = '';
[196] Fix | Delete
[197] Fix | Delete
if ( $is_pending_activation ) {
[198] Fix | Delete
$button_label = fs_text_inline( 'Re-send activation email', 'resend-activation-email', $slug );
[199] Fix | Delete
[200] Fix | Delete
$message = $fs->apply_filters( 'pending_activation_message', sprintf(
[201] Fix | Delete
/* translators: %s: name (e.g. Thanks John!) */
[202] Fix | Delete
fs_text_inline( 'Thanks %s!', 'thanks-x', $slug ) . '<br>' .
[203] Fix | Delete
fs_text_inline( 'You should receive a confirmation email for %s to your mailbox at %s. Please make sure you click the button in that email to %s.', 'pending-activation-message', $slug ),
[204] Fix | Delete
$first_name,
[205] Fix | Delete
'<b>' . $fs->get_plugin_name() . '</b>',
[206] Fix | Delete
'<b>' . $current_user->user_email . '</b>',
[207] Fix | Delete
fs_text_inline( 'complete the opt-in', 'complete-the-opt-in', $slug )
[208] Fix | Delete
) );
[209] Fix | Delete
} else if ( $require_license_key ) {
[210] Fix | Delete
$button_label = fs_text_inline( 'Activate License', 'activate-license', $slug );
[211] Fix | Delete
[212] Fix | Delete
$message = $fs->apply_filters(
[213] Fix | Delete
'connect-message_on-premium',
[214] Fix | Delete
sprintf( fs_text_inline( 'Welcome to %s! To get started, please enter your license key:', 'thanks-for-purchasing', $slug ), '<b>' . $fs->get_plugin_name() . '</b>' ),
[215] Fix | Delete
$first_name,
[216] Fix | Delete
$fs->get_plugin_name()
[217] Fix | Delete
);
[218] Fix | Delete
} else {
[219] Fix | Delete
$filter = 'connect_message';
[220] Fix | Delete
[221] Fix | Delete
if ( ! $fs->is_plugin_update() ) {
[222] Fix | Delete
$default_optin_message = esc_html(
[223] Fix | Delete
sprintf(
[224] Fix | Delete
/* translators: %s: module type (plugin, theme, or add-on) */
[225] Fix | Delete
fs_text_inline( 'Opt in to get email notifications for security & feature updates, educational content, and occasional offers, and to share some basic WordPress environment info. This will help us make the %s more compatible with your site and better at doing what you need it to.', 'connect-message', $slug ),
[226] Fix | Delete
$fs->get_module_label( true )
[227] Fix | Delete
)
[228] Fix | Delete
);
[229] Fix | Delete
} else {
[230] Fix | Delete
// If Freemius was added on a plugin update, set different
[231] Fix | Delete
// opt-in message.
[232] Fix | Delete
[233] Fix | Delete
/* translators: %s: module type (plugin, theme, or add-on) */
[234] Fix | Delete
$default_optin_message = esc_html( sprintf( fs_text_inline( 'We have introduced this opt-in so you never miss an important update and help us make the %s more compatible with your site and better at doing what you need it to.', 'connect-message_on-update_why' ), $fs->get_module_label( true ) ) );
[235] Fix | Delete
[236] Fix | Delete
$default_optin_message .= '<br><br>' . esc_html( fs_text_inline( 'Opt in to get email notifications for security & feature updates, educational content, and occasional offers, and to share some basic WordPress environment info.', 'connect-message_on-update', $slug ) );
[237] Fix | Delete
[238] Fix | Delete
if ( $fs->is_enable_anonymous() ) {
[239] Fix | Delete
$default_optin_message .= ' ' . esc_html( fs_text_inline( 'If you skip this, that\'s okay! %1$s will still work just fine.', 'connect-message_on-update_skip', $slug ) );
[240] Fix | Delete
}
[241] Fix | Delete
[242] Fix | Delete
// If user customized the opt-in message on update, use
[243] Fix | Delete
// that message. Otherwise, fallback to regular opt-in
[244] Fix | Delete
// custom message if exists.
[245] Fix | Delete
if ( $fs->has_filter( 'connect_message_on_update' ) ) {
[246] Fix | Delete
$filter = 'connect_message_on_update';
[247] Fix | Delete
}
[248] Fix | Delete
}
[249] Fix | Delete
[250] Fix | Delete
$message = $fs->apply_filters(
[251] Fix | Delete
$filter,
[252] Fix | Delete
sprintf(
[253] Fix | Delete
$default_optin_message,
[254] Fix | Delete
'<b>' . esc_html( $fs->get_plugin_name() ) . '</b>',
[255] Fix | Delete
'<b>' . $current_user->user_login . '</b>',
[256] Fix | Delete
'<a href="' . $site_url . '" target="_blank" rel="noopener noreferrer">' . $site_url . '</a>',
[257] Fix | Delete
$freemius_activation_terms_html
[258] Fix | Delete
),
[259] Fix | Delete
$first_name,
[260] Fix | Delete
$fs->get_plugin_name(),
[261] Fix | Delete
$current_user->user_login,
[262] Fix | Delete
'<a href="' . $site_url . '" target="_blank" rel="noopener noreferrer">' . $site_url . '</a>',
[263] Fix | Delete
$freemius_activation_terms_html,
[264] Fix | Delete
true
[265] Fix | Delete
);
[266] Fix | Delete
}
[267] Fix | Delete
[268] Fix | Delete
if ( $is_network_upgrade_mode ) {
[269] Fix | Delete
$network_integration_text = esc_html( fs_text_inline( 'We\'re excited to introduce the Freemius network-level integration.', 'connect_message_network_upgrade', $slug ) );
[270] Fix | Delete
[271] Fix | Delete
if ($is_premium_code){
[272] Fix | Delete
$message = $network_integration_text . ' ' . sprintf( fs_text_inline( 'During the update process we detected %d site(s) that are still pending license activation.', 'connect_message_network_upgrade-premium', $slug ), count( $sites ) );
[273] Fix | Delete
[274] Fix | Delete
$message .= '<br><br>' . sprintf( fs_text_inline( 'If you\'d like to use the %s on those sites, please enter your license key below and click the activation button.', 'connect_message_network_upgrade-premium-activate-license', $slug ), $is_premium_only ? $fs->get_module_label( true ) : sprintf(
[275] Fix | Delete
/* translators: %s: module type (plugin, theme, or add-on) */
[276] Fix | Delete
fs_text_inline( "%s's paid features", 'x-paid-features', $slug ),
[277] Fix | Delete
$fs->get_module_label( true )
[278] Fix | Delete
) );
[279] Fix | Delete
[280] Fix | Delete
/* translators: %s: module type (plugin, theme, or add-on) */
[281] Fix | Delete
$message .= ' ' . sprintf( fs_text_inline( 'Alternatively, you can skip it for now and activate the license later, in your %s\'s network-level Account page.', 'connect_message_network_upgrade-premium-skip-license', $slug ), $fs->get_module_label( true ) );
[282] Fix | Delete
}else {
[283] Fix | Delete
$message = $network_integration_text . ' ' . sprintf( fs_text_inline( 'During the update process we detected %s site(s) in the network that are still pending your attention.', 'connect_message_network_upgrade-free', $slug ), count( $sites ) ) . '<br><br>' . ( fs_starts_with( $message, $hey_x_text . '<br>' ) ? substr( $message, strlen( $hey_x_text . '<br>' ) ) : $message );
[284] Fix | Delete
}
[285] Fix | Delete
}
[286] Fix | Delete
[287] Fix | Delete
echo $message;
[288] Fix | Delete
?></p>
[289] Fix | Delete
<?php if ( $require_license_key ) : ?>
[290] Fix | Delete
<div class="fs-license-key-container">
[291] Fix | Delete
<input id="fs_license_key" name="fs_key" type="text" required maxlength="<?php echo $fs->apply_filters('license_key_maxlength', 32) ?>"
[292] Fix | Delete
placeholder="<?php fs_esc_attr_echo_inline( 'License key', 'license-key', $slug ) ?>" tabindex="1"/>
[293] Fix | Delete
<i class="dashicons dashicons-admin-network"></i>
[294] Fix | Delete
<a class="show-license-resend-modal show-license-resend-modal-<?php echo $fs->get_unique_affix() ?>"
[295] Fix | Delete
href="#"><?php fs_esc_html_echo_inline( "Can't find your license key?", 'cant-find-license-key', $slug ); ?></a>
[296] Fix | Delete
</div>
[297] Fix | Delete
[298] Fix | Delete
<?php
[299] Fix | Delete
/**
[300] Fix | Delete
* Allows developers to include custom HTML after the license input container.
[301] Fix | Delete
*
[302] Fix | Delete
* @author Vova Feldman
[303] Fix | Delete
* @since 2.1.2
[304] Fix | Delete
*/
[305] Fix | Delete
$fs->do_action( 'connect/after_license_input', $activation_state );
[306] Fix | Delete
?>
[307] Fix | Delete
[308] Fix | Delete
<?php
[309] Fix | Delete
$send_updates_text = sprintf(
[310] Fix | Delete
'%s<span class="action-description"> - %s</span>',
[311] Fix | Delete
$fs->get_text_inline( 'Yes', 'yes' ),
[312] Fix | Delete
$fs->get_text_inline( 'send me security & feature updates, educational content and offers.', 'send-updates' )
[313] Fix | Delete
);
[314] Fix | Delete
[315] Fix | Delete
$do_not_send_updates_text = sprintf(
[316] Fix | Delete
'%s<span class="action-description"> - %s</span>',
[317] Fix | Delete
$fs->get_text_inline( 'No', 'no' ),
[318] Fix | Delete
sprintf(
[319] Fix | Delete
$fs->get_text_inline( 'do %sNOT%s send me security & feature updates, educational content and offers.', 'do-not-send-updates' ),
[320] Fix | Delete
'<span class="underlined">',
[321] Fix | Delete
'</span>'
[322] Fix | Delete
)
[323] Fix | Delete
);
[324] Fix | Delete
?>
[325] Fix | Delete
<div id="fs_marketing_optin">
[326] Fix | Delete
<span class="fs-message"><?php fs_echo_inline( "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:", 'contact-for-updates' ) ?></span>
[327] Fix | Delete
<div class="fs-input-container">
[328] Fix | Delete
<label>
[329] Fix | Delete
<input type="radio" name="allow-marketing" value="true" tabindex="1" />
[330] Fix | Delete
<span class="fs-input-label"><?php echo $send_updates_text ?></span>
[331] Fix | Delete
</label>
[332] Fix | Delete
<label>
[333] Fix | Delete
<input type="radio" name="allow-marketing" value="false" tabindex="1" />
[334] Fix | Delete
<span class="fs-input-label"><?php echo $do_not_send_updates_text ?></span>
[335] Fix | Delete
</label>
[336] Fix | Delete
</div>
[337] Fix | Delete
</div>
[338] Fix | Delete
<?php endif ?>
[339] Fix | Delete
<?php if ( $is_network_level_activation ) : ?>
[340] Fix | Delete
<?php
[341] Fix | Delete
$vars = array(
[342] Fix | Delete
'id' => $fs->get_id(),
[343] Fix | Delete
'sites' => $sites,
[344] Fix | Delete
'require_license_key' => $require_license_key
[345] Fix | Delete
);
[346] Fix | Delete
[347] Fix | Delete
echo fs_get_template( 'partials/network-activation.php', $vars );
[348] Fix | Delete
?>
[349] Fix | Delete
<?php endif ?>
[350] Fix | Delete
[351] Fix | Delete
<?php $fs->do_action( 'connect/after_message', $activation_state ) ?>
[352] Fix | Delete
</div>
[353] Fix | Delete
<div class="fs-actions">
[354] Fix | Delete
<?php $fs->do_action( 'connect/before_actions', $activation_state ) ?>
[355] Fix | Delete
[356] Fix | Delete
<?php if ( $fs->is_enable_anonymous() && ! $is_pending_activation && ( ! $require_license_key || $is_network_upgrade_mode ) ) : ?>
[357] Fix | Delete
<a id="skip_activation" href="<?php echo fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $fs->get_unique_affix() . '_skip_activation' ), $is_network_level_activation ), $fs->get_unique_affix() . '_skip_activation' ) ?>"
[358] Fix | Delete
class="button button-secondary" tabindex="2"><?php fs_esc_html_echo_x_inline( 'Skip', 'verb', 'skip', $slug ) ?></a>
[359] Fix | Delete
<?php endif ?>
[360] Fix | Delete
<?php if ( $is_network_level_activation && $fs->apply_filters( 'show_delegation_option', true ) ) : ?>
[361] Fix | Delete
<a id="delegate_to_site_admins" class="fs-tooltip-trigger <?php echo is_rtl() ? ' rtl' : '' ?>" href="<?php echo fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $fs->get_unique_affix() . '_delegate_activation' ) ), $fs->get_unique_affix() . '_delegate_activation' ) ?>"><?php fs_esc_html_echo_inline( 'Delegate to Site Admins', 'delegate-to-site-admins', $slug ) ?><span class="fs-tooltip"><?php fs_esc_html_echo_inline( 'If you click it, this decision will be delegated to the sites administrators.', 'delegate-sites-tooltip', $slug ) ?></span></a>
[362] Fix | Delete
<?php endif ?>
[363] Fix | Delete
<?php if ( $activate_with_current_user ) : ?>
[364] Fix | Delete
<form action="" method="POST">
[365] Fix | Delete
<input type="hidden" name="fs_action"
[366] Fix | Delete
value="<?php echo esc_attr( $fs->get_unique_affix() . '_activate_existing' ) ?>">
[367] Fix | Delete
<?php wp_nonce_field( $fs->get_unique_affix() . '_activate_existing' ) ?>
[368] Fix | Delete
<input type="hidden" name="is_extensions_tracking_allowed" value="1">
[369] Fix | Delete
<input type="hidden" name="is_diagnostic_tracking_allowed" value="1">
[370] Fix | Delete
<button class="button button-primary" tabindex="1"
[371] Fix | Delete
type="submit"><?php echo esc_html( $button_label ) ?></button>
[372] Fix | Delete
</form>
[373] Fix | Delete
<?php else : ?>
[374] Fix | Delete
<form method="post" action="<?php echo WP_FS__ADDRESS ?>/action/service/user/install/">
[375] Fix | Delete
<?php unset( $optin_params['sites']); ?>
[376] Fix | Delete
<?php foreach ( $optin_params as $name => $value ) : ?>
[377] Fix | Delete
<input type="hidden" name="<?php echo esc_attr( $name ) ?>" value="<?php echo esc_attr( $value ) ?>">
[378] Fix | Delete
<?php endforeach ?>
[379] Fix | Delete
<input type="hidden" name="is_extensions_tracking_allowed" value="1">
[380] Fix | Delete
<input type="hidden" name="is_diagnostic_tracking_allowed" value="1">
[381] Fix | Delete
<button class="button button-primary" tabindex="1"
[382] Fix | Delete
type="submit"<?php if ( $require_license_key ) {
[383] Fix | Delete
echo ' disabled="disabled"';
[384] Fix | Delete
} ?>><?php echo esc_html( $button_label ) ?></button>
[385] Fix | Delete
</form>
[386] Fix | Delete
<?php endif ?>
[387] Fix | Delete
<?php if ( $require_license_key ) : ?>
[388] Fix | Delete
<a id="license_issues_link"
[389] Fix | Delete
href="<?php echo esc_url( $fs->apply_filters( 'known_license_issues_url', 'https://freemius.com/help/documentation/wordpress-sdk/license-activation-issues/' ) ) ?>"
[390] Fix | Delete
target="_blank"><?php fs_esc_html_echo_inline( 'License issues?', 'license-issues', $slug ) ?></a>
[391] Fix | Delete
<?php endif ?>
[392] Fix | Delete
[393] Fix | Delete
<?php $fs->do_action( 'connect/after_actions', $activation_state ) ?>
[394] Fix | Delete
</div><?php
[395] Fix | Delete
$permission_manager = FS_Permission_Manager::instance( $fs );
[396] Fix | Delete
[397] Fix | Delete
// Set core permission list items.
[398] Fix | Delete
$permissions = array();
[399] Fix | Delete
[400] Fix | Delete
// Add newsletter permissions if enabled.
[401] Fix | Delete
if ( $fs->is_permission_requested( 'newsletter' ) ) {
[402] Fix | Delete
$permissions[] = $permission_manager->get_newsletter_permission();
[403] Fix | Delete
}
[404] Fix | Delete
[405] Fix | Delete
$permissions = $permission_manager->get_permissions(
[406] Fix | Delete
$require_license_key,
[407] Fix | Delete
$permissions
[408] Fix | Delete
);
[409] Fix | Delete
[410] Fix | Delete
if ( ! empty( $permissions ) ) : ?>
[411] Fix | Delete
<div class="fs-permissions">
[412] Fix | Delete
<?php if ( $require_license_key ) : ?>
[413] Fix | Delete
<a class="fs-trigger wp-core-ui" href="#" tabindex="1" style="color: inherit;"><?php echo sprintf(
[414] Fix | Delete
fs_esc_html_inline( 'For delivery of security & feature updates, and license management, %s needs to', 'license-sync-disclaimer', $slug ) . '<b class="fs-arrow"></b>',
[415] Fix | Delete
sprintf( '<nobr class="button-link" style="color: inherit;">%s</nobr>', esc_html( $fs->get_plugin_title() ) )
[416] Fix | Delete
) ?></a>
[417] Fix | Delete
<?php else : ?>
[418] Fix | Delete
<a class="fs-trigger wp-core-ui" href="#" tabindex="1" style="color: inherit;"><?php printf(
[419] Fix | Delete
fs_esc_html_inline( 'This will allow %s to', 'this-will-allow-x', $slug ) . '<b class="fs-arrow"></b>',
[420] Fix | Delete
sprintf( '<nobr class="button-link" style="color: inherit;">%s</nobr>', esc_html( $fs->get_plugin_title() ) )
[421] Fix | Delete
) ?></a>
[422] Fix | Delete
<?php endif ?>
[423] Fix | Delete
<ul><?php
[424] Fix | Delete
foreach ( $permissions as $permission ) {
[425] Fix | Delete
$permission_manager->render_permission( $permission );
[426] Fix | Delete
}
[427] Fix | Delete
?></ul>
[428] Fix | Delete
</div>
[429] Fix | Delete
<?php endif ?>
[430] Fix | Delete
<?php if ( $is_premium_code && $is_freemium ) : ?>
[431] Fix | Delete
<div class="fs-freemium-licensing">
[432] Fix | Delete
<p>
[433] Fix | Delete
<?php if ( $require_license_key ) : ?>
[434] Fix | Delete
<?php fs_esc_html_echo_inline( 'Don\'t have a license key?', 'dont-have-license-key', $slug ) ?>
[435] Fix | Delete
<a data-require-license="false" tabindex="1"><?php fs_esc_html_echo_inline( 'Activate Free Version', 'activate-free-version', $slug ) ?></a>
[436] Fix | Delete
<?php else : ?>
[437] Fix | Delete
<?php fs_echo_inline( 'Have a license key?', 'have-license-key', $slug ) ?>
[438] Fix | Delete
<a data-require-license="true" tabindex="1"><?php fs_esc_html_echo_inline( 'Activate License', 'activate-license', $slug ) ?></a>
[439] Fix | Delete
<?php endif ?>
[440] Fix | Delete
</p>
[441] Fix | Delete
</div>
[442] Fix | Delete
<?php endif ?>
[443] Fix | Delete
</div>
[444] Fix | Delete
<div class="fs-terms">
[445] Fix | Delete
<a class="fs-tooltip-trigger<?php echo is_rtl() ? ' rtl' : '' ?>" href="<?php echo esc_url( $freemius_activation_terms_url ) ?>" target="_blank" rel="noopener" tabindex="1">Powered by Freemius<?php if ( $require_license_key ) : ?> <span class="fs-tooltip" style="width: 170px"><?php echo esc_html( $fs->get_text_inline( 'Freemius is our licensing and software updates engine', 'permissions-extensions_desc' ) ) ?></span><?php endif ?></a>
[446] Fix | Delete
&nbsp;&nbsp;-&nbsp;&nbsp;
[447] Fix | Delete
<a href="https://freemius.com/privacy/" target="_blank" rel="noopener"
[448] Fix | Delete
tabindex="1"><?php fs_esc_html_echo_inline( 'Privacy Policy', 'privacy-policy', $slug ) ?></a>
[449] Fix | Delete
&nbsp;&nbsp;-&nbsp;&nbsp;
[450] Fix | Delete
<?php if ($require_license_key) : ?>
[451] Fix | Delete
<a href="<?php echo esc_url( $freemius_plugin_terms_url ) ?>" target="_blank" rel="noopener" tabindex="1"><?php fs_echo_inline( 'License Agreement', 'license-agreement', $slug ) ?></a>
[452] Fix | Delete
<?php else : ?>
[453] Fix | Delete
<a href="<?php echo esc_url( $freemius_usage_tracking_url ) ?>" target="_blank" rel="noopener" tabindex="1"><?php fs_echo_inline( 'Terms of Service', 'tos', $slug ) ?></a>
[454] Fix | Delete
<?php endif; ?>
[455] Fix | Delete
</div>
[456] Fix | Delete
</div>
[457] Fix | Delete
<?php
[458] Fix | Delete
/**
[459] Fix | Delete
* Allows developers to include custom HTML after the opt-in content.
[460] Fix | Delete
*
[461] Fix | Delete
* @author Vova Feldman
[462] Fix | Delete
* @since 2.3.2
[463] Fix | Delete
*/
[464] Fix | Delete
$fs->do_action( 'connect/after', $activation_state );
[465] Fix | Delete
[466] Fix | Delete
if ( $is_optin_dialog ) { ?>
[467] Fix | Delete
</div>
[468] Fix | Delete
<?php
[469] Fix | Delete
}
[470] Fix | Delete
?>
[471] Fix | Delete
<script type="text/javascript">
[472] Fix | Delete
(function ($) {
[473] Fix | Delete
var $html = $('html');
[474] Fix | Delete
[475] Fix | Delete
<?php
[476] Fix | Delete
if ( $is_optin_dialog ) {
[477] Fix | Delete
if ( $show_close_button ) { ?>
[478] Fix | Delete
var $themeConnectWrapper = $('#fs_theme_connect_wrapper');
[479] Fix | Delete
[480] Fix | Delete
$themeConnectWrapper.find('button.close').on('click', function () {
[481] Fix | Delete
<?php if ( ! empty( $previous_theme_activation_url ) ) { ?>
[482] Fix | Delete
location.href = '<?php echo html_entity_decode( $previous_theme_activation_url ); ?>';
[483] Fix | Delete
<?php } else { ?>
[484] Fix | Delete
$themeConnectWrapper.remove();
[485] Fix | Delete
$html.css({overflow: $html.attr('fs-optin-overflow')});
[486] Fix | Delete
<?php } ?>
[487] Fix | Delete
});
[488] Fix | Delete
<?php
[489] Fix | Delete
}
[490] Fix | Delete
?>
[491] Fix | Delete
[492] Fix | Delete
$html.attr('fs-optin-overflow', $html.css('overflow'));
[493] Fix | Delete
$html.css({overflow: 'hidden'});
[494] Fix | Delete
[495] Fix | Delete
<?php
[496] Fix | Delete
}
[497] Fix | Delete
?>
[498] Fix | Delete
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function