WPSEO_Post_Metabox_Formatter::get_values()
Returns the translated values.
Метод класса: WPSEO_Post_Metabox_Formatter{}
Хуки из метода
Возвращает
Массив
.
Использование
$WPSEO_Post_Metabox_Formatter = new WPSEO_Post_Metabox_Formatter(); $WPSEO_Post_Metabox_Formatter->get_values();
Код WPSEO_Post_Metabox_Formatter::get_values() WPSEO Post Metabox Formatter::get values Yoast 22.4
public function get_values() { $values = [ 'search_url' => $this->search_url(), 'post_edit_url' => $this->edit_url(), 'base_url' => $this->base_url_for_js(), 'metaDescriptionDate' => '', ]; if ( $this->post instanceof WP_Post ) { $keyword_usage = $this->get_focus_keyword_usage(); $values_to_set = [ 'keyword_usage' => $keyword_usage, 'keyword_usage_post_types' => $this->get_post_types_for_all_ids( $keyword_usage ), 'title_template' => $this->get_title_template(), 'title_template_no_fallback' => $this->get_title_template( false ), 'metadesc_template' => $this->get_metadesc_template(), 'metaDescriptionDate' => $this->get_metadesc_date(), 'first_content_image' => $this->get_image_url(), 'social_title_template' => $this->get_social_title_template(), 'social_description_template' => $this->get_social_description_template(), 'social_image_template' => $this->get_social_image_template(), 'isInsightsEnabled' => $this->is_insights_enabled(), ]; $values = ( $values_to_set + $values ); } /** * Filter: 'wpseo_post_edit_values' - Allows changing the values Yoast SEO uses inside the post editor. * * @param array $values The key-value map Yoast SEO uses inside the post editor. * @param WP_Post $post The post opened in the editor. */ return apply_filters( 'wpseo_post_edit_values', $values, $this->post ); }