The problem is that you placed it in the theme of the main blog.
For it to run on all blogs you should create a plugin for wordpress, place your code there and than enable it to the entire network (from the super admin panel).
Good luck :)
Add new role for sub-sites WPMU
質問
I want to add a new role for all subsites in WPMU, so I created a file and tried the famous code on it (after including wp-blog-header.php):
$result = add_role(
'ret_moderator',
'مدیر بازنشسته',
array(
'read' => true, // true allows this capability
'edit_posts' => true,
'delete_posts' => true, // Use false to explicitly deny
'delete_published_posts' => true,
'publish_posts' => true,
'upload_files' => true,
'read_private_pages' => true,
'read_private_posts' => true,
'edit_published_posts' => true,
'edit_pages' => true,
'manage_categories' => true,
'manage_links' => true,
'list_users' => true
)
);
It adds the role for the main blog, but it's invisible on the sub-sites :) My own idea is to place the code inside somewhere like themes and open it on sub-sites (:D) but you know that isn't standard approach.
解決
所属していません StackOverflow