Skip to content

Commit 9455469

Browse files
committed
Merge branch 'trac-48456-codemirror-v5-upgrade' into trac-48456-codemirror-v5-upgrade-espree
2 parents fa9fa8c + 30ecb08 commit 9455469

6 files changed

Lines changed: 25 additions & 19 deletions

File tree

src/wp-admin/includes/media.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ function media_upload_tabs() {
3838
*
3939
* @global wpdb $wpdb WordPress database abstraction object.
4040
*
41-
* @param array $tabs
42-
* @return array $tabs with gallery if post has image attachment
41+
* @param array $tabs Associative array of default tab names.
42+
* @return array $tabs Filtered tabs with gallery if post has image attachment.
4343
*/
4444
function update_gallery_tab( $tabs ) {
4545
global $wpdb;
@@ -71,7 +71,7 @@ function update_gallery_tab( $tabs ) {
7171
*
7272
* @since 2.5.0
7373
*
74-
* @global string $redir_tab
74+
* @global string $redir_tab The name of the tab to redirect to.
7575
*/
7676
function the_media_upload_tabs() {
7777
global $redir_tab;
@@ -527,7 +527,7 @@ function media_handle_sideload( $file_array, $post_id = 0, $desc = null, $post_d
527527
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
528528
* by adding it to the function signature.
529529
*
530-
* @global string $body_id
530+
* @global string $body_id The ID attribute value for the body element.
531531
*
532532
* @param callable $content_func Function that outputs the content.
533533
* @param mixed ...$args Optional additional parameters to pass to the callback function when it's called.

src/wp-admin/includes/user.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ function wp_revoke_user( $id ) {
482482
/**
483483
* @since 2.8.0
484484
*
485-
* @global int $user_ID
485+
* @global int $user_ID Current user ID.
486486
*
487487
* @param false $errors Deprecated.
488488
*/
@@ -505,8 +505,8 @@ function default_password_nag_handler( $errors = false ) {
505505
/**
506506
* @since 2.8.0
507507
*
508-
* @param int $user_ID
509-
* @param WP_User $old_data
508+
* @param int $user_ID User ID.
509+
* @param WP_User $old_data The user object before the update.
510510
*/
511511
function default_password_nag_edit_user( $user_ID, $old_data ) {
512512
// Short-circuit it.
@@ -602,7 +602,7 @@ function use_ssl_preference( $user ) {
602602
/**
603603
* @since MU (3.0.0)
604604
*
605-
* @param string $text
605+
* @param string $text The email body text.
606606
* @return string User site invitation email message.
607607
*/
608608
function admin_created_user_email( $text ) {

src/wp-content/themes/twentytwentyfive/patterns/hidden-written-by.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111

1212
?>
13-
<!-- wp:group {"style":{"spacing":{"blockGap":"0.2em","margin":{"bottom":"var:preset|spacing|60"}}},"textColor":"accent-4","fontSize":"small","layout":{"type":"flex","flexWrap":"wrap"}} -->
14-
<div class="wp-block-group has-accent-4-color has-text-color has-link-color has-small-font-size" style="margin-bottom:var(--wp--preset--spacing--60)">
13+
<!-- wp:group {"style":{"spacing":{"blockGap":"0.2em","margin":{"bottom":"var:preset|spacing|60"}}},"fontSize":"small","layout":{"type":"flex","flexWrap":"wrap"}} -->
14+
<div class="wp-block-group has-small-font-size" style="margin-bottom:var(--wp--preset--spacing--60)">
1515
<!-- wp:paragraph -->
1616
<p><?php esc_html_e( 'Written by ', 'twentytwentyfive' ); ?></p>
1717
<!-- /wp:paragraph -->

src/wp-includes/pluggable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
446446
$from_name = apply_filters( 'wp_mail_from_name', $from_name );
447447

448448
try {
449-
$phpmailer->setFrom( $from_email, $from_name );
449+
$phpmailer->setFrom( $from_email, $from_name, false );
450450
} catch ( PHPMailer\PHPMailer\Exception $e ) {
451451
$mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
452452
$mail_error_data['phpmailer_exception_code'] = $e->getCode();

tests/phpunit/tests/pluggable/wpMail.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,18 +411,21 @@ public function test_wp_mail_addresses_arent_encoded() {
411411
}
412412

413413
/**
414-
* Test that the Sender field in the SMTP envelope is set by Core.
414+
* Test that the Sender field in the SMTP envelope is not set by Core.
415415
*
416-
* A missing Sender field can lead to messages failing DMARC SPF checks.
416+
* Correctly setting the Sender requires knowledge that is not available
417+
* to Core. An incorrect value will often lead to messages being rejected
418+
* by the receiving MTA, so it's the admin's responsibility to
419+
* set it correctly.
417420
*
418-
* @ticket 49687
421+
* @ticket 37736
419422
*/
420-
public function test_wp_mail_sender_set() {
421-
wp_mail( 'user@example.org', 'Testing the Sender field', 'The Sender field should have been set.' );
423+
public function test_wp_mail_sender_not_set() {
424+
wp_mail( 'user@example.org', 'Testing the Sender field', 'The Sender field should not have been set.' );
422425

423426
$mailer = tests_retrieve_phpmailer_instance();
424427

425-
$this->assertSame( 'wordpress@example.org', $mailer->Sender );
428+
$this->assertSame( '', $mailer->Sender );
426429
}
427430

428431
/**

tools/webpack/codemirror-banner.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
/* jshint node:true */
22
/* jshint esversion: 6 */
3-
const pkg = require( '../../package.json' );
3+
const codemirrorVersion = require( 'codemirror/package.json' ).version;
4+
if ( typeof codemirrorVersion !== 'string' ) {
5+
throw new Error( 'Could not read CodeMirror version from package.json' );
6+
}
47

5-
module.exports = `/*! This file is auto-generated from CodeMirror - v${ pkg.dependencies.codemirror }
8+
module.exports = `/*! This file is auto-generated from CodeMirror - v${ codemirrorVersion }
69
710
CodeMirror, copyright (c) by Marijn Haverbeke and others
811
Distributed under an MIT license: http://codemirror.net/LICENSE

0 commit comments

Comments
 (0)