我试图用此代码重命名我的post标记,但出现以下错误:
注意:未定义的属性:stdClass::/var/www/new/wp admin/includes/class wp posts列表中的$no\\u terms。php在线1107
我的代码:
<?php
function rename_texonomy_tag()
{
global $wp_taxonomies;
$wp_taxonomies[\'post_tag\']->labels = (object)array(
\'name\' => \'Groups\',
\'menu_name\' => \'Groups\',
\'singular_name\' => \'Group\',
\'search_items\' => \'Search Groups\',
\'popular_items\' => \'Popular Groups\',
\'all_items\' => \'All Groups\',
\'parent_item\' => null, // Tags aren\'t hierarchical
\'parent_item_colon\' => null,
\'edit_item\' => \'Edit Groups\',
\'update_item\' => \'Update Groups\',
\'add_new_item\' => \'Add new Groups\',
\'new_item_name\' => \'New Groups Name\',
\'separate_items_with_commas\' => \'Separata Groups with commas\',
\'add_or_remove_items\' => \'Add or remove Groups\',
\'choose_from_most_used\' => \'Choose from the most used Groups\',
);
$wp_taxonomies[\'post_tag\']->label = \'Groups\';
}
?>