WordPress.org

Ready to get started?Download WordPress

Forums

Error in wordpress codex (3 posts)

  1. fabien72
    Member
    Posted 3 years ago #

    Hi
    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
    Fabien

  2. Samuel B
    moderator
    Posted 3 years ago #

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

  3. fabien72
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags