forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/block-comments-scroll' of github.com:karthick-m…
…urugan/gutenberg into feature/block-comments-scroll
- Loading branch information
Showing
404 changed files
with
6,620 additions
and
4,345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7687 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/66488 | ||
* https://github.com/WordPress/gutenberg/pull/67497 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7695 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/66631 | ||
* https://github.com/WordPress/gutenberg/pull/67465 | ||
* https://github.com/WordPress/gutenberg/pull/66579 | ||
* https://github.com/WordPress/gutenberg/pull/66654 | ||
* https://github.com/WordPress/gutenberg/pull/67518 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7903 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/67199 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7909 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/67330 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,7 +272,7 @@ _Parameters_ | |
|
||
_Returns_ | ||
|
||
- `string?`: Template ID. | ||
- `?string`: Template ID. | ||
|
||
### getDeviceType | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
lib/compat/wordpress-6.8/class-gutenberg-rest-user-controller.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
/** | ||
* Add search_columns parameter to users endpoint parameters | ||
* | ||
* @param array $query_params JSON Schema-formatted collection parameters. | ||
* @return array Updated collection parameters | ||
*/ | ||
function gutenberg_add_search_columns_param( $query_params ) { | ||
$query_params['search_columns'] = array( | ||
'default' => array(), | ||
'description' => __( 'Array of column names to be searched.' ), | ||
'type' => 'array', | ||
'items' => array( | ||
'enum' => array( 'email', 'name', 'id', 'username', 'slug' ), | ||
'type' => 'string', | ||
), | ||
); | ||
|
||
return $query_params; | ||
} | ||
|
||
add_filter( 'rest_user_collection_params', 'gutenberg_add_search_columns_param', 10, 1 ); | ||
|
||
/** | ||
* Modify user query based on search_columns parameter | ||
* | ||
* @param array $prepared_args Array of arguments for WP_User_Query. | ||
* @param WP_REST_Request $request The REST API request. | ||
* @return array Modified arguments | ||
*/ | ||
function gutenberg_modify_user_query_args( $prepared_args, $request ) { | ||
if ( $request->get_param( 'search' ) && $request->get_param( 'search_columns' ) ) { | ||
$search_columns = $request->get_param( 'search_columns' ); | ||
|
||
// Validate search columns | ||
$valid_columns = isset( $prepared_args['search_columns'] ) | ||
? $prepared_args['search_columns'] | ||
: array( 'ID', 'user_login', 'user_nicename', 'user_email', 'user_url', 'display_name' ); | ||
$search_columns_mapping = array( | ||
'id' => 'ID', | ||
'username' => 'user_login', | ||
'slug' => 'user_nicename', | ||
'email' => 'user_email', | ||
'name' => 'display_name', | ||
); | ||
$search_columns = array_map( | ||
static function ( $column ) use ( $search_columns_mapping ) { | ||
return $search_columns_mapping[ $column ]; | ||
}, | ||
$search_columns | ||
); | ||
$search_columns = array_intersect( $search_columns, $valid_columns ); | ||
|
||
if ( ! empty( $search_columns ) ) { | ||
$prepared_args['search_columns'] = $search_columns; | ||
} | ||
} | ||
|
||
return $prepared_args; | ||
} | ||
add_filter( 'rest_user_query', 'gutenberg_modify_user_query_args', 10, 2 ); |
Oops, something went wrong.