Rest_Api::__construct( \Vimeotheque\Post\Post_Type $cpt )
Constructor
Parameters
- $cpt
-
(Required)
Source
File: includes/libs/rest-api/rest-api.class.php
public function __construct( Post_Type $cpt ){
// store custom post type reference
$this->cpt = $cpt;
// add init action
add_action( 'rest_api_init', [ $this, 'api_init' ] );
$this->routes = new Rest_Endpoint_Factory();
}
