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/wp-conte.../plugins/wpforms-.../src/Emails
File: Mailer.php
/**
[500] Fix | Delete
* Log given email errors.
[501] Fix | Delete
*
[502] Fix | Delete
* @since 1.5.4
[503] Fix | Delete
*
[504] Fix | Delete
* @param array $errors Errors to log.
[505] Fix | Delete
*/
[506] Fix | Delete
protected function log_errors( $errors ) {
[507] Fix | Delete
[508] Fix | Delete
if ( empty( $errors ) || ! \is_array( $errors ) ) {
[509] Fix | Delete
return;
[510] Fix | Delete
}
[511] Fix | Delete
[512] Fix | Delete
foreach ( $errors as $error ) {
[513] Fix | Delete
\wpforms_log(
[514] Fix | Delete
$error,
[515] Fix | Delete
[
[516] Fix | Delete
'to_email' => $this->to_email,
[517] Fix | Delete
'subject' => $this->subject,
[518] Fix | Delete
'message' => \wp_trim_words( $this->get_message() ),
[519] Fix | Delete
],
[520] Fix | Delete
[
[521] Fix | Delete
'type' => 'error',
[522] Fix | Delete
]
[523] Fix | Delete
);
[524] Fix | Delete
}
[525] Fix | Delete
}
[526] Fix | Delete
[527] Fix | Delete
/**
[528] Fix | Delete
* Send the email.
[529] Fix | Delete
*
[530] Fix | Delete
* @since 1.5.4
[531] Fix | Delete
*
[532] Fix | Delete
* @return bool
[533] Fix | Delete
*/
[534] Fix | Delete
public function send() {
[535] Fix | Delete
[536] Fix | Delete
if ( ! \did_action( 'init' ) && ! \did_action( 'admin_init' ) ) {
[537] Fix | Delete
\_doing_it_wrong( __FUNCTION__, \esc_html__( 'You cannot send emails with WPForms\Emails\Mailer until init/admin_init has been reached.', 'wpforms-lite' ), null );
[538] Fix | Delete
[539] Fix | Delete
return false;
[540] Fix | Delete
}
[541] Fix | Delete
[542] Fix | Delete
// Don't send anything if emails have been disabled.
[543] Fix | Delete
if ( $this->is_email_disabled() ) {
[544] Fix | Delete
return false;
[545] Fix | Delete
}
[546] Fix | Delete
[547] Fix | Delete
$errors = $this->get_errors();
[548] Fix | Delete
[549] Fix | Delete
if ( $errors ) {
[550] Fix | Delete
$this->log_errors( $errors );
[551] Fix | Delete
return false;
[552] Fix | Delete
}
[553] Fix | Delete
[554] Fix | Delete
$this->send_before();
[555] Fix | Delete
[556] Fix | Delete
$sent = \wp_mail(
[557] Fix | Delete
$this->to_email,
[558] Fix | Delete
$this->get_subject(),
[559] Fix | Delete
$this->get_message(),
[560] Fix | Delete
$this->get_headers(),
[561] Fix | Delete
$this->get_attachments()
[562] Fix | Delete
);
[563] Fix | Delete
[564] Fix | Delete
$this->send_after();
[565] Fix | Delete
[566] Fix | Delete
return $sent;
[567] Fix | Delete
}
[568] Fix | Delete
[569] Fix | Delete
/**
[570] Fix | Delete
* Add filters / actions before the email is sent.
[571] Fix | Delete
*
[572] Fix | Delete
* @since 1.5.4
[573] Fix | Delete
*/
[574] Fix | Delete
public function send_before() {
[575] Fix | Delete
[576] Fix | Delete
do_action( 'wpforms_emails_mailer_send_before', $this );
[577] Fix | Delete
add_filter( 'wp_mail_from', [ $this, 'get_from_address' ] );
[578] Fix | Delete
add_filter( 'wp_mail_from_name', [ $this, 'get_from_name' ] );
[579] Fix | Delete
add_filter( 'wp_mail_content_type', [ $this, 'get_content_type' ] );
[580] Fix | Delete
}
[581] Fix | Delete
[582] Fix | Delete
/**
[583] Fix | Delete
* Remove filters / actions after the email is sent.
[584] Fix | Delete
*
[585] Fix | Delete
* @since 1.5.4
[586] Fix | Delete
*/
[587] Fix | Delete
public function send_after() {
[588] Fix | Delete
[589] Fix | Delete
do_action( 'wpforms_emails_mailer_send_after', $this );
[590] Fix | Delete
remove_filter( 'wp_mail_from', [ $this, 'get_from_address' ] );
[591] Fix | Delete
remove_filter( 'wp_mail_from_name', [ $this, 'get_from_name' ] );
[592] Fix | Delete
remove_filter( 'wp_mail_content_type', [ $this, 'get_content_type' ] );
[593] Fix | Delete
}
[594] Fix | Delete
}
[595] Fix | Delete
[596] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function