function add_se_roles() {
$es_admin = add_role('es_admin','Администратор Системы Мероприятий',array( 'read'=>true,'level_7'=>true));
if ( null !== $es_admin ) {
$es_administrator = get_role('es_admin'); // Для CPT
$es_administrator->add_cap('edit_es_event_content');
$es_administrator->add_cap('edit_es_event_contents');
$es_administrator->add_cap('read_es_event_content');
$es_administrator->add_cap('read_private_es_event_content');
$es_administrator->add_cap('delete_es_event_content');
$es_administrator->add_cap('delete_es_event_contents');
$es_administrator->add_cap('edit_published_es_event_contents');
$es_administrator->add_cap('delete_published_es_event_contents');
$es_administrator->add_cap('edit_other_es_event_content');
$es_administrator->add_cap('manage_es_event_type'); // <-Права таксономии вопроса
$es_administrator->add_cap('edit_es_event_type');
$es_administrator->add_cap('delete_es_event_type');
$es_administrator->add_cap('assign_es_event_type');
$es_administrator->add_cap('manage_es_event_operation');
$es_administrator->add_cap('edit_es_event_operation');
$es_administrator->add_cap('delete_es_event_operation');
$es_administrator->add_cap('assign_es_event_operation');
$es_administrator->add_cap('manage_es_event_location');
$es_administrator->add_cap('edit_es_event_location');
$es_administrator->add_cap('delete_es_event_location');
$es_administrator->add_cap('assign_es_event_location');
$es_administrator->add_cap('manage_es_event_team');
$es_administrator->add_cap('edit_es_event_team');
$es_administrator->add_cap('delete_es_event_team');
$es_administrator->add_cap('assign_es_event_team');
$es_administrator->add_cap('manage_event_service');
}
}
// Легче создать относительно пустую, со стандартными возможностями роль и по итогам создания напичкать ее всем, чем нужно.
// Все, что нужно прописывается в функциях создания таксономий и произвольного типа записи.
function js_includer() {
wp_register_script('your_js_id', get_stylesheet_directory_uri().'your_js.js'); //<-- Путь, если js файл в корне темы. Уточните возврат функции, возможно перед your_js.js нужен "слеш".
wp_enqueue_script('your_js_id');
}
add_action( 'admin_enqueue_scripts', 'js_includer' ); add_action( 'wp_enqueue_scripts', 'js_includer' );
jQuery(document).ready(function(){
var replaced = jQuery("body").html().replace('о','е');
jQuery("body").html(replaced);
});
<div class="form-check form-check-inline custom-checkbox">
<div class="custom-control custom-checkbox mr-2">
<input type="checkbox" class="custom-control-input" id="slug поля">
label class="custom-control-label" for="slug поля">Значение переменной</label>
</div>
</div>
$needle_users = get_users();
foreach($needle_users as $user){
// И потом.. если нужно обнулить значения - они могут быть переписанны. Читайте, пробуйте
/* update_user_meta .. допишите? */
}