Forked from raaar/WORDPRESS: change Posts label in admin area
Last active
April 5, 2016 12:42
-
-
Save rickbenetti/52333de7fdef6c852f11297c7da72efd to your computer and use it in GitHub Desktop.
WORDPRESS: change Posts label in admin area
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
function change_post_label() { | |
global $menu; | |
global $submenu; | |
$menu[5][0] = 'Blog'; | |
$submenu['edit.php'][5][0] = 'Blog'; | |
$submenu['edit.php'][10][0] = 'Adicionar publicação'; | |
$submenu['edit.php'][16][0] = 'Blog Tags'; | |
echo ''; | |
} | |
function change_post_object() { | |
global $wp_post_types; | |
$labels = &$wp_post_types['post']->labels; | |
$labels->name = 'Blog'; | |
$labels->singular_name = 'Blog'; | |
$labels->add_new = 'Adicionar publicação'; | |
$labels->add_new_item = 'Adicionar publicação'; | |
$labels->edit_item = 'Editar publicação'; | |
$labels->new_item = 'Publicação'; | |
$labels->view_item = 'Ver Publicação'; | |
$labels->search_items = 'Buscar no Blog'; | |
$labels->not_found = 'Nenhuma publicação encontrada'; | |
$labels->not_found_in_trash = 'Nenhuma publicação encontrada na lixeira'; | |
$labels->all_items = 'Todas as publicações'; | |
$labels->menu_name = 'Blog'; | |
$labels->name_admin_bar = 'Blog'; | |
} | |
add_action( 'admin_menu', 'change_post_label' ); | |
add_action( 'init', 'change_post_object' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment