e.nigma buttons is a WordPress plugin that easily allows you to add buttons to your posts, pages etc.
e.nigma buttons adds the shortcode [button]
to your installation. The following options can be used to adjust the button for your needs:
label
: The label of your buttonicon
: The icon of your buttonlink
: The link of your buttoncolor
: The color of buttonborder
: yes (default) or nosize
: small, medium (default) or largeclass
: Additional CSS classes that will be added to your buttons icon
The following colors are avaible:
- green
- orange
- purple
- cyan
- white
- red
- black
e.nigma buttons uses Font Awesome as icon resource. An overview over all available icons can be found on their website.
Most of the shortcodes attributes are self explaining. However, it must be noted that the icon
attribute can be filled by using modififed Font Awesome shortcodes.
For instance: If you want to use the GitHub icon you would search for that icon in the list of all icons. What you will find is the corresponding CSS class. For e.nigma buttons the name of the icon (which is obtained if stripping the "fa-" in the beginning of the CSS class) is used. For GitHub the CSS class would be fa-github
. Thus, github
is your value for the icon
attribute.
[button label="My GitHub account" icon="github" color="orange" link="https://github.com/chemiker"]
Brings you an linked, medium-sized, orange button that has a GitHub icon and the label "My GitHub account".
[button icon="github" color="orange" link="https://github.com/chemiker" size="large"]
Brings you an orange, large-sized, linked GitHub icon.
See the FAQ in the repository Wiki.
This project is released under the MIT license.
The plugin uses Font Awesome icons which is a project by Dave Gandy. Font Awesome fonts (Copyright by Dave Gandy) are released under SIL OFL 1.1. Font Awesome CSS files (shipped as part of this plugin's CSS file) by Dave Gandy are released under MIT license.
This repository ships with tests. The tests are based on "sample-plugin". The following files are part of the package which is released under GPLv2 (Copyright by Daniel Bachhuber) and have been modified:
- test/*
- bin/*
- .travis.yml
- phpcs.xml.dist
- phpunit.xml.dist
As the plugin this is real free software you are very welcome to fork this project and do whatever you want with it :)
- yarn
- Download the zip archive or clone the repository to your WordPress plugin directory
- run
yarn install
- run
yarn run gulp dev
to continuously watch the (CSS/PHP) files and compile them if necessary
For distribution you can run yarn run gulp make
. This will create a dist/
folder ready for submission to the WordPress.org repository.