Skip to content

Commit f51a877

Browse files
author
bozdoz
committed
added comments to main file; cleanup readme; updated to leaflet 1.1.0; bump version 2.7.8; added community guidelines
1 parent 5e1b58a commit f51a877

File tree

5 files changed

+419
-158
lines changed

5 files changed

+419
-158
lines changed

CODE_OF_CONDUCT.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Leaflet Map WordPress Plugin Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [@bozdoz](https://www.twitter.com/bozdoz/). All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
## Attribution
65+
66+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
67+
available at [http://contributor-covenant.org/version/1/4][version]
68+
69+
[homepage]: http://contributor-covenant.org
70+
[version]: http://contributor-covenant.org/version/1/4/

README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Leaflet Map WordPress Plugin
22
========
33

4-
![Leaflet](http://img.shields.io/badge/leaflet-1.0.3-green.svg?style=flat)
5-
![WordPress](http://img.shields.io/badge/wordpress-4.8-green.svg?style=flat)
4+
![Leaflet](https://img.shields.io/badge/leaflet-1.1.0-green.svg?style=flat)
5+
![WordPress](https://img.shields.io/badge/wordpress-4.8-green.svg?style=flat)
66

7-
Add a map generated with <a href="http://www.leafletjs.com/" target="_blank">Leaflet JS</a>: a mobile friendly map application. Map tiles are provided by default through OpenStreetMap, or MapQuest (built-in support(?!) with an app key). Can be set per map with shortcode attributes or through the dashboard settings.
7+
Add a map generated with [LeafletJS](http://leafletjs.com/): an open-source JavaScript library for mobile-friendly interactive maps. Map tiles are provided by default through [OpenStreetMap](http://www.openstreetmap.org/), or [MapQuest](https://www.mapquest.ca/) (with an app key). Can be set per map with shortcode attributes or through the dashboard settings.
88

9-
![Admin Screenshot](http://imgur.com/W4BGTif.jpg)
9+
![Admin Screenshot](https://imgur.com/W4BGTif.jpg)
1010

1111
Installation
1212
------------
@@ -21,7 +21,7 @@ Available Shortcodes
2121

2222
### [leaflet-map]
2323

24-
![Alternate map tiles](http://imgur.com/oURcNiX.jpg)
24+
![Alternate map tiles](https://imgur.com/oURcNiX.jpg)
2525

2626
Height, width, latitude, longitude and zoom are the basic attributes:
2727

@@ -35,10 +35,16 @@ However, you can also just give it an address, and Google will look it up for yo
3535
[leaflet-map address="Oslo, Norway"]
3636
```
3737

38-
The default URL requires attribution by its terms of use. If you want to change the URL, you may remove the attribution. Also, you can set this per map in the shortcode (1 for enabled and 0 for disabled):
38+
The default URL requires attribution by its terms of use. If you want to change the URL, you may define a new attribution, or remove the attribution. You can define this site-wide in the admin, or you can set this per map in the shortcode (0 for disabled):
3939

4040
```
41-
[leaflet-map show_attr="1"]
41+
[leaflet-map attribution=0]
42+
```
43+
44+
OR
45+
46+
```
47+
[leaflet-map attribution="Copyright @bozdoz"]
4248
```
4349

4450
The zoom buttons can be large and annoying. Enable or disable per map in shortcode:
@@ -51,20 +57,20 @@ Alternatively, you could use a plain image for visitors to zoom and pan around w
5157

5258
### [leaflet-marker]
5359

54-
![Markers with HTML within a popup](http://imgur.com/ap38lwe.jpg)
60+
![Markers with HTML within a popup](https://imgur.com/ap38lwe.jpg)
5561

5662
Add a marker to any map by adding `[leaflet-marker]` after any `[leaflet-map]` shortcode. You can adjust the lat/lng in the same way, as well as some other basic functionality (popup message, draggable, visible on load). Also, if you want to add a link to a marker popup, use `[leaflet-marker]Message here: click here[/leaflet-marker]` and add a link like you normally would with the WordPress editor.
5763

5864

5965
### [leaflet-line]
6066

61-
![Fitted Colored Line](http://imgur.com/dixNDtF.jpg)
67+
![Fitted Colored Line](https://imgur.com/dixNDtF.jpg)
6268

6369
Add a line to the map by adding `[leaflet-line]`. You can specify the postions with a list separated by semi-colon `;` or bar `|` using lat/lng: `[leaflet-line latlngs="41, 29; 44, 18"]` or addresses: `[leaflet-line addresses="Istanbul; Sarajevo"]`, or x/y coordinates for image maps.
6470

6571
### [leaflet-geojson]
6672

67-
[![Random GeoJSON created by me](http://imgur.com/fJktgtI.jpg)](https://gist.github.com/bozdoz/064a7101b95a324e8852fe9381ab9a18)
73+
[![Random GeoJSON created by me](https://imgur.com/fJktgtI.jpg)](https://gist.github.com/bozdoz/064a7101b95a324e8852fe9381ab9a18)
6874

6975
Or you can add a geojson shape via a url:
7076

@@ -78,14 +84,14 @@ Check it out [here](https://gist.github.com/bozdoz/064a7101b95a324e8852fe9381ab9
7884

7985
Same idea as geojson (above), but takes KML files and loads [Mapbox's togeojson library](https://github.com/mapbox/togeojson)
8086

81-
Pull Requests
87+
Contributing
8288
-------------
8389

84-
I believe the purpose of this plugin is to provide **simple** creation of maps on their WordPress sites, using a **basic** Leaflet JS setup. I **will not accept** pull requests that incorporate any other [Leaflet plugin](http://leafletjs.com/plugins.html) into this one, or any copies of them, or any links to them (unless they are completely simplistic and globally usable). Obviously I don't want to load dependencies for every user of this plugin that only a handful of users want.
85-
86-
Also, please keep your pull requests limited to one feature/improvement each, as a courtesy to me who has to look through it trying to figure out what does what (and if it works at all). Any number of bug fixes is completely acceptable. :)
90+
[View Contribution guidelines](https://github.com/bozdoz/wp-plugin-leaflet-map/blob/master/CONTRIBUTING.md)
8791

8892
Wish List
8993
---------
9094

9195
* A map editor/shortcode generator (so users can see what they're adding to the page)
96+
* Make the plugin extendable (add hooks/filters/actions)
97+
* Separate plugin into separate dependency-oriented classes

0 commit comments

Comments
 (0)