Skip to content

Commit

Permalink
fix: ACF 5.11.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
basscl committed Dec 17, 2021
1 parent 4dae748 commit f74eb85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions inc/acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function squarecandy_events_add_fields() {
}

$instructions = '';
if ( ! get_field( 'google_maps_api_key', 'option' ) ) {
if ( ! get_option( 'options_google_maps_api_key' ) ) {
$instructions = 'Looks like you don‘t have a Google Maps API key yet. First,
<a href="https://developers.google.com/maps/documentation/javascript/get-api-key"
target="_blank">get your API key here</a>. Then enter it on the
Expand All @@ -211,9 +211,9 @@ function squarecandy_events_add_fields() {
}

// only show map fields if an api key has been entered
if ( get_field( 'google_maps_api_key', 'option' ) ) :

$default_zoom = get_field( 'default_zoom_level', 'option' ) ? get_field( 'default_zoom_level', 'option' ) : 15;
if ( get_option( 'options_google_maps_api_key' ) ) :
$zoom_option = get_option( 'options_default_zoom_level' );
$default_zoom = $zoom_option ? $zoom_option : 15;

$eventfields['venue_location'] = array(
'key' => 'field_5616c0e68be8f',
Expand Down Expand Up @@ -285,7 +285,7 @@ function squarecandy_events_add_fields() {
'delay' => 0,
);

if ( get_field( 'enable_categories', 'option' ) ) :
if ( get_option( 'options_enable_categories' ) ) :

$eventfields['category'] = array(
'key' => 'field_5b9318c9d74e7',
Expand Down

0 comments on commit f74eb85

Please sign in to comment.