Advertisement
mingomax

Custom Post Type

Sep 19th, 2011
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.23 KB | None | 0 0
  1. function type_post_funcionarios() {
  2.     $labels = array(
  3.         'name' => _x('Funcionários', 'Registro de Funcionários'),
  4.         'singular_name' => _x('Funcionário', 'post type singular name'),
  5.         'add_new' => _x('Novo', 'Novo item'),
  6.         'add_new_item' => __('Novo Funcionário'),
  7.         'edit_item' => __('Editar'),
  8.         'new_item' => __('Novo'),
  9.         'view_item' => __('Ver'),
  10.         'search_items' => __('Procurar'),
  11.         'not_found' =>  __('Nenhum registro encontrado'),
  12.         'not_found_in_trash' => __('Nenhum registro encontrado na lixeira'),
  13.         'parent_item_colon' => '',
  14.         'menu_name' => 'Funcionários'
  15.     );
  16.  
  17.     $args = array(
  18.         'labels' => $labels,
  19.         'public' => true,
  20.         'public_queryable' => true,
  21.         'show_ui' => true,        
  22.         'query_var' => true,
  23.         'rewrite' => true,
  24.         'capability_type' => 'post',
  25.         'has_archive' => true,
  26.         'hierarchical' => false,
  27.         'menu_position' => 60,
  28.         'register_meta_box_cb' => 'funcionarios_meta_box',    
  29.         'supports' => array('title','thumbnail','revisions','custom-fields')
  30.       );
  31.  
  32.     register_post_type( 'funcionarios' , $args );
  33.     flush_rewrite_rules();
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement