Yoast\WP\SEO\Bulk_Editor\Infrastructure\Posts
Default_Template_Resolver::resolve_seo_title
Returns the raw SEO title template for a post, falling back to the post type's configured template when empty.
Returns the unresolved template string (e.g. %%title%% %%sep%% %%sitename%%) so the caller can display it in a replacement-variable editor rather than showing the expanded value. Priority: stored value → user-configured post type template (title-{post_type}) → installation default.
Метод класса: 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_seo_title( $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 title (empty string when never explicitly saved).
Код Default_Template_Resolver::resolve_seo_title() Default Template Resolver::resolve seo title Yoast 28.9
public function resolve_seo_title( int $post_id, string $post_type, string $stored_value ): string {
return $this->resolve( $post_type, $stored_value, 'title-', true );
}