Last active
August 27, 2019 17:13
-
-
Save PetrovStark/d155a006be31f95ceda08bd8f5012813 to your computer and use it in GitHub Desktop.
Modelo Custom Post Type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function init() { | |
$labels_flores = array( | |
"name" => __( "Flores", "" ), | |
"singular_name" => __( "Flor", "" ), | |
"menu_name" => __( "Flores", "" ), | |
"all_items" => __( "Todas as flores", "" ), | |
"add_new" => __( "Adicionar nova flor", "" ), | |
"add_new_item" => __( "Adicionar nova flor", "" ), | |
"edit_item" => __( "Editar", "" ), | |
"new_item" => __( "Nova flor", "" ), | |
"view_item" => __( "Visualizar", "" ), | |
"view_items" => __( "Visualizar", "" ), | |
"search_items" => __( "Pesquisar", "" ), | |
"not_found" => __( "Sem resultados", "" ), | |
"not_found_in_trash" => __( "Sem resultados", "" ), | |
"parent_item_colon" => __( "Relacionados", "" ), | |
"featured_image" => __( "Imagem destacada", "" ), | |
"set_featured_image" => __( "Editar imagem destacada", "" ), | |
"remove_featured_image" => __( "Remover imagem destacada", "" ), | |
"parent_item_colon" => __( "Relacionados", "" ), | |
); | |
$args_flores = array( | |
"label" => __( "flores", "" ), | |
"labels" => $labels_flores, | |
"description" => "", | |
"public" => true, | |
"publicly_queryable" => true, | |
"show_ui" => true, | |
"show_in_rest" => false, | |
"rest_base" => "", | |
"has_archive" => false, | |
"show_in_menu" => true, | |
"exclude_from_search" => true, | |
"capability_type" => "post", | |
"map_meta_cap" => true, | |
"hierarchical" => false, | |
"rewrite" => array( "slug" => "flores", "with_front" => true ), | |
"query_var" => true, | |
"menu_icon" => "dashicons-buddicons-replies", | |
"supports" => array( "title", "editor", "thumbnail"), | |
//'register_meta_box_cb' => 'noticias_meta_box' | |
); | |
register_post_type( "flores", $args_flores ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment