add actual version
This commit is contained in:
@@ -49,37 +49,9 @@ if ( in_array( 'corrector', (array) $user->roles ) && !in_array(get_post_status(
|
||||
|
||||
|
||||
<?php //if (!current_user_can('create_tag')): //Запрет создания тегов?>
|
||||
<?php if (!in_array(get_current_user_id(), array(1,3))): //Запрет создания тегов?>
|
||||
<script>
|
||||
(function ($) {
|
||||
setTimeout(function(){
|
||||
var b = $("div.ajaxtag");
|
||||
$(".tagadd", b).off('click');
|
||||
$("input.newtag").off('keypress');
|
||||
$("input.newtag").unbind('keypress').off('keypress').on('keypress', function(e){
|
||||
if (e.which == 13) {
|
||||
window.tagBox.userAction = "";
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("input.newtag").keypress(function(e){
|
||||
if (e.which == 13){
|
||||
window.tagBox.userAction = "";
|
||||
return false;
|
||||
}
|
||||
})
|
||||
<?php //if (!in_array(get_current_user_id(), array(1,3))): //Запрет создания тегов?>
|
||||
|
||||
$('.wp-tags-autocomplete').on('click', 'li', function(){
|
||||
|
||||
let container = jQuery('*[aria-owns='+$(this).parent().attr('id')+']').parents('.postbox');
|
||||
|
||||
window.tagBox.userAction = "add", window.tagBox.flushTags(container.find('.tagsdiv'))
|
||||
});
|
||||
},2000);
|
||||
|
||||
})(jQuery);
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
<?php // endif; ?>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user