Yoast\WP\SEO\Editors\Framework\Seo\Posts
Description_Data_Provider::get_template()
Retrieves a template.
Метод класса: Description_Data_Provider{}
Хуков нет.
Возвращает
Строку
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_template( $template_option_name ): string;
- $template_option_name(строка) (обязательный)
- The name of the option in which the template you want to get is saved.
Код Description_Data_Provider::get_template() Description Data Provider::get template Yoast 25.1
private function get_template( string $template_option_name ): string { $needed_option = $template_option_name . '-' . $this->post->post_type; if ( $this->options_helper->get( $needed_option, '' ) !== '' ) { return $this->options_helper->get( $needed_option ); } return ''; }