Plugin Directory


Ignore:
Timestamp:
11/10/2025 06:44:33 AM (5 months ago)
Author:
DylanAuty
Message:
  • Added Leaflet engine support
  • Added Azure engine, powered by Leaflet
  • Added Stadia engine, powered by Leaflet
  • Added Maptiler engine, powered by Leaflet
  • Added LocationIQ engine, powered by Leaflet
  • Added support for OpenLayers V10
  • Added ability to use legacy (V6) OpenLayers, should be considered deprecated. Will be removed in the future
  • Added ability to change address providers, for autocomplete and client side geocoding
  • Added additional address providers including Google Maps, Azure Maps, Nominatim, LocationIQ and engine default
  • Added ability to provide a supplementary address provider API key if needed
  • Added ability to switch tile servers, with another from the same provider, on a per map basis
  • Added additional tile server options, with providers and automated groupings
  • Added ability to set line thickness on both rectangles and circles
  • Added tile server previews for improved customization
  • Added support for dynamic content translations with WPML
  • Added Atlas Novus as the default internal build
  • Added danger zone tool to reindex any spatial coordinate data for markers, where a spatial coordinate has gone missing
  • Added ability to adjust rectangle boundaries with boundary input
  • Added ability to bulk delete shapes
  • Added ability to center on shapes and datasets within the editor
  • Added dropdown context meny to shape datatables
  • Added option to cachebust REST API requests
  • Added improved GDPR styling, it becomes the new default
  • Added quick delete button to info-window within the map editor
  • Added ability to override any HTML template part via a child theme override
  • Added map preview system, allowing maps to be previewed on frontpage
  • Added default indexes to all tables to improve performance
  • Added spatial indexes to tables where applicable to improve performance
  • Added fullscreen map editor panel mode, for dataset listings, allowing more data to be viewed
  • Added extended maximum zoom level (22) which is supported by all map engines
  • Added mobile settings tab to editor
  • Added ability to set a different map width/height for mobile devices
  • Added new default engine/installer preset for zero cost mapping, for all new installations
  • Added ability to reduce marker editor geocoder usage. Skips geocoding if lat/lng coordinates are present, opt in available in settings
  • Added ability to select store locator button style (Icons (default), or Text) on a per map basis
  • Added accessibility support, with the goal of being WCAG Level AA compliant
  • - Aria labels and roles added where needed
  • - Improved focus cues and managing of indexing
  • - Keyboard navigation added (tab, enter, space, and escape for panels)
  • - Hierarchy restructuring where needed to better support navigation
  • - Tested with various tools:
  • - - Microsoft Accessibility Insights: Pass (FastPass)
  • - - Axe DevTools: Pass (WCAG Level AA)
  • - - Google Lighthouse: Pass (100% Accessible)
  • - - Wave Tools: Pass
  • - Manual testing completed for navigation with a keyboard
  • - We will continue to improve this over time
  • - Known Issues
  • - - Only supported on the frontend
  • - - Does not allow marker selection via the map container (Marker listings supported, and encouraged for accessibility focused installations)
  • - - Although a substantial rework has been implemented, this has not been verified by 3rd party compliance testers at this stage
  • - - - We know that accessibility is more nuanced than simple machine driven tests, we'd like to work with our community to ensure we improve this further
  • - - - Please reach out to us if you find anything that you feel should be improved as a priority!
  • Improved internal autocomplete modules for better user experience and management
  • Improved theme preset user interface
  • Improved theme CSS editor
  • Improved tile server system to handle params and authentication more efficiently
  • Improved tile server system to properly attribute various service providers
  • Improved settings user interface, adding sections and descriptors for better clarity
  • Improved Google Maps Advanced Marker render mode support
  • Improved Google Async support
  • Improved zoom sliders within editor
  • Improved map initialization state control
  • Improved map initialization error correction
  • Improved map initialization automatic delayed retry module
  • Improved info-window open calls to include data-props in container for styling
  • Improved styling system to allow native info-windows to inherit brand styling
  • Improved open layers native info-window, now includes border radius and shadows
  • Improved checkbox styling within the map viewport
  • Improved available WP filters within our AjaxTable class, allowing count values to be filtered
  • Improved internal shape architecture
  • Improved batch loader logic and modularized method
  • Improved welcome page to include new features
  • Improved all option management by disabling autoloading, reducing impact on server resources
  • Improved Legacy to Atlas Novus migration flow by introducing automatic map settings migration modules
  • Improved DomDocument param handlers where needed
  • Fixed issue where marker labels would not render & symbols correctly
  • Fixed issue where major version mismatch would cause UI error to be thrown in REST API requests
  • Fixed issue where shape datatables within the editor couldn't be searched fully
  • Fixed issue where touch events would not dispatch on OpenLayers shapes
  • Fixed issue with error suppression in DomDocument class, added LIBXML_NOERROR when
  • Fixed issue where some overlays would overlap info-windows in Open Layers (Example clusters)
  • Fixed issue with clustering translations in DE language files
  • Fixed issue where engine switch notice would show even if the user has already switched to Atlas Novus (manually)
  • Moved build selection Danger Zone
  • Moved optimization options out of beta
  • Moved map mobile zoom level control to mobile panel section
  • Removed Stamen Design tile servers, as they have moved to Stadia
  • Removed OpenPtMap tile server due to missing SSL
  • Removed duplicate map fetch methods, which were unused
  • Archived V9 changelogs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-google-maps/trunk/includes/class.plugin.php

    r3169779 r3392708  
    99wpgmza_require_once(WPGMZA_PLUGIN_DIR_PATH . 'includes/class.gdpr-compliance.php');
    1010wpgmza_require_once(WPGMZA_PLUGIN_DIR_PATH . 'includes/3rd-party-integration/class.wp-migrate-db-integration.php');
     11
     12wpgmza_require_once(WPGMZA_PLUGIN_DIR_PATH . 'includes/class.dynamic-translations.php');
     13
    1114wpgmza_require_once(WPGMZA_PLUGIN_DIR_PATH . 'includes/open-layers/class.nominatim-geocode-cache.php');
    1215wpgmza_require_once(WPGMZA_PLUGIN_DIR_PATH . 'includes/class.maps-engine-dialog.php');
     
    4447    const PAGE_ADVANCED         = "advanced";
    4548    const PAGE_CUSTOM_FIELDS    = "custom-fields";
     49    const PAGE_INSIGHTS         = "insights";
    4650   
    4751    const MARKER_PULL_DATABASE  = "0";
     
    6367    private $_pro7Compatiblity;
    6468    private $_pro9Compatibility;
     69    private $_pro10Compatibility;
    6570    private $_dynamicTranslations;
    6671    private $_spatialFunctionPrefix = '';
     
    7075   
    7176    protected $_internalEngine;
     77    protected $_previewMode;
    7278    protected $_scriptLoader;
    7379
     
    110116       
    111117        // Dynamic translation file
    112         $this->_dynamicTranslations = new DynamicTranslations();
     118        $this->_dynamicTranslations = DynamicTranslations::createInstance();
    113119       
    114120        // Legacy settings
     
    122128        $this->_pro7Compatiblity = new Pro7Compatibility();
    123129        $this->_pro9Compatibility = new Pro9Compatibility();
     130        $this->_pro10Compatibility = new Pro10Compatibility($this->_settings);
    124131
    125132        $this->_restAPI = RestAPI::createInstance();
     
    131138
    132139        $this->_internalEngine = new InternalEngine($this->settings->internal_engine);
     140        $this->_previewMode = new PreviewMode();
    133141        $this->_shortcodes = Shortcodes::createInstance($this->_internalEngine);
    134142       
     
    147155        // Include nominatim for it's legacy AJAX hooks
    148156        // TODO: Use a RESTful approach here instead
    149         if($this->settings->engine == 'open-layers')
     157        if($this->settings->engine == 'open-layers' || $this->settings->engine === 'open-layers-latest'
     158            || $this->settings->engine === 'leaflet' || $this->settings->engine === 'leaflet-zerocost'
     159            || $this->settings->engine === 'leaflet-azure' || $this->settings->engine === 'leaflet-maptiler'
     160            || $this->settings->engine === 'leaflet-stadia' || $this->settings->engine === 'leaflet-locationiq'){
    150161            require_once(plugin_dir_path(__FILE__) . 'open-layers/class.nominatim-geocode-cache.php');
     162        }
    151163
    152164       
     
    188200                    add_action('admin_init', function(){
    189201                        /* In admin area, has not seen welcome page, and not doing ajax right now */
    190                         update_option('wpgmza_welcome_screen_done', true);
     202                        update_option('wpgmza_welcome_screen_done', true, false);
    191203                        wp_redirect(admin_url('admin.php?page=wp-google-maps-menu&action=welcome_page'));
    192204                        exit;
     
    239251            case 'scriptLoader':
    240252            case 'internalEngine':
     253            case 'previewMode':
    241254            case 'adminNotices':
    242255                return $this->{'_' . $name};
     
    296309            /* Plugin is being activated in the background, we can't redirect in this case */
    297310            /* We will pick this up when they refresh the page */
    298             update_option('wpgmza_welcome_screen_done', true);
     311            update_option('wpgmza_welcome_screen_done', true, false);
    299312            wp_redirect(admin_url('admin.php?page=wp-google-maps-menu&action=welcome_page'));
    300313            exit;
     
    335348        $this->database->onFirstRun();
    336349       
    337         update_option('wpgmza-first-run', date(\DateTime::ISO8601));
     350        update_option('wpgmza-first-run', date(\DateTime::ISO8601), false);
    338351
    339352        /* Developer Hook (Action) - Add to first run plugin logic */     
     
    411424        $resturl = preg_replace('#^http(s?):#', '', $resturl);
    412425       
     426        $tileServer = TileServers::getBySettings($settings);
     427
     428        $settings = apply_filters('wpgmza_plugin_get_localized_data_settings', $settings);
     429
    413430        /* Developer Hook (Filter) - Add or alter localization variables */
    414431        $result = apply_filters('wpgmza_plugin_get_localized_data', array(
     
    434451            'stylingSettings'       => $stylingSettings,
    435452            'currentPage'           => $this->getCurrentPage(),
     453            'tileServer'            => $tileServer,
    436454           
    437455            'userCanAdministrator'  => (current_user_can('administrator') ? 1 : 0),
     
    535553            case 'wp-google-maps-menu-custom-fields':
    536554                return Plugin::PAGE_CUSTOM_FIELDS;
     555                break;
     556
     557            case 'wp-google-maps-menu-insights':
     558                return Plugin::PAGE_INSIGHTS;
    537559                break;
    538560        }
     
    625647        $simulateFirstRun = false;
    626648       
     649        $byMapTables = array();
     650        $byMapTarget = false;
    627651
    628652        switch($type){
     
    713737                $truncateTables[] = $WPGMZA_TABLE_NAME_POINT_LABELS;
    714738                $truncateTables[] = $WPGMZA_TABLE_NAME_IMAGE_OVERLAYS;
     739                break;
     740            case 'destroy_by_map':
     741                /* By map does not truncate, but it target delets */
     742                if(!empty($_POST['data_type']) && !empty($_POST['map_id'])){
     743                    $dataType = trim(strip_tags($_POST['data_type']));
     744                    $byMapTarget = !empty(intval($_POST['map_id'])) ? intval($_POST['map_id']) : false;
     745                    if(!empty($dataType)){
     746                        if($dataType === 'markers'){
     747                            /* All markers */
     748                            $byMapTables[] = $WPGMZA_TABLE_NAME_MARKERS;
     749                        } else if($dataType === 'shapes'){
     750                            /* All shape related tables */
     751                            $byMapTables[] = $WPGMZA_TABLE_NAME_POLYGONS;
     752                            $byMapTables[] = $WPGMZA_TABLE_NAME_POLYLINES;
     753                            $byMapTables[] = $WPGMZA_TABLE_NAME_CIRCLES;
     754                            $byMapTables[] = $WPGMZA_TABLE_NAME_RECTANGLES;
     755
     756                            $byMapTables[] = $WPGMZA_TABLE_NAME_HEATMAPS;
     757                            $byMapTables[] = $WPGMZA_TABLE_NAME_POINT_LABELS;
     758                            $byMapTables[] = $WPGMZA_TABLE_NAME_IMAGE_OVERLAYS;
     759                        }
     760                    }
     761                }
    715762                break;
    716763            default:
     
    748795                    $wpdb->query("TRUNCATE TABLE `{$table}`");
    749796                }
     797            }
     798        }
     799
     800        if(!empty($byMapTables) && !empty($byMapTarget)){
     801            /* Specific targeted maps - Usually only available with Pro as it supports multiple maps */
     802            foreach($byMapTables as $targetTable){
     803                $wpdb->query($wpdb->prepare("DELETE FROM `{$targetTable}` WHERE map_id = %d", array($byMapTarget)));
    750804            }
    751805        }
     
    9851039   
    9861040        $data = implode("", array_reverse($data));
    987         update_option("wpgmza_temp_api", $data);
     1041        update_option("wpgmza_temp_api", $data, false);
    9881042    }
    9891043
Note: See TracChangeset for help on using the changeset viewer.