[Resolved] [Plugin: WordPress SEO by Yoast] wp_seo_get_bc_ancestors filter unreliable
WordPress version: 3.3.2
WordPress SEO version: 1.2.1
I did this:
Attempted to use the new
I expected the plugin to do this:
Well, after adding a function of mine to the filter, I expected to receive an array with all the ancestor for the pages. Given most of my pages have two ancestors (plus the home page), I expected the array to have at least two entries.
Instead it did this:
The function was never triggered. Looking at the original function in which the filter is called (
frontend/class-breadcrumbs.phpline 110), I noticed it’s called only once, and under a very limited set of conditions that don’t encompass the whole set of URLs the function finds.
My suggestion would be to rework the function so that the URLand title finding happens first, filling the
$ancestors, which then gets filtered, and only then this returned array gets processed and turned into the visible
Since I’m quite interested in having this working for my current project, and I see there are other more urgent issues with the new version given what people are talking about in the forum, I’d like to offer to do this myself then post Pastebin link to the reworked function here. What do you think?
By the way: the new version is quite nice. Kudos!
- The topic ‘[Resolved] [Plugin: WordPress SEO by Yoast] wp_seo_get_bc_ancestors filter unreliable’ is closed to new replies.