Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
cfd3ca4
Set up for phpbench
sirreal Jan 22, 2026
5d60bdb
phpbench setup
sirreal Jan 22, 2026
15e60ff
Build/Test Tools: Remove erroneous PHP tags for translations from QUn…
westonruter Mar 31, 2026
7919efb
I18N: Provide gettext context to disambiguate translation strings for…
audrasjb Mar 31, 2026
a2479da
I18N: Provide gettext context to disambiguate translation strings for…
audrasjb Mar 31, 2026
88734d4
Administration: Prevent horizontal scrollbar in contextual help panel.
audrasjb Mar 31, 2026
abf9109
I18N: Add context for Next/Previous strings in the jQuery UI datepicker.
SergeyBiryukov Mar 31, 2026
1893a30
Build/Test Tools: Copy vendor scripts earlier in the build.
peterwilsoncc Apr 1, 2026
b60f8ba
Admin Reskin: Change color picker height to match new design system.
t-hamano Apr 1, 2026
d368a44
Connectors: Replace `plugin.slug` with `plugin.file` in connector reg…
jorgefilipecosta Apr 1, 2026
c5627a1
Fix: Register Akismet Anti-Spam as a connector.
jorgefilipecosta Apr 1, 2026
b5da8de
Admin Reskin: Correct ”Copied!” text alignment on Privacy Policy Guid…
SergeyBiryukov Apr 1, 2026
2183f23
REST API: Harden Real Time Collaboration endpoint.
peterwilsoncc Apr 2, 2026
d0c6277
Media: Update upload file overlay colors.
joedolson Apr 2, 2026
d508d24
Admin: Limit scope of admin notice link design.
joedolson Apr 2, 2026
8510818
Code Quality: Remove unused variable in `WP_Block_Patterns_Registry`.
SergeyBiryukov Apr 2, 2026
54593bc
Tests: Move data providers and helpers in `Tests_REST_Server` for con…
SergeyBiryukov Apr 3, 2026
e2d6d2b
Administration: Improve dashboard widgets border styles.
audrasjb Apr 4, 2026
b10d2f9
Tests: Adjust Unicode tests for consistency.
SergeyBiryukov Apr 4, 2026
609f25f
Tests: Move `wp_dropdown_languages()` tests to their own file.
SergeyBiryukov Apr 5, 2026
4bf7a21
Merge branch 'sirreal-benchmarking' into bench-html-api
sirreal Jan 23, 2026
96294ed
benchmarking js escaping
sirreal Jan 23, 2026
11ed615
set_modifiable_text benches
sirreal Jan 23, 2026
664b3d3
Fix php test data constant
sirreal Jan 23, 2026
bc057d7
Add html processing benchmarks
sirreal Jan 23, 2026
b5c6124
Cleanup lints
sirreal Jan 23, 2026
d53ba50
Add test html file
sirreal Jan 23, 2026
edb00ec
reorganize benchmarks
sirreal Mar 10, 2026
ddd5ad4
Exclude benchmarks from phpcs
sirreal Mar 10, 2026
c4a0adb
improve benchmarks and isolate set up
sirreal Mar 10, 2026
87d212c
lint
sirreal Mar 10, 2026
eae77f0
prevent embedding huge HTML docs in XML results
sirreal Mar 10, 2026
b0c7bff
tweak revolusions and iterations
sirreal Mar 10, 2026
7cb7ca7
Fix data URIs
sirreal Mar 11, 2026
847c0db
Try using global namespace for special functions
sirreal Mar 10, 2026
46e4771
Revert "Try using global namespace for special functions"
sirreal Mar 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,7 @@ module.exports = function(grunt) {
'clean:js',
'build:webpack',
'copy:js',
'copy-vendor-scripts',
'file_append',
'uglify:all',
'concat:tinymce',
Expand Down Expand Up @@ -2133,7 +2134,6 @@ module.exports = function(grunt) {
'build:css',
'build:codemirror',
'build:gutenberg',
'copy-vendor-scripts',
'build:certificates'
] );
} else {
Expand All @@ -2145,7 +2145,6 @@ module.exports = function(grunt) {
'build:css',
'build:codemirror',
'build:gutenberg',
'copy-vendor-scripts',
'replace:source-maps',
'verify:build'
] );
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"wp-coding-standards/wpcs": "~3.3.0",
"phpcompatibility/phpcompatibility-wp": "~2.1.3",
"phpstan/phpstan": "2.1.39",
"yoast/phpunit-polyfills": "^1.1.0"
"yoast/phpunit-polyfills": "^1.1.0",
"phpbench/phpbench": "^1.5"
},
"config": {
"allow-plugins": {
Expand Down
74 changes: 74 additions & 0 deletions phpbench-bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?php
/**
* Bootstrap file for phpbench benchmarks.
*
* Loads WordPress for running benchmarks.
*/

define( 'PHPBENCH_ROOT', __DIR__ );

if ( defined( 'WP_TESTS_CONFIG_FILE_PATH' ) ) {
$config_file_path = WP_TESTS_CONFIG_FILE_PATH;
} else {
$config_file_path = __DIR__ . '/wp-tests-config.php';
}

/*
* Globalize some WordPress variables.
*/
global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp, $phpmailer, $wp_theme_directories;

if ( ! is_readable( $config_file_path ) ) {
exit( 1 );
}
Comment on lines +21 to +23
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better debugging, it's helpful to output an error message to stderr when the script exits due to a fatal condition. This will make it easier to diagnose setup issues when running the benchmarks.

if ( ! is_readable( $config_file_path ) ) {
	fwri te( STDERR, "Error: Could not read the WordPress test configuration file from {$config_file_path}. Aborting.\n" );
	exit( 1 );
}


require_once $config_file_path;

if ( ! is_dir( ABSPATH ) ) {
exit( 1 );
}
Comment on lines +27 to +29
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the check above, adding an error message here would improve debuggability if ABSPATH is not correctly defined or doesn't point to a directory.

if ( ! is_dir( ABSPATH ) ) {
	fwrite( STDERR, 'Error: The ABSPATH ' . ABSPATH . " is not a directory. Aborting.\n" );
	exit( 1 );
}


function tests_reset__SERVER() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
$_SERVER['HTTP_HOST'] = WP_TESTS_DOMAIN;
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_URI'] = '';
$_SERVER['SERVER_NAME'] = WP_TESTS_DOMAIN;
$_SERVER['SERVER_PORT'] = '80';
$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';

unset( $_SERVER['HTTP_REFERER'] );
unset( $_SERVER['HTTPS'] );
}
tests_reset__SERVER();

define( 'WP_TESTS_TABLE_PREFIX', $table_prefix );

define( 'DIR_BENCHMARKDATA', __DIR__ . '/tests/benchmarks/data' );
define( 'DIR_TESTDATA', __DIR__ . '/tests/phpunit/data' );
define( 'WP_LANG_DIR', realpath( DIR_TESTDATA . '/languages' ) );

/*
* Cron tries to make an HTTP request to the site, which always fails,
* because tests are run in CLI mode only.
*/
define( 'DISABLE_WP_CRON', true );

define( 'WP_MEMORY_LIMIT', -1 );
define( 'WP_MAX_MEMORY_LIMIT', -1 );

$PHP_SELF = '/index.php';
$GLOBALS['PHP_SELF'] = '/index.php';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line is redundant. $PHP_SELF is a global variable, so assigning to it on line 60 is sufficient to set the global value. This line can be removed.

$_SERVER['PHP_SELF'] = '/index.php';

if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
define( 'WP_DEFAULT_THEME', 'default' );
}
$wp_theme_directories = array();

