Yoast/wordpress-seo — pull request #833 by jrfnl (2014-03-17 01:22:33+00:00)
Title: Refactor breadcrumbs class - fixes a number of bugs

Issues fixed:
* In the WPSEO -> Internal Links page text boxes we allow the entry of HTML, but this HTML was being output escaped when the breadcrumb was send to the screen resulting in `<span>`'s and such

* The return value of `yoast_breadcrumbs()` used to be either the breadcrumb string or true, with v1.5 it became string or null. Fixed to be the same as before again.
This will hopefully solve at least some issues with themes.

* With the changes to v1.5, the defaults for some of the textual breadcrumb settings are added dynamically, but empty strings are allowed. This caused issues for people who left the text fields empty on purpose relying on the defaults. Fixed it by adding the defaults to the option if the fields were left empty - but only for people upgrading from versions < 1.5.3, so intentionally left blank fields after that will be respected.
This will also solve some issues where people didn't see the breadcrumb because the default 'Home' text for instance wasn't available. These issues may have incorrectly been blamed on theme integration.

* Probably fixed: Last breadcrumb wasn't always determined correctly resulting in crumbs not being linked when they should have been. Haven't got a test case, so haven't been able to verify.

* Also: Fixed: 404 date based breadcrumb and title creation could cause corruption of the $post object

N.B.: I haven't fully documented the refactored class yet, but wanted to make sure that the code could make it in for v1.5.3.

@dannyvankooten This refactor should make it lot easier to write unit tests for this class. Hope you like it ;-)

Related issues #631, #795, #811, #816.

Also:
* http://wordpress.org/support/topic/breadcrumb-path-no-longer-hyperlinked
* http://wordpress.org/support/topic/arbitrary-breadcrumb-separators-vanished
* http://wordpress.org/support/topic/separator-»-missing-in-breadcrumbs
* http://wordpress.org/support/topic/genesis-framework-breadcrumbs-missing
* http://wordpress.org/support/topic/breadcrumb-not-displaying-in-single-post-page
http://wordpress.org/support/topic/conflict-with-weaver-pro-theme-breadcrumbs-not-showing