diff --git a/README.md b/README.md index 322651b..c822cfd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ Leaflet Map WordPress Plugin ======== -![Leaflet](https://img.shields.io/badge/leaflet-1.2.0-green.svg?style=flat) -![WordPress](https://img.shields.io/badge/wordpress-4.8.1-green.svg?style=flat) +![Leaflet](https://img.shields.io/badge/leaflet-1.3.1-green.svg?style=flat) +![WordPress](https://img.shields.io/badge/wordpress-4.9.4-green.svg?style=flat) ![Header Image](https://ps.w.org/leaflet-map/assets/banner-1544x500.png?rev=1693083) @@ -94,5 +94,4 @@ Contributing Wish List --------- -* A map editor/shortcode generator (so users can see what they're adding to the page) -* Make the plugin extendable (add hooks/filters/actions) \ No newline at end of file +* A map editor/shortcode generator (so users can see what they're adding to the page) \ No newline at end of file diff --git a/readme.txt b/readme.txt index 11efb18..a005635 100644 --- a/readme.txt +++ b/readme.txt @@ -6,7 +6,7 @@ Contributors: bozdoz, Remigr, nielsalstrup, jeromelebleu, gerital Donate link: https://www.paypal.me/bozdoz Tags: leaflet, map, mobile, javascript, openstreetmap, mapquest, interactive Requires at least: 3.0.1 -Tested up to: 4.9 +Tested up to: 4.9.4 Version: 2.11.0 Stable tag: 2.11.0 License: GPLv2 @@ -65,6 +65,10 @@ Shoot me a question [@bozdoz](https://www.twitter.com/bozdoz/). == Frequently Asked Questions == += Can I have an SVG Marker? = + +Yes! Convert the default marker into an svg with a shortcode like this: `[leaflet-marker svg="true" color="white" iconClass="fab fa-wordpress-simple" background="red"]` The `iconClass` is perfect for adding a [font-awesome](https://fontawesome.com/icons?d=gallery) icon. + = How do I change the style for lines/geojson? = Pass the style attributes to the respective shortcodes (see all options on [LeafletJS](http://leafletjs.com/reference-1.0.3.html#path)): @@ -120,6 +124,11 @@ Yes: use the keyword `attribution` in your shortcode (semi-colon separated list == Changelog == += 2.11.0 = +* Added Popup Anchor for custom markers +* Added SVG Markers +* Added actions and filters + = 2.10.1 = * Fix for plugin settings not being included (somehow) diff --git a/shortcodes/class.marker-shortcode.php b/shortcodes/class.marker-shortcode.php index 87cf0ef..2a4ab94 100644 --- a/shortcodes/class.marker-shortcode.php +++ b/shortcodes/class.marker-shortcode.php @@ -3,6 +3,11 @@ * Marker Shortcode * * Use with [leaflet-marker ...] + * + * PHP Version 5.5 + * + * @category Shortcode + * @author Benjamin J DeLong */ // Exit if accessed directly @@ -12,8 +17,21 @@ require_once LEAFLET_MAP__PLUGIN_DIR . 'shortcodes/class.shortcode.php'; -class Leaflet_Marker_Shortcode extends Leaflet_Shortcode { - protected function getHTML ($atts='', $content=null) { +/** + * Leaflet Marker Shortcode Class + */ +class Leaflet_Marker_Shortcode extends Leaflet_Shortcode +{ + /** + * Get Script for Shortcode + * + * @param string $atts could be an array + * @param string $content optional + * + * @return null + */ + protected function getHTML($atts='', $content=null) + { if (!empty($atts)) { extract($atts); }