Skip to content

Commit 1cce85d

Browse files
authored
Merge branch 'WordPress:trunk' into trunk
2 parents 874f71e + 6be588c commit 1cce85d

78 files changed

Lines changed: 3650 additions & 797 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/performance.yml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ env:
4444
# changed if we want to normalize results against a different baseline.
4545
BASE_TAG: '6.1.1'
4646
LOCAL_DIR: build
47+
TARGET_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || '' }}
48+
TARGET_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
4749

4850
jobs:
4951
# Runs the performance test suite.
@@ -65,9 +67,17 @@ jobs:
6567
# - Install MU plugin.
6668
# - Run performance tests (current commit).
6769
# - Print performance tests results.
70+
# - Check out target commit (target branch or previous commit).
71+
# - Install npm dependencies.
72+
# - Build WordPress.
73+
# - Run performance tests (previous/target commit).
74+
# - Print target performance tests results.
75+
# - Reset to original commit.
6876
# - Set the environment to the baseline version.
6977
# - Run baseline performance tests.
70-
# - Print base line performance tests results.
78+
# - Print baseline performance tests results.
79+
# - Compare results with base.
80+
# - Add workflow summary.
7181
# - Set the base sha.
7282
# - Set commit details.
7383
# - Publish performance results.
@@ -152,7 +162,31 @@ jobs:
152162
run: npm run test:performance
153163

154164
- name: Print performance tests results
155-
run: "node ./tests/performance/results.js"
165+
run: node ./tests/performance/results.js
166+
167+
- name: Check out target commit (target branch or previous commit)
168+
run: |
169+
if [[ -z "$TARGET_REF" ]]; then
170+
git fetch -n origin $TARGET_SHA
171+
else
172+
git fetch -n origin $TARGET_REF
173+
fi
174+
git reset --hard $TARGET_SHA
175+
176+
- name: Install npm dependencies
177+
run: npm ci
178+
179+
- name: Build WordPress
180+
run: npm run build
181+
182+
- name: Run target performance tests (base/previous commit)
183+
run: npm run test:performance -- --prefix=before
184+
185+
- name: Print target performance tests results
186+
run: node ./tests/performance/results.js --prefix=before
187+
188+
- name: Reset to original commit
189+
run: git reset --hard $GITHUB_SHA
156190

157191
- name: Set the environment to the baseline version
158192
run: |
@@ -162,8 +196,14 @@ jobs:
162196
- name: Run baseline performance tests
163197
run: npm run test:performance -- --prefix=base
164198

165-
- name: Print base line performance tests results
166-
run: "node ./tests/performance/results.js --prefix=base"
199+
- name: Print baseline performance tests results
200+
run: node ./tests/performance/results.js --prefix=base
201+
202+
- name: Compare results with base
203+
run: node ./tests/performance/compare-results.js ${{ runner.temp }}/summary.md
204+
205+
- name: Add workflow summary
206+
run: cat ${{ runner.temp }}/summary.md >> $GITHUB_STEP_SUMMARY
167207

168208
- name: Set the base sha
169209
# Only needed when publishing results.

.github/workflows/phpunit-tests-run.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ jobs:
165165

166166
# __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
167167
- name: Run (Xdebug) tests
168+
if: ${{ inputs.php != '8.3' }}
168169
run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
169170

170171
- name: Ensure version-controlled files are not modified or deleted

.github/workflows/phpunit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
os: [ ubuntu-latest ]
48-
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
48+
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
4949
db-type: [ 'mysql' ]
5050
db-version: [ '5.7', '8.0' ]
5151
multisite: [ false, true ]
@@ -97,7 +97,7 @@ jobs:
9797
fail-fast: false
9898
matrix:
9999
os: [ ubuntu-latest ]
100-
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
100+
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
101101
db-type: [ 'mariadb' ]
102102
db-version: [ '10.4', '10.6', '10.11', '11.0' ]
103103
multisite: [ false, true ]

phpcs.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@
259259
<element value="WP_Test_Adjacent_Image_Link_TestCase"/>
260260
<element value="WP_Tests_Image_Resize_UnitTestCase"/>
261261
<element value="WP_Theme_UnitTestCase"/>
262+
<element value="WP_Font_Face_UnitTestCase"/>
262263

263264
<!-- Mock classes. -->
264265
<element value="Spy_REST_Server"/>

src/wp-admin/includes/admin-filters.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,6 @@
168168

169169
// Append '(Draft)' to draft page titles in the privacy page dropdown.
170170
add_filter( 'list_pages', '_wp_privacy_settings_filter_draft_page_titles', 10, 2 );
171+
172+
// Font management.
173+
add_action( 'admin_print_styles', 'wp_print_font_faces', 50 );

src/wp-admin/includes/class-wp-debug-data.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ public static function debug_data() {
548548
);
549549
} else {
550550
// Get the PHP ini directive values.
551+
$file_uploads = ini_get( 'file_uploads' );
551552
$post_max_size = ini_get( 'post_max_size' );
552553
$upload_max_filesize = ini_get( 'upload_max_filesize' );
553554
$max_file_uploads = ini_get( 'max_file_uploads' );
@@ -556,8 +557,8 @@ public static function debug_data() {
556557
// Add info in Media section.
557558
$info['wp-media']['fields']['file_uploads'] = array(
558559
'label' => __( 'File uploads' ),
559-
'value' => empty( ini_get( 'file_uploads' ) ) ? __( 'Disabled' ) : __( 'Enabled' ),
560-
'debug' => 'File uploads is turned off',
560+
'value' => $file_uploads ? __( 'Enabled' ) : __( 'Disabled' ),
561+
'debug' => $file_uploads,
561562
);
562563
$info['wp-media']['fields']['post_max_size'] = array(
563564
'label' => __( 'Max size of post data allowed' ),

src/wp-admin/includes/class-wp-privacy-policy-content.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,8 @@ public static function text_change_check() {
130130
* Outputs a warning when some privacy info has changed.
131131
*
132132
* @since 4.9.6
133-
*
134-
* @global WP_Post $post Global post object.
135133
*/
136134
public static function policy_text_changed_notice() {
137-
global $post;
138-
139135
$screen = get_current_screen()->id;
140136

141137
if ( 'privacy' !== $screen ) {

src/wp-admin/includes/media.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,13 +2083,11 @@ function media_upload_header() {
20832083
*
20842084
* @global string $type
20852085
* @global string $tab
2086-
* @global bool $is_IE
2087-
* @global bool $is_opera
20882086
*
20892087
* @param array $errors
20902088
*/
20912089
function media_upload_form( $errors = null ) {
2092-
global $type, $tab, $is_IE, $is_opera;
2090+
global $type, $tab;
20932091

20942092
if ( ! _device_can_upload() ) {
20952093
echo '<p>' . sprintf(

src/wp-admin/includes/ms.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,10 @@ function check_upload_size( $file ) {
5858
* @since 3.0.0
5959
* @since 5.1.0 Use wp_delete_site() internally to delete the site row from the database.
6060
*
61-
* @global wpdb $wpdb WordPress database abstraction object.
62-
*
6361
* @param int $blog_id Site ID.
6462
* @param bool $drop True if site's database tables should be dropped. Default false.
6563
*/
6664
function wpmu_delete_blog( $blog_id, $drop = false ) {
67-
global $wpdb;
68-
6965
$blog_id = (int) $blog_id;
7066

7167
$switch = false;

src/wp-admin/includes/upgrade.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,9 @@ function wp_new_blog_notification( $blog_title, $blog_url, $user_id, $password )
625625
*
626626
* @global int $wp_current_db_version The old (current) database version.
627627
* @global int $wp_db_version The new database version.
628-
* @global wpdb $wpdb WordPress database abstraction object.
629628
*/
630629
function wp_upgrade() {
631-
global $wp_current_db_version, $wp_db_version, $wpdb;
630+
global $wp_current_db_version, $wp_db_version;
632631

633632
$wp_current_db_version = __get_option( 'db_version' );
634633

0 commit comments

Comments
 (0)