astra_addon_is_breadcrumb_trail( string $echo = true )

Function astra_addon_is_breadcrumb_trail checks if the Theme has the updated version with function ‘astra_breadcrumb_trail’.


Description

We will fallback to older version of breadcrumb function ‘astra_breadcrumb’.


Parameters

$echo

(string) (Optional) Whether to echo or return.

Default value: true


Source

File: classes/helper-functions.php

function astra_addon_is_breadcrumb_trail( $echo = true ) {
	if ( function_exists( 'astra_get_breadcrumb' ) ) {
		return astra_get_breadcrumb( $echo );
	}
	require ASTRA_EXT_DIR . '/addons/advanced-headers/classes/astra-breadcrumbs.php';
	if ( ! $echo ) {
		ob_start();
		astra_breadcrumb();
		return ob_get_clean();
	}
	echo astra_breadcrumb(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}

Changelog

Changelog
Version Description
1.8.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.