Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1014 Bytes

README.md

File metadata and controls

45 lines (32 loc) · 1014 Bytes

WordPress Breadcrumbs

Build and display breadcrumbs for WordPress pages

Installation

Install via composer:

composer require grottopress/wordpress-breadcrumbs

Usage

<?php
declare (strict_types = 1);

use GrottoPress\WordPress\Breadcrumbs;
use GrottoPress\WordPress\Page;

// Instantiate
$breadcrumbs = new Breadcrumbs(new Page(), [
    'home_label' => \esc_html__('Home'),
    'delimiter' => '/',
    'before' => \esc_html__('Path: '),
]);

// Render
$breadcrumbs->render();

Development

Run tests with composer run test.

Contributing

  1. Fork it
  2. Switch to the master branch: git checkout master
  3. Create your feature branch: git checkout -b my-new-feature
  4. Make your changes, updating changelog and documentation as appropriate.
  5. Commit your changes: git commit
  6. Push to the branch: git push origin my-new-feature
  7. Submit a new Pull Request against the GrottoPress:master branch.