if ( file_exists( DIR_TESTDATA . '/themedir1' ) ) {
$wp_theme_directories[] = DIR_TESTDATA . '/themedir1';
}

// Load WordPress.
require_once ABSPATH . 'wp-settings.php';
5 changes: 5 additions & 0 deletions phpbench.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "./vendor/phpbench/phpbench/phpbench.schema.json",
"runner.bootstrap": "phpbench-bootstrap.php",
"runner.path": "tests/benchmarks/benchmarks"
}
2 changes: 2 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@

<rule ref="PEAR.NamingConventions.ValidClassName.Invalid">
<exclude-pattern>/tests/phpunit/tests/*</exclude-pattern>
<exclude-pattern>/tests/benchmarks/benchmarks/*</exclude-pattern>
<!-- Exclude some old classes that cannot be renamed, as it would break back compat. -->
<exclude-pattern>/src/wp-admin/includes/class-wp-filesystem-ftpsockets\.php</exclude-pattern>
<exclude-pattern>/src/wp-includes/class-wp-oembed\.php</exclude-pattern>
Expand Down Expand Up @@ -329,6 +330,7 @@
<!-- Exclude the unit tests from the file name rules. -->
<rule ref="WordPress.Files.FileName">
<exclude-pattern>/tests/phpunit/*</exclude-pattern>
<exclude-pattern>/tests/benchmarks/benchmarks/*</exclude-pattern>
</rule>

<!-- WPCS1620: template.php isn't a template tag file. -->
Expand Down
10 changes: 5 additions & 5 deletions src/wp-admin/css/color-picker.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/* Needs higher specificity to override `.wp-core-ui .button`. */
.wp-picker-container .wp-color-result.button {
min-height: 30px;
min-height: 32px;
margin: 0 6px 6px 0;
padding: 0 0 0 30px;
font-size: 11px;
Expand All @@ -22,7 +22,7 @@
border-left: 1px solid #c3c4c7;
color: #50575e;
display: block;
line-height: 2.54545455; /* 28px */
line-height: 2.72727273; /* 30px */
padding: 0 6px;
text-align: center;
}
Expand Down Expand Up @@ -76,8 +76,8 @@
.wp-customizer .wp-picker-input-wrap .button.wp-picker-clear {
margin-left: 6px;
padding: 0 8px;
line-height: 2.54545455; /* 28px */
min-height: 30px;
line-height: 2.72727273; /* 30px */
min-height: 32px;
}

