Last active
August 29, 2015 14:15
-
-
Save coreymcollins/e55223f2d3d4a5436ba6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* Add metabox for Life at Meltwater layout | |
*/ | |
$meta_boxes['wds_meltwater_attached_layout_what_to_expect'] = array( | |
'id' => 'what-to-expect', | |
'title' => __( 'What to Expect Layout', 'meltwater' ), | |
'object_types' => array( 'layout' ), | |
'context' => 'normal', | |
'priority' => 'low', | |
'show_names' => true, | |
'show_on' => array( | |
'key' => 'taxonomy', | |
'value' => array( | |
'layout-setting' => 'what-to-expect', | |
) | |
), | |
'fields' => array( | |
array( | |
'name' => __( 'Button Text', 'meltwater' ), | |
'desc' => __( 'This button will appear below the main content', 'meltwater' ), | |
'id' => $prefix . 'cta_button_text', | |
'type' => 'text_medium', | |
), | |
array( | |
'name' => __( 'Button Link', 'meltwater' ), | |
'desc' => __( 'This button will appear below the main content', 'meltwater' ), | |
'id' => $prefix . 'cta_button_link', | |
'type' => 'text_url', | |
), | |
array( | |
'name' => __( 'Column', 'meltwater' ), | |
'id' => $prefix . 'columns', | |
'type' => 'group', | |
'options' => array( | |
'group_title' => __( 'Column {#}', 'meltwater' ), // since version 1.1.4, {#} gets replaced by row number | |
'add_button' => __( 'Add Another Column', 'meltwater' ), | |
'remove_button' => __( 'Remove Column', 'meltwater' ), | |
'sortable' => true, // beta | |
), | |
'fields' => array( | |
array( | |
'name' => __( 'Button Text', 'meltwater' ), | |
'id' => $prefix . 'cta_button_text', | |
'type' => 'text_medium', | |
), | |
array( | |
'name' => __( 'Title', 'meltwater' ), | |
'id' => $prefix . 'column_title', | |
'type' => 'text', | |
), | |
array( | |
'name' => __( 'Description', 'meltwater' ), | |
'id' => $prefix . 'column_description', | |
'type' => 'textarea', | |
), | |
array( | |
'name' => __( 'Button Text', 'meltwater' ), | |
'id' => $prefix . 'column_button', | |
'type' => 'text_medium', | |
), | |
array( | |
'name' => __( 'Button Link', 'meltwater' ), | |
'id' => $prefix . 'column_link', | |
'type' => 'text_url', | |
), | |
), | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment