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/contact-.../includes/config-v...
File: mail.php
*/
[500] Fix | Delete
public function detect_file_not_in_content_dir( $section, $content ) {
[501] Fix | Delete
$path = path_join( WP_CONTENT_DIR, $content );
[502] Fix | Delete
[503] Fix | Delete
if ( ! wpcf7_is_file_path_in_content_dir( $path ) ) {
[504] Fix | Delete
return true;
[505] Fix | Delete
}
[506] Fix | Delete
[507] Fix | Delete
return false;
[508] Fix | Delete
}
[509] Fix | Delete
[510] Fix | Delete
[511] Fix | Delete
/**
[512] Fix | Delete
* Detects errors of that unsafe email config is used without
[513] Fix | Delete
* sufficient protection.
[514] Fix | Delete
*
[515] Fix | Delete
* @link https://contactform7.com/configuration-errors/unsafe-email-without-protection/
[516] Fix | Delete
*/
[517] Fix | Delete
public function detect_unsafe_email_without_protection( $section, $content ) {
[518] Fix | Delete
static $is_recaptcha_active = null;
[519] Fix | Delete
[520] Fix | Delete
if ( null === $is_recaptcha_active ) {
[521] Fix | Delete
$is_recaptcha_active = call_user_func( function () {
[522] Fix | Delete
$service = WPCF7_RECAPTCHA::get_instance();
[523] Fix | Delete
return $service->is_active();
[524] Fix | Delete
} );
[525] Fix | Delete
}
[526] Fix | Delete
[527] Fix | Delete
if ( $is_recaptcha_active ) {
[528] Fix | Delete
return false;
[529] Fix | Delete
}
[530] Fix | Delete
[531] Fix | Delete
$example_email = 'user-specified@example.com';
[532] Fix | Delete
[533] Fix | Delete
// Replace mail-tags connected to an email type form-tag first.
[534] Fix | Delete
$content = $this->replace_mail_tags( $content, array(
[535] Fix | Delete
'callback' => function ( $matches ) use ( $example_email ) {
[536] Fix | Delete
// allow [[foo]] syntax for escaping a tag
[537] Fix | Delete
if ( $matches[1] === '[' and $matches[4] === ']' ) {
[538] Fix | Delete
return substr( $matches[0], 1, -1 );
[539] Fix | Delete
}
[540] Fix | Delete
[541] Fix | Delete
$tag = $matches[0];
[542] Fix | Delete
$tagname = $matches[2];
[543] Fix | Delete
$values = $matches[3];
[544] Fix | Delete
[545] Fix | Delete
$mail_tag = new WPCF7_MailTag( $tag, $tagname, $values );
[546] Fix | Delete
$field_name = $mail_tag->field_name();
[547] Fix | Delete
[548] Fix | Delete
$form_tags = $this->contact_form->scan_form_tags(
[549] Fix | Delete
array( 'name' => $field_name )
[550] Fix | Delete
);
[551] Fix | Delete
[552] Fix | Delete
if ( $form_tags ) {
[553] Fix | Delete
$form_tag = new WPCF7_FormTag( $form_tags[0] );
[554] Fix | Delete
[555] Fix | Delete
if ( 'email' === $form_tag->basetype ) {
[556] Fix | Delete
return $example_email;
[557] Fix | Delete
}
[558] Fix | Delete
}
[559] Fix | Delete
[560] Fix | Delete
return $tag;
[561] Fix | Delete
},
[562] Fix | Delete
) );
[563] Fix | Delete
[564] Fix | Delete
// Replace remaining mail-tags.
[565] Fix | Delete
$content = $this->replace_mail_tags( $content );
[566] Fix | Delete
[567] Fix | Delete
$content = wpcf7_strip_newline( $content );
[568] Fix | Delete
[569] Fix | Delete
if ( str_contains( $content, $example_email ) ) {
[570] Fix | Delete
return true;
[571] Fix | Delete
}
[572] Fix | Delete
[573] Fix | Delete
return false;
[574] Fix | Delete
}
[575] Fix | Delete
[576] Fix | Delete
}
[577] Fix | Delete
[578] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function