Skip to content

Commit f62cfb3

Browse files
committed
Merge branch 'add/on-this-day-widget' of https://github.com/alshakero/wordpress-develop into add/on-this-day-widget
2 parents bcf3daa + dfc24f2 commit f62cfb3

19 files changed

Lines changed: 559 additions & 129 deletions

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"ext-dom": "*"
2020
},
2121
"require-dev": {
22-
"composer/ca-bundle": "1.5.10",
22+
"composer/ca-bundle": "1.5.11",
2323
"squizlabs/php_codesniffer": "3.13.5",
2424
"wp-coding-standards/wpcs": "~3.3.0",
2525
"phpcompatibility/phpcompatibility-wp": "~2.1.3",

src/js/_enqueues/admin/post.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ jQuery( function($) {
10281028
revert_e = $el.html();
10291029

10301030
buttons.html(
1031-
'<button type="button" class="save button button-small">' + __( 'OK' ) + '</button> ' +
1031+
'<button type="button" class="save button button-compact">' + __( 'OK' ) + '</button> ' +
10321032
'<button type="button" class="cancel button-link">' + __( 'Cancel' ) + '</button>'
10331033
);
10341034

src/wp-admin/css/edit.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ input#link_url {
121121
#edit-slug-box .cancel {
122122
margin-right: 10px;
123123
padding: 0;
124-
font-size: 11px;
125124
}
126125

127126
#comment-link-box {
@@ -140,7 +139,7 @@ input#link_url {
140139
#editable-post-name input {
141140
font-size: 13px;
142141
font-weight: 400;
143-
height: 24px;
142+
min-height: 32px;
144143
margin: 0;
145144
width: 16em;
146145
}
@@ -1068,6 +1067,10 @@ form#tags-filter {
10681067
#edit-slug-box {
10691068
padding: 0;
10701069
}
1070+
1071+
#editable-post-name input {
1072+
min-height: 40px;
1073+
}
10711074
}
10721075