.wp-picker-container .iris-square-slider .ui-slider-handle:focus {
Expand All @@ -97,7 +97,7 @@
margin: 0;
padding: 0 5px;
vertical-align: top;
min-height: 30px;
min-height: 32px;
}

.wp-color-picker::-webkit-input-placeholder {
Expand Down
31 changes: 10 additions & 21 deletions src/wp-admin/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -1473,22 +1473,22 @@ div.error p,
color: #1e1e1e;
}

.notice a,
.error a,
.updated a {
div.notice a,
div.error a,
div.updated a {
color: var(--wp-admin-theme-color-darker-10);
text-decoration: underline;
}

.notice a:hover,
.error a:hover,
.updated a:hover {
div.notice a:hover,
div.error a:hover,
div.updated a:hover {
color: var(--wp-admin-theme-color-darker-20);
}

.notice a:focus,
.error a:focus,
.updated a:focus {
div.notice a:focus,
div.error a:focus,
div.updated a:focus {
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
outline: 2px solid transparent;
border-radius: 2px;
Expand Down Expand Up @@ -2077,17 +2077,6 @@ p.auto-update-status {
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02), 0 1px 0 rgba(0, 0, 0, 0.02);
}

.contextual-help-tabs .active::after {
content: "";
position: absolute;
top: 0;
right: -1px;
width: 2px;
height: 100%;
background: inherit;
z-index: 2;
}

.contextual-help-tabs .active a {
border-color: #c3c4c7;
color: #2c3338;
Expand Down Expand Up @@ -2292,7 +2281,7 @@ html.wp-toolbar {
line-height: 1;
}

.postbox.closed {
.postbox.closed .postbox-header {
border-bottom: 0;
}

Expand Down
9 changes: 5 additions & 4 deletions src/wp-admin/css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -994,15 +994,16 @@ form#tags-filter {
}

.privacy-settings-accordion-actions {
text-align: right;
display: block;
justify-content: right;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 1em;
}

.privacy-settings-accordion-actions .success {
display: none;
color: #007017;
padding-right: 1em;
padding-top: 6px;
}

.privacy-settings-accordion-actions .success.visible {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-posts-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ protected function get_bulk_actions() {
if ( $this->is_trash ) {
$actions['untrash'] = __( 'Restore' );
} else {
$actions['edit'] = __( 'Bulk edit' );
$actions['edit'] = _x( 'Bulk edit', 'verb' );
}
}

Expand Down
9 changes: 8 additions & 1 deletion src/wp-admin/includes/meta-boxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,14 @@ function link_advanced_meta_box( $link ) {
<td><input name="link_rss" class="code" type="text" id="rss_uri" maxlength="255" value="<?php echo ( isset( $link->link_rss ) ? esc_attr( $link->link_rss ) : '' ); ?>" /></td>
</tr>
<tr>
<th scope="row"><label for="link_notes"><?php _e( 'Notes' ); ?></label></th>
<th scope="row">
<label for="link_notes">
<?php
/* translators: Label for the Notes textarea in the Link Manager edit screen. */
_ex( 'Notes', 'Link manager notes field label' );
?>
</label>
</th>
<td><textarea name="link_notes" id="link_notes" rows="10"><?php echo $link->link_notes ?? ''; // textarea_escaped ?></textarea></td>
</tr>
<tr>
Expand Down
7 changes: 3 additions & 4 deletions src/wp-includes/class-wp-block-patterns-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,9 @@ public function get_registered( $pattern_name ) {
* and per style.
*/
public function get_all_registered( $outside_init_only = false ) {
$patterns = $outside_init_only
? $this->registered_patterns_outside_init
: $this->registered_patterns;
$hooked_blocks = get_hooked_blocks();
$patterns = $outside_init_only
? $this->registered_patterns_outside_init
: $this->registered_patterns;

foreach ( $patterns as $index => $pattern ) {
$content = $this->get_content( $pattern['name'], $outside_init_only );
Expand Down
9 changes: 5 additions & 4 deletions src/wp-includes/class-wp-connector-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* env_var_name?: non-empty-string
* },
* plugin?: array{
* slug: non-empty-string
* file: non-empty-string
* }
* }
*/
Expand Down Expand Up @@ -109,7 +109,8 @@ final class WP_Connector_Registry {
* @type array $plugin {
* Optional. Plugin data for install/activate UI.
*
* @type string $slug The WordPress.org plugin slug.
* @type string $file The plugin's main file path relative to the plugins
* directory (e.g. 'akismet/akismet.php' or 'hello.php').
* }
* }
* @return array|null The registered connector data on success, null on failure.
Expand Down Expand Up @@ -242,8 +243,8 @@ public function register( string $id, array $args ): ?array {
}
}

if ( ! empty( $args['plugin'] ) && is_array( $args['plugin'] ) ) {
$connector['plugin'] = $args['plugin'];
if ( ! empty( $args['plugin'] ) && is_array( $args['plugin'] ) && ! empty( $args['plugin']['file'] ) ) {
$connector['plugin'] = array( 'file' => $args['plugin']['file'] );
}

$this->registered_connectors[ $id ] = $connector;
Expand Down
Loading
Loading