wp_sprintf_l
Filter HookDescription
Filters the translated delimiters used by wp_sprintf_l(). 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.Hook Information
File Location |
wp-includes/formatting.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5339 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$delimiters
|
An array of translated delimiters. |
Usage Examples
Basic Usage
<?php
// Hook into wp_sprintf_l
add_filter('wp_sprintf_l', 'my_custom_filter', 10, 1);
function my_custom_filter($delimiters) {
// Your custom filtering logic here
return $delimiters;
}
Source Code Context
wp-includes/formatting.php:5339
- How this hook is used in WordPress core
<?php
5334 *
5335 * @since 2.5.0
5336 *
5337 * @param array $delimiters An array of translated delimiters.
5338 */
5339 $l = apply_filters(
5340 'wp_sprintf_l',
5341 array(
5342 /* translators: Used to join items in a list with more than 2 items. */
5343 'between' => sprintf( __( '%1$s, %2$s' ), '', '' ),
5344 /* translators: Used to join last two items in a list with more than 2 times. */
PHP Documentation
<?php
/**
* Filters the translated delimiters used by wp_sprintf_l().
* 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.
*
* @since 2.5.0
*
* @param array $delimiters An array of translated delimiters.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/formatting.php
Related Hooks
Related hooks will be displayed here in future updates.