Source View: wp_sprintf_l

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2658      // Not a match
2659      if ( substr($pattern, 0, 2) != '%l' )
2660           return $pattern;
2661
2662      // Nothing to work with
2663      if ( empty($args) )
2664           return '';
2665
2666      // Translate and filter the delimiter set (avoid ampersands and entities here)
2667      $l = apply_filters('wp_sprintf_l', array(
2668           /* translators: used between list items, there is a space after the coma */
2669           'between'          => __(', '),
2670           /* translators: used between list items, there is a space after the and */
2671           'between_last_two' => __(', and '),
2672           /* translators: used between only two list items, there is a space after the and */
2673           'between_only_two' => __(' and '),
2674           ));
2675
2676      $args = (array) $args;