add actual version

This commit is contained in:
masterforweb
2026-01-12 13:37:40 +03:00
parent 2a322664b5
commit 2aff9ab6b1
14 changed files with 267 additions and 73 deletions

View File

@@ -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>