Cumpleaños
// Register Custom Post Type
function cpt_happy_birthdays() {
$labels = array(
'name' => _x( 'Cumpleaños', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Cumpleaños', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Cumpleaños', 'text_domain' ),
'name_admin_bar' => __( 'Cumpleaños', 'text_domain' ),
'archives' => __( 'Listado de cumpleaños', 'text_domain' ),
'attributes' => __( 'Atributos', 'text_domain' ),
'parent_item_colon' => __( 'Cumpleaños superior:', 'text_domain' ),
'all_items' => __( 'Todas los cumpleaños', 'text_domain' ),
'add_new_item' => __( 'Agregar nuevo cumpleaños', 'text_domain' ),
'add_new' => __( 'Agregar nuevo', 'text_domain' ),
'new_item' => __( 'Nuevo cumpleaños', 'text_domain' ),
'edit_item' => __( 'Editar cumpleaños', 'text_domain' ),
'update_item' => __( 'Actualizar cumpleaños', 'text_domain' ),
'view_item' => __( 'Ver cumpleaños', 'text_domain' ),
'view_items' => __( 'Ver cumpleaños', 'text_domain' ),
'search_items' => __( 'Buscar cumpleaños', 'text_domain' ),
'not_found' => __( 'No hay cumpleaños', 'text_domain' ),
'not_found_in_trash' => __( 'No hay cumpleaños en papelera', 'text_domain' ),
'featured_image' => __( 'Imagen del cumpleaños', 'text_domain' ),
'set_featured_image' => __( 'Establecer imagen del cumpleaños', 'text_domain' ),
'remove_featured_image' => __( 'Eliminar imagen del cumpleaños', 'text_domain' ),
'use_featured_image' => __( 'Utilizar como imagen del cumpleaños', 'text_domain' ),
'insert_into_item' => __( 'Insertar en el cumpleaños', 'text_domain' ),
'uploaded_to_this_item' => __( 'Subir a este cumpleaños', 'text_domain' ),
'items_list' => __( 'Lista de cumpleaños', 'text_domain' ),
'items_list_navigation' => __( 'Lista de cumpleaños', 'text_domain' ),
'filter_items_list' => __( 'Filtrar lista de cumpleaños', 'text_domain' ),
);
$capabilities = array(
'edit_post' => 'edit_happy_birthdays',
'read_post' => 'read_happy_birthdays',
'delete_post' => 'delete_happy_birthdays',
'edit_posts' => 'edit_happy_birthdays',
'edit_others_posts' => 'edit_others_happy_birthdays',
'publish_posts' => 'publish_happy_birthdays',
'read_private_posts' => 'read_happy_birthdays',
);
$args = array(
'label' => __( 'Cumpleaños', 'text_domain' ),
'description' => __( 'Cumpleaños Las Condes', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-buddicons-community',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capabilities' => $capabilities,
);
register_post_type( 'happy_birthdays', $args );
}
add_action( 'init', 'cpt_happy_birthdays', 0 );