Yoast\WP\SEO\Schema_Aggregator\Infrastructure\Schema_Map

Schema_Map_Config::get_priority │ public │ Yoast 1.0

Get priority value from configuration

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

Хуки из метода

Возвращает

string. Priority value as string (float between 0.0 and 1.0).

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

$Schema_Map_Config = new Schema_Map_Config();
$Schema_Map_Config->get_priority(): string;

Код Schema_Map_Config::get_priority() Yoast 28.9

public function get_priority(): string {
	$priority = \apply_filters( 'wpseo_schema_aggregator_schemamap_priority', '0.8' );

	$priority_float = \is_numeric( $priority ) ? (float) $priority : 0.8;

	if ( $priority_float < 0.0 || $priority_float > 1.0 ) {
		return '0.8';
	}

	return \number_format( $priority_float, 1, '.', '' );
}