WPSEO_Breadcrumbs::breadcrumb()public staticYoast 1.0

Get breadcrumb string using the singleton instance of this class.

Метод класса: WPSEO_Breadcrumbs{}

Хуков нет.

Возвращает

Строку. Returns the breadcrumbs as a string.

Использование

$result = WPSEO_Breadcrumbs::breadcrumb( $before, $after, $display );
$before(строка)
Optional string to prepend.
По умолчанию: ''
$after(строка)
Optional string to append.
По умолчанию: ''
$display(true|false)
Echo or return flag.
По умолчанию: true

Код WPSEO_Breadcrumbs::breadcrumb() Yoast 22.4

public static function breadcrumb( $before = '', $after = '', $display = true ) {
	// Remember the last used before/after for use in case the object goes __toString().
	self::$before = $before;
	self::$after  = $after;
	$output       = $before . self::get_instance()->render() . $after;

	if ( $display === true ) {
		echo $output;

		return '';
	}

	return $output;
}