Version Description
- Added: Backend translation on Icelandic (thanks to Eggert Johannesson).
- Fixed: Backend translation on Dutch.
Download this release
Release Info
Developer | webdorado |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.2.98 |
Comparing to | |
See all releases |
Code changes from version 1.2.96 to 1.2.98
- addons/addons.php +95 -95
- addons/style.css +167 -167
- admin/controllers/BWGControllerAddAlbumsGalleries.php +42 -42
- admin/controllers/BWGControllerAddTags.php +42 -42
- admin/controllers/BWGControllerAlbums_bwg.php +409 -409
- admin/controllers/BWGControllerEditThumb.php +44 -44
- admin/controllers/BWGControllerGalleries_bwg.php +1111 -1111
- admin/controllers/BWGControllerLicensing_bwg.php +56 -56
- admin/controllers/BWGControllerOptions_bwg.php +400 -400
- admin/controllers/BWGControllerTags_bwg.php +300 -300
- admin/controllers/BWGControllerThemes_bwg.php +1099 -1099
- admin/controllers/BWGControllerUninstall_bwg.php +63 -63
- admin/controllers/BWGControllerWidget.php +67 -67
- admin/controllers/BWGControllerWidgetSlideshow.php +66 -66
- admin/controllers/BWGControllerWidgetTags.php +69 -69
- admin/models/BWGModelAddAlbumsGalleries.php +68 -68
- admin/models/BWGModelAddTags.php +68 -68
- admin/models/BWGModelAlbums_bwg.php +119 -119
- admin/models/BWGModelEditThumb.php +41 -41
- admin/models/BWGModelGalleries_bwg.php +193 -193
- admin/models/BWGModelLicensing_bwg.php +29 -29
- admin/models/BWGModelOptions_bwg.php +188 -188
- admin/models/BWGModelTags_bwg.php +84 -84
- admin/models/BWGModelThemes_bwg.php +556 -556
- admin/models/BWGModelUninstall_bwg.php +74 -74
- admin/models/BWGModelWidget.php +51 -51
- admin/models/BWGModelWidgetSlideshow.php +50 -50
- admin/models/BWGModelWidgetTags.php +51 -51
- admin/views/BWGViewAddAlbumsGalleries.php +130 -130
- admin/views/BWGViewAddTags.php +119 -119
- admin/views/BWGViewAlbums_bwg.php +411 -411
- admin/views/BWGViewBWGShortcode.php +925 -1856
addons/addons.php
CHANGED
@@ -1,96 +1,96 @@
|
|
1 |
-
<?php
|
2 |
-
function bwg_addons_display() {
|
3 |
-
$addons = array(
|
4 |
-
'photo-gallery-ecomerce' => array(
|
5 |
-
'name' => __('Photo Gallery Ecommerce', 'bwg'),
|
6 |
-
'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/gallery-ecommerce.html',
|
7 |
-
'description' => __('Using Photo Gallery Ecommerce you can sell images included in galleries either as digital downloads or products/prints via Paypal or Stripe.', 'bwg'),
|
8 |
-
'icon' => '',
|
9 |
-
'image' => WD_BWG_URL . '/addons/images/ecommerce.png',
|
10 |
-
),
|
11 |
-
'photo-gallery-facebook' => array(
|
12 |
-
'name' => __('Photo Gallery Facebook', 'bwg'),
|
13 |
-
'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/facebook.html',
|
14 |
-
'description' => __('Photo Gallery Facebook is an add-on, which helps to display Facebook photos and videos within Photo Gallery plugin. You can create Facebook-only galleries, embed individual images and videos or include Facebook albums within mixed type albums.', 'bwg'),
|
15 |
-
'icon' => '',
|
16 |
-
'image' => WD_BWG_URL . '/addons/images/facebook.png',
|
17 |
-
),
|
18 |
-
'ngitopg' => array(
|
19 |
-
'name' => __('NextGen Gallery Import to Photo Gallery', 'bwg'),
|
20 |
-
'url' => 'https://wordpress.org/plugins/import-to-photo-gallery-from-nextgen-gallery/',
|
21 |
-
'description' => __('This addon integrates NextGen with Photo Gallery allowing to import images and related data from NextGen to use with Photo Gallery', 'bwg'),
|
22 |
-
'icon' => '',
|
23 |
-
'image' => WD_BWG_URL . '/addons/images/nextgen_gallery.png',
|
24 |
-
),
|
25 |
-
'photo-gallery-export' => array(
|
26 |
-
'name' => __('Photo Gallery Export / Import', 'bwg'),
|
27 |
-
'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/export-import.html',
|
28 |
-
'description' => __('Photo Gallery Export/Import helps to move created galleries and albums from one site to another. This way you can save the gallery/album options and manual modifications.', 'bwg'),
|
29 |
-
'icon' => '',
|
30 |
-
'image' => WD_BWG_URL . '/addons/images/import_export.png',
|
31 |
-
),
|
32 |
-
);
|
33 |
-
?>
|
34 |
-
<div class="wrap">
|
35 |
-
<div id="settings">
|
36 |
-
<div id="settings-content" >
|
37 |
-
<h2 id="add_on_title"><?php _e('Photo Gallery Add-ons', 'bwg'); ?></h2>
|
38 |
-
<div>
|
39 |
-
<p>
|
40 |
-
<span style="color: #ba281e; font-size: 20px;"><?php _e('Attention', 'bwg'); ?>:</span>
|
41 |
-
<?php _e('Add-ons are supported by premium version of Photo Gallery', 'bwg'); ?>
|
42 |
-
</p>
|
43 |
-
</div>
|
44 |
-
<?php
|
45 |
-
if ($addons) {
|
46 |
-
foreach ($addons as $name => $addon) {
|
47 |
-
?>
|
48 |
-
<div class="add-on">
|
49 |
-
<h2><?php echo $addon['name']; ?></h2>
|
50 |
-
<figure class="figure">
|
51 |
-
<div class="figure-img">
|
52 |
-
<a href="<?php echo $addon['url']; ?>" target="_blank">
|
53 |
-
<?php
|
54 |
-
if ($addon['image']) {
|
55 |
-
?>
|
56 |
-
<img src="<?php echo $addon['image']; ?>" />
|
57 |
-
<?php
|
58 |
-
}
|
59 |
-
?>
|
60 |
-
</a>
|
61 |
-
</div>
|
62 |
-
<figcaption class="addon-descr figcaption">
|
63 |
-
<?php
|
64 |
-
if ($addon['icon']) {
|
65 |
-
?>
|
66 |
-
<img src="<?php echo $addon['icon']; ?>" />
|
67 |
-
<?php
|
68 |
-
}
|
69 |
-
?>
|
70 |
-
<?php echo $addon['description']; ?>
|
71 |
-
</figcaption>
|
72 |
-
</figure>
|
73 |
-
<?php
|
74 |
-
if ($addon['url'] !== '#') {
|
75 |
-
?>
|
76 |
-
<a href="<?php echo $addon['url']; ?>" target="_blank" class="addon"><span><?php _e('GET THIS ADD ON', 'bwg'); ?></span></a>
|
77 |
-
<?php
|
78 |
-
}
|
79 |
-
else {
|
80 |
-
?>
|
81 |
-
<div class="ecwd_coming_soon">
|
82 |
-
<img src="<?php echo WD_BWG_URL . '/addons/images/coming_soon.png'; ?>" />
|
83 |
-
</div>
|
84 |
-
<?php
|
85 |
-
}
|
86 |
-
?>
|
87 |
-
</div>
|
88 |
-
<?php
|
89 |
-
}
|
90 |
-
}
|
91 |
-
?>
|
92 |
-
</div>
|
93 |
-
</div>
|
94 |
-
</div>
|
95 |
-
<?php
|
96 |
}
|
1 |
+
<?php
|
2 |
+
function bwg_addons_display() {
|
3 |
+
$addons = array(
|
4 |
+
'photo-gallery-ecomerce' => array(
|
5 |
+
'name' => __('Photo Gallery Ecommerce', 'bwg'),
|
6 |
+
'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/gallery-ecommerce.html',
|
7 |
+
'description' => __('Using Photo Gallery Ecommerce you can sell images included in galleries either as digital downloads or products/prints via Paypal or Stripe.', 'bwg'),
|
8 |
+
'icon' => '',
|
9 |
+
'image' => WD_BWG_URL . '/addons/images/ecommerce.png',
|
10 |
+
),
|
11 |
+
'photo-gallery-facebook' => array(
|
12 |
+
'name' => __('Photo Gallery Facebook', 'bwg'),
|
13 |
+
'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/facebook.html',
|
14 |
+
'description' => __('Photo Gallery Facebook is an add-on, which helps to display Facebook photos and videos within Photo Gallery plugin. You can create Facebook-only galleries, embed individual images and videos or include Facebook albums within mixed type albums.', 'bwg'),
|
15 |
+
'icon' => '',
|
16 |
+
'image' => WD_BWG_URL . '/addons/images/facebook.png',
|
17 |
+
),
|
18 |
+
'ngitopg' => array(
|
19 |
+
'name' => __('NextGen Gallery Import to Photo Gallery', 'bwg'),
|
20 |
+
'url' => 'https://wordpress.org/plugins/import-to-photo-gallery-from-nextgen-gallery/',
|
21 |
+
'description' => __('This addon integrates NextGen with Photo Gallery allowing to import images and related data from NextGen to use with Photo Gallery', 'bwg'),
|
22 |
+
'icon' => '',
|
23 |
+
'image' => WD_BWG_URL . '/addons/images/nextgen_gallery.png',
|
24 |
+
),
|
25 |
+
'photo-gallery-export' => array(
|
26 |
+
'name' => __('Photo Gallery Export / Import', 'bwg'),
|
27 |
+
'url' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin/add-ons/export-import.html',
|
28 |
+
'description' => __('Photo Gallery Export/Import helps to move created galleries and albums from one site to another. This way you can save the gallery/album options and manual modifications.', 'bwg'),
|
29 |
+
'icon' => '',
|
30 |
+
'image' => WD_BWG_URL . '/addons/images/import_export.png',
|
31 |
+
),
|
32 |
+
);
|
33 |
+
?>
|
34 |
+
<div class="wrap">
|
35 |
+
<div id="settings">
|
36 |
+
<div id="settings-content" >
|
37 |
+
<h2 id="add_on_title"><?php _e('Photo Gallery Add-ons', 'bwg'); ?></h2>
|
38 |
+
<div>
|
39 |
+
<p>
|
40 |
+
<span style="color: #ba281e; font-size: 20px;"><?php _e('Attention', 'bwg'); ?>:</span>
|
41 |
+
<?php _e('Add-ons are supported by premium version of Photo Gallery', 'bwg'); ?>
|
42 |
+
</p>
|
43 |
+
</div>
|
44 |
+
<?php
|
45 |
+
if ($addons) {
|
46 |
+
foreach ($addons as $name => $addon) {
|
47 |
+
?>
|
48 |
+
<div class="add-on">
|
49 |
+
<h2><?php echo $addon['name']; ?></h2>
|
50 |
+
<figure class="figure">
|
51 |
+
<div class="figure-img">
|
52 |
+
<a href="<?php echo $addon['url']; ?>" target="_blank">
|
53 |
+
<?php
|
54 |
+
if ($addon['image']) {
|
55 |
+
?>
|
56 |
+
<img src="<?php echo $addon['image']; ?>" />
|
57 |
+
<?php
|
58 |
+
}
|
59 |
+
?>
|
60 |
+
</a>
|
61 |
+
</div>
|
62 |
+
<figcaption class="addon-descr figcaption">
|
63 |
+
<?php
|
64 |
+
if ($addon['icon']) {
|
65 |
+
?>
|
66 |
+
<img src="<?php echo $addon['icon']; ?>" />
|
67 |
+
<?php
|
68 |
+
}
|
69 |
+
?>
|
70 |
+
<?php echo $addon['description']; ?>
|
71 |
+
</figcaption>
|
72 |
+
</figure>
|
73 |
+
<?php
|
74 |
+
if ($addon['url'] !== '#') {
|
75 |
+
?>
|
76 |
+
<a href="<?php echo $addon['url']; ?>" target="_blank" class="addon"><span><?php _e('GET THIS ADD ON', 'bwg'); ?></span></a>
|
77 |
+
<?php
|
78 |
+
}
|
79 |
+
else {
|
80 |
+
?>
|
81 |
+
<div class="ecwd_coming_soon">
|
82 |
+
<img src="<?php echo WD_BWG_URL . '/addons/images/coming_soon.png'; ?>" />
|
83 |
+
</div>
|
84 |
+
<?php
|
85 |
+
}
|
86 |
+
?>
|
87 |
+
</div>
|
88 |
+
<?php
|
89 |
+
}
|
90 |
+
}
|
91 |
+
?>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
<?php
|
96 |
}
|
addons/style.css
CHANGED
@@ -1,168 +1,168 @@
|
|
1 |
-
#settings-content .addons_updates::after,
|
2 |
-
#settings-content .main-plugin::after,
|
3 |
-
#settings-content::after {
|
4 |
-
clear: both;
|
5 |
-
content: "";
|
6 |
-
display: table;
|
7 |
-
}
|
8 |
-
|
9 |
-
#settings {
|
10 |
-
background: #ffffff;
|
11 |
-
padding: 15px;
|
12 |
-
}
|
13 |
-
|
14 |
-
#settings-content #add_on_title {
|
15 |
-
margin-bottom: 20px;
|
16 |
-
}
|
17 |
-
|
18 |
-
#settings-content .ecwd_coming_soon {
|
19 |
-
position: absolute;
|
20 |
-
top: 44px;
|
21 |
-
left: 0;
|
22 |
-
height: 100%;
|
23 |
-
}
|
24 |
-
|
25 |
-
#settings-content .add-on a {
|
26 |
-
text-decoration: none;
|
27 |
-
}
|
28 |
-
|
29 |
-
#settings-content .add-on h2 {
|
30 |
-
color: #229DBF;
|
31 |
-
font-size: 16px;
|
32 |
-
margin-bottom: 9px;
|
33 |
-
padding: 0 0 7px;
|
34 |
-
line-height: 1.2;
|
35 |
-
}
|
36 |
-
|
37 |
-
#settings-content .addon-descr {
|
38 |
-
font-size: 13px;
|
39 |
-
line-height: 18px;
|
40 |
-
height: 100%;
|
41 |
-
width: 53%;
|
42 |
-
opacity: 0;
|
43 |
-
position: absolute;
|
44 |
-
top: 0;
|
45 |
-
left: 0;
|
46 |
-
padding: 8px 10px 10px;
|
47 |
-
background: #23282D;
|
48 |
-
color: #D1DDE0;
|
49 |
-
-webkit-backface-visibility: hidden;
|
50 |
-
-moz-backface-visibility: hidden;
|
51 |
-
backface-visibility: hidden;
|
52 |
-
-webkit-transform-origin: 0 0;
|
53 |
-
-moz-transform-origin: 0 0;
|
54 |
-
transform-origin: 0 0;
|
55 |
-
-webkit-transform: rotateY(-90deg);
|
56 |
-
-moz-transform: rotateY(-90deg);
|
57 |
-
transform: rotateY(-90deg);
|
58 |
-
-webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s;
|
59 |
-
-moz-transition: -moz-transform 0.4s, opacity 0.1s 0.3s;
|
60 |
-
transition: transform 0.4s, opacity 0.1s 0.3s;
|
61 |
-
box-sizing: border-box;
|
62 |
-
-webkit-box-sizing: border-box;
|
63 |
-
-moz-box-sizing: border-box;
|
64 |
-
}
|
65 |
-
|
66 |
-
#settings-content .addon,
|
67 |
-
#settings-content .addon-price {
|
68 |
-
display: inline-block;
|
69 |
-
margin-top: 15px;
|
70 |
-
font-size: 15px;
|
71 |
-
border: 1px solid #DCDCDC;
|
72 |
-
font-weight: bold;
|
73 |
-
}
|
74 |
-
|
75 |
-
#settings-content .addon {
|
76 |
-
background: #FFFFFF url('images/Add_Ons.jpg') no-repeat 6px center;
|
77 |
-
color: #66686B;
|
78 |
-
padding: 9px 12px 9px 45px;
|
79 |
-
width: 100%;
|
80 |
-
box-sizing: border-box;
|
81 |
-
-webkit-box-sizing: border-box;
|
82 |
-
-moz-box-sizing: border-box;
|
83 |
-
}
|
84 |
-
|
85 |
-
#settings-content .addon-price {
|
86 |
-
background: #FFFFFF;
|
87 |
-
color: #229CBF;
|
88 |
-
padding: 9px 12px;
|
89 |
-
}
|
90 |
-
|
91 |
-
#settings-content .add-on:hover .addon-price,
|
92 |
-
#settings-content .addon-price:hover {
|
93 |
-
background: #229CBF;
|
94 |
-
color: #DDECF1;
|
95 |
-
}
|
96 |
-
|
97 |
-
#settings-content .add-on:hover .addon,
|
98 |
-
#settings-content .addon:hover {
|
99 |
-
background: #23282D url('images/Add_Ons_hover.jpg') no-repeat 6px center;
|
100 |
-
color: #DDDEDE;
|
101 |
-
}
|
102 |
-
|
103 |
-
#settings-content .addon span {
|
104 |
-
border-left: 1px solid #A7A9AB;
|
105 |
-
padding: 4px 10px 4px 10px;
|
106 |
-
}
|
107 |
-
|
108 |
-
#settings-content .addon-descr span {
|
109 |
-
padding: 5px 0 5px 10px;
|
110 |
-
border-left: 1px solid #93CEE0;
|
111 |
-
}
|
112 |
-
|
113 |
-
#settings-content a:focus {
|
114 |
-
outline: none;
|
115 |
-
box-shadow: none;
|
116 |
-
}
|
117 |
-
|
118 |
-
#settings-content .add-on {
|
119 |
-
width: 310px;
|
120 |
-
height: 320px;
|
121 |
-
float: left;
|
122 |
-
margin-right: 40px;
|
123 |
-
margin-bottom: 40px;
|
124 |
-
-webkit-perspective: 1700px;
|
125 |
-
-moz-perspective: 1700px;
|
126 |
-
perspective: 1700px;
|
127 |
-
-webkit-perspective-origin: 0 50%;
|
128 |
-
-moz-perspective-origin: 0 50%;
|
129 |
-
perspective-origin: 0 50%;
|
130 |
-
position: relative;
|
131 |
-
}
|
132 |
-
|
133 |
-
#settings-content .figure {
|
134 |
-
-webkit-transform-style: preserve-3d;
|
135 |
-
-moz-transform-style: preserve-3d;
|
136 |
-
transform-style: preserve-3d;
|
137 |
-
position: relative;
|
138 |
-
width: 100%;
|
139 |
-
height: 232px;
|
140 |
-
margin: 0;
|
141 |
-
}
|
142 |
-
|
143 |
-
#settings-content .figure-img {
|
144 |
-
overflow: hidden;
|
145 |
-
}
|
146 |
-
|
147 |
-
#settings-content .figure-img img {
|
148 |
-
-webkit-transition: -webkit-transform 0.4s;
|
149 |
-
-moz-transition: -moz-transform 0.4s;
|
150 |
-
transition: transform 0.4s;
|
151 |
-
}
|
152 |
-
|
153 |
-
#settings-content .figure:hover img {
|
154 |
-
-webkit-transform: translateX(25%);
|
155 |
-
-moz-transform: translateX(25%);
|
156 |
-
-ms-transform: translateX(25%);
|
157 |
-
transform: translateX(25%);
|
158 |
-
}
|
159 |
-
|
160 |
-
#settings-content .figure:hover figcaption {
|
161 |
-
opacity: 1;
|
162 |
-
-webkit-transform: rotateY(0deg);
|
163 |
-
-moz-transform: rotateY(0deg);
|
164 |
-
transform: rotateY(0deg);
|
165 |
-
-webkit-transition: -webkit-transform 0.4s, opacity 0.1s;
|
166 |
-
-moz-transition: -moz-transform 0.4s, opacity 0.1s;
|
167 |
-
transition: transform 0.4s, opacity 0.1s;
|
168 |
}
|
1 |
+
#settings-content .addons_updates::after,
|
2 |
+
#settings-content .main-plugin::after,
|
3 |
+
#settings-content::after {
|
4 |
+
clear: both;
|
5 |
+
content: "";
|
6 |
+
display: table;
|
7 |
+
}
|
8 |
+
|
9 |
+
#settings {
|
10 |
+
background: #ffffff;
|
11 |
+
padding: 15px;
|
12 |
+
}
|
13 |
+
|
14 |
+
#settings-content #add_on_title {
|
15 |
+
margin-bottom: 20px;
|
16 |
+
}
|
17 |
+
|
18 |
+
#settings-content .ecwd_coming_soon {
|
19 |
+
position: absolute;
|
20 |
+
top: 44px;
|
21 |
+
left: 0;
|
22 |
+
height: 100%;
|
23 |
+
}
|
24 |
+
|
25 |
+
#settings-content .add-on a {
|
26 |
+
text-decoration: none;
|
27 |
+
}
|
28 |
+
|
29 |
+
#settings-content .add-on h2 {
|
30 |
+
color: #229DBF;
|
31 |
+
font-size: 16px;
|
32 |
+
margin-bottom: 9px;
|
33 |
+
padding: 0 0 7px;
|
34 |
+
line-height: 1.2;
|
35 |
+
}
|
36 |
+
|
37 |
+
#settings-content .addon-descr {
|
38 |
+
font-size: 13px;
|
39 |
+
line-height: 18px;
|
40 |
+
height: 100%;
|
41 |
+
width: 53%;
|
42 |
+
opacity: 0;
|
43 |
+
position: absolute;
|
44 |
+
top: 0;
|
45 |
+
left: 0;
|
46 |
+
padding: 8px 10px 10px;
|
47 |
+
background: #23282D;
|
48 |
+
color: #D1DDE0;
|
49 |
+
-webkit-backface-visibility: hidden;
|
50 |
+
-moz-backface-visibility: hidden;
|
51 |
+
backface-visibility: hidden;
|
52 |
+
-webkit-transform-origin: 0 0;
|
53 |
+
-moz-transform-origin: 0 0;
|
54 |
+
transform-origin: 0 0;
|
55 |
+
-webkit-transform: rotateY(-90deg);
|
56 |
+
-moz-transform: rotateY(-90deg);
|
57 |
+
transform: rotateY(-90deg);
|
58 |
+
-webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s;
|
59 |
+
-moz-transition: -moz-transform 0.4s, opacity 0.1s 0.3s;
|
60 |
+
transition: transform 0.4s, opacity 0.1s 0.3s;
|
61 |
+
box-sizing: border-box;
|
62 |
+
-webkit-box-sizing: border-box;
|
63 |
+
-moz-box-sizing: border-box;
|
64 |
+
}
|
65 |
+
|
66 |
+
#settings-content .addon,
|
67 |
+
#settings-content .addon-price {
|
68 |
+
display: inline-block;
|
69 |
+
margin-top: 15px;
|
70 |
+
font-size: 15px;
|
71 |
+
border: 1px solid #DCDCDC;
|
72 |
+
font-weight: bold;
|
73 |
+
}
|
74 |
+
|
75 |
+
#settings-content .addon {
|
76 |
+
background: #FFFFFF url('images/Add_Ons.jpg') no-repeat 6px center;
|
77 |
+
color: #66686B;
|
78 |
+
padding: 9px 12px 9px 45px;
|
79 |
+
width: 100%;
|
80 |
+
box-sizing: border-box;
|
81 |
+
-webkit-box-sizing: border-box;
|
82 |
+
-moz-box-sizing: border-box;
|
83 |
+
}
|
84 |
+
|
85 |
+
#settings-content .addon-price {
|
86 |
+
background: #FFFFFF;
|
87 |
+
color: #229CBF;
|
88 |
+
padding: 9px 12px;
|
89 |
+
}
|
90 |
+
|
91 |
+
#settings-content .add-on:hover .addon-price,
|
92 |
+
#settings-content .addon-price:hover {
|
93 |
+
background: #229CBF;
|
94 |
+
color: #DDECF1;
|
95 |
+
}
|
96 |
+
|
97 |
+
#settings-content .add-on:hover .addon,
|
98 |
+
#settings-content .addon:hover {
|
99 |
+
background: #23282D url('images/Add_Ons_hover.jpg') no-repeat 6px center;
|
100 |
+
color: #DDDEDE;
|
101 |
+
}
|
102 |
+
|
103 |
+
#settings-content .addon span {
|
104 |
+
border-left: 1px solid #A7A9AB;
|
105 |
+
padding: 4px 10px 4px 10px;
|
106 |
+
}
|
107 |
+
|
108 |
+
#settings-content .addon-descr span {
|
109 |
+
padding: 5px 0 5px 10px;
|
110 |
+
border-left: 1px solid #93CEE0;
|
111 |
+
}
|
112 |
+
|
113 |
+
#settings-content a:focus {
|
114 |
+
outline: none;
|
115 |
+
box-shadow: none;
|
116 |
+
}
|
117 |
+
|
118 |
+
#settings-content .add-on {
|
119 |
+
width: 310px;
|
120 |
+
height: 320px;
|
121 |
+
float: left;
|
122 |
+
margin-right: 40px;
|
123 |
+
margin-bottom: 40px;
|
124 |
+
-webkit-perspective: 1700px;
|
125 |
+
-moz-perspective: 1700px;
|
126 |
+
perspective: 1700px;
|
127 |
+
-webkit-perspective-origin: 0 50%;
|
128 |
+
-moz-perspective-origin: 0 50%;
|
129 |
+
perspective-origin: 0 50%;
|
130 |
+
position: relative;
|
131 |
+
}
|
132 |
+
|
133 |
+
#settings-content .figure {
|
134 |
+
-webkit-transform-style: preserve-3d;
|
135 |
+
-moz-transform-style: preserve-3d;
|
136 |
+
transform-style: preserve-3d;
|
137 |
+
position: relative;
|
138 |
+
width: 100%;
|
139 |
+
height: 232px;
|
140 |
+
margin: 0;
|
141 |
+
}
|
142 |
+
|
143 |
+
#settings-content .figure-img {
|
144 |
+
overflow: hidden;
|
145 |
+
}
|
146 |
+
|
147 |
+
#settings-content .figure-img img {
|
148 |
+
-webkit-transition: -webkit-transform 0.4s;
|
149 |
+
-moz-transition: -moz-transform 0.4s;
|
150 |
+
transition: transform 0.4s;
|
151 |
+
}
|
152 |
+
|
153 |
+
#settings-content .figure:hover img {
|
154 |
+
-webkit-transform: translateX(25%);
|
155 |
+
-moz-transform: translateX(25%);
|
156 |
+
-ms-transform: translateX(25%);
|
157 |
+
transform: translateX(25%);
|
158 |
+
}
|
159 |
+
|
160 |
+
#settings-content .figure:hover figcaption {
|
161 |
+
opacity: 1;
|
162 |
+
-webkit-transform: rotateY(0deg);
|
163 |
+
-moz-transform: rotateY(0deg);
|
164 |
+
transform: rotateY(0deg);
|
165 |
+
-webkit-transition: -webkit-transform 0.4s, opacity 0.1s;
|
166 |
+
-moz-transition: -moz-transform 0.4s, opacity 0.1s;
|
167 |
+
transition: transform 0.4s, opacity 0.1s;
|
168 |
}
|
admin/controllers/BWGControllerAddAlbumsGalleries.php
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerAddAlbumsGalleries {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$this->display();
|
23 |
-
}
|
24 |
-
|
25 |
-
public function display() {
|
26 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelAddAlbumsGalleries.php";
|
27 |
-
$model = new BWGModelAddAlbumsGalleries();
|
28 |
-
|
29 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewAddAlbumsGalleries.php";
|
30 |
-
$view = new BWGViewAddAlbumsGalleries($model);
|
31 |
-
$view->display();
|
32 |
-
}
|
33 |
-
|
34 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
-
// Getters & Setters //
|
36 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
-
// Private Methods //
|
39 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
-
// Listeners //
|
42 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerAddAlbumsGalleries {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$this->display();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function display() {
|
26 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelAddAlbumsGalleries.php";
|
27 |
+
$model = new BWGModelAddAlbumsGalleries();
|
28 |
+
|
29 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewAddAlbumsGalleries.php";
|
30 |
+
$view = new BWGViewAddAlbumsGalleries($model);
|
31 |
+
$view->display();
|
32 |
+
}
|
33 |
+
|
34 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
+
// Getters & Setters //
|
36 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
+
// Private Methods //
|
39 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
+
// Listeners //
|
42 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
}
|
admin/controllers/BWGControllerAddTags.php
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerAddTags {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$this->display();
|
23 |
-
}
|
24 |
-
|
25 |
-
public function display() {
|
26 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelAddTags.php";
|
27 |
-
$model = new BWGModelAddTags();
|
28 |
-
|
29 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewAddTags.php";
|
30 |
-
$view = new BWGViewAddTags($model);
|
31 |
-
$view->display();
|
32 |
-
}
|
33 |
-
|
34 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
-
// Getters & Setters //
|
36 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
-
// Private Methods //
|
39 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
-
// Listeners //
|
42 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerAddTags {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$this->display();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function display() {
|
26 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelAddTags.php";
|
27 |
+
$model = new BWGModelAddTags();
|
28 |
+
|
29 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewAddTags.php";
|
30 |
+
$view = new BWGViewAddTags($model);
|
31 |
+
$view->display();
|
32 |
+
}
|
33 |
+
|
34 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
+
// Getters & Setters //
|
36 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
+
// Private Methods //
|
39 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
+
// Listeners //
|
42 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
}
|
admin/controllers/BWGControllerAlbums_bwg.php
CHANGED
@@ -1,410 +1,410 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerAlbums_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$task = WDWLibrary::get('task');
|
23 |
-
$id = WDWLibrary::get('current_id', 0);
|
24 |
-
|
25 |
-
|
26 |
-
if($task != ''){
|
27 |
-
if(!WDWLibrary::verify_nonce('albums_bwg')){
|
28 |
-
die('Sorry, your nonce did not verify.');
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
|
33 |
-
$message = WDWLibrary::get('message');
|
34 |
-
echo WDWLibrary::message_id($message);
|
35 |
-
if (method_exists($this, $task)) {
|
36 |
-
$this->$task($id);
|
37 |
-
}
|
38 |
-
else {
|
39 |
-
$this->display();
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
public function display() {
|
44 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelAlbums_bwg.php";
|
45 |
-
$model = new BWGModelAlbums_bwg();
|
46 |
-
|
47 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
|
48 |
-
$view = new BWGViewAlbums_bwg($model);
|
49 |
-
$view->display();
|
50 |
-
}
|
51 |
-
|
52 |
-
public function add() {
|
53 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelAlbums_bwg.php";
|
54 |
-
$model = new BWGModelAlbums_bwg();
|
55 |
-
|
56 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
|
57 |
-
$view = new BWGViewAlbums_bwg($model);
|
58 |
-
$view->edit(0);
|
59 |
-
}
|
60 |
-
|
61 |
-
public function edit() {
|
62 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelAlbums_bwg.php";
|
63 |
-
$model = new BWGModelAlbums_bwg();
|
64 |
-
|
65 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
|
66 |
-
$view = new BWGViewAlbums_bwg($model);
|
67 |
-
$id = WDWLibrary::get('current_id', 0);
|
68 |
-
$view->edit($id);
|
69 |
-
}
|
70 |
-
|
71 |
-
public function save() {
|
72 |
-
$message = $this->save_db();
|
73 |
-
$page = WDWLibrary::get('page');
|
74 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
75 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
76 |
-
WDWLibrary::spider_redirect($query_url);
|
77 |
-
}
|
78 |
-
|
79 |
-
public function apply() {
|
80 |
-
$message = $this->save_db();
|
81 |
-
global $wpdb;
|
82 |
-
$id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_album');
|
83 |
-
$current_id = WDWLibrary::get('current_id', $id);
|
84 |
-
$page = WDWLibrary::get('page');
|
85 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
86 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message),$query_url);
|
87 |
-
WDWLibrary::spider_redirect($query_url);
|
88 |
-
}
|
89 |
-
|
90 |
-
// Return random image from gallery or album for album preview.
|
91 |
-
public function get_image_for_album($album_id) {
|
92 |
-
global $wpdb;
|
93 |
-
$preview_image = '';
|
94 |
-
$gallery_row = $wpdb->get_row($wpdb->prepare("SELECT t1.preview_image,t1.random_preview_image FROM " . $wpdb->prefix . "bwg_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_album_gallery as t2 on t1.id=t2.alb_gal_id WHERE t2.is_album=0 AND t2.album_id='%d' AND (t1.preview_image<>'' OR t1.random_preview_image<>'') ORDER BY t2.`order`", $album_id));
|
95 |
-
if ($gallery_row) {
|
96 |
-
$preview_image = (($gallery_row->preview_image) ? $gallery_row->preview_image : $gallery_row->random_preview_image);
|
97 |
-
}
|
98 |
-
if (!$preview_image) {
|
99 |
-
$album_row = $wpdb->get_row($wpdb->prepare("SELECT t1.preview_image,t1.random_preview_image FROM " . $wpdb->prefix . "bwg_album as t1 INNER JOIN " . $wpdb->prefix . "bwg_album_gallery as t2 on t1.id=t2.alb_gal_id WHERE t2.is_album=1 AND t2.album_id='%d' AND (t1.preview_image<>'' OR t1.random_preview_image<>'') ORDER BY t2.`order`", $album_id));
|
100 |
-
if ($album_row) {
|
101 |
-
$preview_image = (($album_row->preview_image) ? $album_row->preview_image : $album_row->random_preview_image);
|
102 |
-
}
|
103 |
-
}
|
104 |
-
return $preview_image;
|
105 |
-
}
|
106 |
-
|
107 |
-
public function bwg_get_unique_slug($slug, $id) {
|
108 |
-
global $wpdb;
|
109 |
-
$slug = sanitize_title($slug);
|
110 |
-
if ($id != 0) {
|
111 |
-
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s AND id != %d", $slug, $id);
|
112 |
-
}
|
113 |
-
else {
|
114 |
-
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s", $slug);
|
115 |
-
}
|
116 |
-
if ($wpdb->get_var($query)) {
|
117 |
-
$num = 2;
|
118 |
-
do {
|
119 |
-
$alt_slug = $slug . "-$num";
|
120 |
-
$num++;
|
121 |
-
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s", $alt_slug));
|
122 |
-
} while ($slug_check);
|
123 |
-
$slug = $alt_slug;
|
124 |
-
}
|
125 |
-
return $slug;
|
126 |
-
}
|
127 |
-
|
128 |
-
public function bwg_get_unique_name($name, $id) {
|
129 |
-
global $wpdb;
|
130 |
-
if ($id != 0) {
|
131 |
-
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_album WHERE name = %s AND id != %d", $name, $id);
|
132 |
-
}
|
133 |
-
else {
|
134 |
-
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_album WHERE name = %s", $name);
|
135 |
-
}
|
136 |
-
if ($wpdb->get_var($query)) {
|
137 |
-
$num = 2;
|
138 |
-
do {
|
139 |
-
$alt_name = $name . "-$num";
|
140 |
-
$num++;
|
141 |
-
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_album WHERE name = %s", $alt_name));
|
142 |
-
} while ($slug_check);
|
143 |
-
$name = $alt_name;
|
144 |
-
}
|
145 |
-
return $name;
|
146 |
-
}
|
147 |
-
|
148 |
-
public function save_db() {
|
149 |
-
global $wpdb;
|
150 |
-
$id = (int) WDWLibrary::get('current_id', 0);
|
151 |
-
$name = ((isset($_POST['name'])) ? esc_html(stripslashes($_POST['name'])) : '');
|
152 |
-
$name = $this->bwg_get_unique_name($name, $id);
|
153 |
-
$slug = ((isset($_POST['slug']) && esc_html(stripslashes($_POST['slug'])) != '') ? esc_html(stripslashes($_POST['slug'])) : $name);
|
154 |
-
$slug = $this->bwg_get_unique_slug($slug, $id);
|
155 |
-
$description = (isset($_POST['description']) ? stripslashes($_POST['description']) : '');
|
156 |
-
$preview_image = ((isset($_POST['preview_image']) && esc_html(stripslashes($_POST['preview_image'])) != '') ? esc_html(stripslashes($_POST['preview_image'])) : '');
|
157 |
-
$author = get_current_user_id();
|
158 |
-
$published = ((isset($_POST['published']) && esc_html(stripslashes($_POST['published'])) != '') ? esc_html(stripslashes($_POST['published'])) : '');
|
159 |
-
$albums_galleries = (isset($_POST['albums_galleries']) ? esc_html(stripslashes($_POST['albums_galleries'])) : '');
|
160 |
-
if ($id != 0) {
|
161 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_album', array(
|
162 |
-
'name' => $name,
|
163 |
-
'slug' => $slug,
|
164 |
-
'description' => $description,
|
165 |
-
'preview_image' => $preview_image,
|
166 |
-
'published' => $published), array('id' => $id));
|
167 |
-
|
168 |
-
/* Update data in corresponding posts.*/
|
169 |
-
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_album'";
|
170 |
-
$posts = $wpdb->get_results($query2, OBJECT);
|
171 |
-
foreach ($posts as $post) {
|
172 |
-
$post_content = $post->post_content;
|
173 |
-
if (strpos($post_content, ' type="album" ') && strpos($post_content, ' album_id="' . $id . '" ')) {
|
174 |
-
$album_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
|
175 |
-
wp_update_post($album_post);
|
176 |
-
}
|
177 |
-
}
|
178 |
-
}
|
179 |
-
else {
|
180 |
-
$save = $wpdb->insert($wpdb->prefix . 'bwg_album', array(
|
181 |
-
'name' => $name,
|
182 |
-
'slug' => $slug,
|
183 |
-
'description' => $description,
|
184 |
-
'preview_image' => $preview_image,
|
185 |
-
'random_preview_image' => '',
|
186 |
-
'order' => ((int) $wpdb->get_var('SELECT MAX(`order`) FROM ' . $wpdb->prefix . 'bwg_album')) + 1,
|
187 |
-
'author' => $author,
|
188 |
-
'published' => $published
|
189 |
-
), array(
|
190 |
-
'%s',
|
191 |
-
'%s',
|
192 |
-
'%s',
|
193 |
-
'%s',
|
194 |
-
'%s',
|
195 |
-
'%d',
|
196 |
-
'%d',
|
197 |
-
'%d'
|
198 |
-
));
|
199 |
-
$id = $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_album');
|
200 |
-
}
|
201 |
-
$this->save_alb_gal($id, $albums_galleries);
|
202 |
-
// Set random image.
|
203 |
-
$random_preview_image = (($preview_image == '') ? $this->get_image_for_album($id) : '');
|
204 |
-
$wpdb->update($wpdb->prefix . 'bwg_album', array('random_preview_image' => $random_preview_image), array('id' => $id));
|
205 |
-
if ($save !== FALSE) {
|
206 |
-
return 1;
|
207 |
-
}
|
208 |
-
else {
|
209 |
-
return 2;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
public function save_alb_gal($id, $alb_gal_str) {
|
214 |
-
global $wpdb;
|
215 |
-
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id);
|
216 |
-
$wpdb->query($query);
|
217 |
-
$alb_gals = explode(",", $alb_gal_str);
|
218 |
-
for ($i = 0; $i < count($alb_gals); $i++) {
|
219 |
-
$params = explode(":", $alb_gals[$i]);
|
220 |
-
if (count($params) == 3) {
|
221 |
-
$save = $wpdb->insert($wpdb->prefix . 'bwg_album_gallery', array(
|
222 |
-
'album_id' => $id,
|
223 |
-
'is_album' => $params[1],
|
224 |
-
'alb_gal_id' => $params[2],
|
225 |
-
'order' => $i+1
|
226 |
-
), array(
|
227 |
-
'%d',
|
228 |
-
'%d',
|
229 |
-
'%d',
|
230 |
-
'%d'
|
231 |
-
));
|
232 |
-
}
|
233 |
-
}
|
234 |
-
}
|
235 |
-
|
236 |
-
public function delete($id) {
|
237 |
-
global $wpdb;
|
238 |
-
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $id);
|
239 |
-
$query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $id, $id);
|
240 |
-
if ($wpdb->query($query)) {
|
241 |
-
$wpdb->query($query_gal);
|
242 |
-
$message = 3;
|
243 |
-
}
|
244 |
-
else {
|
245 |
-
$message = 2;
|
246 |
-
}
|
247 |
-
/* Delete corresponding posts and their meta.*/
|
248 |
-
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_album'";
|
249 |
-
$posts = $wpdb->get_results($query2, OBJECT);
|
250 |
-
foreach ($posts as $post) {
|
251 |
-
$post_content = $post->post_content;
|
252 |
-
if (strpos($post_content, ' type="album" ') && strpos($post_content, ' album_id="'.$id.'" ')) {
|
253 |
-
wp_delete_post($post->ID, TRUE);
|
254 |
-
}
|
255 |
-
}
|
256 |
-
$page = WDWLibrary::get('page');
|
257 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
258 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
259 |
-
WDWLibrary::spider_redirect($query_url);
|
260 |
-
}
|
261 |
-
|
262 |
-
public function delete_all() {
|
263 |
-
global $wpdb;
|
264 |
-
$flag = FALSE;
|
265 |
-
$album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
266 |
-
foreach ($album_ids_col as $album_id) {
|
267 |
-
if (isset($_POST['check_' . $album_id]) || isset($_POST['check_all_items'])) {
|
268 |
-
$flag = TRUE;
|
269 |
-
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $album_id);
|
270 |
-
$query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $album_id, $album_id);
|
271 |
-
$wpdb->query($query);
|
272 |
-
$wpdb->query($query_gal);
|
273 |
-
}
|
274 |
-
}
|
275 |
-
if ($flag) {
|
276 |
-
$message = 5;
|
277 |
-
}
|
278 |
-
else {
|
279 |
-
$message = 6;
|
280 |
-
}
|
281 |
-
$page = WDWLibrary::get('page');
|
282 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
283 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
284 |
-
WDWLibrary::spider_redirect($query_url);
|
285 |
-
}
|
286 |
-
|
287 |
-
public function publish($id) {
|
288 |
-
global $wpdb;
|
289 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 1), array('id' => $id));
|
290 |
-
if ($save !== FALSE) {
|
291 |
-
$message = 9;
|
292 |
-
}
|
293 |
-
else {
|
294 |
-
$message = 2;
|
295 |
-
}
|
296 |
-
$page = WDWLibrary::get('page');
|
297 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
298 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
299 |
-
WDWLibrary::spider_redirect($query_url);
|
300 |
-
}
|
301 |
-
|
302 |
-
public function publish_all() {
|
303 |
-
global $wpdb;
|
304 |
-
$flag = FALSE;
|
305 |
-
if (isset($_POST['check_all_items'])) {
|
306 |
-
$wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_album SET published=1');
|
307 |
-
$flag = TRUE;
|
308 |
-
}
|
309 |
-
else {
|
310 |
-
$alum_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
311 |
-
foreach ($alum_ids_col as $album_id) {
|
312 |
-
if (isset($_POST['check_' . $album_id])) {
|
313 |
-
$flag = TRUE;
|
314 |
-
$wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 1), array('id' => $album_id));
|
315 |
-
}
|
316 |
-
}
|
317 |
-
}
|
318 |
-
if ($flag) {
|
319 |
-
$message = 10;
|
320 |
-
}
|
321 |
-
else {
|
322 |
-
$message = 6;
|
323 |
-
}
|
324 |
-
$page = WDWLibrary::get('page');
|
325 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
326 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
327 |
-
WDWLibrary::spider_redirect($query_url);
|
328 |
-
}
|
329 |
-
|
330 |
-
public function unpublish($id) {
|
331 |
-
global $wpdb;
|
332 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 0), array('id' => $id));
|
333 |
-
if ($save !== FALSE) {
|
334 |
-
$message = 11;
|
335 |
-
}
|
336 |
-
else {
|
337 |
-
$message = 2;
|
338 |
-
}
|
339 |
-
$page = WDWLibrary::get('page');
|
340 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
341 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
342 |
-
WDWLibrary::spider_redirect($query_url);
|
343 |
-
}
|
344 |
-
|
345 |
-
public function unpublish_all() {
|
346 |
-
global $wpdb;
|
347 |
-
$flag = FALSE;
|
348 |
-
if (isset($_POST['check_all_items'])) {
|
349 |
-
$wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_album SET published=0');
|
350 |
-
$flag = TRUE;
|
351 |
-
}
|
352 |
-
else {
|
353 |
-
$album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
354 |
-
foreach ($album_ids_col as $album_id) {
|
355 |
-
if (isset($_POST['check_' . $album_id])) {
|
356 |
-
$flag = TRUE;
|
357 |
-
$wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 0), array('id' => $album_id));
|
358 |
-
}
|
359 |
-
}
|
360 |
-
}
|
361 |
-
if ($flag) {
|
362 |
-
$message = 12;
|
363 |
-
}
|
364 |
-
else {
|
365 |
-
$message = 6;
|
366 |
-
}
|
367 |
-
$page = WDWLibrary::get('page');
|
368 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
369 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
370 |
-
WDWLibrary::spider_redirect($query_url);
|
371 |
-
}
|
372 |
-
|
373 |
-
public function save_order($flag = TRUE) {
|
374 |
-
global $wpdb;
|
375 |
-
$album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
376 |
-
$message = 0;
|
377 |
-
if ($album_ids_col) {
|
378 |
-
foreach ($album_ids_col as $album_id) {
|
379 |
-
if (isset($_POST['order_input_' . $album_id])) {
|
380 |
-
$order_values[$album_id] = (int) $_POST['order_input_' . $album_id];
|
381 |
-
}
|
382 |
-
else {
|
383 |
-
$order_values[$album_id] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_album WHERE `id`="%d"', $album_id));
|
384 |
-
}
|
385 |
-
}
|
386 |
-
asort($order_values);
|
387 |
-
$i = 1;
|
388 |
-
foreach ($order_values as $key => $order_value) {
|
389 |
-
$wpdb->update($wpdb->prefix . 'bwg_album', array('order' => $i), array('id' => $key));
|
390 |
-
$i++;
|
391 |
-
}
|
392 |
-
if ($flag) {
|
393 |
-
$message = 13;
|
394 |
-
}
|
395 |
-
}
|
396 |
-
$page = WDWLibrary::get('page');
|
397 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
398 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
399 |
-
WDWLibrary::spider_redirect($query_url);
|
400 |
-
}
|
401 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
402 |
-
// Getters & Setters //
|
403 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
404 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
405 |
-
// Private Methods //
|
406 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
407 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
408 |
-
// Listeners //
|
409 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
410 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerAlbums_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$task = WDWLibrary::get('task');
|
23 |
+
$id = WDWLibrary::get('current_id', 0);
|
24 |
+
|
25 |
+
|
26 |
+
if($task != ''){
|
27 |
+
if(!WDWLibrary::verify_nonce('albums_bwg')){
|
28 |
+
die('Sorry, your nonce did not verify.');
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
$message = WDWLibrary::get('message');
|
34 |
+
echo WDWLibrary::message_id($message);
|
35 |
+
if (method_exists($this, $task)) {
|
36 |
+
$this->$task($id);
|
37 |
+
}
|
38 |
+
else {
|
39 |
+
$this->display();
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
public function display() {
|
44 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelAlbums_bwg.php";
|
45 |
+
$model = new BWGModelAlbums_bwg();
|
46 |
+
|
47 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
|
48 |
+
$view = new BWGViewAlbums_bwg($model);
|
49 |
+
$view->display();
|
50 |
+
}
|
51 |
+
|
52 |
+
public function add() {
|
53 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelAlbums_bwg.php";
|
54 |
+
$model = new BWGModelAlbums_bwg();
|
55 |
+
|
56 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
|
57 |
+
$view = new BWGViewAlbums_bwg($model);
|
58 |
+
$view->edit(0);
|
59 |
+
}
|
60 |
+
|
61 |
+
public function edit() {
|
62 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelAlbums_bwg.php";
|
63 |
+
$model = new BWGModelAlbums_bwg();
|
64 |
+
|
65 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewAlbums_bwg.php";
|
66 |
+
$view = new BWGViewAlbums_bwg($model);
|
67 |
+
$id = WDWLibrary::get('current_id', 0);
|
68 |
+
$view->edit($id);
|
69 |
+
}
|
70 |
+
|
71 |
+
public function save() {
|
72 |
+
$message = $this->save_db();
|
73 |
+
$page = WDWLibrary::get('page');
|
74 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
75 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
76 |
+
WDWLibrary::spider_redirect($query_url);
|
77 |
+
}
|
78 |
+
|
79 |
+
public function apply() {
|
80 |
+
$message = $this->save_db();
|
81 |
+
global $wpdb;
|
82 |
+
$id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_album');
|
83 |
+
$current_id = WDWLibrary::get('current_id', $id);
|
84 |
+
$page = WDWLibrary::get('page');
|
85 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
86 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message),$query_url);
|
87 |
+
WDWLibrary::spider_redirect($query_url);
|
88 |
+
}
|
89 |
+
|
90 |
+
// Return random image from gallery or album for album preview.
|
91 |
+
public function get_image_for_album($album_id) {
|
92 |
+
global $wpdb;
|
93 |
+
$preview_image = '';
|
94 |
+
$gallery_row = $wpdb->get_row($wpdb->prepare("SELECT t1.preview_image,t1.random_preview_image FROM " . $wpdb->prefix . "bwg_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_album_gallery as t2 on t1.id=t2.alb_gal_id WHERE t2.is_album=0 AND t2.album_id='%d' AND (t1.preview_image<>'' OR t1.random_preview_image<>'') ORDER BY t2.`order`", $album_id));
|
95 |
+
if ($gallery_row) {
|
96 |
+
$preview_image = (($gallery_row->preview_image) ? $gallery_row->preview_image : $gallery_row->random_preview_image);
|
97 |
+
}
|
98 |
+
if (!$preview_image) {
|
99 |
+
$album_row = $wpdb->get_row($wpdb->prepare("SELECT t1.preview_image,t1.random_preview_image FROM " . $wpdb->prefix . "bwg_album as t1 INNER JOIN " . $wpdb->prefix . "bwg_album_gallery as t2 on t1.id=t2.alb_gal_id WHERE t2.is_album=1 AND t2.album_id='%d' AND (t1.preview_image<>'' OR t1.random_preview_image<>'') ORDER BY t2.`order`", $album_id));
|
100 |
+
if ($album_row) {
|
101 |
+
$preview_image = (($album_row->preview_image) ? $album_row->preview_image : $album_row->random_preview_image);
|
102 |
+
}
|
103 |
+
}
|
104 |
+
return $preview_image;
|
105 |
+
}
|
106 |
+
|
107 |
+
public function bwg_get_unique_slug($slug, $id) {
|
108 |
+
global $wpdb;
|
109 |
+
$slug = sanitize_title($slug);
|
110 |
+
if ($id != 0) {
|
111 |
+
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s AND id != %d", $slug, $id);
|
112 |
+
}
|
113 |
+
else {
|
114 |
+
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s", $slug);
|
115 |
+
}
|
116 |
+
if ($wpdb->get_var($query)) {
|
117 |
+
$num = 2;
|
118 |
+
do {
|
119 |
+
$alt_slug = $slug . "-$num";
|
120 |
+
$num++;
|
121 |
+
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_album WHERE slug = %s", $alt_slug));
|
122 |
+
} while ($slug_check);
|
123 |
+
$slug = $alt_slug;
|
124 |
+
}
|
125 |
+
return $slug;
|
126 |
+
}
|
127 |
+
|
128 |
+
public function bwg_get_unique_name($name, $id) {
|
129 |
+
global $wpdb;
|
130 |
+
if ($id != 0) {
|
131 |
+
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_album WHERE name = %s AND id != %d", $name, $id);
|
132 |
+
}
|
133 |
+
else {
|
134 |
+
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_album WHERE name = %s", $name);
|
135 |
+
}
|
136 |
+
if ($wpdb->get_var($query)) {
|
137 |
+
$num = 2;
|
138 |
+
do {
|
139 |
+
$alt_name = $name . "-$num";
|
140 |
+
$num++;
|
141 |
+
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_album WHERE name = %s", $alt_name));
|
142 |
+
} while ($slug_check);
|
143 |
+
$name = $alt_name;
|
144 |
+
}
|
145 |
+
return $name;
|
146 |
+
}
|
147 |
+
|
148 |
+
public function save_db() {
|
149 |
+
global $wpdb;
|
150 |
+
$id = (int) WDWLibrary::get('current_id', 0);
|
151 |
+
$name = ((isset($_POST['name'])) ? esc_html(stripslashes($_POST['name'])) : '');
|
152 |
+
$name = $this->bwg_get_unique_name($name, $id);
|
153 |
+
$slug = ((isset($_POST['slug']) && esc_html(stripslashes($_POST['slug'])) != '') ? esc_html(stripslashes($_POST['slug'])) : $name);
|
154 |
+
$slug = $this->bwg_get_unique_slug($slug, $id);
|
155 |
+
$description = (isset($_POST['description']) ? stripslashes($_POST['description']) : '');
|
156 |
+
$preview_image = ((isset($_POST['preview_image']) && esc_html(stripslashes($_POST['preview_image'])) != '') ? esc_html(stripslashes($_POST['preview_image'])) : '');
|
157 |
+
$author = get_current_user_id();
|
158 |
+
$published = ((isset($_POST['published']) && esc_html(stripslashes($_POST['published'])) != '') ? esc_html(stripslashes($_POST['published'])) : '');
|
159 |
+
$albums_galleries = (isset($_POST['albums_galleries']) ? esc_html(stripslashes($_POST['albums_galleries'])) : '');
|
160 |
+
if ($id != 0) {
|
161 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_album', array(
|
162 |
+
'name' => $name,
|
163 |
+
'slug' => $slug,
|
164 |
+
'description' => $description,
|
165 |
+
'preview_image' => $preview_image,
|
166 |
+
'published' => $published), array('id' => $id));
|
167 |
+
|
168 |
+
/* Update data in corresponding posts.*/
|
169 |
+
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_album'";
|
170 |
+
$posts = $wpdb->get_results($query2, OBJECT);
|
171 |
+
foreach ($posts as $post) {
|
172 |
+
$post_content = $post->post_content;
|
173 |
+
if (strpos($post_content, ' type="album" ') && strpos($post_content, ' album_id="' . $id . '" ')) {
|
174 |
+
$album_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
|
175 |
+
wp_update_post($album_post);
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
else {
|
180 |
+
$save = $wpdb->insert($wpdb->prefix . 'bwg_album', array(
|
181 |
+
'name' => $name,
|
182 |
+
'slug' => $slug,
|
183 |
+
'description' => $description,
|
184 |
+
'preview_image' => $preview_image,
|
185 |
+
'random_preview_image' => '',
|
186 |
+
'order' => ((int) $wpdb->get_var('SELECT MAX(`order`) FROM ' . $wpdb->prefix . 'bwg_album')) + 1,
|
187 |
+
'author' => $author,
|
188 |
+
'published' => $published
|
189 |
+
), array(
|
190 |
+
'%s',
|
191 |
+
'%s',
|
192 |
+
'%s',
|
193 |
+
'%s',
|
194 |
+
'%s',
|
195 |
+
'%d',
|
196 |
+
'%d',
|
197 |
+
'%d'
|
198 |
+
));
|
199 |
+
$id = $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_album');
|
200 |
+
}
|
201 |
+
$this->save_alb_gal($id, $albums_galleries);
|
202 |
+
// Set random image.
|
203 |
+
$random_preview_image = (($preview_image == '') ? $this->get_image_for_album($id) : '');
|
204 |
+
$wpdb->update($wpdb->prefix . 'bwg_album', array('random_preview_image' => $random_preview_image), array('id' => $id));
|
205 |
+
if ($save !== FALSE) {
|
206 |
+
return 1;
|
207 |
+
}
|
208 |
+
else {
|
209 |
+
return 2;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
public function save_alb_gal($id, $alb_gal_str) {
|
214 |
+
global $wpdb;
|
215 |
+
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d"', $id);
|
216 |
+
$wpdb->query($query);
|
217 |
+
$alb_gals = explode(",", $alb_gal_str);
|
218 |
+
for ($i = 0; $i < count($alb_gals); $i++) {
|
219 |
+
$params = explode(":", $alb_gals[$i]);
|
220 |
+
if (count($params) == 3) {
|
221 |
+
$save = $wpdb->insert($wpdb->prefix . 'bwg_album_gallery', array(
|
222 |
+
'album_id' => $id,
|
223 |
+
'is_album' => $params[1],
|
224 |
+
'alb_gal_id' => $params[2],
|
225 |
+
'order' => $i+1
|
226 |
+
), array(
|
227 |
+
'%d',
|
228 |
+
'%d',
|
229 |
+
'%d',
|
230 |
+
'%d'
|
231 |
+
));
|
232 |
+
}
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
public function delete($id) {
|
237 |
+
global $wpdb;
|
238 |
+
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $id);
|
239 |
+
$query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $id, $id);
|
240 |
+
if ($wpdb->query($query)) {
|
241 |
+
$wpdb->query($query_gal);
|
242 |
+
$message = 3;
|
243 |
+
}
|
244 |
+
else {
|
245 |
+
$message = 2;
|
246 |
+
}
|
247 |
+
/* Delete corresponding posts and their meta.*/
|
248 |
+
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_album'";
|
249 |
+
$posts = $wpdb->get_results($query2, OBJECT);
|
250 |
+
foreach ($posts as $post) {
|
251 |
+
$post_content = $post->post_content;
|
252 |
+
if (strpos($post_content, ' type="album" ') && strpos($post_content, ' album_id="'.$id.'" ')) {
|
253 |
+
wp_delete_post($post->ID, TRUE);
|
254 |
+
}
|
255 |
+
}
|
256 |
+
$page = WDWLibrary::get('page');
|
257 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
258 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
259 |
+
WDWLibrary::spider_redirect($query_url);
|
260 |
+
}
|
261 |
+
|
262 |
+
public function delete_all() {
|
263 |
+
global $wpdb;
|
264 |
+
$flag = FALSE;
|
265 |
+
$album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
266 |
+
foreach ($album_ids_col as $album_id) {
|
267 |
+
if (isset($_POST['check_' . $album_id]) || isset($_POST['check_all_items'])) {
|
268 |
+
$flag = TRUE;
|
269 |
+
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album WHERE id="%d"', $album_id);
|
270 |
+
$query_gal = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE album_id="%d" OR (is_album AND alb_gal_id="%d")', $album_id, $album_id);
|
271 |
+
$wpdb->query($query);
|
272 |
+
$wpdb->query($query_gal);
|
273 |
+
}
|
274 |
+
}
|
275 |
+
if ($flag) {
|
276 |
+
$message = 5;
|
277 |
+
}
|
278 |
+
else {
|
279 |
+
$message = 6;
|
280 |
+
}
|
281 |
+
$page = WDWLibrary::get('page');
|
282 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
283 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
284 |
+
WDWLibrary::spider_redirect($query_url);
|
285 |
+
}
|
286 |
+
|
287 |
+
public function publish($id) {
|
288 |
+
global $wpdb;
|
289 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 1), array('id' => $id));
|
290 |
+
if ($save !== FALSE) {
|
291 |
+
$message = 9;
|
292 |
+
}
|
293 |
+
else {
|
294 |
+
$message = 2;
|
295 |
+
}
|
296 |
+
$page = WDWLibrary::get('page');
|
297 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
298 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
299 |
+
WDWLibrary::spider_redirect($query_url);
|
300 |
+
}
|
301 |
+
|
302 |
+
public function publish_all() {
|
303 |
+
global $wpdb;
|
304 |
+
$flag = FALSE;
|
305 |
+
if (isset($_POST['check_all_items'])) {
|
306 |
+
$wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_album SET published=1');
|
307 |
+
$flag = TRUE;
|
308 |
+
}
|
309 |
+
else {
|
310 |
+
$alum_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
311 |
+
foreach ($alum_ids_col as $album_id) {
|
312 |
+
if (isset($_POST['check_' . $album_id])) {
|
313 |
+
$flag = TRUE;
|
314 |
+
$wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 1), array('id' => $album_id));
|
315 |
+
}
|
316 |
+
}
|
317 |
+
}
|
318 |
+
if ($flag) {
|
319 |
+
$message = 10;
|
320 |
+
}
|
321 |
+
else {
|
322 |
+
$message = 6;
|
323 |
+
}
|
324 |
+
$page = WDWLibrary::get('page');
|
325 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
326 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
327 |
+
WDWLibrary::spider_redirect($query_url);
|
328 |
+
}
|
329 |
+
|
330 |
+
public function unpublish($id) {
|
331 |
+
global $wpdb;
|
332 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 0), array('id' => $id));
|
333 |
+
if ($save !== FALSE) {
|
334 |
+
$message = 11;
|
335 |
+
}
|
336 |
+
else {
|
337 |
+
$message = 2;
|
338 |
+
}
|
339 |
+
$page = WDWLibrary::get('page');
|
340 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
341 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
342 |
+
WDWLibrary::spider_redirect($query_url);
|
343 |
+
}
|
344 |
+
|
345 |
+
public function unpublish_all() {
|
346 |
+
global $wpdb;
|
347 |
+
$flag = FALSE;
|
348 |
+
if (isset($_POST['check_all_items'])) {
|
349 |
+
$wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_album SET published=0');
|
350 |
+
$flag = TRUE;
|
351 |
+
}
|
352 |
+
else {
|
353 |
+
$album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
354 |
+
foreach ($album_ids_col as $album_id) {
|
355 |
+
if (isset($_POST['check_' . $album_id])) {
|
356 |
+
$flag = TRUE;
|
357 |
+
$wpdb->update($wpdb->prefix . 'bwg_album', array('published' => 0), array('id' => $album_id));
|
358 |
+
}
|
359 |
+
}
|
360 |
+
}
|
361 |
+
if ($flag) {
|
362 |
+
$message = 12;
|
363 |
+
}
|
364 |
+
else {
|
365 |
+
$message = 6;
|
366 |
+
}
|
367 |
+
$page = WDWLibrary::get('page');
|
368 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
369 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
370 |
+
WDWLibrary::spider_redirect($query_url);
|
371 |
+
}
|
372 |
+
|
373 |
+
public function save_order($flag = TRUE) {
|
374 |
+
global $wpdb;
|
375 |
+
$album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
|
376 |
+
$message = 0;
|
377 |
+
if ($album_ids_col) {
|
378 |
+
foreach ($album_ids_col as $album_id) {
|
379 |
+
if (isset($_POST['order_input_' . $album_id])) {
|
380 |
+
$order_values[$album_id] = (int) $_POST['order_input_' . $album_id];
|
381 |
+
}
|
382 |
+
else {
|
383 |
+
$order_values[$album_id] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_album WHERE `id`="%d"', $album_id));
|
384 |
+
}
|
385 |
+
}
|
386 |
+
asort($order_values);
|
387 |
+
$i = 1;
|
388 |
+
foreach ($order_values as $key => $order_value) {
|
389 |
+
$wpdb->update($wpdb->prefix . 'bwg_album', array('order' => $i), array('id' => $key));
|
390 |
+
$i++;
|
391 |
+
}
|
392 |
+
if ($flag) {
|
393 |
+
$message = 13;
|
394 |
+
}
|
395 |
+
}
|
396 |
+
$page = WDWLibrary::get('page');
|
397 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'albums_bwg', 'bwg_nonce' );
|
398 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
399 |
+
WDWLibrary::spider_redirect($query_url);
|
400 |
+
}
|
401 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
402 |
+
// Getters & Setters //
|
403 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
404 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
405 |
+
// Private Methods //
|
406 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
407 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
408 |
+
// Listeners //
|
409 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
410 |
}
|
admin/controllers/BWGControllerEditThumb.php
CHANGED
@@ -1,45 +1,45 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerEditThumb {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$type = (isset($_GET['type']) ? esc_html($_GET['type']) : 'display');
|
23 |
-
$edit_type = (isset($_GET['edit_type']) ? esc_html($_GET['edit_type']) : '');
|
24 |
-
$image_id = (isset($_GET['image_id']) ? esc_html($_GET['image_id']) : 0);
|
25 |
-
$this->display($type);
|
26 |
-
}
|
27 |
-
|
28 |
-
public function display($type) {
|
29 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelEditThumb.php";
|
30 |
-
$model = new BWGModelEditThumb();
|
31 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewEditThumb.php";
|
32 |
-
$view = new BWGViewEditThumb($model);
|
33 |
-
$view->$type();
|
34 |
-
}
|
35 |
-
|
36 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
-
// Getters & Setters //
|
38 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
39 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
-
// Private Methods //
|
41 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
42 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
-
// Listeners //
|
44 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
45 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerEditThumb {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$type = (isset($_GET['type']) ? esc_html($_GET['type']) : 'display');
|
23 |
+
$edit_type = (isset($_GET['edit_type']) ? esc_html($_GET['edit_type']) : '');
|
24 |
+
$image_id = (isset($_GET['image_id']) ? esc_html($_GET['image_id']) : 0);
|
25 |
+
$this->display($type);
|
26 |
+
}
|
27 |
+
|
28 |
+
public function display($type) {
|
29 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelEditThumb.php";
|
30 |
+
$model = new BWGModelEditThumb();
|
31 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewEditThumb.php";
|
32 |
+
$view = new BWGViewEditThumb($model);
|
33 |
+
$view->$type();
|
34 |
+
}
|
35 |
+
|
36 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
+
// Getters & Setters //
|
38 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
39 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
+
// Private Methods //
|
41 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
42 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
+
// Listeners //
|
44 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
45 |
}
|
admin/controllers/BWGControllerGalleries_bwg.php
CHANGED
@@ -1,1112 +1,1112 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerGalleries_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
-
$id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
24 |
-
if ($task != '') {
|
25 |
-
if (!WDWLibrary::verify_nonce('galleries_bwg')) {
|
26 |
-
die('Sorry, your nonce did not verify.');
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
if (method_exists($this, $task)) {
|
31 |
-
$this->$task($id);
|
32 |
-
}
|
33 |
-
else {
|
34 |
-
$this->display();
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
public function display() {
|
39 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelGalleries_bwg.php";
|
40 |
-
$model = new BWGModelGalleries_bwg();
|
41 |
-
|
42 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewGalleries_bwg.php";
|
43 |
-
$view = new BWGViewGalleries_bwg($model);
|
44 |
-
$this->delete_unknown_images();
|
45 |
-
$view->display();
|
46 |
-
}
|
47 |
-
|
48 |
-
public function add() {
|
49 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelGalleries_bwg.php";
|
50 |
-
$model = new BWGModelGalleries_bwg();
|
51 |
-
|
52 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewGalleries_bwg.php";
|
53 |
-
$view = new BWGViewGalleries_bwg($model);
|
54 |
-
$view->edit(0);
|
55 |
-
}
|
56 |
-
|
57 |
-
public function edit() {
|
58 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelGalleries_bwg.php";
|
59 |
-
$model = new BWGModelGalleries_bwg();
|
60 |
-
|
61 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewGalleries_bwg.php";
|
62 |
-
$view = new BWGViewGalleries_bwg($model);
|
63 |
-
$id = ((isset($_POST['current_id']) && esc_html(stripslashes($_POST['current_id'])) != '') ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
64 |
-
$view->edit($id);
|
65 |
-
}
|
66 |
-
|
67 |
-
public function save_order_images($gallery_id) {
|
68 |
-
global $wpdb;
|
69 |
-
$imageids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE `gallery_id`="%d"', $gallery_id));
|
70 |
-
if ($imageids_col) {
|
71 |
-
foreach ($imageids_col as $imageid) {
|
72 |
-
if (isset($_POST['order_input_' . $imageid])) {
|
73 |
-
$order_values[$imageid] = (int) $_POST['order_input_' . $imageid];
|
74 |
-
}
|
75 |
-
else {
|
76 |
-
$order_values[$imageid] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_image WHERE `id`="%d"', $imageid));
|
77 |
-
}
|
78 |
-
}
|
79 |
-
asort($order_values);
|
80 |
-
$i = 1;
|
81 |
-
foreach ($order_values as $key => $order_value) {
|
82 |
-
$wpdb->update($wpdb->prefix . 'bwg_image', array('order' => $i), array('id' => $key));
|
83 |
-
$i++;
|
84 |
-
}
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
public function ajax_search() {
|
89 |
-
if (isset($_POST['ajax_task'])) {
|
90 |
-
// Save gallery on "apply" and "save".
|
91 |
-
$this->save_db();
|
92 |
-
global $wpdb;
|
93 |
-
if (!isset($_POST['current_id']) || (esc_html(stripslashes($_POST['current_id'])) == 0) || (esc_html(stripslashes($_POST['current_id'])) == '')) {
|
94 |
-
// If gallery saved first time (insert in db).
|
95 |
-
$_POST['current_id'] = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_gallery');
|
96 |
-
}
|
97 |
-
}
|
98 |
-
$this->save_image_db();
|
99 |
-
if (isset($_POST['check_all_items'])) {
|
100 |
-
$tag_ids = (isset($_POST['added_tags_select_all']) ? esc_html(stripslashes($_POST['added_tags_select_all'])) : '');
|
101 |
-
if ($tag_ids != '') {
|
102 |
-
$this->save_tags_if_select_all($tag_ids);
|
103 |
-
}
|
104 |
-
}
|
105 |
-
$this->save_order_images($_POST['current_id']);
|
106 |
-
if (isset($_POST['ajax_task']) && esc_html($_POST['ajax_task']) != '') {
|
107 |
-
$ajax_task = esc_html($_POST['ajax_task']);
|
108 |
-
if (method_exists($this, $ajax_task)) {
|
109 |
-
$this->$ajax_task();
|
110 |
-
}
|
111 |
-
}
|
112 |
-
$this->edit();
|
113 |
-
}
|
114 |
-
|
115 |
-
public function save_tags_if_select_all($tag_ids) {
|
116 |
-
global $wpdb;
|
117 |
-
$gal_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
118 |
-
$image_ids = (isset($_POST['ids_string']) ? esc_html(stripslashes($_POST['ids_string'])) : '');
|
119 |
-
$current_page_image_ids = explode(',', $image_ids);
|
120 |
-
$tag_ids_array = explode(',', $tag_ids);
|
121 |
-
$query_image = $wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gal_id);
|
122 |
-
$image_id_array = $wpdb->get_results($query_image);
|
123 |
-
foreach ($image_id_array as $image_id) {
|
124 |
-
$flag = FALSE;
|
125 |
-
foreach ($current_page_image_ids as $current_page_image_id) {
|
126 |
-
if ($current_page_image_id == $image_id->id) {
|
127 |
-
$flag = TRUE;
|
128 |
-
}
|
129 |
-
}
|
130 |
-
if ($flag) {
|
131 |
-
continue;
|
132 |
-
}
|
133 |
-
foreach ($tag_ids_array as $tag_id) {
|
134 |
-
if ($tag_id) {
|
135 |
-
$exist_tag = $wpdb->get_var($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d" AND image_id="%d" AND gallery_id="%d"', $tag_id,$image_id->id, $gal_id));
|
136 |
-
if ($exist_tag == NULL) {
|
137 |
-
$save = $wpdb->insert($wpdb->prefix . 'bwg_image_tag', array(
|
138 |
-
'tag_id' => $tag_id,
|
139 |
-
'image_id' => $image_id->id,
|
140 |
-
'gallery_id' => $gal_id,
|
141 |
-
), array(
|
142 |
-
'%d',
|
143 |
-
'%d',
|
144 |
-
'%d',
|
145 |
-
));
|
146 |
-
// Increase tag count in term_taxonomy table.
|
147 |
-
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
|
148 |
-
}
|
149 |
-
}
|
150 |
-
}
|
151 |
-
}
|
152 |
-
}
|
153 |
-
|
154 |
-
public function recover() {
|
155 |
-
global $wpdb;
|
156 |
-
$id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
|
157 |
-
$options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
|
158 |
-
$thumb_width = $options->upload_thumb_width;
|
159 |
-
$thumb_height = $options->upload_thumb_height;
|
160 |
-
$this->recover_image($id, $thumb_width, $thumb_height);
|
161 |
-
}
|
162 |
-
|
163 |
-
public function image_recover_all() {
|
164 |
-
global $wpdb;
|
165 |
-
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
166 |
-
$options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
|
167 |
-
$thumb_width = $options->upload_thumb_width;
|
168 |
-
$thumb_height = $options->upload_thumb_height;
|
169 |
-
$image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
170 |
-
foreach ($image_ids_col as $image_id) {
|
171 |
-
if (isset($_POST['check_' . $image_id]) || isset($_POST['check_all_items'])) {
|
172 |
-
$this->recover_image($image_id, $thumb_width, $thumb_height);
|
173 |
-
}
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
public function recover_image($id, $thumb_width, $thumb_height) {
|
178 |
-
global $WD_BWG_UPLOAD_DIR;
|
179 |
-
global $wpdb;
|
180 |
-
$image_data = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
|
181 |
-
$filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->image_url, ENT_COMPAT | ENT_QUOTES);
|
182 |
-
$thumb_filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
183 |
-
copy(str_replace('/thumb/', '/.original/', $thumb_filename), $filename);
|
184 |
-
list($width_orig, $height_orig, $type_orig) = getimagesize($filename);
|
185 |
-
$percent = $width_orig / $thumb_width;
|
186 |
-
$thumb_height = $height_orig / $percent;
|
187 |
-
@ini_set('memory_limit', '-1');
|
188 |
-
if ($type_orig == 2) {
|
189 |
-
$img_r = imagecreatefromjpeg($filename);
|
190 |
-
$dst_r = ImageCreateTrueColor($thumb_width, $thumb_height);
|
191 |
-
imagecopyresampled($dst_r, $img_r, 0, 0, 0, 0, $thumb_width, $thumb_height, $width_orig, $height_orig);
|
192 |
-
imagejpeg($dst_r, $thumb_filename, 100);
|
193 |
-
imagedestroy($img_r);
|
194 |
-
imagedestroy($dst_r);
|
195 |
-
}
|
196 |
-
elseif ($type_orig == 3) {
|
197 |
-
$img_r = imagecreatefrompng($filename);
|
198 |
-
$dst_r = ImageCreateTrueColor($thumb_width, $thumb_height);
|
199 |
-
imageColorAllocateAlpha($dst_r, 0, 0, 0, 127);
|
200 |
-
imagealphablending($dst_r, FALSE);
|
201 |
-
imagesavealpha($dst_r, TRUE);
|
202 |
-
imagecopyresampled($dst_r, $img_r, 0, 0, 0, 0, $thumb_width, $thumb_height, $width_orig, $height_orig);
|
203 |
-
imagealphablending($dst_r, FALSE);
|
204 |
-
imagesavealpha($dst_r, TRUE);
|
205 |
-
imagepng($dst_r, $thumb_filename, 9);
|
206 |
-
imagedestroy($img_r);
|
207 |
-
imagedestroy($dst_r);
|
208 |
-
}
|
209 |
-
elseif ($type_orig == 1) {
|
210 |
-
$img_r = imagecreatefromgif($filename);
|
211 |
-
$dst_r = ImageCreateTrueColor($thumb_width, $thumb_height);
|
212 |
-
imageColorAllocateAlpha($dst_r, 0, 0, 0, 127);
|
213 |
-
imagealphablending($dst_r, FALSE);
|
214 |
-
imagesavealpha($dst_r, TRUE);
|
215 |
-
imagecopyresampled($dst_r, $img_r, 0, 0, 0, 0, $thumb_width, $thumb_height, $width_orig, $height_orig);
|
216 |
-
imagealphablending($dst_r, FALSE);
|
217 |
-
imagesavealpha($dst_r, TRUE);
|
218 |
-
imagegif($dst_r, $thumb_filename);
|
219 |
-
imagedestroy($img_r);
|
220 |
-
imagedestroy($dst_r);
|
221 |
-
}
|
222 |
-
@ini_restore('memory_limit');
|
223 |
-
?>
|
224 |
-
<script language="javascript">
|
225 |
-
var image_src = window.parent.document.getElementById("image_thumb_<?php echo $id; ?>").src;
|
226 |
-
document.getElementById("image_thumb_<?php echo $id; ?>").src = image_src + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
|
227 |
-
</script>
|
228 |
-
<?php
|
229 |
-
}
|
230 |
-
|
231 |
-
public function image_publish() {
|
232 |
-
$id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
|
233 |
-
global $wpdb;
|
234 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 1), array('id' => $id));
|
235 |
-
}
|
236 |
-
|
237 |
-
public function image_publish_all() {
|
238 |
-
global $wpdb;
|
239 |
-
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
240 |
-
if (isset($_POST['check_all_items'])) {
|
241 |
-
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'bwg_image SET published=1 WHERE gallery_id="%d"', $gallery_id));
|
242 |
-
}
|
243 |
-
else {
|
244 |
-
$image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
245 |
-
foreach ($image_ids_col as $image_id) {
|
246 |
-
if (isset($_POST['check_' . $image_id])) {
|
247 |
-
$wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 1), array('id' => $image_id));
|
248 |
-
}
|
249 |
-
}
|
250 |
-
}
|
251 |
-
}
|
252 |
-
|
253 |
-
public function image_unpublish() {
|
254 |
-
$id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
|
255 |
-
global $wpdb;
|
256 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 0), array('id' => $id));
|
257 |
-
}
|
258 |
-
|
259 |
-
public function image_unpublish_all() {
|
260 |
-
global $wpdb;
|
261 |
-
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
262 |
-
if (isset($_POST['check_all_items'])) {
|
263 |
-
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'bwg_image SET published=0 WHERE gallery_id="%d"', $gallery_id));
|
264 |
-
}
|
265 |
-
else {
|
266 |
-
$image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
267 |
-
foreach ($image_ids_col as $image_id) {
|
268 |
-
if (isset($_POST['check_' . $image_id])) {
|
269 |
-
$wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 0), array('id' => $image_id));
|
270 |
-
}
|
271 |
-
}
|
272 |
-
}
|
273 |
-
}
|
274 |
-
|
275 |
-
public function image_delete() {
|
276 |
-
$id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
|
277 |
-
global $wpdb;
|
278 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
|
279 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_comment WHERE image_id="%d"', $id));
|
280 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE image_id="%d"', $id));
|
281 |
-
$tag_ids = $wpdb->get_col($wpdb->prepare('SELECT tag_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $id));
|
282 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $id));
|
283 |
-
// Increase tag count in term_taxonomy table.
|
284 |
-
if ($tag_ids) {
|
285 |
-
foreach ($tag_ids as $tag_id) {
|
286 |
-
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
|
287 |
-
}
|
288 |
-
}
|
289 |
-
}
|
290 |
-
|
291 |
-
public function image_delete_all() {
|
292 |
-
global $wpdb;
|
293 |
-
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
294 |
-
$image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
295 |
-
foreach ($image_ids_col as $image_id) {
|
296 |
-
if (isset($_POST['check_' . $image_id]) || isset($_POST['check_all_items'])) {
|
297 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $image_id));
|
298 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_comment WHERE image_id="%d"', $image_id));
|
299 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE image_id="%d"', $image_id));
|
300 |
-
$tag_ids = $wpdb->get_col($wpdb->prepare('SELECT tag_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $image_id));
|
301 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $image_id));
|
302 |
-
// Increase tag count in term_taxonomy table.
|
303 |
-
if ($tag_ids) {
|
304 |
-
foreach ($tag_ids as $tag_id) {
|
305 |
-
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
|
306 |
-
}
|
307 |
-
}
|
308 |
-
}
|
309 |
-
}
|
310 |
-
}
|
311 |
-
|
312 |
-
public function image_set_watermark() {
|
313 |
-
global $wpdb;
|
314 |
-
global $WD_BWG_UPLOAD_DIR;
|
315 |
-
$options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
|
316 |
-
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
317 |
-
$images = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
318 |
-
switch ($options->built_in_watermark_type) {
|
319 |
-
case 'text':
|
320 |
-
foreach ($images as $image) {
|
321 |
-
if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
|
322 |
-
$this->set_text_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $options->built_in_watermark_text, $options->built_in_watermark_font, $options->built_in_watermark_font_size, '#' . $options->built_in_watermark_color, $options->built_in_watermark_opacity, $options->built_in_watermark_position);
|
323 |
-
}
|
324 |
-
}
|
325 |
-
break;
|
326 |
-
case 'image':
|
327 |
-
$watermark_path = str_replace(site_url() . '/', ABSPATH, $options->built_in_watermark_url);
|
328 |
-
foreach ($images as $image) {
|
329 |
-
if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
|
330 |
-
$this->set_image_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $watermark_path, $options->built_in_watermark_size, $options->built_in_watermark_size, $options->built_in_watermark_position);
|
331 |
-
}
|
332 |
-
}
|
333 |
-
break;
|
334 |
-
}
|
335 |
-
}
|
336 |
-
|
337 |
-
public function image_resize() {
|
338 |
-
global $wpdb;
|
339 |
-
global $WD_BWG_UPLOAD_DIR;
|
340 |
-
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
341 |
-
$image_width = ((isset($_POST['image_width'])) ? esc_html(stripslashes($_POST['image_width'])) : 1600);
|
342 |
-
$image_height = ((isset($_POST['image_height'])) ? esc_html(stripslashes($_POST['image_height'])) : 1200);
|
343 |
-
$images = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
344 |
-
foreach ($images as $image) {
|
345 |
-
if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
|
346 |
-
$this->bwg_scaled_image(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $image_width, $image_height);
|
347 |
-
}
|
348 |
-
}
|
349 |
-
}
|
350 |
-
|
351 |
-
function bwg_scaled_image($file_path, $max_width = 0, $max_height = 0, $crop = FALSE) {
|
352 |
-
$file_path = htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES);
|
353 |
-
if (!function_exists('getimagesize')) {
|
354 |
-
error_log('Function not found: getimagesize');
|
355 |
-
return FALSE;
|
356 |
-
}
|
357 |
-
list($img_width, $img_height, $type) = @getimagesize($file_path);
|
358 |
-
if (!$img_width || !$img_height) {
|
359 |
-
return FALSE;
|
360 |
-
}
|
361 |
-
$scale = min(
|
362 |
-
$max_width / $img_width,
|
363 |
-
$max_height / $img_height
|
364 |
-
);
|
365 |
-
@ini_set('memory_limit', '-1');
|
366 |
-
if (($scale >= 1) || (($max_width === 0) && ($max_height === 0))) {
|
367 |
-
// if ($file_path !== $new_file_path) {
|
368 |
-
// return copy($file_path, $new_file_path);
|
369 |
-
// }
|
370 |
-
return TRUE;
|
371 |
-
}
|
372 |
-
|
373 |
-
if (!function_exists('imagecreatetruecolor')) {
|
374 |
-
error_log('Function not found: imagecreatetruecolor');
|
375 |
-
return FALSE;
|
376 |
-
}
|
377 |
-
if (!$crop) {
|
378 |
-
$new_width = $img_width * $scale;
|
379 |
-
$new_height = $img_height * $scale;
|
380 |
-
$dst_x = 0;
|
381 |
-
$dst_y = 0;
|
382 |
-
$new_img = @imagecreatetruecolor($new_width, $new_height);
|
383 |
-
}
|
384 |
-
else {
|
385 |
-
if (($img_width / $img_height) >= ($max_width / $max_height)) {
|
386 |
-
$new_width = $img_width / ($img_height / $max_height);
|
387 |
-
$new_height = $max_height;
|
388 |
-
}
|
389 |
-
else {
|
390 |
-
$new_width = $max_width;
|
391 |
-
$new_height = $img_height / ($img_width / $max_width);
|
392 |
-
}
|
393 |
-
$dst_x = 0 - ($new_width - $max_width) / 2;
|
394 |
-
$dst_y = 0 - ($new_height - $max_height) / 2;
|
395 |
-
$new_img = @imagecreatetruecolor($max_width, $max_height);
|
396 |
-
}
|
397 |
-
switch ($type) {
|
398 |
-
case 2:
|
399 |
-
$src_img = @imagecreatefromjpeg($file_path);
|
400 |
-
$write_image = 'imagejpeg';
|
401 |
-
$image_quality = 90;
|
402 |
-
break;
|
403 |
-
case 1:
|
404 |
-
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
|
405 |
-
$src_img = @imagecreatefromgif($file_path);
|
406 |
-
$write_image = 'imagegif';
|
407 |
-
$image_quality = NULL;
|
408 |
-
break;
|
409 |
-
case 3:
|
410 |
-
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
|
411 |
-
@imagealphablending($new_img, FALSE);
|
412 |
-
@imagesavealpha($new_img, TRUE);
|
413 |
-
$src_img = @imagecreatefrompng($file_path);
|
414 |
-
$write_image = 'imagepng';
|
415 |
-
$image_quality = 9;
|
416 |
-
break;
|
417 |
-
default:
|
418 |
-
$src_img = NULL;
|
419 |
-
}
|
420 |
-
$success = $src_img && @imagecopyresampled(
|
421 |
-
$new_img,
|
422 |
-
$src_img,
|
423 |
-
$dst_x,
|
424 |
-
$dst_y,
|
425 |
-
0,
|
426 |
-
0,
|
427 |
-
$new_width,
|
428 |
-
$new_height,
|
429 |
-
$img_width,
|
430 |
-
$img_height
|
431 |
-
) && $write_image($new_img, $file_path, $image_quality);
|
432 |
-
// Free up memory (imagedestroy does not delete files):
|
433 |
-
@imagedestroy($src_img);
|
434 |
-
@imagedestroy($new_img);
|
435 |
-
@ini_restore('memory_limit');
|
436 |
-
return $success;
|
437 |
-
}
|
438 |
-
|
439 |
-
function bwg_hex2rgb($hex) {
|
440 |
-
$hex = str_replace("#", "", $hex);
|
441 |
-
if (strlen($hex) == 3) {
|
442 |
-
$r = hexdec(substr($hex,0,1).substr($hex,0,1));
|
443 |
-
$g = hexdec(substr($hex,1,1).substr($hex,1,1));
|
444 |
-
$b = hexdec(substr($hex,2,1).substr($hex,2,1));
|
445 |
-
}
|
446 |
-
else {
|
447 |
-
$r = hexdec(substr($hex,0,2));
|
448 |
-
$g = hexdec(substr($hex,2,2));
|
449 |
-
$b = hexdec(substr($hex,4,2));
|
450 |
-
}
|
451 |
-
$rgb = array($r, $g, $b);
|
452 |
-
return $rgb;
|
453 |
-
}
|
454 |
-
|
455 |
-
function bwg_imagettfbboxdimensions($font_size, $font_angle, $font, $text) {
|
456 |
-
$box = @ImageTTFBBox($font_size, $font_angle, $font, $text) or die;
|
457 |
-
$max_x = max(array($box[0], $box[2], $box[4], $box[6]));
|
458 |
-
$max_y = max(array($box[1], $box[3], $box[5], $box[7]));
|
459 |
-
$min_x = min(array($box[0], $box[2], $box[4], $box[6]));
|
460 |
-
$min_y = min(array($box[1], $box[3], $box[5], $box[7]));
|
461 |
-
return array(
|
462 |
-
"width" => ($max_x - $min_x),
|
463 |
-
"height" => ($max_y - $min_y)
|
464 |
-
);
|
465 |
-
}
|
466 |
-
|
467 |
-
function set_text_watermark($original_filename, $dest_filename, $watermark_text, $watermark_font, $watermark_font_size, $watermark_color, $watermark_transparency, $watermark_position) {
|
468 |
-
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
469 |
-
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
470 |
-
|
471 |
-
$watermark_transparency = 127 - ($watermark_transparency * 1.27);
|
472 |
-
list($width, $height, $type) = getimagesize($original_filename);
|
473 |
-
$watermark_image = imagecreatetruecolor($width, $height);
|
474 |
-
|
475 |
-
$watermark_color = $this->bwg_hex2rgb($watermark_color);
|
476 |
-
$watermark_color = imagecolorallocatealpha($watermark_image, $watermark_color[0], $watermark_color[1], $watermark_color[2], $watermark_transparency);
|
477 |
-
$watermark_font = WD_BWG_DIR . '/fonts/' . $watermark_font;
|
478 |
-
$watermark_font_size = ($height * $watermark_font_size / 500) . 'px';
|
479 |
-
$watermark_position = explode('-', $watermark_position);
|
480 |
-
$watermark_sizes = $this->bwg_imagettfbboxdimensions($watermark_font_size, 0, $watermark_font, $watermark_text);
|
481 |
-
|
482 |
-
$top = $height - 5;
|
483 |
-
$left = $width - $watermark_sizes['width'] - 5;
|
484 |
-
switch ($watermark_position[0]) {
|
485 |
-
case 'top':
|
486 |
-
$top = $watermark_sizes['height'] + 5;
|
487 |
-
break;
|
488 |
-
case 'middle':
|
489 |
-
$top = ($height + $watermark_sizes['height']) / 2;
|
490 |
-
break;
|
491 |
-
}
|
492 |
-
switch ($watermark_position[1]) {
|
493 |
-
case 'left':
|
494 |
-
$left = 5;
|
495 |
-
break;
|
496 |
-
case 'center':
|
497 |
-
$left = ($width - $watermark_sizes['width']) / 2;
|
498 |
-
break;
|
499 |
-
}
|
500 |
-
@ini_set('memory_limit', '-1');
|
501 |
-
if ($type == 2) {
|
502 |
-
$image = imagecreatefromjpeg($original_filename);
|
503 |
-
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
504 |
-
imagejpeg ($image, $dest_filename, 100);
|
505 |
-
imagedestroy($image);
|
506 |
-
}
|
507 |
-
elseif ($type == 3) {
|
508 |
-
$image = imagecreatefrompng($original_filename);
|
509 |
-
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
510 |
-
imageColorAllocateAlpha($image, 0, 0, 0, 127);
|
511 |
-
imagealphablending($image, FALSE);
|
512 |
-
imagesavealpha($image, TRUE);
|
513 |
-
imagepng($image, $dest_filename, 9);
|
514 |
-
imagedestroy($image);
|
515 |
-
}
|
516 |
-
elseif ($type == 1) {
|
517 |
-
$image = imagecreatefromgif($original_filename);
|
518 |
-
imageColorAllocateAlpha($watermark_image, 0, 0, 0, 127);
|
519 |
-
imagecopy($watermark_image, $image, 0, 0, 0, 0, $width, $height);
|
520 |
-
imagettftext($watermark_image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
521 |
-
imagealphablending($watermark_image, FALSE);
|
522 |
-
imagesavealpha($watermark_image, TRUE);
|
523 |
-
imagegif($watermark_image, $dest_filename);
|
524 |
-
imagedestroy($image);
|
525 |
-
}
|
526 |
-
imagedestroy($watermark_image);
|
527 |
-
@ini_restore('memory_limit');
|
528 |
-
}
|
529 |
-
|
530 |
-
function set_image_watermark($original_filename, $dest_filename, $watermark_url, $watermark_height, $watermark_width, $watermark_position) {
|
531 |
-
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
532 |
-
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
533 |
-
$watermark_url = htmlspecialchars_decode($watermark_url, ENT_COMPAT | ENT_QUOTES);
|
534 |
-
|
535 |
-
list($width, $height, $type) = getimagesize($original_filename);
|
536 |
-
list($width_watermark, $height_watermark, $type_watermark) = getimagesize($watermark_url);
|
537 |
-
|
538 |
-
$watermark_width = $width * $watermark_width / 100;
|
539 |
-
$watermark_height = $height_watermark * $watermark_width / $width_watermark;
|
540 |
-
|
541 |
-
$watermark_position = explode('-', $watermark_position);
|
542 |
-
$top = $height - $watermark_height - 5;
|
543 |
-
$left = $width - $watermark_width - 5;
|
544 |
-
switch ($watermark_position[0]) {
|
545 |
-
case 'top':
|
546 |
-
$top = 5;
|
547 |
-
break;
|
548 |
-
case 'middle':
|
549 |
-
$top = ($height - $watermark_height) / 2;
|
550 |
-
break;
|
551 |
-
}
|
552 |
-
switch ($watermark_position[1]) {
|
553 |
-
case 'left':
|
554 |
-
$left = 5;
|
555 |
-
break;
|
556 |
-
case 'center':
|
557 |
-
$left = ($width - $watermark_width) / 2;
|
558 |
-
break;
|
559 |
-
}
|
560 |
-
@ini_set('memory_limit', '-1');
|
561 |
-
if ($type_watermark == 2) {
|
562 |
-
$watermark_image = imagecreatefromjpeg($watermark_url);
|
563 |
-
}
|
564 |
-
elseif ($type_watermark == 3) {
|
565 |
-
$watermark_image = imagecreatefrompng($watermark_url);
|
566 |
-
}
|
567 |
-
elseif ($type_watermark == 1) {
|
568 |
-
$watermark_image = imagecreatefromgif($watermark_url);
|
569 |
-
}
|
570 |
-
else {
|
571 |
-
return false;
|
572 |
-
}
|
573 |
-
|
574 |
-
$watermark_image_resized = imagecreatetruecolor($watermark_width, $watermark_height);
|
575 |
-
imagecolorallocatealpha($watermark_image_resized, 255, 255, 255, 127);
|
576 |
-
imagealphablending($watermark_image_resized, FALSE);
|
577 |
-
imagesavealpha($watermark_image_resized, TRUE);
|
578 |
-
imagecopyresampled ($watermark_image_resized, $watermark_image, 0, 0, 0, 0, $watermark_width, $watermark_height, $width_watermark, $height_watermark);
|
579 |
-
|
580 |
-
if ($type == 2) {
|
581 |
-
$image = imagecreatefromjpeg($original_filename);
|
582 |
-
imagecopy($image, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
583 |
-
if ($dest_filename <> '') {
|
584 |
-
imagejpeg ($image, $dest_filename, 100);
|
585 |
-
} else {
|
586 |
-
header('Content-Type: image/jpeg');
|
587 |
-
imagejpeg($image, null, 100);
|
588 |
-
};
|
589 |
-
imagedestroy($image);
|
590 |
-
}
|
591 |
-
elseif ($type == 3) {
|
592 |
-
$image = imagecreatefrompng($original_filename);
|
593 |
-
imagecopy($image, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
594 |
-
imagealphablending($image, FALSE);
|
595 |
-
imagesavealpha($image, TRUE);
|
596 |
-
imagepng($image, $dest_filename, 9);
|
597 |
-
imagedestroy($image);
|
598 |
-
}
|
599 |
-
elseif ($type == 1) {
|
600 |
-
$image = imagecreatefromgif($original_filename);
|
601 |
-
$tempimage = imagecreatetruecolor($width, $height);
|
602 |
-
imagecopy($tempimage, $image, 0, 0, 0, 0, $width, $height);
|
603 |
-
imagecopy($tempimage, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
604 |
-
imagegif($tempimage, $dest_filename);
|
605 |
-
imagedestroy($image);
|
606 |
-
imagedestroy($tempimage);
|
607 |
-
}
|
608 |
-
imagedestroy($watermark_image);
|
609 |
-
@ini_restore('memory_limit');
|
610 |
-
}
|
611 |
-
|
612 |
-
public function save_image_db() {
|
613 |
-
global $wpdb;
|
614 |
-
$gal_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
615 |
-
$image_ids = (isset($_POST['ids_string']) ? esc_html(stripslashes($_POST['ids_string'])) : '');
|
616 |
-
$image_id_array = explode(',', $image_ids);
|
617 |
-
foreach ($image_id_array as $image_id) {
|
618 |
-
if ($image_id) {
|
619 |
-
$filename = ((isset($_POST['input_filename_' . $image_id])) ? esc_html(stripslashes($_POST['input_filename_' . $image_id])) : '');
|
620 |
-
$image_url = ((isset($_POST['image_url_' . $image_id])) ? esc_html(stripslashes($_POST['image_url_' . $image_id])) : '');
|
621 |
-
$thumb_url = ((isset($_POST['thumb_url_' . $image_id])) ? esc_html(stripslashes($_POST['thumb_url_' . $image_id])) : '');
|
622 |
-
$description = ((isset($_POST['image_description_' . $image_id])) ? esc_html((stripslashes($_POST['image_description_' . $image_id]))) : '');
|
623 |
-
$alt = ((isset($_POST['image_alt_text_' . $image_id])) ? esc_html(stripslashes($_POST['image_alt_text_' . $image_id])) : '');
|
624 |
-
$date = ((isset($_POST['input_date_modified_' . $image_id])) ? esc_html(stripslashes($_POST['input_date_modified_' . $image_id])) : '');
|
625 |
-
$size = ((isset($_POST['input_size_' . $image_id])) ? esc_html(stripslashes($_POST['input_size_' . $image_id])) : '');
|
626 |
-
$filetype = ((isset($_POST['input_filetype_' . $image_id])) ? esc_html(stripslashes($_POST['input_filetype_' . $image_id])) : '');
|
627 |
-
$resolution = ((isset($_POST['input_resolution_' . $image_id])) ? esc_html(stripslashes($_POST['input_resolution_' . $image_id])) : '');
|
628 |
-
$order = ((isset($_POST['order_input_' . $image_id])) ? esc_html(stripslashes($_POST['order_input_' . $image_id])) : '');
|
629 |
-
$redirect_url = ((isset($_POST['redirect_url_' . $image_id])) ? esc_html(stripslashes($_POST['redirect_url_' . $image_id])) : '');
|
630 |
-
$author = get_current_user_id();
|
631 |
-
$tags_ids = ((isset($_POST['tags_' . $image_id])) ? esc_html(stripslashes($_POST['tags_' . $image_id])) : '');
|
632 |
-
if (strpos($image_id, 'pr_') !== FALSE) {
|
633 |
-
$save = $wpdb->insert($wpdb->prefix . 'bwg_image', array(
|
634 |
-
'gallery_id' => $gal_id,
|
635 |
-
'slug' => WDWLibrary::spider_replace4byte($alt),
|
636 |
-
'filename' => $filename,
|
637 |
-
'image_url' => $image_url,
|
638 |
-
'thumb_url' => $thumb_url,
|
639 |
-
'description' => WDWLibrary::spider_replace4byte($description),
|
640 |
-
'alt' => WDWLibrary::spider_replace4byte($alt),
|
641 |
-
'date' => $date,
|
642 |
-
'size' => $size,
|
643 |
-
'filetype' => $filetype,
|
644 |
-
'resolution' => $resolution,
|
645 |
-
'author' => $author,
|
646 |
-
'order' => $order,
|
647 |
-
'published' => 1,
|
648 |
-
'comment_count' => 0,
|
649 |
-
'avg_rating' => 0,
|
650 |
-
'rate_count' => 0,
|
651 |
-
'hit_count' => 0,
|
652 |
-
'redirect_url' => $redirect_url,
|
653 |
-
), array(
|
654 |
-
'%d',
|
655 |
-
'%s',
|
656 |
-
'%s',
|
657 |
-
'%s',
|
658 |
-
'%s',
|
659 |
-
'%s',
|
660 |
-
'%s',
|
661 |
-
'%s',
|
662 |
-
'%s',
|
663 |
-
'%s',
|
664 |
-
'%s',
|
665 |
-
'%d',
|
666 |
-
'%d',
|
667 |
-
'%d',
|
668 |
-
'%d',
|
669 |
-
'%d',
|
670 |
-
'%d',
|
671 |
-
'%d',
|
672 |
-
'%s',
|
673 |
-
));
|
674 |
-
$new_image_id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_image');
|
675 |
-
if (isset($_POST['check_' . $image_id])) {
|
676 |
-
$_POST['check_' . $new_image_id] = 'on';
|
677 |
-
}
|
678 |
-
if (isset($_POST['image_current_id']) && (esc_html($_POST['image_current_id']) == $image_id)) {
|
679 |
-
$_POST['image_current_id'] = $new_image_id;
|
680 |
-
}
|
681 |
-
$image_id = $new_image_id;
|
682 |
-
}
|
683 |
-
else {
|
684 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_image', array(
|
685 |
-
'gallery_id' => $gal_id,
|
686 |
-
'slug' => WDWLibrary::spider_replace4byte($alt),
|
687 |
-
'filename' => $filename,
|
688 |
-
'image_url' => $image_url,
|
689 |
-
'thumb_url' => $thumb_url,
|
690 |
-
'description' => WDWLibrary::spider_replace4byte($description),
|
691 |
-
'alt' => WDWLibrary::spider_replace4byte($alt),
|
692 |
-
'date' => $date,
|
693 |
-
'size' => $size,
|
694 |
-
'filetype' => $filetype,
|
695 |
-
'resolution' => $resolution,
|
696 |
-
'order' => $order,
|
697 |
-
'redirect_url' => $redirect_url), array('id' => $image_id));
|
698 |
-
}
|
699 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d" AND gallery_id="%d"', $image_id, $gal_id));
|
700 |
-
if ($save !== FALSE) {
|
701 |
-
$tag_id_array = explode(',', $tags_ids);
|
702 |
-
foreach ($tag_id_array as $tag_id) {
|
703 |
-
if ($tag_id) {
|
704 |
-
if (strpos($tag_id, 'pr_') !== FALSE) {
|
705 |
-
$tag_id = substr($tag_id, 3);
|
706 |
-
}
|
707 |
-
$save = $wpdb->insert($wpdb->prefix . 'bwg_image_tag', array(
|
708 |
-
'tag_id' => $tag_id,
|
709 |
-
'image_id' => $image_id,
|
710 |
-
'gallery_id' => $gal_id,
|
711 |
-
), array(
|
712 |
-
'%d',
|
713 |
-
'%d',
|
714 |
-
'%d',
|
715 |
-
));
|
716 |
-
// Increase tag count in term_taxonomy table.
|
717 |
-
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
|
718 |
-
}
|
719 |
-
}
|
720 |
-
}
|
721 |
-
}
|
722 |
-
}
|
723 |
-
}
|
724 |
-
|
725 |
-
public function save() {
|
726 |
-
echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'updated');
|
727 |
-
$this->display();
|
728 |
-
}
|
729 |
-
|
730 |
-
public function delete_unknown_images() {
|
731 |
-
global $wpdb;
|
732 |
-
$wpdb->query('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id=0');
|
733 |
-
}
|
734 |
-
|
735 |
-
public function bwg_get_unique_slug($slug, $id) {
|
736 |
-
global $wpdb;
|
737 |
-
$slug = sanitize_title($slug);
|
738 |
-
if ($id != 0) {
|
739 |
-
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s AND id != %d", $slug, $id);
|
740 |
-
}
|
741 |
-
else {
|
742 |
-
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s", $slug);
|
743 |
-
}
|
744 |
-
if ($wpdb->get_var($query)) {
|
745 |
-
$num = 2;
|
746 |
-
do {
|
747 |
-
$alt_slug = $slug . "-$num";
|
748 |
-
$num++;
|
749 |
-
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s", $alt_slug));
|
750 |
-
} while ($slug_check);
|
751 |
-
$slug = $alt_slug;
|
752 |
-
}
|
753 |
-
return $slug;
|
754 |
-
}
|
755 |
-
|
756 |
-
public function bwg_get_unique_name($name, $id) {
|
757 |
-
global $wpdb;
|
758 |
-
if ($id != 0) {
|
759 |
-
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s AND id != %d", $name, $id);
|
760 |
-
}
|
761 |
-
else {
|
762 |
-
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s", $name);
|
763 |
-
}
|
764 |
-
if ($wpdb->get_var($query)) {
|
765 |
-
$num = 2;
|
766 |
-
do {
|
767 |
-
$alt_name = $name . "-$num";
|
768 |
-
$num++;
|
769 |
-
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s", $alt_name));
|
770 |
-
} while ($slug_check);
|
771 |
-
$name = $alt_name;
|
772 |
-
}
|
773 |
-
return $name;
|
774 |
-
}
|
775 |
-
|
776 |
-
public function save_db() {
|
777 |
-
global $wpdb;
|
778 |
-
global $WD_BWG_UPLOAD_DIR;
|
779 |
-
$id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
780 |
-
$name = ((isset($_POST['name']) && esc_html(stripslashes($_POST['name'])) != '') ? esc_html(stripslashes($_POST['name'])) : 'Gallery');
|
781 |
-
$name = $this->bwg_get_unique_name($name, $id);
|
782 |
-
$slug = ((isset($_POST['slug']) && esc_html(stripslashes($_POST['slug'])) != '') ? esc_html(stripslashes($_POST['slug'])) : $name);
|
783 |
-
$slug = $this->bwg_get_unique_slug($slug, $id);
|
784 |
-
$description = (isset($_POST['description']) ? stripslashes($_POST['description']) : '');
|
785 |
-
$preview_image = (isset($_POST['preview_image']) ? esc_html(stripslashes($_POST['preview_image'])) : '');
|
786 |
-
$random_preview_image = '';
|
787 |
-
if ($preview_image == '') {
|
788 |
-
if ($id != 0) {
|
789 |
-
$random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT random_preview_image FROM " . $wpdb->prefix . "bwg_gallery WHERE id='%d'", $id));
|
790 |
-
if ($random_preview_image == '' || !file_exists(ABSPATH . $WD_BWG_UPLOAD_DIR . $random_preview_image)) {
|
791 |
-
$random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT thumb_url FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='%d' ORDER BY `order`", $id));
|
792 |
-
}
|
793 |
-
}
|
794 |
-
else {
|
795 |
-
$i = 0;
|
796 |
-
$random_preview_image = '';
|
797 |
-
while (isset($_POST['thumb_url_pr_' . $i]) && isset($_POST["input_filetype_pr_" . $i])) {
|
798 |
-
/*if ($_POST["input_filetype_pr_" . $i] == "JPG" || $_POST["input_filetype_pr_" . $i] == "PNG" || $_POST["input_filetype_pr_" . $i] == "GIF")*/ {
|
799 |
-
$random_preview_image = esc_html(stripslashes($_POST['thumb_url_pr_' . $i]));
|
800 |
-
break;
|
801 |
-
}
|
802 |
-
$i++;
|
803 |
-
}
|
804 |
-
}
|
805 |
-
}
|
806 |
-
|
807 |
-
$gallery_type = ((isset($_POST['gallery_type']) && esc_html(stripslashes($_POST['gallery_type'])) != '') ? esc_html(stripslashes($_POST['gallery_type'])) : '');
|
808 |
-
$gallery_source = ((isset($_POST['gallery_source']) && esc_html(stripslashes($_POST['gallery_source'])) != '') ? esc_html(stripslashes($_POST['gallery_source'])) : '');
|
809 |
-
$update_flag = ((isset($_POST['update_flag']) && esc_html(stripslashes($_POST['update_flag'])) != '') ? esc_html(stripslashes($_POST['update_flag'])) : '');
|
810 |
-
$autogallery_image_number = (isset($_POST['autogallery_image_number']) ? (int) $_POST['autogallery_image_number'] : 12);
|
811 |
-
$published = (isset($_POST['published']) ? (int) $_POST['published'] : 1);
|
812 |
-
if ($id != 0) {
|
813 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array(
|
814 |
-
'name' => $name,
|
815 |
-
'slug' => $slug,
|
816 |
-
'description' => $description,
|
817 |
-
'preview_image' => $preview_image,
|
818 |
-
'random_preview_image' => $random_preview_image,
|
819 |
-
'gallery_type' => $gallery_type,
|
820 |
-
'gallery_source' => $gallery_source,
|
821 |
-
'autogallery_image_number' => $autogallery_image_number,
|
822 |
-
'update_flag' => $update_flag,
|
823 |
-
'published' => $published), array('id' => $id));
|
824 |
-
/* Update data in corresponding posts.*/
|
825 |
-
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_gallery'";
|
826 |
-
$posts = $wpdb->get_results($query2, OBJECT);
|
827 |
-
foreach ($posts as $post) {
|
828 |
-
$post_content = $post->post_content;
|
829 |
-
if (strpos($post_content, ' type="gallery" ') && strpos($post_content, ' gallery_id="' . $id . '" ')) {
|
830 |
-
$album_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
|
831 |
-
wp_update_post($album_post);
|
832 |
-
}
|
833 |
-
}
|
834 |
-
}
|
835 |
-
else {
|
836 |
-
$save = $wpdb->insert($wpdb->prefix . 'bwg_gallery', array(
|
837 |
-
'name' => $name,
|
838 |
-
'slug' => $slug,
|
839 |
-
'description' => $description,
|
840 |
-
'page_link' => '',
|
841 |
-
'preview_image' => $preview_image,
|
842 |
-
'random_preview_image' => $random_preview_image,
|
843 |
-
'order' => ((int) $wpdb->get_var('SELECT MAX(`order`) FROM ' . $wpdb->prefix . 'bwg_gallery')) + 1,
|
844 |
-
'author' => get_current_user_id(),
|
845 |
-
'gallery_type' => $gallery_type,
|
846 |
-
'gallery_source' => $gallery_source,
|
847 |
-
'autogallery_image_number' => $autogallery_image_number,
|
848 |
-
'update_flag' => $update_flag,
|
849 |
-
'published' => $published,
|
850 |
-
), array(
|
851 |
-
'%s',
|
852 |
-
'%s',
|
853 |
-
'%s',
|
854 |
-
'%s',
|
855 |
-
'%s',
|
856 |
-
'%s',
|
857 |
-
'%d',
|
858 |
-
'%d',
|
859 |
-
'%s',
|
860 |
-
'%s',
|
861 |
-
'%d',
|
862 |
-
'%s',
|
863 |
-
'%d',
|
864 |
-
));
|
865 |
-
}
|
866 |
-
if ($save !== FALSE) {
|
867 |
-
echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'updated');
|
868 |
-
}
|
869 |
-
else {
|
870 |
-
echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'error');
|
871 |
-
}
|
872 |
-
}
|
873 |
-
|
874 |
-
public function save_order($flag = TRUE) {
|
875 |
-
global $wpdb;
|
876 |
-
$gallery_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
|
877 |
-
if ($gallery_ids_col) {
|
878 |
-
foreach ($gallery_ids_col as $gallery_id) {
|
879 |
-
if (isset($_POST['order_input_' . $gallery_id])) {
|
880 |
-
$order_values[$gallery_id] = (int) $_POST['order_input_' . $gallery_id];
|
881 |
-
}
|
882 |
-
else {
|
883 |
-
$order_values[$gallery_id] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_gallery WHERE `id`="%d"', $gallery_id));
|
884 |
-
}
|
885 |
-
}
|
886 |
-
asort($order_values);
|
887 |
-
$i = 1;
|
888 |
-
foreach ($order_values as $key => $order_value) {
|
889 |
-
$wpdb->update($wpdb->prefix . 'bwg_gallery', array('order' => $i), array('id' => $key));
|
890 |
-
$i++;
|
891 |
-
}
|
892 |
-
if ($flag) {
|
893 |
-
echo WDWLibrary::message(__('Ordering Succesfully Saved.', 'bwg_back'), 'updated');
|
894 |
-
}
|
895 |
-
}
|
896 |
-
$this->display();
|
897 |
-
}
|
898 |
-
|
899 |
-
public function delete($id) {
|
900 |
-
global $wpdb;
|
901 |
-
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_gallery WHERE id="%d"', $id);
|
902 |
-
$query_image = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $id);
|
903 |
-
$query_album_gallery = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE alb_gal_id="%d" AND is_album="%d"', $id, 0);
|
904 |
-
if ($wpdb->query($query)) {
|
905 |
-
$wpdb->query($query_image);
|
906 |
-
$wpdb->query($query_album_gallery);
|
907 |
-
echo WDWLibrary::message(__('Item Succesfully Deleted.', 'bwg_back'), 'updated');
|
908 |
-
}
|
909 |
-
else {
|
910 |
-
echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'error');
|
911 |
-
}
|
912 |
-
/* Delete corresponding posts and their meta.*/
|
913 |
-
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_gallery'";
|
914 |
-
$posts = $wpdb->get_results($query2, OBJECT);
|
915 |
-
foreach ($posts as $post) {
|
916 |
-
$post_content = $post->post_content;
|
917 |
-
if (strpos($post_content, ' type="gallery" ') && strpos($post_content, ' gallery_id="'.$id.'" ')) {
|
918 |
-
wp_delete_post($post->ID, TRUE);
|
919 |
-
}
|
920 |
-
}
|
921 |
-
$this->display();
|
922 |
-
}
|
923 |
-
|
924 |
-
public function delete_all() {
|
925 |
-
global $wpdb;
|
926 |
-
$flag = FALSE;
|
927 |
-
$gal_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
|
928 |
-
foreach ($gal_ids_col as $gal_id) {
|
929 |
-
if (isset($_POST['check_' . $gal_id]) || isset($_POST['check_all_items'])) {
|
930 |
-
$flag = TRUE;
|
931 |
-
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_gallery WHERE id="%d"', $gal_id);
|
932 |
-
$wpdb->query($query);
|
933 |
-
$query_image = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gal_id);
|
934 |
-
$wpdb->query($query_image);
|
935 |
-
$query_album_gallery = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE alb_gal_id="%d" AND is_album="%d"', $gal_id, 0);
|
936 |
-
$wpdb->query($query_album_gallery);
|
937 |
-
}
|
938 |
-
}
|
939 |
-
if ($flag) {
|
940 |
-
echo WDWLibrary::message(__('Items Succesfully Deleted.', 'bwg_back'), 'updated');
|
941 |
-
}
|
942 |
-
else {
|
943 |
-
echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'error');
|
944 |
-
}
|
945 |
-
$this->display();
|
946 |
-
}
|
947 |
-
|
948 |
-
public function publish($id) {
|
949 |
-
global $wpdb;
|
950 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 1), array('id' => $id));
|
951 |
-
if ($save !== FALSE) {
|
952 |
-
echo WDWLibrary::message(__('Item Succesfully Published.', 'bwg_back'), 'updated');
|
953 |
-
}
|
954 |
-
else {
|
955 |
-
echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'error');
|
956 |
-
}
|
957 |
-
$this->display();
|
958 |
-
}
|
959 |
-
|
960 |
-
public function publish_all() {
|
961 |
-
global $wpdb;
|
962 |
-
$flag = FALSE;
|
963 |
-
if (isset($_POST['check_all_items'])) {
|
964 |
-
$wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET published=1');
|
965 |
-
$flag = TRUE;
|
966 |
-
}
|
967 |
-
else {
|
968 |
-
$gal_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
|
969 |
-
foreach ($gal_ids_col as $gal_id) {
|
970 |
-
if (isset($_POST['check_' . $gal_id])) {
|
971 |
-
$flag = TRUE;
|
972 |
-
$wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 1), array('id' => $gal_id));
|
973 |
-
}
|
974 |
-
}
|
975 |
-
}
|
976 |
-
if ($flag) {
|
977 |
-
echo WDWLibrary::message(__('Items Succesfully Published.', 'bwg_back'), 'updated');
|
978 |
-
}
|
979 |
-
else {
|
980 |
-
echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'error');
|
981 |
-
}
|
982 |
-
$this->display();
|
983 |
-
}
|
984 |
-
|
985 |
-
public function unpublish($id) {
|
986 |
-
global $wpdb;
|
987 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 0), array('id' => $id));
|
988 |
-
if ($save !== FALSE) {
|
989 |
-
echo WDWLibrary::message(__('Item Succesfully Unpublished.', 'bwg_back'), 'updated');
|
990 |
-
}
|
991 |
-
else {
|
992 |
-
echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'error');
|
993 |
-
}
|
994 |
-
$this->display();
|
995 |
-
}
|
996 |
-
|
997 |
-
public function unpublish_all() {
|
998 |
-
global $wpdb;
|
999 |
-
$flag = FALSE;
|
1000 |
-
if (isset($_POST['check_all_items'])) {
|
1001 |
-
$wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET published=0');
|
1002 |
-
$flag = TRUE;
|
1003 |
-
}
|
1004 |
-
else {
|
1005 |
-
$gal_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
|
1006 |
-
foreach ($gal_ids_col as $gal_id) {
|
1007 |
-
if (isset($_POST['check_' . $gal_id])) {
|
1008 |
-
$flag = TRUE;
|
1009 |
-
$wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 0), array('id' => $gal_id));
|
1010 |
-
}
|
1011 |
-
}
|
1012 |
-
}
|
1013 |
-
if ($flag) {
|
1014 |
-
echo WDWLibrary::message(__('Items Succesfully Unpublished.', 'bwg_back'), 'updated');
|
1015 |
-
}
|
1016 |
-
else {
|
1017 |
-
echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'error');
|
1018 |
-
}
|
1019 |
-
$this->display();
|
1020 |
-
}
|
1021 |
-
public function resize_image_thumb() {
|
1022 |
-
global $WD_BWG_UPLOAD_DIR;
|
1023 |
-
global $wpdb;
|
1024 |
-
$flag = FALSE;
|
1025 |
-
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
1026 |
-
$img_ids = $wpdb->get_results($wpdb->prepare('SELECT id, thumb_url FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
1027 |
-
$options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option');
|
1028 |
-
foreach ($img_ids as $img_id) {
|
1029 |
-
if (isset($_POST['check_' . $img_id->id]) || isset($_POST['check_all_items'])) {
|
1030 |
-
$flag = TRUE;
|
1031 |
-
$file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
|
1032 |
-
$new_file_path = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
1033 |
-
list($img_width, $img_height, $type) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
|
1034 |
-
if (!$img_width || !$img_height) {
|
1035 |
-
continue;
|
1036 |
-
}
|
1037 |
-
$max_width = $options->upload_thumb_width;
|
1038 |
-
$max_height = $options->upload_thumb_height;
|
1039 |
-
$scale = min(
|
1040 |
-
$max_width / $img_width,
|
1041 |
-
$max_height / $img_height
|
1042 |
-
);
|
1043 |
-
@ini_set('memory_limit', '-1');
|
1044 |
-
if (!function_exists('imagecreatetruecolor')) {
|
1045 |
-
error_log('Function not found: imagecreatetruecolor');
|
1046 |
-
return FALSE;
|
1047 |
-
}
|
1048 |
-
$new_width = $img_width * $scale;
|
1049 |
-
$new_height = $img_height * $scale;
|
1050 |
-
$dst_x = 0;
|
1051 |
-
$dst_y = 0;
|
1052 |
-
$new_img = @imagecreatetruecolor($new_width, $new_height);
|
1053 |
-
switch ($type) {
|
1054 |
-
case 2:
|
1055 |
-
$src_img = @imagecreatefromjpeg($file_path);
|
1056 |
-
$write_image = 'imagejpeg';
|
1057 |
-
$image_quality = isset($options->jpeg_quality) ? $options->jpeg_quality : 75;
|
1058 |
-
break;
|
1059 |
-
case 1:
|
1060 |
-
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
|
1061 |
-
$src_img = @imagecreatefromgif($file_path);
|
1062 |
-
$write_image = 'imagegif';
|
1063 |
-
$image_quality = null;
|
1064 |
-
break;
|
1065 |
-
case 3:
|
1066 |
-
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
|
1067 |
-
@imagealphablending($new_img, false);
|
1068 |
-
@imagesavealpha($new_img, true);
|
1069 |
-
$src_img = @imagecreatefrompng($file_path);
|
1070 |
-
$write_image = 'imagepng';
|
1071 |
-
$image_quality = isset($options->png_quality) ? $options->png_quality : 9;
|
1072 |
-
break;
|
1073 |
-
default:
|
1074 |
-
$src_img = null;
|
1075 |
-
break;
|
1076 |
-
}
|
1077 |
-
$success = $src_img && @imagecopyresampled(
|
1078 |
-
$new_img,
|
1079 |
-
$src_img,
|
1080 |
-
$dst_x,
|
1081 |
-
$dst_y,
|
1082 |
-
0,
|
1083 |
-
0,
|
1084 |
-
$new_width,
|
1085 |
-
$new_height,
|
1086 |
-
$img_width,
|
1087 |
-
$img_height
|
1088 |
-
) && $write_image($new_img, $new_file_path, $image_quality);
|
1089 |
-
// Free up memory (imagedestroy does not delete files):
|
1090 |
-
@imagedestroy($src_img);
|
1091 |
-
@imagedestroy($new_img);
|
1092 |
-
@ini_restore('memory_limit');
|
1093 |
-
}
|
1094 |
-
}
|
1095 |
-
if ($flag == false) {
|
1096 |
-
echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'error');
|
1097 |
-
}
|
1098 |
-
else {
|
1099 |
-
echo WDWLibrary::message(__('Thumb Succesfully Resized', 'bwg_back'), 'updated');
|
1100 |
-
}
|
1101 |
-
}
|
1102 |
-
|
1103 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1104 |
-
// Getters & Setters //
|
1105 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1106 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1107 |
-
// Private Methods //
|
1108 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1109 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1110 |
-
// Listeners //
|
1111 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1112 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerGalleries_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
+
$id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
24 |
+
if ($task != '') {
|
25 |
+
if (!WDWLibrary::verify_nonce('galleries_bwg')) {
|
26 |
+
die('Sorry, your nonce did not verify.');
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
if (method_exists($this, $task)) {
|
31 |
+
$this->$task($id);
|
32 |
+
}
|
33 |
+
else {
|
34 |
+
$this->display();
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
public function display() {
|
39 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelGalleries_bwg.php";
|
40 |
+
$model = new BWGModelGalleries_bwg();
|
41 |
+
|
42 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewGalleries_bwg.php";
|
43 |
+
$view = new BWGViewGalleries_bwg($model);
|
44 |
+
$this->delete_unknown_images();
|
45 |
+
$view->display();
|
46 |
+
}
|
47 |
+
|
48 |
+
public function add() {
|
49 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelGalleries_bwg.php";
|
50 |
+
$model = new BWGModelGalleries_bwg();
|
51 |
+
|
52 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewGalleries_bwg.php";
|
53 |
+
$view = new BWGViewGalleries_bwg($model);
|
54 |
+
$view->edit(0);
|
55 |
+
}
|
56 |
+
|
57 |
+
public function edit() {
|
58 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelGalleries_bwg.php";
|
59 |
+
$model = new BWGModelGalleries_bwg();
|
60 |
+
|
61 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewGalleries_bwg.php";
|
62 |
+
$view = new BWGViewGalleries_bwg($model);
|
63 |
+
$id = ((isset($_POST['current_id']) && esc_html(stripslashes($_POST['current_id'])) != '') ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
64 |
+
$view->edit($id);
|
65 |
+
}
|
66 |
+
|
67 |
+
public function save_order_images($gallery_id) {
|
68 |
+
global $wpdb;
|
69 |
+
$imageids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE `gallery_id`="%d"', $gallery_id));
|
70 |
+
if ($imageids_col) {
|
71 |
+
foreach ($imageids_col as $imageid) {
|
72 |
+
if (isset($_POST['order_input_' . $imageid])) {
|
73 |
+
$order_values[$imageid] = (int) $_POST['order_input_' . $imageid];
|
74 |
+
}
|
75 |
+
else {
|
76 |
+
$order_values[$imageid] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_image WHERE `id`="%d"', $imageid));
|
77 |
+
}
|
78 |
+
}
|
79 |
+
asort($order_values);
|
80 |
+
$i = 1;
|
81 |
+
foreach ($order_values as $key => $order_value) {
|
82 |
+
$wpdb->update($wpdb->prefix . 'bwg_image', array('order' => $i), array('id' => $key));
|
83 |
+
$i++;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
public function ajax_search() {
|
89 |
+
if (isset($_POST['ajax_task'])) {
|
90 |
+
// Save gallery on "apply" and "save".
|
91 |
+
$this->save_db();
|
92 |
+
global $wpdb;
|
93 |
+
if (!isset($_POST['current_id']) || (esc_html(stripslashes($_POST['current_id'])) == 0) || (esc_html(stripslashes($_POST['current_id'])) == '')) {
|
94 |
+
// If gallery saved first time (insert in db).
|
95 |
+
$_POST['current_id'] = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_gallery');
|
96 |
+
}
|
97 |
+
}
|
98 |
+
$this->save_image_db();
|
99 |
+
if (isset($_POST['check_all_items'])) {
|
100 |
+
$tag_ids = (isset($_POST['added_tags_select_all']) ? esc_html(stripslashes($_POST['added_tags_select_all'])) : '');
|
101 |
+
if ($tag_ids != '') {
|
102 |
+
$this->save_tags_if_select_all($tag_ids);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
$this->save_order_images($_POST['current_id']);
|
106 |
+
if (isset($_POST['ajax_task']) && esc_html($_POST['ajax_task']) != '') {
|
107 |
+
$ajax_task = esc_html($_POST['ajax_task']);
|
108 |
+
if (method_exists($this, $ajax_task)) {
|
109 |
+
$this->$ajax_task();
|
110 |
+
}
|
111 |
+
}
|
112 |
+
$this->edit();
|
113 |
+
}
|
114 |
+
|
115 |
+
public function save_tags_if_select_all($tag_ids) {
|
116 |
+
global $wpdb;
|
117 |
+
$gal_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
118 |
+
$image_ids = (isset($_POST['ids_string']) ? esc_html(stripslashes($_POST['ids_string'])) : '');
|
119 |
+
$current_page_image_ids = explode(',', $image_ids);
|
120 |
+
$tag_ids_array = explode(',', $tag_ids);
|
121 |
+
$query_image = $wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gal_id);
|
122 |
+
$image_id_array = $wpdb->get_results($query_image);
|
123 |
+
foreach ($image_id_array as $image_id) {
|
124 |
+
$flag = FALSE;
|
125 |
+
foreach ($current_page_image_ids as $current_page_image_id) {
|
126 |
+
if ($current_page_image_id == $image_id->id) {
|
127 |
+
$flag = TRUE;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
if ($flag) {
|
131 |
+
continue;
|
132 |
+
}
|
133 |
+
foreach ($tag_ids_array as $tag_id) {
|
134 |
+
if ($tag_id) {
|
135 |
+
$exist_tag = $wpdb->get_var($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d" AND image_id="%d" AND gallery_id="%d"', $tag_id,$image_id->id, $gal_id));
|
136 |
+
if ($exist_tag == NULL) {
|
137 |
+
$save = $wpdb->insert($wpdb->prefix . 'bwg_image_tag', array(
|
138 |
+
'tag_id' => $tag_id,
|
139 |
+
'image_id' => $image_id->id,
|
140 |
+
'gallery_id' => $gal_id,
|
141 |
+
), array(
|
142 |
+
'%d',
|
143 |
+
'%d',
|
144 |
+
'%d',
|
145 |
+
));
|
146 |
+
// Increase tag count in term_taxonomy table.
|
147 |
+
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
public function recover() {
|
155 |
+
global $wpdb;
|
156 |
+
$id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
|
157 |
+
$options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
|
158 |
+
$thumb_width = $options->upload_thumb_width;
|
159 |
+
$thumb_height = $options->upload_thumb_height;
|
160 |
+
$this->recover_image($id, $thumb_width, $thumb_height);
|
161 |
+
}
|
162 |
+
|
163 |
+
public function image_recover_all() {
|
164 |
+
global $wpdb;
|
165 |
+
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
166 |
+
$options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
|
167 |
+
$thumb_width = $options->upload_thumb_width;
|
168 |
+
$thumb_height = $options->upload_thumb_height;
|
169 |
+
$image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
170 |
+
foreach ($image_ids_col as $image_id) {
|
171 |
+
if (isset($_POST['check_' . $image_id]) || isset($_POST['check_all_items'])) {
|
172 |
+
$this->recover_image($image_id, $thumb_width, $thumb_height);
|
173 |
+
}
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
public function recover_image($id, $thumb_width, $thumb_height) {
|
178 |
+
global $WD_BWG_UPLOAD_DIR;
|
179 |
+
global $wpdb;
|
180 |
+
$image_data = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
|
181 |
+
$filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->image_url, ENT_COMPAT | ENT_QUOTES);
|
182 |
+
$thumb_filename = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $image_data->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
183 |
+
copy(str_replace('/thumb/', '/.original/', $thumb_filename), $filename);
|
184 |
+
list($width_orig, $height_orig, $type_orig) = getimagesize($filename);
|
185 |
+
$percent = $width_orig / $thumb_width;
|
186 |
+
$thumb_height = $height_orig / $percent;
|
187 |
+
@ini_set('memory_limit', '-1');
|
188 |
+
if ($type_orig == 2) {
|
189 |
+
$img_r = imagecreatefromjpeg($filename);
|
190 |
+
$dst_r = ImageCreateTrueColor($thumb_width, $thumb_height);
|
191 |
+
imagecopyresampled($dst_r, $img_r, 0, 0, 0, 0, $thumb_width, $thumb_height, $width_orig, $height_orig);
|
192 |
+
imagejpeg($dst_r, $thumb_filename, 100);
|
193 |
+
imagedestroy($img_r);
|
194 |
+
imagedestroy($dst_r);
|
195 |
+
}
|
196 |
+
elseif ($type_orig == 3) {
|
197 |
+
$img_r = imagecreatefrompng($filename);
|
198 |
+
$dst_r = ImageCreateTrueColor($thumb_width, $thumb_height);
|
199 |
+
imageColorAllocateAlpha($dst_r, 0, 0, 0, 127);
|
200 |
+
imagealphablending($dst_r, FALSE);
|
201 |
+
imagesavealpha($dst_r, TRUE);
|
202 |
+
imagecopyresampled($dst_r, $img_r, 0, 0, 0, 0, $thumb_width, $thumb_height, $width_orig, $height_orig);
|
203 |
+
imagealphablending($dst_r, FALSE);
|
204 |
+
imagesavealpha($dst_r, TRUE);
|
205 |
+
imagepng($dst_r, $thumb_filename, 9);
|
206 |
+
imagedestroy($img_r);
|
207 |
+
imagedestroy($dst_r);
|
208 |
+
}
|
209 |
+
elseif ($type_orig == 1) {
|
210 |
+
$img_r = imagecreatefromgif($filename);
|
211 |
+
$dst_r = ImageCreateTrueColor($thumb_width, $thumb_height);
|
212 |
+
imageColorAllocateAlpha($dst_r, 0, 0, 0, 127);
|
213 |
+
imagealphablending($dst_r, FALSE);
|
214 |
+
imagesavealpha($dst_r, TRUE);
|
215 |
+
imagecopyresampled($dst_r, $img_r, 0, 0, 0, 0, $thumb_width, $thumb_height, $width_orig, $height_orig);
|
216 |
+
imagealphablending($dst_r, FALSE);
|
217 |
+
imagesavealpha($dst_r, TRUE);
|
218 |
+
imagegif($dst_r, $thumb_filename);
|
219 |
+
imagedestroy($img_r);
|
220 |
+
imagedestroy($dst_r);
|
221 |
+
}
|
222 |
+
@ini_restore('memory_limit');
|
223 |
+
?>
|
224 |
+
<script language="javascript">
|
225 |
+
var image_src = window.parent.document.getElementById("image_thumb_<?php echo $id; ?>").src;
|
226 |
+
document.getElementById("image_thumb_<?php echo $id; ?>").src = image_src + "?date=<?php echo date('Y-m-y H:i:s'); ?>";
|
227 |
+
</script>
|
228 |
+
<?php
|
229 |
+
}
|
230 |
+
|
231 |
+
public function image_publish() {
|
232 |
+
$id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
|
233 |
+
global $wpdb;
|
234 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 1), array('id' => $id));
|
235 |
+
}
|
236 |
+
|
237 |
+
public function image_publish_all() {
|
238 |
+
global $wpdb;
|
239 |
+
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
240 |
+
if (isset($_POST['check_all_items'])) {
|
241 |
+
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'bwg_image SET published=1 WHERE gallery_id="%d"', $gallery_id));
|
242 |
+
}
|
243 |
+
else {
|
244 |
+
$image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
245 |
+
foreach ($image_ids_col as $image_id) {
|
246 |
+
if (isset($_POST['check_' . $image_id])) {
|
247 |
+
$wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 1), array('id' => $image_id));
|
248 |
+
}
|
249 |
+
}
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
public function image_unpublish() {
|
254 |
+
$id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
|
255 |
+
global $wpdb;
|
256 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 0), array('id' => $id));
|
257 |
+
}
|
258 |
+
|
259 |
+
public function image_unpublish_all() {
|
260 |
+
global $wpdb;
|
261 |
+
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
262 |
+
if (isset($_POST['check_all_items'])) {
|
263 |
+
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'bwg_image SET published=0 WHERE gallery_id="%d"', $gallery_id));
|
264 |
+
}
|
265 |
+
else {
|
266 |
+
$image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
267 |
+
foreach ($image_ids_col as $image_id) {
|
268 |
+
if (isset($_POST['check_' . $image_id])) {
|
269 |
+
$wpdb->update($wpdb->prefix . 'bwg_image', array('published' => 0), array('id' => $image_id));
|
270 |
+
}
|
271 |
+
}
|
272 |
+
}
|
273 |
+
}
|
274 |
+
|
275 |
+
public function image_delete() {
|
276 |
+
$id = ((isset($_POST['image_current_id'])) ? esc_html(stripslashes($_POST['image_current_id'])) : 0);
|
277 |
+
global $wpdb;
|
278 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
|
279 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_comment WHERE image_id="%d"', $id));
|
280 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE image_id="%d"', $id));
|
281 |
+
$tag_ids = $wpdb->get_col($wpdb->prepare('SELECT tag_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $id));
|
282 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $id));
|
283 |
+
// Increase tag count in term_taxonomy table.
|
284 |
+
if ($tag_ids) {
|
285 |
+
foreach ($tag_ids as $tag_id) {
|
286 |
+
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
|
287 |
+
}
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
public function image_delete_all() {
|
292 |
+
global $wpdb;
|
293 |
+
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
294 |
+
$image_ids_col = $wpdb->get_col($wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
295 |
+
foreach ($image_ids_col as $image_id) {
|
296 |
+
if (isset($_POST['check_' . $image_id]) || isset($_POST['check_all_items'])) {
|
297 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $image_id));
|
298 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_comment WHERE image_id="%d"', $image_id));
|
299 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_rate WHERE image_id="%d"', $image_id));
|
300 |
+
$tag_ids = $wpdb->get_col($wpdb->prepare('SELECT tag_id FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $image_id));
|
301 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d"', $image_id));
|
302 |
+
// Increase tag count in term_taxonomy table.
|
303 |
+
if ($tag_ids) {
|
304 |
+
foreach ($tag_ids as $tag_id) {
|
305 |
+
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
|
306 |
+
}
|
307 |
+
}
|
308 |
+
}
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
public function image_set_watermark() {
|
313 |
+
global $wpdb;
|
314 |
+
global $WD_BWG_UPLOAD_DIR;
|
315 |
+
$options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
|
316 |
+
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
317 |
+
$images = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
318 |
+
switch ($options->built_in_watermark_type) {
|
319 |
+
case 'text':
|
320 |
+
foreach ($images as $image) {
|
321 |
+
if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
|
322 |
+
$this->set_text_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $options->built_in_watermark_text, $options->built_in_watermark_font, $options->built_in_watermark_font_size, '#' . $options->built_in_watermark_color, $options->built_in_watermark_opacity, $options->built_in_watermark_position);
|
323 |
+
}
|
324 |
+
}
|
325 |
+
break;
|
326 |
+
case 'image':
|
327 |
+
$watermark_path = str_replace(site_url() . '/', ABSPATH, $options->built_in_watermark_url);
|
328 |
+
foreach ($images as $image) {
|
329 |
+
if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
|
330 |
+
$this->set_image_watermark(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $watermark_path, $options->built_in_watermark_size, $options->built_in_watermark_size, $options->built_in_watermark_position);
|
331 |
+
}
|
332 |
+
}
|
333 |
+
break;
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
public function image_resize() {
|
338 |
+
global $wpdb;
|
339 |
+
global $WD_BWG_UPLOAD_DIR;
|
340 |
+
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
341 |
+
$image_width = ((isset($_POST['image_width'])) ? esc_html(stripslashes($_POST['image_width'])) : 1600);
|
342 |
+
$image_height = ((isset($_POST['image_height'])) ? esc_html(stripslashes($_POST['image_height'])) : 1200);
|
343 |
+
$images = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
344 |
+
foreach ($images as $image) {
|
345 |
+
if (isset($_POST['check_' . $image->id]) || isset($_POST['check_all_items'])) {
|
346 |
+
$this->bwg_scaled_image(ABSPATH . $WD_BWG_UPLOAD_DIR . $image->image_url, $image_width, $image_height);
|
347 |
+
}
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
+
function bwg_scaled_image($file_path, $max_width = 0, $max_height = 0, $crop = FALSE) {
|
352 |
+
$file_path = htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES);
|
353 |
+
if (!function_exists('getimagesize')) {
|
354 |
+
error_log('Function not found: getimagesize');
|
355 |
+
return FALSE;
|
356 |
+
}
|
357 |
+
list($img_width, $img_height, $type) = @getimagesize($file_path);
|
358 |
+
if (!$img_width || !$img_height) {
|
359 |
+
return FALSE;
|
360 |
+
}
|
361 |
+
$scale = min(
|
362 |
+
$max_width / $img_width,
|
363 |
+
$max_height / $img_height
|
364 |
+
);
|
365 |
+
@ini_set('memory_limit', '-1');
|
366 |
+
if (($scale >= 1) || (($max_width === 0) && ($max_height === 0))) {
|
367 |
+
// if ($file_path !== $new_file_path) {
|
368 |
+
// return copy($file_path, $new_file_path);
|
369 |
+
// }
|
370 |
+
return TRUE;
|
371 |
+
}
|
372 |
+
|
373 |
+
if (!function_exists('imagecreatetruecolor')) {
|
374 |
+
error_log('Function not found: imagecreatetruecolor');
|
375 |
+
return FALSE;
|
376 |
+
}
|
377 |
+
if (!$crop) {
|
378 |
+
$new_width = $img_width * $scale;
|
379 |
+
$new_height = $img_height * $scale;
|
380 |
+
$dst_x = 0;
|
381 |
+
$dst_y = 0;
|
382 |
+
$new_img = @imagecreatetruecolor($new_width, $new_height);
|
383 |
+
}
|
384 |
+
else {
|
385 |
+
if (($img_width / $img_height) >= ($max_width / $max_height)) {
|
386 |
+
$new_width = $img_width / ($img_height / $max_height);
|
387 |
+
$new_height = $max_height;
|
388 |
+
}
|
389 |
+
else {
|
390 |
+
$new_width = $max_width;
|
391 |
+
$new_height = $img_height / ($img_width / $max_width);
|
392 |
+
}
|
393 |
+
$dst_x = 0 - ($new_width - $max_width) / 2;
|
394 |
+
$dst_y = 0 - ($new_height - $max_height) / 2;
|
395 |
+
$new_img = @imagecreatetruecolor($max_width, $max_height);
|
396 |
+
}
|
397 |
+
switch ($type) {
|
398 |
+
case 2:
|
399 |
+
$src_img = @imagecreatefromjpeg($file_path);
|
400 |
+
$write_image = 'imagejpeg';
|
401 |
+
$image_quality = 90;
|
402 |
+
break;
|
403 |
+
case 1:
|
404 |
+
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
|
405 |
+
$src_img = @imagecreatefromgif($file_path);
|
406 |
+
$write_image = 'imagegif';
|
407 |
+
$image_quality = NULL;
|
408 |
+
break;
|
409 |
+
case 3:
|
410 |
+
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
|
411 |
+
@imagealphablending($new_img, FALSE);
|
412 |
+
@imagesavealpha($new_img, TRUE);
|
413 |
+
$src_img = @imagecreatefrompng($file_path);
|
414 |
+
$write_image = 'imagepng';
|
415 |
+
$image_quality = 9;
|
416 |
+
break;
|
417 |
+
default:
|
418 |
+
$src_img = NULL;
|
419 |
+
}
|
420 |
+
$success = $src_img && @imagecopyresampled(
|
421 |
+
$new_img,
|
422 |
+
$src_img,
|
423 |
+
$dst_x,
|
424 |
+
$dst_y,
|
425 |
+
0,
|
426 |
+
0,
|
427 |
+
$new_width,
|
428 |
+
$new_height,
|
429 |
+
$img_width,
|
430 |
+
$img_height
|
431 |
+
) && $write_image($new_img, $file_path, $image_quality);
|
432 |
+
// Free up memory (imagedestroy does not delete files):
|
433 |
+
@imagedestroy($src_img);
|
434 |
+
@imagedestroy($new_img);
|
435 |
+
@ini_restore('memory_limit');
|
436 |
+
return $success;
|
437 |
+
}
|
438 |
+
|
439 |
+
function bwg_hex2rgb($hex) {
|
440 |
+
$hex = str_replace("#", "", $hex);
|
441 |
+
if (strlen($hex) == 3) {
|
442 |
+
$r = hexdec(substr($hex,0,1).substr($hex,0,1));
|
443 |
+
$g = hexdec(substr($hex,1,1).substr($hex,1,1));
|
444 |
+
$b = hexdec(substr($hex,2,1).substr($hex,2,1));
|
445 |
+
}
|
446 |
+
else {
|
447 |
+
$r = hexdec(substr($hex,0,2));
|
448 |
+
$g = hexdec(substr($hex,2,2));
|
449 |
+
$b = hexdec(substr($hex,4,2));
|
450 |
+
}
|
451 |
+
$rgb = array($r, $g, $b);
|
452 |
+
return $rgb;
|
453 |
+
}
|
454 |
+
|
455 |
+
function bwg_imagettfbboxdimensions($font_size, $font_angle, $font, $text) {
|
456 |
+
$box = @ImageTTFBBox($font_size, $font_angle, $font, $text) or die;
|
457 |
+
$max_x = max(array($box[0], $box[2], $box[4], $box[6]));
|
458 |
+
$max_y = max(array($box[1], $box[3], $box[5], $box[7]));
|
459 |
+
$min_x = min(array($box[0], $box[2], $box[4], $box[6]));
|
460 |
+
$min_y = min(array($box[1], $box[3], $box[5], $box[7]));
|
461 |
+
return array(
|
462 |
+
"width" => ($max_x - $min_x),
|
463 |
+
"height" => ($max_y - $min_y)
|
464 |
+
);
|
465 |
+
}
|
466 |
+
|
467 |
+
function set_text_watermark($original_filename, $dest_filename, $watermark_text, $watermark_font, $watermark_font_size, $watermark_color, $watermark_transparency, $watermark_position) {
|
468 |
+
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
469 |
+
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
470 |
+
|
471 |
+
$watermark_transparency = 127 - ($watermark_transparency * 1.27);
|
472 |
+
list($width, $height, $type) = getimagesize($original_filename);
|
473 |
+
$watermark_image = imagecreatetruecolor($width, $height);
|
474 |
+
|
475 |
+
$watermark_color = $this->bwg_hex2rgb($watermark_color);
|
476 |
+
$watermark_color = imagecolorallocatealpha($watermark_image, $watermark_color[0], $watermark_color[1], $watermark_color[2], $watermark_transparency);
|
477 |
+
$watermark_font = WD_BWG_DIR . '/fonts/' . $watermark_font;
|
478 |
+
$watermark_font_size = ($height * $watermark_font_size / 500) . 'px';
|
479 |
+
$watermark_position = explode('-', $watermark_position);
|
480 |
+
$watermark_sizes = $this->bwg_imagettfbboxdimensions($watermark_font_size, 0, $watermark_font, $watermark_text);
|
481 |
+
|
482 |
+
$top = $height - 5;
|
483 |
+
$left = $width - $watermark_sizes['width'] - 5;
|
484 |
+
switch ($watermark_position[0]) {
|
485 |
+
case 'top':
|
486 |
+
$top = $watermark_sizes['height'] + 5;
|
487 |
+
break;
|
488 |
+
case 'middle':
|
489 |
+
$top = ($height + $watermark_sizes['height']) / 2;
|
490 |
+
break;
|
491 |
+
}
|
492 |
+
switch ($watermark_position[1]) {
|
493 |
+
case 'left':
|
494 |
+
$left = 5;
|
495 |
+
break;
|
496 |
+
case 'center':
|
497 |
+
$left = ($width - $watermark_sizes['width']) / 2;
|
498 |
+
break;
|
499 |
+
}
|
500 |
+
@ini_set('memory_limit', '-1');
|
501 |
+
if ($type == 2) {
|
502 |
+
$image = imagecreatefromjpeg($original_filename);
|
503 |
+
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
504 |
+
imagejpeg ($image, $dest_filename, 100);
|
505 |
+
imagedestroy($image);
|
506 |
+
}
|
507 |
+
elseif ($type == 3) {
|
508 |
+
$image = imagecreatefrompng($original_filename);
|
509 |
+
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
510 |
+
imageColorAllocateAlpha($image, 0, 0, 0, 127);
|
511 |
+
imagealphablending($image, FALSE);
|
512 |
+
imagesavealpha($image, TRUE);
|
513 |
+
imagepng($image, $dest_filename, 9);
|
514 |
+
imagedestroy($image);
|
515 |
+
}
|
516 |
+
elseif ($type == 1) {
|
517 |
+
$image = imagecreatefromgif($original_filename);
|
518 |
+
imageColorAllocateAlpha($watermark_image, 0, 0, 0, 127);
|
519 |
+
imagecopy($watermark_image, $image, 0, 0, 0, 0, $width, $height);
|
520 |
+
imagettftext($watermark_image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
521 |
+
imagealphablending($watermark_image, FALSE);
|
522 |
+
imagesavealpha($watermark_image, TRUE);
|
523 |
+
imagegif($watermark_image, $dest_filename);
|
524 |
+
imagedestroy($image);
|
525 |
+
}
|
526 |
+
imagedestroy($watermark_image);
|
527 |
+
@ini_restore('memory_limit');
|
528 |
+
}
|
529 |
+
|
530 |
+
function set_image_watermark($original_filename, $dest_filename, $watermark_url, $watermark_height, $watermark_width, $watermark_position) {
|
531 |
+
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
532 |
+
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
533 |
+
$watermark_url = htmlspecialchars_decode($watermark_url, ENT_COMPAT | ENT_QUOTES);
|
534 |
+
|
535 |
+
list($width, $height, $type) = getimagesize($original_filename);
|
536 |
+
list($width_watermark, $height_watermark, $type_watermark) = getimagesize($watermark_url);
|
537 |
+
|
538 |
+
$watermark_width = $width * $watermark_width / 100;
|
539 |
+
$watermark_height = $height_watermark * $watermark_width / $width_watermark;
|
540 |
+
|
541 |
+
$watermark_position = explode('-', $watermark_position);
|
542 |
+
$top = $height - $watermark_height - 5;
|
543 |
+
$left = $width - $watermark_width - 5;
|
544 |
+
switch ($watermark_position[0]) {
|
545 |
+
case 'top':
|
546 |
+
$top = 5;
|
547 |
+
break;
|
548 |
+
case 'middle':
|
549 |
+
$top = ($height - $watermark_height) / 2;
|
550 |
+
break;
|
551 |
+
}
|
552 |
+
switch ($watermark_position[1]) {
|
553 |
+
case 'left':
|
554 |
+
$left = 5;
|
555 |
+
break;
|
556 |
+
case 'center':
|
557 |
+
$left = ($width - $watermark_width) / 2;
|
558 |
+
break;
|
559 |
+
}
|
560 |
+
@ini_set('memory_limit', '-1');
|
561 |
+
if ($type_watermark == 2) {
|
562 |
+
$watermark_image = imagecreatefromjpeg($watermark_url);
|
563 |
+
}
|
564 |
+
elseif ($type_watermark == 3) {
|
565 |
+
$watermark_image = imagecreatefrompng($watermark_url);
|
566 |
+
}
|
567 |
+
elseif ($type_watermark == 1) {
|
568 |
+
$watermark_image = imagecreatefromgif($watermark_url);
|
569 |
+
}
|
570 |
+
else {
|
571 |
+
return false;
|
572 |
+
}
|
573 |
+
|
574 |
+
$watermark_image_resized = imagecreatetruecolor($watermark_width, $watermark_height);
|
575 |
+
imagecolorallocatealpha($watermark_image_resized, 255, 255, 255, 127);
|
576 |
+
imagealphablending($watermark_image_resized, FALSE);
|
577 |
+
imagesavealpha($watermark_image_resized, TRUE);
|
578 |
+
imagecopyresampled ($watermark_image_resized, $watermark_image, 0, 0, 0, 0, $watermark_width, $watermark_height, $width_watermark, $height_watermark);
|
579 |
+
|
580 |
+
if ($type == 2) {
|
581 |
+
$image = imagecreatefromjpeg($original_filename);
|
582 |
+
imagecopy($image, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
583 |
+
if ($dest_filename <> '') {
|
584 |
+
imagejpeg ($image, $dest_filename, 100);
|
585 |
+
} else {
|
586 |
+
header('Content-Type: image/jpeg');
|
587 |
+
imagejpeg($image, null, 100);
|
588 |
+
};
|
589 |
+
imagedestroy($image);
|
590 |
+
}
|
591 |
+
elseif ($type == 3) {
|
592 |
+
$image = imagecreatefrompng($original_filename);
|
593 |
+
imagecopy($image, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
594 |
+
imagealphablending($image, FALSE);
|
595 |
+
imagesavealpha($image, TRUE);
|
596 |
+
imagepng($image, $dest_filename, 9);
|
597 |
+
imagedestroy($image);
|
598 |
+
}
|
599 |
+
elseif ($type == 1) {
|
600 |
+
$image = imagecreatefromgif($original_filename);
|
601 |
+
$tempimage = imagecreatetruecolor($width, $height);
|
602 |
+
imagecopy($tempimage, $image, 0, 0, 0, 0, $width, $height);
|
603 |
+
imagecopy($tempimage, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
604 |
+
imagegif($tempimage, $dest_filename);
|
605 |
+
imagedestroy($image);
|
606 |
+
imagedestroy($tempimage);
|
607 |
+
}
|
608 |
+
imagedestroy($watermark_image);
|
609 |
+
@ini_restore('memory_limit');
|
610 |
+
}
|
611 |
+
|
612 |
+
public function save_image_db() {
|
613 |
+
global $wpdb;
|
614 |
+
$gal_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
615 |
+
$image_ids = (isset($_POST['ids_string']) ? esc_html(stripslashes($_POST['ids_string'])) : '');
|
616 |
+
$image_id_array = explode(',', $image_ids);
|
617 |
+
foreach ($image_id_array as $image_id) {
|
618 |
+
if ($image_id) {
|
619 |
+
$filename = ((isset($_POST['input_filename_' . $image_id])) ? esc_html(stripslashes($_POST['input_filename_' . $image_id])) : '');
|
620 |
+
$image_url = ((isset($_POST['image_url_' . $image_id])) ? esc_html(stripslashes($_POST['image_url_' . $image_id])) : '');
|
621 |
+
$thumb_url = ((isset($_POST['thumb_url_' . $image_id])) ? esc_html(stripslashes($_POST['thumb_url_' . $image_id])) : '');
|
622 |
+
$description = ((isset($_POST['image_description_' . $image_id])) ? esc_html((stripslashes($_POST['image_description_' . $image_id]))) : '');
|
623 |
+
$alt = ((isset($_POST['image_alt_text_' . $image_id])) ? esc_html(stripslashes($_POST['image_alt_text_' . $image_id])) : '');
|
624 |
+
$date = ((isset($_POST['input_date_modified_' . $image_id])) ? esc_html(stripslashes($_POST['input_date_modified_' . $image_id])) : '');
|
625 |
+
$size = ((isset($_POST['input_size_' . $image_id])) ? esc_html(stripslashes($_POST['input_size_' . $image_id])) : '');
|
626 |
+
$filetype = ((isset($_POST['input_filetype_' . $image_id])) ? esc_html(stripslashes($_POST['input_filetype_' . $image_id])) : '');
|
627 |
+
$resolution = ((isset($_POST['input_resolution_' . $image_id])) ? esc_html(stripslashes($_POST['input_resolution_' . $image_id])) : '');
|
628 |
+
$order = ((isset($_POST['order_input_' . $image_id])) ? esc_html(stripslashes($_POST['order_input_' . $image_id])) : '');
|
629 |
+
$redirect_url = ((isset($_POST['redirect_url_' . $image_id])) ? esc_html(stripslashes($_POST['redirect_url_' . $image_id])) : '');
|
630 |
+
$author = get_current_user_id();
|
631 |
+
$tags_ids = ((isset($_POST['tags_' . $image_id])) ? esc_html(stripslashes($_POST['tags_' . $image_id])) : '');
|
632 |
+
if (strpos($image_id, 'pr_') !== FALSE) {
|
633 |
+
$save = $wpdb->insert($wpdb->prefix . 'bwg_image', array(
|
634 |
+
'gallery_id' => $gal_id,
|
635 |
+
'slug' => WDWLibrary::spider_replace4byte($alt),
|
636 |
+
'filename' => $filename,
|
637 |
+
'image_url' => $image_url,
|
638 |
+
'thumb_url' => $thumb_url,
|
639 |
+
'description' => WDWLibrary::spider_replace4byte($description),
|
640 |
+
'alt' => WDWLibrary::spider_replace4byte($alt),
|
641 |
+
'date' => $date,
|
642 |
+
'size' => $size,
|
643 |
+
'filetype' => $filetype,
|
644 |
+
'resolution' => $resolution,
|
645 |
+
'author' => $author,
|
646 |
+
'order' => $order,
|
647 |
+
'published' => 1,
|
648 |
+
'comment_count' => 0,
|
649 |
+
'avg_rating' => 0,
|
650 |
+
'rate_count' => 0,
|
651 |
+
'hit_count' => 0,
|
652 |
+
'redirect_url' => $redirect_url,
|
653 |
+
), array(
|
654 |
+
'%d',
|
655 |
+
'%s',
|
656 |
+
'%s',
|
657 |
+
'%s',
|
658 |
+
'%s',
|
659 |
+
'%s',
|
660 |
+
'%s',
|
661 |
+
'%s',
|
662 |
+
'%s',
|
663 |
+
'%s',
|
664 |
+
'%s',
|
665 |
+
'%d',
|
666 |
+
'%d',
|
667 |
+
'%d',
|
668 |
+
'%d',
|
669 |
+
'%d',
|
670 |
+
'%d',
|
671 |
+
'%d',
|
672 |
+
'%s',
|
673 |
+
));
|
674 |
+
$new_image_id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_image');
|
675 |
+
if (isset($_POST['check_' . $image_id])) {
|
676 |
+
$_POST['check_' . $new_image_id] = 'on';
|
677 |
+
}
|
678 |
+
if (isset($_POST['image_current_id']) && (esc_html($_POST['image_current_id']) == $image_id)) {
|
679 |
+
$_POST['image_current_id'] = $new_image_id;
|
680 |
+
}
|
681 |
+
$image_id = $new_image_id;
|
682 |
+
}
|
683 |
+
else {
|
684 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_image', array(
|
685 |
+
'gallery_id' => $gal_id,
|
686 |
+
'slug' => WDWLibrary::spider_replace4byte($alt),
|
687 |
+
'filename' => $filename,
|
688 |
+
'image_url' => $image_url,
|
689 |
+
'thumb_url' => $thumb_url,
|
690 |
+
'description' => WDWLibrary::spider_replace4byte($description),
|
691 |
+
'alt' => WDWLibrary::spider_replace4byte($alt),
|
692 |
+
'date' => $date,
|
693 |
+
'size' => $size,
|
694 |
+
'filetype' => $filetype,
|
695 |
+
'resolution' => $resolution,
|
696 |
+
'order' => $order,
|
697 |
+
'redirect_url' => $redirect_url), array('id' => $image_id));
|
698 |
+
}
|
699 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE image_id="%d" AND gallery_id="%d"', $image_id, $gal_id));
|
700 |
+
if ($save !== FALSE) {
|
701 |
+
$tag_id_array = explode(',', $tags_ids);
|
702 |
+
foreach ($tag_id_array as $tag_id) {
|
703 |
+
if ($tag_id) {
|
704 |
+
if (strpos($tag_id, 'pr_') !== FALSE) {
|
705 |
+
$tag_id = substr($tag_id, 3);
|
706 |
+
}
|
707 |
+
$save = $wpdb->insert($wpdb->prefix . 'bwg_image_tag', array(
|
708 |
+
'tag_id' => $tag_id,
|
709 |
+
'image_id' => $image_id,
|
710 |
+
'gallery_id' => $gal_id,
|
711 |
+
), array(
|
712 |
+
'%d',
|
713 |
+
'%d',
|
714 |
+
'%d',
|
715 |
+
));
|
716 |
+
// Increase tag count in term_taxonomy table.
|
717 |
+
$wpdb->query($wpdb->prepare('UPDATE ' . $wpdb->prefix . 'term_taxonomy SET count="%d" WHERE term_id="%d"', $wpdb->get_var($wpdb->prepare('SELECT COUNT(image_id) FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id)), $tag_id));
|
718 |
+
}
|
719 |
+
}
|
720 |
+
}
|
721 |
+
}
|
722 |
+
}
|
723 |
+
}
|
724 |
+
|
725 |
+
public function save() {
|
726 |
+
echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'updated');
|
727 |
+
$this->display();
|
728 |
+
}
|
729 |
+
|
730 |
+
public function delete_unknown_images() {
|
731 |
+
global $wpdb;
|
732 |
+
$wpdb->query('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id=0');
|
733 |
+
}
|
734 |
+
|
735 |
+
public function bwg_get_unique_slug($slug, $id) {
|
736 |
+
global $wpdb;
|
737 |
+
$slug = sanitize_title($slug);
|
738 |
+
if ($id != 0) {
|
739 |
+
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s AND id != %d", $slug, $id);
|
740 |
+
}
|
741 |
+
else {
|
742 |
+
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s", $slug);
|
743 |
+
}
|
744 |
+
if ($wpdb->get_var($query)) {
|
745 |
+
$num = 2;
|
746 |
+
do {
|
747 |
+
$alt_slug = $slug . "-$num";
|
748 |
+
$num++;
|
749 |
+
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "bwg_gallery WHERE slug = %s", $alt_slug));
|
750 |
+
} while ($slug_check);
|
751 |
+
$slug = $alt_slug;
|
752 |
+
}
|
753 |
+
return $slug;
|
754 |
+
}
|
755 |
+
|
756 |
+
public function bwg_get_unique_name($name, $id) {
|
757 |
+
global $wpdb;
|
758 |
+
if ($id != 0) {
|
759 |
+
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s AND id != %d", $name, $id);
|
760 |
+
}
|
761 |
+
else {
|
762 |
+
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s", $name);
|
763 |
+
}
|
764 |
+
if ($wpdb->get_var($query)) {
|
765 |
+
$num = 2;
|
766 |
+
do {
|
767 |
+
$alt_name = $name . "-$num";
|
768 |
+
$num++;
|
769 |
+
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "bwg_gallery WHERE name = %s", $alt_name));
|
770 |
+
} while ($slug_check);
|
771 |
+
$name = $alt_name;
|
772 |
+
}
|
773 |
+
return $name;
|
774 |
+
}
|
775 |
+
|
776 |
+
public function save_db() {
|
777 |
+
global $wpdb;
|
778 |
+
global $WD_BWG_UPLOAD_DIR;
|
779 |
+
$id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
780 |
+
$name = ((isset($_POST['name']) && esc_html(stripslashes($_POST['name'])) != '') ? esc_html(stripslashes($_POST['name'])) : 'Gallery');
|
781 |
+
$name = $this->bwg_get_unique_name($name, $id);
|
782 |
+
$slug = ((isset($_POST['slug']) && esc_html(stripslashes($_POST['slug'])) != '') ? esc_html(stripslashes($_POST['slug'])) : $name);
|
783 |
+
$slug = $this->bwg_get_unique_slug($slug, $id);
|
784 |
+
$description = (isset($_POST['description']) ? stripslashes($_POST['description']) : '');
|
785 |
+
$preview_image = (isset($_POST['preview_image']) ? esc_html(stripslashes($_POST['preview_image'])) : '');
|
786 |
+
$random_preview_image = '';
|
787 |
+
if ($preview_image == '') {
|
788 |
+
if ($id != 0) {
|
789 |
+
$random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT random_preview_image FROM " . $wpdb->prefix . "bwg_gallery WHERE id='%d'", $id));
|
790 |
+
if ($random_preview_image == '' || !file_exists(ABSPATH . $WD_BWG_UPLOAD_DIR . $random_preview_image)) {
|
791 |
+
$random_preview_image = $wpdb->get_var($wpdb->prepare("SELECT thumb_url FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='%d' ORDER BY `order`", $id));
|
792 |
+
}
|
793 |
+
}
|
794 |
+
else {
|
795 |
+
$i = 0;
|
796 |
+
$random_preview_image = '';
|
797 |
+
while (isset($_POST['thumb_url_pr_' . $i]) && isset($_POST["input_filetype_pr_" . $i])) {
|
798 |
+
/*if ($_POST["input_filetype_pr_" . $i] == "JPG" || $_POST["input_filetype_pr_" . $i] == "PNG" || $_POST["input_filetype_pr_" . $i] == "GIF")*/ {
|
799 |
+
$random_preview_image = esc_html(stripslashes($_POST['thumb_url_pr_' . $i]));
|
800 |
+
break;
|
801 |
+
}
|
802 |
+
$i++;
|
803 |
+
}
|
804 |
+
}
|
805 |
+
}
|
806 |
+
|
807 |
+
$gallery_type = ((isset($_POST['gallery_type']) && esc_html(stripslashes($_POST['gallery_type'])) != '') ? esc_html(stripslashes($_POST['gallery_type'])) : '');
|
808 |
+
$gallery_source = ((isset($_POST['gallery_source']) && esc_html(stripslashes($_POST['gallery_source'])) != '') ? esc_html(stripslashes($_POST['gallery_source'])) : '');
|
809 |
+
$update_flag = ((isset($_POST['update_flag']) && esc_html(stripslashes($_POST['update_flag'])) != '') ? esc_html(stripslashes($_POST['update_flag'])) : '');
|
810 |
+
$autogallery_image_number = (isset($_POST['autogallery_image_number']) ? (int) $_POST['autogallery_image_number'] : 12);
|
811 |
+
$published = (isset($_POST['published']) ? (int) $_POST['published'] : 1);
|
812 |
+
if ($id != 0) {
|
813 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array(
|
814 |
+
'name' => $name,
|
815 |
+
'slug' => $slug,
|
816 |
+
'description' => $description,
|
817 |
+
'preview_image' => $preview_image,
|
818 |
+
'random_preview_image' => $random_preview_image,
|
819 |
+
'gallery_type' => $gallery_type,
|
820 |
+
'gallery_source' => $gallery_source,
|
821 |
+
'autogallery_image_number' => $autogallery_image_number,
|
822 |
+
'update_flag' => $update_flag,
|
823 |
+
'published' => $published), array('id' => $id));
|
824 |
+
/* Update data in corresponding posts.*/
|
825 |
+
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_gallery'";
|
826 |
+
$posts = $wpdb->get_results($query2, OBJECT);
|
827 |
+
foreach ($posts as $post) {
|
828 |
+
$post_content = $post->post_content;
|
829 |
+
if (strpos($post_content, ' type="gallery" ') && strpos($post_content, ' gallery_id="' . $id . '" ')) {
|
830 |
+
$album_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
|
831 |
+
wp_update_post($album_post);
|
832 |
+
}
|
833 |
+
}
|
834 |
+
}
|
835 |
+
else {
|
836 |
+
$save = $wpdb->insert($wpdb->prefix . 'bwg_gallery', array(
|
837 |
+
'name' => $name,
|
838 |
+
'slug' => $slug,
|
839 |
+
'description' => $description,
|
840 |
+
'page_link' => '',
|
841 |
+
'preview_image' => $preview_image,
|
842 |
+
'random_preview_image' => $random_preview_image,
|
843 |
+
'order' => ((int) $wpdb->get_var('SELECT MAX(`order`) FROM ' . $wpdb->prefix . 'bwg_gallery')) + 1,
|
844 |
+
'author' => get_current_user_id(),
|
845 |
+
'gallery_type' => $gallery_type,
|
846 |
+
'gallery_source' => $gallery_source,
|
847 |
+
'autogallery_image_number' => $autogallery_image_number,
|
848 |
+
'update_flag' => $update_flag,
|
849 |
+
'published' => $published,
|
850 |
+
), array(
|
851 |
+
'%s',
|
852 |
+
'%s',
|
853 |
+
'%s',
|
854 |
+
'%s',
|
855 |
+
'%s',
|
856 |
+
'%s',
|
857 |
+
'%d',
|
858 |
+
'%d',
|
859 |
+
'%s',
|
860 |
+
'%s',
|
861 |
+
'%d',
|
862 |
+
'%s',
|
863 |
+
'%d',
|
864 |
+
));
|
865 |
+
}
|
866 |
+
if ($save !== FALSE) {
|
867 |
+
echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'updated');
|
868 |
+
}
|
869 |
+
else {
|
870 |
+
echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'error');
|
871 |
+
}
|
872 |
+
}
|
873 |
+
|
874 |
+
public function save_order($flag = TRUE) {
|
875 |
+
global $wpdb;
|
876 |
+
$gallery_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
|
877 |
+
if ($gallery_ids_col) {
|
878 |
+
foreach ($gallery_ids_col as $gallery_id) {
|
879 |
+
if (isset($_POST['order_input_' . $gallery_id])) {
|
880 |
+
$order_values[$gallery_id] = (int) $_POST['order_input_' . $gallery_id];
|
881 |
+
}
|
882 |
+
else {
|
883 |
+
$order_values[$gallery_id] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_gallery WHERE `id`="%d"', $gallery_id));
|
884 |
+
}
|
885 |
+
}
|
886 |
+
asort($order_values);
|
887 |
+
$i = 1;
|
888 |
+
foreach ($order_values as $key => $order_value) {
|
889 |
+
$wpdb->update($wpdb->prefix . 'bwg_gallery', array('order' => $i), array('id' => $key));
|
890 |
+
$i++;
|
891 |
+
}
|
892 |
+
if ($flag) {
|
893 |
+
echo WDWLibrary::message(__('Ordering Succesfully Saved.', 'bwg_back'), 'updated');
|
894 |
+
}
|
895 |
+
}
|
896 |
+
$this->display();
|
897 |
+
}
|
898 |
+
|
899 |
+
public function delete($id) {
|
900 |
+
global $wpdb;
|
901 |
+
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_gallery WHERE id="%d"', $id);
|
902 |
+
$query_image = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $id);
|
903 |
+
$query_album_gallery = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE alb_gal_id="%d" AND is_album="%d"', $id, 0);
|
904 |
+
if ($wpdb->query($query)) {
|
905 |
+
$wpdb->query($query_image);
|
906 |
+
$wpdb->query($query_album_gallery);
|
907 |
+
echo WDWLibrary::message(__('Item Succesfully Deleted.', 'bwg_back'), 'updated');
|
908 |
+
}
|
909 |
+
else {
|
910 |
+
echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'error');
|
911 |
+
}
|
912 |
+
/* Delete corresponding posts and their meta.*/
|
913 |
+
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_gallery'";
|
914 |
+
$posts = $wpdb->get_results($query2, OBJECT);
|
915 |
+
foreach ($posts as $post) {
|
916 |
+
$post_content = $post->post_content;
|
917 |
+
if (strpos($post_content, ' type="gallery" ') && strpos($post_content, ' gallery_id="'.$id.'" ')) {
|
918 |
+
wp_delete_post($post->ID, TRUE);
|
919 |
+
}
|
920 |
+
}
|
921 |
+
$this->display();
|
922 |
+
}
|
923 |
+
|
924 |
+
public function delete_all() {
|
925 |
+
global $wpdb;
|
926 |
+
$flag = FALSE;
|
927 |
+
$gal_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
|
928 |
+
foreach ($gal_ids_col as $gal_id) {
|
929 |
+
if (isset($_POST['check_' . $gal_id]) || isset($_POST['check_all_items'])) {
|
930 |
+
$flag = TRUE;
|
931 |
+
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_gallery WHERE id="%d"', $gal_id);
|
932 |
+
$wpdb->query($query);
|
933 |
+
$query_image = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gal_id);
|
934 |
+
$wpdb->query($query_image);
|
935 |
+
$query_album_gallery = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_album_gallery WHERE alb_gal_id="%d" AND is_album="%d"', $gal_id, 0);
|
936 |
+
$wpdb->query($query_album_gallery);
|
937 |
+
}
|
938 |
+
}
|
939 |
+
if ($flag) {
|
940 |
+
echo WDWLibrary::message(__('Items Succesfully Deleted.', 'bwg_back'), 'updated');
|
941 |
+
}
|
942 |
+
else {
|
943 |
+
echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'error');
|
944 |
+
}
|
945 |
+
$this->display();
|
946 |
+
}
|
947 |
+
|
948 |
+
public function publish($id) {
|
949 |
+
global $wpdb;
|
950 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 1), array('id' => $id));
|
951 |
+
if ($save !== FALSE) {
|
952 |
+
echo WDWLibrary::message(__('Item Succesfully Published.', 'bwg_back'), 'updated');
|
953 |
+
}
|
954 |
+
else {
|
955 |
+
echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'error');
|
956 |
+
}
|
957 |
+
$this->display();
|
958 |
+
}
|
959 |
+
|
960 |
+
public function publish_all() {
|
961 |
+
global $wpdb;
|
962 |
+
$flag = FALSE;
|
963 |
+
if (isset($_POST['check_all_items'])) {
|
964 |
+
$wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET published=1');
|
965 |
+
$flag = TRUE;
|
966 |
+
}
|
967 |
+
else {
|
968 |
+
$gal_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
|
969 |
+
foreach ($gal_ids_col as $gal_id) {
|
970 |
+
if (isset($_POST['check_' . $gal_id])) {
|
971 |
+
$flag = TRUE;
|
972 |
+
$wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 1), array('id' => $gal_id));
|
973 |
+
}
|
974 |
+
}
|
975 |
+
}
|
976 |
+
if ($flag) {
|
977 |
+
echo WDWLibrary::message(__('Items Succesfully Published.', 'bwg_back'), 'updated');
|
978 |
+
}
|
979 |
+
else {
|
980 |
+
echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'error');
|
981 |
+
}
|
982 |
+
$this->display();
|
983 |
+
}
|
984 |
+
|
985 |
+
public function unpublish($id) {
|
986 |
+
global $wpdb;
|
987 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 0), array('id' => $id));
|
988 |
+
if ($save !== FALSE) {
|
989 |
+
echo WDWLibrary::message(__('Item Succesfully Unpublished.', 'bwg_back'), 'updated');
|
990 |
+
}
|
991 |
+
else {
|
992 |
+
echo WDWLibrary::message(__('Error. Please install plugin again.', 'bwg_back'), 'error');
|
993 |
+
}
|
994 |
+
$this->display();
|
995 |
+
}
|
996 |
+
|
997 |
+
public function unpublish_all() {
|
998 |
+
global $wpdb;
|
999 |
+
$flag = FALSE;
|
1000 |
+
if (isset($_POST['check_all_items'])) {
|
1001 |
+
$wpdb->query('UPDATE ' . $wpdb->prefix . 'bwg_gallery SET published=0');
|
1002 |
+
$flag = TRUE;
|
1003 |
+
}
|
1004 |
+
else {
|
1005 |
+
$gal_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_gallery');
|
1006 |
+
foreach ($gal_ids_col as $gal_id) {
|
1007 |
+
if (isset($_POST['check_' . $gal_id])) {
|
1008 |
+
$flag = TRUE;
|
1009 |
+
$wpdb->update($wpdb->prefix . 'bwg_gallery', array('published' => 0), array('id' => $gal_id));
|
1010 |
+
}
|
1011 |
+
}
|
1012 |
+
}
|
1013 |
+
if ($flag) {
|
1014 |
+
echo WDWLibrary::message(__('Items Succesfully Unpublished.', 'bwg_back'), 'updated');
|
1015 |
+
}
|
1016 |
+
else {
|
1017 |
+
echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'error');
|
1018 |
+
}
|
1019 |
+
$this->display();
|
1020 |
+
}
|
1021 |
+
public function resize_image_thumb() {
|
1022 |
+
global $WD_BWG_UPLOAD_DIR;
|
1023 |
+
global $wpdb;
|
1024 |
+
$flag = FALSE;
|
1025 |
+
$gallery_id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
1026 |
+
$img_ids = $wpdb->get_results($wpdb->prepare('SELECT id, thumb_url FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id="%d"', $gallery_id));
|
1027 |
+
$options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option');
|
1028 |
+
foreach ($img_ids as $img_id) {
|
1029 |
+
if (isset($_POST['check_' . $img_id->id]) || isset($_POST['check_all_items'])) {
|
1030 |
+
$flag = TRUE;
|
1031 |
+
$file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
|
1032 |
+
$new_file_path = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES);
|
1033 |
+
list($img_width, $img_height, $type) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
|
1034 |
+
if (!$img_width || !$img_height) {
|
1035 |
+
continue;
|
1036 |
+
}
|
1037 |
+
$max_width = $options->upload_thumb_width;
|
1038 |
+
$max_height = $options->upload_thumb_height;
|
1039 |
+
$scale = min(
|
1040 |
+
$max_width / $img_width,
|
1041 |
+
$max_height / $img_height
|
1042 |
+
);
|
1043 |
+
@ini_set('memory_limit', '-1');
|
1044 |
+
if (!function_exists('imagecreatetruecolor')) {
|
1045 |
+
error_log('Function not found: imagecreatetruecolor');
|
1046 |
+
return FALSE;
|
1047 |
+
}
|
1048 |
+
$new_width = $img_width * $scale;
|
1049 |
+
$new_height = $img_height * $scale;
|
1050 |
+
$dst_x = 0;
|
1051 |
+
$dst_y = 0;
|
1052 |
+
$new_img = @imagecreatetruecolor($new_width, $new_height);
|
1053 |
+
switch ($type) {
|
1054 |
+
case 2:
|
1055 |
+
$src_img = @imagecreatefromjpeg($file_path);
|
1056 |
+
$write_image = 'imagejpeg';
|
1057 |
+
$image_quality = isset($options->jpeg_quality) ? $options->jpeg_quality : 75;
|
1058 |
+
break;
|
1059 |
+
case 1:
|
1060 |
+
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
|
1061 |
+
$src_img = @imagecreatefromgif($file_path);
|
1062 |
+
$write_image = 'imagegif';
|
1063 |
+
$image_quality = null;
|
1064 |
+
break;
|
1065 |
+
case 3:
|
1066 |
+
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
|
1067 |
+
@imagealphablending($new_img, false);
|
1068 |
+
@imagesavealpha($new_img, true);
|
1069 |
+
$src_img = @imagecreatefrompng($file_path);
|
1070 |
+
$write_image = 'imagepng';
|
1071 |
+
$image_quality = isset($options->png_quality) ? $options->png_quality : 9;
|
1072 |
+
break;
|
1073 |
+
default:
|
1074 |
+
$src_img = null;
|
1075 |
+
break;
|
1076 |
+
}
|
1077 |
+
$success = $src_img && @imagecopyresampled(
|
1078 |
+
$new_img,
|
1079 |
+
$src_img,
|
1080 |
+
$dst_x,
|
1081 |
+
$dst_y,
|
1082 |
+
0,
|
1083 |
+
0,
|
1084 |
+
$new_width,
|
1085 |
+
$new_height,
|
1086 |
+
$img_width,
|
1087 |
+
$img_height
|
1088 |
+
) && $write_image($new_img, $new_file_path, $image_quality);
|
1089 |
+
// Free up memory (imagedestroy does not delete files):
|
1090 |
+
@imagedestroy($src_img);
|
1091 |
+
@imagedestroy($new_img);
|
1092 |
+
@ini_restore('memory_limit');
|
1093 |
+
}
|
1094 |
+
}
|
1095 |
+
if ($flag == false) {
|
1096 |
+
echo WDWLibrary::message(__('You must select at least one item.', 'bwg_back'), 'error');
|
1097 |
+
}
|
1098 |
+
else {
|
1099 |
+
echo WDWLibrary::message(__('Thumb Succesfully Resized', 'bwg_back'), 'updated');
|
1100 |
+
}
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1104 |
+
// Getters & Setters //
|
1105 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1106 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1107 |
+
// Private Methods //
|
1108 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1109 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1110 |
+
// Listeners //
|
1111 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1112 |
}
|
admin/controllers/BWGControllerLicensing_bwg.php
CHANGED
@@ -1,57 +1,57 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerLicensing_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
-
|
24 |
-
if($task != ''){
|
25 |
-
if(!WDWLibrary::verify_nonce('licensing_bwg')){
|
26 |
-
die('Sorry, your nonce did not verify.');
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
if (method_exists($this, $task)) {
|
32 |
-
$this->$task($id);
|
33 |
-
}
|
34 |
-
else {
|
35 |
-
$this->display();
|
36 |
-
}
|
37 |
-
}
|
38 |
-
|
39 |
-
public function display() {
|
40 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelLicensing_bwg.php";
|
41 |
-
$model = new BWGModelLicensing_bwg();
|
42 |
-
|
43 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewLicensing_bwg.php";
|
44 |
-
$view = new BWGViewLicensing_bwg($model);
|
45 |
-
$view->display();
|
46 |
-
}
|
47 |
-
|
48 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
-
// Getters & Setters //
|
50 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
51 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
52 |
-
// Private Methods //
|
53 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
54 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
55 |
-
// Listeners //
|
56 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
57 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerLicensing_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
+
|
24 |
+
if($task != ''){
|
25 |
+
if(!WDWLibrary::verify_nonce('licensing_bwg')){
|
26 |
+
die('Sorry, your nonce did not verify.');
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
if (method_exists($this, $task)) {
|
32 |
+
$this->$task($id);
|
33 |
+
}
|
34 |
+
else {
|
35 |
+
$this->display();
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
public function display() {
|
40 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelLicensing_bwg.php";
|
41 |
+
$model = new BWGModelLicensing_bwg();
|
42 |
+
|
43 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewLicensing_bwg.php";
|
44 |
+
$view = new BWGViewLicensing_bwg($model);
|
45 |
+
$view->display();
|
46 |
+
}
|
47 |
+
|
48 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
+
// Getters & Setters //
|
50 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
51 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
52 |
+
// Private Methods //
|
53 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
54 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
55 |
+
// Listeners //
|
56 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
57 |
}
|
admin/controllers/BWGControllerOptions_bwg.php
CHANGED
@@ -1,401 +1,401 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerOptions_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
-
$id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
24 |
-
|
25 |
-
if($task != ''){
|
26 |
-
if(!WDWLibrary::verify_nonce('options_bwg')){
|
27 |
-
die('Sorry, your nonce did not verify.');
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
|
32 |
-
if (method_exists($this, $task)) {
|
33 |
-
$this->$task($id);
|
34 |
-
}
|
35 |
-
else {
|
36 |
-
$this->display();
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
public function display() {
|
41 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelOptions_bwg.php";
|
42 |
-
$model = new BWGModelOptions_bwg();
|
43 |
-
|
44 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewOptions_bwg.php";
|
45 |
-
$view = new BWGViewOptions_bwg($model);
|
46 |
-
$view->display();
|
47 |
-
}
|
48 |
-
|
49 |
-
public function reset() {
|
50 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelOptions_bwg.php";
|
51 |
-
$model = new BWGModelOptions_bwg();
|
52 |
-
|
53 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewOptions_bwg.php";
|
54 |
-
$view = new BWGViewOptions_bwg($model);
|
55 |
-
echo WDWLibrary::message('Changes must be saved.', 'error');
|
56 |
-
$view->display(true);
|
57 |
-
}
|
58 |
-
|
59 |
-
public function save() {
|
60 |
-
$this->save_db();
|
61 |
-
$this->display();
|
62 |
-
}
|
63 |
-
|
64 |
-
public function save_db() {
|
65 |
-
global $wpdb;
|
66 |
-
$id = 1;
|
67 |
-
if (isset($_POST['old_images_directory'])) {
|
68 |
-
$old_images_directory = esc_html(stripslashes($_POST['old_images_directory']));
|
69 |
-
}
|
70 |
-
if (isset($_POST['images_directory'])) {
|
71 |
-
$images_directory = esc_html(stripslashes($_POST['images_directory']));
|
72 |
-
if (!is_dir(ABSPATH . $images_directory)) {
|
73 |
-
echo WDWLibrary::message('Uploads directory doesn\'t exist. Old value is restored.', 'error');
|
74 |
-
if ($old_images_directory) {
|
75 |
-
$images_directory = $old_images_directory;
|
76 |
-
}
|
77 |
-
else {
|
78 |
-
$upload_dir = wp_upload_dir();
|
79 |
-
if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
|
80 |
-
mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
|
81 |
-
}
|
82 |
-
$images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
|
83 |
-
}
|
84 |
-
}
|
85 |
-
}
|
86 |
-
else {
|
87 |
-
$upload_dir = wp_upload_dir();
|
88 |
-
if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
|
89 |
-
mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
|
90 |
-
}
|
91 |
-
$images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
|
92 |
-
}
|
93 |
-
$resize_image = (isset($_POST['resize_image']) ? esc_html(stripslashes($_POST['resize_image'])) : 1);
|
94 |
-
|
95 |
-
$masonry = (isset($_POST['masonry']) ? esc_html(stripslashes($_POST['masonry'])) : 'vertical');
|
96 |
-
$mosaic = (isset($_POST['mosaic']) ? esc_html(stripslashes($_POST['mosaic'])) : 'vertical');
|
97 |
-
$resizable_mosaic = (isset($_POST['resizable_mosaic']) ? esc_html(stripslashes($_POST['resizable_mosaic'])) : 0);
|
98 |
-
$mosaic_total_width = (isset($_POST['mosaic_total_width']) ? esc_html(stripslashes($_POST['mosaic_total_width'])) : 100);
|
99 |
-
|
100 |
-
$image_column_number = (isset($_POST['image_column_number']) ? esc_html(stripslashes($_POST['image_column_number'])) : 5);
|
101 |
-
$images_per_page = (isset($_POST['images_per_page']) ? esc_html(stripslashes($_POST['images_per_page'])) : 30);
|
102 |
-
$thumb_width = (isset($_POST['thumb_width']) ? esc_html(stripslashes($_POST['thumb_width'])) : 120);
|
103 |
-
$thumb_height = (isset($_POST['thumb_height']) ? esc_html(stripslashes($_POST['thumb_height'])) : 90);
|
104 |
-
$upload_thumb_width = (isset($_POST['upload_thumb_width']) ? esc_html(stripslashes($_POST['upload_thumb_width'])) : 300);
|
105 |
-
$upload_thumb_height = (isset($_POST['upload_thumb_height']) ? esc_html(stripslashes($_POST['upload_thumb_height'])) : 300);
|
106 |
-
$upload_img_width = (isset($_POST['upload_img_width']) ? esc_html(stripslashes($_POST['upload_img_width'])) : 1200);
|
107 |
-
$upload_img_height = (isset($_POST['upload_img_height']) ? esc_html(stripslashes($_POST['upload_img_height'])) : 1200);
|
108 |
-
$image_enable_page = (isset($_POST['image_enable_page']) ? esc_html(stripslashes($_POST['image_enable_page'])) : 1);
|
109 |
-
$image_title_show_hover = (isset($_POST['image_title_show_hover']) ? esc_html(stripslashes($_POST['image_title_show_hover'])) : 'none');
|
110 |
-
$album_column_number = (isset($_POST['album_column_number']) ? esc_html(stripslashes($_POST['album_column_number'])) : 5);
|
111 |
-
$albums_per_page = (isset($_POST['albums_per_page']) ? esc_html(stripslashes($_POST['albums_per_page'])) : 30);
|
112 |
-
$album_title_show_hover = (isset($_POST['album_title_show_hover']) ? esc_html(stripslashes($_POST['album_title_show_hover'])) : 'hover');
|
113 |
-
$album_thumb_width = (isset($_POST['album_thumb_width']) ? esc_html(stripslashes($_POST['album_thumb_width'])) : 120);
|
114 |
-
$album_thumb_height = (isset($_POST['album_thumb_height']) ? esc_html(stripslashes($_POST['album_thumb_height'])) : 90);
|
115 |
-
$album_enable_page = (isset($_POST['album_enable_page']) ? esc_html(stripslashes($_POST['album_enable_page'])) : 1);
|
116 |
-
$extended_album_height = (isset($_POST['extended_album_height']) ? esc_html(stripslashes($_POST['extended_album_height'])) : 150);
|
117 |
-
$extended_album_description_enable = (isset($_POST['extended_album_description_enable']) ? esc_html(stripslashes($_POST['extended_album_description_enable'])) : 1);
|
118 |
-
$image_browser_width = (isset($_POST['image_browser_width']) ? esc_html(stripslashes($_POST['image_browser_width'])) : 800);
|
119 |
-
$image_browser_title_enable = (isset($_POST['image_browser_title_enable']) ? esc_html(stripslashes($_POST['image_browser_title_enable'])) : 1);
|
120 |
-
$image_browser_description_enable = (isset($_POST['image_browser_description_enable']) ? esc_html(stripslashes($_POST['image_browser_description_enable'])) : 1);
|
121 |
-
$blog_style_width = (isset($_POST['blog_style_width']) ? esc_html(stripslashes($_POST['blog_style_width'])) : 800);
|
122 |
-
$blog_style_title_enable = (isset($_POST['blog_style_title_enable']) ? esc_html(stripslashes($_POST['blog_style_title_enable'])) : 1);
|
123 |
-
$blog_style_images_per_page = (isset($_POST['blog_style_images_per_page']) ? esc_html(stripslashes($_POST['blog_style_images_per_page'])) : 5);
|
124 |
-
$blog_style_enable_page = (isset($_POST['blog_style_enable_page']) ? esc_html(stripslashes($_POST['blog_style_enable_page'])) : 1);
|
125 |
-
$slideshow_type = (isset($_POST['slideshow_type']) ? esc_html(stripslashes($_POST['slideshow_type'])) : 'fade');
|
126 |
-
$slideshow_interval = (isset($_POST['slideshow_interval']) ? esc_html(stripslashes($_POST['slideshow_interval'])) : 5);
|
127 |
-
$slideshow_width = (isset($_POST['slideshow_width']) ? esc_html(stripslashes($_POST['slideshow_width'])) : 800);
|
128 |
-
$slideshow_height = (isset($_POST['slideshow_height']) ? esc_html(stripslashes($_POST['slideshow_height'])) : 600);
|
129 |
-
$slideshow_enable_autoplay = (isset($_POST['slideshow_enable_autoplay']) ? esc_html(stripslashes($_POST['slideshow_enable_autoplay'])) : 1);
|
130 |
-
$slideshow_enable_shuffle = (isset($_POST['slideshow_enable_shuffle']) ? esc_html(stripslashes($_POST['slideshow_enable_shuffle'])) : 1);
|
131 |
-
$slideshow_enable_ctrl = (isset($_POST['slideshow_enable_ctrl']) ? esc_html(stripslashes($_POST['slideshow_enable_ctrl'])) : 1);
|
132 |
-
$slideshow_enable_filmstrip = (isset($_POST['slideshow_enable_filmstrip']) ? esc_html(stripslashes($_POST['slideshow_enable_filmstrip'])) : 1);
|
133 |
-
$slideshow_filmstrip_height = (isset($_POST['slideshow_filmstrip_height']) ? esc_html(stripslashes($_POST['slideshow_filmstrip_height'])) : 70);
|
134 |
-
$slideshow_enable_title = (isset($_POST['slideshow_enable_title']) ? esc_html(stripslashes($_POST['slideshow_enable_title'])) : 0);
|
135 |
-
$slideshow_title_position = (isset($_POST['slideshow_title_position']) ? esc_html(stripslashes($_POST['slideshow_title_position'])) : 'top-right');
|
136 |
-
$slideshow_title_full_width = (isset($_POST['slideshow_title_full_width']) ? esc_html(stripslashes($_POST['slideshow_title_full_width'])) : 0);
|
137 |
-
$slideshow_enable_description = (isset($_POST['slideshow_enable_description']) ? esc_html(stripslashes($_POST['slideshow_enable_description'])) : 1);
|
138 |
-
$slideshow_description_position = (isset($_POST['slideshow_description_position']) ? esc_html(stripslashes($_POST['slideshow_description_position'])) : 'bottom-right');
|
139 |
-
$slideshow_enable_music = (isset($_POST['slideshow_enable_music']) ? esc_html(stripslashes($_POST['slideshow_enable_music'])) : 0);
|
140 |
-
$slideshow_audio_url = (isset($_POST['slideshow_audio_url']) ? esc_html(stripslashes($_POST['slideshow_audio_url'])) : '');
|
141 |
-
$popup_width = (isset($_POST['popup_width']) ? esc_html(stripslashes($_POST['popup_width'])) : 800);
|
142 |
-
$popup_height = (isset($_POST['popup_height']) ? esc_html(stripslashes($_POST['popup_height'])) : 600);
|
143 |
-
$popup_type = (isset($_POST['popup_type']) ? esc_html(stripslashes($_POST['popup_type'])) : 'fade');
|
144 |
-
$popup_interval = (isset($_POST['popup_interval']) ? esc_html(stripslashes($_POST['popup_interval'])) : 5);
|
145 |
-
$popup_enable_filmstrip = (isset($_POST['popup_enable_filmstrip']) ? esc_html(stripslashes($_POST['popup_enable_filmstrip'])) : 1);
|
146 |
-
$popup_filmstrip_height = (isset($_POST['popup_filmstrip_height']) ? esc_html(stripslashes($_POST['popup_filmstrip_height'])) : 50);
|
147 |
-
$popup_enable_ctrl_btn = (isset($_POST['popup_enable_ctrl_btn']) ? esc_html(stripslashes($_POST['popup_enable_ctrl_btn'])) : 1);
|
148 |
-
$popup_enable_fullscreen = (isset($_POST['popup_enable_fullscreen']) ? esc_html(stripslashes($_POST['popup_enable_fullscreen'])) : 1);
|
149 |
-
$popup_enable_comment = (isset($_POST['popup_enable_comment']) ? esc_html(stripslashes($_POST['popup_enable_comment'])) : 1);
|
150 |
-
$popup_enable_email = (isset($_POST['popup_enable_email']) ? esc_html(stripslashes($_POST['popup_enable_email'])) : 0);
|
151 |
-
$popup_enable_captcha = (isset($_POST['popup_enable_captcha']) ? esc_html(stripslashes($_POST['popup_enable_captcha'])) : 0);
|
152 |
-
$popup_enable_download = (isset($_POST['popup_enable_download']) ? esc_html(stripslashes($_POST['popup_enable_download'])) : 0);
|
153 |
-
$popup_enable_fullsize_image = (isset($_POST['popup_enable_fullsize_image']) ? esc_html(stripslashes($_POST['popup_enable_fullsize_image'])) : 0);
|
154 |
-
$popup_enable_facebook = (isset($_POST['popup_enable_facebook']) ? esc_html(stripslashes($_POST['popup_enable_facebook'])) : 1);
|
155 |
-
$popup_enable_twitter = (isset($_POST['popup_enable_twitter']) ? esc_html(stripslashes($_POST['popup_enable_twitter'])) : 1);
|
156 |
-
$popup_enable_google = (isset($_POST['popup_enable_google']) ? esc_html(stripslashes($_POST['popup_enable_google'])) : 1);
|
157 |
-
$popup_enable_pinterest = (isset($_POST['popup_enable_pinterest']) ? esc_html(stripslashes($_POST['popup_enable_pinterest'])) : 0);
|
158 |
-
$popup_enable_tumblr = (isset($_POST['popup_enable_tumblr']) ? esc_html(stripslashes($_POST['popup_enable_tumblr'])) : 0);
|
159 |
-
$watermark_type = (isset($_POST['watermark_type']) ? esc_html(stripslashes($_POST['watermark_type'])) : 'none');
|
160 |
-
$watermark_position = (isset($_POST['watermark_position']) ? esc_html(stripslashes($_POST['watermark_position'])) : 'bottom-right');
|
161 |
-
$watermark_width = (isset($_POST['watermark_width']) ? esc_html(stripslashes($_POST['watermark_width'])) : 600);
|
162 |
-
$watermark_height = (isset($_POST['watermark_height']) ? esc_html(stripslashes($_POST['watermark_height'])) : 600);
|
163 |
-
$watermark_url = (isset($_POST['watermark_url']) ? esc_html(stripslashes($_POST['watermark_url'])) : WD_BWG_URL . '/images/watermark.png');
|
164 |
-
$watermark_text = (isset($_POST['watermark_text']) ? esc_html(stripslashes($_POST['watermark_text'])) : 'web-dorado.com');
|
165 |
-
$watermark_link = (isset($_POST['watermark_link']) ? esc_html(stripslashes($_POST['watermark_link'])) : 'http://www.web-dorado.com');
|
166 |
-
$watermark_opacity = (isset($_POST['watermark_opacity']) ? esc_html(stripslashes($_POST['watermark_opacity'])) : 30);
|
167 |
-
$watermark_font_size = (isset($_POST['watermark_font_size']) ? esc_html(stripslashes($_POST['watermark_font_size'])) : 20);
|
168 |
-
$watermark_font = (isset($_POST['watermark_font']) ? esc_html(stripslashes($_POST['watermark_font'])) : '');
|
169 |
-
$watermark_color = (isset($_POST['watermark_color']) ? esc_html(stripslashes($_POST['watermark_color'])) : '');
|
170 |
-
$built_in_watermark_type = (isset($_POST['built_in_watermark_type']) ? esc_html(stripslashes($_POST['built_in_watermark_type'])) : 'none');
|
171 |
-
$built_in_watermark_position = (isset($_POST['built_in_watermark_position']) ? esc_html(stripslashes($_POST['built_in_watermark_position'])) : 'middle-center');
|
172 |
-
$built_in_watermark_size = (isset($_POST['built_in_watermark_size']) ? esc_html(stripslashes($_POST['built_in_watermark_size'])) : 15);
|
173 |
-
$built_in_watermark_url = (isset($_POST['built_in_watermark_url']) ? esc_html(stripslashes($_POST['built_in_watermark_url'])) : WD_BWG_URL . '/images/watermark.png');
|
174 |
-
$built_in_watermark_text = (isset($_POST['built_in_watermark_text']) ? esc_html(stripslashes($_POST['built_in_watermark_text'])) : 'web-dorado.com');
|
175 |
-
$built_in_watermark_opacity = (isset($_POST['built_in_watermark_opacity']) ? esc_html(stripslashes($_POST['built_in_watermark_opacity'])) : 30);
|
176 |
-
$built_in_watermark_font_size = (isset($_POST['built_in_watermark_font_size']) ? esc_html(stripslashes($_POST['built_in_watermark_font_size'])) : 20);
|
177 |
-
$built_in_watermark_font = (isset($_POST['built_in_watermark_font']) ? esc_html(stripslashes($_POST['built_in_watermark_font'])) : '');
|
178 |
-
$built_in_watermark_color = (isset($_POST['built_in_watermark_color']) ? esc_html(stripslashes($_POST['built_in_watermark_color'])) : '');
|
179 |
-
$gallery_role = (isset($_POST['gallery_role']) ? esc_html(stripslashes($_POST['gallery_role'])) : 0);
|
180 |
-
$image_right_click = (isset($_POST['image_right_click']) ? esc_html(stripslashes($_POST['image_right_click'])) : 0);
|
181 |
-
$popup_fullscreen = (isset($_POST['popup_fullscreen']) ? esc_html(stripslashes($_POST['popup_fullscreen'])) : 0);
|
182 |
-
$album_role = (isset($_POST['album_role']) ? esc_html(stripslashes($_POST['album_role'])) : 0);
|
183 |
-
$image_role = (isset($_POST['image_role']) ? esc_html(stripslashes($_POST['image_role'])) : 0);
|
184 |
-
$popup_autoplay = (isset($_POST['popup_autoplay']) ? esc_html(stripslashes($_POST['popup_autoplay'])) : 0);
|
185 |
-
$album_view_type = (isset($_POST['album_view_type']) ? esc_html(stripslashes($_POST['album_view_type'])) : 'thumbnail');
|
186 |
-
$show_search_box = (isset($_POST['show_search_box']) ? esc_html(stripslashes($_POST['show_search_box'])) : 0);
|
187 |
-
$search_box_width = (isset($_POST['search_box_width']) ? esc_html(stripslashes($_POST['search_box_width'])) : 180);
|
188 |
-
$preload_images = (isset($_POST['preload_images']) ? esc_html(stripslashes($_POST['preload_images'])) : 1);
|
189 |
-
$preload_images_count = (isset($_POST['preload_images_count']) ? esc_html(stripslashes($_POST['preload_images_count'])) : 10);
|
190 |
-
$popup_enable_info = (isset($_POST['popup_enable_info']) ? esc_html(stripslashes($_POST['popup_enable_info'])) : 1);
|
191 |
-
$popup_info_always_show = (isset($_POST['popup_info_always_show']) ? esc_html(stripslashes($_POST['popup_info_always_show'])) : 0);
|
192 |
-
$popup_enable_rate = (isset($_POST['popup_enable_rate']) ? esc_html(stripslashes($_POST['popup_enable_rate'])) : 0);
|
193 |
-
$thumb_click_action = (isset($_POST['thumb_click_action']) ? esc_html(stripslashes($_POST['thumb_click_action'])) : 'open_lightbox');
|
194 |
-
$thumb_link_target = (isset($_POST['thumb_link_target']) ? esc_html(stripslashes($_POST['thumb_link_target'])) : 1);
|
195 |
-
$comment_moderation = (isset($_POST['comment_moderation']) ? esc_html(stripslashes($_POST['comment_moderation'])) : 0);
|
196 |
-
$popup_hit_counter = (isset($_POST['popup_hit_counter']) ? esc_html(stripslashes($_POST['popup_hit_counter'])) : 0);
|
197 |
-
$enable_ML_import = (isset($_POST['enable_ML_import']) ? esc_html(stripslashes($_POST['enable_ML_import'])) : 0);
|
198 |
-
$autoupdate_interval = (isset($_POST['autoupdate_interval_hour']) && isset($_POST['autoupdate_interval_min']) ? ((int) $_POST['autoupdate_interval_hour'] * 60 + (int) $_POST['autoupdate_interval_min']) : 30);
|
199 |
-
/*minimum autoupdate interval is 1 min*/
|
200 |
-
$autoupdate_interval = ($autoupdate_interval >= 1 ? $autoupdate_interval : 1 );
|
201 |
-
$instagram_access_token = (isset($_POST['instagram_access_token']) ? esc_html(stripslashes($_POST['instagram_access_token'])) : '');
|
202 |
-
$showthumbs_name = (isset($_POST['thumb_name']) ? esc_html(stripslashes($_POST['thumb_name'])) : 1);
|
203 |
-
$show_album_name = (isset($_POST['show_album_name_enable']) ? esc_html(stripslashes($_POST['show_album_name_enable'])) : 1);
|
204 |
-
$show_image_counts = (isset($_POST['show_image_counts']) ? esc_html(stripslashes($_POST['show_image_counts'])) : 0);
|
205 |
-
$play_icon = (isset($_POST['play_icon']) ? esc_html(stripslashes($_POST['play_icon'])) : 1);
|
206 |
-
$show_masonry_thumb_description = (isset($_POST['show_masonry_thumb_description']) ? esc_html(stripslashes($_POST['show_masonry_thumb_description'])) : 0);
|
207 |
-
$popup_info_full_width = (isset($_POST['popup_info_full_width']) ? esc_html(stripslashes($_POST['popup_info_full_width'])) : 0);
|
208 |
-
$show_sort_images = (isset($_POST['show_sort_images']) ? esc_html(stripslashes($_POST['show_sort_images'])) : 0);
|
209 |
-
$enable_seo = (isset($_POST['enable_seo']) ? esc_html(stripslashes($_POST['enable_seo'])) : 1);
|
210 |
-
$autohide_lightbox_navigation = (isset($_POST['autohide_lightbox_navigation']) ? esc_html(stripslashes($_POST['autohide_lightbox_navigation'])) : 1);
|
211 |
-
$autohide_slideshow_navigation = (isset($_POST['autohide_slideshow_navigation']) ? esc_html(stripslashes($_POST['autohide_slideshow_navigation'])) : 1);
|
212 |
-
$read_metadata = (isset($_POST['read_metadata']) ? esc_html(stripslashes($_POST['read_metadata'])) : 0);
|
213 |
-
$enable_loop = (isset($_POST['enable_loop']) ? esc_html(stripslashes($_POST['enable_loop'])) : 1);
|
214 |
-
$enable_addthis = (isset($_POST['enable_addthis']) ? esc_html(stripslashes($_POST['enable_addthis'])) : 0);
|
215 |
-
$addthis_profile_id = (isset($_POST['addthis_profile_id']) ? esc_html(stripslashes($_POST['addthis_profile_id'])) : '');
|
216 |
-
|
217 |
-
$carousel_interval = (isset($_POST['carousel_interval']) ? esc_html(stripslashes($_POST['carousel_interval'])) : 5);
|
218 |
-
$carousel_width = (isset($_POST['carousel_width']) ? esc_html(stripslashes($_POST['carousel_width'])) : 300);
|
219 |
-
$carousel_height = (isset($_POST['carousel_height']) ? esc_html(stripslashes($_POST['carousel_height'])) : 300);
|
220 |
-
$carousel_image_par = (isset($_POST['carousel_image_par']) ? esc_html(stripslashes($_POST['carousel_image_par'])) : 0.75);
|
221 |
-
$carousel_image_column_number = (isset($_POST['carousel_image_column_number']) ? esc_html(stripslashes($_POST['carousel_image_column_number'])) : 5);
|
222 |
-
$carousel_enable_title = (isset($_POST['carousel_enable_title']) ? esc_html(stripslashes($_POST['carousel_enable_title'])) : 0);
|
223 |
-
$carousel_enable_autoplay = (isset($_POST['carousel_enable_autoplay']) ? esc_html(stripslashes($_POST['carousel_enable_autoplay'])) : 0);
|
224 |
-
$carousel_r_width = (isset($_POST['carousel_r_width']) ? esc_html(stripslashes($_POST['carousel_r_width'])) : 800);
|
225 |
-
$carousel_fit_containerWidth = (isset($_POST['carousel_fit_containerWidth']) ? esc_html(stripslashes($_POST['carousel_fit_containerWidth'])) : 1);
|
226 |
-
$carousel_prev_next_butt = (isset($_POST['carousel_prev_next_butt']) ? esc_html(stripslashes($_POST['carousel_prev_next_butt'])) : 1);
|
227 |
-
$carousel_play_pause_butt = (isset($_POST['carousel_play_pause_butt']) ? esc_html(stripslashes($_POST['carousel_play_pause_butt'])) : 1);
|
228 |
-
$bwg_permissions = (isset($_POST['permissions']) ? esc_html(stripslashes($_POST['permissions'])) : 'manage_options');
|
229 |
-
$facebook_app_id = (isset($_POST['facebook_app_id']) ? esc_html(stripslashes($_POST['facebook_app_id'])) : '');
|
230 |
-
$facebook_app_secret = (isset($_POST['facebook_app_secret']) ? esc_html(stripslashes($_POST['facebook_app_secret'])) : '');
|
231 |
-
$show_tag_box = (isset($_POST['show_tag_box']) ? esc_html(stripslashes($_POST['show_tag_box'])) : 0);
|
232 |
-
$show_hide_custom_post = (isset($_POST['show_hide_custom_post']) ? esc_html(stripslashes($_POST['show_hide_custom_post'])) : 0);
|
233 |
-
$show_hide_post_meta = (isset($_POST['show_hide_post_meta']) ? esc_html(stripslashes($_POST['show_hide_post_meta'])) : 0);
|
234 |
-
$placeholder = (isset($_POST['placeholder']) ? esc_html(stripslashes($_POST['placeholder'])) : '');
|
235 |
-
|
236 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_option', array(
|
237 |
-
'images_directory' => $images_directory,
|
238 |
-
'masonry' => $masonry,
|
239 |
-
'mosaic' => $mosaic,
|
240 |
-
'resizable_mosaic' => $resizable_mosaic,
|
241 |
-
'mosaic_total_width'=> $mosaic_total_width,
|
242 |
-
'image_column_number' => $image_column_number,
|
243 |
-
'images_per_page' => $images_per_page,
|
244 |
-
'thumb_width' => $thumb_width,
|
245 |
-
'thumb_height' => $thumb_height,
|
246 |
-
'upload_thumb_width' => $upload_thumb_width,
|
247 |
-
'upload_thumb_height' => $upload_thumb_height,
|
248 |
-
'upload_img_width' => $upload_img_width,
|
249 |
-
'upload_img_height' => $upload_img_height,
|
250 |
-
'image_enable_page' => $image_enable_page,
|
251 |
-
'image_title_show_hover' => $image_title_show_hover,
|
252 |
-
'album_column_number' => $album_column_number,
|
253 |
-
'albums_per_page' => $albums_per_page,
|
254 |
-
'album_title_show_hover' => $album_title_show_hover,
|
255 |
-
'album_thumb_width' => $album_thumb_width,
|
256 |
-
'album_thumb_height' => $album_thumb_height,
|
257 |
-
'album_enable_page' => $album_enable_page,
|
258 |
-
'extended_album_height' => $extended_album_height,
|
259 |
-
'extended_album_description_enable' => $extended_album_description_enable,
|
260 |
-
'image_browser_width' => $image_browser_width,
|
261 |
-
'image_browser_title_enable' => $image_browser_title_enable,
|
262 |
-
'image_browser_description_enable' => $image_browser_description_enable,
|
263 |
-
'blog_style_width' => $blog_style_width,
|
264 |
-
'blog_style_title_enable' => $blog_style_title_enable,
|
265 |
-
'blog_style_images_per_page' => $blog_style_images_per_page,
|
266 |
-
'blog_style_enable_page' => $blog_style_enable_page,
|
267 |
-
'slideshow_type' => $slideshow_type,
|
268 |
-
'slideshow_interval' => $slideshow_interval,
|
269 |
-
'slideshow_width' => $slideshow_width,
|
270 |
-
'slideshow_height' => $slideshow_height,
|
271 |
-
'slideshow_enable_autoplay' => $slideshow_enable_autoplay,
|
272 |
-
'slideshow_enable_shuffle' => $slideshow_enable_shuffle,
|
273 |
-
'slideshow_enable_ctrl' => $slideshow_enable_ctrl,
|
274 |
-
'slideshow_enable_filmstrip' => $slideshow_enable_filmstrip,
|
275 |
-
'slideshow_filmstrip_height' => $slideshow_filmstrip_height,
|
276 |
-
'slideshow_enable_title' => $slideshow_enable_title,
|
277 |
-
'slideshow_title_position' => $slideshow_title_position,
|
278 |
-
'slideshow_title_full_width' => $slideshow_title_full_width,
|
279 |
-
'slideshow_enable_description' => $slideshow_enable_description,
|
280 |
-
'slideshow_description_position' => $slideshow_description_position,
|
281 |
-
'slideshow_enable_music' => $slideshow_enable_music,
|
282 |
-
'slideshow_audio_url' => $slideshow_audio_url,
|
283 |
-
'popup_width' => $popup_width,
|
284 |
-
'popup_height' => $popup_height,
|
285 |
-
'popup_type' => $popup_type,
|
286 |
-
'popup_interval' => $popup_interval,
|
287 |
-
'popup_enable_filmstrip' => $popup_enable_filmstrip,
|
288 |
-
'popup_filmstrip_height' => $popup_filmstrip_height,
|
289 |
-
'popup_enable_ctrl_btn' => $popup_enable_ctrl_btn,
|
290 |
-
'popup_enable_fullscreen' => $popup_enable_fullscreen,
|
291 |
-
'popup_enable_comment' => $popup_enable_comment,
|
292 |
-
'popup_enable_email' => $popup_enable_email,
|
293 |
-
'popup_enable_captcha' => $popup_enable_captcha,
|
294 |
-
'popup_enable_download' => $popup_enable_download,
|
295 |
-
'popup_enable_fullsize_image' => $popup_enable_fullsize_image,
|
296 |
-
'popup_enable_facebook' => $popup_enable_facebook,
|
297 |
-
'popup_enable_twitter' => $popup_enable_twitter,
|
298 |
-
'popup_enable_google' => $popup_enable_google,
|
299 |
-
'popup_enable_pinterest' => $popup_enable_pinterest,
|
300 |
-
'popup_enable_tumblr' => $popup_enable_tumblr,
|
301 |
-
'watermark_type' => $watermark_type,
|
302 |
-
'watermark_position' => $watermark_position,
|
303 |
-
'watermark_width' => $watermark_width,
|
304 |
-
'watermark_height' => $watermark_height,
|
305 |
-
'watermark_url' => $watermark_url,
|
306 |
-
'watermark_text' => $watermark_text,
|
307 |
-
'watermark_link' => $watermark_link,
|
308 |
-
'watermark_font_size' => $watermark_font_size,
|
309 |
-
'watermark_font' => $watermark_font,
|
310 |
-
'watermark_color' => $watermark_color,
|
311 |
-
'watermark_opacity' => $watermark_opacity,
|
312 |
-
'built_in_watermark_type' => $built_in_watermark_type,
|
313 |
-
'built_in_watermark_position' => $built_in_watermark_position,
|
314 |
-
'built_in_watermark_size' => $built_in_watermark_size,
|
315 |
-
'built_in_watermark_url' => $built_in_watermark_url,
|
316 |
-
'built_in_watermark_text' => $built_in_watermark_text,
|
317 |
-
'built_in_watermark_font_size' => $built_in_watermark_font_size,
|
318 |
-
'built_in_watermark_font' => $built_in_watermark_font,
|
319 |
-
'built_in_watermark_color' => $built_in_watermark_color,
|
320 |
-
'built_in_watermark_opacity' => $built_in_watermark_opacity,
|
321 |
-
'gallery_role' => $gallery_role,
|
322 |
-
'image_right_click' => $image_right_click,
|
323 |
-
'popup_fullscreen' => $popup_fullscreen,
|
324 |
-
'album_role' => $album_role,
|
325 |
-
'image_role' => $image_role,
|
326 |
-
'popup_autoplay' => $popup_autoplay,
|
327 |
-
'album_view_type' => $album_view_type,
|
328 |
-
'show_search_box' => $show_search_box,
|
329 |
-
'search_box_width' => $search_box_width,
|
330 |
-
'preload_images' => $preload_images,
|
331 |
-
'preload_images_count' => $preload_images_count,
|
332 |
-
'popup_enable_info' => $popup_enable_info,
|
333 |
-
'popup_info_always_show' => $popup_info_always_show,
|
334 |
-
'popup_enable_rate' => $popup_enable_rate,
|
335 |
-
'thumb_click_action' => $thumb_click_action,
|
336 |
-
'thumb_link_target' => $thumb_link_target,
|
337 |
-
'comment_moderation' => $comment_moderation,
|
338 |
-
'popup_hit_counter' => $popup_hit_counter,
|
339 |
-
'enable_ML_import' => $enable_ML_import,
|
340 |
-
'autoupdate_interval' => $autoupdate_interval,
|
341 |
-
'instagram_access_token' => $instagram_access_token,
|
342 |
-
'showthumbs_name' => $showthumbs_name,
|
343 |
-
'show_album_name' => $show_album_name,
|
344 |
-
'show_image_counts' => $show_image_counts,
|
345 |
-
'play_icon' => $play_icon,
|
346 |
-
'show_masonry_thumb_description' => $show_masonry_thumb_description,
|
347 |
-
'popup_info_full_width' => $popup_info_full_width,
|
348 |
-
'show_sort_images' => $show_sort_images,
|
349 |
-
'enable_seo' => $enable_seo,
|
350 |
-
'autohide_lightbox_navigation' => $autohide_lightbox_navigation,
|
351 |
-
'autohide_slideshow_navigation' => $autohide_slideshow_navigation,
|
352 |
-
'read_metadata' => $read_metadata,
|
353 |
-
'enable_loop' => $enable_loop,
|
354 |
-
'enable_addthis' => $enable_addthis,
|
355 |
-
'addthis_profile_id' => $addthis_profile_id,
|
356 |
-
|
357 |
-
'carousel_interval' => $carousel_interval,
|
358 |
-
'carousel_width' => $carousel_width,
|
359 |
-
'carousel_height' => $carousel_height,
|
360 |
-
'carousel_image_column_number' => $carousel_image_column_number,
|
361 |
-
'carousel_image_par' => $carousel_image_par,
|
362 |
-
'carousel_enable_title' => $carousel_enable_title,
|
363 |
-
'carousel_enable_autoplay' => $carousel_enable_autoplay,
|
364 |
-
'carousel_r_width' => $carousel_r_width,
|
365 |
-
'carousel_fit_containerWidth' => $carousel_fit_containerWidth,
|
366 |
-
'carousel_prev_next_butt' => $carousel_prev_next_butt,
|
367 |
-
'carousel_play_pause_butt' => $carousel_play_pause_butt,
|
368 |
-
'permissions' => $bwg_permissions,
|
369 |
-
'facebook_app_id' => $facebook_app_id,
|
370 |
-
'facebook_app_secret' => $facebook_app_secret,
|
371 |
-
'show_tag_box' => $show_tag_box,
|
372 |
-
'show_hide_custom_post' => $show_hide_custom_post,
|
373 |
-
'show_hide_post_meta' => $show_hide_post_meta,
|
374 |
-
'placeholder' => $placeholder,
|
375 |
-
), array('id' => 1));
|
376 |
-
|
377 |
-
if ($save !== FALSE) {
|
378 |
-
if ($old_images_directory && $old_images_directory != $images_directory) {
|
379 |
-
rename(ABSPATH . $old_images_directory . '/photo-gallery', ABSPATH . $images_directory . '/photo-gallery');
|
380 |
-
}
|
381 |
-
if (!is_dir(ABSPATH . $images_directory . '/photo-gallery')) {
|
382 |
-
mkdir(ABSPATH . $images_directory . '/photo-gallery', 0777);
|
383 |
-
}
|
384 |
-
echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'updated');
|
385 |
-
|
386 |
-
}
|
387 |
-
else {
|
388 |
-
echo WDWLibrary::message('Error. Please install plugin again.', 'error');
|
389 |
-
}
|
390 |
-
}
|
391 |
-
|
392 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
393 |
-
// Getters & Setters //
|
394 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
395 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
396 |
-
// Private Methods //
|
397 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
398 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
399 |
-
// Listeners //
|
400 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
401 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerOptions_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
+
$id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);
|
24 |
+
|
25 |
+
if($task != ''){
|
26 |
+
if(!WDWLibrary::verify_nonce('options_bwg')){
|
27 |
+
die('Sorry, your nonce did not verify.');
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
if (method_exists($this, $task)) {
|
33 |
+
$this->$task($id);
|
34 |
+
}
|
35 |
+
else {
|
36 |
+
$this->display();
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
public function display() {
|
41 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelOptions_bwg.php";
|
42 |
+
$model = new BWGModelOptions_bwg();
|
43 |
+
|
44 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewOptions_bwg.php";
|
45 |
+
$view = new BWGViewOptions_bwg($model);
|
46 |
+
$view->display();
|
47 |
+
}
|
48 |
+
|
49 |
+
public function reset() {
|
50 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelOptions_bwg.php";
|
51 |
+
$model = new BWGModelOptions_bwg();
|
52 |
+
|
53 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewOptions_bwg.php";
|
54 |
+
$view = new BWGViewOptions_bwg($model);
|
55 |
+
echo WDWLibrary::message('Changes must be saved.', 'error');
|
56 |
+
$view->display(true);
|
57 |
+
}
|
58 |
+
|
59 |
+
public function save() {
|
60 |
+
$this->save_db();
|
61 |
+
$this->display();
|
62 |
+
}
|
63 |
+
|
64 |
+
public function save_db() {
|
65 |
+
global $wpdb;
|
66 |
+
$id = 1;
|
67 |
+
if (isset($_POST['old_images_directory'])) {
|
68 |
+
$old_images_directory = esc_html(stripslashes($_POST['old_images_directory']));
|
69 |
+
}
|
70 |
+
if (isset($_POST['images_directory'])) {
|
71 |
+
$images_directory = esc_html(stripslashes($_POST['images_directory']));
|
72 |
+
if (!is_dir(ABSPATH . $images_directory)) {
|
73 |
+
echo WDWLibrary::message('Uploads directory doesn\'t exist. Old value is restored.', 'error');
|
74 |
+
if ($old_images_directory) {
|
75 |
+
$images_directory = $old_images_directory;
|
76 |
+
}
|
77 |
+
else {
|
78 |
+
$upload_dir = wp_upload_dir();
|
79 |
+
if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
|
80 |
+
mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
|
81 |
+
}
|
82 |
+
$images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
else {
|
87 |
+
$upload_dir = wp_upload_dir();
|
88 |
+
if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
|
89 |
+
mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
|
90 |
+
}
|
91 |
+
$images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
|
92 |
+
}
|
93 |
+
$resize_image = (isset($_POST['resize_image']) ? esc_html(stripslashes($_POST['resize_image'])) : 1);
|
94 |
+
|
95 |
+
$masonry = (isset($_POST['masonry']) ? esc_html(stripslashes($_POST['masonry'])) : 'vertical');
|
96 |
+
$mosaic = (isset($_POST['mosaic']) ? esc_html(stripslashes($_POST['mosaic'])) : 'vertical');
|
97 |
+
$resizable_mosaic = (isset($_POST['resizable_mosaic']) ? esc_html(stripslashes($_POST['resizable_mosaic'])) : 0);
|
98 |
+
$mosaic_total_width = (isset($_POST['mosaic_total_width']) ? esc_html(stripslashes($_POST['mosaic_total_width'])) : 100);
|
99 |
+
|
100 |
+
$image_column_number = (isset($_POST['image_column_number']) ? esc_html(stripslashes($_POST['image_column_number'])) : 5);
|
101 |
+
$images_per_page = (isset($_POST['images_per_page']) ? esc_html(stripslashes($_POST['images_per_page'])) : 30);
|
102 |
+
$thumb_width = (isset($_POST['thumb_width']) ? esc_html(stripslashes($_POST['thumb_width'])) : 120);
|
103 |
+
$thumb_height = (isset($_POST['thumb_height']) ? esc_html(stripslashes($_POST['thumb_height'])) : 90);
|
104 |
+
$upload_thumb_width = (isset($_POST['upload_thumb_width']) ? esc_html(stripslashes($_POST['upload_thumb_width'])) : 300);
|
105 |
+
$upload_thumb_height = (isset($_POST['upload_thumb_height']) ? esc_html(stripslashes($_POST['upload_thumb_height'])) : 300);
|
106 |
+
$upload_img_width = (isset($_POST['upload_img_width']) ? esc_html(stripslashes($_POST['upload_img_width'])) : 1200);
|
107 |
+
$upload_img_height = (isset($_POST['upload_img_height']) ? esc_html(stripslashes($_POST['upload_img_height'])) : 1200);
|
108 |
+
$image_enable_page = (isset($_POST['image_enable_page']) ? esc_html(stripslashes($_POST['image_enable_page'])) : 1);
|
109 |
+
$image_title_show_hover = (isset($_POST['image_title_show_hover']) ? esc_html(stripslashes($_POST['image_title_show_hover'])) : 'none');
|
110 |
+
$album_column_number = (isset($_POST['album_column_number']) ? esc_html(stripslashes($_POST['album_column_number'])) : 5);
|
111 |
+
$albums_per_page = (isset($_POST['albums_per_page']) ? esc_html(stripslashes($_POST['albums_per_page'])) : 30);
|
112 |
+
$album_title_show_hover = (isset($_POST['album_title_show_hover']) ? esc_html(stripslashes($_POST['album_title_show_hover'])) : 'hover');
|
113 |
+
$album_thumb_width = (isset($_POST['album_thumb_width']) ? esc_html(stripslashes($_POST['album_thumb_width'])) : 120);
|
114 |
+
$album_thumb_height = (isset($_POST['album_thumb_height']) ? esc_html(stripslashes($_POST['album_thumb_height'])) : 90);
|
115 |
+
$album_enable_page = (isset($_POST['album_enable_page']) ? esc_html(stripslashes($_POST['album_enable_page'])) : 1);
|
116 |
+
$extended_album_height = (isset($_POST['extended_album_height']) ? esc_html(stripslashes($_POST['extended_album_height'])) : 150);
|
117 |
+
$extended_album_description_enable = (isset($_POST['extended_album_description_enable']) ? esc_html(stripslashes($_POST['extended_album_description_enable'])) : 1);
|
118 |
+
$image_browser_width = (isset($_POST['image_browser_width']) ? esc_html(stripslashes($_POST['image_browser_width'])) : 800);
|
119 |
+
$image_browser_title_enable = (isset($_POST['image_browser_title_enable']) ? esc_html(stripslashes($_POST['image_browser_title_enable'])) : 1);
|
120 |
+
$image_browser_description_enable = (isset($_POST['image_browser_description_enable']) ? esc_html(stripslashes($_POST['image_browser_description_enable'])) : 1);
|
121 |
+
$blog_style_width = (isset($_POST['blog_style_width']) ? esc_html(stripslashes($_POST['blog_style_width'])) : 800);
|
122 |
+
$blog_style_title_enable = (isset($_POST['blog_style_title_enable']) ? esc_html(stripslashes($_POST['blog_style_title_enable'])) : 1);
|
123 |
+
$blog_style_images_per_page = (isset($_POST['blog_style_images_per_page']) ? esc_html(stripslashes($_POST['blog_style_images_per_page'])) : 5);
|
124 |
+
$blog_style_enable_page = (isset($_POST['blog_style_enable_page']) ? esc_html(stripslashes($_POST['blog_style_enable_page'])) : 1);
|
125 |
+
$slideshow_type = (isset($_POST['slideshow_type']) ? esc_html(stripslashes($_POST['slideshow_type'])) : 'fade');
|
126 |
+
$slideshow_interval = (isset($_POST['slideshow_interval']) ? esc_html(stripslashes($_POST['slideshow_interval'])) : 5);
|
127 |
+
$slideshow_width = (isset($_POST['slideshow_width']) ? esc_html(stripslashes($_POST['slideshow_width'])) : 800);
|
128 |
+
$slideshow_height = (isset($_POST['slideshow_height']) ? esc_html(stripslashes($_POST['slideshow_height'])) : 600);
|
129 |
+
$slideshow_enable_autoplay = (isset($_POST['slideshow_enable_autoplay']) ? esc_html(stripslashes($_POST['slideshow_enable_autoplay'])) : 1);
|
130 |
+
$slideshow_enable_shuffle = (isset($_POST['slideshow_enable_shuffle']) ? esc_html(stripslashes($_POST['slideshow_enable_shuffle'])) : 1);
|
131 |
+
$slideshow_enable_ctrl = (isset($_POST['slideshow_enable_ctrl']) ? esc_html(stripslashes($_POST['slideshow_enable_ctrl'])) : 1);
|
132 |
+
$slideshow_enable_filmstrip = (isset($_POST['slideshow_enable_filmstrip']) ? esc_html(stripslashes($_POST['slideshow_enable_filmstrip'])) : 1);
|
133 |
+
$slideshow_filmstrip_height = (isset($_POST['slideshow_filmstrip_height']) ? esc_html(stripslashes($_POST['slideshow_filmstrip_height'])) : 70);
|
134 |
+
$slideshow_enable_title = (isset($_POST['slideshow_enable_title']) ? esc_html(stripslashes($_POST['slideshow_enable_title'])) : 0);
|
135 |
+
$slideshow_title_position = (isset($_POST['slideshow_title_position']) ? esc_html(stripslashes($_POST['slideshow_title_position'])) : 'top-right');
|
136 |
+
$slideshow_title_full_width = (isset($_POST['slideshow_title_full_width']) ? esc_html(stripslashes($_POST['slideshow_title_full_width'])) : 0);
|
137 |
+
$slideshow_enable_description = (isset($_POST['slideshow_enable_description']) ? esc_html(stripslashes($_POST['slideshow_enable_description'])) : 1);
|
138 |
+
$slideshow_description_position = (isset($_POST['slideshow_description_position']) ? esc_html(stripslashes($_POST['slideshow_description_position'])) : 'bottom-right');
|
139 |
+
$slideshow_enable_music = (isset($_POST['slideshow_enable_music']) ? esc_html(stripslashes($_POST['slideshow_enable_music'])) : 0);
|
140 |
+
$slideshow_audio_url = (isset($_POST['slideshow_audio_url']) ? esc_html(stripslashes($_POST['slideshow_audio_url'])) : '');
|
141 |
+
$popup_width = (isset($_POST['popup_width']) ? esc_html(stripslashes($_POST['popup_width'])) : 800);
|
142 |
+
$popup_height = (isset($_POST['popup_height']) ? esc_html(stripslashes($_POST['popup_height'])) : 600);
|
143 |
+
$popup_type = (isset($_POST['popup_type']) ? esc_html(stripslashes($_POST['popup_type'])) : 'fade');
|
144 |
+
$popup_interval = (isset($_POST['popup_interval']) ? esc_html(stripslashes($_POST['popup_interval'])) : 5);
|
145 |
+
$popup_enable_filmstrip = (isset($_POST['popup_enable_filmstrip']) ? esc_html(stripslashes($_POST['popup_enable_filmstrip'])) : 1);
|
146 |
+
$popup_filmstrip_height = (isset($_POST['popup_filmstrip_height']) ? esc_html(stripslashes($_POST['popup_filmstrip_height'])) : 50);
|
147 |
+
$popup_enable_ctrl_btn = (isset($_POST['popup_enable_ctrl_btn']) ? esc_html(stripslashes($_POST['popup_enable_ctrl_btn'])) : 1);
|
148 |
+
$popup_enable_fullscreen = (isset($_POST['popup_enable_fullscreen']) ? esc_html(stripslashes($_POST['popup_enable_fullscreen'])) : 1);
|
149 |
+
$popup_enable_comment = (isset($_POST['popup_enable_comment']) ? esc_html(stripslashes($_POST['popup_enable_comment'])) : 1);
|
150 |
+
$popup_enable_email = (isset($_POST['popup_enable_email']) ? esc_html(stripslashes($_POST['popup_enable_email'])) : 0);
|
151 |
+
$popup_enable_captcha = (isset($_POST['popup_enable_captcha']) ? esc_html(stripslashes($_POST['popup_enable_captcha'])) : 0);
|
152 |
+
$popup_enable_download = (isset($_POST['popup_enable_download']) ? esc_html(stripslashes($_POST['popup_enable_download'])) : 0);
|
153 |
+
$popup_enable_fullsize_image = (isset($_POST['popup_enable_fullsize_image']) ? esc_html(stripslashes($_POST['popup_enable_fullsize_image'])) : 0);
|
154 |
+
$popup_enable_facebook = (isset($_POST['popup_enable_facebook']) ? esc_html(stripslashes($_POST['popup_enable_facebook'])) : 1);
|
155 |
+
$popup_enable_twitter = (isset($_POST['popup_enable_twitter']) ? esc_html(stripslashes($_POST['popup_enable_twitter'])) : 1);
|
156 |
+
$popup_enable_google = (isset($_POST['popup_enable_google']) ? esc_html(stripslashes($_POST['popup_enable_google'])) : 1);
|
157 |
+
$popup_enable_pinterest = (isset($_POST['popup_enable_pinterest']) ? esc_html(stripslashes($_POST['popup_enable_pinterest'])) : 0);
|
158 |
+
$popup_enable_tumblr = (isset($_POST['popup_enable_tumblr']) ? esc_html(stripslashes($_POST['popup_enable_tumblr'])) : 0);
|
159 |
+
$watermark_type = (isset($_POST['watermark_type']) ? esc_html(stripslashes($_POST['watermark_type'])) : 'none');
|
160 |
+
$watermark_position = (isset($_POST['watermark_position']) ? esc_html(stripslashes($_POST['watermark_position'])) : 'bottom-right');
|
161 |
+
$watermark_width = (isset($_POST['watermark_width']) ? esc_html(stripslashes($_POST['watermark_width'])) : 600);
|
162 |
+
$watermark_height = (isset($_POST['watermark_height']) ? esc_html(stripslashes($_POST['watermark_height'])) : 600);
|
163 |
+
$watermark_url = (isset($_POST['watermark_url']) ? esc_html(stripslashes($_POST['watermark_url'])) : WD_BWG_URL . '/images/watermark.png');
|
164 |
+
$watermark_text = (isset($_POST['watermark_text']) ? esc_html(stripslashes($_POST['watermark_text'])) : 'web-dorado.com');
|
165 |
+
$watermark_link = (isset($_POST['watermark_link']) ? esc_html(stripslashes($_POST['watermark_link'])) : 'http://www.web-dorado.com');
|
166 |
+
$watermark_opacity = (isset($_POST['watermark_opacity']) ? esc_html(stripslashes($_POST['watermark_opacity'])) : 30);
|
167 |
+
$watermark_font_size = (isset($_POST['watermark_font_size']) ? esc_html(stripslashes($_POST['watermark_font_size'])) : 20);
|
168 |
+
$watermark_font = (isset($_POST['watermark_font']) ? esc_html(stripslashes($_POST['watermark_font'])) : '');
|
169 |
+
$watermark_color = (isset($_POST['watermark_color']) ? esc_html(stripslashes($_POST['watermark_color'])) : '');
|
170 |
+
$built_in_watermark_type = (isset($_POST['built_in_watermark_type']) ? esc_html(stripslashes($_POST['built_in_watermark_type'])) : 'none');
|
171 |
+
$built_in_watermark_position = (isset($_POST['built_in_watermark_position']) ? esc_html(stripslashes($_POST['built_in_watermark_position'])) : 'middle-center');
|
172 |
+
$built_in_watermark_size = (isset($_POST['built_in_watermark_size']) ? esc_html(stripslashes($_POST['built_in_watermark_size'])) : 15);
|
173 |
+
$built_in_watermark_url = (isset($_POST['built_in_watermark_url']) ? esc_html(stripslashes($_POST['built_in_watermark_url'])) : WD_BWG_URL . '/images/watermark.png');
|
174 |
+
$built_in_watermark_text = (isset($_POST['built_in_watermark_text']) ? esc_html(stripslashes($_POST['built_in_watermark_text'])) : 'web-dorado.com');
|
175 |
+
$built_in_watermark_opacity = (isset($_POST['built_in_watermark_opacity']) ? esc_html(stripslashes($_POST['built_in_watermark_opacity'])) : 30);
|
176 |
+
$built_in_watermark_font_size = (isset($_POST['built_in_watermark_font_size']) ? esc_html(stripslashes($_POST['built_in_watermark_font_size'])) : 20);
|
177 |
+
$built_in_watermark_font = (isset($_POST['built_in_watermark_font']) ? esc_html(stripslashes($_POST['built_in_watermark_font'])) : '');
|
178 |
+
$built_in_watermark_color = (isset($_POST['built_in_watermark_color']) ? esc_html(stripslashes($_POST['built_in_watermark_color'])) : '');
|
179 |
+
$gallery_role = (isset($_POST['gallery_role']) ? esc_html(stripslashes($_POST['gallery_role'])) : 0);
|
180 |
+
$image_right_click = (isset($_POST['image_right_click']) ? esc_html(stripslashes($_POST['image_right_click'])) : 0);
|
181 |
+
$popup_fullscreen = (isset($_POST['popup_fullscreen']) ? esc_html(stripslashes($_POST['popup_fullscreen'])) : 0);
|
182 |
+
$album_role = (isset($_POST['album_role']) ? esc_html(stripslashes($_POST['album_role'])) : 0);
|
183 |
+
$image_role = (isset($_POST['image_role']) ? esc_html(stripslashes($_POST['image_role'])) : 0);
|
184 |
+
$popup_autoplay = (isset($_POST['popup_autoplay']) ? esc_html(stripslashes($_POST['popup_autoplay'])) : 0);
|
185 |
+
$album_view_type = (isset($_POST['album_view_type']) ? esc_html(stripslashes($_POST['album_view_type'])) : 'thumbnail');
|
186 |
+
$show_search_box = (isset($_POST['show_search_box']) ? esc_html(stripslashes($_POST['show_search_box'])) : 0);
|
187 |
+
$search_box_width = (isset($_POST['search_box_width']) ? esc_html(stripslashes($_POST['search_box_width'])) : 180);
|
188 |
+
$preload_images = (isset($_POST['preload_images']) ? esc_html(stripslashes($_POST['preload_images'])) : 1);
|
189 |
+
$preload_images_count = (isset($_POST['preload_images_count']) ? esc_html(stripslashes($_POST['preload_images_count'])) : 10);
|
190 |
+
$popup_enable_info = (isset($_POST['popup_enable_info']) ? esc_html(stripslashes($_POST['popup_enable_info'])) : 1);
|
191 |
+
$popup_info_always_show = (isset($_POST['popup_info_always_show']) ? esc_html(stripslashes($_POST['popup_info_always_show'])) : 0);
|
192 |
+
$popup_enable_rate = (isset($_POST['popup_enable_rate']) ? esc_html(stripslashes($_POST['popup_enable_rate'])) : 0);
|
193 |
+
$thumb_click_action = (isset($_POST['thumb_click_action']) ? esc_html(stripslashes($_POST['thumb_click_action'])) : 'open_lightbox');
|
194 |
+
$thumb_link_target = (isset($_POST['thumb_link_target']) ? esc_html(stripslashes($_POST['thumb_link_target'])) : 1);
|
195 |
+
$comment_moderation = (isset($_POST['comment_moderation']) ? esc_html(stripslashes($_POST['comment_moderation'])) : 0);
|
196 |
+
$popup_hit_counter = (isset($_POST['popup_hit_counter']) ? esc_html(stripslashes($_POST['popup_hit_counter'])) : 0);
|
197 |
+
$enable_ML_import = (isset($_POST['enable_ML_import']) ? esc_html(stripslashes($_POST['enable_ML_import'])) : 0);
|
198 |
+
$autoupdate_interval = (isset($_POST['autoupdate_interval_hour']) && isset($_POST['autoupdate_interval_min']) ? ((int) $_POST['autoupdate_interval_hour'] * 60 + (int) $_POST['autoupdate_interval_min']) : 30);
|
199 |
+
/*minimum autoupdate interval is 1 min*/
|
200 |
+
$autoupdate_interval = ($autoupdate_interval >= 1 ? $autoupdate_interval : 1 );
|
201 |
+
$instagram_access_token = (isset($_POST['instagram_access_token']) ? esc_html(stripslashes($_POST['instagram_access_token'])) : '');
|
202 |
+
$showthumbs_name = (isset($_POST['thumb_name']) ? esc_html(stripslashes($_POST['thumb_name'])) : 1);
|
203 |
+
$show_album_name = (isset($_POST['show_album_name_enable']) ? esc_html(stripslashes($_POST['show_album_name_enable'])) : 1);
|
204 |
+
$show_image_counts = (isset($_POST['show_image_counts']) ? esc_html(stripslashes($_POST['show_image_counts'])) : 0);
|
205 |
+
$play_icon = (isset($_POST['play_icon']) ? esc_html(stripslashes($_POST['play_icon'])) : 1);
|
206 |
+
$show_masonry_thumb_description = (isset($_POST['show_masonry_thumb_description']) ? esc_html(stripslashes($_POST['show_masonry_thumb_description'])) : 0);
|
207 |
+
$popup_info_full_width = (isset($_POST['popup_info_full_width']) ? esc_html(stripslashes($_POST['popup_info_full_width'])) : 0);
|
208 |
+
$show_sort_images = (isset($_POST['show_sort_images']) ? esc_html(stripslashes($_POST['show_sort_images'])) : 0);
|
209 |
+
$enable_seo = (isset($_POST['enable_seo']) ? esc_html(stripslashes($_POST['enable_seo'])) : 1);
|
210 |
+
$autohide_lightbox_navigation = (isset($_POST['autohide_lightbox_navigation']) ? esc_html(stripslashes($_POST['autohide_lightbox_navigation'])) : 1);
|
211 |
+
$autohide_slideshow_navigation = (isset($_POST['autohide_slideshow_navigation']) ? esc_html(stripslashes($_POST['autohide_slideshow_navigation'])) : 1);
|
212 |
+
$read_metadata = (isset($_POST['read_metadata']) ? esc_html(stripslashes($_POST['read_metadata'])) : 0);
|
213 |
+
$enable_loop = (isset($_POST['enable_loop']) ? esc_html(stripslashes($_POST['enable_loop'])) : 1);
|
214 |
+
$enable_addthis = (isset($_POST['enable_addthis']) ? esc_html(stripslashes($_POST['enable_addthis'])) : 0);
|
215 |
+
$addthis_profile_id = (isset($_POST['addthis_profile_id']) ? esc_html(stripslashes($_POST['addthis_profile_id'])) : '');
|
216 |
+
|
217 |
+
$carousel_interval = (isset($_POST['carousel_interval']) ? esc_html(stripslashes($_POST['carousel_interval'])) : 5);
|
218 |
+
$carousel_width = (isset($_POST['carousel_width']) ? esc_html(stripslashes($_POST['carousel_width'])) : 300);
|
219 |
+
$carousel_height = (isset($_POST['carousel_height']) ? esc_html(stripslashes($_POST['carousel_height'])) : 300);
|
220 |
+
$carousel_image_par = (isset($_POST['carousel_image_par']) ? esc_html(stripslashes($_POST['carousel_image_par'])) : 0.75);
|
221 |
+
$carousel_image_column_number = (isset($_POST['carousel_image_column_number']) ? esc_html(stripslashes($_POST['carousel_image_column_number'])) : 5);
|
222 |
+
$carousel_enable_title = (isset($_POST['carousel_enable_title']) ? esc_html(stripslashes($_POST['carousel_enable_title'])) : 0);
|
223 |
+
$carousel_enable_autoplay = (isset($_POST['carousel_enable_autoplay']) ? esc_html(stripslashes($_POST['carousel_enable_autoplay'])) : 0);
|
224 |
+
$carousel_r_width = (isset($_POST['carousel_r_width']) ? esc_html(stripslashes($_POST['carousel_r_width'])) : 800);
|
225 |
+
$carousel_fit_containerWidth = (isset($_POST['carousel_fit_containerWidth']) ? esc_html(stripslashes($_POST['carousel_fit_containerWidth'])) : 1);
|
226 |
+
$carousel_prev_next_butt = (isset($_POST['carousel_prev_next_butt']) ? esc_html(stripslashes($_POST['carousel_prev_next_butt'])) : 1);
|
227 |
+
$carousel_play_pause_butt = (isset($_POST['carousel_play_pause_butt']) ? esc_html(stripslashes($_POST['carousel_play_pause_butt'])) : 1);
|
228 |
+
$bwg_permissions = (isset($_POST['permissions']) ? esc_html(stripslashes($_POST['permissions'])) : 'manage_options');
|
229 |
+
$facebook_app_id = (isset($_POST['facebook_app_id']) ? esc_html(stripslashes($_POST['facebook_app_id'])) : '');
|
230 |
+
$facebook_app_secret = (isset($_POST['facebook_app_secret']) ? esc_html(stripslashes($_POST['facebook_app_secret'])) : '');
|
231 |
+
$show_tag_box = (isset($_POST['show_tag_box']) ? esc_html(stripslashes($_POST['show_tag_box'])) : 0);
|
232 |
+
$show_hide_custom_post = (isset($_POST['show_hide_custom_post']) ? esc_html(stripslashes($_POST['show_hide_custom_post'])) : 0);
|
233 |
+
$show_hide_post_meta = (isset($_POST['show_hide_post_meta']) ? esc_html(stripslashes($_POST['show_hide_post_meta'])) : 0);
|
234 |
+
$placeholder = (isset($_POST['placeholder']) ? esc_html(stripslashes($_POST['placeholder'])) : '');
|
235 |
+
|
236 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_option', array(
|
237 |
+
'images_directory' => $images_directory,
|
238 |
+
'masonry' => $masonry,
|
239 |
+
'mosaic' => $mosaic,
|
240 |
+
'resizable_mosaic' => $resizable_mosaic,
|
241 |
+
'mosaic_total_width'=> $mosaic_total_width,
|
242 |
+
'image_column_number' => $image_column_number,
|
243 |
+
'images_per_page' => $images_per_page,
|
244 |
+
'thumb_width' => $thumb_width,
|
245 |
+
'thumb_height' => $thumb_height,
|
246 |
+
'upload_thumb_width' => $upload_thumb_width,
|
247 |
+
'upload_thumb_height' => $upload_thumb_height,
|
248 |
+
'upload_img_width' => $upload_img_width,
|
249 |
+
'upload_img_height' => $upload_img_height,
|
250 |
+
'image_enable_page' => $image_enable_page,
|
251 |
+
'image_title_show_hover' => $image_title_show_hover,
|
252 |
+
'album_column_number' => $album_column_number,
|
253 |
+
'albums_per_page' => $albums_per_page,
|
254 |
+
'album_title_show_hover' => $album_title_show_hover,
|
255 |
+
'album_thumb_width' => $album_thumb_width,
|
256 |
+
'album_thumb_height' => $album_thumb_height,
|
257 |
+
'album_enable_page' => $album_enable_page,
|
258 |
+
'extended_album_height' => $extended_album_height,
|
259 |
+
'extended_album_description_enable' => $extended_album_description_enable,
|
260 |
+
'image_browser_width' => $image_browser_width,
|
261 |
+
'image_browser_title_enable' => $image_browser_title_enable,
|
262 |
+
'image_browser_description_enable' => $image_browser_description_enable,
|
263 |
+
'blog_style_width' => $blog_style_width,
|
264 |
+
'blog_style_title_enable' => $blog_style_title_enable,
|
265 |
+
'blog_style_images_per_page' => $blog_style_images_per_page,
|
266 |
+
'blog_style_enable_page' => $blog_style_enable_page,
|
267 |
+
'slideshow_type' => $slideshow_type,
|
268 |
+
'slideshow_interval' => $slideshow_interval,
|
269 |
+
'slideshow_width' => $slideshow_width,
|
270 |
+
'slideshow_height' => $slideshow_height,
|
271 |
+
'slideshow_enable_autoplay' => $slideshow_enable_autoplay,
|
272 |
+
'slideshow_enable_shuffle' => $slideshow_enable_shuffle,
|
273 |
+
'slideshow_enable_ctrl' => $slideshow_enable_ctrl,
|
274 |
+
'slideshow_enable_filmstrip' => $slideshow_enable_filmstrip,
|
275 |
+
'slideshow_filmstrip_height' => $slideshow_filmstrip_height,
|
276 |
+
'slideshow_enable_title' => $slideshow_enable_title,
|
277 |
+
'slideshow_title_position' => $slideshow_title_position,
|
278 |
+
'slideshow_title_full_width' => $slideshow_title_full_width,
|
279 |
+
'slideshow_enable_description' => $slideshow_enable_description,
|
280 |
+
'slideshow_description_position' => $slideshow_description_position,
|
281 |
+
'slideshow_enable_music' => $slideshow_enable_music,
|
282 |
+
'slideshow_audio_url' => $slideshow_audio_url,
|
283 |
+
'popup_width' => $popup_width,
|
284 |
+
'popup_height' => $popup_height,
|
285 |
+
'popup_type' => $popup_type,
|
286 |
+
'popup_interval' => $popup_interval,
|
287 |
+
'popup_enable_filmstrip' => $popup_enable_filmstrip,
|
288 |
+
'popup_filmstrip_height' => $popup_filmstrip_height,
|
289 |
+
'popup_enable_ctrl_btn' => $popup_enable_ctrl_btn,
|
290 |
+
'popup_enable_fullscreen' => $popup_enable_fullscreen,
|
291 |
+
'popup_enable_comment' => $popup_enable_comment,
|
292 |
+
'popup_enable_email' => $popup_enable_email,
|
293 |
+
'popup_enable_captcha' => $popup_enable_captcha,
|
294 |
+
'popup_enable_download' => $popup_enable_download,
|
295 |
+
'popup_enable_fullsize_image' => $popup_enable_fullsize_image,
|
296 |
+
'popup_enable_facebook' => $popup_enable_facebook,
|
297 |
+
'popup_enable_twitter' => $popup_enable_twitter,
|
298 |
+
'popup_enable_google' => $popup_enable_google,
|
299 |
+
'popup_enable_pinterest' => $popup_enable_pinterest,
|
300 |
+
'popup_enable_tumblr' => $popup_enable_tumblr,
|
301 |
+
'watermark_type' => $watermark_type,
|
302 |
+
'watermark_position' => $watermark_position,
|
303 |
+
'watermark_width' => $watermark_width,
|
304 |
+
'watermark_height' => $watermark_height,
|
305 |
+
'watermark_url' => $watermark_url,
|
306 |
+
'watermark_text' => $watermark_text,
|
307 |
+
'watermark_link' => $watermark_link,
|
308 |
+
'watermark_font_size' => $watermark_font_size,
|
309 |
+
'watermark_font' => $watermark_font,
|
310 |
+
'watermark_color' => $watermark_color,
|
311 |
+
'watermark_opacity' => $watermark_opacity,
|
312 |
+
'built_in_watermark_type' => $built_in_watermark_type,
|
313 |
+
'built_in_watermark_position' => $built_in_watermark_position,
|
314 |
+
'built_in_watermark_size' => $built_in_watermark_size,
|
315 |
+
'built_in_watermark_url' => $built_in_watermark_url,
|
316 |
+
'built_in_watermark_text' => $built_in_watermark_text,
|
317 |
+
'built_in_watermark_font_size' => $built_in_watermark_font_size,
|
318 |
+
'built_in_watermark_font' => $built_in_watermark_font,
|
319 |
+
'built_in_watermark_color' => $built_in_watermark_color,
|
320 |
+
'built_in_watermark_opacity' => $built_in_watermark_opacity,
|
321 |
+
'gallery_role' => $gallery_role,
|
322 |
+
'image_right_click' => $image_right_click,
|
323 |
+
'popup_fullscreen' => $popup_fullscreen,
|
324 |
+
'album_role' => $album_role,
|
325 |
+
'image_role' => $image_role,
|
326 |
+
'popup_autoplay' => $popup_autoplay,
|
327 |
+
'album_view_type' => $album_view_type,
|
328 |
+
'show_search_box' => $show_search_box,
|
329 |
+
'search_box_width' => $search_box_width,
|
330 |
+
'preload_images' => $preload_images,
|
331 |
+
'preload_images_count' => $preload_images_count,
|
332 |
+
'popup_enable_info' => $popup_enable_info,
|
333 |
+
'popup_info_always_show' => $popup_info_always_show,
|
334 |
+
'popup_enable_rate' => $popup_enable_rate,
|
335 |
+
'thumb_click_action' => $thumb_click_action,
|
336 |
+
'thumb_link_target' => $thumb_link_target,
|
337 |
+
'comment_moderation' => $comment_moderation,
|
338 |
+
'popup_hit_counter' => $popup_hit_counter,
|
339 |
+
'enable_ML_import' => $enable_ML_import,
|
340 |
+
'autoupdate_interval' => $autoupdate_interval,
|
341 |
+
'instagram_access_token' => $instagram_access_token,
|
342 |
+
'showthumbs_name' => $showthumbs_name,
|
343 |
+
'show_album_name' => $show_album_name,
|
344 |
+
'show_image_counts' => $show_image_counts,
|
345 |
+
'play_icon' => $play_icon,
|
346 |
+
'show_masonry_thumb_description' => $show_masonry_thumb_description,
|
347 |
+
'popup_info_full_width' => $popup_info_full_width,
|
348 |
+
'show_sort_images' => $show_sort_images,
|
349 |
+
'enable_seo' => $enable_seo,
|
350 |
+
'autohide_lightbox_navigation' => $autohide_lightbox_navigation,
|
351 |
+
'autohide_slideshow_navigation' => $autohide_slideshow_navigation,
|
352 |
+
'read_metadata' => $read_metadata,
|
353 |
+
'enable_loop' => $enable_loop,
|
354 |
+
'enable_addthis' => $enable_addthis,
|
355 |
+
'addthis_profile_id' => $addthis_profile_id,
|
356 |
+
|
357 |
+
'carousel_interval' => $carousel_interval,
|
358 |
+
'carousel_width' => $carousel_width,
|
359 |
+
'carousel_height' => $carousel_height,
|
360 |
+
'carousel_image_column_number' => $carousel_image_column_number,
|
361 |
+
'carousel_image_par' => $carousel_image_par,
|
362 |
+
'carousel_enable_title' => $carousel_enable_title,
|
363 |
+
'carousel_enable_autoplay' => $carousel_enable_autoplay,
|
364 |
+
'carousel_r_width' => $carousel_r_width,
|
365 |
+
'carousel_fit_containerWidth' => $carousel_fit_containerWidth,
|
366 |
+
'carousel_prev_next_butt' => $carousel_prev_next_butt,
|
367 |
+
'carousel_play_pause_butt' => $carousel_play_pause_butt,
|
368 |
+
'permissions' => $bwg_permissions,
|
369 |
+
'facebook_app_id' => $facebook_app_id,
|
370 |
+
'facebook_app_secret' => $facebook_app_secret,
|
371 |
+
'show_tag_box' => $show_tag_box,
|
372 |
+
'show_hide_custom_post' => $show_hide_custom_post,
|
373 |
+
'show_hide_post_meta' => $show_hide_post_meta,
|
374 |
+
'placeholder' => $placeholder,
|
375 |
+
), array('id' => 1));
|
376 |
+
|
377 |
+
if ($save !== FALSE) {
|
378 |
+
if ($old_images_directory && $old_images_directory != $images_directory) {
|
379 |
+
rename(ABSPATH . $old_images_directory . '/photo-gallery', ABSPATH . $images_directory . '/photo-gallery');
|
380 |
+
}
|
381 |
+
if (!is_dir(ABSPATH . $images_directory . '/photo-gallery')) {
|
382 |
+
mkdir(ABSPATH . $images_directory . '/photo-gallery', 0777);
|
383 |
+
}
|
384 |
+
echo WDWLibrary::message(__('Item Succesfully Saved.', 'bwg_back'), 'updated');
|
385 |
+
|
386 |
+
}
|
387 |
+
else {
|
388 |
+
echo WDWLibrary::message('Error. Please install plugin again.', 'error');
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
393 |
+
// Getters & Setters //
|
394 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
395 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
396 |
+
// Private Methods //
|
397 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
398 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
399 |
+
// Listeners //
|
400 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
401 |
}
|
admin/controllers/BWGControllerTags_bwg.php
CHANGED
@@ -1,301 +1,301 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerTags_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$task = WDWLibrary::get('task');
|
23 |
-
$id = WDWLibrary::get('current_id', 0);
|
24 |
-
|
25 |
-
if($task != ''){
|
26 |
-
if(!WDWLibrary::verify_nonce('tags_bwg')){
|
27 |
-
die('Sorry, your nonce did not verify.');
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
|
32 |
-
$message = WDWLibrary::get('message');
|
33 |
-
echo WDWLibrary::message_id($message);
|
34 |
-
if (method_exists($this, $task)) {
|
35 |
-
$this->$task($id);
|
36 |
-
}
|
37 |
-
else {
|
38 |
-
$this->display();
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
public function display() {
|
43 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelTags_bwg.php";
|
44 |
-
$model = new BWGModelTags_bwg();
|
45 |
-
|
46 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewTags_bwg.php";
|
47 |
-
$view = new BWGViewTags_bwg($model);
|
48 |
-
$view->display();
|
49 |
-
}
|
50 |
-
|
51 |
-
public function save() {
|
52 |
-
$message = $this->save_tag();
|
53 |
-
$page = WDWLibrary::get('page');
|
54 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
55 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
56 |
-
WDWLibrary::spider_redirect($query_url);
|
57 |
-
}
|
58 |
-
|
59 |
-
public function bwg_get_unique_slug($slug, $id) {
|
60 |
-
global $wpdb;
|
61 |
-
$slug = sanitize_title($slug);
|
62 |
-
if ($id != 0) {
|
63 |
-
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "terms WHERE slug = %s AND term_id != %d", $slug, $id);
|
64 |
-
}
|
65 |
-
else {
|
66 |
-
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "terms WHERE slug = %s", $slug);
|
67 |
-
}
|
68 |
-
if ($wpdb->get_var($query)) {
|
69 |
-
$num = 2;
|
70 |
-
do {
|
71 |
-
$alt_slug = $slug . "-$num";
|
72 |
-
$num++;
|
73 |
-
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "terms WHERE slug = %s", $alt_slug));
|
74 |
-
} while ($slug_check);
|
75 |
-
$slug = $alt_slug;
|
76 |
-
}
|
77 |
-
return $slug;
|
78 |
-
}
|
79 |
-
|
80 |
-
public function bwg_get_unique_name($name, $id) {
|
81 |
-
/*global $wpdb;
|
82 |
-
if ($id != 0) {
|
83 |
-
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "terms WHERE name = %s AND term_id != %d", $name, $id);
|
84 |
-
}
|
85 |
-
else {
|
86 |
-
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "terms WHERE name = %s", $name);
|
87 |
-
}
|
88 |
-
if ($wpdb->get_var($query)) {
|
89 |
-
$num = 2;
|
90 |
-
do {
|
91 |
-
$alt_name = $name . "-$num";
|
92 |
-
$num++;
|
93 |
-
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "terms WHERE name = %s", $alt_name));
|
94 |
-
} while ($slug_check);
|
95 |
-
$name = $alt_name;
|
96 |
-
}*/
|
97 |
-
return $name;
|
98 |
-
}
|
99 |
-
|
100 |
-
public function save_tag() {
|
101 |
-
$name = ((isset($_POST['tagname'])) ? esc_html(stripslashes($_POST['tagname'])) : '');
|
102 |
-
$name = $this->bwg_get_unique_name($name, 0);
|
103 |
-
$slug = ((isset($_POST['slug']) && (esc_html($_POST['slug']) != '')) ? esc_html(stripslashes($_POST['slug'])) : $name);
|
104 |
-
$slug = $this->bwg_get_unique_slug($slug, 0);
|
105 |
-
$slug = sanitize_title($slug);
|
106 |
-
if ($name) {
|
107 |
-
$save = wp_insert_term($name, 'bwg_tag', array(
|
108 |
-
'description'=> '',
|
109 |
-
'slug' => $slug,
|
110 |
-
'parent' => 0
|
111 |
-
)
|
112 |
-
);
|
113 |
-
if (isset($save->errors)) {
|
114 |
-
return 14;
|
115 |
-
}
|
116 |
-
else {
|
117 |
-
return 1;
|
118 |
-
}
|
119 |
-
}
|
120 |
-
else {
|
121 |
-
return 15;
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
function edit_tag() {
|
126 |
-
global $wpdb;
|
127 |
-
$flag = FALSE;
|
128 |
-
$id = ((isset($_REQUEST['tag_id'])) ? esc_html(stripslashes($_REQUEST['tag_id'])) : '');
|
129 |
-
$query = "SELECT count FROM " . $wpdb->prefix . "term_taxonomy WHERE term_id=" . $id;
|
130 |
-
$count = $wpdb->get_var($query);
|
131 |
-
$name = ((isset($_REQUEST['tagname'])) ? esc_html(stripslashes($_REQUEST['tagname'])) : '');
|
132 |
-
$name = $this->bwg_get_unique_name($name, $id);
|
133 |
-
if ($name) {
|
134 |
-
$slug = ((isset($_REQUEST['slug']) && (esc_html($_REQUEST['slug']) != '')) ? esc_html(stripslashes($_REQUEST['slug'])) : $name);
|
135 |
-
$slug = $this->bwg_get_unique_slug($slug, $id);
|
136 |
-
$save = wp_update_term($id, 'bwg_tag', array(
|
137 |
-
'name' => $name,
|
138 |
-
'slug' => $slug
|
139 |
-
));
|
140 |
-
|
141 |
-
/*update data in corresponding posts*/
|
142 |
-
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
143 |
-
$posts = $wpdb->get_results($query2, OBJECT);
|
144 |
-
foreach($posts as $post){
|
145 |
-
$post_content = $post->post_content;
|
146 |
-
if( strpos($post_content, ' type="tag" ') && strpos($post_content, ' gallery_id="'.$id.'" ') ){
|
147 |
-
$tag_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
|
148 |
-
wp_update_post( $tag_post );
|
149 |
-
}
|
150 |
-
}
|
151 |
-
|
152 |
-
if (isset($save->errors)) {
|
153 |
-
echo 'The slug must be unique.';
|
154 |
-
}
|
155 |
-
else {
|
156 |
-
$flag = TRUE;
|
157 |
-
}
|
158 |
-
}
|
159 |
-
if ($flag) {
|
160 |
-
echo $name . '.' . $slug . '.' . $count;
|
161 |
-
}
|
162 |
-
die();
|
163 |
-
}
|
164 |
-
|
165 |
-
public function edit_tags() {
|
166 |
-
global $wpdb;
|
167 |
-
$flag = FALSE;
|
168 |
-
$rows = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
|
169 |
-
$name = ((isset($_POST['tagname'])) ? esc_html(stripslashes($_POST['tagname'])) : '');
|
170 |
-
$name = $this->bwg_get_unique_name($name, 0);
|
171 |
-
$slug = ((isset($_POST['slug']) && (esc_html($_POST['slug']) != '')) ? esc_html(stripslashes($_POST['slug'])) : $name);
|
172 |
-
$slug = $this->bwg_get_unique_slug($slug, 0);
|
173 |
-
if ($name) {
|
174 |
-
$save = wp_insert_term($name, 'bwg_tag', array(
|
175 |
-
'description'=> '',
|
176 |
-
'slug' => $slug,
|
177 |
-
'parent' => 0
|
178 |
-
)
|
179 |
-
);
|
180 |
-
if (isset($save->errors)) {
|
181 |
-
$message = 15;
|
182 |
-
}
|
183 |
-
else {
|
184 |
-
$message = 1;
|
185 |
-
}
|
186 |
-
}
|
187 |
-
foreach ($rows as $row) {
|
188 |
-
$id = $row->term_id;
|
189 |
-
$name = ((isset($_POST['tagname' . $row->term_id])) ? esc_html(stripslashes($_POST['tagname' . $id])) : '');
|
190 |
-
$name = $this->bwg_get_unique_name($name, $id);
|
191 |
-
if ($name) {
|
192 |
-
$slug = ((isset($_POST['slug' . $row->term_id]) && (esc_html($_POST['slug' . $id]) != '')) ? esc_html(stripslashes($_POST['slug' . $id])) : $name);
|
193 |
-
$slug = $this->bwg_get_unique_slug($slug, $id);
|
194 |
-
$save = wp_update_term($id, 'bwg_tag', array(
|
195 |
-
'name' => $name,
|
196 |
-
'slug' => $slug
|
197 |
-
));
|
198 |
-
if (isset($save->errors)) {
|
199 |
-
$message = 16;
|
200 |
-
}
|
201 |
-
else {
|
202 |
-
$flag = TRUE;
|
203 |
-
}
|
204 |
-
|
205 |
-
/*update data in corresponding posts*/
|
206 |
-
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
207 |
-
$posts = $wpdb->get_results($query2, OBJECT);
|
208 |
-
foreach($posts as $post){
|
209 |
-
$post_content = $post->post_content;
|
210 |
-
if( strpos($post_content, ' type="tag" ') && strpos($post_content, ' gallery_id="'.$id.'" ') ){
|
211 |
-
$tag_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
|
212 |
-
wp_update_post( $tag_post );
|
213 |
-
}
|
214 |
-
}
|
215 |
-
|
216 |
-
}
|
217 |
-
}
|
218 |
-
if ($flag) {
|
219 |
-
$message = 1;
|
220 |
-
}
|
221 |
-
else {
|
222 |
-
$message = '';
|
223 |
-
}
|
224 |
-
$page = WDWLibrary::get('page');
|
225 |
-
|
226 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
227 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
228 |
-
WDWLibrary::spider_redirect($query_url);
|
229 |
-
}
|
230 |
-
|
231 |
-
public function delete($id) {
|
232 |
-
global $wpdb;
|
233 |
-
wp_delete_term($id, 'bwg_tag');
|
234 |
-
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $id);
|
235 |
-
$flag = $wpdb->query($query);
|
236 |
-
|
237 |
-
/* Delete corresponding posts and their meta.*/
|
238 |
-
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_tag'";
|
239 |
-
$posts = $wpdb->get_results($query2, OBJECT);
|
240 |
-
foreach ($posts as $post) {
|
241 |
-
$post_content = $post->post_content;
|
242 |
-
if (strpos($post_content, ' type="tag" ') && strpos($post_content, ' gallery_id="' . $id . '" ')) {
|
243 |
-
wp_delete_post($post->ID, TRUE);
|
244 |
-
}
|
245 |
-
}
|
246 |
-
if ($flag !== FALSE) {
|
247 |
-
$message = 3;
|
248 |
-
}
|
249 |
-
else {
|
250 |
-
$message = 2;
|
251 |
-
}
|
252 |
-
$page = WDWLibrary::get('page');
|
253 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
254 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
255 |
-
WDWLibrary::spider_redirect($query_url);
|
256 |
-
}
|
257 |
-
|
258 |
-
public function delete_all() {
|
259 |
-
global $wpdb;
|
260 |
-
$flag = FALSE;
|
261 |
-
$tag_ids_col = $wpdb->get_col("SELECT term_id FROM " . $wpdb->prefix . "terms");
|
262 |
-
foreach ($tag_ids_col as $tag_id) {
|
263 |
-
if (isset($_POST['check_' . $tag_id])) {
|
264 |
-
wp_delete_term($tag_id, 'bwg_tag');
|
265 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id));
|
266 |
-
$flag = TRUE;
|
267 |
-
}
|
268 |
-
}
|
269 |
-
|
270 |
-
/*delete corresponding posts and their meta*/
|
271 |
-
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
272 |
-
$posts = $wpdb->get_results($query2, OBJECT);
|
273 |
-
foreach($posts as $post){
|
274 |
-
$post_content = $post->post_content;
|
275 |
-
if( strpos($post_content, ' type="tag" ') ){
|
276 |
-
wp_delete_post( $post->ID, true );
|
277 |
-
}
|
278 |
-
}
|
279 |
-
|
280 |
-
if ($flag) {
|
281 |
-
$message = 5;
|
282 |
-
}
|
283 |
-
else {
|
284 |
-
$message = 6;
|
285 |
-
}
|
286 |
-
$page = WDWLibrary::get('page');
|
287 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
288 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
289 |
-
WDWLibrary::spider_redirect($query_url);
|
290 |
-
}
|
291 |
-
|
292 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
293 |
-
// Getters & Setters //
|
294 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
295 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
296 |
-
// Private Methods //
|
297 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
298 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
299 |
-
// Listeners //
|
300 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
301 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerTags_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$task = WDWLibrary::get('task');
|
23 |
+
$id = WDWLibrary::get('current_id', 0);
|
24 |
+
|
25 |
+
if($task != ''){
|
26 |
+
if(!WDWLibrary::verify_nonce('tags_bwg')){
|
27 |
+
die('Sorry, your nonce did not verify.');
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
$message = WDWLibrary::get('message');
|
33 |
+
echo WDWLibrary::message_id($message);
|
34 |
+
if (method_exists($this, $task)) {
|
35 |
+
$this->$task($id);
|
36 |
+
}
|
37 |
+
else {
|
38 |
+
$this->display();
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
public function display() {
|
43 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelTags_bwg.php";
|
44 |
+
$model = new BWGModelTags_bwg();
|
45 |
+
|
46 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewTags_bwg.php";
|
47 |
+
$view = new BWGViewTags_bwg($model);
|
48 |
+
$view->display();
|
49 |
+
}
|
50 |
+
|
51 |
+
public function save() {
|
52 |
+
$message = $this->save_tag();
|
53 |
+
$page = WDWLibrary::get('page');
|
54 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
55 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
56 |
+
WDWLibrary::spider_redirect($query_url);
|
57 |
+
}
|
58 |
+
|
59 |
+
public function bwg_get_unique_slug($slug, $id) {
|
60 |
+
global $wpdb;
|
61 |
+
$slug = sanitize_title($slug);
|
62 |
+
if ($id != 0) {
|
63 |
+
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "terms WHERE slug = %s AND term_id != %d", $slug, $id);
|
64 |
+
}
|
65 |
+
else {
|
66 |
+
$query = $wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "terms WHERE slug = %s", $slug);
|
67 |
+
}
|
68 |
+
if ($wpdb->get_var($query)) {
|
69 |
+
$num = 2;
|
70 |
+
do {
|
71 |
+
$alt_slug = $slug . "-$num";
|
72 |
+
$num++;
|
73 |
+
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT slug FROM " . $wpdb->prefix . "terms WHERE slug = %s", $alt_slug));
|
74 |
+
} while ($slug_check);
|
75 |
+
$slug = $alt_slug;
|
76 |
+
}
|
77 |
+
return $slug;
|
78 |
+
}
|
79 |
+
|
80 |
+
public function bwg_get_unique_name($name, $id) {
|
81 |
+
/*global $wpdb;
|
82 |
+
if ($id != 0) {
|
83 |
+
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "terms WHERE name = %s AND term_id != %d", $name, $id);
|
84 |
+
}
|
85 |
+
else {
|
86 |
+
$query = $wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "terms WHERE name = %s", $name);
|
87 |
+
}
|
88 |
+
if ($wpdb->get_var($query)) {
|
89 |
+
$num = 2;
|
90 |
+
do {
|
91 |
+
$alt_name = $name . "-$num";
|
92 |
+
$num++;
|
93 |
+
$slug_check = $wpdb->get_var($wpdb->prepare("SELECT name FROM " . $wpdb->prefix . "terms WHERE name = %s", $alt_name));
|
94 |
+
} while ($slug_check);
|
95 |
+
$name = $alt_name;
|
96 |
+
}*/
|
97 |
+
return $name;
|
98 |
+
}
|
99 |
+
|
100 |
+
public function save_tag() {
|
101 |
+
$name = ((isset($_POST['tagname'])) ? esc_html(stripslashes($_POST['tagname'])) : '');
|
102 |
+
$name = $this->bwg_get_unique_name($name, 0);
|
103 |
+
$slug = ((isset($_POST['slug']) && (esc_html($_POST['slug']) != '')) ? esc_html(stripslashes($_POST['slug'])) : $name);
|
104 |
+
$slug = $this->bwg_get_unique_slug($slug, 0);
|
105 |
+
$slug = sanitize_title($slug);
|
106 |
+
if ($name) {
|
107 |
+
$save = wp_insert_term($name, 'bwg_tag', array(
|
108 |
+
'description'=> '',
|
109 |
+
'slug' => $slug,
|
110 |
+
'parent' => 0
|
111 |
+
)
|
112 |
+
);
|
113 |
+
if (isset($save->errors)) {
|
114 |
+
return 14;
|
115 |
+
}
|
116 |
+
else {
|
117 |
+
return 1;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
else {
|
121 |
+
return 15;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
function edit_tag() {
|
126 |
+
global $wpdb;
|
127 |
+
$flag = FALSE;
|
128 |
+
$id = ((isset($_REQUEST['tag_id'])) ? esc_html(stripslashes($_REQUEST['tag_id'])) : '');
|
129 |
+
$query = "SELECT count FROM " . $wpdb->prefix . "term_taxonomy WHERE term_id=" . $id;
|
130 |
+
$count = $wpdb->get_var($query);
|
131 |
+
$name = ((isset($_REQUEST['tagname'])) ? esc_html(stripslashes($_REQUEST['tagname'])) : '');
|
132 |
+
$name = $this->bwg_get_unique_name($name, $id);
|
133 |
+
if ($name) {
|
134 |
+
$slug = ((isset($_REQUEST['slug']) && (esc_html($_REQUEST['slug']) != '')) ? esc_html(stripslashes($_REQUEST['slug'])) : $name);
|
135 |
+
$slug = $this->bwg_get_unique_slug($slug, $id);
|
136 |
+
$save = wp_update_term($id, 'bwg_tag', array(
|
137 |
+
'name' => $name,
|
138 |
+
'slug' => $slug
|
139 |
+
));
|
140 |
+
|
141 |
+
/*update data in corresponding posts*/
|
142 |
+
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
143 |
+
$posts = $wpdb->get_results($query2, OBJECT);
|
144 |
+
foreach($posts as $post){
|
145 |
+
$post_content = $post->post_content;
|
146 |
+
if( strpos($post_content, ' type="tag" ') && strpos($post_content, ' gallery_id="'.$id.'" ') ){
|
147 |
+
$tag_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
|
148 |
+
wp_update_post( $tag_post );
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
if (isset($save->errors)) {
|
153 |
+
echo 'The slug must be unique.';
|
154 |
+
}
|
155 |
+
else {
|
156 |
+
$flag = TRUE;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
if ($flag) {
|
160 |
+
echo $name . '.' . $slug . '.' . $count;
|
161 |
+
}
|
162 |
+
die();
|
163 |
+
}
|
164 |
+
|
165 |
+
public function edit_tags() {
|
166 |
+
global $wpdb;
|
167 |
+
$flag = FALSE;
|
168 |
+
$rows = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
|
169 |
+
$name = ((isset($_POST['tagname'])) ? esc_html(stripslashes($_POST['tagname'])) : '');
|
170 |
+
$name = $this->bwg_get_unique_name($name, 0);
|
171 |
+
$slug = ((isset($_POST['slug']) && (esc_html($_POST['slug']) != '')) ? esc_html(stripslashes($_POST['slug'])) : $name);
|
172 |
+
$slug = $this->bwg_get_unique_slug($slug, 0);
|
173 |
+
if ($name) {
|
174 |
+
$save = wp_insert_term($name, 'bwg_tag', array(
|
175 |
+
'description'=> '',
|
176 |
+
'slug' => $slug,
|
177 |
+
'parent' => 0
|
178 |
+
)
|
179 |
+
);
|
180 |
+
if (isset($save->errors)) {
|
181 |
+
$message = 15;
|
182 |
+
}
|
183 |
+
else {
|
184 |
+
$message = 1;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
foreach ($rows as $row) {
|
188 |
+
$id = $row->term_id;
|
189 |
+
$name = ((isset($_POST['tagname' . $row->term_id])) ? esc_html(stripslashes($_POST['tagname' . $id])) : '');
|
190 |
+
$name = $this->bwg_get_unique_name($name, $id);
|
191 |
+
if ($name) {
|
192 |
+
$slug = ((isset($_POST['slug' . $row->term_id]) && (esc_html($_POST['slug' . $id]) != '')) ? esc_html(stripslashes($_POST['slug' . $id])) : $name);
|
193 |
+
$slug = $this->bwg_get_unique_slug($slug, $id);
|
194 |
+
$save = wp_update_term($id, 'bwg_tag', array(
|
195 |
+
'name' => $name,
|
196 |
+
'slug' => $slug
|
197 |
+
));
|
198 |
+
if (isset($save->errors)) {
|
199 |
+
$message = 16;
|
200 |
+
}
|
201 |
+
else {
|
202 |
+
$flag = TRUE;
|
203 |
+
}
|
204 |
+
|
205 |
+
/*update data in corresponding posts*/
|
206 |
+
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
207 |
+
$posts = $wpdb->get_results($query2, OBJECT);
|
208 |
+
foreach($posts as $post){
|
209 |
+
$post_content = $post->post_content;
|
210 |
+
if( strpos($post_content, ' type="tag" ') && strpos($post_content, ' gallery_id="'.$id.'" ') ){
|
211 |
+
$tag_post = array('ID' => $post->ID, 'post_title' => $name, 'post_name' => $slug);
|
212 |
+
wp_update_post( $tag_post );
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
}
|
217 |
+
}
|
218 |
+
if ($flag) {
|
219 |
+
$message = 1;
|
220 |
+
}
|
221 |
+
else {
|
222 |
+
$message = '';
|
223 |
+
}
|
224 |
+
$page = WDWLibrary::get('page');
|
225 |
+
|
226 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
227 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
228 |
+
WDWLibrary::spider_redirect($query_url);
|
229 |
+
}
|
230 |
+
|
231 |
+
public function delete($id) {
|
232 |
+
global $wpdb;
|
233 |
+
wp_delete_term($id, 'bwg_tag');
|
234 |
+
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $id);
|
235 |
+
$flag = $wpdb->query($query);
|
236 |
+
|
237 |
+
/* Delete corresponding posts and their meta.*/
|
238 |
+
$query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_tag'";
|
239 |
+
$posts = $wpdb->get_results($query2, OBJECT);
|
240 |
+
foreach ($posts as $post) {
|
241 |
+
$post_content = $post->post_content;
|
242 |
+
if (strpos($post_content, ' type="tag" ') && strpos($post_content, ' gallery_id="' . $id . '" ')) {
|
243 |
+
wp_delete_post($post->ID, TRUE);
|
244 |
+
}
|
245 |
+
}
|
246 |
+
if ($flag !== FALSE) {
|
247 |
+
$message = 3;
|
248 |
+
}
|
249 |
+
else {
|
250 |
+
$message = 2;
|
251 |
+
}
|
252 |
+
$page = WDWLibrary::get('page');
|
253 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
254 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
255 |
+
WDWLibrary::spider_redirect($query_url);
|
256 |
+
}
|
257 |
+
|
258 |
+
public function delete_all() {
|
259 |
+
global $wpdb;
|
260 |
+
$flag = FALSE;
|
261 |
+
$tag_ids_col = $wpdb->get_col("SELECT term_id FROM " . $wpdb->prefix . "terms");
|
262 |
+
foreach ($tag_ids_col as $tag_id) {
|
263 |
+
if (isset($_POST['check_' . $tag_id])) {
|
264 |
+
wp_delete_term($tag_id, 'bwg_tag');
|
265 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id));
|
266 |
+
$flag = TRUE;
|
267 |
+
}
|
268 |
+
}
|
269 |
+
|
270 |
+
/*delete corresponding posts and their meta*/
|
271 |
+
$query2 = "SELECT ID, post_content FROM ".$wpdb->posts." WHERE post_type = 'bwg_tag' ";
|
272 |
+
$posts = $wpdb->get_results($query2, OBJECT);
|
273 |
+
foreach($posts as $post){
|
274 |
+
$post_content = $post->post_content;
|
275 |
+
if( strpos($post_content, ' type="tag" ') ){
|
276 |
+
wp_delete_post( $post->ID, true );
|
277 |
+
}
|
278 |
+
}
|
279 |
+
|
280 |
+
if ($flag) {
|
281 |
+
$message = 5;
|
282 |
+
}
|
283 |
+
else {
|
284 |
+
$message = 6;
|
285 |
+
}
|
286 |
+
$page = WDWLibrary::get('page');
|
287 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'tags_bwg', 'bwg_nonce' );
|
288 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
289 |
+
WDWLibrary::spider_redirect($query_url);
|
290 |
+
}
|
291 |
+
|
292 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
293 |
+
// Getters & Setters //
|
294 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
295 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
296 |
+
// Private Methods //
|
297 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
298 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
299 |
+
// Listeners //
|
300 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
301 |
}
|
admin/controllers/BWGControllerThemes_bwg.php
CHANGED
@@ -1,1100 +1,1100 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerThemes_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$task = WDWLibrary::get('task');
|
23 |
-
$id = WDWLibrary::get('current_id', 0);
|
24 |
-
$message = WDWLibrary::get('message');
|
25 |
-
|
26 |
-
if($task != ''){
|
27 |
-
if(!WDWLibrary::verify_nonce('themes_bwg')){
|
28 |
-
die('Sorry, your nonce did not verify.');
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
echo WDWLibrary::message_id($message);
|
33 |
-
if (method_exists($this, $task)) {
|
34 |
-
$this->$task($id);
|
35 |
-
}
|
36 |
-
else {
|
37 |
-
$this->display();
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
public function display() {
|
42 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
|
43 |
-
$model = new BWGModelThemes_bwg();
|
44 |
-
|
45 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
|
46 |
-
$view = new BWGViewThemes_bwg($model);
|
47 |
-
$view->display();
|
48 |
-
}
|
49 |
-
|
50 |
-
public function add() {
|
51 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
|
52 |
-
$model = new BWGModelThemes_bwg();
|
53 |
-
|
54 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
|
55 |
-
$view = new BWGViewThemes_bwg($model);
|
56 |
-
$view->edit(0, false);
|
57 |
-
}
|
58 |
-
|
59 |
-
public function edit() {
|
60 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
|
61 |
-
$model = new BWGModelThemes_bwg();
|
62 |
-
|
63 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
|
64 |
-
$view = new BWGViewThemes_bwg($model);
|
65 |
-
$id = WDWLibrary::get('current_id', 0);
|
66 |
-
$view->edit($id, false);
|
67 |
-
}
|
68 |
-
|
69 |
-
public function reset() {
|
70 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
|
71 |
-
$model = new BWGModelThemes_bwg();
|
72 |
-
|
73 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
|
74 |
-
$view = new BWGViewThemes_bwg($model);
|
75 |
-
$id = WDWLibrary::get('current_id', 0);
|
76 |
-
echo WDWLibrary::message('Changes must be saved.', 'error');
|
77 |
-
$view->edit($id, TRUE);
|
78 |
-
}
|
79 |
-
|
80 |
-
public function save() {
|
81 |
-
$message = $this->save_db();
|
82 |
-
$page = WDWLibrary::get('page');
|
83 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
84 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
85 |
-
WDWLibrary::spider_redirect($query_url);
|
86 |
-
}
|
87 |
-
|
88 |
-
public function apply() {
|
89 |
-
$message = $this->save_db();
|
90 |
-
global $wpdb;
|
91 |
-
$id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_theme');
|
92 |
-
$current_id = WDWLibrary::get('current_id', $id);
|
93 |
-
$page = WDWLibrary::get('page');
|
94 |
-
$current_type = WDWLibrary::get('current_type', 'Thumbnail');
|
95 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
96 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message, 'current_type' => $current_type), $query_url);
|
97 |
-
WDWLibrary::spider_redirect($query_url);
|
98 |
-
}
|
99 |
-
|
100 |
-
public function save_db() {
|
101 |
-
global $wpdb;
|
102 |
-
$id = (int) WDWLibrary::get('current_id', 0);
|
103 |
-
$name = (isset($_POST['name']) ? esc_html(stripslashes( $_POST['name'])) : 'exaple');
|
104 |
-
$thumb_margin = (isset($_POST['thumb_margin']) ? esc_html(stripslashes( $_POST['thumb_margin'])) : '');
|
105 |
-
$thumb_padding = (isset($_POST['thumb_padding']) ? esc_html(stripslashes( $_POST['thumb_padding'])) : '');
|
106 |
-
$thumb_border_radius = (isset($_POST['thumb_border_radius']) ? esc_html(stripslashes( $_POST['thumb_border_radius'])) :'');
|
107 |
-
$thumb_border_width = (isset($_POST['thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['thumb_border_width'])) : 1);
|
108 |
-
$thumb_border_style = (isset($_POST['thumb_border_style']) ? esc_html(stripslashes( $_POST['thumb_border_style'])) : 'solid');
|
109 |
-
$thumb_border_color = (isset($_POST['thumb_border_color']) ? esc_html(stripslashes( $_POST['thumb_border_color'])) : '000000');
|
110 |
-
$thumb_bg_color = (isset($_POST['thumb_bg_color']) ? esc_html(stripslashes( $_POST['thumb_bg_color'])) : 'FFFFFF');
|
111 |
-
$thumbs_bg_color = (isset($_POST['thumbs_bg_color']) ? esc_html(stripslashes( $_POST['thumbs_bg_color'])) : 'FFFFFF');
|
112 |
-
$thumb_bg_transparent = (isset($_POST['thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['thumb_bg_transparent'])) :0);
|
113 |
-
$thumb_box_shadow = (isset($_POST['thumb_box_shadow']) ? esc_html(stripslashes( $_POST['thumb_box_shadow'])) : '');
|
114 |
-
$thumb_transparent = (isset($_POST['thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['thumb_transparent'])) : 0);
|
115 |
-
$thumb_align = (isset($_POST['thumb_align']) ? esc_html(stripslashes( $_POST['thumb_align'])) : '');
|
116 |
-
$thumb_hover_effect = (isset($_POST['thumb_hover_effect']) ? esc_html(stripslashes( $_POST['thumb_hover_effect'])) : '');
|
117 |
-
$thumb_hover_effect_value = (isset($_POST['thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['thumb_hover_effect_value'])) : '');
|
118 |
-
$thumb_transition = (isset($_POST['thumb_transition']) ? (int) esc_html(stripslashes( $_POST['thumb_transition'])) : 0);
|
119 |
-
$thumb_title_margin = (isset($_POST['thumb_title_margin']) ? esc_html(stripslashes( $_POST['thumb_title_margin'])) : '');
|
120 |
-
$thumb_title_font_style = (isset($_POST['thumb_title_font_style']) ? esc_html(stripslashes( $_POST['thumb_title_font_style'])) : 'inherit');
|
121 |
-
$thumb_title_pos = (isset($_POST['thumb_title_pos']) ? esc_html(stripslashes( $_POST['thumb_title_pos'])) :'bottom');
|
122 |
-
$thumb_title_font_color = (isset($_POST['thumb_title_font_color']) ? esc_html(stripslashes( $_POST['thumb_title_font_color'])) : 'CCCCCC');
|
123 |
-
$thumb_title_shadow = (isset($_POST['thumb_title_shadow']) ? esc_html(stripslashes( $_POST['thumb_title_shadow'])) : '');
|
124 |
-
$thumb_title_font_size = (isset($_POST['thumb_title_font_size']) ? (int) esc_html(stripslashes( $_POST['thumb_title_font_size'])) : 12);
|
125 |
-
$thumb_title_font_weight = (isset($_POST['thumb_title_font_weight']) ? esc_html(stripslashes( $_POST['thumb_title_font_weight'])) : 'normal');
|
126 |
-
|
127 |
-
$page_nav_position = (isset($_POST['page_nav_position']) ? esc_html(stripslashes( $_POST['page_nav_position'])) : 'top');
|
128 |
-
$page_nav_align = (isset($_POST['page_nav_align']) ? esc_html(stripslashes( $_POST['page_nav_align'])) : 'center');
|
129 |
-
$page_nav_number = (isset($_POST['page_nav_number']) ? (int) esc_html(stripslashes( $_POST['page_nav_number'])) : 1);
|
130 |
-
$page_nav_font_size = (isset($_POST['page_nav_font_size']) ? (int) esc_html(stripslashes( $_POST['page_nav_font_size'])) : 13);
|
131 |
-
$page_nav_font_style = (isset($_POST['page_nav_font_style']) ? esc_html(stripslashes( $_POST['page_nav_font_style'])) : 'solid');
|
132 |
-
$page_nav_font_color = (isset($_POST['page_nav_font_color']) ? esc_html(stripslashes( $_POST['page_nav_font_color'])) : '000000');
|
133 |
-
$page_nav_font_weight = (isset($_POST['page_nav_font_weight']) ? esc_html(stripslashes( $_POST['page_nav_font_weight'])) : '');
|
134 |
-
$page_nav_border_width = (isset($_POST['page_nav_border_width']) ? (int) esc_html(stripslashes( $_POST['page_nav_border_width'])) : 1);
|
135 |
-
$page_nav_border_style = (isset($_POST['page_nav_border_style']) ? esc_html(stripslashes( $_POST['page_nav_border_style'])) : 'solid');
|
136 |
-
$page_nav_border_color = (isset($_POST['page_nav_border_color']) ? esc_html(stripslashes( $_POST['page_nav_border_color'])) : '');
|
137 |
-
$page_nav_border_radius = (isset($_POST['page_nav_border_radius']) ? esc_html(stripslashes( $_POST['page_nav_border_radius'])) : '');
|
138 |
-
$page_nav_margin = (isset($_POST['page_nav_margin']) ? esc_html(stripslashes( $_POST['page_nav_margin'])) : '');
|
139 |
-
$page_nav_padding = (isset($_POST['page_nav_padding']) ? esc_html(stripslashes( $_POST['page_nav_padding'])) : '');
|
140 |
-
$page_nav_button_bg_color = (isset($_POST['page_nav_button_bg_color']) ? esc_html(stripslashes( $_POST['page_nav_button_bg_color'])) : 'FFFFFF');
|
141 |
-
$page_nav_button_bg_transparent = (isset($_POST['page_nav_button_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['page_nav_button_bg_transparent'])) : 0);
|
142 |
-
$page_nav_box_shadow = (isset($_POST['page_nav_box_shadow']) ? esc_html(stripslashes( $_POST['page_nav_box_shadow'])) : '');
|
143 |
-
$page_nav_button_transition = (isset($_POST['page_nav_button_transition']) ? (int) esc_html(stripslashes( $_POST['page_nav_button_transition'])) : 0);
|
144 |
-
$page_nav_button_text = (isset($_POST['page_nav_button_text']) ? (int) esc_html(stripslashes( $_POST['page_nav_button_text'])) : 0);
|
145 |
-
$lightbox_ctrl_btn_pos = (isset($_POST['lightbox_ctrl_btn_pos']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_btn_pos'])) :'top');
|
146 |
-
$lightbox_ctrl_btn_align = (isset($_POST['lightbox_ctrl_btn_align']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_btn_align'])) : 'left');
|
147 |
-
$lightbox_ctrl_btn_height = (isset($_POST['lightbox_ctrl_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_height'])) : 1);
|
148 |
-
$lightbox_ctrl_btn_margin_top = (isset($_POST['lightbox_ctrl_btn_margin_top']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_margin_top'])) : 1);
|
149 |
-
$lightbox_ctrl_btn_margin_left = (isset($_POST['lightbox_ctrl_btn_margin_left']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_margin_left'])) : 0);
|
150 |
-
$lightbox_ctrl_btn_transparent = (isset($_POST['lightbox_ctrl_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_transparent'])) : 0);
|
151 |
-
$lightbox_ctrl_btn_color = (isset($_POST['lightbox_ctrl_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_btn_color'])) : '000000');
|
152 |
-
$lightbox_toggle_btn_height = (isset($_POST['lightbox_toggle_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_toggle_btn_height'])) : 1);
|
153 |
-
$lightbox_toggle_btn_width = (isset($_POST['lightbox_toggle_btn_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_toggle_btn_width'])) : 1);
|
154 |
-
$lightbox_ctrl_cont_bg_color = (isset($_POST['lightbox_ctrl_cont_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_cont_bg_color'])) : '000000');
|
155 |
-
$lightbox_ctrl_cont_border_radius = (isset($_POST['lightbox_ctrl_cont_border_radius']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_cont_border_radius'])) : 1);
|
156 |
-
$lightbox_ctrl_cont_transparent = (isset($_POST['lightbox_ctrl_cont_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_cont_transparent'])) : 1);
|
157 |
-
$lightbox_close_btn_bg_color = (isset($_POST['lightbox_close_btn_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_bg_color'])) : '000000');
|
158 |
-
$lightbox_close_btn_border_radius = (isset($_POST['lightbox_close_btn_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_border_radius'])) : '16px');
|
159 |
-
$lightbox_close_btn_border_width = (isset($_POST['lightbox_close_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_border_width'])) : 1);
|
160 |
-
$lightbox_close_btn_border_style = (isset($_POST['lightbox_close_btn_border_style']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_border_style'])) : 'solid');
|
161 |
-
$lightbox_close_btn_border_color = (isset($_POST['lightbox_close_btn_border_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_border_color'])) : '000000');
|
162 |
-
$lightbox_close_btn_box_shadow = (isset($_POST['lightbox_close_btn_box_shadow']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_box_shadow'])) : '');
|
163 |
-
$lightbox_close_btn_color = (isset($_POST['lightbox_close_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_color'])) : '000000');
|
164 |
-
$lightbox_close_btn_size = (isset($_POST['lightbox_close_btn_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_size'])) : 1);
|
165 |
-
$lightbox_close_btn_width = (isset($_POST['lightbox_close_btn_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_width'])) : 1);
|
166 |
-
$lightbox_close_btn_height = (isset($_POST['lightbox_close_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_height'])) : 1);
|
167 |
-
$lightbox_close_btn_top = (isset($_POST['lightbox_close_btn_top']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_top'])) : '');
|
168 |
-
$lightbox_close_btn_right = (isset($_POST['lightbox_close_btn_right']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_right'])) : '');
|
169 |
-
$lightbox_close_btn_full_color = (isset($_POST['lightbox_close_btn_full_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_full_color'])) : '000000');
|
170 |
-
$lightbox_close_btn_transparent = (isset($_POST['lightbox_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_transparent'])) : 1);
|
171 |
-
$lightbox_rl_btn_bg_color = (isset($_POST['lightbox_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_bg_color'])) : '000000');
|
172 |
-
$lightbox_rl_btn_transparent = (isset($_POST['lightbox_rl_btn_transparent']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_transparent'])) : 100);
|
173 |
-
$lightbox_rl_btn_border_radius = (isset($_POST['lightbox_rl_btn_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_border_radius'])) : '');
|
174 |
-
$lightbox_rl_btn_border_width = (isset($_POST['lightbox_rl_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_border_width'])) : 1);
|
175 |
-
$lightbox_rl_btn_border_style = (isset($_POST['lightbox_rl_btn_border_style']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_border_style'])) : 'solid');
|
176 |
-
$lightbox_rl_btn_border_color = (isset($_POST['lightbox_rl_btn_border_color']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_border_color'])) : '000000');
|
177 |
-
$lightbox_rl_btn_box_shadow = (isset($_POST['lightbox_rl_btn_box_shadow']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_box_shadow'])) : '');
|
178 |
-
$lightbox_rl_btn_color = (isset($_POST['lightbox_rl_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_color'])) : '000000');
|
179 |
-
$lightbox_rl_btn_height = (isset($_POST['lightbox_rl_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_height'])) : 1);
|
180 |
-
$lightbox_rl_btn_width = (isset($_POST['lightbox_rl_btn_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_width'])) : 1);
|
181 |
-
$lightbox_rl_btn_size = (isset($_POST['lightbox_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_size'])) : 1);
|
182 |
-
$lightbox_close_rl_btn_hover_color = (isset($_POST['lightbox_close_rl_btn_hover_color']) ? esc_html(stripslashes( $_POST['lightbox_close_rl_btn_hover_color'])) : '000000');
|
183 |
-
$lightbox_comment_pos = (isset($_POST['lightbox_comment_pos']) ? esc_html(stripslashes( $_POST['lightbox_comment_pos'])) : 'left');
|
184 |
-
$lightbox_comment_width = (isset($_POST['lightbox_comment_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_width'])) : 1);
|
185 |
-
$lightbox_comment_bg_color = (isset($_POST['lightbox_comment_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_bg_color'])) : '000000');
|
186 |
-
$lightbox_comment_font_color = (isset($_POST['lightbox_comment_font_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_font_color'])) : '000000');
|
187 |
-
$lightbox_comment_font_style = (isset($_POST['lightbox_comment_font_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_font_style'])) : '');
|
188 |
-
$lightbox_comment_font_size = (isset($_POST['lightbox_comment_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_font_size'])) : 1 );
|
189 |
-
$lightbox_comment_button_bg_color = (isset($_POST['lightbox_comment_button_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_bg_color'])) : '000000');
|
190 |
-
$lightbox_comment_button_border_color = (isset($_POST['lightbox_comment_button_border_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_border_color'])) : '000000');
|
191 |
-
$lightbox_comment_button_border_width = (isset($_POST['lightbox_comment_button_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_button_border_width'])) : 1);
|
192 |
-
$lightbox_comment_button_border_style = (isset($_POST['lightbox_comment_button_border_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_border_style'])) : 'solid');
|
193 |
-
$lightbox_comment_button_border_radius = (isset($_POST['lightbox_comment_button_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_border_radius'])) : '');
|
194 |
-
$lightbox_comment_button_padding = (isset($_POST['lightbox_comment_button_padding']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_padding'])) : '');
|
195 |
-
$lightbox_comment_input_bg_color = (isset($_POST['lightbox_comment_input_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_bg_color'])) : '000000');
|
196 |
-
$lightbox_comment_input_border_color = (isset($_POST['lightbox_comment_input_border_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_border_color'])) : '000000');
|
197 |
-
$lightbox_comment_input_border_width = (isset($_POST['lightbox_comment_input_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_input_border_width'])) : 1);
|
198 |
-
$lightbox_comment_input_border_style = (isset($_POST['lightbox_comment_input_border_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_border_style'])) : 'solid');
|
199 |
-
$lightbox_comment_input_border_radius = (isset($_POST['lightbox_comment_input_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_border_radius'])) : '');
|
200 |
-
$lightbox_comment_input_padding = (isset($_POST['lightbox_comment_input_padding']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_padding'])) : '');
|
201 |
-
$lightbox_comment_separator_width = (isset($_POST['lightbox_comment_separator_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_separator_width'])) : 1);
|
202 |
-
$lightbox_comment_separator_style = (isset($_POST['lightbox_comment_separator_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_separator_style'])) : 'solid');
|
203 |
-
$lightbox_comment_separator_color = (isset($_POST['lightbox_comment_separator_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_separator_color'])) : '000000');
|
204 |
-
$lightbox_comment_author_font_size = (isset($_POST['lightbox_comment_author_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_author_font_size'])) : 1);
|
205 |
-
$lightbox_comment_date_font_size = (isset($_POST['lightbox_comment_date_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_date_font_size'])) : 1);
|
206 |
-
$lightbox_comment_body_font_size = (isset($_POST['lightbox_comment_body_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_body_font_size'])) : 1);
|
207 |
-
$lightbox_comment_share_button_color = (isset($_POST['lightbox_comment_share_button_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_share_button_color'])) : '000000');
|
208 |
-
$lightbox_filmstrip_rl_bg_color = (isset($_POST['lightbox_filmstrip_rl_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_rl_bg_color'])) : '000000');
|
209 |
-
$lightbox_filmstrip_rl_btn_size = (isset($_POST['lightbox_filmstrip_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_rl_btn_size'])) : 1);
|
210 |
-
$lightbox_filmstrip_rl_btn_color = (isset($_POST['lightbox_filmstrip_rl_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_rl_btn_color'])) : '000000');
|
211 |
-
$lightbox_filmstrip_thumb_margin = (isset($_POST['lightbox_filmstrip_thumb_margin']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_margin'])) : '');
|
212 |
-
$lightbox_filmstrip_thumb_border_width = (isset($_POST['lightbox_filmstrip_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_width'])) : 1);
|
213 |
-
$lightbox_filmstrip_thumb_border_style = (isset($_POST['lightbox_filmstrip_thumb_border_style']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_style'])) : 'solid');
|
214 |
-
$lightbox_filmstrip_thumb_border_color = (isset($_POST['lightbox_filmstrip_thumb_border_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_color'])) : '000000');
|
215 |
-
$lightbox_filmstrip_thumb_border_radius = (isset($_POST['lightbox_filmstrip_thumb_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_radius'])) : '');
|
216 |
-
$lightbox_filmstrip_thumb_deactive_transparent = (isset($_POST['lightbox_filmstrip_thumb_deactive_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_deactive_transparent'])) : 1);
|
217 |
-
$lightbox_filmstrip_pos = (isset($_POST['lightbox_filmstrip_pos']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_pos'])) : 'top');
|
218 |
-
$lightbox_filmstrip_thumb_active_border_width = (isset($_POST['lightbox_filmstrip_thumb_active_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_active_border_width'])) : 1);
|
219 |
-
$lightbox_filmstrip_thumb_active_border_color = (isset($_POST['lightbox_filmstrip_thumb_active_border_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_active_border_color'])) : '000000');
|
220 |
-
$lightbox_overlay_bg_transparent = (isset($_POST['lightbox_overlay_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_overlay_bg_transparent'])) : 80);
|
221 |
-
$lightbox_bg_color = (isset($_POST['lightbox_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_bg_color'])) : '000000');
|
222 |
-
$lightbox_overlay_bg_color = (isset($_POST['lightbox_overlay_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_overlay_bg_color'])) : '000000');
|
223 |
-
$lightbox_rl_btn_style = (isset($_POST['lightbox_rl_btn_style']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_style'])) : 'fa-chevron');
|
224 |
-
$lightbox_bg_transparent = (isset($_POST['lightbox_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_bg_transparent'])) : 100);
|
225 |
-
|
226 |
-
$blog_style_margin = (isset($_POST['blog_style_margin']) ? esc_html(stripslashes( $_POST['blog_style_margin'])) : '');
|
227 |
-
$blog_style_padding = (isset($_POST['blog_style_padding']) ? esc_html(stripslashes( $_POST['blog_style_padding'])) : '');
|
228 |
-
$blog_style_border_radius = (isset($_POST['blog_style_border_radius']) ? esc_html(stripslashes( $_POST['blog_style_border_radius'])) :'');
|
229 |
-
$blog_style_border_width = (isset($_POST['blog_style_border_width']) ? (int) esc_html(stripslashes( $_POST['blog_style_border_width'])) : 1);
|
230 |
-
$blog_style_border_style = (isset($_POST['blog_style_border_style']) ? esc_html(stripslashes( $_POST['blog_style_border_style'])) : 'solid');
|
231 |
-
$blog_style_border_color = (isset($_POST['blog_style_border_color']) ? esc_html(stripslashes( $_POST['blog_style_border_color'])) : '000000');
|
232 |
-
$blog_style_bg_color = (isset($_POST['blog_style_bg_color']) ? esc_html(stripslashes( $_POST['blog_style_bg_color'])) : 'FFFFFF');
|
233 |
-
$blog_style_box_shadow = (isset($_POST['blog_style_box_shadow']) ? esc_html(stripslashes( $_POST['blog_style_box_shadow'])) : '');
|
234 |
-
$blog_style_transparent = (isset($_POST['blog_style_transparent']) ? (int) esc_html(stripslashes( $_POST['blog_style_transparent'])) : 0);
|
235 |
-
$blog_style_align = (isset($_POST['blog_style_align']) ? esc_html(stripslashes( $_POST['blog_style_align'])) : '');
|
236 |
-
$blog_style_share_buttons_margin = (isset($_POST['blog_style_share_buttons_margin']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_margin'])) : '');
|
237 |
-
$blog_style_share_buttons_border_radius = (isset($_POST['blog_style_share_buttons_border_radius']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_border_radius'])) :'');
|
238 |
-
$blog_style_share_buttons_border_width = (isset($_POST['blog_style_share_buttons_border_width']) ? (int) esc_html(stripslashes( $_POST['blog_style_share_buttons_border_width'])) : 1);
|
239 |
-
$blog_style_share_buttons_border_style = (isset($_POST['blog_style_share_buttons_border_style']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_border_style'])) : 'solid');
|
240 |
-
$blog_style_share_buttons_border_color = (isset($_POST['blog_style_share_buttons_border_color']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_border_color'])) : '000000');
|
241 |
-
$blog_style_share_buttons_bg_color = (isset($_POST['blog_style_share_buttons_bg_color']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_bg_color'])) : 'FFFFFF');
|
242 |
-
$blog_style_share_buttons_align = (isset($_POST['blog_style_share_buttons_align']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_align'])) : '');
|
243 |
-
$blog_style_img_font_size = (isset($_POST['blog_style_img_font_size']) ? (int) esc_html(stripslashes( $_POST['blog_style_img_font_size'])) : 1);
|
244 |
-
$blog_style_img_font_family = (isset($_POST['blog_style_img_font_family']) ? esc_html(stripslashes( $_POST['blog_style_img_font_family'])) : 'cursive');
|
245 |
-
$blog_style_img_font_color = (isset($_POST['blog_style_img_font_color']) ? esc_html(stripslashes( $_POST['blog_style_img_font_color'])) : '000000');
|
246 |
-
$blog_style_share_buttons_font_size = (isset($_POST['blog_style_share_buttons_font_size']) ? (int) esc_html(stripslashes( $_POST['blog_style_share_buttons_font_size'])) : 20);
|
247 |
-
$blog_style_share_buttons_color = (isset($_POST['blog_style_share_buttons_color']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_color'])) : 'C7C3C3');
|
248 |
-
$blog_style_share_buttons_bg_transparent = (isset($_POST['blog_style_share_buttons_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['blog_style_share_buttons_bg_transparent'])) : 0);
|
249 |
-
|
250 |
-
$image_browser_margin = (isset($_POST['image_browser_margin']) ? esc_html(stripslashes( $_POST['image_browser_margin'])) : '');
|
251 |
-
$image_browser_padding = (isset($_POST['image_browser_padding']) ? esc_html(stripslashes( $_POST['image_browser_padding'])) : '');
|
252 |
-
$image_browser_border_radius = (isset($_POST['image_browser_border_radius']) ? esc_html(stripslashes( $_POST['image_browser_border_radius'])) :'');
|
253 |
-
$image_browser_border_width = (isset($_POST['image_browser_border_width']) ? (int) esc_html(stripslashes( $_POST['image_browser_border_width'])) : 1);
|
254 |
-
$image_browser_border_style = (isset($_POST['image_browser_border_style']) ? esc_html(stripslashes( $_POST['image_browser_border_style'])) : 'solid');
|
255 |
-
$image_browser_border_color = (isset($_POST['image_browser_border_color']) ? esc_html(stripslashes( $_POST['image_browser_border_color'])) : '000000');
|
256 |
-
$image_browser_bg_color = (isset($_POST['image_browser_bg_color']) ? esc_html(stripslashes( $_POST['image_browser_bg_color'])) : 'FFFFFF');
|
257 |
-
$image_browser_box_shadow = (isset($_POST['image_browser_box_shadow']) ? esc_html(stripslashes( $_POST['image_browser_box_shadow'])) : '');
|
258 |
-
$image_browser_transparent = (isset($_POST['image_browser_transparent']) ? (int) esc_html(stripslashes( $_POST['image_browser_transparent'])) : 0);
|
259 |
-
$image_browser_align = (isset($_POST['image_browser_align']) ? esc_html(stripslashes( $_POST['image_browser_align'])) : '');
|
260 |
-
$image_browser_image_description_margin = (isset($_POST['image_browser_image_description_margin']) ? esc_html(stripslashes( $_POST['image_browser_image_description_margin'])) : '');
|
261 |
-
$image_browser_image_description_padding = (isset($_POST['image_browser_image_description_padding']) ? esc_html(stripslashes( $_POST['image_browser_image_description_padding'])) : '');
|
262 |
-
$image_browser_image_description_border_radius = (isset($_POST['image_browser_image_description_border_radius']) ? esc_html(stripslashes( $_POST['image_browser_image_description_border_radius'])) :'');
|
263 |
-
$image_browser_image_description_border_width = (isset($_POST['image_browser_image_description_border_width']) ? (int) esc_html(stripslashes( $_POST['image_browser_image_description_border_width'])) : 1);
|
264 |
-
$image_browser_image_description_border_style = (isset($_POST['image_browser_image_description_border_style']) ? esc_html(stripslashes( $_POST['image_browser_image_description_border_style'])) : 'solid');
|
265 |
-
$image_browser_image_description_border_color = (isset($_POST['image_browser_image_description_border_color']) ? esc_html(stripslashes( $_POST['image_browser_image_description_border_color'])) : '000000');
|
266 |
-
$image_browser_image_description_bg_color = (isset($_POST['image_browser_image_description_bg_color']) ? esc_html(stripslashes( $_POST['image_browser_image_description_bg_color'])) : 'FFFFFF');
|
267 |
-
$image_browser_image_description_align = (isset($_POST['image_browser_image_description_align']) ? esc_html(stripslashes( $_POST['image_browser_image_description_align'])) : '');
|
268 |
-
$image_browser_img_font_size = (isset($_POST['image_browser_img_font_size']) ? (int) esc_html(stripslashes( $_POST['image_browser_img_font_size'])) : 1);
|
269 |
-
$image_browser_img_font_family = (isset($_POST['image_browser_img_font_family']) ? esc_html(stripslashes( $_POST['image_browser_img_font_family'])) : 'cursive');
|
270 |
-
$image_browser_img_font_color = (isset($_POST['image_browser_img_font_color']) ? esc_html(stripslashes( $_POST['image_browser_img_font_color'])) : '000000');
|
271 |
-
$image_browser_full_padding = (isset($_POST['image_browser_full_padding']) ? esc_html(stripslashes( $_POST['image_browser_full_padding'])) : '');
|
272 |
-
$image_browser_full_border_radius = (isset($_POST['image_browser_full_border_radius']) ? esc_html(stripslashes( $_POST['image_browser_full_border_radius'])) :'');
|
273 |
-
$image_browser_full_border_width = (isset($_POST['image_browser_full_border_width']) ? (int) esc_html(stripslashes( $_POST['image_browser_full_border_width'])) : 1);
|
274 |
-
$image_browser_full_border_style = (isset($_POST['image_browser_full_border_style']) ? esc_html(stripslashes( $_POST['image_browser_full_border_style'])) : 'solid');
|
275 |
-
$image_browser_full_border_color = (isset($_POST['image_browser_full_border_color']) ? esc_html(stripslashes( $_POST['image_browser_full_border_color'])) : '000000');
|
276 |
-
$image_browser_full_bg_color = (isset($_POST['image_browser_full_bg_color']) ? esc_html(stripslashes( $_POST['image_browser_full_bg_color'])) : 'FFFFFF');
|
277 |
-
$image_browser_full_transparent = (isset($_POST['image_browser_full_transparent']) ? (int) esc_html(stripslashes( $_POST['image_browser_full_transparent'])) : 0);
|
278 |
-
|
279 |
-
$album_compact_title_margin = (isset($_POST['album_compact_title_margin']) ? esc_html(stripslashes( $_POST['album_compact_title_margin'])) : '');
|
280 |
-
$album_compact_title_font_style = (isset($_POST['album_compact_title_font_style']) ? esc_html(stripslashes( $_POST['album_compact_title_font_style'])) : 'inherit');
|
281 |
-
$album_compact_thumb_title_pos = (isset($_POST['album_compact_thumb_title_pos']) ? esc_html(stripslashes( $_POST['album_compact_thumb_title_pos'])) :'bottom');
|
282 |
-
$album_compact_title_font_color = (isset($_POST['album_compact_title_font_color']) ? esc_html(stripslashes( $_POST['album_compact_title_font_color'])) : 'CCCCCC');
|
283 |
-
$album_compact_title_shadow = (isset($_POST['album_compact_title_shadow']) ? esc_html(stripslashes( $_POST['album_compact_title_shadow'])) : '');
|
284 |
-
$album_compact_title_font_size = (isset($_POST['album_compact_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_compact_title_font_size'])) : 12);
|
285 |
-
$album_compact_title_font_weight = (isset($_POST['album_compact_title_font_weight']) ? esc_html(stripslashes( $_POST['album_compact_title_font_weight'])) : 'normal');
|
286 |
-
$album_compact_thumb_margin = (isset($_POST['album_compact_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_margin'])) : 0);
|
287 |
-
$album_compact_back_padding = (isset($_POST['album_compact_back_padding']) ? esc_html(stripslashes( $_POST['album_compact_back_padding'])) : '');
|
288 |
-
$album_compact_thumb_padding = (isset($_POST['album_compact_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_padding'])) : 0);
|
289 |
-
$album_compact_thumb_border_radius = (isset($_POST['album_compact_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_compact_thumb_border_radius'])) :'');
|
290 |
-
$album_compact_thumb_border_width = (isset($_POST['album_compact_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_border_width'])) : 1);
|
291 |
-
$album_compact_back_font_color = (isset($_POST['album_compact_back_font_color']) ? esc_html(stripslashes( $_POST['album_compact_back_font_color'])) : '000000');
|
292 |
-
$album_compact_thumb_bg_transparent = (isset($_POST['album_compact_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_bg_transparent'])) : 0);
|
293 |
-
$album_compact_thumb_box_shadow = (isset($_POST['album_compact_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_compact_thumb_box_shadow'])) : '');
|
294 |
-
$album_compact_thumb_transition = (isset($_POST['album_compact_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_transition'])) : 1);
|
295 |
-
$album_compact_thumb_border_style = (isset($_POST['album_compact_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_compact_thumb_border_style'])) : 'solid');
|
296 |
-
$album_compact_thumb_border_color = (isset($_POST['album_compact_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_compact_thumb_border_color'])) : '000000');
|
297 |
-
$album_compact_thumb_bg_color = (isset($_POST['album_compact_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_compact_thumb_bg_color'])) : 'FFFFFF');
|
298 |
-
$album_compact_back_font_weight = (isset($_POST['album_compact_back_font_weight']) ? esc_html(stripslashes( $_POST['album_compact_back_font_weight'])) : 'normal');
|
299 |
-
$album_compact_back_font_size = (isset($_POST['album_compact_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_compact_back_font_size'])) : 12);
|
300 |
-
$album_compact_back_font_style = (isset($_POST['album_compact_back_font_style']) ? esc_html(stripslashes( $_POST['album_compact_back_font_style'])) : 'inherit');
|
301 |
-
$album_compact_thumbs_bg_color = (isset($_POST['album_compact_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_compact_thumbs_bg_color'])) : 'FFFFFF');
|
302 |
-
$album_compact_thumb_align = (isset($_POST['album_compact_thumb_align']) ? esc_html(stripslashes( $_POST['album_compact_thumb_align'])) : 'center');
|
303 |
-
$album_compact_thumb_hover_effect = (isset($_POST['album_compact_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_compact_thumb_hover_effect'])) :'skew');
|
304 |
-
$album_compact_thumb_transparent = (isset($_POST['album_compact_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_transparent'])) : 80);
|
305 |
-
$album_compact_thumb_hover_effect_value = (isset($_POST['album_compact_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_compact_thumb_hover_effect_value'])) : '35deg');
|
306 |
-
$album_extended_thumb_margin = (isset($_POST['album_extended_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_margin'])) : 0);
|
307 |
-
$album_extended_thumb_padding = (isset($_POST['album_extended_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_padding'])) : 0);
|
308 |
-
$album_extended_thumb_border_radius = (isset($_POST['album_extended_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_thumb_border_radius'])) : '');
|
309 |
-
$album_extended_thumb_border_width = (isset($_POST['album_extended_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_border_width'])) :1);
|
310 |
-
$album_extended_thumb_border_style = (isset($_POST['album_extended_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_extended_thumb_border_style'])) :'solid');
|
311 |
-
$album_extended_thumb_border_color = (isset($_POST['album_extended_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_border_color'])) : '000000');
|
312 |
-
$album_extended_thumb_bg_color = (isset($_POST['album_extended_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_bg_color'])) : 'FFFFFF');
|
313 |
-
$album_extended_thumbs_bg_color = (isset($_POST['album_extended_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_thumbs_bg_color'])) : 'FFFFFF');
|
314 |
-
$album_extended_thumb_bg_transparent = (isset($_POST['album_extended_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_bg_transparent'])) : 80);
|
315 |
-
$album_extended_thumb_box_shadow = (isset($_POST['album_extended_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_extended_thumb_box_shadow'])) : '');
|
316 |
-
$album_extended_thumb_transparent = (isset($_POST['album_extended_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_transparent'])) : 80);
|
317 |
-
$album_extended_thumb_align = (isset($_POST['album_extended_thumb_align']) ? esc_html(stripslashes( $_POST['album_extended_thumb_align'])) : 'center');
|
318 |
-
$album_extended_thumb_hover_effect = (isset($_POST['album_extended_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_extended_thumb_hover_effect'])) : '');
|
319 |
-
$album_extended_thumb_hover_effect_value = (isset($_POST['album_extended_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_extended_thumb_hover_effect_value'])) : '32deg');
|
320 |
-
$album_extended_thumb_transition = (isset($_POST['album_extended_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_transition'])) : 0);
|
321 |
-
$album_extended_back_font_color = (isset($_POST['album_extended_back_font_color']) ? esc_html(stripslashes( $_POST['album_extended_back_font_color'])) : '000000');
|
322 |
-
$album_extended_back_font_style = (isset($_POST['album_extended_back_font_style']) ? esc_html(stripslashes( $_POST['album_extended_back_font_style'])) : 'inherit');
|
323 |
-
$album_extended_back_font_size = (isset($_POST['album_extended_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_back_font_size'])) : 12);
|
324 |
-
$album_extended_back_font_weight = (isset($_POST['album_extended_back_font_weight']) ? esc_html(stripslashes( $_POST['album_extended_back_font_weight'])) : 'normal');
|
325 |
-
$album_extended_back_padding = (isset($_POST['album_extended_back_padding']) ? esc_html(stripslashes( $_POST['album_extended_back_padding'])) : '');
|
326 |
-
$album_extended_div_bg_color = (isset($_POST['album_extended_div_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_div_bg_color'])) : 'FFFFFF');
|
327 |
-
$album_extended_div_bg_transparent = (isset($_POST['album_extended_div_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_extended_div_bg_transparent'])) : 80);
|
328 |
-
$album_extended_div_border_radius = (isset($_POST['album_extended_div_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_div_border_radius'])) : '');
|
329 |
-
$album_extended_div_margin = (isset($_POST['album_extended_div_margin']) ? esc_html(stripslashes( $_POST['album_extended_div_margin'])) : '');
|
330 |
-
$album_extended_div_padding = (isset($_POST['album_extended_div_padding']) ? (int) esc_html(stripslashes( $_POST['album_extended_div_padding'])) : 0);
|
331 |
-
$album_extended_div_separator_width = (isset($_POST['album_extended_div_separator_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_div_separator_width'])) : 1);
|
332 |
-
$album_extended_div_separator_style = (isset($_POST['album_extended_div_separator_style']) ? esc_html(stripslashes( $_POST['album_extended_div_separator_style'])) : 'solid');
|
333 |
-
$album_extended_div_separator_color = (isset($_POST['album_extended_div_separator_color']) ? esc_html(stripslashes( $_POST['album_extended_div_separator_color'])) : '000000');
|
334 |
-
$album_extended_thumb_div_bg_color = (isset($_POST['album_extended_thumb_div_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_bg_color'])) : 'FFFFFF');
|
335 |
-
$album_extended_thumb_div_border_radius = (isset($_POST['album_extended_thumb_div_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_border_radius'])) : '');
|
336 |
-
$album_extended_thumb_div_border_width = (isset($_POST['album_extended_thumb_div_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_div_border_width'])) : 1);
|
337 |
-
$album_extended_thumb_div_border_style = (isset($_POST['album_extended_thumb_div_border_style']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_border_style'])) : 'solid');
|
338 |
-
$album_extended_thumb_div_border_color = (isset($_POST['album_extended_thumb_div_border_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_border_color'])) : '000000');
|
339 |
-
$album_extended_thumb_div_padding = (isset($_POST['album_extended_thumb_div_padding']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_padding'])) : '');
|
340 |
-
$album_extended_text_div_bg_color = (isset($_POST['album_extended_text_div_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_text_div_bg_color'])) : 'FFFFFF');
|
341 |
-
$album_extended_text_div_border_radius = (isset($_POST['album_extended_text_div_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_text_div_border_radius'])) : '');
|
342 |
-
$album_extended_text_div_border_width = (isset($_POST['album_extended_text_div_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_text_div_border_width'])) : 1);
|
343 |
-
$album_extended_text_div_border_style = (isset($_POST['album_extended_text_div_border_style']) ? esc_html(stripslashes( $_POST['album_extended_text_div_border_style'])) : 'solid');
|
344 |
-
$album_extended_text_div_border_color = (isset($_POST['album_extended_text_div_border_color']) ? esc_html(stripslashes( $_POST['album_extended_text_div_border_color'])) : '000000');
|
345 |
-
$album_extended_text_div_padding = (isset($_POST['album_extended_text_div_padding']) ? esc_html(stripslashes( $_POST['album_extended_text_div_padding'])) : '');
|
346 |
-
$album_extended_title_span_border_width = (isset($_POST['album_extended_title_span_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_title_span_border_width'])) : 1);
|
347 |
-
$album_extended_title_span_border_style = (isset($_POST['album_extended_title_span_border_style']) ? esc_html(stripslashes( $_POST['album_extended_title_span_border_style'])) : 'solid');
|
348 |
-
$album_extended_title_span_border_color = (isset($_POST['album_extended_title_span_border_color']) ? esc_html(stripslashes( $_POST['album_extended_title_span_border_color'])) : '000000');
|
349 |
-
$album_extended_title_font_color = (isset($_POST['album_extended_title_font_color']) ? esc_html(stripslashes( $_POST['album_extended_title_font_color'])) : '000000');
|
350 |
-
$album_extended_title_font_style = (isset($_POST['album_extended_title_font_style']) ? esc_html(stripslashes( $_POST['album_extended_title_font_style'])) : 'inherit');
|
351 |
-
$album_extended_title_font_size = (isset($_POST['album_extended_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_title_font_size'])) : 12);
|
352 |
-
$album_extended_title_font_weight = (isset($_POST['album_extended_title_font_weight']) ? esc_html(stripslashes( $_POST['album_extended_title_font_weight'])) : 'normal');
|
353 |
-
$album_extended_title_margin_bottom = (isset($_POST['album_extended_title_margin_bottom']) ? (int) esc_html(stripslashes( $_POST['album_extended_title_margin_bottom'])) : 0);
|
354 |
-
$album_extended_title_padding = (isset($_POST['album_extended_title_padding']) ? esc_html(stripslashes( $_POST['album_extended_title_padding'])) : '');
|
355 |
-
$album_extended_desc_span_border_width = (isset($_POST['album_extended_desc_span_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_span_border_width'])) : 1);
|
356 |
-
$album_extended_desc_span_border_style = (isset($_POST['album_extended_desc_span_border_style']) ? esc_html(stripslashes( $_POST['album_extended_desc_span_border_style'])) : 'solid');
|
357 |
-
$album_extended_desc_span_border_color = (isset($_POST['album_extended_desc_span_border_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_span_border_color'])) : '000000');
|
358 |
-
$album_extended_desc_font_color = (isset($_POST['album_extended_desc_font_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_font_color'])) : '000000');
|
359 |
-
$album_extended_desc_font_style = (isset($_POST['album_extended_desc_font_style']) ? esc_html(stripslashes( $_POST['album_extended_desc_font_style'])) : 'inherit');
|
360 |
-
$album_extended_desc_font_size = (isset($_POST['album_extended_desc_font_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_font_size'])) : 12);
|
361 |
-
$album_extended_desc_font_weight = (isset($_POST['album_extended_desc_font_weight']) ? esc_html(stripslashes( $_POST['album_extended_desc_font_weight'])) : 'normal');
|
362 |
-
$album_extended_desc_padding = (isset($_POST['album_extended_desc_padding']) ? esc_html(stripslashes( $_POST['album_extended_desc_padding'])) : '');
|
363 |
-
$album_extended_desc_more_color = (isset($_POST['album_extended_desc_more_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_more_color'])) : '000000');
|
364 |
-
$album_extended_desc_more_size = (isset($_POST['album_extended_desc_more_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_more_size'])) : 12);
|
365 |
-
|
366 |
-
$album_masonry_title_margin = (isset($_POST['album_masonry_title_margin']) ? esc_html(stripslashes( $_POST['album_masonry_title_margin'])) : '');
|
367 |
-
$album_masonry_title_font_style = (isset($_POST['album_masonry_title_font_style']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_style'])) : 'inherit');
|
368 |
-
$album_masonry_thumb_title_pos = (isset($_POST['album_masonry_thumb_title_pos']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_title_pos'])) :'bottom');
|
369 |
-
$album_masonry_title_font_color = (isset($_POST['album_masonry_title_font_color']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_color'])) : 'CCCCCC');
|
370 |
-
$album_masonry_title_shadow = (isset($_POST['album_masonry_title_shadow']) ? esc_html(stripslashes( $_POST['album_masonry_title_shadow'])) : '');
|
371 |
-
$album_masonry_title_font_size = (isset($_POST['album_masonry_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_masonry_title_font_size'])) : 12);
|
372 |
-
$album_masonry_title_font_weight = (isset($_POST['album_masonry_title_font_weight']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_weight'])) : 'normal');
|
373 |
-
$album_masonry_thumb_margin = (isset($_POST['album_masonry_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_margin'])) : 0);
|
374 |
-
$album_masonry_back_padding = (isset($_POST['album_masonry_back_padding']) ? esc_html(stripslashes( $_POST['album_masonry_back_padding'])) : '');
|
375 |
-
$album_masonry_thumb_padding = (isset($_POST['album_masonry_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_padding'])) : 0);
|
376 |
-
$album_masonry_thumb_border_radius = (isset($_POST['album_masonry_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_radius'])) :'');
|
377 |
-
$album_masonry_thumb_border_width = (isset($_POST['album_masonry_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_border_width'])) : 1);
|
378 |
-
$album_masonry_back_font_color = (isset($_POST['album_masonry_back_font_color']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_color'])) : '000000');
|
379 |
-
$album_masonry_thumb_bg_transparent = (isset($_POST['album_masonry_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_bg_transparent'])) : 0);
|
380 |
-
$album_masonry_thumb_box_shadow = (isset($_POST['album_masonry_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_box_shadow'])) : '');
|
381 |
-
$album_masonry_thumb_transition = (isset($_POST['album_masonry_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_transition'])) : 1);
|
382 |
-
$album_masonry_thumb_border_style = (isset($_POST['album_masonry_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_style'])) : 'solid');
|
383 |
-
$album_masonry_thumb_border_color = (isset($_POST['album_masonry_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_color'])) : '000000');
|
384 |
-
$album_masonry_thumb_bg_color = (isset($_POST['album_masonry_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_bg_color'])) : 'FFFFFF');
|
385 |
-
$album_masonry_back_font_weight = (isset($_POST['album_masonry_back_font_weight']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_weight'])) : 'normal');
|
386 |
-
$album_masonry_back_font_size = (isset($_POST['album_masonry_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_masonry_back_font_size'])) : 12);
|
387 |
-
$album_masonry_back_font_style = (isset($_POST['album_masonry_back_font_style']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_style'])) : 'inherit');
|
388 |
-
$album_masonry_thumbs_bg_color = (isset($_POST['album_masonry_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumbs_bg_color'])) : 'FFFFFF');
|
389 |
-
$album_masonry_thumb_align = (isset($_POST['album_masonry_thumb_align']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_align'])) : 'center');
|
390 |
-
$album_masonry_thumb_hover_effect = (isset($_POST['album_masonry_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_hover_effect'])) :'skew');
|
391 |
-
$album_masonry_thumb_transparent = (isset($_POST['album_masonry_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_transparent'])) : 80);
|
392 |
-
$album_masonry_thumb_hover_effect_value = (isset($_POST['album_masonry_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_hover_effect_value'])) : '35deg');
|
393 |
-
|
394 |
-
$slideshow_cont_bg_color = (isset($_POST['slideshow_cont_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_cont_bg_color'])) : 'FFFFFF');
|
395 |
-
$slideshow_close_btn_transparent = (isset($_POST['slideshow_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['slideshow_close_btn_transparent'])) : 80);
|
396 |
-
$slideshow_rl_btn_bg_color = (isset($_POST['slideshow_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_bg_color'])) : 'FFFFFF');
|
397 |
-
$slideshow_rl_btn_border_radius = (isset($_POST['slideshow_rl_btn_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_border_radius'])) : '');
|
398 |
-
$slideshow_rl_btn_border_width = (isset($_POST['slideshow_rl_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_border_width'])) : 1);
|
399 |
-
$slideshow_rl_btn_border_style = (isset($_POST['slideshow_rl_btn_border_style']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_border_style'])) : 'solid');
|
400 |
-
$slideshow_rl_btn_border_color = (isset($_POST['slideshow_rl_btn_border_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_border_color'])) : '000000');
|
401 |
-
$slideshow_rl_btn_box_shadow = (isset($_POST['slideshow_rl_btn_box_shadow']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_box_shadow'])) : '');
|
402 |
-
$slideshow_rl_btn_color = (isset($_POST['slideshow_rl_btn_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_color'])) : '000000');
|
403 |
-
$slideshow_rl_btn_height = (isset($_POST['slideshow_rl_btn_height']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_height'])) : 10);
|
404 |
-
$slideshow_rl_btn_size = (isset($_POST['slideshow_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_size'])) : 13);
|
405 |
-
$slideshow_rl_btn_width = (isset($_POST['slideshow_rl_btn_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_width'])) : 30);
|
406 |
-
$slideshow_close_rl_btn_hover_color = (isset($_POST['slideshow_close_rl_btn_hover_color']) ? esc_html(stripslashes( $_POST['slideshow_close_rl_btn_hover_color'])) : 'FFFFFF');
|
407 |
-
$slideshow_filmstrip_pos = (isset($_POST['slideshow_filmstrip_pos']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_pos'])) : 'top');
|
408 |
-
$slideshow_filmstrip_thumb_border_width = (isset($_POST['slideshow_filmstrip_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_width'])) : 1);
|
409 |
-
$slideshow_filmstrip_thumb_border_style = (isset($_POST['slideshow_filmstrip_thumb_border_style']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_style'])) : 'solid');
|
410 |
-
$slideshow_filmstrip_thumb_border_color = (isset($_POST['slideshow_filmstrip_thumb_border_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_color'])) : '000000');
|
411 |
-
$slideshow_filmstrip_thumb_border_radius = (isset($_POST['slideshow_filmstrip_thumb_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_radius'])) : '');
|
412 |
-
$slideshow_filmstrip_thumb_margin = (isset($_POST['slideshow_filmstrip_thumb_margin']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_margin'])) : '');
|
413 |
-
$slideshow_filmstrip_thumb_active_border_width = (isset($_POST['slideshow_filmstrip_thumb_active_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_active_border_width'])) : 1);
|
414 |
-
$slideshow_filmstrip_thumb_active_border_color = (isset($_POST['slideshow_filmstrip_thumb_active_border_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_active_border_color'])) : '000000');
|
415 |
-
$slideshow_filmstrip_thumb_deactive_transparent = (isset($_POST['slideshow_filmstrip_thumb_deactive_transparent']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_deactive_transparent'])) : 80);
|
416 |
-
$slideshow_filmstrip_rl_bg_color = (isset($_POST['slideshow_filmstrip_rl_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_rl_bg_color'])) : 'FFFFFF');
|
417 |
-
$slideshow_filmstrip_rl_btn_color = (isset($_POST['slideshow_filmstrip_rl_btn_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_rl_btn_color'])) : 'FFFFFF');
|
418 |
-
$slideshow_filmstrip_rl_btn_size = (isset($_POST['slideshow_filmstrip_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_rl_btn_size'])) : 15);
|
419 |
-
$slideshow_title_font_size = (isset($_POST['slideshow_title_font_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_title_font_size'])) : 15);
|
420 |
-
$slideshow_title_font = (isset($_POST['slideshow_title_font']) ? esc_html(stripslashes( $_POST['slideshow_title_font'])) : 'cursive');
|
421 |
-
$slideshow_title_color = (isset($_POST['slideshow_title_color']) ? esc_html(stripslashes( $_POST['slideshow_title_color'])) : '000000');
|
422 |
-
$slideshow_title_opacity = (isset($_POST['slideshow_title_opacity']) ? (int) esc_html(stripslashes( $_POST['slideshow_title_opacity'])) : 80);
|
423 |
-
$slideshow_title_border_radius = (isset($_POST['slideshow_title_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_title_border_radius'])) : '');
|
424 |
-
$slideshow_title_background_color = (isset($_POST['slideshow_title_background_color']) ? esc_html(stripslashes( $_POST['slideshow_title_background_color'])) : 'FFFFFF');
|
425 |
-
$slideshow_title_padding = (isset($_POST['slideshow_title_padding']) ? esc_html(stripslashes( $_POST['slideshow_title_padding'])) : '');
|
426 |
-
$slideshow_description_font_size = (isset($_POST['slideshow_description_font_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_description_font_size'])) : 15);
|
427 |
-
$slideshow_description_font = (isset($_POST['slideshow_description_font']) ? esc_html(stripslashes( $_POST['slideshow_description_font'])) : 'cursive');
|
428 |
-
$slideshow_description_color = (isset($_POST['slideshow_description_color']) ? esc_html(stripslashes( $_POST['slideshow_description_color'])) : '000000');
|
429 |
-
$slideshow_description_opacity = (isset($_POST['slideshow_description_opacity']) ? (int) esc_html(stripslashes( $_POST['slideshow_description_opacity'])) : 80);
|
430 |
-
$slideshow_description_border_radius = (isset($_POST['slideshow_description_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_description_border_radius'])) : '');
|
431 |
-
$slideshow_description_background_color = (isset($_POST['slideshow_description_background_color']) ? esc_html(stripslashes( $_POST['slideshow_description_background_color'])) : 'FFFFFF');
|
432 |
-
$slideshow_description_padding = (isset($_POST['slideshow_description_padding']) ? esc_html(stripslashes( $_POST['slideshow_description_padding'])) : '');
|
433 |
-
$slideshow_dots_width = (isset($_POST['slideshow_dots_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_width'])) : 5);
|
434 |
-
$slideshow_dots_height = (isset($_POST['slideshow_dots_height']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_height'])) : 5);
|
435 |
-
$slideshow_dots_border_radius = (isset($_POST['slideshow_dots_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_dots_border_radius'])) : '');
|
436 |
-
$slideshow_dots_background_color = (isset($_POST['slideshow_dots_background_color']) ? esc_html(stripslashes( $_POST['slideshow_dots_background_color'])) : 'FFFFFF');
|
437 |
-
$slideshow_dots_margin = (isset($_POST['slideshow_dots_margin']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_margin'])) : 0);
|
438 |
-
$slideshow_dots_active_background_color = (isset($_POST['slideshow_dots_active_background_color']) ? esc_html(stripslashes( $_POST['slideshow_dots_active_background_color'])) : 'FFFFFF');
|
439 |
-
$slideshow_dots_active_border_width = (isset($_POST['slideshow_dots_active_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_active_border_width'])) : 1);
|
440 |
-
$slideshow_dots_active_border_color = (isset($_POST['slideshow_dots_active_border_color']) ? esc_html(stripslashes( $_POST['slideshow_dots_active_border_color'])) : '000000');
|
441 |
-
$slideshow_play_pause_btn_size = (isset($_POST['slideshow_play_pause_btn_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_play_pause_btn_size'])) : 15);
|
442 |
-
$slideshow_rl_btn_style = (isset($_POST['slideshow_rl_btn_style']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_style'])) : 'fa-chevron');
|
443 |
-
|
444 |
-
$masonry_thumb_padding = (isset($_POST['masonry_thumb_padding']) ? esc_html(stripslashes( $_POST['masonry_thumb_padding'])) : 4);
|
445 |
-
$masonry_thumb_border_radius = (isset($_POST['masonry_thumb_border_radius']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_radius'])) : '2px');
|
446 |
-
$masonry_thumb_border_width = (isset($_POST['masonry_thumb_border_width']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_width'])) : 1);
|
447 |
-
$masonry_thumb_border_style = (isset($_POST['masonry_thumb_border_style']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_style'])) : 'solid');
|
448 |
-
$masonry_thumb_border_color = (isset($_POST['masonry_thumb_border_color']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_color'])) : 'CCCCCC');
|
449 |
-
$masonry_thumbs_bg_color = (isset($_POST['masonry_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['masonry_thumbs_bg_color'])) : 'FFFFFF');
|
450 |
-
$masonry_thumb_bg_transparent = (isset($_POST['masonry_thumb_bg_transparent']) ? esc_html(stripslashes( $_POST['masonry_thumb_bg_transparent'])) : 0);
|
451 |
-
$masonry_thumb_transparent = (isset($_POST['masonry_thumb_transparent']) ? esc_html(stripslashes( $_POST['masonry_thumb_transparent'])) : 100);
|
452 |
-
$masonry_thumb_align = (isset($_POST['masonry_thumb_align']) ? esc_html(stripslashes( $_POST['masonry_thumb_align'])) : 'left');
|
453 |
-
$masonry_thumb_hover_effect = (isset($_POST['masonry_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['masonry_thumb_hover_effect'])) : 'scale');
|
454 |
-
$masonry_thumb_hover_effect_value = (isset($_POST['masonry_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['masonry_thumb_hover_effect_value'])) : '1.3');
|
455 |
-
$masonry_thumb_transition = (isset($_POST['masonry_thumb_transition']) ? esc_html(stripslashes( $_POST['masonry_thumb_transition'])) : 0);
|
456 |
-
|
457 |
-
$mosaic_thumb_padding = (isset($_POST['mosaic_thumb_padding']) ? esc_html(stripslashes( $_POST['mosaic_thumb_padding'])) : 4);
|
458 |
-
$mosaic_thumb_border_radius = (isset($_POST['mosaic_thumb_border_radius']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_radius'])) : '2px');
|
459 |
-
$mosaic_thumb_border_width = (isset($_POST['mosaic_thumb_border_width']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_width'])) : 1);
|
460 |
-
$mosaic_thumb_border_style = (isset($_POST['mosaic_thumb_border_style']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_style'])) : 'solid');
|
461 |
-
$mosaic_thumb_border_color = (isset($_POST['mosaic_thumb_border_color']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_color'])) : 'CCCCCC');
|
462 |
-
$mosaic_thumbs_bg_color = (isset($_POST['mosaic_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['mosaic_thumbs_bg_color'])) : 'FFFFFF');
|
463 |
-
$mosaic_thumb_bg_transparent = (isset($_POST['mosaic_thumb_bg_transparent']) ? esc_html(stripslashes( $_POST['mosaic_thumb_bg_transparent'])) : 0);
|
464 |
-
$mosaic_thumb_transparent = (isset($_POST['mosaic_thumb_transparent']) ? esc_html(stripslashes( $_POST['mosaic_thumb_transparent'])) : 100);
|
465 |
-
$mosaic_thumb_align = (isset($_POST['mosaic_thumb_align']) ? esc_html(stripslashes( $_POST['mosaic_thumb_align'])) : 'left');
|
466 |
-
$mosaic_thumb_hover_effect = (isset($_POST['mosaic_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['mosaic_thumb_hover_effect'])) : 'scale');
|
467 |
-
$mosaic_thumb_hover_effect_value = (isset($_POST['mosaic_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['mosaic_thumb_hover_effect_value'])) : '1.3');
|
468 |
-
$mosaic_thumb_title_margin = (isset($_POST['mosaic_thumb_title_margin']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_margin'])) : '');
|
469 |
-
$mosaic_thumb_title_font_style = (isset($_POST['mosaic_thumb_title_font_style']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_style'])) : 'inherit');
|
470 |
-
$mosaic_thumb_title_font_color = (isset($_POST['mosaic_thumb_title_font_color']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_color'])) : 'CCCCCC');
|
471 |
-
$mosaic_thumb_title_shadow = (isset($_POST['mosaic_thumb_title_shadow']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_shadow'])) : '');
|
472 |
-
$mosaic_thumb_title_font_size = (isset($_POST['mosaic_thumb_title_font_size']) ? (int) esc_html(stripslashes( $_POST['mosaic_thumb_title_font_size'])) : 12);
|
473 |
-
$mosaic_thumb_title_font_weight = (isset($_POST['mosaic_thumb_title_font_weight']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_weight'])) : 'normal');
|
474 |
-
$lightbox_info_pos = (isset($_POST['lightbox_info_pos']) ? esc_html(stripslashes( $_POST['lightbox_info_pos'])) : 'top');
|
475 |
-
$lightbox_info_align = (isset($_POST['lightbox_info_align']) ? esc_html(stripslashes( $_POST['lightbox_info_align'])) : 'right');
|
476 |
-
$lightbox_info_bg_color = (isset($_POST['lightbox_info_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_info_bg_color'])) : '000000');
|
477 |
-
$lightbox_info_bg_transparent = (isset($_POST['lightbox_info_bg_transparent']) ? esc_html(stripslashes( $_POST['lightbox_info_bg_transparent'])) : 70);
|
478 |
-
$lightbox_info_border_width = (isset($_POST['lightbox_info_border_width']) ? esc_html(stripslashes( $_POST['lightbox_info_border_width'])) : 1);
|
479 |
-
$lightbox_info_border_style = (isset($_POST['lightbox_info_border_style']) ? esc_html(stripslashes( $_POST['lightbox_info_border_style'])) : 'none');
|
480 |
-
$lightbox_info_border_color = (isset($_POST['lightbox_info_border_color']) ? esc_html(stripslashes( $_POST['lightbox_info_border_color'])) : '000000');
|
481 |
-
$lightbox_info_border_radius = (isset($_POST['lightbox_info_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_info_border_radius'])) : 5);
|
482 |
-
$lightbox_info_padding = (isset($_POST['lightbox_info_padding']) ? esc_html(stripslashes( $_POST['lightbox_info_padding'])) : '5px');
|
483 |
-
$lightbox_info_margin = (isset($_POST['lightbox_info_margin']) ? esc_html(stripslashes( $_POST['lightbox_info_margin'])) : '15px');
|
484 |
-
$lightbox_title_color = (isset($_POST['lightbox_title_color']) ? esc_html(stripslashes( $_POST['lightbox_title_color'])) : 'FFFFFF');
|
485 |
-
$lightbox_title_font_style = (isset($_POST['lightbox_title_font_style']) ? esc_html(stripslashes( $_POST['lightbox_title_font_style'])) : 'segoe ui');
|
486 |
-
$lightbox_title_font_weight = (isset($_POST['lightbox_title_font_weight']) ? esc_html(stripslashes( $_POST['lightbox_title_font_weight'])) : 'bold');
|
487 |
-
$lightbox_title_font_size = (isset($_POST['lightbox_title_font_size']) ? esc_html(stripslashes( $_POST['lightbox_title_font_size'])) : 18);
|
488 |
-
$lightbox_description_color = (isset($_POST['lightbox_description_color']) ? esc_html(stripslashes( $_POST['lightbox_description_color'])) : 'FFFFFF');
|
489 |
-
$lightbox_description_font_style = (isset($_POST['lightbox_description_font_style']) ? esc_html(stripslashes( $_POST['lightbox_description_font_style'])) : 'segoe ui');
|
490 |
-
$lightbox_description_font_weight = (isset($_POST['lightbox_description_font_weight']) ? esc_html(stripslashes( $_POST['lightbox_description_font_weight'])) : 'normal');
|
491 |
-
$lightbox_description_font_size = (isset($_POST['lightbox_description_font_size']) ? esc_html(stripslashes( $_POST['lightbox_description_font_size'])) : 14);
|
492 |
-
$lightbox_rate_pos = (isset($_POST['lightbox_rate_pos']) ? esc_html(stripslashes( $_POST['lightbox_rate_pos'])) : 'bottom');
|
493 |
-
$lightbox_rate_align = (isset($_POST['lightbox_rate_align']) ? esc_html(stripslashes( $_POST['lightbox_rate_align'])) : 'right');
|
494 |
-
$lightbox_rate_icon = (isset($_POST['lightbox_rate_icon']) ? esc_html(stripslashes( $_POST['lightbox_rate_icon'])) : 'star');
|
495 |
-
$lightbox_rate_color = (isset($_POST['lightbox_rate_color']) ? esc_html(stripslashes( $_POST['lightbox_rate_color'])) : 'F9D062');
|
496 |
-
$lightbox_rate_size = (isset($_POST['lightbox_rate_size']) ? esc_html(stripslashes( $_POST['lightbox_rate_size'])) : 20);
|
497 |
-
$lightbox_rate_stars_count = (isset($_POST['lightbox_rate_stars_count']) ? esc_html(stripslashes( $_POST['lightbox_rate_stars_count'])) : 5);
|
498 |
-
$lightbox_rate_padding = (isset($_POST['lightbox_rate_padding']) ? esc_html(stripslashes( $_POST['lightbox_rate_padding'])) : '15px');
|
499 |
-
$lightbox_rate_hover_color = (isset($_POST['lightbox_rate_hover_color']) ? esc_html(stripslashes( $_POST['lightbox_rate_hover_color'])) : 'F7B50E');
|
500 |
-
|
501 |
-
$lightbox_hit_pos = (isset($_POST['lightbox_hit_pos']) ? esc_html(stripslashes( $_POST['lightbox_hit_pos'])) : 'bottom');
|
502 |
-
$lightbox_hit_align = (isset($_POST['lightbox_hit_align']) ? esc_html(stripslashes( $_POST['lightbox_hit_align'])) : 'left');
|
503 |
-
$lightbox_hit_bg_color = (isset($_POST['lightbox_hit_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_hit_bg_color'])) : '000000');
|
504 |
-
$lightbox_hit_bg_transparent = (isset($_POST['lightbox_hit_bg_transparent']) ? esc_html(stripslashes( $_POST['lightbox_hit_bg_transparent'])) : 70);
|
505 |
-
$lightbox_hit_border_width = (isset($_POST['lightbox_hit_border_width']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_width'])) : 1);
|
506 |
-
$lightbox_hit_border_style = (isset($_POST['lightbox_hit_border_style']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_style'])) : 'none');
|
507 |
-
$lightbox_hit_border_color = (isset($_POST['lightbox_hit_border_color']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_color'])) : '000000');
|
508 |
-
$lightbox_hit_border_radius = (isset($_POST['lightbox_hit_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_radius'])) : 5);
|
509 |
-
$lightbox_hit_padding = (isset($_POST['lightbox_hit_padding']) ? esc_html(stripslashes( $_POST['lightbox_hit_padding'])) : '5px');
|
510 |
-
$lightbox_hit_margin = (isset($_POST['lightbox_hit_margin']) ? esc_html(stripslashes( $_POST['lightbox_hit_margin'])) : '0 5px');
|
511 |
-
$lightbox_hit_color = (isset($_POST['lightbox_hit_color']) ? esc_html(stripslashes( $_POST['lightbox_hit_color'])) : 'FFFFFF');
|
512 |
-
$lightbox_hit_font_style = (isset($_POST['lightbox_hit_font_style']) ? esc_html(stripslashes( $_POST['lightbox_hit_font_style'])) : 'segoe ui');
|
513 |
-
$lightbox_hit_font_weight = (isset($_POST['lightbox_hit_font_weight']) ? esc_html(stripslashes( $_POST['lightbox_hit_font_weight'])) : 'normal');
|
514 |
-
$lightbox_hit_font_size = (isset($_POST['lightbox_hit_font_size']) ? esc_html(stripslashes( $_POST['lightbox_hit_font_size'])) : 14);
|
515 |
-
$masonry_description_font_size = (isset($_POST['masonry_description_font_size']) ? (int) esc_html(stripslashes( $_POST['masonry_description_font_size'])) : 12);
|
516 |
-
$masonry_description_color = (isset($_POST['masonry_description_color']) ? esc_html(stripslashes( $_POST['masonry_description_color'])) : 'CCCCCC');
|
517 |
-
$masonry_description_font_style = (isset($_POST['masonry_description_font_style']) ? esc_html(stripslashes( $_POST['masonry_description_font_style'])) : 'segoe ui');
|
518 |
-
//carousel
|
519 |
-
$carousel_cont_bg_color = (isset($_POST['carousel_cont_bg_color']) ? esc_html(stripslashes( $_POST['carousel_cont_bg_color'])) : 'FFFFFF');
|
520 |
-
$carousel_cont_btn_transparent = (isset($_POST['carousel_cont_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['carousel_cont_btn_transparent'])) : 0);
|
521 |
-
$carousel_close_btn_transparent = (isset($_POST['carousel_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['carousel_close_btn_transparent'])) : 80);
|
522 |
-
$carousel_rl_btn_bg_color = (isset($_POST['carousel_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_bg_color'])) : 'CCCCCC');
|
523 |
-
$carousel_rl_btn_border_radius = (isset($_POST['carousel_rl_btn_border_radius']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_border_radius'])) : '');
|
524 |
-
$carousel_rl_btn_border_width = (isset($_POST['carousel_rl_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_border_width'])) : 1);
|
525 |
-
$carousel_rl_btn_border_style = (isset($_POST['carousel_rl_btn_border_style']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_border_style'])) : 'solid');
|
526 |
-
$carousel_rl_btn_border_color = (isset($_POST['carousel_rl_btn_border_color']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_border_color'])) : '000000');
|
527 |
-
$carousel_rl_btn_color = (isset($_POST['carousel_rl_btn_color']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_color'])) : 'FFFFFF');
|
528 |
-
$carousel_rl_btn_height = (isset($_POST['carousel_rl_btn_height']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_height'])) : 10);
|
529 |
-
$carousel_rl_btn_size = (isset($_POST['carousel_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_size'])) : 20);
|
530 |
-
$carousel_play_pause_btn_size = (isset($_POST['carousel_play_pause_btn_size']) ? (int) esc_html(stripslashes( $_POST['carousel_play_pause_btn_size'])) : 20);
|
531 |
-
$carousel_rl_btn_width = (isset($_POST['carousel_rl_btn_width']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_width'])) : 30);
|
532 |
-
$carousel_close_rl_btn_hover_color = (isset($_POST['carousel_close_rl_btn_hover_color']) ? esc_html(stripslashes( $_POST['carousel_close_rl_btn_hover_color'])) : 'FFFFFF');
|
533 |
-
$carousel_rl_btn_style = (isset($_POST['carousel_rl_btn_style']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_style'])) : 'fa-chevron');
|
534 |
-
$carousel_mergin_bottom = (isset($_POST['carousel_mergin_bottom']) ? esc_html(stripslashes( $_POST['carousel_mergin_bottom'])) : '1');
|
535 |
-
$carousel_font_family = (isset($_POST['carousel_font_family']) ? esc_html(stripslashes( $_POST['carousel_font_family'])) : 'Arial');
|
536 |
-
$carousel_feature_border_width = (isset($_POST['carousel_feature_border_width']) ? (int) esc_html(stripslashes( $_POST['carousel_feature_border_width'])) : 2);
|
537 |
-
$carousel_feature_border_style = (isset($_POST['carousel_feature_border_style']) ? esc_html(stripslashes( $_POST['carousel_feature_border_style'])) : 'solid');
|
538 |
-
$carousel_feature_border_color = (isset($_POST['carousel_feature_border_color']) ? esc_html(stripslashes( $_POST['carousel_feature_border_color'])) : '5D204F');
|
539 |
-
$carousel_caption_background_color = (isset($_POST['carousel_caption_background_color']) ? esc_html(stripslashes( $_POST['carousel_caption_background_color'])) : '000000');
|
540 |
-
$carousel_caption_bottom = (isset($_POST['carousel_caption_bottom']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_bottom'])) : 0);
|
541 |
-
$carousel_caption_p_mergin = (isset($_POST['carousel_caption_p_mergin']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_p_mergin'])) : 0);
|
542 |
-
$carousel_caption_p_pedding = (isset($_POST['carousel_caption_p_pedding']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_p_pedding'])) : 5);
|
543 |
-
$carousel_caption_p_font_weight = (isset($_POST['carousel_caption_p_font_weight']) ? esc_html(stripslashes( $_POST['carousel_caption_p_font_weight'])) : 'bold');
|
544 |
-
$carousel_caption_p_font_size = (isset($_POST['carousel_caption_p_font_size']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_p_font_size'])) : 14);
|
545 |
-
$carousel_caption_p_color = (isset($_POST['carousel_caption_p_color']) ? esc_html(stripslashes( $_POST['carousel_caption_p_color'])) : '000000');
|
546 |
-
$carousel_title_opacity = (isset($_POST['carousel_title_opacity']) ? (int) esc_html(stripslashes( $_POST['carousel_title_opacity'])) : 100);
|
547 |
-
$carousel_title_border_radius = (isset($_POST['carousel_title_border_radius']) ? esc_html(stripslashes( $_POST['carousel_title_border_radius'])) : '5px');
|
548 |
-
$mosaic_thumb_transition = (isset($_POST['mosaic_thumb_transition']) ? esc_html(stripslashes( $_POST['mosaic_thumb_transition'])) : 1);
|
549 |
-
|
550 |
-
$default_theme = (isset($_POST['default_theme']) ? esc_html(stripslashes( $_POST['default_theme'])) : 0);
|
551 |
-
$themes = array(
|
552 |
-
'thumb_margin' => $thumb_margin,
|
553 |
-
'thumb_padding' => $thumb_padding,
|
554 |
-
'thumb_border_radius' => $thumb_border_radius,
|
555 |
-
'thumb_border_width' => $thumb_border_width,
|
556 |
-
'thumb_border_style' => $thumb_border_style,
|
557 |
-
'thumb_border_color' => $thumb_border_color,
|
558 |
-
'thumb_bg_color' => $thumb_bg_color,
|
559 |
-
'thumbs_bg_color' => $thumbs_bg_color,
|
560 |
-
'thumb_bg_transparent' => $thumb_bg_transparent,
|
561 |
-
'thumb_box_shadow' => $thumb_box_shadow,
|
562 |
-
'thumb_transparent' => $thumb_transparent,
|
563 |
-
'thumb_align' => $thumb_align,
|
564 |
-
'thumb_hover_effect' => $thumb_hover_effect,
|
565 |
-
'thumb_hover_effect_value' => $thumb_hover_effect_value,
|
566 |
-
'thumb_transition' => $thumb_transition,
|
567 |
-
'thumb_title_margin' => $thumb_title_margin,
|
568 |
-
'thumb_title_font_style' => $thumb_title_font_style,
|
569 |
-
'thumb_title_pos' => $thumb_title_pos,
|
570 |
-
'thumb_title_font_color' => $thumb_title_font_color,
|
571 |
-
'thumb_title_shadow' => $thumb_title_shadow,
|
572 |
-
'thumb_title_font_size' => $thumb_title_font_size,
|
573 |
-
'thumb_title_font_weight' => $thumb_title_font_weight,
|
574 |
-
|
575 |
-
'page_nav_position' => $page_nav_position,
|
576 |
-
'page_nav_align' => $page_nav_align,
|
577 |
-
'page_nav_number' => $page_nav_number,
|
578 |
-
'page_nav_font_size' => $page_nav_font_size,
|
579 |
-
'page_nav_font_style' => $page_nav_font_style,
|
580 |
-
'page_nav_font_color' => $page_nav_font_color,
|
581 |
-
'page_nav_font_weight' => $page_nav_font_weight,
|
582 |
-
'page_nav_border_width' => $page_nav_border_width,
|
583 |
-
'page_nav_border_style'=> $page_nav_border_style,
|
584 |
-
'page_nav_border_color' => $page_nav_border_color,
|
585 |
-
'page_nav_border_radius' => $page_nav_border_radius,
|
586 |
-
'page_nav_margin' => $page_nav_margin,
|
587 |
-
'page_nav_padding' => $page_nav_padding,
|
588 |
-
'page_nav_button_bg_color' => $page_nav_button_bg_color,
|
589 |
-
'page_nav_button_bg_transparent' => $page_nav_button_bg_transparent,
|
590 |
-
'page_nav_box_shadow' => $page_nav_box_shadow,
|
591 |
-
'page_nav_button_transition' => $page_nav_button_transition,
|
592 |
-
'page_nav_button_text' => $page_nav_button_text,
|
593 |
-
'lightbox_ctrl_btn_pos' => $lightbox_ctrl_btn_pos,
|
594 |
-
'lightbox_ctrl_btn_align' => $lightbox_ctrl_btn_align,
|
595 |
-
'lightbox_ctrl_btn_height' => $lightbox_ctrl_btn_height,
|
596 |
-
'lightbox_ctrl_btn_margin_top' => $lightbox_ctrl_btn_margin_top,
|
597 |
-
'lightbox_ctrl_btn_margin_left' => $lightbox_ctrl_btn_margin_left,
|
598 |
-
'lightbox_ctrl_btn_transparent' => $lightbox_ctrl_btn_transparent,
|
599 |
-
'lightbox_ctrl_btn_color' => $lightbox_ctrl_btn_color,
|
600 |
-
'lightbox_toggle_btn_height' => $lightbox_toggle_btn_height,
|
601 |
-
'lightbox_toggle_btn_width' => $lightbox_toggle_btn_width,
|
602 |
-
'lightbox_ctrl_cont_bg_color' => $lightbox_ctrl_cont_bg_color,
|
603 |
-
'lightbox_ctrl_cont_border_radius' => $lightbox_ctrl_cont_border_radius,
|
604 |
-
'lightbox_ctrl_cont_transparent' => $lightbox_ctrl_cont_transparent,
|
605 |
-
'lightbox_close_btn_bg_color' => $lightbox_close_btn_bg_color,
|
606 |
-
'lightbox_close_btn_border_radius' => $lightbox_close_btn_border_radius,
|
607 |
-
'lightbox_close_btn_border_width' => $lightbox_close_btn_border_width,
|
608 |
-
'lightbox_close_btn_border_style' => $lightbox_close_btn_border_style,
|
609 |
-
'lightbox_close_btn_border_color' => $lightbox_close_btn_border_color,
|
610 |
-
'lightbox_close_btn_box_shadow' => $lightbox_close_btn_box_shadow,
|
611 |
-
'lightbox_close_btn_color' => $lightbox_close_btn_color,
|
612 |
-
'lightbox_close_btn_size' => $lightbox_close_btn_size,
|
613 |
-
'lightbox_close_btn_width' => $lightbox_close_btn_width,
|
614 |
-
'lightbox_close_btn_height' => $lightbox_close_btn_height,
|
615 |
-
'lightbox_close_btn_top' => $lightbox_close_btn_top,
|
616 |
-
'lightbox_close_btn_right' => $lightbox_close_btn_right,
|
617 |
-
'lightbox_close_btn_full_color' => $lightbox_close_btn_full_color,
|
618 |
-
'lightbox_close_btn_transparent' => $lightbox_close_btn_transparent,
|
619 |
-
'lightbox_rl_btn_bg_color' => $lightbox_rl_btn_bg_color,
|
620 |
-
'lightbox_rl_btn_transparent' => $lightbox_rl_btn_transparent,
|
621 |
-
'lightbox_rl_btn_border_radius' => $lightbox_rl_btn_border_radius,
|
622 |
-
'lightbox_rl_btn_border_width' => $lightbox_rl_btn_border_width,
|
623 |
-
'lightbox_rl_btn_border_style' => $lightbox_rl_btn_border_style,
|
624 |
-
'lightbox_rl_btn_border_color' => $lightbox_rl_btn_border_color,
|
625 |
-
'lightbox_rl_btn_box_shadow' => $lightbox_rl_btn_box_shadow,
|
626 |
-
'lightbox_rl_btn_color' => $lightbox_rl_btn_color,
|
627 |
-
'lightbox_rl_btn_height' => $lightbox_rl_btn_height,
|
628 |
-
'lightbox_rl_btn_width' => $lightbox_rl_btn_width,
|
629 |
-
'lightbox_rl_btn_size' => $lightbox_rl_btn_size,
|
630 |
-
'lightbox_close_rl_btn_hover_color' => $lightbox_close_rl_btn_hover_color,
|
631 |
-
'lightbox_comment_pos' => $lightbox_comment_pos,
|
632 |
-
'lightbox_comment_width' => $lightbox_comment_width,
|
633 |
-
'lightbox_comment_bg_color' => $lightbox_comment_bg_color,
|
634 |
-
'lightbox_comment_font_color' => $lightbox_comment_font_color,
|
635 |
-
'lightbox_comment_font_style' => $lightbox_comment_font_style,
|
636 |
-
'lightbox_comment_font_size' => $lightbox_comment_font_size,
|
637 |
-
'lightbox_comment_button_bg_color' => $lightbox_comment_button_bg_color,
|
638 |
-
'lightbox_comment_button_border_color' => $lightbox_comment_button_border_color,
|
639 |
-
'lightbox_comment_button_border_width' => $lightbox_comment_button_border_width,
|
640 |
-
'lightbox_comment_button_border_style' => $lightbox_comment_button_border_style,
|
641 |
-
'lightbox_comment_button_border_radius' => $lightbox_comment_button_border_radius,
|
642 |
-
'lightbox_comment_button_padding' => $lightbox_comment_button_padding,
|
643 |
-
'lightbox_comment_input_bg_color' => $lightbox_comment_input_bg_color,
|
644 |
-
'lightbox_comment_input_border_color' => $lightbox_comment_input_border_color,
|
645 |
-
'lightbox_comment_input_border_width' => $lightbox_comment_input_border_width,
|
646 |
-
'lightbox_comment_input_border_style' => $lightbox_comment_input_border_style,
|
647 |
-
'lightbox_comment_input_border_radius' => $lightbox_comment_input_border_radius,
|
648 |
-
'lightbox_comment_input_padding' => $lightbox_comment_input_padding,
|
649 |
-
'lightbox_comment_separator_width' => $lightbox_comment_separator_width,
|
650 |
-
'lightbox_comment_separator_style' => $lightbox_comment_separator_style,
|
651 |
-
'lightbox_comment_separator_color' => $lightbox_comment_separator_color,
|
652 |
-
'lightbox_comment_author_font_size' => $lightbox_comment_author_font_size,
|
653 |
-
'lightbox_comment_date_font_size' => $lightbox_comment_date_font_size,
|
654 |
-
'lightbox_comment_body_font_size' => $lightbox_comment_body_font_size,
|
655 |
-
'lightbox_comment_share_button_color' => $lightbox_comment_share_button_color,
|
656 |
-
'lightbox_filmstrip_rl_bg_color' => $lightbox_filmstrip_rl_bg_color,
|
657 |
-
'lightbox_filmstrip_rl_btn_size' => $lightbox_filmstrip_rl_btn_size,
|
658 |
-
'lightbox_filmstrip_rl_btn_color' => $lightbox_filmstrip_rl_btn_color,
|
659 |
-
'lightbox_filmstrip_thumb_margin' => $lightbox_filmstrip_thumb_margin,
|
660 |
-
'lightbox_filmstrip_thumb_border_width' => $lightbox_filmstrip_thumb_border_width,
|
661 |
-
'lightbox_filmstrip_thumb_border_style' => $lightbox_filmstrip_thumb_border_style,
|
662 |
-
'lightbox_filmstrip_thumb_border_color' => $lightbox_filmstrip_thumb_border_color,
|
663 |
-
'lightbox_filmstrip_thumb_border_radius' => $lightbox_filmstrip_thumb_border_radius,
|
664 |
-
'lightbox_filmstrip_thumb_deactive_transparent' => $lightbox_filmstrip_thumb_deactive_transparent,
|
665 |
-
'lightbox_filmstrip_pos' => $lightbox_filmstrip_pos,
|
666 |
-
'lightbox_filmstrip_thumb_active_border_width' => $lightbox_filmstrip_thumb_active_border_width,
|
667 |
-
'lightbox_filmstrip_thumb_active_border_color' => $lightbox_filmstrip_thumb_active_border_color,
|
668 |
-
'lightbox_overlay_bg_transparent' => $lightbox_overlay_bg_transparent,
|
669 |
-
'lightbox_bg_color' => $lightbox_bg_color,
|
670 |
-
'lightbox_overlay_bg_color' => $lightbox_overlay_bg_color,
|
671 |
-
'lightbox_rl_btn_style' => $lightbox_rl_btn_style,
|
672 |
-
'lightbox_bg_transparent' => $lightbox_bg_transparent,
|
673 |
-
|
674 |
-
'blog_style_margin' => $blog_style_margin,
|
675 |
-
'blog_style_padding' => $blog_style_padding,
|
676 |
-
'blog_style_border_radius' => $blog_style_border_radius,
|
677 |
-
'blog_style_border_width' => $blog_style_border_width,
|
678 |
-
'blog_style_border_style' => $blog_style_border_style,
|
679 |
-
'blog_style_border_color' => $blog_style_border_color,
|
680 |
-
'blog_style_bg_color' => $blog_style_bg_color,
|
681 |
-
'blog_style_transparent' => $blog_style_transparent,
|
682 |
-
'blog_style_box_shadow' => $blog_style_box_shadow,
|
683 |
-
'blog_style_align' => $blog_style_align,
|
684 |
-
'blog_style_share_buttons_margin' => $blog_style_share_buttons_margin,
|
685 |
-
'blog_style_share_buttons_border_radius' => $blog_style_share_buttons_border_radius,
|
686 |
-
'blog_style_share_buttons_border_width' => $blog_style_share_buttons_border_width,
|
687 |
-
'blog_style_share_buttons_border_style' => $blog_style_share_buttons_border_style,
|
688 |
-
'blog_style_share_buttons_border_color' => $blog_style_share_buttons_border_color,
|
689 |
-
'blog_style_share_buttons_bg_color' => $blog_style_share_buttons_bg_color,
|
690 |
-
'blog_style_share_buttons_align' => $blog_style_share_buttons_align,
|
691 |
-
'blog_style_img_font_size' => $blog_style_img_font_size,
|
692 |
-
'blog_style_img_font_family' => $blog_style_img_font_family,
|
693 |
-
'blog_style_img_font_color' => $blog_style_img_font_color,
|
694 |
-
'blog_style_share_buttons_font_size' => $blog_style_share_buttons_font_size,
|
695 |
-
'blog_style_share_buttons_color' => $blog_style_share_buttons_color,
|
696 |
-
'blog_style_share_buttons_bg_transparent' => $blog_style_share_buttons_bg_transparent,
|
697 |
-
|
698 |
-
'image_browser_margin' => $image_browser_margin,
|
699 |
-
'image_browser_padding' => $image_browser_padding,
|
700 |
-
'image_browser_border_radius'=> $image_browser_border_radius,
|
701 |
-
'image_browser_border_width' => $image_browser_border_width,
|
702 |
-
'image_browser_border_style' => $image_browser_border_style,
|
703 |
-
'image_browser_border_color' => $image_browser_border_color,
|
704 |
-
'image_browser_bg_color' => $image_browser_bg_color,
|
705 |
-
'image_browser_box_shadow' => $image_browser_box_shadow,
|
706 |
-
'image_browser_transparent' => $image_browser_transparent,
|
707 |
-
'image_browser_align' => $image_browser_align,
|
708 |
-
'image_browser_image_description_margin' => $image_browser_image_description_margin,
|
709 |
-
'image_browser_image_description_padding' => $image_browser_image_description_padding,
|
710 |
-
'image_browser_image_description_border_radius' => $image_browser_image_description_border_radius,
|
711 |
-
'image_browser_image_description_border_width' => $image_browser_image_description_border_width,
|
712 |
-
'image_browser_image_description_border_style' => $image_browser_image_description_border_style,
|
713 |
-
'image_browser_image_description_border_color' => $image_browser_image_description_border_color,
|
714 |
-
'image_browser_image_description_bg_color' => $image_browser_image_description_bg_color,
|
715 |
-
'image_browser_image_description_align' => $image_browser_image_description_align,
|
716 |
-
'image_browser_img_font_size' => $image_browser_img_font_size,
|
717 |
-
'image_browser_img_font_family' => $image_browser_img_font_family,
|
718 |
-
'image_browser_img_font_color' => $image_browser_img_font_color,
|
719 |
-
'image_browser_full_padding' => $image_browser_full_padding,
|
720 |
-
'image_browser_full_border_radius' => $image_browser_full_border_radius,
|
721 |
-
'image_browser_full_border_width' => $image_browser_full_border_width,
|
722 |
-
'image_browser_full_border_style' => $image_browser_full_border_style,
|
723 |
-
'image_browser_full_border_color' => $image_browser_full_border_color,
|
724 |
-
'image_browser_full_bg_color' => $image_browser_full_bg_color,
|
725 |
-
'image_browser_full_transparent' => $image_browser_full_transparent,
|
726 |
-
|
727 |
-
'album_compact_title_margin' => $album_compact_title_margin,
|
728 |
-
'album_compact_thumb_margin' => $album_compact_thumb_margin,
|
729 |
-
'album_compact_back_padding' => $album_compact_back_padding,
|
730 |
-
'album_compact_thumb_padding' => $album_compact_thumb_padding,
|
731 |
-
'album_compact_thumb_border_radius' => $album_compact_thumb_border_radius,
|
732 |
-
'album_compact_thumb_border_width' => $album_compact_thumb_border_width,
|
733 |
-
'album_compact_title_font_style' => $album_compact_title_font_style,
|
734 |
-
'album_compact_back_font_color' => $album_compact_back_font_color,
|
735 |
-
'album_compact_title_font_color' => $album_compact_title_font_color,
|
736 |
-
'album_compact_title_shadow' => $album_compact_title_shadow,
|
737 |
-
'album_compact_thumb_bg_transparent' => $album_compact_thumb_bg_transparent,
|
738 |
-
'album_compact_thumb_box_shadow' => $album_compact_thumb_box_shadow,
|
739 |
-
'album_compact_thumb_transition' => $album_compact_thumb_transition,
|
740 |
-
'album_compact_thumb_border_style' => $album_compact_thumb_border_style,
|
741 |
-
'album_compact_thumb_border_color' => $album_compact_thumb_border_color,
|
742 |
-
'album_compact_thumb_bg_color' => $album_compact_thumb_bg_color,
|
743 |
-
'album_compact_back_font_weight' => $album_compact_back_font_weight,
|
744 |
-
'album_compact_back_font_size' => $album_compact_back_font_size,
|
745 |
-
'album_compact_back_font_style' => $album_compact_back_font_style,
|
746 |
-
'album_compact_thumb_title_pos' => $album_compact_thumb_title_pos,
|
747 |
-
'album_compact_thumbs_bg_color' => $album_compact_thumbs_bg_color,
|
748 |
-
'album_compact_title_font_size' => $album_compact_title_font_size,
|
749 |
-
'album_compact_title_font_weight' => $album_compact_title_font_weight,
|
750 |
-
'album_compact_thumb_align' => $album_compact_thumb_align,
|
751 |
-
'album_compact_thumb_hover_effect' => $album_compact_thumb_hover_effect,
|
752 |
-
'album_compact_thumb_transparent' => $album_compact_thumb_transparent,
|
753 |
-
'album_compact_thumb_hover_effect_value' => $album_compact_thumb_hover_effect_value,
|
754 |
-
'album_extended_thumb_margin' => $album_extended_thumb_margin,
|
755 |
-
'album_extended_thumb_padding' => $album_extended_thumb_padding,
|
756 |
-
'album_extended_thumb_border_radius' => $album_extended_thumb_border_radius,
|
757 |
-
'album_extended_thumb_border_width' => $album_extended_thumb_border_width,
|
758 |
-
'album_extended_thumb_border_style' => $album_extended_thumb_border_style,
|
759 |
-
'album_extended_thumb_border_color' => $album_extended_thumb_border_color,
|
760 |
-
'album_extended_thumb_bg_color' => $album_extended_thumb_bg_color,
|
761 |
-
'album_extended_thumbs_bg_color' => $album_extended_thumbs_bg_color,
|
762 |
-
'album_extended_thumb_bg_transparent' => $album_extended_thumb_bg_transparent,
|
763 |
-
'album_extended_thumb_box_shadow' => $album_extended_thumb_box_shadow,
|
764 |
-
'album_extended_thumb_transparent' => $album_extended_thumb_transparent,
|
765 |
-
'album_extended_thumb_align' => $album_extended_thumb_align,
|
766 |
-
'album_extended_thumb_hover_effect' => $album_extended_thumb_hover_effect,
|
767 |
-
'album_extended_thumb_hover_effect_value' => $album_extended_thumb_hover_effect_value,
|
768 |
-
'album_extended_thumb_transition' => $album_extended_thumb_transition,
|
769 |
-
'album_extended_back_font_color' => $album_extended_back_font_color,
|
770 |
-
'album_extended_back_font_style' => $album_extended_back_font_style,
|
771 |
-
'album_extended_back_font_size' => $album_extended_back_font_size,
|
772 |
-
'album_extended_back_font_weight' => $album_extended_back_font_weight,
|
773 |
-
'album_extended_back_padding' => $album_extended_back_padding,
|
774 |
-
'album_extended_div_bg_color' => $album_extended_div_bg_color,
|
775 |
-
'album_extended_div_bg_transparent' => $album_extended_div_bg_transparent,
|
776 |
-
'album_extended_div_border_radius' => $album_extended_div_border_radius,
|
777 |
-
'album_extended_div_margin' => $album_extended_div_margin,
|
778 |
-
'album_extended_div_padding' => $album_extended_div_padding,
|
779 |
-
'album_extended_div_separator_width' => $album_extended_div_separator_width,
|
780 |
-
'album_extended_div_separator_style' => $album_extended_div_separator_style,
|
781 |
-
'album_extended_div_separator_color' => $album_extended_div_separator_color,
|
782 |
-
'album_extended_thumb_div_bg_color' => $album_extended_thumb_div_bg_color,
|
783 |
-
'album_extended_thumb_div_border_radius' => $album_extended_thumb_div_border_radius,
|
784 |
-
'album_extended_thumb_div_border_width' => $album_extended_thumb_div_border_width,
|
785 |
-
'album_extended_thumb_div_border_style' => $album_extended_thumb_div_border_style,
|
786 |
-
'album_extended_thumb_div_border_color' => $album_extended_thumb_div_border_color,
|
787 |
-
'album_extended_thumb_div_padding' => $album_extended_thumb_div_padding,
|
788 |
-
'album_extended_text_div_bg_color' => $album_extended_text_div_bg_color,
|
789 |
-
'album_extended_text_div_border_radius' => $album_extended_text_div_border_radius,
|
790 |
-
'album_extended_text_div_border_width' => $album_extended_text_div_border_width,
|
791 |
-
'album_extended_text_div_border_style' => $album_extended_text_div_border_style,
|
792 |
-
'album_extended_text_div_border_color' => $album_extended_text_div_border_color,
|
793 |
-
'album_extended_text_div_padding' => $album_extended_text_div_padding,
|
794 |
-
'album_extended_title_span_border_width' => $album_extended_title_span_border_width,
|
795 |
-
'album_extended_title_span_border_style' => $album_extended_title_span_border_style,
|
796 |
-
'album_extended_title_span_border_color' => $album_extended_title_span_border_color,
|
797 |
-
'album_extended_title_font_color' => $album_extended_title_font_color,
|
798 |
-
'album_extended_title_font_style' => $album_extended_title_font_style,
|
799 |
-
'album_extended_title_font_size' => $album_extended_title_font_size,
|
800 |
-
'album_extended_title_font_weight' => $album_extended_title_font_weight,
|
801 |
-
'album_extended_title_margin_bottom' => $album_extended_title_margin_bottom,
|
802 |
-
'album_extended_title_padding' => $album_extended_title_padding,
|
803 |
-
'album_extended_desc_span_border_width' => $album_extended_desc_span_border_width,
|
804 |
-
'album_extended_desc_span_border_style' => $album_extended_desc_span_border_style,
|
805 |
-
'album_extended_desc_span_border_color' => $album_extended_desc_span_border_color,
|
806 |
-
'album_extended_desc_font_color' => $album_extended_desc_font_color,
|
807 |
-
'album_extended_desc_font_style' => $album_extended_desc_font_style,
|
808 |
-
'album_extended_desc_font_size' => $album_extended_desc_font_size,
|
809 |
-
'album_extended_desc_font_weight' => $album_extended_desc_font_weight,
|
810 |
-
'album_extended_desc_padding' => $album_extended_desc_padding,
|
811 |
-
'album_extended_desc_more_color' => $album_extended_desc_more_color,
|
812 |
-
'album_extended_desc_more_size' => $album_extended_desc_more_size,
|
813 |
-
|
814 |
-
'slideshow_cont_bg_color' => $slideshow_cont_bg_color,
|
815 |
-
'slideshow_close_btn_transparent' => $slideshow_close_btn_transparent,
|
816 |
-
'slideshow_rl_btn_bg_color' => $slideshow_rl_btn_bg_color,
|
817 |
-
'slideshow_rl_btn_border_radius' => $slideshow_rl_btn_border_radius,
|
818 |
-
'slideshow_rl_btn_border_width' => $slideshow_rl_btn_border_width,
|
819 |
-
'slideshow_rl_btn_border_style' => $slideshow_rl_btn_border_style,
|
820 |
-
'slideshow_rl_btn_border_color' => $slideshow_rl_btn_border_color,
|
821 |
-
'slideshow_rl_btn_box_shadow' => $slideshow_rl_btn_box_shadow,
|
822 |
-
'slideshow_rl_btn_color' => $slideshow_rl_btn_color,
|
823 |
-
'slideshow_rl_btn_height' => $slideshow_rl_btn_height,
|
824 |
-
'slideshow_rl_btn_size' => $slideshow_rl_btn_size,
|
825 |
-
'slideshow_rl_btn_width' => $slideshow_rl_btn_width,
|
826 |
-
'slideshow_close_rl_btn_hover_color' => $slideshow_close_rl_btn_hover_color,
|
827 |
-
'slideshow_filmstrip_pos' => $slideshow_filmstrip_pos,
|
828 |
-
'slideshow_filmstrip_thumb_border_width' => $slideshow_filmstrip_thumb_border_width,
|
829 |
-
'slideshow_filmstrip_thumb_border_style' => $slideshow_filmstrip_thumb_border_style,
|
830 |
-
'slideshow_filmstrip_thumb_border_color' => $slideshow_filmstrip_thumb_border_color,
|
831 |
-
'slideshow_filmstrip_thumb_border_radius' => $slideshow_filmstrip_thumb_border_radius,
|
832 |
-
'slideshow_filmstrip_thumb_margin' => $slideshow_filmstrip_thumb_margin,
|
833 |
-
'slideshow_filmstrip_thumb_active_border_width' => $slideshow_filmstrip_thumb_active_border_width,
|
834 |
-
'slideshow_filmstrip_thumb_active_border_color' => $slideshow_filmstrip_thumb_active_border_color,
|
835 |
-
'slideshow_filmstrip_thumb_deactive_transparent' => $slideshow_filmstrip_thumb_deactive_transparent,
|
836 |
-
'slideshow_filmstrip_rl_bg_color' => $slideshow_filmstrip_rl_bg_color,
|
837 |
-
'slideshow_filmstrip_rl_btn_color' => $slideshow_filmstrip_rl_btn_color,
|
838 |
-
'slideshow_filmstrip_rl_btn_size' => $slideshow_filmstrip_rl_btn_size,
|
839 |
-
'slideshow_title_font_size' => $slideshow_title_font_size,
|
840 |
-
'slideshow_title_font' => $slideshow_title_font,
|
841 |
-
'slideshow_title_color' => $slideshow_title_color,
|
842 |
-
'slideshow_title_opacity' => $slideshow_title_opacity,
|
843 |
-
'slideshow_title_border_radius' => $slideshow_title_border_radius,
|
844 |
-
'slideshow_title_background_color' => $slideshow_title_background_color,
|
845 |
-
'slideshow_title_padding' => $slideshow_title_padding,
|
846 |
-
'slideshow_description_font_size' => $slideshow_description_font_size,
|
847 |
-
'slideshow_description_font' => $slideshow_description_font,
|
848 |
-
'slideshow_description_color' => $slideshow_description_color,
|
849 |
-
'slideshow_description_opacity' => $slideshow_description_opacity,
|
850 |
-
'slideshow_description_border_radius' => $slideshow_description_border_radius,
|
851 |
-
'slideshow_description_background_color' => $slideshow_description_background_color,
|
852 |
-
'slideshow_description_padding' => $slideshow_description_padding,
|
853 |
-
'slideshow_dots_width' => $slideshow_dots_width,
|
854 |
-
'slideshow_dots_height' => $slideshow_dots_height,
|
855 |
-
'slideshow_dots_border_radius' => $slideshow_dots_border_radius,
|
856 |
-
'slideshow_dots_background_color' => $slideshow_dots_background_color,
|
857 |
-
'slideshow_dots_margin' => $slideshow_dots_margin,
|
858 |
-
'slideshow_dots_active_background_color' => $slideshow_dots_active_background_color,
|
859 |
-
'slideshow_dots_active_border_width' => $slideshow_dots_active_border_width,
|
860 |
-
'slideshow_dots_active_border_color' => $slideshow_dots_active_border_color,
|
861 |
-
'slideshow_play_pause_btn_size' => $slideshow_play_pause_btn_size,
|
862 |
-
'slideshow_rl_btn_style' => $slideshow_rl_btn_style,
|
863 |
-
|
864 |
-
'masonry_thumb_padding' => $masonry_thumb_padding,
|
865 |
-
'masonry_thumb_border_radius' => $masonry_thumb_border_radius,
|
866 |
-
'masonry_thumb_border_width' => $masonry_thumb_border_width,
|
867 |
-
'masonry_thumb_border_style' => $masonry_thumb_border_style,
|
868 |
-
'masonry_thumb_border_color' => $masonry_thumb_border_color,
|
869 |
-
'masonry_thumbs_bg_color' => $masonry_thumbs_bg_color,
|
870 |
-
'masonry_thumb_bg_transparent' => $masonry_thumb_bg_transparent,
|
871 |
-
'masonry_thumb_transparent' => $masonry_thumb_transparent,
|
872 |
-
'masonry_thumb_align' => $masonry_thumb_align,
|
873 |
-
'masonry_thumb_hover_effect' => $masonry_thumb_hover_effect,
|
874 |
-
'masonry_thumb_hover_effect_value' => $masonry_thumb_hover_effect_value,
|
875 |
-
'masonry_thumb_transition' => $masonry_thumb_transition,
|
876 |
-
|
877 |
-
'mosaic_thumb_padding' => $mosaic_thumb_padding,
|
878 |
-
'mosaic_thumb_border_radius' => $mosaic_thumb_border_radius,
|
879 |
-
'mosaic_thumb_border_width' => $mosaic_thumb_border_width,
|
880 |
-
'mosaic_thumb_border_style' => $mosaic_thumb_border_style,
|
881 |
-
'mosaic_thumb_border_color' => $mosaic_thumb_border_color,
|
882 |
-
'mosaic_thumbs_bg_color' => $mosaic_thumbs_bg_color,
|
883 |
-
'mosaic_thumb_bg_transparent' => $mosaic_thumb_bg_transparent,
|
884 |
-
'mosaic_thumb_transparent' => $mosaic_thumb_transparent,
|
885 |
-
'mosaic_thumb_align' => $mosaic_thumb_align,
|
886 |
-
'mosaic_thumb_hover_effect' => $mosaic_thumb_hover_effect,
|
887 |
-
'mosaic_thumb_hover_effect_value' => $mosaic_thumb_hover_effect_value,
|
888 |
-
'mosaic_thumb_title_margin' => $mosaic_thumb_title_margin,
|
889 |
-
'mosaic_thumb_title_font_style' => $mosaic_thumb_title_font_style,
|
890 |
-
'mosaic_thumb_title_font_color' => $mosaic_thumb_title_font_color,
|
891 |
-
'mosaic_thumb_title_shadow' => $mosaic_thumb_title_shadow,
|
892 |
-
'mosaic_thumb_title_font_size' => $mosaic_thumb_title_font_size,
|
893 |
-
'mosaic_thumb_title_font_weight' => $mosaic_thumb_title_font_weight,
|
894 |
-
'lightbox_info_pos' => $lightbox_info_pos,
|
895 |
-
'lightbox_info_align' => $lightbox_info_align,
|
896 |
-
'lightbox_info_bg_color' => $lightbox_info_bg_color,
|
897 |
-
'lightbox_info_bg_transparent' => $lightbox_info_bg_transparent,
|
898 |
-
'lightbox_info_border_width' => $lightbox_info_border_width,
|
899 |
-
'lightbox_info_border_style' => $lightbox_info_border_style,
|
900 |
-
'lightbox_info_border_color' => $lightbox_info_border_color,
|
901 |
-
'lightbox_info_border_radius' => $lightbox_info_border_radius,
|
902 |
-
'lightbox_info_padding' => $lightbox_info_padding,
|
903 |
-
'lightbox_info_margin' => $lightbox_info_margin,
|
904 |
-
'lightbox_title_color' => $lightbox_title_color,
|
905 |
-
'lightbox_title_font_style' => $lightbox_title_font_style,
|
906 |
-
'lightbox_title_font_weight' => $lightbox_title_font_weight,
|
907 |
-
'lightbox_title_font_size' => $lightbox_title_font_size,
|
908 |
-
'lightbox_description_color' => $lightbox_description_color,
|
909 |
-
'lightbox_description_font_style' => $lightbox_description_font_style,
|
910 |
-
'lightbox_description_font_weight' => $lightbox_description_font_weight,
|
911 |
-
'lightbox_description_font_size' => $lightbox_description_font_size,
|
912 |
-
|
913 |
-
'lightbox_rate_pos' => $lightbox_rate_pos,
|
914 |
-
'lightbox_rate_align' => $lightbox_rate_align,
|
915 |
-
'lightbox_rate_icon' => $lightbox_rate_icon,
|
916 |
-
'lightbox_rate_color' => $lightbox_rate_color,
|
917 |
-
'lightbox_rate_size' => $lightbox_rate_size,
|
918 |
-
'lightbox_rate_stars_count' => $lightbox_rate_stars_count,
|
919 |
-
'lightbox_rate_padding' => $lightbox_rate_padding,
|
920 |
-
'lightbox_rate_hover_color' => $lightbox_rate_hover_color,
|
921 |
-
|
922 |
-
'lightbox_hit_pos' => $lightbox_hit_pos,
|
923 |
-
'lightbox_hit_align' => $lightbox_hit_align,
|
924 |
-
'lightbox_hit_bg_color' => $lightbox_hit_bg_color,
|
925 |
-
'lightbox_hit_bg_transparent' => $lightbox_hit_bg_transparent,
|
926 |
-
'lightbox_hit_border_width' => $lightbox_hit_border_width,
|
927 |
-
'lightbox_hit_border_style' => $lightbox_hit_border_style,
|
928 |
-
'lightbox_hit_border_color' => $lightbox_hit_border_color,
|
929 |
-
'lightbox_hit_border_radius' => $lightbox_hit_border_radius,
|
930 |
-
'lightbox_hit_padding' => $lightbox_hit_padding,
|
931 |
-
'lightbox_hit_margin' => $lightbox_hit_margin,
|
932 |
-
'lightbox_hit_color' => $lightbox_hit_color,
|
933 |
-
'lightbox_hit_font_style' => $lightbox_hit_font_style,
|
934 |
-
'lightbox_hit_font_weight' => $lightbox_hit_font_weight,
|
935 |
-
'lightbox_hit_font_size' => $lightbox_hit_font_size,
|
936 |
-
'masonry_description_font_size' => $masonry_description_font_size,
|
937 |
-
'masonry_description_color' => $masonry_description_color,
|
938 |
-
'masonry_description_font_style' => $masonry_description_font_style,
|
939 |
-
|
940 |
-
'album_masonry_back_font_color' => $album_masonry_back_font_color,
|
941 |
-
'album_masonry_back_font_style' => $album_masonry_back_font_style,
|
942 |
-
'album_masonry_back_font_size' => $album_masonry_back_font_size,
|
943 |
-
'album_masonry_back_font_weight' => $album_masonry_back_font_weight,
|
944 |
-
'album_masonry_back_padding' => $album_masonry_back_padding,
|
945 |
-
'album_masonry_title_font_color' => $album_masonry_title_font_color,
|
946 |
-
'album_masonry_title_font_style' => $album_masonry_title_font_style,
|
947 |
-
'album_masonry_thumb_title_pos' => $album_masonry_thumb_title_pos,
|
948 |
-
'album_masonry_title_font_size' => $album_masonry_title_font_size,
|
949 |
-
'album_masonry_title_font_weight' => $album_masonry_title_font_weight,
|
950 |
-
'album_masonry_title_margin' => $album_masonry_title_margin,
|
951 |
-
'album_masonry_title_shadow' => $album_masonry_title_shadow,
|
952 |
-
'album_masonry_thumb_margin' => $album_masonry_thumb_margin,
|
953 |
-
'album_masonry_thumb_padding' => $album_masonry_thumb_padding,
|
954 |
-
'album_masonry_thumb_border_radius' => $album_masonry_thumb_border_radius,
|
955 |
-
'album_masonry_thumb_border_width' => $album_masonry_thumb_border_width,
|
956 |
-
'album_masonry_thumb_border_style' => $album_masonry_thumb_border_style,
|
957 |
-
'album_masonry_thumb_border_color' => $album_masonry_thumb_border_color,
|
958 |
-
'album_masonry_thumb_bg_color' => $album_masonry_thumb_bg_color,
|
959 |
-
'album_masonry_thumbs_bg_color' => $album_masonry_thumbs_bg_color,
|
960 |
-
'album_masonry_thumb_bg_transparent' => $album_masonry_thumb_bg_transparent,
|
961 |
-
'album_masonry_thumb_box_shadow' => $album_masonry_thumb_box_shadow,
|
962 |
-
'album_masonry_thumb_transparent' => $album_masonry_thumb_transparent,
|
963 |
-
'album_masonry_thumb_align' => $album_masonry_thumb_align,
|
964 |
-
'album_masonry_thumb_hover_effect' => $album_masonry_thumb_hover_effect,
|
965 |
-
'album_masonry_thumb_hover_effect_value' => $album_masonry_thumb_hover_effect_value,
|
966 |
-
'album_masonry_thumb_transition' => $album_masonry_thumb_transition,
|
967 |
-
|
968 |
-
'carousel_cont_bg_color' => $carousel_cont_bg_color,
|
969 |
-
'carousel_cont_btn_transparent' => $carousel_cont_btn_transparent,
|
970 |
-
'carousel_close_btn_transparent' => $carousel_close_btn_transparent,
|
971 |
-
'carousel_rl_btn_bg_color' => $carousel_rl_btn_bg_color,
|
972 |
-
'carousel_rl_btn_border_radius' => $carousel_rl_btn_border_radius,
|
973 |
-
'carousel_rl_btn_border_width' => $carousel_rl_btn_border_width,
|
974 |
-
'carousel_rl_btn_border_style' => $carousel_rl_btn_border_style,
|
975 |
-
'carousel_rl_btn_border_color' => $carousel_rl_btn_border_color,
|
976 |
-
'carousel_rl_btn_color' => $carousel_rl_btn_color,
|
977 |
-
'carousel_rl_btn_height' => $carousel_rl_btn_height,
|
978 |
-
'carousel_rl_btn_size' => $carousel_rl_btn_size,
|
979 |
-
'carousel_play_pause_btn_size' => $carousel_play_pause_btn_size,
|
980 |
-
'carousel_rl_btn_width' => $carousel_rl_btn_width,
|
981 |
-
'carousel_close_rl_btn_hover_color' => $carousel_close_rl_btn_hover_color,
|
982 |
-
'carousel_rl_btn_style' => $carousel_rl_btn_style,
|
983 |
-
'carousel_mergin_bottom' => $carousel_mergin_bottom,
|
984 |
-
'carousel_font_family' => $carousel_font_family,
|
985 |
-
'carousel_feature_border_width' => $carousel_feature_border_width,
|
986 |
-
'carousel_feature_border_style' => $carousel_feature_border_style,
|
987 |
-
'carousel_feature_border_color' => $carousel_feature_border_color,
|
988 |
-
'carousel_caption_background_color' => $carousel_caption_background_color,
|
989 |
-
'carousel_caption_bottom' => $carousel_caption_bottom,
|
990 |
-
'carousel_caption_p_mergin' => $carousel_caption_p_mergin,
|
991 |
-
'carousel_caption_p_pedding' => $carousel_caption_p_pedding,
|
992 |
-
'carousel_caption_p_font_weight' => $carousel_caption_p_font_weight,
|
993 |
-
'carousel_caption_p_font_size' => $carousel_caption_p_font_size,
|
994 |
-
'carousel_caption_p_color' => $carousel_caption_p_color,
|
995 |
-
'carousel_title_opacity' => $carousel_title_opacity,
|
996 |
-
'carousel_title_border_radius' => $carousel_title_border_radius,
|
997 |
-
'default_theme' => $default_theme,
|
998 |
-
'mosaic_thumb_transition' => $mosaic_thumb_transition,
|
999 |
-
);
|
1000 |
-
$themes = json_encode($themes);
|
1001 |
-
if ($id != 0) {
|
1002 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_theme', array(
|
1003 |
-
'name' => $name,
|
1004 |
-
'options' => $themes,
|
1005 |
-
'default_theme' => $default_theme,
|
1006 |
-
), array('id' => $id));
|
1007 |
-
}
|
1008 |
-
else {
|
1009 |
-
$save = $wpdb->insert($wpdb->prefix . 'bwg_theme', array(
|
1010 |
-
'name' => $name,
|
1011 |
-
'options' => $themes,
|
1012 |
-
'default_theme' => $default_theme,
|
1013 |
-
));
|
1014 |
-
}
|
1015 |
-
if ($save !== FALSE) {
|
1016 |
-
return 1;
|
1017 |
-
}
|
1018 |
-
else {
|
1019 |
-
return 2;
|
1020 |
-
}
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
public function delete($id) {
|
1024 |
-
global $wpdb;
|
1025 |
-
$isDefault = $wpdb->get_var('SELECT default_theme FROM ' . $wpdb->prefix . 'bwg_theme WHERE id=' . $id);
|
1026 |
-
if ($isDefault) {
|
1027 |
-
echo WDWLibrary::message("You can't delete default theme", 'error');
|
1028 |
-
}
|
1029 |
-
else {
|
1030 |
-
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $id);
|
1031 |
-
if ($wpdb->query($query)) {
|
1032 |
-
echo WDWLibrary::message('Item Succesfully Deleted.', 'updated');
|
1033 |
-
$message = 3;
|
1034 |
-
}
|
1035 |
-
else {
|
1036 |
-
$message = 2;
|
1037 |
-
}
|
1038 |
-
}
|
1039 |
-
$page = WDWLibrary::get('page');
|
1040 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
1041 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
1042 |
-
WDWLibrary::spider_redirect($query_url);
|
1043 |
-
}
|
1044 |
-
|
1045 |
-
public function delete_all() {
|
1046 |
-
global $wpdb;
|
1047 |
-
$flag = FALSE;
|
1048 |
-
$isDefault = FALSE;
|
1049 |
-
$tag_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_theme');
|
1050 |
-
foreach ($tag_ids_col as $tag_id) {
|
1051 |
-
if (isset($_POST['check_' . $tag_id])) {
|
1052 |
-
$isDefault = $wpdb->get_var('SELECT default_theme FROM ' . $wpdb->prefix . 'bwg_theme WHERE id=' . $tag_id);
|
1053 |
-
if ($isDefault) {
|
1054 |
-
$message = 4;
|
1055 |
-
}
|
1056 |
-
else {
|
1057 |
-
$flag = TRUE;
|
1058 |
-
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $tag_id);
|
1059 |
-
$wpdb->query($query);
|
1060 |
-
}
|
1061 |
-
}
|
1062 |
-
}
|
1063 |
-
if ($flag) {
|
1064 |
-
$message = 5;
|
1065 |
-
}
|
1066 |
-
else {
|
1067 |
-
$message = 6;
|
1068 |
-
}
|
1069 |
-
$page = WDWLibrary::get('page');
|
1070 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
1071 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
1072 |
-
WDWLibrary::spider_redirect($query_url);
|
1073 |
-
}
|
1074 |
-
|
1075 |
-
public function setdefault($id) {
|
1076 |
-
global $wpdb;
|
1077 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 0), array('default_theme' => 1));
|
1078 |
-
$save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 1), array('id' => $id));
|
1079 |
-
if ($save !== FALSE) {
|
1080 |
-
$message = 7;
|
1081 |
-
}
|
1082 |
-
else {
|
1083 |
-
$message = 2;
|
1084 |
-
}
|
1085 |
-
$page = WDWLibrary::get('page');
|
1086 |
-
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
1087 |
-
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
1088 |
-
WDWLibrary::spider_redirect($query_url);
|
1089 |
-
}
|
1090 |
-
|
1091 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1092 |
-
// Getters & Setters //
|
1093 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1094 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1095 |
-
// Private Methods //
|
1096 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1097 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1098 |
-
// Listeners //
|
1099 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1100 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerThemes_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$task = WDWLibrary::get('task');
|
23 |
+
$id = WDWLibrary::get('current_id', 0);
|
24 |
+
$message = WDWLibrary::get('message');
|
25 |
+
|
26 |
+
if($task != ''){
|
27 |
+
if(!WDWLibrary::verify_nonce('themes_bwg')){
|
28 |
+
die('Sorry, your nonce did not verify.');
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
echo WDWLibrary::message_id($message);
|
33 |
+
if (method_exists($this, $task)) {
|
34 |
+
$this->$task($id);
|
35 |
+
}
|
36 |
+
else {
|
37 |
+
$this->display();
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
public function display() {
|
42 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
|
43 |
+
$model = new BWGModelThemes_bwg();
|
44 |
+
|
45 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
|
46 |
+
$view = new BWGViewThemes_bwg($model);
|
47 |
+
$view->display();
|
48 |
+
}
|
49 |
+
|
50 |
+
public function add() {
|
51 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
|
52 |
+
$model = new BWGModelThemes_bwg();
|
53 |
+
|
54 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
|
55 |
+
$view = new BWGViewThemes_bwg($model);
|
56 |
+
$view->edit(0, false);
|
57 |
+
}
|
58 |
+
|
59 |
+
public function edit() {
|
60 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
|
61 |
+
$model = new BWGModelThemes_bwg();
|
62 |
+
|
63 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
|
64 |
+
$view = new BWGViewThemes_bwg($model);
|
65 |
+
$id = WDWLibrary::get('current_id', 0);
|
66 |
+
$view->edit($id, false);
|
67 |
+
}
|
68 |
+
|
69 |
+
public function reset() {
|
70 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelThemes_bwg.php";
|
71 |
+
$model = new BWGModelThemes_bwg();
|
72 |
+
|
73 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewThemes_bwg.php";
|
74 |
+
$view = new BWGViewThemes_bwg($model);
|
75 |
+
$id = WDWLibrary::get('current_id', 0);
|
76 |
+
echo WDWLibrary::message('Changes must be saved.', 'error');
|
77 |
+
$view->edit($id, TRUE);
|
78 |
+
}
|
79 |
+
|
80 |
+
public function save() {
|
81 |
+
$message = $this->save_db();
|
82 |
+
$page = WDWLibrary::get('page');
|
83 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
84 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
85 |
+
WDWLibrary::spider_redirect($query_url);
|
86 |
+
}
|
87 |
+
|
88 |
+
public function apply() {
|
89 |
+
$message = $this->save_db();
|
90 |
+
global $wpdb;
|
91 |
+
$id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_theme');
|
92 |
+
$current_id = WDWLibrary::get('current_id', $id);
|
93 |
+
$page = WDWLibrary::get('page');
|
94 |
+
$current_type = WDWLibrary::get('current_type', 'Thumbnail');
|
95 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
96 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message, 'current_type' => $current_type), $query_url);
|
97 |
+
WDWLibrary::spider_redirect($query_url);
|
98 |
+
}
|
99 |
+
|
100 |
+
public function save_db() {
|
101 |
+
global $wpdb;
|
102 |
+
$id = (int) WDWLibrary::get('current_id', 0);
|
103 |
+
$name = (isset($_POST['name']) ? esc_html(stripslashes( $_POST['name'])) : 'exaple');
|
104 |
+
$thumb_margin = (isset($_POST['thumb_margin']) ? esc_html(stripslashes( $_POST['thumb_margin'])) : '');
|
105 |
+
$thumb_padding = (isset($_POST['thumb_padding']) ? esc_html(stripslashes( $_POST['thumb_padding'])) : '');
|
106 |
+
$thumb_border_radius = (isset($_POST['thumb_border_radius']) ? esc_html(stripslashes( $_POST['thumb_border_radius'])) :'');
|
107 |
+
$thumb_border_width = (isset($_POST['thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['thumb_border_width'])) : 1);
|
108 |
+
$thumb_border_style = (isset($_POST['thumb_border_style']) ? esc_html(stripslashes( $_POST['thumb_border_style'])) : 'solid');
|
109 |
+
$thumb_border_color = (isset($_POST['thumb_border_color']) ? esc_html(stripslashes( $_POST['thumb_border_color'])) : '000000');
|
110 |
+
$thumb_bg_color = (isset($_POST['thumb_bg_color']) ? esc_html(stripslashes( $_POST['thumb_bg_color'])) : 'FFFFFF');
|
111 |
+
$thumbs_bg_color = (isset($_POST['thumbs_bg_color']) ? esc_html(stripslashes( $_POST['thumbs_bg_color'])) : 'FFFFFF');
|
112 |
+
$thumb_bg_transparent = (isset($_POST['thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['thumb_bg_transparent'])) :0);
|
113 |
+
$thumb_box_shadow = (isset($_POST['thumb_box_shadow']) ? esc_html(stripslashes( $_POST['thumb_box_shadow'])) : '');
|
114 |
+
$thumb_transparent = (isset($_POST['thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['thumb_transparent'])) : 0);
|
115 |
+
$thumb_align = (isset($_POST['thumb_align']) ? esc_html(stripslashes( $_POST['thumb_align'])) : '');
|
116 |
+
$thumb_hover_effect = (isset($_POST['thumb_hover_effect']) ? esc_html(stripslashes( $_POST['thumb_hover_effect'])) : '');
|
117 |
+
$thumb_hover_effect_value = (isset($_POST['thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['thumb_hover_effect_value'])) : '');
|
118 |
+
$thumb_transition = (isset($_POST['thumb_transition']) ? (int) esc_html(stripslashes( $_POST['thumb_transition'])) : 0);
|
119 |
+
$thumb_title_margin = (isset($_POST['thumb_title_margin']) ? esc_html(stripslashes( $_POST['thumb_title_margin'])) : '');
|
120 |
+
$thumb_title_font_style = (isset($_POST['thumb_title_font_style']) ? esc_html(stripslashes( $_POST['thumb_title_font_style'])) : 'inherit');
|
121 |
+
$thumb_title_pos = (isset($_POST['thumb_title_pos']) ? esc_html(stripslashes( $_POST['thumb_title_pos'])) :'bottom');
|
122 |
+
$thumb_title_font_color = (isset($_POST['thumb_title_font_color']) ? esc_html(stripslashes( $_POST['thumb_title_font_color'])) : 'CCCCCC');
|
123 |
+
$thumb_title_shadow = (isset($_POST['thumb_title_shadow']) ? esc_html(stripslashes( $_POST['thumb_title_shadow'])) : '');
|
124 |
+
$thumb_title_font_size = (isset($_POST['thumb_title_font_size']) ? (int) esc_html(stripslashes( $_POST['thumb_title_font_size'])) : 12);
|
125 |
+
$thumb_title_font_weight = (isset($_POST['thumb_title_font_weight']) ? esc_html(stripslashes( $_POST['thumb_title_font_weight'])) : 'normal');
|
126 |
+
|
127 |
+
$page_nav_position = (isset($_POST['page_nav_position']) ? esc_html(stripslashes( $_POST['page_nav_position'])) : 'top');
|
128 |
+
$page_nav_align = (isset($_POST['page_nav_align']) ? esc_html(stripslashes( $_POST['page_nav_align'])) : 'center');
|
129 |
+
$page_nav_number = (isset($_POST['page_nav_number']) ? (int) esc_html(stripslashes( $_POST['page_nav_number'])) : 1);
|
130 |
+
$page_nav_font_size = (isset($_POST['page_nav_font_size']) ? (int) esc_html(stripslashes( $_POST['page_nav_font_size'])) : 13);
|
131 |
+
$page_nav_font_style = (isset($_POST['page_nav_font_style']) ? esc_html(stripslashes( $_POST['page_nav_font_style'])) : 'solid');
|
132 |
+
$page_nav_font_color = (isset($_POST['page_nav_font_color']) ? esc_html(stripslashes( $_POST['page_nav_font_color'])) : '000000');
|
133 |
+
$page_nav_font_weight = (isset($_POST['page_nav_font_weight']) ? esc_html(stripslashes( $_POST['page_nav_font_weight'])) : '');
|
134 |
+
$page_nav_border_width = (isset($_POST['page_nav_border_width']) ? (int) esc_html(stripslashes( $_POST['page_nav_border_width'])) : 1);
|
135 |
+
$page_nav_border_style = (isset($_POST['page_nav_border_style']) ? esc_html(stripslashes( $_POST['page_nav_border_style'])) : 'solid');
|
136 |
+
$page_nav_border_color = (isset($_POST['page_nav_border_color']) ? esc_html(stripslashes( $_POST['page_nav_border_color'])) : '');
|
137 |
+
$page_nav_border_radius = (isset($_POST['page_nav_border_radius']) ? esc_html(stripslashes( $_POST['page_nav_border_radius'])) : '');
|
138 |
+
$page_nav_margin = (isset($_POST['page_nav_margin']) ? esc_html(stripslashes( $_POST['page_nav_margin'])) : '');
|
139 |
+
$page_nav_padding = (isset($_POST['page_nav_padding']) ? esc_html(stripslashes( $_POST['page_nav_padding'])) : '');
|
140 |
+
$page_nav_button_bg_color = (isset($_POST['page_nav_button_bg_color']) ? esc_html(stripslashes( $_POST['page_nav_button_bg_color'])) : 'FFFFFF');
|
141 |
+
$page_nav_button_bg_transparent = (isset($_POST['page_nav_button_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['page_nav_button_bg_transparent'])) : 0);
|
142 |
+
$page_nav_box_shadow = (isset($_POST['page_nav_box_shadow']) ? esc_html(stripslashes( $_POST['page_nav_box_shadow'])) : '');
|
143 |
+
$page_nav_button_transition = (isset($_POST['page_nav_button_transition']) ? (int) esc_html(stripslashes( $_POST['page_nav_button_transition'])) : 0);
|
144 |
+
$page_nav_button_text = (isset($_POST['page_nav_button_text']) ? (int) esc_html(stripslashes( $_POST['page_nav_button_text'])) : 0);
|
145 |
+
$lightbox_ctrl_btn_pos = (isset($_POST['lightbox_ctrl_btn_pos']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_btn_pos'])) :'top');
|
146 |
+
$lightbox_ctrl_btn_align = (isset($_POST['lightbox_ctrl_btn_align']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_btn_align'])) : 'left');
|
147 |
+
$lightbox_ctrl_btn_height = (isset($_POST['lightbox_ctrl_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_height'])) : 1);
|
148 |
+
$lightbox_ctrl_btn_margin_top = (isset($_POST['lightbox_ctrl_btn_margin_top']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_margin_top'])) : 1);
|
149 |
+
$lightbox_ctrl_btn_margin_left = (isset($_POST['lightbox_ctrl_btn_margin_left']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_margin_left'])) : 0);
|
150 |
+
$lightbox_ctrl_btn_transparent = (isset($_POST['lightbox_ctrl_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_btn_transparent'])) : 0);
|
151 |
+
$lightbox_ctrl_btn_color = (isset($_POST['lightbox_ctrl_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_btn_color'])) : '000000');
|
152 |
+
$lightbox_toggle_btn_height = (isset($_POST['lightbox_toggle_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_toggle_btn_height'])) : 1);
|
153 |
+
$lightbox_toggle_btn_width = (isset($_POST['lightbox_toggle_btn_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_toggle_btn_width'])) : 1);
|
154 |
+
$lightbox_ctrl_cont_bg_color = (isset($_POST['lightbox_ctrl_cont_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_ctrl_cont_bg_color'])) : '000000');
|
155 |
+
$lightbox_ctrl_cont_border_radius = (isset($_POST['lightbox_ctrl_cont_border_radius']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_cont_border_radius'])) : 1);
|
156 |
+
$lightbox_ctrl_cont_transparent = (isset($_POST['lightbox_ctrl_cont_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_ctrl_cont_transparent'])) : 1);
|
157 |
+
$lightbox_close_btn_bg_color = (isset($_POST['lightbox_close_btn_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_bg_color'])) : '000000');
|
158 |
+
$lightbox_close_btn_border_radius = (isset($_POST['lightbox_close_btn_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_border_radius'])) : '16px');
|
159 |
+
$lightbox_close_btn_border_width = (isset($_POST['lightbox_close_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_border_width'])) : 1);
|
160 |
+
$lightbox_close_btn_border_style = (isset($_POST['lightbox_close_btn_border_style']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_border_style'])) : 'solid');
|
161 |
+
$lightbox_close_btn_border_color = (isset($_POST['lightbox_close_btn_border_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_border_color'])) : '000000');
|
162 |
+
$lightbox_close_btn_box_shadow = (isset($_POST['lightbox_close_btn_box_shadow']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_box_shadow'])) : '');
|
163 |
+
$lightbox_close_btn_color = (isset($_POST['lightbox_close_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_color'])) : '000000');
|
164 |
+
$lightbox_close_btn_size = (isset($_POST['lightbox_close_btn_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_size'])) : 1);
|
165 |
+
$lightbox_close_btn_width = (isset($_POST['lightbox_close_btn_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_width'])) : 1);
|
166 |
+
$lightbox_close_btn_height = (isset($_POST['lightbox_close_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_height'])) : 1);
|
167 |
+
$lightbox_close_btn_top = (isset($_POST['lightbox_close_btn_top']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_top'])) : '');
|
168 |
+
$lightbox_close_btn_right = (isset($_POST['lightbox_close_btn_right']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_right'])) : '');
|
169 |
+
$lightbox_close_btn_full_color = (isset($_POST['lightbox_close_btn_full_color']) ? esc_html(stripslashes( $_POST['lightbox_close_btn_full_color'])) : '000000');
|
170 |
+
$lightbox_close_btn_transparent = (isset($_POST['lightbox_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_close_btn_transparent'])) : 1);
|
171 |
+
$lightbox_rl_btn_bg_color = (isset($_POST['lightbox_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_bg_color'])) : '000000');
|
172 |
+
$lightbox_rl_btn_transparent = (isset($_POST['lightbox_rl_btn_transparent']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_transparent'])) : 100);
|
173 |
+
$lightbox_rl_btn_border_radius = (isset($_POST['lightbox_rl_btn_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_border_radius'])) : '');
|
174 |
+
$lightbox_rl_btn_border_width = (isset($_POST['lightbox_rl_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_border_width'])) : 1);
|
175 |
+
$lightbox_rl_btn_border_style = (isset($_POST['lightbox_rl_btn_border_style']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_border_style'])) : 'solid');
|
176 |
+
$lightbox_rl_btn_border_color = (isset($_POST['lightbox_rl_btn_border_color']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_border_color'])) : '000000');
|
177 |
+
$lightbox_rl_btn_box_shadow = (isset($_POST['lightbox_rl_btn_box_shadow']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_box_shadow'])) : '');
|
178 |
+
$lightbox_rl_btn_color = (isset($_POST['lightbox_rl_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_color'])) : '000000');
|
179 |
+
$lightbox_rl_btn_height = (isset($_POST['lightbox_rl_btn_height']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_height'])) : 1);
|
180 |
+
$lightbox_rl_btn_width = (isset($_POST['lightbox_rl_btn_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_width'])) : 1);
|
181 |
+
$lightbox_rl_btn_size = (isset($_POST['lightbox_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_rl_btn_size'])) : 1);
|
182 |
+
$lightbox_close_rl_btn_hover_color = (isset($_POST['lightbox_close_rl_btn_hover_color']) ? esc_html(stripslashes( $_POST['lightbox_close_rl_btn_hover_color'])) : '000000');
|
183 |
+
$lightbox_comment_pos = (isset($_POST['lightbox_comment_pos']) ? esc_html(stripslashes( $_POST['lightbox_comment_pos'])) : 'left');
|
184 |
+
$lightbox_comment_width = (isset($_POST['lightbox_comment_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_width'])) : 1);
|
185 |
+
$lightbox_comment_bg_color = (isset($_POST['lightbox_comment_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_bg_color'])) : '000000');
|
186 |
+
$lightbox_comment_font_color = (isset($_POST['lightbox_comment_font_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_font_color'])) : '000000');
|
187 |
+
$lightbox_comment_font_style = (isset($_POST['lightbox_comment_font_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_font_style'])) : '');
|
188 |
+
$lightbox_comment_font_size = (isset($_POST['lightbox_comment_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_font_size'])) : 1 );
|
189 |
+
$lightbox_comment_button_bg_color = (isset($_POST['lightbox_comment_button_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_bg_color'])) : '000000');
|
190 |
+
$lightbox_comment_button_border_color = (isset($_POST['lightbox_comment_button_border_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_border_color'])) : '000000');
|
191 |
+
$lightbox_comment_button_border_width = (isset($_POST['lightbox_comment_button_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_button_border_width'])) : 1);
|
192 |
+
$lightbox_comment_button_border_style = (isset($_POST['lightbox_comment_button_border_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_border_style'])) : 'solid');
|
193 |
+
$lightbox_comment_button_border_radius = (isset($_POST['lightbox_comment_button_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_border_radius'])) : '');
|
194 |
+
$lightbox_comment_button_padding = (isset($_POST['lightbox_comment_button_padding']) ? esc_html(stripslashes( $_POST['lightbox_comment_button_padding'])) : '');
|
195 |
+
$lightbox_comment_input_bg_color = (isset($_POST['lightbox_comment_input_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_bg_color'])) : '000000');
|
196 |
+
$lightbox_comment_input_border_color = (isset($_POST['lightbox_comment_input_border_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_border_color'])) : '000000');
|
197 |
+
$lightbox_comment_input_border_width = (isset($_POST['lightbox_comment_input_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_input_border_width'])) : 1);
|
198 |
+
$lightbox_comment_input_border_style = (isset($_POST['lightbox_comment_input_border_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_border_style'])) : 'solid');
|
199 |
+
$lightbox_comment_input_border_radius = (isset($_POST['lightbox_comment_input_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_border_radius'])) : '');
|
200 |
+
$lightbox_comment_input_padding = (isset($_POST['lightbox_comment_input_padding']) ? esc_html(stripslashes( $_POST['lightbox_comment_input_padding'])) : '');
|
201 |
+
$lightbox_comment_separator_width = (isset($_POST['lightbox_comment_separator_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_separator_width'])) : 1);
|
202 |
+
$lightbox_comment_separator_style = (isset($_POST['lightbox_comment_separator_style']) ? esc_html(stripslashes( $_POST['lightbox_comment_separator_style'])) : 'solid');
|
203 |
+
$lightbox_comment_separator_color = (isset($_POST['lightbox_comment_separator_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_separator_color'])) : '000000');
|
204 |
+
$lightbox_comment_author_font_size = (isset($_POST['lightbox_comment_author_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_author_font_size'])) : 1);
|
205 |
+
$lightbox_comment_date_font_size = (isset($_POST['lightbox_comment_date_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_date_font_size'])) : 1);
|
206 |
+
$lightbox_comment_body_font_size = (isset($_POST['lightbox_comment_body_font_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_comment_body_font_size'])) : 1);
|
207 |
+
$lightbox_comment_share_button_color = (isset($_POST['lightbox_comment_share_button_color']) ? esc_html(stripslashes( $_POST['lightbox_comment_share_button_color'])) : '000000');
|
208 |
+
$lightbox_filmstrip_rl_bg_color = (isset($_POST['lightbox_filmstrip_rl_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_rl_bg_color'])) : '000000');
|
209 |
+
$lightbox_filmstrip_rl_btn_size = (isset($_POST['lightbox_filmstrip_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_rl_btn_size'])) : 1);
|
210 |
+
$lightbox_filmstrip_rl_btn_color = (isset($_POST['lightbox_filmstrip_rl_btn_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_rl_btn_color'])) : '000000');
|
211 |
+
$lightbox_filmstrip_thumb_margin = (isset($_POST['lightbox_filmstrip_thumb_margin']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_margin'])) : '');
|
212 |
+
$lightbox_filmstrip_thumb_border_width = (isset($_POST['lightbox_filmstrip_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_width'])) : 1);
|
213 |
+
$lightbox_filmstrip_thumb_border_style = (isset($_POST['lightbox_filmstrip_thumb_border_style']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_style'])) : 'solid');
|
214 |
+
$lightbox_filmstrip_thumb_border_color = (isset($_POST['lightbox_filmstrip_thumb_border_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_color'])) : '000000');
|
215 |
+
$lightbox_filmstrip_thumb_border_radius = (isset($_POST['lightbox_filmstrip_thumb_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_border_radius'])) : '');
|
216 |
+
$lightbox_filmstrip_thumb_deactive_transparent = (isset($_POST['lightbox_filmstrip_thumb_deactive_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_deactive_transparent'])) : 1);
|
217 |
+
$lightbox_filmstrip_pos = (isset($_POST['lightbox_filmstrip_pos']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_pos'])) : 'top');
|
218 |
+
$lightbox_filmstrip_thumb_active_border_width = (isset($_POST['lightbox_filmstrip_thumb_active_border_width']) ? (int) esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_active_border_width'])) : 1);
|
219 |
+
$lightbox_filmstrip_thumb_active_border_color = (isset($_POST['lightbox_filmstrip_thumb_active_border_color']) ? esc_html(stripslashes( $_POST['lightbox_filmstrip_thumb_active_border_color'])) : '000000');
|
220 |
+
$lightbox_overlay_bg_transparent = (isset($_POST['lightbox_overlay_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_overlay_bg_transparent'])) : 80);
|
221 |
+
$lightbox_bg_color = (isset($_POST['lightbox_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_bg_color'])) : '000000');
|
222 |
+
$lightbox_overlay_bg_color = (isset($_POST['lightbox_overlay_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_overlay_bg_color'])) : '000000');
|
223 |
+
$lightbox_rl_btn_style = (isset($_POST['lightbox_rl_btn_style']) ? esc_html(stripslashes( $_POST['lightbox_rl_btn_style'])) : 'fa-chevron');
|
224 |
+
$lightbox_bg_transparent = (isset($_POST['lightbox_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['lightbox_bg_transparent'])) : 100);
|
225 |
+
|
226 |
+
$blog_style_margin = (isset($_POST['blog_style_margin']) ? esc_html(stripslashes( $_POST['blog_style_margin'])) : '');
|
227 |
+
$blog_style_padding = (isset($_POST['blog_style_padding']) ? esc_html(stripslashes( $_POST['blog_style_padding'])) : '');
|
228 |
+
$blog_style_border_radius = (isset($_POST['blog_style_border_radius']) ? esc_html(stripslashes( $_POST['blog_style_border_radius'])) :'');
|
229 |
+
$blog_style_border_width = (isset($_POST['blog_style_border_width']) ? (int) esc_html(stripslashes( $_POST['blog_style_border_width'])) : 1);
|
230 |
+
$blog_style_border_style = (isset($_POST['blog_style_border_style']) ? esc_html(stripslashes( $_POST['blog_style_border_style'])) : 'solid');
|
231 |
+
$blog_style_border_color = (isset($_POST['blog_style_border_color']) ? esc_html(stripslashes( $_POST['blog_style_border_color'])) : '000000');
|
232 |
+
$blog_style_bg_color = (isset($_POST['blog_style_bg_color']) ? esc_html(stripslashes( $_POST['blog_style_bg_color'])) : 'FFFFFF');
|
233 |
+
$blog_style_box_shadow = (isset($_POST['blog_style_box_shadow']) ? esc_html(stripslashes( $_POST['blog_style_box_shadow'])) : '');
|
234 |
+
$blog_style_transparent = (isset($_POST['blog_style_transparent']) ? (int) esc_html(stripslashes( $_POST['blog_style_transparent'])) : 0);
|
235 |
+
$blog_style_align = (isset($_POST['blog_style_align']) ? esc_html(stripslashes( $_POST['blog_style_align'])) : '');
|
236 |
+
$blog_style_share_buttons_margin = (isset($_POST['blog_style_share_buttons_margin']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_margin'])) : '');
|
237 |
+
$blog_style_share_buttons_border_radius = (isset($_POST['blog_style_share_buttons_border_radius']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_border_radius'])) :'');
|
238 |
+
$blog_style_share_buttons_border_width = (isset($_POST['blog_style_share_buttons_border_width']) ? (int) esc_html(stripslashes( $_POST['blog_style_share_buttons_border_width'])) : 1);
|
239 |
+
$blog_style_share_buttons_border_style = (isset($_POST['blog_style_share_buttons_border_style']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_border_style'])) : 'solid');
|
240 |
+
$blog_style_share_buttons_border_color = (isset($_POST['blog_style_share_buttons_border_color']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_border_color'])) : '000000');
|
241 |
+
$blog_style_share_buttons_bg_color = (isset($_POST['blog_style_share_buttons_bg_color']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_bg_color'])) : 'FFFFFF');
|
242 |
+
$blog_style_share_buttons_align = (isset($_POST['blog_style_share_buttons_align']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_align'])) : '');
|
243 |
+
$blog_style_img_font_size = (isset($_POST['blog_style_img_font_size']) ? (int) esc_html(stripslashes( $_POST['blog_style_img_font_size'])) : 1);
|
244 |
+
$blog_style_img_font_family = (isset($_POST['blog_style_img_font_family']) ? esc_html(stripslashes( $_POST['blog_style_img_font_family'])) : 'cursive');
|
245 |
+
$blog_style_img_font_color = (isset($_POST['blog_style_img_font_color']) ? esc_html(stripslashes( $_POST['blog_style_img_font_color'])) : '000000');
|
246 |
+
$blog_style_share_buttons_font_size = (isset($_POST['blog_style_share_buttons_font_size']) ? (int) esc_html(stripslashes( $_POST['blog_style_share_buttons_font_size'])) : 20);
|
247 |
+
$blog_style_share_buttons_color = (isset($_POST['blog_style_share_buttons_color']) ? esc_html(stripslashes( $_POST['blog_style_share_buttons_color'])) : 'C7C3C3');
|
248 |
+
$blog_style_share_buttons_bg_transparent = (isset($_POST['blog_style_share_buttons_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['blog_style_share_buttons_bg_transparent'])) : 0);
|
249 |
+
|
250 |
+
$image_browser_margin = (isset($_POST['image_browser_margin']) ? esc_html(stripslashes( $_POST['image_browser_margin'])) : '');
|
251 |
+
$image_browser_padding = (isset($_POST['image_browser_padding']) ? esc_html(stripslashes( $_POST['image_browser_padding'])) : '');
|
252 |
+
$image_browser_border_radius = (isset($_POST['image_browser_border_radius']) ? esc_html(stripslashes( $_POST['image_browser_border_radius'])) :'');
|
253 |
+
$image_browser_border_width = (isset($_POST['image_browser_border_width']) ? (int) esc_html(stripslashes( $_POST['image_browser_border_width'])) : 1);
|
254 |
+
$image_browser_border_style = (isset($_POST['image_browser_border_style']) ? esc_html(stripslashes( $_POST['image_browser_border_style'])) : 'solid');
|
255 |
+
$image_browser_border_color = (isset($_POST['image_browser_border_color']) ? esc_html(stripslashes( $_POST['image_browser_border_color'])) : '000000');
|
256 |
+
$image_browser_bg_color = (isset($_POST['image_browser_bg_color']) ? esc_html(stripslashes( $_POST['image_browser_bg_color'])) : 'FFFFFF');
|
257 |
+
$image_browser_box_shadow = (isset($_POST['image_browser_box_shadow']) ? esc_html(stripslashes( $_POST['image_browser_box_shadow'])) : '');
|
258 |
+
$image_browser_transparent = (isset($_POST['image_browser_transparent']) ? (int) esc_html(stripslashes( $_POST['image_browser_transparent'])) : 0);
|
259 |
+
$image_browser_align = (isset($_POST['image_browser_align']) ? esc_html(stripslashes( $_POST['image_browser_align'])) : '');
|
260 |
+
$image_browser_image_description_margin = (isset($_POST['image_browser_image_description_margin']) ? esc_html(stripslashes( $_POST['image_browser_image_description_margin'])) : '');
|
261 |
+
$image_browser_image_description_padding = (isset($_POST['image_browser_image_description_padding']) ? esc_html(stripslashes( $_POST['image_browser_image_description_padding'])) : '');
|
262 |
+
$image_browser_image_description_border_radius = (isset($_POST['image_browser_image_description_border_radius']) ? esc_html(stripslashes( $_POST['image_browser_image_description_border_radius'])) :'');
|
263 |
+
$image_browser_image_description_border_width = (isset($_POST['image_browser_image_description_border_width']) ? (int) esc_html(stripslashes( $_POST['image_browser_image_description_border_width'])) : 1);
|
264 |
+
$image_browser_image_description_border_style = (isset($_POST['image_browser_image_description_border_style']) ? esc_html(stripslashes( $_POST['image_browser_image_description_border_style'])) : 'solid');
|
265 |
+
$image_browser_image_description_border_color = (isset($_POST['image_browser_image_description_border_color']) ? esc_html(stripslashes( $_POST['image_browser_image_description_border_color'])) : '000000');
|
266 |
+
$image_browser_image_description_bg_color = (isset($_POST['image_browser_image_description_bg_color']) ? esc_html(stripslashes( $_POST['image_browser_image_description_bg_color'])) : 'FFFFFF');
|
267 |
+
$image_browser_image_description_align = (isset($_POST['image_browser_image_description_align']) ? esc_html(stripslashes( $_POST['image_browser_image_description_align'])) : '');
|
268 |
+
$image_browser_img_font_size = (isset($_POST['image_browser_img_font_size']) ? (int) esc_html(stripslashes( $_POST['image_browser_img_font_size'])) : 1);
|
269 |
+
$image_browser_img_font_family = (isset($_POST['image_browser_img_font_family']) ? esc_html(stripslashes( $_POST['image_browser_img_font_family'])) : 'cursive');
|
270 |
+
$image_browser_img_font_color = (isset($_POST['image_browser_img_font_color']) ? esc_html(stripslashes( $_POST['image_browser_img_font_color'])) : '000000');
|
271 |
+
$image_browser_full_padding = (isset($_POST['image_browser_full_padding']) ? esc_html(stripslashes( $_POST['image_browser_full_padding'])) : '');
|
272 |
+
$image_browser_full_border_radius = (isset($_POST['image_browser_full_border_radius']) ? esc_html(stripslashes( $_POST['image_browser_full_border_radius'])) :'');
|
273 |
+
$image_browser_full_border_width = (isset($_POST['image_browser_full_border_width']) ? (int) esc_html(stripslashes( $_POST['image_browser_full_border_width'])) : 1);
|
274 |
+
$image_browser_full_border_style = (isset($_POST['image_browser_full_border_style']) ? esc_html(stripslashes( $_POST['image_browser_full_border_style'])) : 'solid');
|
275 |
+
$image_browser_full_border_color = (isset($_POST['image_browser_full_border_color']) ? esc_html(stripslashes( $_POST['image_browser_full_border_color'])) : '000000');
|
276 |
+
$image_browser_full_bg_color = (isset($_POST['image_browser_full_bg_color']) ? esc_html(stripslashes( $_POST['image_browser_full_bg_color'])) : 'FFFFFF');
|
277 |
+
$image_browser_full_transparent = (isset($_POST['image_browser_full_transparent']) ? (int) esc_html(stripslashes( $_POST['image_browser_full_transparent'])) : 0);
|
278 |
+
|
279 |
+
$album_compact_title_margin = (isset($_POST['album_compact_title_margin']) ? esc_html(stripslashes( $_POST['album_compact_title_margin'])) : '');
|
280 |
+
$album_compact_title_font_style = (isset($_POST['album_compact_title_font_style']) ? esc_html(stripslashes( $_POST['album_compact_title_font_style'])) : 'inherit');
|
281 |
+
$album_compact_thumb_title_pos = (isset($_POST['album_compact_thumb_title_pos']) ? esc_html(stripslashes( $_POST['album_compact_thumb_title_pos'])) :'bottom');
|
282 |
+
$album_compact_title_font_color = (isset($_POST['album_compact_title_font_color']) ? esc_html(stripslashes( $_POST['album_compact_title_font_color'])) : 'CCCCCC');
|
283 |
+
$album_compact_title_shadow = (isset($_POST['album_compact_title_shadow']) ? esc_html(stripslashes( $_POST['album_compact_title_shadow'])) : '');
|
284 |
+
$album_compact_title_font_size = (isset($_POST['album_compact_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_compact_title_font_size'])) : 12);
|
285 |
+
$album_compact_title_font_weight = (isset($_POST['album_compact_title_font_weight']) ? esc_html(stripslashes( $_POST['album_compact_title_font_weight'])) : 'normal');
|
286 |
+
$album_compact_thumb_margin = (isset($_POST['album_compact_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_margin'])) : 0);
|
287 |
+
$album_compact_back_padding = (isset($_POST['album_compact_back_padding']) ? esc_html(stripslashes( $_POST['album_compact_back_padding'])) : '');
|
288 |
+
$album_compact_thumb_padding = (isset($_POST['album_compact_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_padding'])) : 0);
|
289 |
+
$album_compact_thumb_border_radius = (isset($_POST['album_compact_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_compact_thumb_border_radius'])) :'');
|
290 |
+
$album_compact_thumb_border_width = (isset($_POST['album_compact_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_border_width'])) : 1);
|
291 |
+
$album_compact_back_font_color = (isset($_POST['album_compact_back_font_color']) ? esc_html(stripslashes( $_POST['album_compact_back_font_color'])) : '000000');
|
292 |
+
$album_compact_thumb_bg_transparent = (isset($_POST['album_compact_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_bg_transparent'])) : 0);
|
293 |
+
$album_compact_thumb_box_shadow = (isset($_POST['album_compact_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_compact_thumb_box_shadow'])) : '');
|
294 |
+
$album_compact_thumb_transition = (isset($_POST['album_compact_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_transition'])) : 1);
|
295 |
+
$album_compact_thumb_border_style = (isset($_POST['album_compact_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_compact_thumb_border_style'])) : 'solid');
|
296 |
+
$album_compact_thumb_border_color = (isset($_POST['album_compact_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_compact_thumb_border_color'])) : '000000');
|
297 |
+
$album_compact_thumb_bg_color = (isset($_POST['album_compact_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_compact_thumb_bg_color'])) : 'FFFFFF');
|
298 |
+
$album_compact_back_font_weight = (isset($_POST['album_compact_back_font_weight']) ? esc_html(stripslashes( $_POST['album_compact_back_font_weight'])) : 'normal');
|
299 |
+
$album_compact_back_font_size = (isset($_POST['album_compact_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_compact_back_font_size'])) : 12);
|
300 |
+
$album_compact_back_font_style = (isset($_POST['album_compact_back_font_style']) ? esc_html(stripslashes( $_POST['album_compact_back_font_style'])) : 'inherit');
|
301 |
+
$album_compact_thumbs_bg_color = (isset($_POST['album_compact_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_compact_thumbs_bg_color'])) : 'FFFFFF');
|
302 |
+
$album_compact_thumb_align = (isset($_POST['album_compact_thumb_align']) ? esc_html(stripslashes( $_POST['album_compact_thumb_align'])) : 'center');
|
303 |
+
$album_compact_thumb_hover_effect = (isset($_POST['album_compact_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_compact_thumb_hover_effect'])) :'skew');
|
304 |
+
$album_compact_thumb_transparent = (isset($_POST['album_compact_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_compact_thumb_transparent'])) : 80);
|
305 |
+
$album_compact_thumb_hover_effect_value = (isset($_POST['album_compact_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_compact_thumb_hover_effect_value'])) : '35deg');
|
306 |
+
$album_extended_thumb_margin = (isset($_POST['album_extended_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_margin'])) : 0);
|
307 |
+
$album_extended_thumb_padding = (isset($_POST['album_extended_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_padding'])) : 0);
|
308 |
+
$album_extended_thumb_border_radius = (isset($_POST['album_extended_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_thumb_border_radius'])) : '');
|
309 |
+
$album_extended_thumb_border_width = (isset($_POST['album_extended_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_border_width'])) :1);
|
310 |
+
$album_extended_thumb_border_style = (isset($_POST['album_extended_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_extended_thumb_border_style'])) :'solid');
|
311 |
+
$album_extended_thumb_border_color = (isset($_POST['album_extended_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_border_color'])) : '000000');
|
312 |
+
$album_extended_thumb_bg_color = (isset($_POST['album_extended_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_bg_color'])) : 'FFFFFF');
|
313 |
+
$album_extended_thumbs_bg_color = (isset($_POST['album_extended_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_thumbs_bg_color'])) : 'FFFFFF');
|
314 |
+
$album_extended_thumb_bg_transparent = (isset($_POST['album_extended_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_bg_transparent'])) : 80);
|
315 |
+
$album_extended_thumb_box_shadow = (isset($_POST['album_extended_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_extended_thumb_box_shadow'])) : '');
|
316 |
+
$album_extended_thumb_transparent = (isset($_POST['album_extended_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_transparent'])) : 80);
|
317 |
+
$album_extended_thumb_align = (isset($_POST['album_extended_thumb_align']) ? esc_html(stripslashes( $_POST['album_extended_thumb_align'])) : 'center');
|
318 |
+
$album_extended_thumb_hover_effect = (isset($_POST['album_extended_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_extended_thumb_hover_effect'])) : '');
|
319 |
+
$album_extended_thumb_hover_effect_value = (isset($_POST['album_extended_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_extended_thumb_hover_effect_value'])) : '32deg');
|
320 |
+
$album_extended_thumb_transition = (isset($_POST['album_extended_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_transition'])) : 0);
|
321 |
+
$album_extended_back_font_color = (isset($_POST['album_extended_back_font_color']) ? esc_html(stripslashes( $_POST['album_extended_back_font_color'])) : '000000');
|
322 |
+
$album_extended_back_font_style = (isset($_POST['album_extended_back_font_style']) ? esc_html(stripslashes( $_POST['album_extended_back_font_style'])) : 'inherit');
|
323 |
+
$album_extended_back_font_size = (isset($_POST['album_extended_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_back_font_size'])) : 12);
|
324 |
+
$album_extended_back_font_weight = (isset($_POST['album_extended_back_font_weight']) ? esc_html(stripslashes( $_POST['album_extended_back_font_weight'])) : 'normal');
|
325 |
+
$album_extended_back_padding = (isset($_POST['album_extended_back_padding']) ? esc_html(stripslashes( $_POST['album_extended_back_padding'])) : '');
|
326 |
+
$album_extended_div_bg_color = (isset($_POST['album_extended_div_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_div_bg_color'])) : 'FFFFFF');
|
327 |
+
$album_extended_div_bg_transparent = (isset($_POST['album_extended_div_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_extended_div_bg_transparent'])) : 80);
|
328 |
+
$album_extended_div_border_radius = (isset($_POST['album_extended_div_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_div_border_radius'])) : '');
|
329 |
+
$album_extended_div_margin = (isset($_POST['album_extended_div_margin']) ? esc_html(stripslashes( $_POST['album_extended_div_margin'])) : '');
|
330 |
+
$album_extended_div_padding = (isset($_POST['album_extended_div_padding']) ? (int) esc_html(stripslashes( $_POST['album_extended_div_padding'])) : 0);
|
331 |
+
$album_extended_div_separator_width = (isset($_POST['album_extended_div_separator_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_div_separator_width'])) : 1);
|
332 |
+
$album_extended_div_separator_style = (isset($_POST['album_extended_div_separator_style']) ? esc_html(stripslashes( $_POST['album_extended_div_separator_style'])) : 'solid');
|
333 |
+
$album_extended_div_separator_color = (isset($_POST['album_extended_div_separator_color']) ? esc_html(stripslashes( $_POST['album_extended_div_separator_color'])) : '000000');
|
334 |
+
$album_extended_thumb_div_bg_color = (isset($_POST['album_extended_thumb_div_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_bg_color'])) : 'FFFFFF');
|
335 |
+
$album_extended_thumb_div_border_radius = (isset($_POST['album_extended_thumb_div_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_border_radius'])) : '');
|
336 |
+
$album_extended_thumb_div_border_width = (isset($_POST['album_extended_thumb_div_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_thumb_div_border_width'])) : 1);
|
337 |
+
$album_extended_thumb_div_border_style = (isset($_POST['album_extended_thumb_div_border_style']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_border_style'])) : 'solid');
|
338 |
+
$album_extended_thumb_div_border_color = (isset($_POST['album_extended_thumb_div_border_color']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_border_color'])) : '000000');
|
339 |
+
$album_extended_thumb_div_padding = (isset($_POST['album_extended_thumb_div_padding']) ? esc_html(stripslashes( $_POST['album_extended_thumb_div_padding'])) : '');
|
340 |
+
$album_extended_text_div_bg_color = (isset($_POST['album_extended_text_div_bg_color']) ? esc_html(stripslashes( $_POST['album_extended_text_div_bg_color'])) : 'FFFFFF');
|
341 |
+
$album_extended_text_div_border_radius = (isset($_POST['album_extended_text_div_border_radius']) ? esc_html(stripslashes( $_POST['album_extended_text_div_border_radius'])) : '');
|
342 |
+
$album_extended_text_div_border_width = (isset($_POST['album_extended_text_div_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_text_div_border_width'])) : 1);
|
343 |
+
$album_extended_text_div_border_style = (isset($_POST['album_extended_text_div_border_style']) ? esc_html(stripslashes( $_POST['album_extended_text_div_border_style'])) : 'solid');
|
344 |
+
$album_extended_text_div_border_color = (isset($_POST['album_extended_text_div_border_color']) ? esc_html(stripslashes( $_POST['album_extended_text_div_border_color'])) : '000000');
|
345 |
+
$album_extended_text_div_padding = (isset($_POST['album_extended_text_div_padding']) ? esc_html(stripslashes( $_POST['album_extended_text_div_padding'])) : '');
|
346 |
+
$album_extended_title_span_border_width = (isset($_POST['album_extended_title_span_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_title_span_border_width'])) : 1);
|
347 |
+
$album_extended_title_span_border_style = (isset($_POST['album_extended_title_span_border_style']) ? esc_html(stripslashes( $_POST['album_extended_title_span_border_style'])) : 'solid');
|
348 |
+
$album_extended_title_span_border_color = (isset($_POST['album_extended_title_span_border_color']) ? esc_html(stripslashes( $_POST['album_extended_title_span_border_color'])) : '000000');
|
349 |
+
$album_extended_title_font_color = (isset($_POST['album_extended_title_font_color']) ? esc_html(stripslashes( $_POST['album_extended_title_font_color'])) : '000000');
|
350 |
+
$album_extended_title_font_style = (isset($_POST['album_extended_title_font_style']) ? esc_html(stripslashes( $_POST['album_extended_title_font_style'])) : 'inherit');
|
351 |
+
$album_extended_title_font_size = (isset($_POST['album_extended_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_title_font_size'])) : 12);
|
352 |
+
$album_extended_title_font_weight = (isset($_POST['album_extended_title_font_weight']) ? esc_html(stripslashes( $_POST['album_extended_title_font_weight'])) : 'normal');
|
353 |
+
$album_extended_title_margin_bottom = (isset($_POST['album_extended_title_margin_bottom']) ? (int) esc_html(stripslashes( $_POST['album_extended_title_margin_bottom'])) : 0);
|
354 |
+
$album_extended_title_padding = (isset($_POST['album_extended_title_padding']) ? esc_html(stripslashes( $_POST['album_extended_title_padding'])) : '');
|
355 |
+
$album_extended_desc_span_border_width = (isset($_POST['album_extended_desc_span_border_width']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_span_border_width'])) : 1);
|
356 |
+
$album_extended_desc_span_border_style = (isset($_POST['album_extended_desc_span_border_style']) ? esc_html(stripslashes( $_POST['album_extended_desc_span_border_style'])) : 'solid');
|
357 |
+
$album_extended_desc_span_border_color = (isset($_POST['album_extended_desc_span_border_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_span_border_color'])) : '000000');
|
358 |
+
$album_extended_desc_font_color = (isset($_POST['album_extended_desc_font_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_font_color'])) : '000000');
|
359 |
+
$album_extended_desc_font_style = (isset($_POST['album_extended_desc_font_style']) ? esc_html(stripslashes( $_POST['album_extended_desc_font_style'])) : 'inherit');
|
360 |
+
$album_extended_desc_font_size = (isset($_POST['album_extended_desc_font_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_font_size'])) : 12);
|
361 |
+
$album_extended_desc_font_weight = (isset($_POST['album_extended_desc_font_weight']) ? esc_html(stripslashes( $_POST['album_extended_desc_font_weight'])) : 'normal');
|
362 |
+
$album_extended_desc_padding = (isset($_POST['album_extended_desc_padding']) ? esc_html(stripslashes( $_POST['album_extended_desc_padding'])) : '');
|
363 |
+
$album_extended_desc_more_color = (isset($_POST['album_extended_desc_more_color']) ? esc_html(stripslashes( $_POST['album_extended_desc_more_color'])) : '000000');
|
364 |
+
$album_extended_desc_more_size = (isset($_POST['album_extended_desc_more_size']) ? (int) esc_html(stripslashes( $_POST['album_extended_desc_more_size'])) : 12);
|
365 |
+
|
366 |
+
$album_masonry_title_margin = (isset($_POST['album_masonry_title_margin']) ? esc_html(stripslashes( $_POST['album_masonry_title_margin'])) : '');
|
367 |
+
$album_masonry_title_font_style = (isset($_POST['album_masonry_title_font_style']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_style'])) : 'inherit');
|
368 |
+
$album_masonry_thumb_title_pos = (isset($_POST['album_masonry_thumb_title_pos']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_title_pos'])) :'bottom');
|
369 |
+
$album_masonry_title_font_color = (isset($_POST['album_masonry_title_font_color']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_color'])) : 'CCCCCC');
|
370 |
+
$album_masonry_title_shadow = (isset($_POST['album_masonry_title_shadow']) ? esc_html(stripslashes( $_POST['album_masonry_title_shadow'])) : '');
|
371 |
+
$album_masonry_title_font_size = (isset($_POST['album_masonry_title_font_size']) ? (int) esc_html(stripslashes( $_POST['album_masonry_title_font_size'])) : 12);
|
372 |
+
$album_masonry_title_font_weight = (isset($_POST['album_masonry_title_font_weight']) ? esc_html(stripslashes( $_POST['album_masonry_title_font_weight'])) : 'normal');
|
373 |
+
$album_masonry_thumb_margin = (isset($_POST['album_masonry_thumb_margin']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_margin'])) : 0);
|
374 |
+
$album_masonry_back_padding = (isset($_POST['album_masonry_back_padding']) ? esc_html(stripslashes( $_POST['album_masonry_back_padding'])) : '');
|
375 |
+
$album_masonry_thumb_padding = (isset($_POST['album_masonry_thumb_padding']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_padding'])) : 0);
|
376 |
+
$album_masonry_thumb_border_radius = (isset($_POST['album_masonry_thumb_border_radius']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_radius'])) :'');
|
377 |
+
$album_masonry_thumb_border_width = (isset($_POST['album_masonry_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_border_width'])) : 1);
|
378 |
+
$album_masonry_back_font_color = (isset($_POST['album_masonry_back_font_color']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_color'])) : '000000');
|
379 |
+
$album_masonry_thumb_bg_transparent = (isset($_POST['album_masonry_thumb_bg_transparent']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_bg_transparent'])) : 0);
|
380 |
+
$album_masonry_thumb_box_shadow = (isset($_POST['album_masonry_thumb_box_shadow']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_box_shadow'])) : '');
|
381 |
+
$album_masonry_thumb_transition = (isset($_POST['album_masonry_thumb_transition']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_transition'])) : 1);
|
382 |
+
$album_masonry_thumb_border_style = (isset($_POST['album_masonry_thumb_border_style']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_style'])) : 'solid');
|
383 |
+
$album_masonry_thumb_border_color = (isset($_POST['album_masonry_thumb_border_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_border_color'])) : '000000');
|
384 |
+
$album_masonry_thumb_bg_color = (isset($_POST['album_masonry_thumb_bg_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_bg_color'])) : 'FFFFFF');
|
385 |
+
$album_masonry_back_font_weight = (isset($_POST['album_masonry_back_font_weight']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_weight'])) : 'normal');
|
386 |
+
$album_masonry_back_font_size = (isset($_POST['album_masonry_back_font_size']) ? (int) esc_html(stripslashes( $_POST['album_masonry_back_font_size'])) : 12);
|
387 |
+
$album_masonry_back_font_style = (isset($_POST['album_masonry_back_font_style']) ? esc_html(stripslashes( $_POST['album_masonry_back_font_style'])) : 'inherit');
|
388 |
+
$album_masonry_thumbs_bg_color = (isset($_POST['album_masonry_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['album_masonry_thumbs_bg_color'])) : 'FFFFFF');
|
389 |
+
$album_masonry_thumb_align = (isset($_POST['album_masonry_thumb_align']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_align'])) : 'center');
|
390 |
+
$album_masonry_thumb_hover_effect = (isset($_POST['album_masonry_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_hover_effect'])) :'skew');
|
391 |
+
$album_masonry_thumb_transparent = (isset($_POST['album_masonry_thumb_transparent']) ? (int) esc_html(stripslashes( $_POST['album_masonry_thumb_transparent'])) : 80);
|
392 |
+
$album_masonry_thumb_hover_effect_value = (isset($_POST['album_masonry_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['album_masonry_thumb_hover_effect_value'])) : '35deg');
|
393 |
+
|
394 |
+
$slideshow_cont_bg_color = (isset($_POST['slideshow_cont_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_cont_bg_color'])) : 'FFFFFF');
|
395 |
+
$slideshow_close_btn_transparent = (isset($_POST['slideshow_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['slideshow_close_btn_transparent'])) : 80);
|
396 |
+
$slideshow_rl_btn_bg_color = (isset($_POST['slideshow_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_bg_color'])) : 'FFFFFF');
|
397 |
+
$slideshow_rl_btn_border_radius = (isset($_POST['slideshow_rl_btn_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_border_radius'])) : '');
|
398 |
+
$slideshow_rl_btn_border_width = (isset($_POST['slideshow_rl_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_border_width'])) : 1);
|
399 |
+
$slideshow_rl_btn_border_style = (isset($_POST['slideshow_rl_btn_border_style']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_border_style'])) : 'solid');
|
400 |
+
$slideshow_rl_btn_border_color = (isset($_POST['slideshow_rl_btn_border_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_border_color'])) : '000000');
|
401 |
+
$slideshow_rl_btn_box_shadow = (isset($_POST['slideshow_rl_btn_box_shadow']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_box_shadow'])) : '');
|
402 |
+
$slideshow_rl_btn_color = (isset($_POST['slideshow_rl_btn_color']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_color'])) : '000000');
|
403 |
+
$slideshow_rl_btn_height = (isset($_POST['slideshow_rl_btn_height']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_height'])) : 10);
|
404 |
+
$slideshow_rl_btn_size = (isset($_POST['slideshow_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_size'])) : 13);
|
405 |
+
$slideshow_rl_btn_width = (isset($_POST['slideshow_rl_btn_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_rl_btn_width'])) : 30);
|
406 |
+
$slideshow_close_rl_btn_hover_color = (isset($_POST['slideshow_close_rl_btn_hover_color']) ? esc_html(stripslashes( $_POST['slideshow_close_rl_btn_hover_color'])) : 'FFFFFF');
|
407 |
+
$slideshow_filmstrip_pos = (isset($_POST['slideshow_filmstrip_pos']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_pos'])) : 'top');
|
408 |
+
$slideshow_filmstrip_thumb_border_width = (isset($_POST['slideshow_filmstrip_thumb_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_width'])) : 1);
|
409 |
+
$slideshow_filmstrip_thumb_border_style = (isset($_POST['slideshow_filmstrip_thumb_border_style']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_style'])) : 'solid');
|
410 |
+
$slideshow_filmstrip_thumb_border_color = (isset($_POST['slideshow_filmstrip_thumb_border_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_color'])) : '000000');
|
411 |
+
$slideshow_filmstrip_thumb_border_radius = (isset($_POST['slideshow_filmstrip_thumb_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_border_radius'])) : '');
|
412 |
+
$slideshow_filmstrip_thumb_margin = (isset($_POST['slideshow_filmstrip_thumb_margin']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_margin'])) : '');
|
413 |
+
$slideshow_filmstrip_thumb_active_border_width = (isset($_POST['slideshow_filmstrip_thumb_active_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_active_border_width'])) : 1);
|
414 |
+
$slideshow_filmstrip_thumb_active_border_color = (isset($_POST['slideshow_filmstrip_thumb_active_border_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_active_border_color'])) : '000000');
|
415 |
+
$slideshow_filmstrip_thumb_deactive_transparent = (isset($_POST['slideshow_filmstrip_thumb_deactive_transparent']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_thumb_deactive_transparent'])) : 80);
|
416 |
+
$slideshow_filmstrip_rl_bg_color = (isset($_POST['slideshow_filmstrip_rl_bg_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_rl_bg_color'])) : 'FFFFFF');
|
417 |
+
$slideshow_filmstrip_rl_btn_color = (isset($_POST['slideshow_filmstrip_rl_btn_color']) ? esc_html(stripslashes( $_POST['slideshow_filmstrip_rl_btn_color'])) : 'FFFFFF');
|
418 |
+
$slideshow_filmstrip_rl_btn_size = (isset($_POST['slideshow_filmstrip_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_filmstrip_rl_btn_size'])) : 15);
|
419 |
+
$slideshow_title_font_size = (isset($_POST['slideshow_title_font_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_title_font_size'])) : 15);
|
420 |
+
$slideshow_title_font = (isset($_POST['slideshow_title_font']) ? esc_html(stripslashes( $_POST['slideshow_title_font'])) : 'cursive');
|
421 |
+
$slideshow_title_color = (isset($_POST['slideshow_title_color']) ? esc_html(stripslashes( $_POST['slideshow_title_color'])) : '000000');
|
422 |
+
$slideshow_title_opacity = (isset($_POST['slideshow_title_opacity']) ? (int) esc_html(stripslashes( $_POST['slideshow_title_opacity'])) : 80);
|
423 |
+
$slideshow_title_border_radius = (isset($_POST['slideshow_title_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_title_border_radius'])) : '');
|
424 |
+
$slideshow_title_background_color = (isset($_POST['slideshow_title_background_color']) ? esc_html(stripslashes( $_POST['slideshow_title_background_color'])) : 'FFFFFF');
|
425 |
+
$slideshow_title_padding = (isset($_POST['slideshow_title_padding']) ? esc_html(stripslashes( $_POST['slideshow_title_padding'])) : '');
|
426 |
+
$slideshow_description_font_size = (isset($_POST['slideshow_description_font_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_description_font_size'])) : 15);
|
427 |
+
$slideshow_description_font = (isset($_POST['slideshow_description_font']) ? esc_html(stripslashes( $_POST['slideshow_description_font'])) : 'cursive');
|
428 |
+
$slideshow_description_color = (isset($_POST['slideshow_description_color']) ? esc_html(stripslashes( $_POST['slideshow_description_color'])) : '000000');
|
429 |
+
$slideshow_description_opacity = (isset($_POST['slideshow_description_opacity']) ? (int) esc_html(stripslashes( $_POST['slideshow_description_opacity'])) : 80);
|
430 |
+
$slideshow_description_border_radius = (isset($_POST['slideshow_description_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_description_border_radius'])) : '');
|
431 |
+
$slideshow_description_background_color = (isset($_POST['slideshow_description_background_color']) ? esc_html(stripslashes( $_POST['slideshow_description_background_color'])) : 'FFFFFF');
|
432 |
+
$slideshow_description_padding = (isset($_POST['slideshow_description_padding']) ? esc_html(stripslashes( $_POST['slideshow_description_padding'])) : '');
|
433 |
+
$slideshow_dots_width = (isset($_POST['slideshow_dots_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_width'])) : 5);
|
434 |
+
$slideshow_dots_height = (isset($_POST['slideshow_dots_height']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_height'])) : 5);
|
435 |
+
$slideshow_dots_border_radius = (isset($_POST['slideshow_dots_border_radius']) ? esc_html(stripslashes( $_POST['slideshow_dots_border_radius'])) : '');
|
436 |
+
$slideshow_dots_background_color = (isset($_POST['slideshow_dots_background_color']) ? esc_html(stripslashes( $_POST['slideshow_dots_background_color'])) : 'FFFFFF');
|
437 |
+
$slideshow_dots_margin = (isset($_POST['slideshow_dots_margin']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_margin'])) : 0);
|
438 |
+
$slideshow_dots_active_background_color = (isset($_POST['slideshow_dots_active_background_color']) ? esc_html(stripslashes( $_POST['slideshow_dots_active_background_color'])) : 'FFFFFF');
|
439 |
+
$slideshow_dots_active_border_width = (isset($_POST['slideshow_dots_active_border_width']) ? (int) esc_html(stripslashes( $_POST['slideshow_dots_active_border_width'])) : 1);
|
440 |
+
$slideshow_dots_active_border_color = (isset($_POST['slideshow_dots_active_border_color']) ? esc_html(stripslashes( $_POST['slideshow_dots_active_border_color'])) : '000000');
|
441 |
+
$slideshow_play_pause_btn_size = (isset($_POST['slideshow_play_pause_btn_size']) ? (int) esc_html(stripslashes( $_POST['slideshow_play_pause_btn_size'])) : 15);
|
442 |
+
$slideshow_rl_btn_style = (isset($_POST['slideshow_rl_btn_style']) ? esc_html(stripslashes( $_POST['slideshow_rl_btn_style'])) : 'fa-chevron');
|
443 |
+
|
444 |
+
$masonry_thumb_padding = (isset($_POST['masonry_thumb_padding']) ? esc_html(stripslashes( $_POST['masonry_thumb_padding'])) : 4);
|
445 |
+
$masonry_thumb_border_radius = (isset($_POST['masonry_thumb_border_radius']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_radius'])) : '2px');
|
446 |
+
$masonry_thumb_border_width = (isset($_POST['masonry_thumb_border_width']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_width'])) : 1);
|
447 |
+
$masonry_thumb_border_style = (isset($_POST['masonry_thumb_border_style']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_style'])) : 'solid');
|
448 |
+
$masonry_thumb_border_color = (isset($_POST['masonry_thumb_border_color']) ? esc_html(stripslashes( $_POST['masonry_thumb_border_color'])) : 'CCCCCC');
|
449 |
+
$masonry_thumbs_bg_color = (isset($_POST['masonry_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['masonry_thumbs_bg_color'])) : 'FFFFFF');
|
450 |
+
$masonry_thumb_bg_transparent = (isset($_POST['masonry_thumb_bg_transparent']) ? esc_html(stripslashes( $_POST['masonry_thumb_bg_transparent'])) : 0);
|
451 |
+
$masonry_thumb_transparent = (isset($_POST['masonry_thumb_transparent']) ? esc_html(stripslashes( $_POST['masonry_thumb_transparent'])) : 100);
|
452 |
+
$masonry_thumb_align = (isset($_POST['masonry_thumb_align']) ? esc_html(stripslashes( $_POST['masonry_thumb_align'])) : 'left');
|
453 |
+
$masonry_thumb_hover_effect = (isset($_POST['masonry_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['masonry_thumb_hover_effect'])) : 'scale');
|
454 |
+
$masonry_thumb_hover_effect_value = (isset($_POST['masonry_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['masonry_thumb_hover_effect_value'])) : '1.3');
|
455 |
+
$masonry_thumb_transition = (isset($_POST['masonry_thumb_transition']) ? esc_html(stripslashes( $_POST['masonry_thumb_transition'])) : 0);
|
456 |
+
|
457 |
+
$mosaic_thumb_padding = (isset($_POST['mosaic_thumb_padding']) ? esc_html(stripslashes( $_POST['mosaic_thumb_padding'])) : 4);
|
458 |
+
$mosaic_thumb_border_radius = (isset($_POST['mosaic_thumb_border_radius']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_radius'])) : '2px');
|
459 |
+
$mosaic_thumb_border_width = (isset($_POST['mosaic_thumb_border_width']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_width'])) : 1);
|
460 |
+
$mosaic_thumb_border_style = (isset($_POST['mosaic_thumb_border_style']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_style'])) : 'solid');
|
461 |
+
$mosaic_thumb_border_color = (isset($_POST['mosaic_thumb_border_color']) ? esc_html(stripslashes( $_POST['mosaic_thumb_border_color'])) : 'CCCCCC');
|
462 |
+
$mosaic_thumbs_bg_color = (isset($_POST['mosaic_thumbs_bg_color']) ? esc_html(stripslashes( $_POST['mosaic_thumbs_bg_color'])) : 'FFFFFF');
|
463 |
+
$mosaic_thumb_bg_transparent = (isset($_POST['mosaic_thumb_bg_transparent']) ? esc_html(stripslashes( $_POST['mosaic_thumb_bg_transparent'])) : 0);
|
464 |
+
$mosaic_thumb_transparent = (isset($_POST['mosaic_thumb_transparent']) ? esc_html(stripslashes( $_POST['mosaic_thumb_transparent'])) : 100);
|
465 |
+
$mosaic_thumb_align = (isset($_POST['mosaic_thumb_align']) ? esc_html(stripslashes( $_POST['mosaic_thumb_align'])) : 'left');
|
466 |
+
$mosaic_thumb_hover_effect = (isset($_POST['mosaic_thumb_hover_effect']) ? esc_html(stripslashes( $_POST['mosaic_thumb_hover_effect'])) : 'scale');
|
467 |
+
$mosaic_thumb_hover_effect_value = (isset($_POST['mosaic_thumb_hover_effect_value']) ? esc_html(stripslashes( $_POST['mosaic_thumb_hover_effect_value'])) : '1.3');
|
468 |
+
$mosaic_thumb_title_margin = (isset($_POST['mosaic_thumb_title_margin']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_margin'])) : '');
|
469 |
+
$mosaic_thumb_title_font_style = (isset($_POST['mosaic_thumb_title_font_style']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_style'])) : 'inherit');
|
470 |
+
$mosaic_thumb_title_font_color = (isset($_POST['mosaic_thumb_title_font_color']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_color'])) : 'CCCCCC');
|
471 |
+
$mosaic_thumb_title_shadow = (isset($_POST['mosaic_thumb_title_shadow']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_shadow'])) : '');
|
472 |
+
$mosaic_thumb_title_font_size = (isset($_POST['mosaic_thumb_title_font_size']) ? (int) esc_html(stripslashes( $_POST['mosaic_thumb_title_font_size'])) : 12);
|
473 |
+
$mosaic_thumb_title_font_weight = (isset($_POST['mosaic_thumb_title_font_weight']) ? esc_html(stripslashes( $_POST['mosaic_thumb_title_font_weight'])) : 'normal');
|
474 |
+
$lightbox_info_pos = (isset($_POST['lightbox_info_pos']) ? esc_html(stripslashes( $_POST['lightbox_info_pos'])) : 'top');
|
475 |
+
$lightbox_info_align = (isset($_POST['lightbox_info_align']) ? esc_html(stripslashes( $_POST['lightbox_info_align'])) : 'right');
|
476 |
+
$lightbox_info_bg_color = (isset($_POST['lightbox_info_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_info_bg_color'])) : '000000');
|
477 |
+
$lightbox_info_bg_transparent = (isset($_POST['lightbox_info_bg_transparent']) ? esc_html(stripslashes( $_POST['lightbox_info_bg_transparent'])) : 70);
|
478 |
+
$lightbox_info_border_width = (isset($_POST['lightbox_info_border_width']) ? esc_html(stripslashes( $_POST['lightbox_info_border_width'])) : 1);
|
479 |
+
$lightbox_info_border_style = (isset($_POST['lightbox_info_border_style']) ? esc_html(stripslashes( $_POST['lightbox_info_border_style'])) : 'none');
|
480 |
+
$lightbox_info_border_color = (isset($_POST['lightbox_info_border_color']) ? esc_html(stripslashes( $_POST['lightbox_info_border_color'])) : '000000');
|
481 |
+
$lightbox_info_border_radius = (isset($_POST['lightbox_info_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_info_border_radius'])) : 5);
|
482 |
+
$lightbox_info_padding = (isset($_POST['lightbox_info_padding']) ? esc_html(stripslashes( $_POST['lightbox_info_padding'])) : '5px');
|
483 |
+
$lightbox_info_margin = (isset($_POST['lightbox_info_margin']) ? esc_html(stripslashes( $_POST['lightbox_info_margin'])) : '15px');
|
484 |
+
$lightbox_title_color = (isset($_POST['lightbox_title_color']) ? esc_html(stripslashes( $_POST['lightbox_title_color'])) : 'FFFFFF');
|
485 |
+
$lightbox_title_font_style = (isset($_POST['lightbox_title_font_style']) ? esc_html(stripslashes( $_POST['lightbox_title_font_style'])) : 'segoe ui');
|
486 |
+
$lightbox_title_font_weight = (isset($_POST['lightbox_title_font_weight']) ? esc_html(stripslashes( $_POST['lightbox_title_font_weight'])) : 'bold');
|
487 |
+
$lightbox_title_font_size = (isset($_POST['lightbox_title_font_size']) ? esc_html(stripslashes( $_POST['lightbox_title_font_size'])) : 18);
|
488 |
+
$lightbox_description_color = (isset($_POST['lightbox_description_color']) ? esc_html(stripslashes( $_POST['lightbox_description_color'])) : 'FFFFFF');
|
489 |
+
$lightbox_description_font_style = (isset($_POST['lightbox_description_font_style']) ? esc_html(stripslashes( $_POST['lightbox_description_font_style'])) : 'segoe ui');
|
490 |
+
$lightbox_description_font_weight = (isset($_POST['lightbox_description_font_weight']) ? esc_html(stripslashes( $_POST['lightbox_description_font_weight'])) : 'normal');
|
491 |
+
$lightbox_description_font_size = (isset($_POST['lightbox_description_font_size']) ? esc_html(stripslashes( $_POST['lightbox_description_font_size'])) : 14);
|
492 |
+
$lightbox_rate_pos = (isset($_POST['lightbox_rate_pos']) ? esc_html(stripslashes( $_POST['lightbox_rate_pos'])) : 'bottom');
|
493 |
+
$lightbox_rate_align = (isset($_POST['lightbox_rate_align']) ? esc_html(stripslashes( $_POST['lightbox_rate_align'])) : 'right');
|
494 |
+
$lightbox_rate_icon = (isset($_POST['lightbox_rate_icon']) ? esc_html(stripslashes( $_POST['lightbox_rate_icon'])) : 'star');
|
495 |
+
$lightbox_rate_color = (isset($_POST['lightbox_rate_color']) ? esc_html(stripslashes( $_POST['lightbox_rate_color'])) : 'F9D062');
|
496 |
+
$lightbox_rate_size = (isset($_POST['lightbox_rate_size']) ? esc_html(stripslashes( $_POST['lightbox_rate_size'])) : 20);
|
497 |
+
$lightbox_rate_stars_count = (isset($_POST['lightbox_rate_stars_count']) ? esc_html(stripslashes( $_POST['lightbox_rate_stars_count'])) : 5);
|
498 |
+
$lightbox_rate_padding = (isset($_POST['lightbox_rate_padding']) ? esc_html(stripslashes( $_POST['lightbox_rate_padding'])) : '15px');
|
499 |
+
$lightbox_rate_hover_color = (isset($_POST['lightbox_rate_hover_color']) ? esc_html(stripslashes( $_POST['lightbox_rate_hover_color'])) : 'F7B50E');
|
500 |
+
|
501 |
+
$lightbox_hit_pos = (isset($_POST['lightbox_hit_pos']) ? esc_html(stripslashes( $_POST['lightbox_hit_pos'])) : 'bottom');
|
502 |
+
$lightbox_hit_align = (isset($_POST['lightbox_hit_align']) ? esc_html(stripslashes( $_POST['lightbox_hit_align'])) : 'left');
|
503 |
+
$lightbox_hit_bg_color = (isset($_POST['lightbox_hit_bg_color']) ? esc_html(stripslashes( $_POST['lightbox_hit_bg_color'])) : '000000');
|
504 |
+
$lightbox_hit_bg_transparent = (isset($_POST['lightbox_hit_bg_transparent']) ? esc_html(stripslashes( $_POST['lightbox_hit_bg_transparent'])) : 70);
|
505 |
+
$lightbox_hit_border_width = (isset($_POST['lightbox_hit_border_width']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_width'])) : 1);
|
506 |
+
$lightbox_hit_border_style = (isset($_POST['lightbox_hit_border_style']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_style'])) : 'none');
|
507 |
+
$lightbox_hit_border_color = (isset($_POST['lightbox_hit_border_color']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_color'])) : '000000');
|
508 |
+
$lightbox_hit_border_radius = (isset($_POST['lightbox_hit_border_radius']) ? esc_html(stripslashes( $_POST['lightbox_hit_border_radius'])) : 5);
|
509 |
+
$lightbox_hit_padding = (isset($_POST['lightbox_hit_padding']) ? esc_html(stripslashes( $_POST['lightbox_hit_padding'])) : '5px');
|
510 |
+
$lightbox_hit_margin = (isset($_POST['lightbox_hit_margin']) ? esc_html(stripslashes( $_POST['lightbox_hit_margin'])) : '0 5px');
|
511 |
+
$lightbox_hit_color = (isset($_POST['lightbox_hit_color']) ? esc_html(stripslashes( $_POST['lightbox_hit_color'])) : 'FFFFFF');
|
512 |
+
$lightbox_hit_font_style = (isset($_POST['lightbox_hit_font_style']) ? esc_html(stripslashes( $_POST['lightbox_hit_font_style'])) : 'segoe ui');
|
513 |
+
$lightbox_hit_font_weight = (isset($_POST['lightbox_hit_font_weight']) ? esc_html(stripslashes( $_POST['lightbox_hit_font_weight'])) : 'normal');
|
514 |
+
$lightbox_hit_font_size = (isset($_POST['lightbox_hit_font_size']) ? esc_html(stripslashes( $_POST['lightbox_hit_font_size'])) : 14);
|
515 |
+
$masonry_description_font_size = (isset($_POST['masonry_description_font_size']) ? (int) esc_html(stripslashes( $_POST['masonry_description_font_size'])) : 12);
|
516 |
+
$masonry_description_color = (isset($_POST['masonry_description_color']) ? esc_html(stripslashes( $_POST['masonry_description_color'])) : 'CCCCCC');
|
517 |
+
$masonry_description_font_style = (isset($_POST['masonry_description_font_style']) ? esc_html(stripslashes( $_POST['masonry_description_font_style'])) : 'segoe ui');
|
518 |
+
//carousel
|
519 |
+
$carousel_cont_bg_color = (isset($_POST['carousel_cont_bg_color']) ? esc_html(stripslashes( $_POST['carousel_cont_bg_color'])) : 'FFFFFF');
|
520 |
+
$carousel_cont_btn_transparent = (isset($_POST['carousel_cont_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['carousel_cont_btn_transparent'])) : 0);
|
521 |
+
$carousel_close_btn_transparent = (isset($_POST['carousel_close_btn_transparent']) ? (int) esc_html(stripslashes( $_POST['carousel_close_btn_transparent'])) : 80);
|
522 |
+
$carousel_rl_btn_bg_color = (isset($_POST['carousel_rl_btn_bg_color']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_bg_color'])) : 'CCCCCC');
|
523 |
+
$carousel_rl_btn_border_radius = (isset($_POST['carousel_rl_btn_border_radius']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_border_radius'])) : '');
|
524 |
+
$carousel_rl_btn_border_width = (isset($_POST['carousel_rl_btn_border_width']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_border_width'])) : 1);
|
525 |
+
$carousel_rl_btn_border_style = (isset($_POST['carousel_rl_btn_border_style']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_border_style'])) : 'solid');
|
526 |
+
$carousel_rl_btn_border_color = (isset($_POST['carousel_rl_btn_border_color']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_border_color'])) : '000000');
|
527 |
+
$carousel_rl_btn_color = (isset($_POST['carousel_rl_btn_color']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_color'])) : 'FFFFFF');
|
528 |
+
$carousel_rl_btn_height = (isset($_POST['carousel_rl_btn_height']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_height'])) : 10);
|
529 |
+
$carousel_rl_btn_size = (isset($_POST['carousel_rl_btn_size']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_size'])) : 20);
|
530 |
+
$carousel_play_pause_btn_size = (isset($_POST['carousel_play_pause_btn_size']) ? (int) esc_html(stripslashes( $_POST['carousel_play_pause_btn_size'])) : 20);
|
531 |
+
$carousel_rl_btn_width = (isset($_POST['carousel_rl_btn_width']) ? (int) esc_html(stripslashes( $_POST['carousel_rl_btn_width'])) : 30);
|
532 |
+
$carousel_close_rl_btn_hover_color = (isset($_POST['carousel_close_rl_btn_hover_color']) ? esc_html(stripslashes( $_POST['carousel_close_rl_btn_hover_color'])) : 'FFFFFF');
|
533 |
+
$carousel_rl_btn_style = (isset($_POST['carousel_rl_btn_style']) ? esc_html(stripslashes( $_POST['carousel_rl_btn_style'])) : 'fa-chevron');
|
534 |
+
$carousel_mergin_bottom = (isset($_POST['carousel_mergin_bottom']) ? esc_html(stripslashes( $_POST['carousel_mergin_bottom'])) : '1');
|
535 |
+
$carousel_font_family = (isset($_POST['carousel_font_family']) ? esc_html(stripslashes( $_POST['carousel_font_family'])) : 'Arial');
|
536 |
+
$carousel_feature_border_width = (isset($_POST['carousel_feature_border_width']) ? (int) esc_html(stripslashes( $_POST['carousel_feature_border_width'])) : 2);
|
537 |
+
$carousel_feature_border_style = (isset($_POST['carousel_feature_border_style']) ? esc_html(stripslashes( $_POST['carousel_feature_border_style'])) : 'solid');
|
538 |
+
$carousel_feature_border_color = (isset($_POST['carousel_feature_border_color']) ? esc_html(stripslashes( $_POST['carousel_feature_border_color'])) : '5D204F');
|
539 |
+
$carousel_caption_background_color = (isset($_POST['carousel_caption_background_color']) ? esc_html(stripslashes( $_POST['carousel_caption_background_color'])) : '000000');
|
540 |
+
$carousel_caption_bottom = (isset($_POST['carousel_caption_bottom']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_bottom'])) : 0);
|
541 |
+
$carousel_caption_p_mergin = (isset($_POST['carousel_caption_p_mergin']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_p_mergin'])) : 0);
|
542 |
+
$carousel_caption_p_pedding = (isset($_POST['carousel_caption_p_pedding']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_p_pedding'])) : 5);
|
543 |
+
$carousel_caption_p_font_weight = (isset($_POST['carousel_caption_p_font_weight']) ? esc_html(stripslashes( $_POST['carousel_caption_p_font_weight'])) : 'bold');
|
544 |
+
$carousel_caption_p_font_size = (isset($_POST['carousel_caption_p_font_size']) ? (int) esc_html(stripslashes( $_POST['carousel_caption_p_font_size'])) : 14);
|
545 |
+
$carousel_caption_p_color = (isset($_POST['carousel_caption_p_color']) ? esc_html(stripslashes( $_POST['carousel_caption_p_color'])) : '000000');
|
546 |
+
$carousel_title_opacity = (isset($_POST['carousel_title_opacity']) ? (int) esc_html(stripslashes( $_POST['carousel_title_opacity'])) : 100);
|
547 |
+
$carousel_title_border_radius = (isset($_POST['carousel_title_border_radius']) ? esc_html(stripslashes( $_POST['carousel_title_border_radius'])) : '5px');
|
548 |
+
$mosaic_thumb_transition = (isset($_POST['mosaic_thumb_transition']) ? esc_html(stripslashes( $_POST['mosaic_thumb_transition'])) : 1);
|
549 |
+
|
550 |
+
$default_theme = (isset($_POST['default_theme']) ? esc_html(stripslashes( $_POST['default_theme'])) : 0);
|
551 |
+
$themes = array(
|
552 |
+
'thumb_margin' => $thumb_margin,
|
553 |
+
'thumb_padding' => $thumb_padding,
|
554 |
+
'thumb_border_radius' => $thumb_border_radius,
|
555 |
+
'thumb_border_width' => $thumb_border_width,
|
556 |
+
'thumb_border_style' => $thumb_border_style,
|
557 |
+
'thumb_border_color' => $thumb_border_color,
|
558 |
+
'thumb_bg_color' => $thumb_bg_color,
|
559 |
+
'thumbs_bg_color' => $thumbs_bg_color,
|
560 |
+
'thumb_bg_transparent' => $thumb_bg_transparent,
|
561 |
+
'thumb_box_shadow' => $thumb_box_shadow,
|
562 |
+
'thumb_transparent' => $thumb_transparent,
|
563 |
+
'thumb_align' => $thumb_align,
|
564 |
+
'thumb_hover_effect' => $thumb_hover_effect,
|
565 |
+
'thumb_hover_effect_value' => $thumb_hover_effect_value,
|
566 |
+
'thumb_transition' => $thumb_transition,
|
567 |
+
'thumb_title_margin' => $thumb_title_margin,
|
568 |
+
'thumb_title_font_style' => $thumb_title_font_style,
|
569 |
+
'thumb_title_pos' => $thumb_title_pos,
|
570 |
+
'thumb_title_font_color' => $thumb_title_font_color,
|
571 |
+
'thumb_title_shadow' => $thumb_title_shadow,
|
572 |
+
'thumb_title_font_size' => $thumb_title_font_size,
|
573 |
+
'thumb_title_font_weight' => $thumb_title_font_weight,
|
574 |
+
|
575 |
+
'page_nav_position' => $page_nav_position,
|
576 |
+
'page_nav_align' => $page_nav_align,
|
577 |
+
'page_nav_number' => $page_nav_number,
|
578 |
+
'page_nav_font_size' => $page_nav_font_size,
|
579 |
+
'page_nav_font_style' => $page_nav_font_style,
|
580 |
+
'page_nav_font_color' => $page_nav_font_color,
|
581 |
+
'page_nav_font_weight' => $page_nav_font_weight,
|
582 |
+
'page_nav_border_width' => $page_nav_border_width,
|
583 |
+
'page_nav_border_style'=> $page_nav_border_style,
|
584 |
+
'page_nav_border_color' => $page_nav_border_color,
|
585 |
+
'page_nav_border_radius' => $page_nav_border_radius,
|
586 |
+
'page_nav_margin' => $page_nav_margin,
|
587 |
+
'page_nav_padding' => $page_nav_padding,
|
588 |
+
'page_nav_button_bg_color' => $page_nav_button_bg_color,
|
589 |
+
'page_nav_button_bg_transparent' => $page_nav_button_bg_transparent,
|
590 |
+
'page_nav_box_shadow' => $page_nav_box_shadow,
|
591 |
+
'page_nav_button_transition' => $page_nav_button_transition,
|
592 |
+
'page_nav_button_text' => $page_nav_button_text,
|
593 |
+
'lightbox_ctrl_btn_pos' => $lightbox_ctrl_btn_pos,
|
594 |
+
'lightbox_ctrl_btn_align' => $lightbox_ctrl_btn_align,
|
595 |
+
'lightbox_ctrl_btn_height' => $lightbox_ctrl_btn_height,
|
596 |
+
'lightbox_ctrl_btn_margin_top' => $lightbox_ctrl_btn_margin_top,
|
597 |
+
'lightbox_ctrl_btn_margin_left' => $lightbox_ctrl_btn_margin_left,
|
598 |
+
'lightbox_ctrl_btn_transparent' => $lightbox_ctrl_btn_transparent,
|
599 |
+
'lightbox_ctrl_btn_color' => $lightbox_ctrl_btn_color,
|
600 |
+
'lightbox_toggle_btn_height' => $lightbox_toggle_btn_height,
|
601 |
+
'lightbox_toggle_btn_width' => $lightbox_toggle_btn_width,
|
602 |
+
'lightbox_ctrl_cont_bg_color' => $lightbox_ctrl_cont_bg_color,
|
603 |
+
'lightbox_ctrl_cont_border_radius' => $lightbox_ctrl_cont_border_radius,
|
604 |
+
'lightbox_ctrl_cont_transparent' => $lightbox_ctrl_cont_transparent,
|
605 |
+
'lightbox_close_btn_bg_color' => $lightbox_close_btn_bg_color,
|
606 |
+
'lightbox_close_btn_border_radius' => $lightbox_close_btn_border_radius,
|
607 |
+
'lightbox_close_btn_border_width' => $lightbox_close_btn_border_width,
|
608 |
+
'lightbox_close_btn_border_style' => $lightbox_close_btn_border_style,
|
609 |
+
'lightbox_close_btn_border_color' => $lightbox_close_btn_border_color,
|
610 |
+
'lightbox_close_btn_box_shadow' => $lightbox_close_btn_box_shadow,
|
611 |
+
'lightbox_close_btn_color' => $lightbox_close_btn_color,
|
612 |
+
'lightbox_close_btn_size' => $lightbox_close_btn_size,
|
613 |
+
'lightbox_close_btn_width' => $lightbox_close_btn_width,
|
614 |
+
'lightbox_close_btn_height' => $lightbox_close_btn_height,
|
615 |
+
'lightbox_close_btn_top' => $lightbox_close_btn_top,
|
616 |
+
'lightbox_close_btn_right' => $lightbox_close_btn_right,
|
617 |
+
'lightbox_close_btn_full_color' => $lightbox_close_btn_full_color,
|
618 |
+
'lightbox_close_btn_transparent' => $lightbox_close_btn_transparent,
|
619 |
+
'lightbox_rl_btn_bg_color' => $lightbox_rl_btn_bg_color,
|
620 |
+
'lightbox_rl_btn_transparent' => $lightbox_rl_btn_transparent,
|
621 |
+
'lightbox_rl_btn_border_radius' => $lightbox_rl_btn_border_radius,
|
622 |
+
'lightbox_rl_btn_border_width' => $lightbox_rl_btn_border_width,
|
623 |
+
'lightbox_rl_btn_border_style' => $lightbox_rl_btn_border_style,
|
624 |
+
'lightbox_rl_btn_border_color' => $lightbox_rl_btn_border_color,
|
625 |
+
'lightbox_rl_btn_box_shadow' => $lightbox_rl_btn_box_shadow,
|
626 |
+
'lightbox_rl_btn_color' => $lightbox_rl_btn_color,
|
627 |
+
'lightbox_rl_btn_height' => $lightbox_rl_btn_height,
|
628 |
+
'lightbox_rl_btn_width' => $lightbox_rl_btn_width,
|
629 |
+
'lightbox_rl_btn_size' => $lightbox_rl_btn_size,
|
630 |
+
'lightbox_close_rl_btn_hover_color' => $lightbox_close_rl_btn_hover_color,
|
631 |
+
'lightbox_comment_pos' => $lightbox_comment_pos,
|
632 |
+
'lightbox_comment_width' => $lightbox_comment_width,
|
633 |
+
'lightbox_comment_bg_color' => $lightbox_comment_bg_color,
|
634 |
+
'lightbox_comment_font_color' => $lightbox_comment_font_color,
|
635 |
+
'lightbox_comment_font_style' => $lightbox_comment_font_style,
|
636 |
+
'lightbox_comment_font_size' => $lightbox_comment_font_size,
|
637 |
+
'lightbox_comment_button_bg_color' => $lightbox_comment_button_bg_color,
|
638 |
+
'lightbox_comment_button_border_color' => $lightbox_comment_button_border_color,
|
639 |
+
'lightbox_comment_button_border_width' => $lightbox_comment_button_border_width,
|
640 |
+
'lightbox_comment_button_border_style' => $lightbox_comment_button_border_style,
|
641 |
+
'lightbox_comment_button_border_radius' => $lightbox_comment_button_border_radius,
|
642 |
+
'lightbox_comment_button_padding' => $lightbox_comment_button_padding,
|
643 |
+
'lightbox_comment_input_bg_color' => $lightbox_comment_input_bg_color,
|
644 |
+
'lightbox_comment_input_border_color' => $lightbox_comment_input_border_color,
|
645 |
+
'lightbox_comment_input_border_width' => $lightbox_comment_input_border_width,
|
646 |
+
'lightbox_comment_input_border_style' => $lightbox_comment_input_border_style,
|
647 |
+
'lightbox_comment_input_border_radius' => $lightbox_comment_input_border_radius,
|
648 |
+
'lightbox_comment_input_padding' => $lightbox_comment_input_padding,
|
649 |
+
'lightbox_comment_separator_width' => $lightbox_comment_separator_width,
|
650 |
+
'lightbox_comment_separator_style' => $lightbox_comment_separator_style,
|
651 |
+
'lightbox_comment_separator_color' => $lightbox_comment_separator_color,
|
652 |
+
'lightbox_comment_author_font_size' => $lightbox_comment_author_font_size,
|
653 |
+
'lightbox_comment_date_font_size' => $lightbox_comment_date_font_size,
|
654 |
+
'lightbox_comment_body_font_size' => $lightbox_comment_body_font_size,
|
655 |
+
'lightbox_comment_share_button_color' => $lightbox_comment_share_button_color,
|
656 |
+
'lightbox_filmstrip_rl_bg_color' => $lightbox_filmstrip_rl_bg_color,
|
657 |
+
'lightbox_filmstrip_rl_btn_size' => $lightbox_filmstrip_rl_btn_size,
|
658 |
+
'lightbox_filmstrip_rl_btn_color' => $lightbox_filmstrip_rl_btn_color,
|
659 |
+
'lightbox_filmstrip_thumb_margin' => $lightbox_filmstrip_thumb_margin,
|
660 |
+
'lightbox_filmstrip_thumb_border_width' => $lightbox_filmstrip_thumb_border_width,
|
661 |
+
'lightbox_filmstrip_thumb_border_style' => $lightbox_filmstrip_thumb_border_style,
|
662 |
+
'lightbox_filmstrip_thumb_border_color' => $lightbox_filmstrip_thumb_border_color,
|
663 |
+
'lightbox_filmstrip_thumb_border_radius' => $lightbox_filmstrip_thumb_border_radius,
|
664 |
+
'lightbox_filmstrip_thumb_deactive_transparent' => $lightbox_filmstrip_thumb_deactive_transparent,
|
665 |
+
'lightbox_filmstrip_pos' => $lightbox_filmstrip_pos,
|
666 |
+
'lightbox_filmstrip_thumb_active_border_width' => $lightbox_filmstrip_thumb_active_border_width,
|
667 |
+
'lightbox_filmstrip_thumb_active_border_color' => $lightbox_filmstrip_thumb_active_border_color,
|
668 |
+
'lightbox_overlay_bg_transparent' => $lightbox_overlay_bg_transparent,
|
669 |
+
'lightbox_bg_color' => $lightbox_bg_color,
|
670 |
+
'lightbox_overlay_bg_color' => $lightbox_overlay_bg_color,
|
671 |
+
'lightbox_rl_btn_style' => $lightbox_rl_btn_style,
|
672 |
+
'lightbox_bg_transparent' => $lightbox_bg_transparent,
|
673 |
+
|
674 |
+
'blog_style_margin' => $blog_style_margin,
|
675 |
+
'blog_style_padding' => $blog_style_padding,
|
676 |
+
'blog_style_border_radius' => $blog_style_border_radius,
|
677 |
+
'blog_style_border_width' => $blog_style_border_width,
|
678 |
+
'blog_style_border_style' => $blog_style_border_style,
|
679 |
+
'blog_style_border_color' => $blog_style_border_color,
|
680 |
+
'blog_style_bg_color' => $blog_style_bg_color,
|
681 |
+
'blog_style_transparent' => $blog_style_transparent,
|
682 |
+
'blog_style_box_shadow' => $blog_style_box_shadow,
|
683 |
+
'blog_style_align' => $blog_style_align,
|
684 |
+
'blog_style_share_buttons_margin' => $blog_style_share_buttons_margin,
|
685 |
+
'blog_style_share_buttons_border_radius' => $blog_style_share_buttons_border_radius,
|
686 |
+
'blog_style_share_buttons_border_width' => $blog_style_share_buttons_border_width,
|
687 |
+
'blog_style_share_buttons_border_style' => $blog_style_share_buttons_border_style,
|
688 |
+
'blog_style_share_buttons_border_color' => $blog_style_share_buttons_border_color,
|
689 |
+
'blog_style_share_buttons_bg_color' => $blog_style_share_buttons_bg_color,
|
690 |
+
'blog_style_share_buttons_align' => $blog_style_share_buttons_align,
|
691 |
+
'blog_style_img_font_size' => $blog_style_img_font_size,
|
692 |
+
'blog_style_img_font_family' => $blog_style_img_font_family,
|
693 |
+
'blog_style_img_font_color' => $blog_style_img_font_color,
|
694 |
+
'blog_style_share_buttons_font_size' => $blog_style_share_buttons_font_size,
|
695 |
+
'blog_style_share_buttons_color' => $blog_style_share_buttons_color,
|
696 |
+
'blog_style_share_buttons_bg_transparent' => $blog_style_share_buttons_bg_transparent,
|
697 |
+
|
698 |
+
'image_browser_margin' => $image_browser_margin,
|
699 |
+
'image_browser_padding' => $image_browser_padding,
|
700 |
+
'image_browser_border_radius'=> $image_browser_border_radius,
|
701 |
+
'image_browser_border_width' => $image_browser_border_width,
|
702 |
+
'image_browser_border_style' => $image_browser_border_style,
|
703 |
+
'image_browser_border_color' => $image_browser_border_color,
|
704 |
+
'image_browser_bg_color' => $image_browser_bg_color,
|
705 |
+
'image_browser_box_shadow' => $image_browser_box_shadow,
|
706 |
+
'image_browser_transparent' => $image_browser_transparent,
|
707 |
+
'image_browser_align' => $image_browser_align,
|
708 |
+
'image_browser_image_description_margin' => $image_browser_image_description_margin,
|
709 |
+
'image_browser_image_description_padding' => $image_browser_image_description_padding,
|
710 |
+
'image_browser_image_description_border_radius' => $image_browser_image_description_border_radius,
|
711 |
+
'image_browser_image_description_border_width' => $image_browser_image_description_border_width,
|
712 |
+
'image_browser_image_description_border_style' => $image_browser_image_description_border_style,
|
713 |
+
'image_browser_image_description_border_color' => $image_browser_image_description_border_color,
|
714 |
+
'image_browser_image_description_bg_color' => $image_browser_image_description_bg_color,
|
715 |
+
'image_browser_image_description_align' => $image_browser_image_description_align,
|
716 |
+
'image_browser_img_font_size' => $image_browser_img_font_size,
|
717 |
+
'image_browser_img_font_family' => $image_browser_img_font_family,
|
718 |
+
'image_browser_img_font_color' => $image_browser_img_font_color,
|
719 |
+
'image_browser_full_padding' => $image_browser_full_padding,
|
720 |
+
'image_browser_full_border_radius' => $image_browser_full_border_radius,
|
721 |
+
'image_browser_full_border_width' => $image_browser_full_border_width,
|
722 |
+
'image_browser_full_border_style' => $image_browser_full_border_style,
|
723 |
+
'image_browser_full_border_color' => $image_browser_full_border_color,
|
724 |
+
'image_browser_full_bg_color' => $image_browser_full_bg_color,
|
725 |
+
'image_browser_full_transparent' => $image_browser_full_transparent,
|
726 |
+
|
727 |
+
'album_compact_title_margin' => $album_compact_title_margin,
|
728 |
+
'album_compact_thumb_margin' => $album_compact_thumb_margin,
|
729 |
+
'album_compact_back_padding' => $album_compact_back_padding,
|
730 |
+
'album_compact_thumb_padding' => $album_compact_thumb_padding,
|
731 |
+
'album_compact_thumb_border_radius' => $album_compact_thumb_border_radius,
|
732 |
+
'album_compact_thumb_border_width' => $album_compact_thumb_border_width,
|
733 |
+
'album_compact_title_font_style' => $album_compact_title_font_style,
|
734 |
+
'album_compact_back_font_color' => $album_compact_back_font_color,
|
735 |
+
'album_compact_title_font_color' => $album_compact_title_font_color,
|
736 |
+
'album_compact_title_shadow' => $album_compact_title_shadow,
|
737 |
+
'album_compact_thumb_bg_transparent' => $album_compact_thumb_bg_transparent,
|
738 |
+
'album_compact_thumb_box_shadow' => $album_compact_thumb_box_shadow,
|
739 |
+
'album_compact_thumb_transition' => $album_compact_thumb_transition,
|
740 |
+
'album_compact_thumb_border_style' => $album_compact_thumb_border_style,
|
741 |
+
'album_compact_thumb_border_color' => $album_compact_thumb_border_color,
|
742 |
+
'album_compact_thumb_bg_color' => $album_compact_thumb_bg_color,
|
743 |
+
'album_compact_back_font_weight' => $album_compact_back_font_weight,
|
744 |
+
'album_compact_back_font_size' => $album_compact_back_font_size,
|
745 |
+
'album_compact_back_font_style' => $album_compact_back_font_style,
|
746 |
+
'album_compact_thumb_title_pos' => $album_compact_thumb_title_pos,
|
747 |
+
'album_compact_thumbs_bg_color' => $album_compact_thumbs_bg_color,
|
748 |
+
'album_compact_title_font_size' => $album_compact_title_font_size,
|
749 |
+
'album_compact_title_font_weight' => $album_compact_title_font_weight,
|
750 |
+
'album_compact_thumb_align' => $album_compact_thumb_align,
|
751 |
+
'album_compact_thumb_hover_effect' => $album_compact_thumb_hover_effect,
|
752 |
+
'album_compact_thumb_transparent' => $album_compact_thumb_transparent,
|
753 |
+
'album_compact_thumb_hover_effect_value' => $album_compact_thumb_hover_effect_value,
|
754 |
+
'album_extended_thumb_margin' => $album_extended_thumb_margin,
|
755 |
+
'album_extended_thumb_padding' => $album_extended_thumb_padding,
|
756 |
+
'album_extended_thumb_border_radius' => $album_extended_thumb_border_radius,
|
757 |
+
'album_extended_thumb_border_width' => $album_extended_thumb_border_width,
|
758 |
+
'album_extended_thumb_border_style' => $album_extended_thumb_border_style,
|
759 |
+
'album_extended_thumb_border_color' => $album_extended_thumb_border_color,
|
760 |
+
'album_extended_thumb_bg_color' => $album_extended_thumb_bg_color,
|
761 |
+
'album_extended_thumbs_bg_color' => $album_extended_thumbs_bg_color,
|
762 |
+
'album_extended_thumb_bg_transparent' => $album_extended_thumb_bg_transparent,
|
763 |
+
'album_extended_thumb_box_shadow' => $album_extended_thumb_box_shadow,
|
764 |
+
'album_extended_thumb_transparent' => $album_extended_thumb_transparent,
|
765 |
+
'album_extended_thumb_align' => $album_extended_thumb_align,
|
766 |
+
'album_extended_thumb_hover_effect' => $album_extended_thumb_hover_effect,
|
767 |
+
'album_extended_thumb_hover_effect_value' => $album_extended_thumb_hover_effect_value,
|
768 |
+
'album_extended_thumb_transition' => $album_extended_thumb_transition,
|
769 |
+
'album_extended_back_font_color' => $album_extended_back_font_color,
|
770 |
+
'album_extended_back_font_style' => $album_extended_back_font_style,
|
771 |
+
'album_extended_back_font_size' => $album_extended_back_font_size,
|
772 |
+
'album_extended_back_font_weight' => $album_extended_back_font_weight,
|
773 |
+
'album_extended_back_padding' => $album_extended_back_padding,
|
774 |
+
'album_extended_div_bg_color' => $album_extended_div_bg_color,
|
775 |
+
'album_extended_div_bg_transparent' => $album_extended_div_bg_transparent,
|
776 |
+
'album_extended_div_border_radius' => $album_extended_div_border_radius,
|
777 |
+
'album_extended_div_margin' => $album_extended_div_margin,
|
778 |
+
'album_extended_div_padding' => $album_extended_div_padding,
|
779 |
+
'album_extended_div_separator_width' => $album_extended_div_separator_width,
|
780 |
+
'album_extended_div_separator_style' => $album_extended_div_separator_style,
|
781 |
+
'album_extended_div_separator_color' => $album_extended_div_separator_color,
|
782 |
+
'album_extended_thumb_div_bg_color' => $album_extended_thumb_div_bg_color,
|
783 |
+
'album_extended_thumb_div_border_radius' => $album_extended_thumb_div_border_radius,
|
784 |
+
'album_extended_thumb_div_border_width' => $album_extended_thumb_div_border_width,
|
785 |
+
'album_extended_thumb_div_border_style' => $album_extended_thumb_div_border_style,
|
786 |
+
'album_extended_thumb_div_border_color' => $album_extended_thumb_div_border_color,
|
787 |
+
'album_extended_thumb_div_padding' => $album_extended_thumb_div_padding,
|
788 |
+
'album_extended_text_div_bg_color' => $album_extended_text_div_bg_color,
|
789 |
+
'album_extended_text_div_border_radius' => $album_extended_text_div_border_radius,
|
790 |
+
'album_extended_text_div_border_width' => $album_extended_text_div_border_width,
|
791 |
+
'album_extended_text_div_border_style' => $album_extended_text_div_border_style,
|
792 |
+
'album_extended_text_div_border_color' => $album_extended_text_div_border_color,
|
793 |
+
'album_extended_text_div_padding' => $album_extended_text_div_padding,
|
794 |
+
'album_extended_title_span_border_width' => $album_extended_title_span_border_width,
|
795 |
+
'album_extended_title_span_border_style' => $album_extended_title_span_border_style,
|
796 |
+
'album_extended_title_span_border_color' => $album_extended_title_span_border_color,
|
797 |
+
'album_extended_title_font_color' => $album_extended_title_font_color,
|
798 |
+
'album_extended_title_font_style' => $album_extended_title_font_style,
|
799 |
+
'album_extended_title_font_size' => $album_extended_title_font_size,
|
800 |
+
'album_extended_title_font_weight' => $album_extended_title_font_weight,
|
801 |
+
'album_extended_title_margin_bottom' => $album_extended_title_margin_bottom,
|
802 |
+
'album_extended_title_padding' => $album_extended_title_padding,
|
803 |
+
'album_extended_desc_span_border_width' => $album_extended_desc_span_border_width,
|
804 |
+
'album_extended_desc_span_border_style' => $album_extended_desc_span_border_style,
|
805 |
+
'album_extended_desc_span_border_color' => $album_extended_desc_span_border_color,
|
806 |
+
'album_extended_desc_font_color' => $album_extended_desc_font_color,
|
807 |
+
'album_extended_desc_font_style' => $album_extended_desc_font_style,
|
808 |
+
'album_extended_desc_font_size' => $album_extended_desc_font_size,
|
809 |
+
'album_extended_desc_font_weight' => $album_extended_desc_font_weight,
|
810 |
+
'album_extended_desc_padding' => $album_extended_desc_padding,
|
811 |
+
'album_extended_desc_more_color' => $album_extended_desc_more_color,
|
812 |
+
'album_extended_desc_more_size' => $album_extended_desc_more_size,
|
813 |
+
|
814 |
+
'slideshow_cont_bg_color' => $slideshow_cont_bg_color,
|
815 |
+
'slideshow_close_btn_transparent' => $slideshow_close_btn_transparent,
|
816 |
+
'slideshow_rl_btn_bg_color' => $slideshow_rl_btn_bg_color,
|
817 |
+
'slideshow_rl_btn_border_radius' => $slideshow_rl_btn_border_radius,
|
818 |
+
'slideshow_rl_btn_border_width' => $slideshow_rl_btn_border_width,
|
819 |
+
'slideshow_rl_btn_border_style' => $slideshow_rl_btn_border_style,
|
820 |
+
'slideshow_rl_btn_border_color' => $slideshow_rl_btn_border_color,
|
821 |
+
'slideshow_rl_btn_box_shadow' => $slideshow_rl_btn_box_shadow,
|
822 |
+
'slideshow_rl_btn_color' => $slideshow_rl_btn_color,
|
823 |
+
'slideshow_rl_btn_height' => $slideshow_rl_btn_height,
|
824 |
+
'slideshow_rl_btn_size' => $slideshow_rl_btn_size,
|
825 |
+
'slideshow_rl_btn_width' => $slideshow_rl_btn_width,
|
826 |
+
'slideshow_close_rl_btn_hover_color' => $slideshow_close_rl_btn_hover_color,
|
827 |
+
'slideshow_filmstrip_pos' => $slideshow_filmstrip_pos,
|
828 |
+
'slideshow_filmstrip_thumb_border_width' => $slideshow_filmstrip_thumb_border_width,
|
829 |
+
'slideshow_filmstrip_thumb_border_style' => $slideshow_filmstrip_thumb_border_style,
|
830 |
+
'slideshow_filmstrip_thumb_border_color' => $slideshow_filmstrip_thumb_border_color,
|
831 |
+
'slideshow_filmstrip_thumb_border_radius' => $slideshow_filmstrip_thumb_border_radius,
|
832 |
+
'slideshow_filmstrip_thumb_margin' => $slideshow_filmstrip_thumb_margin,
|
833 |
+
'slideshow_filmstrip_thumb_active_border_width' => $slideshow_filmstrip_thumb_active_border_width,
|
834 |
+
'slideshow_filmstrip_thumb_active_border_color' => $slideshow_filmstrip_thumb_active_border_color,
|
835 |
+
'slideshow_filmstrip_thumb_deactive_transparent' => $slideshow_filmstrip_thumb_deactive_transparent,
|
836 |
+
'slideshow_filmstrip_rl_bg_color' => $slideshow_filmstrip_rl_bg_color,
|
837 |
+
'slideshow_filmstrip_rl_btn_color' => $slideshow_filmstrip_rl_btn_color,
|
838 |
+
'slideshow_filmstrip_rl_btn_size' => $slideshow_filmstrip_rl_btn_size,
|
839 |
+
'slideshow_title_font_size' => $slideshow_title_font_size,
|
840 |
+
'slideshow_title_font' => $slideshow_title_font,
|
841 |
+
'slideshow_title_color' => $slideshow_title_color,
|
842 |
+
'slideshow_title_opacity' => $slideshow_title_opacity,
|
843 |
+
'slideshow_title_border_radius' => $slideshow_title_border_radius,
|
844 |
+
'slideshow_title_background_color' => $slideshow_title_background_color,
|
845 |
+
'slideshow_title_padding' => $slideshow_title_padding,
|
846 |
+
'slideshow_description_font_size' => $slideshow_description_font_size,
|
847 |
+
'slideshow_description_font' => $slideshow_description_font,
|
848 |
+
'slideshow_description_color' => $slideshow_description_color,
|
849 |
+
'slideshow_description_opacity' => $slideshow_description_opacity,
|
850 |
+
'slideshow_description_border_radius' => $slideshow_description_border_radius,
|
851 |
+
'slideshow_description_background_color' => $slideshow_description_background_color,
|
852 |
+
'slideshow_description_padding' => $slideshow_description_padding,
|
853 |
+
'slideshow_dots_width' => $slideshow_dots_width,
|
854 |
+
'slideshow_dots_height' => $slideshow_dots_height,
|
855 |
+
'slideshow_dots_border_radius' => $slideshow_dots_border_radius,
|
856 |
+
'slideshow_dots_background_color' => $slideshow_dots_background_color,
|
857 |
+
'slideshow_dots_margin' => $slideshow_dots_margin,
|
858 |
+
'slideshow_dots_active_background_color' => $slideshow_dots_active_background_color,
|
859 |
+
'slideshow_dots_active_border_width' => $slideshow_dots_active_border_width,
|
860 |
+
'slideshow_dots_active_border_color' => $slideshow_dots_active_border_color,
|
861 |
+
'slideshow_play_pause_btn_size' => $slideshow_play_pause_btn_size,
|
862 |
+
'slideshow_rl_btn_style' => $slideshow_rl_btn_style,
|
863 |
+
|
864 |
+
'masonry_thumb_padding' => $masonry_thumb_padding,
|
865 |
+
'masonry_thumb_border_radius' => $masonry_thumb_border_radius,
|
866 |
+
'masonry_thumb_border_width' => $masonry_thumb_border_width,
|
867 |
+
'masonry_thumb_border_style' => $masonry_thumb_border_style,
|
868 |
+
'masonry_thumb_border_color' => $masonry_thumb_border_color,
|
869 |
+
'masonry_thumbs_bg_color' => $masonry_thumbs_bg_color,
|
870 |
+
'masonry_thumb_bg_transparent' => $masonry_thumb_bg_transparent,
|
871 |
+
'masonry_thumb_transparent' => $masonry_thumb_transparent,
|
872 |
+
'masonry_thumb_align' => $masonry_thumb_align,
|
873 |
+
'masonry_thumb_hover_effect' => $masonry_thumb_hover_effect,
|
874 |
+
'masonry_thumb_hover_effect_value' => $masonry_thumb_hover_effect_value,
|
875 |
+
'masonry_thumb_transition' => $masonry_thumb_transition,
|
876 |
+
|
877 |
+
'mosaic_thumb_padding' => $mosaic_thumb_padding,
|
878 |
+
'mosaic_thumb_border_radius' => $mosaic_thumb_border_radius,
|
879 |
+
'mosaic_thumb_border_width' => $mosaic_thumb_border_width,
|
880 |
+
'mosaic_thumb_border_style' => $mosaic_thumb_border_style,
|
881 |
+
'mosaic_thumb_border_color' => $mosaic_thumb_border_color,
|
882 |
+
'mosaic_thumbs_bg_color' => $mosaic_thumbs_bg_color,
|
883 |
+
'mosaic_thumb_bg_transparent' => $mosaic_thumb_bg_transparent,
|
884 |
+
'mosaic_thumb_transparent' => $mosaic_thumb_transparent,
|
885 |
+
'mosaic_thumb_align' => $mosaic_thumb_align,
|
886 |
+
'mosaic_thumb_hover_effect' => $mosaic_thumb_hover_effect,
|
887 |
+
'mosaic_thumb_hover_effect_value' => $mosaic_thumb_hover_effect_value,
|
888 |
+
'mosaic_thumb_title_margin' => $mosaic_thumb_title_margin,
|
889 |
+
'mosaic_thumb_title_font_style' => $mosaic_thumb_title_font_style,
|
890 |
+
'mosaic_thumb_title_font_color' => $mosaic_thumb_title_font_color,
|
891 |
+
'mosaic_thumb_title_shadow' => $mosaic_thumb_title_shadow,
|
892 |
+
'mosaic_thumb_title_font_size' => $mosaic_thumb_title_font_size,
|
893 |
+
'mosaic_thumb_title_font_weight' => $mosaic_thumb_title_font_weight,
|
894 |
+
'lightbox_info_pos' => $lightbox_info_pos,
|
895 |
+
'lightbox_info_align' => $lightbox_info_align,
|
896 |
+
'lightbox_info_bg_color' => $lightbox_info_bg_color,
|
897 |
+
'lightbox_info_bg_transparent' => $lightbox_info_bg_transparent,
|
898 |
+
'lightbox_info_border_width' => $lightbox_info_border_width,
|
899 |
+
'lightbox_info_border_style' => $lightbox_info_border_style,
|
900 |
+
'lightbox_info_border_color' => $lightbox_info_border_color,
|
901 |
+
'lightbox_info_border_radius' => $lightbox_info_border_radius,
|
902 |
+
'lightbox_info_padding' => $lightbox_info_padding,
|
903 |
+
'lightbox_info_margin' => $lightbox_info_margin,
|
904 |
+
'lightbox_title_color' => $lightbox_title_color,
|
905 |
+
'lightbox_title_font_style' => $lightbox_title_font_style,
|
906 |
+
'lightbox_title_font_weight' => $lightbox_title_font_weight,
|
907 |
+
'lightbox_title_font_size' => $lightbox_title_font_size,
|
908 |
+
'lightbox_description_color' => $lightbox_description_color,
|
909 |
+
'lightbox_description_font_style' => $lightbox_description_font_style,
|
910 |
+
'lightbox_description_font_weight' => $lightbox_description_font_weight,
|
911 |
+
'lightbox_description_font_size' => $lightbox_description_font_size,
|
912 |
+
|
913 |
+
'lightbox_rate_pos' => $lightbox_rate_pos,
|
914 |
+
'lightbox_rate_align' => $lightbox_rate_align,
|
915 |
+
'lightbox_rate_icon' => $lightbox_rate_icon,
|
916 |
+
'lightbox_rate_color' => $lightbox_rate_color,
|
917 |
+
'lightbox_rate_size' => $lightbox_rate_size,
|
918 |
+
'lightbox_rate_stars_count' => $lightbox_rate_stars_count,
|
919 |
+
'lightbox_rate_padding' => $lightbox_rate_padding,
|
920 |
+
'lightbox_rate_hover_color' => $lightbox_rate_hover_color,
|
921 |
+
|
922 |
+
'lightbox_hit_pos' => $lightbox_hit_pos,
|
923 |
+
'lightbox_hit_align' => $lightbox_hit_align,
|
924 |
+
'lightbox_hit_bg_color' => $lightbox_hit_bg_color,
|
925 |
+
'lightbox_hit_bg_transparent' => $lightbox_hit_bg_transparent,
|
926 |
+
'lightbox_hit_border_width' => $lightbox_hit_border_width,
|
927 |
+
'lightbox_hit_border_style' => $lightbox_hit_border_style,
|
928 |
+
'lightbox_hit_border_color' => $lightbox_hit_border_color,
|
929 |
+
'lightbox_hit_border_radius' => $lightbox_hit_border_radius,
|
930 |
+
'lightbox_hit_padding' => $lightbox_hit_padding,
|
931 |
+
'lightbox_hit_margin' => $lightbox_hit_margin,
|
932 |
+
'lightbox_hit_color' => $lightbox_hit_color,
|
933 |
+
'lightbox_hit_font_style' => $lightbox_hit_font_style,
|
934 |
+
'lightbox_hit_font_weight' => $lightbox_hit_font_weight,
|
935 |
+
'lightbox_hit_font_size' => $lightbox_hit_font_size,
|
936 |
+
'masonry_description_font_size' => $masonry_description_font_size,
|
937 |
+
'masonry_description_color' => $masonry_description_color,
|
938 |
+
'masonry_description_font_style' => $masonry_description_font_style,
|
939 |
+
|
940 |
+
'album_masonry_back_font_color' => $album_masonry_back_font_color,
|
941 |
+
'album_masonry_back_font_style' => $album_masonry_back_font_style,
|
942 |
+
'album_masonry_back_font_size' => $album_masonry_back_font_size,
|
943 |
+
'album_masonry_back_font_weight' => $album_masonry_back_font_weight,
|
944 |
+
'album_masonry_back_padding' => $album_masonry_back_padding,
|
945 |
+
'album_masonry_title_font_color' => $album_masonry_title_font_color,
|
946 |
+
'album_masonry_title_font_style' => $album_masonry_title_font_style,
|
947 |
+
'album_masonry_thumb_title_pos' => $album_masonry_thumb_title_pos,
|
948 |
+
'album_masonry_title_font_size' => $album_masonry_title_font_size,
|
949 |
+
'album_masonry_title_font_weight' => $album_masonry_title_font_weight,
|
950 |
+
'album_masonry_title_margin' => $album_masonry_title_margin,
|
951 |
+
'album_masonry_title_shadow' => $album_masonry_title_shadow,
|
952 |
+
'album_masonry_thumb_margin' => $album_masonry_thumb_margin,
|
953 |
+
'album_masonry_thumb_padding' => $album_masonry_thumb_padding,
|
954 |
+
'album_masonry_thumb_border_radius' => $album_masonry_thumb_border_radius,
|
955 |
+
'album_masonry_thumb_border_width' => $album_masonry_thumb_border_width,
|
956 |
+
'album_masonry_thumb_border_style' => $album_masonry_thumb_border_style,
|
957 |
+
'album_masonry_thumb_border_color' => $album_masonry_thumb_border_color,
|
958 |
+
'album_masonry_thumb_bg_color' => $album_masonry_thumb_bg_color,
|
959 |
+
'album_masonry_thumbs_bg_color' => $album_masonry_thumbs_bg_color,
|
960 |
+
'album_masonry_thumb_bg_transparent' => $album_masonry_thumb_bg_transparent,
|
961 |
+
'album_masonry_thumb_box_shadow' => $album_masonry_thumb_box_shadow,
|
962 |
+
'album_masonry_thumb_transparent' => $album_masonry_thumb_transparent,
|
963 |
+
'album_masonry_thumb_align' => $album_masonry_thumb_align,
|
964 |
+
'album_masonry_thumb_hover_effect' => $album_masonry_thumb_hover_effect,
|
965 |
+
'album_masonry_thumb_hover_effect_value' => $album_masonry_thumb_hover_effect_value,
|
966 |
+
'album_masonry_thumb_transition' => $album_masonry_thumb_transition,
|
967 |
+
|
968 |
+
'carousel_cont_bg_color' => $carousel_cont_bg_color,
|
969 |
+
'carousel_cont_btn_transparent' => $carousel_cont_btn_transparent,
|
970 |
+
'carousel_close_btn_transparent' => $carousel_close_btn_transparent,
|
971 |
+
'carousel_rl_btn_bg_color' => $carousel_rl_btn_bg_color,
|
972 |
+
'carousel_rl_btn_border_radius' => $carousel_rl_btn_border_radius,
|
973 |
+
'carousel_rl_btn_border_width' => $carousel_rl_btn_border_width,
|
974 |
+
'carousel_rl_btn_border_style' => $carousel_rl_btn_border_style,
|
975 |
+
'carousel_rl_btn_border_color' => $carousel_rl_btn_border_color,
|
976 |
+
'carousel_rl_btn_color' => $carousel_rl_btn_color,
|
977 |
+
'carousel_rl_btn_height' => $carousel_rl_btn_height,
|
978 |
+
'carousel_rl_btn_size' => $carousel_rl_btn_size,
|
979 |
+
'carousel_play_pause_btn_size' => $carousel_play_pause_btn_size,
|
980 |
+
'carousel_rl_btn_width' => $carousel_rl_btn_width,
|
981 |
+
'carousel_close_rl_btn_hover_color' => $carousel_close_rl_btn_hover_color,
|
982 |
+
'carousel_rl_btn_style' => $carousel_rl_btn_style,
|
983 |
+
'carousel_mergin_bottom' => $carousel_mergin_bottom,
|
984 |
+
'carousel_font_family' => $carousel_font_family,
|
985 |
+
'carousel_feature_border_width' => $carousel_feature_border_width,
|
986 |
+
'carousel_feature_border_style' => $carousel_feature_border_style,
|
987 |
+
'carousel_feature_border_color' => $carousel_feature_border_color,
|
988 |
+
'carousel_caption_background_color' => $carousel_caption_background_color,
|
989 |
+
'carousel_caption_bottom' => $carousel_caption_bottom,
|
990 |
+
'carousel_caption_p_mergin' => $carousel_caption_p_mergin,
|
991 |
+
'carousel_caption_p_pedding' => $carousel_caption_p_pedding,
|
992 |
+
'carousel_caption_p_font_weight' => $carousel_caption_p_font_weight,
|
993 |
+
'carousel_caption_p_font_size' => $carousel_caption_p_font_size,
|
994 |
+
'carousel_caption_p_color' => $carousel_caption_p_color,
|
995 |
+
'carousel_title_opacity' => $carousel_title_opacity,
|
996 |
+
'carousel_title_border_radius' => $carousel_title_border_radius,
|
997 |
+
'default_theme' => $default_theme,
|
998 |
+
'mosaic_thumb_transition' => $mosaic_thumb_transition,
|
999 |
+
);
|
1000 |
+
$themes = json_encode($themes);
|
1001 |
+
if ($id != 0) {
|
1002 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_theme', array(
|
1003 |
+
'name' => $name,
|
1004 |
+
'options' => $themes,
|
1005 |
+
'default_theme' => $default_theme,
|
1006 |
+
), array('id' => $id));
|
1007 |
+
}
|
1008 |
+
else {
|
1009 |
+
$save = $wpdb->insert($wpdb->prefix . 'bwg_theme', array(
|
1010 |
+
'name' => $name,
|
1011 |
+
'options' => $themes,
|
1012 |
+
'default_theme' => $default_theme,
|
1013 |
+
));
|
1014 |
+
}
|
1015 |
+
if ($save !== FALSE) {
|
1016 |
+
return 1;
|
1017 |
+
}
|
1018 |
+
else {
|
1019 |
+
return 2;
|
1020 |
+
}
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
public function delete($id) {
|
1024 |
+
global $wpdb;
|
1025 |
+
$isDefault = $wpdb->get_var('SELECT default_theme FROM ' . $wpdb->prefix . 'bwg_theme WHERE id=' . $id);
|
1026 |
+
if ($isDefault) {
|
1027 |
+
echo WDWLibrary::message("You can't delete default theme", 'error');
|
1028 |
+
}
|
1029 |
+
else {
|
1030 |
+
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $id);
|
1031 |
+
if ($wpdb->query($query)) {
|
1032 |
+
echo WDWLibrary::message('Item Succesfully Deleted.', 'updated');
|
1033 |
+
$message = 3;
|
1034 |
+
}
|
1035 |
+
else {
|
1036 |
+
$message = 2;
|
1037 |
+
}
|
1038 |
+
}
|
1039 |
+
$page = WDWLibrary::get('page');
|
1040 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
1041 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
1042 |
+
WDWLibrary::spider_redirect($query_url);
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
public function delete_all() {
|
1046 |
+
global $wpdb;
|
1047 |
+
$flag = FALSE;
|
1048 |
+
$isDefault = FALSE;
|
1049 |
+
$tag_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_theme');
|
1050 |
+
foreach ($tag_ids_col as $tag_id) {
|
1051 |
+
if (isset($_POST['check_' . $tag_id])) {
|
1052 |
+
$isDefault = $wpdb->get_var('SELECT default_theme FROM ' . $wpdb->prefix . 'bwg_theme WHERE id=' . $tag_id);
|
1053 |
+
if ($isDefault) {
|
1054 |
+
$message = 4;
|
1055 |
+
}
|
1056 |
+
else {
|
1057 |
+
$flag = TRUE;
|
1058 |
+
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $tag_id);
|
1059 |
+
$wpdb->query($query);
|
1060 |
+
}
|
1061 |
+
}
|
1062 |
+
}
|
1063 |
+
if ($flag) {
|
1064 |
+
$message = 5;
|
1065 |
+
}
|
1066 |
+
else {
|
1067 |
+
$message = 6;
|
1068 |
+
}
|
1069 |
+
$page = WDWLibrary::get('page');
|
1070 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
1071 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
1072 |
+
WDWLibrary::spider_redirect($query_url);
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
public function setdefault($id) {
|
1076 |
+
global $wpdb;
|
1077 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 0), array('default_theme' => 1));
|
1078 |
+
$save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 1), array('id' => $id));
|
1079 |
+
if ($save !== FALSE) {
|
1080 |
+
$message = 7;
|
1081 |
+
}
|
1082 |
+
else {
|
1083 |
+
$message = 2;
|
1084 |
+
}
|
1085 |
+
$page = WDWLibrary::get('page');
|
1086 |
+
$query_url = wp_nonce_url( admin_url('admin.php'), 'themes_bwg', 'bwg_nonce' );
|
1087 |
+
$query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
|
1088 |
+
WDWLibrary::spider_redirect($query_url);
|
1089 |
+
}
|
1090 |
+
|
1091 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1092 |
+
// Getters & Setters //
|
1093 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1094 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1095 |
+
// Private Methods //
|
1096 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1097 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1098 |
+
// Listeners //
|
1099 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
1100 |
}
|
admin/controllers/BWGControllerUninstall_bwg.php
CHANGED
@@ -1,64 +1,64 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerUninstall_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
-
|
24 |
-
if($task != ''){
|
25 |
-
if(!WDWLibrary::verify_nonce('uninstall_bwg')){
|
26 |
-
die('Sorry, your nonce did not verify.');
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
if (method_exists($this, $task)) {
|
31 |
-
$this->$task();
|
32 |
-
}
|
33 |
-
else {
|
34 |
-
$this->display();
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
public function display() {
|
39 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelUninstall_bwg.php";
|
40 |
-
$model = new BWGModelUninstall_bwg();
|
41 |
-
|
42 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewUninstall_bwg.php";
|
43 |
-
$view = new BWGViewUninstall_bwg($model);
|
44 |
-
$view->display();
|
45 |
-
}
|
46 |
-
|
47 |
-
public function uninstall() {
|
48 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelUninstall_bwg.php";
|
49 |
-
$model = new BWGModelUninstall_bwg();
|
50 |
-
|
51 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewUninstall_bwg.php";
|
52 |
-
$view = new BWGViewUninstall_bwg($model);
|
53 |
-
$view->uninstall();
|
54 |
-
}
|
55 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
56 |
-
// Getters & Setters //
|
57 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
58 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
-
// Private Methods //
|
60 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
61 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
62 |
-
// Listeners //
|
63 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerUninstall_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');
|
23 |
+
|
24 |
+
if($task != ''){
|
25 |
+
if(!WDWLibrary::verify_nonce('uninstall_bwg')){
|
26 |
+
die('Sorry, your nonce did not verify.');
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
if (method_exists($this, $task)) {
|
31 |
+
$this->$task();
|
32 |
+
}
|
33 |
+
else {
|
34 |
+
$this->display();
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
public function display() {
|
39 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelUninstall_bwg.php";
|
40 |
+
$model = new BWGModelUninstall_bwg();
|
41 |
+
|
42 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewUninstall_bwg.php";
|
43 |
+
$view = new BWGViewUninstall_bwg($model);
|
44 |
+
$view->display();
|
45 |
+
}
|
46 |
+
|
47 |
+
public function uninstall() {
|
48 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelUninstall_bwg.php";
|
49 |
+
$model = new BWGModelUninstall_bwg();
|
50 |
+
|
51 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewUninstall_bwg.php";
|
52 |
+
$view = new BWGViewUninstall_bwg($model);
|
53 |
+
$view->uninstall();
|
54 |
+
}
|
55 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
56 |
+
// Getters & Setters //
|
57 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
58 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
+
// Private Methods //
|
60 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
61 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
62 |
+
// Listeners //
|
63 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
}
|
admin/controllers/BWGControllerWidget.php
CHANGED
@@ -1,68 +1,68 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerWidget extends WP_Widget {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $view;
|
14 |
-
private $model;
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
// Constructor & Destructor //
|
17 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
-
public function __construct() {
|
19 |
-
$widget_ops = array(
|
20 |
-
'classname' => 'bwp_gallery',
|
21 |
-
'description' => 'Add Photo Gallery albums or galleries to Your widget area.'
|
22 |
-
);
|
23 |
-
// Widget Control Settings.
|
24 |
-
$control_ops = array('id_base' => 'bwp_gallery');
|
25 |
-
// Create the widget.
|
26 |
-
parent::__construct('bwp_gallery', 'Photo Gallery Widget', $widget_ops, $control_ops);
|
27 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelWidget.php";
|
28 |
-
$this->model = new BWGModelWidget();
|
29 |
-
|
30 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewWidget.php";
|
31 |
-
$this->view = new BWGViewWidget($this->model);
|
32 |
-
}
|
33 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
-
// Public Methods //
|
35 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
-
|
37 |
-
public function widget($args, $instance) {
|
38 |
-
$this->view->widget($args, $instance);
|
39 |
-
}
|
40 |
-
|
41 |
-
public function form( $instance ) {
|
42 |
-
$this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('type'), parent::get_field_name('type'), parent::get_field_id('show'), parent::get_field_name('show'), parent::get_field_id('gallery_id'), parent::get_field_name('gallery_id'), parent::get_field_id('album_id'), parent::get_field_name('album_id'), parent::get_field_id('count'), parent::get_field_name('count'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
|
43 |
-
}
|
44 |
-
|
45 |
-
// Update Settings.
|
46 |
-
public function update($new_instance, $old_instance) {
|
47 |
-
$instance['title'] = strip_tags($new_instance['title']);
|
48 |
-
$instance['type'] = $new_instance['type'];
|
49 |
-
$instance['gallery_id'] = $new_instance['gallery_id'];
|
50 |
-
$instance['album_id'] = $new_instance['album_id'];
|
51 |
-
$instance['show'] = $new_instance['show'];
|
52 |
-
$instance['count'] = $new_instance['count'];
|
53 |
-
$instance['width'] = $new_instance['width'];
|
54 |
-
$instance['height'] = $new_instance['height'];
|
55 |
-
$instance['theme_id'] = $new_instance['theme_id'];
|
56 |
-
return $instance;
|
57 |
-
}
|
58 |
-
|
59 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
60 |
-
// Getters & Setters //
|
61 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
62 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
63 |
-
// Private Methods //
|
64 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
65 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
-
// Listeners //
|
67 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
68 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerWidget extends WP_Widget {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $view;
|
14 |
+
private $model;
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
// Constructor & Destructor //
|
17 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
+
public function __construct() {
|
19 |
+
$widget_ops = array(
|
20 |
+
'classname' => 'bwp_gallery',
|
21 |
+
'description' => 'Add Photo Gallery albums or galleries to Your widget area.'
|
22 |
+
);
|
23 |
+
// Widget Control Settings.
|
24 |
+
$control_ops = array('id_base' => 'bwp_gallery');
|
25 |
+
// Create the widget.
|
26 |
+
parent::__construct('bwp_gallery', 'Photo Gallery Widget', $widget_ops, $control_ops);
|
27 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelWidget.php";
|
28 |
+
$this->model = new BWGModelWidget();
|
29 |
+
|
30 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewWidget.php";
|
31 |
+
$this->view = new BWGViewWidget($this->model);
|
32 |
+
}
|
33 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
+
// Public Methods //
|
35 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
+
|
37 |
+
public function widget($args, $instance) {
|
38 |
+
$this->view->widget($args, $instance);
|
39 |
+
}
|
40 |
+
|
41 |
+
public function form( $instance ) {
|
42 |
+
$this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('type'), parent::get_field_name('type'), parent::get_field_id('show'), parent::get_field_name('show'), parent::get_field_id('gallery_id'), parent::get_field_name('gallery_id'), parent::get_field_id('album_id'), parent::get_field_name('album_id'), parent::get_field_id('count'), parent::get_field_name('count'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
|
43 |
+
}
|
44 |
+
|
45 |
+
// Update Settings.
|
46 |
+
public function update($new_instance, $old_instance) {
|
47 |
+
$instance['title'] = strip_tags($new_instance['title']);
|
48 |
+
$instance['type'] = $new_instance['type'];
|
49 |
+
$instance['gallery_id'] = $new_instance['gallery_id'];
|
50 |
+
$instance['album_id'] = $new_instance['album_id'];
|
51 |
+
$instance['show'] = $new_instance['show'];
|
52 |
+
$instance['count'] = $new_instance['count'];
|
53 |
+
$instance['width'] = $new_instance['width'];
|
54 |
+
$instance['height'] = $new_instance['height'];
|
55 |
+
$instance['theme_id'] = $new_instance['theme_id'];
|
56 |
+
return $instance;
|
57 |
+
}
|
58 |
+
|
59 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
60 |
+
// Getters & Setters //
|
61 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
62 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
63 |
+
// Private Methods //
|
64 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
65 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
+
// Listeners //
|
67 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
68 |
}
|
admin/controllers/BWGControllerWidgetSlideshow.php
CHANGED
@@ -1,67 +1,67 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerWidgetSlideshow extends WP_Widget {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $view;
|
14 |
-
private $model;
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
// Constructor & Destructor //
|
17 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
-
public function __construct() {
|
19 |
-
$widget_ops = array(
|
20 |
-
'classname' => 'bwp_gallery_slideshow',
|
21 |
-
'description' => 'Add Photo Gallery slideshow to Your widget area.'
|
22 |
-
);
|
23 |
-
// Widget Control Settings.
|
24 |
-
$control_ops = array('id_base' => 'bwp_gallery_slideshow');
|
25 |
-
// Create the widget.
|
26 |
-
parent::__construct('bwp_gallery_slideshow', 'Photo Gallery Slideshow', $widget_ops, $control_ops);
|
27 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelWidgetSlideshow.php";
|
28 |
-
$this->model = new BWGModelWidgetSlideshow();
|
29 |
-
|
30 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewWidgetSlideshow.php";
|
31 |
-
$this->view = new BWGViewWidgetSlideshow($this->model);
|
32 |
-
}
|
33 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
-
// Public Methods //
|
35 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
-
|
37 |
-
public function widget($args, $instance) {
|
38 |
-
$this->view->widget($args, $instance);
|
39 |
-
}
|
40 |
-
|
41 |
-
public function form( $instance ) {
|
42 |
-
$this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('gallery_id'), parent::get_field_name('gallery_id'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('effect'), parent::get_field_name('effect'), parent::get_field_id('interval'), parent::get_field_name('interval'), parent::get_field_id('shuffle'), parent::get_field_name('shuffle'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
|
43 |
-
}
|
44 |
-
|
45 |
-
// Update Settings.
|
46 |
-
public function update($new_instance, $old_instance) {
|
47 |
-
$instance['title'] = strip_tags($new_instance['title']);
|
48 |
-
$instance['gallery_id'] = $new_instance['gallery_id'];
|
49 |
-
$instance['width'] = $new_instance['width'];
|
50 |
-
$instance['height'] = $new_instance['height'];
|
51 |
-
$instance['effect'] = $new_instance['effect'];
|
52 |
-
$instance['interval'] = $new_instance['interval'];
|
53 |
-
$instance['shuffle'] = $new_instance['shuffle'];
|
54 |
-
$instance['theme_id'] = $new_instance['theme_id'];
|
55 |
-
return $instance;
|
56 |
-
}
|
57 |
-
|
58 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
-
// Getters & Setters //
|
60 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
61 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
62 |
-
// Private Methods //
|
63 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
65 |
-
// Listeners //
|
66 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerWidgetSlideshow extends WP_Widget {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $view;
|
14 |
+
private $model;
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
// Constructor & Destructor //
|
17 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
+
public function __construct() {
|
19 |
+
$widget_ops = array(
|
20 |
+
'classname' => 'bwp_gallery_slideshow',
|
21 |
+
'description' => 'Add Photo Gallery slideshow to Your widget area.'
|
22 |
+
);
|
23 |
+
// Widget Control Settings.
|
24 |
+
$control_ops = array('id_base' => 'bwp_gallery_slideshow');
|
25 |
+
// Create the widget.
|
26 |
+
parent::__construct('bwp_gallery_slideshow', 'Photo Gallery Slideshow', $widget_ops, $control_ops);
|
27 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelWidgetSlideshow.php";
|
28 |
+
$this->model = new BWGModelWidgetSlideshow();
|
29 |
+
|
30 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewWidgetSlideshow.php";
|
31 |
+
$this->view = new BWGViewWidgetSlideshow($this->model);
|
32 |
+
}
|
33 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
+
// Public Methods //
|
35 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
+
|
37 |
+
public function widget($args, $instance) {
|
38 |
+
$this->view->widget($args, $instance);
|
39 |
+
}
|
40 |
+
|
41 |
+
public function form( $instance ) {
|
42 |
+
$this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('gallery_id'), parent::get_field_name('gallery_id'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('effect'), parent::get_field_name('effect'), parent::get_field_id('interval'), parent::get_field_name('interval'), parent::get_field_id('shuffle'), parent::get_field_name('shuffle'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
|
43 |
+
}
|
44 |
+
|
45 |
+
// Update Settings.
|
46 |
+
public function update($new_instance, $old_instance) {
|
47 |
+
$instance['title'] = strip_tags($new_instance['title']);
|
48 |
+
$instance['gallery_id'] = $new_instance['gallery_id'];
|
49 |
+
$instance['width'] = $new_instance['width'];
|
50 |
+
$instance['height'] = $new_instance['height'];
|
51 |
+
$instance['effect'] = $new_instance['effect'];
|
52 |
+
$instance['interval'] = $new_instance['interval'];
|
53 |
+
$instance['shuffle'] = $new_instance['shuffle'];
|
54 |
+
$instance['theme_id'] = $new_instance['theme_id'];
|
55 |
+
return $instance;
|
56 |
+
}
|
57 |
+
|
58 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
+
// Getters & Setters //
|
60 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
61 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
62 |
+
// Private Methods //
|
63 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
65 |
+
// Listeners //
|
66 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
}
|
admin/controllers/BWGControllerWidgetTags.php
CHANGED
@@ -1,70 +1,70 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGControllerWidgetTags extends WP_Widget {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $view;
|
14 |
-
private $model;
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
// Constructor & Destructor //
|
17 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
-
public function __construct() {
|
19 |
-
$widget_ops = array(
|
20 |
-
'classname' => 'bwp_gallery_tags',
|
21 |
-
'description' => 'Add Photo Gallery Tags dynamic cloud to Your widget area.'
|
22 |
-
);
|
23 |
-
// Widget Control Settings.
|
24 |
-
$control_ops = array('id_base' => 'bwp_gallery_tags');
|
25 |
-
// Create the widget.
|
26 |
-
parent::__construct('bwp_gallery_tags', 'Photo Gallery Tags Cloud', $widget_ops, $control_ops);
|
27 |
-
require_once WD_BWG_DIR . "/admin/models/BWGModelWidgetTags.php";
|
28 |
-
$this->model = new BWGModelWidgetTags();
|
29 |
-
|
30 |
-
require_once WD_BWG_DIR . "/admin/views/BWGViewWidgetTags.php";
|
31 |
-
$this->view = new BWGViewWidgetTags($this->model);
|
32 |
-
}
|
33 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
-
// Public Methods //
|
35 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
-
|
37 |
-
public function widget($args, $instance) {
|
38 |
-
$this->view->widget($args, $instance);
|
39 |
-
}
|
40 |
-
|
41 |
-
public function form( $instance ) {
|
42 |
-
$this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('type'), parent::get_field_name('type'), parent::get_field_id('show_name'), parent::get_field_name('show_name'), parent::get_field_id('open_option'), parent::get_field_name('open_option'), parent::get_field_id('count'), parent::get_field_name('count'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('background_transparent'), parent::get_field_name('background_transparent'), parent::get_field_id('background_color'), parent::get_field_name('background_color'), parent::get_field_id('text_color'), parent::get_field_name('text_color'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
|
43 |
-
}
|
44 |
-
|
45 |
-
// Update Settings.
|
46 |
-
public function update($new_instance, $old_instance) {
|
47 |
-
$instance['title'] = strip_tags($new_instance['title']);
|
48 |
-
$instance['type'] = $new_instance['type'];
|
49 |
-
$instance['show_name'] = $new_instance['show_name'];
|
50 |
-
$instance['open_option'] = $new_instance['open_option'];
|
51 |
-
$instance['count'] = $new_instance['count'];
|
52 |
-
$instance['width'] = $new_instance['width'];
|
53 |
-
$instance['height'] = $new_instance['height'];
|
54 |
-
$instance['background_transparent'] = $new_instance['background_transparent'];
|
55 |
-
$instance['background_color'] = $new_instance['background_color'];
|
56 |
-
$instance['text_color'] = $new_instance['text_color'];
|
57 |
-
$instance['theme_id'] = $new_instance['theme_id'];
|
58 |
-
return $instance;
|
59 |
-
}
|
60 |
-
|
61 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
62 |
-
// Getters & Setters //
|
63 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
65 |
-
// Private Methods //
|
66 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
68 |
-
// Listeners //
|
69 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
70 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGControllerWidgetTags extends WP_Widget {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $view;
|
14 |
+
private $model;
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
// Constructor & Destructor //
|
17 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
+
public function __construct() {
|
19 |
+
$widget_ops = array(
|
20 |
+
'classname' => 'bwp_gallery_tags',
|
21 |
+
'description' => 'Add Photo Gallery Tags dynamic cloud to Your widget area.'
|
22 |
+
);
|
23 |
+
// Widget Control Settings.
|
24 |
+
$control_ops = array('id_base' => 'bwp_gallery_tags');
|
25 |
+
// Create the widget.
|
26 |
+
parent::__construct('bwp_gallery_tags', 'Photo Gallery Tags Cloud', $widget_ops, $control_ops);
|
27 |
+
require_once WD_BWG_DIR . "/admin/models/BWGModelWidgetTags.php";
|
28 |
+
$this->model = new BWGModelWidgetTags();
|
29 |
+
|
30 |
+
require_once WD_BWG_DIR . "/admin/views/BWGViewWidgetTags.php";
|
31 |
+
$this->view = new BWGViewWidgetTags($this->model);
|
32 |
+
}
|
33 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
+
// Public Methods //
|
35 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
+
|
37 |
+
public function widget($args, $instance) {
|
38 |
+
$this->view->widget($args, $instance);
|
39 |
+
}
|
40 |
+
|
41 |
+
public function form( $instance ) {
|
42 |
+
$this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('type'), parent::get_field_name('type'), parent::get_field_id('show_name'), parent::get_field_name('show_name'), parent::get_field_id('open_option'), parent::get_field_name('open_option'), parent::get_field_id('count'), parent::get_field_name('count'), parent::get_field_id('width'), parent::get_field_name('width'), parent::get_field_id('height'), parent::get_field_name('height'), parent::get_field_id('background_transparent'), parent::get_field_name('background_transparent'), parent::get_field_id('background_color'), parent::get_field_name('background_color'), parent::get_field_id('text_color'), parent::get_field_name('text_color'), parent::get_field_id('theme_id'), parent::get_field_name('theme_id'));
|
43 |
+
}
|
44 |
+
|
45 |
+
// Update Settings.
|
46 |
+
public function update($new_instance, $old_instance) {
|
47 |
+
$instance['title'] = strip_tags($new_instance['title']);
|
48 |
+
$instance['type'] = $new_instance['type'];
|
49 |
+
$instance['show_name'] = $new_instance['show_name'];
|
50 |
+
$instance['open_option'] = $new_instance['open_option'];
|
51 |
+
$instance['count'] = $new_instance['count'];
|
52 |
+
$instance['width'] = $new_instance['width'];
|
53 |
+
$instance['height'] = $new_instance['height'];
|
54 |
+
$instance['background_transparent'] = $new_instance['background_transparent'];
|
55 |
+
$instance['background_color'] = $new_instance['background_color'];
|
56 |
+
$instance['text_color'] = $new_instance['text_color'];
|
57 |
+
$instance['theme_id'] = $new_instance['theme_id'];
|
58 |
+
return $instance;
|
59 |
+
}
|
60 |
+
|
61 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
62 |
+
// Getters & Setters //
|
63 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
65 |
+
// Private Methods //
|
66 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
68 |
+
// Listeners //
|
69 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
70 |
}
|
admin/models/BWGModelAddAlbumsGalleries.php
CHANGED
@@ -1,69 +1,69 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelAddAlbumsGalleries {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $per_page = 20;
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Constructor & Destructor //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public function __construct() {
|
18 |
-
$this->per_page = ((isset($_GET['bwg_items_per_page'])) ? esc_html($_GET['bwg_items_per_page']) : ((isset($_POST['bwg_items_per_page'])) ? esc_html($_POST['bwg_items_per_page']) : 20));
|
19 |
-
}
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
// Public Methods //
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
|
24 |
-
public function get_rows_data($album_id) {
|
25 |
-
global $wpdb;
|
26 |
-
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
27 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
28 |
-
$asc_or_desc = ($asc_or_desc != 'asc') ? 'desc' : 'asc';
|
29 |
-
$order_by = ' ORDER BY ' . ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'name') . ' ' . $asc_or_desc;
|
30 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
31 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
32 |
-
}
|
33 |
-
else {
|
34 |
-
$limit = 0;
|
35 |
-
}
|
36 |
-
$query = "SELECT id, name, 1 as is_album FROM " . $wpdb->prefix . "bwg_album WHERE published=1 AND id<>" . $album_id . " " . $where . " UNION ALL SELECT id, name, 0 as is_album FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1 " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
37 |
-
$rows = $wpdb->get_results($query);
|
38 |
-
return $rows;
|
39 |
-
}
|
40 |
-
|
41 |
-
public function page_nav($album_id) {
|
42 |
-
global $wpdb;
|
43 |
-
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
44 |
-
$query = "SELECT id FROM " . $wpdb->prefix . "bwg_album WHERE published=1 AND id<>" . $album_id . " " . $where . " UNION ALL SELECT id FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1 " . $where;
|
45 |
-
$total = count($wpdb->get_col($query));
|
46 |
-
$page_nav['total'] = $total;
|
47 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
48 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
49 |
-
}
|
50 |
-
else {
|
51 |
-
$limit = 0;
|
52 |
-
}
|
53 |
-
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
54 |
-
return $page_nav;
|
55 |
-
}
|
56 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
57 |
-
// Getters & Setters //
|
58 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
-
public function per_page(){
|
60 |
-
return $this->per_page;
|
61 |
-
|
62 |
-
}
|
63 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
-
// Private Methods //
|
65 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
-
// Listeners //
|
68 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
69 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelAddAlbumsGalleries {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $per_page = 20;
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
// Constructor & Destructor //
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
public function __construct() {
|
18 |
+
$this->per_page = ((isset($_GET['bwg_items_per_page'])) ? esc_html($_GET['bwg_items_per_page']) : ((isset($_POST['bwg_items_per_page'])) ? esc_html($_POST['bwg_items_per_page']) : 20));
|
19 |
+
}
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
// Public Methods //
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
|
24 |
+
public function get_rows_data($album_id) {
|
25 |
+
global $wpdb;
|
26 |
+
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
27 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
28 |
+
$asc_or_desc = ($asc_or_desc != 'asc') ? 'desc' : 'asc';
|
29 |
+
$order_by = ' ORDER BY ' . ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'name') . ' ' . $asc_or_desc;
|
30 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
31 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
32 |
+
}
|
33 |
+
else {
|
34 |
+
$limit = 0;
|
35 |
+
}
|
36 |
+
$query = "SELECT id, name, 1 as is_album FROM " . $wpdb->prefix . "bwg_album WHERE published=1 AND id<>" . $album_id . " " . $where . " UNION ALL SELECT id, name, 0 as is_album FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1 " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
37 |
+
$rows = $wpdb->get_results($query);
|
38 |
+
return $rows;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function page_nav($album_id) {
|
42 |
+
global $wpdb;
|
43 |
+
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
44 |
+
$query = "SELECT id FROM " . $wpdb->prefix . "bwg_album WHERE published=1 AND id<>" . $album_id . " " . $where . " UNION ALL SELECT id FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1 " . $where;
|
45 |
+
$total = count($wpdb->get_col($query));
|
46 |
+
$page_nav['total'] = $total;
|
47 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
48 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
49 |
+
}
|
50 |
+
else {
|
51 |
+
$limit = 0;
|
52 |
+
}
|
53 |
+
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
54 |
+
return $page_nav;
|
55 |
+
}
|
56 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
57 |
+
// Getters & Setters //
|
58 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
+
public function per_page(){
|
60 |
+
return $this->per_page;
|
61 |
+
|
62 |
+
}
|
63 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
+
// Private Methods //
|
65 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
+
// Listeners //
|
68 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
69 |
}
|
admin/models/BWGModelAddTags.php
CHANGED
@@ -1,69 +1,69 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelAddTags {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $per_page = 20;
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Constructor & Destructor //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public function __construct() {
|
18 |
-
$this->per_page = ((isset($_GET['bwg_items_per_page'])) ? esc_html($_GET['bwg_items_per_page']) : ((isset($_POST['bwg_items_per_page'])) ? esc_html($_POST['bwg_items_per_page']) : 20));
|
19 |
-
}
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
// Public Methods //
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
|
24 |
-
public function get_rows_data() {
|
25 |
-
global $wpdb;
|
26 |
-
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
27 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
28 |
-
$asc_or_desc = ($asc_or_desc != 'asc') ? 'desc' : 'asc';
|
29 |
-
$order_by = ' ORDER BY ' . ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'name') . ' ' . $asc_or_desc;
|
30 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
31 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
32 |
-
}
|
33 |
-
else {
|
34 |
-
$limit = 0;
|
35 |
-
}
|
36 |
-
$query = "SELECT table1.term_id, table1.name, table1.slug FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "term_taxonomy AS table2 ON table1.term_id = table2.term_id WHERE table2.taxonomy='bwg_tag' " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
37 |
-
$rows = $wpdb->get_results($query);
|
38 |
-
return $rows;
|
39 |
-
}
|
40 |
-
|
41 |
-
public function page_nav() {
|
42 |
-
global $wpdb;
|
43 |
-
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
44 |
-
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "term_taxonomy AS table2 ON table1.term_id = table2.term_id WHERE table2.taxonomy='bwg_tag' " . $where;
|
45 |
-
$total = $wpdb->get_var($query);
|
46 |
-
$page_nav['total'] = $total;
|
47 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
48 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
49 |
-
}
|
50 |
-
else {
|
51 |
-
$limit = 0;
|
52 |
-
}
|
53 |
-
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
54 |
-
return $page_nav;
|
55 |
-
}
|
56 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
57 |
-
// Getters & Setters //
|
58 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
-
public function per_page(){
|
60 |
-
return $this->per_page;
|
61 |
-
|
62 |
-
}
|
63 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
-
// Private Methods //
|
65 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
-
// Listeners //
|
68 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
69 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelAddTags {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $per_page = 20;
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
// Constructor & Destructor //
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
public function __construct() {
|
18 |
+
$this->per_page = ((isset($_GET['bwg_items_per_page'])) ? esc_html($_GET['bwg_items_per_page']) : ((isset($_POST['bwg_items_per_page'])) ? esc_html($_POST['bwg_items_per_page']) : 20));
|
19 |
+
}
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
// Public Methods //
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
|
24 |
+
public function get_rows_data() {
|
25 |
+
global $wpdb;
|
26 |
+
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
27 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
28 |
+
$asc_or_desc = ($asc_or_desc != 'asc') ? 'desc' : 'asc';
|
29 |
+
$order_by = ' ORDER BY ' . ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'name') . ' ' . $asc_or_desc;
|
30 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
31 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
32 |
+
}
|
33 |
+
else {
|
34 |
+
$limit = 0;
|
35 |
+
}
|
36 |
+
$query = "SELECT table1.term_id, table1.name, table1.slug FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "term_taxonomy AS table2 ON table1.term_id = table2.term_id WHERE table2.taxonomy='bwg_tag' " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
37 |
+
$rows = $wpdb->get_results($query);
|
38 |
+
return $rows;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function page_nav() {
|
42 |
+
global $wpdb;
|
43 |
+
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
44 |
+
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "term_taxonomy AS table2 ON table1.term_id = table2.term_id WHERE table2.taxonomy='bwg_tag' " . $where;
|
45 |
+
$total = $wpdb->get_var($query);
|
46 |
+
$page_nav['total'] = $total;
|
47 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
48 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
49 |
+
}
|
50 |
+
else {
|
51 |
+
$limit = 0;
|
52 |
+
}
|
53 |
+
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
54 |
+
return $page_nav;
|
55 |
+
}
|
56 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
57 |
+
// Getters & Setters //
|
58 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
+
public function per_page(){
|
60 |
+
return $this->per_page;
|
61 |
+
|
62 |
+
}
|
63 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
64 |
+
// Private Methods //
|
65 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
+
// Listeners //
|
68 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
69 |
}
|
admin/models/BWGModelAlbums_bwg.php
CHANGED
@@ -1,120 +1,120 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelAlbums_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $per_page = 20;
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Constructor & Destructor //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public function __construct() {
|
18 |
-
$user = get_current_user_id();
|
19 |
-
$screen = get_current_screen();
|
20 |
-
$option = $screen->get_option('per_page', 'option');
|
21 |
-
|
22 |
-
$this->per_page = get_user_meta($user, $option, true);
|
23 |
-
|
24 |
-
if ( empty ( $this->per_page) || $this->per_page < 1 ) {
|
25 |
-
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
26 |
-
}
|
27 |
-
}
|
28 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
-
// Public Methods //
|
30 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
-
public function get_rows_data() {
|
32 |
-
global $wpdb;
|
33 |
-
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT album_role FROM " . $wpdb->prefix . "bwg_option")) {
|
34 |
-
$where = " WHERE author=" . get_current_user_id();
|
35 |
-
}
|
36 |
-
else {
|
37 |
-
$where = " WHERE author>=0 ";
|
38 |
-
}
|
39 |
-
$where .= ((isset($_POST['search_value'])) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
40 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
|
41 |
-
$order_by_arr = array('id', 'name', 'slug', 'order', 'author', 'published');
|
42 |
-
$order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'order');
|
43 |
-
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
44 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
45 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
46 |
-
}
|
47 |
-
else {
|
48 |
-
$limit = 0;
|
49 |
-
}
|
50 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_album " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
51 |
-
$rows = $wpdb->get_results($query);
|
52 |
-
return $rows;
|
53 |
-
}
|
54 |
-
|
55 |
-
public function get_row_data($id) {
|
56 |
-
global $wpdb;
|
57 |
-
if ($id != 0) {
|
58 |
-
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT album_role FROM " . $wpdb->prefix . "bwg_option")) {
|
59 |
-
$where = " WHERE author=" . get_current_user_id();
|
60 |
-
}
|
61 |
-
else {
|
62 |
-
$where = " WHERE author>=0 ";
|
63 |
-
}
|
64 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_album ' . $where . ' AND id="%d"', $id));
|
65 |
-
}
|
66 |
-
else {
|
67 |
-
$row = new stdClass();
|
68 |
-
$row->id = 0;
|
69 |
-
$row->name = '';
|
70 |
-
$row->slug = '';
|
71 |
-
$row->description = '';
|
72 |
-
$row->preview_image = '';
|
73 |
-
$row->order = 0;
|
74 |
-
$row->author = get_current_user_id();
|
75 |
-
$row->published = 1;
|
76 |
-
}
|
77 |
-
return $row;
|
78 |
-
}
|
79 |
-
|
80 |
-
public function get_albums_galleries_rows_data($album_id) {
|
81 |
-
global $wpdb;
|
82 |
-
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT album_role FROM " . $wpdb->prefix . "bwg_option")) {
|
83 |
-
$where = " AND author=" . get_current_user_id();
|
84 |
-
}
|
85 |
-
else {
|
86 |
-
$where = " AND author>=0 ";
|
87 |
-
}
|
88 |
-
$row = $wpdb->get_results("SELECT t1.id, t2.name, t2.slug, t1.is_album, t1.alb_gal_id, t1.order FROM " . $wpdb->prefix . "bwg_album_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_album as t2 on t1.alb_gal_id = t2.id where t1.is_album='1'" . $where . " AND t1.album_id='" . $album_id . "' union SELECT t1.id, t2.name, t2.slug, t1.is_album, t1.alb_gal_id, t1.order FROM " . $wpdb->prefix . "bwg_album_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_gallery as t2 on t1.alb_gal_id = t2.id where t1.is_album='0'" . $where . " AND t1.album_id='" . $album_id . "' ORDER BY `order`");
|
89 |
-
return $row;
|
90 |
-
}
|
91 |
-
|
92 |
-
public function page_nav() {
|
93 |
-
global $wpdb;
|
94 |
-
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? 'WHERE name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
95 |
-
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_album " . $where;
|
96 |
-
$total = $wpdb->get_var($query);
|
97 |
-
$page_nav['total'] = $total;
|
98 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
99 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
100 |
-
}
|
101 |
-
else {
|
102 |
-
$limit = 0;
|
103 |
-
}
|
104 |
-
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
105 |
-
return $page_nav;
|
106 |
-
}
|
107 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
108 |
-
// Getters & Setters //
|
109 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
110 |
-
public function per_page(){
|
111 |
-
return $this->per_page;
|
112 |
-
|
113 |
-
}
|
114 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
115 |
-
// Private Methods //
|
116 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
117 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
118 |
-
// Listeners //
|
119 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
120 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelAlbums_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $per_page = 20;
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
// Constructor & Destructor //
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
public function __construct() {
|
18 |
+
$user = get_current_user_id();
|
19 |
+
$screen = get_current_screen();
|
20 |
+
$option = $screen->get_option('per_page', 'option');
|
21 |
+
|
22 |
+
$this->per_page = get_user_meta($user, $option, true);
|
23 |
+
|
24 |
+
if ( empty ( $this->per_page) || $this->per_page < 1 ) {
|
25 |
+
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
26 |
+
}
|
27 |
+
}
|
28 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
+
// Public Methods //
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
+
public function get_rows_data() {
|
32 |
+
global $wpdb;
|
33 |
+
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT album_role FROM " . $wpdb->prefix . "bwg_option")) {
|
34 |
+
$where = " WHERE author=" . get_current_user_id();
|
35 |
+
}
|
36 |
+
else {
|
37 |
+
$where = " WHERE author>=0 ";
|
38 |
+
}
|
39 |
+
$where .= ((isset($_POST['search_value'])) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
40 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
|
41 |
+
$order_by_arr = array('id', 'name', 'slug', 'order', 'author', 'published');
|
42 |
+
$order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'order');
|
43 |
+
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
44 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
45 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
46 |
+
}
|
47 |
+
else {
|
48 |
+
$limit = 0;
|
49 |
+
}
|
50 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_album " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
51 |
+
$rows = $wpdb->get_results($query);
|
52 |
+
return $rows;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function get_row_data($id) {
|
56 |
+
global $wpdb;
|
57 |
+
if ($id != 0) {
|
58 |
+
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT album_role FROM " . $wpdb->prefix . "bwg_option")) {
|
59 |
+
$where = " WHERE author=" . get_current_user_id();
|
60 |
+
}
|
61 |
+
else {
|
62 |
+
$where = " WHERE author>=0 ";
|
63 |
+
}
|
64 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_album ' . $where . ' AND id="%d"', $id));
|
65 |
+
}
|
66 |
+
else {
|
67 |
+
$row = new stdClass();
|
68 |
+
$row->id = 0;
|
69 |
+
$row->name = '';
|
70 |
+
$row->slug = '';
|
71 |
+
$row->description = '';
|
72 |
+
$row->preview_image = '';
|
73 |
+
$row->order = 0;
|
74 |
+
$row->author = get_current_user_id();
|
75 |
+
$row->published = 1;
|
76 |
+
}
|
77 |
+
return $row;
|
78 |
+
}
|
79 |
+
|
80 |
+
public function get_albums_galleries_rows_data($album_id) {
|
81 |
+
global $wpdb;
|
82 |
+
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT album_role FROM " . $wpdb->prefix . "bwg_option")) {
|
83 |
+
$where = " AND author=" . get_current_user_id();
|
84 |
+
}
|
85 |
+
else {
|
86 |
+
$where = " AND author>=0 ";
|
87 |
+
}
|
88 |
+
$row = $wpdb->get_results("SELECT t1.id, t2.name, t2.slug, t1.is_album, t1.alb_gal_id, t1.order FROM " . $wpdb->prefix . "bwg_album_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_album as t2 on t1.alb_gal_id = t2.id where t1.is_album='1'" . $where . " AND t1.album_id='" . $album_id . "' union SELECT t1.id, t2.name, t2.slug, t1.is_album, t1.alb_gal_id, t1.order FROM " . $wpdb->prefix . "bwg_album_gallery as t1 INNER JOIN " . $wpdb->prefix . "bwg_gallery as t2 on t1.alb_gal_id = t2.id where t1.is_album='0'" . $where . " AND t1.album_id='" . $album_id . "' ORDER BY `order`");
|
89 |
+
return $row;
|
90 |
+
}
|
91 |
+
|
92 |
+
public function page_nav() {
|
93 |
+
global $wpdb;
|
94 |
+
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? 'WHERE name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
95 |
+
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_album " . $where;
|
96 |
+
$total = $wpdb->get_var($query);
|
97 |
+
$page_nav['total'] = $total;
|
98 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
99 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
100 |
+
}
|
101 |
+
else {
|
102 |
+
$limit = 0;
|
103 |
+
}
|
104 |
+
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
105 |
+
return $page_nav;
|
106 |
+
}
|
107 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
108 |
+
// Getters & Setters //
|
109 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
110 |
+
public function per_page(){
|
111 |
+
return $this->per_page;
|
112 |
+
|
113 |
+
}
|
114 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
115 |
+
// Private Methods //
|
116 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
117 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
118 |
+
// Listeners //
|
119 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
120 |
}
|
admin/models/BWGModelEditThumb.php
CHANGED
@@ -1,42 +1,42 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelEditThumb {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
|
22 |
-
public function get_image_data($id) {
|
23 |
-
global $wpdb;
|
24 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
|
25 |
-
return $row;
|
26 |
-
}
|
27 |
-
|
28 |
-
public function get_option_data() {
|
29 |
-
global $wpdb;
|
30 |
-
$row = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
|
31 |
-
return $row;
|
32 |
-
}
|
33 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
-
// Getters & Setters //
|
35 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
-
// Private Methods //
|
38 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
39 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
-
// Listeners //
|
41 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
42 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelEditThumb {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
public function get_image_data($id) {
|
23 |
+
global $wpdb;
|
24 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_image WHERE id="%d"', $id));
|
25 |
+
return $row;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function get_option_data() {
|
29 |
+
global $wpdb;
|
30 |
+
$row = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id=1');
|
31 |
+
return $row;
|
32 |
+
}
|
33 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
+
// Getters & Setters //
|
35 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
+
// Private Methods //
|
38 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
39 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
+
// Listeners //
|
41 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
42 |
}
|
admin/models/BWGModelGalleries_bwg.php
CHANGED
@@ -1,194 +1,194 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelGalleries_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $per_page = 20;
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Constructor & Destructor //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public function __construct() {
|
18 |
-
$user = get_current_user_id();
|
19 |
-
$screen = get_current_screen();
|
20 |
-
$option = $screen->get_option('per_page', 'option');
|
21 |
-
|
22 |
-
$this->per_page = get_user_meta($user, $option, true);
|
23 |
-
|
24 |
-
if ( empty ( $this->per_page) || $this->per_page < 1 ) {
|
25 |
-
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
26 |
-
|
27 |
-
}
|
28 |
-
}
|
29 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
-
// Public Methods //
|
31 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
-
|
33 |
-
public function get_image_rows_data($gallery_id) {
|
34 |
-
global $wpdb;
|
35 |
-
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {
|
36 |
-
$where = " WHERE author=" . get_current_user_id();
|
37 |
-
}
|
38 |
-
else {
|
39 |
-
$where = " WHERE author>=0 ";
|
40 |
-
}
|
41 |
-
$where .= ((isset($_POST['search_value'])) ? ' AND filename LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
42 |
-
$image_asc_or_desc = ((isset($_POST['image_asc_or_desc'])) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : ((isset($_COOKIE['bwg_image_asc_or_desc'])) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc'));
|
43 |
-
$image_asc_or_desc = ($image_asc_or_desc != 'asc') ? 'desc' : 'asc';
|
44 |
-
$image_order_by = ((isset($_POST['image_order_by']) && esc_html(stripslashes($_POST['image_order_by'])) != '') ? esc_html(stripslashes($_POST['image_order_by'])) : ((isset($_COOKIE['bwg_image_order_by']) && esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) != '') ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order'));
|
45 |
-
$order_by_arr = array('filename', 'alt', 'description', 'published');
|
46 |
-
$image_order_by = in_array($image_order_by, $order_by_arr) ? $image_order_by : 'order';
|
47 |
-
$image_order_by = ' ORDER BY `' . $image_order_by . '` ' . $image_asc_or_desc;
|
48 |
-
|
49 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
50 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
51 |
-
}
|
52 |
-
else {
|
53 |
-
$limit = 0;
|
54 |
-
}
|
55 |
-
$row = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "bwg_image " . $where . " AND gallery_id='" . $gallery_id . "' " . $image_order_by . " LIMIT " . $limit . "," . $this->per_page);
|
56 |
-
return $row;
|
57 |
-
}
|
58 |
-
|
59 |
-
public function get_tag_rows_data($image_id) {
|
60 |
-
global $wpdb;
|
61 |
-
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "bwg_image_tag AS table2 ON table1.term_id=table2.tag_id WHERE table2.image_id='%d' ORDER BY table2.tag_id", $image_id));
|
62 |
-
return $rows;
|
63 |
-
}
|
64 |
-
|
65 |
-
public function get_rows_data() {
|
66 |
-
global $wpdb;
|
67 |
-
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {
|
68 |
-
$where = " WHERE author=" . get_current_user_id();
|
69 |
-
}
|
70 |
-
else {
|
71 |
-
$where = " WHERE author>=0 ";
|
72 |
-
}
|
73 |
-
$where .= ((isset($_POST['search_value'])) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
74 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
|
75 |
-
$order_by_arr = array('id', 'name', 'slug', 'order', 'author', 'published');
|
76 |
-
$order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'order');
|
77 |
-
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
78 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
79 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
80 |
-
}
|
81 |
-
else {
|
82 |
-
$limit = 0;
|
83 |
-
}
|
84 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
85 |
-
$rows = $wpdb->get_results($query);
|
86 |
-
return $rows;
|
87 |
-
}
|
88 |
-
|
89 |
-
public function get_row_data($id) {
|
90 |
-
global $wpdb;
|
91 |
-
if ($id != 0) {
|
92 |
-
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {
|
93 |
-
$where = " WHERE author=" . get_current_user_id();
|
94 |
-
}
|
95 |
-
else {
|
96 |
-
$where = " WHERE author>=0 ";
|
97 |
-
}
|
98 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_gallery ' . $where . ' AND id="%d"', $id));
|
99 |
-
}
|
100 |
-
else {
|
101 |
-
$row = new stdClass();
|
102 |
-
$row->id = 0;
|
103 |
-
$row->name = '';
|
104 |
-
$row->slug = '';
|
105 |
-
$row->description = '';
|
106 |
-
$row->preview_image = '';
|
107 |
-
$row->order = 0;
|
108 |
-
$row->author = get_current_user_id();
|
109 |
-
$row->images_count = 0;
|
110 |
-
$row->published = 1;
|
111 |
-
$row->gallery_type = '';
|
112 |
-
$row->gallery_source = '';
|
113 |
-
$row->autogallery_image_number = 12;
|
114 |
-
$row->update_flag = '';
|
115 |
-
}
|
116 |
-
return $row;
|
117 |
-
}
|
118 |
-
|
119 |
-
public function page_nav() {
|
120 |
-
global $wpdb;
|
121 |
-
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {
|
122 |
-
$where = " WHERE author=" . get_current_user_id();
|
123 |
-
}
|
124 |
-
else {
|
125 |
-
$where = " WHERE author>=0 ";
|
126 |
-
}
|
127 |
-
$where .= ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
128 |
-
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_gallery " . $where;
|
129 |
-
$total = $wpdb->get_var($query);
|
130 |
-
$page_nav['total'] = $total;
|
131 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
132 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
133 |
-
}
|
134 |
-
else {
|
135 |
-
$limit = 0;
|
136 |
-
}
|
137 |
-
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
138 |
-
return $page_nav;
|
139 |
-
}
|
140 |
-
|
141 |
-
public function image_page_nav($gallery_id) {
|
142 |
-
global $wpdb;
|
143 |
-
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {
|
144 |
-
$where = " AND author=" . get_current_user_id();
|
145 |
-
}
|
146 |
-
else {
|
147 |
-
$where = " AND author>=0 ";
|
148 |
-
}
|
149 |
-
$where .= ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND filename LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
150 |
-
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='" . $gallery_id . "' " . $where;
|
151 |
-
$total = $wpdb->get_var($query);
|
152 |
-
$page_nav['total'] = $total;
|
153 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
154 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
155 |
-
}
|
156 |
-
else {
|
157 |
-
$limit = 0;
|
158 |
-
}
|
159 |
-
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
160 |
-
return $page_nav;
|
161 |
-
}
|
162 |
-
|
163 |
-
public function get_option_row_data() {
|
164 |
-
global $wpdb;
|
165 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
|
166 |
-
return $row;
|
167 |
-
}
|
168 |
-
|
169 |
-
public function get_images_count($gallery_id) {
|
170 |
-
global $wpdb;
|
171 |
-
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {
|
172 |
-
$where = " WHERE author=" . get_current_user_id();
|
173 |
-
}
|
174 |
-
else {
|
175 |
-
$where = " WHERE author>=0 ";
|
176 |
-
}
|
177 |
-
$row = $wpdb->get_var($wpdb->prepare("SELECT COUNT(filename) FROM " . $wpdb->prefix . "bwg_image " . $where . " AND gallery_id='%d'", $gallery_id));
|
178 |
-
return $row;
|
179 |
-
}
|
180 |
-
|
181 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
182 |
-
// Getters & Setters //
|
183 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
184 |
-
public function per_page(){
|
185 |
-
return $this->per_page;
|
186 |
-
|
187 |
-
}
|
188 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
189 |
-
// Private Methods //
|
190 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
191 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
192 |
-
// Listeners //
|
193 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
194 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelGalleries_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $per_page = 20;
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
// Constructor & Destructor //
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
public function __construct() {
|
18 |
+
$user = get_current_user_id();
|
19 |
+
$screen = get_current_screen();
|
20 |
+
$option = $screen->get_option('per_page', 'option');
|
21 |
+
|
22 |
+
$this->per_page = get_user_meta($user, $option, true);
|
23 |
+
|
24 |
+
if ( empty ( $this->per_page) || $this->per_page < 1 ) {
|
25 |
+
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
26 |
+
|
27 |
+
}
|
28 |
+
}
|
29 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
+
// Public Methods //
|
31 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
+
|
33 |
+
public function get_image_rows_data($gallery_id) {
|
34 |
+
global $wpdb;
|
35 |
+
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {
|
36 |
+
$where = " WHERE author=" . get_current_user_id();
|
37 |
+
}
|
38 |
+
else {
|
39 |
+
$where = " WHERE author>=0 ";
|
40 |
+
}
|
41 |
+
$where .= ((isset($_POST['search_value'])) ? ' AND filename LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
42 |
+
$image_asc_or_desc = ((isset($_POST['image_asc_or_desc'])) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : ((isset($_COOKIE['bwg_image_asc_or_desc'])) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc'));
|
43 |
+
$image_asc_or_desc = ($image_asc_or_desc != 'asc') ? 'desc' : 'asc';
|
44 |
+
$image_order_by = ((isset($_POST['image_order_by']) && esc_html(stripslashes($_POST['image_order_by'])) != '') ? esc_html(stripslashes($_POST['image_order_by'])) : ((isset($_COOKIE['bwg_image_order_by']) && esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) != '') ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order'));
|
45 |
+
$order_by_arr = array('filename', 'alt', 'description', 'published');
|
46 |
+
$image_order_by = in_array($image_order_by, $order_by_arr) ? $image_order_by : 'order';
|
47 |
+
$image_order_by = ' ORDER BY `' . $image_order_by . '` ' . $image_asc_or_desc;
|
48 |
+
|
49 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
50 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
51 |
+
}
|
52 |
+
else {
|
53 |
+
$limit = 0;
|
54 |
+
}
|
55 |
+
$row = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "bwg_image " . $where . " AND gallery_id='" . $gallery_id . "' " . $image_order_by . " LIMIT " . $limit . "," . $this->per_page);
|
56 |
+
return $row;
|
57 |
+
}
|
58 |
+
|
59 |
+
public function get_tag_rows_data($image_id) {
|
60 |
+
global $wpdb;
|
61 |
+
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "terms AS table1 INNER JOIN " . $wpdb->prefix . "bwg_image_tag AS table2 ON table1.term_id=table2.tag_id WHERE table2.image_id='%d' ORDER BY table2.tag_id", $image_id));
|
62 |
+
return $rows;
|
63 |
+
}
|
64 |
+
|
65 |
+
public function get_rows_data() {
|
66 |
+
global $wpdb;
|
67 |
+
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {
|
68 |
+
$where = " WHERE author=" . get_current_user_id();
|
69 |
+
}
|
70 |
+
else {
|
71 |
+
$where = " WHERE author>=0 ";
|
72 |
+
}
|
73 |
+
$where .= ((isset($_POST['search_value'])) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
74 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
|
75 |
+
$order_by_arr = array('id', 'name', 'slug', 'order', 'author', 'published');
|
76 |
+
$order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'order');
|
77 |
+
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
78 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
79 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
$limit = 0;
|
83 |
+
}
|
84 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
85 |
+
$rows = $wpdb->get_results($query);
|
86 |
+
return $rows;
|
87 |
+
}
|
88 |
+
|
89 |
+
public function get_row_data($id) {
|
90 |
+
global $wpdb;
|
91 |
+
if ($id != 0) {
|
92 |
+
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {
|
93 |
+
$where = " WHERE author=" . get_current_user_id();
|
94 |
+
}
|
95 |
+
else {
|
96 |
+
$where = " WHERE author>=0 ";
|
97 |
+
}
|
98 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_gallery ' . $where . ' AND id="%d"', $id));
|
99 |
+
}
|
100 |
+
else {
|
101 |
+
$row = new stdClass();
|
102 |
+
$row->id = 0;
|
103 |
+
$row->name = '';
|
104 |
+
$row->slug = '';
|
105 |
+
$row->description = '';
|
106 |
+
$row->preview_image = '';
|
107 |
+
$row->order = 0;
|
108 |
+
$row->author = get_current_user_id();
|
109 |
+
$row->images_count = 0;
|
110 |
+
$row->published = 1;
|
111 |
+
$row->gallery_type = '';
|
112 |
+
$row->gallery_source = '';
|
113 |
+
$row->autogallery_image_number = 12;
|
114 |
+
$row->update_flag = '';
|
115 |
+
}
|
116 |
+
return $row;
|
117 |
+
}
|
118 |
+
|
119 |
+
public function page_nav() {
|
120 |
+
global $wpdb;
|
121 |
+
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT gallery_role FROM " . $wpdb->prefix . "bwg_option")) {
|
122 |
+
$where = " WHERE author=" . get_current_user_id();
|
123 |
+
}
|
124 |
+
else {
|
125 |
+
$where = " WHERE author>=0 ";
|
126 |
+
}
|
127 |
+
$where .= ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
128 |
+
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_gallery " . $where;
|
129 |
+
$total = $wpdb->get_var($query);
|
130 |
+
$page_nav['total'] = $total;
|
131 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
132 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
133 |
+
}
|
134 |
+
else {
|
135 |
+
$limit = 0;
|
136 |
+
}
|
137 |
+
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
138 |
+
return $page_nav;
|
139 |
+
}
|
140 |
+
|
141 |
+
public function image_page_nav($gallery_id) {
|
142 |
+
global $wpdb;
|
143 |
+
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {
|
144 |
+
$where = " AND author=" . get_current_user_id();
|
145 |
+
}
|
146 |
+
else {
|
147 |
+
$where = " AND author>=0 ";
|
148 |
+
}
|
149 |
+
$where .= ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? ' AND filename LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
150 |
+
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_image WHERE gallery_id='" . $gallery_id . "' " . $where;
|
151 |
+
$total = $wpdb->get_var($query);
|
152 |
+
$page_nav['total'] = $total;
|
153 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
154 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
155 |
+
}
|
156 |
+
else {
|
157 |
+
$limit = 0;
|
158 |
+
}
|
159 |
+
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
160 |
+
return $page_nav;
|
161 |
+
}
|
162 |
+
|
163 |
+
public function get_option_row_data() {
|
164 |
+
global $wpdb;
|
165 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
|
166 |
+
return $row;
|
167 |
+
}
|
168 |
+
|
169 |
+
public function get_images_count($gallery_id) {
|
170 |
+
global $wpdb;
|
171 |
+
if (!current_user_can('manage_options') && $wpdb->get_var("SELECT image_role FROM " . $wpdb->prefix . "bwg_option")) {
|
172 |
+
$where = " WHERE author=" . get_current_user_id();
|
173 |
+
}
|
174 |
+
else {
|
175 |
+
$where = " WHERE author>=0 ";
|
176 |
+
}
|
177 |
+
$row = $wpdb->get_var($wpdb->prepare("SELECT COUNT(filename) FROM " . $wpdb->prefix . "bwg_image " . $where . " AND gallery_id='%d'", $gallery_id));
|
178 |
+
return $row;
|
179 |
+
}
|
180 |
+
|
181 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
182 |
+
// Getters & Setters //
|
183 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
184 |
+
public function per_page(){
|
185 |
+
return $this->per_page;
|
186 |
+
|
187 |
+
}
|
188 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
189 |
+
// Private Methods //
|
190 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
191 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
192 |
+
// Listeners //
|
193 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
194 |
}
|
admin/models/BWGModelLicensing_bwg.php
CHANGED
@@ -1,30 +1,30 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelLicensing_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
-
// Getters & Setters //
|
23 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
// Private Methods //
|
26 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
27 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
-
// Listeners //
|
29 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelLicensing_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
// Getters & Setters //
|
23 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
// Private Methods //
|
26 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
27 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
+
// Listeners //
|
29 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
}
|
admin/models/BWGModelOptions_bwg.php
CHANGED
@@ -1,189 +1,189 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelOptions_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
|
22 |
-
public function get_row_data($reset) {
|
23 |
-
global $wpdb;
|
24 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
|
25 |
-
$row->old_images_directory = $row->images_directory;
|
26 |
-
if ($reset) {
|
27 |
-
$upload_dir = wp_upload_dir();
|
28 |
-
if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
|
29 |
-
mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
|
30 |
-
}
|
31 |
-
$row->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
|
32 |
-
$row->masonry = 'vertical';
|
33 |
-
$row->mosaic = 'vertical';
|
34 |
-
$row->resizable_mosaic = 0;
|
35 |
-
$row->mosaic_total_width = 100;
|
36 |
-
$row->image_column_number = 5;
|
37 |
-
$row->images_per_page = 30;
|
38 |
-
$row->thumb_width = 180;
|
39 |
-
$row->thumb_height = 90;
|
40 |
-
$row->upload_thumb_width = 300;
|
41 |
-
$row->upload_thumb_height = 300;
|
42 |
-
$row->upload_img_width = 1200;
|
43 |
-
$row->upload_img_height = 1200;
|
44 |
-
$row->image_enable_page = 1;
|
45 |
-
$row->image_title_show_hover = 'none';
|
46 |
-
|
47 |
-
$row->album_column_number = 5;
|
48 |
-
$row->albums_per_page = 30;
|
49 |
-
$row->album_title_show_hover = 'hover';
|
50 |
-
$row->album_thumb_width = 120;
|
51 |
-
$row->album_thumb_height = 90;
|
52 |
-
$row->album_enable_page = 1;
|
53 |
-
$row->extended_album_height = 150;
|
54 |
-
$row->extended_album_description_enable = 1;
|
55 |
-
|
56 |
-
$row->image_browser_width = 800;
|
57 |
-
$row->image_browser_title_enable = 1;
|
58 |
-
$row->image_browser_description_enable = 1;
|
59 |
-
|
60 |
-
$row->blog_style_width = 800;
|
61 |
-
$row->blog_style_title_enable = 1;
|
62 |
-
$row->blog_style_images_per_page = 5;
|
63 |
-
$row->blog_style_enable_page = 1;
|
64 |
-
|
65 |
-
$row->slideshow_type = 'fade';
|
66 |
-
$row->slideshow_interval = 5;
|
67 |
-
$row->slideshow_width = 800;
|
68 |
-
$row->slideshow_height = 500;
|
69 |
-
$row->slideshow_enable_autoplay = 0;
|
70 |
-
$row->slideshow_enable_shuffle = 0;
|
71 |
-
$row->slideshow_enable_ctrl = 1;
|
72 |
-
$row->slideshow_enable_filmstrip = 1;
|
73 |
-
$row->slideshow_filmstrip_height = 90;
|
74 |
-
$row->slideshow_enable_title = 0;
|
75 |
-
$row->slideshow_title_position = 'top-right';
|
76 |
-
$row->slideshow_title_full_width = 0;
|
77 |
-
$row->slideshow_enable_description = 0;
|
78 |
-
$row->slideshow_description_position = 'bottom-right';
|
79 |
-
$row->slideshow_enable_music = 0;
|
80 |
-
$row->slideshow_audio_url = '';
|
81 |
-
|
82 |
-
$row->popup_width = 800;
|
83 |
-
$row->popup_height = 500;
|
84 |
-
$row->popup_type = 'fade';
|
85 |
-
$row->popup_interval = 5;
|
86 |
-
$row->popup_enable_filmstrip = 1;
|
87 |
-
$row->popup_filmstrip_height = 70;
|
88 |
-
$row->popup_enable_ctrl_btn = 1;
|
89 |
-
$row->popup_enable_fullscreen = 1;
|
90 |
-
$row->popup_enable_comment = 1;
|
91 |
-
$row->popup_enable_email = 0;
|
92 |
-
$row->popup_enable_captcha = 0;
|
93 |
-
$row->popup_enable_download = 0;
|
94 |
-
$row->popup_enable_fullsize_image = 0;
|
95 |
-
$row->popup_enable_facebook = 1;
|
96 |
-
$row->popup_enable_twitter = 1;
|
97 |
-
$row->popup_enable_google = 1;
|
98 |
-
$row->popup_enable_pinterest = 0;
|
99 |
-
$row->popup_enable_tumblr = 0;
|
100 |
-
|
101 |
-
$row->watermark_type = 'none';
|
102 |
-
$row->watermark_position = 'bottom-left';
|
103 |
-
$row->watermark_width = 90;
|
104 |
-
$row->watermark_height = 90;
|
105 |
-
$row->watermark_url = WD_BWG_URL . '/images/watermark.png';
|
106 |
-
$row->watermark_text = 'web-dorado.com';
|
107 |
-
$row->watermark_link = 'https://web-dorado.com';
|
108 |
-
$row->watermark_font_size = 20;
|
109 |
-
$row->watermark_font = 'arial';
|
110 |
-
$row->watermark_color = 'FFFFFF';
|
111 |
-
$row->watermark_opacity = 30;
|
112 |
-
|
113 |
-
$row->built_in_watermark_type = 'none';
|
114 |
-
$row->built_in_watermark_position = 'middle-center';
|
115 |
-
$row->built_in_watermark_size = 15;
|
116 |
-
$row->built_in_watermark_url = WD_BWG_URL . '/images/watermark.png';
|
117 |
-
$row->built_in_watermark_text = 'web-dorado.com';
|
118 |
-
$row->built_in_watermark_font_size = 20;
|
119 |
-
$row->built_in_watermark_font = 'arial';
|
120 |
-
$row->built_in_watermark_color = 'FFFFFF';
|
121 |
-
$row->built_in_watermark_opacity = 30;
|
122 |
-
|
123 |
-
$row->image_right_click = 0;
|
124 |
-
$row->popup_fullscreen = 0;
|
125 |
-
$row->gallery_role = 0;
|
126 |
-
$row->album_role = 0;
|
127 |
-
$row->image_role = 0;
|
128 |
-
$row->popup_autoplay = 0;
|
129 |
-
$row->album_view_type = 'thumbnail';
|
130 |
-
$row->show_search_box = 0;
|
131 |
-
$row->search_box_width = 180;
|
132 |
-
$row->preload_images = 1;
|
133 |
-
$row->preload_images_count = 10;
|
134 |
-
$row->popup_enable_info = 1;
|
135 |
-
$row->popup_info_always_show = 0;
|
136 |
-
$row->popup_enable_rate = 0;
|
137 |
-
$row->thumb_click_action = 'open_lightbox';
|
138 |
-
$row->thumb_link_target = 1;
|
139 |
-
$row->comment_moderation = 0;
|
140 |
-
$row->popup_hit_counter = 0;
|
141 |
-
$row->enable_ML_import = 0;
|
142 |
-
$row->autoupdate_interval = 30;
|
143 |
-
$row->instagram_client_id = '';
|
144 |
-
$row->showthumbs_name = 0;
|
145 |
-
$row->show_album_name = 0;
|
146 |
-
$row->show_image_counts = 0;
|
147 |
-
$row->play_icon = 1;
|
148 |
-
$row->show_masonry_thumb_description = 0;
|
149 |
-
$row->popup_info_full_width = 0;
|
150 |
-
$row->show_sort_images = 0;
|
151 |
-
$row->enable_seo = 1;
|
152 |
-
$row->autohide_lightbox_navigation = 1;
|
153 |
-
$row->autohide_slideshow_navigation = 1;
|
154 |
-
$row->read_metadata = 0;
|
155 |
-
$row->enable_loop = 1;
|
156 |
-
$row->enable_addthis = 0;
|
157 |
-
$row->addthis_profile_id = '';
|
158 |
-
|
159 |
-
$row->carousel_interval = 5;
|
160 |
-
$row->carousel_width = 300;
|
161 |
-
$row->carousel_height = 300;
|
162 |
-
$row->carousel_image_column_number = 5;
|
163 |
-
$row->carousel_image_par = 0.75;
|
164 |
-
$row->carousel_enable_autoplay = 0;
|
165 |
-
$row->carousel_enable_title = 0;
|
166 |
-
$row->carousel_r_width = 800;
|
167 |
-
$row->carousel_fit_containerWidth = 1;
|
168 |
-
$row->carousel_prev_next_butt = 1;
|
169 |
-
$row->carousel_play_pause_butt = 1;
|
170 |
-
$row->permissions = 'manage_options';
|
171 |
-
$row->facebook_app_id = '';
|
172 |
-
$row->facebook_app_secret = '';
|
173 |
-
$row->show_tag_box = 0;
|
174 |
-
$row->show_hide_custom_post = 0;
|
175 |
-
$row->show_hide_post_meta = 0;
|
176 |
-
$row->placeholder = '';
|
177 |
-
}
|
178 |
-
return $row;
|
179 |
-
}
|
180 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
181 |
-
// Getters & Setters //
|
182 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
183 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
184 |
-
// Private Methods //
|
185 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
186 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
187 |
-
// Listeners //
|
188 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
189 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelOptions_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
public function get_row_data($reset) {
|
23 |
+
global $wpdb;
|
24 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
|
25 |
+
$row->old_images_directory = $row->images_directory;
|
26 |
+
if ($reset) {
|
27 |
+
$upload_dir = wp_upload_dir();
|
28 |
+
if (!is_dir($upload_dir['basedir'] . '/photo-gallery')) {
|
29 |
+
mkdir($upload_dir['basedir'] . '/photo-gallery', 0777);
|
30 |
+
}
|
31 |
+
$row->images_directory = str_replace(ABSPATH, '', $upload_dir['basedir']);
|
32 |
+
$row->masonry = 'vertical';
|
33 |
+
$row->mosaic = 'vertical';
|
34 |
+
$row->resizable_mosaic = 0;
|
35 |
+
$row->mosaic_total_width = 100;
|
36 |
+
$row->image_column_number = 5;
|
37 |
+
$row->images_per_page = 30;
|
38 |
+
$row->thumb_width = 180;
|
39 |
+
$row->thumb_height = 90;
|
40 |
+
$row->upload_thumb_width = 300;
|
41 |
+
$row->upload_thumb_height = 300;
|
42 |
+
$row->upload_img_width = 1200;
|
43 |
+
$row->upload_img_height = 1200;
|
44 |
+
$row->image_enable_page = 1;
|
45 |
+
$row->image_title_show_hover = 'none';
|
46 |
+
|
47 |
+
$row->album_column_number = 5;
|
48 |
+
$row->albums_per_page = 30;
|
49 |
+
$row->album_title_show_hover = 'hover';
|
50 |
+
$row->album_thumb_width = 120;
|
51 |
+
$row->album_thumb_height = 90;
|
52 |
+
$row->album_enable_page = 1;
|
53 |
+
$row->extended_album_height = 150;
|
54 |
+
$row->extended_album_description_enable = 1;
|
55 |
+
|
56 |
+
$row->image_browser_width = 800;
|
57 |
+
$row->image_browser_title_enable = 1;
|
58 |
+
$row->image_browser_description_enable = 1;
|
59 |
+
|
60 |
+
$row->blog_style_width = 800;
|
61 |
+
$row->blog_style_title_enable = 1;
|
62 |
+
$row->blog_style_images_per_page = 5;
|
63 |
+
$row->blog_style_enable_page = 1;
|
64 |
+
|
65 |
+
$row->slideshow_type = 'fade';
|
66 |
+
$row->slideshow_interval = 5;
|
67 |
+
$row->slideshow_width = 800;
|
68 |
+
$row->slideshow_height = 500;
|
69 |
+
$row->slideshow_enable_autoplay = 0;
|
70 |
+
$row->slideshow_enable_shuffle = 0;
|
71 |
+
$row->slideshow_enable_ctrl = 1;
|
72 |
+
$row->slideshow_enable_filmstrip = 1;
|
73 |
+
$row->slideshow_filmstrip_height = 90;
|
74 |
+
$row->slideshow_enable_title = 0;
|
75 |
+
$row->slideshow_title_position = 'top-right';
|
76 |
+
$row->slideshow_title_full_width = 0;
|
77 |
+
$row->slideshow_enable_description = 0;
|
78 |
+
$row->slideshow_description_position = 'bottom-right';
|
79 |
+
$row->slideshow_enable_music = 0;
|
80 |
+
$row->slideshow_audio_url = '';
|
81 |
+
|
82 |
+
$row->popup_width = 800;
|
83 |
+
$row->popup_height = 500;
|
84 |
+
$row->popup_type = 'fade';
|
85 |
+
$row->popup_interval = 5;
|
86 |
+
$row->popup_enable_filmstrip = 1;
|
87 |
+
$row->popup_filmstrip_height = 70;
|
88 |
+
$row->popup_enable_ctrl_btn = 1;
|
89 |
+
$row->popup_enable_fullscreen = 1;
|
90 |
+
$row->popup_enable_comment = 1;
|
91 |
+
$row->popup_enable_email = 0;
|
92 |
+
$row->popup_enable_captcha = 0;
|
93 |
+
$row->popup_enable_download = 0;
|
94 |
+
$row->popup_enable_fullsize_image = 0;
|
95 |
+
$row->popup_enable_facebook = 1;
|
96 |
+
$row->popup_enable_twitter = 1;
|
97 |
+
$row->popup_enable_google = 1;
|
98 |
+
$row->popup_enable_pinterest = 0;
|
99 |
+
$row->popup_enable_tumblr = 0;
|
100 |
+
|
101 |
+
$row->watermark_type = 'none';
|
102 |
+
$row->watermark_position = 'bottom-left';
|
103 |
+
$row->watermark_width = 90;
|
104 |
+
$row->watermark_height = 90;
|
105 |
+
$row->watermark_url = WD_BWG_URL . '/images/watermark.png';
|
106 |
+
$row->watermark_text = 'web-dorado.com';
|
107 |
+
$row->watermark_link = 'https://web-dorado.com';
|
108 |
+
$row->watermark_font_size = 20;
|
109 |
+
$row->watermark_font = 'arial';
|
110 |
+
$row->watermark_color = 'FFFFFF';
|
111 |
+
$row->watermark_opacity = 30;
|
112 |
+
|
113 |
+
$row->built_in_watermark_type = 'none';
|
114 |
+
$row->built_in_watermark_position = 'middle-center';
|
115 |
+
$row->built_in_watermark_size = 15;
|
116 |
+
$row->built_in_watermark_url = WD_BWG_URL . '/images/watermark.png';
|
117 |
+
$row->built_in_watermark_text = 'web-dorado.com';
|
118 |
+
$row->built_in_watermark_font_size = 20;
|
119 |
+
$row->built_in_watermark_font = 'arial';
|
120 |
+
$row->built_in_watermark_color = 'FFFFFF';
|
121 |
+
$row->built_in_watermark_opacity = 30;
|
122 |
+
|
123 |
+
$row->image_right_click = 0;
|
124 |
+
$row->popup_fullscreen = 0;
|
125 |
+
$row->gallery_role = 0;
|
126 |
+
$row->album_role = 0;
|
127 |
+
$row->image_role = 0;
|
128 |
+
$row->popup_autoplay = 0;
|
129 |
+
$row->album_view_type = 'thumbnail';
|
130 |
+
$row->show_search_box = 0;
|
131 |
+
$row->search_box_width = 180;
|
132 |
+
$row->preload_images = 1;
|
133 |
+
$row->preload_images_count = 10;
|
134 |
+
$row->popup_enable_info = 1;
|
135 |
+
$row->popup_info_always_show = 0;
|
136 |
+
$row->popup_enable_rate = 0;
|
137 |
+
$row->thumb_click_action = 'open_lightbox';
|
138 |
+
$row->thumb_link_target = 1;
|
139 |
+
$row->comment_moderation = 0;
|
140 |
+
$row->popup_hit_counter = 0;
|
141 |
+
$row->enable_ML_import = 0;
|
142 |
+
$row->autoupdate_interval = 30;
|
143 |
+
$row->instagram_client_id = '';
|
144 |
+
$row->showthumbs_name = 0;
|
145 |
+
$row->show_album_name = 0;
|
146 |
+
$row->show_image_counts = 0;
|
147 |
+
$row->play_icon = 1;
|
148 |
+
$row->show_masonry_thumb_description = 0;
|
149 |
+
$row->popup_info_full_width = 0;
|
150 |
+
$row->show_sort_images = 0;
|
151 |
+
$row->enable_seo = 1;
|
152 |
+
$row->autohide_lightbox_navigation = 1;
|
153 |
+
$row->autohide_slideshow_navigation = 1;
|
154 |
+
$row->read_metadata = 0;
|
155 |
+
$row->enable_loop = 1;
|
156 |
+
$row->enable_addthis = 0;
|
157 |
+
$row->addthis_profile_id = '';
|
158 |
+
|
159 |
+
$row->carousel_interval = 5;
|
160 |
+
$row->carousel_width = 300;
|
161 |
+
$row->carousel_height = 300;
|
162 |
+
$row->carousel_image_column_number = 5;
|
163 |
+
$row->carousel_image_par = 0.75;
|
164 |
+
$row->carousel_enable_autoplay = 0;
|
165 |
+
$row->carousel_enable_title = 0;
|
166 |
+
$row->carousel_r_width = 800;
|
167 |
+
$row->carousel_fit_containerWidth = 1;
|
168 |
+
$row->carousel_prev_next_butt = 1;
|
169 |
+
$row->carousel_play_pause_butt = 1;
|
170 |
+
$row->permissions = 'manage_options';
|
171 |
+
$row->facebook_app_id = '';
|
172 |
+
$row->facebook_app_secret = '';
|
173 |
+
$row->show_tag_box = 0;
|
174 |
+
$row->show_hide_custom_post = 0;
|
175 |
+
$row->show_hide_post_meta = 0;
|
176 |
+
$row->placeholder = '';
|
177 |
+
}
|
178 |
+
return $row;
|
179 |
+
}
|
180 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
181 |
+
// Getters & Setters //
|
182 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
183 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
184 |
+
// Private Methods //
|
185 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
186 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
187 |
+
// Listeners //
|
188 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
189 |
}
|
admin/models/BWGModelTags_bwg.php
CHANGED
@@ -1,85 +1,85 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelTags_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $per_page = 20;
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Constructor & Destructor //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public function __construct() {
|
18 |
-
$user = get_current_user_id();
|
19 |
-
$screen = get_current_screen();
|
20 |
-
$option = $screen->get_option('per_page', 'option');
|
21 |
-
|
22 |
-
|
23 |
-
$this->per_page = get_user_meta($user, $option, true);
|
24 |
-
|
25 |
-
if ( empty ( $this->per_page) || $this->per_page < 1 ) {
|
26 |
-
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
27 |
-
}
|
28 |
-
}
|
29 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
-
// Public Methods //
|
31 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
-
public function get_rows_data() {
|
33 |
-
global $wpdb;
|
34 |
-
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? 'AND A.name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
35 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
|
36 |
-
$order_by_arr = array('A.term_id', 'A.name', 'A.slug', 'B.count');
|
37 |
-
$order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'A.term_id');
|
38 |
-
$order_by = ' ORDER BY ' . $order_by . ' ' . $asc_or_desc;
|
39 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
40 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
41 |
-
}
|
42 |
-
else {
|
43 |
-
$limit = 0;
|
44 |
-
}
|
45 |
-
$query ="SELECT * FROM ".$wpdb->prefix."terms as A LEFT JOIN ".$wpdb->prefix ."term_taxonomy as B ON A.term_id = B.term_id WHERE B.taxonomy='bwg_tag' " . $where . $order_by . " LIMIT " . $limit . "," . $this->per_page;
|
46 |
-
$rows = $wpdb->get_results($query);
|
47 |
-
return $rows;
|
48 |
-
}
|
49 |
-
|
50 |
-
public function page_nav() {
|
51 |
-
global $wpdb;
|
52 |
-
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? 'AND A.name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
53 |
-
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "terms as A LEFT JOIN ".$wpdb->prefix . "term_taxonomy as B ON A.term_id = B.term_id WHERE B.taxonomy ='bwg_tag' " . $where;
|
54 |
-
$total = $wpdb->get_var($query);
|
55 |
-
$page_nav['total'] = $total;
|
56 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
57 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
58 |
-
}
|
59 |
-
else {
|
60 |
-
$limit = 0;
|
61 |
-
}
|
62 |
-
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
63 |
-
return $page_nav;
|
64 |
-
}
|
65 |
-
|
66 |
-
public function get_count_of_images($term_id) {
|
67 |
-
global $wpdb;
|
68 |
-
$query = "SELECT count FROM " . $wpdb->prefix . "term_taxonomy WHERE term_id=" . $term_id;
|
69 |
-
$count = $wpdb->get_var($query);
|
70 |
-
return $count;
|
71 |
-
}
|
72 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
73 |
-
// Getters & Setters //
|
74 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
75 |
-
public function per_page(){
|
76 |
-
return $this->per_page;
|
77 |
-
|
78 |
-
}
|
79 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
80 |
-
// Private Methods //
|
81 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
82 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
83 |
-
// Listeners //
|
84 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
85 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelTags_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $per_page = 20;
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
// Constructor & Destructor //
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
public function __construct() {
|
18 |
+
$user = get_current_user_id();
|
19 |
+
$screen = get_current_screen();
|
20 |
+
$option = $screen->get_option('per_page', 'option');
|
21 |
+
|
22 |
+
|
23 |
+
$this->per_page = get_user_meta($user, $option, true);
|
24 |
+
|
25 |
+
if ( empty ( $this->per_page) || $this->per_page < 1 ) {
|
26 |
+
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
27 |
+
}
|
28 |
+
}
|
29 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
+
// Public Methods //
|
31 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
+
public function get_rows_data() {
|
33 |
+
global $wpdb;
|
34 |
+
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? 'AND A.name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
35 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
|
36 |
+
$order_by_arr = array('A.term_id', 'A.name', 'A.slug', 'B.count');
|
37 |
+
$order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'A.term_id');
|
38 |
+
$order_by = ' ORDER BY ' . $order_by . ' ' . $asc_or_desc;
|
39 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
40 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
41 |
+
}
|
42 |
+
else {
|
43 |
+
$limit = 0;
|
44 |
+
}
|
45 |
+
$query ="SELECT * FROM ".$wpdb->prefix."terms as A LEFT JOIN ".$wpdb->prefix ."term_taxonomy as B ON A.term_id = B.term_id WHERE B.taxonomy='bwg_tag' " . $where . $order_by . " LIMIT " . $limit . "," . $this->per_page;
|
46 |
+
$rows = $wpdb->get_results($query);
|
47 |
+
return $rows;
|
48 |
+
}
|
49 |
+
|
50 |
+
public function page_nav() {
|
51 |
+
global $wpdb;
|
52 |
+
$where = ((isset($_POST['search_value']) && (esc_html(stripslashes($_POST['search_value'])) != '')) ? 'AND A.name LIKE "%' . esc_html(stripslashes($_POST['search_value'])) . '%"' : '');
|
53 |
+
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "terms as A LEFT JOIN ".$wpdb->prefix . "term_taxonomy as B ON A.term_id = B.term_id WHERE B.taxonomy ='bwg_tag' " . $where;
|
54 |
+
$total = $wpdb->get_var($query);
|
55 |
+
$page_nav['total'] = $total;
|
56 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
57 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
58 |
+
}
|
59 |
+
else {
|
60 |
+
$limit = 0;
|
61 |
+
}
|
62 |
+
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
63 |
+
return $page_nav;
|
64 |
+
}
|
65 |
+
|
66 |
+
public function get_count_of_images($term_id) {
|
67 |
+
global $wpdb;
|
68 |
+
$query = "SELECT count FROM " . $wpdb->prefix . "term_taxonomy WHERE term_id=" . $term_id;
|
69 |
+
$count = $wpdb->get_var($query);
|
70 |
+
return $count;
|
71 |
+
}
|
72 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
73 |
+
// Getters & Setters //
|
74 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
75 |
+
public function per_page(){
|
76 |
+
return $this->per_page;
|
77 |
+
|
78 |
+
}
|
79 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
80 |
+
// Private Methods //
|
81 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
82 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
83 |
+
// Listeners //
|
84 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
85 |
}
|
admin/models/BWGModelThemes_bwg.php
CHANGED
@@ -1,557 +1,557 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelThemes_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $per_page = 20;
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Constructor & Destructor //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public function __construct() {
|
18 |
-
$user = get_current_user_id();
|
19 |
-
$screen = get_current_screen();
|
20 |
-
$option = $screen->get_option('per_page', 'option');
|
21 |
-
|
22 |
-
$this->per_page = get_user_meta($user, $option, true);
|
23 |
-
|
24 |
-
if ( empty ( $this->per_page) || $this->per_page < 1 ) {
|
25 |
-
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
26 |
-
}
|
27 |
-
}
|
28 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
-
// Public Methods //
|
30 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
-
public function get_rows_data() {
|
32 |
-
global $wpdb;
|
33 |
-
$where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE name LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
|
34 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
|
35 |
-
$order_by_arr = array('id', 'name', 'default');
|
36 |
-
$order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'id');
|
37 |
-
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
38 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
39 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
40 |
-
}
|
41 |
-
else {
|
42 |
-
$limit = 0;
|
43 |
-
}
|
44 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_theme " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
45 |
-
$rows = $wpdb->get_results($query);
|
46 |
-
return $rows;
|
47 |
-
}
|
48 |
-
|
49 |
-
public function get_row_data($id, $reset) {
|
50 |
-
global $wpdb;
|
51 |
-
if ($id != 0) {
|
52 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $id));
|
53 |
-
$themes = json_decode($row->options);
|
54 |
-
foreach ($themes as $key => $value) {
|
55 |
-
$row->$key = $value;
|
56 |
-
}
|
57 |
-
if (!isset($row->lightbox_bg_transparent)) {
|
58 |
-
$row->lightbox_bg_transparent = 100;
|
59 |
-
}
|
60 |
-
if ($reset) {
|
61 |
-
if (!$row->default_theme) {
|
62 |
-
$row_id = $row->id;
|
63 |
-
$row_name = $row->name;
|
64 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme="%d"', 1));
|
65 |
-
$row->id = $row_id;
|
66 |
-
$row->name = $row_name;
|
67 |
-
$row->default_theme = FALSE;
|
68 |
-
}
|
69 |
-
else {
|
70 |
-
$row->thumb_margin = 4;
|
71 |
-
$row->thumb_padding = 0;
|
72 |
-
$row->thumb_border_radius = '0';
|
73 |
-
$row->thumb_border_width = 0;
|
74 |
-
$row->thumb_border_style = 'none';
|
75 |
-
$row->thumb_border_color = 'CCCCCC';
|
76 |
-
$row->thumb_bg_color = 'FFFFFF';
|
77 |
-
$row->thumbs_bg_color = 'FFFFFF';
|
78 |
-
$row->thumb_bg_transparent = 0;
|
79 |
-
$row->thumb_box_shadow = '0px 0px 0px #888888';
|
80 |
-
$row->thumb_transparent = 100;
|
81 |
-
$row->thumb_align = 'left';
|
82 |
-
$row->thumb_hover_effect = 'scale';
|
83 |
-
$row->thumb_hover_effect_value = '1.1';
|
84 |
-
$row->thumb_transition = 1;
|
85 |
-
$row->thumb_title_font_color = 'CCCCCC';
|
86 |
-
$row->thumb_title_font_style = 'segoe ui';
|
87 |
-
$row->thumb_title_pos = 'bottom';
|
88 |
-
$row->thumb_title_font_size = 16;
|
89 |
-
$row->thumb_title_font_weight = 'bold';
|
90 |
-
$row->thumb_title_margin = '2px';
|
91 |
-
$row->thumb_title_shadow = '0px 0px 0px #888888';
|
92 |
-
|
93 |
-
$row->page_nav_position = 'bottom';
|
94 |
-
$row->page_nav_align = 'center';
|
95 |
-
$row->page_nav_number = 0;
|
96 |
-
$row->page_nav_font_size = 12;
|
97 |
-
$row->page_nav_font_style = 'segoe ui';
|
98 |
-
$row->page_nav_font_color = '666666';
|
99 |
-
$row->page_nav_font_weight = 'bold';
|
100 |
-
$row->page_nav_border_width = 1;
|
101 |
-
$row->page_nav_border_style = 'solid';
|
102 |
-
$row->page_nav_border_color = 'E3E3E3';
|
103 |
-
$row->page_nav_border_radius = '0';
|
104 |
-
$row->page_nav_margin = '0';
|
105 |
-
$row->page_nav_padding = '3px 6px';
|
106 |
-
$row->page_nav_button_bg_color = 'FFFFFF';
|
107 |
-
$row->page_nav_button_bg_transparent = 100;
|
108 |
-
$row->page_nav_box_shadow = '0';
|
109 |
-
$row->page_nav_button_transition = 1;
|
110 |
-
$row->page_nav_button_text = 0;
|
111 |
-
|
112 |
-
$row->lightbox_overlay_bg_color = '000000';
|
113 |
-
$row->lightbox_overlay_bg_transparent = 70;
|
114 |
-
$row->lightbox_bg_color = '000000';
|
115 |
-
$row->lightbox_ctrl_btn_pos = 'bottom';
|
116 |
-
$row->lightbox_ctrl_btn_align = 'center';
|
117 |
-
$row->lightbox_ctrl_btn_height = 20;
|
118 |
-
$row->lightbox_ctrl_btn_margin_top = 10;
|
119 |
-
$row->lightbox_ctrl_btn_margin_left = 7;
|
120 |
-
$row->lightbox_ctrl_btn_transparent = 100;
|
121 |
-
$row->lightbox_ctrl_btn_color = 'FFFFFF';
|
122 |
-
$row->lightbox_toggle_btn_height = 14;
|
123 |
-
$row->lightbox_toggle_btn_width = 100;
|
124 |
-
$row->lightbox_ctrl_cont_bg_color = '000000';
|
125 |
-
$row->lightbox_ctrl_cont_transparent = 65;
|
126 |
-
$row->lightbox_ctrl_cont_border_radius = 4;
|
127 |
-
$row->lightbox_close_btn_transparent = 100;
|
128 |
-
$row->lightbox_close_btn_bg_color = '000000';
|
129 |
-
$row->lightbox_close_btn_border_width = 2;
|
130 |
-
$row->lightbox_close_btn_border_radius = '16px';
|
131 |
-
$row->lightbox_close_btn_border_style = 'none';
|
132 |
-
$row->lightbox_close_btn_border_color = 'FFFFFF';
|
133 |
-
$row->lightbox_close_btn_box_shadow = '0';
|
134 |
-
$row->lightbox_close_btn_color = 'FFFFFF';
|
135 |
-
$row->lightbox_close_btn_size = 10;
|
136 |
-
$row->lightbox_close_btn_width = 20;
|
137 |
-
$row->lightbox_close_btn_height = 20;
|
138 |
-
$row->lightbox_close_btn_top = '-10';
|
139 |
-
$row->lightbox_close_btn_right = '-10';
|
140 |
-
$row->lightbox_close_btn_full_color = 'FFFFFF';
|
141 |
-
$row->lightbox_rl_btn_bg_color = '000000';
|
142 |
-
$row->lightbox_rl_btn_border_radius = '20px';
|
143 |
-
$row->lightbox_rl_btn_border_width = 0;
|
144 |
-
$row->lightbox_rl_btn_border_style = 'none';
|
145 |
-
$row->lightbox_rl_btn_border_color = 'FFFFFF';
|
146 |
-
$row->lightbox_rl_btn_box_shadow = '';
|
147 |
-
$row->lightbox_rl_btn_color = 'FFFFFF';
|
148 |
-
$row->lightbox_rl_btn_height = 40;
|
149 |
-
$row->lightbox_rl_btn_width = 40;
|
150 |
-
$row->lightbox_rl_btn_size = 20;
|
151 |
-
$row->lightbox_close_rl_btn_hover_color = 'CCCCCC';
|
152 |
-
$row->lightbox_comment_pos = 'left';
|
153 |
-
$row->lightbox_comment_width = 400;
|
154 |
-
$row->lightbox_comment_bg_color = '000000';
|
155 |
-
$row->lightbox_comment_font_color = 'CCCCCC';
|
156 |
-
$row->lightbox_comment_font_style = 'segoe ui';
|
157 |
-
$row->lightbox_comment_font_size = 12;
|
158 |
-
$row->lightbox_comment_button_bg_color = '616161';
|
159 |
-
$row->lightbox_comment_button_border_color = '666666';
|
160 |
-
$row->lightbox_comment_button_border_width = 1;
|
161 |
-
$row->lightbox_comment_button_border_style = 'none';
|
162 |
-
$row->lightbox_comment_button_border_radius = '3px';
|
163 |
-
$row->lightbox_comment_button_padding = '3px 10px';
|
164 |
-
$row->lightbox_comment_input_bg_color = '333333';
|
165 |
-
$row->lightbox_comment_input_border_color = '666666';
|
166 |
-
$row->lightbox_comment_input_border_width = 1;
|
167 |
-
$row->lightbox_comment_input_border_style = 'none';
|
168 |
-
$row->lightbox_comment_input_border_radius = '0';
|
169 |
-
$row->lightbox_comment_input_padding = '2px';
|
170 |
-
$row->lightbox_comment_separator_width = 1;
|
171 |
-
$row->lightbox_comment_separator_style = 'solid';
|
172 |
-
$row->lightbox_comment_separator_color = '383838';
|
173 |
-
$row->lightbox_comment_author_font_size = 14;
|
174 |
-
$row->lightbox_comment_date_font_size = 10;
|
175 |
-
$row->lightbox_comment_body_font_size = 12;
|
176 |
-
$row->lightbox_comment_share_button_color = 'CCCCCC';
|
177 |
-
$row->lightbox_filmstrip_pos = 'top';
|
178 |
-
$row->lightbox_filmstrip_rl_bg_color = '3B3B3B';
|
179 |
-
$row->lightbox_filmstrip_rl_btn_size = 20;
|
180 |
-
$row->lightbox_filmstrip_rl_btn_color = 'FFFFFF';
|
181 |
-
$row->lightbox_filmstrip_thumb_margin = '0 1px';
|
182 |
-
$row->lightbox_filmstrip_thumb_border_width = 1;
|
183 |
-
$row->lightbox_filmstrip_thumb_border_style = 'solid';
|
184 |
-
$row->lightbox_filmstrip_thumb_border_color = '000000';
|
185 |
-
$row->lightbox_filmstrip_thumb_border_radius = '0';
|
186 |
-
$row->lightbox_filmstrip_thumb_deactive_transparent = 80;
|
187 |
-
$row->lightbox_filmstrip_thumb_active_border_width = 0;
|
188 |
-
$row->lightbox_filmstrip_thumb_active_border_color = 'FFFFFF';
|
189 |
-
$row->lightbox_rl_btn_style = 'fa-chevron';
|
190 |
-
$row->lightbox_rl_btn_transparent = 80;
|
191 |
-
$row->lightbox_bg_transparent = 100;
|
192 |
-
|
193 |
-
$row->album_compact_back_font_color = '000000';
|
194 |
-
$row->album_compact_back_font_style = 'segoe ui';
|
195 |
-
$row->album_compact_back_font_size = 16;
|
196 |
-
$row->album_compact_back_font_weight = 'bold';
|
197 |
-
$row->album_compact_back_padding = '0';
|
198 |
-
$row->album_compact_title_font_color = 'CCCCCC';
|
199 |
-
$row->album_compact_title_font_style = 'segoe ui';
|
200 |
-
$row->album_compact_thumb_title_pos = 'bottom';
|
201 |
-
$row->album_compact_title_font_size = 16;
|
202 |
-
$row->album_compact_title_font_weight = 'bold';
|
203 |
-
$row->album_compact_title_margin = '2px';
|
204 |
-
$row->album_compact_title_shadow = '0px 0px 0px #888888';
|
205 |
-
$row->album_compact_thumb_margin = 4;
|
206 |
-
$row->album_compact_thumb_padding = 0;
|
207 |
-
$row->album_compact_thumb_border_radius = '0';
|
208 |
-
$row->album_compact_thumb_border_width = 0;
|
209 |
-
$row->album_compact_thumb_border_style = 'none';
|
210 |
-
$row->album_compact_thumb_border_color = 'CCCCCC';
|
211 |
-
$row->album_compact_thumb_bg_color = 'FFFFFF';
|
212 |
-
$row->album_compact_thumbs_bg_color = 'FFFFFF';
|
213 |
-
$row->album_compact_thumb_bg_transparent = 0;
|
214 |
-
$row->album_compact_thumb_box_shadow = '0px 0px 0px #888888';
|
215 |
-
$row->album_compact_thumb_transparent = 100;
|
216 |
-
$row->album_compact_thumb_align = 'left';
|
217 |
-
$row->album_compact_thumb_hover_effect = 'scale';
|
218 |
-
$row->album_compact_thumb_hover_effect_value = '1.1';
|
219 |
-
$row->album_compact_thumb_transition = 0;
|
220 |
-
|
221 |
-
$row->album_extended_thumb_margin = 2;
|
222 |
-
$row->album_extended_thumb_padding = 0;
|
223 |
-
$row->album_extended_thumb_border_radius = '0';
|
224 |
-
$row->album_extended_thumb_border_width = 0;
|
225 |
-
$row->album_extended_thumb_border_style = 'none';
|
226 |
-
$row->album_extended_thumb_border_color = 'CCCCCC';
|
227 |
-
$row->album_extended_thumb_bg_color = 'FFFFFF';
|
228 |
-
$row->album_extended_thumbs_bg_color = 'FFFFFF';
|
229 |
-
$row->album_extended_thumb_bg_transparent = 0;
|
230 |
-
$row->album_extended_thumb_box_shadow = '';
|
231 |
-
$row->album_extended_thumb_transparent = 100;
|
232 |
-
$row->album_extended_thumb_align = 'left';
|
233 |
-
$row->album_extended_thumb_hover_effect = 'scale';
|
234 |
-
$row->album_extended_thumb_hover_effect_value = '1.1';
|
235 |
-
$row->album_extended_thumb_transition = 0;
|
236 |
-
$row->album_extended_back_font_color = '000000';
|
237 |
-
$row->album_extended_back_font_style = 'segoe ui';
|
238 |
-
$row->album_extended_back_font_size = 20;
|
239 |
-
$row->album_extended_back_font_weight = 'bold';
|
240 |
-
$row->album_extended_back_padding = '0';
|
241 |
-
$row->album_extended_div_bg_color = 'FFFFFF';
|
242 |
-
$row->album_extended_div_bg_transparent = 0;
|
243 |
-
$row->album_extended_div_border_radius = '0 0 0 0';
|
244 |
-
$row->album_extended_div_margin = '0 0 5px 0';
|
245 |
-
$row->album_extended_div_padding = 10;
|
246 |
-
$row->album_extended_div_separator_width = 1;
|
247 |
-
$row->album_extended_div_separator_style = 'solid';
|
248 |
-
$row->album_extended_div_separator_color = 'E0E0E0';
|
249 |
-
$row->album_extended_thumb_div_bg_color = 'FFFFFF';
|
250 |
-
$row->album_extended_thumb_div_border_radius = '0';
|
251 |
-
$row->album_extended_thumb_div_border_width = 1;
|
252 |
-
$row->album_extended_thumb_div_border_style = 'solid';
|
253 |
-
$row->album_extended_thumb_div_border_color = 'E8E8E8';
|
254 |
-
$row->album_extended_thumb_div_padding = '5px';
|
255 |
-
$row->album_extended_text_div_bg_color = 'FFFFFF';
|
256 |
-
$row->album_extended_text_div_border_radius = '0';
|
257 |
-
$row->album_extended_text_div_border_width = 1;
|
258 |
-
$row->album_extended_text_div_border_style = 'solid';
|
259 |
-
$row->album_extended_text_div_border_color = 'E8E8E8';
|
260 |
-
$row->album_extended_text_div_padding = '5px';
|
261 |
-
$row->album_extended_title_span_border_width = 1;
|
262 |
-
$row->album_extended_title_span_border_style = 'none';
|
263 |
-
$row->album_extended_title_span_border_color = 'CCCCCC';
|
264 |
-
$row->album_extended_title_font_color = '000000';
|
265 |
-
$row->album_extended_title_font_style = 'segoe ui';
|
266 |
-
$row->album_extended_title_font_size = 16;
|
267 |
-
$row->album_extended_title_font_weight = 'bold';
|
268 |
-
$row->album_extended_title_margin_bottom = 2;
|
269 |
-
$row->album_extended_title_padding = '2px';
|
270 |
-
$row->album_extended_desc_span_border_width = 1;
|
271 |
-
$row->album_extended_desc_span_border_style = 'none';
|
272 |
-
$row->album_extended_desc_span_border_color = 'CCCCCC';
|
273 |
-
$row->album_extended_desc_font_color = '000000';
|
274 |
-
$row->album_extended_desc_font_style = 'segoe ui';
|
275 |
-
$row->album_extended_desc_font_size = 14;
|
276 |
-
$row->album_extended_desc_font_weight = 'normal';
|
277 |
-
$row->album_extended_desc_padding = '2px';
|
278 |
-
$row->album_extended_desc_more_color = 'F2D22E';
|
279 |
-
$row->album_extended_desc_more_size = 12;
|
280 |
-
|
281 |
-
$row->album_masonry_back_font_color = '000000';
|
282 |
-
$row->album_masonry_back_font_style = 'segoe ui';
|
283 |
-
$row->album_masonry_back_font_size = 16;
|
284 |
-
$row->album_masonry_back_font_weight = 'bold';
|
285 |
-
$row->album_masonry_back_padding = '0';
|
286 |
-
$row->album_masonry_title_font_color = 'CCCCCC';
|
287 |
-
$row->album_masonry_title_font_style = 'segoe ui';
|
288 |
-
$row->album_masonry_thumb_title_pos = 'bottom';
|
289 |
-
$row->album_masonry_title_font_size = 16;
|
290 |
-
$row->album_masonry_title_font_weight = 'bold';
|
291 |
-
$row->album_masonry_title_margin = '2px';
|
292 |
-
$row->album_masonry_title_shadow = '0px 0px 0px #888888';
|
293 |
-
$row->album_masonry_thumb_margin = 4;
|
294 |
-
$row->album_masonry_thumb_padding = 0;
|
295 |
-
$row->album_masonry_thumb_border_radius = '0';
|
296 |
-
$row->album_masonry_thumb_border_width = 0;
|
297 |
-
$row->album_masonry_thumb_border_style = 'none';
|
298 |
-
$row->album_masonry_thumb_border_color = 'CCCCCC';
|
299 |
-
$row->album_masonry_thumb_bg_color = 'FFFFFF';
|
300 |
-
$row->album_masonry_thumbs_bg_color = 'FFFFFF';
|
301 |
-
$row->album_masonry_thumb_bg_transparent = 0;
|
302 |
-
$row->album_masonry_thumb_box_shadow = '0px 0px 0px #888888';
|
303 |
-
$row->album_masonry_thumb_transparent = 100;
|
304 |
-
$row->album_masonry_thumb_align = 'left';
|
305 |
-
$row->album_masonry_thumb_hover_effect = 'scale';
|
306 |
-
$row->album_masonry_thumb_hover_effect_value = '1.1';
|
307 |
-
$row->album_masonry_thumb_transition = 0;
|
308 |
-
|
309 |
-
$row->masonry_thumb_padding = 4;
|
310 |
-
$row->masonry_thumb_border_radius = '0';
|
311 |
-
$row->masonry_thumb_border_width = 0;
|
312 |
-
$row->masonry_thumb_border_style = 'none';
|
313 |
-
$row->masonry_thumb_border_color = 'CCCCCC';
|
314 |
-
$row->masonry_thumbs_bg_color = 'FFFFFF';
|
315 |
-
$row->masonry_thumb_bg_transparent = 0;
|
316 |
-
$row->masonry_thumb_transparent = 100;
|
317 |
-
$row->masonry_thumb_align = 'left';
|
318 |
-
$row->masonry_thumb_hover_effect = 'scale';
|
319 |
-
$row->masonry_thumb_hover_effect_value = '1.1';
|
320 |
-
$row->masonry_thumb_transition = 0;
|
321 |
-
$row->masonry_description_font_size = 12;
|
322 |
-
$row->masonry_description_color = 'CCCCCC';
|
323 |
-
$row->masonry_description_font_style = 'segoe ui';
|
324 |
-
|
325 |
-
$row->mosaic_thumb_padding = 4;
|
326 |
-
$row->mosaic_thumb_border_radius = '0';
|
327 |
-
$row->mosaic_thumb_border_width = 0;
|
328 |
-
$row->mosaic_thumb_border_style = 'none';
|
329 |
-
$row->mosaic_thumb_border_color = 'CCCCCC';
|
330 |
-
$row->mosaic_thumbs_bg_color = 'FFFFFF';
|
331 |
-
$row->mosaic_thumb_bg_transparent = 0;
|
332 |
-
$row->mosaic_thumb_transparent = 100;
|
333 |
-
$row->mosaic_thumb_align = 'left';
|
334 |
-
$row->mosaic_thumb_hover_effect = 'scale';
|
335 |
-
$row->mosaic_thumb_hover_effect_value = '1.1';
|
336 |
-
|
337 |
-
|
338 |
-
$row->mosaic_thumb_title_font_size = 16;
|
339 |
-
$row->mosaic_thumb_title_font_color = 'CCCCCC';
|
340 |
-
$row->mosaic_thumb_title_font_style = 'segoe ui';
|
341 |
-
$row->mosaic_thumb_title_font_weight = 'bold';
|
342 |
-
$row->mosaic_thumb_title_shadow = '0px 0px 0px #888888';
|
343 |
-
$row->mosaic_thumb_title_margin = '2px';
|
344 |
-
$row->slideshow_cont_bg_color = '000000';
|
345 |
-
$row->slideshow_close_btn_transparent = 100;
|
346 |
-
$row->slideshow_rl_btn_bg_color = '000000';
|
347 |
-
$row->slideshow_rl_btn_border_radius = '20px';
|
348 |
-
$row->slideshow_rl_btn_border_width = 0;
|
349 |
-
$row->slideshow_rl_btn_border_style = 'none';
|
350 |
-
$row->slideshow_rl_btn_border_color = 'FFFFFF';
|
351 |
-
$row->slideshow_rl_btn_box_shadow = '0px 0px 0px #000000';
|
352 |
-
$row->slideshow_rl_btn_color = 'FFFFFF';
|
353 |
-
$row->slideshow_rl_btn_height = 40;
|
354 |
-
$row->slideshow_rl_btn_size = 20;
|
355 |
-
$row->slideshow_rl_btn_width = 40;
|
356 |
-
$row->slideshow_close_rl_btn_hover_color = 'CCCCCC';
|
357 |
-
$row->slideshow_filmstrip_pos = 'top';
|
358 |
-
$row->slideshow_filmstrip_thumb_border_width = 1;
|
359 |
-
$row->slideshow_filmstrip_thumb_border_style = 'solid';
|
360 |
-
$row->slideshow_filmstrip_thumb_border_color = '000000';
|
361 |
-
$row->slideshow_filmstrip_thumb_border_radius = '0';
|
362 |
-
$row->slideshow_filmstrip_thumb_margin = '0 1px';
|
363 |
-
$row->slideshow_filmstrip_thumb_active_border_width = 0;
|
364 |
-
$row->slideshow_filmstrip_thumb_active_border_color = 'FFFFFF';
|
365 |
-
$row->slideshow_filmstrip_thumb_deactive_transparent = 80;
|
366 |
-
$row->slideshow_filmstrip_rl_bg_color = '3B3B3B';
|
367 |
-
$row->slideshow_filmstrip_rl_btn_color = 'FFFFFF';
|
368 |
-
$row->slideshow_filmstrip_rl_btn_size = 20;
|
369 |
-
$row->slideshow_title_font_size = 16;
|
370 |
-
$row->slideshow_title_font = 'segoe ui';
|
371 |
-
$row->slideshow_title_color = 'FFFFFF';
|
372 |
-
$row->slideshow_title_opacity = 70;
|
373 |
-
$row->slideshow_title_border_radius = '5px';
|
374 |
-
$row->slideshow_title_background_color = '000000';
|
375 |
-
$row->slideshow_title_padding = '0 0 0 0';
|
376 |
-
$row->slideshow_description_font_size = 14;
|
377 |
-
$row->slideshow_description_font = 'segoe ui';
|
378 |
-
$row->slideshow_description_color = 'FFFFFF';
|
379 |
-
$row->slideshow_description_opacity = 70;
|
380 |
-
$row->slideshow_description_border_radius = '0';
|
381 |
-
$row->slideshow_description_background_color = '000000';
|
382 |
-
$row->slideshow_description_padding = '5px 10px 5px 10px';
|
383 |
-
$row->slideshow_dots_width = 12;
|
384 |
-
$row->slideshow_dots_height = 12;
|
385 |
-
$row->slideshow_dots_border_radius = '5px';
|
386 |
-
$row->slideshow_dots_background_color = 'F2D22E';
|
387 |
-
$row->slideshow_dots_margin = 3;
|
388 |
-
$row->slideshow_dots_active_background_color = 'FFFFFF';
|
389 |
-
$row->slideshow_dots_active_border_width = 1;
|
390 |
-
$row->slideshow_dots_active_border_color = '000000';
|
391 |
-
$row->slideshow_play_pause_btn_size = 60;
|
392 |
-
$row->slideshow_rl_btn_style = 'fa-chevron';
|
393 |
-
|
394 |
-
$row->blog_style_margin = '2px';
|
395 |
-
$row->blog_style_padding = '0';
|
396 |
-
$row->blog_style_border_radius = '0';
|
397 |
-
$row->blog_style_border_width = 1;
|
398 |
-
$row->blog_style_border_style = 'solid';
|
399 |
-
$row->blog_style_border_color = 'F5F5F5';
|
400 |
-
$row->blog_style_bg_color = 'FFFFFF';
|
401 |
-
$row->blog_style_transparent = 80;
|
402 |
-
$row->blog_style_box_shadow = '';
|
403 |
-
$row->blog_style_align = 'center';
|
404 |
-
$row->blog_style_share_buttons_margin = '5px auto 10px auto';
|
405 |
-
$row->blog_style_share_buttons_border_radius = '0';
|
406 |
-
$row->blog_style_share_buttons_border_width = 0;
|
407 |
-
$row->blog_style_share_buttons_border_style = 'none';
|
408 |
-
$row->blog_style_share_buttons_border_color = '000000';
|
409 |
-
$row->blog_style_share_buttons_bg_color = 'FFFFFF';
|
410 |
-
$row->blog_style_share_buttons_align = 'right';
|
411 |
-
$row->blog_style_img_font_size = 16;
|
412 |
-
$row->blog_style_img_font_family = 'segoe ui';
|
413 |
-
$row->blog_style_img_font_color = '000000';
|
414 |
-
$row->blog_style_share_buttons_color = 'B3AFAF';
|
415 |
-
$row->blog_style_share_buttons_bg_transparent = 0;
|
416 |
-
$row->blog_style_share_buttons_font_size = 20;
|
417 |
-
|
418 |
-
$row->image_browser_margin = '2px auto';
|
419 |
-
$row->image_browser_padding = '4px';
|
420 |
-
$row->image_browser_border_radius = '0';
|
421 |
-
$row->image_browser_border_width = 1;
|
422 |
-
$row->image_browser_border_style = 'none';
|
423 |
-
$row->image_browser_border_color = 'F5F5F5';
|
424 |
-
$row->image_browser_bg_color = 'EBEBEB';
|
425 |
-
$row->image_browser_box_shadow = '';
|
426 |
-
$row->image_browser_transparent = 80;
|
427 |
-
$row->image_browser_align = 'center';
|
428 |
-
$row->image_browser_image_description_margin = '0px 5px 0px 5px';
|
429 |
-
$row->image_browser_image_description_padding = '8px 8px 8px 8px';
|
430 |
-
$row->image_browser_image_description_border_radius = '0';
|
431 |
-
$row->image_browser_image_description_border_width = 1;
|
432 |
-
$row->image_browser_image_description_border_style = 'none';
|
433 |
-
$row->image_browser_image_description_border_color = 'FFFFFF';
|
434 |
-
$row->image_browser_image_description_bg_color = 'EBEBEB';
|
435 |
-
$row->image_browser_image_description_align = 'center';
|
436 |
-
$row->image_browser_img_font_size = 15;
|
437 |
-
$row->image_browser_img_font_family = 'segoe ui';
|
438 |
-
$row->image_browser_img_font_color = '000000';
|
439 |
-
$row->image_browser_full_padding = '4px';
|
440 |
-
$row->image_browser_full_border_radius = '0';
|
441 |
-
$row->image_browser_full_border_width = 2;
|
442 |
-
$row->image_browser_full_border_style = 'none';
|
443 |
-
$row->image_browser_full_border_color = 'F7F7F7';
|
444 |
-
$row->image_browser_full_bg_color = 'F5F5F5';
|
445 |
-
$row->image_browser_full_transparent = 90;
|
446 |
-
$row->lightbox_info_pos = 'top';
|
447 |
-
$row->lightbox_info_align = 'right';
|
448 |
-
$row->lightbox_info_bg_color = '000000';
|
449 |
-
$row->lightbox_info_bg_transparent = 70;
|
450 |
-
$row->lightbox_info_border_width = 1;
|
451 |
-
$row->lightbox_info_border_style = 'none';
|
452 |
-
$row->lightbox_info_border_color = '000000';
|
453 |
-
$row->lightbox_info_border_radius = '5px';
|
454 |
-
$row->lightbox_info_padding = '5px';
|
455 |
-
$row->lightbox_info_margin = '15px';
|
456 |
-
$row->lightbox_title_color = 'FFFFFF';
|
457 |
-
$row->lightbox_title_font_style = 'segoe ui';
|
458 |
-
$row->lightbox_title_font_weight = 'bold';
|
459 |
-
$row->lightbox_title_font_size = 18;
|
460 |
-
$row->lightbox_description_color = 'FFFFFF';
|
461 |
-
$row->lightbox_description_font_style = 'segoe ui';
|
462 |
-
$row->lightbox_description_font_weight = 'normal';
|
463 |
-
$row->lightbox_description_font_size = 14;
|
464 |
-
$row->lightbox_rate_pos = 'bottom';
|
465 |
-
$row->lightbox_rate_align = 'right';
|
466 |
-
$row->lightbox_rate_icon = 'star';
|
467 |
-
$row->lightbox_rate_color = 'F9D062';
|
468 |
-
$row->lightbox_rate_size = 20;
|
469 |
-
$row->lightbox_rate_stars_count = 5;
|
470 |
-
$row->lightbox_rate_padding = '15px';
|
471 |
-
$row->lightbox_rate_hover_color = 'F7B50E';
|
472 |
-
$row->lightbox_hit_pos = 'bottom';
|
473 |
-
$row->lightbox_hit_align = 'left';
|
474 |
-
$row->lightbox_hit_bg_color = '000000';
|
475 |
-
$row->lightbox_hit_bg_transparent = 70;
|
476 |
-
$row->lightbox_hit_border_width = 1;
|
477 |
-
$row->lightbox_hit_border_style = 'none';
|
478 |
-
$row->lightbox_hit_border_color = '000000';
|
479 |
-
$row->lightbox_hit_border_radius = '5px';
|
480 |
-
$row->lightbox_hit_padding = '5px';
|
481 |
-
$row->lightbox_hit_margin = '0 5px';
|
482 |
-
$row->lightbox_hit_color = 'FFFFFF';
|
483 |
-
$row->lightbox_hit_font_style = 'segoe ui';
|
484 |
-
$row->lightbox_hit_font_weight = 'normal';
|
485 |
-
$row->lightbox_hit_font_size = 14;
|
486 |
-
//carousel
|
487 |
-
$row->carousel_cont_bg_color = '000000';
|
488 |
-
$row->carousel_cont_btn_transparent = 0;
|
489 |
-
$row->carousel_close_btn_transparent = 100;
|
490 |
-
$row->carousel_rl_btn_bg_color = '000000';
|
491 |
-
$row->carousel_rl_btn_border_radius = '20px';
|
492 |
-
$row->carousel_rl_btn_border_width = 0;
|
493 |
-
$row->carousel_rl_btn_border_style = 'none';
|
494 |
-
$row->carousel_rl_btn_border_color = 'FFFFFF';
|
495 |
-
$row->carousel_rl_btn_color = 'FFFFFF';
|
496 |
-
$row->carousel_rl_btn_height = 40;
|
497 |
-
$row->carousel_rl_btn_size = 20;
|
498 |
-
$row->carousel_play_pause_btn_size = 20;
|
499 |
-
$row->carousel_rl_btn_width = 40;
|
500 |
-
$row->carousel_close_rl_btn_hover_color = 'CCCCCC';
|
501 |
-
$row->carousel_rl_btn_style='fa-chevron';
|
502 |
-
$row->carousel_mergin_bottom = '0.5';
|
503 |
-
$row->carousel_font_family = 'Arial';
|
504 |
-
$row->carousel_feature_border_width = 2;
|
505 |
-
$row->carousel_feature_border_style = 'solid';
|
506 |
-
$row->carousel_feature_border_color= '5D204F';
|
507 |
-
$row->carousel_caption_background_color = '000000';
|
508 |
-
$row->carousel_caption_bottom = 0;
|
509 |
-
$row->carousel_caption_p_mergin = 0;
|
510 |
-
$row->carousel_caption_p_pedding = 5;
|
511 |
-
$row->carousel_caption_p_font_weight = 'bold';
|
512 |
-
$row->carousel_caption_p_font_size = 14;
|
513 |
-
$row->carousel_caption_p_color = 'white';
|
514 |
-
$row->carousel_title_opacity = 100;
|
515 |
-
$row->carousel_title_border_radius = '5px';
|
516 |
-
$row->mosaic_thumb_transition = 1;
|
517 |
-
}
|
518 |
-
}
|
519 |
-
}
|
520 |
-
else {
|
521 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme="%d"', 1));
|
522 |
-
$row->id = 0;
|
523 |
-
$row->name = '';
|
524 |
-
$row->default_theme = 0;
|
525 |
-
}
|
526 |
-
return $row;
|
527 |
-
}
|
528 |
-
|
529 |
-
public function page_nav() {
|
530 |
-
global $wpdb;
|
531 |
-
$where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE name LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
|
532 |
-
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_theme " . $where;
|
533 |
-
$total = $wpdb->get_var($query);
|
534 |
-
$page_nav['total'] = $total;
|
535 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
536 |
-
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
537 |
-
}
|
538 |
-
else {
|
539 |
-
$limit = 0;
|
540 |
-
}
|
541 |
-
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
542 |
-
return $page_nav;
|
543 |
-
}
|
544 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
545 |
-
// Getters & Setters //
|
546 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
547 |
-
public function per_page(){
|
548 |
-
return $this->per_page;
|
549 |
-
|
550 |
-
}
|
551 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
552 |
-
// Private Methods //
|
553 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
554 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
555 |
-
// Listeners //
|
556 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
557 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelThemes_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $per_page = 20;
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
// Constructor & Destructor //
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
public function __construct() {
|
18 |
+
$user = get_current_user_id();
|
19 |
+
$screen = get_current_screen();
|
20 |
+
$option = $screen->get_option('per_page', 'option');
|
21 |
+
|
22 |
+
$this->per_page = get_user_meta($user, $option, true);
|
23 |
+
|
24 |
+
if ( empty ( $this->per_page) || $this->per_page < 1 ) {
|
25 |
+
$this->per_page = $screen->get_option( 'per_page', 'default' );
|
26 |
+
}
|
27 |
+
}
|
28 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
+
// Public Methods //
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
+
public function get_rows_data() {
|
32 |
+
global $wpdb;
|
33 |
+
$where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE name LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
|
34 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && esc_html($_POST['asc_or_desc']) == 'desc') ? 'desc' : 'asc');
|
35 |
+
$order_by_arr = array('id', 'name', 'default');
|
36 |
+
$order_by = ((isset($_POST['order_by']) && in_array(esc_html($_POST['order_by']), $order_by_arr)) ? esc_html($_POST['order_by']) : 'id');
|
37 |
+
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
38 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
39 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
40 |
+
}
|
41 |
+
else {
|
42 |
+
$limit = 0;
|
43 |
+
}
|
44 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_theme " . $where . $order_by . " LIMIT " . $limit . ",".$this->per_page;
|
45 |
+
$rows = $wpdb->get_results($query);
|
46 |
+
return $rows;
|
47 |
+
}
|
48 |
+
|
49 |
+
public function get_row_data($id, $reset) {
|
50 |
+
global $wpdb;
|
51 |
+
if ($id != 0) {
|
52 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE id="%d"', $id));
|
53 |
+
$themes = json_decode($row->options);
|
54 |
+
foreach ($themes as $key => $value) {
|
55 |
+
$row->$key = $value;
|
56 |
+
}
|
57 |
+
if (!isset($row->lightbox_bg_transparent)) {
|
58 |
+
$row->lightbox_bg_transparent = 100;
|
59 |
+
}
|
60 |
+
if ($reset) {
|
61 |
+
if (!$row->default_theme) {
|
62 |
+
$row_id = $row->id;
|
63 |
+
$row_name = $row->name;
|
64 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme="%d"', 1));
|
65 |
+
$row->id = $row_id;
|
66 |
+
$row->name = $row_name;
|
67 |
+
$row->default_theme = FALSE;
|
68 |
+
}
|
69 |
+
else {
|
70 |
+
$row->thumb_margin = 4;
|
71 |
+
$row->thumb_padding = 0;
|
72 |
+
$row->thumb_border_radius = '0';
|
73 |
+
$row->thumb_border_width = 0;
|
74 |
+
$row->thumb_border_style = 'none';
|
75 |
+
$row->thumb_border_color = 'CCCCCC';
|
76 |
+
$row->thumb_bg_color = 'FFFFFF';
|
77 |
+
$row->thumbs_bg_color = 'FFFFFF';
|
78 |
+
$row->thumb_bg_transparent = 0;
|
79 |
+
$row->thumb_box_shadow = '0px 0px 0px #888888';
|
80 |
+
$row->thumb_transparent = 100;
|
81 |
+
$row->thumb_align = 'left';
|
82 |
+
$row->thumb_hover_effect = 'scale';
|
83 |
+
$row->thumb_hover_effect_value = '1.1';
|
84 |
+
$row->thumb_transition = 1;
|
85 |
+
$row->thumb_title_font_color = 'CCCCCC';
|
86 |
+
$row->thumb_title_font_style = 'segoe ui';
|
87 |
+
$row->thumb_title_pos = 'bottom';
|
88 |
+
$row->thumb_title_font_size = 16;
|
89 |
+
$row->thumb_title_font_weight = 'bold';
|
90 |
+
$row->thumb_title_margin = '2px';
|
91 |
+
$row->thumb_title_shadow = '0px 0px 0px #888888';
|
92 |
+
|
93 |
+
$row->page_nav_position = 'bottom';
|
94 |
+
$row->page_nav_align = 'center';
|
95 |
+
$row->page_nav_number = 0;
|
96 |
+
$row->page_nav_font_size = 12;
|
97 |
+
$row->page_nav_font_style = 'segoe ui';
|
98 |
+
$row->page_nav_font_color = '666666';
|
99 |
+
$row->page_nav_font_weight = 'bold';
|
100 |
+
$row->page_nav_border_width = 1;
|
101 |
+
$row->page_nav_border_style = 'solid';
|
102 |
+
$row->page_nav_border_color = 'E3E3E3';
|
103 |
+
$row->page_nav_border_radius = '0';
|
104 |
+
$row->page_nav_margin = '0';
|
105 |
+
$row->page_nav_padding = '3px 6px';
|
106 |
+
$row->page_nav_button_bg_color = 'FFFFFF';
|
107 |
+
$row->page_nav_button_bg_transparent = 100;
|
108 |
+
$row->page_nav_box_shadow = '0';
|
109 |
+
$row->page_nav_button_transition = 1;
|
110 |
+
$row->page_nav_button_text = 0;
|
111 |
+
|
112 |
+
$row->lightbox_overlay_bg_color = '000000';
|
113 |
+
$row->lightbox_overlay_bg_transparent = 70;
|
114 |
+
$row->lightbox_bg_color = '000000';
|
115 |
+
$row->lightbox_ctrl_btn_pos = 'bottom';
|
116 |
+
$row->lightbox_ctrl_btn_align = 'center';
|
117 |
+
$row->lightbox_ctrl_btn_height = 20;
|
118 |
+
$row->lightbox_ctrl_btn_margin_top = 10;
|
119 |
+
$row->lightbox_ctrl_btn_margin_left = 7;
|
120 |
+
$row->lightbox_ctrl_btn_transparent = 100;
|
121 |
+
$row->lightbox_ctrl_btn_color = 'FFFFFF';
|
122 |
+
$row->lightbox_toggle_btn_height = 14;
|
123 |
+
$row->lightbox_toggle_btn_width = 100;
|
124 |
+
$row->lightbox_ctrl_cont_bg_color = '000000';
|
125 |
+
$row->lightbox_ctrl_cont_transparent = 65;
|
126 |
+
$row->lightbox_ctrl_cont_border_radius = 4;
|
127 |
+
$row->lightbox_close_btn_transparent = 100;
|
128 |
+
$row->lightbox_close_btn_bg_color = '000000';
|
129 |
+
$row->lightbox_close_btn_border_width = 2;
|
130 |
+
$row->lightbox_close_btn_border_radius = '16px';
|
131 |
+
$row->lightbox_close_btn_border_style = 'none';
|
132 |
+
$row->lightbox_close_btn_border_color = 'FFFFFF';
|
133 |
+
$row->lightbox_close_btn_box_shadow = '0';
|
134 |
+
$row->lightbox_close_btn_color = 'FFFFFF';
|
135 |
+
$row->lightbox_close_btn_size = 10;
|
136 |
+
$row->lightbox_close_btn_width = 20;
|
137 |
+
$row->lightbox_close_btn_height = 20;
|
138 |
+
$row->lightbox_close_btn_top = '-10';
|
139 |
+
$row->lightbox_close_btn_right = '-10';
|
140 |
+
$row->lightbox_close_btn_full_color = 'FFFFFF';
|
141 |
+
$row->lightbox_rl_btn_bg_color = '000000';
|
142 |
+
$row->lightbox_rl_btn_border_radius = '20px';
|
143 |
+
$row->lightbox_rl_btn_border_width = 0;
|
144 |
+
$row->lightbox_rl_btn_border_style = 'none';
|
145 |
+
$row->lightbox_rl_btn_border_color = 'FFFFFF';
|
146 |
+
$row->lightbox_rl_btn_box_shadow = '';
|
147 |
+
$row->lightbox_rl_btn_color = 'FFFFFF';
|
148 |
+
$row->lightbox_rl_btn_height = 40;
|
149 |
+
$row->lightbox_rl_btn_width = 40;
|
150 |
+
$row->lightbox_rl_btn_size = 20;
|
151 |
+
$row->lightbox_close_rl_btn_hover_color = 'CCCCCC';
|
152 |
+
$row->lightbox_comment_pos = 'left';
|
153 |
+
$row->lightbox_comment_width = 400;
|
154 |
+
$row->lightbox_comment_bg_color = '000000';
|
155 |
+
$row->lightbox_comment_font_color = 'CCCCCC';
|
156 |
+
$row->lightbox_comment_font_style = 'segoe ui';
|
157 |
+
$row->lightbox_comment_font_size = 12;
|
158 |
+
$row->lightbox_comment_button_bg_color = '616161';
|
159 |
+
$row->lightbox_comment_button_border_color = '666666';
|
160 |
+
$row->lightbox_comment_button_border_width = 1;
|
161 |
+
$row->lightbox_comment_button_border_style = 'none';
|
162 |
+
$row->lightbox_comment_button_border_radius = '3px';
|
163 |
+
$row->lightbox_comment_button_padding = '3px 10px';
|
164 |
+
$row->lightbox_comment_input_bg_color = '333333';
|
165 |
+
$row->lightbox_comment_input_border_color = '666666';
|
166 |
+
$row->lightbox_comment_input_border_width = 1;
|
167 |
+
$row->lightbox_comment_input_border_style = 'none';
|
168 |
+
$row->lightbox_comment_input_border_radius = '0';
|
169 |
+
$row->lightbox_comment_input_padding = '2px';
|
170 |
+
$row->lightbox_comment_separator_width = 1;
|
171 |
+
$row->lightbox_comment_separator_style = 'solid';
|
172 |
+
$row->lightbox_comment_separator_color = '383838';
|
173 |
+
$row->lightbox_comment_author_font_size = 14;
|
174 |
+
$row->lightbox_comment_date_font_size = 10;
|
175 |
+
$row->lightbox_comment_body_font_size = 12;
|
176 |
+
$row->lightbox_comment_share_button_color = 'CCCCCC';
|
177 |
+
$row->lightbox_filmstrip_pos = 'top';
|
178 |
+
$row->lightbox_filmstrip_rl_bg_color = '3B3B3B';
|
179 |
+
$row->lightbox_filmstrip_rl_btn_size = 20;
|
180 |
+
$row->lightbox_filmstrip_rl_btn_color = 'FFFFFF';
|
181 |
+
$row->lightbox_filmstrip_thumb_margin = '0 1px';
|
182 |
+
$row->lightbox_filmstrip_thumb_border_width = 1;
|
183 |
+
$row->lightbox_filmstrip_thumb_border_style = 'solid';
|
184 |
+
$row->lightbox_filmstrip_thumb_border_color = '000000';
|
185 |
+
$row->lightbox_filmstrip_thumb_border_radius = '0';
|
186 |
+
$row->lightbox_filmstrip_thumb_deactive_transparent = 80;
|
187 |
+
$row->lightbox_filmstrip_thumb_active_border_width = 0;
|
188 |
+
$row->lightbox_filmstrip_thumb_active_border_color = 'FFFFFF';
|
189 |
+
$row->lightbox_rl_btn_style = 'fa-chevron';
|
190 |
+
$row->lightbox_rl_btn_transparent = 80;
|
191 |
+
$row->lightbox_bg_transparent = 100;
|
192 |
+
|
193 |
+
$row->album_compact_back_font_color = '000000';
|
194 |
+
$row->album_compact_back_font_style = 'segoe ui';
|
195 |
+
$row->album_compact_back_font_size = 16;
|
196 |
+
$row->album_compact_back_font_weight = 'bold';
|
197 |
+
$row->album_compact_back_padding = '0';
|
198 |
+
$row->album_compact_title_font_color = 'CCCCCC';
|
199 |
+
$row->album_compact_title_font_style = 'segoe ui';
|
200 |
+
$row->album_compact_thumb_title_pos = 'bottom';
|
201 |
+
$row->album_compact_title_font_size = 16;
|
202 |
+
$row->album_compact_title_font_weight = 'bold';
|
203 |
+
$row->album_compact_title_margin = '2px';
|
204 |
+
$row->album_compact_title_shadow = '0px 0px 0px #888888';
|
205 |
+
$row->album_compact_thumb_margin = 4;
|
206 |
+
$row->album_compact_thumb_padding = 0;
|
207 |
+
$row->album_compact_thumb_border_radius = '0';
|
208 |
+
$row->album_compact_thumb_border_width = 0;
|
209 |
+
$row->album_compact_thumb_border_style = 'none';
|
210 |
+
$row->album_compact_thumb_border_color = 'CCCCCC';
|
211 |
+
$row->album_compact_thumb_bg_color = 'FFFFFF';
|
212 |
+
$row->album_compact_thumbs_bg_color = 'FFFFFF';
|
213 |
+
$row->album_compact_thumb_bg_transparent = 0;
|
214 |
+
$row->album_compact_thumb_box_shadow = '0px 0px 0px #888888';
|
215 |
+
$row->album_compact_thumb_transparent = 100;
|
216 |
+
$row->album_compact_thumb_align = 'left';
|
217 |
+
$row->album_compact_thumb_hover_effect = 'scale';
|
218 |
+
$row->album_compact_thumb_hover_effect_value = '1.1';
|
219 |
+
$row->album_compact_thumb_transition = 0;
|
220 |
+
|
221 |
+
$row->album_extended_thumb_margin = 2;
|
222 |
+
$row->album_extended_thumb_padding = 0;
|
223 |
+
$row->album_extended_thumb_border_radius = '0';
|
224 |
+
$row->album_extended_thumb_border_width = 0;
|
225 |
+
$row->album_extended_thumb_border_style = 'none';
|
226 |
+
$row->album_extended_thumb_border_color = 'CCCCCC';
|
227 |
+
$row->album_extended_thumb_bg_color = 'FFFFFF';
|
228 |
+
$row->album_extended_thumbs_bg_color = 'FFFFFF';
|
229 |
+
$row->album_extended_thumb_bg_transparent = 0;
|
230 |
+
$row->album_extended_thumb_box_shadow = '';
|
231 |
+
$row->album_extended_thumb_transparent = 100;
|
232 |
+
$row->album_extended_thumb_align = 'left';
|
233 |
+
$row->album_extended_thumb_hover_effect = 'scale';
|
234 |
+
$row->album_extended_thumb_hover_effect_value = '1.1';
|
235 |
+
$row->album_extended_thumb_transition = 0;
|
236 |
+
$row->album_extended_back_font_color = '000000';
|
237 |
+
$row->album_extended_back_font_style = 'segoe ui';
|
238 |
+
$row->album_extended_back_font_size = 20;
|
239 |
+
$row->album_extended_back_font_weight = 'bold';
|
240 |
+
$row->album_extended_back_padding = '0';
|
241 |
+
$row->album_extended_div_bg_color = 'FFFFFF';
|
242 |
+
$row->album_extended_div_bg_transparent = 0;
|
243 |
+
$row->album_extended_div_border_radius = '0 0 0 0';
|
244 |
+
$row->album_extended_div_margin = '0 0 5px 0';
|
245 |
+
$row->album_extended_div_padding = 10;
|
246 |
+
$row->album_extended_div_separator_width = 1;
|
247 |
+
$row->album_extended_div_separator_style = 'solid';
|
248 |
+
$row->album_extended_div_separator_color = 'E0E0E0';
|
249 |
+
$row->album_extended_thumb_div_bg_color = 'FFFFFF';
|
250 |
+
$row->album_extended_thumb_div_border_radius = '0';
|
251 |
+
$row->album_extended_thumb_div_border_width = 1;
|
252 |
+
$row->album_extended_thumb_div_border_style = 'solid';
|
253 |
+
$row->album_extended_thumb_div_border_color = 'E8E8E8';
|
254 |
+
$row->album_extended_thumb_div_padding = '5px';
|
255 |
+
$row->album_extended_text_div_bg_color = 'FFFFFF';
|
256 |
+
$row->album_extended_text_div_border_radius = '0';
|
257 |
+
$row->album_extended_text_div_border_width = 1;
|
258 |
+
$row->album_extended_text_div_border_style = 'solid';
|
259 |
+
$row->album_extended_text_div_border_color = 'E8E8E8';
|
260 |
+
$row->album_extended_text_div_padding = '5px';
|
261 |
+
$row->album_extended_title_span_border_width = 1;
|
262 |
+
$row->album_extended_title_span_border_style = 'none';
|
263 |
+
$row->album_extended_title_span_border_color = 'CCCCCC';
|
264 |
+
$row->album_extended_title_font_color = '000000';
|
265 |
+
$row->album_extended_title_font_style = 'segoe ui';
|
266 |
+
$row->album_extended_title_font_size = 16;
|
267 |
+
$row->album_extended_title_font_weight = 'bold';
|
268 |
+
$row->album_extended_title_margin_bottom = 2;
|
269 |
+
$row->album_extended_title_padding = '2px';
|
270 |
+
$row->album_extended_desc_span_border_width = 1;
|
271 |
+
$row->album_extended_desc_span_border_style = 'none';
|
272 |
+
$row->album_extended_desc_span_border_color = 'CCCCCC';
|
273 |
+
$row->album_extended_desc_font_color = '000000';
|
274 |
+
$row->album_extended_desc_font_style = 'segoe ui';
|
275 |
+
$row->album_extended_desc_font_size = 14;
|
276 |
+
$row->album_extended_desc_font_weight = 'normal';
|
277 |
+
$row->album_extended_desc_padding = '2px';
|
278 |
+
$row->album_extended_desc_more_color = 'F2D22E';
|
279 |
+
$row->album_extended_desc_more_size = 12;
|
280 |
+
|
281 |
+
$row->album_masonry_back_font_color = '000000';
|
282 |
+
$row->album_masonry_back_font_style = 'segoe ui';
|
283 |
+
$row->album_masonry_back_font_size = 16;
|
284 |
+
$row->album_masonry_back_font_weight = 'bold';
|
285 |
+
$row->album_masonry_back_padding = '0';
|
286 |
+
$row->album_masonry_title_font_color = 'CCCCCC';
|
287 |
+
$row->album_masonry_title_font_style = 'segoe ui';
|
288 |
+
$row->album_masonry_thumb_title_pos = 'bottom';
|
289 |
+
$row->album_masonry_title_font_size = 16;
|
290 |
+
$row->album_masonry_title_font_weight = 'bold';
|
291 |
+
$row->album_masonry_title_margin = '2px';
|
292 |
+
$row->album_masonry_title_shadow = '0px 0px 0px #888888';
|
293 |
+
$row->album_masonry_thumb_margin = 4;
|
294 |
+
$row->album_masonry_thumb_padding = 0;
|
295 |
+
$row->album_masonry_thumb_border_radius = '0';
|
296 |
+
$row->album_masonry_thumb_border_width = 0;
|
297 |
+
$row->album_masonry_thumb_border_style = 'none';
|
298 |
+
$row->album_masonry_thumb_border_color = 'CCCCCC';
|
299 |
+
$row->album_masonry_thumb_bg_color = 'FFFFFF';
|
300 |
+
$row->album_masonry_thumbs_bg_color = 'FFFFFF';
|
301 |
+
$row->album_masonry_thumb_bg_transparent = 0;
|
302 |
+
$row->album_masonry_thumb_box_shadow = '0px 0px 0px #888888';
|
303 |
+
$row->album_masonry_thumb_transparent = 100;
|
304 |
+
$row->album_masonry_thumb_align = 'left';
|
305 |
+
$row->album_masonry_thumb_hover_effect = 'scale';
|
306 |
+
$row->album_masonry_thumb_hover_effect_value = '1.1';
|
307 |
+
$row->album_masonry_thumb_transition = 0;
|
308 |
+
|
309 |
+
$row->masonry_thumb_padding = 4;
|
310 |
+
$row->masonry_thumb_border_radius = '0';
|
311 |
+
$row->masonry_thumb_border_width = 0;
|
312 |
+
$row->masonry_thumb_border_style = 'none';
|
313 |
+
$row->masonry_thumb_border_color = 'CCCCCC';
|
314 |
+
$row->masonry_thumbs_bg_color = 'FFFFFF';
|
315 |
+
$row->masonry_thumb_bg_transparent = 0;
|
316 |
+
$row->masonry_thumb_transparent = 100;
|
317 |
+
$row->masonry_thumb_align = 'left';
|
318 |
+
$row->masonry_thumb_hover_effect = 'scale';
|
319 |
+
$row->masonry_thumb_hover_effect_value = '1.1';
|
320 |
+
$row->masonry_thumb_transition = 0;
|
321 |
+
$row->masonry_description_font_size = 12;
|
322 |
+
$row->masonry_description_color = 'CCCCCC';
|
323 |
+
$row->masonry_description_font_style = 'segoe ui';
|
324 |
+
|
325 |
+
$row->mosaic_thumb_padding = 4;
|
326 |
+
$row->mosaic_thumb_border_radius = '0';
|
327 |
+
$row->mosaic_thumb_border_width = 0;
|
328 |
+
$row->mosaic_thumb_border_style = 'none';
|
329 |
+
$row->mosaic_thumb_border_color = 'CCCCCC';
|
330 |
+
$row->mosaic_thumbs_bg_color = 'FFFFFF';
|
331 |
+
$row->mosaic_thumb_bg_transparent = 0;
|
332 |
+
$row->mosaic_thumb_transparent = 100;
|
333 |
+
$row->mosaic_thumb_align = 'left';
|
334 |
+
$row->mosaic_thumb_hover_effect = 'scale';
|
335 |
+
$row->mosaic_thumb_hover_effect_value = '1.1';
|
336 |
+
|
337 |
+
|
338 |
+
$row->mosaic_thumb_title_font_size = 16;
|
339 |
+
$row->mosaic_thumb_title_font_color = 'CCCCCC';
|
340 |
+
$row->mosaic_thumb_title_font_style = 'segoe ui';
|
341 |
+
$row->mosaic_thumb_title_font_weight = 'bold';
|
342 |
+
$row->mosaic_thumb_title_shadow = '0px 0px 0px #888888';
|
343 |
+
$row->mosaic_thumb_title_margin = '2px';
|
344 |
+
$row->slideshow_cont_bg_color = '000000';
|
345 |
+
$row->slideshow_close_btn_transparent = 100;
|
346 |
+
$row->slideshow_rl_btn_bg_color = '000000';
|
347 |
+
$row->slideshow_rl_btn_border_radius = '20px';
|
348 |
+
$row->slideshow_rl_btn_border_width = 0;
|
349 |
+
$row->slideshow_rl_btn_border_style = 'none';
|
350 |
+
$row->slideshow_rl_btn_border_color = 'FFFFFF';
|
351 |
+
$row->slideshow_rl_btn_box_shadow = '0px 0px 0px #000000';
|
352 |
+
$row->slideshow_rl_btn_color = 'FFFFFF';
|
353 |
+
$row->slideshow_rl_btn_height = 40;
|
354 |
+
$row->slideshow_rl_btn_size = 20;
|
355 |
+
$row->slideshow_rl_btn_width = 40;
|
356 |
+
$row->slideshow_close_rl_btn_hover_color = 'CCCCCC';
|
357 |
+
$row->slideshow_filmstrip_pos = 'top';
|
358 |
+
$row->slideshow_filmstrip_thumb_border_width = 1;
|
359 |
+
$row->slideshow_filmstrip_thumb_border_style = 'solid';
|
360 |
+
$row->slideshow_filmstrip_thumb_border_color = '000000';
|
361 |
+
$row->slideshow_filmstrip_thumb_border_radius = '0';
|
362 |
+
$row->slideshow_filmstrip_thumb_margin = '0 1px';
|
363 |
+
$row->slideshow_filmstrip_thumb_active_border_width = 0;
|
364 |
+
$row->slideshow_filmstrip_thumb_active_border_color = 'FFFFFF';
|
365 |
+
$row->slideshow_filmstrip_thumb_deactive_transparent = 80;
|
366 |
+
$row->slideshow_filmstrip_rl_bg_color = '3B3B3B';
|
367 |
+
$row->slideshow_filmstrip_rl_btn_color = 'FFFFFF';
|
368 |
+
$row->slideshow_filmstrip_rl_btn_size = 20;
|
369 |
+
$row->slideshow_title_font_size = 16;
|
370 |
+
$row->slideshow_title_font = 'segoe ui';
|
371 |
+
$row->slideshow_title_color = 'FFFFFF';
|
372 |
+
$row->slideshow_title_opacity = 70;
|
373 |
+
$row->slideshow_title_border_radius = '5px';
|
374 |
+
$row->slideshow_title_background_color = '000000';
|
375 |
+
$row->slideshow_title_padding = '0 0 0 0';
|
376 |
+
$row->slideshow_description_font_size = 14;
|
377 |
+
$row->slideshow_description_font = 'segoe ui';
|
378 |
+
$row->slideshow_description_color = 'FFFFFF';
|
379 |
+
$row->slideshow_description_opacity = 70;
|
380 |
+
$row->slideshow_description_border_radius = '0';
|
381 |
+
$row->slideshow_description_background_color = '000000';
|
382 |
+
$row->slideshow_description_padding = '5px 10px 5px 10px';
|
383 |
+
$row->slideshow_dots_width = 12;
|
384 |
+
$row->slideshow_dots_height = 12;
|
385 |
+
$row->slideshow_dots_border_radius = '5px';
|
386 |
+
$row->slideshow_dots_background_color = 'F2D22E';
|
387 |
+
$row->slideshow_dots_margin = 3;
|
388 |
+
$row->slideshow_dots_active_background_color = 'FFFFFF';
|
389 |
+
$row->slideshow_dots_active_border_width = 1;
|
390 |
+
$row->slideshow_dots_active_border_color = '000000';
|
391 |
+
$row->slideshow_play_pause_btn_size = 60;
|
392 |
+
$row->slideshow_rl_btn_style = 'fa-chevron';
|
393 |
+
|
394 |
+
$row->blog_style_margin = '2px';
|
395 |
+
$row->blog_style_padding = '0';
|
396 |
+
$row->blog_style_border_radius = '0';
|
397 |
+
$row->blog_style_border_width = 1;
|
398 |
+
$row->blog_style_border_style = 'solid';
|
399 |
+
$row->blog_style_border_color = 'F5F5F5';
|
400 |
+
$row->blog_style_bg_color = 'FFFFFF';
|
401 |
+
$row->blog_style_transparent = 80;
|
402 |
+
$row->blog_style_box_shadow = '';
|
403 |
+
$row->blog_style_align = 'center';
|
404 |
+
$row->blog_style_share_buttons_margin = '5px auto 10px auto';
|
405 |
+
$row->blog_style_share_buttons_border_radius = '0';
|
406 |
+
$row->blog_style_share_buttons_border_width = 0;
|
407 |
+
$row->blog_style_share_buttons_border_style = 'none';
|
408 |
+
$row->blog_style_share_buttons_border_color = '000000';
|
409 |
+
$row->blog_style_share_buttons_bg_color = 'FFFFFF';
|
410 |
+
$row->blog_style_share_buttons_align = 'right';
|
411 |
+
$row->blog_style_img_font_size = 16;
|
412 |
+
$row->blog_style_img_font_family = 'segoe ui';
|
413 |
+
$row->blog_style_img_font_color = '000000';
|
414 |
+
$row->blog_style_share_buttons_color = 'B3AFAF';
|
415 |
+
$row->blog_style_share_buttons_bg_transparent = 0;
|
416 |
+
$row->blog_style_share_buttons_font_size = 20;
|
417 |
+
|
418 |
+
$row->image_browser_margin = '2px auto';
|
419 |
+
$row->image_browser_padding = '4px';
|
420 |
+
$row->image_browser_border_radius = '0';
|
421 |
+
$row->image_browser_border_width = 1;
|
422 |
+
$row->image_browser_border_style = 'none';
|
423 |
+
$row->image_browser_border_color = 'F5F5F5';
|
424 |
+
$row->image_browser_bg_color = 'EBEBEB';
|
425 |
+
$row->image_browser_box_shadow = '';
|
426 |
+
$row->image_browser_transparent = 80;
|
427 |
+
$row->image_browser_align = 'center';
|
428 |
+
$row->image_browser_image_description_margin = '0px 5px 0px 5px';
|
429 |
+
$row->image_browser_image_description_padding = '8px 8px 8px 8px';
|
430 |
+
$row->image_browser_image_description_border_radius = '0';
|
431 |
+
$row->image_browser_image_description_border_width = 1;
|
432 |
+
$row->image_browser_image_description_border_style = 'none';
|
433 |
+
$row->image_browser_image_description_border_color = 'FFFFFF';
|
434 |
+
$row->image_browser_image_description_bg_color = 'EBEBEB';
|
435 |
+
$row->image_browser_image_description_align = 'center';
|
436 |
+
$row->image_browser_img_font_size = 15;
|
437 |
+
$row->image_browser_img_font_family = 'segoe ui';
|
438 |
+
$row->image_browser_img_font_color = '000000';
|
439 |
+
$row->image_browser_full_padding = '4px';
|
440 |
+
$row->image_browser_full_border_radius = '0';
|
441 |
+
$row->image_browser_full_border_width = 2;
|
442 |
+
$row->image_browser_full_border_style = 'none';
|
443 |
+
$row->image_browser_full_border_color = 'F7F7F7';
|
444 |
+
$row->image_browser_full_bg_color = 'F5F5F5';
|
445 |
+
$row->image_browser_full_transparent = 90;
|
446 |
+
$row->lightbox_info_pos = 'top';
|
447 |
+
$row->lightbox_info_align = 'right';
|
448 |
+
$row->lightbox_info_bg_color = '000000';
|
449 |
+
$row->lightbox_info_bg_transparent = 70;
|
450 |
+
$row->lightbox_info_border_width = 1;
|
451 |
+
$row->lightbox_info_border_style = 'none';
|
452 |
+
$row->lightbox_info_border_color = '000000';
|
453 |
+
$row->lightbox_info_border_radius = '5px';
|
454 |
+
$row->lightbox_info_padding = '5px';
|
455 |
+
$row->lightbox_info_margin = '15px';
|
456 |
+
$row->lightbox_title_color = 'FFFFFF';
|
457 |
+
$row->lightbox_title_font_style = 'segoe ui';
|
458 |
+
$row->lightbox_title_font_weight = 'bold';
|
459 |
+
$row->lightbox_title_font_size = 18;
|
460 |
+
$row->lightbox_description_color = 'FFFFFF';
|
461 |
+
$row->lightbox_description_font_style = 'segoe ui';
|
462 |
+
$row->lightbox_description_font_weight = 'normal';
|
463 |
+
$row->lightbox_description_font_size = 14;
|
464 |
+
$row->lightbox_rate_pos = 'bottom';
|
465 |
+
$row->lightbox_rate_align = 'right';
|
466 |
+
$row->lightbox_rate_icon = 'star';
|
467 |
+
$row->lightbox_rate_color = 'F9D062';
|
468 |
+
$row->lightbox_rate_size = 20;
|
469 |
+
$row->lightbox_rate_stars_count = 5;
|
470 |
+
$row->lightbox_rate_padding = '15px';
|
471 |
+
$row->lightbox_rate_hover_color = 'F7B50E';
|
472 |
+
$row->lightbox_hit_pos = 'bottom';
|
473 |
+
$row->lightbox_hit_align = 'left';
|
474 |
+
$row->lightbox_hit_bg_color = '000000';
|
475 |
+
$row->lightbox_hit_bg_transparent = 70;
|
476 |
+
$row->lightbox_hit_border_width = 1;
|
477 |
+
$row->lightbox_hit_border_style = 'none';
|
478 |
+
$row->lightbox_hit_border_color = '000000';
|
479 |
+
$row->lightbox_hit_border_radius = '5px';
|
480 |
+
$row->lightbox_hit_padding = '5px';
|
481 |
+
$row->lightbox_hit_margin = '0 5px';
|
482 |
+
$row->lightbox_hit_color = 'FFFFFF';
|
483 |
+
$row->lightbox_hit_font_style = 'segoe ui';
|
484 |
+
$row->lightbox_hit_font_weight = 'normal';
|
485 |
+
$row->lightbox_hit_font_size = 14;
|
486 |
+
//carousel
|
487 |
+
$row->carousel_cont_bg_color = '000000';
|
488 |
+
$row->carousel_cont_btn_transparent = 0;
|
489 |
+
$row->carousel_close_btn_transparent = 100;
|
490 |
+
$row->carousel_rl_btn_bg_color = '000000';
|
491 |
+
$row->carousel_rl_btn_border_radius = '20px';
|
492 |
+
$row->carousel_rl_btn_border_width = 0;
|
493 |
+
$row->carousel_rl_btn_border_style = 'none';
|
494 |
+
$row->carousel_rl_btn_border_color = 'FFFFFF';
|
495 |
+
$row->carousel_rl_btn_color = 'FFFFFF';
|
496 |
+
$row->carousel_rl_btn_height = 40;
|
497 |
+
$row->carousel_rl_btn_size = 20;
|
498 |
+
$row->carousel_play_pause_btn_size = 20;
|
499 |
+
$row->carousel_rl_btn_width = 40;
|
500 |
+
$row->carousel_close_rl_btn_hover_color = 'CCCCCC';
|
501 |
+
$row->carousel_rl_btn_style='fa-chevron';
|
502 |
+
$row->carousel_mergin_bottom = '0.5';
|
503 |
+
$row->carousel_font_family = 'Arial';
|
504 |
+
$row->carousel_feature_border_width = 2;
|
505 |
+
$row->carousel_feature_border_style = 'solid';
|
506 |
+
$row->carousel_feature_border_color= '5D204F';
|
507 |
+
$row->carousel_caption_background_color = '000000';
|
508 |
+
$row->carousel_caption_bottom = 0;
|
509 |
+
$row->carousel_caption_p_mergin = 0;
|
510 |
+
$row->carousel_caption_p_pedding = 5;
|
511 |
+
$row->carousel_caption_p_font_weight = 'bold';
|
512 |
+
$row->carousel_caption_p_font_size = 14;
|
513 |
+
$row->carousel_caption_p_color = 'white';
|
514 |
+
$row->carousel_title_opacity = 100;
|
515 |
+
$row->carousel_title_border_radius = '5px';
|
516 |
+
$row->mosaic_thumb_transition = 1;
|
517 |
+
}
|
518 |
+
}
|
519 |
+
}
|
520 |
+
else {
|
521 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_theme WHERE default_theme="%d"', 1));
|
522 |
+
$row->id = 0;
|
523 |
+
$row->name = '';
|
524 |
+
$row->default_theme = 0;
|
525 |
+
}
|
526 |
+
return $row;
|
527 |
+
}
|
528 |
+
|
529 |
+
public function page_nav() {
|
530 |
+
global $wpdb;
|
531 |
+
$where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE name LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
|
532 |
+
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "bwg_theme " . $where;
|
533 |
+
$total = $wpdb->get_var($query);
|
534 |
+
$page_nav['total'] = $total;
|
535 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
536 |
+
$limit = ((int) $_POST['page_number'] - 1) * $this->per_page;
|
537 |
+
}
|
538 |
+
else {
|
539 |
+
$limit = 0;
|
540 |
+
}
|
541 |
+
$page_nav['limit'] = (int) ($limit / $this->per_page + 1);
|
542 |
+
return $page_nav;
|
543 |
+
}
|
544 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
545 |
+
// Getters & Setters //
|
546 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
547 |
+
public function per_page(){
|
548 |
+
return $this->per_page;
|
549 |
+
|
550 |
+
}
|
551 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
552 |
+
// Private Methods //
|
553 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
554 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
555 |
+
// Listeners //
|
556 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
557 |
}
|
admin/models/BWGModelUninstall_bwg.php
CHANGED
@@ -1,75 +1,75 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelUninstall_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function delete_db_tables() {
|
22 |
-
global $wpdb;
|
23 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_album");
|
24 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_album_gallery");
|
25 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_gallery");
|
26 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_image");
|
27 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_image_comment");
|
28 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_image_rate");
|
29 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_image_tag");
|
30 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_option");
|
31 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_theme");
|
32 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_shortcode");
|
33 |
-
delete_option("wd_bwg_version");
|
34 |
-
if (isset($_COOKIE['bwg_image_asc_or_desc'])) {
|
35 |
-
$_COOKIE['bwg_image_asc_or_desc'] = '';
|
36 |
-
}
|
37 |
-
if (isset($_COOKIE['bwg_image_order_by'])) {
|
38 |
-
$_COOKIE['bwg_image_order_by'] = '';
|
39 |
-
}
|
40 |
-
// Delete terms.
|
41 |
-
$terms = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
|
42 |
-
foreach ($terms as $term) {
|
43 |
-
wp_delete_term($term->term_id, 'bwg_tag');
|
44 |
-
}
|
45 |
-
// Delete custom pages for galleries.
|
46 |
-
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_gallery'));
|
47 |
-
foreach ($posts as $post) {
|
48 |
-
wp_delete_post($post->ID, TRUE);
|
49 |
-
}
|
50 |
-
// Delete custom pages for albums.
|
51 |
-
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_album'));
|
52 |
-
foreach ($posts as $post) {
|
53 |
-
wp_delete_post($post->ID, TRUE);
|
54 |
-
}
|
55 |
-
// Delete custom pages for tags.
|
56 |
-
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_tag'));
|
57 |
-
foreach ($posts as $post) {
|
58 |
-
wp_delete_post($post->ID, TRUE);
|
59 |
-
}
|
60 |
-
// Delete custom pages for share.
|
61 |
-
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_share'));
|
62 |
-
foreach ($posts as $post) {
|
63 |
-
wp_delete_post($post->ID, TRUE);
|
64 |
-
}
|
65 |
-
}
|
66 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
-
// Getters & Setters //
|
68 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
69 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
70 |
-
// Private Methods //
|
71 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
72 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
73 |
-
// Listeners //
|
74 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
75 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelUninstall_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function delete_db_tables() {
|
22 |
+
global $wpdb;
|
23 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_album");
|
24 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_album_gallery");
|
25 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_gallery");
|
26 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_image");
|
27 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_image_comment");
|
28 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_image_rate");
|
29 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_image_tag");
|
30 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_option");
|
31 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_theme");
|
32 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "bwg_shortcode");
|
33 |
+
delete_option("wd_bwg_version");
|
34 |
+
if (isset($_COOKIE['bwg_image_asc_or_desc'])) {
|
35 |
+
$_COOKIE['bwg_image_asc_or_desc'] = '';
|
36 |
+
}
|
37 |
+
if (isset($_COOKIE['bwg_image_order_by'])) {
|
38 |
+
$_COOKIE['bwg_image_order_by'] = '';
|
39 |
+
}
|
40 |
+
// Delete terms.
|
41 |
+
$terms = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
|
42 |
+
foreach ($terms as $term) {
|
43 |
+
wp_delete_term($term->term_id, 'bwg_tag');
|
44 |
+
}
|
45 |
+
// Delete custom pages for galleries.
|
46 |
+
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_gallery'));
|
47 |
+
foreach ($posts as $post) {
|
48 |
+
wp_delete_post($post->ID, TRUE);
|
49 |
+
}
|
50 |
+
// Delete custom pages for albums.
|
51 |
+
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_album'));
|
52 |
+
foreach ($posts as $post) {
|
53 |
+
wp_delete_post($post->ID, TRUE);
|
54 |
+
}
|
55 |
+
// Delete custom pages for tags.
|
56 |
+
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_tag'));
|
57 |
+
foreach ($posts as $post) {
|
58 |
+
wp_delete_post($post->ID, TRUE);
|
59 |
+
}
|
60 |
+
// Delete custom pages for share.
|
61 |
+
$posts = get_posts(array('posts_per_page' => -1, 'post_type' => 'bwg_share'));
|
62 |
+
foreach ($posts as $post) {
|
63 |
+
wp_delete_post($post->ID, TRUE);
|
64 |
+
}
|
65 |
+
}
|
66 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
67 |
+
// Getters & Setters //
|
68 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
69 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
70 |
+
// Private Methods //
|
71 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
72 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
73 |
+
// Listeners //
|
74 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
75 |
}
|
admin/models/BWGModelWidget.php
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelWidget {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
|
22 |
-
public function get_gallery_rows_data() {
|
23 |
-
global $wpdb;
|
24 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1";
|
25 |
-
$rows = $wpdb->get_results($query);
|
26 |
-
return $rows;
|
27 |
-
}
|
28 |
-
|
29 |
-
public function get_album_rows_data() {
|
30 |
-
global $wpdb;
|
31 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_album WHERE published=1";
|
32 |
-
$rows = $wpdb->get_results($query);
|
33 |
-
return $rows;
|
34 |
-
}
|
35 |
-
|
36 |
-
public function get_theme_rows_data() {
|
37 |
-
global $wpdb;
|
38 |
-
$query = "SELECT id, name, default_theme FROM " . $wpdb->prefix . "bwg_theme ORDER BY default_theme DESC";
|
39 |
-
$rows = $wpdb->get_results($query);
|
40 |
-
return $rows;
|
41 |
-
}
|
42 |
-
|
43 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
44 |
-
// Getters & Setters //
|
45 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
46 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
47 |
-
// Private Methods //
|
48 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
50 |
-
// Listeners //
|
51 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
52 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelWidget {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
public function get_gallery_rows_data() {
|
23 |
+
global $wpdb;
|
24 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1";
|
25 |
+
$rows = $wpdb->get_results($query);
|
26 |
+
return $rows;
|
27 |
+
}
|
28 |
+
|
29 |
+
public function get_album_rows_data() {
|
30 |
+
global $wpdb;
|
31 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_album WHERE published=1";
|
32 |
+
$rows = $wpdb->get_results($query);
|
33 |
+
return $rows;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function get_theme_rows_data() {
|
37 |
+
global $wpdb;
|
38 |
+
$query = "SELECT id, name, default_theme FROM " . $wpdb->prefix . "bwg_theme ORDER BY default_theme DESC";
|
39 |
+
$rows = $wpdb->get_results($query);
|
40 |
+
return $rows;
|
41 |
+
}
|
42 |
+
|
43 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
44 |
+
// Getters & Setters //
|
45 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
46 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
47 |
+
// Private Methods //
|
48 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
50 |
+
// Listeners //
|
51 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
52 |
}
|
admin/models/BWGModelWidgetSlideshow.php
CHANGED
@@ -1,51 +1,51 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelWidgetSlideshow {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
|
22 |
-
public function get_gallery_rows_data() {
|
23 |
-
global $wpdb;
|
24 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1";
|
25 |
-
$rows = $wpdb->get_results($query);
|
26 |
-
return $rows;
|
27 |
-
}
|
28 |
-
|
29 |
-
public function get_theme_rows_data() {
|
30 |
-
global $wpdb;
|
31 |
-
$query = "SELECT id, name, default_theme FROM " . $wpdb->prefix . "bwg_theme ORDER BY default_theme DESC";
|
32 |
-
$rows = $wpdb->get_results($query);
|
33 |
-
return $rows;
|
34 |
-
}
|
35 |
-
|
36 |
-
public function get_options_row_data() {
|
37 |
-
global $wpdb;
|
38 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
|
39 |
-
return $row;
|
40 |
-
}
|
41 |
-
|
42 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
-
// Getters & Setters //
|
44 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
45 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
46 |
-
// Private Methods //
|
47 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
48 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
-
// Listeners //
|
50 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
51 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelWidgetSlideshow {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
public function get_gallery_rows_data() {
|
23 |
+
global $wpdb;
|
24 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1";
|
25 |
+
$rows = $wpdb->get_results($query);
|
26 |
+
return $rows;
|
27 |
+
}
|
28 |
+
|
29 |
+
public function get_theme_rows_data() {
|
30 |
+
global $wpdb;
|
31 |
+
$query = "SELECT id, name, default_theme FROM " . $wpdb->prefix . "bwg_theme ORDER BY default_theme DESC";
|
32 |
+
$rows = $wpdb->get_results($query);
|
33 |
+
return $rows;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function get_options_row_data() {
|
37 |
+
global $wpdb;
|
38 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
|
39 |
+
return $row;
|
40 |
+
}
|
41 |
+
|
42 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
+
// Getters & Setters //
|
44 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
45 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
46 |
+
// Private Methods //
|
47 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
48 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
+
// Listeners //
|
50 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
51 |
}
|
admin/models/BWGModelWidgetTags.php
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGModelWidgetTags {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
|
22 |
-
public function get_gallery_rows_data() {
|
23 |
-
global $wpdb;
|
24 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1";
|
25 |
-
$rows = $wpdb->get_results($query);
|
26 |
-
return $rows;
|
27 |
-
}
|
28 |
-
|
29 |
-
public function get_album_rows_data() {
|
30 |
-
global $wpdb;
|
31 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_album WHERE published=1";
|
32 |
-
$rows = $wpdb->get_results($query);
|
33 |
-
return $rows;
|
34 |
-
}
|
35 |
-
|
36 |
-
public function get_theme_rows_data() {
|
37 |
-
global $wpdb;
|
38 |
-
$query = "SELECT id, name, default_theme FROM " . $wpdb->prefix . "bwg_theme ORDER BY default_theme DESC";
|
39 |
-
$rows = $wpdb->get_results($query);
|
40 |
-
return $rows;
|
41 |
-
}
|
42 |
-
|
43 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
44 |
-
// Getters & Setters //
|
45 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
46 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
47 |
-
// Private Methods //
|
48 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
50 |
-
// Listeners //
|
51 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
52 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGModelWidgetTags {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
public function get_gallery_rows_data() {
|
23 |
+
global $wpdb;
|
24 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_gallery WHERE published=1";
|
25 |
+
$rows = $wpdb->get_results($query);
|
26 |
+
return $rows;
|
27 |
+
}
|
28 |
+
|
29 |
+
public function get_album_rows_data() {
|
30 |
+
global $wpdb;
|
31 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "bwg_album WHERE published=1";
|
32 |
+
$rows = $wpdb->get_results($query);
|
33 |
+
return $rows;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function get_theme_rows_data() {
|
37 |
+
global $wpdb;
|
38 |
+
$query = "SELECT id, name, default_theme FROM " . $wpdb->prefix . "bwg_theme ORDER BY default_theme DESC";
|
39 |
+
$rows = $wpdb->get_results($query);
|
40 |
+
return $rows;
|
41 |
+
}
|
42 |
+
|
43 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
44 |
+
// Getters & Setters //
|
45 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
46 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
47 |
+
// Private Methods //
|
48 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
50 |
+
// Listeners //
|
51 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
52 |
}
|
admin/views/BWGViewAddAlbumsGalleries.php
CHANGED
@@ -1,131 +1,131 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGViewAddAlbumsGalleries {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $model;
|
14 |
-
|
15 |
-
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
// Constructor & Destructor //
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
public function __construct($model) {
|
20 |
-
$this->model = $model;
|
21 |
-
}
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Public Methods //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
public function display() {
|
26 |
-
$album_id = ((isset($_GET['album_id'])) ? esc_html(stripslashes($_GET['album_id'])) : ((isset($_POST['album_id'])) ? esc_html(stripslashes($_POST['album_id'])) : ''));
|
27 |
-
$rows_data = $this->model->get_rows_data($album_id);
|
28 |
-
$page_nav = $this->model->page_nav($album_id);
|
29 |
-
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
30 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
31 |
-
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
|
32 |
-
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
-
$per_page = $this->model->per_page();
|
34 |
-
$pager = 0;
|
35 |
-
wp_print_scripts('jquery');
|
36 |
-
wp_print_scripts('wp-pointer');
|
37 |
-
?>
|
38 |
-
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check,wp-pointer" rel="stylesheet">
|
39 |
-
<?php if (get_bloginfo('version') < '3.9') { ?>
|
40 |
-
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
|
41 |
-
<?php } ?>
|
42 |
-
<link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css?ver='.wd_bwg_version(); ?>" id="spider_audio_player_tables-css" rel="stylesheet">
|
43 |
-
<script src="<?php echo WD_BWG_URL . '/js/bwg.js?ver='.wd_bwg_version(); ?>" type="text/javascript"></script>
|
44 |
-
<form class="wrap wp-core-ui bwg_form" id="albums_galleries_form" method="post" action="<?php echo add_query_arg(array('action' => 'addAlbumsGalleries', 'width' => '700', 'height' => '550', 'callback' => 'bwg_add_items', 'bwg_items_per_page'=>$per_page , 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
|
45 |
-
<?php wp_nonce_field( 'addAlbumsGalleries', 'bwg_nonce' ); ?>
|
46 |
-
<h2 style="width:200px;float:left"><?php _e("Albums/Galleries", 'bwg_back'); ?></h2>
|
47 |
-
<a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Album/Gallery" onclick="spider_get_items(event);" style="float:right; padding: 9px 0px 4px 0">
|
48 |
-
<img id='add_albums' src="<?php echo WD_BWG_URL . '/images/add_but.png'; ?>" style="border:none;" />
|
49 |
-
</a>
|
50 |
-
<div class="tablenav top">
|
51 |
-
<?php
|
52 |
-
WDWLibrary::search(__("Name", 'bwg_back'), $search_value, 'albums_galleries_form');
|
53 |
-
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
|
54 |
-
?>
|
55 |
-
</div>
|
56 |
-
<table class="wp-list-table widefat fixed pages">
|
57 |
-
<thead>
|
58 |
-
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
|
59 |
-
<th class="table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
|
60 |
-
<a onclick="spider_set_input_value('order_by', 'id');
|
61 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
62 |
-
spider_form_submit(event, 'albums_galleries_form')" href="">
|
63 |
-
<span>ID</span><span class="sorting-indicator"></span>
|
64 |
-
</a>
|
65 |
-
</th>
|
66 |
-
<th class="table_medium_col_uncenter <?php if ($order_by == 'is_album') {echo $order_class;} ?>">
|
67 |
-
<a onclick="spider_set_input_value('task', '');
|
68 |
-
spider_set_input_value('order_by', 'is_album');
|
69 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'is_album') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
70 |
-
spider_form_submit(event, 'albums_galleries_form')" href="">
|
71 |
-
<span><?php _e("Type", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
72 |
-
</a>
|
73 |
-
</th>
|
74 |
-
<th class="<?php if ($order_by == 'name') {echo $order_class;} ?>">
|
75 |
-
<a onclick="spider_set_input_value('order_by', 'name');
|
76 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
77 |
-
spider_form_submit(event, 'albums_galleries_form')" href="">
|
78 |
-
<span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
79 |
-
</a>
|
80 |
-
</th>
|
81 |
-
</thead>
|
82 |
-
<tbody id="tbody_albums_galleries">
|
83 |
-
<?php
|
84 |
-
if ($rows_data) {
|
85 |
-
$iterator = 0;
|
86 |
-
foreach ($rows_data as $row_data) {
|
87 |
-
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
88 |
-
?>
|
89 |
-
<tr id="tr_<?php echo $iterator; ?>" <?php echo $alternate; ?>>
|
90 |
-
<td class="table_small_col check-column"><input id="check_<?php echo $iterator; ?>" name="check_<?php echo $iterator; ?>" type="checkbox" /></td>
|
91 |
-
<td id="id_<?php echo $iterator; ?>" class="table_small_col"><?php echo $row_data->id; ?></td>
|
92 |
-
<td id="url_<?php echo $iterator; ?>" class="table_medium_col_uncenter"><?php echo ($row_data->is_album ? __("Album", 'bwg_back') : __("Gallery", 'bwg_back')) ; ?></td>
|
93 |
-
<td>
|
94 |
-
<a onclick="window.parent.bwg_add_items(['<?php echo $row_data->id?>'],['<?php echo htmlspecialchars(addslashes($row_data->name))?>'], ['<?php echo htmlspecialchars(addslashes($row_data->is_album))?>'])" id="a_<?php echo $iterator; ?>" style="cursor:pointer;">
|
95 |
-
<?php echo $row_data->name?>
|
96 |
-
</a>
|
97 |
-
</td>
|
98 |
-
</tr>
|
99 |
-
<?php
|
100 |
-
$iterator++;
|
101 |
-
}
|
102 |
-
}
|
103 |
-
?>
|
104 |
-
</tbody>
|
105 |
-
</table>
|
106 |
-
<div class="tablenav bottom">
|
107 |
-
<?php
|
108 |
-
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
|
109 |
-
?>
|
110 |
-
</div>
|
111 |
-
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
112 |
-
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
113 |
-
<input id="album_id" name="album_id" type="hidden" value="<?php echo $album_id; ?>" />
|
114 |
-
</form>
|
115 |
-
<script src="<?php echo get_admin_url(); ?>load-scripts.php?c=1&load%5B%5D=common,admin-bar" type="text/javascript"></script>
|
116 |
-
<?php
|
117 |
-
include_once (WD_BWG_DIR .'/includes/bwg_pointers.php');
|
118 |
-
new BWG_pointers();
|
119 |
-
die();
|
120 |
-
}
|
121 |
-
|
122 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
123 |
-
// Getters & Setters //
|
124 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
125 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
126 |
-
// Private Methods //
|
127 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
128 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
129 |
-
// Listeners //
|
130 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
131 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGViewAddAlbumsGalleries {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $model;
|
14 |
+
|
15 |
+
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct($model) {
|
20 |
+
$this->model = $model;
|
21 |
+
}
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Public Methods //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function display() {
|
26 |
+
$album_id = ((isset($_GET['album_id'])) ? esc_html(stripslashes($_GET['album_id'])) : ((isset($_POST['album_id'])) ? esc_html(stripslashes($_POST['album_id'])) : ''));
|
27 |
+
$rows_data = $this->model->get_rows_data($album_id);
|
28 |
+
$page_nav = $this->model->page_nav($album_id);
|
29 |
+
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
30 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
31 |
+
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
|
32 |
+
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
+
$per_page = $this->model->per_page();
|
34 |
+
$pager = 0;
|
35 |
+
wp_print_scripts('jquery');
|
36 |
+
wp_print_scripts('wp-pointer');
|
37 |
+
?>
|
38 |
+
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check,wp-pointer" rel="stylesheet">
|
39 |
+
<?php if (get_bloginfo('version') < '3.9') { ?>
|
40 |
+
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
|
41 |
+
<?php } ?>
|
42 |
+
<link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css?ver='.wd_bwg_version(); ?>" id="spider_audio_player_tables-css" rel="stylesheet">
|
43 |
+
<script src="<?php echo WD_BWG_URL . '/js/bwg.js?ver='.wd_bwg_version(); ?>" type="text/javascript"></script>
|
44 |
+
<form class="wrap wp-core-ui bwg_form" id="albums_galleries_form" method="post" action="<?php echo add_query_arg(array('action' => 'addAlbumsGalleries', 'width' => '700', 'height' => '550', 'callback' => 'bwg_add_items', 'bwg_items_per_page'=>$per_page , 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:95%; margin: 0 auto;">
|
45 |
+
<?php wp_nonce_field( 'addAlbumsGalleries', 'bwg_nonce' ); ?>
|
46 |
+
<h2 style="width:200px;float:left"><?php _e("Albums/Galleries", 'bwg_back'); ?></h2>
|
47 |
+
<a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Album/Gallery" onclick="spider_get_items(event);" style="float:right; padding: 9px 0px 4px 0">
|
48 |
+
<img id='add_albums' src="<?php echo WD_BWG_URL . '/images/add_but.png'; ?>" style="border:none;" />
|
49 |
+
</a>
|
50 |
+
<div class="tablenav top">
|
51 |
+
<?php
|
52 |
+
WDWLibrary::search(__("Name", 'bwg_back'), $search_value, 'albums_galleries_form');
|
53 |
+
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
|
54 |
+
?>
|
55 |
+
</div>
|
56 |
+
<table class="wp-list-table widefat fixed pages">
|
57 |
+
<thead>
|
58 |
+
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
|
59 |
+
<th class="table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
|
60 |
+
<a onclick="spider_set_input_value('order_by', 'id');
|
61 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
62 |
+
spider_form_submit(event, 'albums_galleries_form')" href="">
|
63 |
+
<span>ID</span><span class="sorting-indicator"></span>
|
64 |
+
</a>
|
65 |
+
</th>
|
66 |
+
<th class="table_medium_col_uncenter <?php if ($order_by == 'is_album') {echo $order_class;} ?>">
|
67 |
+
<a onclick="spider_set_input_value('task', '');
|
68 |
+
spider_set_input_value('order_by', 'is_album');
|
69 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'is_album') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
70 |
+
spider_form_submit(event, 'albums_galleries_form')" href="">
|
71 |
+
<span><?php _e("Type", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
72 |
+
</a>
|
73 |
+
</th>
|
74 |
+
<th class="<?php if ($order_by == 'name') {echo $order_class;} ?>">
|
75 |
+
<a onclick="spider_set_input_value('order_by', 'name');
|
76 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
77 |
+
spider_form_submit(event, 'albums_galleries_form')" href="">
|
78 |
+
<span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
79 |
+
</a>
|
80 |
+
</th>
|
81 |
+
</thead>
|
82 |
+
<tbody id="tbody_albums_galleries">
|
83 |
+
<?php
|
84 |
+
if ($rows_data) {
|
85 |
+
$iterator = 0;
|
86 |
+
foreach ($rows_data as $row_data) {
|
87 |
+
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
88 |
+
?>
|
89 |
+
<tr id="tr_<?php echo $iterator; ?>" <?php echo $alternate; ?>>
|
90 |
+
<td class="table_small_col check-column"><input id="check_<?php echo $iterator; ?>" name="check_<?php echo $iterator; ?>" type="checkbox" /></td>
|
91 |
+
<td id="id_<?php echo $iterator; ?>" class="table_small_col"><?php echo $row_data->id; ?></td>
|
92 |
+
<td id="url_<?php echo $iterator; ?>" class="table_medium_col_uncenter"><?php echo ($row_data->is_album ? __("Album", 'bwg_back') : __("Gallery", 'bwg_back')) ; ?></td>
|
93 |
+
<td>
|
94 |
+
<a onclick="window.parent.bwg_add_items(['<?php echo $row_data->id?>'],['<?php echo htmlspecialchars(addslashes($row_data->name))?>'], ['<?php echo htmlspecialchars(addslashes($row_data->is_album))?>'])" id="a_<?php echo $iterator; ?>" style="cursor:pointer;">
|
95 |
+
<?php echo $row_data->name?>
|
96 |
+
</a>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<?php
|
100 |
+
$iterator++;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
?>
|
104 |
+
</tbody>
|
105 |
+
</table>
|
106 |
+
<div class="tablenav bottom">
|
107 |
+
<?php
|
108 |
+
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_galleries_form', $per_page);
|
109 |
+
?>
|
110 |
+
</div>
|
111 |
+
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
112 |
+
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
113 |
+
<input id="album_id" name="album_id" type="hidden" value="<?php echo $album_id; ?>" />
|
114 |
+
</form>
|
115 |
+
<script src="<?php echo get_admin_url(); ?>load-scripts.php?c=1&load%5B%5D=common,admin-bar" type="text/javascript"></script>
|
116 |
+
<?php
|
117 |
+
include_once (WD_BWG_DIR .'/includes/bwg_pointers.php');
|
118 |
+
new BWG_pointers();
|
119 |
+
die();
|
120 |
+
}
|
121 |
+
|
122 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
123 |
+
// Getters & Setters //
|
124 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
125 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
126 |
+
// Private Methods //
|
127 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
128 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
129 |
+
// Listeners //
|
130 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
131 |
}
|
admin/views/BWGViewAddTags.php
CHANGED
@@ -1,120 +1,120 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGViewAddTags {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $model;
|
14 |
-
|
15 |
-
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
// Constructor & Destructor //
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
public function __construct($model) {
|
20 |
-
$this->model = $model;
|
21 |
-
}
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Public Methods //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
public function display() {
|
26 |
-
$rows_data = $this->model->get_rows_data();
|
27 |
-
$page_nav = $this->model->page_nav();
|
28 |
-
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
29 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
30 |
-
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
|
31 |
-
$image_id = ((isset($_GET['image_id'])) ? esc_html($_GET['image_id']) : ((isset($_POST['image_id'])) ? esc_html($_POST['image_id']) : '0'));
|
32 |
-
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
-
$per_page = $this->model->per_page();
|
34 |
-
$pager = 0;
|
35 |
-
wp_print_scripts('jquery');
|
36 |
-
?>
|
37 |
-
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=admin-bar,wp-admin,dashicons,buttons,wp-auth-check" rel="stylesheet">
|
38 |
-
<?php if (get_bloginfo('version') < '3.9') { ?>
|
39 |
-
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
|
40 |
-
<?php } ?>
|
41 |
-
<link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css?ver='.wd_bwg_version(); ?>" id="bwg_tables-css" rel="stylesheet">
|
42 |
-
<script src="<?php echo WD_BWG_URL . '/js/bwg.js?ver='.wd_bwg_version(); ?>" type="text/javascript"></script>
|
43 |
-
<form class="wrap wp-core-ui bwg_form" id="tags_form" method="post" action="<?php echo add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500', 'bwg_items_per_page'=>$per_page , 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:99%; margin: 0 auto;">
|
44 |
-
<?php wp_nonce_field( 'addTags', 'bwg_nonce' ); ?>
|
45 |
-
<h2 style="width:200px; float:left;"><?php _e("Tags", 'bwg_back'); ?></h2>
|
46 |
-
<a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Tag" onclick="bwg_get_tags('<?php echo $image_id; ?>', event);" style="float:right; padding: 9px 0px 4px 0">
|
47 |
-
<img src="<?php echo WD_BWG_URL . '/images/add_but.png'; ?>" style="border:none;" />
|
48 |
-
</a>
|
49 |
-
<div class="tablenav top">
|
50 |
-
<?php
|
51 |
-
WDWLibrary::search(__('Name', 'bwg_back'), $search_value, 'tags_form');
|
52 |
-
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
|
53 |
-
?>
|
54 |
-
</div>
|
55 |
-
<table class="wp-list-table widefat fixed pages">
|
56 |
-
<thead>
|
57 |
-
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
|
58 |
-
<th class="table_small_col <?php if ($order_by == 'term_id') {echo $order_class;} ?>">
|
59 |
-
<a onclick="spider_set_input_value('order_by', 'term_id');
|
60 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'term_id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
61 |
-
spider_form_submit(event, 'tags_form')" href="">
|
62 |
-
<span>ID</span><span class="sorting-indicator"></span></th>
|
63 |
-
</a>
|
64 |
-
<th class="<?php if ($order_by == 'name') {echo $order_class;} ?>">
|
65 |
-
<a onclick="spider_set_input_value('order_by', 'name');
|
66 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
67 |
-
spider_form_submit(event, 'tags_form')" href="">
|
68 |
-
<span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
69 |
-
</a>
|
70 |
-
</th>
|
71 |
-
<th class="<?php if ($order_by == 'slug') {echo $order_class;} ?>">
|
72 |
-
<a onclick="spider_set_input_value('order_by', 'slug');
|
73 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'slug') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
74 |
-
spider_form_submit(event, 'tags_form')" href="">
|
75 |
-
<span><?php _e("Slug", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
76 |
-
</a>
|
77 |
-
</th>
|
78 |
-
</thead>
|
79 |
-
<tbody id="tbody_arr">
|
80 |
-
<?php
|
81 |
-
if ($rows_data) {
|
82 |
-
foreach ($rows_data as $row_data) {
|
83 |
-
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
84 |
-
?>
|
85 |
-
<tr id="tr_<?php echo $row_data->term_id; ?>" <?php echo $alternate; ?>>
|
86 |
-
<td class="table_small_col check-column"><input id="check_<?php echo $row_data->term_id; ?>" name="check_<?php echo $row_data->term_id; ?>" type="checkbox" /></td>
|
87 |
-
<td class="table_small_col"><?php echo $row_data->term_id; ?></td>
|
88 |
-
<td><a onclick="window.parent.bwg_add_tag('<?php echo $image_id; ?>', ['<?php echo $row_data->term_id; ?>'],['<?php echo htmlspecialchars(addslashes($row_data->name))?>'])" id="a_<?php echo $row_data->term_id; ?>" style="cursor:pointer;"><?php echo $row_data->name; ?></a></td>
|
89 |
-
<td id="slug_<?php echo $row_data->term_id; ?>"><?php echo (($row_data->slug) ? $row_data->slug : ' '); ?></td>
|
90 |
-
</tr>
|
91 |
-
<?php
|
92 |
-
}
|
93 |
-
}
|
94 |
-
?>
|
95 |
-
</tbody>
|
96 |
-
</table>
|
97 |
-
<div class="tablenav bottom">
|
98 |
-
<?php
|
99 |
-
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
|
100 |
-
?>
|
101 |
-
</div>
|
102 |
-
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
103 |
-
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
104 |
-
<input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
|
105 |
-
</form>
|
106 |
-
<script src="<?php echo get_admin_url(); ?>load-scripts.php?c=1&load%5B%5D=common,admin-bar" type="text/javascript"></script>
|
107 |
-
<?php
|
108 |
-
die();
|
109 |
-
}
|
110 |
-
|
111 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
112 |
-
// Getters & Setters //
|
113 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
114 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
115 |
-
// Private Methods //
|
116 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
117 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
118 |
-
// Listeners //
|
119 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
120 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGViewAddTags {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $model;
|
14 |
+
|
15 |
+
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct($model) {
|
20 |
+
$this->model = $model;
|
21 |
+
}
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Public Methods //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function display() {
|
26 |
+
$rows_data = $this->model->get_rows_data();
|
27 |
+
$page_nav = $this->model->page_nav();
|
28 |
+
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
29 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
30 |
+
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'name');
|
31 |
+
$image_id = ((isset($_GET['image_id'])) ? esc_html($_GET['image_id']) : ((isset($_POST['image_id'])) ? esc_html($_POST['image_id']) : '0'));
|
32 |
+
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
33 |
+
$per_page = $this->model->per_page();
|
34 |
+
$pager = 0;
|
35 |
+
wp_print_scripts('jquery');
|
36 |
+
?>
|
37 |
+
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=admin-bar,wp-admin,dashicons,buttons,wp-auth-check" rel="stylesheet">
|
38 |
+
<?php if (get_bloginfo('version') < '3.9') { ?>
|
39 |
+
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
|
40 |
+
<?php } ?>
|
41 |
+
<link media="all" type="text/css" href="<?php echo WD_BWG_URL . '/css/bwg_tables.css?ver='.wd_bwg_version(); ?>" id="bwg_tables-css" rel="stylesheet">
|
42 |
+
<script src="<?php echo WD_BWG_URL . '/js/bwg.js?ver='.wd_bwg_version(); ?>" type="text/javascript"></script>
|
43 |
+
<form class="wrap wp-core-ui bwg_form" id="tags_form" method="post" action="<?php echo add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500', 'bwg_items_per_page'=>$per_page , 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" style="width:99%; margin: 0 auto;">
|
44 |
+
<?php wp_nonce_field( 'addTags', 'bwg_nonce' ); ?>
|
45 |
+
<h2 style="width:200px; float:left;"><?php _e("Tags", 'bwg_back'); ?></h2>
|
46 |
+
<a href="" class="thickbox thickbox-preview" id="content-add_media" title="Add Tag" onclick="bwg_get_tags('<?php echo $image_id; ?>', event);" style="float:right; padding: 9px 0px 4px 0">
|
47 |
+
<img src="<?php echo WD_BWG_URL . '/images/add_but.png'; ?>" style="border:none;" />
|
48 |
+
</a>
|
49 |
+
<div class="tablenav top">
|
50 |
+
<?php
|
51 |
+
WDWLibrary::search(__('Name', 'bwg_back'), $search_value, 'tags_form');
|
52 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
|
53 |
+
?>
|
54 |
+
</div>
|
55 |
+
<table class="wp-list-table widefat fixed pages">
|
56 |
+
<thead>
|
57 |
+
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;" /></th>
|
58 |
+
<th class="table_small_col <?php if ($order_by == 'term_id') {echo $order_class;} ?>">
|
59 |
+
<a onclick="spider_set_input_value('order_by', 'term_id');
|
60 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'term_id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
61 |
+
spider_form_submit(event, 'tags_form')" href="">
|
62 |
+
<span>ID</span><span class="sorting-indicator"></span></th>
|
63 |
+
</a>
|
64 |
+
<th class="<?php if ($order_by == 'name') {echo $order_class;} ?>">
|
65 |
+
<a onclick="spider_set_input_value('order_by', 'name');
|
66 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
67 |
+
spider_form_submit(event, 'tags_form')" href="">
|
68 |
+
<span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
69 |
+
</a>
|
70 |
+
</th>
|
71 |
+
<th class="<?php if ($order_by == 'slug') {echo $order_class;} ?>">
|
72 |
+
<a onclick="spider_set_input_value('order_by', 'slug');
|
73 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'slug') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
74 |
+
spider_form_submit(event, 'tags_form')" href="">
|
75 |
+
<span><?php _e("Slug", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
76 |
+
</a>
|
77 |
+
</th>
|
78 |
+
</thead>
|
79 |
+
<tbody id="tbody_arr">
|
80 |
+
<?php
|
81 |
+
if ($rows_data) {
|
82 |
+
foreach ($rows_data as $row_data) {
|
83 |
+
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
84 |
+
?>
|
85 |
+
<tr id="tr_<?php echo $row_data->term_id; ?>" <?php echo $alternate; ?>>
|
86 |
+
<td class="table_small_col check-column"><input id="check_<?php echo $row_data->term_id; ?>" name="check_<?php echo $row_data->term_id; ?>" type="checkbox" /></td>
|
87 |
+
<td class="table_small_col"><?php echo $row_data->term_id; ?></td>
|
88 |
+
<td><a onclick="window.parent.bwg_add_tag('<?php echo $image_id; ?>', ['<?php echo $row_data->term_id; ?>'],['<?php echo htmlspecialchars(addslashes($row_data->name))?>'])" id="a_<?php echo $row_data->term_id; ?>" style="cursor:pointer;"><?php echo $row_data->name; ?></a></td>
|
89 |
+
<td id="slug_<?php echo $row_data->term_id; ?>"><?php echo (($row_data->slug) ? $row_data->slug : ' '); ?></td>
|
90 |
+
</tr>
|
91 |
+
<?php
|
92 |
+
}
|
93 |
+
}
|
94 |
+
?>
|
95 |
+
</tbody>
|
96 |
+
</table>
|
97 |
+
<div class="tablenav bottom">
|
98 |
+
<?php
|
99 |
+
WDWLibrary::html_page_nav($page_nav['total'], $pager++, $page_nav['limit'], 'tags_form', $per_page);
|
100 |
+
?>
|
101 |
+
</div>
|
102 |
+
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
103 |
+
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
104 |
+
<input id="image_id" name="image_id" type="hidden" value="<?php echo $image_id; ?>" />
|
105 |
+
</form>
|
106 |
+
<script src="<?php echo get_admin_url(); ?>load-scripts.php?c=1&load%5B%5D=common,admin-bar" type="text/javascript"></script>
|
107 |
+
<?php
|
108 |
+
die();
|
109 |
+
}
|
110 |
+
|
111 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
112 |
+
// Getters & Setters //
|
113 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
114 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
115 |
+
// Private Methods //
|
116 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
117 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
118 |
+
// Listeners //
|
119 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
120 |
}
|
admin/views/BWGViewAlbums_bwg.php
CHANGED
@@ -1,412 +1,412 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGViewAlbums_bwg {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $model;
|
14 |
-
|
15 |
-
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
// Constructor & Destructor //
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
public function __construct($model) {
|
20 |
-
$this->model = $model;
|
21 |
-
}
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Public Methods //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
public function display() {
|
26 |
-
global $WD_BWG_UPLOAD_DIR;
|
27 |
-
$rows_data = $this->model->get_rows_data();
|
28 |
-
$page_nav = $this->model->page_nav();
|
29 |
-
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
30 |
-
$search_select_value = ((isset($_POST['search_select_value'])) ? (int) $_POST['search_select_value'] : 0);
|
31 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
32 |
-
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'order');
|
33 |
-
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
34 |
-
$ids_string = '';
|
35 |
-
$per_page = $this->model->per_page();
|
36 |
-
$pager = 0;
|
37 |
-
?>
|
38 |
-
<div style="clear: both; float: left; width: 99%;">
|
39 |
-
<div style="float:left; font-size: 14px; font-weight: bold;">
|
40 |
-
<?php _e("This section allows you to create, edit and delete albums.", 'bwg_back'); ?>
|
41 |
-
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-gallery/creating-editing-albums.html"><?php _e("Read More in User Manual", 'bwg_back'); ?></a>
|
42 |
-
</div>
|
43 |
-
<div style="float: right; text-align: right;">
|
44 |
-
<a style="text-decoration: none;" target="_blank" href="https://web-dorado.com/files/fromPhotoGallery.php">
|
45 |
-
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
|
46 |
-
</a>
|
47 |
-
</div>
|
48 |
-
</div>
|
49 |
-
<form class="wrap bwg_form" id="albums_form" method="post" action="admin.php?page=albums_bwg" style="float: left; width:99%;">
|
50 |
-
<?php wp_nonce_field( 'albums_bwg', 'bwg_nonce' ); ?>
|
51 |
-
<span class="album-icon"></span>
|
52 |
-
<h2>
|
53 |
-
<?php _e("Albums", 'bwg_back'); ?>
|
54 |
-
<a href="" class="add-new-h2" onclick="spider_set_input_value('task', 'add');
|
55 |
-
spider_form_submit(event, 'albums_form')"><?php _e("Add new", 'bwg_back'); ?></a>
|
56 |
-
</h2>
|
57 |
-
<div id="draganddrop" class="updated" style="display:none;"><strong><p><?php _e("Changes made in this table should be saved.", 'bwg_back'); ?></p></strong></div>
|
58 |
-
<div class="buttons_div">
|
59 |
-
<span class="button-secondary non_selectable" onclick="spider_check_all_items()">
|
60 |
-
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
|
61 |
-
<span style="vertical-align: middle;"><?php _e("Select All", 'bwg_back'); ?></span>
|
62 |
-
</span>
|
63 |
-
<input id="show_hide_weights" class="button-secondary" type="button" onclick="spider_show_hide_weights();return false;" value="<?php _e("Hide order column", 'bwg_back'); ?>" />
|
64 |
-
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'save_order')" value="<?php _e("Save Order", 'bwg_back'); ?>" />
|
65 |
-
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'publish_all')" value="<?php _e("Publish", 'bwg_back'); ?>" />
|
66 |
-
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'unpublish_all')" value="<?php _e("Unpublish", 'bwg_back'); ?>" />
|
67 |
-
<input class="button-secondary" type="submit" onclick="if (confirm('<?php echo addslashes(__("Do you want to delete selected items?", 'bwg_back')); ?>')) {
|
68 |
-
spider_set_input_value('task', 'delete_all');
|
69 |
-
} else {
|
70 |
-
return false;
|
71 |
-
}" value="<?php _e("Delete", 'bwg_back'); ?>" />
|
72 |
-
</div>
|
73 |
-
<div class="tablenav top">
|
74 |
-
<?php
|
75 |
-
WDWLibrary::search(__("Name", "bwg_back"), $search_value, 'albums_form');
|
76 |
-
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page);
|
77 |
-
?>
|
78 |
-
</div>
|
79 |
-
<table class="wp-list-table widefat fixed pages">
|
80 |
-
<thead>
|
81 |
-
<th class="table_small_col"></th>
|
82 |
-
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" onclick="spider_check_all(this)" type="checkbox" style="margin:0;" /></th>
|
83 |
-
<th class="table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
|
84 |
-
<a onclick="spider_set_input_value('task', '');
|
85 |
-
spider_set_input_value('order_by', 'id');
|
86 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
87 |
-
spider_form_submit(event, 'albums_form')" href="">
|
88 |
-
<span>ID</span><span class="sorting-indicator"></span>
|
89 |
-
</a>
|
90 |
-
</th>
|
91 |
-
<th class="<?php if ($order_by == 'name') {echo $order_class;} ?>">
|
92 |
-
<a onclick="spider_set_input_value('task', '');
|
93 |
-
spider_set_input_value('order_by', 'name');
|
94 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
95 |
-
spider_form_submit(event, 'albums_form')" href="">
|
96 |
-
<span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
97 |
-
</a>
|
98 |
-
</th>
|
99 |
-
<th class="<?php if ($order_by == 'slug') {echo $order_class;} ?>">
|
100 |
-
<a onclick="spider_set_input_value('task', '');
|
101 |
-
spider_set_input_value('order_by', 'slug');
|
102 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'slug') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
103 |
-
spider_form_submit(event, 'albums_form')" href="">
|
104 |
-
<span><?php _e("Slug", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
105 |
-
</a>
|
106 |
-
</th>
|
107 |
-
<th class="table_extra_large_col"><?php _e("Thumbnail", 'bwg_back'); ?></th>
|
108 |
-
<th id="th_order" class="table_medium_col <?php if ($order_by == 'order') {echo $order_class;} ?>">
|
109 |
-
<a onclick="spider_set_input_value('task', '');
|
110 |
-
spider_set_input_value('order_by', 'order');
|
111 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'order') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
112 |
-
spider_form_submit(event, 'albums_form')" href="">
|
113 |
-
<span><?php _e("Order", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
114 |
-
</a>
|
115 |
-
</th>
|
116 |
-
<th class="<?php if ($order_by == 'display_name') {echo $order_class;} ?>">
|
117 |
-
<a onclick="spider_set_input_value('task', '');
|
118 |
-
spider_set_input_value('order_by', 'display_name');
|
119 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'display_name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
120 |
-
spider_form_submit(event, 'albums_form')" href="">
|
121 |
-
<span><?php _e("Author", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
122 |
-
</a>
|
123 |
-
</th>
|
124 |
-
<th class="table_big_col <?php if ($order_by == 'published') {echo $order_class;} ?>">
|
125 |
-
<a onclick="spider_set_input_value('task', '');
|
126 |
-
spider_set_input_value('order_by', 'published');
|
127 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'published') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
128 |
-
spider_form_submit(event, 'albums_form')" href="">
|
129 |
-
<span><?php _e("Published", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
130 |
-
</a>
|
131 |
-
</th>
|
132 |
-
<th class="table_big_col"><?php _e("Edit", 'bwg_back'); ?></th>
|
133 |
-
<th class="table_big_col"><?php _e("Delete", 'bwg_back'); ?></th>
|
134 |
-
</thead>
|
135 |
-
<tbody id="tbody_arr">
|
136 |
-
<?php
|
137 |
-
if ($rows_data) {
|
138 |
-
foreach ($rows_data as $row_data) {
|
139 |
-
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
140 |
-
$published_image = (($row_data->published) ? 'publish' : 'unpublish');
|
141 |
-
$published = (($row_data->published) ? 'unpublish' : 'publish');
|
142 |
-
if ($row_data->preview_image == '') {
|
143 |
-
$preview_image = WD_BWG_URL . '/images/no-image.png';
|
144 |
-
}
|
145 |
-
else {
|
146 |
-
$preview_image = site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row_data->preview_image;
|
147 |
-
}
|
148 |
-
?>
|
149 |
-
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
150 |
-
<td class="connectedSortable table_small_col"><div class="handle" style="margin:5px auto 0 auto;" title="Drag to re-order"></div></td>
|
151 |
-
<td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" onclick="spider_check_all(this)" type="checkbox" /></td>
|
152 |
-
<td class="table_small_col"><?php echo $row_data->id; ?></td>
|
153 |
-
<td><a onclick="spider_set_input_value('task', 'edit');
|
154 |
-
spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
|
155 |
-
spider_form_submit(event, 'albums_form')" href="" title="<?php _e("Edit", 'bwg_back'); ?>"><?php echo $row_data->name; ?></a></td>
|
156 |
-
<td><?php echo $row_data->slug; ?></td>
|
157 |
-
<td class="table_extra_large_col">
|
158 |
-
<img title="<?php echo $row_data->name; ?>" style="border: 1px solid #CCCCCC; max-width:60px; max-height:60px;" src="<?php echo $preview_image; ?>">
|
159 |
-
</td>
|
160 |
-
<td class="spider_order table_medium_col"><input id="order_input_<?php echo $row_data->id; ?>" name="order_input_<?php echo $row_data->id; ?>" type="text" size="1" value="<?php echo $row_data->order; ?>" /></td>
|
161 |
-
<td><?php echo get_userdata($row_data->author)->display_name; ?></td>
|
162 |
-
<td class="table_big_col"><a onclick="spider_set_input_value('task', '<?php echo $published; ?>');spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');spider_form_submit(event, 'albums_form')" href=""><img src="<?php echo WD_BWG_URL . '/images/' . $published_image . '.png'; ?>"></img></a></td>
|
163 |
-
<td class="table_big_col"><a onclick="spider_set_input_value('task', 'edit');
|
164 |
-
spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
|
165 |
-
spider_form_submit(event, 'albums_form')" href=""><?php _e("Edit", 'bwg_back'); ?></a></td>
|
166 |
-
<td class="table_big_col"><a onclick="spider_set_input_value('task', 'delete');
|
167 |
-
spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
|
168 |
-
spider_form_submit(event, 'albums_form')" href=""><?php _e("Delete", 'bwg_back'); ?></a></td>
|
169 |
-
</tr>
|
170 |
-
<?php
|
171 |
-
$ids_string .= $row_data->id . ',';
|
172 |
-
}
|
173 |
-
}
|
174 |
-
?>
|
175 |
-
</tbody>
|
176 |
-
</table>
|
177 |
-
<div class="tablenav bottom">
|
178 |
-
<?php
|
179 |
-
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page);
|
180 |
-
?>
|
181 |
-
</div>
|
182 |
-
<input id="task" name="task" type="hidden" value="" />
|
183 |
-
<input id="current_id" name="current_id" type="hidden" value="" />
|
184 |
-
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
185 |
-
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
186 |
-
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
187 |
-
<script>
|
188 |
-
window.onload = spider_show_hide_weights;
|
189 |
-
</script>
|
190 |
-
</form>
|
191 |
-
<?php
|
192 |
-
}
|
193 |
-
|
194 |
-
public function edit($id) {
|
195 |
-
global $WD_BWG_UPLOAD_DIR;
|
196 |
-
$row = $this->model->get_row_data($id);
|
197 |
-
$page_title = (($id != 0) ? __('Edit album ',"bwg_back") . $row->name : __('Create new album',"bwg_back"));
|
198 |
-
$per_page = $this->model->per_page();
|
199 |
-
?>
|
200 |
-
<div style="clear: both; float: left; width: 99%;">
|
201 |
-
<div style="float:left; font-size: 14px; font-weight: bold;">
|
202 |
-
<?php _e("This section allows you to add/edit album.", 'bwg_back'); ?>
|
203 |
-
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-gallery/creating-editing-albums.html"><?php _e("Read More in User Manual", 'bwg_back'); ?></a>
|
204 |
-
</div>
|
205 |
-
<div style="float: right; text-align: right;">
|
206 |
-
<a style="text-decoration: none;" target="_blank" href="https://web-dorado.com/files/fromPhotoGallery.php">
|
207 |
-
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
|
208 |
-
</a>
|
209 |
-
</div>
|
210 |
-
</div>
|
211 |
-
<script>
|
212 |
-
function bwg_add_preview_image(files) {
|
213 |
-
document.getElementById("preview_image").value = files[0]['thumb_url'];
|
214 |
-
document.getElementById("button_preview_image").style.display = "none";
|
215 |
-
document.getElementById("delete_preview_image").style.display = "inline-block";
|
216 |
-
if (document.getElementById("img_preview_image")) {
|
217 |
-
document.getElementById("img_preview_image").src = files[0]['reliative_url'];
|
218 |
-
document.getElementById("img_preview_image").style.display = "inline-block";
|
219 |
-
}
|
220 |
-
}
|
221 |
-
|
222 |
-
function bwg_add_items(trackIds, titles, types) {
|
223 |
-
jQuery(document).trigger("onAddAlbum");
|
224 |
-
var tbody = document.getElementById('tbody_albums_galleries');
|
225 |
-
var counter = 0;
|
226 |
-
for(i = 0; i < trackIds.length; i++) {
|
227 |
-
tr = document.createElement('tr');
|
228 |
-
tr.setAttribute('id', "tr_0:" + types[i] + ":" + trackIds[i]);
|
229 |
-
tr.setAttribute('style', 'height:35px');
|
230 |
-
|
231 |
-
var td_drag = document.createElement('td');
|
232 |
-
td_drag.setAttribute('class','connectedSortable table_small_col');
|
233 |
-
td_drag.setAttribute('title','Drag to re-order');
|
234 |
-
|
235 |
-
var div_drag = document.createElement('div');
|
236 |
-
div_drag.setAttribute('class', 'handle');
|
237 |
-
|
238 |
-
td_drag.appendChild(div_drag);
|
239 |
-
tr.appendChild(td_drag);
|
240 |
-
|
241 |
-
var td_title = document.createElement('td');
|
242 |
-
td_title.setAttribute('style', 'max-width:420px;min-width:400px;');
|
243 |
-
td_title.innerHTML = (types[i] == '1' ? 'Album: ' : 'Gallery: ') + titles[i];
|
244 |
-
|
245 |
-
tr.appendChild(td_title);
|
246 |
-
|
247 |
-
var td_delete = document.createElement('td');
|
248 |
-
td_delete.setAttribute('class', 'table_small_col');
|
249 |
-
|
250 |
-
var span_del = document.createElement('span');
|
251 |
-
span_del.setAttribute('class', 'spider_delete_img');
|
252 |
-
span_del.setAttribute('onclick', 'spider_remove_row("tbody_albums_galleries", event, this);');
|
253 |
-
|
254 |
-
td_delete.appendChild(span_del);
|
255 |
-
tr.appendChild(td_delete);
|
256 |
-
|
257 |
-
tbody.appendChild(tr);
|
258 |
-
counter++;
|
259 |
-
}
|
260 |
-
if (counter) {
|
261 |
-
document.getElementById("table_albums_galleries").style.display = "block";
|
262 |
-
}
|
263 |
-
spider_sortt('tbody_albums_galleries');
|
264 |
-
tb_remove();
|
265 |
-
}
|
266 |
-
</script>
|
267 |
-
<form class="wrap bwg_form" method="post" action="admin.php?page=albums_bwg" style="float: left; width:99%;">
|
268 |
-
<?php wp_nonce_field( 'albums_bwg', 'bwg_nonce' ); ?>
|
269 |
-
<span class="album-icon"></span>
|
270 |
-
<h2><?php echo $page_title; ?></h2>
|
271 |
-
<div style="float:right;">
|
272 |
-
<input class="button-secondary" id='save_albums' type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'save')" value="<?php _e("Save", 'bwg_back'); ?>" />
|
273 |
-
<input class="button-secondary" type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'apply')" value="<?php _e("Apply", 'bwg_back'); ?>" />
|
274 |
-
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="<?php _e("Cancel", 'bwg_back'); ?>" />
|
275 |
-
</div>
|
276 |
-
<table style="clear:both;">
|
277 |
-
<tbody>
|
278 |
-
<tr>
|
279 |
-
<td class="spider_label"><label for="name"><?php _e("Name:", 'bwg_back'); ?> <span style="color:#FF0000;">*</span> </label></td>
|
280 |
-
<td><input type="text" id="name" name="name" value="<?php echo $row->name; ?>" size="39" /></td>
|
281 |
-
</tr>
|
282 |
-
<tr>
|
283 |
-
<td class="spider_label"><label for="slug"><?php _e("Slug:", 'bwg_back'); ?> </label></td>
|
284 |
-
<td><input type="text" id="slug" name="slug" value="<?php echo $row->slug; ?>" size="39" /></td>
|
285 |
-
</tr>
|
286 |
-
<tr>
|
287 |
-
<td class="spider_label"><label for="description"><?php _e("Description:", 'bwg_back'); ?> </label></td>
|
288 |
-
<td>
|
289 |
-
<div style="width:500px;">
|
290 |
-
<?php
|
291 |
-
if (user_can_richedit()) {
|
292 |
-
wp_editor($row->description, 'description', array('teeny' => FALSE, 'textarea_name' => 'description', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
293 |
-
}
|
294 |
-
else {
|
295 |
-
?>
|
296 |
-
<textarea cols="36" rows="5" id="description" name="description" style="resize:vertical">
|
297 |
-
<?php echo $row->description; ?>
|
298 |
-
</textarea>
|
299 |
-
<?php
|
300 |
-
}
|
301 |
-
?>
|
302 |
-
</div>
|
303 |
-
</td>
|
304 |
-
</tr>
|
305 |
-
<tr>
|
306 |
-
<td class="spider_label"><label><?php _e("Author:", 'bwg_back'); ?> </label></td>
|
307 |
-
<td><?php echo get_userdata($row->author)->display_name; ?></td>
|
308 |
-
</tr>
|
309 |
-
<tr>
|
310 |
-
<td class="spider_label"><label for="published1"><?php _e("Published:", 'bwg_back'); ?> </label></td>
|
311 |
-
<td>
|
312 |
-
<input type="radio" class="inputbox" id="published0" name="published" <?php echo (($row->published) ? '' : 'checked="checked"'); ?> value="0" >
|
313 |
-
<label for="published0"><?php _e("No", 'bwg_back'); ?></label>
|
314 |
-
<input type="radio" class="inputbox" id="published1" name="published" <?php echo (($row->published) ? 'checked="checked"' : ''); ?> value="1" >
|
315 |
-
<label for="published1"><?php _e("Yes", 'bwg_back'); ?></label>
|
316 |
-
</td>
|
317 |
-
</tr>
|
318 |
-
<tr>
|
319 |
-
<td class="spider_label"><label for="url"><?php _e("Preview image:", 'bwg_back'); ?> </label></td>
|
320 |
-
<td>
|
321 |
-
<?php
|
322 |
-
$query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_preview_image'), admin_url('admin-ajax.php'));
|
323 |
-
$query_url = wp_nonce_url( $query_url, 'addImages', 'bwg_nonce' );
|
324 |
-
$query_url = add_query_arg(array('TB_iframe' => '1'), $query_url );
|
325 |
-
|
326 |
-
|
327 |
-
?>
|
328 |
-
<a href="<?php echo $query_url; ?>"
|
329 |
-
id="button_preview_image"
|
330 |
-
class="button-primary thickbox thickbox-preview"
|
331 |
-
title="Add Preview Image"
|
332 |
-
onclick="return false;"
|
333 |
-
style="margin-bottom:5px; display:none;">
|
334 |
-
<?php _e("Add Preview Image", 'bwg_back'); ?>
|
335 |
-
</a>
|
336 |
-
<input type="hidden" id="preview_image" name="preview_image" value="<?php echo $row->preview_image; ?>" style="display:inline-block;"/>
|
337 |
-
<img id="img_preview_image"
|
338 |
-
style="max-height:90px; max-width:120px; vertical-align:middle;"
|
339 |
-
src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row->preview_image; ?>">
|
340 |
-
<span id="delete_preview_image" class="spider_delete_img"
|
341 |
-
onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')"></span>
|
342 |
-
</td>
|
343 |
-
</tr>
|
344 |
-
<tr>
|
345 |
-
<td class="spider_label"><label for="content-add_media"><?php _e("Albums And Galleries:", 'bwg_back'); ?> </label></td>
|
346 |
-
<td>
|
347 |
-
<?php
|
348 |
-
$query_url = add_query_arg(array('action' => 'addAlbumsGalleries', 'album_id' => $id, 'width' => '700', 'height' => '550', 'bwg_items_per_page'=>$per_page ), admin_url('admin-ajax.php'));
|
349 |
-
$query_url = wp_nonce_url( $query_url, 'addAlbumsGalleries', 'bwg_nonce' );
|
350 |
-
$query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
|
351 |
-
|
352 |
-
|
353 |
-
?>
|
354 |
-
<a href="<?php echo $query_url; ?>" class="button-primary thickbox thickbox-preview" id="content-add_media" title="Add Images" onclick="return false;" style="margin-bottom:5px;">
|
355 |
-
<?php _e("Add Albums/Galleries", 'bwg_back'); ?>
|
356 |
-
</a>
|
357 |
-
<?php $albums_galleries = $this->model->get_albums_galleries_rows_data($id) ?>
|
358 |
-
<table id="table_albums_galleries" class="widefat spider_table" <?php echo (($albums_galleries) ? '' : 'style="display:none;"'); ?>>
|
359 |
-
<tbody id="tbody_albums_galleries">
|
360 |
-
<?php
|
361 |
-
if ($albums_galleries) {
|
362 |
-
$hidden = "";
|
363 |
-
foreach($albums_galleries as $alb_gal) {
|
364 |
-
if ($alb_gal) {
|
365 |
-
?>
|
366 |
-
<tr id="tr_<?php echo $alb_gal->id . ":" . $alb_gal->is_album . ":" . $alb_gal->alb_gal_id ?>" style="height:35px;">
|
367 |
-
<td class="connectedSortable table_small_col" title="<?php _e("Drag to re-order", 'bwg_back'); ?>"><div class="handle"></div></td>
|
368 |
-
<td style="max-width:420px; min-width:400px;"><?php echo ($alb_gal->is_album ? 'Album: ' : 'Gallery: ') . $alb_gal->name; ?></td>
|
369 |
-
<td class="table_small_col">
|
370 |
-
<span class="spider_delete_img" onclick="spider_remove_row('tbody_albums_galleries', event, this)"/>
|
371 |
-
</td>
|
372 |
-
</tr>
|
373 |
-
<?php
|
374 |
-
$hidden .= $alb_gal->id . ":" . $alb_gal->is_album . ":" . $alb_gal->alb_gal_id . ",";
|
375 |
-
}
|
376 |
-
}
|
377 |
-
}
|
378 |
-
?>
|
379 |
-
</tbody>
|
380 |
-
</table>
|
381 |
-
<input type="hidden" value="<?php echo isset($hidden) ? $hidden : ''; ?>" id="albums_galleries" name="albums_galleries"/>
|
382 |
-
</td>
|
383 |
-
</tr>
|
384 |
-
</tbody>
|
385 |
-
</table>
|
386 |
-
<input id="task" name="task" type="hidden" value="" />
|
387 |
-
<input id="current_id" name="current_id" type="hidden" value="<?php echo $row->id; ?>" />
|
388 |
-
<script>
|
389 |
-
jQuery(window).load(function() {
|
390 |
-
spider_reorder_items('tbody_albums_galleries');
|
391 |
-
});
|
392 |
-
<?php
|
393 |
-
if ($row->preview_image == '') {
|
394 |
-
?>
|
395 |
-
spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image');
|
396 |
-
<?php
|
397 |
-
}
|
398 |
-
?>
|
399 |
-
</script>
|
400 |
-
</form>
|
401 |
-
<?php
|
402 |
-
}
|
403 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
404 |
-
// Getters & Setters //
|
405 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
406 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
407 |
-
// Private Methods //
|
408 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
409 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
410 |
-
// Listeners //
|
411 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
412 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGViewAlbums_bwg {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $model;
|
14 |
+
|
15 |
+
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct($model) {
|
20 |
+
$this->model = $model;
|
21 |
+
}
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Public Methods //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function display() {
|
26 |
+
global $WD_BWG_UPLOAD_DIR;
|
27 |
+
$rows_data = $this->model->get_rows_data();
|
28 |
+
$page_nav = $this->model->page_nav();
|
29 |
+
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
30 |
+
$search_select_value = ((isset($_POST['search_select_value'])) ? (int) $_POST['search_select_value'] : 0);
|
31 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc');
|
32 |
+
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'order');
|
33 |
+
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
34 |
+
$ids_string = '';
|
35 |
+
$per_page = $this->model->per_page();
|
36 |
+
$pager = 0;
|
37 |
+
?>
|
38 |
+
<div style="clear: both; float: left; width: 99%;">
|
39 |
+
<div style="float:left; font-size: 14px; font-weight: bold;">
|
40 |
+
<?php _e("This section allows you to create, edit and delete albums.", 'bwg_back'); ?>
|
41 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-gallery/creating-editing-albums.html"><?php _e("Read More in User Manual", 'bwg_back'); ?></a>
|
42 |
+
</div>
|
43 |
+
<div style="float: right; text-align: right;">
|
44 |
+
<a style="text-decoration: none;" target="_blank" href="https://web-dorado.com/files/fromPhotoGallery.php">
|
45 |
+
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
|
46 |
+
</a>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<form class="wrap bwg_form" id="albums_form" method="post" action="admin.php?page=albums_bwg" style="float: left; width:99%;">
|
50 |
+
<?php wp_nonce_field( 'albums_bwg', 'bwg_nonce' ); ?>
|
51 |
+
<span class="album-icon"></span>
|
52 |
+
<h2>
|
53 |
+
<?php _e("Albums", 'bwg_back'); ?>
|
54 |
+
<a href="" class="add-new-h2" onclick="spider_set_input_value('task', 'add');
|
55 |
+
spider_form_submit(event, 'albums_form')"><?php _e("Add new", 'bwg_back'); ?></a>
|
56 |
+
</h2>
|
57 |
+
<div id="draganddrop" class="updated" style="display:none;"><strong><p><?php _e("Changes made in this table should be saved.", 'bwg_back'); ?></p></strong></div>
|
58 |
+
<div class="buttons_div">
|
59 |
+
<span class="button-secondary non_selectable" onclick="spider_check_all_items()">
|
60 |
+
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
|
61 |
+
<span style="vertical-align: middle;"><?php _e("Select All", 'bwg_back'); ?></span>
|
62 |
+
</span>
|
63 |
+
<input id="show_hide_weights" class="button-secondary" type="button" onclick="spider_show_hide_weights();return false;" value="<?php _e("Hide order column", 'bwg_back'); ?>" />
|
64 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'save_order')" value="<?php _e("Save Order", 'bwg_back'); ?>" />
|
65 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'publish_all')" value="<?php _e("Publish", 'bwg_back'); ?>" />
|
66 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'unpublish_all')" value="<?php _e("Unpublish", 'bwg_back'); ?>" />
|
67 |
+
<input class="button-secondary" type="submit" onclick="if (confirm('<?php echo addslashes(__("Do you want to delete selected items?", 'bwg_back')); ?>')) {
|
68 |
+
spider_set_input_value('task', 'delete_all');
|
69 |
+
} else {
|
70 |
+
return false;
|
71 |
+
}" value="<?php _e("Delete", 'bwg_back'); ?>" />
|
72 |
+
</div>
|
73 |
+
<div class="tablenav top">
|
74 |
+
<?php
|
75 |
+
WDWLibrary::search(__("Name", "bwg_back"), $search_value, 'albums_form');
|
76 |
+
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page);
|
77 |
+
?>
|
78 |
+
</div>
|
79 |
+
<table class="wp-list-table widefat fixed pages">
|
80 |
+
<thead>
|
81 |
+
<th class="table_small_col"></th>
|
82 |
+
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" onclick="spider_check_all(this)" type="checkbox" style="margin:0;" /></th>
|
83 |
+
<th class="table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
|
84 |
+
<a onclick="spider_set_input_value('task', '');
|
85 |
+
spider_set_input_value('order_by', 'id');
|
86 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
87 |
+
spider_form_submit(event, 'albums_form')" href="">
|
88 |
+
<span>ID</span><span class="sorting-indicator"></span>
|
89 |
+
</a>
|
90 |
+
</th>
|
91 |
+
<th class="<?php if ($order_by == 'name') {echo $order_class;} ?>">
|
92 |
+
<a onclick="spider_set_input_value('task', '');
|
93 |
+
spider_set_input_value('order_by', 'name');
|
94 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
95 |
+
spider_form_submit(event, 'albums_form')" href="">
|
96 |
+
<span><?php _e("Name", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
97 |
+
</a>
|
98 |
+
</th>
|
99 |
+
<th class="<?php if ($order_by == 'slug') {echo $order_class;} ?>">
|
100 |
+
<a onclick="spider_set_input_value('task', '');
|
101 |
+
spider_set_input_value('order_by', 'slug');
|
102 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'slug') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
103 |
+
spider_form_submit(event, 'albums_form')" href="">
|
104 |
+
<span><?php _e("Slug", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
105 |
+
</a>
|
106 |
+
</th>
|
107 |
+
<th class="table_extra_large_col"><?php _e("Thumbnail", 'bwg_back'); ?></th>
|
108 |
+
<th id="th_order" class="table_medium_col <?php if ($order_by == 'order') {echo $order_class;} ?>">
|
109 |
+
<a onclick="spider_set_input_value('task', '');
|
110 |
+
spider_set_input_value('order_by', 'order');
|
111 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'order') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
112 |
+
spider_form_submit(event, 'albums_form')" href="">
|
113 |
+
<span><?php _e("Order", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
114 |
+
</a>
|
115 |
+
</th>
|
116 |
+
<th class="<?php if ($order_by == 'display_name') {echo $order_class;} ?>">
|
117 |
+
<a onclick="spider_set_input_value('task', '');
|
118 |
+
spider_set_input_value('order_by', 'display_name');
|
119 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'display_name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
120 |
+
spider_form_submit(event, 'albums_form')" href="">
|
121 |
+
<span><?php _e("Author", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
122 |
+
</a>
|
123 |
+
</th>
|
124 |
+
<th class="table_big_col <?php if ($order_by == 'published') {echo $order_class;} ?>">
|
125 |
+
<a onclick="spider_set_input_value('task', '');
|
126 |
+
spider_set_input_value('order_by', 'published');
|
127 |
+
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'published') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
128 |
+
spider_form_submit(event, 'albums_form')" href="">
|
129 |
+
<span><?php _e("Published", 'bwg_back'); ?></span><span class="sorting-indicator"></span>
|
130 |
+
</a>
|
131 |
+
</th>
|
132 |
+
<th class="table_big_col"><?php _e("Edit", 'bwg_back'); ?></th>
|
133 |
+
<th class="table_big_col"><?php _e("Delete", 'bwg_back'); ?></th>
|
134 |
+
</thead>
|
135 |
+
<tbody id="tbody_arr">
|
136 |
+
<?php
|
137 |
+
if ($rows_data) {
|
138 |
+
foreach ($rows_data as $row_data) {
|
139 |
+
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
140 |
+
$published_image = (($row_data->published) ? 'publish' : 'unpublish');
|
141 |
+
$published = (($row_data->published) ? 'unpublish' : 'publish');
|
142 |
+
if ($row_data->preview_image == '') {
|
143 |
+
$preview_image = WD_BWG_URL . '/images/no-image.png';
|
144 |
+
}
|
145 |
+
else {
|
146 |
+
$preview_image = site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row_data->preview_image;
|
147 |
+
}
|
148 |
+
?>
|
149 |
+
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
150 |
+
<td class="connectedSortable table_small_col"><div class="handle" style="margin:5px auto 0 auto;" title="Drag to re-order"></div></td>
|
151 |
+
<td class="table_small_col check-column"><input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" onclick="spider_check_all(this)" type="checkbox" /></td>
|
152 |
+
<td class="table_small_col"><?php echo $row_data->id; ?></td>
|
153 |
+
<td><a onclick="spider_set_input_value('task', 'edit');
|
154 |
+
spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
|
155 |
+
spider_form_submit(event, 'albums_form')" href="" title="<?php _e("Edit", 'bwg_back'); ?>"><?php echo $row_data->name; ?></a></td>
|
156 |
+
<td><?php echo $row_data->slug; ?></td>
|
157 |
+
<td class="table_extra_large_col">
|
158 |
+
<img title="<?php echo $row_data->name; ?>" style="border: 1px solid #CCCCCC; max-width:60px; max-height:60px;" src="<?php echo $preview_image; ?>">
|
159 |
+
</td>
|
160 |
+
<td class="spider_order table_medium_col"><input id="order_input_<?php echo $row_data->id; ?>" name="order_input_<?php echo $row_data->id; ?>" type="text" size="1" value="<?php echo $row_data->order; ?>" /></td>
|
161 |
+
<td><?php echo get_userdata($row_data->author)->display_name; ?></td>
|
162 |
+
<td class="table_big_col"><a onclick="spider_set_input_value('task', '<?php echo $published; ?>');spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');spider_form_submit(event, 'albums_form')" href=""><img src="<?php echo WD_BWG_URL . '/images/' . $published_image . '.png'; ?>"></img></a></td>
|
163 |
+
<td class="table_big_col"><a onclick="spider_set_input_value('task', 'edit');
|
164 |
+
spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
|
165 |
+
spider_form_submit(event, 'albums_form')" href=""><?php _e("Edit", 'bwg_back'); ?></a></td>
|
166 |
+
<td class="table_big_col"><a onclick="spider_set_input_value('task', 'delete');
|
167 |
+
spider_set_input_value('current_id', '<?php echo $row_data->id; ?>');
|
168 |
+
spider_form_submit(event, 'albums_form')" href=""><?php _e("Delete", 'bwg_back'); ?></a></td>
|
169 |
+
</tr>
|
170 |
+
<?php
|
171 |
+
$ids_string .= $row_data->id . ',';
|
172 |
+
}
|
173 |
+
}
|
174 |
+
?>
|
175 |
+
</tbody>
|
176 |
+
</table>
|
177 |
+
<div class="tablenav bottom">
|
178 |
+
<?php
|
179 |
+
WDWLibrary::html_page_nav($page_nav['total'],$pager++, $page_nav['limit'], 'albums_form', $per_page);
|
180 |
+
?>
|
181 |
+
</div>
|
182 |
+
<input id="task" name="task" type="hidden" value="" />
|
183 |
+
<input id="current_id" name="current_id" type="hidden" value="" />
|
184 |
+
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
185 |
+
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc" />
|
186 |
+
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
187 |
+
<script>
|
188 |
+
window.onload = spider_show_hide_weights;
|
189 |
+
</script>
|
190 |
+
</form>
|
191 |
+
<?php
|
192 |
+
}
|
193 |
+
|
194 |
+
public function edit($id) {
|
195 |
+
global $WD_BWG_UPLOAD_DIR;
|
196 |
+
$row = $this->model->get_row_data($id);
|
197 |
+
$page_title = (($id != 0) ? __('Edit album ',"bwg_back") . $row->name : __('Create new album',"bwg_back"));
|
198 |
+
$per_page = $this->model->per_page();
|
199 |
+
?>
|
200 |
+
<div style="clear: both; float: left; width: 99%;">
|
201 |
+
<div style="float:left; font-size: 14px; font-weight: bold;">
|
202 |
+
<?php _e("This section allows you to add/edit album.", 'bwg_back'); ?>
|
203 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-gallery/creating-editing-albums.html"><?php _e("Read More in User Manual", 'bwg_back'); ?></a>
|
204 |
+
</div>
|
205 |
+
<div style="float: right; text-align: right;">
|
206 |
+
<a style="text-decoration: none;" target="_blank" href="https://web-dorado.com/files/fromPhotoGallery.php">
|
207 |
+
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_BWG_URL . '/images/logo.png'; ?>" />
|
208 |
+
</a>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
<script>
|
212 |
+
function bwg_add_preview_image(files) {
|
213 |
+
document.getElementById("preview_image").value = files[0]['thumb_url'];
|
214 |
+
document.getElementById("button_preview_image").style.display = "none";
|
215 |
+
document.getElementById("delete_preview_image").style.display = "inline-block";
|
216 |
+
if (document.getElementById("img_preview_image")) {
|
217 |
+
document.getElementById("img_preview_image").src = files[0]['reliative_url'];
|
218 |
+
document.getElementById("img_preview_image").style.display = "inline-block";
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
function bwg_add_items(trackIds, titles, types) {
|
223 |
+
jQuery(document).trigger("onAddAlbum");
|
224 |
+
var tbody = document.getElementById('tbody_albums_galleries');
|
225 |
+
var counter = 0;
|
226 |
+
for(i = 0; i < trackIds.length; i++) {
|
227 |
+
tr = document.createElement('tr');
|
228 |
+
tr.setAttribute('id', "tr_0:" + types[i] + ":" + trackIds[i]);
|
229 |
+
tr.setAttribute('style', 'height:35px');
|
230 |
+
|
231 |
+
var td_drag = document.createElement('td');
|
232 |
+
td_drag.setAttribute('class','connectedSortable table_small_col');
|
233 |
+
td_drag.setAttribute('title','Drag to re-order');
|
234 |
+
|
235 |
+
var div_drag = document.createElement('div');
|
236 |
+
div_drag.setAttribute('class', 'handle');
|
237 |
+
|
238 |
+
td_drag.appendChild(div_drag);
|
239 |
+
tr.appendChild(td_drag);
|
240 |
+
|
241 |
+
var td_title = document.createElement('td');
|
242 |
+
td_title.setAttribute('style', 'max-width:420px;min-width:400px;');
|
243 |
+
td_title.innerHTML = (types[i] == '1' ? 'Album: ' : 'Gallery: ') + titles[i];
|
244 |
+
|
245 |
+
tr.appendChild(td_title);
|
246 |
+
|
247 |
+
var td_delete = document.createElement('td');
|
248 |
+
td_delete.setAttribute('class', 'table_small_col');
|
249 |
+
|
250 |
+
var span_del = document.createElement('span');
|
251 |
+
span_del.setAttribute('class', 'spider_delete_img');
|
252 |
+
span_del.setAttribute('onclick', 'spider_remove_row("tbody_albums_galleries", event, this);');
|
253 |
+
|
254 |
+
td_delete.appendChild(span_del);
|
255 |
+
tr.appendChild(td_delete);
|
256 |
+
|
257 |
+
tbody.appendChild(tr);
|
258 |
+
counter++;
|
259 |
+
}
|
260 |
+
if (counter) {
|
261 |
+
document.getElementById("table_albums_galleries").style.display = "block";
|
262 |
+
}
|
263 |
+
spider_sortt('tbody_albums_galleries');
|
264 |
+
tb_remove();
|
265 |
+
}
|
266 |
+
</script>
|
267 |
+
<form class="wrap bwg_form" method="post" action="admin.php?page=albums_bwg" style="float: left; width:99%;">
|
268 |
+
<?php wp_nonce_field( 'albums_bwg', 'bwg_nonce' ); ?>
|
269 |
+
<span class="album-icon"></span>
|
270 |
+
<h2><?php echo $page_title; ?></h2>
|
271 |
+
<div style="float:right;">
|
272 |
+
<input class="button-secondary" id='save_albums' type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'save')" value="<?php _e("Save", 'bwg_back'); ?>" />
|
273 |
+
<input class="button-secondary" type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'apply')" value="<?php _e("Apply", 'bwg_back'); ?>" />
|
274 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="<?php _e("Cancel", 'bwg_back'); ?>" />
|
275 |
+
</div>
|
276 |
+
<table style="clear:both;">
|
277 |
+
<tbody>
|
278 |
+
<tr>
|
279 |
+
<td class="spider_label"><label for="name"><?php _e("Name:", 'bwg_back'); ?> <span style="color:#FF0000;">*</span> </label></td>
|
280 |
+
<td><input type="text" id="name" name="name" value="<?php echo $row->name; ?>" size="39" /></td>
|
281 |
+
</tr>
|
282 |
+
<tr>
|
283 |
+
<td class="spider_label"><label for="slug"><?php _e("Slug:", 'bwg_back'); ?> </label></td>
|
284 |
+
<td><input type="text" id="slug" name="slug" value="<?php echo $row->slug; ?>" size="39" /></td>
|
285 |
+
</tr>
|
286 |
+
<tr>
|
287 |
+
<td class="spider_label"><label for="description"><?php _e("Description:", 'bwg_back'); ?> </label></td>
|
288 |
+
<td>
|
289 |
+
<div style="width:500px;">
|
290 |
+
<?php
|
291 |
+
if (user_can_richedit()) {
|
292 |
+
wp_editor($row->description, 'description', array('teeny' => FALSE, 'textarea_name' => 'description', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
293 |
+
}
|
294 |
+
else {
|
295 |
+
?>
|
296 |
+
<textarea cols="36" rows="5" id="description" name="description" style="resize:vertical">
|
297 |
+
<?php echo $row->description; ?>
|
298 |
+
</textarea>
|
299 |
+
<?php
|
300 |
+
}
|
301 |
+
?>
|
302 |
+
</div>
|
303 |
+
</td>
|
304 |
+
</tr>
|
305 |
+
<tr>
|
306 |
+
<td class="spider_label"><label><?php _e("Author:", 'bwg_back'); ?> </label></td>
|
307 |
+
<td><?php echo get_userdata($row->author)->display_name; ?></td>
|
308 |
+
</tr>
|
309 |
+
<tr>
|
310 |
+
<td class="spider_label"><label for="published1"><?php _e("Published:", 'bwg_back'); ?> </label></td>
|
311 |
+
<td>
|
312 |
+
<input type="radio" class="inputbox" id="published0" name="published" <?php echo (($row->published) ? '' : 'checked="checked"'); ?> value="0" >
|
313 |
+
<label for="published0"><?php _e("No", 'bwg_back'); ?></label>
|
314 |
+
<input type="radio" class="inputbox" id="published1" name="published" <?php echo (($row->published) ? 'checked="checked"' : ''); ?> value="1" >
|
315 |
+
<label for="published1"><?php _e("Yes", 'bwg_back'); ?></label>
|
316 |
+
</td>
|
317 |
+
</tr>
|
318 |
+
<tr>
|
319 |
+
<td class="spider_label"><label for="url"><?php _e("Preview image:", 'bwg_back'); ?> </label></td>
|
320 |
+
<td>
|
321 |
+
<?php
|
322 |
+
$query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_preview_image'), admin_url('admin-ajax.php'));
|
323 |
+
$query_url = wp_nonce_url( $query_url, 'addImages', 'bwg_nonce' );
|
324 |
+
$query_url = add_query_arg(array('TB_iframe' => '1'), $query_url );
|
325 |
+
|
326 |
+
|
327 |
+
?>
|
328 |
+
<a href="<?php echo $query_url; ?>"
|
329 |
+
id="button_preview_image"
|
330 |
+
class="button-primary thickbox thickbox-preview"
|
331 |
+
title="Add Preview Image"
|
332 |
+
onclick="return false;"
|
333 |
+
style="margin-bottom:5px; display:none;">
|
334 |
+
<?php _e("Add Preview Image", 'bwg_back'); ?>
|
335 |
+
</a>
|
336 |
+
<input type="hidden" id="preview_image" name="preview_image" value="<?php echo $row->preview_image; ?>" style="display:inline-block;"/>
|
337 |
+
<img id="img_preview_image"
|
338 |
+
style="max-height:90px; max-width:120px; vertical-align:middle;"
|
339 |
+
src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row->preview_image; ?>">
|
340 |
+
<span id="delete_preview_image" class="spider_delete_img"
|
341 |
+
onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')"></span>
|
342 |
+
</td>
|
343 |
+
</tr>
|
344 |
+
<tr>
|
345 |
+
<td class="spider_label"><label for="content-add_media"><?php _e("Albums And Galleries:", 'bwg_back'); ?> </label></td>
|
346 |
+
<td>
|
347 |
+
<?php
|
348 |
+
$query_url = add_query_arg(array('action' => 'addAlbumsGalleries', 'album_id' => $id, 'width' => '700', 'height' => '550', 'bwg_items_per_page'=>$per_page ), admin_url('admin-ajax.php'));
|
349 |
+
$query_url = wp_nonce_url( $query_url, 'addAlbumsGalleries', 'bwg_nonce' );
|
350 |
+
$query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
|
351 |
+
|
352 |
+
|
353 |
+
?>
|
354 |
+
<a href="<?php echo $query_url; ?>" class="button-primary thickbox thickbox-preview" id="content-add_media" title="Add Images" onclick="return false;" style="margin-bottom:5px;">
|
355 |
+
<?php _e("Add Albums/Galleries", 'bwg_back'); ?>
|
356 |
+
</a>
|
357 |
+
<?php $albums_galleries = $this->model->get_albums_galleries_rows_data($id) ?>
|
358 |
+
<table id="table_albums_galleries" class="widefat spider_table" <?php echo (($albums_galleries) ? '' : 'style="display:none;"'); ?>>
|
359 |
+
<tbody id="tbody_albums_galleries">
|
360 |
+
<?php
|
361 |
+
if ($albums_galleries) {
|
362 |
+
$hidden = "";
|
363 |
+
foreach($albums_galleries as $alb_gal) {
|
364 |
+
if ($alb_gal) {
|
365 |
+
?>
|
366 |
+
<tr id="tr_<?php echo $alb_gal->id . ":" . $alb_gal->is_album . ":" . $alb_gal->alb_gal_id ?>" style="height:35px;">
|
367 |
+
<td class="connectedSortable table_small_col" title="<?php _e("Drag to re-order", 'bwg_back'); ?>"><div class="handle"></div></td>
|
368 |
+
<td style="max-width:420px; min-width:400px;"><?php echo ($alb_gal->is_album ? 'Album: ' : 'Gallery: ') . $alb_gal->name; ?></td>
|
369 |
+
<td class="table_small_col">
|
370 |
+
<span class="spider_delete_img" onclick="spider_remove_row('tbody_albums_galleries', event, this)"/>
|
371 |
+
</td>
|
372 |
+
</tr>
|
373 |
+
<?php
|
374 |
+
$hidden .= $alb_gal->id . ":" . $alb_gal->is_album . ":" . $alb_gal->alb_gal_id . ",";
|
375 |
+
}
|
376 |
+
}
|
377 |
+
}
|
378 |
+
?>
|
379 |
+
</tbody>
|
380 |
+
</table>
|
381 |
+
<input type="hidden" value="<?php echo isset($hidden) ? $hidden : ''; ?>" id="albums_galleries" name="albums_galleries"/>
|
382 |
+
</td>
|
383 |
+
</tr>
|
384 |
+
</tbody>
|
385 |
+
</table>
|
386 |
+
<input id="task" name="task" type="hidden" value="" />
|
387 |
+
<input id="current_id" name="current_id" type="hidden" value="<?php echo $row->id; ?>" />
|
388 |
+
<script>
|
389 |
+
jQuery(window).load(function() {
|
390 |
+
spider_reorder_items('tbody_albums_galleries');
|
391 |
+
});
|
392 |
+
<?php
|
393 |
+
if ($row->preview_image == '') {
|
394 |
+
?>
|
395 |
+
spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image');
|
396 |
+
<?php
|
397 |
+
}
|
398 |
+
?>
|
399 |
+
</script>
|
400 |
+
</form>
|
401 |
+
<?php
|
402 |
+
}
|
403 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
404 |
+
// Getters & Setters //
|
405 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
406 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
407 |
+
// Private Methods //
|
408 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
409 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
410 |
+
// Listeners //
|
411 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
412 |
}
|
admin/views/BWGViewBWGShortcode.php
CHANGED
@@ -1,1857 +1,1857 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class BWGViewBWGShortcode {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $model;
|
14 |
-
|
15 |
-
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
// Constructor & Destructor //
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
public function __construct($model) {
|
20 |
-
$this->model = $model;
|
21 |
-
}
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Public Methods //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
public function display() {
|
26 |
-
$gallery_rows = $this->model->get_gallery_rows_data();
|
27 |
-
$album_rows = $this->model->get_album_rows_data();
|
28 |
-
$option_row = $this->model->get_option_row_data();
|
29 |
-
$theme_rows = $this->model->get_theme_rows_data();
|
30 |
-
$from_menu = ((isset($_GET['page']) && (esc_html($_GET['page']) == 'BWGShortcode')) ? TRUE : FALSE);
|
31 |
-
$shortcodes = $this->model->get_shortcode_data();
|
32 |
-
$shortcode_max_id = $this->model->get_shortcode_max_id();
|
33 |
-
$effects = array(
|
34 |
-
'none' => __('None','bwg_back'),
|
35 |
-
'cubeH' => __('Cube Horizontal','bwg_back'),
|
36 |
-
'cubeV' => __('Cube Vertical','bwg_back'),
|
37 |
-
'fade' => __('Fade','bwg_back'),
|
38 |
-
'sliceH' => __('Slice Horizontal','bwg_back'),
|
39 |
-
'sliceV' => __('Slice Vertical','bwg_back'),
|
40 |
-
'slideH' => __('Slide Horizontal','bwg_back'),
|
41 |
-
'slideV' => __('Slide Vertical','bwg_back'),
|
42 |
-
'scaleOut' => __('Scale Out','bwg_back'),
|
43 |
-
'scaleIn' => __('Scale In','bwg_back'),
|
44 |
-
'blockScale' => __('Block Scale','bwg_back'),
|
45 |
-
'kaleidoscope' => __('Kaleidoscope','bwg_back'),
|
46 |
-
'fan' => __('Fan','bwg_back'),
|
47 |
-
'blindH' => __('Blind Horizontal','bwg_back'),
|
48 |
-
'blindV' => __('Blind Vertical','bwg_back'),
|
49 |
-
'random' => __('Random','bwg_back'),
|
50 |
-
);
|
51 |
-
$watermark_fonts = array(
|
52 |
-
'arial' => 'Arial',
|
53 |
-
'Lucida grande' => 'Lucida grande',
|
54 |
-
'segoe ui' => 'Segoe ui',
|
55 |
-
'tahoma' => 'Tahoma',
|
56 |
-
'trebuchet ms' => 'Trebuchet ms',
|
57 |
-
'verdana' => 'Verdana',
|
58 |
-
'cursive' =>'Cursive',
|
59 |
-
'fantasy' => 'Fantasy',
|
60 |
-
'monospace' => 'Monospace',
|
61 |
-
'serif' => 'Serif',
|
62 |
-
);
|
63 |
-
if (!$from_menu) {
|
64 |
-
?>
|
65 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
66 |
-
<head>
|
67 |
-
<title><?php _e("Photo Gallery", 'bwg_back'); ?></title>
|
68 |
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
69 |
-
<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
|
70 |
-
<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
|
71 |
-
<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
|
72 |
-
<?php
|
73 |
-
wp_print_scripts('jquery');
|
74 |
-
}
|
75 |
-
wp_print_scripts('jquery-ui-core');
|
76 |
-
wp_print_scripts('jquery-ui-widget');
|
77 |
-
wp_print_scripts('jquery-ui-position');
|
78 |
-
wp_print_scripts('jquery-ui-tooltip');
|
79 |
-
wp_print_scripts('wp-pointer');
|
80 |
-
?>
|
81 |
-
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=dashicons,wp-pointer" rel="stylesheet">
|
82 |
-
<link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/bwg_shortcode.css?ver='.wd_bwg_version(); ?>">
|
83 |
-
<link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
|
84 |
-
<script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/bwg_shortcode.js?ver='.wd_bwg_version(); ?>"></script>
|
85 |
-
<script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/jscolor/jscolor.js?ver='.wd_bwg_version(); ?>"></script>
|
86 |
-
<?php
|
87 |
-
if (!$from_menu) {
|
88 |
-
?>
|
89 |
-
<base target="_self">
|
90 |
-
</head>
|
91 |
-
<body id="link" onLoad="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';" dir="ltr" class="forceColors">
|
92 |
-
<?php if (isset($_POST['tagtext'])) { echo '<script>tinyMCEPopup.close();</script></body></html>'; die(); } ?>
|
93 |
-
<form method="post" action="#" id="bwg_shortcode_form">
|
94 |
-
<?php wp_nonce_field( 'BWGShortcode', 'bwg_nonce' ); ?>
|
95 |
-
<div class="tabs" role="tablist" tabindex="-1">
|
96 |
-
<ul>
|
97 |
-
<li id="display_tab" class="current" role="tab" tabindex="0">
|
98 |
-
<span>
|
99 |
-
<a href="javascript:mcTabs.displayTab('display_tab','display_panel');" onMouseDown="return false;" tabindex="-1"><?php _e("Display", 'bwg_back'); ?></a>
|
100 |
-
</span>
|
101 |
-
</li>
|
102 |
-
</ul>
|
103 |
-
</div>
|
104 |
-
<div class="panel_wrapper">
|
105 |
-
<div id="display_panel" class="panel current">
|
106 |
-
<?php
|
107 |
-
}
|
108 |
-
else {
|
109 |
-
?>
|
110 |
-
<form method="post" action="#" id="bwg_shortcode_form">
|
111 |
-
<?php wp_nonce_field( 'BWGShortcode', 'bwg_nonce' ); ?>
|
112 |
-
<div id="display_panel" style="width: 99%; margin-top: 30px;">
|
113 |
-
<?php
|
114 |
-
}
|
115 |
-
?>
|
116 |
-
<div style="text-align:center; height:100px;">
|
117 |
-
<span class="gallery_type" onClick="bwg_gallery_type('thumbnails')">
|
118 |
-
<div style="text-align: center;"><input type="radio" id="thumbnails" name="gallery_type" value="thumbnails"/><label for="thumbnails"><?php _e("Thumbnails", 'bwg_back'); ?></label></div>
|
119 |
-
<label for="thumbnails"><img id="display_thumb" src="<?php echo WD_BWG_URL . '/images/thumbnails.jpg'; ?>" /></label>
|
120 |
-
</span>
|
121 |
-
<span title="<?php _e("This view is disabled in free version.", 'bwg_back'); ?>" class="gallery_type">
|
122 |
-
<div style="text-align: center;"><input disabled="disabled" type="radio" id="thumbnails_masonry" name="gallery_type" value="thumbnails_masonry" /><label class="spider_free_version_label" for="thumbnails_masonry"><?php _e("Masonry", 'bwg_back'); ?></label></div>
|
123 |
-
<label><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/thumbnails_masonry.jpg'; ?>" /></label>
|
124 |
-
</span>
|
125 |
-
<span title="<?php _e("This view is disabled in free version.", 'bwg_back'); ?>" class="gallery_type">
|
126 |
-
<div style="text-align: center;"><input disabled="disabled" type="radio" id="thumbnails_mosaic" name="gallery_type" value="thumbnails_mosaic" /><label class="spider_free_version_label" for="thumbnails_mosaic"><?php _e("Mosaic", 'bwg_back'); ?></label></div>
|
127 |
-
<label for="thumbnails_mosaic"><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/thumbnails_mosaic.jpg'; ?>" /></label>
|
128 |
-
</span>
|
129 |
-
<span class="gallery_type" onClick="bwg_gallery_type('slideshow')">
|
130 |
-
<div style="text-align: center;"><input type="radio" id="slideshow" name="gallery_type" value="slideshow" /><label for="slideshow"><?php _e("Slideshow", 'bwg_back'); ?></label></div>
|
131 |
-
<label for="slideshow"><img src="<?php echo WD_BWG_URL . '/images/slideshow.jpg'; ?>" /></label>
|
132 |
-
</span>
|
133 |
-
<span class="gallery_type" onClick="bwg_gallery_type('image_browser')">
|
134 |
-
<div style="text-align: center;"><input type="radio" id="image_browser" name="gallery_type" value="image_browser" /><label for="image_browser"><?php _e("Image Browser", 'bwg_back'); ?></label></div>
|
135 |
-
<label for="image_browser"><img src="<?php echo WD_BWG_URL . '/images/image_browser.jpg'; ?>" /></label>
|
136 |
-
</span>
|
137 |
-
<span class="gallery_type" onClick="bwg_gallery_type('album_compact_preview')">
|
138 |
-
<div style="text-align: center;"><input type="radio" id="album_compact_preview" name="gallery_type" value="album_compact_preview" /><label for="album_compact_preview"><?php _e("Compact Album", 'bwg_back'); ?></label></div>
|
139 |
-
<label for="album_compact_preview"><img src="<?php echo WD_BWG_URL . '/images/album_compact_preview.jpg'; ?>" /></label>
|
140 |
-
</span>
|
141 |
-
<span title="<?php _e("This view is disabled in free version.", 'bwg_back'); ?>" class="gallery_type">
|
142 |
-
<div style="text-align: center;"><input disabled="disabled" type="radio" id="album_masonry_preview" name="gallery_type" value="album_masonry_preview" /><label class="spider_free_version_label" for="album_masonry_preview"><?php _e("Masonry Album", 'bwg_back'); ?></label></div>
|
143 |
-
<label for="album_masonry_preview"><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/thumbnails_masonry.jpg'; ?>" /></label>
|
144 |
-
</span>
|
145 |
-
<span class="gallery_type" onClick="bwg_gallery_type('album_extended_preview')">
|
146 |
-
<div style="text-align: center;"><input type="radio" id="album_extended_preview" name="gallery_type" value="album_extended_preview" /><label for="album_extended_preview"><?php _e("Extended Album", 'bwg_back'); ?></label></div>
|
147 |
-
<label for="album_extended_preview"><img src="<?php echo WD_BWG_URL . '/images/album_extended_preview.jpg'; ?>" /></label>
|
148 |
-
</span>
|
149 |
-
<span title="<?php _e('This view is disabled in free version.', 'bwg_back'); ?>" class="gallery_type">
|
150 |
-
<div style="text-align: center;"><input disabled="disabled" type="radio" id="blog_style" name="gallery_type" value="blog_style" /><label class="spider_free_version_label" for="blog_style"><?php _e("Blog Style", 'bwg_back'); ?></label></div>
|
151 |
-
<label><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/blog_style.jpg'; ?>" /></label>
|
152 |
-
</span>
|
153 |
-
<span title="<?php _e('This view is disabled in free version.', 'bwg_back'); ?>" class="gallery_type">
|
154 |
-
<div style="text-align: center;"><input disabled="disabled" type="radio" id="carousel" name="gallery_type" value="carousel" /><label class="spider_free_version_label" for="carousel"><?php _e("Carousel", 'bwg_back'); ?></label></div>
|
155 |
-
<label for="carousel"><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/Carousel.png'; ?>" /></label>
|
156 |
-
</span>
|
157 |
-
</div>
|
158 |
-
<hr />
|
159 |
-
<div class="bwg_short_div" style="border-right: 1px solid #000000;">
|
160 |
-
<table>
|
161 |
-
<tbody>
|
162 |
-
<tr id="tr_theme">
|
163 |
-
<td <?php echo (get_option("wd_bwg_theme_version") ? 'title="This option is disabled in free version." class="spider_label spider_free_version_label"' : 'class="spider_label"'); ?>><label for="theme"><?php _e("Theme:", 'bwg_back'); ?> </label></td>
|
164 |
-
<td>
|
165 |
-
<select name="theme" id="theme" style="width:150px;" <?php echo (get_option("wd_bwg_theme_version") ? 'disabled="disabled"' : ''); ?>>
|
166 |
-
<option value="0" selected="selected"><?php _e("Select Theme", 'bwg_back'); ?></option>
|
167 |
-
<?php
|
168 |
-
foreach ($theme_rows as $theme_row) {
|
169 |
-
?>
|
170 |
-
<option <?php echo ($theme_row->default_theme) ? 'selected="selected"' : ''; ?> value="<?php echo $theme_row->id; ?>"><?php echo $theme_row->name; ?></option>
|
171 |
-
<?php
|
172 |
-
}
|
173 |
-
?>
|
174 |
-
</select>
|
175 |
-
</td>
|
176 |
-
</tr>
|
177 |
-
<tr id="tr_gallery">
|
178 |
-
<td class="spider_label"><label for="gallery"><?php _e("Gallery:", 'bwg_back'); ?> </label></td>
|
179 |
-
<td>
|
180 |
-
<select name="gallery" id="gallery" style="width:150px;">
|
181 |
-
<option value="0" selected="selected"><?php _e("Select Gallery", 'bwg_back'); ?></option>
|
182 |
-
<?php
|
183 |
-
foreach ($gallery_rows as $gallery_row) {
|
184 |
-
?>
|
185 |
-
<option value="<?php echo $gallery_row->id; ?>"><?php echo $gallery_row->name; ?></option>
|
186 |
-
<?php
|
187 |
-
}
|
188 |
-
?>
|
189 |
-
</select>
|
190 |
-
</td>
|
191 |
-
</tr>
|
192 |
-
<tr id="tr_album">
|
193 |
-
<td title="<?php _e('The selected album expanded content will be displayed.', 'bwg_back'); ?>" class="spider_label"><label for="album"><?php _e("Album:", 'bwg_back'); ?> </label></td>
|
194 |
-
<td>
|
195 |
-
<select name="album" id="album" style="width:150px;">
|
196 |
-
<option value="0" selected="selected"><?php _e("Select Album", 'bwg_back'); ?></option>
|
197 |
-
<?php
|
198 |
-
foreach ($album_rows as $album_row) {
|
199 |
-
?>
|
200 |
-
<option value="<?php echo $album_row->id; ?>"><?php echo $album_row->name; ?></option>
|
201 |
-
<?php
|
202 |
-
}
|
203 |
-
?>
|
204 |
-
</select>
|
205 |
-
</td>
|
206 |
-
</tr>
|
207 |
-
<tr id="tr_sort_by">
|
208 |
-
<td class="spider_label"><label for="sort_by"><?php _e("Sort images by:", 'bwg_back'); ?> </label></td>
|
209 |
-
<td>
|
210 |
-
<select name="sort_by" id="sort_by" style="width:150px;">
|
211 |
-
<option value="order" selected="selected"><?php _e("Order", 'bwg_back'); ?></option>
|
212 |
-
<option value="alt"><?php _e("Title", 'bwg_back'); ?></option>
|
213 |
-
<option value="date"><?php _e("Date", 'bwg_back'); ?></option>
|
214 |
-
<option value="filename"><?php _e("Filename", 'bwg_back'); ?></option>
|
215 |
-
<option value="size"><?php _e("Size", 'bwg_back'); ?></option>
|
216 |
-
<option value="filetype"><?php _e("Type", 'bwg_back'); ?></option>
|
217 |
-
<option value="resolution"><?php _e("Resolution", 'bwg_back'); ?></option>
|
218 |
-
<option value="random"><?php _e("Random", 'bwg_back'); ?></option>
|
219 |
-
</select>
|
220 |
-
</td>
|
221 |
-
</tr>
|
222 |
-
<tr id="tr_order_by">
|
223 |
-
<td class="spider_label"><label><?php _e("Order images", 'bwg_back'); ?>: </label></td>
|
224 |
-
<td>
|
225 |
-
<input type="radio" name="order_by" id="order_by_1" value="asc" checked="checked" /><label for="order_by_1"><?php _e("Ascending", 'bwg_back'); ?></label>
|
226 |
-
<input type="radio" name="order_by" id="order_by_0" value="desc" /><label for="order_by_0"><?php _e("Descending", 'bwg_back'); ?></label>
|
227 |
-
</td>
|
228 |
-
</tr>
|
229 |
-
<tr id="tr_show_search_box">
|
230 |
-
<td class="spider_label"><label><?php _e("Show search box:", 'bwg_back'); ?> </label></td>
|
231 |
-
<td>
|
232 |
-
<input type="radio" name="show_search_box" id="show_search_box_1" value="1" <?php if ($option_row->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_1"><?php _e("Yes", 'bwg_back'); ?></label>
|
233 |
-
<input type="radio" name="show_search_box" id="show_search_box_0" value="0" <?php if (!$option_row->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
|
234 |
-
</td>
|
235 |
-
</tr>
|
236 |
-
<tr id="tr_search_box_width">
|
237 |
-
<td class="spider_label"><label for="search_box_width"><?php _e("Search box width:", 'bwg_back'); ?> </label></td>
|
238 |
-
<td><input type="text" name="search_box_width" id="search_box_width" value="<?php echo $option_row->search_box_width; ?>" class="spider_int_input" /> px</td>
|
239 |
-
</tr>
|
240 |
-
<tr id="tr_show_tag_box">
|
241 |
-
<td class="spider_label"><label><?php _e("Show tag box:", 'bwg_back'); ?> </label></td>
|
242 |
-
<td>
|
243 |
-
<input type="radio" name="show_tag_box" id="show_tag_box_1" value="1" <?php if ($option_row->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_tag_box_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
244 |
-
<input type="radio" name="show_tag_box" id="show_tag_box_0" value="0" <?php if (!$option_row->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
|
245 |
-
</td>
|
246 |
-
</tr>
|
247 |
-
<tr id="tr_show_sort_images">
|
248 |
-
<td class="spider_label"><label><?php _e("Show 'Order by' dropdown list:", 'bwg_back'); ?> </label></td>
|
249 |
-
<td>
|
250 |
-
<input type="radio" name="show_sort_images" id="show_sort_images_1" value="1" <?php if ($option_row->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
251 |
-
<input type="radio" name="show_sort_images" id="show_sort_images_0" value="0" <?php if (!$option_row->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_0"><?php _e('No', 'bwg_back'); ?>;</label>
|
252 |
-
</td>
|
253 |
-
</tr>
|
254 |
-
<!--Thumbnails, Masonry viewies-->
|
255 |
-
<tr id="tr_masonry_hor_ver">
|
256 |
-
<td class="spider_label"><label><?php _e("Masonry:", 'bwg_back'); ?> </label></td>
|
257 |
-
<td>
|
258 |
-
<input type="radio" name="masonry_hor_ver" id="masonry_ver" value="vertical" onclick="bwg_change_label('image_column_number_label', 'Number of image rows: ');
|
259 |
-
bwg_change_label('thumb_width_height_label', 'Image thumbnail width: ');
|
260 |
-
jQuery('#thumb_width').show();
|
261 |
-
jQuery('#thumb_height').hide();
|
262 |
-
jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->masonry == 'vertical') ? 'checked' : ''; ?> /><label for="masonry_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
|
263 |
-
<input type="radio" name="masonry_hor_ver" id="masonry_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns: ", 'bwg_back'); ?>');
|
264 |
-
bwg_change_label('thumb_width_height_label', 'Image Thumbnail Height: ');
|
265 |
-
jQuery('#thumb_width').hide();
|
266 |
-
jQuery('#thumb_height').show();
|
267 |
-
jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->masonry == 'horizontal') ? 'checked' : ''; ?> /><label for="masonry_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
|
268 |
-
</td>
|
269 |
-
</tr>
|
270 |
-
<!--Thumbnails, Mosaic viewies-->
|
271 |
-
<tr id="tr_mosaic_hor_ver">
|
272 |
-
<td class="spider_label"><label><?php _e("Mosaic:", 'bwg_back'); ?> </label></td>
|
273 |
-
<td>
|
274 |
-
<input type="radio" name="mosaic_hor_ver" id="mosaic_ver" value="vertical" onclick="bwg_change_label('image_column_number_label', '<?php _e("Number of image rows: ", 'bwg_back'); ?>');
|
275 |
-
bwg_change_label('thumb_width_height_label', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
|
276 |
-
jQuery('#thumb_width').show();
|
277 |
-
jQuery('#thumb_height').hide();
|
278 |
-
jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
|
279 |
-
<input type="radio" name="mosaic_hor_ver" id="mosaic_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
|
280 |
-
bwg_change_label('thumb_width_height_label', '<?php _e("Image Thumbnail Height:", 'bwg_back'); ?> ');
|
281 |
-
jQuery('#thumb_width').hide();
|
282 |
-
jQuery('#thumb_height').show();
|
283 |
-
jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
|
284 |
-
|
285 |
-
|
286 |
-
</td>
|
287 |
-
</tr>
|
288 |
-
<tr id="tr_resizable_mosaic">
|
289 |
-
<td title="<?php _e('Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.', 'bwg_back'); ?>" class="spider_label"><label for="resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
|
290 |
-
<td>
|
291 |
-
<input type="radio" name="resizable_mosaic" id="resizable_mosaic_1" value="1" <?php echo ($option_row->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
292 |
-
<input type="radio" name="resizable_mosaic" id="resizable_mosaic_0" value="0" <?php echo ($option_row->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
|
293 |
-
<br />
|
294 |
-
</td>
|
295 |
-
</tr>
|
296 |
-
<tr id="tr_mosaic_total_width">
|
297 |
-
<td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
|
298 |
-
<td><input type="text" name="mosaic_total_width" id="mosaic_total_width" value="<?php echo $option_row->mosaic_total_width; ?>" class="spider_int_input" /> %</td>
|
299 |
-
</tr>
|
300 |
-
<!--Thumbnails, Masonry and Mosaic viewies-->
|
301 |
-
<tr id="tr_image_column_number">
|
302 |
-
<td class="spider_label"><label id="image_column_number_label" for="image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
|
303 |
-
<td><input type="text" name="image_column_number" id="image_column_number" value="<?php echo $option_row->image_column_number; ?>" class="spider_int_input" /></td>
|
304 |
-
</tr>
|
305 |
-
<tr id="tr_images_per_page">
|
306 |
-
<td title="<?php _e('If you want to display all images you should leave it blank or insert 0.', 'bwg_back'); ?>" class="spider_label"><label for="images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
|
307 |
-
<td><input type="text" name="images_per_page" id="images_per_page" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
308 |
-
</tr>
|
309 |
-
<tr id="tr_image_title_hover">
|
310 |
-
<td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
|
311 |
-
<td>
|
312 |
-
<input type="radio" name="image_title" id="image_title_hover" value="hover" <?php echo ($option_row->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
|
313 |
-
<input type="radio" name="image_title" id="image_title_show" value="show" <?php echo ($option_row->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
|
314 |
-
<input type="radio" name="image_title" id="image_title_none" value="none" <?php echo ($option_row->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
|
315 |
-
</td>
|
316 |
-
</tr>
|
317 |
-
<tr id="tr_image_enable_page">
|
318 |
-
<td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
|
319 |
-
<td>
|
320 |
-
<input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_yes" value="1" <?php echo ($option_row->image_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
321 |
-
<input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_no" value="0" <?php echo ($option_row->image_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_no"><?php _e('No', 'bwg_back'); ?></label>
|
322 |
-
<input type="radio" name="image_enable_page" id="image_page_loadmore" value="2" <?php echo ($option_row->image_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
|
323 |
-
<input type="radio" name="image_enable_page" id="image_page_scrol_load" value="3" <?php echo ($option_row->image_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label>
|
324 |
-
</td>
|
325 |
-
</tr>
|
326 |
-
<tr id="tr_load_more_image_count">
|
327 |
-
<td class="spider_label"><label for="load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
|
328 |
-
<td><input type="text" name="load_more_image_count" id="load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
329 |
-
</tr>
|
330 |
-
<tr id="tr_thumb_width_height">
|
331 |
-
<td title="<?php _e('Maximum values for thumbnail dimension.', 'bwg_back'); ?>" class="spider_label"><label id="thumb_width_height_label" for="thumb_width"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
|
332 |
-
<td>
|
333 |
-
<input type="text" name="thumb_width" id="thumb_width" value="<?php echo $option_row->thumb_width; ?>" class="spider_int_input" /><span id="thumb_width_height_separator"> x </span>
|
334 |
-
<input type="text" name="thumb_height" id="thumb_height" value="<?php echo $option_row->thumb_height; ?>" class="spider_int_input" /> px
|
335 |
-
</td>
|
336 |
-
</tr>
|
337 |
-
|
338 |
-
<!--Compact Album view-->
|
339 |
-
<tr id="tr_compuct_album_column_number">
|
340 |
-
<td class="spider_label"><label for="compuct_album_column_number"><?php _e("Max. number of album columns:", 'bwg_back'); ?> </label></td>
|
341 |
-
<td><input type="text" name="compuct_album_column_number" id="compuct_album_column_number" value="<?php echo $option_row->album_column_number; ?>" class="spider_int_input" /></td>
|
342 |
-
</tr>
|
343 |
-
<tr id="tr_compuct_albums_per_page">
|
344 |
-
<td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
|
345 |
-
<td><input type="text" name="compuct_albums_per_page" id="compuct_albums_per_page" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
|
346 |
-
</tr>
|
347 |
-
<tr id="tr_compuct_album_title_hover">
|
348 |
-
<td class="spider_label"><label><?php _e("Album title:", 'bwg_back'); ?> </label></td>
|
349 |
-
<td>
|
350 |
-
<input type="radio" name="compuct_album_title" id="compuct_album_title_hover" value="hover" <?php echo ($option_row->album_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
|
351 |
-
<input type="radio" name="compuct_album_title" id="compuct_album_title_show" value="show" <?php echo ($option_row->album_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
|
352 |
-
<input type="radio" name="compuct_album_title" id="compuct_album_title_none" value="none" <?php echo ($option_row->album_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
|
353 |
-
</td>
|
354 |
-
</tr>
|
355 |
-
<tr id="tr_compuct_album_thumb_width_height">
|
356 |
-
<td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_thumb_width"><?php _e("Album Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
|
357 |
-
<td>
|
358 |
-
<input type="text" name="compuct_album_thumb_width" id="compuct_album_thumb_width" value="<?php echo $option_row->album_thumb_width; ?>" class="spider_int_input" /> x
|
359 |
-
<input type="text" name="compuct_album_thumb_height" id="compuct_album_thumb_height" value="<?php echo $option_row->album_thumb_height; ?>" class="spider_int_input" /> px
|
360 |
-
</td>
|
361 |
-
</tr>
|
362 |
-
<tr id="tr_compuct_album_view_type">
|
363 |
-
<td title="<?php _e('The gallery images view type in the album.<br /><br />This option is disabled in free version.', 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
|
364 |
-
<td>
|
365 |
-
<input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_1" value="thumbnail" <?php if ($option_row->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
|
366 |
-
<input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_0" value="masonry" <?php if ($option_row->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
|
367 |
-
<input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_2" value="mosaic" <?php if ($option_row->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
|
368 |
-
</td>
|
369 |
-
</tr>
|
370 |
-
<tr id="tr_compuct_album_mosaic_hor_ver">
|
371 |
-
<td title="<?php _e('This option is disabled in free version.', 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Mosaic:", 'bwg_back'); ?> </label></td>
|
372 |
-
<td>
|
373 |
-
<input disabled="disabled" type="radio" name="compuct_album_mosaic_hor_ver" id="compuct_album_mosaic_ver" value="vertical" onclick="bwg_change_label('compuct_album_image_column_number', '<?php _e("Number of image rows:", 'bwg_back'); ?> ');
|
374 |
-
bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail width:", 'bwg_back'); ?> ');
|
375 |
-
jQuery('#compuct_album_image_thumb_width').show();
|
376 |
-
jQuery('#compuct_album_image_thumb_height').hide();
|
377 |
-
jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
|
378 |
-
<input disabled="disabled" type="radio" name="compuct_album_mosaic_hor_ver" id="compuct_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('compuct_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
|
379 |
-
bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail height:", 'bwg_back'); ?> ');
|
380 |
-
jQuery('#compuct_album_image_thumb_width').hide();
|
381 |
-
jQuery('#compuct_album_image_thumb_height').show();
|
382 |
-
jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
|
383 |
-
|
384 |
-
|
385 |
-
</td>
|
386 |
-
</tr>
|
387 |
-
<tr id="tr_compuct_album_resizable_mosaic">
|
388 |
-
<td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="compuct_album_resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
|
389 |
-
<td>
|
390 |
-
<input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_1" value="1" <?php echo ($option_row->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
391 |
-
<input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_0" value="0" <?php echo ($option_row->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
|
392 |
-
<br />
|
393 |
-
</td>
|
394 |
-
</tr>
|
395 |
-
<tr id="tr_compuct_album_mosaic_total_width">
|
396 |
-
<td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
|
397 |
-
<td><input type="text" name="compuct_album_mosaic_total_width" id="compuct_album_mosaic_total_width" value="<?php echo $option_row->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
|
398 |
-
</tr>
|
399 |
-
<tr id="tr_compuct_album_image_column_number">
|
400 |
-
<td class="spider_label"><label for="compuct_album_image_column_number"><?php _e("Max. number of image columns: ", 'bwg_back'); ?></label></td>
|
401 |
-
<td><input type="text" name="compuct_album_image_column_number" id="compuct_album_image_column_number" value="<?php echo $option_row->image_column_number; ?>" class="spider_int_input" /></td>
|
402 |
-
</tr>
|
403 |
-
<tr id="tr_compuct_album_images_per_page">
|
404 |
-
<td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
|
405 |
-
<td><input type="text" name="compuct_album_images_per_page" id="compuct_album_images_per_page" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
406 |
-
</tr>
|
407 |
-
<tr id="tr_compuct_album_image_title">
|
408 |
-
<td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
|
409 |
-
<td>
|
410 |
-
<input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_hover" value="hover" <?php echo ($option_row->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
|
411 |
-
<input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_show" value="show" <?php echo ($option_row->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
|
412 |
-
<input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_none" value="none" <?php echo ($option_row->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
|
413 |
-
</td>
|
414 |
-
</tr>
|
415 |
-
<tr id="tr_compuct_album_image_thumb_width_height">
|
416 |
-
<td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_image_thumb_width" id="compuct_album_image_thumb_dimensions"><?php _e("Image thumbnail dimensions: ", 'bwg_back'); ?></label></td>
|
417 |
-
<td>
|
418 |
-
<input type="text" name="compuct_album_image_thumb_width" id="compuct_album_image_thumb_width" value="<?php echo $option_row->thumb_width; ?>" class="spider_int_input" /><span id="compuct_album_image_thumb_dimensions_x" > x </span>
|
419 |
-
<input type="text" name="compuct_album_image_thumb_height" id="compuct_album_image_thumb_height" value="<?php echo $option_row->thumb_height; ?>" class="spider_int_input" /> px
|
420 |
-
</td>
|
421 |
-
</tr>
|
422 |
-
<tr id="tr_compuct_album_enable_page">
|
423 |
-
<td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
|
424 |
-
<td>
|
425 |
-
<input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_yes" value="1" <?php echo ($option_row->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="compuct_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
426 |
-
<input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_no" value="0" <?php echo ($option_row->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
|
427 |
-
<input type="radio" name="compuct_album_enable_page" id="compuct_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
|
428 |
-
<input type="radio" name="compuct_album_enable_page" id="compuct_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label>
|
429 |
-
</td>
|
430 |
-
</tr>
|
431 |
-
<tr id="tr_compuct_albums_per_page_load_more">
|
432 |
-
<td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
|
433 |
-
<td><input type="text" name="compuct_albums_per_page_load_more" id="compuct_albums_per_page_load_more" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
|
434 |
-
</tr>
|
435 |
-
<tr id="tr_compuct_album_load_more_image_count">
|
436 |
-
<td class="spider_label"><label for="compuct_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
|
437 |
-
<td><input type="text" name="compuct_album_load_more_image_count" id="compuct_album_load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
438 |
-
</tr>
|
439 |
-
|
440 |
-
<!--Extended Album view-->
|
441 |
-
<tr id="tr_extended_albums_per_page">
|
442 |
-
<td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
|
443 |
-
<td><input type="text" name="extended_albums_per_page" id="extended_albums_per_page" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
|
444 |
-
</tr>
|
445 |
-
<tr id="tr_extended_album_height">
|
446 |
-
<td class="spider_label"><label for="extended_album_height"><?php _e("Album row height:", 'bwg_back'); ?> </label></td>
|
447 |
-
<td><input type="text" name="extended_album_height" id="extended_album_height" value="<?php echo $option_row->extended_album_height; ?>" class="spider_int_input" /> px</td>
|
448 |
-
</tr>
|
449 |
-
<tr id="tr_extended_album_description_enable">
|
450 |
-
<td title="<?php _e("If you disable description only the title of the album will be displayed.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable album description:", 'bwg_back'); ?> </label></td>
|
451 |
-
<td>
|
452 |
-
<input type="radio" name="extended_album_description_enable" id="extended_album_description_yes" value="1" <?php echo ($option_row->extended_album_description_enable) ? 'checked' : ''; ?> /><label for="extended_album_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
453 |
-
<input type="radio" name="extended_album_description_enable" id="extended_album_description_no" value="0" <?php echo ($option_row->extended_album_description_enable) ? '' : 'checked'; ?> /><label for="extended_album_description_no"><?php _e('No', 'bwg_back'); ?></label>
|
454 |
-
</td>
|
455 |
-
</tr>
|
456 |
-
<tr id="tr_extended_album_thumb_width_height">
|
457 |
-
<td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_thumb_width"><?php _e("Album thumbnail dimensions:", 'bwg_back'); ?> </label></td>
|
458 |
-
<td>
|
459 |
-
<input type="text" name="extended_album_thumb_width" id="extended_album_thumb_width" value="<?php echo $option_row->album_thumb_width; ?>" class="spider_int_input" /> x
|
460 |
-
<input type="text" name="extended_album_thumb_height" id="extended_album_thumb_height" value="<?php echo $option_row->album_thumb_height; ?>" class="spider_int_input" /> px
|
461 |
-
</td>
|
462 |
-
</tr>
|
463 |
-
<tr id="tr_extended_album_view_type">
|
464 |
-
<td title="<?php _e("The gallery images view type in the album.", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
|
465 |
-
<td>
|
466 |
-
<input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_1" value="thumbnail" <?php if ($option_row->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
|
467 |
-
<input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_0" value="masonry" <?php if ($option_row->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
|
468 |
-
<input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_2" value="mosaic" <?php if ($option_row->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
|
469 |
-
</td>
|
470 |
-
</tr>
|
471 |
-
<tr id="tr_extended_album_mosaic_hor_ver">
|
472 |
-
<td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Mosaic:", 'bwg_back'); ?> </label></td>
|
473 |
-
<td>
|
474 |
-
<input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_ver" value="vertical" onclick="bwg_change_label('extended_album_image_column_number', 'Number of image rows: ');
|
475 |
-
bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
|
476 |
-
jQuery('#extended_album_image_thumb_width').show();
|
477 |
-
jQuery('#extended_album_image_thumb_height').hide();
|
478 |
-
jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
|
479 |
-
<input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('extended_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
|
480 |
-
bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail height: ", 'bwg_back'); ?>');
|
481 |
-
jQuery('#extended_album_image_thumb_width').hide();
|
482 |
-
jQuery('#extended_album_image_thumb_height').show();
|
483 |
-
jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
|
484 |
-
|
485 |
-
|
486 |
-
</td>
|
487 |
-
</tr>
|
488 |
-
<tr id="tr_extended_album_resizable_mosaic">
|
489 |
-
<td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="extended_album_resizable_mosaic"><?php _e("Resizable mosaic:", 'bwg_back'); ?> </label></td>
|
490 |
-
<td>
|
491 |
-
<input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_1" value="1" <?php echo ($option_row->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
492 |
-
<input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_0" value="0" <?php echo ($option_row->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
|
493 |
-
<br />
|
494 |
-
</td>
|
495 |
-
</tr>
|
496 |
-
|
497 |
-
<tr id="tr_extended_album_mosaic_total_width">
|
498 |
-
<td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
|
499 |
-
<td><input type="text" name="extended_album_mosaic_total_width" id="extended_album_mosaic_total_width" value="<?php echo $option_row->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
|
500 |
-
</tr>
|
501 |
-
<tr id="tr_extended_album_image_column_number">
|
502 |
-
<td class="spider_label"><label for="extended_album_image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
|
503 |
-
<td><input type="text" name="extended_album_image_column_number" id="extended_album_image_column_number" value="<?php echo $option_row->image_column_number; ?>" class="spider_int_input" /></td>
|
504 |
-
</tr>
|
505 |
-
<tr id="tr_extended_album_images_per_page">
|
506 |
-
<td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
|
507 |
-
<td><input type="text" name="extended_album_images_per_page" id="extended_album_images_per_page" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
508 |
-
</tr>
|
509 |
-
<tr id="tr_extended_album_image_title">
|
510 |
-
<td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
|
511 |
-
<td>
|
512 |
-
<input type="radio" name="extended_album_image_title" id="extended_album_image_title_hover" value="hover" <?php echo ($option_row->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="extended_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
|
513 |
-
<input type="radio" name="extended_album_image_title" id="extended_album_image_title_show" value="show" <?php echo ($option_row->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="extended_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
|
514 |
-
<input type="radio" name="extended_album_image_title" id="extended_album_image_title_none" value="none" <?php echo ($option_row->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="extended_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
|
515 |
-
</td>
|
516 |
-
</tr>
|
517 |
-
<tr id="tr_extended_album_image_thumb_width_height">
|
518 |
-
<td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_image_thumb_width" id="extended_album_image_thumb_dimensions"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
|
519 |
-
<td>
|
520 |
-
<input type="text" name="extended_album_image_thumb_width" id="extended_album_image_thumb_width" value="<?php echo $option_row->thumb_width; ?>" class="spider_int_input" /><span id="extended_album_image_thumb_dimensions_x" > x </span>
|
521 |
-
<input type="text" name="extended_album_image_thumb_height" id="extended_album_image_thumb_height" value="<?php echo $option_row->thumb_height; ?>" class="spider_int_input" /> px
|
522 |
-
</td>
|
523 |
-
</tr>
|
524 |
-
<tr id="tr_extended_album_enable_page">
|
525 |
-
<td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
|
526 |
-
<td>
|
527 |
-
<input type="radio" name="extended_album_enable_page" id="extended_album_page_yes" value="1" <?php echo ($option_row->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
528 |
-
<input type="radio" name="extended_album_enable_page" id="extended_album_page_no" value="0" <?php echo ($option_row->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
|
529 |
-
<input type="radio" name="extended_album_enable_page" id="extended_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
|
530 |
-
<input type="radio" name="extended_album_enable_page" id="extended_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
|
531 |
-
</td>
|
532 |
-
</tr>
|
533 |
-
<tr id="tr_extended_albums_per_page_load_more">
|
534 |
-
<td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
|
535 |
-
<td><input type="text" name="extended_albums_per_page_load_more" id="extended_albums_per_page_load_more" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
|
536 |
-
</tr>
|
537 |
-
<tr id="tr_extended_album_load_more_image_count">
|
538 |
-
<td class="spider_label"><label for="extended_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
|
539 |
-
<td><input type="text" name="extended_album_load_more_image_count" id="extended_album_load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
540 |
-
</tr>
|
541 |
-
|
542 |
-
<!--Image Browser view-->
|
543 |
-
<tr id="tr_image_browser_width_height">
|
544 |
-
<td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="image_browser_width"><?php _e("Image width: ", 'bwg_back'); ?></label></td>
|
545 |
-
<td>
|
546 |
-
<input type="text" name="image_browser_width" id="image_browser_width" value="<?php echo $option_row->image_browser_width; ?>" class="spider_int_input" /> px
|
547 |
-
</td>
|
548 |
-
</tr>
|
549 |
-
<tr id="tr_image_browser_title_enable">
|
550 |
-
<td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
|
551 |
-
<td>
|
552 |
-
<input type="radio" name="image_browser_title_enable" id="image_browser_title_yes" value="1" <?php echo ($option_row->image_browser_title_enable) ? 'checked' : ''; ?> /><label for="image_browser_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
|
553 |
-
<input type="radio" name="image_browser_title_enable" id="image_browser_title_no" value="0" <?php echo ($option_row->image_browser_title_enable) ? '' : 'checked'; ?> /><label for="image_browser_title_no"><?php _e('No', 'bwg_back'); ?></label>
|
554 |
-
</td>
|
555 |
-
</tr>
|
556 |
-
<tr id="tr_image_browser_description_enable">
|
557 |
-
<td class="spider_label"><label><?php _e("Enable image description:", 'bwg_back'); ?> </label></td>
|
558 |
-
<td>
|
559 |
-
<input type="radio" name="image_browser_description_enable" id="image_browser_description_yes" value="1" <?php echo ($option_row->image_browser_description_enable) ? 'checked' : ''; ?> /><label for="image_browser_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
560 |
-
<input type="radio" name="image_browser_description_enable" id="image_browser_description_no" value="0" <?php echo ($option_row->image_browser_description_enable) ? '' : 'checked'; ?> /><label for="image_browser_description_no"><?php _e('No', 'bwg_back'); ?></label>
|
561 |
-
</td>
|
562 |
-
</tr>
|
563 |
-
|
564 |
-
<!--Blog Style view-->
|
565 |
-
<tr id="tr_blog_style_width_height">
|
566 |
-
<td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_width"><?php _e("Image width:", 'bwg_back'); ?> </label></td>
|
567 |
-
<td>
|
568 |
-
<input type="text" name="blog_style_width" id="blog_style_width" value="<?php echo $option_row->blog_style_width; ?>" class="spider_int_input" /> px
|
569 |
-
</td>
|
570 |
-
</tr>
|
571 |
-
<tr id="tr_blog_style_title_enable">
|
572 |
-
<td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
|
573 |
-
<td>
|
574 |
-
<input type="radio" name="blog_style_title_enable" id="blog_style_title_yes" value="1" <?php echo ($option_row->blog_style_title_enable) ? 'checked' : ''; ?> /><label for="blog_style_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
|
575 |
-
<input type="radio" name="blog_style_title_enable" id="blog_style_title_no" value="0" <?php echo ($option_row->blog_style_title_enable) ? '' : 'checked'; ?> /><label for="blog_style_title_no"><?php _e('No', 'bwg_back'); ?></label>
|
576 |
-
</td>
|
577 |
-
</tr>
|
578 |
-
<tr id="tr_blog_style_images_per_page">
|
579 |
-
<td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
|
580 |
-
<td><input type="text" name="blog_style_images_per_page" id="blog_style_images_per_page" value="<?php echo $option_row->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
|
581 |
-
</tr>
|
582 |
-
<tr id="tr_blog_style_enable_page">
|
583 |
-
<td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
|
584 |
-
<td>
|
585 |
-
<input type="radio" name="blog_style_enable_page" id="blog_style_page_yes" value="1" <?php echo ($option_row->blog_style_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
586 |
-
<input type="radio" name="blog_style_enable_page" id="blog_style_page_no" value="0" <?php echo ($option_row->blog_style_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_no"><?php _e('No', 'bwg_back'); ?></label>
|
587 |
-
<input type="radio" name="blog_style_enable_page" id="blog_style_page_loadmore" value="2" <?php echo ($option_row->blog_style_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_loadmore">Load more</label>
|
588 |
-
<input type="radio" name="blog_style_enable_page" id="blog_style_page_scrol_load" value="3" <?php echo ($option_row->blog_style_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
|
589 |
-
</td>
|
590 |
-
</tr>
|
591 |
-
<tr id="tr_blog_style_load_more_image_count">
|
592 |
-
<td class="spider_label"><label for="blog_style_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
|
593 |
-
<td><input type="text" name="blog_style_load_more_image_count" id="blog_style_load_more_image_count" value="<?php echo $option_row->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
|
594 |
-
</tr>
|
595 |
-
|
596 |
-
<!--Slideshow view-->
|
597 |
-
<tr id="tr_slideshow_effect">
|
598 |
-
<td class="spider_label"><label for="slideshow_effect"><?php _e("Slideshow Effect:", 'bwg_back'); ?> </label></td>
|
599 |
-
<td>
|
600 |
-
<select name="slideshow_effect" id="slideshow_effect" style="width:150px;">
|
601 |
-
<?php
|
602 |
-
foreach ($effects as $key => $effect) {
|
603 |
-
?>
|
604 |
-
<option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="' . __("This effect is disabled in free version.","bwg_back") . '"' : ''; ?> <?php echo ($option_row->slideshow_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
|
605 |
-
<?php
|
606 |
-
}
|
607 |
-
?>
|
608 |
-
</select>
|
609 |
-
</td>
|
610 |
-
</tr>
|
611 |
-
<tr id="tr_slideshow_interval">
|
612 |
-
<td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
|
613 |
-
<td><input type="text" name="slideshow_interval" id="slideshow_interval" value="<?php echo $option_row->slideshow_interval; ?>" class="spider_int_input" /> sec.</td>
|
614 |
-
</tr>
|
615 |
-
<tr id="tr_slideshow_width_height">
|
616 |
-
<td title="<?php _e("Maximum values for slideshow width and height.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_width"><?php _e("Slideshow dimensions:", 'bwg_back'); ?> </label></td>
|
617 |
-
<td>
|
618 |
-
<input type="text" name="slideshow_width" id="slideshow_width" value="<?php echo $option_row->slideshow_width; ?>" class="spider_int_input" /> x
|
619 |
-
<input type="text" name="slideshow_height" id="slideshow_height" value="<?php echo $option_row->slideshow_height; ?>" class="spider_int_input" /> px
|
620 |
-
</td>
|
621 |
-
</tr>
|
622 |
-
<tr id="tr_enable_slideshow_autoplay">
|
623 |
-
<td class="spider_label"><label><?php _e("Enable Autoplay:", 'bwg_back'); ?> </label></td>
|
624 |
-
<td>
|
625 |
-
<input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_yes" value="1" <?php echo ($option_row->slideshow_enable_autoplay) ? 'checked' : ''; ?> /><label for="slideshow_autoplay_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
626 |
-
<input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_no" value="0" <?php echo ($option_row->slideshow_enable_autoplay) ? '' : 'checked'; ?> /><label for="slideshow_autoplay_no"><?php _e('No', 'bwg_back'); ?></label>
|
627 |
-
</td>
|
628 |
-
</tr>
|
629 |
-
<tr id="tr_enable_slideshow_shuffle">
|
630 |
-
<td class="spider_label"><label><?php _e("Enable Shuffle:", 'bwg_back'); ?> </label></td>
|
631 |
-
<td>
|
632 |
-
<input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_yes" value="1" <?php echo ($option_row->slideshow_enable_shuffle) ? 'checked' : ''; ?> /><label for="slideshow_shuffle_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
633 |
-
<input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_no" value="0" <?php echo ($option_row->slideshow_enable_shuffle) ? '' : 'checked'; ?> /><label for="slideshow_shuffle_no"><?php _e('No', 'bwg_back'); ?></label>
|
634 |
-
</td>
|
635 |
-
</tr>
|
636 |
-
<tr id="tr_enable_slideshow_ctrl">
|
637 |
-
<td class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
|
638 |
-
<td>
|
639 |
-
<input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_yes" value="1" <?php echo ($option_row->slideshow_enable_ctrl) ? 'checked' : ''; ?> /><label for="slideshow_ctrl_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
640 |
-
<input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_no" value="0" <?php echo ($option_row->slideshow_enable_ctrl) ? '' : 'checked'; ?> /><label for="slideshow_ctrl_no"><?php _e('No', 'bwg_back'); ?></label>
|
641 |
-
</td>
|
642 |
-
</tr>
|
643 |
-
<tr id="tr_enable_slideshow_filmstrip">
|
644 |
-
<td title="<?php _e("Enable slideshow filmstrip view", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable slideshow filmstrip:", 'bwg_back'); ?> </label></td>
|
645 |
-
<td>
|
646 |
-
<input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_yes')" <?php echo ($option_row->slideshow_enable_filmstrip) ? 'checked' : ''; ?> /><label for="slideshow_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
647 |
-
<input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_no')" <?php echo ($option_row->slideshow_enable_filmstrip) ? '' : 'checked'; ?> /><label for="slideshow_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
|
648 |
-
</td>
|
649 |
-
</tr>
|
650 |
-
<tr id="tr_slideshow_filmstrip_height">
|
651 |
-
<td class="spider_label spider_free_version_label"><label for="slideshow_filmstrip_height"><?php _e("Slideshow Filmstrip size:", 'bwg_back'); ?> </label></td>
|
652 |
-
<td class="spider_free_version_label"><input disabled="disabled" type="text" name="slideshow_filmstrip_height" id="slideshow_filmstrip_height" value="<?php echo $option_row->slideshow_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
|
653 |
-
</tr>
|
654 |
-
</tbody>
|
655 |
-
</table>
|
656 |
-
</div>
|
657 |
-
<div class="bwg_short_div" style="border-right: 1px solid #000000;">
|
658 |
-
<table>
|
659 |
-
<!--Slideshow view-->
|
660 |
-
<tbody id="tbody_slideshow">
|
661 |
-
<tr id="tr_slideshow_enable_title">
|
662 |
-
<td class="spider_label"><label><?php _e("Enable Image Title:", 'bwg_back'); ?> </label></td>
|
663 |
-
<td>
|
664 |
-
<input type="radio" name="slideshow_enable_title" id="slideshow_title_yes" value="1" <?php echo ($option_row->slideshow_enable_title) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes')" /><label for="slideshow_title_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
665 |
-
<input type="radio" name="slideshow_enable_title" id="slideshow_title_no" value="0" <?php echo ($option_row->slideshow_enable_title) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_title_position', 'slideshow_title_no')" /><label for="slideshow_title_no"><?php _e('No', 'bwg_back'); ?></label>
|
666 |
-
</td>
|
667 |
-
</tr>
|
668 |
-
<tr id="tr_slideshow_title_position">
|
669 |
-
<td title="<?php _e("Image title position on slideshow", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Title Position:", 'bwg_back'); ?> </label></td>
|
670 |
-
<td>
|
671 |
-
<table class="bws_position_table">
|
672 |
-
<tbody>
|
673 |
-
<tr>
|
674 |
-
<td><input type="radio" value="top-left" id="slideshow_title_top-left" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'top-left') ? 'checked' : ''; ?>></td>
|
675 |
-
<td><input type="radio" value="top-center" id="slideshow_title_top-center" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'top-center') ? 'checked' : ''; ?>></td>
|
676 |
-
<td><input type="radio" value="top-right" id="slideshow_title_top-right" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'top-right') ? 'checked' : ''; ?>></td>
|
677 |
-
</tr>
|
678 |
-
<tr>
|
679 |
-
<td><input type="radio" value="middle-left" id="slideshow_title_middle-left" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'middle-left') ? 'checked' : ''; ?>></td>
|
680 |
-
<td><input type="radio" value="middle-center" id="slideshow_title_middle-center" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'middle-center') ? 'checked' : ''; ?>></td>
|
681 |
-
<td><input type="radio" value="middle-right" id="slideshow_title_middle-right" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'middle-right') ? 'checked' : ''; ?>></td>
|
682 |
-
</tr>
|
683 |
-
<tr>
|
684 |
-
<td><input type="radio" value="bottom-left" id="slideshow_title_bottom-left" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'bottom-left') ? 'checked' : ''; ?>></td>
|
685 |
-
<td><input type="radio" value="bottom-center" id="slideshow_title_bottom-center" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'bottom-center') ? 'checked' : ''; ?>></td>
|
686 |
-
<td><input type="radio" value="bottom-right" id="slideshow_title_bottom-right" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'bottom-right') ? 'checked' : ''; ?>></td>
|
687 |
-
</tr>
|
688 |
-
</tbody>
|
689 |
-
</table>
|
690 |
-
</td>
|
691 |
-
</tr>
|
692 |
-
<tr id="tr_slideshow_full_width_title">
|
693 |
-
<td title="<?php _e("Display image title based on the slideshow dimensions.", 'bwg_back'); ?>" class="spider_label">
|
694 |
-
<label><?php _e("Full width title:", 'bwg_back'); ?></label>
|
695 |
-
</td>
|
696 |
-
<td>
|
697 |
-
<input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_1" value="1" <?php if ($option_row->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
698 |
-
<input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_0" value="0" <?php if (!$option_row->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
|
699 |
-
</td>
|
700 |
-
</tr>
|
701 |
-
<tr id="tr_slideshow_enable_description">
|
702 |
-
<td class="spider_label"><label><?php _e("Enable Image Description:", 'bwg_back'); ?> </label></td>
|
703 |
-
<td>
|
704 |
-
<input type="radio" name="slideshow_enable_description" id="slideshow_description_yes" value="1" <?php echo ($option_row->slideshow_enable_description) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_description_position', 'slideshow_description_yes')" /><label for="slideshow_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
705 |
-
<input type="radio" name="slideshow_enable_description" id="slideshow_description_no" value="0" <?php echo ($option_row->slideshow_enable_description) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_description_position', 'slideshow_description_no')" /><label for="slideshow_description_no"><?php _e('No', 'bwg_back'); ?></label>
|
706 |
-
</td>
|
707 |
-
</tr>
|
708 |
-
<tr id="tr_slideshow_description_position">
|
709 |
-
<td title="<?php _e("Image description position on slideshow", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Description Position: ", 'bwg_back'); ?></label></td>
|
710 |
-
<td>
|
711 |
-
<table class="bws_position_table">
|
712 |
-
<tbody>
|
713 |
-
<tr>
|
714 |
-
<td><input type="radio" value="top-left" id="slideshow_description_top-left" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'top-left') ? 'checked' : ''; ?>></td>
|
715 |
-
<td><input type="radio" value="top-center" id="slideshow_description_top-center" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'top-center') ? 'checked' : ''; ?>></td>
|
716 |
-
<td><input type="radio" value="top-right" id="slideshow_description_top-right" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'top-right') ? 'checked' : ''; ?>></td>
|
717 |
-
</tr>
|
718 |
-
<tr>
|
719 |
-
<td><input type="radio" value="middle-left" id="slideshow_description_middle-left" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'middle-left') ? 'checked' : ''; ?>></td>
|
720 |
-
<td><input type="radio" value="middle-center" id="slideshow_description_middle-center" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'middle-center') ? 'checked' : ''; ?>></td>
|
721 |
-
<td><input type="radio" value="middle-right" id="slideshow_description_middle-right" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'middle-right') ? 'checked' : ''; ?>></td>
|
722 |
-
</tr>
|
723 |
-
<tr>
|
724 |
-
<td><input type="radio" value="bottom-left" id="slideshow_description_bottm-Left" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'bottom-left') ? 'checked' : ''; ?>></td>
|
725 |
-
<td><input type="radio" value="bottom-center" id="slideshow_description_bottom-center" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'bottom-center') ? 'checked' : ''; ?>></td>
|
726 |
-
<td><input type="radio" value="bottom-right" id="slideshow_description_bottm-right" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'bottom-right') ? 'checked' : ''; ?>></td>
|
727 |
-
</tr>
|
728 |
-
</tbody>
|
729 |
-
</table>
|
730 |
-
</td>
|
731 |
-
</tr>
|
732 |
-
<tr id="tr_enable_slideshow_music">
|
733 |
-
<td class="spider_label"><label><?php _e("Enable Slideshow Music:", 'bwg_back'); ?> </label></td>
|
734 |
-
<td>
|
735 |
-
<input type="radio" name="enable_slideshow_music" id="slideshow_music_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_music_url', 'slideshow_music_yes')" <?php echo ($option_row->slideshow_enable_music) ? 'checked' : ''; ?> /><label for="slideshow_music_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
736 |
-
<input type="radio" name="enable_slideshow_music" id="slideshow_music_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_music_url', 'slideshow_music_no')" <?php echo ($option_row->slideshow_enable_music) ? '' : 'checked'; ?> /><label for="slideshow_music_no"><?php _e('No', 'bwg_back'); ?></label>
|
737 |
-
</td>
|
738 |
-
</tr>
|
739 |
-
<tr id="tr_slideshow_music_url">
|
740 |
-
<td title="<?php _e("Enter absolute audio file url or add file from Options page.", 'bwg_back'); ?>" class="spider_label">
|
741 |
-
<label for="slideshow_music_url"><?php _e("Music url:", 'bwg_back'); ?> </label>
|
742 |
-
</td>
|
743 |
-
<td>
|
744 |
-
<input type="text" id="slideshow_music_url" name="slideshow_music_url" value="<?php echo $option_row->slideshow_audio_url; ?>" style="display:inline-block;" />
|
745 |
-
</td>
|
746 |
-
</tr>
|
747 |
-
</tbody>
|
748 |
-
|
749 |
-
<!--Lightbox view-->
|
750 |
-
<tbody id="tbody_popup_other">
|
751 |
-
<tr id="tr_thumb_click_action">
|
752 |
-
<td class="spider_label"><label><?php _e("Thumb click action:", 'bwg_back'); ?> </label></td>
|
753 |
-
<td>
|
754 |
-
<input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($option_row->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label><br />
|
755 |
-
<input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($option_row->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label><br />
|
756 |
-
<input type="radio" name="thumb_click_action" id="thumb_click_action_3" value="do_nothing" <?php if ($option_row->thumb_click_action == 'do_nothing') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_3"><?php _e("Do Nothing", 'bwg_back'); ?></label>
|
757 |
-
</td>
|
758 |
-
</tr>
|
759 |
-
<tr id="tr_thumb_link_target">
|
760 |
-
<td title="<?php _e("Open new window when redirecting.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Open in new window:", 'bwg_back'); ?> </label></td>
|
761 |
-
<td>
|
762 |
-
<input type="radio" name="thumb_link_target" id="thumb_link_target_yes" value="1" <?php if ($option_row->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
763 |
-
<input type="radio" name="thumb_link_target" id="thumb_link_target_no" value="0" <?php if (!$option_row->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_no"><?php _e('No', 'bwg_back'); ?></label>
|
764 |
-
</td>
|
765 |
-
</tr>
|
766 |
-
</tbody>
|
767 |
-
<tbody id="tbody_popup">
|
768 |
-
<tr id="tr_popup_fullscreen">
|
769 |
-
<td title="<?php _e("Enable full width feature for the lightbox.", 'bwg_back'); ?>" class="spider_label">
|
770 |
-
<label><?php _e("Full width lightbox:", 'bwg_back'); ?></label>
|
771 |
-
</td>
|
772 |
-
<td>
|
773 |
-
<input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($option_row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
774 |
-
<input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$option_row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_0"><?php _e('No', 'bwg_back'); ?></label>
|
775 |
-
</td>
|
776 |
-
</tr>
|
777 |
-
<tr id="tr_popup_width_height">
|
778 |
-
<td title="<?php _e("Maximum values for lightbox width and height.", 'bwg_back'); ?>" class="spider_label"><label for="popup_width"><?php _e("Lightbox dimensions:", 'bwg_back'); ?> </label></td>
|
779 |
-
<td>
|
780 |
-
<input type="text" name="popup_width" id="popup_width" value="<?php echo $option_row->popup_width; ?>" class="spider_int_input" /> x
|
781 |
-
<input type="text" name="popup_height" id="popup_height" value="<?php echo $option_row->popup_height; ?>" class="spider_int_input" /> px
|
782 |
-
</td>
|
783 |
-
</tr>
|
784 |
-
<tr id="tr_popup_effect">
|
785 |
-
<td title="<?php _e("Lightbox slideshow effect.", 'bwg_back'); ?>" class="spider_label"><label for="popup_effect"><?php _e("Lightbox effect:", 'bwg_back'); ?> </label></td>
|
786 |
-
<td>
|
787 |
-
<select name="popup_effect" id="popup_effect" style="width:150px;">
|
788 |
-
<?php
|
789 |
-
foreach ($effects as $key => $effect) {
|
790 |
-
?>
|
791 |
-
<option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="This effect is disabled in free version."' : ''; ?> <?php echo ($option_row->popup_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
|
792 |
-
<?php
|
793 |
-
}
|
794 |
-
?>
|
795 |
-
</select>
|
796 |
-
</td>
|
797 |
-
</tr>
|
798 |
-
<tr id="tr_popup_autoplay">
|
799 |
-
<td class="spider_label">
|
800 |
-
<label><?php _e("Lightbox autoplay:", 'bwg_back'); ?> </label>
|
801 |
-
</td>
|
802 |
-
<td>
|
803 |
-
<input type="radio" name="popup_autoplay" id="popup_autoplay_1" value="1" <?php if ($option_row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
804 |
-
<input type="radio" name="popup_autoplay" id="popup_autoplay_0" value="0" <?php if (!$option_row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_0"><?php _e('No', 'bwg_back'); ?></label>
|
805 |
-
</td>
|
806 |
-
</tr>
|
807 |
-
<tr id="tr_popup_interval">
|
808 |
-
<td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="popup_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
|
809 |
-
<td><input type="text" name="popup_interval" id="popup_interval" value="<?php echo $option_row->popup_interval; ?>" class="spider_int_input" /> sec.</td>
|
810 |
-
</tr>
|
811 |
-
<tr id="tr_popup_enable_filmstrip">
|
812 |
-
<td title="<?php _e("Enable filmstrip view for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable filmstrip in lightbox:", 'bwg_back'); ?> </label></td>
|
813 |
-
<td>
|
814 |
-
<input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_filmstrip_yes')" <?php echo ($option_row->popup_enable_filmstrip) ? 'checked' : ''; ?> /><label for="popup_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
815 |
-
<input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_popup_filmstrip_height', 'popup_filmstrip_no')" <?php echo ($option_row->popup_enable_filmstrip) ? '' : 'checked'; ?> /><label for="popup_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
|
816 |
-
</td>
|
817 |
-
</tr>
|
818 |
-
<tr id="tr_popup_filmstrip_height">
|
819 |
-
<td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="popup_filmstrip_height"><?php _e("Filmstrip size:", 'bwg_back'); ?> </label></td>
|
820 |
-
<td class="spider_free_version_label"><input disabled="disabled" type="text" name="popup_filmstrip_height" id="popup_filmstrip_height" value="<?php echo $option_row->popup_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
|
821 |
-
</tr>
|
822 |
-
<tr id="tr_popup_hit_counter">
|
823 |
-
<td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Display hit counter:", 'bwg_back'); ?> </label></td>
|
824 |
-
<td>
|
825 |
-
<input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_yes" value="1" <?php echo ($option_row->popup_hit_counter) ? 'checked' : ''; ?> /><label for="popup_hit_counter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
826 |
-
<input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_no" value="0" <?php echo ($option_row->popup_hit_counter) ? '' : 'checked'; ?> /><label for="popup_hit_counter_no"><?php _e('No', 'bwg_back'); ?></label>
|
827 |
-
</td>
|
828 |
-
</tr>
|
829 |
-
<tr id="tr_popup_enable_ctrl_btn">
|
830 |
-
<td title="<?php _e("Enable control buttons in lightbox", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
|
831 |
-
<td>
|
832 |
-
<input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_yes" value="1" onClick="bwg_enable_disable('', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_yes');" <?php echo ($option_row->popup_enable_ctrl_btn) ? 'checked' : ''; ?> /><label for="popup_ctrl_btn_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
833 |
-
<input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_no" value="0" onClick="bwg_enable_disable('none', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_no');" <?php echo ($option_row->popup_enable_ctrl_btn) ? '' : 'checked'; ?> /><label for="popup_ctrl_btn_no"><?php _e('No', 'bwg_back'); ?></label>
|
834 |
-
</td>
|
835 |
-
</tr>
|
836 |
-
</tbody>
|
837 |
-
<tbody id="tbody_popup_ctrl_btn">
|
838 |
-
<tr id="tr_popup_enable_fullscreen">
|
839 |
-
<td title="<?php _e("Enable fullscreen view for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable fullscreen:", 'bwg_back'); ?> </label></td>
|
840 |
-
<td>
|
841 |
-
<input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_yes" value="1" <?php echo ($option_row->popup_enable_fullscreen) ? 'checked' : ''; ?> /><label for="popup_fullscreen_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
842 |
-
<input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_no" value="0" <?php echo ($option_row->popup_enable_fullscreen) ? '' : 'checked'; ?> /><label for="popup_fullscreen_no"><?php _e('No', 'bwg_back'); ?></label>
|
843 |
-
</td>
|
844 |
-
</tr>
|
845 |
-
<tr id="tr_popup_enable_info">
|
846 |
-
<td title="<?php _e("Enable title, description for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable info:", 'bwg_back'); ?> </label></td>
|
847 |
-
<td>
|
848 |
-
<input type="radio" name="popup_enable_info" id="popup_info_yes" value="1" <?php echo ($option_row->popup_enable_info) ? 'checked="checked"' : ''; ?> /><label for="popup_info_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
849 |
-
<input type="radio" name="popup_enable_info" id="popup_info_no" value="0" <?php echo ($option_row->popup_enable_info) ? '' : 'checked="checked"'; ?> /><label for="popup_info_no"><?php _e('No', 'bwg_back'); ?></label>
|
850 |
-
</td>
|
851 |
-
</tr>
|
852 |
-
<tr id="tr_popup_info_always_show">
|
853 |
-
<td class="spider_label"><label><?php _e("Display info by default:", 'bwg_back'); ?> </label></td>
|
854 |
-
<td>
|
855 |
-
<input type="radio" name="popup_info_always_show" id="popup_info_always_show_yes" value="1" <?php echo ($option_row->popup_info_always_show) ? 'checked="checked"' : ''; ?> /><label for="popup_info_always_show_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
856 |
-
<input type="radio" name="popup_info_always_show" id="popup_info_always_show_no" value="0" <?php echo ($option_row->popup_info_always_show) ? '' : 'checked="checked"'; ?> /><label for="popup_info_always_show_no"><?php _e('No', 'bwg_back'); ?></label>
|
857 |
-
</td>
|
858 |
-
</tr>
|
859 |
-
<tr id="tr_popup_info_full_width">
|
860 |
-
<td title="<?php _e("Display image information based on the lightbox dimensions.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Full width info:", 'bwg_back'); ?></label></td>
|
861 |
-
<td>
|
862 |
-
<input type="radio" name="popup_info_full_width" id="popup_info_full_width_1" value="1" <?php if ($option_row->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
863 |
-
<input type="radio" name="popup_info_full_width" id="popup_info_full_width_0" value="0" <?php if (!$option_row->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
|
864 |
-
</td>
|
865 |
-
</tr>
|
866 |
-
<tr id="tr_popup_enable_rate">
|
867 |
-
<td title="<?php _e("Enable rating for images", 'bwg_back'); ?><br /><br />This option is disabled in free version." class="spider_label spider_free_version_label"><label><?php _e("Enable rating:", 'bwg_back'); ?> </label></td>
|
868 |
-
<td>
|
869 |
-
<input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_yes" value="1" <?php echo ($option_row->popup_enable_rate) ? 'checked="checked"' : ''; ?> /><label for="popup_rate_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
870 |
-
<input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_no" value="0" <?php echo ($option_row->popup_enable_rate) ? '' : 'checked="checked"'; ?> /><label for="popup_rate_no"><?php _e('No', 'bwg_back'); ?></label>
|
871 |
-
</td>
|
872 |
-
</tr>
|
873 |
-
<tr id="tr_popup_enable_comment">
|
874 |
-
<td title="<?php _e("Enable comments for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable comments:", 'bwg_back'); ?> </label></td>
|
875 |
-
<td>
|
876 |
-
<input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_yes" value="1" <?php echo ($option_row->popup_enable_comment) ? 'checked' : ''; ?> /><label for="popup_comment_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
877 |
-
<input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_no" value="0" <?php echo ($option_row->popup_enable_comment) ? '' : 'checked'; ?> /><label for="popup_comment_no"><?php _e('No', 'bwg_back'); ?></label>
|
878 |
-
</td>
|
879 |
-
</tr>
|
880 |
-
<tr id="tr_popup_enable_facebook">
|
881 |
-
<td title="<?php _e("Enable Facebook share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Facebook button:", 'bwg_back'); ?> </label></td>
|
882 |
-
<td>
|
883 |
-
<input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_yes" value="1" <?php echo ($option_row->popup_enable_facebook) ? 'checked' : ''; ?> /><label for="popup_facebook_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
884 |
-
<input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_no" value="0" <?php echo ($option_row->popup_enable_facebook) ? '' : 'checked'; ?> /><label for="popup_facebook_no"><?php _e('No', 'bwg_back'); ?></label>
|
885 |
-
</td>
|
886 |
-
</tr>
|
887 |
-
<tr id="tr_popup_enable_twitter">
|
888 |
-
<td title="<?php _e("Enable Twitter share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Twitter button:", 'bwg_back'); ?> </label></td>
|
889 |
-
<td>
|
890 |
-
<input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_yes" value="1" <?php echo ($option_row->popup_enable_twitter) ? 'checked' : ''; ?> /><label for="popup_twitter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
891 |
-
<input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_no" value="0" <?php echo ($option_row->popup_enable_twitter) ? '' : 'checked'; ?> /><label for="popup_twitter_no"><?php _e('No', 'bwg_back'); ?></label>
|
892 |
-
</td>
|
893 |
-
</tr>
|
894 |
-
<tr id="tr_popup_enable_google">
|
895 |
-
<td title="<?php _e("Enable Google+ share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Google+ button:", 'bwg_back'); ?> </label></td>
|
896 |
-
<td>
|
897 |
-
<input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_yes" value="1" <?php echo ($option_row->popup_enable_google) ? 'checked' : ''; ?> /><label for="popup_google_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
898 |
-
<input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_no" value="0" <?php echo ($option_row->popup_enable_google) ? '' : 'checked'; ?> /><label for="popup_google_no"><?php _e('No', 'bwg_back'); ?></label>
|
899 |
-
</td>
|
900 |
-
</tr>
|
901 |
-
<tr id="tr_popup_enable_pinterest">
|
902 |
-
<td title="<?php _e("Enable Pinterest share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Pinterest button:", 'bwg_back'); ?> </label></td>
|
903 |
-
<td>
|
904 |
-
<input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_yes" value="1" <?php echo ($option_row->popup_enable_pinterest) ? 'checked' : ''; ?> /><label for="popup_pinterest_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
905 |
-
<input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_no" value="0" <?php echo ($option_row->popup_enable_pinterest) ? '' : 'checked'; ?> /><label for="popup_pinterest_no"><?php _e('No', 'bwg_back'); ?></label>
|
906 |
-
</td>
|
907 |
-
</tr>
|
908 |
-
<tr id="tr_popup_enable_tumblr">
|
909 |
-
<td title="<?php _e("Enable Tumblr share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Tumblr button:", 'bwg_back'); ?> </label></td>
|
910 |
-
<td>
|
911 |
-
<input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_yes" value="1" <?php echo ($option_row->popup_enable_tumblr) ? 'checked' : ''; ?> /><label for="popup_tumblr_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
912 |
-
<input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_no" value="0" <?php echo ($option_row->popup_enable_tumblr) ? '' : 'checked'; ?> /><label for="popup_tumblr_no"><?php _e('No', 'bwg_back'); ?></label>
|
913 |
-
</td>
|
914 |
-
</tr>
|
915 |
-
</tbody>
|
916 |
-
</table>
|
917 |
-
</div>
|
918 |
-
<div class="bwg_short_div">
|
919 |
-
<table>
|
920 |
-
<tbody>
|
921 |
-
<tr id="tr_watermark_type">
|
922 |
-
<td class="spider_label"><label><?php _e("Advertisement Type:", 'bwg_back'); ?> </label></td>
|
923 |
-
<td>
|
924 |
-
<input type="radio" name="watermark_type" id="watermark_type_none" value="none" onClick="bwg_watermark('watermark_type_none')" <?php echo ($option_row->watermark_type == 'none') ? 'checked' : ''; ?> /><label for="watermark_type_none"><?php _e("None", 'bwg_back'); ?></label>
|
925 |
-
<input type="radio" name="watermark_type" id="watermark_type_text" value="text" onClick="bwg_watermark('watermark_type_text')" <?php echo ($option_row->watermark_type == 'text') ? 'checked' : '';
|
926 |
-
<input type="radio" name="watermark_type" id="watermark_type_image" value="image" onClick="bwg_watermark('watermark_type_image')" <?php echo ($option_row->watermark_type == 'image') ? 'checked' : ''; ?> /><label for="watermark_type_image"><?php _e("Image", 'bwg_back'); ?></label>
|
927 |
-
</td>
|
928 |
-
</tr>
|
929 |
-
<tr id="tr_watermark_link">
|
930 |
-
<td title="<?php _e("Enter absolute url", 'bwg_back'); ?>, e.g. http://www.example.com" class="spider_label">
|
931 |
-
<label for="watermark_link"><?php _e("Advertisement link:", 'bwg_back'); ?> </label>
|
932 |
-
</td>
|
933 |
-
<td>
|
934 |
-
<input type="text" id="watermark_link" name="watermark_link" value="<?php echo $option_row->watermark_link; ?>" style="display:inline-block;" />
|
935 |
-
</td>
|
936 |
-
</tr>
|
937 |
-
<tr id="tr_watermark_url">
|
938 |
-
<td title="<?php _e("Enter absolute image file url or add file from Options page.", 'bwg_back'); ?>" class="spider_label">
|
939 |
-
<label for="watermark_url"><?php _e("Advertisement url:", 'bwg_back'); ?> </label>
|
940 |
-
</td>
|
941 |
-
<td>
|
942 |
-
<input type="text" id="watermark_url" name="watermark_url" value="<?php echo $option_row->watermark_url; ?>" style="display:inline-block;" />
|
943 |
-
</td>
|
944 |
-
</tr>
|
945 |
-
<tr id="tr_watermark_width_height">
|
946 |
-
<td title="<?php _e("Maximum values for watermark image width and height.", 'bwg_back'); ?>" class="spider_label"><label for="watermark_width"><?php _e("Advertisement dimensions:", 'bwg_back'); ?> </label></td>
|
947 |
-
<td>
|
948 |
-
<input type="text" name="watermark_width" id="watermark_width" value="<?php echo $option_row->watermark_width; ?>" class="spider_int_input" /> x
|
949 |
-
<input type="text" name="watermark_height" id="watermark_height" value="<?php echo $option_row->watermark_height; ?>" class="spider_int_input" /> px
|
950 |
-
</td>
|
951 |
-
</tr>
|
952 |
-
<tr id="tr_watermark_text">
|
953 |
-
<td class="spider_label"><label for="watermark_text"><?php _e("Advertisement text:", 'bwg_back'); ?> </label></td>
|
954 |
-
<td>
|
955 |
-
<input type="text" name="watermark_text" id="watermark_text" value="<?php echo $option_row->watermark_text; ?>" />
|
956 |
-
</td>
|
957 |
-
</tr>
|
958 |
-
<tr id="tr_watermark_font_size">
|
959 |
-
<td class="spider_label"><label for="watermark_font_size"><?php _e("Advertisement font size:", 'bwg_back'); ?> </label></td>
|
960 |
-
<td>
|
961 |
-
<input type="text" name="watermark_font_size" id="watermark_font_size" value="<?php echo $option_row->watermark_font_size; ?>" class="spider_int_input" /> px
|
962 |
-
</td>
|
963 |
-
</tr>
|
964 |
-
<tr id="tr_watermark_font">
|
965 |
-
<td class="spider_label"><label for="watermark_font"><?php _e("Advertisement font style:", 'bwg_back'); ?> </label></td>
|
966 |
-
<td>
|
967 |
-
<select name="watermark_font" id="watermark_font" style="width:150px;">
|
968 |
-
<?php
|
969 |
-
foreach ($watermark_fonts as $watermark_font) {
|
970 |
-
?>
|
971 |
-
<option value="<?php echo $watermark_font; ?>" <?php echo ($option_row->watermark_font == $watermark_font) ? 'selected' : ''; ?>><?php echo $watermark_font; ?></option>
|
972 |
-
<?php
|
973 |
-
}
|
974 |
-
?>
|
975 |
-
</select>
|
976 |
-
</td>
|
977 |
-
</tr>
|
978 |
-
<tr id="tr_watermark_color">
|
979 |
-
<td class="spider_label"><label for="watermark_color"><?php _e("Advertisement color:", 'bwg_back'); ?> </label></td>
|
980 |
-
<td>
|
981 |
-
<input type="text" name="watermark_color" id="watermark_color" value="<?php echo $option_row->watermark_color; ?>" class="color" />
|
982 |
-
</td>
|
983 |
-
</tr>
|
984 |
-
<tr id="tr_watermark_opacity">
|
985 |
-
<td title="<?php _e("Value must be between 0 to 100.", 'bwg_back'); ?>" class="spider_label"><label for="watermark_opacity"><?php _e("Advertisement opacity:", 'bwg_back'); ?> </label></td>
|
986 |
-
<td>
|
987 |
-
<input type="text" name="watermark_opacity" id="watermark_opacity" value="<?php echo $option_row->watermark_opacity; ?>" class="spider_int_input" /> %
|
988 |
-
</td>
|
989 |
-
</tr>
|
990 |
-
<tr id="tr_watermark_position">
|
991 |
-
<td class="spider_label"><label><?php _e("Advertisement Position:", 'bwg_back'); ?> </label></td>
|
992 |
-
<td>
|
993 |
-
<table class="bws_position_table">
|
994 |
-
<tbody>
|
995 |
-
<tr>
|
996 |
-
<td><input type="radio" value="top-left" id="watermark_top-left" name="watermark_position" <?php echo ($option_row->watermark_position == 'top-left') ? 'checked' : ''; ?>></td>
|
997 |
-
<td><input type="radio" value="top-center" id="watermark_top-center" name="watermark_position" <?php echo ($option_row->watermark_position == 'top-center') ? 'checked' : ''; ?>></td>
|
998 |
-
<td><input type="radio" value="top-right" id="watermark_top-right" name="watermark_position" <?php echo ($option_row->watermark_position == 'top-right') ? 'checked' : ''; ?>></td>
|
999 |
-
</tr>
|
1000 |
-
<tr>
|
1001 |
-
<td><input type="radio" value="middle-left" id="watermark_middle-left" name="watermark_position" <?php echo ($option_row->watermark_position == 'middle-left') ? 'checked' : ''; ?>></td>
|
1002 |
-
<td><input type="radio" value="middle-center" id="watermark_middle-center" name="watermark_position" <?php echo ($option_row->watermark_position == 'middle-center') ? 'checked' : ''; ?>></td>
|
1003 |
-
<td><input type="radio" value="middle-right" id="watermark_middle-right" name="watermark_position" <?php echo ($option_row->watermark_position == 'middle-right') ? 'checked' : ''; ?>></td>
|
1004 |
-
</tr>
|
1005 |
-
<tr>
|
1006 |
-
<td><input type="radio" value="bottom-left" id="watermark_bottom-left" name="watermark_position" <?php echo ($option_row->watermark_position == 'bottom-left') ? 'checked' : ''; ?>></td>
|
1007 |
-
<td><input type="radio" value="bottom-center" id="watermark_bottom-center" name="watermark_position" <?php echo ($option_row->watermark_position == 'bottom-center') ? 'checked' : ''; ?>></td>
|
1008 |
-
<td><input type="radio" value="bottom-right" id="watermark_bottom-right" name="watermark_position" <?php echo ($option_row->watermark_position == 'bottom-right') ? 'checked' : ''; ?>></td>
|
1009 |
-
</tr>
|
1010 |
-
</tbody>
|
1011 |
-
</table>
|
1012 |
-
</td>
|
1013 |
-
</tr>
|
1014 |
-
</tbody>
|
1015 |
-
</table>
|
1016 |
-
</div>
|
1017 |
-
<?php
|
1018 |
-
if (!$from_menu) {
|
1019 |
-
?>
|
1020 |
-
</div>
|
1021 |
-
</div>
|
1022 |
-
<div class="mceActionPanel">
|
1023 |
-
<div style="float:left;">
|
1024 |
-
<a id="bwg_pro_version_link" class="button button-primary" target="_blank" style="line-height: 25px; padding: 0 5px; text-decoration: none; vertical-align: middle; width: inherit; float: left;" href="http://wpdemo.web-dorado.com/thumbnails-view-2/"><?php _e("Please see Pro ", 'bwg_back'); ?><span id="bwg_pro_version"><?php _e("Thumbnail", 'bwg_back'); ?></span> <?php _e("View", 'bwg_back'); ?></a>
|
1025 |
-
</div>
|
1026 |
-
<div style="float:right;">
|
1027 |
-
<input type="button" id="insert" name="insert" value="<?php _e("Insert", 'bwg_back'); ?>" onClick="bwg_insert_shortcode('');" />
|
1028 |
-
<input type="button" id="cancel" name="cancel" value="<?php _e("Cancel", 'bwg_back'); ?>" onClick="tinyMCEPopup.close();" />
|
1029 |
-
</div>
|
1030 |
-
</div>
|
1031 |
-
<?php
|
1032 |
-
}
|
1033 |
-
else {
|
1034 |
-
$tagtext = '';
|
1035 |
-
$tagfunction = '';
|
1036 |
-
if (isset($_POST['currrent_id'])) {
|
1037 |
-
$currrent_id = stripslashes($_POST['currrent_id']);
|
1038 |
-
$title = ((isset($_POST['title'])) ? stripslashes($_POST['title']) : '');
|
1039 |
-
$tagtext = '[Best_Wordpress_Gallery id="' . $currrent_id . '"' . $title . ']';
|
1040 |
-
$tagfunction = "<?php echo photo_gallery(" . $currrent_id . "); ?>";
|
1041 |
-
}
|
1042 |
-
?>
|
1043 |
-
<hr style="float: left; width: 100%;" />
|
1044 |
-
<span style="float: left; width: 100%;">
|
1045 |
-
<a id="bwg_pro_version_link" class="button button-primary" target="_blank" style="display: table; margin-bottom: 5px;" href="https://web-dorado.com/files/fromPhotoGallery.php"><?php _e("Please see Pro", 'bwg_back'); ?> <span id="bwg_pro_version"><?php _e("Thumbnail", 'bwg_back'); ?></span> <?php _e("View", 'bwg_back'); ?></a>
|
1046 |
-
<input type="button" class="button-primary" id="insert" name="insert" value="<?php echo __("Generate", 'bwg_back'); ?>" onclick="bwg_insert_shortcode('');" />
|
1047 |
-
<input type="button" class="button-secondary" id="import" name="import" value="<?php echo __("Import", 'bwg_back'); ?>" onclick="bwg_update_shortcode()" />
|
1048 |
-
<div>
|
1049 |
-
<input type="text" size="55" id="bwg_shortcode" name="bwg_shortcode" value='<?php echo $tagtext; ?>' onclick="bwg_onKeyDown(event)" />
|
1050 |
-
<b><?php _e("Shortcode", 'bwg_back'); ?></b>
|
1051 |
-
</div>
|
1052 |
-
<div>
|
1053 |
-
<input type="text" size="55" id="bwg_function" name="bwg_function" value="<?php echo $tagfunction; ?>" onclick="spider_select_value(this)" readonly="readonly" />
|
1054 |
-
<b><?php _e("PHP function", 'bwg_back'); ?></b>
|
1055 |
-
</div>
|
1056 |
-
</span>
|
1057 |
-
</div>
|
1058 |
-
<?php
|
1059 |
-
}
|
1060 |
-
?>
|
1061 |
-
<input type="hidden" id="tagtext" name="tagtext" value="" />
|
1062 |
-
<input type="hidden" id="currrent_id" name="currrent_id" value="" />
|
1063 |
-
<input type="hidden" id="title" name="title" value="" />
|
1064 |
-
<input type="hidden" id="bwg_insert" name="bwg_insert" value="" />
|
1065 |
-
<input type="hidden" id="task" name="task" value="" />
|
1066 |
-
</form>
|
1067 |
-
<script type="text/javascript">
|
1068 |
-
var shortcodes = [];
|
1069 |
-
var shortcode_id = 1;
|
1070 |
-
<?php
|
1071 |
-
foreach ($shortcodes as $shortcode) {
|
1072 |
-
?>
|
1073 |
-
shortcodes[<?php echo $shortcode->id; ?>] = '<?php echo addslashes($shortcode->tagtext); ?>';
|
1074 |
-
<?php
|
1075 |
-
}
|
1076 |
-
?>
|
1077 |
-
shortcode_id = <?php echo $shortcode_max_id + 1; ?>;
|
1078 |
-
window.onload = bwg_shortcode_load;
|
1079 |
-
var params = get_params("Best_Wordpress_Gallery");
|
1080 |
-
var bwg_insert = 1;
|
1081 |
-
bwg_update_shortcode();
|
1082 |
-
<?php if (!$from_menu) { ?>
|
1083 |
-
var content = tinyMCE.activeEditor.selection.getContent();
|
1084 |
-
<?php } else { ?>
|
1085 |
-
var content = jQuery("#bwg_shortcode").val();
|
1086 |
-
<?php } ?>
|
1087 |
-
function bwg_update_shortcode() {
|
1088 |
-
params = get_params("Best_Wordpress_Gallery");
|
1089 |
-
if (!params) { // Insert.
|
1090 |
-
<?php if (!$from_menu) { ?>
|
1091 |
-
jQuery('#insert').val('Insert');
|
1092 |
-
<?php } ?>
|
1093 |
-
bwg_gallery_type('thumbnails');
|
1094 |
-
}
|
1095 |
-
else { // Update.
|
1096 |
-
if (params['id']) {
|
1097 |
-
shortcode_id = params['id'];
|
1098 |
-
if(typeof shortcodes[shortcode_id] === 'undefined'){
|
1099 |
-
alert("<?php _e('There is No shortcode with such', 'bwg_back'); ?> ID!");
|
1100 |
-
bwg_gallery_type('thumbnails');
|
1101 |
-
return 0;
|
1102 |
-
}
|
1103 |
-
var short_code = get_short_params(shortcodes[shortcode_id]);
|
1104 |
-
bwg_insert = 0;
|
1105 |
-
}
|
1106 |
-
else {
|
1107 |
-
var short_code = get_params("Best_Wordpress_Gallery");
|
1108 |
-
}
|
1109 |
-
<?php if (!$from_menu) { ?>
|
1110 |
-
jQuery('#insert').val('Update');
|
1111 |
-
<?php } else { ?>
|
1112 |
-
content = jQuery("#bwg_shortcode").val();
|
1113 |
-
<?php } ?>
|
1114 |
-
jQuery('#insert').attr('onclick', "bwg_insert_shortcode(content)");
|
1115 |
-
jQuery("select[id=theme] option[value='" + short_code['theme_id'] + "']").attr('selected', 'selected');
|
1116 |
-
switch (short_code['gallery_type']) {
|
1117 |
-
case 'thumbnails': {
|
1118 |
-
jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
|
1119 |
-
jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
|
1120 |
-
if (short_code['order_by'] == 'asc') {
|
1121 |
-
jQuery("#order_by_1").attr('checked', 'checked');
|
1122 |
-
}
|
1123 |
-
else {
|
1124 |
-
jQuery("#order_by_0").attr('checked', 'checked');
|
1125 |
-
}
|
1126 |
-
if (short_code['show_search_box'] == 1) {
|
1127 |
-
jQuery("#show_search_box_1").attr('checked', 'checked');
|
1128 |
-
jQuery("#tr_search_box_width").css('display', '');
|
1129 |
-
}
|
1130 |
-
else {
|
1131 |
-
jQuery("#show_search_box_0").attr('checked', 'checked');
|
1132 |
-
jQuery("#tr_search_box_width").css('display', 'none');
|
1133 |
-
}
|
1134 |
-
if (short_code['show_sort_images'] == 1) {
|
1135 |
-
jQuery("#show_sort_images_1").attr('checked', 'checked');
|
1136 |
-
}
|
1137 |
-
else {
|
1138 |
-
jQuery("#show_sort_images_0").attr('checked', 'checked');
|
1139 |
-
}
|
1140 |
-
if (short_code['show_tag_box'] == 1) {
|
1141 |
-
jQuery("#show_tag_box_1").attr('checked', 'checked');
|
1142 |
-
}
|
1143 |
-
else {
|
1144 |
-
jQuery("#show_tag_box_0").attr('checked', 'checked');
|
1145 |
-
}
|
1146 |
-
if (short_code['search_box_width']) {
|
1147 |
-
jQuery("#search_box_width").val(short_code['search_box_width']);
|
1148 |
-
}
|
1149 |
-
jQuery("#image_column_number").val(short_code['image_column_number']);
|
1150 |
-
jQuery("#images_per_page").val(short_code['images_per_page']);
|
1151 |
-
jQuery("#load_more_image_count").val(short_code['load_more_image_count']);
|
1152 |
-
jQuery("#image_title_" + short_code['image_title']).attr('checked', 'checked');
|
1153 |
-
if (short_code['image_enable_page'] == 1) {
|
1154 |
-
jQuery("#image_page_yes").attr('checked', 'checked');
|
1155 |
-
}
|
1156 |
-
else if (short_code['image_enable_page'] == 0) {
|
1157 |
-
jQuery("#image_page_no").attr('checked', 'checked');
|
1158 |
-
}
|
1159 |
-
else if (short_code['image_enable_page'] == 2) {
|
1160 |
-
jQuery("#image_page_loadmore").attr('checked', 'checked');
|
1161 |
-
}
|
1162 |
-
else if (short_code['image_enable_page'] == 3) {
|
1163 |
-
jQuery("#image_page_scrol_load").attr('checked', 'checked');
|
1164 |
-
}
|
1165 |
-
jQuery("#thumb_width").val(short_code['thumb_width']);
|
1166 |
-
jQuery("#thumb_height").val(short_code['thumb_height']);
|
1167 |
-
break;
|
1168 |
-
|
1169 |
-
}
|
1170 |
-
case 'slideshow': {
|
1171 |
-
jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
|
1172 |
-
jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
|
1173 |
-
if (short_code['order_by'] == 'asc') {
|
1174 |
-
jQuery("#order_by_1").attr('checked', 'checked');
|
1175 |
-
}
|
1176 |
-
else {
|
1177 |
-
jQuery("#order_by_0").attr('checked', 'checked');
|
1178 |
-
}
|
1179 |
-
jQuery("select[id=slideshow_effect] option[value='" + short_code['slideshow_effect'] + "']").attr('selected', 'selected');
|
1180 |
-
jQuery("#slideshow_interval").val(short_code['slideshow_interval']);
|
1181 |
-
jQuery("#slideshow_width").val(short_code['slideshow_width']);
|
1182 |
-
jQuery("#slideshow_height").val(short_code['slideshow_height']);
|
1183 |
-
if (short_code['enable_slideshow_autoplay'] == 1) {
|
1184 |
-
jQuery("#slideshow_autoplay_yes").attr('checked', 'checked');
|
1185 |
-
}
|
1186 |
-
else {
|
1187 |
-
jQuery("#slideshow_autoplay_no").attr('checked', 'checked');
|
1188 |
-
}
|
1189 |
-
if (short_code['enable_slideshow_shuffle'] == 1) {
|
1190 |
-
jQuery("#slideshow_shuffle_yes").attr('checked', 'checked');
|
1191 |
-
}
|
1192 |
-
else {
|
1193 |
-
jQuery("#slideshow_shuffle_no").attr('checked', 'checked');
|
1194 |
-
}
|
1195 |
-
if (short_code['enable_slideshow_ctrl'] == 1) {
|
1196 |
-
jQuery("#slideshow_ctrl_yes").attr('checked', 'checked');
|
1197 |
-
}
|
1198 |
-
else {
|
1199 |
-
jQuery("#slideshow_ctrl_no").attr('checked', 'checked');
|
1200 |
-
}
|
1201 |
-
if (short_code['enable_slideshow_filmstrip'] == 1) {
|
1202 |
-
jQuery("#slideshow_filmstrip_yes").attr('checked', 'checked');
|
1203 |
-
jQuery("#slideshow_filmstrip_height").val(short_code['slideshow_filmstrip_height']);
|
1204 |
-
bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_yes');
|
1205 |
-
}
|
1206 |
-
else {
|
1207 |
-
jQuery("#slideshow_filmstrip_no").attr('checked', 'checked');
|
1208 |
-
}
|
1209 |
-
if (short_code['slideshow_enable_title'] == 1) {
|
1210 |
-
jQuery("#slideshow_title_yes").attr('checked', 'checked');
|
1211 |
-
jQuery("#slideshow_title_" + short_code['slideshow_title_position']).attr('checked', 'checked');
|
1212 |
-
bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes');
|
1213 |
-
}
|
1214 |
-
else {
|
1215 |
-
jQuery("#slideshow_title_no").attr('checked', 'checked');
|
1216 |
-
}
|
1217 |
-
if (short_code['slideshow_enable_description'] == 1) {
|
1218 |
-
jQuery("#slideshow_description_yes").attr('checked', 'checked');
|
1219 |
-
jQuery("#slideshow_description_" + short_code['slideshow_description_position']).attr('checked', 'checked');
|
1220 |
-
bwg_enable_disable('', 'tr_slideshow_description_position', 'slideshow_description_yes');
|
1221 |
-
}
|
1222 |
-
else {
|
1223 |
-
jQuery("#slideshow_description_no").attr('checked', 'checked');
|
1224 |
-
}
|
1225 |
-
if (short_code['enable_slideshow_music'] == 1) {
|
1226 |
-
jQuery("#slideshow_music_yes").attr('checked', 'checked');
|
1227 |
-
jQuery("#slideshow_music_url").val(short_code['slideshow_music_url']);
|
1228 |
-
bwg_enable_disable('', 'tr_slideshow_music_url', 'slideshow_music_yes');
|
1229 |
-
}
|
1230 |
-
else {
|
1231 |
-
jQuery("#slideshow_music_no").attr('checked', 'checked');
|
1232 |
-
}
|
1233 |
-
break;
|
1234 |
-
|
1235 |
-
}
|
1236 |
-
case 'image_browser': {
|
1237 |
-
jQuery("select[id=gallery] option[value='" + short_code['gallery_id'] + "']").attr('selected', 'selected');
|
1238 |
-
jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
|
1239 |
-
if (short_code['order_by'] == 'asc') {
|
1240 |
-
jQuery("#order_by_1").attr('checked', 'checked');
|
1241 |
-
}
|
1242 |
-
else {
|
1243 |
-
jQuery("#order_by_0").attr('checked', 'checked');
|
1244 |
-
}
|
1245 |
-
if (short_code['show_search_box'] == 1) {
|
1246 |
-
jQuery("#show_search_box_1").attr('checked', 'checked');
|
1247 |
-
jQuery("#tr_search_box_width").css('display', '');
|
1248 |
-
}
|
1249 |
-
else {
|
1250 |
-
jQuery("#show_search_box_0").attr('checked', 'checked');
|
1251 |
-
jQuery("#tr_search_box_width").css('display', 'none');
|
1252 |
-
}
|
1253 |
-
if (short_code['search_box_width']) {
|
1254 |
-
jQuery("#search_box_width").val(short_code['search_box_width']);
|
1255 |
-
}
|
1256 |
-
jQuery("#image_browser_width").val(short_code['image_browser_width']);
|
1257 |
-
if (short_code['image_browser_title_enable'] == 1) {
|
1258 |
-
jQuery("#image_browser_title_yes").attr('checked', 'checked');
|
1259 |
-
}
|
1260 |
-
else {
|
1261 |
-
jQuery("#image_browser_title_no").attr('checked', 'checked');
|
1262 |
-
}
|
1263 |
-
if (short_code['image_browser_description_enable'] == 1) {
|
1264 |
-
jQuery("#image_browser_description_yes").attr('checked', 'checked');
|
1265 |
-
}
|
1266 |
-
else {
|
1267 |
-
jQuery("#image_browser_description_no").attr('checked', 'checked');
|
1268 |
-
}
|
1269 |
-
break;
|
1270 |
-
|
1271 |
-
}
|
1272 |
-
case 'album_compact_preview': {
|
1273 |
-
jQuery("select[id=album] option[value='" + short_code['album_id'] + "']").attr('selected', 'selected');
|
1274 |
-
jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
|
1275 |
-
if (short_code['order_by'] == 'asc') {
|
1276 |
-
jQuery("#order_by_1").attr('checked', 'checked');
|
1277 |
-
}
|
1278 |
-
else {
|
1279 |
-
jQuery("#order_by_0").attr('checked', 'checked');
|
1280 |
-
}
|
1281 |
-
if (short_code['show_search_box'] == 1) {
|
1282 |
-
jQuery("#show_search_box_1").attr('checked', 'checked');
|
1283 |
-
jQuery("#tr_search_box_width").css('display', '');
|
1284 |
-
}
|
1285 |
-
else {
|
1286 |
-
jQuery("#show_search_box_0").attr('checked', 'checked');
|
1287 |
-
jQuery("#tr_search_box_width").css('display', 'none');
|
1288 |
-
}
|
1289 |
-
if (short_code['show_sort_images'] == 1) {
|
1290 |
-
jQuery("#show_sort_images_1").attr('checked', 'checked');
|
1291 |
-
}
|
1292 |
-
else {
|
1293 |
-
jQuery("#show_sort_images_0").attr('checked', 'checked');
|
1294 |
-
}
|
1295 |
-
if (short_code['search_box_width']) {
|
1296 |
-
jQuery("#search_box_width").val(short_code['search_box_width']);
|
1297 |
-
}
|
1298 |
-
jQuery("#compuct_album_column_number").val(short_code['compuct_album_column_number']);
|
1299 |
-
jQuery("#compuct_albums_per_page").val(short_code['compuct_albums_per_page']);
|
1300 |
-
jQuery("#compuct_album_title_" + short_code['compuct_album_title']).attr('checked', 'checked');
|
1301 |
-
jQuery("#compuct_album_thumb_width").val(short_code['compuct_album_thumb_width']);
|
1302 |
-
jQuery("#compuct_album_thumb_height").val(short_code['compuct_album_thumb_height']);
|
1303 |
-
jQuery("#compuct_album_image_column_number").val(short_code['compuct_album_image_column_number']);
|
1304 |
-
jQuery("#compuct_album_images_per_page").val(short_code['compuct_album_images_per_page']);
|
1305 |
-
jQuery("#compuct_album_image_title_" + short_code['compuct_album_image_title']).attr('checked', 'checked');
|
1306 |
-
jQuery("#compuct_album_image_thumb_width").val(short_code['compuct_album_image_thumb_width']);
|
1307 |
-
jQuery("#compuct_album_image_thumb_height").val(short_code['compuct_album_image_thumb_height']);
|
1308 |
-
jQuery("#compuct_album_load_more_image_count").val(short_code['compuct_album_load_more_image_count']);
|
1309 |
-
jQuery("#compuct_albums_per_page_load_more").val(short_code['compuct_albums_per_page_load_more']);
|
1310 |
-
if (short_code['compuct_album_enable_page'] == 1) {
|
1311 |
-
jQuery("#compuct_album_page_yes").attr('checked', 'checked');
|
1312 |
-
}
|
1313 |
-
else if (short_code['compuct_album_enable_page'] == 0) {
|
1314 |
-
jQuery("#compuct_album_page_no").attr('checked', 'checked');
|
1315 |
-
}
|
1316 |
-
else if (short_code['compuct_album_enable_page'] == 2) {
|
1317 |
-
jQuery("#compuct_album_page_loadmore").attr('checked', 'checked');
|
1318 |
-
}
|
1319 |
-
else if (short_code['compuct_album_enable_page'] == 3) {
|
1320 |
-
jQuery("#compuct_album_page_scrol_load").attr('checked', 'checked');
|
1321 |
-
}
|
1322 |
-
if (short_code['compuct_album_view_type'] == 'thumbnail') {
|
1323 |
-
jQuery("#compuct_album_view_type_1").attr('checked', 'checked');
|
1324 |
-
}
|
1325 |
-
else if (short_code['compuct_album_view_type'] == 'masonry'){
|
1326 |
-
jQuery("#compuct_album_view_type_0").attr('checked', 'checked');
|
1327 |
-
}
|
1328 |
-
else{
|
1329 |
-
jQuery("#compuct_album_view_type_2").attr('checked', 'checked');
|
1330 |
-
}
|
1331 |
-
if (short_code['compuct_album_mosaic_hor_ver'] == "vertical") {
|
1332 |
-
jQuery("#compuct_album_mosaic_ver").attr('checked', 'checked');
|
1333 |
-
}
|
1334 |
-
else {
|
1335 |
-
jQuery("#compuct_album_mosaic_hor").attr('checked', 'checked');
|
1336 |
-
}
|
1337 |
-
if (short_code['compuct_album_resizable_mosaic'] == 1) {
|
1338 |
-
jQuery("#compuct_album_resizable_mosaic_1").attr('checked', 'checked');
|
1339 |
-
}
|
1340 |
-
else {
|
1341 |
-
jQuery("#compuct_album_resizable_mosaic_0").attr('checked', 'checked');
|
1342 |
-
}
|
1343 |
-
if (short_code['show_tag_box'] == 1) {
|
1344 |
-
jQuery("#show_tag_box_1").attr('checked', 'checked');
|
1345 |
-
}
|
1346 |
-
else {
|
1347 |
-
jQuery("#show_tag_box_0").attr('checked', 'checked');
|
1348 |
-
}
|
1349 |
-
jQuery("#compuct_album_mosaic_total_width").val(short_code['compuct_album_mosaic_total_width']);
|
1350 |
-
break;
|
1351 |
-
|
1352 |
-
}
|
1353 |
-
case 'album_extended_preview': {
|
1354 |
-
jQuery("select[id=album] option[value='" + short_code['album_id'] + "']").attr('selected', 'selected');
|
1355 |
-
jQuery("select[id=sort_by] option[value='" + short_code['sort_by'] + "']").attr('selected', 'selected');
|
1356 |
-
if (short_code['order_by'] == 'asc') {
|
1357 |
-
jQuery("#order_by_1").attr('checked', 'checked');
|
1358 |
-
}
|
1359 |
-
else {
|
1360 |
-
jQuery("#order_by_0").attr('checked', 'checked');
|
1361 |
-
}
|
1362 |
-
if (short_code['show_search_box'] == 1) {
|
1363 |
-
jQuery("#show_search_box_1").attr('checked', 'checked');
|
1364 |
-
jQuery("#tr_search_box_width").css('display', '');
|
1365 |
-
}
|
1366 |
-
else {
|
1367 |
-
jQuery("#show_search_box_0").attr('checked', 'checked');
|
1368 |
-
jQuery("#tr_search_box_width").css('display', 'none');
|
1369 |
-
}
|
1370 |
-
if (short_code['show_sort_images'] == 1) {
|
1371 |
-
jQuery("#show_sort_images_1").attr('checked', 'checked');
|
1372 |
-
}
|
1373 |
-
else {
|
1374 |
-
jQuery("#show_sort_images_0").attr('checked', 'checked');
|
1375 |
-
}
|
1376 |
-
if (short_code['search_box_width']) {
|
1377 |
-
jQuery("#search_box_width").val(short_code['search_box_width']);
|
1378 |
-
}
|
1379 |
-
jQuery("#extended_albums_per_page").val(short_code['extended_albums_per_page']);
|
1380 |
-
jQuery("#extended_album_height").val(short_code['extended_album_height']);
|
1381 |
-
if (short_code['extended_album_description_enable'] == 1) {
|
1382 |
-
jQuery("#extended_album_description_yes").attr('checked', 'checked');
|
1383 |
-
}
|
1384 |
-
else {
|
1385 |
-
jQuery("#extended_album_description_no").attr('checked', 'checked');
|
1386 |
-
}
|
1387 |
-
jQuery("#extended_album_thumb_width").val(short_code['extended_album_thumb_width']);
|
1388 |
-
jQuery("#extended_album_thumb_height").val(short_code['extended_album_thumb_height']);
|
1389 |
-
jQuery("#extended_album_image_column_number").val(short_code['extended_album_image_column_number']);
|
1390 |
-
jQuery("#extended_album_images_per_page").val(short_code['extended_album_images_per_page']);
|
1391 |
-
jQuery("#extended_album_image_title_" + short_code['extended_album_image_title']).attr('checked', 'checked');
|
1392 |
-
jQuery("#extended_album_image_thumb_width").val(short_code['extended_album_image_thumb_width']);
|
1393 |
-
jQuery("#extended_album_image_thumb_height").val(short_code['extended_album_image_thumb_height']);
|
1394 |
-
jQuery("#extended_albums_per_page_load_more").val(short_code['extended_albums_per_page_load_more']);
|
1395 |
-
jQuery("#extended_album_load_more_image_count").val(short_code['extended_album_load_more_image_count']);
|
1396 |
-
if (short_code['extended_album_enable_page'] == 1) {
|
1397 |
-
jQuery("#extended_album_page_yes").attr('checked', 'checked');
|
1398 |
-
}
|
1399 |
-
else if (short_code['extended_album_enable_page'] == 0) {
|
1400 |
-
jQuery("#extended_album_page_no").attr('checked', 'checked');
|
1401 |
-
}
|
1402 |
-
else if (short_code['extended_album_enable_page'] == 2) {
|
1403 |
-
jQuery("#extended_album_page_loadmore").attr('checked', 'checked');
|
1404 |
-
}
|
1405 |
-
else if (short_code['extended_album_enable_page'] == 3){
|
1406 |
-
jQuery("#extended_album_page_scrol_load").attr('checked', 'checked');
|
1407 |
-
}
|
1408 |
-
if (short_code['extended_album_view_type'] == 'thumbnail') {
|
1409 |
-
jQuery("#extended_album_view_type_1").attr('checked', 'checked');
|
1410 |
-
}
|
1411 |
-
else if(short_code['extended_album_view_type'] == 'masonry'){
|
1412 |
-
jQuery("#extended_album_view_type_0").attr('checked', 'checked');
|
1413 |
-
}
|
1414 |
-
else{
|
1415 |
-
jQuery("#extended_album_view_type_2").attr('checked', 'checked');
|
1416 |
-
}
|
1417 |
-
if (short_code['extended_album_mosaic_hor_ver'] == "vertical") {
|
1418 |
-
jQuery("#extended_album_mosaic_ver").attr('checked', 'checked');
|
1419 |
-
}
|
1420 |
-
else {
|
1421 |
-
jQuery("#extended_album_mosaic_hor").attr('checked', 'checked');
|
1422 |
-
}
|
1423 |
-
if (short_code['extended_album_resizable_mosaic'] == 1) {
|
1424 |
-
jQuery("#extended_album_resizable_mosaic_1").attr('checked', 'checked');
|
1425 |
-
}
|
1426 |
-
else {
|
1427 |
-
jQuery("#extended_album_resizable_mosaic_0").attr('checked', 'checked');
|
1428 |
-
}
|
1429 |
-
if (short_code['show_tag_box'] == 1) {
|
1430 |
-
jQuery("#show_tag_box_1").attr('checked', 'checked');
|
1431 |
-
}
|
1432 |
-
else {
|
1433 |
-
jQuery("#show_tag_box_0").attr('checked', 'checked');
|
1434 |
-
}
|
1435 |
-
jQuery("#extended_album_mosaic_total_width").val(short_code['extended_album_mosaic_total_width']);
|
1436 |
-
break;
|
1437 |
-
|
1438 |
-
}
|
1439 |
-
}
|
1440 |
-
// Lightbox.
|
1441 |
-
if (short_code['gallery_type'] != 'slideshow') {
|
1442 |
-
jQuery("#popup_width").val(short_code['popup_width']);
|
1443 |
-
jQuery("#popup_height").val(short_code['popup_height']);
|
1444 |
-
jQuery("select[id=popup_effect] option[value='" + short_code['popup_effect'] + "']").attr('selected', 'selected');
|
1445 |
-
jQuery("#popup_interval").val(short_code['popup_interval']);
|
1446 |
-
if (short_code['popup_fullscreen'] == 1) {
|
1447 |
-
jQuery("#popup_fullscreen_1").attr('checked', 'checked');
|
1448 |
-
jQuery("#tr_popup_width_height").css('display', 'none');
|
1449 |
-
}
|
1450 |
-
else {
|
1451 |
-
jQuery("#popup_fullscreen_0").attr('checked', 'checked');
|
1452 |
-
jQuery("#tr_popup_width_height").css('display', '');
|
1453 |
-
}
|
1454 |
-
if (short_code['popup_autoplay'] == 1) {
|
1455 |
-
jQuery("#popup_autoplay_1").attr('checked', 'checked');
|
1456 |
-
}
|
1457 |
-
else {
|
1458 |
-
jQuery("#popup_autoplay_0").attr('checked', 'checked');
|
1459 |
-
}
|
1460 |
-
if (short_code['popup_enable_filmstrip'] == 1) {
|
1461 |
-
jQuery("#popup_filmstrip_yes").attr('checked', 'checked');
|
1462 |
-
jQuery("#popup_filmstrip_height").val(short_code['popup_filmstrip_height']);
|
1463 |
-
bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_filmstrip_yes');
|
1464 |
-
}
|
1465 |
-
else {
|
1466 |
-
jQuery("#popup_filmstrip_no").attr('checked', 'checked');
|
1467 |
-
}
|
1468 |
-
if (short_code['popup_enable_ctrl_btn'] == 1) {
|
1469 |
-
jQuery("#popup_ctrl_btn_yes").attr('checked', 'checked');
|
1470 |
-
bwg_enable_disable('', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_yes');
|
1471 |
-
if (short_code['popup_enable_fullscreen'] == 1) {
|
1472 |
-
jQuery("#popup_fullscreen_yes").attr('checked', 'checked');
|
1473 |
-
}
|
1474 |
-
else {
|
1475 |
-
jQuery("#popup_fullscreen_no").attr('checked', 'checked');
|
1476 |
-
}
|
1477 |
-
if (short_code['popup_enable_info'] == 1 || !short_code['popup_enable_info']) {
|
1478 |
-
jQuery("#popup_info_yes").attr('checked', 'checked');
|
1479 |
-
}
|
1480 |
-
else {
|
1481 |
-
jQuery("#popup_info_no").attr('checked', 'checked');
|
1482 |
-
}
|
1483 |
-
if (short_code['show_tag_box'] == 0 || !short_code['show_tag_box']) {
|
1484 |
-
jQuery("#show_tag_box_0").attr('checked', 'checked');
|
1485 |
-
}
|
1486 |
-
else {
|
1487 |
-
jQuery("#show_tag_box_1").attr('checked', 'checked');
|
1488 |
-
}
|
1489 |
-
if (short_code['popup_info_full_width'] == 1) {
|
1490 |
-
jQuery("#popup_info_full_width_1").attr('checked', 'checked');
|
1491 |
-
}
|
1492 |
-
else {
|
1493 |
-
jQuery("#popup_info_full_width_0").attr('checked', 'checked');
|
1494 |
-
}
|
1495 |
-
if (short_code['popup_info_always_show'] == 1 && short_code['popup_info_always_show']) {
|
1496 |
-
jQuery("#popup_info_always_show_yes").attr('checked', 'checked');
|
1497 |
-
}
|
1498 |
-
else {
|
1499 |
-
jQuery("#popup_info_always_show_no").attr('checked', 'checked');
|
1500 |
-
}
|
1501 |
-
if (short_code['popup_enable_rate'] == 1 && short_code['popup_enable_rate']) {
|
1502 |
-
jQuery("#popup_rate_yes").attr('checked', 'checked');
|
1503 |
-
}
|
1504 |
-
else {
|
1505 |
-
jQuery("#popup_rate_no").attr('checked', 'checked');
|
1506 |
-
}
|
1507 |
-
if (short_code['popup_enable_comment'] == 1) {
|
1508 |
-
jQuery("#popup_comment_yes").attr('checked', 'checked');
|
1509 |
-
}
|
1510 |
-
else {
|
1511 |
-
jQuery("#popup_comment_no").attr('checked', 'checked');
|
1512 |
-
}
|
1513 |
-
if (short_code['popup_hit_counter'] == 1 && short_code['popup_hit_counter']) {
|
1514 |
-
jQuery("#popup_hit_counter_yes").attr('checked', 'checked');
|
1515 |
-
}
|
1516 |
-
else {
|
1517 |
-
jQuery("#popup_hit_counter_no").attr('checked', 'checked');
|
1518 |
-
}
|
1519 |
-
if (short_code['popup_enable_facebook'] == 1) {
|
1520 |
-
jQuery("#popup_facebook_yes").attr('checked', 'checked');
|
1521 |
-
}
|
1522 |
-
else {
|
1523 |
-
jQuery("#popup_facebook_no").attr('checked', 'checked');
|
1524 |
-
}
|
1525 |
-
if (short_code['popup_enable_twitter'] == 1) {
|
1526 |
-
jQuery("#popup_twitter_yes").attr('checked', 'checked');
|
1527 |
-
}
|
1528 |
-
else {
|
1529 |
-
jQuery("#popup_twitter_no").attr('checked', 'checked');
|
1530 |
-
}
|
1531 |
-
if (short_code['popup_enable_google'] == 1) {
|
1532 |
-
jQuery("#popup_google_yes").attr('checked', 'checked');
|
1533 |
-
}
|
1534 |
-
else {
|
1535 |
-
jQuery("#popup_google_no").attr('checked', 'checked');
|
1536 |
-
}
|
1537 |
-
if (short_code['popup_enable_pinterest'] == 1) {
|
1538 |
-
jQuery("#popup_pinterest_yes").attr('checked', 'checked');
|
1539 |
-
}
|
1540 |
-
else {
|
1541 |
-
jQuery("#popup_pinterest_no").attr('checked', 'checked');
|
1542 |
-
}
|
1543 |
-
if (short_code['popup_enable_tumblr'] == 1) {
|
1544 |
-
jQuery("#popup_tumblr_yes").attr('checked', 'checked');
|
1545 |
-
}
|
1546 |
-
else {
|
1547 |
-
jQuery("#popup_tumblr_no").attr('checked', 'checked');
|
1548 |
-
}
|
1549 |
-
}
|
1550 |
-
else {
|
1551 |
-
jQuery("#popup_ctrl_btn_no").attr('checked', 'checked');
|
1552 |
-
}
|
1553 |
-
if (!short_code['thumb_click_action'] || short_code['thumb_click_action'] == 'undefined' || short_code['thumb_click_action'] == 'open_lightbox') {
|
1554 |
-
jQuery("#thumb_click_action_1").attr('checked', 'checked');
|
1555 |
-
}
|
1556 |
-
else if (short_code['thumb_click_action'] == 'redirect_to_url') {
|
1557 |
-
jQuery("#thumb_click_action_2").attr('checked', 'checked');
|
1558 |
-
}
|
1559 |
-
else if (short_code['thumb_click_action'] == 'do_nothing') {
|
1560 |
-
jQuery("#thumb_click_action_3").attr('checked', 'checked');
|
1561 |
-
}
|
1562 |
-
if (short_code['thumb_link_target'] == 1 || !short_code['thumb_link_target'] || short_code['thumb_link_target'] == 'undefined') {
|
1563 |
-
jQuery("#thumb_link_target_yes").attr('checked', 'checked');
|
1564 |
-
}
|
1565 |
-
else {
|
1566 |
-
jQuery("#thumb_link_target_no").attr('checked', 'checked');
|
1567 |
-
}
|
1568 |
-
bwg_thumb_click_action();
|
1569 |
-
}
|
1570 |
-
// Watermark.
|
1571 |
-
if (short_code['watermark_type'] == 'text') {
|
1572 |
-
jQuery("#watermark_type_text").attr('checked', 'checked');
|
1573 |
-
jQuery("#watermark_link").val(decodeURIComponent(short_code['watermark_link']));
|
1574 |
-
jQuery("#watermark_text").val(short_code['watermark_text']);
|
1575 |
-
jQuery("#watermark_font_size").val(short_code['watermark_font_size']);
|
1576 |
-
jQuery("select[id=watermark_font] option[value='" + short_code['watermark_font'] + "']").attr('selected', 'selected');
|
1577 |
-
jQuery("#watermark_color").val(short_code['watermark_color']);
|
1578 |
-
jQuery("#watermark_opacity").val(short_code['watermark_opacity']);
|
1579 |
-
jQuery("#watermark_type_text").attr('checked', 'checked');
|
1580 |
-
jQuery("#watermark_" + short_code['watermark_position']).attr('checked', 'checked');
|
1581 |
-
}
|
1582 |
-
else if (short_code['watermark_type'] == 'image') {
|
1583 |
-
jQuery("#watermark_type_image").attr('checked', 'checked');
|
1584 |
-
jQuery("#watermark_link").val(decodeURIComponent(short_code['watermark_link']));
|
1585 |
-
jQuery("#watermark_url").val(short_code['watermark_url']);
|
1586 |
-
jQuery("#watermark_width").val(short_code['watermark_width']);
|
1587 |
-
jQuery("#watermark_height").val(short_code['watermark_height']);
|
1588 |
-
jQuery("#watermark_opacity").val(short_code['watermark_opacity']);
|
1589 |
-
jQuery("#watermark_type_image").attr('checked', 'checked');
|
1590 |
-
jQuery("#watermark_" + short_code['watermark_position']).attr('checked', 'checked');
|
1591 |
-
}
|
1592 |
-
else {
|
1593 |
-
jQuery("#watermark_type_none").attr('checked', 'checked');
|
1594 |
-
}
|
1595 |
-
bwg_watermark('watermark_type_' + short_code['watermark_type']);
|
1596 |
-
bwg_gallery_type(short_code['gallery_type']);
|
1597 |
-
}
|
1598 |
-
}
|
1599 |
-
// Get shortcodes attributes.
|
1600 |
-
function get_params(module_name) {
|
1601 |
-
<?php if (!$from_menu) { ?>
|
1602 |
-
var selected_text = tinyMCE.activeEditor.selection.getContent();
|
1603 |
-
<?php } else { ?>
|
1604 |
-
var selected_text = jQuery("#bwg_shortcode").val();
|
1605 |
-
<?php } ?>
|
1606 |
-
var module_start_index = selected_text.indexOf("[" + module_name);
|
1607 |
-
var module_end_index = selected_text.indexOf("]", module_start_index);
|
1608 |
-
var module_str = "";
|
1609 |
-
if ((module_start_index >= 0) && (module_end_index >= 0)) {
|
1610 |
-
module_str = selected_text.substring(module_start_index + 1, module_end_index);
|
1611 |
-
}
|
1612 |
-
else {
|
1613 |
-
return false;
|
1614 |
-
}
|
1615 |
-
var params_str = module_str.substring(module_str.indexOf(" ") + 1);
|
1616 |
-
var key_values = params_str.split('" ');
|
1617 |
-
var short_code_attr = new Array();
|
1618 |
-
for (var key in key_values) {
|
1619 |
-
var short_code_index = key_values[key].split('=')[0];
|
1620 |
-
var short_code_value = key_values[key].split('=')[1];
|
1621 |
-
short_code_value = short_code_value.replace(/\"/g, '');
|
1622 |
-
short_code_attr[short_code_index] = short_code_value;
|
1623 |
-
}
|
1624 |
-
return short_code_attr;
|
1625 |
-
}
|
1626 |
-
function get_short_params(tagtext) {
|
1627 |
-
var params_str = tagtext.substring(tagtext.indexOf(" ") + 1);
|
1628 |
-
var key_values = params_str.split('" ');
|
1629 |
-
var short_code_attr = new Array();
|
1630 |
-
for (var key in key_values) {
|
1631 |
-
var short_code_index = key_values[key].split('=')[0];
|
1632 |
-
var short_code_value = key_values[key].split('=')[1];
|
1633 |
-
short_code_value = short_code_value.replace(/\"/g, '');
|
1634 |
-
short_code_attr[short_code_index] = short_code_value;
|
1635 |
-
}
|
1636 |
-
return short_code_attr;
|
1637 |
-
}
|
1638 |
-
function bwg_insert_shortcode(content) {
|
1639 |
-
window.parent.window.jQuery(window.parent.document).trigger("onOpenShortcode");
|
1640 |
-
var gallery_type = jQuery("input[name=gallery_type]:checked").val();
|
1641 |
-
var theme = jQuery("#theme").val();
|
1642 |
-
var title = "";
|
1643 |
-
var short_code = '[Best_Wordpress_Gallery';
|
1644 |
-
var tagtext = ' gallery_type="' + gallery_type + '" theme_id="' + theme + '"';
|
1645 |
-
switch (gallery_type) {
|
1646 |
-
case 'thumbnails': {
|
1647 |
-
tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
|
1648 |
-
tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
|
1649 |
-
tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
|
1650 |
-
tagtext += ' show_search_box="' + jQuery("input[name=show_search_box]:checked").val() + '"';
|
1651 |
-
tagtext += ' show_sort_images="' + jQuery("input[name=show_sort_images]:checked").val() + '"';
|
1652 |
-
tagtext += ' search_box_width="' + jQuery("#search_box_width").val() + '"';
|
1653 |
-
tagtext += ' image_column_number="' + jQuery("#image_column_number").val() + '"';
|
1654 |
-
tagtext += ' images_per_page="' + jQuery("#images_per_page").val() + '"';
|
1655 |
-
tagtext += ' image_title="' + jQuery("input[name=image_title]:checked").val() + '"';
|
1656 |
-
tagtext += ' image_enable_page="' + jQuery("input[name=image_enable_page]:checked").val() + '"';
|
1657 |
-
tagtext += ' thumb_width="' + jQuery("#thumb_width").val() + '"';
|
1658 |
-
tagtext += ' thumb_height="' + jQuery("#thumb_height").val() + '"';
|
1659 |
-
title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
|
1660 |
-
tagtext += ' load_more_image_count="' + jQuery("#load_more_image_count").val() + '"';
|
1661 |
-
tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
|
1662 |
-
break;
|
1663 |
-
|
1664 |
-
}
|
1665 |
-
case 'slideshow': {
|
1666 |
-
tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
|
1667 |
-
tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
|
1668 |
-
tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
|
1669 |
-
tagtext += ' slideshow_effect="' + jQuery("#slideshow_effect").val() + '"';
|
1670 |
-
tagtext += ' slideshow_interval="' + jQuery("#slideshow_interval").val() + '"';
|
1671 |
-
tagtext += ' slideshow_width="' + jQuery("#slideshow_width").val() + '"';
|
1672 |
-
tagtext += ' slideshow_height="' + jQuery("#slideshow_height").val() + '"';
|
1673 |
-
tagtext += ' enable_slideshow_autoplay="' + jQuery("input[name=enable_slideshow_autoplay]:checked").val() + '"';
|
1674 |
-
tagtext += ' enable_slideshow_shuffle="' + jQuery("input[name=enable_slideshow_shuffle]:checked").val() + '"';
|
1675 |
-
tagtext += ' enable_slideshow_ctrl="' + jQuery("input[name=enable_slideshow_ctrl]:checked").val() + '"';
|
1676 |
-
tagtext += ' enable_slideshow_filmstrip="' + jQuery("input[name=enable_slideshow_filmstrip]:checked").val() + '"';
|
1677 |
-
tagtext += ' slideshow_filmstrip_height="' + jQuery("#slideshow_filmstrip_height").val() + '"';
|
1678 |
-
tagtext += ' slideshow_enable_title="' + jQuery("input[name=slideshow_enable_title]:checked").val() + '"';
|
1679 |
-
tagtext += ' slideshow_title_position="' + jQuery("input[name=slideshow_title_position]:checked").val() + '"';
|
1680 |
-
tagtext += ' slideshow_title_full_width="' + jQuery("input[name=slideshow_title_full_width]:checked").val() + '"';
|
1681 |
-
tagtext += ' slideshow_enable_description="' + jQuery("input[name=slideshow_enable_description]:checked").val() + '"';
|
1682 |
-
tagtext += ' slideshow_description_position="' + jQuery("input[name=slideshow_description_position]:checked").val() + '"';
|
1683 |
-
tagtext += ' enable_slideshow_music="' + jQuery("input[name=enable_slideshow_music]:checked").val() + '"';
|
1684 |
-
tagtext += ' slideshow_music_url="' + jQuery("#slideshow_music_url").val() + '"';
|
1685 |
-
title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
|
1686 |
-
break;
|
1687 |
-
|
1688 |
-
}
|
1689 |
-
case 'image_browser': {
|
1690 |
-
tagtext += ' gallery_id="' + jQuery("#gallery").val() + '"';
|
1691 |
-
tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
|
1692 |
-
tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
|
1693 |
-
tagtext += ' show_search_box="' + jQuery("input[name=show_search_box]:checked").val() + '"';
|
1694 |
-
tagtext += ' search_box_width="' + jQuery("#search_box_width").val() + '"';
|
1695 |
-
tagtext += ' image_browser_width="' + jQuery("#image_browser_width").val() + '"';
|
1696 |
-
tagtext += ' image_browser_title_enable="' + jQuery("input[name=image_browser_title_enable]:checked").val() + '"';
|
1697 |
-
tagtext += ' image_browser_description_enable="' + jQuery("input[name=image_browser_description_enable]:checked").val() + '"';
|
1698 |
-
title = ' gal_title="' + jQuery.trim(jQuery('#gallery option:selected').text().replace("'", "").replace('"', '')) + '"';
|
1699 |
-
break;
|
1700 |
-
|
1701 |
-
}
|
1702 |
-
case 'album_compact_preview': {
|
1703 |
-
tagtext += ' album_id="' + jQuery("#album").val() + '"';
|
1704 |
-
tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
|
1705 |
-
tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
|
1706 |
-
tagtext += ' show_search_box="' + jQuery("input[name=show_search_box]:checked").val() + '"';
|
1707 |
-
tagtext += ' show_sort_images="' + jQuery("input[name=show_sort_images]:checked").val() + '"';
|
1708 |
-
tagtext += ' search_box_width="' + jQuery("#search_box_width").val() + '"';
|
1709 |
-
tagtext += ' compuct_album_column_number="' + jQuery("#compuct_album_column_number").val() + '"';
|
1710 |
-
tagtext += ' compuct_albums_per_page="' + jQuery("#compuct_albums_per_page").val() + '"';
|
1711 |
-
tagtext += ' compuct_album_title="' + jQuery("input[name=compuct_album_title]:checked").val() + '"';
|
1712 |
-
tagtext += ' compuct_album_view_type="' + jQuery("input[name=compuct_album_view_type]:checked").val() + '"';
|
1713 |
-
tagtext += ' compuct_album_mosaic_hor_ver="' + jQuery("input[name=compuct_album_mosaic_hor_ver]:checked").val() + '"';
|
1714 |
-
tagtext += ' compuct_album_resizable_mosaic="' + jQuery("input[name=compuct_album_resizable_mosaic]:checked").val() + '"';
|
1715 |
-
tagtext += ' compuct_album_mosaic_total_width="' + jQuery("#compuct_album_mosaic_total_width").val() + '"';
|
1716 |
-
tagtext += ' compuct_album_thumb_width="' + jQuery("#compuct_album_thumb_width").val() + '"';
|
1717 |
-
tagtext += ' compuct_album_thumb_height="' + jQuery("#compuct_album_thumb_height").val() + '"';
|
1718 |
-
tagtext += ' compuct_album_image_column_number="' + jQuery("#compuct_album_image_column_number").val() + '"';
|
1719 |
-
tagtext += ' compuct_album_images_per_page="' + jQuery("#compuct_album_images_per_page").val() + '"';
|
1720 |
-
tagtext += ' compuct_album_image_title="' + jQuery("input[name=compuct_album_image_title]:checked").val() + '"';
|
1721 |
-
tagtext += ' compuct_album_image_thumb_width="' + jQuery("#compuct_album_image_thumb_width").val() + '"';
|
1722 |
-
tagtext += ' compuct_album_image_thumb_height="' + jQuery("#compuct_album_image_thumb_height").val() + '"';
|
1723 |
-
tagtext += ' compuct_album_enable_page="' + jQuery("input[name=compuct_album_enable_page]:checked").val() + '"';
|
1724 |
-
tagtext += ' compuct_album_load_more_image_count="' + jQuery("#compuct_album_load_more_image_count").val() + '"';
|
1725 |
-
tagtext += ' compuct_albums_per_page_load_more="' + jQuery("#compuct_albums_per_page_load_more").val() + '"';
|
1726 |
-
tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
|
1727 |
-
title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
|
1728 |
-
break;
|
1729 |
-
|
1730 |
-
}
|
1731 |
-
case 'album_extended_preview': {
|
1732 |
-
tagtext += ' album_id="' + jQuery("#album").val() + '"';
|
1733 |
-
tagtext += ' sort_by="' + jQuery("#sort_by").val() + '"';
|
1734 |
-
tagtext += ' order_by="' + jQuery("input[name=order_by]:checked").val() + '"';
|
1735 |
-
tagtext += ' show_search_box="' + jQuery("input[name=show_search_box]:checked").val() + '"';
|
1736 |
-
tagtext += ' show_sort_images="' + jQuery("input[name=show_sort_images]:checked").val() + '"';
|
1737 |
-
tagtext += ' search_box_width="' + jQuery("#search_box_width").val() + '"';
|
1738 |
-
tagtext += ' extended_albums_per_page="' + jQuery("#extended_albums_per_page").val() + '"';
|
1739 |
-
tagtext += ' extended_album_height="' + jQuery("#extended_album_height").val() + '"';
|
1740 |
-
tagtext += ' extended_album_description_enable="' + jQuery("input[name=extended_album_description_enable]:checked").val() + '"';
|
1741 |
-
tagtext += ' extended_album_view_type="' + jQuery("input[name=extended_album_view_type]:checked").val() + '"';
|
1742 |
-
tagtext += ' extended_album_mosaic_hor_ver="' + jQuery("input[name=extended_album_mosaic_hor_ver]:checked").val() + '"';
|
1743 |
-
tagtext += ' extended_album_resizable_mosaic="' + jQuery("input[name=extended_album_resizable_mosaic]:checked").val() + '"';
|
1744 |
-
tagtext += ' extended_album_mosaic_total_width="' + jQuery("#extended_album_mosaic_total_width").val() + '"';
|
1745 |
-
tagtext += ' extended_album_thumb_width="' + jQuery("#extended_album_thumb_width").val() + '"';
|
1746 |
-
tagtext += ' extended_album_thumb_height="' + jQuery("#extended_album_thumb_height").val() + '"';
|
1747 |
-
tagtext += ' extended_album_image_column_number="' + jQuery("#extended_album_image_column_number").val() + '"';
|
1748 |
-
tagtext += ' extended_album_images_per_page="' + jQuery("#extended_album_images_per_page").val() + '"';
|
1749 |
-
tagtext += ' extended_album_image_title="' + jQuery("input[name=extended_album_image_title]:checked").val() + '"';
|
1750 |
-
tagtext += ' extended_album_image_thumb_width="' + jQuery("#extended_album_image_thumb_width").val() + '"';
|
1751 |
-
tagtext += ' extended_album_image_thumb_height="' + jQuery("#extended_album_image_thumb_height").val() + '"';
|
1752 |
-
tagtext += ' extended_album_enable_page="' + jQuery("input[name=extended_album_enable_page]:checked").val() + '"';
|
1753 |
-
tagtext += ' extended_album_load_more_image_count="' + jQuery("#extended_album_load_more_image_count").val() + '"';
|
1754 |
-
tagtext += ' extended_albums_per_page_load_more="' + jQuery("#extended_albums_per_page_load_more").val() + '"';
|
1755 |
-
tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
|
1756 |
-
title = ' gal_title="' + jQuery.trim(jQuery('#album option:selected').text().replace("'", "").replace('"', '')) + '"';
|
1757 |
-
break;
|
1758 |
-
|
1759 |
-
}
|
1760 |
-
}
|
1761 |
-
// Lightbox paramteres.
|
1762 |
-
if (gallery_type != 'slideshow') {
|
1763 |
-
tagtext += ' thumb_click_action="' + jQuery("input[name=thumb_click_action]:checked").val() + '"';
|
1764 |
-
tagtext += ' thumb_link_target="' + jQuery("input[name=thumb_link_target]:checked").val() + '"';
|
1765 |
-
tagtext += ' popup_fullscreen="' + jQuery("input[name=popup_fullscreen]:checked").val() + '"';
|
1766 |
-
tagtext += ' popup_autoplay="' + jQuery("input[name=popup_autoplay]:checked").val() + '"';
|
1767 |
-
tagtext += ' popup_width="' + jQuery("#popup_width").val() + '"';
|
1768 |
-
tagtext += ' popup_height="' + jQuery("#popup_height").val() + '"';
|
1769 |
-
tagtext += ' popup_effect="' + jQuery("#popup_effect").val() + '"';
|
1770 |
-
tagtext += ' popup_interval="' + jQuery("#popup_interval").val() + '"';
|
1771 |
-
tagtext += ' popup_enable_filmstrip="' + jQuery("input[name=popup_enable_filmstrip]:checked").val() + '"';
|
1772 |
-
tagtext += ' popup_filmstrip_height="' + jQuery("#popup_filmstrip_height").val() + '"';
|
1773 |
-
tagtext += ' popup_enable_ctrl_btn="' + jQuery("input[name=popup_enable_ctrl_btn]:checked").val() + '"';
|
1774 |
-
tagtext += ' popup_enable_fullscreen="' + jQuery("input[name=popup_enable_fullscreen]:checked").val() + '"';
|
1775 |
-
tagtext += ' popup_enable_info="' + jQuery("input[name=popup_enable_info]:checked").val() + '"';
|
1776 |
-
tagtext += ' popup_info_always_show="' + jQuery("input[name=popup_info_always_show]:checked").val() + '"';
|
1777 |
-
tagtext += ' popup_info_full_width="' + jQuery("input[name=popup_info_full_width]:checked").val() + '"';
|
1778 |
-
tagtext += ' popup_enable_rate="' + jQuery("input[name=popup_enable_rate]:checked").val() + '"';
|
1779 |
-
tagtext += ' popup_enable_comment="' + jQuery("input[name=popup_enable_comment]:checked").val() + '"';
|
1780 |
-
tagtext += ' popup_hit_counter="' + jQuery("input[name=popup_hit_counter]:checked").val() + '"';
|
1781 |
-
tagtext += ' popup_enable_facebook="' + jQuery("input[name=popup_enable_facebook]:checked").val() + '"';
|
1782 |
-
tagtext += ' popup_enable_twitter="' + jQuery("input[name=popup_enable_twitter]:checked").val() + '"';
|
1783 |
-
tagtext += ' popup_enable_google="' + jQuery("input[name=popup_enable_google]:checked").val() + '"';
|
1784 |
-
tagtext += ' popup_enable_pinterest="' + jQuery("input[name=popup_enable_pinterest]:checked").val() + '"';
|
1785 |
-
tagtext += ' popup_enable_tumblr="' + jQuery("input[name=popup_enable_tumblr]:checked").val() + '"';
|
1786 |
-
tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
|
1787 |
-
}
|
1788 |
-
// Watermark parameters.
|
1789 |
-
tagtext += ' watermark_type="' + jQuery("input[name=watermark_type]:checked").val() + '"';
|
1790 |
-
tagtext += ' watermark_link="' + (jQuery("#watermark_link").val()) + '"';
|
1791 |
-
if (jQuery("input[name=watermark_type]:checked").val() == 'text') {
|
1792 |
-
tagtext += ' watermark_text="' + jQuery("#watermark_text").val() + '"';
|
1793 |
-
tagtext += ' watermark_font_size="' + jQuery("#watermark_font_size").val() + '"';
|
1794 |
-
tagtext += ' watermark_font="' + jQuery("#watermark_font").val() + '"';
|
1795 |
-
tagtext += ' watermark_color="' + jQuery("#watermark_color").val() + '"';
|
1796 |
-
tagtext += ' watermark_opacity="' + jQuery("#watermark_opacity").val() + '"';
|
1797 |
-
tagtext += ' watermark_position="' + jQuery("input[name=watermark_position]:checked").val() + '"';
|
1798 |
-
}
|
1799 |
-
else if (jQuery("input[name=watermark_type]:checked").val() == 'image') {
|
1800 |
-
tagtext += ' watermark_url="' + jQuery("#watermark_url").val() + '"';
|
1801 |
-
tagtext += ' watermark_width="' + jQuery("#watermark_width").val() + '"';
|
1802 |
-
tagtext += ' watermark_height="' + jQuery("#watermark_height").val() + '"';
|
1803 |
-
tagtext += ' watermark_opacity="' + jQuery("#watermark_opacity").val() + '"';
|
1804 |
-
tagtext += ' watermark_position="' + jQuery("input[name=watermark_position]:checked").val() + '"';
|
1805 |
-
}
|
1806 |
-
short_code += ' id="' + shortcode_id + '"' + title + ']';
|
1807 |
-
var short_id = ' id="' + shortcode_id + '"' + title;
|
1808 |
-
short_code = short_code.replace(/\[Best_Wordpress_Gallery([^\]]*)\]/g, function(d, c) {
|
1809 |
-
return "<img src='<?php echo WD_BWG_URL; ?>/images/bwg_shortcode.png' class='bwg_shortcode mceItem' title='Best_Wordpress_Gallery" + short_id + "' />";
|
1810 |
-
});
|
1811 |
-
jQuery("#task").val("save");
|
1812 |
-
jQuery("#tagtext").val(tagtext);
|
1813 |
-
jQuery("#currrent_id").val(shortcode_id);
|
1814 |
-
jQuery("#title").val(title);
|
1815 |
-
jQuery("#bwg_insert").val((content && !bwg_insert) ? 0 : 1);
|
1816 |
-
jQuery("#bwg_shortcode_form").submit();
|
1817 |
-
<?php if (!$from_menu) { ?>
|
1818 |
-
if (window.tinymce.isIE && content) {
|
1819 |
-
// IE and Update.
|
1820 |
-
var all_content = tinyMCE.activeEditor.getContent();
|
1821 |
-
all_content = all_content.replace('<p></p><p>[Best_Wordpress_Gallery', '<p>[Best_Wordpress_Gallery');
|
1822 |
-
tinyMCE.activeEditor.setContent(all_content.replace(content, '[Best_Wordpress_Gallery id="' + shortcode_id + '"' + title + ']'));
|
1823 |
-
}
|
1824 |
-
else {
|
1825 |
-
window.tinyMCE.execCommand('mceInsertContent', false, short_code);
|
1826 |
-
}
|
1827 |
-
tinyMCEPopup.editor.execCommand('mceRepaint');
|
1828 |
-
<?php } else { ?>
|
1829 |
-
jQuery("#bwg_shortcode").val('[Best_Wordpress_Gallery id="' + shortcode_id + '"' + title + ']');
|
1830 |
-
<?php } ?>
|
1831 |
-
}
|
1832 |
-
jQuery(document).ready(function () {
|
1833 |
-
bwg_loadmore();
|
1834 |
-
});
|
1835 |
-
var bwg_image_thumb = '<?php addslashes(__('Image thumbnail dimensions:', 'bwg_back')); ?>';
|
1836 |
-
var bwg_image_thumb_width = '<?php addslashes(__('Image thumbnail width: ', 'bwg_back')); ?>';
|
1837 |
-
var bwg_max_column = '<?php addslashes(__('Max. number of image columns:', 'bwg_back')); ?>';
|
1838 |
-
var bwg_image_thumb_height = '<?php addslashes(__('Image thumbnail height:', 'bwg_back')); ?>';
|
1839 |
-
</script>
|
1840 |
-
</body>
|
1841 |
-
</html>
|
1842 |
-
<?php
|
1843 |
-
include_once (WD_BWG_DIR .'/includes/bwg_pointers.php');
|
1844 |
-
new BWG_pointers();
|
1845 |
-
die();
|
1846 |
-
}
|
1847 |
-
|
1848 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1849 |
-
// Getters & Setters //
|
1850 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1851 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1852 |
-
// Private Methods //
|
1853 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1854 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1855 |
-
// Listeners //
|
1856 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class BWGViewBWGShortcode {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $model;
|
14 |
+
|
15 |
+
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct($model) {
|
20 |
+
$this->model = $model;
|
21 |
+
}
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Public Methods //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function display() {
|
26 |
+
$gallery_rows = $this->model->get_gallery_rows_data();
|
27 |
+
$album_rows = $this->model->get_album_rows_data();
|
28 |
+
$option_row = $this->model->get_option_row_data();
|
29 |
+
$theme_rows = $this->model->get_theme_rows_data();
|
30 |
+
$from_menu = ((isset($_GET['page']) && (esc_html($_GET['page']) == 'BWGShortcode')) ? TRUE : FALSE);
|
31 |
+
$shortcodes = $this->model->get_shortcode_data();
|
32 |
+
$shortcode_max_id = $this->model->get_shortcode_max_id();
|
33 |
+
$effects = array(
|
34 |
+
'none' => __('None','bwg_back'),
|
35 |
+
'cubeH' => __('Cube Horizontal','bwg_back'),
|
36 |
+
'cubeV' => __('Cube Vertical','bwg_back'),
|
37 |
+
'fade' => __('Fade','bwg_back'),
|
38 |
+
'sliceH' => __('Slice Horizontal','bwg_back'),
|
39 |
+
'sliceV' => __('Slice Vertical','bwg_back'),
|
40 |
+
'slideH' => __('Slide Horizontal','bwg_back'),
|
41 |
+
'slideV' => __('Slide Vertical','bwg_back'),
|
42 |
+
'scaleOut' => __('Scale Out','bwg_back'),
|
43 |
+
'scaleIn' => __('Scale In','bwg_back'),
|
44 |
+
'blockScale' => __('Block Scale','bwg_back'),
|
45 |
+
'kaleidoscope' => __('Kaleidoscope','bwg_back'),
|
46 |
+
'fan' => __('Fan','bwg_back'),
|
47 |
+
'blindH' => __('Blind Horizontal','bwg_back'),
|
48 |
+
'blindV' => __('Blind Vertical','bwg_back'),
|
49 |
+
'random' => __('Random','bwg_back'),
|
50 |
+
);
|
51 |
+
$watermark_fonts = array(
|
52 |
+
'arial' => 'Arial',
|
53 |
+
'Lucida grande' => 'Lucida grande',
|
54 |
+
'segoe ui' => 'Segoe ui',
|
55 |
+
'tahoma' => 'Tahoma',
|
56 |
+
'trebuchet ms' => 'Trebuchet ms',
|
57 |
+
'verdana' => 'Verdana',
|
58 |
+
'cursive' =>'Cursive',
|
59 |
+
'fantasy' => 'Fantasy',
|
60 |
+
'monospace' => 'Monospace',
|
61 |
+
'serif' => 'Serif',
|
62 |
+
);
|
63 |
+
if (!$from_menu) {
|
64 |
+
?>
|
65 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
66 |
+
<head>
|
67 |
+
<title><?php _e("Photo Gallery", 'bwg_back'); ?></title>
|
68 |
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
69 |
+
<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
|
70 |
+
<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
|
71 |
+
<script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
|
72 |
+
<?php
|
73 |
+
wp_print_scripts('jquery');
|
74 |
+
}
|
75 |
+
wp_print_scripts('jquery-ui-core');
|
76 |
+
wp_print_scripts('jquery-ui-widget');
|
77 |
+
wp_print_scripts('jquery-ui-position');
|
78 |
+
wp_print_scripts('jquery-ui-tooltip');
|
79 |
+
wp_print_scripts('wp-pointer');
|
80 |
+
?>
|
81 |
+
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=dashicons,wp-pointer" rel="stylesheet">
|
82 |
+
<link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/bwg_shortcode.css?ver='.wd_bwg_version(); ?>">
|
83 |
+
<link rel="stylesheet" href="<?php echo WD_BWG_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>">
|
84 |
+
<script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/bwg_shortcode.js?ver='.wd_bwg_version(); ?>"></script>
|
85 |
+
<script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/jscolor/jscolor.js?ver='.wd_bwg_version(); ?>"></script>
|
86 |
+
<?php
|
87 |
+
if (!$from_menu) {
|
88 |
+
?>
|
89 |
+
<base target="_self">
|
90 |
+
</head>
|
91 |
+
<body id="link" onLoad="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';" dir="ltr" class="forceColors">
|
92 |
+
<?php if (isset($_POST['tagtext'])) { echo '<script>tinyMCEPopup.close();</script></body></html>'; die(); } ?>
|
93 |
+
<form method="post" action="#" id="bwg_shortcode_form">
|
94 |
+
<?php wp_nonce_field( 'BWGShortcode', 'bwg_nonce' ); ?>
|
95 |
+
<div class="tabs" role="tablist" tabindex="-1">
|
96 |
+
<ul>
|
97 |
+
<li id="display_tab" class="current" role="tab" tabindex="0">
|
98 |
+
<span>
|
99 |
+
<a href="javascript:mcTabs.displayTab('display_tab','display_panel');" onMouseDown="return false;" tabindex="-1"><?php _e("Display", 'bwg_back'); ?></a>
|
100 |
+
</span>
|
101 |
+
</li>
|
102 |
+
</ul>
|
103 |
+
</div>
|
104 |
+
<div class="panel_wrapper">
|
105 |
+
<div id="display_panel" class="panel current">
|
106 |
+
<?php
|
107 |
+
}
|
108 |
+
else {
|
109 |
+
?>
|
110 |
+
<form method="post" action="#" id="bwg_shortcode_form">
|
111 |
+
<?php wp_nonce_field( 'BWGShortcode', 'bwg_nonce' ); ?>
|
112 |
+
<div id="display_panel" style="width: 99%; margin-top: 30px;">
|
113 |
+
<?php
|
114 |
+
}
|
115 |
+
?>
|
116 |
+
<div style="text-align:center; height:100px;">
|
117 |
+
<span class="gallery_type" onClick="bwg_gallery_type('thumbnails')">
|
118 |
+
<div style="text-align: center;"><input type="radio" id="thumbnails" name="gallery_type" value="thumbnails"/><label for="thumbnails"><?php _e("Thumbnails", 'bwg_back'); ?></label></div>
|
119 |
+
<label for="thumbnails"><img id="display_thumb" src="<?php echo WD_BWG_URL . '/images/thumbnails.jpg'; ?>" /></label>
|
120 |
+
</span>
|
121 |
+
<span title="<?php _e("This view is disabled in free version.", 'bwg_back'); ?>" class="gallery_type">
|
122 |
+
<div style="text-align: center;"><input disabled="disabled" type="radio" id="thumbnails_masonry" name="gallery_type" value="thumbnails_masonry" /><label class="spider_free_version_label" for="thumbnails_masonry"><?php _e("Masonry", 'bwg_back'); ?></label></div>
|
123 |
+
<label><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/thumbnails_masonry.jpg'; ?>" /></label>
|
124 |
+
</span>
|
125 |
+
<span title="<?php _e("This view is disabled in free version.", 'bwg_back'); ?>" class="gallery_type">
|
126 |
+
<div style="text-align: center;"><input disabled="disabled" type="radio" id="thumbnails_mosaic" name="gallery_type" value="thumbnails_mosaic" /><label class="spider_free_version_label" for="thumbnails_mosaic"><?php _e("Mosaic", 'bwg_back'); ?></label></div>
|
127 |
+
<label for="thumbnails_mosaic"><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/thumbnails_mosaic.jpg'; ?>" /></label>
|
128 |
+
</span>
|
129 |
+
<span class="gallery_type" onClick="bwg_gallery_type('slideshow')">
|
130 |
+
<div style="text-align: center;"><input type="radio" id="slideshow" name="gallery_type" value="slideshow" /><label for="slideshow"><?php _e("Slideshow", 'bwg_back'); ?></label></div>
|
131 |
+
<label for="slideshow"><img src="<?php echo WD_BWG_URL . '/images/slideshow.jpg'; ?>" /></label>
|
132 |
+
</span>
|
133 |
+
<span class="gallery_type" onClick="bwg_gallery_type('image_browser')">
|
134 |
+
<div style="text-align: center;"><input type="radio" id="image_browser" name="gallery_type" value="image_browser" /><label for="image_browser"><?php _e("Image Browser", 'bwg_back'); ?></label></div>
|
135 |
+
<label for="image_browser"><img src="<?php echo WD_BWG_URL . '/images/image_browser.jpg'; ?>" /></label>
|
136 |
+
</span>
|
137 |
+
<span class="gallery_type" onClick="bwg_gallery_type('album_compact_preview')">
|
138 |
+
<div style="text-align: center;"><input type="radio" id="album_compact_preview" name="gallery_type" value="album_compact_preview" /><label for="album_compact_preview"><?php _e("Compact Album", 'bwg_back'); ?></label></div>
|
139 |
+
<label for="album_compact_preview"><img src="<?php echo WD_BWG_URL . '/images/album_compact_preview.jpg'; ?>" /></label>
|
140 |
+
</span>
|
141 |
+
<span title="<?php _e("This view is disabled in free version.", 'bwg_back'); ?>" class="gallery_type">
|
142 |
+
<div style="text-align: center;"><input disabled="disabled" type="radio" id="album_masonry_preview" name="gallery_type" value="album_masonry_preview" /><label class="spider_free_version_label" for="album_masonry_preview"><?php _e("Masonry Album", 'bwg_back'); ?></label></div>
|
143 |
+
<label for="album_masonry_preview"><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/thumbnails_masonry.jpg'; ?>" /></label>
|
144 |
+
</span>
|
145 |
+
<span class="gallery_type" onClick="bwg_gallery_type('album_extended_preview')">
|
146 |
+
<div style="text-align: center;"><input type="radio" id="album_extended_preview" name="gallery_type" value="album_extended_preview" /><label for="album_extended_preview"><?php _e("Extended Album", 'bwg_back'); ?></label></div>
|
147 |
+
<label for="album_extended_preview"><img src="<?php echo WD_BWG_URL . '/images/album_extended_preview.jpg'; ?>" /></label>
|
148 |
+
</span>
|
149 |
+
<span title="<?php _e('This view is disabled in free version.', 'bwg_back'); ?>" class="gallery_type">
|
150 |
+
<div style="text-align: center;"><input disabled="disabled" type="radio" id="blog_style" name="gallery_type" value="blog_style" /><label class="spider_free_version_label" for="blog_style"><?php _e("Blog Style", 'bwg_back'); ?></label></div>
|
151 |
+
<label><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/blog_style.jpg'; ?>" /></label>
|
152 |
+
</span>
|
153 |
+
<span title="<?php _e('This view is disabled in free version.', 'bwg_back'); ?>" class="gallery_type">
|
154 |
+
<div style="text-align: center;"><input disabled="disabled" type="radio" id="carousel" name="gallery_type" value="carousel" /><label class="spider_free_version_label" for="carousel"><?php _e("Carousel", 'bwg_back'); ?></label></div>
|
155 |
+
<label for="carousel"><img style="opacity:0.5; filter: Alpha(opacity=50);" disabled="disabled" src="<?php echo WD_BWG_URL . '/images/Carousel.png'; ?>" /></label>
|
156 |
+
</span>
|
157 |
+
</div>
|
158 |
+
<hr />
|
159 |
+
<div class="bwg_short_div" style="border-right: 1px solid #000000;">
|
160 |
+
<table>
|
161 |
+
<tbody>
|
162 |
+
<tr id="tr_theme">
|
163 |
+
<td <?php echo (get_option("wd_bwg_theme_version") ? 'title="This option is disabled in free version." class="spider_label spider_free_version_label"' : 'class="spider_label"'); ?>><label for="theme"><?php _e("Theme:", 'bwg_back'); ?> </label></td>
|
164 |
+
<td>
|
165 |
+
<select name="theme" id="theme" style="width:150px;" <?php echo (get_option("wd_bwg_theme_version") ? 'disabled="disabled"' : ''); ?>>
|
166 |
+
<option value="0" selected="selected"><?php _e("Select Theme", 'bwg_back'); ?></option>
|
167 |
+
<?php
|
168 |
+
foreach ($theme_rows as $theme_row) {
|
169 |
+
?>
|
170 |
+
<option <?php echo ($theme_row->default_theme) ? 'selected="selected"' : ''; ?> value="<?php echo $theme_row->id; ?>"><?php echo $theme_row->name; ?></option>
|
171 |
+
<?php
|
172 |
+
}
|
173 |
+
?>
|
174 |
+
</select>
|
175 |
+
</td>
|
176 |
+
</tr>
|
177 |
+
<tr id="tr_gallery">
|
178 |
+
<td class="spider_label"><label for="gallery"><?php _e("Gallery:", 'bwg_back'); ?> </label></td>
|
179 |
+
<td>
|
180 |
+
<select name="gallery" id="gallery" style="width:150px;">
|
181 |
+
<option value="0" selected="selected"><?php _e("Select Gallery", 'bwg_back'); ?></option>
|
182 |
+
<?php
|
183 |
+
foreach ($gallery_rows as $gallery_row) {
|
184 |
+
?>
|
185 |
+
<option value="<?php echo $gallery_row->id; ?>"><?php echo $gallery_row->name; ?></option>
|
186 |
+
<?php
|
187 |
+
}
|
188 |
+
?>
|
189 |
+
</select>
|
190 |
+
</td>
|
191 |
+
</tr>
|
192 |
+
<tr id="tr_album">
|
193 |
+
<td title="<?php _e('The selected album expanded content will be displayed.', 'bwg_back'); ?>" class="spider_label"><label for="album"><?php _e("Album:", 'bwg_back'); ?> </label></td>
|
194 |
+
<td>
|
195 |
+
<select name="album" id="album" style="width:150px;">
|
196 |
+
<option value="0" selected="selected"><?php _e("Select Album", 'bwg_back'); ?></option>
|
197 |
+
<?php
|
198 |
+
foreach ($album_rows as $album_row) {
|
199 |
+
?>
|
200 |
+
<option value="<?php echo $album_row->id; ?>"><?php echo $album_row->name; ?></option>
|
201 |
+
<?php
|
202 |
+
}
|
203 |
+
?>
|
204 |
+
</select>
|
205 |
+
</td>
|
206 |
+
</tr>
|
207 |
+
<tr id="tr_sort_by">
|
208 |
+
<td class="spider_label"><label for="sort_by"><?php _e("Sort images by:", 'bwg_back'); ?> </label></td>
|
209 |
+
<td>
|
210 |
+
<select name="sort_by" id="sort_by" style="width:150px;">
|
211 |
+
<option value="order" selected="selected"><?php _e("Order", 'bwg_back'); ?></option>
|
212 |
+
<option value="alt"><?php _e("Title", 'bwg_back'); ?></option>
|
213 |
+
<option value="date"><?php _e("Date", 'bwg_back'); ?></option>
|
214 |
+
<option value="filename"><?php _e("Filename", 'bwg_back'); ?></option>
|
215 |
+
<option value="size"><?php _e("Size", 'bwg_back'); ?></option>
|
216 |
+
<option value="filetype"><?php _e("Type", 'bwg_back'); ?></option>
|
217 |
+
<option value="resolution"><?php _e("Resolution", 'bwg_back'); ?></option>
|
218 |
+
<option value="random"><?php _e("Random", 'bwg_back'); ?></option>
|
219 |
+
</select>
|
220 |
+
</td>
|
221 |
+
</tr>
|
222 |
+
<tr id="tr_order_by">
|
223 |
+
<td class="spider_label"><label><?php _e("Order images", 'bwg_back'); ?>: </label></td>
|
224 |
+
<td>
|
225 |
+
<input type="radio" name="order_by" id="order_by_1" value="asc" checked="checked" /><label for="order_by_1"><?php _e("Ascending", 'bwg_back'); ?></label>
|
226 |
+
<input type="radio" name="order_by" id="order_by_0" value="desc" /><label for="order_by_0"><?php _e("Descending", 'bwg_back'); ?></label>
|
227 |
+
</td>
|
228 |
+
</tr>
|
229 |
+
<tr id="tr_show_search_box">
|
230 |
+
<td class="spider_label"><label><?php _e("Show search box:", 'bwg_back'); ?> </label></td>
|
231 |
+
<td>
|
232 |
+
<input type="radio" name="show_search_box" id="show_search_box_1" value="1" <?php if ($option_row->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_1"><?php _e("Yes", 'bwg_back'); ?></label>
|
233 |
+
<input type="radio" name="show_search_box" id="show_search_box_0" value="0" <?php if (!$option_row->show_search_box) echo 'checked="checked"'; ?> onchange="bwg_show_search_box()" /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
|
234 |
+
</td>
|
235 |
+
</tr>
|
236 |
+
<tr id="tr_search_box_width">
|
237 |
+
<td class="spider_label"><label for="search_box_width"><?php _e("Search box width:", 'bwg_back'); ?> </label></td>
|
238 |
+
<td><input type="text" name="search_box_width" id="search_box_width" value="<?php echo $option_row->search_box_width; ?>" class="spider_int_input" /> px</td>
|
239 |
+
</tr>
|
240 |
+
<tr id="tr_show_tag_box">
|
241 |
+
<td class="spider_label"><label><?php _e("Show tag box:", 'bwg_back'); ?> </label></td>
|
242 |
+
<td>
|
243 |
+
<input type="radio" name="show_tag_box" id="show_tag_box_1" value="1" <?php if ($option_row->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_tag_box_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
244 |
+
<input type="radio" name="show_tag_box" id="show_tag_box_0" value="0" <?php if (!$option_row->show_tag_box) echo 'checked="checked"'; ?> /><label for="show_search_box_0"><?php _e('No', 'bwg_back'); ?></label>
|
245 |
+
</td>
|
246 |
+
</tr>
|
247 |
+
<tr id="tr_show_sort_images">
|
248 |
+
<td class="spider_label"><label><?php _e("Show 'Order by' dropdown list:", 'bwg_back'); ?> </label></td>
|
249 |
+
<td>
|
250 |
+
<input type="radio" name="show_sort_images" id="show_sort_images_1" value="1" <?php if ($option_row->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
251 |
+
<input type="radio" name="show_sort_images" id="show_sort_images_0" value="0" <?php if (!$option_row->show_sort_images) echo 'checked="checked"'; ?> onchange="" /><label for="show_sort_images_0"><?php _e('No', 'bwg_back'); ?>;</label>
|
252 |
+
</td>
|
253 |
+
</tr>
|
254 |
+
<!--Thumbnails, Masonry viewies-->
|
255 |
+
<tr id="tr_masonry_hor_ver">
|
256 |
+
<td class="spider_label"><label><?php _e("Masonry:", 'bwg_back'); ?> </label></td>
|
257 |
+
<td>
|
258 |
+
<input type="radio" name="masonry_hor_ver" id="masonry_ver" value="vertical" onclick="bwg_change_label('image_column_number_label', 'Number of image rows: ');
|
259 |
+
bwg_change_label('thumb_width_height_label', 'Image thumbnail width: ');
|
260 |
+
jQuery('#thumb_width').show();
|
261 |
+
jQuery('#thumb_height').hide();
|
262 |
+
jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->masonry == 'vertical') ? 'checked' : ''; ?> /><label for="masonry_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
|
263 |
+
<input type="radio" name="masonry_hor_ver" id="masonry_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns: ", 'bwg_back'); ?>');
|
264 |
+
bwg_change_label('thumb_width_height_label', 'Image Thumbnail Height: ');
|
265 |
+
jQuery('#thumb_width').hide();
|
266 |
+
jQuery('#thumb_height').show();
|
267 |
+
jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->masonry == 'horizontal') ? 'checked' : ''; ?> /><label for="masonry_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
|
268 |
+
</td>
|
269 |
+
</tr>
|
270 |
+
<!--Thumbnails, Mosaic viewies-->
|
271 |
+
<tr id="tr_mosaic_hor_ver">
|
272 |
+
<td class="spider_label"><label><?php _e("Mosaic:", 'bwg_back'); ?> </label></td>
|
273 |
+
<td>
|
274 |
+
<input type="radio" name="mosaic_hor_ver" id="mosaic_ver" value="vertical" onclick="bwg_change_label('image_column_number_label', '<?php _e("Number of image rows: ", 'bwg_back'); ?>');
|
275 |
+
bwg_change_label('thumb_width_height_label', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
|
276 |
+
jQuery('#thumb_width').show();
|
277 |
+
jQuery('#thumb_height').hide();
|
278 |
+
jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
|
279 |
+
<input type="radio" name="mosaic_hor_ver" id="mosaic_hor" value="horizontal" onclick="bwg_change_label('image_column_number_label', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
|
280 |
+
bwg_change_label('thumb_width_height_label', '<?php _e("Image Thumbnail Height:", 'bwg_back'); ?> ');
|
281 |
+
jQuery('#thumb_width').hide();
|
282 |
+
jQuery('#thumb_height').show();
|
283 |
+
jQuery('#thumb_width_height_separator').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
|
284 |
+
|
285 |
+
|
286 |
+
</td>
|
287 |
+
</tr>
|
288 |
+
<tr id="tr_resizable_mosaic">
|
289 |
+
<td title="<?php _e('Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.', 'bwg_back'); ?>" class="spider_label"><label for="resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
|
290 |
+
<td>
|
291 |
+
<input type="radio" name="resizable_mosaic" id="resizable_mosaic_1" value="1" <?php echo ($option_row->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
292 |
+
<input type="radio" name="resizable_mosaic" id="resizable_mosaic_0" value="0" <?php echo ($option_row->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
|
293 |
+
<br />
|
294 |
+
</td>
|
295 |
+
</tr>
|
296 |
+
<tr id="tr_mosaic_total_width">
|
297 |
+
<td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
|
298 |
+
<td><input type="text" name="mosaic_total_width" id="mosaic_total_width" value="<?php echo $option_row->mosaic_total_width; ?>" class="spider_int_input" /> %</td>
|
299 |
+
</tr>
|
300 |
+
<!--Thumbnails, Masonry and Mosaic viewies-->
|
301 |
+
<tr id="tr_image_column_number">
|
302 |
+
<td class="spider_label"><label id="image_column_number_label" for="image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
|
303 |
+
<td><input type="text" name="image_column_number" id="image_column_number" value="<?php echo $option_row->image_column_number; ?>" class="spider_int_input" /></td>
|
304 |
+
</tr>
|
305 |
+
<tr id="tr_images_per_page">
|
306 |
+
<td title="<?php _e('If you want to display all images you should leave it blank or insert 0.', 'bwg_back'); ?>" class="spider_label"><label for="images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
|
307 |
+
<td><input type="text" name="images_per_page" id="images_per_page" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
308 |
+
</tr>
|
309 |
+
<tr id="tr_image_title_hover">
|
310 |
+
<td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
|
311 |
+
<td>
|
312 |
+
<input type="radio" name="image_title" id="image_title_hover" value="hover" <?php echo ($option_row->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
|
313 |
+
<input type="radio" name="image_title" id="image_title_show" value="show" <?php echo ($option_row->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
|
314 |
+
<input type="radio" name="image_title" id="image_title_none" value="none" <?php echo ($option_row->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
|
315 |
+
</td>
|
316 |
+
</tr>
|
317 |
+
<tr id="tr_image_enable_page">
|
318 |
+
<td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
|
319 |
+
<td>
|
320 |
+
<input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_yes" value="1" <?php echo ($option_row->image_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
321 |
+
<input type="radio" name="image_enable_page" class="hide_load_count" id="image_page_no" value="0" <?php echo ($option_row->image_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_no"><?php _e('No', 'bwg_back'); ?></label>
|
322 |
+
<input type="radio" name="image_enable_page" id="image_page_loadmore" value="2" <?php echo ($option_row->image_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
|
323 |
+
<input type="radio" name="image_enable_page" id="image_page_scrol_load" value="3" <?php echo ($option_row->image_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="image_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label>
|
324 |
+
</td>
|
325 |
+
</tr>
|
326 |
+
<tr id="tr_load_more_image_count">
|
327 |
+
<td class="spider_label"><label for="load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
|
328 |
+
<td><input type="text" name="load_more_image_count" id="load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
329 |
+
</tr>
|
330 |
+
<tr id="tr_thumb_width_height">
|
331 |
+
<td title="<?php _e('Maximum values for thumbnail dimension.', 'bwg_back'); ?>" class="spider_label"><label id="thumb_width_height_label" for="thumb_width"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
|
332 |
+
<td>
|
333 |
+
<input type="text" name="thumb_width" id="thumb_width" value="<?php echo $option_row->thumb_width; ?>" class="spider_int_input" /><span id="thumb_width_height_separator"> x </span>
|
334 |
+
<input type="text" name="thumb_height" id="thumb_height" value="<?php echo $option_row->thumb_height; ?>" class="spider_int_input" /> px
|
335 |
+
</td>
|
336 |
+
</tr>
|
337 |
+
|
338 |
+
<!--Compact Album view-->
|
339 |
+
<tr id="tr_compuct_album_column_number">
|
340 |
+
<td class="spider_label"><label for="compuct_album_column_number"><?php _e("Max. number of album columns:", 'bwg_back'); ?> </label></td>
|
341 |
+
<td><input type="text" name="compuct_album_column_number" id="compuct_album_column_number" value="<?php echo $option_row->album_column_number; ?>" class="spider_int_input" /></td>
|
342 |
+
</tr>
|
343 |
+
<tr id="tr_compuct_albums_per_page">
|
344 |
+
<td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
|
345 |
+
<td><input type="text" name="compuct_albums_per_page" id="compuct_albums_per_page" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
|
346 |
+
</tr>
|
347 |
+
<tr id="tr_compuct_album_title_hover">
|
348 |
+
<td class="spider_label"><label><?php _e("Album title:", 'bwg_back'); ?> </label></td>
|
349 |
+
<td>
|
350 |
+
<input type="radio" name="compuct_album_title" id="compuct_album_title_hover" value="hover" <?php echo ($option_row->album_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
|
351 |
+
<input type="radio" name="compuct_album_title" id="compuct_album_title_show" value="show" <?php echo ($option_row->album_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
|
352 |
+
<input type="radio" name="compuct_album_title" id="compuct_album_title_none" value="none" <?php echo ($option_row->album_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
|
353 |
+
</td>
|
354 |
+
</tr>
|
355 |
+
<tr id="tr_compuct_album_thumb_width_height">
|
356 |
+
<td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_thumb_width"><?php _e("Album Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
|
357 |
+
<td>
|
358 |
+
<input type="text" name="compuct_album_thumb_width" id="compuct_album_thumb_width" value="<?php echo $option_row->album_thumb_width; ?>" class="spider_int_input" /> x
|
359 |
+
<input type="text" name="compuct_album_thumb_height" id="compuct_album_thumb_height" value="<?php echo $option_row->album_thumb_height; ?>" class="spider_int_input" /> px
|
360 |
+
</td>
|
361 |
+
</tr>
|
362 |
+
<tr id="tr_compuct_album_view_type">
|
363 |
+
<td title="<?php _e('The gallery images view type in the album.<br /><br />This option is disabled in free version.', 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
|
364 |
+
<td>
|
365 |
+
<input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_1" value="thumbnail" <?php if ($option_row->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
|
366 |
+
<input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_0" value="masonry" <?php if ($option_row->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
|
367 |
+
<input disabled="disabled" type="radio" name="compuct_album_view_type" id="compuct_album_view_type_2" value="mosaic" <?php if ($option_row->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_compuct_album_view_type()" /><label for="compuct_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
|
368 |
+
</td>
|
369 |
+
</tr>
|
370 |
+
<tr id="tr_compuct_album_mosaic_hor_ver">
|
371 |
+
<td title="<?php _e('This option is disabled in free version.', 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Mosaic:", 'bwg_back'); ?> </label></td>
|
372 |
+
<td>
|
373 |
+
<input disabled="disabled" type="radio" name="compuct_album_mosaic_hor_ver" id="compuct_album_mosaic_ver" value="vertical" onclick="bwg_change_label('compuct_album_image_column_number', '<?php _e("Number of image rows:", 'bwg_back'); ?> ');
|
374 |
+
bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail width:", 'bwg_back'); ?> ');
|
375 |
+
jQuery('#compuct_album_image_thumb_width').show();
|
376 |
+
jQuery('#compuct_album_image_thumb_height').hide();
|
377 |
+
jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
|
378 |
+
<input disabled="disabled" type="radio" name="compuct_album_mosaic_hor_ver" id="compuct_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('compuct_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
|
379 |
+
bwg_change_label('compuct_album_image_thumb_dimensions', '<?php _e("Image thumbnail height:", 'bwg_back'); ?> ');
|
380 |
+
jQuery('#compuct_album_image_thumb_width').hide();
|
381 |
+
jQuery('#compuct_album_image_thumb_height').show();
|
382 |
+
jQuery('#compuct_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="compuct_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
|
383 |
+
|
384 |
+
|
385 |
+
</td>
|
386 |
+
</tr>
|
387 |
+
<tr id="tr_compuct_album_resizable_mosaic">
|
388 |
+
<td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="compuct_album_resizable_mosaic"><?php _e("Resizable mosaic", 'bwg_back'); ?></label></td>
|
389 |
+
<td>
|
390 |
+
<input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_1" value="1" <?php echo ($option_row->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
391 |
+
<input disabled="disabled" type="radio" name="compuct_album_resizable_mosaic" id="compuct_album_resizable_mosaic_0" value="0" <?php echo ($option_row->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="compuct_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
|
392 |
+
<br />
|
393 |
+
</td>
|
394 |
+
</tr>
|
395 |
+
<tr id="tr_compuct_album_mosaic_total_width">
|
396 |
+
<td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
|
397 |
+
<td><input type="text" name="compuct_album_mosaic_total_width" id="compuct_album_mosaic_total_width" value="<?php echo $option_row->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
|
398 |
+
</tr>
|
399 |
+
<tr id="tr_compuct_album_image_column_number">
|
400 |
+
<td class="spider_label"><label for="compuct_album_image_column_number"><?php _e("Max. number of image columns: ", 'bwg_back'); ?></label></td>
|
401 |
+
<td><input type="text" name="compuct_album_image_column_number" id="compuct_album_image_column_number" value="<?php echo $option_row->image_column_number; ?>" class="spider_int_input" /></td>
|
402 |
+
</tr>
|
403 |
+
<tr id="tr_compuct_album_images_per_page">
|
404 |
+
<td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
|
405 |
+
<td><input type="text" name="compuct_album_images_per_page" id="compuct_album_images_per_page" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
406 |
+
</tr>
|
407 |
+
<tr id="tr_compuct_album_image_title">
|
408 |
+
<td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
|
409 |
+
<td>
|
410 |
+
<input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_hover" value="hover" <?php echo ($option_row->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
|
411 |
+
<input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_show" value="show" <?php echo ($option_row->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
|
412 |
+
<input type="radio" name="compuct_album_image_title" id="compuct_album_image_title_none" value="none" <?php echo ($option_row->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="compuct_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
|
413 |
+
</td>
|
414 |
+
</tr>
|
415 |
+
<tr id="tr_compuct_album_image_thumb_width_height">
|
416 |
+
<td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_album_image_thumb_width" id="compuct_album_image_thumb_dimensions"><?php _e("Image thumbnail dimensions: ", 'bwg_back'); ?></label></td>
|
417 |
+
<td>
|
418 |
+
<input type="text" name="compuct_album_image_thumb_width" id="compuct_album_image_thumb_width" value="<?php echo $option_row->thumb_width; ?>" class="spider_int_input" /><span id="compuct_album_image_thumb_dimensions_x" > x </span>
|
419 |
+
<input type="text" name="compuct_album_image_thumb_height" id="compuct_album_image_thumb_height" value="<?php echo $option_row->thumb_height; ?>" class="spider_int_input" /> px
|
420 |
+
</td>
|
421 |
+
</tr>
|
422 |
+
<tr id="tr_compuct_album_enable_page">
|
423 |
+
<td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
|
424 |
+
<td>
|
425 |
+
<input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_yes" value="1" <?php echo ($option_row->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="compuct_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
426 |
+
<input type="radio" name="compuct_album_enable_page" class="hide_load_count" id="compuct_album_page_no" value="0" <?php echo ($option_row->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
|
427 |
+
<input type="radio" name="compuct_album_enable_page" id="compuct_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
|
428 |
+
<input type="radio" name="compuct_album_enable_page" id="compuct_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="compuct_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?></label>
|
429 |
+
</td>
|
430 |
+
</tr>
|
431 |
+
<tr id="tr_compuct_albums_per_page_load_more">
|
432 |
+
<td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="compuct_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
|
433 |
+
<td><input type="text" name="compuct_albums_per_page_load_more" id="compuct_albums_per_page_load_more" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
|
434 |
+
</tr>
|
435 |
+
<tr id="tr_compuct_album_load_more_image_count">
|
436 |
+
<td class="spider_label"><label for="compuct_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
|
437 |
+
<td><input type="text" name="compuct_album_load_more_image_count" id="compuct_album_load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
438 |
+
</tr>
|
439 |
+
|
440 |
+
<!--Extended Album view-->
|
441 |
+
<tr id="tr_extended_albums_per_page">
|
442 |
+
<td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page"><?php _e("Albums per page:", 'bwg_back'); ?> </label></td>
|
443 |
+
<td><input type="text" name="extended_albums_per_page" id="extended_albums_per_page" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
|
444 |
+
</tr>
|
445 |
+
<tr id="tr_extended_album_height">
|
446 |
+
<td class="spider_label"><label for="extended_album_height"><?php _e("Album row height:", 'bwg_back'); ?> </label></td>
|
447 |
+
<td><input type="text" name="extended_album_height" id="extended_album_height" value="<?php echo $option_row->extended_album_height; ?>" class="spider_int_input" /> px</td>
|
448 |
+
</tr>
|
449 |
+
<tr id="tr_extended_album_description_enable">
|
450 |
+
<td title="<?php _e("If you disable description only the title of the album will be displayed.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable album description:", 'bwg_back'); ?> </label></td>
|
451 |
+
<td>
|
452 |
+
<input type="radio" name="extended_album_description_enable" id="extended_album_description_yes" value="1" <?php echo ($option_row->extended_album_description_enable) ? 'checked' : ''; ?> /><label for="extended_album_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
453 |
+
<input type="radio" name="extended_album_description_enable" id="extended_album_description_no" value="0" <?php echo ($option_row->extended_album_description_enable) ? '' : 'checked'; ?> /><label for="extended_album_description_no"><?php _e('No', 'bwg_back'); ?></label>
|
454 |
+
</td>
|
455 |
+
</tr>
|
456 |
+
<tr id="tr_extended_album_thumb_width_height">
|
457 |
+
<td title="<?php _e("Maximum values for album thumb width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_thumb_width"><?php _e("Album thumbnail dimensions:", 'bwg_back'); ?> </label></td>
|
458 |
+
<td>
|
459 |
+
<input type="text" name="extended_album_thumb_width" id="extended_album_thumb_width" value="<?php echo $option_row->album_thumb_width; ?>" class="spider_int_input" /> x
|
460 |
+
<input type="text" name="extended_album_thumb_height" id="extended_album_thumb_height" value="<?php echo $option_row->album_thumb_height; ?>" class="spider_int_input" /> px
|
461 |
+
</td>
|
462 |
+
</tr>
|
463 |
+
<tr id="tr_extended_album_view_type">
|
464 |
+
<td title="<?php _e("The gallery images view type in the album.", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Album view type:", 'bwg_back'); ?> </label></td>
|
465 |
+
<td>
|
466 |
+
<input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_1" value="thumbnail" <?php if ($option_row->album_view_type == "thumbnail") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_1"><?php _e("Thumbnail", 'bwg_back'); ?></label>
|
467 |
+
<input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_0" value="masonry" <?php if ($option_row->album_view_type == "masonry") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_0"><?php _e("Masonry", 'bwg_back'); ?></label>
|
468 |
+
<input disabled="disabled" type="radio" name="extended_album_view_type" id="extended_album_view_type_2" value="mosaic" <?php if ($option_row->album_view_type == "mosaic") echo 'checked="checked"'; ?> onchange="bwg_change_extended_album_view_type()" /><label for="extended_album_view_type_2"><?php _e("Mosaic", 'bwg_back'); ?></label>
|
469 |
+
</td>
|
470 |
+
</tr>
|
471 |
+
<tr id="tr_extended_album_mosaic_hor_ver">
|
472 |
+
<td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Mosaic:", 'bwg_back'); ?> </label></td>
|
473 |
+
<td>
|
474 |
+
<input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_ver" value="vertical" onclick="bwg_change_label('extended_album_image_column_number', 'Number of image rows: ');
|
475 |
+
bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail width: ", 'bwg_back'); ?>');
|
476 |
+
jQuery('#extended_album_image_thumb_width').show();
|
477 |
+
jQuery('#extended_album_image_thumb_height').hide();
|
478 |
+
jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'vertical') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_ver"><?php _e("Vertical", 'bwg_back'); ?></label>
|
479 |
+
<input disabled="disabled" type="radio" name="extended_album_mosaic_hor_ver" id="extended_album_mosaic_hor" value="horizontal" onclick="bwg_change_label('extended_album_image_column_number', '<?php _e("Max. number of image columns:", 'bwg_back'); ?> ');
|
480 |
+
bwg_change_label('extended_album_image_thumb_dimensions', '<?php _e("Image thumbnail height: ", 'bwg_back'); ?>');
|
481 |
+
jQuery('#extended_album_image_thumb_width').hide();
|
482 |
+
jQuery('#extended_album_image_thumb_height').show();
|
483 |
+
jQuery('#extended_album_image_thumb_dimensions_x').hide();" <?php echo ($option_row->mosaic == 'horizontal') ? 'checked' : ''; ?> /><label for="extended_album_mosaic_hor"><?php _e("Horizontal", 'bwg_back'); ?></label>
|
484 |
+
|
485 |
+
|
486 |
+
</td>
|
487 |
+
</tr>
|
488 |
+
<tr id="tr_extended_album_resizable_mosaic">
|
489 |
+
<td title="<?php _e("Mosaic thumbnails do not have fixed size, but are proportional to the width of the parent container. This option keeps thumbs to look nice when viewed with very large or very small screen. Prevents zooming of thumbs.<br /><br />This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="extended_album_resizable_mosaic"><?php _e("Resizable mosaic:", 'bwg_back'); ?> </label></td>
|
490 |
+
<td>
|
491 |
+
<input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_1" value="1" <?php echo ($option_row->resizable_mosaic == 1) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
492 |
+
<input disabled="disabled" type="radio" name="extended_album_resizable_mosaic" id="extended_album_resizable_mosaic_0" value="0" <?php echo ($option_row->resizable_mosaic == 0) ? 'checked' : ''; ?> /><label for="extended_album_resizable_mosaic_0"><?php _e('No', 'bwg_back'); ?></label>
|
493 |
+
<br />
|
494 |
+
</td>
|
495 |
+
</tr>
|
496 |
+
|
497 |
+
<tr id="tr_extended_album_mosaic_total_width">
|
498 |
+
<td title="<?php _e("Percentage of container's width", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_mosaic_total_width"><?php _e("Total width of mosaic:", 'bwg_back'); ?> </label></td>
|
499 |
+
<td><input type="text" name="extended_album_mosaic_total_width" id="extended_album_mosaic_total_width" value="<?php echo $option_row->mosaic_total_width; ?>" class="spider_int_input" /> <?php _e("percent", 'bwg_back'); ?></td>
|
500 |
+
</tr>
|
501 |
+
<tr id="tr_extended_album_image_column_number">
|
502 |
+
<td class="spider_label"><label for="extended_album_image_column_number"><?php _e("Max. number of image columns:", 'bwg_back'); ?> </label></td>
|
503 |
+
<td><input type="text" name="extended_album_image_column_number" id="extended_album_image_column_number" value="<?php echo $option_row->image_column_number; ?>" class="spider_int_input" /></td>
|
504 |
+
</tr>
|
505 |
+
<tr id="tr_extended_album_images_per_page">
|
506 |
+
<td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
|
507 |
+
<td><input type="text" name="extended_album_images_per_page" id="extended_album_images_per_page" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
508 |
+
</tr>
|
509 |
+
<tr id="tr_extended_album_image_title">
|
510 |
+
<td class="spider_label"><label><?php _e("Image title:", 'bwg_back'); ?> </label></td>
|
511 |
+
<td>
|
512 |
+
<input type="radio" name="extended_album_image_title" id="extended_album_image_title_hover" value="hover" <?php echo ($option_row->image_title_show_hover == 'hover') ? 'checked' : ''; ?> /><label for="extended_album_image_title_hover"><?php _e("Show on hover", 'bwg_back'); ?></label><br />
|
513 |
+
<input type="radio" name="extended_album_image_title" id="extended_album_image_title_show" value="show" <?php echo ($option_row->image_title_show_hover == 'show') ? 'checked' : ''; ?> /><label for="extended_album_image_title_show"><?php _e("Always show", 'bwg_back'); ?></label><br />
|
514 |
+
<input type="radio" name="extended_album_image_title" id="extended_album_image_title_none" value="none" <?php echo ($option_row->image_title_show_hover == 'none') ? 'checked' : ''; ?> /><label for="extended_album_image_title_none"><?php _e("Don't show", 'bwg_back'); ?></label>
|
515 |
+
</td>
|
516 |
+
</tr>
|
517 |
+
<tr id="tr_extended_album_image_thumb_width_height">
|
518 |
+
<td title="<?php _e("Maximum values for thumbnail width and height.", 'bwg_back'); ?>" class="spider_label"><label for="extended_album_image_thumb_width" id="extended_album_image_thumb_dimensions"><?php _e("Image Thumbnail dimensions:", 'bwg_back'); ?> </label></td>
|
519 |
+
<td>
|
520 |
+
<input type="text" name="extended_album_image_thumb_width" id="extended_album_image_thumb_width" value="<?php echo $option_row->thumb_width; ?>" class="spider_int_input" /><span id="extended_album_image_thumb_dimensions_x" > x </span>
|
521 |
+
<input type="text" name="extended_album_image_thumb_height" id="extended_album_image_thumb_height" value="<?php echo $option_row->thumb_height; ?>" class="spider_int_input" /> px
|
522 |
+
</td>
|
523 |
+
</tr>
|
524 |
+
<tr id="tr_extended_album_enable_page">
|
525 |
+
<td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
|
526 |
+
<td>
|
527 |
+
<input type="radio" name="extended_album_enable_page" id="extended_album_page_yes" value="1" <?php echo ($option_row->album_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
528 |
+
<input type="radio" name="extended_album_enable_page" id="extended_album_page_no" value="0" <?php echo ($option_row->album_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_no"><?php _e('No', 'bwg_back'); ?></label>
|
529 |
+
<input type="radio" name="extended_album_enable_page" id="extended_album_page_loadmore" value="2" <?php echo ($option_row->album_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_loadmore"><?php _e("Load More", 'bwg_back'); ?></label>
|
530 |
+
<input type="radio" name="extended_album_enable_page" id="extended_album_page_scrol_load" value="3" <?php echo ($option_row->album_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()"/><label for="extended_album_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
|
531 |
+
</td>
|
532 |
+
</tr>
|
533 |
+
<tr id="tr_extended_albums_per_page_load_more">
|
534 |
+
<td title="<?php _e("If you want to display all albums you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="extended_albums_per_page_load_more"><?php _e("Albums per load:", 'bwg_back'); ?> </label></td>
|
535 |
+
<td><input type="text" name="extended_albums_per_page_load_more" id="extended_albums_per_page_load_more" value="<?php echo $option_row->albums_per_page; ?>" class="spider_int_input" /></td>
|
536 |
+
</tr>
|
537 |
+
<tr id="tr_extended_album_load_more_image_count">
|
538 |
+
<td class="spider_label"><label for="extended_album_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
|
539 |
+
<td><input type="text" name="extended_album_load_more_image_count" id="extended_album_load_more_image_count" value="<?php echo $option_row->images_per_page; ?>" class="spider_int_input" /></td>
|
540 |
+
</tr>
|
541 |
+
|
542 |
+
<!--Image Browser view-->
|
543 |
+
<tr id="tr_image_browser_width_height">
|
544 |
+
<td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="image_browser_width"><?php _e("Image width: ", 'bwg_back'); ?></label></td>
|
545 |
+
<td>
|
546 |
+
<input type="text" name="image_browser_width" id="image_browser_width" value="<?php echo $option_row->image_browser_width; ?>" class="spider_int_input" /> px
|
547 |
+
</td>
|
548 |
+
</tr>
|
549 |
+
<tr id="tr_image_browser_title_enable">
|
550 |
+
<td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
|
551 |
+
<td>
|
552 |
+
<input type="radio" name="image_browser_title_enable" id="image_browser_title_yes" value="1" <?php echo ($option_row->image_browser_title_enable) ? 'checked' : ''; ?> /><label for="image_browser_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
|
553 |
+
<input type="radio" name="image_browser_title_enable" id="image_browser_title_no" value="0" <?php echo ($option_row->image_browser_title_enable) ? '' : 'checked'; ?> /><label for="image_browser_title_no"><?php _e('No', 'bwg_back'); ?></label>
|
554 |
+
</td>
|
555 |
+
</tr>
|
556 |
+
<tr id="tr_image_browser_description_enable">
|
557 |
+
<td class="spider_label"><label><?php _e("Enable image description:", 'bwg_back'); ?> </label></td>
|
558 |
+
<td>
|
559 |
+
<input type="radio" name="image_browser_description_enable" id="image_browser_description_yes" value="1" <?php echo ($option_row->image_browser_description_enable) ? 'checked' : ''; ?> /><label for="image_browser_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
560 |
+
<input type="radio" name="image_browser_description_enable" id="image_browser_description_no" value="0" <?php echo ($option_row->image_browser_description_enable) ? '' : 'checked'; ?> /><label for="image_browser_description_no"><?php _e('No', 'bwg_back'); ?></label>
|
561 |
+
</td>
|
562 |
+
</tr>
|
563 |
+
|
564 |
+
<!--Blog Style view-->
|
565 |
+
<tr id="tr_blog_style_width_height">
|
566 |
+
<td title="<?php _e("Maximum value for image width.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_width"><?php _e("Image width:", 'bwg_back'); ?> </label></td>
|
567 |
+
<td>
|
568 |
+
<input type="text" name="blog_style_width" id="blog_style_width" value="<?php echo $option_row->blog_style_width; ?>" class="spider_int_input" /> px
|
569 |
+
</td>
|
570 |
+
</tr>
|
571 |
+
<tr id="tr_blog_style_title_enable">
|
572 |
+
<td class="spider_label"><label><?php _e("Enable image title:", 'bwg_back'); ?> </label></td>
|
573 |
+
<td>
|
574 |
+
<input type="radio" name="blog_style_title_enable" id="blog_style_title_yes" value="1" <?php echo ($option_row->blog_style_title_enable) ? 'checked' : ''; ?> /><label for="blog_style_title_es"><?php _e('Yes', 'bwg_back'); ?></label>
|
575 |
+
<input type="radio" name="blog_style_title_enable" id="blog_style_title_no" value="0" <?php echo ($option_row->blog_style_title_enable) ? '' : 'checked'; ?> /><label for="blog_style_title_no"><?php _e('No', 'bwg_back'); ?></label>
|
576 |
+
</td>
|
577 |
+
</tr>
|
578 |
+
<tr id="tr_blog_style_images_per_page">
|
579 |
+
<td title="<?php _e("If you want to display all images you should leave it blank or insert 0.", 'bwg_back'); ?>" class="spider_label"><label for="blog_style_images_per_page"><?php _e("Images per page:", 'bwg_back'); ?> </label></td>
|
580 |
+
<td><input type="text" name="blog_style_images_per_page" id="blog_style_images_per_page" value="<?php echo $option_row->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
|
581 |
+
</tr>
|
582 |
+
<tr id="tr_blog_style_enable_page">
|
583 |
+
<td class="spider_label"><label><?php _e("Enable pagination:", 'bwg_back'); ?> </label></td>
|
584 |
+
<td>
|
585 |
+
<input type="radio" name="blog_style_enable_page" id="blog_style_page_yes" value="1" <?php echo ($option_row->blog_style_enable_page == '1') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
586 |
+
<input type="radio" name="blog_style_enable_page" id="blog_style_page_no" value="0" <?php echo ($option_row->blog_style_enable_page == '0') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_no"><?php _e('No', 'bwg_back'); ?></label>
|
587 |
+
<input type="radio" name="blog_style_enable_page" id="blog_style_page_loadmore" value="2" <?php echo ($option_row->blog_style_enable_page == '2') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_loadmore">Load more</label>
|
588 |
+
<input type="radio" name="blog_style_enable_page" id="blog_style_page_scrol_load" value="3" <?php echo ($option_row->blog_style_enable_page == '3') ? 'checked' : ''; ?> onchange="bwg_loadmore()" /><label for="blog_style_page_scrol_load"><?php _e("Scroll Load", 'bwg_back'); ?> </label>
|
589 |
+
</td>
|
590 |
+
</tr>
|
591 |
+
<tr id="tr_blog_style_load_more_image_count">
|
592 |
+
<td class="spider_label"><label for="blog_style_load_more_image_count"><?php _e("Images per load:", 'bwg_back'); ?> </label></td>
|
593 |
+
<td><input type="text" name="blog_style_load_more_image_count" id="blog_style_load_more_image_count" value="<?php echo $option_row->blog_style_images_per_page; ?>" class="spider_int_input" /></td>
|
594 |
+
</tr>
|
595 |
+
|
596 |
+
<!--Slideshow view-->
|
597 |
+
<tr id="tr_slideshow_effect">
|
598 |
+
<td class="spider_label"><label for="slideshow_effect"><?php _e("Slideshow Effect:", 'bwg_back'); ?> </label></td>
|
599 |
+
<td>
|
600 |
+
<select name="slideshow_effect" id="slideshow_effect" style="width:150px;">
|
601 |
+
<?php
|
602 |
+
foreach ($effects as $key => $effect) {
|
603 |
+
?>
|
604 |
+
<option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="' . __("This effect is disabled in free version.","bwg_back") . '"' : ''; ?> <?php echo ($option_row->slideshow_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
|
605 |
+
<?php
|
606 |
+
}
|
607 |
+
?>
|
608 |
+
</select>
|
609 |
+
</td>
|
610 |
+
</tr>
|
611 |
+
<tr id="tr_slideshow_interval">
|
612 |
+
<td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
|
613 |
+
<td><input type="text" name="slideshow_interval" id="slideshow_interval" value="<?php echo $option_row->slideshow_interval; ?>" class="spider_int_input" /> sec.</td>
|
614 |
+
</tr>
|
615 |
+
<tr id="tr_slideshow_width_height">
|
616 |
+
<td title="<?php _e("Maximum values for slideshow width and height.", 'bwg_back'); ?>" class="spider_label"><label for="slideshow_width"><?php _e("Slideshow dimensions:", 'bwg_back'); ?> </label></td>
|
617 |
+
<td>
|
618 |
+
<input type="text" name="slideshow_width" id="slideshow_width" value="<?php echo $option_row->slideshow_width; ?>" class="spider_int_input" /> x
|
619 |
+
<input type="text" name="slideshow_height" id="slideshow_height" value="<?php echo $option_row->slideshow_height; ?>" class="spider_int_input" /> px
|
620 |
+
</td>
|
621 |
+
</tr>
|
622 |
+
<tr id="tr_enable_slideshow_autoplay">
|
623 |
+
<td class="spider_label"><label><?php _e("Enable Autoplay:", 'bwg_back'); ?> </label></td>
|
624 |
+
<td>
|
625 |
+
<input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_yes" value="1" <?php echo ($option_row->slideshow_enable_autoplay) ? 'checked' : ''; ?> /><label for="slideshow_autoplay_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
626 |
+
<input type="radio" name="enable_slideshow_autoplay" id="slideshow_autoplay_no" value="0" <?php echo ($option_row->slideshow_enable_autoplay) ? '' : 'checked'; ?> /><label for="slideshow_autoplay_no"><?php _e('No', 'bwg_back'); ?></label>
|
627 |
+
</td>
|
628 |
+
</tr>
|
629 |
+
<tr id="tr_enable_slideshow_shuffle">
|
630 |
+
<td class="spider_label"><label><?php _e("Enable Shuffle:", 'bwg_back'); ?> </label></td>
|
631 |
+
<td>
|
632 |
+
<input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_yes" value="1" <?php echo ($option_row->slideshow_enable_shuffle) ? 'checked' : ''; ?> /><label for="slideshow_shuffle_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
633 |
+
<input type="radio" name="enable_slideshow_shuffle" id="slideshow_shuffle_no" value="0" <?php echo ($option_row->slideshow_enable_shuffle) ? '' : 'checked'; ?> /><label for="slideshow_shuffle_no"><?php _e('No', 'bwg_back'); ?></label>
|
634 |
+
</td>
|
635 |
+
</tr>
|
636 |
+
<tr id="tr_enable_slideshow_ctrl">
|
637 |
+
<td class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
|
638 |
+
<td>
|
639 |
+
<input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_yes" value="1" <?php echo ($option_row->slideshow_enable_ctrl) ? 'checked' : ''; ?> /><label for="slideshow_ctrl_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
640 |
+
<input type="radio" name="enable_slideshow_ctrl" id="slideshow_ctrl_no" value="0" <?php echo ($option_row->slideshow_enable_ctrl) ? '' : 'checked'; ?> /><label for="slideshow_ctrl_no"><?php _e('No', 'bwg_back'); ?></label>
|
641 |
+
</td>
|
642 |
+
</tr>
|
643 |
+
<tr id="tr_enable_slideshow_filmstrip">
|
644 |
+
<td title="<?php _e("Enable slideshow filmstrip view", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable slideshow filmstrip:", 'bwg_back'); ?> </label></td>
|
645 |
+
<td>
|
646 |
+
<input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_yes')" <?php echo ($option_row->slideshow_enable_filmstrip) ? 'checked' : ''; ?> /><label for="slideshow_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
647 |
+
<input disabled="disabled" type="radio" name="enable_slideshow_filmstrip" id="slideshow_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_filmstrip_height', 'slideshow_filmstrip_no')" <?php echo ($option_row->slideshow_enable_filmstrip) ? '' : 'checked'; ?> /><label for="slideshow_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
|
648 |
+
</td>
|
649 |
+
</tr>
|
650 |
+
<tr id="tr_slideshow_filmstrip_height">
|
651 |
+
<td class="spider_label spider_free_version_label"><label for="slideshow_filmstrip_height"><?php _e("Slideshow Filmstrip size:", 'bwg_back'); ?> </label></td>
|
652 |
+
<td class="spider_free_version_label"><input disabled="disabled" type="text" name="slideshow_filmstrip_height" id="slideshow_filmstrip_height" value="<?php echo $option_row->slideshow_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
|
653 |
+
</tr>
|
654 |
+
</tbody>
|
655 |
+
</table>
|
656 |
+
</div>
|
657 |
+
<div class="bwg_short_div" style="border-right: 1px solid #000000;">
|
658 |
+
<table>
|
659 |
+
<!--Slideshow view-->
|
660 |
+
<tbody id="tbody_slideshow">
|
661 |
+
<tr id="tr_slideshow_enable_title">
|
662 |
+
<td class="spider_label"><label><?php _e("Enable Image Title:", 'bwg_back'); ?> </label></td>
|
663 |
+
<td>
|
664 |
+
<input type="radio" name="slideshow_enable_title" id="slideshow_title_yes" value="1" <?php echo ($option_row->slideshow_enable_title) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes')" /><label for="slideshow_title_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
665 |
+
<input type="radio" name="slideshow_enable_title" id="slideshow_title_no" value="0" <?php echo ($option_row->slideshow_enable_title) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_title_position', 'slideshow_title_no')" /><label for="slideshow_title_no"><?php _e('No', 'bwg_back'); ?></label>
|
666 |
+
</td>
|
667 |
+
</tr>
|
668 |
+
<tr id="tr_slideshow_title_position">
|
669 |
+
<td title="<?php _e("Image title position on slideshow", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Title Position:", 'bwg_back'); ?> </label></td>
|
670 |
+
<td>
|
671 |
+
<table class="bws_position_table">
|
672 |
+
<tbody>
|
673 |
+
<tr>
|
674 |
+
<td><input type="radio" value="top-left" id="slideshow_title_top-left" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'top-left') ? 'checked' : ''; ?>></td>
|
675 |
+
<td><input type="radio" value="top-center" id="slideshow_title_top-center" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'top-center') ? 'checked' : ''; ?>></td>
|
676 |
+
<td><input type="radio" value="top-right" id="slideshow_title_top-right" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'top-right') ? 'checked' : ''; ?>></td>
|
677 |
+
</tr>
|
678 |
+
<tr>
|
679 |
+
<td><input type="radio" value="middle-left" id="slideshow_title_middle-left" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'middle-left') ? 'checked' : ''; ?>></td>
|
680 |
+
<td><input type="radio" value="middle-center" id="slideshow_title_middle-center" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'middle-center') ? 'checked' : ''; ?>></td>
|
681 |
+
<td><input type="radio" value="middle-right" id="slideshow_title_middle-right" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'middle-right') ? 'checked' : ''; ?>></td>
|
682 |
+
</tr>
|
683 |
+
<tr>
|
684 |
+
<td><input type="radio" value="bottom-left" id="slideshow_title_bottom-left" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'bottom-left') ? 'checked' : ''; ?>></td>
|
685 |
+
<td><input type="radio" value="bottom-center" id="slideshow_title_bottom-center" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'bottom-center') ? 'checked' : ''; ?>></td>
|
686 |
+
<td><input type="radio" value="bottom-right" id="slideshow_title_bottom-right" name="slideshow_title_position" <?php echo ($option_row->slideshow_title_position == 'bottom-right') ? 'checked' : ''; ?>></td>
|
687 |
+
</tr>
|
688 |
+
</tbody>
|
689 |
+
</table>
|
690 |
+
</td>
|
691 |
+
</tr>
|
692 |
+
<tr id="tr_slideshow_full_width_title">
|
693 |
+
<td title="<?php _e("Display image title based on the slideshow dimensions.", 'bwg_back'); ?>" class="spider_label">
|
694 |
+
<label><?php _e("Full width title:", 'bwg_back'); ?></label>
|
695 |
+
</td>
|
696 |
+
<td>
|
697 |
+
<input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_1" value="1" <?php if ($option_row->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
698 |
+
<input type="radio" name="slideshow_title_full_width" id="slideshow_title_full_width_0" value="0" <?php if (!$option_row->slideshow_title_full_width) echo 'checked="checked"'; ?> /><label for="slideshow_title_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
|
699 |
+
</td>
|
700 |
+
</tr>
|
701 |
+
<tr id="tr_slideshow_enable_description">
|
702 |
+
<td class="spider_label"><label><?php _e("Enable Image Description:", 'bwg_back'); ?> </label></td>
|
703 |
+
<td>
|
704 |
+
<input type="radio" name="slideshow_enable_description" id="slideshow_description_yes" value="1" <?php echo ($option_row->slideshow_enable_description) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_description_position', 'slideshow_description_yes')" /><label for="slideshow_description_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
705 |
+
<input type="radio" name="slideshow_enable_description" id="slideshow_description_no" value="0" <?php echo ($option_row->slideshow_enable_description) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_description_position', 'slideshow_description_no')" /><label for="slideshow_description_no"><?php _e('No', 'bwg_back'); ?></label>
|
706 |
+
</td>
|
707 |
+
</tr>
|
708 |
+
<tr id="tr_slideshow_description_position">
|
709 |
+
<td title="<?php _e("Image description position on slideshow", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Description Position: ", 'bwg_back'); ?></label></td>
|
710 |
+
<td>
|
711 |
+
<table class="bws_position_table">
|
712 |
+
<tbody>
|
713 |
+
<tr>
|
714 |
+
<td><input type="radio" value="top-left" id="slideshow_description_top-left" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'top-left') ? 'checked' : ''; ?>></td>
|
715 |
+
<td><input type="radio" value="top-center" id="slideshow_description_top-center" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'top-center') ? 'checked' : ''; ?>></td>
|
716 |
+
<td><input type="radio" value="top-right" id="slideshow_description_top-right" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'top-right') ? 'checked' : ''; ?>></td>
|
717 |
+
</tr>
|
718 |
+
<tr>
|
719 |
+
<td><input type="radio" value="middle-left" id="slideshow_description_middle-left" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'middle-left') ? 'checked' : ''; ?>></td>
|
720 |
+
<td><input type="radio" value="middle-center" id="slideshow_description_middle-center" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'middle-center') ? 'checked' : ''; ?>></td>
|
721 |
+
<td><input type="radio" value="middle-right" id="slideshow_description_middle-right" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'middle-right') ? 'checked' : ''; ?>></td>
|
722 |
+
</tr>
|
723 |
+
<tr>
|
724 |
+
<td><input type="radio" value="bottom-left" id="slideshow_description_bottm-Left" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'bottom-left') ? 'checked' : ''; ?>></td>
|
725 |
+
<td><input type="radio" value="bottom-center" id="slideshow_description_bottom-center" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'bottom-center') ? 'checked' : ''; ?>></td>
|
726 |
+
<td><input type="radio" value="bottom-right" id="slideshow_description_bottm-right" name="slideshow_description_position" <?php echo ($option_row->slideshow_description_position == 'bottom-right') ? 'checked' : ''; ?>></td>
|
727 |
+
</tr>
|
728 |
+
</tbody>
|
729 |
+
</table>
|
730 |
+
</td>
|
731 |
+
</tr>
|
732 |
+
<tr id="tr_enable_slideshow_music">
|
733 |
+
<td class="spider_label"><label><?php _e("Enable Slideshow Music:", 'bwg_back'); ?> </label></td>
|
734 |
+
<td>
|
735 |
+
<input type="radio" name="enable_slideshow_music" id="slideshow_music_yes" value="1" onClick="bwg_enable_disable('', 'tr_slideshow_music_url', 'slideshow_music_yes')" <?php echo ($option_row->slideshow_enable_music) ? 'checked' : ''; ?> /><label for="slideshow_music_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
736 |
+
<input type="radio" name="enable_slideshow_music" id="slideshow_music_no" value="0" onClick="bwg_enable_disable('none', 'tr_slideshow_music_url', 'slideshow_music_no')" <?php echo ($option_row->slideshow_enable_music) ? '' : 'checked'; ?> /><label for="slideshow_music_no"><?php _e('No', 'bwg_back'); ?></label>
|
737 |
+
</td>
|
738 |
+
</tr>
|
739 |
+
<tr id="tr_slideshow_music_url">
|
740 |
+
<td title="<?php _e("Enter absolute audio file url or add file from Options page.", 'bwg_back'); ?>" class="spider_label">
|
741 |
+
<label for="slideshow_music_url"><?php _e("Music url:", 'bwg_back'); ?> </label>
|
742 |
+
</td>
|
743 |
+
<td>
|
744 |
+
<input type="text" id="slideshow_music_url" name="slideshow_music_url" value="<?php echo $option_row->slideshow_audio_url; ?>" style="display:inline-block;" />
|
745 |
+
</td>
|
746 |
+
</tr>
|
747 |
+
</tbody>
|
748 |
+
|
749 |
+
<!--Lightbox view-->
|
750 |
+
<tbody id="tbody_popup_other">
|
751 |
+
<tr id="tr_thumb_click_action">
|
752 |
+
<td class="spider_label"><label><?php _e("Thumb click action:", 'bwg_back'); ?> </label></td>
|
753 |
+
<td>
|
754 |
+
<input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($option_row->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label><br />
|
755 |
+
<input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($option_row->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label><br />
|
756 |
+
<input type="radio" name="thumb_click_action" id="thumb_click_action_3" value="do_nothing" <?php if ($option_row->thumb_click_action == 'do_nothing') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_3"><?php _e("Do Nothing", 'bwg_back'); ?></label>
|
757 |
+
</td>
|
758 |
+
</tr>
|
759 |
+
<tr id="tr_thumb_link_target">
|
760 |
+
<td title="<?php _e("Open new window when redirecting.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Open in new window:", 'bwg_back'); ?> </label></td>
|
761 |
+
<td>
|
762 |
+
<input type="radio" name="thumb_link_target" id="thumb_link_target_yes" value="1" <?php if ($option_row->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
763 |
+
<input type="radio" name="thumb_link_target" id="thumb_link_target_no" value="0" <?php if (!$option_row->thumb_link_target) echo 'checked="checked"'; ?> /><label for="thumb_link_target_no"><?php _e('No', 'bwg_back'); ?></label>
|
764 |
+
</td>
|
765 |
+
</tr>
|
766 |
+
</tbody>
|
767 |
+
<tbody id="tbody_popup">
|
768 |
+
<tr id="tr_popup_fullscreen">
|
769 |
+
<td title="<?php _e("Enable full width feature for the lightbox.", 'bwg_back'); ?>" class="spider_label">
|
770 |
+
<label><?php _e("Full width lightbox:", 'bwg_back'); ?></label>
|
771 |
+
</td>
|
772 |
+
<td>
|
773 |
+
<input type="radio" name="popup_fullscreen" id="popup_fullscreen_1" value="1" <?php if ($option_row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
774 |
+
<input type="radio" name="popup_fullscreen" id="popup_fullscreen_0" value="0" <?php if (!$option_row->popup_fullscreen) echo 'checked="checked"'; ?> onchange="bwg_popup_fullscreen()" /><label for="popup_fullscreen_0"><?php _e('No', 'bwg_back'); ?></label>
|
775 |
+
</td>
|
776 |
+
</tr>
|
777 |
+
<tr id="tr_popup_width_height">
|
778 |
+
<td title="<?php _e("Maximum values for lightbox width and height.", 'bwg_back'); ?>" class="spider_label"><label for="popup_width"><?php _e("Lightbox dimensions:", 'bwg_back'); ?> </label></td>
|
779 |
+
<td>
|
780 |
+
<input type="text" name="popup_width" id="popup_width" value="<?php echo $option_row->popup_width; ?>" class="spider_int_input" /> x
|
781 |
+
<input type="text" name="popup_height" id="popup_height" value="<?php echo $option_row->popup_height; ?>" class="spider_int_input" /> px
|
782 |
+
</td>
|
783 |
+
</tr>
|
784 |
+
<tr id="tr_popup_effect">
|
785 |
+
<td title="<?php _e("Lightbox slideshow effect.", 'bwg_back'); ?>" class="spider_label"><label for="popup_effect"><?php _e("Lightbox effect:", 'bwg_back'); ?> </label></td>
|
786 |
+
<td>
|
787 |
+
<select name="popup_effect" id="popup_effect" style="width:150px;">
|
788 |
+
<?php
|
789 |
+
foreach ($effects as $key => $effect) {
|
790 |
+
?>
|
791 |
+
<option value="<?php echo $key; ?>" <?php echo ($key != 'none' && $key != 'fade') ? 'disabled="disabled" title="This effect is disabled in free version."' : ''; ?> <?php echo ($option_row->popup_type == $key) ? 'selected' : ''; ?>><?php echo __($effect,"bwg_back"); ?></option>
|
792 |
+
<?php
|
793 |
+
}
|
794 |
+
?>
|
795 |
+
</select>
|
796 |
+
</td>
|
797 |
+
</tr>
|
798 |
+
<tr id="tr_popup_autoplay">
|
799 |
+
<td class="spider_label">
|
800 |
+
<label><?php _e("Lightbox autoplay:", 'bwg_back'); ?> </label>
|
801 |
+
</td>
|
802 |
+
<td>
|
803 |
+
<input type="radio" name="popup_autoplay" id="popup_autoplay_1" value="1" <?php if ($option_row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
804 |
+
<input type="radio" name="popup_autoplay" id="popup_autoplay_0" value="0" <?php if (!$option_row->popup_autoplay) echo 'checked="checked"'; ?> /><label for="popup_autoplay_0"><?php _e('No', 'bwg_back'); ?></label>
|
805 |
+
</td>
|
806 |
+
</tr>
|
807 |
+
<tr id="tr_popup_interval">
|
808 |
+
<td title="<?php _e("Interval between two images.", 'bwg_back'); ?>" class="spider_label"><label for="popup_interval"><?php _e("Time interval:", 'bwg_back'); ?> </label></td>
|
809 |
+
<td><input type="text" name="popup_interval" id="popup_interval" value="<?php echo $option_row->popup_interval; ?>" class="spider_int_input" /> sec.</td>
|
810 |
+
</tr>
|
811 |
+
<tr id="tr_popup_enable_filmstrip">
|
812 |
+
<td title="<?php _e("Enable filmstrip view for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable filmstrip in lightbox:", 'bwg_back'); ?> </label></td>
|
813 |
+
<td>
|
814 |
+
<input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_yes" value="1" onClick="bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_filmstrip_yes')" <?php echo ($option_row->popup_enable_filmstrip) ? 'checked' : ''; ?> /><label for="popup_filmstrip_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
815 |
+
<input disabled="disabled" type="radio" name="popup_enable_filmstrip" id="popup_filmstrip_no" value="0" onClick="bwg_enable_disable('none', 'tr_popup_filmstrip_height', 'popup_filmstrip_no')" <?php echo ($option_row->popup_enable_filmstrip) ? '' : 'checked'; ?> /><label for="popup_filmstrip_no"><?php _e('No', 'bwg_back'); ?></label>
|
816 |
+
</td>
|
817 |
+
</tr>
|
818 |
+
<tr id="tr_popup_filmstrip_height">
|
819 |
+
<td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label for="popup_filmstrip_height"><?php _e("Filmstrip size:", 'bwg_back'); ?> </label></td>
|
820 |
+
<td class="spider_free_version_label"><input disabled="disabled" type="text" name="popup_filmstrip_height" id="popup_filmstrip_height" value="<?php echo $option_row->popup_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
|
821 |
+
</tr>
|
822 |
+
<tr id="tr_popup_hit_counter">
|
823 |
+
<td title="<?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Display hit counter:", 'bwg_back'); ?> </label></td>
|
824 |
+
<td>
|
825 |
+
<input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_yes" value="1" <?php echo ($option_row->popup_hit_counter) ? 'checked' : ''; ?> /><label for="popup_hit_counter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
826 |
+
<input disabled="disabled" type="radio" name="popup_hit_counter" id="popup_hit_counter_no" value="0" <?php echo ($option_row->popup_hit_counter) ? '' : 'checked'; ?> /><label for="popup_hit_counter_no"><?php _e('No', 'bwg_back'); ?></label>
|
827 |
+
</td>
|
828 |
+
</tr>
|
829 |
+
<tr id="tr_popup_enable_ctrl_btn">
|
830 |
+
<td title="<?php _e("Enable control buttons in lightbox", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable control buttons:", 'bwg_back'); ?> </label></td>
|
831 |
+
<td>
|
832 |
+
<input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_yes" value="1" onClick="bwg_enable_disable('', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_yes');" <?php echo ($option_row->popup_enable_ctrl_btn) ? 'checked' : ''; ?> /><label for="popup_ctrl_btn_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
833 |
+
<input type="radio" name="popup_enable_ctrl_btn" id="popup_ctrl_btn_no" value="0" onClick="bwg_enable_disable('none', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_no');" <?php echo ($option_row->popup_enable_ctrl_btn) ? '' : 'checked'; ?> /><label for="popup_ctrl_btn_no"><?php _e('No', 'bwg_back'); ?></label>
|
834 |
+
</td>
|
835 |
+
</tr>
|
836 |
+
</tbody>
|
837 |
+
<tbody id="tbody_popup_ctrl_btn">
|
838 |
+
<tr id="tr_popup_enable_fullscreen">
|
839 |
+
<td title="<?php _e("Enable fullscreen view for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable fullscreen:", 'bwg_back'); ?> </label></td>
|
840 |
+
<td>
|
841 |
+
<input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_yes" value="1" <?php echo ($option_row->popup_enable_fullscreen) ? 'checked' : ''; ?> /><label for="popup_fullscreen_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
842 |
+
<input type="radio" name="popup_enable_fullscreen" id="popup_fullscreen_no" value="0" <?php echo ($option_row->popup_enable_fullscreen) ? '' : 'checked'; ?> /><label for="popup_fullscreen_no"><?php _e('No', 'bwg_back'); ?></label>
|
843 |
+
</td>
|
844 |
+
</tr>
|
845 |
+
<tr id="tr_popup_enable_info">
|
846 |
+
<td title="<?php _e("Enable title, description for images", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Enable info:", 'bwg_back'); ?> </label></td>
|
847 |
+
<td>
|
848 |
+
<input type="radio" name="popup_enable_info" id="popup_info_yes" value="1" <?php echo ($option_row->popup_enable_info) ? 'checked="checked"' : ''; ?> /><label for="popup_info_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
849 |
+
<input type="radio" name="popup_enable_info" id="popup_info_no" value="0" <?php echo ($option_row->popup_enable_info) ? '' : 'checked="checked"'; ?> /><label for="popup_info_no"><?php _e('No', 'bwg_back'); ?></label>
|
850 |
+
</td>
|
851 |
+
</tr>
|
852 |
+
<tr id="tr_popup_info_always_show">
|
853 |
+
<td class="spider_label"><label><?php _e("Display info by default:", 'bwg_back'); ?> </label></td>
|
854 |
+
<td>
|
855 |
+
<input type="radio" name="popup_info_always_show" id="popup_info_always_show_yes" value="1" <?php echo ($option_row->popup_info_always_show) ? 'checked="checked"' : ''; ?> /><label for="popup_info_always_show_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
856 |
+
<input type="radio" name="popup_info_always_show" id="popup_info_always_show_no" value="0" <?php echo ($option_row->popup_info_always_show) ? '' : 'checked="checked"'; ?> /><label for="popup_info_always_show_no"><?php _e('No', 'bwg_back'); ?></label>
|
857 |
+
</td>
|
858 |
+
</tr>
|
859 |
+
<tr id="tr_popup_info_full_width">
|
860 |
+
<td title="<?php _e("Display image information based on the lightbox dimensions.", 'bwg_back'); ?>" class="spider_label"><label><?php _e("Full width info:", 'bwg_back'); ?></label></td>
|
861 |
+
<td>
|
862 |
+
<input type="radio" name="popup_info_full_width" id="popup_info_full_width_1" value="1" <?php if ($option_row->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_1"><?php _e('Yes', 'bwg_back'); ?></label>
|
863 |
+
<input type="radio" name="popup_info_full_width" id="popup_info_full_width_0" value="0" <?php if (!$option_row->popup_info_full_width) echo 'checked="checked"'; ?> /><label for="popup_info_full_width_0"><?php _e('No', 'bwg_back'); ?></label>
|
864 |
+
</td>
|
865 |
+
</tr>
|
866 |
+
<tr id="tr_popup_enable_rate">
|
867 |
+
<td title="<?php _e("Enable rating for images", 'bwg_back'); ?><br /><br />This option is disabled in free version." class="spider_label spider_free_version_label"><label><?php _e("Enable rating:", 'bwg_back'); ?> </label></td>
|
868 |
+
<td>
|
869 |
+
<input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_yes" value="1" <?php echo ($option_row->popup_enable_rate) ? 'checked="checked"' : ''; ?> /><label for="popup_rate_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
870 |
+
<input disabled="disabled" type="radio" name="popup_enable_rate" id="popup_rate_no" value="0" <?php echo ($option_row->popup_enable_rate) ? '' : 'checked="checked"'; ?> /><label for="popup_rate_no"><?php _e('No', 'bwg_back'); ?></label>
|
871 |
+
</td>
|
872 |
+
</tr>
|
873 |
+
<tr id="tr_popup_enable_comment">
|
874 |
+
<td title="<?php _e("Enable comments for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable comments:", 'bwg_back'); ?> </label></td>
|
875 |
+
<td>
|
876 |
+
<input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_yes" value="1" <?php echo ($option_row->popup_enable_comment) ? 'checked' : ''; ?> /><label for="popup_comment_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
877 |
+
<input disabled="disabled" type="radio" name="popup_enable_comment" id="popup_comment_no" value="0" <?php echo ($option_row->popup_enable_comment) ? '' : 'checked'; ?> /><label for="popup_comment_no"><?php _e('No', 'bwg_back'); ?></label>
|
878 |
+
</td>
|
879 |
+
</tr>
|
880 |
+
<tr id="tr_popup_enable_facebook">
|
881 |
+
<td title="<?php _e("Enable Facebook share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Facebook button:", 'bwg_back'); ?> </label></td>
|
882 |
+
<td>
|
883 |
+
<input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_yes" value="1" <?php echo ($option_row->popup_enable_facebook) ? 'checked' : ''; ?> /><label for="popup_facebook_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
884 |
+
<input disabled="disabled" type="radio" name="popup_enable_facebook" id="popup_facebook_no" value="0" <?php echo ($option_row->popup_enable_facebook) ? '' : 'checked'; ?> /><label for="popup_facebook_no"><?php _e('No', 'bwg_back'); ?></label>
|
885 |
+
</td>
|
886 |
+
</tr>
|
887 |
+
<tr id="tr_popup_enable_twitter">
|
888 |
+
<td title="<?php _e("Enable Twitter share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Twitter button:", 'bwg_back'); ?> </label></td>
|
889 |
+
<td>
|
890 |
+
<input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_yes" value="1" <?php echo ($option_row->popup_enable_twitter) ? 'checked' : ''; ?> /><label for="popup_twitter_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
891 |
+
<input disabled="disabled" type="radio" name="popup_enable_twitter" id="popup_twitter_no" value="0" <?php echo ($option_row->popup_enable_twitter) ? '' : 'checked'; ?> /><label for="popup_twitter_no"><?php _e('No', 'bwg_back'); ?></label>
|
892 |
+
</td>
|
893 |
+
</tr>
|
894 |
+
<tr id="tr_popup_enable_google">
|
895 |
+
<td title="<?php _e("Enable Google+ share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Google+ button:", 'bwg_back'); ?> </label></td>
|
896 |
+
<td>
|
897 |
+
<input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_yes" value="1" <?php echo ($option_row->popup_enable_google) ? 'checked' : ''; ?> /><label for="popup_google_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
898 |
+
<input disabled="disabled" type="radio" name="popup_enable_google" id="popup_google_no" value="0" <?php echo ($option_row->popup_enable_google) ? '' : 'checked'; ?> /><label for="popup_google_no"><?php _e('No', 'bwg_back'); ?></label>
|
899 |
+
</td>
|
900 |
+
</tr>
|
901 |
+
<tr id="tr_popup_enable_pinterest">
|
902 |
+
<td title="<?php _e("Enable Pinterest share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Pinterest button:", 'bwg_back'); ?> </label></td>
|
903 |
+
<td>
|
904 |
+
<input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_yes" value="1" <?php echo ($option_row->popup_enable_pinterest) ? 'checked' : ''; ?> /><label for="popup_pinterest_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
905 |
+
<input disabled="disabled" type="radio" name="popup_enable_pinterest" id="popup_pinterest_no" value="0" <?php echo ($option_row->popup_enable_pinterest) ? '' : 'checked'; ?> /><label for="popup_pinterest_no"><?php _e('No', 'bwg_back'); ?></label>
|
906 |
+
</td>
|
907 |
+
</tr>
|
908 |
+
<tr id="tr_popup_enable_tumblr">
|
909 |
+
<td title="<?php _e("Enable Tumblr share button for images", 'bwg_back'); ?><br /><br /><?php _e("This option is disabled in free version.", 'bwg_back'); ?>" class="spider_label spider_free_version_label"><label><?php _e("Enable Tumblr button:", 'bwg_back'); ?> </label></td>
|
910 |
+
<td>
|
911 |
+
<input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_yes" value="1" <?php echo ($option_row->popup_enable_tumblr) ? 'checked' : ''; ?> /><label for="popup_tumblr_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
912 |
+
<input disabled="disabled" type="radio" name="popup_enable_tumblr" id="popup_tumblr_no" value="0" <?php echo ($option_row->popup_enable_tumblr) ? '' : 'checked'; ?> /><label for="popup_tumblr_no"><?php _e('No', 'bwg_back'); ?></label>
|
913 |
+
</td>
|
914 |
+
</tr>
|
915 |
+
</tbody>
|
916 |
+
</table>
|
917 |
+
</div>
|
918 |
+
<div class="bwg_short_div">
|
919 |
+
<table>
|
920 |
+
<tbody>
|
921 |
+
<tr id="tr_watermark_type">
|
922 |
+
<td class="spider_label"><label><?php _e("Advertisement Type:", 'bwg_back'); ?> </label></td>
|
923 |
+
<td>
|
924 |
+
<input type="radio" name="watermark_type" id="watermark_type_none" value="none" onClick="bwg_watermark('watermark_type_none')" <?php echo ($option_row->watermark_type == 'none') ? 'checked' : ''; ?> /><label for="watermark_type_none"><?php _e("None", 'bwg_back'); ?></label>
|
925 |
+
<input type="radio" name="watermark_type" id="watermark_type_text" value="text" onClick="bwg_watermark('watermark_type_text')" <?php echo ($option_row->watermark_type == 'text') ? 'checked' : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|