-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent issues with ACF time picker (#111)
* Prevent undefined index notice. Signed-off-by: Mark Chouinard <[email protected]> * Use post title for tokens $title undefined Signed-off-by: Mark Chouinard <[email protected]> * Only enqueue assets for tsml_meeting. Signed-off-by: Mark Chouinard <[email protected]> * Change tsml_assets hook so we can check post type Signed-off-by: Mark Chouinard <[email protected]> * Check $post_type is set. Signed-off-by: Mark Chouinard <[email protected]> * Quiet PHP notice with @ instead of not rendering when not set Signed-off-by: Mark Chouinard <[email protected]>
- Loading branch information
1 parent
1e4b647
commit a611e4d
Showing
4 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,12 @@ function tsml_alert($message, $type='success') { | |
//function: enqueue assets for public or admin page | ||
//used: in templates and on admin_edit.php | ||
function tsml_assets() { | ||
global $tsml_street_only, $tsml_programs, $tsml_strings, $tsml_program, $tsml_google_maps_key, $tsml_mapbox_key, $tsml_google_overrides, $tsml_distance_units, $tsml_defaults, $tsml_language, $tsml_columns, $tsml_nonce; | ||
global $post_type, $tsml_street_only, $tsml_programs, $tsml_strings, $tsml_program, $tsml_google_maps_key, $tsml_mapbox_key, $tsml_google_overrides, $tsml_distance_units, $tsml_defaults, $tsml_language, $tsml_columns, $tsml_nonce; | ||
|
||
// TODO: verify this doesn't cause any other issues | ||
if ( isset( $post_type ) && 'tsml_meeting' !== $post_type ) { | ||
This comment has been minimized.
Sorry, something went wrong.
wokat
Contributor
|
||
return; | ||
} | ||
//google maps api | ||
if ($tsml_google_maps_key) { | ||
wp_enqueue_script('google_maps_api', '//maps.googleapis.com/maps/api/js?key=' . $tsml_google_maps_key); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -543,7 +543,7 @@ function tsml_body_class($classes) | |
break; | ||
|
||
case 'distance': ?> | ||
<td class="distance" data-sort="<?php echo $meeting['distance'] ?>"><?php echo $meeting['distance'] ?></td> | ||
<td class="distance" data-sort="<?php echo @$meeting['distance'] ?>"><?php echo $meeting['distance'] ?></td> | ||
This comment has been minimized.
Sorry, something went wrong.
wokat
Contributor
|
||
<?php | ||
break; | ||
|
||
|
@machouinard @tech2serve This breaks styles on at least the location detail, I believe...