WordPress.org

Ready to get started?Download WordPress

Forums

lorem shortcode
Enhancement: random seed (1 post)

  1. Sjeiti
    Member
    Posted 2 years ago #

    I love your plugin, definately speeds up development.
    One of the things that did always bother me is that every time the same page is visited the text is different.

    So I added something to the 'pers_lorem_func' function that might be helpfull:
    // set random seed
    $iSeed = $seed; // <-- added this one here to the extract(shortcode_atts
    $sUri = $_SERVER["REQUEST_URI"];
    for($i=0; $i<strlen($sUri); $i++) $iSeed += ord($sUri[$i]);
    srand($iSeed);

    imho a nice to have :-)

    gr

    Ron

    http://wordpress.org/extend/plugins/lorem-shortcode/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.