Gallery – Photo Gallery and Images Gallery - Version 1.9.0

Version Description

  • Updated gallery categories management section
  • Added drag and drop categories manager
Download this release

Release Info

Developer robosoft
Plugin Icon 128x128 Gallery – Photo Gallery and Images Gallery
Version 1.9.0
Comparing to
See all releases

Code changes from version 1.8.9 to 1.9.0

includes/extensions/category/category.class.php ADDED
@@ -0,0 +1,399 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Robo Gallery
4
+ * Version: 1.0
5
+ * By Robosoft
6
+ *
7
+ * Contact: http://robosoft.co
8
+ * Created: 2015
9
+ * Licensed under the GPLv2 license - http://opensource.org/licenses/gpl-2.0.php
10
+ *
11
+ * Copyright (c) 2014-2015, Robosoft. All rights reserved.
12
+ * Available only in http://robosoft.co/
13
+ */
14
+
15
+ class ROBO_GALLERY_CATEGORY
16
+ {
17
+ /**
18
+ * Post type
19
+ *
20
+ * @var string
21
+ */
22
+ protected $postType;
23
+
24
+ /**
25
+ * Parameters of creating post type
26
+ *
27
+ * @var array
28
+ */
29
+ protected $postTypeParams;
30
+
31
+ /**
32
+ * Assets directory uri
33
+ *
34
+ * @var string
35
+ */
36
+ protected $assetsUri;
37
+
38
+ /**
39
+ * Current post menu_order value during save posts hierarchy
40
+ *
41
+ * @var int
42
+ */
43
+ protected $currentPostOrder;
44
+
45
+ /**
46
+ * @constructor
47
+ * @param string $postType
48
+ * @param array $postTypeParams
49
+ */
50
+ public function __construct($postType) //, array $postTypeParams
51
+ {
52
+ $this->postType = $postType;
53
+ $this->postTypeParams = array();
54
+ //$this->postTypeParams = $postTypeParams;
55
+ $this->assetsUri = plugin_dir_url(__FILE__);
56
+
57
+ add_action('add_meta_boxes', array($this, 'addMetaBox'));
58
+ add_action('admin_enqueue_scripts', array($this, 'enqueueScripts'));
59
+ add_action("wp_ajax_hierarchy_{$this->postType}_meta_box", array($this, 'ajaxMetaBoxAttributes'));
60
+ add_action("wp_ajax_hierarchy_{$this->postType}_dialog", array($this, 'ajaxDialog'));
61
+ add_action("wp_ajax_hierarchy_{$this->postType}_dialog_save", array($this, 'ajaxDialogSave'));
62
+ }
63
+
64
+
65
+ /**
66
+ * Register post type
67
+ *
68
+ * @return object|WP_Error
69
+ */
70
+ protected function registerPostType()
71
+ {
72
+ $params = array_merge(
73
+ $this->postTypeParams,
74
+ array('hierarchical' => true)
75
+ );
76
+
77
+ return register_post_type($this->postType, $params);
78
+ }
79
+
80
+ /**
81
+ * Add "Attributes" meta box for editing hierarchy
82
+ *
83
+ * @return void
84
+ */
85
+ public function addMetaBox()
86
+ {
87
+ add_meta_box(
88
+ 'hierarchy-post-attributes-metabox',
89
+ '<span class="dashicons dashicons-feedback"></span> '.__('Categories'),
90
+ array($this, 'metaBoxAttributes'),
91
+ $this->postType,
92
+ 'side',
93
+ 'core'
94
+ );
95
+ }
96
+
97
+ /**
98
+ * Add styles and scripts
99
+ *
100
+ * @return void
101
+ */
102
+ public function enqueueScripts()
103
+ {
104
+
105
+ $screen = get_current_screen();
106
+ if ($this->postType !== $screen->post_type) {
107
+
108
+ return;
109
+ }
110
+
111
+ wp_enqueue_style('wp-jquery-ui-dialog');
112
+ wp_enqueue_style(
113
+ 'hierarchy-post-attributes-style',
114
+ $this->assetsUri . '/css/style.css',
115
+ array('wp-jquery-ui-dialog')
116
+ );
117
+
118
+ wp_enqueue_script('jquery-ui-dialog');
119
+ wp_enqueue_script(
120
+ 'hierarchy-post-attributes-nestable-js',
121
+ $this->assetsUri . '/js/jquery.nestable.js',
122
+ array('jquery-ui-dialog'),
123
+ false,
124
+ true
125
+ );
126
+ wp_enqueue_script(
127
+ 'hierarchy-post-attributes-js',
128
+ $this->assetsUri . '/js/script.js',
129
+ array('jquery-ui-dialog', 'hierarchy-post-attributes-nestable-js'),
130
+ false,
131
+ true
132
+ );
133
+
134
+ $postTypeObject = get_post_type_object($this->postType);
135
+ wp_localize_script(
136
+ 'hierarchy-post-attributes-js',
137
+ 'hierarchyPostAttributes',
138
+ array(
139
+ 'ajaxUrl' => admin_url('admin-ajax.php'),
140
+ 'metaBox' => [
141
+ 'action' => [
142
+ 'get' => "hierarchy_{$this->postType}_meta_box"
143
+ ]
144
+ ],
145
+ 'dialog' => [
146
+ 'title' => __(sprintf('Edit hierarchy of %s', $postTypeObject->labels->name)),
147
+ 'button' => [
148
+ 'save' => [
149
+ 'label' => __('Save')
150
+ ],
151
+ 'cancel' => [
152
+ 'label' => __('Cancel')
153
+ ]
154
+ ],
155
+ 'action' => [
156
+ 'get' => "hierarchy_{$this->postType}_dialog",
157
+ 'save' => "hierarchy_{$this->postType}_dialog_save",
158
+ ],
159
+ ],
160
+ 'error' => [
161
+ 'title' => __('Error'),
162
+ 'button' => [
163
+ 'ok' => [
164
+ 'label' => __('OK')
165
+ ],
166
+ ]
167
+ ]
168
+ )
169
+ );
170
+ }
171
+
172
+ /**
173
+ * Display meta box "Attributes"
174
+ *
175
+ * @param WP_Post $post
176
+ * @return void
177
+ */
178
+ public function metaBoxAttributes(WP_Post $post)
179
+ {
180
+ $postTypeObject = get_post_type_object($post->post_type);
181
+ $screen = get_current_screen();
182
+
183
+ if (!$postTypeObject->hierarchical) {
184
+ return;
185
+ }
186
+ if ($screen && 'add' === $screen->action) {
187
+ return;
188
+ }
189
+
190
+ $path = array(get_the_title($post));
191
+ $parentId = $post->post_parent;
192
+ while($parentId) {
193
+ $parent = get_post($parentId);
194
+ $path[] = get_the_title($parent) . ' >>';
195
+ $parentId = $parent->post_parent;
196
+ }
197
+ $path[] = __('Root Category').' >>';
198
+ $path = array_reverse($path);
199
+
200
+ ?>
201
+ <?php foreach ($path as $index => $postTitle) : ?>
202
+ <p><?php echo str_repeat('&nbsp;', $index * 4); ?><?php echo $postTitle; ?></p>
203
+ <?php endforeach; ?>
204
+ <div class="actions">
205
+ <button class="button edit" type="button"
206
+ data-post_id="<?php echo $post->ID; ?>"
207
+ data-post_type="<?php echo $post->post_type; ?>">
208
+ <?php echo __('Edit'); ?>
209
+ </button>
210
+ </div>
211
+ <?php
212
+ }
213
+
214
+ /**
215
+ * Get content of meta box "Attributes" via Ajax
216
+ *
217
+ * @return void
218
+ */
219
+ public function ajaxMetaBoxAttributes()
220
+ {
221
+ $this->checkPermission();
222
+
223
+ if (!isset($_POST['post_id'])) {
224
+ header('HTTP/1.0 403 Forbidden');
225
+ echo __('Post ID is absent in request');
226
+ die();
227
+ }
228
+
229
+ $postId = absint($_POST['post_id']);
230
+ $post = get_post($postId);
231
+ if (!$post) {
232
+ header('HTTP/1.0 403 Forbidden');
233
+ echo __(sprintf('Can not find post with ID "%d"', $postId));
234
+ die();
235
+ }
236
+
237
+ $this->metaBoxAttributes($post);
238
+ die();
239
+ }
240
+
241
+ /**
242
+ * Get content of dialog for editing posts hierarchy via Ajax
243
+ *
244
+ * @return void
245
+ */
246
+ public function ajaxDialog() {
247
+ $this->checkPermission();
248
+
249
+ if (!isset($_POST['post_type'])) {
250
+ header('HTTP/1.0 403 Forbidden');
251
+ echo __('Post type is absent in request');
252
+ die();
253
+ }
254
+
255
+ $postType = $_POST['post_type'];
256
+ if (!post_type_exists($postType)) {
257
+ header('HTTP/1.0 403 Forbidden');
258
+ echo __(sprintf('Post type "%s" is not registered', htmlentities($postType)));
259
+ die();
260
+ }
261
+
262
+ $postTree = $this->getPostTree($postType);
263
+ ?>
264
+ <div class="nestable-list dd">
265
+ <?php $this->theNestableList($postTree); ?>
266
+ </div>
267
+ <div class="nestable-list-spinner">
268
+ <img src="<?php echo admin_url('/images/spinner-2x.gif') ?>" />
269
+ </div>
270
+ <?php
271
+
272
+ wp_die();
273
+ }
274
+
275
+ /**
276
+ * Save posts hierarchy via Ajax
277
+ *
278
+ * @return void
279
+ */
280
+ public function ajaxDialogSave() {
281
+ $this->checkPermission();
282
+
283
+ if (!isset($_POST['hierarchy_posts'])) {
284
+ header('HTTP/1.0 403 Forbidden');
285
+ echo __('Empty posts hierarchy data for saving');
286
+ die();
287
+ }
288
+ if (!is_array($_POST['hierarchy_posts'])) {
289
+ header('HTTP/1.0 403 Forbidden');
290
+ echo __('Wrong posts hierarchy data for saving');
291
+ die();
292
+ }
293
+
294
+ $hierarchyPosts = $_POST['hierarchy_posts'];
295
+ $this->currentPostOrder = 0;
296
+ foreach ($hierarchyPosts as $order => $postData) {
297
+ $this->updatePostHierarchy($postData);
298
+ }
299
+ }
300
+
301
+ /**
302
+ * Get posts hierarchy tree
303
+ *
304
+ * @param string $postType
305
+ * @return array
306
+ */
307
+ protected function getPostTree($postType)
308
+ {
309
+ $args = array(
310
+ 'post_type' => $postType,
311
+ 'post_status' => 'publish',
312
+ 'posts_per_page' => -1,
313
+ 'orderby' => 'menu_order',
314
+ 'order' => 'ASC'
315
+ );
316
+ $postMap = array();
317
+ $postTree = array();
318
+
319
+ foreach (get_posts($args) as $post) {
320
+ if (isset($postMap[$post->ID])) {
321
+ $postMap[$post->ID]['post'] = $post;
322
+ $postData = &$postMap[$post->ID];
323
+ } else {
324
+ $postData = array('post' => $post, 'children' => array());
325
+ $postMap[$post->ID] = &$postData;
326
+ }
327
+ if (0 == $post->post_parent) {
328
+ $postTree[$post->ID] = &$postData;
329
+ } else {
330
+ $postMap[$post->post_parent]['children'][$post->ID] = &$postData;
331
+ }
332
+ unset($postData);
333
+ }
334
+
335
+ return $postTree;
336
+ }
337
+
338
+ /**
339
+ * Display nestable list
340
+ *
341
+ * @param array $tree
342
+ * @return void
343
+ */
344
+ protected function theNestableList(array $tree)
345
+ {
346
+ ?>
347
+ <ol class="dd-list">
348
+ <?php foreach ($tree as $item) : ?>
349
+ <li class="dd-item" data-id="<?php echo $item['post']->ID; ?>">
350
+ <div class="dd-handle">
351
+ <?php echo "{$item['post']->post_title} [{$item['post']->ID}: {$item['post']->post_name}]" ; ?>
352
+ </div>
353
+ <?php if (!empty($item['children'])) : ?>
354
+ <?php $this->theNestableList($item['children']); ?>
355
+ <?php endif; ?>
356
+ </li>
357
+ <?php endforeach; ?>
358
+ </ol>
359
+ <?php
360
+ }
361
+
362
+ /**
363
+ * Check whether user can edit posts
364
+ *
365
+ * @return void
366
+ */
367
+ protected function checkPermission()
368
+ {
369
+ $postTypeObject = get_post_type_object($this->postType);
370
+ if (!current_user_can($postTypeObject->cap->edit_posts)) {
371
+ header('HTTP/1.0 403 Forbidden');
372
+ echo __(sprintf("You don't have permission for editing this %s", $postTypeObject->labels->name));
373
+ die();
374
+ }
375
+ }
376
+
377
+ /**
378
+ * Update post hierarchy
379
+ *
380
+ * @param array $postData
381
+ * @param int $parentId
382
+ * @return void
383
+ */
384
+ protected function updatePostHierarchy($postData, $parentId = 0)
385
+ {
386
+ $this->currentPostOrder++;
387
+ wp_update_post(array(
388
+ 'ID' => absint($postData['id']),
389
+ 'post_parent' => absint($parentId),
390
+ 'menu_order' => $this->currentPostOrder
391
+ ));
392
+
393
+ if (!empty($postData['children'])) {
394
+ foreach ($postData['children'] as $childPostData) {
395
+ $this->updatePostHierarchy($childPostData, $postData['id']);
396
+ }
397
+ }
398
+ }
399
+ }
includes/extensions/category/category.init.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Robo Gallery
4
+ * Version: 1.0
5
+ * By Robosoft
6
+ *
7
+ * Contact: http://robosoft.co
8
+ * Created: 2015
9
+ * Licensed under the GPLv2 license - http://opensource.org/licenses/gpl-2.0.php
10
+ *
11
+ * Copyright (c) 2014-2015, Robosoft. All rights reserved.
12
+ * Available only in http://robosoft.co/
13
+ */
14
+
15
+ if(!function_exists('rbs_gallery_category_init')){
16
+ function rbs_gallery_category_init(){
17
+ rbs_gallery_include('category.class.php', plugin_dir_path( __FILE__ ) );
18
+ new ROBO_GALLERY_CATEGORY( ROBO_GALLERY_TYPE_POST );
19
+ }
20
+ add_action( 'init', 'rbs_gallery_category_init' );
21
+ }
includes/extensions/category/css/index.html ADDED
File without changes
includes/extensions/category/css/style.css ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .nestable-list.dd,
2
+ .nestable-list .dd {
3
+ position: relative;
4
+ display: block;
5
+ margin: 0;
6
+ padding: 0;
7
+ list-style: none;
8
+ font-size: 13px;
9
+ line-height: 20px;
10
+ }
11
+
12
+ .nestable-list .dd-list {
13
+ display: block;
14
+ position: relative;
15
+ margin: 0;
16
+ padding: 0;
17
+ list-style: none;
18
+ }
19
+
20
+ .nestable-list .dd-list .dd-list {
21
+ padding-left: 30px;
22
+ }
23
+
24
+ .nestable-list .dd-collapsed .dd-list {
25
+ display: none;
26
+ }
27
+
28
+ .nestable-list .dd-item,
29
+ .nestable-list .dd-empty,
30
+ .nestable-list .dd-placeholder {
31
+ display: block;
32
+ position: relative;
33
+ margin: 0;
34
+ padding: 0;
35
+ min-height: 20px;
36
+ font-size: 13px;
37
+ line-height: 20px;
38
+ }
39
+
40
+ .nestable-list .dd-handle {
41
+ display: block;
42
+ height: 30px;
43
+ margin: 5px 0;
44
+ padding: 5px 10px;
45
+ color: #333;
46
+ text-decoration: none;
47
+ font-weight: bold;
48
+ border: 1px solid #ccc;
49
+ background: #fafafa;
50
+ background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);
51
+ background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);
52
+ background: linear-gradient(top, #fafafa 0%, #eee 100%);
53
+ -webkit-border-radius: 3px;
54
+ border-radius: 3px;
55
+ box-sizing: border-box;
56
+ -moz-box-sizing: border-box;
57
+ }
58
+
59
+ .nestable-list .dd-handle:hover {
60
+ color: #2ea8e5;
61
+ background: #fff;
62
+ }
63
+
64
+ .nestable-list .dd-item > button {
65
+ display: block;
66
+ position: relative;
67
+ cursor: pointer;
68
+ float: left;
69
+ width: 25px;
70
+ height: 20px;
71
+ margin: 5px 0;
72
+ padding: 0;
73
+ text-indent: 100%;
74
+ white-space: nowrap;
75
+ overflow: hidden;
76
+ border: 0;
77
+ background: transparent;
78
+ font-size: 12px;
79
+ line-height: 1;
80
+ text-align: center;
81
+ font-weight: bold;
82
+ }
83
+
84
+ .nestable-list .dd-item > button:before {
85
+ content: '+';
86
+ display: block;
87
+ position: absolute;
88
+ width: 100%;
89
+ text-align: center;
90
+ text-indent: 0;
91
+ }
92
+
93
+ .nestable-list .dd-item > button[data-action="collapse"]:before {
94
+ content: '-';
95
+ }
96
+
97
+ .nestable-list .dd-placeholder,
98
+ .nestable-list .dd-empty {
99
+ margin: 5px 0;
100
+ padding: 0;
101
+ min-height: 30px;
102
+ background: #f2fbff;
103
+ border: 1px dashed #b6bcbf;
104
+ box-sizing: border-box;
105
+ -moz-box-sizing: border-box;
106
+ }
107
+
108
+ .nestable-list .dd-empty {
109
+ border: 1px dashed #bbb;
110
+ min-height: 100px;
111
+ background-color: #e5e5e5;
112
+ background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
113
+ -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
114
+ background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
115
+ -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
116
+ background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
117
+ linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
118
+ background-size: 60px 60px;
119
+ background-position: 0 0, 30px 30px;
120
+ }
121
+
122
+ .nestable-list .dd-dragel {
123
+ position: absolute;
124
+ pointer-events: none;
125
+ z-index: 9999;
126
+ }
127
+
128
+ .nestable-list .dd-dragel > .dd-item .dd-handle {
129
+ margin-top: 0;
130
+ }
131
+
132
+ .nestable-list .dd-dragel .dd-handle {
133
+ -webkit-box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, .1);
134
+ box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, .1);
135
+ }
136
+
137
+ /* EXTRA STYLE */
138
+ #hierarchy-post-attributes-metabox .actions {
139
+ text-align: right;
140
+ }
141
+
142
+ .wrapper-nestable-list {
143
+ position: relative;
144
+ width: 100%;
145
+ height: 100%;
146
+ }
147
+ .nestable-list-spinner {
148
+ display: none;
149
+ position: absolute;
150
+ top: 0;
151
+ left: 0;
152
+ width: 100%;
153
+ height: 100%;
154
+ background: rgba(255, 255, 255, 0.5);
155
+ }
156
+ .nestable-list-spinner img {
157
+ position: absolute;
158
+ top: 50%;
159
+ left: 50%;
160
+ margin: -20px 0 0 -20px;
161
+ }
includes/extensions/category/index.html ADDED
File without changes
includes/extensions/category/js/index.html ADDED
File without changes
includes/extensions/category/js/jquery.nestable.js ADDED
@@ -0,0 +1,484 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Nestable jQuery Plugin - Copyright (c) 2012 David Bushell - http://dbushell.com/
3
+ * Dual-licensed under the BSD or MIT licenses
4
+ */
5
+ ;(function($, window, document, undefined)
6
+ {
7
+ var hasTouch = 'ontouchstart' in document;
8
+
9
+ /**
10
+ * Detect CSS pointer-events property
11
+ * events are normally disabled on the dragging element to avoid conflicts
12
+ * https://github.com/ausi/Feature-detection-technique-for-pointer-events/blob/master/modernizr-pointerevents.js
13
+ */
14
+ var hasPointerEvents = (function()
15
+ {
16
+ var el = document.createElement('div'),
17
+ docEl = document.documentElement;
18
+ if (!('pointerEvents' in el.style)) {
19
+ return false;
20
+ }
21
+ el.style.pointerEvents = 'auto';
22
+ el.style.pointerEvents = 'x';
23
+ docEl.appendChild(el);
24
+ var supports = window.getComputedStyle && window.getComputedStyle(el, '').pointerEvents === 'auto';
25
+ docEl.removeChild(el);
26
+ return !!supports;
27
+ })();
28
+
29
+ var defaults = {
30
+ listNodeName : 'ol',
31
+ itemNodeName : 'li',
32
+ rootClass : 'dd',
33
+ listClass : 'dd-list',
34
+ itemClass : 'dd-item',
35
+ dragClass : 'dd-dragel',
36
+ handleClass : 'dd-handle',
37
+ collapsedClass : 'dd-collapsed',
38
+ placeClass : 'dd-placeholder',
39
+ noDragClass : 'dd-nodrag',
40
+ emptyClass : 'dd-empty',
41
+ expandBtnHTML : '<button data-action="expand" type="button">Expand</button>',
42
+ collapseBtnHTML : '<button data-action="collapse" type="button">Collapse</button>',
43
+ group : 0,
44
+ maxDepth : 5,
45
+ threshold : 20
46
+ };
47
+
48
+ function Plugin(element, options)
49
+ {
50
+ this.w = $(document);
51
+ this.el = $(element);
52
+ this.options = $.extend({}, defaults, options);
53
+ this.init();
54
+ }
55
+
56
+ Plugin.prototype = {
57
+
58
+ init: function()
59
+ {
60
+ var list = this;
61
+
62
+ list.reset();
63
+
64
+ list.el.data('nestable-group', this.options.group);
65
+
66
+ list.placeEl = $('<div class="' + list.options.placeClass + '"/>');
67
+
68
+ $.each(this.el.find(list.options.itemNodeName), function(k, el) {
69
+ list.setParent($(el));
70
+ });
71
+
72
+ list.el.on('click', 'button', function(e) {
73
+ if (list.dragEl) {
74
+ return;
75
+ }
76
+ var target = $(e.currentTarget),
77
+ action = target.data('action'),
78
+ item = target.parent(list.options.itemNodeName);
79
+ if (action === 'collapse') {
80
+ list.collapseItem(item);
81
+ }
82
+ if (action === 'expand') {
83
+ list.expandItem(item);
84
+ }
85
+ });
86
+
87
+ var onStartEvent = function(e)
88
+ {
89
+ var handle = $(e.target);
90
+ if (!handle.hasClass(list.options.handleClass)) {
91
+ if (handle.closest('.' + list.options.noDragClass).length) {
92
+ return;
93
+ }
94
+ handle = handle.closest('.' + list.options.handleClass);
95
+ }
96
+
97
+ if (!handle.length || list.dragEl) {
98
+ return;
99
+ }
100
+
101
+ list.isTouch = /^touch/.test(e.type);
102
+ if (list.isTouch && e.touches.length !== 1) {
103
+ return;
104
+ }
105
+
106
+ e.preventDefault();
107
+ list.dragStart(e.touches ? e.touches[0] : e);
108
+ };
109
+
110
+ var onMoveEvent = function(e)
111
+ {
112
+ if (list.dragEl) {
113
+ e.preventDefault();
114
+ list.dragMove(e.touches ? e.touches[0] : e);
115
+ }
116
+ };
117
+
118
+ var onEndEvent = function(e)
119
+ {
120
+ if (list.dragEl) {
121
+ e.preventDefault();
122
+ list.dragStop(e.touches ? e.touches[0] : e);
123
+ }
124
+ };
125
+
126
+ if (hasTouch) {
127
+ list.el[0].addEventListener('touchstart', onStartEvent, false);
128
+ window.addEventListener('touchmove', onMoveEvent, false);
129
+ window.addEventListener('touchend', onEndEvent, false);
130
+ window.addEventListener('touchcancel', onEndEvent, false);
131
+ }
132
+
133
+ list.el.on('mousedown', onStartEvent);
134
+ list.w.on('mousemove', onMoveEvent);
135
+ list.w.on('mouseup', onEndEvent);
136
+
137
+ },
138
+
139
+ serialize: function()
140
+ {
141
+ var data,
142
+ depth = 0,
143
+ list = this;
144
+ step = function(level, depth)
145
+ {
146
+ var array = [ ],
147
+ items = level.children(list.options.itemNodeName);
148
+ items.each(function()
149
+ {
150
+ var li = $(this),
151
+ item = $.extend({}, li.data()),
152
+ sub = li.children(list.options.listNodeName);
153
+ if (sub.length) {
154
+ item.children = step(sub, depth + 1);
155
+ }
156
+ array.push(item);
157
+ });
158
+ return array;
159
+ };
160
+ data = step(list.el.find(list.options.listNodeName).first(), depth);
161
+ return data;
162
+ },
163
+
164
+ serialise: function()
165
+ {
166
+ return this.serialize();
167
+ },
168
+
169
+ reset: function()
170
+ {
171
+ this.mouse = {
172
+ offsetX : 0,
173
+ offsetY : 0,
174
+ startX : 0,
175
+ startY : 0,
176
+ lastX : 0,
177
+ lastY : 0,
178
+ nowX : 0,
179
+ nowY : 0,
180
+ distX : 0,
181
+ distY : 0,
182
+ dirAx : 0,
183
+ dirX : 0,
184
+ dirY : 0,
185
+ lastDirX : 0,
186
+ lastDirY : 0,
187
+ distAxX : 0,
188
+ distAxY : 0
189
+ };
190
+ this.isTouch = false;
191
+ this.moving = false;
192
+ this.dragEl = null;
193
+ this.dragRootEl = null;
194
+ this.dragDepth = 0;
195
+ this.hasNewRoot = false;
196
+ this.pointEl = null;
197
+ },
198
+
199
+ expandItem: function(li)
200
+ {
201
+ li.removeClass(this.options.collapsedClass);
202
+ li.children('[data-action="expand"]').hide();
203
+ li.children('[data-action="collapse"]').show();
204
+ li.children(this.options.listNodeName).show();
205
+ },
206
+
207
+ collapseItem: function(li)
208
+ {
209
+ var lists = li.children(this.options.listNodeName);
210
+ if (lists.length) {
211
+ li.addClass(this.options.collapsedClass);
212
+ li.children('[data-action="collapse"]').hide();
213
+ li.children('[data-action="expand"]').show();
214
+ li.children(this.options.listNodeName).hide();
215
+ }
216
+ },
217
+
218
+ expandAll: function()
219
+ {
220
+ var list = this;
221
+ list.el.find(list.options.itemNodeName).each(function() {
222
+ list.expandItem($(this));
223
+ });
224
+ },
225
+
226
+ collapseAll: function()
227
+ {
228
+ var list = this;
229
+ list.el.find(list.options.itemNodeName).each(function() {
230
+ list.collapseItem($(this));
231
+ });
232
+ },
233
+
234
+ setParent: function(li)
235
+ {
236
+ if (li.children(this.options.listNodeName).length) {
237
+ li.prepend($(this.options.expandBtnHTML));
238
+ li.prepend($(this.options.collapseBtnHTML));
239
+ }
240
+ li.children('[data-action="expand"]').hide();
241
+ },
242
+
243
+ unsetParent: function(li)
244
+ {
245
+ li.removeClass(this.options.collapsedClass);
246
+ li.children('[data-action]').remove();
247
+ li.children(this.options.listNodeName).remove();
248
+ },
249
+
250
+ dragStart: function(e)
251
+ {
252
+ var mouse = this.mouse,
253
+ target = $(e.target),
254
+ dragItem = target.closest(this.options.itemNodeName);
255
+
256
+ this.placeEl.css('height', dragItem.height());
257
+
258
+ mouse.offsetX = e.offsetX !== undefined ? e.offsetX : e.pageX - target.offset().left;
259
+ mouse.offsetY = e.offsetY !== undefined ? e.offsetY : e.pageY - target.offset().top;
260
+ mouse.startX = mouse.lastX = e.pageX;
261
+ mouse.startY = mouse.lastY = e.pageY;
262
+
263
+ this.dragRootEl = this.el;
264
+
265
+ this.dragEl = $(document.createElement(this.options.listNodeName)).addClass(this.options.listClass + ' ' + this.options.dragClass);
266
+ this.dragEl.css('width', dragItem.width());
267
+
268
+ dragItem.after(this.placeEl);
269
+ dragItem[0].parentNode.removeChild(dragItem[0]);
270
+ dragItem.appendTo(this.dragEl);
271
+
272
+ $(document.body).append(this.dragEl);
273
+ this.dragEl.css({
274
+ 'left' : e.pageX - mouse.offsetX,
275
+ 'top' : e.pageY - mouse.offsetY
276
+ });
277
+ // total depth of dragging item
278
+ var i, depth,
279
+ items = this.dragEl.find(this.options.itemNodeName);
280
+ for (i = 0; i < items.length; i++) {
281
+ depth = $(items[i]).parents(this.options.listNodeName).length;
282
+ if (depth > this.dragDepth) {
283
+ this.dragDepth = depth;
284
+ }
285
+ }
286
+ },
287
+
288
+ dragStop: function(e)
289
+ {
290
+ var el = this.dragEl.children(this.options.itemNodeName).first();
291
+ el[0].parentNode.removeChild(el[0]);
292
+ this.placeEl.replaceWith(el);
293
+
294
+ this.dragEl.remove();
295
+ this.el.trigger('change');
296
+ if (this.hasNewRoot) {
297
+ this.dragRootEl.trigger('change');
298
+ }
299
+ this.reset();
300
+ },
301
+
302
+ dragMove: function(e)
303
+ {
304
+ var list, parent, prev, next, depth,
305
+ opt = this.options,
306
+ mouse = this.mouse;
307
+
308
+ this.dragEl.css({
309
+ 'left' : e.pageX - mouse.offsetX,
310
+ 'top' : e.pageY - mouse.offsetY
311
+ });
312
+
313
+ // mouse position last events
314
+ mouse.lastX = mouse.nowX;
315
+ mouse.lastY = mouse.nowY;
316
+ // mouse position this events
317
+ mouse.nowX = e.pageX;
318
+ mouse.nowY = e.pageY;
319
+ // distance mouse moved between events
320
+ mouse.distX = mouse.nowX - mouse.lastX;
321
+ mouse.distY = mouse.nowY - mouse.lastY;
322
+ // direction mouse was moving
323
+ mouse.lastDirX = mouse.dirX;
324
+ mouse.lastDirY = mouse.dirY;
325
+ // direction mouse is now moving (on both axis)
326
+ mouse.dirX = mouse.distX === 0 ? 0 : mouse.distX > 0 ? 1 : -1;
327
+ mouse.dirY = mouse.distY === 0 ? 0 : mouse.distY > 0 ? 1 : -1;
328
+ // axis mouse is now moving on
329
+ var newAx = Math.abs(mouse.distX) > Math.abs(mouse.distY) ? 1 : 0;
330
+
331
+ // do nothing on first move
332
+ if (!mouse.moving) {
333
+ mouse.dirAx = newAx;
334
+ mouse.moving = true;
335
+ return;
336
+ }
337
+
338
+ // calc distance moved on this axis (and direction)
339
+ if (mouse.dirAx !== newAx) {
340
+ mouse.distAxX = 0;
341
+ mouse.distAxY = 0;
342
+ } else {
343
+ mouse.distAxX += Math.abs(mouse.distX);
344
+ if (mouse.dirX !== 0 && mouse.dirX !== mouse.lastDirX) {
345
+ mouse.distAxX = 0;
346
+ }
347
+ mouse.distAxY += Math.abs(mouse.distY);
348
+ if (mouse.dirY !== 0 && mouse.dirY !== mouse.lastDirY) {
349
+ mouse.distAxY = 0;
350
+ }
351
+ }
352
+ mouse.dirAx = newAx;
353
+
354
+ /**
355
+ * move horizontal
356
+ */
357
+ if (mouse.dirAx && mouse.distAxX >= opt.threshold) {
358
+ // reset move distance on x-axis for new phase
359
+ mouse.distAxX = 0;
360
+ prev = this.placeEl.prev(opt.itemNodeName);
361
+ // increase horizontal level if previous sibling exists and is not collapsed
362
+ if (mouse.distX > 0 && prev.length && !prev.hasClass(opt.collapsedClass)) {
363
+ // cannot increase level when item above is collapsed
364
+ list = prev.find(opt.listNodeName).last();
365
+ // check if depth limit has reached
366
+ depth = this.placeEl.parents(opt.listNodeName).length;
367
+ if (depth + this.dragDepth <= opt.maxDepth) {
368
+ // create new sub-level if one doesn't exist
369
+ if (!list.length) {
370
+ list = $('<' + opt.listNodeName + '/>').addClass(opt.listClass);
371
+ list.append(this.placeEl);
372
+ prev.append(list);
373
+ this.setParent(prev);
374
+ } else {
375
+ // else append to next level up
376
+ list = prev.children(opt.listNodeName).last();
377
+ list.append(this.placeEl);
378
+ }
379
+ }
380
+ }
381
+ // decrease horizontal level
382
+ if (mouse.distX < 0) {
383
+ // we can't decrease a level if an item preceeds the current one
384
+ next = this.placeEl.next(opt.itemNodeName);
385
+ if (!next.length) {
386
+ parent = this.placeEl.parent();
387
+ this.placeEl.closest(opt.itemNodeName).after(this.placeEl);
388
+ if (!parent.children().length) {
389
+ this.unsetParent(parent.parent());
390
+ }
391
+ }
392
+ }
393
+ }
394
+
395
+ var isEmpty = false;
396
+
397
+ // find list item under cursor
398
+ if (!hasPointerEvents) {
399
+ this.dragEl[0].style.visibility = 'hidden';
400
+ }
401
+ this.pointEl = $(document.elementFromPoint(e.pageX - document.body.scrollLeft, e.pageY - (window.pageYOffset || document.documentElement.scrollTop)));
402
+ if (!hasPointerEvents) {
403
+ this.dragEl[0].style.visibility = 'visible';
404
+ }
405
+ if (this.pointEl.hasClass(opt.handleClass)) {
406
+ this.pointEl = this.pointEl.parent(opt.itemNodeName);
407
+ }
408
+ if (this.pointEl.hasClass(opt.emptyClass)) {
409
+ isEmpty = true;
410
+ }
411
+ else if (!this.pointEl.length || !this.pointEl.hasClass(opt.itemClass)) {
412
+ return;
413
+ }
414
+
415
+ // find parent list of item under cursor
416
+ var pointElRoot = this.pointEl.closest('.' + opt.rootClass),
417
+ isNewRoot = this.dragRootEl.data('nestable-id') !== pointElRoot.data('nestable-id');
418
+
419
+ /**
420
+ * move vertical
421
+ */
422
+ if (!mouse.dirAx || isNewRoot || isEmpty) {
423
+ // check if groups match if dragging over new root
424
+ if (isNewRoot && opt.group !== pointElRoot.data('nestable-group')) {
425
+ return;
426
+ }
427
+ // check depth limit
428
+ depth = this.dragDepth - 1 + this.pointEl.parents(opt.listNodeName).length;
429
+ if (depth > opt.maxDepth) {
430
+ return;
431
+ }
432
+ var before = e.pageY < (this.pointEl.offset().top + this.pointEl.height() / 2);
433
+ parent = this.placeEl.parent();
434
+ // if empty create new list to replace empty placeholder
435
+ if (isEmpty) {
436
+ list = $(document.createElement(opt.listNodeName)).addClass(opt.listClass);
437
+ list.append(this.placeEl);
438
+ this.pointEl.replaceWith(list);
439
+ }
440
+ else if (before) {
441
+ this.pointEl.before(this.placeEl);
442
+ }
443
+ else {
444
+ this.pointEl.after(this.placeEl);
445
+ }
446
+ if (!parent.children().length) {
447
+ this.unsetParent(parent.parent());
448
+ }
449
+ if (!this.dragRootEl.find(opt.itemNodeName).length) {
450
+ this.dragRootEl.append('<div class="' + opt.emptyClass + '"/>');
451
+ }
452
+ // parent root list has changed
453
+ if (isNewRoot) {
454
+ this.dragRootEl = pointElRoot;
455
+ this.hasNewRoot = this.el[0] !== this.dragRootEl[0];
456
+ }
457
+ }
458
+ }
459
+
460
+ };
461
+
462
+ $.fn.nestable = function(params)
463
+ {
464
+ var lists = this,
465
+ retval = this;
466
+
467
+ lists.each(function()
468
+ {
469
+ var plugin = $(this).data("nestable");
470
+
471
+ if (!plugin) {
472
+ $(this).data("nestable", new Plugin(this, params));
473
+ $(this).data("nestable-id", new Date().getTime());
474
+ } else {
475
+ if (typeof params === 'string' && typeof plugin[params] === 'function') {
476
+ retval = plugin[params]();
477
+ }
478
+ }
479
+ });
480
+
481
+ return retval || lists;
482
+ };
483
+
484
+ })(window.jQuery || window.Zepto, window, document);
includes/extensions/category/js/script.js ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;(function ($, undefined){
2
+ function AttributeMetaBox() {
3
+ this.$element = $('#hierarchy-post-attributes-metabox');
4
+ this.$edit = null;
5
+ this.postId = null;
6
+ this.postType = null;
7
+
8
+ this.init();
9
+ }
10
+ AttributeMetaBox.prototype = {
11
+ init: function () {
12
+ var self = this;
13
+
14
+ self.$edit = self.$element.find('button.edit');
15
+ self.postId = self.$edit.data('post_id');
16
+ self.postType = self.$edit.data('post_type');
17
+
18
+ self.$edit.click(function() {
19
+ return self.edit();
20
+ });
21
+ },
22
+ edit: function () {
23
+ var self = this;
24
+
25
+ new DialogEdit({
26
+ postType: this.postType,
27
+ callbackSave: function() { self.update(); }
28
+ });
29
+
30
+ return false;
31
+ },
32
+ update: function () {
33
+ var self = this;
34
+
35
+ $.ajax({
36
+ url: hierarchyPostAttributes.ajaxUrl,
37
+ method: 'post',
38
+ data: {
39
+ action: hierarchyPostAttributes.metaBox.action.get,
40
+ post_id: self.postId
41
+ },
42
+ success: function (response) {
43
+ self.$element.find('.inside').html(response);
44
+ self.init();
45
+ },
46
+ error: function (jqXHR) {
47
+ new DialogError(jqXHR.responseText);
48
+ }
49
+ });
50
+ }
51
+ };
52
+
53
+ function DialogEdit(options) {
54
+ this.postType = options.postType;
55
+ this.callbackSave = options.callbackSave;
56
+ this.$element = $('<div class="wrapper-nestable-list" />');
57
+ this.$nestableList = null;
58
+
59
+ this.init();
60
+ }
61
+ DialogEdit.prototype = {
62
+ init: function() {
63
+ var self = this;
64
+
65
+ $.ajax({
66
+ url: hierarchyPostAttributes.ajaxUrl,
67
+ method: 'post',
68
+ data: {
69
+ action: hierarchyPostAttributes.dialog.action.get,
70
+ post_type: self.postType
71
+ },
72
+ success: function (response) {
73
+ self.$element.html(response).appendTo("body");
74
+
75
+ self.$nestableList = self.$element.find('.nestable-list');
76
+ self.$nestableList.nestable({group: 1, maxDepth: 100});
77
+
78
+ self.show();
79
+ },
80
+ error: function (jqXHR) {
81
+ new DialogError(jqXHR.responseText);
82
+ }
83
+ });
84
+ },
85
+ show: function () {
86
+ var self = this;
87
+
88
+ self.$element.dialog({
89
+ 'dialogClass' : 'wp-dialog',
90
+ 'height': $(window).height() * 0.8,
91
+ 'width': Math.min(800, $(window).width() * 0.8),
92
+ 'title': hierarchyPostAttributes.dialog.title,
93
+ 'modal' : true,
94
+ 'autoOpen' : true,
95
+ 'closeOnEscape' : false,
96
+ 'buttons' : [
97
+ {
98
+ 'text' : hierarchyPostAttributes.dialog.button.save.label,
99
+ 'class' : 'button button-primary',
100
+ 'click' : function() { return self.save(); }
101
+ },
102
+ {
103
+ 'text' : hierarchyPostAttributes.dialog.button.cancel.label,
104
+ 'class' : 'button',
105
+ 'click' : function() { return self.destroy(); }
106
+ }
107
+ ],
108
+ 'close': function() { return self.destroy(); }
109
+ });
110
+ },
111
+ save : function () {
112
+ var self = this,
113
+ hierarchyPosts = this.$nestableList.nestable('serialise');
114
+
115
+ self.spinner(true);
116
+ $.ajax({
117
+ url: hierarchyPostAttributes.ajaxUrl,
118
+ method: 'post',
119
+ data: {
120
+ action: hierarchyPostAttributes.dialog.action.save,
121
+ hierarchy_posts: hierarchyPosts
122
+ },
123
+ success: function (response) {
124
+ self.spinner(false);
125
+ self.destroy();
126
+
127
+ if (typeof self.callbackSave === 'function') {
128
+ self.callbackSave()
129
+ }
130
+ },
131
+ error: function (jqXHR) {
132
+ self.destroy();
133
+ new DialogError(jqXHR.responseText);
134
+ }
135
+ });
136
+ },
137
+ spinner: function(isShow) {
138
+ if (isShow) {
139
+ var $spinner = this.$element.find('.nestable-list-spinner').clone();
140
+ $spinner.appendTo(this.$element.closest('.ui-dialog.ui-widget')).show();
141
+ } else {
142
+ this.$element.closest('.ui-dialog.ui-widget').find('.nestable-list-spinner').remove();
143
+ }
144
+ },
145
+ destroy: function () {
146
+ this.$element.dialog('close');
147
+ this.$element.remove();
148
+ }
149
+ };
150
+
151
+ function DialogError(message) {
152
+ this.$element = $('<div id="hierarchy-post-error">' + message + '</div>');
153
+ this.show()
154
+ }
155
+ DialogError.prototype = {
156
+ show: function () {
157
+ var self = this;
158
+
159
+ self.$element.appendTo('body');
160
+ self.$element.dialog({
161
+ 'dialogClass' : 'wp-dialog',
162
+ 'title': hierarchyPostAttributes.error.title,
163
+ 'modal' : true,
164
+ 'autoOpen' : true,
165
+ 'closeOnEscape' : false,
166
+ 'buttons' : [
167
+ {
168
+ 'text' : hierarchyPostAttributes.error.button.ok.label,
169
+ 'class' : 'button',
170
+ 'click' : function() { return self.destroy(); }
171
+ }
172
+ ],
173
+ 'close': function() { return self.destroy(); }
174
+ });
175
+ },
176
+ destroy: function () {
177
+ this.$element.dialog('close');
178
+ this.$element.remove();
179
+ }
180
+ };
181
+
182
+ $(document).ready(function() {
183
+ new AttributeMetaBox();
184
+ });
185
+ }(jQuery));
includes/rbs_gallery_init.php CHANGED
@@ -77,7 +77,7 @@ function create_post_type_robo_gallery() {
77
  'public' => true,
78
  'has_archive' => false,
79
  'hierarchical' => true,
80
- 'supports' => array( 'title', 'page-attributes', 'comments'), //
81
  'menu_icon' => 'dashicons-format-gallery',
82
  ));
