Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define('MY_POST_TYPE', 'gallery');
- define('MY_POST_SLUG', 'gallery');
- add_action( 'init', 'my_register_post_type' );
- function my_register_post_type () {
- $args = array (
- 'label' => 'Gallery',
- 'supports' => array( 'title', 'excerpt','thumbnail' ),
- 'register_meta_box_cb' => 'my_meta_box_cb',
- 'show_ui' => true,
- 'query_var' => true
- );
- register_post_type( MY_POST_TYPE , $args );
- }
- function my_meta_box_cb () {
- add_meta_box( MY_POST_TYPE . '_details' , 'Media Library', 'my_meta_box_details', MY_POST_TYPE, 'normal', 'high' );
- }
- function my_meta_box_details () {
- global $post;
- $post_ID = $post->ID;
- printf( "<iframe frameborder='0' src=' %s ' style='width: 100%; height: 400px;'> </iframe>", get_upload_iframe_src('media') );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement