Download the PHP package bjoluc/wordcrumbs without Composer

On this page you can find all versions of the php package bjoluc/wordcrumbs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wordcrumbs

WordCrumbs

A simple PHP package to add breadcrumbs on any WordPress site

Ever needed to add customized breadcrumbs to your WordPress theme without annoying your users with a separate plugin? Now you can! WordCrumbs is a customizable, easily extensible PHP package to automatically generate breadcrumbs on WordPress sites. It comes with a set of formatters that can be used or extended to control WordCrumb's HTML output.

I want this, what do I have to do?

If you do not use composer, install it first. With composer installed, navigate to your theme's directory and run

If your theme is not already using the composer autoloader, require it in your functions.php:

After that, for example in your theme's header.php, you can use WordCrumbs like this:

Customization

Behavior

By default, WordCrumbs displays breadcrumbs on posts, pages, category archives, tag archives, date archives, attachments, search results, and the 404 error page. You can disable any of these using the following methods before calling detect():

Breadcrumbs for custom taxonomies and custom post types are disabled by default. They can be enabled using the following methods:

Both of these also accept an array of taxonomy resp. post type names for which to enable breadcrumbs.

If you have a page for a custom taxonomy where you list the taxonomies terms, you can make the taxonomy breadcrumb link to it by using enableTermListPages(). For example, if you have a page at /colors where terms of the taxonomy "color" are listed and you call enableTermListPages() or, more specifically, enableTermListPages(['color']), color terms will have the breadcrumb "Colors" link to /colors.

Formatting

You can customize the HTML (or plain text) output in several ways. First, you can switch between existing formatters. Those are:

Second, all of these formatters support optional constructor arguments to modify their output (see the PHPDoc comments for details).

Third, you can extend any of these formatters (including the abstract FormatterInterface yourself.

Locales

Locales are stored as yaml files in the locales directory. The preferred locale can be passed as a string to the WordCrumbs constructor (e.g. new WordCrumbs('de_DE')). Otherwise, the WordPress function get_locale() is used to set the locale. If the respective locale file does not exist en_US is used as a fallback. Adding locales is as easy as copying en_US.yaml and modifying the strings accordingly. If you add a locale, feel free to create a PR or open an issue providing the yaml file contents. I am happy to accept your request or add the file for you!

In-depth modifications

Depending on the page, the detect() method invokes different protected methods prefixed with _process. If, for example, you would like to modify the way breadcrumbs are created on attachment pages, you could simply subclass WordCrumbs and override _processAttachment() accordingly. Have fun!


All versions of wordcrumbs with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
symfony/translation Version ^5.0@dev
symfony/yaml Version ^5.0@dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bjoluc/wordcrumbs contains the following files

Loading the files please wait ....