| @@ -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_Tenancy; preserving the existing PH_* class name is required for plugin and extension compatibility. | |
| 16 | 17 | class PH_Tenancy { |
| 17 | 18 | |
| 18 | 19 | /** @public int Tenancy (post) ID */ |
| 19 | 20 | public $id; |
| @@ -117,9 +118,9 @@ | ||
| 117 | 118 | $suffix = ( (!$currency['currency_prefix']) ? $currency['currency_symbol'] : '' ); |
| 118 | 119 | |
| 119 | 120 | $amount = $this->_rent; |
| 120 | 121 | |
| 121 | - return ( ( $amount != '' ) ? $prefix . ph_display_price_field($amount) : '-' ) . $suffix . ' ' . __( $this->_rent_frequency, 'propertyhive' ); | |
| 122 | + return ( ( $amount != '' ) ? $prefix . ph_display_price_field($amount) : '-' ) . $suffix . ' ' . propertyhive_get_rent_frequency_label( $this->_rent_frequency ); | |
| 122 | 123 | |
| 123 | 124 | } |
| 124 | 125 | |
| 125 | 126 | /** |
| @@ -161,9 +162,9 @@ | ||
| 161 | 162 | { |
| 162 | 163 | $applicants = array(); |
| 163 | 164 | foreach ( $applicant_contact_ids as $applicant_contact_id ) |
| 164 | 165 | { |
| 165 | - $applicant_name = get_the_title($applicant_contact_id); | |
| 166 | + $applicant_name = esc_html( get_the_title( $applicant_contact_id ) ); | |
| 166 | 167 | if ( $add_hyperlinks ) |
| 167 | 168 | { |
| 168 | 169 | $edit_link = get_edit_post_link( $applicant_contact_id ); |
| 169 | 170 | $applicant_name = '<a href="' . esc_url( $edit_link ) . '">' . $applicant_name . '</a>'; |
| @@ -173,15 +174,15 @@ | ||
| 173 | 174 | $contact_details = array(); |
| 174 | 175 | $telephone_number = get_post_meta( $applicant_contact_id, '_telephone_number', true ); |
| 175 | 176 | if( !empty($telephone_number) ) |
| 176 | 177 | { |
| 177 | - $contact_details[] = 'T: ' . $telephone_number; | |
| 178 | + $contact_details[] = 'T: ' . esc_html( $telephone_number ); | |
| 178 | 179 | } |
| 179 | 180 | |
| 180 | 181 | $email_address = get_post_meta( $applicant_contact_id, '_email_address', true ); |
| 181 | 182 | if( !empty($email_address) ) |
| 182 | 183 | { |
| 183 | - $contact_details[] = 'E: ' . $email_address; | |
| 184 | + $contact_details[] = 'E: ' . esc_html( $email_address ); | |
| 184 | 185 | } |
| 185 | 186 | |
| 186 | 187 | if ( !empty($contact_details) ) |
| 187 | 188 | { |