Example #1
0
 function overrides_process($overrides, $atts)
 {
     if (isset($atts['hide_map_markers']) && in_array($atts['hide_map_markers'], agm_positive_values())) {
         $overrides['hide_map_markers'] = true;
     }
     return $overrides;
 }
Example #2
0
 function process_overrides($overrides, $args)
 {
     $_yes = agm_positive_values();
     if (isset($args['nearby_activities'])) {
         $overrides['nearby_activities'] = in_array($args['nearby_activities'], $_yes);
     }
     if (isset($args['activities_within'])) {
         $overrides['activities_within'] = (int) $args['activities_within'];
     }
     return $overrides;
 }
 function process_overrides($overrides, $args)
 {
     $_yes = agm_positive_values();
     $_no = agm_negative_values();
     if (isset($args['is_responsive']) && in_array($args['is_responsive'], $_yes)) {
         $overrides['is_responsive'] = true;
     } else {
         if (isset($args['is_responsive']) && in_array($args['is_responsive'], $_no)) {
             $overrides['is_responsive'] = false;
         } else {
             $opts = $this->_get_options();
             if (isset($opts['auto_assign-all']) && $opts['auto_assign-all']) {
                 $overrides['is_responsive'] = true;
                 if (isset($opts['auto_assign-respect_width']) && $opts['auto_assign-respect_width']) {
                     $overrides['responsive_respect_width'] = true;
                 }
             } else {
                 $overrides['is_responsive'] = false;
             }
         }
     }
     return $overrides;
 }