| @@ -12,8 +12,9 @@ | ||
| 12 | 12 | * @package PropertyHive/Classes/ |
| 13 | 13 | * @category Class |
| 14 | 14 | * @author PropertyHive |
| 15 | 15 | */ |
| 16 | +// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Preserve the existing public PH_AIOSEO class name for plugin and extension compatibility. | |
| 16 | 17 | class PH_AIOSEO { |
| 17 | 18 | |
| 18 | 19 | /** @var PH_AIOSEO The single instance of the class */ |
| 19 | 20 | protected static $_instance = null; |
| @@ -41,8 +42,9 @@ | ||
| 41 | 42 | $off_market = get_posts(array( |
| 42 | 43 | 'fields' => 'ids', |
| 43 | 44 | 'posts_per_page' => -1, |
| 44 | 45 | 'post_type' => 'property', |
| 46 | + // 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. | |
| 45 | 47 | 'meta_query' => array( |
| 46 | 48 | array( |
| 47 | 49 | 'key' => '_on_market', |
| 48 | 50 | 'value' => '', |
| @@ -72,9 +74,9 @@ | ||
| 72 | 74 | // Common fields (adjust to your meta keys as needed). |
| 73 | 75 | $title = get_the_title( $post_id ); |
| 74 | 76 | $url = get_permalink( $post_id ); |
| 75 | 77 | $description = wp_strip_all_tags( get_the_excerpt( $post_id ) ?: '', true ); |
| 76 | - $datePosted = date("Y-m-d\TH:i:s", strtotime($property->_on_market_change_date)) . "+00:00"; | |
| 78 | + $datePosted = gmdate("Y-m-d\TH:i:s", strtotime($property->_on_market_change_date)) . "+00:00"; | |
| 77 | 79 | |
| 78 | 80 | $department = $property->_department; |
| 79 | 81 | |
| 80 | 82 | $street = $property->_address_street; |