WP-Cycle - Version 0.1.5

Version Description

  • Fixed the error that got produced when trying to loop through a non-array variable (duh!)

=

Download this release

Release Info

Developer nathanrice
Plugin Icon wp plugin WP-Cycle
Version 0.1.5
Comparing to
See all releases

Code changes from version 0.1.4 to 0.1.5

Files changed (2) hide show
  1. readme.txt +4 -1
  2. wp-cycle.php +4 -4
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
Tags: slideshow, images, jquery cycle
5
Requires at least: 2.7
6
Tested up to: 2.8.1
7
- Stable tag: 0.1.4
8
9
This plugin creates an image slideshow in your theme, using the jQuery Cycle plugin. You can upload/delete images via the administration panel, and display the images in your theme by using the <code>wp_cycle();</code> template tag, which will generate all the necessary HTML for outputting the rotating images.
10
@@ -89,6 +89,9 @@ Yes. Here are some things that I want to eventually include:
89
= 0.1.4 =
90
* Added empty alt tag to images to pass vaidation
91
92
== Using this plugin with themes ==
93
94
If you are a theme author and what to make your theme compatible with this plugin, you have a couple of options.
4
Tags: slideshow, images, jquery cycle
5
Requires at least: 2.7
6
Tested up to: 2.8.1
7
+ Stable tag: 0.1.5
8
9
This plugin creates an image slideshow in your theme, using the jQuery Cycle plugin. You can upload/delete images via the administration panel, and display the images in your theme by using the <code>wp_cycle();</code> template tag, which will generate all the necessary HTML for outputting the rotating images.
10
89
= 0.1.4 =
90
* Added empty alt tag to images to pass vaidation
91
92
+ = 0.1.5 =
93
+ * Fixed the error that got produced when trying to loop through a non-array variable (duh!)
94
+
95
== Using this plugin with themes ==
96
97
If you are a theme author and what to make your theme compatible with this plugin, you have a couple of options.
wp-cycle.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: WP-Cycle
4
Plugin URI: http://www.nathanrice.net/plugins/wp-cycle/
5
Description: This plugin creates an image slideshow from the images you upload using the jQuery Cycle plugin. You can upload/delete images via the administration panel, and display the images in your theme by using the <code>wp_cycle();</code> template tag, which will generate all the necessary HTML for outputting the rotating images.
6
- Version: 0.1.4
7
Author: Nathan Rice
8
Author URI: http://www.nathanrice.net/
9
@@ -346,7 +346,7 @@ function wp_cycle_settings_admin() { ?>
346
<form method="post" action="options.php">
347
<?php settings_fields('wp_cycle_settings'); ?>
348
<?php global $wp_cycle_defaults; // use the defaults ?>
349
- <?php foreach($wp_cycle_defaults as $key => $value) : ?>
350
<input type="hidden" name="wp_cycle_settings[<?php echo $key; ?>]" value="<?php echo $value; ?>" />
351
<?php endforeach; ?>
352
<input type="hidden" name="wp_cycle_settings[update]" value="RESET" />
@@ -377,7 +377,7 @@ function wp_cycle_settings_validate($input) {
377
}
378
// this function sanitizes our image data for storage
379
function wp_cycle_images_validate($input) {
380
- foreach($input as $key => $value) {
381
if($key != 'update') {
382
$input[$key]['file_url'] = clean_url($value['file_url']);
383
$input[$key]['thumbnail_url'] = clean_url($value['thumbnail_url']);
@@ -405,7 +405,7 @@ function wp_cycle($args = array(), $content = null) {
405
406
echo '<div id="'.$wp_cycle_settings['div'].'">'.$newline;
407
408
- foreach($wp_cycle_images as $image => $data) {
409
if($data['image_links_to'])
410
echo '<a href="'.$data['image_links_to'].'">';
411
3
Plugin Name: WP-Cycle
4
Plugin URI: http://www.nathanrice.net/plugins/wp-cycle/
5
Description: This plugin creates an image slideshow from the images you upload using the jQuery Cycle plugin. You can upload/delete images via the administration panel, and display the images in your theme by using the <code>wp_cycle();</code> template tag, which will generate all the necessary HTML for outputting the rotating images.
6
+ Version: 0.1.5
7
Author: Nathan Rice
8
Author URI: http://www.nathanrice.net/
9
346
<form method="post" action="options.php">
347
<?php settings_fields('wp_cycle_settings'); ?>
348
<?php global $wp_cycle_defaults; // use the defaults ?>
349
+ <?php foreach((array)$wp_cycle_defaults as $key => $value) : ?>
350
<input type="hidden" name="wp_cycle_settings[<?php echo $key; ?>]" value="<?php echo $value; ?>" />
351
<?php endforeach; ?>
352
<input type="hidden" name="wp_cycle_settings[update]" value="RESET" />
377
}
378
// this function sanitizes our image data for storage
379
function wp_cycle_images_validate($input) {
380
+ foreach((array)$input as $key => $value) {
381
if($key != 'update') {
382
$input[$key]['file_url'] = clean_url($value['file_url']);
383
$input[$key]['thumbnail_url'] = clean_url($value['thumbnail_url']);
405
406
echo '<div id="'.$wp_cycle_settings['div'].'">'.$newline;
407
408
+ foreach((array)$wp_cycle_images as $image => $data) {
409
if($data['image_links_to'])
410
echo '<a href="'.$data['image_links_to'].'">';
411