Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.