jQuery( "input#estate_proprietor_phone" ).autocomplete({ source: JSON.parse(localStorage.getItem('proprietors_phone_numbers') ) });function js_includer() { wp_enqueue_script("jquery-ui-core", array('jquery')); }
add_action( 'admin_enqueue_scripts', 'js_includer' ); // Подключение JS-скриптов в админкеjQuery( "input#estate_proprietor_phone" ).autocomplete(...)?let inputWithAutocomplete = $('#estate_proprietor_phone')
if ( inputWithAutocomplete.length ) {
inputWithAutocomplete.autocomplete(...)
}if (jQuery.autocomplete) {
...
}