WP_REST_Themes_Controller::get_collection_params()
Retrieves the search params for the themes collection.
Метод класса: WP_REST_Themes_Controller{}
Хуки из метода
Возвращает
Массив
. Collection parameters.
Использование
$WP_REST_Themes_Controller = new WP_REST_Themes_Controller(); $WP_REST_Themes_Controller->get_collection_params();
Список изменений
С версии 5.0.0 | Введена. |
Код WP_REST_Themes_Controller::get_collection_params() WP REST Themes Controller::get collection params WP 6.4.1
public function get_collection_params() { $query_params = array( 'status' => array( 'description' => __( 'Limit result set to themes assigned one or more statuses.' ), 'type' => 'array', 'items' => array( 'enum' => array( 'active', 'inactive' ), 'type' => 'string', ), ), ); /** * Filters REST API collection parameters for the themes controller. * * @since 5.0.0 * * @param array $query_params JSON Schema-formatted collection parameters. */ return apply_filters( 'rest_themes_collection_params', $query_params ); }