$taxonomies = array('estate_district', 'estate_type', 'estate_building_type', 'estate_operation', 'estate_class', 'estate_proprietor');
foreach ($estate_data as $key => $value){
if ( !in_array($key, $taxonomies) ){
update_post_meta( $estate_id, $key, $value);
}
if (in_array($key, $taxonomies) ){
wp_remove_object_terms( $estate_id, $value, $key );
wp_set_object_terms( $estate_id, intval($value), $key);
update_post_meta( $estate_id, $key, $value);
}
}
В таблице wp_posts такой информации в полном объеме нет.
$taxonomies = array('estate_district', 'estate_type', 'estate_building_type', 'estate_operation', 'estate_class', 'estate_proprietor');
foreach ($taxonomies as $taxonomy) {
$est_cat = wp_get_post_terms($estate_id, $taxonomy, array("fields" => "ids"));
foreach ($est_cat as $cat => $cat_id) { $estate_object_data[$taxonomy] = $cat_id }
}
<?php
$needed_ids = array();
$posts = get_posts( array('category' => /* id или slug-и нужных рубрик*/) );
foreach( $posts as $post ){ array_push($needed_ids, $post->ID); }
?>
'post__in' => $needed_ids
[data-title]:hover:after {
opacity: 1;
transition: all 0.1s ease 0.5s;
visibility: visible;
}
[data-title]:after {
content: attr(data-title);
position: absolute;
bottom: -1.6em;
left: 100%;
padding: 4px 4px 4px 8px;
color: #222;
white-space: nowrap;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 0px 0px 4px #222;
-webkit-box-shadow: 0px 0px 4px #222;
box-shadow: 0px 0px 4px #222;
background-image: -moz-linear-gradient(top, #f8f8f8, #cccccc);
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f8f8f8),color-stop(1, #cccccc));
background-image: -webkit-linear-gradient(top, #f8f8f8, #cccccc);
background-image: -moz-linear-gradient(top, #f8f8f8, #cccccc);
background-image: -ms-linear-gradient(top, #f8f8f8, #cccccc);
background-image: -o-linear-gradient(top, #f8f8f8, #cccccc);
opacity: 0;
z-index: 99999;
visibility: hidden;
}
[data-title] {
position: relative;
}
<a href="https://toster.ru/q/564838" data-title="Телега про подводные камни в поч.. в бизнесе"> Тык </a> <br/>
wp_register_script('js_function_id', plugins_url('functions_js/js_function.js', __FILE__));
wp_enqueue_script('js_function_id');
wp_localize_script( 'js_function_id', 'ajaxurl', admin_url( 'admin-ajax.php' ) );
$my_var = $_POST['my_var'] // без всяких json_decode, stripslashes и т.д.
$data = ['surname' => $surname, 'name' => $name, 'patronymic' => $patronymic]; // и так далее
wp_send_json($data);