summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-07-19 12:22:41 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-07-19 12:22:41 +0200
commit0221d17aae91bf09a32224589f385163403ecafe (patch)
treeab3a4329a2127b12aec1c2f91f9fe0ac592840c3
parent521b9f782fd649be72c885aad72f20d50e906638 (diff)
add "class" functionHEADmain
-rw-r--r--src/MetaboxField.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/MetaboxField.php b/src/MetaboxField.php
index 53e60ed..e70f9c6 100644
--- a/src/MetaboxField.php
+++ b/src/MetaboxField.php
@@ -114,6 +114,18 @@ class MetaboxField
}
/**
+ * @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
*/
public function add()