mtekk / Breadcrumb-NavXT

The longest maintained Breadcrumb plugin for WordPress
https://mtekk.us/code/breadcrumb-navxt
51 stars 25 forks source link

Cleanup bcn_breadcrumb_trail::type_archive() #224

Closed mtekk closed 3 years ago

mtekk commented 5 years ago

The last if/else if statement is a mess (too much stuff being checked in the condition). Need to split that state check to its own function, or some other organization to make it more readable.

mtekk commented 4 years ago

It looks like the proper solution is to divide the function into one handling post types and another for taxonomy terms. Should be able to get rid of a branch statement by doing this as at the point of being called we already know if we have a post type or taxonomy. Since the real solution is to divide this function, this is being punted to 6.5 as that is the next intercept for 'API' changes.

mtekk commented 4 years ago

Punting to 7.0 (6.5 will not have API changes)

mtekk commented 3 years ago

Part of this is going to remold do_archive_by_post_type(), a la what happened to do_post() a while back.