83
  /* to-do options */
@@ -149,5 +149,5 @@ rbs_gallery_include('rbs_create_post_ajax.php', ROBO_GALLERY_EXTENSIONS_PATH);
149
  /* Init function */
150
 
151
  rbs_gallery_include('backup\backup.init.php', ROBO_GALLERY_EXTENSIONS_PATH);
152
- //rbs_gallery_include('category\category.init.php', ROBO_GALLERY_EXTENSIONS_PATH);
153
  rbs_gallery_include('stats\stats.init.php', ROBO_GALLERY_EXTENSIONS_PATH);
77
  'public' => true,
78
  'has_archive' => false,
79
  'hierarchical' => true,
80
+ 'supports' => array( 'title', 'comments'), // 'page-attributes',
81
  'menu_icon' => 'dashicons-format-gallery',
82
  ));
83
  /* to-do options */
149
  /* Init function */
150
 
151
  rbs_gallery_include('backup\backup.init.php', ROBO_GALLERY_EXTENSIONS_PATH);
152
+ rbs_gallery_include('category\category.init.php', ROBO_GALLERY_EXTENSIONS_PATH);
153
  rbs_gallery_include('stats\stats.init.php', ROBO_GALLERY_EXTENSIONS_PATH);
js/admin/extensions/create_post.js CHANGED
@@ -133,19 +133,21 @@
133
 
134
  $('#rbs_gallery_clear_views').click(function(evnt){
135
  evnt.preventDefault();
136
- var data = {
137
- 'action': 'rbs_gallery',
138
- 'function': 'reset_views',
139
- 'galleryid': roboGalleryActionDialogId,
140
- };
141
- jQuery(this).hide();
142
- $.post(ajaxurl, data, function(response) {
143
- if(response==1){
144
- jQuery("#rbs_gallery_views_value").text('0');
145
- alert( $('#rbs_gallery_clear_views').data("ok") );
146
- } else {
147
- alert(response);
148
- }
149
- });
 
 
150
  });
151
  })(jQuery);
133
 
134
  $('#rbs_gallery_clear_views').click(function(evnt){
135
  evnt.preventDefault();
136
+
137
+ var data = {
138
+ 'action': 'rbs_gallery',
139
+ 'function': 'reset_views',
140
+ 'galleryid': roboGalleryActionDialogId,
141
+ };
142
+ jQuery(this).hide();
143
+ $.post(ajaxurl, data, function(response) {
144
+ if(response==1){
145
+ jQuery("#rbs_gallery_views_value").text('0');
146
+ alert( $('#rbs_gallery_clear_views').data("ok") );
147
+ } else {
148
+ alert(response);
149
+ }
150
+ });
151
+
152
  });
