Version Description
- Fixed the shortcode positioning problem
Download this release
Release Info
Developer | nathanrice |
Plugin | WP-Cycle |
Version | 0.1.6 |
Comparing to | |
See all releases |
Code changes from version 0.1.5 to 0.1.6
- readme.txt +5 -31
- wp-cycle.php +12 -2
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: nathanrice
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
|
4 |
Tags: slideshow, images, jquery cycle
|
5 |
-
Requires at least: 2.
|
6 |
-
Tested up to: 2.
|
7 |
-
Stable tag: 0.1.
|
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 |
|
@@ -60,9 +60,7 @@ Yes. Here are some things that I want to eventually include:
|
|
60 |
|
61 |
* Add ability to reorder the images
|
62 |
* Add new effects to the slideshow
|
63 |
-
* Add options for the user to define the duration of the effect, and the time between effects via the Settings
|
64 |
* Add the ability to override settings by using function arguments: `<?php wp_cycle('rotate=1&effect=fade&img_width=300&img_height=200&div=slideshow'); ?>`
|
65 |
-
* Add shortcode ability so that you can rotate images attached to a post
|
66 |
* Possibly add widget support so that you can put a slideshow in a widget area
|
67 |
|
68 |
== Changelog ==
|
@@ -92,29 +90,5 @@ Yes. Here are some things that I want to eventually include:
|
|
92 |
= 0.1.5 =
|
93 |
* Fixed the error that got produced when trying to loop through a non-array variable (duh!)
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
If you are a theme author and what to make your theme compatible with this plugin, you have a couple of options.
|
98 |
-
|
99 |
-
First of all, the theme settings defaults are filterable. Therefore, you have the ability, from within your theme's functions.php file, to set the defaults for this plugin. The filter you want to use is `wp_cycle_defaults` and you need to set your return function to return an array. For example:
|
100 |
-
|
101 |
-
`
|
102 |
-
<?php
|
103 |
-
add_filter('wp_cycle_defaults', 'my_theme_wp_cycle_defaults');
|
104 |
-
function my_theme_wp_cycle_defaults() {
|
105 |
-
$defaults = array(
|
106 |
-
'rotate' => 1,
|
107 |
-
'effect' => 'fade',
|
108 |
-
'delay' => 3,
|
109 |
-
'duration' => 1,
|
110 |
-
'img_width' => 300,
|
111 |
-
'img_height' => 200,
|
112 |
-
'div' => 'rotator'
|
113 |
-
);
|
114 |
-
return $defaults;
|
115 |
-
}
|
116 |
-
?>
|
117 |
-
`
|
118 |
-
|
119 |
-
|
120 |
-
Change the array values to what you need for your theme. The user will be able to change them, if they so desire, but you'll be able to at least start them off right.
|
2 |
Contributors: nathanrice
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
|
4 |
Tags: slideshow, images, jquery cycle
|
5 |
+
Requires at least: 2.9
|
6 |
+
Tested up to: 2.9.2
|
7 |
+
Stable tag: 0.1.6
|
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 |
|
60 |
|
61 |
* Add ability to reorder the images
|
62 |
* Add new effects to the slideshow
|
|
|
63 |
* Add the ability to override settings by using function arguments: `<?php wp_cycle('rotate=1&effect=fade&img_width=300&img_height=200&div=slideshow'); ?>`
|
|
|
64 |
* Possibly add widget support so that you can put a slideshow in a widget area
|
65 |
|
66 |
== Changelog ==
|
90 |
= 0.1.5 =
|
91 |
* Fixed the error that got produced when trying to loop through a non-array variable (duh!)
|
92 |
|
93 |
+
= 0.1.6 =
|
94 |
+
* Fixed the shortcode positioning problem
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
7 |
Author: Nathan Rice
|
8 |
Author URI: http://www.nathanrice.net/
|
9 |
|
@@ -421,7 +421,17 @@ function wp_cycle($args = array(), $content = null) {
|
|
421 |
}
|
422 |
|
423 |
// create the shortcode [wp_cycle]
|
424 |
-
add_shortcode('wp_cycle', '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
|
426 |
add_action('wp_print_scripts', 'wp_cycle_scripts');
|
427 |
function wp_cycle_scripts() {
|
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.6
|
7 |
Author: Nathan Rice
|
8 |
Author URI: http://www.nathanrice.net/
|
9 |
|
421 |
}
|
422 |
|
423 |
// create the shortcode [wp_cycle]
|
424 |
+
add_shortcode('wp_cycle', 'wp_cycle_shortcode');
|
425 |
+
function wp_cycle_shortcode($atts) {
|
426 |
+
|
427 |
+
// Temp solution, output buffer the echo function.
|
428 |
+
ob_start();
|
429 |
+
wp_cycle();
|
430 |
+
$output = ob_get_clean();
|
431 |
+
|
432 |
+
return $output;
|
433 |
+
|
434 |
+
}
|
435 |
|
436 |
add_action('wp_print_scripts', 'wp_cycle_scripts');
|
437 |
function wp_cycle_scripts() {
|