ACF_Rest_Api::is_admin_modeprivateACF 1.0

todo - this should check for a flag and validate a nonce to ensure we are in admin mode. todo - consider/discuss handling this in the request object instead.

Method of the class: ACF_Rest_Api{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->is_admin_mode( $data );
$data(required)
.

ACF_Rest_Api::is_admin_mode() code ACF 6.0.4

private function is_admin_mode( $data ) {
	return isset( $data['_acf_admin_mode'] ) && $data['_acf_admin_mode'];
}