Skip to content

Instantly share code, notes, and snippets.

@burabure
Created March 4, 2013 22:29
Show Gist options
  • Save burabure/5086276 to your computer and use it in GitHub Desktop.
Save burabure/5086276 to your computer and use it in GitHub Desktop.
creating metaboxes
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