GEO Gastos
if ( ! function_exists('cpt_gastos') ) {
// Register Custom Post Type
function cpt_gastos() {
$labels = array(
'name' => _x( 'Gastos', 'Post Type General Name', 'gastos' ),
'singular_name' => _x( 'Gasto', 'Post Type Singular Name', 'gastos' ),
'menu_name' => __( 'Gastos', 'gastos' ),
'name_admin_bar' => __( 'Gastos', 'gastos' ),
'archives' => __( 'Archivo', 'gastos' ),
'attributes' => __( 'Atributos', 'gastos' ),
'parent_item_colon' => __( 'Padre', 'gastos' ),
'all_items' => __( 'Ver tod0s', 'gastos' ),
'add_new_item' => __( 'Nuevo Gasto', 'gastos' ),
'add_new' => __( 'Nuevo Gasto', 'gastos' ),
'new_item' => __( 'Nuevo Gasto', 'gastos' ),
'edit_item' => __( 'Editar Gasto', 'gastos' ),
'update_item' => __( 'Actualizar Gasto', 'gastos' ),
'view_item' => __( 'Ver Gasto', 'gastos' ),
'view_items' => __( 'Ver Gasto', 'gastos' ),
'search_items' => __( 'Buscar Gasto', 'gastos' ),
'not_found' => __( 'Sin resultados de búsqueda', 'gastos' ),
'not_found_in_trash' => __( 'Sin resultados de búsqueda en papelera', 'gastos' ),
'featured_image' => __( 'Featured Image', 'gastos' ),
'set_featured_image' => __( 'Set featured image', 'gastos' ),
'remove_featured_image' => __( 'Remove featured image', 'gastos' ),
'use_featured_image' => __( 'Use as featured image', 'gastos' ),
'insert_into_item' => __( 'Insert into item', 'gastos' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'gastos' ),
'items_list' => __( 'Items list', 'gastos' ),
'items_list_navigation' => __( 'Items list navigation', 'gastos' ),
'filter_items_list' => __( 'Filter items list', 'gastos' ),
);
$capabilities = array(
'edit_post' => 'gastos_edit_post',
'read_post' => 'gastos_read_post',
'delete_post' => 'gastos_delete_post',
'edit_posts' => 'gastos_edit_posts',
'edit_others_posts' => 'gastos_edit_others_posts',
'publish_posts' => 'gastos_publish_posts',
'read_private_posts' => 'gastos_read_private_posts',
);
$args = array(
'label' => __( 'Gasto', 'gastos' ),
'labels' => $labels,
'supports' => false,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 75,
'menu_icon' => 'dashicons-money-alt',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capabilities' => $capabilities,
);
register_post_type( 'gastos', $args );
}
add_action( 'init', 'cpt_gastos', 0 );
}