Skip to content

Instantly share code, notes, and snippets.

@alandbh
Created February 23, 2016 18:38
Show Gist options
  • Save alandbh/7eff15528ccb83942325 to your computer and use it in GitHub Desktop.
Save alandbh/7eff15528ccb83942325 to your computer and use it in GitHub Desktop.
Altera o menu "Posts" para "Notícias"
/* ----------------
Altera o menu "Posts" para "Notícias"
Alan
----------------- */
// Adicionado por Alan (02/04/2015)
function change_post_menu_label() {
global $menu;
global $submenu;
$menu[5][0] = 'Notícias';
$submenu['edit.php'][5][0] = 'Notícias';
$submenu['edit.php'][10][0] = 'Adicionar Notícias';
//$submenu['edit.php'][15][0] = 'Status'; // Change name for categories
//$submenu['edit.php'][16][0] = 'Labels'; // Change name for tags
echo '';
}
function change_post_object_label() {
global $wp_post_types;
$labels = &$wp_post_types['post']->labels;
$labels->name = 'Notícias';
$labels->singular_name = 'Notícia';
$labels->add_new = 'Adicionar Notícia';
$labels->add_new_item = 'Adicionar Notícia';
$labels->edit_item = 'Editar Notícias';
$labels->new_item = 'Notícia';
$labels->view_item = 'Ver Notícia';
$labels->search_items = 'Procurar Notícias';
$labels->not_found = 'Nenhuma notícia encontrada';
$labels->not_found_in_trash = 'Nenhuma notícia encontrada na lixeira';
}
add_action( 'init', 'change_post_object_label' );
add_action( 'admin_menu', 'change_post_menu_label' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment