Helpful shortcodes with clean design, also a companion plugin for all themes available at AyeLabs. Build with developers and performance in mind.
Author: | Hapiuc Robert, AyeLabs (profile at wordpress.org) |
WordPress version required: | 3.0.1 |
WordPress version tested: | 4.6.1 |
Plugin version: | 0.1 |
Added to WordPress repository: | 01-11-2016 |
Last updated: | 28-10-2016
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | http://ayelabs.com |
Total downloads: | 842 |
Click to start download
|
FAQ
What is a shortcode?
A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. source
How do i use a shortcode?
Simply add the shortcode id between squere brakets and place it in your post content. [shortcode_id]. If the shortcode supports attributes add them using the following sintax [shortcode_id attribute=”attribute with value” attribute_without_value]. If your shortcode needs to alter your content, simply wrap the content with the shortcode. [shortcode_id]Your content[/shortcode_id]
How can i integrate AyeShortcodes with your theme?
AyeShortcodes it’s a plugin developed with flexibility in mind. Besides the basic shortcode manager, it comes with a small assets dependecy manager that will allow you, as a developer, to manage the assets loaded on the website ( both from plugin and theme ). This will optimize the page and avoid loading it with unused/duplicate assets. The following code will help you setup your theme to be compatible with this plugin, follow the code comments
// Check if AyeShortcodes plugin exists
if(class_exists('\Aye\Shortcodes\Core')) {
// Tell AyeShortcode plugin that you use the theme mode
add_filter('aye_shortcodes_theme_mode', '__return_true');
// Access core class, if you don't need it you can delete it
global $aye_shortcodes;
// Let the plugin know all the shortcodes your theme is compatible with
add_filter('aye_shortcodes_available_filter', function($array) {
return array('column', 'label');
});
// Exclude assets from plugin if they are already bundled in the theme ( ex. Exclude 'bootstrap-columns' beacause you theme already use bootstrap ).
add_filter('aye_shortcodes_style_assets', function($array) {
return array('bootstrap-columns');
});
}
See the markup generated by each shortcode on /assets/dev/markup.html.
ChangeLog