resolve some errors in php logic, like strlen with str containing space that is interpreted as array instead of string

This commit is contained in:
asus
2023-11-08 16:13:25 +01:00
parent 036473d58f
commit 3429d5dda3
41 changed files with 2653 additions and 8 deletions

View File

@@ -0,0 +1,27 @@
<?php
function is_event_post() {
if ( is_admin() )
return false;
if ( get_post_type() != "post" )
return 0;
if ( get_post_status() != "publish" )
return 0;
return true;
}
function mp_post_event_pages_setting() {
global $mp_zoom;
global $mp_zoom_set;
global $mp_coordinates_default;
if (is_event_post()) {
$mp_zoom = $mp_zoom_set[1];
$location = get_field("location");
$coordinates = $location->coordinates;
$mp_coordinates_default = $coordinates;
}
}
?>