php 重命名WP
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 重命名WP相关的知识,希望对你有一定的参考价值。
function revcon_change_post_label() {
global $menu;
global $submenu;
$menu[5][0] = 'News';
$submenu['edit.php'][5][0] = 'News';
$submenu['edit.php'][10][0] = 'Add News';
$submenu['edit.php'][16][0] = 'News Tags';
}
function revcon_change_post_object() {
global $wp_post_types;
$labels = &$wp_post_types['post']->labels;
$labels->name = 'News';
$labels->singular_name = 'News';
$labels->add_new = 'Add News';
$labels->add_new_item = 'Add News';
$labels->edit_item = 'Edit News';
$labels->new_item = 'News';
$labels->view_item = 'View News';
$labels->search_items = 'Search News';
$labels->not_found = 'No News found';
$labels->not_found_in_trash = 'No News found in Trash';
$labels->all_items = 'All News';
$labels->menu_name = 'News';
$labels->name_admin_bar = 'News';
}
add_action( 'admin_menu', 'revcon_change_post_label' );
add_action( 'init', 'revcon_change_post_object' );
以上是关于php 重命名WP的主要内容,如果未能解决你的问题,请参考以下文章
WP-重命名自定义post类型和分类
重命名已部署到 MarketPlace 的 WP7 应用程序,现有数据?
WordPress安装极简教程
php 重定向su wp
停止 WooCommerce 将 wp-login.php 和 wp-admin 重定向到帐户页面
PHP Wordpress重定向与wp_redirect()