153
  })(jQuery);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.robosoft.co/robogallery
4
  Tags: gallery, add gallery, photo gallery, images gallery, media gallery, responsive gallery, gallery image, gallery lightbox, Polaroid gallery, Gallery Plugin, plugin gallery, video gallery, gallery shortcode, responsive images gallery, website gallery, widget gallery, wordpress gallery, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugin, wp gallery plugins, multi categories gallery, add galleries, add picture, add pictures, album, best gallery, best gallery plugin, responsive galleries, mobile gallery, mobile galleries, responsive photo gallery, best portfolio, easy media gallery, filterable gallery, filterable portfolio, foto, fotoalbum, fotogalerie, sortable gallery, sortable galleries, free photo gallery, fullscreen gallery, galary, galeri, galerie, galerij, galery, gallary, Galleria, gallerie, galleries, gallery decription, gallery slider, gelary, gellary, gellery, google, grid gallery, image, image album, image gallery, image gallery plugin, image lightbox, image slider, image slideshow, images, jquery, jquery gallery, links, media, multiple pictures, page, pagination gallery, pagination portfolio, photo, photo album, photo albums, photoalbum, photogallery, photos, photoset, picture, pictures, plugin, plugin for gallery, portfolio, portfolio gallery, portfolio plugin, Post, posts, responsive slideshow, responsive wordpress photo gallery, seo image, slide show, slideshow, thumbnail, upload images, upload photos, batch upload, multiply images upload, view images, view pictures, wordpress portfolio plugin, multi-categories gallery, multi categories galleries, robo gallery
5
  Requires at least: 3.3
6
  Tested up to: 4.4
7
- Stable tag: 1.8.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -190,94 +190,90 @@ You can use any standard file type in our gallery: png, jpg, jpeg, gif
190
 
191
  No, we don't have any limits for amount of the images in gallery
192
 
193
- = How to change font size of the gallery image caption? =
194
-
195
- In gallery settings you can enable custom caption settings where you can customize font size and see results in live preview
196
-
197
  = How to change font color of the gallery image description text? =
198
 
199
  In gallery settings, when enabled custom hover settings you can customize style of the gallery image description text. In this settings you can change color of
200
  the text?
201
 
202
- = How to use multi-category functionality of the gallery? =
203
-
204
- In our gallery we implemented multi-categories structure. Every gallery category could have child and parent gallery, which you can manually define in gallery settings
205
 
206
- = Is it possible to use HTML in image description ? =
207
 
208
- Yes, you can use HTML tags inside gallery image description field
209
 
 
 
210
  = How to customize border of the gallery thumbnails? =
211
 
212
  In gallery settings you can find general settings section where you can turn on/off thumbnails border. Also you can customize there style of the border, namely width, color and style of the thumbnail borders
213
 
214
- = How to hide titles of the gallery image in lightbox ? =
215
 
216
- In lightbox section of the gallery settings you can find hide title option. If you enable it titles of the gallery images in lightbox will be turned off.
217
 
