'object', 'single' => true, 'default' => array(), 'description' => __( 'Focal point and safe area for responsive cropping.', 'yinga-focus' ), 'sanitize_callback' => array( Sanitizer::class, 'focus' ), 'auth_callback' => array( $this, 'can_edit' ), 'show_in_rest' => array( 'schema' => Schema::rest(), ), ) ); } /** * Mag de huidige gebruiker de focusdata van deze attachment wijzigen? * * @param bool $allowed Wat WordPress zelf dacht. * @param string $meta_key De meta key. * @param int $object_id Attachment-ID. * @return bool */ public function can_edit( $allowed, $meta_key, $object_id ): bool { unset( $allowed, $meta_key ); return current_user_can( 'edit_post', (int) $object_id ); } }