Eventos
if ( ! function_exists('eventos_post_ytpe') ) {
// Register Custom Post Type
function eventos_post_ytpe() {
$labels = array(
'name' => _x( 'Eventos', 'Post Type General Name', 'arena_txt' ),
'singular_name' => _x( 'Evento', 'Post Type Singular Name', 'arena_txt' ),
'menu_name' => __( 'Eventos', 'arena_txt' ),
'name_admin_bar' => __( 'Eventos', 'arena_txt' ),
'archives' => __( 'Item Archives', 'arena_txt' ),
'attributes' => __( 'Item Attributes', 'arena_txt' ),
'parent_item_colon' => __( 'Parent Item:', 'arena_txt' ),
'all_items' => __( 'All Items', 'arena_txt' ),
'add_new_item' => __( 'Add New Item', 'arena_txt' ),
'add_new' => __( 'Adicionar Evento', 'arena_txt' ),
'new_item' => __( 'Adicionar Evento', 'arena_txt' ),
'edit_item' => __( 'Editar Evento', 'arena_txt' ),
'update_item' => __( 'Update Evento', 'arena_txt' ),
'view_item' => __( 'Ver Evento', 'arena_txt' ),
'view_items' => __( 'Ver items', 'arena_txt' ),
'search_items' => __( 'Pesquisar', 'arena_txt' ),
'not_found' => __( 'Não foi encontrado nenhum Evento!', 'arena_txt' ),
'not_found_in_trash' => __( 'Nao existe na \\\"Lixeira\\\"', 'arena_txt' ),
'featured_image' => __( 'Imagem de destaque', 'arena_txt' ),
'set_featured_image' => __( 'Set Imagem de destaque', 'arena_txt' ),
'remove_featured_image' => __( 'Remover a imagem', 'arena_txt' ),
'use_featured_image' => __( 'Usar como imagem de destaque', 'arena_txt' ),
'insert_into_item' => __( 'Insert into item', 'arena_txt' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'arena_txt' ),
'items_list' => __( 'Items list', 'arena_txt' ),
'items_list_navigation' => __( 'Items list navigation', 'arena_txt' ),
'filter_items_list' => __( 'Filter items list', 'arena_txt' ),
);
$rewrite = array(
'slug' => 'eventos',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'Evento', 'arena_txt' ),
'description' => __( 'Custom Post Type para os Eventos', 'arena_txt' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-calendar-alt',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'post',
);
register_post_type( 'evento', $args );
}
add_action( 'init', 'eventos_post_ytpe', 0 );
}