People tell me ... I post_type lot of time ... How to register a new post_type is clear through register_post_type($name,$args) ;

But how to change such post_type as post and page ... for example, rename it all through $labels = array( ); or add something there ... through 'supports' => array('title','editor','custom-fields')

    1 answer 1

     // Изменение стандартных надписей в Админке для записей... function change_post_object_label() { global $wp_post_types; $labels = $wp_post_types['post']->labels; $labels->name = __('Акции', 'new' ); $labels->singular_name = __('Акции', 'new' ); $labels->add_new = __('Добавить', 'new' ); $labels->add_new_item = __('Добавить', 'new' ); $labels->edit_item = __('Редактирование акции', 'new' ); $labels->new_item = __('Новая акция', 'new' ); $labels->view_item = __('Просмотр акции', 'new' ); $labels->search_items = __('Поиск акции', 'new' ); $labels->not_found = __('Акция не найдена', 'new' ); $labels->not_found_in_trash = __('Акция не найдена', 'new' ); $labels->menu_name = __('Акции', 'new' ); $labels->name_admin_bar = __('Акции', 'new' ); $labels->all_items = __('Все акции', 'new' ); } add_action( 'init', 'change_post_object_label' );