218
- = Is it possible to turn off border of the gallery thumbnails? =
219
 
220
- Yes, in gallery options you can turn on/off border option
221
 
222
  = Do you have some limit for images size in gallery? =
223
 
224
  No, we don't have any limits for image size in our gallery.
225
-
226
- = How to customize border of the gallery thumbnails? =
227
-
228
- In gallery settings you can find general settings section where you can turn on/off thumbnails border. Also you can customize there style of the border, namely width, color and style of the thumbnail borders
229
 
230
- = How to define video for some gallery image? =
231
 
232
- Every gallery image have additional fields where you can define custom link, title, description. One of the link option allow you to define link type, for example video link. All this options you can find in gallery images manager, inside general gallery settings
233
 
234
- = How to make shadow for the gallery thumbnails? =
235
 
236
- Shadows of the thumbnails you can customize in gallery settings. With gallery settings you can change size , color and position of the gallery thumbnails shadow
237
-
238
- = Do you have fade effect for the thumbnails hover? =
239
 
240
- Yes, gallery have fade hover effect
241
 
242
- = How to define custom hover effect for some gallery thumbnail? =
243
 
244
- When you open gallery media manager you'll see there list of the gallery images. Click on some image and on the right side you'll see images options. Every gallery image have custom effect field where you can select different hover effect for every image of the gallery.
245
 
246
- = How to make gallery thumbnails with rounded corners? =
 
 
247
 
248
- In gallery settings you can find section rounds where with special options you can define radius for the gallery thumbnails
249
 
250
- = How to change quality of the gallery thumbnails? =
251
 
252
- Quality of the gallery thumbnails could be easily changed in gallery size option / thumbnails options / source
253
 
254
  = Is it possible create gallery in Wordpress post with Gallery? =
255
 
256
  Yes, you can insert gallery into post with shortcode tag
257
 
258
- = How to change amount of images loading on gallery page? =
259
 
260
- In gallery settings we have few options which makes you able to select amount of the images for the first load and for load more action
261
 
262
- = How to change text below image in lightbox ? =
263
 
264
- In gallery setting you can select which text show below image in gallery lightbox. You can select Caption, Title or image Description as source for this field in gallery lightbox.
265
 
266
- = Which parameters I can change for the gallery thumbnails borders and shadows? =
267
 
268
- You can change size, color and style of gallery thumbnails borders and shadows. Also you can define different parameters for static and hovered status
269
 
270
  = How to define custom link for some gallery images? =
271
 
