WPSEO_Post_Metabox_Formatter::get_values()publicYoast 1.0

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() Yoast 19.6.1

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 ) {
		$values_to_set = [
			'keyword_usage'               => $this->get_focus_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.
	 *
	 * @api 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 );
}