Download the PHP package italystrap/breadcrumbs without Composer
On this page you can find all versions of the php package italystrap/breadcrumbs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download italystrap/breadcrumbs
More information about italystrap/breadcrumbs
Files in italystrap/breadcrumbs
Package breadcrumbs
Short Description ItalyStrap Breadcrumbs Class
License MIT
Informations about the package breadcrumbs
ItalyStrap Breadcrumbs
Breadcrumbs Class API for WordPress
This package create an HTML or Json Breadcrumbs elements to display on your WordPress site
Installation
Install with Composer
Add the package to your projects composer.json
file. Visit getcomposer.org more information.
or
Install Manually
Download and include the class file into your theme/plugin:
Usage
Basic usage
Use \ItalyStrap\Breadcrumbs\Breadcrumbs_Factory::make( $type, $args )
to display the breadcrumbs in your template.
The first parameter is the type of breadcrumbs you want to display:
- HTML
- Return the HTML output
- Json
- Return the Json output
- object
- Return the object output
- array
- Return the array output
Options
An optional array of arguments can be passed to modify the breadcrumb output.
The defaults for each option @see Breadcrumbs/config/breadcrumbs.php
Default HTML output
Advanced usage
Example for HTML version
YOu can copy this snippet in your file breadcrumbs.php and include it in your plugin/theme
Then with the function do_action( 'do_breadcrumbs', [] )
you can display the breadcrumbs where you want in your theme.
Example for Json version
Filters
TODO
Other Example
TODO
array_insert()
array_insert()
is a function that allows you to insert a new element into an array at a specific index.
Example array_insert()
Notes
- Licensed under the GNU General Public License v2.0
- Maintained under the Semantic Versioning Guide
Author
Enea Overclokk