Advertisement
kaed

image-post-type.php - 8/6/13

Aug 6th, 2013
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.43 KB | None | 0 0
  1. <?php
  2. function image_post_type(){
  3.     $labels = array(
  4.                 'name'              =>  'Images',
  5.                 'singlular_name'    =>  'Image',
  6.                 'add_new'           =>  'Add New',
  7.                 'add_new_item'      =>  'Add New Image',
  8.                 'edit_item'         =>  'Edit Image',
  9.                 'new_item'          =>  'New Image',
  10.                 'all_items'         =>  'All Images',
  11.                 'view_item'         =>  'View Image',
  12.                 'search_items'      =>  'Search Images',
  13.                 'not_found'         =>  'No Images found',
  14.                 'not_found_in_trash'=>  'No Images found in Trash',
  15.                 'parent_item_colon' =>  '',
  16.                 'menu_name'         =>  'Images'
  17.             );
  18.    
  19.     $args = array(
  20.                 'labels'                =>  $labels,
  21.                 'public'                =>  true,
  22.                 'exclude_from_search'   =>  false,
  23.                 'publicly_queryable'    =>  true,
  24.                 'show_ui'               =>  true,
  25.                 'show_in_nav_menus'     =>  true,
  26.                 'show_in_menu'          =>  true,
  27.                 'menu_position'         =>  1,
  28.                 //'menu_icon'               =>  'icon32',
  29.                 'capability_type'       =>  'post',
  30.                 'map_meta_cap'          =>  false,
  31.                 'hierarchical'          =>  false,
  32.                 'supports'              =>  array('title', 'editor', 'thumbnail', 'custom-fields'),
  33.                 'register_meta_box_cb'  =>  'add_meta_box_callback',
  34.                 'has_archive'           =>  true,
  35.                 'query_var'             =>  true,
  36.                 'can_export'            =>  true
  37.             );
  38.            
  39.     register_post_type('image_post', $args);
  40. }
  41. add_action('init', 'image_post_type');
  42.  
  43. function add_meta_box_callback(){
  44.     add_meta_box('image_variations', 'Image Variations', 'image_variations_callback', 'image_post', 'side', 'low');
  45. }
  46.  
  47. function image_variations_callback(){
  48.    
  49. }
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement