Home / APIs / WP_REST_Themes_Controller::get_collection_params() – Retrieves the search params for the themes collection.

You appear to be a bot. Output may be restricted

Description

Retrieves the search params for the themes collection.

Usage

$array = WP_REST_Themes_Controller::get_collection_params();

Parameters

Returns

array Collection parameters.

Source

File name: wordpress/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
Lines: 1 to 23 of 23

  public function get_collection_params() {
    $query_params = parent::get_collection_params();

    $query_params['status'] = array(
      'description'       => __( 'Limit result set to themes assigned one or more statuses.' ),
      'type'              => 'array',
      'items'             => array(
        'enum' => array( 'active' ),
        'type' => 'string',
      ),
      'required'          => true,
      'sanitize_callback' => array( $this, 'sanitize_theme_status' ),
    );

    
/**
 * Filter 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 );
  }
 

 View on GitHub View on Trac

Published: 7th December 2018 | Last updated: 7th December 2018

Information

Function name: WP_REST_Themes_Controller::get_collection_params
Class ref: WP_REST_Themes_Controller
Plugin ref: WordPress
Version: 5.0.3
Sourcefile: wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
File ref: wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
Deprecated?: No
API Letters: C,G,R,T,W

  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Files
  • Hooks
  • Classes
  • Sites
  • Sitemap
  • Blog
oik-plugins Easy Digital Downloads a2z
Easy Digital Downloads a2z

Site:  edd.wp-a2z.org
© Copyright oik-plugins 2014-2019. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins