Changeset 59592
- Timestamp:
- 01/08/2025 12:52:04 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-locale-switcher.php
r57350 r59592 274 274 * 275 275 * @global WP_Locale $wp_locale WordPress date and time locale object. 276 * @global PHPMailer\PHPMailer\PHPMailer $phpmailer 276 277 * 277 278 * @param string $locale The locale to change to. 278 279 */ 279 280 private function change_locale( $locale ) { 280 global $wp_locale ;281 global $wp_locale, $phpmailer; 281 282 282 283 $this->load_translations( $locale ); … … 285 286 286 287 WP_Translation_Controller::get_instance()->set_locale( $locale ); 288 289 if ( $phpmailer instanceof WP_PHPMailer ) { 290 $phpmailer->SetLanguage(); 291 } 287 292 288 293 /** -
trunk/src/wp-includes/pluggable.php
r59578 r59592 252 252 require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php'; 253 253 require_once ABSPATH . WPINC . '/PHPMailer/Exception.php'; 254 $phpmailer = new PHPMailer\PHPMailer\PHPMailer( true ); 254 require_once ABSPATH . WPINC . '/class-wp-phpmailer.php'; 255 $phpmailer = new WP_PHPMailer( true ); 255 256 256 257 $phpmailer::$validator = static function ( $email ) { -
trunk/tests/phpunit/data/languages/de_DE.l10n.php
r57639 r59592 1 1 <?php 2 return ['domain'=>NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['html_lang_attribute'=>'de-DE','text directionltr'=>'ltr','number_format_decimal_point'=>',','number_format_thousands_sep'=>'.','Update %s now'=>'Jetzt %s aktualisieren','[%1$s] Confirm Action: %2$s'=>'[%1$s] Aktion bestätigen: %2$s','[%s] Erasure Request Fulfilled'=>'[%s] Löschauftrag ausgeführt','[%s] Personal Data Export'=>'[%s] Export personenbezogener Daten' ],'language'=>'de_DE','x-generator'=>'Poedit 2.2.1'];2 return ['domain'=>NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','messages'=>['html_lang_attribute'=>'de-DE','text directionltr'=>'ltr','number_format_decimal_point'=>',','number_format_thousands_sep'=>'.','Update %s now'=>'Jetzt %s aktualisieren','[%1$s] Confirm Action: %2$s'=>'[%1$s] Aktion bestätigen: %2$s','[%s] Erasure Request Fulfilled'=>'[%s] Löschauftrag ausgeführt','[%s] Personal Data Export'=>'[%s] Export personenbezogener Daten', 'You must provide at least one recipient email address.'=>'Du musst mindestens eine Empfänger-E-Mail-Adresse angeben.'],'language'=>'de_DE','x-generator'=>'Poedit 2.2.1']; -
trunk/tests/phpunit/data/languages/de_DE.po
r48930 r59592 58 58 msgid "[%s] Personal Data Export" 59 59 msgstr "[%s] Export personenbezogener Daten" 60 61 #: wp-includes/class-wp-phpmailer.php:71 62 msgid "You must provide at least one recipient email address." 63 msgstr "Du musst mindestens eine Empfänger-E-Mail-Adresse angeben." -
trunk/tests/phpunit/includes/bootstrap.php
r59326 r59592 247 247 $multisite = $multisite || ( defined( 'MULTISITE' ) && MULTISITE ); 248 248 249 // Override the PHPMailer.250 require_once __DIR__ . '/mock-mailer.php';251 $phpmailer = new MockPHPMailer( true );252 253 249 if ( ! defined( 'WP_DEFAULT_THEME' ) ) { 254 250 define( 'WP_DEFAULT_THEME', 'default' ); … … 305 301 // Load WordPress. 306 302 require_once ABSPATH . 'wp-settings.php'; 303 304 // Override the PHPMailer. 305 require_once __DIR__ . '/mock-mailer.php'; 306 307 $phpmailer = new MockPHPMailer( true ); 307 308 308 309 // Delete any default posts & related data. -
trunk/tests/phpunit/includes/mock-mailer.php
r52009 r59592 1 1 <?php 2 /** 3 * Mock PHPMailer class for testing. 4 * 5 * @package WordPress 6 * @subpackage UnitTests 7 * @since 4.5.0 8 */ 9 2 10 require_once ABSPATH . 'wp-includes/PHPMailer/PHPMailer.php'; 3 11 require_once ABSPATH . 'wp-includes/PHPMailer/Exception.php'; 12 require_once ABSPATH . 'wp-includes/class-wp-phpmailer.php'; 4 13 5 class MockPHPMailer extends PHPMailer\PHPMailer\PHPMailer { 14 /** 15 * Test class extending WP_PHPMailer. 16 * 17 * @since 4.5.0 18 */ 19 class MockPHPMailer extends WP_PHPMailer { 6 20 public $mock_sent = array(); 7 21
Note: See TracChangeset
for help on using the changeset viewer.