Skip to content

Commit

Permalink
Merge branch 'trunk' into html-api/fix-nullable-phpdoc-annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Jul 17, 2024
2 parents f71c8c3 + 2f1cf1f commit 95de1f0
Show file tree
Hide file tree
Showing 27 changed files with 353 additions and 351 deletions.
6 changes: 0 additions & 6 deletions src/wp-content/themes/twentyeleven/editor-blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,6 @@ p.has-drop-cap:not(:focus)::first-letter {
text-align: right;
}

/* Verse */

.editor-styles-wrapper .wp-block-verse {
font-family: inherit;
}


/*--------------------------------------------------------------
5.0 Blocks - Layout Elements
Expand Down
10 changes: 4 additions & 6 deletions src/wp-content/themes/twentyfifteen/css/editor-blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,10 @@ p.has-drop-cap:not(:focus)::first-letter {
padding: 0;
}

.wp-block-code {
font-family: Inconsolata, monospace;
}

/* Pullquote */

.wp-block-pullquote,
Expand Down Expand Up @@ -737,12 +741,6 @@ p.has-drop-cap:not(:focus)::first-letter {
text-align: right;
}

/* Verse */

.editor-styles-wrapper .wp-block-verse {
font-family: inherit;
}

/*--------------------------------------------------------------
5.0 Blocks - Layout Elements
--------------------------------------------------------------*/
Expand Down
6 changes: 0 additions & 6 deletions src/wp-content/themes/twentyfourteen/css/editor-blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -417,12 +417,6 @@ p.has-drop-cap:not(:focus)::first-letter {
}
}

/* Verse */

.editor-styles-wrapper .wp-block-verse {
font-family: inherit;
}

/*--------------------------------------------------------------
5.0 Blocks - Layout Elements
--------------------------------------------------------------*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
top: calc(-3.5 * #{$size__spacing-unit});
width: calc(100vw / 12 );
}

.comment-reply-title small {
margin-left: 0.5em;
}
}

#comments {
Expand Down
4 changes: 4 additions & 0 deletions src/wp-content/themes/twentynineteen/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -4668,6 +4668,10 @@ body.page .main-navigation {
width: calc(100vw / 12);
}

#respond .comment-reply-title small {
margin-right: 0.5em;
}

#comments > .comments-title:last-child {
display: none;
}
Expand Down
4 changes: 4 additions & 0 deletions src/wp-content/themes/twentynineteen/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4674,6 +4674,10 @@ body.page .main-navigation {
width: calc(100vw / 12);
}

#respond .comment-reply-title small {
margin-left: 0.5em;
}

#comments > .comments-title:last-child {
display: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,12 +720,6 @@ table.wp-block-table td:last-child {
font-weight: inherit;
}

/* Verse */

.editor-styles-wrapper .wp-block-verse {
font-family: inherit;
}

/*--------------------------------------------------------------
5.0 Blocks - Layout Elements
--------------------------------------------------------------*/
Expand Down
5 changes: 5 additions & 0 deletions src/wp-content/themes/twentyseventeen/rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ input[type="checkbox"] {
transform: scale(-1, 1);
}

.comment-reply-title small {
margin-left: 0;
margin-right: 0.5em;
}

.comment-author .avatar {
left: auto;
right: -65px;
Expand Down
4 changes: 4 additions & 0 deletions src/wp-content/themes/twentyseventeen/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2488,6 +2488,10 @@ body:not(.twentyseventeen-front-page) .entry-header {
width: 1em;
}

.comment-reply-title small {
margin-left: 0.5em;
}

.children .comment-author .avatar {
height: 30px;
left: -45px;
Expand Down
12 changes: 5 additions & 7 deletions src/wp-content/themes/twentysixteen/css/blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -250,19 +250,17 @@ p.has-drop-cap:not(:focus)::first-letter {

/* Buttons */

.wp-block-button .wp-block-button__link {
box-shadow: none;
font-family: Montserrat, "Helvetica Neue", sans-serif;
.wp-block-buttons {
font-weight: 700;
letter-spacing: 0.046875em;
line-height: 1;
padding: 0.84375em 1.3125em 0.78125em;
text-transform: uppercase;
}

.wp-block-buttons[style*="text-transform"] .wp-block-button__link,
.wp-block-button[style*="text-transform"] .wp-block-button__link {
text-transform: inherit;
.wp-block-button .wp-block-button__link {
box-shadow: none;
font-family: Montserrat, "Helvetica Neue", sans-serif;
padding: 0.84375em 1.3125em 0.78125em;
}

.wp-block-button__link {
Expand Down
21 changes: 9 additions & 12 deletions src/wp-content/themes/twentysixteen/css/editor-blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ figure[class*="wp-block-"] > figcaption {
padding: 0 0 0 1.263157895em;
}

.editor-styles-wrapper .wp-block-quote {
border-color: currentColor;
}

.wp-block-quote:not(.is-large):not(.is-style-large).alignleft,
.wp-block-quote:not(.is-large):not(.is-style-large).alignright {
border-left: 0;
Expand Down Expand Up @@ -548,30 +552,23 @@ figure[class*="wp-block-"] > figcaption {
text-align: right;
}

/* Verse */

.editor-styles-wrapper .wp-block-verse {
font-family: inherit;
}

/*--------------------------------------------------------------
5.0 Blocks - Layout Elements
--------------------------------------------------------------*/

/* Buttons */

.wp-block-button .wp-block-button__link {
font-family: Montserrat, "Helvetica Neue", sans-serif;
.wp-block-buttons {
font-weight: 700;
letter-spacing: 0.046875em;
line-height: 1;
padding: 0.84375em 1.3125em 0.78125em;
text-transform: uppercase;
}

.wp-block-buttons[style*="text-transform"] .wp-block-button__link,
.wp-block-button[style*="text-transform"] .wp-block-button__link {
text-transform: inherit;
.wp-block-button .wp-block-button__link {
box-shadow: none;
font-family: Montserrat, "Helvetica Neue", sans-serif;
padding: 0.84375em 1.3125em 0.78125em;
}

.wp-block-button__link {
Expand Down
6 changes: 0 additions & 6 deletions src/wp-content/themes/twentythirteen/css/editor-blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,6 @@ p.has-drop-cap:not(:focus)::first-letter {
text-decoration: none;
}

/* Verse */

.editor-styles-wrapper .wp-block-verse {
font-family: inherit;
}

/*--------------------------------------------------------------
5.0 Blocks - Formatting
--------------------------------------------------------------*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,6 @@ hr.wp-block-separator.is-style-dots::before {

.editor-styles-wrapper .wp-block-verse pre,
.editor-styles-wrapper pre.wp-block-verse {
font-family: NonBreakingSpaceOverride, "Hoefler Text", Garamond, "Times New Roman", serif;
font-size: 0.9em;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,6 @@ hr.wp-block-separator.is-style-dots::before {

.editor-styles-wrapper .wp-block-verse pre,
.editor-styles-wrapper pre.wp-block-verse {
font-family: NonBreakingSpaceOverride, "Hoefler Text", Garamond, "Times New Roman", serif;
font-size: 0.9em;
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwentyone/assets/css/ie.css
Original file line number Diff line number Diff line change
Expand Up @@ -4172,7 +4172,7 @@ table.wp-calendar-table caption {

.site-branding {
margin-right: initial;
margin-top: 4px;
margin-top: calc(13px - 0em);
}
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

@include media(mobile) {
margin-right: initial;
margin-top: 4px; // Align the baseline of the site title with the primary menu
margin-top: calc(var(--primary-nav--padding) - 0.3em); // Align the baseline of the site title with the primary menu
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwentyone/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -3729,7 +3729,7 @@ table.wp-calendar-table caption {

.site-branding {
margin-left: initial;
margin-top: 4px;
margin-top: calc(var(--primary-nav--padding) - 0.3em);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwentyone/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3749,7 +3749,7 @@ table.wp-calendar-table caption {

.site-branding {
margin-right: initial;
margin-top: 4px;
margin-top: calc(var(--primary-nav--padding) - 0.3em);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwentytwo/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ a:active {
.wp-block-file .wp-block-file__button {
background-color: var(--wp--preset--color--primary);
border-radius: 0;
border: none;
border: 0 solid;
color: var(--wp--preset--color--background);
font-size: var(--wp--preset--font-size--medium);
padding: calc(.667em + 2px) calc(1.333em + 2px);
Expand Down
4 changes: 3 additions & 1 deletion src/wp-includes/html-api/class-wp-html-tag-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,9 @@ private function class_name_updates_to_attributes_updates() {
* whitespace to a single space, which might appear cleaner
* in the output HTML but produce a noisier change.
*/
$class .= substr( $existing_class, $ws_at, $ws_length );
if ( '' !== $class ) {
$class .= substr( $existing_class, $ws_at, $ws_length );
}
$class .= $name;
}

Expand Down
75 changes: 24 additions & 51 deletions src/wp-includes/interactivity-api/class-wp-interactivity-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,37 @@ public function config( string $store_namespace, array $config = array() ): arra
* configuration will be available using a `getConfig` utility.
*
* @since 6.5.0
*
* @deprecated 6.7.0 Client data passing is handled by the {@see "script_module_data_{$module_id}"} filter.
*/
public function print_client_interactivity_data() {
_deprecated_function( __METHOD__, '6.7.0' );
}

/**
* Set client-side interactivity data.
*
* Once in the browser, the state will be parsed and used to hydrate the client-side
* interactivity stores and the configuration will be available using a `getConfig` utility.
*
* @since 6.7.0
*
* @param array $data Data to filter.
* @return array Data for the Interactivity API script module.
*/
public function filter_script_module_interactivity_data( array $data ): array {
if ( empty( $this->state_data ) && empty( $this->config_data ) ) {
return;
return $data;
}

$interactivity_data = array();

$config = array();
foreach ( $this->config_data as $key => $value ) {
if ( ! empty( $value ) ) {
$config[ $key ] = $value;
}
}
if ( ! empty( $config ) ) {
$interactivity_data['config'] = $config;
$data['config'] = $config;
}

$state = array();
Expand All @@ -217,52 +232,10 @@ public function print_client_interactivity_data() {
}
}
if ( ! empty( $state ) ) {
$interactivity_data['state'] = $state;
$data['state'] = $state;
}

if ( ! empty( $interactivity_data ) ) {
/*
* This data will be printed as JSON inside a script tag like this:
* <script type="application/json"></script>
*
* A script tag must be closed by a sequence beginning with `</`. It's impossible to
* close a script tag without using `<`. We ensure that `<` is escaped and `/` can
* remain unescaped, so `</script>` will be printed as `\u003C/script\u00E3`.
*
* - JSON_HEX_TAG: All < and > are converted to \u003C and \u003E.
* - JSON_UNESCAPED_SLASHES: Don't escape /.
*
* If the page will use UTF-8 encoding, it's safe to print unescaped unicode:
*
* - JSON_UNESCAPED_UNICODE: Encode multibyte Unicode characters literally (instead of as `\uXXXX`).
* - JSON_UNESCAPED_LINE_TERMINATORS: The line terminators are kept unescaped when
* JSON_UNESCAPED_UNICODE is supplied. It uses the same behaviour as it was
* before PHP 7.1 without this constant. Available as of PHP 7.1.0.
*
* The JSON specification requires encoding in UTF-8, so if the generated HTML page
* is not encoded in UTF-8 then it's not safe to include those literals. They must
* be escaped to avoid encoding issues.
*
* @see https://www.rfc-editor.org/rfc/rfc8259.html for details on encoding requirements.
* @see https://www.php.net/manual/en/json.constants.php for details on these constants.
* @see https://html.spec.whatwg.org/#script-data-state for details on script tag parsing.
*/
$json_encode_flags = JSON_HEX_TAG | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_LINE_TERMINATORS;
if ( ! is_utf8_charset() ) {
$json_encode_flags = JSON_HEX_TAG | JSON_UNESCAPED_SLASHES;
}

wp_print_inline_script_tag(
wp_json_encode(
$interactivity_data,
$json_encode_flags
),
array(
'type' => 'application/json',
'id' => 'wp-interactivity-data',
)
);
}
return $data;
}

/**
Expand Down Expand Up @@ -329,13 +302,13 @@ public function register_script_modules() {
* Adds the necessary hooks for the Interactivity API.
*
* @since 6.5.0
* @since 6.7.0 Use the {@see "script_module_data_{$module_id}"} filter to pass client-side data.
*/
public function add_hooks() {
add_action( 'wp_enqueue_scripts', array( $this, 'register_script_modules' ) );
add_action( 'wp_footer', array( $this, 'print_client_interactivity_data' ) );

add_action( 'admin_enqueue_scripts', array( $this, 'register_script_modules' ) );
add_action( 'admin_print_footer_scripts', array( $this, 'print_client_interactivity_data' ) );

add_filter( 'script_module_data_@wordpress/interactivity', array( $this, 'filter_script_module_interactivity_data' ) );
}

/**
Expand Down
Loading

0 comments on commit 95de1f0

Please sign in to comment.