Yoast\WP\SEO\Bulk_Editor\Infrastructure\Posts

Default_Template_Resolver::resolve_meta_description │ public │ Yoast 1.0

Returns the raw meta description template for a post, falling back to the post type's configured template when empty.

Returns the unresolved template string so the caller can display it in a replacement-variable editor. Unlike SEO title there is no installation-level default, so an empty stored value returns an empty string when the user has not configured a post type template.

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

Хуков нет.

Возвращает

string. The raw template string, or an empty string when no template is configured.

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

$Default_Template_Resolver = new Default_Template_Resolver();
$Default_Template_Resolver->resolve_meta_description( $post_id, $post_type, $stored_value ): string;
$post_id(int) (обязательный)
The post ID (unused; kept for a consistent method signature).
$post_type(строка) (обязательный)
The post type slug.
$stored_value(строка) (обязательный)
The raw stored description (empty string when never explicitly saved).

Код Default_Template_Resolver::resolve_meta_description() Yoast 28.9

public function resolve_meta_description( int $post_id, string $post_type, string $stored_value ): string {
	return $this->resolve( $post_type, $stored_value, 'metadesc-', false );
}