WordPress.org

Plugin Directory

Changeset 1657109


Ignore:
Timestamp:
05/14/17 16:02:46 (2 weeks ago)
Author:
netweblogic
Message:

5.7 update

Location:
events-manager/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • events-manager/trunk/admin/settings/tabs/formats.php

    r1656176 r1657109  
    446446                <?php em_options_input_text(__('Default map width','events-manager'), 'dbem_map_default_width', sprintf(__('Can be in form of pixels or a percentage such as %s or %s.', 'events-manager'), '<code>100%</code>', '<code>100px</code>')); ?> 
    447447                <?php em_options_input_text(__('Default map height','events-manager'), 'dbem_map_default_height', sprintf(__('Can be in form of pixels or a percentage such as %s or %s.', 'events-manager'), '<code>100%</code>', '<code>100px</code>')); ?> 
    448                 <?php em_options_textarea(__('Google Maps Style', 'events-manager'), 'dbem_google_maps_styles', sprintf(__('You can add styles to your maps to give them a unique look. Build one using the %s or choose from the many free templates on %s paste the generated JSON code here.', 'events-manager'), '<a href="https://snazzymaps.com/explore" target="_blank">'.__('Google Maps Styling Wizard', 'events-manager').'</a>', '<a href="https://snazzymaps.com/explore" target="_blank">Snazzy Maps</a>')); ?> 
     448                <?php em_options_textarea(__('Google Maps Style', 'events-manager'), 'dbem_google_maps_styles', sprintf(__('You can add styles to your maps to give them a unique look. Build one using the %s or choose from the many free templates on %s paste the generated JSON code here.', 'events-manager'), '<a href="https://mapstyle.withgoogle.com/" target="_blank">'.__('Google Maps Styling Wizard', 'events-manager').'</a>', '<a href="https://snazzymaps.com/explore" target="_blank">Snazzy Maps</a>')); ?> 
    449449            </tr> 
    450450            <tr class="em-header"><td colspan="2"> 
  • events-manager/trunk/classes/em-location.php

    r1651260 r1657109  
    782782                    $replace = $this->get_full_address($glue); 
    783783                    break; 
    784                 case '#_MAP': //Depricated (but will remain) 
     784                case '#_MAP': //Deprecated (but will remain) 
    785785                case '#_LOCATIONMAP': 
    786786                    ob_start(); 
  • events-manager/trunk/em-shortcode.php

    r1651260 r1657109  
    4040    //assign random number for element id reference 
    4141    $args['random_id'] = substr(md5(rand().rand()),0,5); 
     42    if( !empty($args['map_style']) ){ 
     43        $style= base64_decode($args['map_style']); 
     44        $style_json= json_decode($style); 
     45        if( is_array($style_json) || is_object($style_json) ){ 
     46            $style = preg_replace('/[\r\n\t\s]/', '', $style); 
     47        }else{ 
     48            $style = ''; 
     49        } 
     50        unset($args['map_style']); 
     51    } 
    4252    ob_start(); 
    43     em_locate_template('templates/map-global.php',true, array('args'=>$args));  
     53    em_locate_template('templates/map-global.php',true, array('args'=>$args, 'map_json_style' => $style));  
    4454    return ob_get_clean(); 
    4555} 
     
    6575    //assign random number for element id reference 
    6676    $args['random_id'] = substr(md5(rand().rand()),0,5); 
     77    if( !empty($args['map_style']) ){ 
     78        $style= base64_decode($args['map_style']); 
     79        $style_json= json_decode($style); 
     80        if( is_array($style_json) || is_object($style_json) ){ 
     81            $style = preg_replace('/[\r\n\t\s]/', '', $style); 
     82        }else{ 
     83            $style = ''; 
     84        } 
     85        unset($args['map_style']); 
     86    } 
    6787    ob_start(); 
    68     em_locate_template('templates/map-global.php',true, array('args'=>$args)); 
     88    em_locate_template('templates/map-global.php',true, array('args'=>$args, 'map_json_style' => $style)); 
    6989    return ob_get_clean(); 
    7090} 
  • events-manager/trunk/events-manager.php

    r1656176 r1657109  
    22/* 
    33Plugin Name: Events Manager 
    4 Version: 5.6.9 
     4Version: 5.7 
    55Plugin URI: http://wp-events-plugin.com 
    66Description: Event registration and booking management for WordPress. Recurring events, locations, google maps, rss, ical, booking registration and more! 
     
    2929 
    3030// Setting constants 
    31 define('EM_VERSION', 5.67); //self expanatory 
     31define('EM_VERSION', 5.7); //self expanatory 
    3232define('EM_PRO_MIN_VERSION', 2.392); //self expanatory 
    3333define('EM_PRO_MIN_VERSION_CRITICAL', 2.377); //self expanatory 
  • events-manager/trunk/includes/js/events-manager.js

    r1656176 r1657109  
    880880            //define default options and allow option for extension via event triggers 
    881881              var map_options = { mapTypeId: google.maps.MapTypeId.ROADMAP }; 
    882               if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; } 
     882              if( typeof EM.google_map_id_styles == 'object' && typeof EM.google_map_id_styles[map_id] !== 'undefined' ){ console.log(EM.google_map_id_styles[map_id]); map_options.styles = EM.google_map_id_styles[map_id]; } 
     883              else if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; } 
    883884              jQuery(document).triggerHandler('em_maps_locations_map_options', map_options); 
    884885              var marker_options = {}; 
     
    933934        scrollwheel: is_touch 
    934935    }; 
    935     if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; }  
     936    if( typeof EM.google_map_id_styles == 'object' && typeof EM.google_map_id_styles[map_id] !== 'undefined' ){ console.log(EM.google_map_id_styles[map_id]); map_options.styles = EM.google_map_id_styles[map_id]; } 
     937    else if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; } 
    936938    jQuery(document).triggerHandler('em_maps_location_map_options', map_options); 
    937939    maps[map_id] = new google.maps.Map( document.getElementById('em-location-map-'+map_id), map_options); 
     
    10631065            var em_LatLng = new google.maps.LatLng(0, 0); 
    10641066            var is_touch = 'ontouchstart' in window || navigator.maxTouchPoints; 
    1065             map = new google.maps.Map( document.getElementById('em-map'), { 
    1066                 zoom: 14, 
    1067                 center: em_LatLng, 
    1068                 mapTypeId: google.maps.MapTypeId.ROADMAP, 
    1069                 mapTypeControl: false, 
    1070                 scrollwheel: is_touch 
    1071             }); 
     1067            var map_options = { 
     1068                    zoom: 14, 
     1069                    center: em_LatLng, 
     1070                    mapTypeId: google.maps.MapTypeId.ROADMAP, 
     1071                    mapTypeControl: false, 
     1072                    scrollwheel: is_touch 
     1073            }; 
     1074            if( typeof EM.google_maps_styles !== 'undefined' ){ map_options.styles = EM.google_maps_styles; } 
     1075            map = new google.maps.Map( document.getElementById('em-map'), map_options); 
    10721076            if( !is_touch ){ 
    10731077                map.addListener('click', function(){ map.setOptions({ scrollwheel:true }); }); 
  • events-manager/trunk/readme.txt

    r1656176 r1657109  
    66Requires at least: 3.5 
    77Tested up to: 4.7 
    8 Stable tag: 5.6.6.1 
     8Stable tag: 5.7 
    99 
    1010Fully featured event registration management including recurring events, locations management, calendar, Google map integration, booking management 
     
    100100 
    101101== Changelog == 
    102 = 5.6.9 (dev) = 
     102= 5.7 = 
    103103* added em_events_admin_args filter allowing modification of event search arguments 
    104104* removed jQuery UI localize files for the datepicker in favor of WP 4.6 native localization 
  • events-manager/trunk/templates/templates/map-global.php

    r1311743 r1657109  
    1313        <div class='em-locations-map' id='em-locations-map-<?php echo $args['random_id']; ?>' style="width:100%; height:100%"><em><?php _e('Loading Map....', 'events-manager'); ?></em></div> 
    1414        <div class='em-locations-map-coords' id='em-locations-map-coords-<?php echo $args['random_id']; ?>' style="display:none; visibility:hidden;"><?php echo EM_Object::json_encode($args); ?></div> 
     15        <?php if( !empty($map_json_style) ): ?> 
     16        <script type="text/javascript"> 
     17            if( typeof EM == 'object'){ 
     18                if( typeof EM.google_map_id_styles != 'object' ) EM.google_map_id_styles = []; 
     19                EM.google_map_id_styles['<?php echo $args['random_id']; ?>'] = <?php echo $map_json_style; ?>; 
     20            } 
     21        </script> 
     22        <?php endif; ?> 
    1523    </div> 
    1624    <?php 
Note: See TracChangeset for help on using the changeset viewer.