wp_sprintf_l хук-фильтрWP 2.5.0

Placeholders (%s) are included to assist translators and then removed before the array of strings reaches the filter.

Please note: Ampersands and entities should be avoided here.

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

add_filter( 'wp_sprintf_l', 'wp_kama_sprintf_l_filter' );

/**
 * Function for `wp_sprintf_l` filter-hook.
 * 
 * @param array $delimiters An array of translated delimiters.
 *
 * @return array
 */
function wp_kama_sprintf_l_filter( $delimiters ){

	// filter...
	return $delimiters;
}
$delimiters(массив)
An array of translated delimiters.

Список изменений

С версии 2.5.0 Введена.

Где вызывается хук

wp_sprintf_l()
wp_sprintf_l
wp-includes/formatting.php 5206-5216
$l = apply_filters(
	'wp_sprintf_l',
	array(
		/* translators: Used to join items in a list with more than 2 items. */
		'between'          => sprintf( __( '%1$s, %2$s' ), '', '' ),
		/* translators: Used to join last two items in a list with more than 2 times. */
		'between_last_two' => sprintf( __( '%1$s, and %2$s' ), '', '' ),
		/* translators: Used to join items in a list with only 2 items. */
		'between_only_two' => sprintf( __( '%1$s and %2$s' ), '', '' ),
	)
);

Где используется хук в WordPress

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