Error in wordpress codex (3 posts)

  1. fabien72
    Posted 5 years ago #

    I don't know if i'm posting in the right area, but I can't find where to report errors in WP codex. How could I get an account to log in the codex wiki ? Or to post a ticket in track ?

    Anyway, here is the mistake I found. It is in the page I18n_for_WordPress_Developers#Placeholders.

    If you have more than one placeholder in a string, it is recommended that you use argument swapping.

    printf(__("Your city is %1$s, and your zip code is %2$s."), $city, $zipcode);

    This code is not working because double quotes will lead to a replacement of "$s" by the content of "s" variable. Single quotes are mandatory here. The correct code to use is
    printf(__('Your city is %1$s, and your zip code is %2$s.'), $city, $zipcode);

    Best Regards

  2. Samuel B

    Posted 5 years ago #

    Your log in here works for the codex also - so log in to wiki and fix it

  3. fabien72
    Posted 5 years ago #

    OK, great, I've put my 2 cents in the basket.

Topic Closed

This topic has been closed to new replies.

About this Topic