Version Description
- Updated gallery widget
- Added new latest gallery option in gallery list
Download this release
Release Info
Developer | robosoft |
Plugin | Gallery – Photo Gallery and Images Gallery |
Version | 2.6.1 |
Comparing to | |
See all releases |
Code changes from version 2.6.0 to 2.6.1
- includes/rbs_gallery_widget.php +30 -9
- includes/rbs_gallery_widget_last.php +102 -0
- readme.txt +9 -1
- robogallery.php +5 -5
includes/rbs_gallery_widget.php
CHANGED
@@ -31,6 +31,24 @@ class rbs_widget extends WP_Widget {
|
|
31 |
echo $args['before_widget'];
|
32 |
if( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title'];
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
if( function_exists( 'rbs_pro_widget' ) ){
|
35 |
rbs_pro_widget($galleryId);
|
36 |
}
|
@@ -54,15 +72,17 @@ class rbs_widget extends WP_Widget {
|
|
54 |
$galleryId = 0;
|
55 |
}
|
56 |
$args = array(
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
66 |
);
|
67 |
?>
|
68 |
<?php
|
@@ -79,6 +99,7 @@ class rbs_widget extends WP_Widget {
|
|
79 |
<label for="<?php echo $this->get_field_id( 'galleryId' ); ?>"><?php _e( 'Gallery:' ); ?></label>
|
80 |
<?php wp_dropdown_pages( $args ); ?>
|
81 |
</p>
|
|
|
82 |
<p><?php _e( 'Configure it in','rbs_gallery');?>
|
83 |
<a href="edit.php?post_type=robo_gallery_table">
|
84 |
<?php _e( 'Robo Gallery plugin','rbs_gallery');?>
|
31 |
echo $args['before_widget'];
|
32 |
if( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title'];
|
33 |
|
34 |
+
if( $galleryId == -99 ){
|
35 |
+
|
36 |
+
$gallery_params = array(
|
37 |
+
'numberposts' => 1,
|
38 |
+
'orderby' => 'date',
|
39 |
+
'order' => 'DESC',
|
40 |
+
'post_type' => ROBO_GALLERY_TYPE_POST,
|
41 |
+
'post_status' => 'publish',
|
42 |
+
'suppress_filters' => true
|
43 |
+
);
|
44 |
+
|
45 |
+
$posts_array = get_posts( $gallery_params );
|
46 |
+
|
47 |
+
if( isset($posts_array[0]) && isset($posts_array[0]->ID) ){
|
48 |
+
$galleryId = $posts_array[0]->ID;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
if( function_exists( 'rbs_pro_widget' ) ){
|
53 |
rbs_pro_widget($galleryId);
|
54 |
}
|
72 |
$galleryId = 0;
|
73 |
}
|
74 |
$args = array(
|
75 |
+
'child_of' => 0,
|
76 |
+
'sort_order' => 'ASC',
|
77 |
+
'sort_column' => 'post_title',
|
78 |
+
'hierarchical' => 1,
|
79 |
+
'selected' => $galleryId,
|
80 |
+
'name' => $this->get_field_name( 'galleryId' ),
|
81 |
+
'id' => $this->get_field_id( 'galleryId' ),
|
82 |
+
'echo' => 1,
|
83 |
+
'post_type' => 'robo_gallery_table',
|
84 |
+
'show_option_none' => 'Latest Gallery',
|
85 |
+
'option_none_value' => '-99',
|
86 |
);
|
87 |
?>
|
88 |
<?php
|
99 |
<label for="<?php echo $this->get_field_id( 'galleryId' ); ?>"><?php _e( 'Gallery:' ); ?></label>
|
100 |
<?php wp_dropdown_pages( $args ); ?>
|
101 |
</p>
|
102 |
+
|
103 |
<p><?php _e( 'Configure it in','rbs_gallery');?>
|
104 |
<a href="edit.php?post_type=robo_gallery_table">
|
105 |
<?php _e( 'Robo Gallery plugin','rbs_gallery');?>
|
includes/rbs_gallery_widget_last.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Robo Gallery
|
4 |
+
* Version: 1.0
|
5 |
+
* By Robosoft
|
6 |
+
*
|
7 |
+
* Contact: http://robosoft.co
|
8 |
+
* Created: 2015
|
9 |
+
* Licensed under the GPLv2 license - http://opensource.org/licenses/gpl-2.0.php
|
10 |
+
*
|
11 |
+
* Copyright (c) 2014-2016, Robosoft. All rights reserved.
|
12 |
+
* Available only in http://robosoft.co/robogallery
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
16 |
+
|
17 |
+
class rbs_widget_last extends WP_Widget {
|
18 |
+
|
19 |
+
function __construct(){
|
20 |
+
parent::__construct(
|
21 |
+
'rbs_widget',
|
22 |
+
__( 'Robo Gallery Widget' , 'rbs_gallery' ),
|
23 |
+
array( 'description' => __( "Publish gallery on your website.", 'rbs_gallery' ), )
|
24 |
+
);
|
25 |
+
}
|
26 |
+
|
27 |
+
public function widget( $args, $instance ) {
|
28 |
+
$title = apply_filters( 'widget_title', $instance['title'] );
|
29 |
+
$galleryId = $instance['galleryId'];
|
30 |
+
|
31 |
+
echo $args['before_widget'];
|
32 |
+
if( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title'];
|
33 |
+
|
34 |
+
if( function_exists( 'rbs_pro_widget' ) ){
|
35 |
+
rbs_pro_widget($galleryId);
|
36 |
+
}
|
37 |
+
|
38 |
+
if(!ROBO_GALLERY_PRO) echo _e( 'This widget available in Pro version','rbs_gallery');
|
39 |
+
echo $args['after_widget'];
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
public function form( $instance ) {
|
44 |
+
if ( isset( $instance[ 'title' ] ) ) {
|
45 |
+
$title = $instance[ 'title' ];
|
46 |
+
} else {
|
47 |
+
$title = __( 'New gallery', 'rbs_gallery' );
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( isset( $instance[ 'galleryId' ] ) ) {
|
51 |
+
$galleryId = (int) $instance[ 'galleryId' ];
|
52 |
+
}
|
53 |
+
else {
|
54 |
+
$galleryId = 0;
|
55 |
+
}
|
56 |
+
$args = array(
|
57 |
+
'child_of' => 0,
|
58 |
+
'sort_order' => 'ASC',
|
59 |
+
'sort_column' => 'post_title',
|
60 |
+
'hierarchical' => 1,
|
61 |
+
'selected' => $galleryId,
|
62 |
+
'name' => $this->get_field_name( 'galleryId' ),
|
63 |
+
'id' => $this->get_field_id( 'galleryId' ),
|
64 |
+
'echo' => 1,
|
65 |
+
'post_type' => 'robo_gallery_table',
|
66 |
+
'show_option_none' => 'Last gal'
|
67 |
+
);
|
68 |
+
?>
|
69 |
+
<?php
|
70 |
+
if(!ROBO_GALLERY_PRO){ ?>
|
71 |
+
<p><a href="http://robosoft.co/go.php?product=gallery&task=gopro" target="_blank"> <?php _e( 'This widget available in Pro version','rbs_gallery');?> </a></p>
|
72 |
+
<?php } ?>
|
73 |
+
<p>
|
74 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>">
|
75 |
+
<?php _e( 'Title' ); ?>:
|
76 |
+
</label>
|
77 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
78 |
+
</p>
|
79 |
+
<p>
|
80 |
+
<label for="<?php echo $this->get_field_id( 'galleryId' ); ?>"><?php _e( 'Gallery:' ); ?></label>
|
81 |
+
<?php wp_dropdown_pages( $args ); ?>
|
82 |
+
</p>
|
83 |
+
<p><?php _e( 'Configure it in','rbs_gallery');?>
|
84 |
+
<a href="edit.php?post_type=robo_gallery_table">
|
85 |
+
<?php _e( 'Robo Gallery plugin','rbs_gallery');?>
|
86 |
+
</a>
|
87 |
+
</p>
|
88 |
+
<script type="text/javascript">jQuery(function(){ jQuery('#<?php echo $this->get_field_id( 'galleryId' ); ?>').addClass('widefat'); });</script>
|
89 |
+
<?php
|
90 |
+
}
|
91 |
+
|
92 |
+
public function update( $new_instance, $old_instance ) {
|
93 |
+
$instance = array();
|
94 |
+
$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
|
95 |
+
$instance['galleryId'] = ( ! empty( $new_instance['galleryId'] ) ) ? (int) $new_instance['galleryId'] : 0;
|
96 |
+
return $instance;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
function rbs_load_widget(){ register_widget( 'rbs_widget' ); }
|
101 |
+
|
102 |
+
add_action( 'widgets_init', 'rbs_load_widget' );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://robosoft.co/robogallery
|
|
4 |
Tags: gallery, photo gallery, images gallery, gallery images, responsive gallery, categories gallery, Polaroid gallery, gallery lightbox, portfolio gallery, video gallery, Gallery Plugin, Robo Gallery
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -254,6 +254,10 @@ If any problem occurs, please contact us.
|
|
254 |
|
255 |
== Changelog ==
|
256 |
|
|
|
|
|
|
|
|
|
257 |
= 2.6.0 =
|
258 |
* Fixed PHP Compatibility Checker warnings
|
259 |
|
@@ -331,6 +335,10 @@ If any problem occurs, please contact us.
|
|
331 |
|
332 |
== Upgrade Notice ==
|
333 |
|
|
|
|
|
|
|
|
|
334 |
= 2.6.0 =
|
335 |
Fixed PHP Compatibility Checker warnings
|
336 |
|
4 |
Tags: gallery, photo gallery, images gallery, gallery images, responsive gallery, categories gallery, Polaroid gallery, gallery lightbox, portfolio gallery, video gallery, Gallery Plugin, Robo Gallery
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.6.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
254 |
|
255 |
== Changelog ==
|
256 |
|
257 |
+
= 2.6.1 =
|
258 |
+
* Updated gallery widget
|
259 |
+
* Added new latest gallery option in gallery list
|
260 |
+
|
261 |
= 2.6.0 =
|
262 |
* Fixed PHP Compatibility Checker warnings
|
263 |
|
335 |
|
336 |
== Upgrade Notice ==
|
337 |
|
338 |
+
= 2.6.1 =
|
339 |
+
Updated gallery widget
|
340 |
+
Added new latest gallery option in gallery list
|
341 |
+
|
342 |
= 2.6.0 =
|
343 |
Fixed PHP Compatibility Checker warnings
|
344 |
|
robogallery.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Robo Gallery
|
4 |
Description: Gallery modes photo gallery, images gallery, video gallery, Polaroid gallery, gallery lighbox, portfolio gallery, responsive gallery
|
5 |
-
Version: 2.6.
|
6 |
Author: RoboSoft
|
7 |
Plugin URI: http://robosoft.co/gallery
|
8 |
Author URI: http://robosoft.co/gallery
|
@@ -15,13 +15,13 @@ if(!defined('WPINC'))die;
|
|
15 |
if(!defined("ABSPATH"))exit;
|
16 |
|
17 |
define("ROBO_GALLERY", 1);
|
18 |
-
define("ROBO_GALLERY_VERSION", '2.6.
|
19 |
|
20 |
if( !defined("ROBO_GALLERY_PATH") ) define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
|
21 |
|
22 |
-
define("ROBO_GALLERY_SPECIAL",
|
23 |
-
define("ROBO_GALLERY_EVENT_DATE", '
|
24 |
-
define("ROBO_GALLERY_EVENT_HOUR",
|
25 |
|
26 |
add_action( 'plugins_loaded', 'rbs_gallery_load_textdomain' );
|
27 |
function rbs_gallery_load_textdomain() {
|
2 |
/*
|
3 |
Plugin Name: Robo Gallery
|
4 |
Description: Gallery modes photo gallery, images gallery, video gallery, Polaroid gallery, gallery lighbox, portfolio gallery, responsive gallery
|
5 |
+
Version: 2.6.1
|
6 |
Author: RoboSoft
|
7 |
Plugin URI: http://robosoft.co/gallery
|
8 |
Author URI: http://robosoft.co/gallery
|
15 |
if(!defined("ABSPATH"))exit;
|
16 |
|
17 |
define("ROBO_GALLERY", 1);
|
18 |
+
define("ROBO_GALLERY_VERSION", '2.6.1');
|
19 |
|
20 |
if( !defined("ROBO_GALLERY_PATH") ) define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
|
21 |
|
22 |
+
define("ROBO_GALLERY_SPECIAL", 0);
|
23 |
+
define("ROBO_GALLERY_EVENT_DATE", '2016-12-08');
|
24 |
+
define("ROBO_GALLERY_EVENT_HOUR", 20);
|
25 |
|
26 |
add_action( 'plugins_loaded', 'rbs_gallery_load_textdomain' );
|
27 |
function rbs_gallery_load_textdomain() {
|