Skip to content

Commit 674d062

Browse files
committed
Merge branch 'trunk' into trac-64389
2 parents 1884007 + 876044b commit 674d062

36 files changed

Lines changed: 2287 additions & 319 deletions

src/wp-admin/css/colors/_admin.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,12 @@ input[type="checkbox"]:checked {
8888
border-color: var(--wp-admin-theme-color);
8989
}
9090

91-
input[type=checkbox]:checked::before {
92-
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-colour(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E");
93-
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-colour(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E") / '';
94-
}
95-
96-
// Checkbox checkmark - white for visibility on theme color background
97-
input[type="checkbox"]:checked::before {
98-
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E") / '';
99-
}
100-
10191
// Radio checked state - uses theme color
10292
input[type="radio"]:checked {
10393
background: var(--wp-admin-theme-color);
10494
border-color: var(--wp-admin-theme-color);
10595
}
10696

107-
// Radio dot - white for visibility on theme color background
108-
input[type="radio"]:checked::before {
109-
background: tokens.$white;
110-
}
111-
11297
.wp-core-ui input[type="reset"]:hover,
11398
.wp-core-ui input[type="reset"]:active {
11499
color: variables.$link-focus;

src/wp-admin/css/common.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,12 @@ th.action-links {
13801380
}
13811381
}
13821382

1383+
@media only screen and (max-width: 1250px) {
1384+
.wp-filter:has(.plugin-install-search) .search-form {
1385+
margin: 11px 0;
1386+
}
1387+
}
1388+
13831389
@media only screen and (max-width: 1120px) {
13841390
.filter-drawer {
13851391
border-bottom: 1px solid #f0f0f1;

src/wp-includes/ai-client/class-wp-ai-client-prompt-builder.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use WordPress\AiClient\Builders\PromptBuilder;
1111
use WordPress\AiClient\Files\DTO\File;
1212
use WordPress\AiClient\Files\Enums\FileTypeEnum;
13+
use WordPress\AiClient\Files\Enums\MediaOrientationEnum;
1314
use WordPress\AiClient\Messages\DTO\Message;
1415
use WordPress\AiClient\Messages\DTO\MessagePart;
1516
use WordPress\AiClient\Messages\Enums\ModalityEnum;
@@ -66,6 +67,9 @@
6667
* @method self as_output_schema(array<string, mixed> $schema) Sets the output schema.
6768
* @method self as_output_modalities(ModalityEnum ...$modalities) Sets the output modalities.
6869
* @method self as_output_file_type(FileTypeEnum $fileType) Sets the output file type.
70+
* @method self as_output_media_orientation(MediaOrientationEnum $orientation) Sets the output media orientation.
71+
* @method self as_output_media_aspect_ratio(string $aspectRatio) Sets the output media aspect ratio.
72+
* @method self as_output_speech_voice(string $voice) Sets the output speech voice.
6973
* @method self as_json_response(?array<string, mixed> $schema = null) Configures the prompt for JSON response output.
7074
* @method bool|WP_Error is_supported(?CapabilityEnum $capability = null) Checks if the prompt is supported for the given capability.
7175
* @method bool is_supported_for_text_generation() Checks if the prompt is supported for text generation.
@@ -80,6 +84,7 @@
8084
* @method GenerativeAiResult|WP_Error generate_image_result() Generates an image result from the prompt.
8185
* @method GenerativeAiResult|WP_Error generate_speech_result() Generates a speech result from the prompt.
8286
* @method GenerativeAiResult|WP_Error convert_text_to_speech_result() Converts text to speech and returns the result.
87+
* @method GenerativeAiResult|WP_Error generate_video_result() Generates a video result from the prompt.
8388
* @method string|WP_Error generate_text() Generates text from the prompt.
8489
* @method list<string>|WP_Error generate_texts(?int $candidateCount = null) Generates multiple text candidates from the prompt.
8590
* @method File|WP_Error generate_image() Generates an image from the prompt.
@@ -88,6 +93,8 @@
8893
* @method list<File>|WP_Error convert_text_to_speeches(?int $candidateCount = null) Converts text to multiple speech outputs.
8994
* @method File|WP_Error generate_speech() Generates speech from the prompt.
9095
* @method list<File>|WP_Error generate_speeches(?int $candidateCount = null) Generates multiple speech outputs from the prompt.
96+
* @method File|WP_Error generate_video() Generates a video from the prompt.
97+
* @method list<File>|WP_Error generate_videos(?int $candidateCount = null) Generates multiple videos from the prompt.
9198
*/
9299
class WP_AI_Client_Prompt_Builder {
93100

@@ -121,6 +128,7 @@ class WP_AI_Client_Prompt_Builder {
121128
'generate_image_result' => true,
122129
'generate_speech_result' => true,
123130
'convert_text_to_speech_result' => true,
131+
'generate_video_result' => true,
124132
'generate_text' => true,
125133
'generate_texts' => true,
126134
'generate_image' => true,
@@ -129,6 +137,8 @@ class WP_AI_Client_Prompt_Builder {
129137
'convert_text_to_speeches' => true,
130138
'generate_speech' => true,
131139
'generate_speeches' => true,
140+
'generate_video' => true,
141+
'generate_videos' => true,
132142
);
133143

134144
/**

src/wp-includes/block-supports/block-visibility.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,16 @@ function wp_render_block_visibility_support( $block_content, $block ) {
139139
$processor = new WP_HTML_Tag_Processor( $block_content );
140140
if ( $processor->next_tag() ) {
141141
$processor->add_class( implode( ' ', $class_names ) );
142+
143+
/*
144+
* Set all IMG tags to be `fetchpriority=auto` so that wp_get_loading_optimization_attributes() won't add
145+
* `fetchpriority=high` or increment the media count to affect whether subsequent IMG tags get `loading=lazy`.
146+
*/
147+
do {
148+
if ( 'IMG' === $processor->get_tag() ) {
149+
$processor->set_attribute( 'fetchpriority', 'auto' );
150+
}
151+
} while ( $processor->next_tag() );
142152
$block_content = $processor->get_updated_html();
143153
}
144154
}

src/wp-includes/class-wp-block-patterns-registry.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ private function get_content( $pattern_name, $outside_init_only = false ) {
174174
$patterns = &$this->registered_patterns;
175175
}
176176

177-
$pattern_path = realpath( $patterns[ $pattern_name ]['filePath'] ?? '' );
177+
$file_path = $patterns[ $pattern_name ]['filePath'] ?? '';
178+
$is_stringy = is_string( $file_path ) || ( is_object( $file_path ) && method_exists( $file_path, '__toString' ) );
179+
$pattern_path = $is_stringy ? realpath( (string) $file_path ) : null;
178180
if (
179181
! isset( $patterns[ $pattern_name ]['content'] ) &&
180182
is_string( $pattern_path ) &&

0 commit comments

Comments
 (0)