tyxla / carbon-breadcrumbs

A basic WordPress plugin for breadcrumbs with advanced capabilities for extending.
GNU General Public License v2.0
18 stars 5 forks source link

WordPress 4.7 refactored wp_get_object_terms issues #34

Closed ppetrov2create closed 7 years ago

ppetrov2create commented 7 years ago

Carbon_Breadcrumb_Trail_Setup.php - populate_category_items

$categories = wp_get_object_terms( get_the_ID(), $taxonomy, 'orderby=term_id' );

should be updated to

$categories = wp_get_object_terms( get_the_ID(), $taxonomy, array( 'orderby' => 'term_id' ) );

tyxla commented 7 years ago

Thanks for the bug report! 👍

While I agree the array method is the preferred one, string $args should still be supported by the core.

String $args are not supported in 4.7 because of bug, introduced in: https://core.trac.wordpress.org/changeset/38667 and this caused the bug you're reporting.

This issue has already been reported and fixed in the core, and will be included in 4.7.1 and future versions:

In any case, using the array here is recommended, so I'll leave this one open until we address it.

Pull request for this should be rather straightforward, feel free to submit one @ppetrov2create! 😉

stoyan0v commented 7 years ago

Fixed in #35