Fix breadcrumb path in edge cases when using Polylang#39
Open
timiwahalahti wants to merge 2 commits intojustintadlock:masterfrom
Open
Fix breadcrumb path in edge cases when using Polylang#39timiwahalahti wants to merge 2 commits intojustintadlock:masterfrom
timiwahalahti wants to merge 2 commits intojustintadlock:masterfrom
Conversation
Owner
|
Please see contributing guidelines: https://github.com/justintadlock/breadcrumb-trail/blob/master/contributing.md#pull-requests Also, this should probably be something that we look at for the Hybrid Breadcrumbs script, which is what the next version of BT will be based on: https://github.com/justintadlock/hybrid-breadcrumbs Generally speaking, I'm not big on directly adding third-party plugin integration, particularly for plugins that I don't use myself. That leads to more long-term maintenance. I think it's better to open up the code so that it can be altered via filter hook or something similar. Anyway, feel free to open up a ticket for discussion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some situations with Polylang translation plugin (look like edge cases), the plugin uses wrong post ID in
add_post_parentsfunction and that causes breadcrumb to link to the default language. Simple check if Polylang is active and allowing Polylang to check if there are translations available, fixes this issue.pll_get_postreturns the id of the translated post or page as integer.