diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-06-06 11:42:35 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-06-06 11:42:35 +0200 |
commit | 071cc98047e1640e3a6b78bc62eef67ff29719b1 (patch) | |
tree | 764abae43da0a1838d51d5f05213180d5a78107a /src/MetaboxField.php | |
parent | f464f665794cebcb354bbf27f7159608fc3ece3c (diff) |
add "width" functionv1.3.0
Diffstat (limited to 'src/MetaboxField.php')
-rw-r--r-- | src/MetaboxField.php | 12 |
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() |