Skip to content

Commit

Permalink
radcliffe-2: PHP 8.1 updates from wpcom (#7584)
Browse files Browse the repository at this point in the history
  • Loading branch information
mreishus authored Jan 4, 2024
1 parent 8d8eeed commit 662c571
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions radcliffe-2/contact-info/contact-info-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@
*/
function radcliffe_2_contact_info( $section ) {
$location = get_theme_mod( 'radcliffe_2_contact_info_location', 'header' );
$address = get_option( 'site_contact_info' )['address'] ?: get_theme_mod( 'radcliffe_2_contact_info_address', '' );
$phone = get_option( 'site_contact_info' )['phone'] ?: get_theme_mod( 'radcliffe_2_contact_info_phone', '' );
$email = get_option( 'site_contact_info' )['email'] ?: get_theme_mod( 'radcliffe_2_contact_info_email', '' );

$contact = get_option( 'site_contact_info' );
if ( is_array( $contact ) ) {
$address = isset( $contact['address'] ) ? $contact['address'] : '';
$phone = isset( $contact['phone'] ) ? $contact['phone'] : '';
$email = isset( $contact['email'] ) ? $contact['email'] : '';
} else {
$address = get_theme_mod( 'radcliffe_2_contact_info_address', '' );
$phone = get_theme_mod( 'radcliffe_2_contact_info_phone', '' );
$email = get_theme_mod( 'radcliffe_2_contact_info_email', '' );
}

$email = $email ? antispambot( $email ) : '';
$hours = get_theme_mod( 'radcliffe_2_contact_info_hours', '' );

Expand Down

0 comments on commit 662c571

Please sign in to comment.