|
10 months ago | |
---|---|---|
images | 2 years ago | |
src | 10 months ago | |
.eslintrc.js | 2 years ago | |
.gitignore | 2 years ago | |
gulpfile.js | 10 months ago | |
package-lock.json | 1 year ago | |
package.json | 1 year ago | |
readme.md | 1 year ago |
readme.md
EMTP (Event Manager Pro Tweaks)
This is the repository for a Wordpress Plugin that's meant to handle various style and functionality tweaks to Event Manager Pro, custom made for Sue Genest.
Contents
Features
Agreement Popups Shortcode
You may now add required reading in the EMP forms with the use of a [agreement]HTML Content[/agreement]
shortcode.
Shortcode Attributes
id
- required: Choose a unique id for the agreement view. This must be matched with a checkbox with an id of[id]__checkbox
accept-text
- The text in the accept button, default is "I Accept"view-text
- optional: Choose the text for a view agreement button. If this is omitted, no view text button will generate and only the checkbox will be used to view the agreement.
To set this up you must choose an id for a shortcode that would then match the id of the checkbox. Example: [agreement id="prereq"]
must be paired with a checkbox with an id of prereq__agreement
.
You may use as many agreement forms as you like, provided they all have unique ids and matching checkboxes.
If anything is misspelled or missing, the script will not fire/work.
Categorized List Shortcode
You may use the [empt_categorized_list /]
shortcode to generate a list of events by category on any page or post you'd like.
Note: This shortcode uses Shortcodes Ultimate in order to pull off the Accordion Effect.
Shortcode Attributes
expand-text
: Changes the title of the accordion prompt. Default is "Expand Events".filter-slugs
: Fill this with a list of comma separated category slugs. This will filter the output to specific categories in order from first to last in the comma-separated list. EG:[empt_categorized_list filter-slugs="good-stories, baking"]
Restyles
- Better events list layout
- Better single event layout
- Prettier form styles
- Better selection box styles
- Better button styles
- Better margins and padding
- Use accordion effects for events
Markup Changes
In order for the styles to look correct, the markup for the event templates need to change
Events
<!-- Events Head -->
<div class="events-list">
<div class="event">
<div class="event-time">
<p class="top-title">Date/Time</p>
</div>
<div class="event-description">
<p class="top-title">Event</p>
</div>
</div>
<!-- For Each Event -->
<div class="event">
<div class="event-time">
<ul>
<li>
#_EVENTDATES
</li>
<li>
#_EVENTTIMES
</li>
</ul>
</div>
<div class="event-description">
<ul>
<li>
#_EVENTLINK
</li>
{has_location}
<li>
#_LOCATIONNAME
</li>
<li>
#_LOCATIONTOWN, #_LOCATIONSTATE
</li>
{/has_location}
</ul>
</div>
</div>
<!-- Events Bottom -->
</div>
How to use
This workflow requires NodeJS 10 or better and npm.
git clone
this repository- Go into the working directory
cd empt-tweaks
- Run
npm install
- Fire up the workflow by simply running
gulp
.
Everything will be compiled, concatenated and moved to a build folder and a file watcher will start up so you may continue developing. You can deploy the contents directly into a plugin folder in your WordPress installation. Alternatively, you may run gulp build
to build the project into a zip archive that you may easily install via the WordPress dashboard.