summaryrefslogtreecommitdiff
path: root/src/MetaboxField.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/MetaboxField.php')
-rw-r--r--src/MetaboxField.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/MetaboxField.php b/src/MetaboxField.php
index 4ace7b1..9602ea7 100644
--- a/src/MetaboxField.php
+++ b/src/MetaboxField.php
@@ -102,6 +102,18 @@ class MetaboxField
}
/**
+ * @param int $width
+ *
+ * @return $this
+ */
+ public function width(int $width) {
+ $this->options['wrapper'] ??= [];
+ $this->options['wrapper']['width'] = $width < 1 ? $width*100 : $width;
+
+ return $this;
+ }
+
+ /**
* Add the acf local field
*/
public function add()