★ 5stars
12kcomposer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/digitalunited/components/archive/refs/heads/master.zipAlso on Packagist as digitalunited/components:
composer require digitalunited/componentsFrom the readme
Components #
Installation
1. Install via composer
2. Activate plugin
3. Configure grunt
Usage
A component folder should be placed in the theme-directory following this structure:
Every component will have their short-code registered and vcmapping set up.
component.php
A VCComponent have the following structure:
A Standard component have the following structure:
View
In the views, all values returned from "sanetizeDataForRendering" will be accessible.
eg. ['foo' = 'bar'] will be available like
You may also use the component class, referenced as $component. eg:
You may use separate view files depending on the $view-param, if "view" param is specified, $view.view.php will be rendered. Default: view.php
It is possible to split a view file into partials:
Performance
When a slow registration of a component is detected the plugin will show an admin notice.
Slow registration could be caused by by 2 reasons:
- Dynamic population of params
- Execution of tasks in the components main method.
If the problem is due to Dynamic population of params there is an easy solution.
Just add the following code as an early abort in the f
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v0.2.6 | Feb 7, 2024 | — | — |
| v0.2.5 | Sep 4, 2018 | — | — |
| v0.2.3 | Aug 28, 2018 | — | — |
| v0.2.2 | Oct 26, 2017 | — | — |
| v0.2.1 | Sep 26, 2017 | — | — |
| 0.2.0 | Sep 22, 2017 | — | — |
| 0.1.28 | Jun 7, 2017 | — | — |
| 0.1.27 | Mar 16, 2017 | — | — |
| 0.1.26 | Oct 20, 2016 | — | — |
| 0.1.25 | Sep 28, 2016 | — | — |
| 0.1.24 | May 2, 2016 | — | — |
| 0.1.23 | Apr 27, 2016 | — | — |
| 0.1.22 | Apr 27, 2016 | — | — |
| 0.1.21 | Jan 25, 2016 | — | — |
| 0.1.20 | Jan 20, 2016 | — | — |
| 0.1.19 | Dec 17, 2015 | — | — |
| 0.1.18 | Dec 15, 2015 | — | — |
| 0.1.15 | May 21, 2015 | — | — |
| 0.1.14 | May 8, 2015 | — | — |
| 0.1.13 | Apr 21, 2015 | — | — |
| 0.1.12 | Apr 13, 2015 | — | — |
| 0.1.11 | Apr 8, 2015 | — | — |
| 0.0.5 | Feb 10, 2015 | — | — |
| 0.0.4 | Feb 5, 2015 | — | — |
| 0.0.3 | Feb 4, 2015 | — | — |