Created
May 29, 2025 09:31
-
-
Save propertyhive/d9407e159dfc5f8b3cd9fdfc4d920e50 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'propertyhive_agentsinsight_xml_properties_due_import', 'filter_kato_properties_by_tag', 10, 1 ); | |
function filter_kato_properties_by_tag( $properties ) { | |
$allowed_tags = array( 'British Museum' ); // Define your allowed tags here | |
$filtered_properties = array(); | |
foreach ( $properties as $property ) { | |
if ($property['tags'] == null || !is_array($property['tags'])) { | |
continue; | |
} | |
foreach ( $tags as $tag ) { | |
if ( in_array( $tag, $allowed_tags ) ) { | |
$filtered_properties[] = $property; | |
break; | |
} | |
} | |
} | |
return $filtered_properties; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment