Created
March 4, 2013 22:29
-
-
Save burabure/5086276 to your computer and use it in GitHub Desktop.
creating metaboxes
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
if ( function_exists( 'slt_cf_register_box') ) | |
add_action( 'init', 'organizer_info' ); | |
function organizer_info() { | |
slt_cf_register_box( array( | |
'type' => 'post', | |
'title' => 'Organizer Info', | |
'id' => 'organizer-info', | |
'context' => 'normal', | |
'priority' => 'high', | |
'fields' => array( | |
array( | |
'name' => 'organizer-logo', | |
'label' => 'Organizer Logo', | |
'description' => 'Upload the Organizer logo (max size 350x350px)', | |
'type' => 'file', | |
'scope' => array('incsub_event'), | |
'capabilities' => array( 'edit_posts' ) | |
), | |
array( | |
'name' => 'organizer-url', | |
'label' => 'Organizer URL', | |
'description' => 'The Organizer website URL', | |
'type' => 'text', | |
'default' => 'http://', | |
'scope' => array('incsub_event'), | |
'capabilities' => array( 'edit_posts' ) | |
), | |
array( | |
'name' => 'organizer-email', | |
'label' => 'Organizer Contact Email address', | |
'description' => 'The Organizer Email address for messages regarding the event', | |
'type' => 'text', | |
'scope' => array('incsub_event'), | |
'capabilities' => array( 'edit_posts' ) | |
), | |
) | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment