Skip to content

Commit a391d35

Browse files
authored
Merge branch 'trunk' into patch-1
2 parents 31a6386 + 976ca47 commit a391d35

18 files changed

Lines changed: 485 additions & 136 deletions

src/wp-admin/css/dashboard.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
outline-offset: -2px;
7373
border-radius: 8px;
7474
height: 250px;
75+
margin: 4px;
7576
}
7677

7778
/* Only highlight drop zones when dragging. */

src/wp-admin/includes/class-wp-media-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ public function column_title( $post ) {
493493
'<a href="%s">',
494494
get_edit_post_link( $post->ID ),
495495
);
496-
$link_end = '</a>';
496+
$link_end = '</a>';
497497
}
498498

499499
$class = $thumb ? ' class="has-media-icon"' : '';

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,18 @@ class WP_AI_Client_Prompt_Builder {
165165
* conversations. Default null.
166166
*/
167167
public function __construct( ProviderRegistry $registry, $prompt = null ) {
168-
$this->builder = new PromptBuilder( $registry, $prompt );
168+
try {
169+
$this->builder = new PromptBuilder( $registry, $prompt );
170+
} catch ( Exception $e ) {
171+
$this->builder = new PromptBuilder( $registry );
172+
$this->error = new WP_Error(
173+
'prompt_builder_error',
174+
$e->getMessage(),
175+
array(
176+
'exception_class' => get_class( $e ),
177+
)
178+
);
179+
}
169180

170181
/**
171182
* Filters the default request timeout in seconds for AI Client HTTP requests.

src/wp-includes/author-template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ function get_the_author_posts_link() {
334334

335335
$author = get_the_author();
336336
/* translators: %s: Author's display name. */
337-
$title = sprintf( __( 'Posts by %s' ), $author );
337+
$title = sprintf( __( 'Posts by %s' ), $author );
338338

339339
$link = sprintf(
340340
'<a href="%1$s" rel="author">%2$s</a>',

src/wp-includes/class-wp-comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public static function get_instance( $id ) {
210210
*
211211
* @since 4.4.0
212212
*
213-
* @param WP_Comment $comment Comment object.
213+
* @param object $comment Comment object.
214214
*/
215215
public function __construct( $comment ) {
216216
foreach ( get_object_vars( $comment ) as $key => $value ) {

src/wp-includes/class-wp-post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public static function get_instance( $post_id ) {
260260
*
261261
* @since 3.5.0
262262
*
263-
* @param WP_Post|object $post Post object.
263+
* @param object $post Post object.
264264
*/
265265
public function __construct( $post ) {
266266
foreach ( get_object_vars( $post ) as $key => $value ) {

src/wp-includes/class-wp-site.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public static function get_instance( $site_id ) {
190190
*
191191
* @since 4.5.0
192192
*
193-
* @param WP_Site|object $site A site object.
193+
* @param object $site A site object.
194194
*/
195195
public function __construct( $site ) {
196196
foreach ( get_object_vars( $site ) as $key => $value ) {

src/wp-includes/class-wp-term.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public static function get_instance( $term_id, $taxonomy = null ) {
192192
*
193193
* @since 4.4.0
194194
*
195-
* @param WP_Term|object $term Term object.
195+
* @param object $term Term object.
196196
*/
197197
public function __construct( $term ) {
198198
foreach ( get_object_vars( $term ) as $key => $value ) {

src/wp-includes/class-wp-user.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ class WP_User {
121121
*
122122
* @global wpdb $wpdb WordPress database abstraction object.
123123
*
124-
* @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB.
125-
* @param string $name Optional. User's username
126-
* @param int $site_id Optional Site ID, defaults to current site.
124+
* @param int|string|object $id User's ID, a WP_User object, or a user object from the DB.
125+
* @param string $name Optional. User's username
126+
* @param int $site_id Optional Site ID, defaults to current site.
127127
*/
128128
public function __construct( $id = 0, $name = '', $site_id = 0 ) {
129129
global $wpdb;

src/wp-includes/collaboration/class-wp-sync-post-meta-storage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function add_update( string $room, $update ): bool {
8585
'value' => $update,
8686
);
8787

88-
return (bool) add_post_meta( $post_id, self::SYNC_UPDATE_META_KEY, $envelope, false );
88+
return (bool) add_post_meta( $post_id, wp_slash( self::SYNC_UPDATE_META_KEY ), wp_slash( $envelope ), false );
8989
}
9090

9191
/**
@@ -162,7 +162,7 @@ public function set_awareness_state( string $room, array $awareness ): bool {
162162
}
163163

164164
// update_post_meta returns false if the value is the same as the existing value.
165-
update_post_meta( $post_id, self::AWARENESS_META_KEY, $awareness );
165+
update_post_meta( $post_id, wp_slash( self::AWARENESS_META_KEY ), wp_slash( $awareness ) );
166166
return true;
167167
}
168168

@@ -305,7 +305,7 @@ public function remove_updates_before_cursor( string $room, int $cursor ): bool
305305
$all_updates = $this->get_all_updates( $room );
306306

307307
// Remove all updates for the room and re-store only those that are newer than the cursor.
308-
if ( ! delete_post_meta( $post_id, self::SYNC_UPDATE_META_KEY ) ) {
308+
if ( ! delete_post_meta( $post_id, wp_slash( self::SYNC_UPDATE_META_KEY ) ) ) {
309309
return false;
310310
}
311311

0 commit comments

Comments
 (0)