Created
June 4, 2013 10:14
-
-
Save szmeku/5704950 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$box = array( | |
array( | |
'name' => 'image', | |
'label' => 'Upload Image', | |
'type' => 'image', | |
), | |
array( | |
'name' => 'header', | |
'label' => 'Header', | |
'type' => 'text', | |
), | |
array( | |
'name' => 'header_color', | |
'type' => 'color', | |
), | |
array( | |
'name' => 'subheader', | |
'label' => 'Sub - Header', | |
'type' => 'text', | |
), | |
array( | |
'name' => 'subheader_color', | |
'type' => 'color', | |
), | |
array( | |
'name' => 'link', | |
'label' => 'Link', | |
'type' => 'url', | |
), | |
array( | |
'name' => 'width', | |
'type' => 'select', | |
'label' => 'Box Width', | |
'options' => call_user_func(function () { | |
$options = array(); | |
for ($i = 1; $i < 13; $i++) { | |
$options[] = array( | |
'value' => $i, | |
'label' => "$i column(s)" | |
); | |
} | |
return $options; | |
}), | |
'default' => 5, | |
), | |
); | |
$this->masonry_meta = new CCI_MetaBox(array( | |
'name' => 'cci_masonry_meta', | |
'label' => 'Masonry', | |
'post_types' => array('cci_masonry'), | |
'fields' => array( | |
array( | |
'name' => 'width', | |
'label' => 'Masonry Width', | |
'type' => 'int' | |
), | |
array( | |
'name' => 'box_margin', | |
'label' => 'Box Margin', | |
'type' => 'int' | |
), | |
array( | |
'name' => 'boxes', | |
'type' => 'array', | |
'label' => 'Boxes', | |
'label_single' => 'Box', | |
'structure' => $box | |
), | |
) | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment