• We think there is a bug with EM_Location::Output

    EM_Location::output() mixes it up between $location_string and $format, but finally outputs $location_string. The filter below is called on $format, and changes are never output.

    function filterLocationOutputCondition($replacement, $condition, $match, $EM_Location){
        if (is_object($EM_Location)) {
    
            switch ($condition) {
    
                // #_LATT{location_url}
                case 'has_Latt_location_url':
                    if (is_array($EM_Location->location_attributes) && !empty($EM_Location->location_attributes['location_url']))
                        $replacement = preg_replace('/\{\/?has_Latt_location_url\}/', '', $match);
                    else
                        $replacement = '';
                    break;
    
            }
         }
    
        return $replacement;
    }
    
    add_filter('em_location_output_condition', 'filterLocationOutputCondition', 10, 4);

    Forum topic here describes this
    http://wordpress.org/support/topic/plugin-events-manager-511-breaks-conditional-placeholders?replies=24

    User webaware has posted a fix for this in the above forum topic link.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter clivewalker

    (@clivewalker)

    I’ve amended the topic title because I’m using EM 5.1.3 not 5.1.1

    Well, not a “fix”, just a hack to show the problem.

    @544 /wp-content/plugins/events-manager/classes/em-location.php insert:
    $location_string = $format;

    It then “works” but obviously is subverting what the rest of the function is doing with $location_string vs $format.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Events Manager] 5.1.3 EM_Location::Output bug’ is closed to new replies.