ID, '_photo_urls', true ); if ( empty( $photos ) ) { return $url; } $url = esc_url( $photos[0]['url'] ); return $url; } public static function sitemap_exclude_taxonomy( $taxonomies ) { $taxonomy_objects = get_object_taxonomies( array('property', 'key_date'), 'objects' ); if ( !empty($taxonomy_objects) ) { foreach ( $taxonomy_objects as $taxonomy_name => $object ) { if ( isset($taxonomies[$taxonomy_name]) ) { unset($taxonomies[$taxonomy_name]); } } } return $taxonomies; } public static function remove_columns( $columns ) { unset( $columns['rank_math_seo_details'] ); unset( $columns['rank_math_title'] ); unset( $columns['rank_math_description'] ); return $columns; } public static function sitemap_exclude_off_market( $post_ids_to_exclude ) { $properties_to_exclude = get_posts(array( 'fields' => 'ids', 'posts_per_page' => -1, 'post_type' => 'property', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query -- Sitemap exclusions require all property IDs explicitly marked off-market in the existing metadata schema; preserve the complete exclusion list and status semantics. 'meta_query' => array( array( 'key' => '_on_market', 'value' => '', ) ) )); return array_merge($post_ids_to_exclude, $properties_to_exclude); } } PH_Rank_Math::init();