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/clone/wp-conte.../plugins/advanced.../admin/includes
File: class-notices.php
[500] Fix | Delete
return $subscribed;
[501] Fix | Delete
}
[502] Fix | Delete
[503] Fix | Delete
/**
[504] Fix | Delete
* Check if a usesr can be subscribed to our newsletter
[505] Fix | Delete
* check if is already subscribed or email is invalid
[506] Fix | Delete
*
[507] Fix | Delete
* @return bool true if user can subscribe
[508] Fix | Delete
*/
[509] Fix | Delete
public function user_can_subscribe() {
[510] Fix | Delete
[511] Fix | Delete
// respect previous settings.
[512] Fix | Delete
$options = $this->options();
[513] Fix | Delete
if ( isset( $options['is_subscribed'] ) ) {
[514] Fix | Delete
return true;
[515] Fix | Delete
}
[516] Fix | Delete
[517] Fix | Delete
$current_user = wp_get_current_user();
[518] Fix | Delete
[519] Fix | Delete
if ( empty( $current_user->ID ) || empty( $current_user->user_email ) ) {
[520] Fix | Delete
return false;
[521] Fix | Delete
}
[522] Fix | Delete
[523] Fix | Delete
$subscribed = get_user_meta( $current_user->ID, 'advanced-ads-subscribed', true );
[524] Fix | Delete
[525] Fix | Delete
// secureserver.net email address belong to GoDaddy (?) and have very, very low open rates. Seems like only temporary setup.
[526] Fix | Delete
return ( ! $subscribed && is_email( $current_user->user_email ) && false === strpos( $current_user->user_email, 'secureserver.net' ) )
[527] Fix | Delete
? true : false;
[528] Fix | Delete
[529] Fix | Delete
}
[530] Fix | Delete
[531] Fix | Delete
/**
[532] Fix | Delete
* Update information that the current user is subscribed
[533] Fix | Delete
*/
[534] Fix | Delete
private function mark_as_subscribed() {
[535] Fix | Delete
[536] Fix | Delete
$user_id = get_current_user_id();
[537] Fix | Delete
[538] Fix | Delete
if ( ! $this->is_subscribed() ) {
[539] Fix | Delete
update_user_meta( $user_id, 'advanced-ads-subscribed', true );
[540] Fix | Delete
}
[541] Fix | Delete
}
[542] Fix | Delete
[543] Fix | Delete
/**
[544] Fix | Delete
* Add AdSense tutorial notice
[545] Fix | Delete
*
[546] Fix | Delete
* @param Advanced_Ads_Ad $ad ad object.
[547] Fix | Delete
* @param array $types ad types.
[548] Fix | Delete
*/
[549] Fix | Delete
public function adsense_tutorial( $ad, $types = [] ) {
[550] Fix | Delete
[551] Fix | Delete
$options = $this->options();
[552] Fix | Delete
$_notice = 'nl_adsense';
[553] Fix | Delete
[554] Fix | Delete
if ( 'adsense' !== $ad->type || isset( $options['closed'][ $_notice ] ) ) {
[555] Fix | Delete
return;
[556] Fix | Delete
}
[557] Fix | Delete
[558] Fix | Delete
include ADVADS_ABSPATH . '/admin/includes/notices.php';
[559] Fix | Delete
[560] Fix | Delete
if ( ! isset( $advanced_ads_admin_notices[ $_notice ] ) ) {
[561] Fix | Delete
return;
[562] Fix | Delete
}
[563] Fix | Delete
[564] Fix | Delete
$notice = $advanced_ads_admin_notices[ $_notice ];
[565] Fix | Delete
$text = $notice['text'];
[566] Fix | Delete
include ADVADS_ABSPATH . '/admin/views/notices/inline.php';
[567] Fix | Delete
}
[568] Fix | Delete
[569] Fix | Delete
/**
[570] Fix | Delete
* Create the content of a welcome panel like WordPress core does
[571] Fix | Delete
*/
[572] Fix | Delete
public function get_welcome_panel() {
[573] Fix | Delete
[574] Fix | Delete
ob_start();
[575] Fix | Delete
include ADVADS_ABSPATH . '/admin/views/notices/welcome-panel.php';
[576] Fix | Delete
[577] Fix | Delete
return ob_get_clean();
[578] Fix | Delete
[579] Fix | Delete
}
[580] Fix | Delete
}
[581] Fix | Delete
[582] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function