WordPress.org

Ready to get started?Download WordPress

Forums

Better zeroise() function. (5 posts)

  1. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    This seems to break month navigation.

  2. MathiasBynens
    Member
    Posted 10 years ago #

    Can you please specify, Matt? It seems to return exactly the same as with the old function to me...

  3. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    Sure, http://fresh.wordpress.org/
    That's a CVS version with the only change being your function, note that the months aren't getting padded and the calendar names and links are messed up as a result.

  4. MathiasBynens
    Member
    Posted 10 years ago #

    I've been looking into that for 4 days now, and I still can't find the problem. I implemented this on my blog (which is running the official 1.2 Mingus release), and everything works fine. I also freshly installed WP 1.2 Mingus on my localhost, with the only change being the function, and everything works like a charm.
    Somebody, please enlighten me here! Are there such great changes in the CVS version or something?

  5. ashearer
    Member
    Posted 10 years ago #

    How about:
    str_pad($number, $threshold, '0', STR_PAD_LEFT)
    (Built into PHP >= 4.0.1.; see <http://www.php.net/str_pad>).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.