272
  Every gallery image have additional fields where you can define custom link, title, description. All this options you can find in gallery images manager, inside general gallery settings
273
 
274
- = Is it possible to have different settings for hover and static interface elements? =
275
 
276
- Yes, you can have different styles of the borders and shadows for static and hovered gallery thumbnails.
277
 
278
- = Where specify description of the gallery images? =
279
 
280
- When you open gallery settings inside you'll find images manager section. Images manager make you able to add/edit descriptions and titles of every gallery image
 
 
 
 
281
 
282
  = Is it possible to customize gallery image caption ? =
283
 
@@ -287,49 +283,53 @@ In gallery settings you can find images manager where you can change settings of
287
 
288
  If you have some conflict in gallery back end you can sort it with new compatibility option. If combo box element do not drop down you can switch between classic and modern style, as result you can avoid conflict with another code.
289
 
290
- = How to change color of the gallery interface elements? =
291
 
292
- Color of every gallery front end interface element could be changed changed in admin section with color selector. There you can change colors of the menu buttons, load more button, borders, shadows, backgrounds and etc.
293
 
294
  = How to define video for some gallery image? =
295
 
296
  Every gallery image have additional fields where you can define custom link, title, description. One of the link option allow you to define link type, for example video link. All this options you can find in gallery images manager, inside general gallery settings
297
 
298
- = How to change width of the gallery thumbnails border? =
299
 
300
- When you enable border in gallery settings you will see multiply options for customization of the border. One of the options it's border width in pixels.
301
 
302
- = How to generate shortcode for Wordpress page, post or widget? =
303
 
304
- First of all you can copy shortcode inside gallery settings , in separate shortcode block. Another way generate shortcode directly in post or page edit mode. You can find wizard button on top of content editor
305
 
306
- = What can I do if some gallery interface elements in backend do not work properly? =
307
 
308
- If you have some conflict in gallery back end you can sort it with new compatibility option. If combo box element do not drop down you can switch between classic and modern style, as result you can avoid conflict with another code.
309
 
310
- = How to upload images to the gallery? =
311
 
312
- When you create new gallery or open already existent gallery for edit on the right side of the edit gallery section you'll see gallery images manager button. When you open gallery images manager you'll be able there edit all gallery images. Upload, edit or delete. In gallery images manager you can use drag and drop gallery images upload tool.
313
 
314
- = How to insert gallery into Wordpress page or post? =
315
 
316
- When you create gallery in plugin galleries manager you can go to the post or page editor and there using special wizard button insert gallery into your wordpress post or page. Another way you can insert your gallery manually using shortcode, which you can find in gallery edit mode in shortcode section on the right side of the gallery settings
317
 
318
- = Do you have some conflict in gallery back end? =
319
 
320
- If you have some conflict in gallery back end you can sort it with new compatibility option. You can switch between standard and alternative jquery library. This modes implemented to help you to avoid any conflicts with another libraries from wordpress themes or another plugin.
321
 
322
  = How to define size of the gallery images thumbnails? =
323
 
324
  Our gallery is fully responsive and gallery thumbnails size depend of a lot of factors. Gallery calculate thumbnails automatically depend of the general gallery size and gallery layout settings. First of all you can define ratio values for gallery thumbnails. Size of the thumbnails could be selected from standard pre-defined wordpress sizes: thumbnail, medium, large, full
325
 
326
- = How to define custom link for some gallery images? =
327
 
328
- Every gallery image have additional fields where you can define custom link, title, description. All this options you can find in gallery images manager, inside general gallery settings
329
 
330
- = Is it possible to create direct link on the front end to the gallery? =
331
 
332
- Yes, you can use generated direct link inside particular gallery settings
 
 
 
 
333
 
334
  = How to enable lazy load in gallery options? =
335
 
@@ -339,6 +339,14 @@ In gallery settings you can find option to enable/disable lazy load, also there
339
 
340
  When you enable border in gallery settings you will see multiply options for customization of the border. One from this options it's border color. You can select color using color selector
341
 
 
 
 
 
 
 
 
 
342
  = How to customize gallery hover effect shutter layout? =
343
 
344
  In gallery hover settings you can enable template where you can fully customize layout of the shutter content using HTML tags, text and images. In template we have implemented some build in tags which going to help you to build in some gallery images elements into hover
@@ -359,14 +367,6 @@ In gallery settings you can find hover type options. In settings of the gallery
359
 
360
  In gallery admin section you can define amount of the images for the first load and after click on load more button. Load more it's such google gallery style pagination functionality which make you able to limit amount of the images for the first load
361
 
362
- = How to customize gallery layouts for different screen resolutions? =
363
-
364
- In admin section of the gallery you'll find columns options which provide you advanced customization options for different resolutions. You can define some static size or auto size for every resolution.
365
-
366
- = How to rotate uploaded gallery image? =
367
-
368
- When you open gallery images manager you'll find there image edit mode where you can rotate source image
369
-
370
  = Is it possible to change transparency of the hover shutter? =
371
 
372
  Yes, it's possible to change transparency in gallery settings
@@ -589,6 +589,10 @@ If any problem occurs, please contact us.
589
 
590
  == Changelog ==
591
 
 
 
 
 
592
  = 1.8.9 =
593
  * Added new gallery reset views option in gallery edit mode, in statistics block
594
 
@@ -969,6 +973,9 @@ If any problem occurs, please contact us.
969
 
970
  == Upgrade Notice ==
971
 
 
 
 
972
  = 1.8.9 =
973
  Added new gallery reset views option in gallery edit mode, in statistics block
974
 
4
  Tags: gallery, add gallery, photo gallery, images gallery, media gallery, responsive gallery, gallery image, gallery lightbox, Polaroid gallery, Gallery Plugin, plugin gallery, video gallery, gallery shortcode, responsive images gallery, website gallery, widget gallery, wordpress gallery, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugin, wp gallery plugins, multi categories gallery, add galleries, add picture, add pictures, album, best gallery, best gallery plugin, responsive galleries, mobile gallery, mobile galleries, responsive photo gallery, best portfolio, easy media gallery, filterable gallery, filterable portfolio, foto, fotoalbum, fotogalerie, sortable gallery, sortable galleries, free photo gallery, fullscreen gallery, galary, galeri, galerie, galerij, galery, gallary, Galleria, gallerie, galleries, gallery decription, gallery slider, gelary, gellary, gellery, google, grid gallery, image, image album, image gallery, image gallery plugin, image lightbox, image slider, image slideshow, images, jquery, jquery gallery, links, media, multiple pictures, page, pagination gallery, pagination portfolio, photo, photo album, photo albums, photoalbum, photogallery, photos, photoset, picture, pictures, plugin, plugin for gallery, portfolio, portfolio gallery, portfolio plugin, Post, posts, responsive slideshow, responsive wordpress photo gallery, seo image, slide show, slideshow, thumbnail, upload images, upload photos, batch upload, multiply images upload, view images, view pictures, wordpress portfolio plugin, multi-categories gallery, multi categories galleries, robo gallery
5
  Requires at least: 3.3
6
  Tested up to: 4.4
7
+ Stable tag: 1.9.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
190
 
191
  No, we don't have any limits for amount of the images in gallery
192
 
 
 
 
 
193
  = How to change font color of the gallery image description text? =
194
 
195
  In gallery settings, when enabled custom hover settings you can customize style of the gallery image description text. In this settings you can change color of
196
  the text?
197
 
198
+ = How to customize border of the gallery thumbnails? =
 
 
199
 
200
+ In gallery settings you can find general settings section where you can turn on/off thumbnails border. Also you can customize there style of the border, namely width, color and style of the thumbnail borders
201
 
202
+ = How to use multi-category functionality of the gallery? =
203
 
204
+ In our gallery we implemented multi-categories structure. Every gallery category could have child and parent gallery, which you can manually define in gallery settings
205
+
206
  = How to customize border of the gallery thumbnails? =
207
 
208
  In gallery settings you can find general settings section where you can turn on/off thumbnails border. Also you can customize there style of the border, namely width, color and style of the thumbnail borders
209
 
210
+ = How to change amount of images loading on gallery page? =
211
 
212
+ In gallery settings we have few options which makes you able to select amount of the images for the first load and for load more action
213
 
214
+ = How to change font size of the gallery image caption? =
215
 
216
+ In gallery settings you can enable custom caption settings where you can customize font size and see results in live preview
217
 
218
  = Do you have some limit for images size in gallery? =
219
 
220
  No, we don't have any limits for image size in our gallery.
 
 
 
 
221
 
222
+ = How to change text below image in lightbox ? =
223
 
224
+ In gallery setting you can select which text show below image in gallery lightbox. You can select Caption, Title or image Description as source for this field in gallery lightbox.
225
 
226
+ = Is it possible to use HTML in image description ? =
227
 
