WP_REST_Post_Search_Handler::__construct
Constructor.
Method of the class: WP_REST_Post_Search_Handler{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WP_REST_Post_Search_Handler = new WP_REST_Post_Search_Handler(); $WP_REST_Post_Search_Handler->__construct();
Changelog
| Since 5.0.0 | Introduced. |
WP_REST_Post_Search_Handler::__construct() WP REST Post Search Handler:: construct code WP 6.9.1
public function __construct() {
$this->type = 'post';
// Support all public post types except attachments.
$this->subtypes = array_diff(
array_values(
get_post_types(
array(
'public' => true,
'show_in_rest' => true,
),
'names'
)
),
array( 'attachment' )
);
}