Opened 11 years ago
Closed 8 years ago
#25455 closed feature request (wontfix)
Breadcrumb API
Reported by: | Apiweb | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Template | Keywords: | |
Focuses: | Cc: |
Description
I think a cool addition to WordPress, as well as the menus and widgets, would be an API for Breadcrumb so the pages, posts, categories, themes and plugins might use this API and so have a breadcrumb more consistent across the entire environment WordPress .
Attachments (3)
Change History (19)
#3
follow-up:
↓ 4
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
Agree with plugin territory. Demand for it in core has not been noticeable. As always, welcome to re-open later, but would do the plugin thing first.
#4
in reply to:
↑ 3
@
11 years ago
Replying to helen:
Agree with plugin territory. Demand for it in core has not been noticeable. As always, welcome to re-open later, but would do the plugin thing first.
Quick question, did not understand why he is plugin. I would change the core. Since WordPress itself would provide an API for Breadcrumbs, where themes and plugins might use it, as with Menus and Widgets.
Would not a plugin, but something that the very core of WordPress would provide.
#5
@
10 years ago
I'm going to submit a patch for this, under a different ticket (I don't think an API is needed; just a core template tag).
Over the past four years reviewing Themes, I have seen the breadcrumb navigation wheel re-invented many times over by Theme developers. Breadcrumb navigation is standard template functionality. Non-core solutions are sub-optimal, IMHO. Not having a core template tag for breadcrumb navigation forces Theme developers either to rely on a Plugin for basic template functionality, or else develop custom code for a very common feature. Relegating breadcrumb navigation to Plugin territory would be analogous to saying paginate_links()
or posts_nav_link()
/previous_posts_link()
/next_posts_link()
are Plugin territory.
#7
@
9 years ago
- Resolution wontfix deleted
- Status changed from closed to reopened
Just attached a patch from my duplicate feature-request ticket.
#9
@
9 years ago
Submitted patch has extra, unclosed <div> in the 'page' handler. I suggest this function, if in core, should return a list of hashes, in the same format as get_bookmarks(), and let the plugin/theme handle any desired HTML generation. I have suggested a modification of the patch to @cardiganmedia.
#10
@
9 years ago
I'm tweaking this patch a bit -- adding an option to return or echo, and streamlining some code. I'll upload the new version tonight.
#11
@
9 years ago
I've made a few tweaks to clean things up a bit, and also added an echo argument for better user control, as well as a filter (wp_breadcrumb_args) for argument filtering.
#12
@
9 years ago
What about the case where a Page sits several below levels of parents; shouldn't this walk the tree of parents until we get to root? That could be parent = 0 or, if ('page' == get_option('show_on_front')) then the root page's id is get_option('page_on_front').
#13
@
9 years ago
Will have a new patch with full ancestor path by tomorrow. I'm still testing things.
#14
@
9 years ago
New version that builds the full path for pages. I'd love to see input from others regarding possible improvements here.
Previously: #4861. Related: #21506.
Sounds like plugin territory to me. Should probably be suggested as a feature plugin first.