ACF_Rest_Api::initialize()
Метод класса: ACF_Rest_Api{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ACF_Rest_Api = new ACF_Rest_Api(); $ACF_Rest_Api->initialize( $response, $handler, $request );
- $response (обязательный)
- -
- $handler (обязательный)
- -
- $request (обязательный)
- -
Код ACF_Rest_Api::initialize() ACF Rest Api::initialize ACF 6.0.4
public function initialize( $response, $handler, $request ) { if ( ! acf_get_setting( 'rest_api_enabled' ) ) { return; } // Parse request and set the object for local access. $this->request = new ACF_Rest_Request(); $this->request->parse_request( $request ); // Register the 'acf' REST property. $this->register_field(); // If embed links are enabled in ACF's global settings, init the handler and set for local access. if ( acf_get_setting( 'rest_api_embed_links' ) ) { $this->embed_links = new ACF_Rest_Embed_Links(); $this->embed_links->initialize(); } }