/
home
/
vianto5
/
distritosatelite.mx
/
wp-content
/
plugins
/
wp-mail-smtp
/
src
/
/home/vianto5/distritosatelite.mx/wp-content/plugins/wp-mail-smtp/src
mkdir
upload
Name
Size
Mode
Actions
Abilities/
-
0755
rm
Admin/
-
0755
rm
Compatibility/
-
0755
rm
Helpers/
-
0755
rm
Integrations/
-
0755
rm
Providers/
-
0755
rm
Queue/
-
0755
rm
Reports/
-
0755
rm
Tasks/
-
0755
rm
TestEmail/
-
0755
rm
UsageTracking/
-
0755
rm
WPCLI/
-
0755
rm
AbstractConnection.php
1116
0644
edit
dl
rm
Conflicts.php
17050
0644
edit
dl
rm
Connect.php
9404
0644
edit
dl
rm
Connection.php
964
0644
edit
dl
rm
ConnectionInterface.php
1038
0644
edit
dl
rm
ConnectionsManager.php
765
0644
edit
dl
rm
Core.php
34650
0644
edit
dl
rm
DBRepair.php
6517
0644
edit
dl
rm
Debug.php
4337
0644
edit
dl
rm
EmailSendingDebug.php
4939
0644
edit
dl
rm
Geo.php
6920
0644
edit
dl
rm
MailCatcher.php
1395
0644
edit
dl
rm
MailCatcherInterface.php
1185
0644
edit
dl
rm
MailCatcherTrait.php
28100
0644
edit
dl
rm
MailCatcherV6.php
1232
0644
edit
dl
rm
Migration.php
12398
0644
edit
dl
rm
MigrationAbstract.php
3288
0644
edit
dl
rm
Migrations.php
4221
0644
edit
dl
rm
OptimizedEmailSending.php
1195
0644
edit
dl
rm
Options.php
49522
0644
edit
dl
rm
Processor.php
14448
0644
edit
dl
rm
SiteHealth.php
12967
0644
edit
dl
rm
Upgrade.php
1587
0644
edit
dl
rm
Uploads.php
5566
0644
edit
dl
rm
WP.php
25089
0644
edit
dl
rm
WPMailArgs.php
4549
0644
edit
dl
rm
WPMailInitiator.php
4485
0644
edit
dl
rm
Edit:
/home/vianto5/distritosatelite.mx/wp-content/plugins/wp-mail-smtp/src/WPMailInitiator.php
(4485B)
<?php namespace WPMailSMTP; /** * The `wp_mail` function initiator. It has centralized initiator data that can be used across all processes. * * @since 3.7.0 */ class WPMailInitiator { /** * The path where the `wp_mail` function was called. * * @since 3.7.0 * * @var string */ private $file; /** * Line in the file where the `wp_mail` function was called. * * @since 3.7.0 * * @var int */ private $line; /** * The `wp_mail` function call backtrace. * * @since 3.7.0 * * @var array */ private $backtrace; /** * Initiator name (plugin or theme name). * * @since 3.7.0 * * @var string */ private $name; /** * Initiator type. Available options: plugin, mu-plugin, theme, wp-core, unknown. * * @since 3.7.0 * * @var string */ private $type; /** * Initiator slug (plugin or theme slug). * * @since 3.7.0 * * @var string */ private $slug; /** * Whether performance-costly properties were initialized. * * @since 3.7.0 * * @var array */ private $initialized = false; /** * Register hooks. * * @since 3.7.0 */ public function hooks() { // Capture `wp_mail` function call. add_action( 'wp_mail_smtp_processor_capture_wp_mail_call', [ $this, 'capture_wp_mail_call' ], 0 ); } /** * Capture `wp_mail` function call. * * @since 4.0.0 */ public function capture_wp_mail_call() { $this->set_initiator(); } /** * Get the path where the `wp_mail` function was called. * * @since 3.7.0 * * @return string */ public function get_file() { return $this->file; } /** * Get the line in the file where the `wp_mail` function was called. * * @since 3.7.0 * * @return int */ public function get_line() { return $this->line; } /** * Get the `wp_mail` function call backtrace. * * @since 3.7.0 * * @return array */ public function get_backtrace() { return $this->backtrace; } /** * Get the initiator name (plugin or theme name). * * @since 3.7.0 * * @return string */ public function get_name() { $this->lazy_init(); return $this->name; } /** * Get the initiator type. Available options: plugin, mu-plugin, theme, wp-core, unknown. * * @since 3.7.0 * * @return string */ public function get_type() { $this->lazy_init(); return $this->type; } /** * Get the initiator slug (plugin or theme slug). * * @since 3.7.0 * * @return string */ public function get_slug() { $this->lazy_init(); return $this->slug; } /** * Initialize initiator data. * * @since 3.7.0 */ public function set_initiator() { // Reset previous values. $this->reset(); $backtrace = $this->get_wpmail_backtrace(); /** * Filter the `wp_mail` function initiator data. * * @since 4.0.0 * * @param array $backtrace Backtrace data. */ $backtrace = apply_filters( 'wp_mail_smtp_wp_mail_initiator_set_initiator', $backtrace ); if ( empty( $backtrace['file'] ) ) { return; } $this->file = $backtrace['file']; $this->backtrace = $backtrace['backtrace']; if ( ! empty( $backtrace['line'] ) ) { $this->line = $backtrace['line']; } } /** * Initialize performance-costly properties. * * @since 3.7.0 */ private function lazy_init() { if ( empty( $this->file ) || $this->initialized ) { return; } $data = WP::get_initiator( $this->file ); $this->name = $data['name']; $this->type = $data['type']; if ( isset( $data['slug'] ) ) { $this->slug = $data['slug']; } $this->initialized = true; } /** * Reset previous initiator data before the new email sending. * * @since 3.7.0 */ private function reset() { $this->initialized = false; $this->file = null; $this->line = null; $this->backtrace = null; $this->name = null; $this->type = null; $this->slug = null; } /** * Get the `wp_mail` function backtrace data, if it exists. * * @since 3.7.0 * * @return array */ private function get_wpmail_backtrace() { $backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace foreach ( $backtrace as $i => $item ) { if ( $item['function'] === 'wp_mail' ) { if ( isset( $item['function'] ) ) { unset( $item['function'] ); } $item['backtrace'] = array_slice( $backtrace, $i ); return $item; } } return []; } }
Save
cmd:
run