Disable translation of new User Roles
-
hi!
in my child theme’s functions.php, I am adding new user roles with
$user = new WP_User( bbp_get_reply_author_id() ); echo $user->roles[0]; $result = add_role( 'user_role_name', __( 'User Role Name' ), array( 'read' => true, // true allows this capability 'edit_posts' => true, // Allows user to edit their own posts 'edit_pages' => true, // Allows user to edit pages 'edit_others_posts' => true, // Allows user to edit others posts not just their own 'create_posts' => true, // Allows user to create new posts 'manage_categories' => true, // Allows user to manage post categories 'publish_posts' => true, // Allows the user to publish, otherwise posts stays in draft mode 'edit_themes' => false, // false denies this capability. User can’t edit your theme 'install_plugins' => false, // User cant add new plugins 'update_plugin' => false, // User can’t update any plugins 'update_core' => false // user cant perform core updates ) );
The user roles are displayed in a forum. Unfortunately some names like “Developer” or “Artist” are automaticly translated into the language of my Operating System or my WordPress Version.
Does anyone know how I can disable this translation without changing the language of my WordPress Backend?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Disable translation of new User Roles’ is closed to new replies.