WordPress.org

Ready to get started?Download WordPress

Forums

WP-Cycle
Randomize suggestion (1 post)

  1. Jared Atchison
    Member
    Posted 3 years ago #

    The ability to randomize order the images are shown :)

    Line 20:

    $wp_cycle_defaults = apply_filters('wp_cycle_defaults', array(
        'rotate' => 1,
        'effect' => 'fade',
        'delay' => 3,
        'duration' => 1,
        'img_width' => 300,
        'img_height' => 200,
        'div' => 'rotator',
        'randomize' => 0
    ));

    Around 347

    <tr valign="top"><th scope="row">Randomize Images</th>
            <td><input name="wp_cycle_settings[randomize]" type="checkbox" value="1" <?php checked('1', $options['randomize']); ?> /> <label for="wp_cycle_settings[randomize]">Check this box if you want randomize the order the images are displayed.</td>
            </tr>

    Around 421

    if ( $wp_cycle_settings['randomize'] == 1) shuffle($wp_cycle_images);

    Full modified code at http://pastie.org/1221461

    http://wordpress.org/extend/plugins/wp-cycle/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by Jared Atchison
  • This topic is not a support question
  • WordPress version: 3.0.1

Tags