bu-navigation icon indicating copy to clipboard operation
bu-navigation copied to clipboard

Bug: Breadcrumb returns empty div when no breadcrumbs

Open alana29s opened this issue 3 years ago • 1 comments

While setting up Breadcrumbs for law https://github.com/bu-ist/r3-law/pull/114, it was discovered that the breadcrumbs function returns an empty div(element chosen) when there are no breadcrumbs. It would be preferable to return an empty string instead. If that may break something, a new option to return an empty string could be added.

Sample code from r3-law

						$breadcrumb_args = array(
							'glue'            => ' / ',
							'container_tag'   => 'div',
							'container_id'    => '',
							'container_class' => 'bu-banner-breadcrumbs',
							'anchor_class'    => 'crumb',
							'crumb_current'   => false,
							'anchor_current'  => false,
							'echo'            => true,
							'include_hidden'  => true,
						);

						bu_navigation_breadcrumbs( $breadcrumb_args );
					}

Screen Shot 2022-01-20 at 3 06 01 PM

alana29s avatar Jan 20 '22 20:01 alana29s