Version Description
- 19.09.2016 =
- Bugfix : The bug with displaying fancybox was fixed.
Download this release
Release Info
Developer | bestwebsoft |
Plugin | Gallery by BestWebSoft |
Version | 4.4.5 |
Comparing to | |
See all releases |
Code changes from version 4.4.4 to 4.4.5
- gallery-plugin.php +90 -39
- js/frontend_script.js +1 -1
- readme.txt +7 -1
gallery-plugin.php
CHANGED
@@ -6,7 +6,7 @@ Description: Add beautiful galleries, albums & images to your Wordpress website
|
|
6 |
Author: BestWebSoft
|
7 |
Text Domain: gallery-plugin
|
8 |
Domain Path: /languages
|
9 |
-
Version: 4.4.
|
10 |
Author URI: http://bestwebsoft.com/
|
11 |
License: GPLv2 or later
|
12 |
*/
|
@@ -854,7 +854,7 @@ if ( ! function_exists( 'gllr_template_pagination' ) ) {
|
|
854 |
/* this function prints content for single gallery template */
|
855 |
if ( ! function_exists( 'gllr_single_template_content' ) ) {
|
856 |
function gllr_single_template_content() {
|
857 |
-
global $post, $wp_query, $gllr_options;
|
858 |
wp_enqueue_script( 'gllr_js', plugins_url( 'js/frontend_script.js', __FILE__ ), array( 'jquery' ) );
|
859 |
$args = array(
|
860 |
'post_type' => $gllr_options['post_type_name'],
|
@@ -944,28 +944,45 @@ if ( ! function_exists( 'gllr_single_template_content' ) ) {
|
|
944 |
<?php } ?>
|
945 |
</div><!-- .gallery_box_single -->
|
946 |
<?php }
|
947 |
-
$download_link_title = addslashes( __( 'Download high resolution image', 'gallery-plugin' ) );
|
|
|
948 |
<script type="text/javascript">
|
949 |
-
( function(
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
'
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
|
|
|
|
|
|
964 |
} );
|
965 |
-
}
|
966 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
967 |
</script>
|
968 |
-
|
|
|
|
|
|
|
|
|
|
|
969 |
<div class="gallery_box_single">
|
970 |
<p class="not_found"><?php _e( 'Sorry, nothing found.', 'gallery-plugin' ); ?></p>
|
971 |
</div><!-- .gallery_box_single -->
|
@@ -2259,17 +2276,26 @@ if ( ! function_exists ( 'gllr_wp_footer' ) ) {
|
|
2259 |
if ( wp_script_is( 'gllr_js', 'enqueued' ) ) {
|
2260 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
2261 |
if ( ! ( is_plugin_active( 'portfolio-pro/portfolio-pro.php' ) && wp_script_is( 'prtfl_front_script', 'registered' ) ) ) {
|
2262 |
-
wp_enqueue_script( 'gllr_fancybox_mousewheel_js', plugins_url( 'fancybox/jquery.mousewheel-3.0.4.pack.js', __FILE__ ), array( 'jquery' ) );
|
2263 |
-
wp_enqueue_script( 'gllr_fancybox_js', plugins_url( 'fancybox/jquery.fancybox-1.3.4.pack.js', __FILE__ ), array( 'jquery' ) );
|
|
|
2264 |
}
|
|
|
|
|
|
|
2265 |
|
|
|
|
|
|
|
|
|
|
|
2266 |
}
|
2267 |
}
|
2268 |
}
|
2269 |
|
2270 |
if ( ! function_exists ( 'gllr_shortcode' ) ) {
|
2271 |
function gllr_shortcode( $attr ) {
|
2272 |
-
global $gllr_options;
|
2273 |
wp_enqueue_script( 'gllr_js', plugins_url( 'js/frontend_script.js', __FILE__ ), array( 'jquery' ) );
|
2274 |
|
2275 |
if ( isset( $_GET['print'] ) ) {
|
@@ -2289,7 +2315,7 @@ if ( ! function_exists ( 'gllr_shortcode' ) ) {
|
|
2289 |
global $post, $wpdb, $wp_query;
|
2290 |
|
2291 |
$term = get_term( $cat_id, 'gallery_categories' );
|
2292 |
-
if ( !empty( $term ) ) {
|
2293 |
$old_wp_query = $wp_query;
|
2294 |
|
2295 |
$args = array(
|
@@ -2486,28 +2512,53 @@ if ( ! function_exists ( 'gllr_shortcode' ) ) {
|
|
2486 |
<div class="gallery_box_single">
|
2487 |
<p class="not_found"><?php _e( 'Sorry, nothing found.', 'gallery-plugin' ); ?></p>
|
2488 |
</div><!-- .gallery_box_single -->
|
2489 |
-
<?php }
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2494 |
'transitionIn' : 'elastic',
|
2495 |
'transitionOut' : 'elastic',
|
2496 |
'titlePosition' : 'inside',
|
2497 |
'speedIn' : 500,
|
2498 |
'speedOut' : 300,
|
2499 |
-
'titleFormat' : function( title, currentArray, currentIndex, currentOpts ) {
|
2500 |
-
|
2501 |
-
}
|
|
|
|
|
2502 |
'onComplete': function() {
|
2503 |
clearTimeout( jQuery.fancybox.slider );
|
2504 |
-
jQuery.fancybox.slider = setTimeout( "jQuery.fancybox.next()"
|
2505 |
-
}
|
2506 |
-
|
|
|
2507 |
});
|
2508 |
-
}
|
2509 |
-
|
2510 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2511 |
wp_reset_query();
|
2512 |
$wp_query = $old_wp_query;
|
2513 |
}
|
6 |
Author: BestWebSoft
|
7 |
Text Domain: gallery-plugin
|
8 |
Domain Path: /languages
|
9 |
+
Version: 4.4.5
|
10 |
Author URI: http://bestwebsoft.com/
|
11 |
License: GPLv2 or later
|
12 |
*/
|
854 |
/* this function prints content for single gallery template */
|
855 |
if ( ! function_exists( 'gllr_single_template_content' ) ) {
|
856 |
function gllr_single_template_content() {
|
857 |
+
global $post, $wp_query, $gllr_options, $gllr_inline_script;
|
858 |
wp_enqueue_script( 'gllr_js', plugins_url( 'js/frontend_script.js', __FILE__ ), array( 'jquery' ) );
|
859 |
$args = array(
|
860 |
'post_type' => $gllr_options['post_type_name'],
|
944 |
<?php } ?>
|
945 |
</div><!-- .gallery_box_single -->
|
946 |
<?php }
|
947 |
+
$download_link_title = addslashes( __( 'Download high resolution image', 'gallery-plugin' ) );
|
948 |
+
ob_start(); ?>
|
949 |
<script type="text/javascript">
|
950 |
+
( function() {
|
951 |
+
var gllr_onload = window.onload;
|
952 |
+
function gllr_fancy_init() {
|
953 |
+
jQuery( document ).ready( function() {
|
954 |
+
jQuery("a[rel=gallery_fancybox<?php if ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) echo '_' . $post->ID; ?>]").fancybox( {
|
955 |
+
'transitionIn' : 'elastic',
|
956 |
+
'transitionOut' : 'elastic',
|
957 |
+
'titlePosition' : 'inside',
|
958 |
+
'speedIn' : 500,
|
959 |
+
'speedOut' : 300,
|
960 |
+
'titleFormat' : function( title, currentArray, currentIndex, currentOpts ) {
|
961 |
+
return '<div id="fancybox-title-inside">' + ( title.length ? '<span id="bws_gallery_image_title">' + title.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>') + '</span><br />' : '' ) + '<span id="bws_gallery_image_counter"><?php _e( "Image", "gallery-plugin" ); ?> ' + ( currentIndex + 1 ) + ' / ' + currentArray.length + '</span></div><?php if( get_post_meta( $post->ID, 'gllr_download_link', true ) != '' ){?><a id="bws_gallery_download_link" href="' + jQuery( currentOpts.orig ).attr('rel') + '" download="' + jQuery( currentOpts.orig ).attr('rel').substring( jQuery( currentOpts.orig ).attr('rel').lastIndexOf('/') + 1 ) + '" target="_blank"><?php echo $download_link_title; ?> </a><?php } ?>';
|
962 |
+
}<?php if ( $gllr_options['start_slideshow'] == 1 ) { ?>,
|
963 |
+
'onComplete': function() {
|
964 |
+
clearTimeout( jQuery.fancybox.slider );
|
965 |
+
jQuery.fancybox.slider = setTimeout("jQuery.fancybox.next()",<?php echo $gllr_options['slideshow_interval']; ?>);
|
966 |
+
}<?php } ?>
|
967 |
+
} );
|
968 |
} );
|
969 |
+
}
|
970 |
+
if ( typeof gllr_onload === 'function' ) {
|
971 |
+
window.onload = function() {
|
972 |
+
gllr_onload();
|
973 |
+
gllr_fancy_init();
|
974 |
+
}
|
975 |
+
} else {
|
976 |
+
window.onload = gllr_fancy_init;
|
977 |
+
}
|
978 |
+
} )( 0 );
|
979 |
</script>
|
980 |
+
<?php if ( empty( $gllr_inline_script ) ) {
|
981 |
+
$gllr_inline_script = ob_get_clean();
|
982 |
+
} else {
|
983 |
+
$gllr_inline_script .= ob_get_clean();
|
984 |
+
}
|
985 |
+
} else { ?>
|
986 |
<div class="gallery_box_single">
|
987 |
<p class="not_found"><?php _e( 'Sorry, nothing found.', 'gallery-plugin' ); ?></p>
|
988 |
</div><!-- .gallery_box_single -->
|
2276 |
if ( wp_script_is( 'gllr_js', 'enqueued' ) ) {
|
2277 |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
2278 |
if ( ! ( is_plugin_active( 'portfolio-pro/portfolio-pro.php' ) && wp_script_is( 'prtfl_front_script', 'registered' ) ) ) {
|
2279 |
+
wp_enqueue_script( 'gllr_fancybox_mousewheel_js', plugins_url( 'fancybox/jquery.mousewheel-3.0.4.pack.js', __FILE__ ), array( 'jquery' ), true );
|
2280 |
+
wp_enqueue_script( 'gllr_fancybox_js', plugins_url( 'fancybox/jquery.fancybox-1.3.4.pack.js', __FILE__ ), array( 'jquery' ), true );
|
2281 |
+
wp_enqueue_script( 'gllr_inline_fancybox_script', gllr_inline_fancy_script(), array( 'jquery', 'gllr_js' ), true );
|
2282 |
}
|
2283 |
+
}
|
2284 |
+
}
|
2285 |
+
}
|
2286 |
|
2287 |
+
if ( ! function_exists ( 'gllr_inline_fancy_script' ) ) {
|
2288 |
+
function gllr_inline_fancy_script() {
|
2289 |
+
if ( wp_script_is( 'gllr_js', 'enqueued' ) ) {
|
2290 |
+
global $gllr_inline_script;
|
2291 |
+
echo $gllr_inline_script;
|
2292 |
}
|
2293 |
}
|
2294 |
}
|
2295 |
|
2296 |
if ( ! function_exists ( 'gllr_shortcode' ) ) {
|
2297 |
function gllr_shortcode( $attr ) {
|
2298 |
+
global $gllr_options, $gllr_inline_script;
|
2299 |
wp_enqueue_script( 'gllr_js', plugins_url( 'js/frontend_script.js', __FILE__ ), array( 'jquery' ) );
|
2300 |
|
2301 |
if ( isset( $_GET['print'] ) ) {
|
2315 |
global $post, $wpdb, $wp_query;
|
2316 |
|
2317 |
$term = get_term( $cat_id, 'gallery_categories' );
|
2318 |
+
if ( ! empty( $term ) ) {
|
2319 |
$old_wp_query = $wp_query;
|
2320 |
|
2321 |
$args = array(
|
2512 |
<div class="gallery_box_single">
|
2513 |
<p class="not_found"><?php _e( 'Sorry, nothing found.', 'gallery-plugin' ); ?></p>
|
2514 |
</div><!-- .gallery_box_single -->
|
2515 |
+
<?php }
|
2516 |
+
$script_post_id = ( 0 == $gllr_options['single_lightbox_for_multiple_galleries'] ) ? '_' . $post->ID : '';
|
2517 |
+
$script_download_link = ( get_post_meta( $post->ID, 'gllr_download_link', true ) != '' ) ?
|
2518 |
+
'<a id="bws_gallery_download_link" href="\' + jQuery( currentOpts.orig ).attr( \'rel\' ) + \'" download="\' + jQuery( currentOpts.orig ).attr(\'rel\').substring( jQuery( currentOpts.orig ).attr(\'rel\').lastIndexOf(\'/\') + 1 ) + \'" target="_blank">' . addslashes( __( "Download high resolution image", "gallery-plugin" ) ) . ' </a>'
|
2519 |
+
:
|
2520 |
+
'';
|
2521 |
+
$script = "
|
2522 |
+
<script type=\"text/javascript\">
|
2523 |
+
( function() {
|
2524 |
+
var gllr_onload = window.onload;
|
2525 |
+
function gllr_fancy_init() {
|
2526 |
+
jQuery(document).ready( function() {
|
2527 |
+
jQuery( \"a[rel=gallery_fancybox" . $script_post_id . "]\" ).fancybox( {
|
2528 |
'transitionIn' : 'elastic',
|
2529 |
'transitionOut' : 'elastic',
|
2530 |
'titlePosition' : 'inside',
|
2531 |
'speedIn' : 500,
|
2532 |
'speedOut' : 300,
|
2533 |
+
'titleFormat' : function( title, currentArray, currentIndex, currentOpts ) {";
|
2534 |
+
$script .= " return '<div id=\"fancybox-title-inside\">' + ( title.length ? '<span id=\"bws_gallery_image_title\">' + title.replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>') + '</span><br />' : '' ) + '<span id=\"bws_gallery_image_counter\">" . __( "Image", "gallery-plugin" ) . " ' + ( currentIndex + 1 ) + ' / ' + currentArray.length + '</span></div>" . $script_download_link . "';
|
2535 |
+
}";
|
2536 |
+
if ( 1 == $gllr_options['start_slideshow'] ) {
|
2537 |
+
$script .= ",
|
2538 |
'onComplete': function() {
|
2539 |
clearTimeout( jQuery.fancybox.slider );
|
2540 |
+
jQuery.fancybox.slider = setTimeout( \"jQuery.fancybox.next()\"," . $gllr_options['slideshow_interval'] . " );
|
2541 |
+
}";
|
2542 |
+
}
|
2543 |
+
$script .= " });
|
2544 |
});
|
2545 |
+
}
|
2546 |
+
if ( typeof gllr_onload === 'function' ) {
|
2547 |
+
window.onload = function() {
|
2548 |
+
gllr_onload();
|
2549 |
+
gllr_fancy_init();
|
2550 |
+
}
|
2551 |
+
} else {
|
2552 |
+
window.onload = gllr_fancy_init;
|
2553 |
+
}
|
2554 |
+
})( 0 );
|
2555 |
+
</script>";
|
2556 |
+
if ( empty( $gllr_inline_script ) ) {
|
2557 |
+
$gllr_inline_script = $script;
|
2558 |
+
} else {
|
2559 |
+
$gllr_inline_script .= $script;
|
2560 |
+
}
|
2561 |
+
}
|
2562 |
wp_reset_query();
|
2563 |
$wp_query = $old_wp_query;
|
2564 |
}
|
js/frontend_script.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
(function($) {
|
2 |
$(document).ready( function() {
|
3 |
$( window ).resize( function() {
|
4 |
-
$( ".gllr_grid" ).each( function () {
|
5 |
var $gallery = $( this ),
|
6 |
gallery_wrap_width = $gallery.parent( '.gallery_box_single' ).width(),
|
7 |
$gallery_rows = $gallery.find( '.gllr_image_row' ),
|
1 |
(function($) {
|
2 |
$(document).ready( function() {
|
3 |
$( window ).resize( function() {
|
4 |
+
$( ".gllr_grid:visible" ).each( function () {
|
5 |
var $gallery = $( this ),
|
6 |
gallery_wrap_width = $gallery.parent( '.gallery_box_single' ).width(),
|
7 |
$gallery_rows = $gallery.find( '.gllr_image_row' ),
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://bestwebsoft.com/donate/
|
|
4 |
Tags: add album, add galleries, add images, add pictures, add albums, gallery, gallery plugin, gallery slider, fancy gallery, slideshow, lightbox, fullscreen gallery
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.6.1
|
7 |
-
Stable tag: 4.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -188,6 +188,9 @@ Please make sure that the problem hasn't been discussed yet on our forum (<http:
|
|
188 |
|
189 |
== Changelog ==
|
190 |
|
|
|
|
|
|
|
191 |
= V4.4.4 - 15.09.2016 =
|
192 |
* Update : The compatibility with Pdf&Print plugin improved.
|
193 |
* Update : Performance optimized.
|
@@ -559,6 +562,9 @@ Please make sure that the problem hasn't been discussed yet on our forum (<http:
|
|
559 |
|
560 |
== Upgrade Notice ==
|
561 |
|
|
|
|
|
|
|
562 |
= V4.4.4 =
|
563 |
* Functionality improved. Performance optimized.
|
564 |
|
4 |
Tags: add album, add galleries, add images, add pictures, add albums, gallery, gallery plugin, gallery slider, fancy gallery, slideshow, lightbox, fullscreen gallery
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.6.1
|
7 |
+
Stable tag: 4.4.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
188 |
|
189 |
== Changelog ==
|
190 |
|
191 |
+
= V4.4.5 - 19.09.2016 =
|
192 |
+
* Bugfix : The bug with displaying fancybox was fixed.
|
193 |
+
|
194 |
= V4.4.4 - 15.09.2016 =
|
195 |
* Update : The compatibility with Pdf&Print plugin improved.
|
196 |
* Update : Performance optimized.
|
562 |
|
563 |
== Upgrade Notice ==
|
564 |
|
565 |
+
= V4.4.5 =
|
566 |
+
* Bugs fixed.
|
567 |
+
|
568 |
= V4.4.4 =
|
569 |
* Functionality improved. Performance optimized.
|
570 |
|