Provides shortcodes that support the use of the Athena Framework.
Head over to the Athena Shortcodes Plugin wiki for more detailed information about this plugin, including available shortcodes.
- Upload the plugin files (unzipped) to the
/wp-content/plugins
directory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the "Plugins" screen in WordPress
$ wp plugin install --activate https://github.com/UCF/Athena-Shortcodes-Plugin/archive/master.zip
. See WP-CLI Docs for more command options.
Bug Fix:
- Removed debugging message
Bug Fix:
- Added a setting that allows for ACF WYSIWYG content to be run through the default ACF the_content filter instead of rerouting to the built-in WordPress the_content filter.
Bug Fix:
- Bumped version so readme and plugin file versions match.
Enhancements:
- Added composer file.
Bug Fixes:
- Adds options for the collapse and collapse-toggle shortcodes to allow for proper role attributes to be applied.
Bug fixes:
- Unset absolute positioning on
.stretched-link
pseudo-element in WYSIWYG editor stylesheet to allow usage of this class on links contained within shortcode-generated containing blocks.
Bug fixes:
- Fixed bug with TinyMCE stylesheet cache busting
Enhancements:
- Upgraded packages, including the Athena Framework, to latest versions
- Updated usage of slash division in athena-editor-styles.scss
Enhancements:
- Updated role attribute on [nav-item]s to
role="presentation"
when the surrounding nav represents a dynamic tabbed interface - Added
aria-label
to [nav] shortcode output when semantic<nav>
element is in use - Upgraded packages
Bug Fixes:
-
Removed custom logic that inserted Athena float/alignment classes on
<img>
tags inserted via the Media Library in favor of using vanilla WordPress alignment classes (alignleft
,aligncenter
,alignright
,alignnone
). This update ensures that alignment changes made after the image is inserted in the post content are consistent with what's displayed on the site frontend, and fixes buggy behavior when using image/text alignment buttons in TinyMCE.In order to support this change, this update also adds custom styles to TinyMCE's stylesheet and inline styles on the frontend to ensure vanilla WP alignment classes take precedence over Athena alignment classes when both are present on an element.
We recommend testing this update in a QA environment before upgrading in production to ensure alignment of existing images still works as expected. You may need to force-update alignment of some images after upgrading to this version.
Enhancements:
- Added style formats for font-size, line-height utils added in Athena Framework v1.1.0
- Upgraded packages, including Athena Framework, to latest versions
Bug Fixes:
- Updated logic for the
[nav]
and[nav-link]
shortcodes to applyaria-orientation
andaria-selected
attributes as needed, respectively
Enhancements:
- Added plugin option that turns off the plugin's ability to strip
width
/height
attributes from<img>
elems (enabled by default for backward compatibility) - Added absolute file includes in main plugin file
- Upgraded packages
Bug Fixes:
- Fixed issue with default plugin options not applying correctly
- Added fix for images within
<figure>
elems in IE11 - Fixed notices with PHP 7.4+
Documentation:
- Updated the contributing doc to reflect the switch from slack to teams.
Enhancements:
- Upgraded packages, including Athena Framework, to latest versions
Enhancements:
- Added the ability to let TinyMCE automatically add opt-in content classes (
.table
on<table>
s,.blockquote
on<blockquote>
s. By default this is enabled, but it can be disabled via plugin settings in case of third-party component conflicts. - Updated the "Formats" dropdown in the WYSIWYG editor to exclude
.table
and.blockquote
classes when automatic opt-in class insertion is enabled. - Added a new
labelledby
shortcode attribute for[tab-pane]
. - Upgraded packages
Bug fixes:
- Fixed non-functional
option_{$option->option_name}
filters. Plugin options are now properly formatted when returned viaget_option()
. - Replaced
break
withcontinue
inATHENA_SC_TinyMCE_Config::get_format_options()
to allow null format options to be passed in without breaking all other format options.
Enhancements:
- Add Github URI
Enhancements:
- Removed usage of
create_function()
in the plugin to support newer versions of PHP. - Added a minimum PHP requirement for the plugin.
Enhancements:
-
Adds a new settings page for the plugin, which allows users to adjust the plugin's TinyMCE + image formatting option, as well as a new option for enabling responsive wrappers around oEmbeds and videos.
Responsive embeds are disabled by default to avoid conflicts with sites that already have
.embed-responsive
wrapper divs added around their embeds manually. Site administrators should enable this setting on new sites, or audit and update any existing posts/pages to ensure embeds won't be double-wrapped after enabling this setting.
Enhancements:
- Added cache-busting for the WYSIWYG editor stylesheet
- Upgraded packages
Enhancements:
- Upgraded packages, linter configs, and gulpfile; added Github issue/PR templates and CONTRIBUTING file to the repo
Bug fixes:
- Removed alignment classes from
.figure-img
images (images with captions, within<figure>
s); fixes various vertical spacing and float clearing issues when left- or right-alignment is set on the<figure>
. - Fixed incorrect class name
font-weight-italic
in WYSIWYG Formats dropdown > Font Weight/Style (nowfont-italic
)
Enhancements:
- Added ID attribute support to container, row and col shortcodes.
- Added WYSIWYG format option support for mark and small classes.
- Renames the
[block-link]
shortcode to[link]
for clarity, since this shortcode doesn't technically generate a block-level link. To maintain backward compatibility, the alias block-link has been added, so either shortcode name can be used interchangeably.
Bug fixes:
- Setting the
element_type
to "button" on the shortcode now generates a button element instead of an<a>
tag.
Bug fixes:
- Added missing
max-width
styling on<figure>
element markup modified by this plugin, which prevents figure caption text from spanning a width greater than the image's width.
Enhancements:
- Added shortcodes for alerts:
[alert]
,[alert-heading]
and[alert-link]
. - Updated npm packages list.
- Upgraded admin css to latest verion of Athena Framework.
Enhancements:
- Added
[media-background-container]
and[media-background]
shortcodes.<img>
and<video>
media backgrounds are currently supported. - Added
[block-link]
shortcode for easier inclusion of generic block-level links in WordPress content. - Added
[icon]
shortcode for easier inclusion of font icons. The shortcode is library-agnostic/relevant classes for FontAwesome, etc will need to be added to theclass
attribute wherever this shortcode is used. - Added WP Shortcode Interface group name support for existing shortcodes.
- Upgraded admin css to latest version of Athena Framework.
- Initial release
This version includes style updates on the frontend and backend to ensure vanilla WordPress alignment classes (alignleft
, aligncenter
, alignright
, alignnone
) take precedence over Athena alignment classes when both are present on an element.
We recommend testing this update in a QA environment before upgrading in production to ensure alignment of existing images still works as expected. You may need to force-update alignment of some images after upgrading to this version.
Note that compiled, minified css files are included within the repo. Changes to these files should be tracked via git (so that users installing the plugin using traditional installation methods will have a working plugin out-of-the-box.)
Enabling debug mode in your wp-config.php
file is recommended during development to help catch warnings and bugs.
- node
- gulp-cli
-
Clone the Athena-Shortcodes-Plugin repo into your local development environment, within your WordPress installation's
plugins/
directory:git clone https://github.com/UCF/Athena-Shortcodes-Plugin.git
-
cd
into the new Athena-Shortcodes-Plugin directory, and runnpm install
to install required packages for development intonode_modules/
within the repo -
Optional: If you'd like to enable BrowserSync for local development, or make other changes to this project's default gulp configuration, copy
gulp-config.template.json
, make any desired changes, and save asgulp-config.json
.To enable BrowserSync, set
sync
totrue
and assignsyncTarget
the base URL of a site on your local WordPress instance that will use this plugin, such ashttp://localhost/wordpress/my-site/
. YoursyncTarget
value will vary depending on your local host setup.The full list of modifiable config values can be viewed in
gulpfile.js
(seeconfig
variable). -
Run
gulp default
to process front-end assets. -
If you haven't already done so, create a new WordPress site on your development environment to test this plugin against.
-
Activate this plugin on your development WordPress site.
-
Run
gulp watch
to continuously watch changes to scss files. If you enabled BrowserSync ingulp-config.json
, it will also reload your browser when plugin files change.
- This plugin's README.md file is automatically generated. Please only make modifications to the README.txt file, and make sure the
gulp readme
command has been run before committing README changes. See the contributing guidelines for more information.
Want to submit a bug report or feature request? Check out our contributing guidelines for more information. We'd love to hear from you!