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/clone/wp-conte.../plugins/content-.../inc/freemius/template.../forms
File: optout.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.2.1.5
[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
$reconnect_url = $fs->get_activation_url( array(
[19] Fix | Delete
'nonce' => wp_create_nonce( $fs->get_unique_affix() . '_reconnect' ),
[20] Fix | Delete
'fs_action' => ( $fs->get_unique_affix() . '_reconnect' ),
[21] Fix | Delete
) );
[22] Fix | Delete
[23] Fix | Delete
$plugin_title = "<strong>" . esc_html( $fs->get_plugin()->title ) . "</strong>";
[24] Fix | Delete
$opt_out_text = fs_text_x_inline( 'Opt Out', 'verb', 'opt-out', $slug );
[25] Fix | Delete
[26] Fix | Delete
$permission_manager = FS_Permission_Manager::instance( $fs );
[27] Fix | Delete
[28] Fix | Delete
fs_enqueue_local_style( 'fs_dialog_boxes', '/admin/dialog-boxes.css' );
[29] Fix | Delete
fs_enqueue_local_style( 'fs_optout', '/admin/optout.css' );
[30] Fix | Delete
fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
[31] Fix | Delete
[32] Fix | Delete
if ( ! $permission_manager->is_premium_context() ) {
[33] Fix | Delete
$optional_permissions = array( $permission_manager->get_extensions_permission( false,
[34] Fix | Delete
false,
[35] Fix | Delete
true
[36] Fix | Delete
) );
[37] Fix | Delete
[38] Fix | Delete
$permission_groups = array(
[39] Fix | Delete
array(
[40] Fix | Delete
'id' => 'communication',
[41] Fix | Delete
'type' => 'required',
[42] Fix | Delete
'title' => $fs->get_text_inline( 'Communication', 'communication' ),
[43] Fix | Delete
'desc' => '',
[44] Fix | Delete
'permissions' => $permission_manager->get_opt_in_required_permissions( true ),
[45] Fix | Delete
'is_enabled' => $fs->is_registered(),
[46] Fix | Delete
'prompt' => array(
[47] Fix | Delete
$fs->esc_html_inline( "Sharing your name and email allows us to keep you in the loop about new features and important updates, warn you about security issues before they become public knowledge, and send you special offers.", 'opt-out-message_user' ),
[48] Fix | Delete
sprintf(
[49] Fix | Delete
$fs->esc_html_inline( 'By clicking "Opt Out", %s will no longer be able to view your name and email.',
[50] Fix | Delete
'opt-out-message-clicking-opt-out' ),
[51] Fix | Delete
$plugin_title
[52] Fix | Delete
),
[53] Fix | Delete
),
[54] Fix | Delete
'prompt_cancel_label' => $fs->get_text_inline( 'Stay Connected', 'stay-connected' )
[55] Fix | Delete
),
[56] Fix | Delete
array(
[57] Fix | Delete
'id' => 'diagnostic',
[58] Fix | Delete
'type' => 'required',
[59] Fix | Delete
'title' => $fs->get_text_inline( 'Diagnostic Info', 'diagnostic-info' ),
[60] Fix | Delete
'desc' => '',
[61] Fix | Delete
'permissions' => $permission_manager->get_opt_in_diagnostic_permissions( true ),
[62] Fix | Delete
'is_enabled' => $fs->is_tracking_allowed(),
[63] Fix | Delete
'prompt' => array(
[64] Fix | Delete
sprintf(
[65] Fix | Delete
$fs->esc_html_inline( 'Sharing diagnostic data helps to provide additional functionality that\'s relevant to your website, avoid WordPress or PHP version incompatibilities that can break the website, and recognize which languages & regions the %s should be translated and tailored to.',
[66] Fix | Delete
'opt-out-message-clicking-opt-out' ),
[67] Fix | Delete
$fs->get_module_type()
[68] Fix | Delete
),
[69] Fix | Delete
sprintf(
[70] Fix | Delete
$fs->esc_html_inline( 'By clicking "Opt Out", diagnostic data will no longer be sent to %s.',
[71] Fix | Delete
'opt-out-message-clicking-opt-out' ),
[72] Fix | Delete
$plugin_title
[73] Fix | Delete
),
[74] Fix | Delete
),
[75] Fix | Delete
'prompt_cancel_label' => $fs->get_text_inline( 'Keep Sharing', 'keep-sharing' )
[76] Fix | Delete
),
[77] Fix | Delete
array(
[78] Fix | Delete
'id' => 'extensions',
[79] Fix | Delete
'type' => 'optional',
[80] Fix | Delete
'title' => $fs->get_text_inline( 'Extensions', 'extensions' ),
[81] Fix | Delete
'desc' => '',
[82] Fix | Delete
'permissions' => $optional_permissions,
[83] Fix | Delete
),
[84] Fix | Delete
);
[85] Fix | Delete
} else {
[86] Fix | Delete
$optional_permissions = $permission_manager->get_license_optional_permissions( false, true );
[87] Fix | Delete
[88] Fix | Delete
$permission_groups = array(
[89] Fix | Delete
array(
[90] Fix | Delete
'id' => 'essentials',
[91] Fix | Delete
'type' => 'required',
[92] Fix | Delete
'title' => $fs->esc_html_inline( 'Required', 'required' ),
[93] Fix | Delete
'desc' => sprintf( $fs->esc_html_inline( 'For automatic delivery of security & feature updates, and license management & protection, %s needs to:',
[94] Fix | Delete
'license-sync-disclaimer' ),
[95] Fix | Delete
'<b>' . esc_html( $fs->get_plugin_title() ) . '</b>' ),
[96] Fix | Delete
'permissions' => $permission_manager->get_license_required_permissions( true ),
[97] Fix | Delete
'is_enabled' => $permission_manager->is_essentials_tracking_allowed(),
[98] Fix | Delete
'prompt' => array(
[99] Fix | Delete
sprintf( $fs->esc_html_inline( 'To ensure that security & feature updates are automatically delivered directly to your WordPress Admin Dashboard while protecting your license from unauthorized abuse, %2$s needs to view the website’s homepage URL, %1$s version, SDK version, and whether the %1$s is active.', 'premium-opt-out-message-usage-tracking' ), $fs->get_module_type(), $plugin_title ),
[100] Fix | Delete
sprintf( $fs->esc_html_inline( 'By opting out from sharing this information with the updates server, you’ll have to check for new %1$s releases and manually download & install them. Not just a hassle, but missing an update can put your site at risk and cause undue compatibility issues, so we highly recommend keeping these essential permissions on.', 'opt-out-message-clicking-opt-out' ), $fs->get_module_type(), $plugin_title ),
[101] Fix | Delete
),
[102] Fix | Delete
'prompt_cancel_label' => $fs->get_text_inline( 'Keep automatic updates', 'premium-opt-out-cancel' )
[103] Fix | Delete
),
[104] Fix | Delete
array(
[105] Fix | Delete
'id' => 'optional',
[106] Fix | Delete
'type' => 'optional',
[107] Fix | Delete
'title' => $fs->esc_html_inline( 'Optional', 'optional' ),
[108] Fix | Delete
'desc' => sprintf( $fs->esc_html_inline( 'For ongoing compatibility with your website, you can optionally allow %s to:',
[109] Fix | Delete
'optional-permissions-disclaimer' ), $plugin_title ),
[110] Fix | Delete
'permissions' => $optional_permissions,
[111] Fix | Delete
),
[112] Fix | Delete
);
[113] Fix | Delete
}
[114] Fix | Delete
[115] Fix | Delete
$ajax_action = 'toggle_permission_tracking';
[116] Fix | Delete
[117] Fix | Delete
$form_id = "fs_opt_out_{$fs->get_id()}";
[118] Fix | Delete
?>
[119] Fix | Delete
<div id="<?php echo esc_attr( $form_id ) ?>"
[120] Fix | Delete
class="fs-modal fs-modal-opt-out"
[121] Fix | Delete
data-plugin-id="<?php echo esc_attr( $fs->get_id() ) ?>"
[122] Fix | Delete
data-action="<?php echo esc_attr( $fs->get_ajax_action( $ajax_action ) ) ?>"
[123] Fix | Delete
data-security="<?php echo esc_attr( $fs->get_ajax_security( $ajax_action ) ) ?>"
[124] Fix | Delete
style="display: none">
[125] Fix | Delete
<div class="fs-modal-dialog">
[126] Fix | Delete
<div class="fs-modal-header">
[127] Fix | Delete
<h4><?php echo esc_html( $opt_out_text ) ?></h4>
[128] Fix | Delete
<a href="!#" class="fs-close"><i class="dashicons dashicons-no" title="Dismiss"></i></a>
[129] Fix | Delete
</div>
[130] Fix | Delete
<div class="fs-opt-out-permissions">
[131] Fix | Delete
<div class="fs-modal-body">
[132] Fix | Delete
<div class="notice notice-error inline opt-out-error-message"><p></p></div>
[133] Fix | Delete
<div class="fs-permissions fs-open">
[134] Fix | Delete
<?php foreach ( $permission_groups as $i => $permission_group ) : ?>
[135] Fix | Delete
<?php $permission_manager->render_permissions_group( $permission_group ) ?>
[136] Fix | Delete
<?php if ( $i < count( $permission_groups ) - 1 ) : ?><hr><?php endif ?>
[137] Fix | Delete
<?php endforeach ?>
[138] Fix | Delete
</div>
[139] Fix | Delete
</div>
[140] Fix | Delete
<div class="fs-modal-footer">
[141] Fix | Delete
<button class="button button-primary button-close" tabindex="1"><?php echo $fs->esc_html_inline( 'Done', 'done' ) ?></button>
[142] Fix | Delete
</div>
[143] Fix | Delete
</div>
[144] Fix | Delete
<?php foreach ( $permission_groups as $i => $permission_group ) : ?>
[145] Fix | Delete
<?php if ( ! empty( $permission_group[ 'prompt' ] ) ) : ?>
[146] Fix | Delete
<div class="fs-<?php echo esc_attr( $permission_group[ 'id' ] ) ?>-opt-out fs-opt-out-disclaimer" data-group-id="<?php echo esc_attr( $permission_group[ 'id' ] ) ?>" style="display: none">
[147] Fix | Delete
<div class="fs-modal-body">
[148] Fix | Delete
<div class="fs-modal-panel active">
[149] Fix | Delete
<div class="notice notice-error inline opt-out-error-message"><p></p></div>
[150] Fix | Delete
<?php foreach ( $permission_group[ 'prompt' ] as $p ) : ?>
[151] Fix | Delete
<?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
[152] Fix | Delete
<p><?php echo $p ?></p>
[153] Fix | Delete
<?php endforeach ?>
[154] Fix | Delete
</div>
[155] Fix | Delete
</div>
[156] Fix | Delete
<div class="fs-modal-footer">
[157] Fix | Delete
<a class="fs-opt-out-button" tabindex="2" href="#"><?php echo esc_html( $opt_out_text ) ?></a>
[158] Fix | Delete
<button class="button button-primary fs-opt-out-cancel-button" tabindex="1"><?php echo esc_html( $permission_group[ 'prompt_cancel_label' ] ) ?></button>
[159] Fix | Delete
</div>
[160] Fix | Delete
</div>
[161] Fix | Delete
<?php endif ?>
[162] Fix | Delete
<?php endforeach ?>
[163] Fix | Delete
</div>
[164] Fix | Delete
</div>
[165] Fix | Delete
[166] Fix | Delete
<?php $permission_manager->require_permissions_js( false ) ?>
[167] Fix | Delete
[168] Fix | Delete
<script type="text/javascript">
[169] Fix | Delete
(function( $ ) {
[170] Fix | Delete
$( document ).ready(function() {
[171] Fix | Delete
FS.OptOut(
[172] Fix | Delete
<?php echo wp_json_encode( $fs->get_id() ) ?>,
[173] Fix | Delete
<?php echo wp_json_encode( $slug ) ?>,
[174] Fix | Delete
<?php echo wp_json_encode( $fs->get_module_type() ) ?>,
[175] Fix | Delete
<?php echo $fs->is_registered( true ) ? 'true' : 'false' ?>,
[176] Fix | Delete
<?php echo $fs->is_tracking_allowed() ? 'true' : 'false' ?>,
[177] Fix | Delete
<?php echo wp_json_encode( $reconnect_url ) ?>
[178] Fix | Delete
);
[179] Fix | Delete
});
[180] Fix | Delete
})( jQuery );
[181] Fix | Delete
</script>
[182] Fix | Delete
[183] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function