rest_themes_collection_params
Filter HookDescription
Filters REST API collection parameters for the themes controller.Hook Information
File Location |
wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
View on GitHub
|
Hook Type | Filter |
Line Number | 724 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$query_params
|
JSON Schema-formatted collection parameters. |
Usage Examples
Basic Usage
<?php
// Hook into rest_themes_collection_params
add_filter('rest_themes_collection_params', 'my_custom_filter', 10, 1);
function my_custom_filter($query_params) {
// Your custom filtering logic here
return $query_params;
}
Source Code Context
wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php:724
- How this hook is used in WordPress core
<?php
719 *
720 * @since 5.0.0
721 *
722 * @param array $query_params JSON Schema-formatted collection parameters.
723 */
724 return apply_filters( 'rest_themes_collection_params', $query_params );
725 }
726
727 /**
728 * Sanitizes and validates the list of theme status.
729 *
PHP Documentation
<?php
/**
* Filters REST API collection parameters for the themes controller.
*
* @since 5.0.0
*
* @param array $query_params JSON Schema-formatted collection parameters.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
Related Hooks
Related hooks will be displayed here in future updates.