WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WPSEO_Frontend::canonical() public Yoast 1.0

Outputs the canonical value.

{} Это метод класса: WPSEO_Frontend{}

Хуков нет.


Строку/null. Null. Ничего.


$WPSEO_Frontend = new WPSEO_Frontend();
$WPSEO_Frontend->canonical( $echo, $un_paged, $no_override );
Whether or not to output the canonical element.
Whether or not to return the canonical with or without pagination added to the URL.
Whether or not to return a manually overridden canonical.

Код WPSEO_Frontend::canonical() Yoast 16.1.1

public function canonical( $echo = true, $un_paged = false, $no_override = false ) {
	_deprecated_function( __METHOD__, 'WPSEO 14.0' );

	$presentation = $this->get_current_page_presentation();
	$presenter    = new Canonical_Presenter();
	/** This filter is documented in src/integrations/front-end-integration.php */
	$presenter->presentation = $presentation;
	$presenter->helpers      = $this->helpers;
	$presenter->replace_vars = $this->replace_vars;

	if ( ! $echo ) {
		return $presenter->get();

	echo $presenter->present();