Version Description
- changed include calls for Colorbox JavaScript and CSS to version 1.3.6
- optimized modification of the_content
Download this release
Release Info
| Developer | techotronic |
| Plugin | |
| Version | 1.3.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.3 to 1.3.1
- jquery-colorbox.php +14 -10
- readme.txt +5 -1
jquery-colorbox.php
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
* Plugin Name: jQuery Colorbox
|
| 7 |
* Plugin URI: http://www.techotronic.de/index.php/plugins/jquery-colorbox/
|
| 8 |
* Description: Used to overlay images on the current page. Images in one post are grouped automatically.
|
| 9 |
-
* Version: 1.3
|
| 10 |
* Author: Arne Franken
|
| 11 |
* Author URI: http://www.techotronic.de/
|
| 12 |
* License: GPL
|
|
@@ -40,13 +40,13 @@ class jQueryColorbox {
|
|
| 40 |
add_action( 'admin_init', array(&$this, 'registerSettings') );
|
| 41 |
|
| 42 |
if ( !is_admin() ) {
|
| 43 |
-
wp_enqueue_script( 'colorbox', plugins_url( 'js/jquery.colorbox-min.js', __FILE__ ), array( 'jquery' ), '1.3.
|
| 44 |
|
| 45 |
-
wp_register_style( 'colorbox-theme1', plugins_url( 'themes/theme1/colorbox.css', __FILE__ ), array(), '1.3.
|
| 46 |
-
wp_register_style( 'colorbox-theme2', plugins_url( 'themes/theme2/colorbox.css', __FILE__ ), array(), '1.3.
|
| 47 |
-
wp_register_style( 'colorbox-theme3', plugins_url( 'themes/theme3/colorbox.css', __FILE__ ), array(), '1.3.
|
| 48 |
-
wp_register_style( 'colorbox-theme4', plugins_url( 'themes/theme4/colorbox.css', __FILE__ ), array(), '1.3.
|
| 49 |
-
wp_register_style( 'colorbox-theme5', plugins_url( 'themes/theme5/colorbox.css', __FILE__ ), array(), '1.3.
|
| 50 |
}
|
| 51 |
|
| 52 |
// Create list of themes and their human readable names
|
|
@@ -185,7 +185,7 @@ class jQueryColorbox {
|
|
| 185 |
<label for="jquery-colorbox-theme"><?php _e('Theme', 'jquery-colorbox'); ?></label>
|
| 186 |
</th>
|
| 187 |
<td>
|
| 188 |
-
<select name="jquery-colorbox_settings[colorboxTheme]" id="jquery-colorbox-theme" class="postform" style="margin:
|
| 189 |
<?php
|
| 190 |
foreach ( $this->colorboxThemes as $theme => $name ) {
|
| 191 |
echo '<option value="' . esc_attr($theme) . '"';
|
|
@@ -251,7 +251,7 @@ class jQueryColorbox {
|
|
| 251 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
| 252 |
<input type="hidden" name="cmd" value="_s-xclick">
|
| 253 |
<input type="hidden" name="hosted_button_id" value="11235030">
|
| 254 |
-
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif"
|
| 255 |
<img alt="" border="0" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1">
|
| 256 |
</form>
|
| 257 |
</span>
|
|
@@ -314,6 +314,7 @@ add_action( 'init', 'jQueryColorbox', 7 );
|
|
| 314 |
//TODO: get rid of this...
|
| 315 |
function addColorboxGroupIdToImages ($content) {
|
| 316 |
global $post;
|
|
|
|
| 317 |
// create XML representation of the_content
|
| 318 |
$domDocumentTheContent = new DomDocument();
|
| 319 |
$domDocumentTheContent->loadHTML($content);
|
|
@@ -324,9 +325,12 @@ function addColorboxGroupIdToImages ($content) {
|
|
| 324 |
// add colorbox CSS class for every img that does not have the "colorbox-off" class
|
| 325 |
if(!preg_match("/colorbox-off/",$classAttributeValue)){
|
| 326 |
$domNode->setAttribute('class', $classAttributeValue . ' colorbox-'.$post->ID);
|
|
|
|
| 327 |
}
|
| 328 |
}
|
| 329 |
-
$
|
|
|
|
|
|
|
| 330 |
return $content;
|
| 331 |
}
|
| 332 |
|
| 6 |
* Plugin Name: jQuery Colorbox
|
| 7 |
* Plugin URI: http://www.techotronic.de/index.php/plugins/jquery-colorbox/
|
| 8 |
* Description: Used to overlay images on the current page. Images in one post are grouped automatically.
|
| 9 |
+
* Version: 1.3.1
|
| 10 |
* Author: Arne Franken
|
| 11 |
* Author URI: http://www.techotronic.de/
|
| 12 |
* License: GPL
|
| 40 |
add_action( 'admin_init', array(&$this, 'registerSettings') );
|
| 41 |
|
| 42 |
if ( !is_admin() ) {
|
| 43 |
+
wp_enqueue_script( 'colorbox', plugins_url( 'js/jquery.colorbox-min.js', __FILE__ ), array( 'jquery' ), '1.3.6' );
|
| 44 |
|
| 45 |
+
wp_register_style( 'colorbox-theme1', plugins_url( 'themes/theme1/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
|
| 46 |
+
wp_register_style( 'colorbox-theme2', plugins_url( 'themes/theme2/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
|
| 47 |
+
wp_register_style( 'colorbox-theme3', plugins_url( 'themes/theme3/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
|
| 48 |
+
wp_register_style( 'colorbox-theme4', plugins_url( 'themes/theme4/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
|
| 49 |
+
wp_register_style( 'colorbox-theme5', plugins_url( 'themes/theme5/colorbox.css', __FILE__ ), array(), '1.3.6', 'screen' );
|
| 50 |
}
|
| 51 |
|
| 52 |
// Create list of themes and their human readable names
|
| 185 |
<label for="jquery-colorbox-theme"><?php _e('Theme', 'jquery-colorbox'); ?></label>
|
| 186 |
</th>
|
| 187 |
<td>
|
| 188 |
+
<select name="jquery-colorbox_settings[colorboxTheme]" id="jquery-colorbox-theme" class="postform" style="margin:0">
|
| 189 |
<?php
|
| 190 |
foreach ( $this->colorboxThemes as $theme => $name ) {
|
| 191 |
echo '<option value="' . esc_attr($theme) . '"';
|
| 251 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
| 252 |
<input type="hidden" name="cmd" value="_s-xclick">
|
| 253 |
<input type="hidden" name="hosted_button_id" value="11235030">
|
| 254 |
+
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_donate_SM.gif" name="submit" alt="PayPal - The safer, easier way to pay online.">
|
| 255 |
<img alt="" border="0" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1">
|
| 256 |
</form>
|
| 257 |
</span>
|
| 314 |
//TODO: get rid of this...
|
| 315 |
function addColorboxGroupIdToImages ($content) {
|
| 316 |
global $post;
|
| 317 |
+
$changedTheContent = false;
|
| 318 |
// create XML representation of the_content
|
| 319 |
$domDocumentTheContent = new DomDocument();
|
| 320 |
$domDocumentTheContent->loadHTML($content);
|
| 325 |
// add colorbox CSS class for every img that does not have the "colorbox-off" class
|
| 326 |
if(!preg_match("/colorbox-off/",$classAttributeValue)){
|
| 327 |
$domNode->setAttribute('class', $classAttributeValue . ' colorbox-'.$post->ID);
|
| 328 |
+
$changedTheContent = true;
|
| 329 |
}
|
| 330 |
}
|
| 331 |
+
if($changedTheContent){
|
| 332 |
+
$content = $domDocumentTheContent->saveHTML();
|
| 333 |
+
}
|
| 334 |
return $content;
|
| 335 |
}
|
| 336 |
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: http://www.techotronic.de/index.php/donate/
|
|
| 4 |
Tags: jquery, colorbox, lightbox, images, gallery, javascript, overlay
|
| 5 |
Requires at least: 2.8.5
|
| 6 |
Tested up to: 2.9.1
|
| 7 |
-
Stable tag: 1.3
|
| 8 |
|
| 9 |
Automatically adds Colorbox/Lightbox functionality to all images on the blog. Images are grouped by post.
|
| 10 |
|
|
@@ -66,6 +66,10 @@ For all images in a post or page, the same CSS class is added. All images with t
|
|
| 66 |
|
| 67 |
== Changelog ==
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
= 1.3 =
|
| 70 |
* jQuery-Colorbox won't add Colorbox functionality to images that have the CSS class "colorbox-off"
|
| 71 |
* Updated Colorbox version to 1.3.6
|
| 4 |
Tags: jquery, colorbox, lightbox, images, gallery, javascript, overlay
|
| 5 |
Requires at least: 2.8.5
|
| 6 |
Tested up to: 2.9.1
|
| 7 |
+
Stable tag: 1.3.1
|
| 8 |
|
| 9 |
Automatically adds Colorbox/Lightbox functionality to all images on the blog. Images are grouped by post.
|
| 10 |
|
| 66 |
|
| 67 |
== Changelog ==
|
| 68 |
|
| 69 |
+
= 1.3.1 =
|
| 70 |
+
* changed include calls for Colorbox JavaScript and CSS to version 1.3.6
|
| 71 |
+
* optimized modification of the_content
|
| 72 |
+
|
| 73 |
= 1.3 =
|
| 74 |
* jQuery-Colorbox won't add Colorbox functionality to images that have the CSS class "colorbox-off"
|
| 75 |
* Updated Colorbox version to 1.3.6
|
