[+] Allow editors to edit all translations even when not assigned to them

When a job is completed only the admin or the original translator can edit that job.

You can change this behavior and provide access to other roles as well to edit the job.
Add the below code the functions.php


add_filter('wpml_user_can_translate', function ($user_can_translate, $user){
	if (in_array('editor', (array) $user->roles, true) && current_user_can('translate')) {
		return true;
	}
	
	return $user_can_translate;
}, 10, 2);

Remove Toolset buttons for certain User Roles from WP Post Editor

This code allows you to Remove buttons (fields and views, Content Layout Editor, CRED form, Access, Bootstrap buttons) from backend WP editor for certain user roles.

Solution:
1. Add this code in your theme’s or child theme’s functions.php file:


add_filter( 'mce_buttons_3', 'remove_bootstrap_buttons', 999 );
function remove_bootstrap_buttons($buttons) {
if( current_user_can('editor') || current_user_can('contributor') ) {
return array();
}
else {
return $buttons;
}
}

add_filter( 'mce_buttons', 'remove_toggle_button', 999 );
function remove_toggle_button($buttons) {
if( current_user_can('editor') || current_user_can('contributor') ) {
$remove = array( 'css_components_toolbar_toggle' );
return array_diff( $buttons, $remove );
}
else {
return $buttons;
}
}

function vm_wptypes_remove() {

if( current_user_can('editor') || current_user_can('contributor') ) {
wp_enqueue_style( 'wp-types-special', get_stylesheet_directory_uri() . '/wp-types-special.css' );

}
}
add_action( 'admin_init', 'vm_wptypes_remove' );

==> In above code, I have used ‘editor’ and ‘contributor’ level roles as example, you can replace those with your roles as needed. These are in the if conditional statement.

2. Download & extract this file >> and place this css file in the folder in your site:
wp-content/themes/et/ (inside your theme folder)
CSS file:
https://drive.google.com/file/d/0B5EmJQ1qcuyqTU4xZ3paM01ERmc/view?usp=sharing

Related tickets:
https://wp-types.com/forums/topic/removing-buttons-for-certain-user-roles-for-the-post-editor/
https://wp-types.com/forums/topic/how-to-remove-fields-and-views-button-above-post-edit-for-non-admin-users/

Remove Content Template and Template Layout metabox from CPT

Problem:
Remove ‘Content Template’ and ‘Template Layout’ widgets/metabox for certain CPT in admin screen (WP post edit screen).

Solution:
Please add this code in your theme’s or child theme’s functions.php file:


add_action( 'admin_head', 'wpv_custom_admin_head', 20);
function wpv_custom_admin_head() {
remove_meta_box( 'wpddl_template', 'book', 'side' ); // replace book with your CPT slug
remove_meta_box( 'views_template', 'book', 'side' ); // replace book with your CPT slug
}

==> Whereas ‘book’ should be replaced with your CPT slug.

Relevant Documentation:
https://codex.wordpress.org/Function_Reference/remove_meta_box