This always struck me as strange; rather than filtering by location, clicking locations in this column takes you to a Google Map of the location.
The following filter rewrites location column output (only in the admin) to add filter links, not map ones.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
add_filter( 'the_job_location_map_link', 'edit_admin_location_link', 10, 3 ); function edit_admin_location_link($text, $location, $post) { if (!is_admin()) return $text; // this is a workaround for how the column is called if (!$post) $post = get_post(); $locations = wp_get_object_terms( $post->ID, 'job_listing_region'); $r_array = Array(); foreach ($locations as $loc) { $url = admin_url(sprintf("edit.php?job_listing_region=%s&post_type=job_listing", $loc->slug)); $r_array[] = sprintf("<a href='%s'>%s</a>", $url, $loc->name); } return implode(", ", $r_array); } |
Without an admin-specific filter, I’m not sure what else can be done to clean this up.