Created
November 7, 2014 19:26
-
-
Save allysonsouza/224211addc57cb1915a5 to your computer and use it in GitHub Desktop.
Modelo de registro de custom post type utilizando o Odin Framework no WordPress.
This file contains hidden or 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 | |
/* | |
* Portfolio - Custom Post Type for portfolio projects | |
*/ | |
$portfolio = new Odin_Post_Type( | |
'Portfolio', // Nome (Singular) do Post Type. | |
'portfolio' // Slug do Post Type.; | |
); | |
$portfolio->set_labels( | |
array( | |
'name' => 'Portfólio', | |
'singular_name' => 'Portfólio', | |
'menu_name' => 'Portfólio', | |
'name_admin_bar' => 'Portfólio', | |
'add_new' => 'Adicionar Projeto', | |
'add_new_item' => 'Adicionar Novo Projeto', | |
'new_item' => 'Novo Projeto', | |
'edit_item' => 'Editar Projeto', | |
'view_item' => 'Visualizar Projeto', | |
'all_items' => 'Todos os Projetos', | |
'search_items' => 'Pesquisar Projetos', | |
'parent_item_colon' => 'Projetos Pai', | |
'not_found' => 'Nenhum Projeto encontrado', | |
'not_found_in_trash' => 'Nenhum Projeto encontrado na lixeira.', | |
) | |
); | |
$portfolio->set_arguments( | |
array( | |
'supports' => array( 'title', 'thumbnail', 'editor' ), | |
'menu_icon' => 'dashicons-portfolio', | |
'show_in_nav_menus' => true | |
) | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment