From 0221d17aae91bf09a32224589f385163403ecafe Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Fri, 19 Jul 2024 12:22:41 +0200 Subject: add "class" function --- src/MetaboxField.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/MetaboxField.php') diff --git a/src/MetaboxField.php b/src/MetaboxField.php index 53e60ed..e70f9c6 100644 --- a/src/MetaboxField.php +++ b/src/MetaboxField.php @@ -113,6 +113,18 @@ class MetaboxField return $this; } + /** + * @param string $class + * + * @return $this + */ + public function class(string $class) { + $this->options['wrapper'] ??= []; + $this->options['wrapper']['class'] = $class; + + return $this; + } + /** * Add the acf local field */ -- cgit v1.2.3