// Add the custom "Property Location" metabox without removing the default metabox
function custom_property_location_taxonomy_metabox() {
تسجيل الدخول لعرض الكود
}
add_action('add_meta_boxes', 'custom_property_location_taxonomy_metabox');
function custom_property_location_metabox_callback($post) {
تسجيل الدخول لعرض الكود
}
// Add inline JavaScript to handle dynamic dropdown functionality
function custom_property_location_taxonomy_enqueue_script() {
تسجيل الدخول لعرض الكود
}
add_action('admin_head', 'custom_property_location_taxonomy_enqueue_script');
// AJAX handler to fetch child property locations
function get_child_property_locations_ajax() {
تسجيل الدخول لعرض الكود
}
add_action('wp_ajax_get_child_property_locations', 'get_child_property_locations_ajax');
// AJAX handler to fetch grandchild property locations
function get_grandchild_property_locations_ajax() {
تسجيل الدخول لعرض الكود
}
add_action('wp_ajax_get_grandchild_property_locations', 'get_grandchild_property_locations_ajax');
// Save the selected parent and child terms
function save_custom_property_location_taxonomy($post_id) {
تسجيل الدخول لعرض الكود
}
add_action('save_post', 'save_custom_property_location_taxonomy');