內容簡介
為主題和外掛開發人員提供一種簡單的方式,專門為他們的需要建立和實現高度可自定義的麵包屑功能。
支援許多過濾器和鉤子,以物件導向風格撰寫,讓開發人員對麵包屑項目和外觀擁有完全控制權。
此外掛還可以嵌入主題中,而不是安裝為 WordPress 外掛。
配置
在您的主題代碼中插入 Carbon Breadcrumbs 最基本的方法是:
<?php Carbon_Breadcrumb_Trail::output(); ?>
如果您想指定各種面包屑渲染選項,可以像這樣在陣列中指定它們:
<?php
Carbon_Breadcrumb_Trail::output(array(
'glue' => ' > ', // 分隔面包屑項目的黏合劑
'link_before' => '',
'link_after' => '',
'wrapper_before' => '',
'wrapper_after' => '',
'title_before' => '',
'title_after' => '',
'min_items' => 2,
'last_item_link' => true,
'display_home_item' => true,
'home_item_title' => __('Home', 'carbon_breadcrumbs'),
'renderer' => 'Carbon_Breadcrumb_Trail_Renderer',
));
?>
如需其他配置和開發人員文檔,請訪問 Github 存儲庫:
https://github.com/tyxla/carbon-breadcrumbs
想法和錯誤報告
歡迎任何新模塊的想法或其他用戶將受益的附加功能。
如果您有新功能的想法或想要報告錯誤,請在支援選項中進行,或者您可以在項目的 Github 存儲庫中進行:
https://github.com/tyxla/carbon-breadcrumbs
外掛標籤
開發者團隊
原文外掛簡介
Provides the theme and plugin developers an easy way to build and implement highly customizable breadcrumb functionality, specifically tailored to their needs.
Supports a lot of filters and hooks, and is written in OOP style, giving developers full control over the breadcrumb trail items and appearance.
This plugin can also be embedded in themes, instead of installing it as a WordPress plugin.
Configuration
The most basic way to insert Carbon Breadcrumbs in your theme code is:
If you want to specify various breadcrumb rendering options, you can specify them in an array, like this:
' > ', // glue between breadcrumb items
'link_before' => '',
'link_after' => '',
'wrapper_before' => '',
'wrapper_after' => '',
'title_before' => '',
'title_after' => '',
'min_items' => 2,
'last_item_link' => true,
'display_home_item' => true,
'home_item_title' => __('Home', 'carbon_breadcrumbs'),
'renderer' => 'Carbon_Breadcrumb_Trail_Renderer',
));
?>
For additional configuration and developer documentation, you can visit the Github repository:
https://github.com/tyxla/carbon-breadcrumbs
Ideas and bug reports
Any ideas for new modules or any other additional functionality that users would benefit from are welcome.
If you have an idea for a new feature, or you want to report a bug, feel free to do it here in the Support tab, or you can do it at the Github repository of the project:
https://github.com/tyxla/carbon-breadcrumbs
