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

Yoast\WP\SEO\Surfaces

Meta_Surface::for_url() public Yoast 1.0

Returns the meta tags context for a url.

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

Хуков нет.

Возвращает

Meta/false. The meta values. False if none could be found.

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

$Meta_Surface = new Meta_Surface();
$Meta_Surface->for_url( $url );
$url(строка) (обязательный)
The url of the page. Required to be relative to the site url.

Код Meta_Surface::for_url() Yoast 15.1.1

<?php
public function for_url( $url ) {
	$url_parts  = \wp_parse_url( $url );
	$site_parts = \wp_parse_url( \site_url() );
	if ( $url_parts['host'] !== $site_parts['host'] ) {
		return false;
	}
	// Ensure the scheme is consistent with values in the DB.
	$url = $site_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path'];

	if ( $this->is_date_archive_url( $url ) ) {
		$indexable = $this->repository->find_for_date_archive();
	}
	else {
		$indexable = $this->repository->find_by_permalink( $url );
	}

	// If we still don't have an indexable abort, the WP globals could be anything so we can't use the unknown indexable.
	if ( ! $indexable ) {
		return false;
	}
	$page_type = $this->indexable_helper->get_page_type_for_indexable( $indexable );

	if ( $page_type === false ) {
		return false;
	}

	return $this->build_meta( $this->context_memoizer->get( $indexable, $page_type ) );
}