WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is in the twentyeleven theme. Can somebody tell me what this is?

<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' )
             ^^^^                   ^^^^

My best googling tells me it's something to do with i18n, but I don't think that's the full story because some of them spit out things like author names and post titles, like this example:

<a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a>
                          ^^^^         ^^^^               ^^^^

At any rate, is this something I can/should be using? What's it actually called, and where is it documented?

Sorry if this is a dumb question, but it's a hard thing to google! Thanks!

share|improve this question

See the php sprintf and printf functions. They are tokens that get data from a function or variable separated by commas at the end of the call.

$variable = 'sprintf';
printf( 'Hey dude check out the %s php function', $variable );
share|improve this answer
Thanks! This is a great lead. – Thrillho Aug 30 '12 at 0:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.