Add activity events based on button clicks generated by [gamipress_button]
GamiPress – Button let’s you add activity triggers filtered by button clicks adding new activity events on GamiPress!
Note: This add-on is designed to award users for button clicks, if you want to award them for link clicks, then you should check the GamiPress – Link add-on.
New Events
Click any button: When a user clicks on any button.
Click a button with a specific ID: When a user clicks on any button with a specific identifier (button id attribute).
Click a button with a specific Class: When a user clicks on any button with a specific class (button class attribute).
Get a click on any button: When the post/comment author gets clicks on any button.
Get a click on a button with a specific ID: When the post/comment author gets clicks on any button with a specific identifier (button id attribute).
Get a click on a button with a specific Class: When the post/comment author gets clicks on any button with a specific class (button class attribute).
Important: The unique buttons that trigger this activities are the buttons generated by [gamipress_button] shortcode.
Installation
From WordPress backend
Navigate to Plugins -> Add new.
Click the button “Upload Plugin” next to “Add plugins” title.
Upload the downloaded zip file and activate it.
Direct upload
Upload the downloaded zip file into your wp-content/plugins/ folder.
Unzip the uploaded zip file.
Navigate to Plugins menu on your WordPress admin area.
Activate this plugin.
FAQ
Which attributes support [gamipress_button] shortcode?
[gamipress_button] shortcode supports:
label: The button label text.
type: The button type. Accepts ‘submit’, ‘button’ or ‘reset’
id: The button identifier.
class: The button CSS classes.
form: The button form attribute. If you don’t know exactly what is the purpose of this attribute leave it blank.
name: The button name attribute. If you don’t know exactly what is the purpose of this attribute leave it blank.
value: The button value attribute. If you don’t know exactly what is the purpose of this attribute leave it blank.
url: The URL to redirect the user after click the button.
If you set an id attribute, triggers limited by specific ID will be triggered too. Also, if you define more classes to the class attribute, triggers limited by specific class will be triggered too.
Changelog
1.0.9
Improvements
Improved check for redirection URL.
1.0.8
Bug Fixes
Added security to shortcode.
1.0.7
Improvements
Ensure redirection happens after ajax request is finished.
1.0.6
Improvements
Added check to redirection URL.
1.0.5
New Features
Added the “url” attribute to the [gamipress_button] shortcode.
Added the “URL” option to the Button block and widget.
Improvements
Removed the onclick attribute/option due security.
1.0.4
Improvements
Added the label attribute on the shortcode generated on the requirements UI.
1.0.3
Bug Fixes
Fixed type on the awards engine check.
1.0.2
Bug Fixes
Fixed undefined text on the shortcode preview.
1.0.1
New Features
Added a shortcode section on the requirements UI to better guide about the shortcode required.
Improvements
Performance improvements by limiting the number of requirements to check to only those who match with the event parameters.