| @@ -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 -- Legacy public global class PH_Address_Keyword_Polygon; preserving the existing PH_* class name is required for plugin and extension compatibility. | |
| 16 | 17 | class PH_Address_Keyword_Polygon { |
| 17 | 18 | |
| 18 | 19 | /** @var PH_Emails The single instance of the class */ |
| 19 | 20 | protected static $_instance = null; |
| @@ -42,9 +43,9 @@ | ||
| 42 | 43 | * |
| 43 | 44 | * @since 1.0.0 |
| 44 | 45 | */ |
| 45 | 46 | public function __clone() { |
| 46 | - _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'propertyhive' ), '1.0.0' ); | |
| 47 | + _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'propertyhive' ), '1.0.0' ); | |
| 47 | 48 | } |
| 48 | 49 | |
| 49 | 50 | /** |
| 50 | 51 | * Unserializing instances of this class is forbidden. |
| @@ -51,9 +52,9 @@ | ||
| 51 | 52 | * |
| 52 | 53 | * @since 1.0.0 |
| 53 | 54 | */ |
| 54 | 55 | public function __wakeup() { |
| 55 | - _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'propertyhive' ), '1.0.0' ); | |
| 56 | + _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'propertyhive' ), '1.0.0' ); | |
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | /** |
| 59 | 60 | * Constructor for the email class hooks in all emails that can be sent. |
| @@ -69,8 +70,9 @@ | ||
| 69 | 70 | |
| 70 | 71 | $address_keyword = trim($address_keyword); |
| 71 | 72 | |
| 72 | 73 | // see if it exists in the table |
| 74 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Prepared read from the plugin's persistent geocoding cache; cached polygons avoid external HTTP and this custom table has no core data API. | |
| 73 | 75 | $results = $wpdb->get_results( |
| 74 | 76 | $wpdb->prepare( |
| 75 | 77 | " |
| 76 | 78 | SELECT polygon_coordinates |
| @@ -123,8 +125,9 @@ | ||
| 123 | 125 | |
| 124 | 126 | if ( !empty($polygon_coordinates) ) |
| 125 | 127 | { |
| 126 | 128 | // Insert into email log |
| 129 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery -- Populate the plugin's persistent polygon cache using explicit string formats; no equivalent core data API exists for this table. | |
| 127 | 130 | $insert = $wpdb->insert( |
| 128 | 131 | $wpdb->prefix . 'ph_address_keyword_polygon', |
| 129 | 132 | array( |
| 130 | 133 | 'address_keyword' => $address_keyword, |