Version Description
- FIX: Obsolete Code Removed
- FIX: Proper Sanitization, Escaping, Validation of all Post Calls
- FIX: Obsolete Code Removed
- FIX: Code Optimized
Download this release
Release Info
Developer | contact-banker |
Plugin | Gallery Bank: WordPress Photo Gallery Plugin |
Version | 3.1.40 |
Comparing to | |
See all releases |
Code changes from version 3.1.39 to 3.1.40
- front_views/includes_common_after.php +8 -8
- gallery-bank.php +2 -17
- lib/add-new-album-class.php +0 -10
- lib/front-view-all-albums-class.php +0 -1
- lib/gallery-bank-class.php +0 -36
- lib/include_settings.php +0 -1
- lib/install-script.php +0 -13
- lib/upload.php +0 -1
- readme.txt +15 -8
- uninstall.php +0 -1
- views/dashboard.php +0 -5
- views/gallery-bank-system-report.php +32 -32
- views/gallery-feedback.php +3 -1
- views/header.php +0 -3
- views/includes_common_after.php +7 -7
- views/recommended-plugins.php +0 -1
front_views/includes_common_after.php
CHANGED
@@ -241,14 +241,14 @@ if ($album_type == "images") {
|
|
241 |
var google_plus_icon = "<g:plusone data-action='share' href='" + encodeURIComponent(location.href.replace(location.hash, '')) + "' width='160px' style='margin-left:5px; display:inline-block;'></g:plusone>";
|
242 |
jQuery(".pp_social").append(google_plus_icon);
|
243 |
jQuery(".pp_social").append("<script type='text/javascript'>\
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
}
|
253 |
</script>
|
254 |
<?php
|
241 |
var google_plus_icon = "<g:plusone data-action='share' href='" + encodeURIComponent(location.href.replace(location.hash, '')) + "' width='160px' style='margin-left:5px; display:inline-block;'></g:plusone>";
|
242 |
jQuery(".pp_social").append(google_plus_icon);
|
243 |
jQuery(".pp_social").append("<script type='text/javascript'>\
|
244 |
+
(function() { \
|
245 |
+
var po = document.createElement('script');\
|
246 |
+
po.type = 'text/javascript';\
|
247 |
+
po.async = true;\
|
248 |
+
po.src = 'https://apis.google.com/js/plusone.js';\
|
249 |
+
var s = document.getElementsByTagName('script')[0];\
|
250 |
+
s.parentNode.insertBefore(po, s);\
|
251 |
+
})(); <" + "/" + "script>");
|
252 |
}
|
253 |
</script>
|
254 |
<?php
|
gallery-bank.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/*
|
4 |
-
* Plugin Name:
|
5 |
* Plugin URI: http://tech-banker.com
|
6 |
* Description: Gallery Bank is an easy to use Responsive WordPress Gallery Plugin for photos, videos, galleries and albums.
|
7 |
* Author: Tech Banker
|
@@ -41,7 +40,7 @@ if (!defined("GALLERY_BK_PLUGIN_BASENAME"))
|
|
41 |
if (!defined("tech_banker_stats_url"))
|
42 |
define("tech_banker_stats_url", "http://stats.tech-banker-services.org");
|
43 |
if (!defined("gallery_bank_version_number"))
|
44 |
-
define("gallery_bank_version_number", "3.1.
|
45 |
|
46 |
|
47 |
if (!is_dir(GALLERY_MAIN_DIR)) {
|
@@ -71,7 +70,6 @@ if (file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/gallery-bank-class.php")) {
|
|
71 |
require_once(GALLERY_BK_PLUGIN_DIR . "/lib/gallery-bank-class.php");
|
72 |
}
|
73 |
/* * ********************************************************************************** */
|
74 |
-
|
75 |
function plugin_install_script_for_gallery_bank() {
|
76 |
global $wpdb, $current_user;
|
77 |
if (!is_user_logged_in()) {
|
@@ -99,11 +97,8 @@ function plugin_install_script_for_gallery_bank() {
|
|
99 |
}
|
100 |
}
|
101 |
}
|
102 |
-
|
103 |
/* * ********************************************************************************** */
|
104 |
-
|
105 |
class class_plugin_info_gallery_bank {
|
106 |
-
|
107 |
function get_plugin_info() {
|
108 |
$active_plugins = (array) get_option("active_plugins", array());
|
109 |
if (is_multisite())
|
@@ -122,11 +117,8 @@ class class_plugin_info_gallery_bank {
|
|
122 |
return $plugins;
|
123 |
}
|
124 |
}
|
125 |
-
|
126 |
}
|
127 |
-
|
128 |
/* * ********************************************************************************** */
|
129 |
-
|
130 |
function deactivation_function_for_gallery_bank() {
|
131 |
$type = get_option("gallery-bank-wizard");
|
132 |
if ($type == "opt_in") {
|
@@ -179,15 +171,11 @@ function deactivation_function_for_gallery_bank() {
|
|
179 |
}
|
180 |
}
|
181 |
}
|
182 |
-
|
183 |
/* * ********************************************************************************** */
|
184 |
-
|
185 |
function gallery_bank_plugin_load_text_domain() {
|
186 |
load_plugin_textdomain("gallery-bank", false, GALLERY_BK_PLUGIN_DIRNAME . "/lang");
|
187 |
}
|
188 |
-
|
189 |
/* * ********************************************************************************** */
|
190 |
-
|
191 |
function add_gallery_bank_icon($meta = TRUE) {
|
192 |
global $wp_admin_bar, $wpdb, $current_user;
|
193 |
if (!is_user_logged_in()) {
|
@@ -435,9 +423,7 @@ function add_gallery_bank_icon($meta = TRUE) {
|
|
435 |
break;
|
436 |
}
|
437 |
}
|
438 |
-
|
439 |
/* * ********************************************************************************** */
|
440 |
-
|
441 |
function gallery_bank_custom_plugin_row($links, $file) {
|
442 |
if ($file == GALLERY_BK_PLUGIN_BASENAME) {
|
443 |
$gallery_bank_row_meta = array(
|
@@ -448,7 +434,6 @@ function gallery_bank_custom_plugin_row($links, $file) {
|
|
448 |
}
|
449 |
return (array) $links;
|
450 |
}
|
451 |
-
|
452 |
/* * ********************************************************************************** */
|
453 |
$version = get_option("gallery-bank-pro-edition");
|
454 |
if ($version != "") {
|
1 |
<?php
|
|
|
2 |
/*
|
3 |
+
* Plugin Name: Gallery Bank Lite Edition
|
4 |
* Plugin URI: http://tech-banker.com
|
5 |
* Description: Gallery Bank is an easy to use Responsive WordPress Gallery Plugin for photos, videos, galleries and albums.
|
6 |
* Author: Tech Banker
|
40 |
if (!defined("tech_banker_stats_url"))
|
41 |
define("tech_banker_stats_url", "http://stats.tech-banker-services.org");
|
42 |
if (!defined("gallery_bank_version_number"))
|
43 |
+
define("gallery_bank_version_number", "3.1.39");
|
44 |
|
45 |
|
46 |
if (!is_dir(GALLERY_MAIN_DIR)) {
|
70 |
require_once(GALLERY_BK_PLUGIN_DIR . "/lib/gallery-bank-class.php");
|
71 |
}
|
72 |
/* * ********************************************************************************** */
|
|
|
73 |
function plugin_install_script_for_gallery_bank() {
|
74 |
global $wpdb, $current_user;
|
75 |
if (!is_user_logged_in()) {
|
97 |
}
|
98 |
}
|
99 |
}
|
|
|
100 |
/* * ********************************************************************************** */
|
|
|
101 |
class class_plugin_info_gallery_bank {
|
|
|
102 |
function get_plugin_info() {
|
103 |
$active_plugins = (array) get_option("active_plugins", array());
|
104 |
if (is_multisite())
|
117 |
return $plugins;
|
118 |
}
|
119 |
}
|
|
|
120 |
}
|
|
|
121 |
/* * ********************************************************************************** */
|
|
|
122 |
function deactivation_function_for_gallery_bank() {
|
123 |
$type = get_option("gallery-bank-wizard");
|
124 |
if ($type == "opt_in") {
|
171 |
}
|
172 |
}
|
173 |
}
|
|
|
174 |
/* * ********************************************************************************** */
|
|
|
175 |
function gallery_bank_plugin_load_text_domain() {
|
176 |
load_plugin_textdomain("gallery-bank", false, GALLERY_BK_PLUGIN_DIRNAME . "/lang");
|
177 |
}
|
|
|
178 |
/* * ********************************************************************************** */
|
|
|
179 |
function add_gallery_bank_icon($meta = TRUE) {
|
180 |
global $wp_admin_bar, $wpdb, $current_user;
|
181 |
if (!is_user_logged_in()) {
|
423 |
break;
|
424 |
}
|
425 |
}
|
|
|
426 |
/* * ********************************************************************************** */
|
|
|
427 |
function gallery_bank_custom_plugin_row($links, $file) {
|
428 |
if ($file == GALLERY_BK_PLUGIN_BASENAME) {
|
429 |
$gallery_bank_row_meta = array(
|
434 |
}
|
435 |
return (array) $links;
|
436 |
}
|
|
|
437 |
/* * ********************************************************************************** */
|
438 |
$version = get_option("gallery-bank-pro-edition");
|
439 |
if ($version != "") {
|
lib/add-new-album-class.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
if (!defined("ABSPATH"))
|
4 |
exit; //exit if accessed directly
|
5 |
$dynamicArray = array();
|
@@ -20,7 +19,6 @@ if (!current_user_can($user_role_permission)) {
|
|
20 |
} else {
|
21 |
|
22 |
class class_installed_plugin_info_gallery_bank {
|
23 |
-
|
24 |
function get_plugin_info() {
|
25 |
$active_plugins = (array) get_option("active_plugins", array());
|
26 |
if (is_multisite())
|
@@ -39,11 +37,8 @@ if (!current_user_can($user_role_permission)) {
|
|
39 |
return $plugins;
|
40 |
}
|
41 |
}
|
42 |
-
|
43 |
}
|
44 |
-
|
45 |
/* * ****************************************Code for process_image_upload********************* */
|
46 |
-
|
47 |
function process_image_upload($image, $width, $height) {
|
48 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
49 |
$temp_image_name = $image;
|
@@ -59,9 +54,7 @@ if (!current_user_can($user_role_permission)) {
|
|
59 |
$result = generate_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
60 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
61 |
}
|
62 |
-
|
63 |
/* * ****************************************Code for Album cover thumbs Creation********************* */
|
64 |
-
|
65 |
function process_album_upload($album_image, $width, $height) {
|
66 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
67 |
$temp_image_name = $album_image;
|
@@ -77,9 +70,7 @@ if (!current_user_can($user_role_permission)) {
|
|
77 |
$result = generate_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
78 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
79 |
}
|
80 |
-
|
81 |
/* * ****************************************Code for generate_thumbnail********************* */
|
82 |
-
|
83 |
function generate_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight) {
|
84 |
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
85 |
$source_gd_image = false;
|
@@ -138,7 +129,6 @@ if (!current_user_can($user_role_permission)) {
|
|
138 |
imagedestroy($thumbnail_gd_image);
|
139 |
return true;
|
140 |
}
|
141 |
-
|
142 |
/* * ****************************************Code for generate_thumbnail********************* */
|
143 |
|
144 |
if (isset($_REQUEST["param"])) {
|
1 |
<?php
|
|
|
2 |
if (!defined("ABSPATH"))
|
3 |
exit; //exit if accessed directly
|
4 |
$dynamicArray = array();
|
19 |
} else {
|
20 |
|
21 |
class class_installed_plugin_info_gallery_bank {
|
|
|
22 |
function get_plugin_info() {
|
23 |
$active_plugins = (array) get_option("active_plugins", array());
|
24 |
if (is_multisite())
|
37 |
return $plugins;
|
38 |
}
|
39 |
}
|
|
|
40 |
}
|
|
|
41 |
/* * ****************************************Code for process_image_upload********************* */
|
|
|
42 |
function process_image_upload($image, $width, $height) {
|
43 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
44 |
$temp_image_name = $image;
|
54 |
$result = generate_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
55 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
56 |
}
|
|
|
57 |
/* * ****************************************Code for Album cover thumbs Creation********************* */
|
|
|
58 |
function process_album_upload($album_image, $width, $height) {
|
59 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
60 |
$temp_image_name = $album_image;
|
70 |
$result = generate_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
71 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
72 |
}
|
|
|
73 |
/* * ****************************************Code for generate_thumbnail********************* */
|
|
|
74 |
function generate_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight) {
|
75 |
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
76 |
$source_gd_image = false;
|
129 |
imagedestroy($thumbnail_gd_image);
|
130 |
return true;
|
131 |
}
|
|
|
132 |
/* * ****************************************Code for generate_thumbnail********************* */
|
133 |
|
134 |
if (isset($_REQUEST["param"])) {
|
lib/front-view-all-albums-class.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
if (!defined("ABSPATH"))
|
4 |
exit; //exit if accessed directly
|
5 |
if (isset($_REQUEST["param"])) {
|
1 |
<?php
|
|
|
2 |
if (!defined("ABSPATH"))
|
3 |
exit; //exit if accessed directly
|
4 |
if (isset($_REQUEST["param"])) {
|
lib/gallery-bank-class.php
CHANGED
@@ -1,11 +1,9 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
if (!defined("ABSPATH"))
|
4 |
exit; //exit if accessed directly
|
5 |
//--------------------------------------------------------------------------------------------------------------//
|
6 |
// CODE FOR CREATING MENUS
|
7 |
//---------------------------------------------------------------------------------------------------------------//
|
8 |
-
|
9 |
function create_global_menus_for_gallery_bank() {
|
10 |
global $wpdb, $current_user;
|
11 |
if (is_super_admin()) {
|
@@ -87,7 +85,6 @@ function create_global_menus_for_gallery_bank() {
|
|
87 |
break;
|
88 |
}
|
89 |
}
|
90 |
-
|
91 |
//--------------------------------------------------------------------------------------------------------------//
|
92 |
// FUNCTIONS FOR REPLACING TABLE NAMES
|
93 |
//--------------------------------------------------------------------------------------------------------------//
|
@@ -96,17 +93,14 @@ function gallery_bank_albums() {
|
|
96 |
global $wpdb;
|
97 |
return $wpdb->prefix . "gallery_albums";
|
98 |
}
|
99 |
-
|
100 |
function gallery_bank_pics() {
|
101 |
global $wpdb;
|
102 |
return $wpdb->prefix . "gallery_pics";
|
103 |
}
|
104 |
-
|
105 |
function gallery_bank_settings() {
|
106 |
global $wpdb;
|
107 |
return $wpdb->prefix . "gallery_settings";
|
108 |
}
|
109 |
-
|
110 |
//--------------------------------------------------------------------------------------------------------------//
|
111 |
// CODE FOR CREATING PAGES
|
112 |
//---------------------------------------------------------------------------------------------------------------//
|
@@ -124,7 +118,6 @@ function gallery_bank_wizard() {
|
|
124 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/wizard.php";
|
125 |
}
|
126 |
}
|
127 |
-
|
128 |
function gallery_bank() {
|
129 |
global $wpdb, $current_user, $user_role_permission;
|
130 |
if (is_super_admin()) {
|
@@ -141,7 +134,6 @@ function gallery_bank() {
|
|
141 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/dashboard.php";
|
142 |
}
|
143 |
}
|
144 |
-
|
145 |
function gallery_bank_shortcode() {
|
146 |
global $wpdb, $current_user, $wp_version;
|
147 |
if (is_super_admin()) {
|
@@ -158,7 +150,6 @@ function gallery_bank_shortcode() {
|
|
158 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/shortcode.php";
|
159 |
}
|
160 |
}
|
161 |
-
|
162 |
function save_album() {
|
163 |
global $wpdb, $current_user, $user_role_permission;
|
164 |
if (is_super_admin()) {
|
@@ -183,7 +174,6 @@ function save_album() {
|
|
183 |
header("Location:admin.php?page=gallery_bank");
|
184 |
}
|
185 |
}
|
186 |
-
|
187 |
function global_settings() {
|
188 |
global $wpdb, $current_user, $wp_version;
|
189 |
if (is_super_admin()) {
|
@@ -200,7 +190,6 @@ function global_settings() {
|
|
200 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/settings.php";
|
201 |
}
|
202 |
}
|
203 |
-
|
204 |
function gallery_album_sorting() {
|
205 |
global $wpdb, $current_user, $user_role_permission;
|
206 |
if (is_super_admin()) {
|
@@ -217,7 +206,6 @@ function gallery_album_sorting() {
|
|
217 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-sorting.php";
|
218 |
}
|
219 |
}
|
220 |
-
|
221 |
function images_sorting() {
|
222 |
global $wpdb, $current_user, $user_role_permission;
|
223 |
if (is_super_admin()) {
|
@@ -234,7 +222,6 @@ function images_sorting() {
|
|
234 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/images-sorting.php";
|
235 |
}
|
236 |
}
|
237 |
-
|
238 |
function album_preview() {
|
239 |
global $wpdb, $current_user, $user_role_permission;
|
240 |
if (is_super_admin()) {
|
@@ -251,7 +238,6 @@ function album_preview() {
|
|
251 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-preview.php";
|
252 |
}
|
253 |
}
|
254 |
-
|
255 |
function gallery_bank_system_status() {
|
256 |
global $wpdb, $wp_version, $current_user, $user_role_permission;
|
257 |
if (is_super_admin()) {
|
@@ -268,7 +254,6 @@ function gallery_bank_system_status() {
|
|
268 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-bank-system-report.php";
|
269 |
}
|
270 |
}
|
271 |
-
|
272 |
function gallery_bank_purchase() {
|
273 |
global $wpdb, $current_user, $user_role_permission;
|
274 |
if (is_super_admin()) {
|
@@ -285,7 +270,6 @@ function gallery_bank_purchase() {
|
|
285 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/purchase_pro_version.php";
|
286 |
}
|
287 |
}
|
288 |
-
|
289 |
function gallery_bank_recommended_plugins() {
|
290 |
global $wpdb, $current_user, $user_role_permission;
|
291 |
if (is_super_admin()) {
|
@@ -302,7 +286,6 @@ function gallery_bank_recommended_plugins() {
|
|
302 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/recommended-plugins.php";
|
303 |
}
|
304 |
}
|
305 |
-
|
306 |
function gallery_bank_other_services() {
|
307 |
global $wpdb, $current_user, $user_role_permission;
|
308 |
if (is_super_admin()) {
|
@@ -319,7 +302,6 @@ function gallery_bank_other_services() {
|
|
319 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/other-services.php";
|
320 |
}
|
321 |
}
|
322 |
-
|
323 |
function gallery_bank_other_setings() {
|
324 |
global $wpdb, $current_user, $user_role_permission;
|
325 |
if (is_super_admin()) {
|
@@ -336,7 +318,6 @@ function gallery_bank_other_setings() {
|
|
336 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/other-settings.php";
|
337 |
}
|
338 |
}
|
339 |
-
|
340 |
function gallery_bank_feature_request() {
|
341 |
global $wpdb, $current_user, $user_role_permission;
|
342 |
if (is_super_admin()) {
|
@@ -353,7 +334,6 @@ function gallery_bank_feature_request() {
|
|
353 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-feedback.php";
|
354 |
}
|
355 |
}
|
356 |
-
|
357 |
//--------------------------------------------------------------------------------------------------------------//
|
358 |
//CODE FOR CALLING JAVASCRIPT FUNCTIONS
|
359 |
//--------------------------------------------------------------------------------------------------------------//
|
@@ -374,7 +354,6 @@ function backend_scripts_calls() {
|
|
374 |
wp_enqueue_script("jquery.pretty-photo.js", plugins_url("/assets/js/jquery.pretty-photo.js", dirname(__FILE__)));
|
375 |
wp_enqueue_style("google-fonts-roboto", "http://fonts.googleapis.com/css?family=Roboto Condensed:300|Roboto Condensed:300|Roboto Condensed:300|Roboto Condensed:regular|Roboto Condensed:300");
|
376 |
}
|
377 |
-
|
378 |
function frontend_plugin_js_scripts_gallery_bank() {
|
379 |
wp_enqueue_script("jquery");
|
380 |
wp_enqueue_script("jquery.masonry.min.js", plugins_url("/assets/js/jquery.masonry.min.js", dirname(__FILE__)));
|
@@ -382,7 +361,6 @@ function frontend_plugin_js_scripts_gallery_bank() {
|
|
382 |
wp_enqueue_script("img-liquid", plugins_url("/assets/js/img-liquid.js", dirname(__FILE__)));
|
383 |
wp_enqueue_script("jquery.pretty-photo.js", plugins_url("/assets/js/jquery.pretty-photo.js", dirname(__FILE__)));
|
384 |
}
|
385 |
-
|
386 |
//--------------------------------------------------------------------------------------------------------------//
|
387 |
// CODE FOR CALLING STYLE SHEETS
|
388 |
//--------------------------------------------------------------------------------------------------------------//
|
@@ -400,12 +378,10 @@ function backend_css_calls() {
|
|
400 |
wp_enqueue_style("premium-edition.css", plugins_url("/assets/css/premium-edition.css", dirname(__FILE__)));
|
401 |
wp_enqueue_style("responsive.css", plugins_url("/assets/css/responsive.css", dirname(__FILE__)));
|
402 |
}
|
403 |
-
|
404 |
function frontend_plugin_css_scripts_gallery_bank() {
|
405 |
wp_enqueue_style("gallery-bank.css", plugins_url("/assets/css/gallery-bank.css", dirname(__FILE__)));
|
406 |
wp_enqueue_style("pretty-photo.css", plugins_url("/assets/css/pretty-photo.css", dirname(__FILE__)));
|
407 |
}
|
408 |
-
|
409 |
//--------------------------------------------------------------------------------------------------------------//
|
410 |
// REGISTER AJAX BASED FUNCTIONS TO BE CALLED ON ACTION TYPE AS PER WORDPRESS GUIDELINES
|
411 |
//--------------------------------------------------------------------------------------------------------------//
|
@@ -413,7 +389,6 @@ if (isset($_REQUEST["action"])) {
|
|
413 |
switch (esc_attr($_REQUEST["action"])) {
|
414 |
case "add_new_album_library":
|
415 |
add_action("admin_init", "album_gallery_library");
|
416 |
-
|
417 |
function album_gallery_library() {
|
418 |
global $wpdb, $current_user, $user_role_permission;
|
419 |
if (is_super_admin()) {
|
@@ -427,21 +402,17 @@ if (isset($_REQUEST["action"])) {
|
|
427 |
include_once GALLERY_BK_PLUGIN_DIR . "/lib/add-new-album-class.php";
|
428 |
}
|
429 |
}
|
430 |
-
|
431 |
break;
|
432 |
case "front_view_all_albums_library":
|
433 |
add_action("admin_init", "front_view_all_albums_library");
|
434 |
-
|
435 |
function front_view_all_albums_library() {
|
436 |
if (file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/front-view-all-albums-class.php")) {
|
437 |
include_once GALLERY_BK_PLUGIN_DIR . "/lib/front-view-all-albums-class.php";
|
438 |
}
|
439 |
}
|
440 |
-
|
441 |
break;
|
442 |
case "upload_library":
|
443 |
add_action("admin_init", "upload_library");
|
444 |
-
|
445 |
function upload_library() {
|
446 |
global $wpdb, $current_user, $user_role_permission;
|
447 |
if (is_super_admin()) {
|
@@ -455,28 +426,23 @@ if (isset($_REQUEST["action"])) {
|
|
455 |
include_once GALLERY_BK_PLUGIN_DIR . "/lib/upload.php";
|
456 |
}
|
457 |
}
|
458 |
-
|
459 |
break;
|
460 |
}
|
461 |
}
|
462 |
|
463 |
/* * *********************************************************************************************** */
|
464 |
add_action("media_buttons_context", "add_gallery_shortcode_button", 1);
|
465 |
-
|
466 |
function add_gallery_shortcode_button($context) {
|
467 |
add_thickbox();
|
468 |
$context .= "<a href=\"#TB_inline?width=800&height=530&inlineId=my-gallery-content-id\" class=\"button thickbox\"
|
469 |
title=\"" . __("Add Gallery using Gallery Bank", "gallery-bank") . "\"><span class=\"gallery_icon\"></span> Gallery Bank</a>";
|
470 |
return $context;
|
471 |
}
|
472 |
-
|
473 |
add_action("admin_footer", "add_gallery_bank_popup");
|
474 |
-
|
475 |
function add_gallery_bank_popup() {
|
476 |
add_thickbox();
|
477 |
require_once GALLERY_BK_PLUGIN_DIR . "/front_views/gallery-bank-shortcode.php";
|
478 |
}
|
479 |
-
|
480 |
function gallery_bank_short_code($atts) {
|
481 |
extract(shortcode_atts(array(
|
482 |
"album_id" => "",
|
@@ -504,7 +470,6 @@ function gallery_bank_short_code($atts) {
|
|
504 |
return extract_short_code_for_gallery_images(intval($album_id), $type, $format, $title, $desc, $img_in_row, $responsive, $albums_in_row, $special_effect, $animation_effect, $image_width, $album_title, urldecode($show_albums), $thumb_width, $thumb_height, $display, intval($no_of_images), $sort_by, $widget);
|
505 |
}
|
506 |
}
|
507 |
-
|
508 |
function extract_short_code_for_gallery_images($album_id, $album_type, $gallery_type, $img_title, $img_desc, $img_in_row, $responsive, $albums_in_row, $special_effect, $animation_effect, $image_width, $album_title, $show_albums, $thumb_width, $thumb_height, $display, $no_of_images, $sort_by, $widget) {
|
509 |
if (preg_match("/^\d+(?:,\d+)*$/", $show_albums) || $show_albums == "all" || $show_albums == "") {
|
510 |
ob_start();
|
@@ -552,7 +517,6 @@ function extract_short_code_for_gallery_images($album_id, $album_type, $gallery_
|
|
552 |
return $gallery_bank_output_album;
|
553 |
}
|
554 |
}
|
555 |
-
|
556 |
/* * ************************************************************************************************************** */
|
557 |
add_shortcode("gallery_bank", "gallery_bank_short_code");
|
558 |
add_action("admin_init", "backend_scripts_calls");
|
1 |
<?php
|
|
|
2 |
if (!defined("ABSPATH"))
|
3 |
exit; //exit if accessed directly
|
4 |
//--------------------------------------------------------------------------------------------------------------//
|
5 |
// CODE FOR CREATING MENUS
|
6 |
//---------------------------------------------------------------------------------------------------------------//
|
|
|
7 |
function create_global_menus_for_gallery_bank() {
|
8 |
global $wpdb, $current_user;
|
9 |
if (is_super_admin()) {
|
85 |
break;
|
86 |
}
|
87 |
}
|
|
|
88 |
//--------------------------------------------------------------------------------------------------------------//
|
89 |
// FUNCTIONS FOR REPLACING TABLE NAMES
|
90 |
//--------------------------------------------------------------------------------------------------------------//
|
93 |
global $wpdb;
|
94 |
return $wpdb->prefix . "gallery_albums";
|
95 |
}
|
|
|
96 |
function gallery_bank_pics() {
|
97 |
global $wpdb;
|
98 |
return $wpdb->prefix . "gallery_pics";
|
99 |
}
|
|
|
100 |
function gallery_bank_settings() {
|
101 |
global $wpdb;
|
102 |
return $wpdb->prefix . "gallery_settings";
|
103 |
}
|
|
|
104 |
//--------------------------------------------------------------------------------------------------------------//
|
105 |
// CODE FOR CREATING PAGES
|
106 |
//---------------------------------------------------------------------------------------------------------------//
|
118 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/wizard.php";
|
119 |
}
|
120 |
}
|
|
|
121 |
function gallery_bank() {
|
122 |
global $wpdb, $current_user, $user_role_permission;
|
123 |
if (is_super_admin()) {
|
134 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/dashboard.php";
|
135 |
}
|
136 |
}
|
|
|
137 |
function gallery_bank_shortcode() {
|
138 |
global $wpdb, $current_user, $wp_version;
|
139 |
if (is_super_admin()) {
|
150 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/shortcode.php";
|
151 |
}
|
152 |
}
|
|
|
153 |
function save_album() {
|
154 |
global $wpdb, $current_user, $user_role_permission;
|
155 |
if (is_super_admin()) {
|
174 |
header("Location:admin.php?page=gallery_bank");
|
175 |
}
|
176 |
}
|
|
|
177 |
function global_settings() {
|
178 |
global $wpdb, $current_user, $wp_version;
|
179 |
if (is_super_admin()) {
|
190 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/settings.php";
|
191 |
}
|
192 |
}
|
|
|
193 |
function gallery_album_sorting() {
|
194 |
global $wpdb, $current_user, $user_role_permission;
|
195 |
if (is_super_admin()) {
|
206 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-sorting.php";
|
207 |
}
|
208 |
}
|
|
|
209 |
function images_sorting() {
|
210 |
global $wpdb, $current_user, $user_role_permission;
|
211 |
if (is_super_admin()) {
|
222 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/images-sorting.php";
|
223 |
}
|
224 |
}
|
|
|
225 |
function album_preview() {
|
226 |
global $wpdb, $current_user, $user_role_permission;
|
227 |
if (is_super_admin()) {
|
238 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-preview.php";
|
239 |
}
|
240 |
}
|
|
|
241 |
function gallery_bank_system_status() {
|
242 |
global $wpdb, $wp_version, $current_user, $user_role_permission;
|
243 |
if (is_super_admin()) {
|
254 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-bank-system-report.php";
|
255 |
}
|
256 |
}
|
|
|
257 |
function gallery_bank_purchase() {
|
258 |
global $wpdb, $current_user, $user_role_permission;
|
259 |
if (is_super_admin()) {
|
270 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/purchase_pro_version.php";
|
271 |
}
|
272 |
}
|
|
|
273 |
function gallery_bank_recommended_plugins() {
|
274 |
global $wpdb, $current_user, $user_role_permission;
|
275 |
if (is_super_admin()) {
|
286 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/recommended-plugins.php";
|
287 |
}
|
288 |
}
|
|
|
289 |
function gallery_bank_other_services() {
|
290 |
global $wpdb, $current_user, $user_role_permission;
|
291 |
if (is_super_admin()) {
|
302 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/other-services.php";
|
303 |
}
|
304 |
}
|
|
|
305 |
function gallery_bank_other_setings() {
|
306 |
global $wpdb, $current_user, $user_role_permission;
|
307 |
if (is_super_admin()) {
|
318 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/other-settings.php";
|
319 |
}
|
320 |
}
|
|
|
321 |
function gallery_bank_feature_request() {
|
322 |
global $wpdb, $current_user, $user_role_permission;
|
323 |
if (is_super_admin()) {
|
334 |
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-feedback.php";
|
335 |
}
|
336 |
}
|
|
|
337 |
//--------------------------------------------------------------------------------------------------------------//
|
338 |
//CODE FOR CALLING JAVASCRIPT FUNCTIONS
|
339 |
//--------------------------------------------------------------------------------------------------------------//
|
354 |
wp_enqueue_script("jquery.pretty-photo.js", plugins_url("/assets/js/jquery.pretty-photo.js", dirname(__FILE__)));
|
355 |
wp_enqueue_style("google-fonts-roboto", "http://fonts.googleapis.com/css?family=Roboto Condensed:300|Roboto Condensed:300|Roboto Condensed:300|Roboto Condensed:regular|Roboto Condensed:300");
|
356 |
}
|
|
|
357 |
function frontend_plugin_js_scripts_gallery_bank() {
|
358 |
wp_enqueue_script("jquery");
|
359 |
wp_enqueue_script("jquery.masonry.min.js", plugins_url("/assets/js/jquery.masonry.min.js", dirname(__FILE__)));
|
361 |
wp_enqueue_script("img-liquid", plugins_url("/assets/js/img-liquid.js", dirname(__FILE__)));
|
362 |
wp_enqueue_script("jquery.pretty-photo.js", plugins_url("/assets/js/jquery.pretty-photo.js", dirname(__FILE__)));
|
363 |
}
|
|
|
364 |
//--------------------------------------------------------------------------------------------------------------//
|
365 |
// CODE FOR CALLING STYLE SHEETS
|
366 |
//--------------------------------------------------------------------------------------------------------------//
|
378 |
wp_enqueue_style("premium-edition.css", plugins_url("/assets/css/premium-edition.css", dirname(__FILE__)));
|
379 |
wp_enqueue_style("responsive.css", plugins_url("/assets/css/responsive.css", dirname(__FILE__)));
|
380 |
}
|
|
|
381 |
function frontend_plugin_css_scripts_gallery_bank() {
|
382 |
wp_enqueue_style("gallery-bank.css", plugins_url("/assets/css/gallery-bank.css", dirname(__FILE__)));
|
383 |
wp_enqueue_style("pretty-photo.css", plugins_url("/assets/css/pretty-photo.css", dirname(__FILE__)));
|
384 |
}
|
|
|
385 |
//--------------------------------------------------------------------------------------------------------------//
|
386 |
// REGISTER AJAX BASED FUNCTIONS TO BE CALLED ON ACTION TYPE AS PER WORDPRESS GUIDELINES
|
387 |
//--------------------------------------------------------------------------------------------------------------//
|
389 |
switch (esc_attr($_REQUEST["action"])) {
|
390 |
case "add_new_album_library":
|
391 |
add_action("admin_init", "album_gallery_library");
|
|
|
392 |
function album_gallery_library() {
|
393 |
global $wpdb, $current_user, $user_role_permission;
|
394 |
if (is_super_admin()) {
|
402 |
include_once GALLERY_BK_PLUGIN_DIR . "/lib/add-new-album-class.php";
|
403 |
}
|
404 |
}
|
|
|
405 |
break;
|
406 |
case "front_view_all_albums_library":
|
407 |
add_action("admin_init", "front_view_all_albums_library");
|
|
|
408 |
function front_view_all_albums_library() {
|
409 |
if (file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/front-view-all-albums-class.php")) {
|
410 |
include_once GALLERY_BK_PLUGIN_DIR . "/lib/front-view-all-albums-class.php";
|
411 |
}
|
412 |
}
|
|
|
413 |
break;
|
414 |
case "upload_library":
|
415 |
add_action("admin_init", "upload_library");
|
|
|
416 |
function upload_library() {
|
417 |
global $wpdb, $current_user, $user_role_permission;
|
418 |
if (is_super_admin()) {
|
426 |
include_once GALLERY_BK_PLUGIN_DIR . "/lib/upload.php";
|
427 |
}
|
428 |
}
|
|
|
429 |
break;
|
430 |
}
|
431 |
}
|
432 |
|
433 |
/* * *********************************************************************************************** */
|
434 |
add_action("media_buttons_context", "add_gallery_shortcode_button", 1);
|
|
|
435 |
function add_gallery_shortcode_button($context) {
|
436 |
add_thickbox();
|
437 |
$context .= "<a href=\"#TB_inline?width=800&height=530&inlineId=my-gallery-content-id\" class=\"button thickbox\"
|
438 |
title=\"" . __("Add Gallery using Gallery Bank", "gallery-bank") . "\"><span class=\"gallery_icon\"></span> Gallery Bank</a>";
|
439 |
return $context;
|
440 |
}
|
|
|
441 |
add_action("admin_footer", "add_gallery_bank_popup");
|
|
|
442 |
function add_gallery_bank_popup() {
|
443 |
add_thickbox();
|
444 |
require_once GALLERY_BK_PLUGIN_DIR . "/front_views/gallery-bank-shortcode.php";
|
445 |
}
|
|
|
446 |
function gallery_bank_short_code($atts) {
|
447 |
extract(shortcode_atts(array(
|
448 |
"album_id" => "",
|
470 |
return extract_short_code_for_gallery_images(intval($album_id), $type, $format, $title, $desc, $img_in_row, $responsive, $albums_in_row, $special_effect, $animation_effect, $image_width, $album_title, urldecode($show_albums), $thumb_width, $thumb_height, $display, intval($no_of_images), $sort_by, $widget);
|
471 |
}
|
472 |
}
|
|
|
473 |
function extract_short_code_for_gallery_images($album_id, $album_type, $gallery_type, $img_title, $img_desc, $img_in_row, $responsive, $albums_in_row, $special_effect, $animation_effect, $image_width, $album_title, $show_albums, $thumb_width, $thumb_height, $display, $no_of_images, $sort_by, $widget) {
|
474 |
if (preg_match("/^\d+(?:,\d+)*$/", $show_albums) || $show_albums == "all" || $show_albums == "") {
|
475 |
ob_start();
|
517 |
return $gallery_bank_output_album;
|
518 |
}
|
519 |
}
|
|
|
520 |
/* * ************************************************************************************************************** */
|
521 |
add_shortcode("gallery_bank", "gallery_bank_short_code");
|
522 |
add_action("admin_init", "backend_scripts_calls");
|
lib/include_settings.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
if (!defined("ABSPATH"))
|
4 |
exit; //exit if accessed directly
|
5 |
switch ($gb_role) {
|
1 |
<?php
|
|
|
2 |
if (!defined("ABSPATH"))
|
3 |
exit; //exit if accessed directly
|
4 |
switch ($gb_role) {
|
lib/install-script.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
if (!defined("ABSPATH"))
|
4 |
exit;
|
5 |
switch ($gb_role) {
|
@@ -17,7 +16,6 @@ if (!current_user_can($user_role_permission)) {
|
|
17 |
return;
|
18 |
} else {
|
19 |
/* * ****************************************Code for Thumbnails Creation********************* */
|
20 |
-
|
21 |
function process_gallery_image_upload($image, $width, $height) {
|
22 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
23 |
$temp_image_name = $image;
|
@@ -33,9 +31,7 @@ if (!current_user_can($user_role_permission)) {
|
|
33 |
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
34 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
35 |
}
|
36 |
-
|
37 |
/* * **************************************** Code for process_gallery_album_upload ********************* */
|
38 |
-
|
39 |
function process_gallery_album_upload($album_image, $width, $height) {
|
40 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
41 |
$temp_image_name = $album_image;
|
@@ -51,9 +47,7 @@ if (!current_user_can($user_role_permission)) {
|
|
51 |
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
52 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
53 |
}
|
54 |
-
|
55 |
/* * **************************** COMMON FUNCTION TO GENERATE THUMBNAILS******************************* */
|
56 |
-
|
57 |
function generate_gallery_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight) {
|
58 |
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
59 |
$source_gd_image = false;
|
@@ -94,11 +88,9 @@ if (!current_user_can($user_role_permission)) {
|
|
94 |
imagedestroy($thumbnail_gd_image);
|
95 |
return true;
|
96 |
}
|
97 |
-
|
98 |
/* * ****************************************End of Code for Thumbnails Creation ********************* */
|
99 |
|
100 |
/* * **************************************** Code for create_table_albums ********************* */
|
101 |
-
|
102 |
function create_table_albums() {
|
103 |
$sql = "CREATE TABLE " . gallery_bank_albums() . "(
|
104 |
album_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
@@ -111,9 +103,7 @@ if (!current_user_can($user_role_permission)) {
|
|
111 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
112 |
dbDelta($sql);
|
113 |
}
|
114 |
-
|
115 |
/* * **************************************** Code for create_table_album_pics ********************* */
|
116 |
-
|
117 |
function create_table_album_pics() {
|
118 |
$sql = "CREATE TABLE " . gallery_bank_pics() . "(
|
119 |
pic_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
@@ -132,9 +122,7 @@ if (!current_user_can($user_role_permission)) {
|
|
132 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
133 |
dbDelta($sql);
|
134 |
}
|
135 |
-
|
136 |
/* * **************************************** Code for create_table_album_settings ********************* */
|
137 |
-
|
138 |
function create_table_album_settings() {
|
139 |
global $wpdb;
|
140 |
$sql = "CREATE TABLE " . gallery_bank_settings() . "(
|
@@ -159,7 +147,6 @@ if (!current_user_can($user_role_permission)) {
|
|
159 |
include GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php";
|
160 |
}
|
161 |
}
|
162 |
-
|
163 |
/* * ****************************************End of Code for Table Creation********************* */
|
164 |
|
165 |
global $wpdb;
|
1 |
<?php
|
|
|
2 |
if (!defined("ABSPATH"))
|
3 |
exit;
|
4 |
switch ($gb_role) {
|
16 |
return;
|
17 |
} else {
|
18 |
/* * ****************************************Code for Thumbnails Creation********************* */
|
|
|
19 |
function process_gallery_image_upload($image, $width, $height) {
|
20 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
21 |
$temp_image_name = $image;
|
31 |
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
32 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
33 |
}
|
|
|
34 |
/* * **************************************** Code for process_gallery_album_upload ********************* */
|
|
|
35 |
function process_gallery_album_upload($album_image, $width, $height) {
|
36 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
37 |
$temp_image_name = $album_image;
|
47 |
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
48 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
49 |
}
|
|
|
50 |
/* * **************************** COMMON FUNCTION TO GENERATE THUMBNAILS******************************* */
|
|
|
51 |
function generate_gallery_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight) {
|
52 |
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
53 |
$source_gd_image = false;
|
88 |
imagedestroy($thumbnail_gd_image);
|
89 |
return true;
|
90 |
}
|
|
|
91 |
/* * ****************************************End of Code for Thumbnails Creation ********************* */
|
92 |
|
93 |
/* * **************************************** Code for create_table_albums ********************* */
|
|
|
94 |
function create_table_albums() {
|
95 |
$sql = "CREATE TABLE " . gallery_bank_albums() . "(
|
96 |
album_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
103 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
104 |
dbDelta($sql);
|
105 |
}
|
|
|
106 |
/* * **************************************** Code for create_table_album_pics ********************* */
|
|
|
107 |
function create_table_album_pics() {
|
108 |
$sql = "CREATE TABLE " . gallery_bank_pics() . "(
|
109 |
pic_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
122 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
123 |
dbDelta($sql);
|
124 |
}
|
|
|
125 |
/* * **************************************** Code for create_table_album_settings ********************* */
|
|
|
126 |
function create_table_album_settings() {
|
127 |
global $wpdb;
|
128 |
$sql = "CREATE TABLE " . gallery_bank_settings() . "(
|
147 |
include GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php";
|
148 |
}
|
149 |
}
|
|
|
150 |
/* * ****************************************End of Code for Table Creation********************* */
|
151 |
|
152 |
global $wpdb;
|
lib/upload.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
if (!defined("ABSPATH"))
|
4 |
exit; //exit if accessed directly
|
5 |
switch ($gb_role) {
|
1 |
<?php
|
|
|
2 |
if (!defined("ABSPATH"))
|
3 |
exit; //exit if accessed directly
|
4 |
switch ($gb_role) {
|
readme.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
===
|
2 |
Contributors: Gallery-Bank, contact-banker
|
3 |
Tags: wordpress gallery plugin, gallery, photo gallery, image gallery, responsive gallery, photo albums, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery
|
4 |
Requires at least: 3.4
|
@@ -7,17 +7,17 @@ Stable Tag: trunk
|
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
10 |
-
Photo Gallery by Gallery Bank is an advanced wordpress gallery plugin that creates
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
|
15 |
|
16 |
-
**WordPress
|
17 |
|
18 |
-
**WordPress
|
19 |
|
20 |
-
**WordPress
|
21 |
|
22 |
Gallery Bank Regularly updates and simplicity of usage along with efficient functionality makes it a perfect choice for your wordpress site to have stunning look. There are also Premium Editions of the plugin with more useful features available.
|
23 |
|
@@ -501,10 +501,17 @@ is False in shortcode.
|
|
501 |
|
502 |
== Changelog ==
|
503 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
= 3.1.39 =
|
505 |
|
506 |
-
* Obsolete Code Removed
|
507 |
-
* Code Optimized
|
508 |
|
509 |
= 3.1.37 =
|
510 |
|
1 |
+
=== Photo Gallery by Gallery Bank - WordPress Image Gallery Plugin ===
|
2 |
Contributors: Gallery-Bank, contact-banker
|
3 |
Tags: wordpress gallery plugin, gallery, photo gallery, image gallery, responsive gallery, photo albums, gallery lightbox, wordpress photo gallery plugin, fullscreen gallery
|
4 |
Requires at least: 3.4
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
10 |
+
Photo Gallery by Gallery Bank is an advanced wordpress image gallery plugin that creates beautiful image gallery and photo albums.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
= WordPress Gallery Plugin =
|
15 |
|
16 |
+
**WordPress Image Gallery Plugin by Gallery Bank** is a WordPress Gallery Plugin designed to create Elegant and Beautiful **Photo Gallery Albums** along with Images and videos using Grid Albums, List Albums, Individual Albums, Masonry Layouts and Thumbnail Layouts along with Special Effects and Animation Effects.
|
17 |
|
18 |
+
**WordPress Image Gallery Plugin by Gallery Bank** is the only available WordPress Plugin in the market with extra-ordinary features. It is loaded with 200+ features and creates stunning Photo Galleries on any WordPress site.
|
19 |
|
20 |
+
**WordPress Image Gallery Plugin by Gallery Bank** provides a powerful engine for uploading and managing photo galleries of images & videos, with the ability to batch upload, delete, rearrange, sort images.
|
21 |
|
22 |
Gallery Bank Regularly updates and simplicity of usage along with efficient functionality makes it a perfect choice for your wordpress site to have stunning look. There are also Premium Editions of the plugin with more useful features available.
|
23 |
|
501 |
|
502 |
== Changelog ==
|
503 |
|
504 |
+
= 3.1.40 =
|
505 |
+
|
506 |
+
* FIX: Obsolete Code Removed
|
507 |
+
* FIX: Proper Sanitization, Escaping, Validation of all Post Calls
|
508 |
+
* FIX: Obsolete Code Removed
|
509 |
+
* FIX: Code Optimized
|
510 |
+
|
511 |
= 3.1.39 =
|
512 |
|
513 |
+
* FIX: Obsolete Code Removed
|
514 |
+
* FIX: Code Optimized
|
515 |
|
516 |
= 3.1.37 =
|
517 |
|
uninstall.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
if (!defined('WP_UNINSTALL_PLUGIN')) {
|
4 |
die;
|
5 |
}
|
1 |
<?php
|
|
|
2 |
if (!defined('WP_UNINSTALL_PLUGIN')) {
|
3 |
die;
|
4 |
}
|
views/dashboard.php
CHANGED
@@ -18,7 +18,6 @@ if (!current_user_can($user_role_permission)) {
|
|
18 |
$show_gallery_demo = get_option("gallery-bank-demo");
|
19 |
if ($show_gallery_demo == "") {
|
20 |
/* * ****************************************Code for Thumbnails Creation********************* */
|
21 |
-
|
22 |
function uploading_gallery_image($image, $width, $height) {
|
23 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
24 |
$temp_image_name = $image;
|
@@ -34,7 +33,6 @@ if (!current_user_can($user_role_permission)) {
|
|
34 |
$result = generating_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
35 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
36 |
}
|
37 |
-
|
38 |
function uploading_gallery_album($album_image, $width, $height) {
|
39 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
40 |
$temp_image_name = $album_image;
|
@@ -50,9 +48,7 @@ if (!current_user_can($user_role_permission)) {
|
|
50 |
$result = generating_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
51 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
52 |
}
|
53 |
-
|
54 |
/* * **************************** COMMON FUNCTION TO GENERATE THUMBNAILS******************************* */
|
55 |
-
|
56 |
function generating_gallery_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight) {
|
57 |
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
58 |
$source_gd_image = false;
|
@@ -93,7 +89,6 @@ if (!current_user_can($user_role_permission)) {
|
|
93 |
imagedestroy($thumbnail_gd_image);
|
94 |
return true;
|
95 |
}
|
96 |
-
|
97 |
/* * ****************************************End of Code for Thumbnails Creation ********************* */
|
98 |
$total_albums = $wpdb->get_var
|
99 |
(
|
18 |
$show_gallery_demo = get_option("gallery-bank-demo");
|
19 |
if ($show_gallery_demo == "") {
|
20 |
/* * ****************************************Code for Thumbnails Creation********************* */
|
|
|
21 |
function uploading_gallery_image($image, $width, $height) {
|
22 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
23 |
$temp_image_name = $image;
|
33 |
$result = generating_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
34 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
35 |
}
|
|
|
36 |
function uploading_gallery_album($album_image, $width, $height) {
|
37 |
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
38 |
$temp_image_name = $album_image;
|
48 |
$result = generating_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
49 |
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
50 |
}
|
|
|
51 |
/* * **************************** COMMON FUNCTION TO GENERATE THUMBNAILS******************************* */
|
|
|
52 |
function generating_gallery_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight) {
|
53 |
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
54 |
$source_gd_image = false;
|
89 |
imagedestroy($thumbnail_gd_image);
|
90 |
return true;
|
91 |
}
|
|
|
92 |
/* * ****************************************End of Code for Thumbnails Creation ********************* */
|
93 |
$total_albums = $wpdb->get_var
|
94 |
(
|
views/gallery-bank-system-report.php
CHANGED
@@ -76,11 +76,12 @@ if (!current_user_can($user_role_permission)) {
|
|
76 |
<label class="layout-label-control-group">WP Multisite Enabled :</label>
|
77 |
|
78 |
<div class="layout-controls">
|
79 |
-
<span><?php
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
84 |
</div>
|
85 |
</div>
|
86 |
</div>
|
@@ -148,7 +149,8 @@ if (!current_user_can($user_role_permission)) {
|
|
148 |
<label class="layout-label-control-group">WP Debug Mode :</label>
|
149 |
|
150 |
<div class="layout-controls">
|
151 |
-
<span><?php
|
|
|
152 |
echo "Yes";
|
153 |
else
|
154 |
echo "No";
|
@@ -174,7 +176,7 @@ if (!current_user_can($user_role_permission)) {
|
|
174 |
</div>
|
175 |
</div>
|
176 |
</div>
|
177 |
-
|
178 |
<div class="widget-layout-body">
|
179 |
<div class="layout-control-group">
|
180 |
<label class="layout-label-control-group">PHP Max Script Execute Time :</label>
|
@@ -202,7 +204,7 @@ if (!current_user_can($user_role_permission)) {
|
|
202 |
</div>
|
203 |
</div>
|
204 |
</div>
|
205 |
-
|
206 |
<div class="widget-layout-body">
|
207 |
<div class="layout-control-group">
|
208 |
<label class="layout-label-control-group">Default Timezone :</label>
|
@@ -286,7 +288,7 @@ if (!current_user_can($user_role_permission)) {
|
|
286 |
<label class="layout-label-control-group">Operating System :</label>
|
287 |
<div class="layout-controls">
|
288 |
<span>
|
289 |
-
|
290 |
</span>
|
291 |
</div>
|
292 |
</div>
|
@@ -296,7 +298,7 @@ if (!current_user_can($user_role_permission)) {
|
|
296 |
<label class="layout-label-control-group">Memory usage :</label>
|
297 |
<div class="layout-controls">
|
298 |
<span>
|
299 |
-
|
300 |
</span>
|
301 |
</div>
|
302 |
</div>
|
@@ -306,7 +308,7 @@ if (!current_user_can($user_role_permission)) {
|
|
306 |
<label class="layout-label-control-group">SQL Mode :</label>
|
307 |
<div class="layout-controls">
|
308 |
<span>
|
309 |
-
|
310 |
</span>
|
311 |
</div>
|
312 |
</div>
|
@@ -316,7 +318,7 @@ if (!current_user_can($user_role_permission)) {
|
|
316 |
<label class="layout-label-control-group">PHP Safe Mode :</label>
|
317 |
<div class="layout-controls">
|
318 |
<span>
|
319 |
-
|
320 |
</span>
|
321 |
</div>
|
322 |
</div>
|
@@ -326,7 +328,7 @@ if (!current_user_can($user_role_permission)) {
|
|
326 |
<label class="layout-label-control-group">PHP Allow URL fopen :</label>
|
327 |
<div class="layout-controls">
|
328 |
<span>
|
329 |
-
|
330 |
</span>
|
331 |
</div>
|
332 |
</div>
|
@@ -336,7 +338,7 @@ if (!current_user_can($user_role_permission)) {
|
|
336 |
<label class="layout-label-control-group">PHP Memory Limit :</label>
|
337 |
<div class="layout-controls">
|
338 |
<span>
|
339 |
-
|
340 |
</span>
|
341 |
</div>
|
342 |
</div>
|
@@ -346,7 +348,7 @@ if (!current_user_can($user_role_permission)) {
|
|
346 |
<label class="layout-label-control-group">PHP Max Post Size :</label>
|
347 |
<div class="layout-controls">
|
348 |
<span>
|
349 |
-
|
350 |
</span>
|
351 |
</div>
|
352 |
</div>
|
@@ -356,7 +358,7 @@ if (!current_user_can($user_role_permission)) {
|
|
356 |
<label class="layout-label-control-group">PCRE Backtracking Limit :</label>
|
357 |
<div class="layout-controls">
|
358 |
<span>
|
359 |
-
|
360 |
</span>
|
361 |
</div>
|
362 |
</div>
|
@@ -366,7 +368,7 @@ if (!current_user_can($user_role_permission)) {
|
|
366 |
<label class="layout-label-control-group">PHP Exif support :</label>
|
367 |
<div class="layout-controls">
|
368 |
<span>
|
369 |
-
|
370 |
</span>
|
371 |
</div>
|
372 |
</div>
|
@@ -376,7 +378,7 @@ if (!current_user_can($user_role_permission)) {
|
|
376 |
<label class="layout-label-control-group">PHP IPTC support :</label>
|
377 |
<div class="layout-controls">
|
378 |
<span>
|
379 |
-
|
380 |
</span>
|
381 |
</div>
|
382 |
</div>
|
@@ -386,7 +388,7 @@ if (!current_user_can($user_role_permission)) {
|
|
386 |
<label class="layout-label-control-group">PHP XML support :</label>
|
387 |
<div class="layout-controls">
|
388 |
<span>
|
389 |
-
|
390 |
</span>
|
391 |
</div>
|
392 |
</div>
|
@@ -462,10 +464,10 @@ if (!current_user_can($user_role_permission)) {
|
|
462 |
</div>
|
463 |
</div>
|
464 |
</div>
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
<div class="widget-layout">
|
470 |
<div class="widget-layout-title">
|
471 |
<h4>Themes</h4>
|
@@ -491,10 +493,10 @@ if (!current_user_can($user_role_permission)) {
|
|
491 |
<label class="layout-label-control-group">Theme Version :</label>
|
492 |
<div class="layout-controls">
|
493 |
<span><?php
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
</span>
|
499 |
</div>
|
500 |
</div>
|
@@ -510,9 +512,9 @@ if (!current_user_can($user_role_permission)) {
|
|
510 |
</div>
|
511 |
</div>
|
512 |
</div>
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
|
517 |
<div class="widget-layout">
|
518 |
<div class="widget-layout-title">
|
@@ -525,14 +527,12 @@ if (!current_user_can($user_role_permission)) {
|
|
525 |
</div>
|
526 |
<div id="library_settings" class="collapse in">
|
527 |
<?php
|
528 |
-
|
529 |
function gd_yesNo($bool) {
|
530 |
if ($bool)
|
531 |
return "Yes";
|
532 |
else
|
533 |
return "No";
|
534 |
}
|
535 |
-
|
536 |
if (function_exists("gd_info")) {
|
537 |
$information = gd_info();
|
538 |
$key = array_keys($information);
|
76 |
<label class="layout-label-control-group">WP Multisite Enabled :</label>
|
77 |
|
78 |
<div class="layout-controls">
|
79 |
+
<span><?php
|
80 |
+
if (is_multisite())
|
81 |
+
echo "Yes";
|
82 |
+
else
|
83 |
+
echo "No";
|
84 |
+
?></span>
|
85 |
</div>
|
86 |
</div>
|
87 |
</div>
|
149 |
<label class="layout-label-control-group">WP Debug Mode :</label>
|
150 |
|
151 |
<div class="layout-controls">
|
152 |
+
<span><?php
|
153 |
+
if (defined("WP_DEBUG") && WP_DEBUG)
|
154 |
echo "Yes";
|
155 |
else
|
156 |
echo "No";
|
176 |
</div>
|
177 |
</div>
|
178 |
</div>
|
179 |
+
<?php if (function_exists("ini_get")) : ?>
|
180 |
<div class="widget-layout-body">
|
181 |
<div class="layout-control-group">
|
182 |
<label class="layout-label-control-group">PHP Max Script Execute Time :</label>
|
204 |
</div>
|
205 |
</div>
|
206 |
</div>
|
207 |
+
<?php endif; ?>
|
208 |
<div class="widget-layout-body">
|
209 |
<div class="layout-control-group">
|
210 |
<label class="layout-label-control-group">Default Timezone :</label>
|
288 |
<label class="layout-label-control-group">Operating System :</label>
|
289 |
<div class="layout-controls">
|
290 |
<span>
|
291 |
+
<?php echo PHP_OS; ?> (<?php echo(PHP_INT_SIZE * 8) ?> Bit)
|
292 |
</span>
|
293 |
</div>
|
294 |
</div>
|
298 |
<label class="layout-label-control-group">Memory usage :</label>
|
299 |
<div class="layout-controls">
|
300 |
<span>
|
301 |
+
<?php echo $memory_usage; ?>
|
302 |
</span>
|
303 |
</div>
|
304 |
</div>
|
308 |
<label class="layout-label-control-group">SQL Mode :</label>
|
309 |
<div class="layout-controls">
|
310 |
<span>
|
311 |
+
<?php echo $sqlmode; ?>
|
312 |
</span>
|
313 |
</div>
|
314 |
</div>
|
318 |
<label class="layout-label-control-group">PHP Safe Mode :</label>
|
319 |
<div class="layout-controls">
|
320 |
<span>
|
321 |
+
<?php echo PHP_VERSION; ?>
|
322 |
</span>
|
323 |
</div>
|
324 |
</div>
|
328 |
<label class="layout-label-control-group">PHP Allow URL fopen :</label>
|
329 |
<div class="layout-controls">
|
330 |
<span>
|
331 |
+
<?php echo $allowurlfopen; ?>
|
332 |
</span>
|
333 |
</div>
|
334 |
</div>
|
338 |
<label class="layout-label-control-group">PHP Memory Limit :</label>
|
339 |
<div class="layout-controls">
|
340 |
<span>
|
341 |
+
<?php echo $memory_limit; ?>
|
342 |
</span>
|
343 |
</div>
|
344 |
</div>
|
348 |
<label class="layout-label-control-group">PHP Max Post Size :</label>
|
349 |
<div class="layout-controls">
|
350 |
<span>
|
351 |
+
<?php echo $post_maximum; ?>
|
352 |
</span>
|
353 |
</div>
|
354 |
</div>
|
358 |
<label class="layout-label-control-group">PCRE Backtracking Limit :</label>
|
359 |
<div class="layout-controls">
|
360 |
<span>
|
361 |
+
<?php echo $backtrack_lmt; ?>
|
362 |
</span>
|
363 |
</div>
|
364 |
</div>
|
368 |
<label class="layout-label-control-group">PHP Exif support :</label>
|
369 |
<div class="layout-controls">
|
370 |
<span>
|
371 |
+
<?php echo $exif; ?>
|
372 |
</span>
|
373 |
</div>
|
374 |
</div>
|
378 |
<label class="layout-label-control-group">PHP IPTC support :</label>
|
379 |
<div class="layout-controls">
|
380 |
<span>
|
381 |
+
<?php echo $iptc; ?>
|
382 |
</span>
|
383 |
</div>
|
384 |
</div>
|
388 |
<label class="layout-label-control-group">PHP XML support :</label>
|
389 |
<div class="layout-controls">
|
390 |
<span>
|
391 |
+
<?php echo $xml; ?>
|
392 |
</span>
|
393 |
</div>
|
394 |
</div>
|
464 |
</div>
|
465 |
</div>
|
466 |
</div>
|
467 |
+
<?php
|
468 |
+
if ($wp_version >= 3.4) {
|
469 |
+
$active_theme = wp_get_theme();
|
470 |
+
?>
|
471 |
<div class="widget-layout">
|
472 |
<div class="widget-layout-title">
|
473 |
<h4>Themes</h4>
|
493 |
<label class="layout-label-control-group">Theme Version :</label>
|
494 |
<div class="layout-controls">
|
495 |
<span><?php
|
496 |
+
echo $active_theme->Version;
|
497 |
+
if (!empty($theme_version_data["version"]) && version_compare($theme_version_data["version"], $active_theme->Version, "!="))
|
498 |
+
echo " – <strong style=\"color:red;\">" . $theme_version_data["version"] . " " . "is available" . "</strong>";
|
499 |
+
?>
|
500 |
</span>
|
501 |
</div>
|
502 |
</div>
|
512 |
</div>
|
513 |
</div>
|
514 |
</div>
|
515 |
+
<?php
|
516 |
+
}
|
517 |
+
?>
|
518 |
|
519 |
<div class="widget-layout">
|
520 |
<div class="widget-layout-title">
|
527 |
</div>
|
528 |
<div id="library_settings" class="collapse in">
|
529 |
<?php
|
|
|
530 |
function gd_yesNo($bool) {
|
531 |
if ($bool)
|
532 |
return "Yes";
|
533 |
else
|
534 |
return "No";
|
535 |
}
|
|
|
536 |
if (function_exists("gd_info")) {
|
537 |
$information = gd_info();
|
538 |
$key = array_keys($information);
|
views/gallery-feedback.php
CHANGED
@@ -83,6 +83,7 @@ if (!current_user_can($user_role_permission)) {
|
|
83 |
<script type="text/javascript">
|
84 |
var url = "http://tech-banker.com/feedbacks.php";
|
85 |
var suggestion_array = [];
|
|
|
86 |
jQuery("#frm_feedback").validate
|
87 |
({
|
88 |
rules:
|
@@ -105,11 +106,12 @@ if (!current_user_can($user_role_permission)) {
|
|
105 |
{
|
106 |
suggestion_array.push(jQuery("#ux_name").val());
|
107 |
suggestion_array.push(jQuery("#ux_email").val());
|
|
|
108 |
suggestion_array.push(jQuery("#ux_suggestion").val());
|
109 |
jQuery.post(url,
|
110 |
{
|
111 |
data: JSON.stringify(suggestion_array),
|
112 |
-
param: "
|
113 |
action: "feedbacks"
|
114 |
},
|
115 |
function (data)
|
83 |
<script type="text/javascript">
|
84 |
var url = "http://tech-banker.com/feedbacks.php";
|
85 |
var suggestion_array = [];
|
86 |
+
var domain_url = "<?php echo site_url(); ?>";
|
87 |
jQuery("#frm_feedback").validate
|
88 |
({
|
89 |
rules:
|
106 |
{
|
107 |
suggestion_array.push(jQuery("#ux_name").val());
|
108 |
suggestion_array.push(jQuery("#ux_email").val());
|
109 |
+
suggestion_array.push(domain_url);
|
110 |
suggestion_array.push(jQuery("#ux_suggestion").val());
|
111 |
jQuery.post(url,
|
112 |
{
|
113 |
data: JSON.stringify(suggestion_array),
|
114 |
+
param: "gb_feature_requests",
|
115 |
action: "feedbacks"
|
116 |
},
|
117 |
function (data)
|
views/header.php
CHANGED
@@ -65,7 +65,6 @@ if (!current_user_can($user_role_permission)) {
|
|
65 |
}
|
66 |
return $result;
|
67 |
}
|
68 |
-
|
69 |
function gallery_convert_bytes($value) {
|
70 |
if (is_numeric($value)) {
|
71 |
return max("0", $value);
|
@@ -87,13 +86,11 @@ if (!current_user_can($user_role_permission)) {
|
|
87 |
return max("0", $value_string);
|
88 |
}
|
89 |
}
|
90 |
-
|
91 |
function gallery_get_minisize() {
|
92 |
$result = "100";
|
93 |
$result = ceil($result / 25) * 25;
|
94 |
return $result;
|
95 |
}
|
96 |
-
|
97 |
function is_dir_empty($dir) {
|
98 |
if (!is_readable($dir))
|
99 |
return NULL;
|
65 |
}
|
66 |
return $result;
|
67 |
}
|
|
|
68 |
function gallery_convert_bytes($value) {
|
69 |
if (is_numeric($value)) {
|
70 |
return max("0", $value);
|
86 |
return max("0", $value_string);
|
87 |
}
|
88 |
}
|
|
|
89 |
function gallery_get_minisize() {
|
90 |
$result = "100";
|
91 |
$result = ceil($result / 25) * 25;
|
92 |
return $result;
|
93 |
}
|
|
|
94 |
function is_dir_empty($dir) {
|
95 |
if (!is_readable($dir))
|
96 |
return NULL;
|
views/includes_common_after.php
CHANGED
@@ -35,14 +35,14 @@ if (!current_user_can($user_role_permission)) {
|
|
35 |
{
|
36 |
jQuery('.pp_social').append('<div style="margin-left:5px; display:inline-block;"><g:plusone data-action="share" href="' + encodeURIComponent(location.href.replace(location.hash, "")) + '" width="160px" ></g:plusone></div>');
|
37 |
jQuery('.pp_social').append("<script type='text/javascript'> \
|
38 |
-
|
39 |
var po = document.createElement('script'); \
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
}
|
47 |
</script>
|
48 |
<?php
|
35 |
{
|
36 |
jQuery('.pp_social').append('<div style="margin-left:5px; display:inline-block;"><g:plusone data-action="share" href="' + encodeURIComponent(location.href.replace(location.hash, "")) + '" width="160px" ></g:plusone></div>');
|
37 |
jQuery('.pp_social').append("<script type='text/javascript'> \
|
38 |
+
(function() { \
|
39 |
var po = document.createElement('script'); \
|
40 |
+
po.type = 'text/javascript'; \
|
41 |
+
po.async = true; \
|
42 |
+
po.src = 'https://apis.google.com/js/plusone.js'; \
|
43 |
+
var s = document.getElementsByTagName('script')[0]; \
|
44 |
+
s.parentNode.insertBefore(po, s); \
|
45 |
+
})(); <" + "/" + "script>");
|
46 |
}
|
47 |
</script>
|
48 |
<?php
|
views/recommended-plugins.php
CHANGED
@@ -31,7 +31,6 @@ if (!current_user_can($user_role_permission)) {
|
|
31 |
$arges = apply_filters("install_plugins_table_api_args_$tab", $args);
|
32 |
$api = plugins_api("query_plugins", $arges);
|
33 |
$item = $api->plugins;
|
34 |
-
|
35 |
function wp_star_rating($args = array()) {
|
36 |
$defaults = array(
|
37 |
'rating' => 0,
|
31 |
$arges = apply_filters("install_plugins_table_api_args_$tab", $args);
|
32 |
$api = plugins_api("query_plugins", $arges);
|
33 |
$item = $api->plugins;
|
|
|
34 |
function wp_star_rating($args = array()) {
|
35 |
$defaults = array(
|
36 |
'rating' => 0,
|