10731076
@media only screen and (max-width: 1004px) {

src/wp-admin/css/forms.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,12 @@ input[type="number"].tiny-text {
583583
vertical-align: middle;
584584
}
585585

586+
.button.wp-hide-pw.user-new-password-toggle {
587+
display: inline-flex;
588+
align-items: center;
589+
column-gap: 4px;
590+
}
591+
586592
.wp-cancel-pw .dashicons-no {
587593
display: none;
588594
}

src/wp-admin/css/revisions.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ table.diff .diff-addedline ins {
309309
float: right;
310310
margin-left: 6px;
311311
margin-right: 6px;
312-
margin-top: 2px;
313312
}
314313

315314
.diff-meta-from {
@@ -632,8 +631,4 @@ div.revisions-controls > .wp-slider > .ui-slider-handle {
632631
word-break: break-all;
633632
word-wrap: break-word;
634633
}
635-
636-
.diff-meta input.restore-revision {
637-
margin-top: 0;
638-
}
639634
}

src/wp-admin/includes/class-wp-screen.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ public function render_per_page_options() {
12801280
<legend><?php _e( 'Pagination' ); ?></legend>
12811281
<?php if ( $per_page_label ) : ?>
12821282
<label for="<?php echo esc_attr( $option ); ?>"><?php echo $per_page_label; ?></label>
1283-
<input type="number" step="1" min="1" max="999" class="screen-per-page" name="wp_screen_options[value]"
1283+
<input type="number" step="1" min="1" max="999" class="screen-per-page small-text" name="wp_screen_options[value]"
12841284
id="<?php echo esc_attr( $option ); ?>"
12851285
value="<?php echo esc_attr( $per_page ); ?>" />
12861286
<?php endif; ?>

src/wp-admin/includes/revision.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,11 @@ function wp_print_revision_templates() {
370370

371371
<script id="tmpl-revisions-buttons" type="text/html">
372372
<div class="revisions-previous">
373-
<input class="button" type="button" value="<?php echo esc_attr_x( 'Previous', 'Button label for a previous revision' ); ?>" />
373+
<input class="button button-compact" type="button" value="<?php echo esc_attr_x( 'Previous', 'Button label for a previous revision' ); ?>" />
374374
</div>
375375

376376
<div class="revisions-next">
377-
<input class="button" type="button" value="<?php echo esc_attr_x( 'Next', 'Button label for a next revision' ); ?>" />
377+
<input class="button button-compact" type="button" value="<?php echo esc_attr_x( 'Next', 'Button label for a next revision' ); ?>" />
378378
</div>
379379
</script>
380380

@@ -454,9 +454,9 @@ function wp_print_revision_templates() {
454454
<# } #>
455455
<?php } ?>
456456
<# if ( data.attributes.autosave ) { #>
457-
type="button" class="restore-revision button button-primary" value="<?php esc_attr_e( 'Restore This Autosave' ); ?>" />
457+
type="button" class="restore-revision button button-primary button-compact" value="<?php esc_attr_e( 'Restore This Autosave' ); ?>" />
458458
<# } else { #>
459-
type="button" class="restore-revision button button-primary" value="<?php esc_attr_e( 'Restore This Revision' ); ?>" />
459+
type="button" class="restore-revision button button-primary button-compact" value="<?php esc_attr_e( 'Restore This Revision' ); ?>" />
460460
<# } #>
461461
<# } #>
462462
</div>

src/wp-admin/user-edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@
695695
<input type="password" name="pass1" id="pass1" class="regular-text ltr" value="" autocomplete="new-password" spellcheck="false" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
696696
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
697697
</div>
698-
<button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
698+
<button type="button" class="button wp-hide-pw user-new-password-toggle hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
699699
<span class="dashicons dashicons-hidden" aria-hidden="true"></span>
700700
<span class="text"><?php _e( 'Hide' ); ?></span>
701701
</button>

src/wp-includes/certificates/ca-bundle.crt

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
## Bundle of CA Root Certificates
33
##
4-
## Certificate data from Mozilla as of: Tue Dec 2 04:12:02 2025 GMT
4+
## Certificate data from Mozilla last updated on: Wed Feb 11 18:26:30 2026 GMT
55
##
66
## Find updated versions here: https://curl.se/docs/caextract.html
77
##
@@ -15,8 +15,8 @@
1515
## an Apache+mod_ssl webserver for SSL client authentication.
1616
## Just configure this file as the SSLCACertificateFile.
1717
##
18-
## Conversion done with mk-ca-bundle.pl version 1.30.
19-
## SHA256: a903b3cd05231e39332515ef7ebe37e697262f39515a52015c23c62805b73cd0
18+
## Conversion done with mk-ca-bundle.pl version 1.32.
19+
## SHA256: 3b98d4e3ff57a326d9587c33633039c8c3a9cf0b55f7ca581d7598ff329eb1f3
2020
##
2121

2222

@@ -3480,8 +3480,8 @@ SM49BAMDA2kAMGYCMQCpKjAd0MKfkFFRQD6VVCHNFmb3U2wIFjnQEnx/Yxvf4zgAOdktUyBFCxxg
34803480
ZzFDJe0CMQCSia7pXGKDYmH5LVerVrkR3SW+ak5KGoJr3M/TvEqzPNcum9v4KGm8ay3sMaE641c=
34813481
-----END CERTIFICATE-----
34823482

3483-
OISTE Server Root RSA G1
3484-
=========================
3483+
OISTE Server Root RSA G1
3484+
========================
34853485
-----BEGIN CERTIFICATE-----
34863486
MIIFgzCCA2ugAwIBAgIQVaXZZ5Qoxu0M+ifdWwFNGDANBgkqhkiG9w0BAQwFADBLMQswCQYDVQQG
34873487
EwJDSDEZMBcGA1UECgwQT0lTVEUgRm91bmRhdGlvbjEhMB8GA1UEAwwYT0lTVEUgU2VydmVyIFJv
@@ -3509,3 +3509,21 @@ msuY33OhkKCgxeDoAaijFJzIwZqsFVAzje18KotzlUBDJvyBpCpfOZC3J8tRd/iWkx7P8nd9H0aT
35093509
olkelUTFLXVksNb54Dxp6gS1HAviRkRNQzuXSXERvSS2wq1yVAb+axj5d9spLFKebXd7Yv0PTY6Y
35103510
MjAwcRLWJTXjn/hvnLXrahut6hDTlhZyBiElxky8j3C7DOReIoMt0r7+hVu05L0=
35113511
-----END CERTIFICATE-----
3512+
3513+
e-Szigno TLS Root CA 2023
3514+
=========================
3515+
-----B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uWWL
3529+
-----END CERTIFICATE-----

src/wp-includes/class-wp-script-modules.php

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,24 @@
1212
* Core class used to register script modules.
1313
*
1414
* @since 6.5.0
15+
*
16+
* @phpstan-type ScriptModule array{
17+
* src: string,
18+
* version: string|false|null,
19+
* dependencies: array<int, array{ id: string, import: 'static'|'dynamic' }>,
20+
* in_footer: bool,
21+
* fetchpriority: 'auto'|'low'|'high',
22+
* textdomain?: string,
23+
* translations_path?: string,
24+
* }
1525
*/
1626
class WP_Script_Modules {
1727
/**
1828
* Holds the registered script modules, keyed by script module identifier.
1929
*
2030
* @since 6.5.0
2131
* @var array<string, array<string, mixed>>
32+
* @phpstan-var array<string, ScriptModule>
2233
*/
2334
private $registered = array();
2435

@@ -328,6 +339,87 @@ public function deregister( string $id ) {
328339
unset( $this->registered[ $id ] );
329340
}
330341

342+
/**
343+
* Overrides the text domain and path used to load translations for a script module.
344+
*
345+
* This is only needed for modules whose text domain differs from 'default'
346+
* or whose translation files live outside the standard locations, for
347+
* example plugin modules that register their own text domain. Translations
348+
* for modules that use the default domain are loaded automatically by
349+
* {@see WP_Script_Modules::print_script_module_translations()}.
350+
*
351+
* @since 7.0.0
352+
*
353+
* @param string $id The identifier of the script module.
354+
* @param string $domain Optional. Text domain. Default 'default'.
355+
* @param string $path Optional. The full file path to the directory containing translation files.
356+
* @return bool True if the text domain was registered, false if the module is not registered.
357+
*/
358+
public function set_translations( string $id, string $domain = 'default', string $path = '' ): bool {
359+
if ( ! isset( $this->registered[ $id ] ) ) {
360+
return false;
361+
}
362+
363+
$this->registered[ $id ]['textdomain'] = $domain;
364+
$this->registered[ $id ]['translations_path'] = $path;
365+
366+
return true;
367+
}
368+
369+
/**
370+
* Prints translations for all enqueued script modules.
371+
*
372+
* Outputs inline `<script>` tags that call `wp.i18n.setLocaleData()` with
373+
* the translated strings for each script module. This must run before
374+
* the script modules execute.
375+
*
376+
* Auto-detects the text domain and translation path for each module from
377+
* its source URL. Modules whose text domain or path differs from the
378+
* defaults can opt into a specific domain/path via
379+
* {@see WP_Script_Modules::set_translations()}.
380+
*
381+
* @since 7.0.0
382+
*/
383+
public function print_script_module_translations(): void {
384+
// Collect all module IDs that will be on the page (enqueued + their dependencies).
385+
$module_ids = $this->get_sorted_dependencies( $this->queue );
386+
387+
$set_locale_data_js_function = <<<'JS'
388+
( domain, translations ) => {
389+
const localeData = translations.locale_data[ domain ] || translations.locale_data.messages;
390+
localeData[""].domain = domain;
391+
wp.i18n.setLocaleData( localeData, domain );
392+
}
393+
JS;
394+
395+
foreach ( $module_ids as $id ) {
396+
$domain = $this->registered[ $id ]['textdomain'] ?? 'default';
397+
$path = $this->registered[ $id ]['translations_path'] ?? '';
398+
399+
$json_translations = load_script_module_textdomain( $id, $domain, $path );
400+
401+
if ( ! $json_translations ) {
402+
continue;
403+
}
404+
405+
$output = sprintf(
406+
'( %s )( %s, %s );',
407+
$set_locale_data_js_function,
408+
wp_json_encode( $domain, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
409+
$json_translations
410+
);
411+
$script_id = "wp-script-module-translation-data-{$id}";
412+
$output .= "\n//# sourceURL=" . rawurlencode( $script_id );
413+
414+
// Ensure wp-i18n is printed; the inline script below relies on wp.i18n.setLocaleData().
415+
if ( ! wp_script_is( 'wp-i18n', 'done' ) ) {
416+
wp_scripts()->do_items( array( 'wp-i18n' ) );
417+
}
418+
419+
wp_print_inline_script_tag( $output, array( 'id' => $script_id ) );
420+
}
421+
}
422+
331423
/**
332424
* Adds the hooks to print the import map, enqueued script modules and script
333425
* module preloads.
@@ -359,6 +451,15 @@ public function add_hooks() {
359451
add_action( 'admin_print_footer_scripts', array( $this, 'print_enqueued_script_modules' ) );
360452
add_action( 'admin_print_footer_scripts', array( $this, 'print_script_module_preloads' ) );
361453

454+
/*
455+
* Print translations after classic scripts like wp-i18n are loaded (at
456+
* priority 10 via _wp_footer_scripts), but before the script modules
457+
* execute. Script modules with type="module" are deferred by default,
458+
* so inline translation scripts at priority 11 will execute before them.
459+
*/
460+
add_action( 'wp_footer', array( $this, 'print_script_module_translations' ), 21 );
461+
add_action( 'admin_print_footer_scripts', array( $this, 'print_script_module_translations' ), 11 );
462+
362463
add_action( 'wp_footer', array( $this, 'print_script_module_data' ) );
363464
add_action( 'admin_print_footer_scripts', array( $this, 'print_script_module_data' ) );
364465
add_action( 'wp_footer', array( $this, 'print_a11y_script_module_html' ), 20 );
@@ -631,6 +732,7 @@ private function get_import_map(): array {
631732
* @since 6.5.0
632733
*
633734
* @return array<string, array<string, mixed>> Script modules marked for enqueue, keyed by script module identifier.
735+
* @phpstan-return array<string, ScriptModule>
634736
*/
635737
private function get_marked_for_enqueue(): array {
636738
return wp_array_slice_assoc(
@@ -652,6 +754,7 @@ private function get_marked_for_enqueue(): array {
652754
* @param string[] $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both.
653755
* Default is both.
654756
* @return array<string, array<string, mixed>> List of dependencies, keyed by script module identifier.
757+
* @phpstan-return array<string, ScriptModule>
655758
*/
656759
private function get_dependencies( array $ids, array $import_types = array( 'static', 'dynamic' ) ): array {
657760
$all_dependencies = array();
@@ -840,6 +943,19 @@ private function sort_item_dependencies( string $id, array $import_types, array
840943
return true;
841944
}
842945

946+
/**
947+
* Gets the data for a registered script module.
948+
*
949+
* @since 7.0.0
950+
*
951+
* @param string $id The script module identifier.
952+
* @return array|null The script module data, or null if not registered.
953+
* @phpstan-return ScriptModule|null
954+
*/
955+
public function get_registered( string $id ): ?array {
956+
return $this->registered[ $id ] ?? null;
957+
}
958+
843959
/**
844960
* Gets the versioned URL for a script module src.
845961
*

0 commit comments

Comments
 (0)