Download the PHP package flexpress/component-shortcode without Composer
On this page you can find all versions of the php package flexpress/component-shortcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download flexpress/component-shortcode
More information about flexpress/component-shortcode
Files in flexpress/component-shortcode
Download flexpress/component-shortcode
More information about flexpress/component-shortcode
Files in flexpress/component-shortcode
Vendor flexpress
Package component-shortcode
Short Description Shortcode helper for WordPress
License
Package component-shortcode
Short Description Shortcode helper for WordPress
License
Please rate this library. Is it a good library?
Informations about the package component-shortcode
FlexPress shortcode component
Install with Pimple
The Shortcode component uses two classes:
- AbstractShortcode, which you extend to create a Shortcode.
- ShortcodeHelper, which hooks into everything for you and registers the shortcodes.
Lets create a pimple config for both of these
- Note the dependency $c['objectStorage'] is a SPLObjectStorage
Creating a concreate shortcode class
Create a concreate class that implements the AbstractShortcode class and implements the getName() and getCallback() methods.
Public Methods
- getName() - returns the name of the shortcode that will be used in the editor.
- getCallback() - returns the markup of the shortcode.
ShortcodeHelper usage
Once you have setup the pimple config you are use the ShortcodeHelper like this
That's it, the helper will then add all the needed hooks and register all the shortcodes you have provided it.
Public methods
- registerShortcodes() - Registers the shortcodes provided.
All versions of component-shortcode with dependencies
PHP Build Version
Package Version
No informations.
The package flexpress/component-shortcode contains the following files
Loading the files please wait ....