Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_sprintf

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.

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
3554                 * Filter a fragment from the pattern passed to wp_sprintf().
3555                 *
3556                 * If the fragment is unchanged, then sprintf() will be run on the fragment.
3557                 *
3558                 * @since 2.5.0
3559                 *
3560                 * @param string $fragment A fragment from the pattern.
3561                 * @param string $arg      The argument.
3562                 */
3563                $_fragment = apply_filters( 'wp_sprintf', $fragment, $arg );
3564                if ( $_fragment != $fragment )
3565                     $fragment = $_fragment;
3566                else
3567                     $fragment = sprintf($fragment, strval($arg) );
3568           }
3569
3570           // Append to result and move to next fragment
3571           $result .= $fragment;
3572           $start = $end;