228
+ Yes, you can use HTML tags inside gallery image description field
 
 
229
 
230
+ = How to hide titles of the gallery image in lightbox ? =
231
 
232
+ In lightbox section of the gallery settings you can find hide title option. If you enable it titles of the gallery images in lightbox will be turned off.
233
 
234
+ = How to change width of the gallery thumbnails border? =
235
 
236
+ When you enable border in gallery settings you will see multiply options for customization of the border. One of the options it's border width in pixels.
237
+
238
+ = Where specify description of the gallery images? =
239
 
240
+ When you open gallery settings inside you'll find images manager section. Images manager make you able to add/edit descriptions and titles of every gallery image
241
 
242
+ = Is it possible to turn off border of the gallery thumbnails? =
243
 
244
+ Yes, in gallery options you can turn on/off border option
245
 
246
  = Is it possible create gallery in Wordpress post with Gallery? =
247
 
248
  Yes, you can insert gallery into post with shortcode tag
249
 
250
+ = Is it possible to have different settings for hover and static interface elements? =
251
 
252
+ Yes, you can have different styles of the borders and shadows for static and hovered gallery thumbnails.
253
 
254
+ = How to upload images to the gallery? =
255
 
256
+ When you create new gallery or open already existent gallery for edit on the right side of the edit gallery section you'll see gallery images manager button. When you open gallery images manager you'll be able there edit all gallery images. Upload, edit or delete. In gallery images manager you can use drag and drop gallery images upload tool.
257
 
258
+ = Do you have fade effect for the thumbnails hover? =
259
 
260
+ Yes, gallery have fade hover effect
261
 
262
  = How to define custom link for some gallery images? =
263
 
264
  Every gallery image have additional fields where you can define custom link, title, description. All this options you can find in gallery images manager, inside general gallery settings
265
 
266
+ = How to define custom hover effect for some gallery thumbnail? =
267
 
268
+ When you open gallery media manager you'll see there list of the gallery images. Click on some image and on the right side you'll see images options. Every gallery image have custom effect field where you can select different hover effect for every image of the gallery.
269
 
270
+ = Which parameters I can change for the gallery thumbnails borders and shadows? =
271
 
272
+ You can change size, color and style of gallery thumbnails borders and shadows. Also you can define different parameters for static and hovered status
273
+
274
+ = How to make shadow for the gallery thumbnails? =
275
+
276
+ Shadows of the thumbnails you can customize in gallery settings. With gallery settings you can change size , color and position of the gallery thumbnails shadow
277
 
278
  = Is it possible to customize gallery image caption ? =
279
 
283
 
284
  If you have some conflict in gallery back end you can sort it with new compatibility option. If combo box element do not drop down you can switch between classic and modern style, as result you can avoid conflict with another code.
285
 
286
+ = How to insert gallery into Wordpress page or post? =
287
 
288
+ When you create gallery in plugin galleries manager you can go to the post or page editor and there using special wizard button insert gallery into your wordpress post or page. Another way you can insert your gallery manually using shortcode, which you can find in gallery edit mode in shortcode section on the right side of the gallery settings
289
 
290
  = How to define video for some gallery image? =
291
 
292
  Every gallery image have additional fields where you can define custom link, title, description. One of the link option allow you to define link type, for example video link. All this options you can find in gallery images manager, inside general gallery settings
293
 
294
+ = How to define video for some gallery image? =
295
 
296
+ Every gallery image have additional fields where you can define custom link, title, description. One of the link option allow you to define link type, for example video link. All this options you can find in gallery images manager, inside general gallery settings
297
 
298
+ = Is it possible to create direct link on the front end to the gallery? =
299
 
300
+ Yes, you can use generated direct link inside particular gallery settings
301
 
302
+ = How to change quality of the gallery thumbnails? =
303
 
304
+ Quality of the gallery thumbnails could be easily changed in gallery size option / thumbnails options / source
305
 
306
+ = How to make gallery thumbnails with rounded corners? =
307
 
308
+ In gallery settings you can find section rounds where with special options you can define radius for the gallery thumbnails
309
 
310
+ = How to generate shortcode for Wordpress page, post or widget? =
311
 
312
+ First of all you can copy shortcode inside gallery settings , in separate shortcode block. Another way generate shortcode directly in post or page edit mode. You can find wizard button on top of content editor
313
 
314
+ = How to change color of the gallery interface elements? =
315
 
316
+ Color of every gallery front end interface element could be changed changed in admin section with color selector. There you can change colors of the menu buttons, load more button, borders, shadows, backgrounds and etc.
317
 
318
  = How to define size of the gallery images thumbnails? =
319
 
320
  Our gallery is fully responsive and gallery thumbnails size depend of a lot of factors. Gallery calculate thumbnails automatically depend of the general gallery size and gallery layout settings. First of all you can define ratio values for gallery thumbnails. Size of the thumbnails could be selected from standard pre-defined wordpress sizes: thumbnail, medium, large, full
321
 
322
+ = What can I do if some gallery interface elements in backend do not work properly? =
323
 
324
+ If you have some conflict in gallery back end you can sort it with new compatibility option. If combo box element do not drop down you can switch between classic and modern style, as result you can avoid conflict with another code.
325
 
326
+ = Do you have some conflict in gallery back end? =
327
 
328
+ If you have some conflict in gallery back end you can sort it with new compatibility option. You can switch between standard and alternative jquery library. This modes implemented to help you to avoid any conflicts with another libraries from wordpress themes or another plugin.
329
+
330
+ = How to define custom link for some gallery images? =
331
+
332
+ Every gallery image have additional fields where you can define custom link, title, description. All this options you can find in gallery images manager, inside general gallery settings
333
 
334
  = How to enable lazy load in gallery options? =
335
 
339
 
340
  When you enable border in gallery settings you will see multiply options for customization of the border. One from this options it's border color. You can select color using color selector
341
 
342
+ = How to customize gallery layouts for different screen resolutions? =
343
+
344
+ In admin section of the gallery you'll find columns options which provide you advanced customization options for different resolutions. You can define some static size or auto size for every resolution.
345
+
346
+ = How to rotate uploaded gallery image? =
347
+
348
+ When you open gallery images manager you'll find there image edit mode where you can rotate source image
349
+
350
  = How to customize gallery hover effect shutter layout? =
351
 
352
  In gallery hover settings you can enable template where you can fully customize layout of the shutter content using HTML tags, text and images. In template we have implemented some build in tags which going to help you to build in some gallery images elements into hover
367
 
368
  In gallery admin section you can define amount of the images for the first load and after click on load more button. Load more it's such google gallery style pagination functionality which make you able to limit amount of the images for the first load
369
 
 
 
 
 
 
 
 
 
370
  = Is it possible to change transparency of the hover shutter? =
371
 
372
  Yes, it's possible to change transparency in gallery settings
589
 
590
  == Changelog ==
591
 
592
+ = 1.9.0 =
593
+ * Updated gallery categories management section
594
+ * Added drag and drop categories manager
595
+
596
  = 1.8.9 =
597
  * Added new gallery reset views option in gallery edit mode, in statistics block
598
 
973
 
974
  == Upgrade Notice ==
975
 
976
+ = 1.9.0 =
977
+ Updated gallery categories management section, added drag and drop categories manager
978
+
979
  = 1.8.9 =
980
  Added new gallery reset views option in gallery edit mode, in statistics block
981
 
robogallery.php CHANGED
@@ -8,7 +8,7 @@
8
  * Plugin Name: Robo Gallery
9
  * Plugin URI: http://robosoft.co/robogallery
10
  * Description: A responsive, easy and elegant way to show gallery.
11
- * Version: 1.8.9
12
  * Author: RoboSoft (c)
13
  * Author URI: http://robosoft.co/robogallery
14
  * License: GPL-2.0+
@@ -19,7 +19,7 @@
19
 
20
  if ( ! defined( 'WPINC' ) ) die;
21
  define("ROBO_GALLERY", 1);
22
- define("ROBO_GALLERY_VERSION", '1.8.9');
23
  define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
24
  define("ROBO_GALLERY_SPECIAL", 0);
25
 
8
  * Plugin Name: Robo Gallery
9
  * Plugin URI: http://robosoft.co/robogallery
10
  * Description: A responsive, easy and elegant way to show gallery.
11
+ * Version: 1.9.0
12
  * Author: RoboSoft (c)
13
  * Author URI: http://robosoft.co/robogallery
14
  * License: GPL-2.0+
19
 
20
  if ( ! defined( 'WPINC' ) ) die;
21
  define("ROBO_GALLERY", 1);
22
+ define("ROBO_GALLERY_VERSION", '1.9.0');
23
  define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
24
  define("ROBO_GALLERY_SPECIAL", 0);
25