Kratke zpravy
if ( ! function_exists('telegraficky_post_type') ) {
// Register Custom Post Type
function telegraficky_post_type() {
$labels = array(
'name' => _x( 'Zprávy', 'Post Type General Name', 'happenstance' ),
'singular_name' => _x( 'Zpráva', 'Post Type Singular Name', 'happenstance' ),
'menu_name' => __( 'Krátké zprávy', 'happenstance' ),
'name_admin_bar' => __( 'Typ příspěvku', 'happenstance' ),
'archives' => __( 'Archiv položek', 'happenstance' ),
'attributes' => __( 'Atributy položky', 'happenstance' ),
'parent_item_colon' => __( 'Nadřazená položka:', 'happenstance' ),
'all_items' => __( 'Všechny položky', 'happenstance' ),
'add_new_item' => __( 'Přidat novou položku', 'happenstance' ),
'add_new' => __( 'Přidat nový', 'happenstance' ),
'new_item' => __( 'Nová položka', 'happenstance' ),
'edit_item' => __( 'Upravit položku', 'happenstance' ),
'update_item' => __( 'Aktualizovat položku', 'happenstance' ),
'view_item' => __( 'Zobrazit položku', 'happenstance' ),
'view_items' => __( 'Zobrazit položky', 'happenstance' ),
'search_items' => __( 'Hledat položku', 'happenstance' ),
'not_found' => __( 'Nenalezeno', 'happenstance' ),
'not_found_in_trash' => __( 'Nenalezeno v koši', 'happenstance' ),
'featured_image' => __( 'Doporučený obrázek', 'happenstance' ),
'set_featured_image' => __( 'Nastavit doporučený obrázek', 'happenstance' ),
'remove_featured_image' => __( 'Odstranit doporučený obrázek', 'happenstance' ),
'use_featured_image' => __( 'Nastavit jako doporučený obrázek', 'happenstance' ),
'insert_into_item' => __( 'Vložit do položky', 'happenstance' ),
'uploaded_to_this_item' => __( 'Nahráno do této položky', 'happenstance' ),
'items_list' => __( 'Seznam položek', 'happenstance' ),
'items_list_navigation' => __( 'Navigace seznamu položek', 'happenstance' ),
'filter_items_list' => __( 'Filtrovat seznam položek', 'happenstance' ),
);
$args = array(
'label' => __( 'Zpráva', 'happenstance' ),
'description' => __( 'Krátké zprávy', 'happenstance' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'custom-fields' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-format-aside',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => false,
'has_archive' => 'telegraficky',
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'post',
'show_in_rest' => false,
);
register_post_type( 'telegraficky', $args );
}
add_action( 'init', 'telegraficky_post_type', 0 );
}