Changeset 2451062
- Timestamp:
- 01/06/2021 07:49:08 AM (5 years ago)
- Location:
- osm-map-elementor/trunk
- Files:
-
- 1 added
- 5 edited
-
README.md (modified) (1 diff)
-
assets/marker_visibility_toggle.jpg (added)
-
constants.php (modified) (1 diff)
-
osm-map-elementor.php (modified) (1 diff)
-
osm-map.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
osm-map-elementor/trunk/README.md
r2424027 r2451062 23 23 24 24 <img src="https://raw.githubusercontent.com/flopperj/osm-map-elementor/master/assets/screenshot-5.jpg" width="500" height="auto" /> 25 26 ## Changelog 27 [LATEST CHANGES](https://github.com/flopperj/osm-map-elementor/wiki/Changelog) 28 25 29 ## Licence 26 30 [GNU GENERAL PUBLIC LICENSE](https://raw.githubusercontent.com/flopperj/osm-map-elementor/master/LICENSE.txt) -
osm-map-elementor/trunk/constants.php
r2377533 r2451062 1 1 <?php 2 2 define('OSM_MAP_SLUG', 'osm-map-elementor'); 3 define('OSM_MAP_VERSION', '1.0.5'); -
osm-map-elementor/trunk/osm-map-elementor.php
r2424027 r2451062 5 5 * Author: ACT Innovate, James Arama, Alex Hooten 6 6 * Author URI: https://github.com/flopperj/elementor-osm-map 7 * Version: 1.0. 47 * Version: 1.0.5 8 8 */ 9 9 -
osm-map-elementor/trunk/osm-map.php
r2424088 r2451062 24 24 25 25 public static $slug = OSM_MAP_SLUG; 26 public static $ver = OSM_MAP_VERSION; 26 27 27 28 /** … … 209 210 'input_type' => 'url', 210 211 'placeholder' => __('https://your-link.com', self::$slug), 212 ] 213 ); 214 215 $repeater->add_control( 216 'marker_visible', 217 [ 218 'label' => __('Show Marker', self::$slug), 219 'type' => \Elementor\Controls_Manager::SWITCHER, 220 'label_on' => __('Show', self::$slug), 221 'label_off' => __('Hide', self::$slug), 222 'return_value' => 'yes', 223 'default' => 'yes', 211 224 ] 212 225 ); … … 1292 1305 $coords = []; 1293 1306 foreach ($markers as $marker) { 1307 1308 // hide markers that have been toggled off 1309 if (isset($marker['marker_visible']) && empty($marker['marker_visible'])) { 1310 continue; 1311 } 1312 1294 1313 $loc = explode(',', $marker['marker_coords']); 1295 1314 if (!empty($loc) && sizeof($loc) == 2) { … … 1558 1577 { 1559 1578 // grab global settings 1560 $widget_settings = get_option('osm_widget' );1579 $widget_settings = get_option('osm_widget', []); 1561 1580 1562 1581 $styles = [ … … 1567 1586 1568 1587 // load fontawesome 1569 if (! array_key_exists('enable_fontawesome', $widget_settings) || !empty($widget_settings['enable_fontawesome'])) {1588 if (!empty($widget_settings) && !array_key_exists('enable_fontawesome', $widget_settings) || !empty($widget_settings['enable_fontawesome'])) { 1570 1589 $styles['font-awesome-free'] = plugins_url('/osm-map-elementor/assets/fontawesome-free-5.15.1/css/all.min.css'); 1571 1590 } … … 1576 1595 } 1577 1596 1597 // queue jquery 1598 add_action('wp_enqueue_scripts', function () { 1599 wp_enqueue_script('jquery'); 1600 }); 1601 1578 1602 // queue admin js 1579 1603 if (is_admin()) { 1580 1581 1604 1582 1605 // queue google maps key if provided … … 1586 1609 ]; 1587 1610 1588 $dependencies = [ ];1611 $dependencies = ['jquery']; 1589 1612 foreach ($admin_scripts as $handle => $path) { 1590 wp_register_script($handle, $path, $dependencies, '1.0', false);1613 wp_register_script($handle, $path, $dependencies, self::$ver, false); 1591 1614 wp_enqueue_script($handle); 1592 1615 $dependencies[] = $handle; … … 1644 1667 1645 1668 /** 1646 * Prints out data for debugging 1647 * @param $data 1669 * Prints out debug information about given variable. 1670 * 1671 * @param boolean $var Variable to show debug information for. 1672 * @param boolean $showHtml If set to true, the method prints the debug data in a screen-friendly way. 1673 * @param boolean $showFrom If set to true, the method prints from where the function was called. 1648 1674 */ 1649 p rivate function __debug($data)1675 public function __debug($var = false, $showHtml = false, $showFrom = true) 1650 1676 { 1651 echo "<pre>"; 1652 print_r($data); 1653 echo "</pre>"; 1677 if ($showFrom) { 1678 $calledFrom = debug_backtrace(); 1679 echo '<strong>' . substr($calledFrom[0]['file'], 1) . '</strong>'; 1680 echo ' (line <strong>' . $calledFrom[0]['line'] . '</strong>)'; 1681 } 1682 echo "\n<pre class=\"fi-debug\">\n"; 1683 1684 $var = print_r($var, true); 1685 if ($showHtml) { 1686 $var = str_replace('<', '<', str_replace('>', '>', $var)); 1687 } 1688 echo $var . "\n</pre>\n"; 1654 1689 } 1655 1690 } -
osm-map-elementor/trunk/readme.txt
r2424088 r2451062 1 1 === OSM Map Widget for Elementor === 2 2 Plugin Name: OSM Map Widget for Elementor 3 Version: 1.0. 43 Version: 1.0.5 4 4 Author: ACT Innovate, James Arama, Alex Hooten 5 5 Author URI: https://github.com/flopperj/osm-map-elementor 6 6 Tags: elementor, elementor widget, map widget, open street map, addons 7 7 Requires at least: 5.0 8 Tested up to: 5. 5.18 Tested up to: 5.6 9 9 Requires PHP: 5.6 10 10 Stable tag: 1.0.4
Note: See TracChangeset
for help on using the changeset viewer.