Guest User

Untitled

a guest
Feb 23rd, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.91 KB | None | 0 0
  1. function register_partner_custom_post_type()
  2. {
  3.     /**
  4.      * Dichiarazione delle etichette
  5.      */
  6.     $labels = array(
  7.         'name'                  => __( 'Partners',                         'textdomain' ),
  8.         'singular_name'         => __( 'Partner',                           'textdomain' ),
  9.         'add_new'               => __( 'Aggiungi nuovo',                           'textdomain' ),
  10.         'add_new_item'          => __( 'Aggiungi nuovo Partner',                   'textdomain' ),
  11.         'edit_item'             => __( 'Edit',                              'textdoamin' ),
  12.         'new_item'              => __( 'Nuovo Partner',                       'textdoamin' ),
  13.         'all_items'             => __( 'Tutti i Partners',                      'textdomain' ),
  14.         'view_item'             => __( 'Visualizza Partner',                      'textdomain' ),
  15.         'search_items'          => __( 'Cerca Partners',                   'textdomain' ),
  16.         'not_found'             => __( 'Non ci sono Partners ',                 'textdomain' ),
  17.         'not_found_in_trash'    => __( 'Non ci sono Partners nel cestino',    'textdomain' ),
  18.         'parent_item_colon'     => '',
  19.         'menu_name'             => 'Partners'
  20.     );
  21.    
  22.     /**
  23.      * Configurazione del CPT
  24.      */
  25.     $args = array(
  26.         'labels'        => $labels,
  27.         'description'   => __( 'Aggiungi descrizione Partner.', 'textdomain' ),
  28.         'public'        => true,
  29.         'rewrite'       => array(
  30.         'slug'  => 'partner'
  31.         ),
  32.         'has_archive'   => true,
  33.         'hierarchial'   => true,
  34.         'menu_position' => 5,
  35.         'supports'      => array(
  36.             'title',
  37.            
  38.         )
  39.     );
  40.    
  41.     /**
  42.      * Registrazione del Custom Post Type
  43.      */
  44.     register_post_type( 'partner', $args );
  45.    
  46.  
  47.    
  48. }
  49. add_action( 'init', 'register_partner_custom_post_type' );
Advertisement
Add Comment
Please, Sign In to add comment