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/accelera.../includes
File: newsletter.php
<?php
[0] Fix | Delete
// Exit if accessed directly
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[2] Fix | Delete
exit;
[3] Fix | Delete
}
[4] Fix | Delete
[5] Fix | Delete
class ampforwp_pointers {
[6] Fix | Delete
const DISPLAY_VERSION = 'v1.0';
[7] Fix | Delete
function __construct () {
[8] Fix | Delete
add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
[9] Fix | Delete
}
[10] Fix | Delete
function admin_enqueue_scripts () {
[11] Fix | Delete
$dismissed = explode (',', get_user_meta (wp_get_current_user ()->ID, 'dismissed_wp_pointers', true));
[12] Fix | Delete
$do_tour = !in_array ('ampforwp_subscribe_pointer', $dismissed);
[13] Fix | Delete
if ($do_tour) {
[14] Fix | Delete
wp_enqueue_style ('wp-pointer');
[15] Fix | Delete
wp_enqueue_script ('wp-pointer');
[16] Fix | Delete
[17] Fix | Delete
add_action('admin_print_footer_scripts', array($this, 'admin_print_footer_scripts'));
[18] Fix | Delete
add_action('admin_head', array($this, 'admin_head')); // Hook to admin head
[19] Fix | Delete
}
[20] Fix | Delete
}
[21] Fix | Delete
function admin_head () {
[22] Fix | Delete
?>
[23] Fix | Delete
<style type="text/css" media="screen"> #pointer-primary { margin: 0 5px 0 0; } </style>
[24] Fix | Delete
<?php }
[25] Fix | Delete
function admin_print_footer_scripts () {
[26] Fix | Delete
global $pagenow;
[27] Fix | Delete
global $current_user;
[28] Fix | Delete
$tour = array ();
[29] Fix | Delete
$tab = isset($_GET['tab']) ? sanitize_text_field( wp_unslash($_GET['tab'])) : '';
[30] Fix | Delete
$function = '';
[31] Fix | Delete
$button2 = '';
[32] Fix | Delete
$options = array ();
[33] Fix | Delete
$show_pointer = false;
[34] Fix | Delete
[35] Fix | Delete
if (!array_key_exists($tab, $tour)) {
[36] Fix | Delete
[37] Fix | Delete
$show_pointer = true;
[38] Fix | Delete
$file_error = true;
[39] Fix | Delete
[40] Fix | Delete
$id = '#toplevel_page_amp_options'; // Define ID used on page html element where we want to display pointer
[41] Fix | Delete
$content = '<h3>' . sprintf (esc_html__('You are awesome for using AMP!', 'accelerated-mobile-pages'), self::DISPLAY_VERSION) . '</h3>';
[42] Fix | Delete
$content .= '<p>' . esc_html__('Do you want the latest update on', 'accelerated-mobile-pages') . '<b>' . esc_html__(' AMP ', 'accelerated-mobile-pages') . '</b>' . esc_html__('before others and some best resources on AMP in a single email? - Free just for users of AMP!', 'accelerated-mobile-pages').'</p>';
[43] Fix | Delete
$content .= '
[44] Fix | Delete
[45] Fix | Delete
<style type="text/css">
[46] Fix | Delete
.wp-pointer-buttons{ padding:0; overflow: hidden; }
[47] Fix | Delete
.wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
[48] Fix | Delete
</style>
[49] Fix | Delete
<div id="mc_embed_signup">
[50] Fix | Delete
<form method="POST" id="subscribe-newsletter-form">
[51] Fix | Delete
<div id="mc_embed_signup_scroll">
[52] Fix | Delete
<div class="mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">
[53] Fix | Delete
<input type="text" name="name" class="form-control" placeholder="'.esc_attr__('Name','accelerated-mobile-pages').'" hidden value="' . esc_attr( $current_user->display_name ) . '" style="display:none">
[54] Fix | Delete
[55] Fix | Delete
<input type="text" value="' . esc_attr( $current_user->user_email ) . '" name="email" class="form-control" placeholder="'.esc_attr__('Email*','accelerated-mobile-pages').'" style=" width: 180px; padding: 6px 5px;">
[56] Fix | Delete
[57] Fix | Delete
<input type="text" name="company" class="form-control" placeholder="'.esc_attr__('Website','accelerated-mobile-pages').'" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="' . esc_url( get_home_url() ) . '">
[58] Fix | Delete
[59] Fix | Delete
<input type="hidden" name="ml-submit" value="1" />
[60] Fix | Delete
</div>
[61] Fix | Delete
<div id="mce-responses">
[62] Fix | Delete
<div class="response" id="mce-error-response" style="display:none"></div>
[63] Fix | Delete
<div class="response" id="mce-success-response" style="display:none"></div>
[64] Fix | Delete
</div>
[65] Fix | Delete
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
[66] Fix | Delete
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>
[67] Fix | Delete
<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">
[68] Fix | Delete
</div>
[69] Fix | Delete
</form>
[70] Fix | Delete
</div>';
[71] Fix | Delete
$options = array (
[72] Fix | Delete
'content' => $content,
[73] Fix | Delete
'position' => array ('edge' => 'left', 'align' => 'left')
[74] Fix | Delete
);
[75] Fix | Delete
}
[76] Fix | Delete
if ($show_pointer) {
[77] Fix | Delete
$this->ampforwp_pointer_script ($id, $options, esc_html__('No Thanks', 'accelerated-mobile-pages'), $button2, $function);
[78] Fix | Delete
}
[79] Fix | Delete
}
[80] Fix | Delete
function get_admin_url($page, $tab) {
[81] Fix | Delete
$url = admin_url();
[82] Fix | Delete
$url .= $page.'?tab='.$tab;
[83] Fix | Delete
return $url;
[84] Fix | Delete
}
[85] Fix | Delete
function ampforwp_pointer_script ($id, $options, $button1, $button2=false, $function='') {
[86] Fix | Delete
?>
[87] Fix | Delete
<script type="text/javascript">
[88] Fix | Delete
(function ($) {
[89] Fix | Delete
var wp_pointers_tour_opts = <?php echo wp_json_encode ($options); ?>, setup;
[90] Fix | Delete
wp_pointers_tour_opts = $.extend (wp_pointers_tour_opts, {
[91] Fix | Delete
buttons: function (event, t) {
[92] Fix | Delete
button= jQuery ('<a id="pointer-close" class="button-secondary">' + '<?php echo wp_kses_post($button1); ?>' + '</a>');
[93] Fix | Delete
button_2= jQuery ('#pointer-close.button');
[94] Fix | Delete
button.bind ('click.pointer', function () {
[95] Fix | Delete
t.element.pointer ('close');
[96] Fix | Delete
});
[97] Fix | Delete
button_2.on('click', function() {
[98] Fix | Delete
t.element.pointer ('close');
[99] Fix | Delete
} );
[100] Fix | Delete
return button;
[101] Fix | Delete
},
[102] Fix | Delete
close: function () {
[103] Fix | Delete
$.post (ajaxurl, {
[104] Fix | Delete
pointer: 'ampforwp_subscribe_pointer',
[105] Fix | Delete
action: 'dismiss-wp-pointer'
[106] Fix | Delete
});
[107] Fix | Delete
}
[108] Fix | Delete
});
[109] Fix | Delete
setup = function () {
[110] Fix | Delete
$('<?php echo esc_attr($id); ?>').pointer(wp_pointers_tour_opts).pointer('open');
[111] Fix | Delete
<?php if ($button2) { ?>
[112] Fix | Delete
jQuery ('#pointer-close').after ('<a id="pointer-primary" class="button-primary">' + '<?php echo wp_kses_post($button2); ?>' + '</a>');
[113] Fix | Delete
jQuery ('#pointer-primary').click (function () {
[114] Fix | Delete
<?php echo $function; ?>
[115] Fix | Delete
});
[116] Fix | Delete
jQuery ('#pointer-close').click (function () {
[117] Fix | Delete
$.post (ajaxurl, {
[118] Fix | Delete
pointer: 'ampforwp_subscribe_pointer',
[119] Fix | Delete
action: 'dismiss-wp-pointer'
[120] Fix | Delete
});
[121] Fix | Delete
})
[122] Fix | Delete
<?php } ?>
[123] Fix | Delete
};
[124] Fix | Delete
if (wp_pointers_tour_opts.position && wp_pointers_tour_opts.position.defer_loading) {
[125] Fix | Delete
$(window).bind('load.wp-pointers', setup);
[126] Fix | Delete
}
[127] Fix | Delete
else {
[128] Fix | Delete
setup ();
[129] Fix | Delete
}
[130] Fix | Delete
}) (jQuery);
[131] Fix | Delete
</script>
[132] Fix | Delete
<?php
[133] Fix | Delete
}
[134] Fix | Delete
}
[135] Fix | Delete
$ampforwp_pointers = new ampforwp_pointers();
[136] Fix | Delete
?>
[137] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function