Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager - Version 2.2

Version Description

  • Fixed collapsed menu state bug
Download this release

Release Info

Developer galdub
Plugin Icon wp plugin Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager
Version 2.2
Comparing to
See all releases

Code changes from version 2.1.9 to 2.2

assets/css/design.css CHANGED
@@ -128,6 +128,13 @@ html[dir="rtl"] .wcp-content {
128
  left: auto;
129
  right: 160px;
130
  }
 
 
 
 
 
 
 
131
  body.wp-admin #wpcontent {
132
  padding-left: 310px;
133
  transition: all 0.15s linear;
128
  left: auto;
129
  right: 160px;
130
  }
131
+ body.folded .wcp-content {
132
+ left: 36px;
133
+ }
134
+ html[dir="rtl"] body.folded .wcp-content {
135
+ left: auto;
136
+ right: 36px;
137
+ }
138
  body.wp-admin #wpcontent {
139
  padding-left: 310px;
140
  transition: all 0.15s linear;
assets/js/custom.js CHANGED
@@ -2,11 +2,13 @@ var defaultFolderHtml;
2
  var folderID = 0;
3
  var fileAddUpdateStatus = "add";
4
  var fileFolderID = 0;
5
- var folderNameDynamic = '';
6
  var totalFolders = -1;
7
  var isKeyActive = 0;
8
  var folderLimitation = 10;
9
-
 
 
10
 
11
  var listFolderString = "<li class='grid-view' data-id='__folder_id__' id='folder___folder_id__'>" +
12
  "<div class='folder-item is-folder' data-id='__folder_id__'>" +
@@ -81,7 +83,7 @@ function addFolder() {
81
  // // add_menu_to_list();
82
  // // } else {
83
  // // Swal.fire(
84
- // // '',
85
  // // res.message,
86
  // // 'error'
87
  // // );
@@ -142,7 +144,7 @@ function addFolder() {
142
  Swal.close();
143
  } else {
144
  Swal.fire(
145
- '',
146
  result.message,
147
  'error'
148
  );
@@ -160,8 +162,6 @@ function updateFolder() {
160
  if(parentID == undefined) {
161
  parentID = 0;
162
  }
163
- console.log("folderName");
164
-
165
  Swal({
166
  title: 'Update Folder',
167
  input: 'text',
@@ -213,7 +213,7 @@ function updateFolder() {
213
  Swal.close();
214
  } else {
215
  Swal.fire(
216
- '',
217
  result.message,
218
  'error'
219
  );
@@ -353,7 +353,7 @@ jQuery(document).ready(function(){
353
  window.location.reload();
354
  } else {
355
  Swal.fire(
356
- '',
357
  res.message,
358
  'error'
359
  );
@@ -374,7 +374,7 @@ jQuery(document).ready(function(){
374
  window.location.reload();
375
  } else {
376
  Swal.fire(
377
- '',
378
  res.message,
379
  'error'
380
  );
@@ -632,7 +632,7 @@ jQuery(document).ready(function(){
632
  res = jQuery.parseJSON(res);
633
  if(res.status == "0") {
634
  Swal.fire(
635
- '',
636
  res.message,
637
  'error'
638
  );
@@ -778,7 +778,7 @@ jQuery(document).ready(function(){
778
  add_menu_to_list();
779
  } else {
780
  Swal.fire(
781
- '',
782
  res.message,
783
  'error'
784
  );
@@ -876,7 +876,7 @@ jQuery(document).ready(function(){
876
  add_menu_to_list();
877
  } else {
878
  Swal.fire(
879
- '',
880
  res.message,
881
  'error'
882
  );
@@ -919,7 +919,7 @@ jQuery(document).ready(function(){
919
  add_menu_to_list();
920
  } else {
921
  Swal.fire(
922
- '',
923
  res.message,
924
  'error'
925
  );
@@ -960,7 +960,7 @@ jQuery(document).ready(function(){
960
  res = jQuery.parseJSON(res);
961
  if (res.status == 0) {
962
  Swal.fire(
963
- '',
964
  res.message,
965
  'error'
966
  );
@@ -1012,7 +1012,7 @@ jQuery(document).ready(function(){
1012
  res = jQuery.parseJSON(res);
1013
  if(res.status == "0") {
1014
  Swal.fire(
1015
- '',
1016
  res.message,
1017
  'error'
1018
  );
@@ -1086,7 +1086,7 @@ jQuery(document).ready(function(){
1086
  add_menu_to_list();
1087
  } else {
1088
  Swal.fire(
1089
- '',
1090
  res.message,
1091
  'error'
1092
  );
@@ -1119,7 +1119,7 @@ jQuery(document).ready(function(){
1119
  res = jQuery.parseJSON(res);
1120
  if (res.status == '1') {
1121
  Swal.fire(
1122
- '',
1123
  res.message,
1124
  'error'
1125
  );
@@ -1200,7 +1200,7 @@ if(wcp_settings.post_type == "attachment") {
1200
  docReferrar = document.referrer;
1201
  if(docReferrar.indexOf("wp-admin/upload.php") != -1) {
1202
  mediaMode = getCookie("media-select-mode");
1203
- if (mediaMode === "on") {
1204
  jQuery("button.button.media-button.select-mode-toggle-button").trigger("click");
1205
  jQuery(".attachments-browser li.attachment").draggable("enable");
1206
 
2
  var folderID = 0;
3
  var fileAddUpdateStatus = "add";
4
  var fileFolderID = 0;
5
+ var folderNameDynamic = "";
6
  var totalFolders = -1;
7
  var isKeyActive = 0;
8
  var folderLimitation = 10;
9
+ var nonce = "";
10
+ var folderId = 0;
11
+ var fID = 0;
12
 
13
  var listFolderString = "<li class='grid-view' data-id='__folder_id__' id='folder___folder_id__'>" +
14
  "<div class='folder-item is-folder' data-id='__folder_id__'>" +
83
  // // add_menu_to_list();
84
  // // } else {
85
  // // Swal.fire(
86
+ // // "",
87
  // // res.message,
88
  // // 'error'
89
  // // );
144
  Swal.close();
145
  } else {
146
  Swal.fire(
147
+ "",
148
  result.message,
149
  'error'
150
  );
162
  if(parentID == undefined) {
163
  parentID = 0;
164
  }
 
 
165
  Swal({
166
  title: 'Update Folder',
167
  input: 'text',
213
  Swal.close();
214
  } else {
215
  Swal.fire(
216
+ "",
217
  result.message,
218
  'error'
219
  );
353
  window.location.reload();
354
  } else {
355
  Swal.fire(
356
+ "",
357
  res.message,
358
  'error'
359
  );
374
  window.location.reload();
375
  } else {
376
  Swal.fire(
377
+ "",
378
  res.message,
379
  'error'
380
  );
632
  res = jQuery.parseJSON(res);
633
  if(res.status == "0") {
634
  Swal.fire(
635
+ "",
636
  res.message,
637
  'error'
638
  );
778
  add_menu_to_list();
779
  } else {
780
  Swal.fire(
781
+ "",
782
  res.message,
783
  'error'
784
  );
876
  add_menu_to_list();
877
  } else {
878
  Swal.fire(
879
+ "",
880
  res.message,
881
  'error'
882
  );
919
  add_menu_to_list();
920
  } else {
921
  Swal.fire(
922
+ "",
923
  res.message,
924
  'error'
925
  );
960
  res = jQuery.parseJSON(res);
961
  if (res.status == 0) {
962
  Swal.fire(
963
+ "",
964
  res.message,
965
  'error'
966
  );
1012
  res = jQuery.parseJSON(res);
1013
  if(res.status == "0") {
1014
  Swal.fire(
1015
+ "",
1016
  res.message,
1017
  'error'
1018
  );
1086
  add_menu_to_list();
1087
  } else {
1088
  Swal.fire(
1089
+ "",
1090
  res.message,
1091
  'error'
1092
  );
1119
  res = jQuery.parseJSON(res);
1120
  if (res.status == '1') {
1121
  Swal.fire(
1122
+ "",
1123
  res.message,
1124
  'error'
1125
  );
1200
  docReferrar = document.referrer;
1201
  if(docReferrar.indexOf("wp-admin/upload.php") != -1) {
1202
  mediaMode = getCookie("media-select-mode");
1203
+ if (mediaMode == "on") {
1204
  jQuery("button.button.media-button.select-mode-toggle-button").trigger("click");
1205
  jQuery(".attachments-browser li.attachment").draggable("enable");
1206
 
folders.php CHANGED
@@ -2,12 +2,12 @@
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
- * Version: 2.1.9
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  */
9
 
10
- defined('ABSPATH') or die('Nope, not accessing this');
11
 
12
  define('WCP_FOLDERS_PLUGIN_FILE', __FILE__ );
13
  define('WCP_FOLDERS_PLUGIN_BASE', plugin_basename(WCP_FOLDERS_PLUGIN_FILE ) );
@@ -15,7 +15,7 @@ define('WCP_FOLDER', 'folders');
15
  define('WCP_FOLDER_VAR', 'folders_settings');
16
  define("WCP_DS", DIRECTORY_SEPARATOR);
17
  define('WCP_FOLDER_URL',plugin_dir_url(__FILE__));
18
- define('WCP_FOLDER_VERSION',"2.1.9");
19
 
20
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
21
  register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
+ * Version: 2.2
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  */
9
 
10
+ defined('ABSPATH') or wp_die('Nope, not accessing this');
11
 
12
  define('WCP_FOLDERS_PLUGIN_FILE', __FILE__ );
13
  define('WCP_FOLDERS_PLUGIN_BASE', plugin_basename(WCP_FOLDERS_PLUGIN_FILE ) );
15
  define('WCP_FOLDER_VAR', 'folders_settings');
16
  define("WCP_DS", DIRECTORY_SEPARATOR);
17
  define('WCP_FOLDER_URL',plugin_dir_url(__FILE__));
18
+ define('WCP_FOLDER_VERSION',"2.2");
19
 
20
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
21
  register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
includes/folders.class.php CHANGED
@@ -1,6 +1,5 @@
1
  <?php
2
-
3
- defined('ABSPATH') or die('Nope, not accessing this');
4
 
5
  class WCP_Folders
6
  {
@@ -29,61 +28,41 @@ class WCP_Folders
29
 
30
  /* Save Data */
31
  add_action('wp_ajax_wcp_add_new_folder', array($this, 'wcp_add_new_folder'));
32
-
33
  /* Update Data */
34
  add_action('wp_ajax_wcp_update_folder', array($this, 'wcp_update_folder'));
35
-
36
  /* Remove Data */
37
  add_action('wp_ajax_wcp_remove_folder', array($this, 'wcp_remove_folder'));
38
-
39
  /* Save State Data */
40
  add_action('wp_ajax_save_wcp_folder_state', array($this, 'save_wcp_folder_state'));
41
-
42
  /* Save State Data */
43
  add_action('wp_ajax_wcp_save_parent_data', array($this, 'wcp_save_parent_data'));
44
-
45
  /* Update Parent Data */
46
  add_action('wp_ajax_wcp_update_parent_information', array($this, 'wcp_update_parent_information'));
47
-
48
  /* Update Parent Data */
49
  add_action('wp_ajax_wcp_save_folder_order', array($this, 'wcp_save_folder_order'));
50
-
51
  /* Update Parent Data */
52
  add_action('wp_ajax_wcp_mark_un_mark_folder', array($this, 'wcp_mark_un_mark_folder'));
53
-
54
  /* Update Parent Data */
55
  add_action('wp_ajax_wcp_change_post_folder', array($this, 'wcp_change_post_folder'));
56
-
57
  /* Update Parent Data */
58
  add_action('wp_ajax_wcp_change_multiple_post_folder', array($this, 'wcp_change_multiple_post_folder'));
59
-
60
  /* Update Parent Data */
61
  add_action('wp_ajax_wcp_remove_post_folder', array($this, 'wcp_remove_post_folder'));
62
-
63
  /* Update width Data */
64
  add_action('wp_ajax_wcp_change_post_width', array($this, 'wcp_change_post_width'));
65
-
66
  /* Update width Data */
67
  add_action('wp_ajax_wcp_change_folder_display_status', array($this, 'wcp_change_folder_display_status'));
68
-
69
-
70
  /* Update width Data */
71
  add_action('wp_ajax_wcp_change_all_status', array($this, 'wcp_change_all_status'));
72
-
73
  self::$folders = 10;
74
-
75
  /* Send message on plugin deactivate */
76
  add_action( 'wp_ajax_folder_plugin_deactivate', array( $this, 'folder_plugin_deactivate' ) );
77
-
78
  /* Send message on owner */
79
  add_action( 'wp_ajax_wcp_folder_send_message_to_owner', array( $this, 'wcp_folder_send_message_to_owner' ) );
80
-
81
  /* Get default list */
82
  add_action( 'wp_ajax_wcp_get_default_list', array( $this, 'wcp_get_default_list' ) );
83
-
84
  /* Auto select folder for new page, post */
85
  add_action('new_to_auto-draft', array($this, 'new_to_auto_draft'), 10);
86
-
87
  /* for media */
88
  add_action('restrict_manage_posts', array($this, 'output_list_table_filters'), 10, 2);
89
  add_filter('pre_get_posts', array($this, 'filter_attachments_list'));
@@ -93,10 +72,7 @@ class WCP_Folders
93
 
94
  /* to filter un assigned items*/
95
  add_filter('pre_get_posts', array($this, 'filter_record_list'));
96
-
97
- /**/
98
  add_filter('pre-upload-ui', array($this, 'show_dropdown_on_media_screen'));
99
-
100
  add_action('add_attachment', array($this, 'add_attachment_category'));
101
 
102
  $options = get_option("folders_settings");
@@ -158,11 +134,12 @@ class WCP_Folders
158
  }
159
  }
160
  }
161
- $options = WCP_Tree::get_folder_option_data($post_type);;
162
- echo '<p class="attachments-category">'.esc_html__("Select a folder (Optional)", WCP_FOLDER).'<br/></p>
163
  <p>
164
- <select name="folder_for_media" class="folder_for_media"><option value="-1">- '.esc_html__('Uncategorized', WCP_FOLDER).'</option>'.$options.'</select>
165
- </p>';
 
166
  }
167
  }
168
 
@@ -173,28 +150,28 @@ class WCP_Folders
173
  $response['error'] = 0;
174
  $response['data'] = array();
175
  $response['message'] = "";
176
- $postData = $_POST;
177
  $errorCounter = 0;
178
  if (!isset($postData['status']) || empty($postData['status'])) {
179
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
180
  $errorCounter++;
181
  } else if (!isset($postData['type']) || empty($postData['type'])) {
182
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
183
  $errorCounter++;
184
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
185
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
186
  $errorCounter++;
187
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
188
- $response['message'] = __("You have not permission to update width", WCP_FOLDER);
189
  $errorCounter++;
190
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
191
- $response['message'] = __("You have not permission to update width", WCP_FOLDER);
192
  $errorCounter++;
193
  } else {
194
  $type = self::sanitize_options($postData['type']);
195
  $nonce = self::sanitize_options($postData['nonce']);
196
  if(!wp_verify_nonce($nonce, 'wcp_folder_nonce_'.$type)) {
197
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
198
  $errorCounter++;
199
  }
200
  }
@@ -216,28 +193,28 @@ class WCP_Folders
216
  $response['error'] = 0;
217
  $response['data'] = array();
218
  $response['message'] = "";
219
- $postData = $_POST;
220
  $errorCounter = 0;
221
  if (!isset($postData['status']) || empty($postData['status'])) {
222
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
223
  $errorCounter++;
224
  } else if (!isset($postData['type']) || empty($postData['type'])) {
225
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
226
  $errorCounter++;
227
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
228
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
229
  $errorCounter++;
230
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
231
- $response['message'] = __("You have not permission to update width", WCP_FOLDER);
232
  $errorCounter++;
233
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
234
- $response['message'] = __("You have not permission to update width", WCP_FOLDER);
235
  $errorCounter++;
236
  } else {
237
  $type = self::sanitize_options($postData['type']);
238
  $nonce = self::sanitize_options($postData['nonce']);
239
  if(!wp_verify_nonce($nonce, 'wcp_folder_nonce_'.$type)) {
240
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
241
  $errorCounter++;
242
  }
243
  }
@@ -258,19 +235,19 @@ class WCP_Folders
258
  $response['error'] = 0;
259
  $response['data'] = array();
260
  $response['message'] = "";
261
- $postData = $_POST;
262
  $errorCounter = 0;
263
  if (!isset($postData['post_id']) || empty($postData['post_id'])) {
264
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
265
  $errorCounter++;
266
  } else if (!isset($postData['type']) || empty($postData['type'])) {
267
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
268
  $errorCounter++;
269
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
270
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
271
  $errorCounter++;
272
  } else if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_nonce_'.$postData['type'])) {
273
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
274
  $errorCounter++;
275
  }
276
  if ($errorCounter == 0) {
@@ -375,7 +352,7 @@ class WCP_Folders
375
  return $query;
376
  }
377
 
378
- $term = sanitize_text_field( $_REQUEST[$taxonomy] );
379
  if ( $term != "-1" ) {
380
  return $query;
381
  }
@@ -494,12 +471,12 @@ class WCP_Folders
494
 
495
  $current_term = false;
496
  if ( isset( $_REQUEST['media_folder'] ) ) {
497
- $current_term = sanitize_text_field($_REQUEST['media_folder']);
498
  }
499
 
500
  wp_dropdown_categories( array(
501
- 'show_option_all' => __( 'All Folders', WCP_FOLDER ),
502
- 'show_option_none' => __( '(Unassigned)', WCP_FOLDER ),
503
  'option_none_value' => -1,
504
  'orderby' => 'name',
505
  'order' => 'ASC',
@@ -544,12 +521,12 @@ class WCP_Folders
544
  $response['errors'] = array();
545
  $response['message'] = "";
546
  $errorArray = [];
547
- $errorMessage = __("%s is required", WCP_FOLDER);
548
- $postData = $_POST;
549
  if(!isset($postData['textarea_text']) || trim($postData['textarea_text']) == "") {
550
  $error = array(
551
  "key" => "textarea_text",
552
- "message" => __("Please enter your message",WCP_FOLDER)
553
  );
554
  $errorArray[] = $error;
555
  }
@@ -570,14 +547,14 @@ class WCP_Folders
570
  if(!isset($postData['folder_help_nonce']) || trim($postData['folder_help_nonce']) == "") {
571
  $error = array(
572
  "key" => "nonce",
573
- "message" => __("Your request is not valid", WCP_FOLDER)
574
  );
575
  $errorArray[] = $error;
576
  } else {
577
  if(!wp_verify_nonce($postData['folder_help_nonce'], 'wcp_folder_help_nonce')) {
578
  $error = array(
579
  "key" => "nonce",
580
- "message" => __("Your request is not valid", WCP_FOLDER)
581
  );
582
  $errorArray[] = $error;
583
  }
@@ -600,21 +577,21 @@ class WCP_Folders
600
  <table border="0" cellspacing="0" cellpadding="5">
601
  <tr>
602
  <th>Domain</th>
603
- <td><?php echo $domain ?></td>
604
  </tr>
605
  <tr>
606
  <th>Email</th>
607
- <td><?php echo $email ?></td>
608
  </tr>
609
  <tr>
610
  <th>Message</th>
611
- <td><?php echo nl2br($text_message) ?></td>
612
  </tr>
613
  </table>
614
  <?php
615
  $message = ob_get_clean();
616
- $to = "contact+fromwp@premio.io";
617
- $status = wp_mail($to, $subject, $message, $headers);
618
  if($status) {
619
  $response['status'] = 1;
620
  } else {
@@ -630,7 +607,7 @@ class WCP_Folders
630
 
631
  public function folder_plugin_deactivate() {
632
  global $current_user;
633
- $postData = $_POST;
634
  $errorCounter = 0;
635
  $response = array();
636
  $response['status'] = 0;
@@ -640,13 +617,13 @@ class WCP_Folders
640
  $errorCounter++;
641
  $response['message'] = "Please provide reason";
642
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
643
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
644
  $errorCounter++;
645
  $response['valid'] = 0;
646
  } else {
647
  $nonce = self::sanitize_options($postData['nonce']);
648
  if(!wp_verify_nonce($nonce, 'wcp_folder_deactivate_nonce')) {
649
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
650
  $errorCounter++;
651
  $response['valid'] = 0;
652
  }
@@ -671,33 +648,33 @@ class WCP_Folders
671
  </tr>
672
  <tr>
673
  <th>Plugin Version</th>
674
- <td><?php echo WCP_FOLDER_VERSION ?></td>
675
  </tr>
676
  <tr>
677
  <th>Domain</th>
678
- <td><?php echo $domain ?></td>
679
  </tr>
680
  <tr>
681
  <th>Email</th>
682
- <td><?php echo $email ?></td>
683
  </tr>
684
  <tr>
685
  <th>Comment</th>
686
- <td><?php echo nl2br($reason) ?></td>
687
  </tr>
688
  <tr>
689
  <th>WordPress Version</th>
690
- <td><?php echo get_bloginfo('version') ?></td>
691
  </tr>
692
  <tr>
693
  <th>PHP Version</th>
694
- <td><?php echo PHP_VERSION ?></td>
695
  </tr>
696
  </table>
697
  <?php
698
  $content = ob_get_clean();
699
- $to = "contact+removed@premio.io";
700
- wp_mail($to, $subject, $content, $headers);
701
  $response['status'] = 1;
702
  }
703
  echo json_encode($response);
@@ -743,7 +720,7 @@ class WCP_Folders
743
  $response['error'] = 0;
744
  $response['data'] = array();
745
  $response['message'] = "";
746
- $postData = $_POST;
747
  if (isset($postData['post_id']) && !empty($postData['post_id'])) {
748
  wp_delete_post($postData['post_id']);
749
  $response['status'] = 1;
@@ -759,25 +736,25 @@ class WCP_Folders
759
  $response['error'] = 0;
760
  $response['data'] = array();
761
  $response['message'] = "";
762
- $postData = $_POST;
763
  $errorCounter = 0;
764
  if (!isset($postData['type']) || empty($postData['type'])) {
765
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
766
  $errorCounter++;
767
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
768
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
769
  $errorCounter++;
770
  } else if (!current_user_can("manage_categories") || ($postData['type'] == "page" && !current_user_can("edit_pages"))) {
771
- $response['message'] = __("You have not permission to update width", WCP_FOLDER);
772
  $errorCounter++;
773
  } else if (!current_user_can("manage_categories") || ($postData['type'] != "page" && !current_user_can("edit_posts"))) {
774
- $response['message'] = __("You have not permission to update width", WCP_FOLDER);
775
  $errorCounter++;
776
  } else {
777
  $type = self::sanitize_options($postData['type']);
778
  $nonce = self::sanitize_options($postData['nonce']);
779
  if(!wp_verify_nonce($nonce, 'wcp_folder_nonce_'.$type)) {
780
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
781
  $errorCounter++;
782
  }
783
  }
@@ -805,28 +782,28 @@ class WCP_Folders
805
  $response['error'] = 0;
806
  $response['data'] = array();
807
  $response['message'] = "";
808
- $postData = $_POST;
809
  $errorCounter = 0;
810
  if (!isset($postData['width']) || empty($postData['width'])) {
811
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
812
  $errorCounter++;
813
  } else if (!isset($postData['type']) || empty($postData['type'])) {
814
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
815
  $errorCounter++;
816
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
817
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
818
  $errorCounter++;
819
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
820
- $response['message'] = __("You have not permission to update width", WCP_FOLDER);
821
  $errorCounter++;
822
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
823
- $response['message'] = __("You have not permission to update width", WCP_FOLDER);
824
  $errorCounter++;
825
  } else {
826
  $type = self::sanitize_options($postData['type']);
827
  $nonce = self::sanitize_options($postData['nonce']);
828
  if(!wp_verify_nonce($nonce, 'wcp_folder_nonce_'.$type)) {
829
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
830
  $errorCounter++;
831
  }
832
  }
@@ -848,30 +825,30 @@ class WCP_Folders
848
  $response['error'] = 0;
849
  $response['data'] = array();
850
  $response['message'] = "";
851
- $postData = $_POST;
852
  $errorCounter = 0;
853
  if (!isset($postData['post_ids']) || empty($postData['post_ids'])) {
854
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
855
  $errorCounter++;
856
  } else if (!isset($postData['folder_id']) || empty($postData['folder_id'])) {
857
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
858
  $errorCounter++;
859
  } else if (!isset($postData['type']) || empty($postData['type'])) {
860
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
861
  $errorCounter++;
862
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
863
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
864
  $errorCounter++;
865
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
866
- $response['message'] = __("You have not permission to update folder", WCP_FOLDER);
867
  $errorCounter++;
868
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
869
- $response['message'] = __("You have not permission to update folder", WCP_FOLDER);
870
  $errorCounter++;
871
  } else {
872
  $folder_id = self::sanitize_options($postData['folder_id']);
873
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_term_'.$folder_id)) {
874
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
875
  $errorCounter++;
876
  }
877
  }
@@ -913,30 +890,30 @@ class WCP_Folders
913
  $response['error'] = 0;
914
  $response['data'] = array();
915
  $response['message'] = "";
916
- $postData = $_POST;
917
  $errorCounter = 0;
918
  if (!isset($postData['post_id']) || empty($postData['post_id'])) {
919
  $errorCounter++;
920
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
921
  } else if (!isset($postData['folder_id']) || empty($postData['folder_id'])) {
922
  $errorCounter++;
923
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
924
  } else if (!isset($postData['type']) || empty($postData['type'])) {
925
  $errorCounter++;
926
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
927
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
928
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
929
  $errorCounter++;
930
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
931
- $response['message'] = __("You have not permission to update folder", WCP_FOLDER);
932
  $errorCounter++;
933
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
934
- $response['message'] = __("You have not permission to update folder", WCP_FOLDER);
935
  $errorCounter++;
936
  } else {
937
  $term_id = self::sanitize_options($postData['folder_id']);
938
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_term_'.$term_id)) {
939
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
940
  $errorCounter++;
941
  }
942
  }
@@ -976,21 +953,21 @@ class WCP_Folders
976
  $response['error'] = 0;
977
  $response['data'] = array();
978
  $response['message'] = "";
979
- $postData = $_POST;
980
  $errorCounter = 0;
981
  if (!current_user_can("manage_categories")) {
982
- $response['message'] = __("You have not permission to update folder", WCP_FOLDER);
983
  $errorCounter++;
984
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
985
  $errorCounter++;
986
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
987
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
988
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
989
  $errorCounter++;
990
  } else {
991
  $term_id = self::sanitize_options($postData['term_id']);
992
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_highlight_term_'.$term_id)) {
993
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
994
  $errorCounter++;
995
  }
996
  }
@@ -1019,24 +996,24 @@ class WCP_Folders
1019
  $response['error'] = 0;
1020
  $response['data'] = array();
1021
  $response['message'] = "";
1022
- $postData = $_POST;
1023
  $errorCounter = 0;
1024
  if (!current_user_can("manage_categories")) {
1025
- $response['message'] = __("You have not permission to update folder order", WCP_FOLDER);
1026
  $errorCounter++;
1027
  } else if (!isset($postData['term_ids']) || empty($postData['term_ids'])) {
1028
  $errorCounter++;
1029
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1030
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1031
  $errorCounter++;
1032
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1033
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1034
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1035
  $errorCounter++;
1036
  } else {
1037
  $type = self::sanitize_options($postData['type']);
1038
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_nonce_'.$type)) {
1039
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1040
  $errorCounter++;
1041
  }
1042
  }
@@ -1068,13 +1045,13 @@ class WCP_Folders
1068
  $response['error'] = 0;
1069
  $response['data'] = array();
1070
  $response['message'] = "";
1071
- $postData = $_POST;
1072
  $errorCounter = 0;
1073
  if (!current_user_can("manage_categories")) {
1074
- $response['message'] = __("You have not permission to update folder", WCP_FOLDER);
1075
  $errorCounter++;
1076
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
1077
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1078
  $errorCounter++;
1079
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1080
  $response['message'] = "Unable to create folder, Your request is not valid";
@@ -1082,7 +1059,7 @@ class WCP_Folders
1082
  } else {
1083
  $term_id = self::sanitize_options($postData['term_id']);
1084
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_term_'.$term_id)) {
1085
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1086
  $errorCounter++;
1087
  }
1088
  }
@@ -1108,27 +1085,27 @@ class WCP_Folders
1108
  $response['error'] = 0;
1109
  $response['data'] = array();
1110
  $response['message'] = "";
1111
- $postData = $_POST;
1112
  $errorCounter = 0;
1113
  if (!current_user_can("manage_categories")) {
1114
- $response['message'] = __("You have not permission to update folder", WCP_FOLDER);
1115
  $errorCounter++;
1116
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
1117
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1118
  $errorCounter++;
1119
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1120
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1121
  $errorCounter++;
1122
  } else if (!isset($postData['parent_id'])) {
1123
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1124
  $errorCounter++;
1125
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1126
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1127
  $errorCounter++;
1128
  } else {
1129
  $term_id = self::sanitize_options($postData['term_id']);
1130
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_term_'.$term_id)) {
1131
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1132
  $errorCounter++;
1133
  }
1134
  }
@@ -1154,18 +1131,18 @@ class WCP_Folders
1154
  $response['error'] = 0;
1155
  $response['data'] = array();
1156
  $response['message'] = "";
1157
- $postData = $_POST;
1158
  $errorCounter = 0;
1159
  if (!isset($postData['type']) || empty($postData['type'])) {
1160
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1161
  $errorCounter++;
1162
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1163
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1164
  $errorCounter++;
1165
  } else {
1166
  $type = self::sanitize_options($postData['type']);
1167
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_nonce_'.$type)) {
1168
- $response['message'] = __("Your request is not valid", WCP_FOLDER);
1169
  $errorCounter++;
1170
  }
1171
  }
@@ -1192,16 +1169,16 @@ class WCP_Folders
1192
  $response['error'] = 0;
1193
  $response['data'] = array();
1194
  $response['message'] = "";
1195
- $postData = $_POST;
1196
  $errorCounter = 0;
1197
  if (!current_user_can("manage_categories")) {
1198
- $error = __("You have not permission to remove folder", WCP_FOLDER);
1199
  $errorCounter++;
1200
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
1201
- $error = __("Your request is not valid", WCP_FOLDER);
1202
  $errorCounter++;
1203
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1204
- $error = __("Your request is not valid", WCP_FOLDER);
1205
  $errorCounter++;
1206
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1207
  $error = "Unable to delete folder, Your request is not valid";
@@ -1262,19 +1239,19 @@ class WCP_Folders
1262
  $postData = $_REQUEST;
1263
  $errorCounter = 0;
1264
  if (!current_user_can("manage_categories")) {
1265
- $error = __("You have not permission to update folder", WCP_FOLDER);
1266
  $errorCounter++;
1267
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
1268
- $error = __("Unable to rename folder, Your request is not valid", WCP_FOLDER);
1269
  $errorCounter++;
1270
  } else if (!isset($postData['name']) || empty($postData['name'])) {
1271
- $error = __("Folder name can no be empty", WCP_FOLDER);
1272
  $errorCounter++;
1273
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1274
- $error = __("Your request is not valid", WCP_FOLDER);
1275
  $errorCounter++;
1276
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1277
- $error = __("Unable to rename folder, Your request is not valid", WCP_FOLDER);
1278
  $errorCounter++;
1279
  } else {
1280
  $term_id = self::sanitize_options($postData['term_id']);
@@ -1300,7 +1277,7 @@ class WCP_Folders
1300
  $response['status'] = 1;
1301
  $response['term_title'] = $postData['name'];
1302
  } else {
1303
- $response['message'] = __("Unable to rename folder", WCP_FOLDER);
1304
  }
1305
  } else {
1306
  $response['error'] = 1;
@@ -1340,23 +1317,23 @@ class WCP_Folders
1340
  $postData = $_REQUEST;
1341
  $errorCounter = 0;
1342
  if (!current_user_can("manage_categories")) {
1343
- $error = __("You have not permission to add folder", WCP_FOLDER);
1344
  $errorCounter++;
1345
  } else if (!isset($postData['name']) || empty($postData['name'])) {
1346
- $error = __("Folder name can no be empty", WCP_FOLDER);
1347
  $errorCounter++;
1348
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1349
- $error = __("Your request is not valid", WCP_FOLDER);
1350
  $errorCounter++;
1351
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1352
  $response['login'] = 0;
1353
- $error = __("Unable to create folder, Your request is not valid", WCP_FOLDER);
1354
  $errorCounter++;
1355
  } else {
1356
  $type = self::sanitize_options($postData['type']);
1357
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_nonce_'.$type)) {
1358
  $response['login'] = 0;
1359
- $error = __("Unable to create folder, Your request is not valid", WCP_FOLDER);
1360
  $errorCounter++;
1361
  }
1362
  }
@@ -1404,11 +1381,11 @@ class WCP_Folders
1404
  $response['is_key_active'] = $is_active;
1405
  $response['folders'] = $folders;
1406
  } else {
1407
- $response['message'] = __("Error during server request", WCP_FOLDER);
1408
  }
1409
  } else {
1410
  $response['error'] = 1;
1411
- $response['message'] = __("Folder name is already exists", WCP_FOLDER);
1412
  }
1413
  } else {
1414
  $response['error'] = 1;
@@ -1430,7 +1407,9 @@ class WCP_Folders
1430
 
1431
  global $typenow, $current_screen;
1432
 
1433
- if ((isset($_POST['action']) && $_POST['action'] == 'inline-save') && (isset($_POST['post_type']) && self::is_for_this_post_type($_POST['post_type']))) {
 
 
1434
  return true;
1435
  }
1436
  global $current_screen;
@@ -1591,20 +1570,20 @@ class WCP_Folders
1591
  if (!empty($posts)) {
1592
  foreach ($posts as $post_type) {
1593
  $labels = array(
1594
- 'name' => __('Folders', WCP_FOLDER),
1595
- 'singular_name' => __('Folder', WCP_FOLDER),
1596
- 'all_items' => __('All Folders', WCP_FOLDER),
1597
- 'edit_item' => __('Edit Folder', WCP_FOLDER),
1598
- 'update_item' => __('Update Folder', WCP_FOLDER),
1599
- 'add_new_item' => __('Add New Folder', WCP_FOLDER),
1600
- 'new_item_name' => __('Add Folder Name', WCP_FOLDER),
1601
- 'menu_name' => __('Folders', WCP_FOLDER),
1602
- 'search_items' => __('Search Folders', WCP_FOLDER),
1603
- 'parent_item' => __('Parent Folder', WCP_FOLDER),
1604
  );
1605
 
1606
  $args = array(
1607
- 'label' => __('Folder'),
1608
  'labels' => $labels,
1609
  'show_tagcloud' => false,
1610
  'hierarchical' => true,
@@ -1628,19 +1607,21 @@ class WCP_Folders
1628
  }
1629
  }
1630
 
 
 
1631
  if(current_user_can("manage_categories")) {
1632
- if (isset($_POST['folders_show_in_menu']) && !empty($_POST['folders_show_in_menu'])) {
1633
  $show_menu = "off";
1634
- if ($_POST['folders_show_in_menu'] == "on") {
1635
  $show_menu = "on";
1636
  }
1637
  update_option("folders_show_in_menu", $show_menu);
1638
  }
1639
 
1640
- if (isset($_POST['folders_settings1'])) {
1641
  $posts = array();
1642
- if (isset($_POST['folders_settings']) && is_array($_POST['folders_settings'])) {
1643
- foreach ($_POST['folders_settings'] as $key => $val) {
1644
  $posts[] = $val;
1645
  }
1646
  }
@@ -1922,7 +1903,7 @@ class WCP_Folders
1922
 
1923
  public function plugin_action_links($links)
1924
  {
1925
- array_unshift($links, '<a href="' . admin_url("admin.php?page=wcp_folders_settings") . '" >' . __('Settings', WCP_FOLDER) . '</a>');
1926
  $links['pro'] = '<a class="wcp-folder-upgrade-button" href="'.admin_url("admin.php?page=wcp_folders_upgrade").'" >'.__( 'Upgrade', WCP_FOLDER ).'</a>';
1927
  return $links;
1928
  }
@@ -2007,7 +1988,7 @@ class WCP_Folders
2007
  // echo "<pre>"; print_r($defaults);
2008
  if (is_array($options) && in_array($type, $options)) {
2009
  $columns = array(
2010
- 'wcp_move' => '<div class="wcp-move-multiple wcp-col" title="' . __('Move selected items', WCP_FOLDER) . '"><span class="dashicons dashicons-move"></span><div class="wcp-items"></div></div>',
2011
  ) + $defaults;
2012
  return $columns;
2013
  }
@@ -2064,8 +2045,8 @@ class WCP_Folders
2064
  public function admin_menu()
2065
  {
2066
  // Add menu item for settings page
2067
- $page_title = __('Folders', WCP_FOLDER);
2068
- $menu_title = __('Folders Settings', WCP_FOLDER);
2069
  $capability = 'manage_options';
2070
  $menu_slug = 'wcp_folders_settings';
2071
  $callback = array($this, "wcp_folders_settings");
@@ -2076,8 +2057,8 @@ class WCP_Folders
2076
 
2077
  add_submenu_page(
2078
  $menu_slug,
2079
- __('Upgrade to Pro', WCP_FOLDER),
2080
- __('Upgrade to Pro', WCP_FOLDER),
2081
  'manage_options',
2082
  'wcp_folders_upgrade',
2083
  array($this, 'wcp_folders_upgrade')
1
  <?php
2
+ defined('ABSPATH') or wp_die('Nope, not accessing this');
 
3
 
4
  class WCP_Folders
5
  {
28
 
29
  /* Save Data */
30
  add_action('wp_ajax_wcp_add_new_folder', array($this, 'wcp_add_new_folder'));
 
31
  /* Update Data */
32
  add_action('wp_ajax_wcp_update_folder', array($this, 'wcp_update_folder'));
 
33
  /* Remove Data */
34
  add_action('wp_ajax_wcp_remove_folder', array($this, 'wcp_remove_folder'));
 
35
  /* Save State Data */
36
  add_action('wp_ajax_save_wcp_folder_state', array($this, 'save_wcp_folder_state'));
 
37
  /* Save State Data */
38
  add_action('wp_ajax_wcp_save_parent_data', array($this, 'wcp_save_parent_data'));
 
39
  /* Update Parent Data */
40
  add_action('wp_ajax_wcp_update_parent_information', array($this, 'wcp_update_parent_information'));
 
41
  /* Update Parent Data */
42
  add_action('wp_ajax_wcp_save_folder_order', array($this, 'wcp_save_folder_order'));
 
43
  /* Update Parent Data */
44
  add_action('wp_ajax_wcp_mark_un_mark_folder', array($this, 'wcp_mark_un_mark_folder'));
 
45
  /* Update Parent Data */
46
  add_action('wp_ajax_wcp_change_post_folder', array($this, 'wcp_change_post_folder'));
 
47
  /* Update Parent Data */
48
  add_action('wp_ajax_wcp_change_multiple_post_folder', array($this, 'wcp_change_multiple_post_folder'));
 
49
  /* Update Parent Data */
50
  add_action('wp_ajax_wcp_remove_post_folder', array($this, 'wcp_remove_post_folder'));
 
51
  /* Update width Data */
52
  add_action('wp_ajax_wcp_change_post_width', array($this, 'wcp_change_post_width'));
 
53
  /* Update width Data */
54
  add_action('wp_ajax_wcp_change_folder_display_status', array($this, 'wcp_change_folder_display_status'));
 
 
55
  /* Update width Data */
56
  add_action('wp_ajax_wcp_change_all_status', array($this, 'wcp_change_all_status'));
 
57
  self::$folders = 10;
 
58
  /* Send message on plugin deactivate */
59
  add_action( 'wp_ajax_folder_plugin_deactivate', array( $this, 'folder_plugin_deactivate' ) );
 
60
  /* Send message on owner */
61
  add_action( 'wp_ajax_wcp_folder_send_message_to_owner', array( $this, 'wcp_folder_send_message_to_owner' ) );
 
62
  /* Get default list */
63
  add_action( 'wp_ajax_wcp_get_default_list', array( $this, 'wcp_get_default_list' ) );
 
64
  /* Auto select folder for new page, post */
65
  add_action('new_to_auto-draft', array($this, 'new_to_auto_draft'), 10);
 
66
  /* for media */
67
  add_action('restrict_manage_posts', array($this, 'output_list_table_filters'), 10, 2);
68
  add_filter('pre_get_posts', array($this, 'filter_attachments_list'));
72
 
73
  /* to filter un assigned items*/
74
  add_filter('pre_get_posts', array($this, 'filter_record_list'));
 
 
75
  add_filter('pre-upload-ui', array($this, 'show_dropdown_on_media_screen'));
 
76
  add_action('add_attachment', array($this, 'add_attachment_category'));
77
 
78
  $options = get_option("folders_settings");
134
  }
135
  }
136
  }
137
+ $options = WCP_Tree::get_folder_option_data($post_type);
138
+ ?><p class="attachments-category"><?php esc_html_e("Select a folder (Optional)", WCP_FOLDER) ?><br/></p>
139
  <p>
140
+ <select name="folder_for_media" class="folder_for_media"><option value="-1">- <?php esc_html_e('Uncategorized', WCP_FOLDER) ?></option><?php echo $options ?></select>
141
+ </p>
142
+ <?php
143
  }
144
  }
145
 
150
  $response['error'] = 0;
151
  $response['data'] = array();
152
  $response['message'] = "";
153
+ $postData = filter_input_array(INPUT_POST);
154
  $errorCounter = 0;
155
  if (!isset($postData['status']) || empty($postData['status'])) {
156
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
157
  $errorCounter++;
158
  } else if (!isset($postData['type']) || empty($postData['type'])) {
159
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
160
  $errorCounter++;
161
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
162
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
163
  $errorCounter++;
164
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
165
+ $response['message'] = esc_html__("You have not permission to update width", WCP_FOLDER);
166
  $errorCounter++;
167
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
168
+ $response['message'] = esc_html__("You have not permission to update width", WCP_FOLDER);
169
  $errorCounter++;
170
  } else {
171
  $type = self::sanitize_options($postData['type']);
172
  $nonce = self::sanitize_options($postData['nonce']);
173
  if(!wp_verify_nonce($nonce, 'wcp_folder_nonce_'.$type)) {
174
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
175
  $errorCounter++;
176
  }
177
  }
193
  $response['error'] = 0;
194
  $response['data'] = array();
195
  $response['message'] = "";
196
+ $postData = filter_input_array(INPUT_POST);
197
  $errorCounter = 0;
198
  if (!isset($postData['status']) || empty($postData['status'])) {
199
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
200
  $errorCounter++;
201
  } else if (!isset($postData['type']) || empty($postData['type'])) {
202
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
203
  $errorCounter++;
204
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
205
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
206
  $errorCounter++;
207
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
208
+ $response['message'] = esc_html__("You have not permission to update width", WCP_FOLDER);
209
  $errorCounter++;
210
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
211
+ $response['message'] = esc_html__("You have not permission to update width", WCP_FOLDER);
212
  $errorCounter++;
213
  } else {
214
  $type = self::sanitize_options($postData['type']);
215
  $nonce = self::sanitize_options($postData['nonce']);
216
  if(!wp_verify_nonce($nonce, 'wcp_folder_nonce_'.$type)) {
217
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
218
  $errorCounter++;
219
  }
220
  }
235
  $response['error'] = 0;
236
  $response['data'] = array();
237
  $response['message'] = "";
238
+ $postData = filter_input_array(INPUT_POST);
239
  $errorCounter = 0;
240
  if (!isset($postData['post_id']) || empty($postData['post_id'])) {
241
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
242
  $errorCounter++;
243
  } else if (!isset($postData['type']) || empty($postData['type'])) {
244
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
245
  $errorCounter++;
246
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
247
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
248
  $errorCounter++;
249
  } else if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_nonce_'.$postData['type'])) {
250
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
251
  $errorCounter++;
252
  }
253
  if ($errorCounter == 0) {
352
  return $query;
353
  }
354
 
355
+ $term = sanitize_text_field(wp_unslash($_REQUEST[$taxonomy]));
356
  if ( $term != "-1" ) {
357
  return $query;
358
  }
471
 
472
  $current_term = false;
473
  if ( isset( $_REQUEST['media_folder'] ) ) {
474
+ $current_term = sanitize_text_field(wp_unslash($_REQUEST['media_folder']));
475
  }
476
 
477
  wp_dropdown_categories( array(
478
+ 'show_option_all' => esc_html__('All Folders', WCP_FOLDER ),
479
+ 'show_option_none' => esc_html__('(Unassigned)', WCP_FOLDER ),
480
  'option_none_value' => -1,
481
  'orderby' => 'name',
482
  'order' => 'ASC',
521
  $response['errors'] = array();
522
  $response['message'] = "";
523
  $errorArray = [];
524
+ $errorMessage = esc_html__("%s is required", WCP_FOLDER);
525
+ $postData = filter_input_array(INPUT_POST);
526
  if(!isset($postData['textarea_text']) || trim($postData['textarea_text']) == "") {
527
  $error = array(
528
  "key" => "textarea_text",
529
+ "message" => esc_html__("Please enter your message",WCP_FOLDER)
530
  );
531
  $errorArray[] = $error;
532
  }
547
  if(!isset($postData['folder_help_nonce']) || trim($postData['folder_help_nonce']) == "") {
548
  $error = array(
549
  "key" => "nonce",
550
+ "message" => esc_html__("Your request is not valid", WCP_FOLDER)
551
  );
552
  $errorArray[] = $error;
553
  } else {
554
  if(!wp_verify_nonce($postData['folder_help_nonce'], 'wcp_folder_help_nonce')) {
555
  $error = array(
556
  "key" => "nonce",
557
+ "message" => esc_html__("Your request is not valid", WCP_FOLDER)
558
  );
559
  $errorArray[] = $error;
560
  }
577
  <table border="0" cellspacing="0" cellpadding="5">
578
  <tr>
579
  <th>Domain</th>
580
+ <td><?php echo esc_attr($domain) ?></td>
581
  </tr>
582
  <tr>
583
  <th>Email</th>
584
+ <td><?php echo esc_attr($email) ?></td>
585
  </tr>
586
  <tr>
587
  <th>Message</th>
588
+ <td><?php echo esc_attr(nl2br($text_message)) ?></td>
589
  </tr>
590
  </table>
591
  <?php
592
  $message = ob_get_clean();
593
+ $email_id = "contact+fromwp@premio.io";
594
+ $status = wp_mail($email_id, $subject, $message, $headers);
595
  if($status) {
596
  $response['status'] = 1;
597
  } else {
607
 
608
  public function folder_plugin_deactivate() {
609
  global $current_user;
610
+ $postData = filter_input_array(INPUT_POST);
611
  $errorCounter = 0;
612
  $response = array();
613
  $response['status'] = 0;
617
  $errorCounter++;
618
  $response['message'] = "Please provide reason";
619
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
620
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
621
  $errorCounter++;
622
  $response['valid'] = 0;
623
  } else {
624
  $nonce = self::sanitize_options($postData['nonce']);
625
  if(!wp_verify_nonce($nonce, 'wcp_folder_deactivate_nonce')) {
626
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
627
  $errorCounter++;
628
  $response['valid'] = 0;
629
  }
648
  </tr>
649
  <tr>
650
  <th>Plugin Version</th>
651
+ <td><?php echo esc_attr(WCP_FOLDER_VERSION) ?></td>
652
  </tr>
653
  <tr>
654
  <th>Domain</th>
655
+ <td><?php echo esc_attr($domain) ?></td>
656
  </tr>
657
  <tr>
658
  <th>Email</th>
659
+ <td><?php echo esc_attr($email) ?></td>
660
  </tr>
661
  <tr>
662
  <th>Comment</th>
663
+ <td><?php echo esc_attr(nl2br($reason)) ?></td>
664
  </tr>
665
  <tr>
666
  <th>WordPress Version</th>
667
+ <td><?php echo esc_attr(get_bloginfo('version')) ?></td>
668
  </tr>
669
  <tr>
670
  <th>PHP Version</th>
671
+ <td><?php echo esc_attr(PHP_VERSION) ?></td>
672
  </tr>
673
  </table>
674
  <?php
675
  $content = ob_get_clean();
676
+ $email_id = "contact+removed@premio.io";
677
+ wp_mail($email_id, $subject, $content, $headers);
678
  $response['status'] = 1;
679
  }
680
  echo json_encode($response);
720
  $response['error'] = 0;
721
  $response['data'] = array();
722
  $response['message'] = "";
723
+ $postData = filter_input_array(INPUT_POST);
724
  if (isset($postData['post_id']) && !empty($postData['post_id'])) {
725
  wp_delete_post($postData['post_id']);
726
  $response['status'] = 1;
736
  $response['error'] = 0;
737
  $response['data'] = array();
738
  $response['message'] = "";
739
+ $postData = filter_input_array(INPUT_POST);
740
  $errorCounter = 0;
741
  if (!isset($postData['type']) || empty($postData['type'])) {
742
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
743
  $errorCounter++;
744
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
745
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
746
  $errorCounter++;
747
  } else if (!current_user_can("manage_categories") || ($postData['type'] == "page" && !current_user_can("edit_pages"))) {
748
+ $response['message'] = esc_html__("You have not permission to update width", WCP_FOLDER);
749
  $errorCounter++;
750
  } else if (!current_user_can("manage_categories") || ($postData['type'] != "page" && !current_user_can("edit_posts"))) {
751
+ $response['message'] = esc_html__("You have not permission to update width", WCP_FOLDER);
752
  $errorCounter++;
753
  } else {
754
  $type = self::sanitize_options($postData['type']);
755
  $nonce = self::sanitize_options($postData['nonce']);
756
  if(!wp_verify_nonce($nonce, 'wcp_folder_nonce_'.$type)) {
757
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
758
  $errorCounter++;
759
  }
760
  }
782
  $response['error'] = 0;
783
  $response['data'] = array();
784
  $response['message'] = "";
785
+ $postData = filter_input_array(INPUT_POST);
786
  $errorCounter = 0;
787
  if (!isset($postData['width']) || empty($postData['width'])) {
788
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
789
  $errorCounter++;
790
  } else if (!isset($postData['type']) || empty($postData['type'])) {
791
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
792
  $errorCounter++;
793
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
794
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
795
  $errorCounter++;
796
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
797
+ $response['message'] = esc_html__("You have not permission to update width", WCP_FOLDER);
798
  $errorCounter++;
799
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
800
+ $response['message'] = esc_html__("You have not permission to update width", WCP_FOLDER);
801
  $errorCounter++;
802
  } else {
803
  $type = self::sanitize_options($postData['type']);
804
  $nonce = self::sanitize_options($postData['nonce']);
805
  if(!wp_verify_nonce($nonce, 'wcp_folder_nonce_'.$type)) {
806
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
807
  $errorCounter++;
808
  }
809
  }
825
  $response['error'] = 0;
826
  $response['data'] = array();
827
  $response['message'] = "";
828
+ $postData = filter_input_array(INPUT_POST);
829
  $errorCounter = 0;
830
  if (!isset($postData['post_ids']) || empty($postData['post_ids'])) {
831
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
832
  $errorCounter++;
833
  } else if (!isset($postData['folder_id']) || empty($postData['folder_id'])) {
834
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
835
  $errorCounter++;
836
  } else if (!isset($postData['type']) || empty($postData['type'])) {
837
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
838
  $errorCounter++;
839
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
840
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
841
  $errorCounter++;
842
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
843
+ $response['message'] = esc_html__("You have not permission to update folder", WCP_FOLDER);
844
  $errorCounter++;
845
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
846
+ $response['message'] = esc_html__("You have not permission to update folder", WCP_FOLDER);
847
  $errorCounter++;
848
  } else {
849
  $folder_id = self::sanitize_options($postData['folder_id']);
850
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_term_'.$folder_id)) {
851
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
852
  $errorCounter++;
853
  }
854
  }
890
  $response['error'] = 0;
891
  $response['data'] = array();
892
  $response['message'] = "";
893
+ $postData = filter_input_array(INPUT_POST);
894
  $errorCounter = 0;
895
  if (!isset($postData['post_id']) || empty($postData['post_id'])) {
896
  $errorCounter++;
897
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
898
  } else if (!isset($postData['folder_id']) || empty($postData['folder_id'])) {
899
  $errorCounter++;
900
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
901
  } else if (!isset($postData['type']) || empty($postData['type'])) {
902
  $errorCounter++;
903
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
904
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
905
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
906
  $errorCounter++;
907
  } else if ($postData['type'] == "page" && !current_user_can("edit_pages")) {
908
+ $response['message'] = esc_html__("You have not permission to update folder", WCP_FOLDER);
909
  $errorCounter++;
910
  } else if ($postData['type'] != "page" && !current_user_can("edit_posts")) {
911
+ $response['message'] = esc_html__("You have not permission to update folder", WCP_FOLDER);
912
  $errorCounter++;
913
  } else {
914
  $term_id = self::sanitize_options($postData['folder_id']);
915
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_term_'.$term_id)) {
916
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
917
  $errorCounter++;
918
  }
919
  }
953
  $response['error'] = 0;
954
  $response['data'] = array();
955
  $response['message'] = "";
956
+ $postData = filter_input_array(INPUT_POST);
957
  $errorCounter = 0;
958
  if (!current_user_can("manage_categories")) {
959
+ $response['message'] = esc_html__("You have not permission to update folder", WCP_FOLDER);
960
  $errorCounter++;
961
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
962
  $errorCounter++;
963
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
964
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
965
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
966
  $errorCounter++;
967
  } else {
968
  $term_id = self::sanitize_options($postData['term_id']);
969
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_highlight_term_'.$term_id)) {
970
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
971
  $errorCounter++;
972
  }
973
  }
996
  $response['error'] = 0;
997
  $response['data'] = array();
998
  $response['message'] = "";
999
+ $postData = filter_input_array(INPUT_POST);
1000
  $errorCounter = 0;
1001
  if (!current_user_can("manage_categories")) {
1002
+ $response['message'] = esc_html__("You have not permission to update folder order", WCP_FOLDER);
1003
  $errorCounter++;
1004
  } else if (!isset($postData['term_ids']) || empty($postData['term_ids'])) {
1005
  $errorCounter++;
1006
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1007
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1008
  $errorCounter++;
1009
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1010
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1011
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1012
  $errorCounter++;
1013
  } else {
1014
  $type = self::sanitize_options($postData['type']);
1015
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_nonce_'.$type)) {
1016
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1017
  $errorCounter++;
1018
  }
1019
  }
1045
  $response['error'] = 0;
1046
  $response['data'] = array();
1047
  $response['message'] = "";
1048
+ $postData = filter_input_array(INPUT_POST);
1049
  $errorCounter = 0;
1050
  if (!current_user_can("manage_categories")) {
1051
+ $response['message'] = esc_html__("You have not permission to update folder", WCP_FOLDER);
1052
  $errorCounter++;
1053
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
1054
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1055
  $errorCounter++;
1056
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1057
  $response['message'] = "Unable to create folder, Your request is not valid";
1059
  } else {
1060
  $term_id = self::sanitize_options($postData['term_id']);
1061
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_term_'.$term_id)) {
1062
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1063
  $errorCounter++;
1064
  }
1065
  }
1085
  $response['error'] = 0;
1086
  $response['data'] = array();
1087
  $response['message'] = "";
1088
+ $postData = filter_input_array(INPUT_POST);
1089
  $errorCounter = 0;
1090
  if (!current_user_can("manage_categories")) {
1091
+ $response['message'] = esc_html__("You have not permission to update folder", WCP_FOLDER);
1092
  $errorCounter++;
1093
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
1094
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1095
  $errorCounter++;
1096
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1097
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1098
  $errorCounter++;
1099
  } else if (!isset($postData['parent_id'])) {
1100
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1101
  $errorCounter++;
1102
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1103
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1104
  $errorCounter++;
1105
  } else {
1106
  $term_id = self::sanitize_options($postData['term_id']);
1107
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_term_'.$term_id)) {
1108
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1109
  $errorCounter++;
1110
  }
1111
  }
1131
  $response['error'] = 0;
1132
  $response['data'] = array();
1133
  $response['message'] = "";
1134
+ $postData = filter_input_array(INPUT_POST);
1135
  $errorCounter = 0;
1136
  if (!isset($postData['type']) || empty($postData['type'])) {
1137
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1138
  $errorCounter++;
1139
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1140
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1141
  $errorCounter++;
1142
  } else {
1143
  $type = self::sanitize_options($postData['type']);
1144
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_nonce_'.$type)) {
1145
+ $response['message'] = esc_html__("Your request is not valid", WCP_FOLDER);
1146
  $errorCounter++;
1147
  }
1148
  }
1169
  $response['error'] = 0;
1170
  $response['data'] = array();
1171
  $response['message'] = "";
1172
+ $postData = filter_input_array(INPUT_POST);
1173
  $errorCounter = 0;
1174
  if (!current_user_can("manage_categories")) {
1175
+ $error = esc_html__("You have not permission to remove folder", WCP_FOLDER);
1176
  $errorCounter++;
1177
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
1178
+ $error = esc_html__("Your request is not valid", WCP_FOLDER);
1179
  $errorCounter++;
1180
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1181
+ $error = esc_html__("Your request is not valid", WCP_FOLDER);
1182
  $errorCounter++;
1183
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1184
  $error = "Unable to delete folder, Your request is not valid";
1239
  $postData = $_REQUEST;
1240
  $errorCounter = 0;
1241
  if (!current_user_can("manage_categories")) {
1242
+ $error = esc_html__("You have not permission to update folder", WCP_FOLDER);
1243
  $errorCounter++;
1244
  } else if (!isset($postData['term_id']) || empty($postData['term_id'])) {
1245
+ $error = esc_html__("Unable to rename folder, Your request is not valid", WCP_FOLDER);
1246
  $errorCounter++;
1247
  } else if (!isset($postData['name']) || empty($postData['name'])) {
1248
+ $error = esc_html__("Folder name can no be empty", WCP_FOLDER);
1249
  $errorCounter++;
1250
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1251
+ $error = esc_html__("Your request is not valid", WCP_FOLDER);
1252
  $errorCounter++;
1253
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1254
+ $error = esc_html__("Unable to rename folder, Your request is not valid", WCP_FOLDER);
1255
  $errorCounter++;
1256
  } else {
1257
  $term_id = self::sanitize_options($postData['term_id']);
1277
  $response['status'] = 1;
1278
  $response['term_title'] = $postData['name'];
1279
  } else {
1280
+ $response['message'] = esc_html__("Unable to rename folder", WCP_FOLDER);
1281
  }
1282
  } else {
1283
  $response['error'] = 1;
1317
  $postData = $_REQUEST;
1318
  $errorCounter = 0;
1319
  if (!current_user_can("manage_categories")) {
1320
+ $error = esc_html__("You have not permission to add folder", WCP_FOLDER);
1321
  $errorCounter++;
1322
  } else if (!isset($postData['name']) || empty($postData['name'])) {
1323
+ $error = esc_html__("Folder name can no be empty", WCP_FOLDER);
1324
  $errorCounter++;
1325
  } else if (!isset($postData['type']) || empty($postData['type'])) {
1326
+ $error = esc_html__("Your request is not valid", WCP_FOLDER);
1327
  $errorCounter++;
1328
  } else if (!isset($postData['nonce']) || empty($postData['nonce'])) {
1329
  $response['login'] = 0;
1330
+ $error = esc_html__("Unable to create folder, Your request is not valid", WCP_FOLDER);
1331
  $errorCounter++;
1332
  } else {
1333
  $type = self::sanitize_options($postData['type']);
1334
  if(!wp_verify_nonce($postData['nonce'], 'wcp_folder_nonce_'.$type)) {
1335
  $response['login'] = 0;
1336
+ $error = esc_html__("Unable to create folder, Your request is not valid", WCP_FOLDER);
1337
  $errorCounter++;
1338
  }
1339
  }
1381
  $response['is_key_active'] = $is_active;
1382
  $response['folders'] = $folders;
1383
  } else {
1384
+ $response['message'] = esc_html__("Error during server request", WCP_FOLDER);
1385
  }
1386
  } else {
1387
  $response['error'] = 1;
1388
+ $response['message'] = esc_html__("Folder name is already exists", WCP_FOLDER);
1389
  }
1390
  } else {
1391
  $response['error'] = 1;
1407
 
1408
  global $typenow, $current_screen;
1409
 
1410
+ $postData = filter_input_array(INPUT_POST);
1411
+
1412
+ if ((isset($postData['action']) && $postData['action'] == 'inline-save') && (isset($postData['post_type']) && self::is_for_this_post_type($postData['post_type']))) {
1413
  return true;
1414
  }
1415
  global $current_screen;
1570
  if (!empty($posts)) {
1571
  foreach ($posts as $post_type) {
1572
  $labels = array(
1573
+ 'name' => esc_html__('Folders', WCP_FOLDER),
1574
+ 'singular_name' => esc_html__('Folder', WCP_FOLDER),
1575
+ 'all_items' => esc_html__('All Folders', WCP_FOLDER),
1576
+ 'edit_item' => esc_html__('Edit Folder', WCP_FOLDER),
1577
+ 'update_item' => esc_html__('Update Folder', WCP_FOLDER),
1578
+ 'add_new_item' => esc_html__('Add New Folder', WCP_FOLDER),
1579
+ 'new_item_name' => esc_html__('Add Folder Name', WCP_FOLDER),
1580
+ 'menu_name' => esc_html__('Folders', WCP_FOLDER),
1581
+ 'search_items' => esc_html__('Search Folders', WCP_FOLDER),
1582
+ 'parent_item' => esc_html__('Parent Folder', WCP_FOLDER),
1583
  );
1584
 
1585
  $args = array(
1586
+ 'label' => esc_html__('Folder', WCP_FOLDER),
1587
  'labels' => $labels,
1588
  'show_tagcloud' => false,
1589
  'hierarchical' => true,
1607
  }
1608
  }
1609
 
1610
+ $postData = filter_input_array(INPUT_POST);
1611
+
1612
  if(current_user_can("manage_categories")) {
1613
+ if (isset($postData['folders_show_in_menu']) && !empty($postData['folders_show_in_menu'])) {
1614
  $show_menu = "off";
1615
+ if ($postData['folders_show_in_menu'] == "on") {
1616
  $show_menu = "on";
1617
  }
1618
  update_option("folders_show_in_menu", $show_menu);
1619
  }
1620
 
1621
+ if (isset($postData['folders_settings1'])) {
1622
  $posts = array();
1623
+ if (isset($postData['folders_settings']) && is_array($postData['folders_settings'])) {
1624
+ foreach ($postData['folders_settings'] as $key => $val) {
1625
  $posts[] = $val;
1626
  }
1627
  }
1903
 
1904
  public function plugin_action_links($links)
1905
  {
1906
+ array_unshift($links, '<a href="' . admin_url("admin.php?page=wcp_folders_settings") . '" >' . esc_html__('Settings', WCP_FOLDER) . '</a>');
1907
  $links['pro'] = '<a class="wcp-folder-upgrade-button" href="'.admin_url("admin.php?page=wcp_folders_upgrade").'" >'.__( 'Upgrade', WCP_FOLDER ).'</a>';
1908
  return $links;
1909
  }
1988
  // echo "<pre>"; print_r($defaults);
1989
  if (is_array($options) && in_array($type, $options)) {
1990
  $columns = array(
1991
+ 'wcp_move' => '<div class="wcp-move-multiple wcp-col" title="' . esc_html__('Move selected items', WCP_FOLDER) . '"><span class="dashicons dashicons-move"></span><div class="wcp-items"></div></div>',
1992
  ) + $defaults;
1993
  return $columns;
1994
  }
2045
  public function admin_menu()
2046
  {
2047
  // Add menu item for settings page
2048
+ $page_title = esc_html__('Folders', WCP_FOLDER);
2049
+ $menu_title = esc_html__('Folders Settings', WCP_FOLDER);
2050
  $capability = 'manage_options';
2051
  $menu_slug = 'wcp_folders_settings';
2052
  $callback = array($this, "wcp_folders_settings");
2057
 
2058
  add_submenu_page(
2059
  $menu_slug,
2060
+ esc_html__('Upgrade to Pro', WCP_FOLDER),
2061
+ esc_html__('Upgrade to Pro', WCP_FOLDER),
2062
  'manage_options',
2063
  'wcp_folders_upgrade',
2064
  array($this, 'wcp_folders_upgrade')
includes/form.class.php CHANGED
@@ -1,6 +1,5 @@
1
  <?php
2
-
3
- defined('ABSPATH') or die('Nope, not accessing this');
4
 
5
  class WCP_Forms {
6
  public function __construct() {
@@ -12,17 +11,17 @@ class WCP_Forms {
12
  ?>
13
  <div class="wcp-custom-form">
14
  <div class="form-title">
15
- <?php echo __("Folders", WCP_FOLDER) ?>
16
- <a href="javascript:;" class="add-new-folder" id="add-new-folder"><span class="folder-icon-create_new_folder"></span> <span><?php echo __("New Folder", WCP_FOLDER) ?></span></a>
17
  <div class="clear"></div>
18
  </div>
19
  <div class="form-options">
20
  <ul>
21
  <li>
22
- <a href="javascript:;" id="inline-update"><span class="icon folder-icon-border_color"><span class="path1"></span><span class="path2"></span></span> <span class="text"><?php echo __("Rename", WCP_FOLDER) ?></span> </a>
23
  </li>
24
  <li>
25
- <a href="javascript:;" id="inline-remove"><span class="icon folder-icon-delete"></span> <span class="text"><?php echo __("Delete", WCP_FOLDER) ?></span> </a>
26
  </li>
27
  <li class="last">
28
  <a href="javascript:;" id="expand-collapse-list"><span class="icon folder-icon-expand_more"></span></span> </a>
@@ -39,9 +38,9 @@ class WCP_Forms {
39
  $total_folders = $total;
40
  }
41
  ?>
42
- <span class="upgrade-message">You have used <?php echo "<span class='pink' id='current-folder'>".$total."</span>/<span id='total-folder'>".$total_folders."</span>" ?> Folders. <a class="pink" href="<?php echo admin_url("admin.php?page=wcp_folders_upgrade") ?>"><?php echo __("Upgrade", WCP_FOLDER) ?></a></span>
43
  <script>
44
- folderLimitation = <?php echo $total_folders; ?>;
45
  </script>
46
  </div>
47
  </div>
1
  <?php
2
+ defined('ABSPATH') or wp_die('Nope, not accessing this');
 
3
 
4
  class WCP_Forms {
5
  public function __construct() {
11
  ?>
12
  <div class="wcp-custom-form">
13
  <div class="form-title">
14
+ <?php esc_html_e("Folders", WCP_FOLDER) ?>
15
+ <a href="javascript:;" class="add-new-folder" id="add-new-folder"><span class="folder-icon-create_new_folder"></span> <span><?php esc_html_e("New Folder", WCP_FOLDER) ?></span></a>
16
  <div class="clear"></div>
17
  </div>
18
  <div class="form-options">
19
  <ul>
20
  <li>
21
+ <a href="javascript:;" id="inline-update"><span class="icon folder-icon-border_color"><span class="path1"></span><span class="path2"></span></span> <span class="text"><?php esc_html_e("Rename", WCP_FOLDER) ?></span> </a>
22
  </li>
23
  <li>
24
+ <a href="javascript:;" id="inline-remove"><span class="icon folder-icon-delete"></span> <span class="text"><?php esc_html_e("Delete", WCP_FOLDER) ?></span> </a>
25
  </li>
26
  <li class="last">
27
  <a href="javascript:;" id="expand-collapse-list"><span class="icon folder-icon-expand_more"></span></span> </a>
38
  $total_folders = $total;
39
  }
40
  ?>
41
+ <span class="upgrade-message">You have used <span class='pink' id='current-folder'><?php echo esc_attr($total) ?></span>/<span id='total-folder'><?php echo esc_attr($total_folders) ?></span> Folders. <a class="pink" href="<?php echo esc_url(admin_url("admin.php?page=wcp_folders_upgrade")) ?>"><?php esc_html_e("Upgrade", WCP_FOLDER) ?></a></span>
42
  <script>
43
+ folderLimitation = <?php echo esc_attr($total_folders); ?>;
44
  </script>
45
  </div>
46
  </div>
includes/plugin.updates.php CHANGED
@@ -1,9 +1,8 @@
1
  <?php
2
 
3
- defined('ABSPATH') or die('Nope, not accessing this');
4
 
5
  // Exit if accessed directly
6
- if ( ! defined( 'ABSPATH' ) ) exit;
7
 
8
  /**
9
  * Allows plugins to use their own update API.
@@ -214,12 +213,12 @@ class Folder_Plugin_Updater {
214
  if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
215
 
216
  // build a plugin list row, with update notification
217
- $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
218
  # <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
219
- echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
220
- echo '<td colspan="3" class="plugin-update colspanchange">';
221
- echo '<div class="update-message notice inline notice-warning notice-alt">';
222
-
 
223
  $changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
224
 
225
  if ( empty( $version_info->download_link ) ) {
1
  <?php
2
 
3
+ defined('ABSPATH') or wp_die('Nope, not accessing this');
4
 
5
  // Exit if accessed directly
 
6
 
7
  /**
8
  * Allows plugins to use their own update API.
213
  if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
214
 
215
  // build a plugin list row, with update notification
 
216
  # <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
217
+ ?>
218
+ <tr class="plugin-update-tr" id="<?php echo esc_attr($this->slug) ?>-update" data-slug="<?php echo esc_attr($this->slug) ?>" data-plugin="<?php echo esc_attr($this->slug) ?>/' . $file . '">
219
+ <td colspan="3" class="plugin-update colspanchange">
220
+ <div class="update-message notice inline notice-warning notice-alt">
221
+ <?php
222
  $changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
223
 
224
  if ( empty( $version_info->download_link ) ) {
includes/tree.class.php CHANGED
@@ -6,8 +6,9 @@ class WCP_Tree {
6
  }
7
 
8
  public static function get_full_tree_data($post_type) {
9
- $isAjax = (!empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) && strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) == 'xmlhttprequest')?1:0;
10
- if(isset($_GET[$post_type]) || ! $isAjax) {
 
11
  update_option("selected_" . $post_type . "_folder", "");
12
  }
13
  $string = self::get_folder_category_data($post_type, 0, 0);
@@ -30,7 +31,7 @@ class WCP_Tree {
30
  ));
31
  $string = "";
32
  $child = 0;
33
- $isAjax = (!empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) && strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) == 'xmlhttprequest')?1:0;
34
  if(!empty($terms)) {
35
  $child = count($terms);
36
  foreach($terms as $term) {
@@ -38,21 +39,23 @@ class WCP_Tree {
38
  $return = self::get_folder_category_data($post_type, $term->term_id, $status);
39
  $class = ($status == 1 && $return['child']>0)?"active":"";
40
  $class .= ($return['child'])>0?" has-sub-tree":"";
 
 
41
  if($post_type == "attachment") {
42
- $class .= (isset($_GET['term']) && $_GET['term'] == $term->slug)?" active-item active-term":"";
43
- if(isset($_GET[$post_type]) && $_GET[$post_type] == $term->slug) {
44
  update_option("selected_".$post_type."_folder", $term->term_id);
45
  }
46
- if(!isset($_GET[$post_type]) && $isAjax) {
47
  $termId = get_option("selected_".$post_type."_folder");
48
  $class .= ($termId == $term->term_id)?" active-item active-term":"";
49
  }
50
  } else {
51
- $class .= (isset($_GET[$post_type]) && $_GET[$post_type] == $term->slug)?" active-item active-term":"";
52
- if(isset($_GET[$post_type]) && $_GET[$post_type] == $term->slug) {
53
  update_option("selected_" . $post_type . "_folder", $term->term_id);
54
  }
55
- if(!isset($_GET[$post_type]) && $isAjax) {
56
  $termId = get_option("selected_".$post_type."_folder");
57
  $class .= ($termId == $term->term_id)?" active-item active-term":"";
58
  }
6
  }
7
 
8
  public static function get_full_tree_data($post_type) {
9
+ $isAjax = (defined('DOING_AJAX') && DOING_AJAX)?1:0;
10
+ $type = filter_input(INPUT_GET, $post_type, FILTER_SANITIZE_STRING);
11
+ if((isset($type) && !empty($type)) || ! $isAjax) {
12
  update_option("selected_" . $post_type . "_folder", "");
13
  }
14
  $string = self::get_folder_category_data($post_type, 0, 0);
31
  ));
32
  $string = "";
33
  $child = 0;
34
+ $isAjax = (defined('DOING_AJAX') && DOING_AJAX)?1:0;
35
  if(!empty($terms)) {
36
  $child = count($terms);
37
  foreach($terms as $term) {
39
  $return = self::get_folder_category_data($post_type, $term->term_id, $status);
40
  $class = ($status == 1 && $return['child']>0)?"active":"";
41
  $class .= ($return['child'])>0?" has-sub-tree":"";
42
+ $term_var = filter_input(INPUT_GET, "term", FILTER_SANITIZE_STRING);
43
+ $type = filter_input(INPUT_GET, $post_type, FILTER_SANITIZE_STRING);
44
  if($post_type == "attachment") {
45
+ $class .= (isset($term_var) && $term_var == $term->slug)?" active-item active-term":"";
46
+ if(isset($type) && $type == $term->slug) {
47
  update_option("selected_".$post_type."_folder", $term->term_id);
48
  }
49
+ if(!isset($type) && $isAjax) {
50
  $termId = get_option("selected_".$post_type."_folder");
51
  $class .= ($termId == $term->term_id)?" active-item active-term":"";
52
  }
53
  } else {
54
+ $class .= (isset($type) && $type == $term->slug)?" active-item active-term":"";
55
+ if(isset($type) && $type == $term->slug) {
56
  update_option("selected_" . $post_type . "_folder", $term->term_id);
57
  }
58
+ if(!isset($type) && $isAjax) {
59
  $termId = get_option("selected_".$post_type."_folder");
60
  $class .= ($termId == $term->term_id)?" active-item active-term":"";
61
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
3
  Tags: folder, folders, organize, pages folders, media library, posts folders, media folders, subfolders, file manager, directories
4
  Requires at least: 3.0.0
5
  Tested up to: 5.2
6
- Stable tag: 2.1.9
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
@@ -127,6 +127,9 @@ A live demo for the Folders plugin is available at <a href="https://demo.premio.
127
 
128
  == Changelog ==
129
 
 
 
 
130
  = 2.1.9 =
131
  * Screen resolution bug fixed
132
 
3
  Tags: folder, folders, organize, pages folders, media library, posts folders, media folders, subfolders, file manager, directories
4
  Requires at least: 3.0.0
5
  Tested up to: 5.2
6
+ Stable tag: 2.2
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
127
 
128
  == Changelog ==
129
 
130
+ = 2.2 =
131
+ * Fixed collapsed menu state bug
132
+
133
  = 2.1.9 =
134
  * Screen resolution bug fixed
135
 
templates/admin/admin-content.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined('ABSPATH') or die('Nope, not accessing this');
3
  ?>
4
  <style>
5
  .ui-state-highlight {
@@ -23,9 +23,11 @@ defined('ABSPATH') or die('Nope, not accessing this');
23
  <?php
24
  $string = "";
25
  for($i=0;$i<=15;$i++) {
26
- $string .= " .space > .route >";
27
- $new_width = $width - (13+(20*$i));
28
- echo "#custom-menu > {$string} .title { width: {$new_width}px !important; } ";
 
 
29
  }
30
  ?>
31
  </style>
@@ -48,20 +50,20 @@ if($typenow == "page") {
48
  $display_status = "wcp_dynamic_display_status_" . $typenow;
49
  $display_status = get_option($display_status);
50
  ?>
51
- <div id="wcp-content" class="<?php echo isset($display_status) && $display_status == "hide"?"hide-folders-area":"" ?>" >
52
  <div id="wcp-content-resize">
53
  <div class="wcp-content">
54
  <div class="wcp-hide-show-buttons">
55
- <div class="toggle-buttons hide-folders <?php echo !isset($display_status) || $display_status != "hide"?"active":"" ?>"><span class="dashicons dashicons-arrow-left"></span></div>
56
- <div class="toggle-buttons show-folders <?php echo isset($display_status) && $display_status == "hide"?"active":"" ?>"><span class="dashicons dashicons-arrow-right"></span></div>
57
  </div>
58
  <div class='wcp-container'>
59
  <?php echo $form_html ?>
60
  <div class="header-posts">
61
- <a href="javascript:;" class="all-posts"><span class="wcp-icon folder-icon-insert_drive_file"></span> <?php echo __("All ".$title, WCP_FOLDER) ?> <span class="total-count"><?php echo $total_posts ?></span></a>
62
  </div>
63
  <div class="un-categorised-items">
64
- <a href="javascript:;" class="un-categorized-posts"><?php echo __("Unassigned ".$title, WCP_FOLDER) ?> <span class="total-count total-empty"><?php echo $total_empty ?></span> </a>
65
  </div>
66
  <div id="custom-menu" class="wcp-custom-menu <?php echo ($status==1)?"active":"" ?>">
67
  <!--<div class="wcp-parent" id="title0"><i class="fa fa-folder-o"></i> All Folders</div>-->
1
  <?php
2
+ defined('ABSPATH') or wp_die('Nope, not accessing this');
3
  ?>
4
  <style>
5
  .ui-state-highlight {
23
  <?php
24
  $string = "";
25
  for($i=0;$i<=15;$i++) {
26
+ $string .= " .space > .route >";
27
+ $new_width = $width - (13+(20*$i));
28
+ ?>
29
+ #custom-menu > <?php echo $string ?> .title { width: <?php echo esc_attr($new_width) ?>px !important; }
30
+ <?php
31
  }
32
  ?>
33
  </style>
50
  $display_status = "wcp_dynamic_display_status_" . $typenow;
51
  $display_status = get_option($display_status);
52
  ?>
53
+ <div id="wcp-content" class="<?php echo esc_attr(isset($display_status) && $display_status == "hide"?"hide-folders-area":"") ?>" >
54
  <div id="wcp-content-resize">
55
  <div class="wcp-content">
56
  <div class="wcp-hide-show-buttons">
57
+ <div class="toggle-buttons hide-folders <?php echo esc_attr(!isset($display_status) || $display_status != "hide"?"active":"") ?>"><span class="dashicons dashicons-arrow-left"></span></div>
58
+ <div class="toggle-buttons show-folders <?php echo esc_attr(isset($display_status) && $display_status == "hide"?"active":"") ?>"><span class="dashicons dashicons-arrow-right"></span></div>
59
  </div>
60
  <div class='wcp-container'>
61
  <?php echo $form_html ?>
62
  <div class="header-posts">
63
+ <a href="javascript:;" class="all-posts"><span class="wcp-icon folder-icon-insert_drive_file"></span> <?php esc_html_e("All ".$title, WCP_FOLDER) ?> <span class="total-count"><?php echo esc_attr($total_posts) ?></span></a>
64
  </div>
65
  <div class="un-categorised-items">
66
+ <a href="javascript:;" class="un-categorized-posts"><?php esc_html_e("Unassigned ".$title, WCP_FOLDER) ?> <span class="total-count total-empty"><?php echo esc_attr($total_empty) ?></span> </a>
67
  </div>
68
  <div id="custom-menu" class="wcp-custom-menu <?php echo ($status==1)?"active":"" ?>">
69
  <!--<div class="wcp-parent" id="title0"><i class="fa fa-folder-o"></i> All Folders</div>-->
templates/admin/folder-deactivate-form.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined('ABSPATH') or die('Nope, not accessing this');
3
  ?>
4
  <style>
5
  .folder-hidden {
@@ -295,30 +295,28 @@ defined('ABSPATH') or die('Nope, not accessing this');
295
  <div class="folder-serveypanel">
296
  <form action="#" method="post" id="folder-deactivate-form">
297
  <div class="folder-popup-header">
298
- <h2><?php _e('Quick feedback about Folders', WCP_FOLDER); ?> 🙏</h2>
299
  </div>
300
  <div class="folder-popup-body">
301
- <h3><?php _e('Your feedback will help us improve the product, please tell us why did you decide to deactivate Folders :)', WCP_FOLDER); ?></h3>
302
  <div class="form-control">
303
  <label></label>
304
- <textarea placeholder="<?php echo _e("Your comment", WCP_FOLDER) ?>" id="folder-comment"></textarea>
305
  </div>
306
- <?php _e("Having any problem with the Folders plugins? <a class='folder-deactivate-button' href='javascript:;'>Click here</a> to contact our support now", WCP_FOLDER) ?>
307
  </div>
308
  <div class="folder-popup-footer">
309
- <label class="folder-anonymous"><input type="checkbox"/><?php _e('Anonymous feedback', WCP_FOLDER); ?>
310
  </label>
311
  <input type="button" class="button button-secondary button-skip folder-popup-skip-feedback"
312
  value="Skip &amp; Deactivate">
313
 
314
  <div class="action-btns">
315
- <span class="folder-spinner"><img src="<?php echo admin_url('/images/spinner.gif'); ?>"
316
- alt=""></span>
317
- <input type="submit" class="button button-secondary button-deactivate folder-popup-allow-deactivate"
318
- value="Submit &amp; Deactivate" disabled="disabled">
319
- <a href="#"
320
- class="button button-primary folder-popup-button-close"><?php _e('Cancel', WCP_FOLDER); ?></a>
321
-
322
  </div>
323
  </div>
324
  </form>
@@ -376,7 +374,7 @@ defined('ABSPATH') or die('Nope, not accessing this');
376
  data: {
377
  action: 'folder_plugin_deactivate',
378
  reason: _reason,
379
- nonce: '<?php echo wp_create_nonce('wcp_folder_deactivate_nonce') ?>'
380
  },
381
  beforeSend: function () {
382
  $(".folder-spinner").show();
1
  <?php
2
+ defined('ABSPATH') or wp_die('Nope, not accessing this');
3
  ?>
4
  <style>
5
  .folder-hidden {
295
  <div class="folder-serveypanel">
296
  <form action="#" method="post" id="folder-deactivate-form">
297
  <div class="folder-popup-header">
298
+ <h2><?php esc_html_e('Quick feedback about Folders', WCP_FOLDER); ?> 🙏</h2>
299
  </div>
300
  <div class="folder-popup-body">
301
+ <h3><?php esc_html_e('Your feedback will help us improve the product, please tell us why did you decide to deactivate Folders :)', WCP_FOLDER); ?></h3>
302
  <div class="form-control">
303
  <label></label>
304
+ <textarea placeholder="<?php esc_html_e("Your comment", WCP_FOLDER) ?>" id="folder-comment"></textarea>
305
  </div>
306
+ <?php esc_html_e("Having any problem with the Folders plugins?", WCP_FOLDER) ?><a class='folder-deactivate-button' href='javascript:;'><?php esc_html_e("Click here", WCP_FOLDER) ?></a><?php esc_html_e(" to contact our support now", WCP_FOLDER) ?>
307
  </div>
308
  <div class="folder-popup-footer">
309
+ <label class="folder-anonymous"><input type="checkbox"/><?php esc_html_e('Anonymous feedback', WCP_FOLDER); ?>
310
  </label>
311
  <input type="button" class="button button-secondary button-skip folder-popup-skip-feedback"
312
  value="Skip &amp; Deactivate">
313
 
314
  <div class="action-btns">
315
+ <span class="folder-spinner">
316
+ <img src="<?php echo esc_url(admin_url('/images/spinner.gif')); ?>" alt="">
317
+ </span>
318
+ <input type="submit" class="button button-secondary button-deactivate folder-popup-allow-deactivate" value="Submit &amp; Deactivate" disabled="disabled">
319
+ <a href="#" class="button button-primary folder-popup-button-close"><?php esc_html_e('Cancel', WCP_FOLDER); ?></a>
 
 
320
  </div>
321
  </div>
322
  </form>
374
  data: {
375
  action: 'folder_plugin_deactivate',
376
  reason: _reason,
377
+ nonce: '<?php echo esc_attr(wp_create_nonce('wcp_folder_deactivate_nonce')) ?>'
378
  },
379
  beforeSend: function () {
380
  $(".folder-spinner").show();
templates/admin/general-settings.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- defined('ABSPATH') or die('Nope, not accessing this');
3
  ?>
4
  <style>
5
  span.upgrade-message {
@@ -25,7 +25,7 @@ defined('ABSPATH') or die('Nope, not accessing this');
25
  <?php } ?>
26
  </style>
27
  <div class="wrap">
28
- <h1><?php _e( 'Folders Settings', WCP_FOLDER ); ?></h1>
29
  <form action="options.php" method="post" id="setting-form">
30
  <?php
31
  settings_fields( 'folders_settings' );
@@ -43,26 +43,26 @@ defined('ABSPATH') or die('Nope, not accessing this');
43
  ?>
44
  <tr>
45
  <th>
46
- <label for="folders_<?php echo $post_type->name; ?>" ><?php echo __( 'Use folders with:', WCP_FOLDER )." ".$post_type->label; ?></label>
47
  </th>
48
  <td>
49
- <input type="checkbox" id="folders_<?php echo $post_type->name; ?>" name="folders_settings[]" value="<?php echo $post_type->name; ?>"<?php if ( in_array( $post_type->name, $options ) ) echo ' checked="checked"'; ?>/>
50
  </td>
51
  </tr>
52
  <?php
53
  } else { ?>
54
  <tr>
55
  <th>
56
- <label for="folders_<?php echo $post_type->name; ?>" ><?php echo __( 'Use folders with:', WCP_FOLDER )." ".$post_type->label; ?></label>
57
  </th>
58
  <td>
59
- <input type="checkbox" id="folders_<?php echo $post_type->name; ?>" name="folders_settings[]" value="<?php echo $post_type->name; ?>"<?php if ( in_array( $post_type->name, $options ) ) echo ' checked="checked"'; ?>/>
60
  </td>
61
  </tr>
62
  <?php } endforeach; ?>
63
  <tr>
64
  <th>
65
- <label for="folders_<?php echo $post_type->name; ?>" ><?php echo __( 'Show Folders in Menu:', WCP_FOLDER ); ?></label>
66
  </th>
67
  <td>
68
  <?php $val = get_option("folders_show_in_menu"); ?>
@@ -82,7 +82,7 @@ defined('ABSPATH') or die('Nope, not accessing this');
82
  $total_folders = $total;
83
  }
84
  ?>
85
- <span class="upgrade-message">You have used <?php echo "<span class='pink'>".$total."</span>/".$total_folders ?> Folders. <a class="pink" href="<?php echo admin_url("admin.php?page=wcp_folders_upgrade") ?>"><?php echo __("Upgrade", WCP_FOLDER) ?></a></span>
86
  </td>
87
  </tr>
88
  </table>
1
  <?php
2
+ defined('ABSPATH') or wp_die('Nope, not accessing this');
3
  ?>
4
  <style>
5
  span.upgrade-message {
25
  <?php } ?>
26
  </style>
27
  <div class="wrap">
28
+ <h1><?php esc_attr_e( 'Folders Settings', WCP_FOLDER ); ?></h1>
29
  <form action="options.php" method="post" id="setting-form">
30
  <?php
31
  settings_fields( 'folders_settings' );
43
  ?>
44
  <tr>
45
  <th>
46
+ <label for="folders_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Use folders with:', WCP_FOLDER )." ".$post_type->label; ?></label>
47
  </th>
48
  <td>
49
+ <input type="checkbox" id="folders_<?php echo esc_attr($post_type->name); ?>" name="folders_settings[]" value="<?php echo esc_attr($post_type->name); ?>"<?php if ( in_array( $post_type->name, $options ) ) echo ' checked="checked"'; ?>/>
50
  </td>
51
  </tr>
52
  <?php
53
  } else { ?>
54
  <tr>
55
  <th>
56
+ <label for="folders_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Use folders with:', WCP_FOLDER )." ".$post_type->label; ?></label>
57
  </th>
58
  <td>
59
+ <input type="checkbox" id="folders_<?php echo esc_attr($post_type->name); ?>" name="folders_settings[]" value="<?php echo esc_attr($post_type->name); ?>"<?php if ( in_array( $post_type->name, $options ) ) echo ' checked="checked"'; ?>/>
60
  </td>
61
  </tr>
62
  <?php } endforeach; ?>
63
  <tr>
64
  <th>
65
+ <label for="folders_<?php echo esc_attr($post_type->name); ?>" ><?php esc_html_e( 'Show Folders in Menu:', WCP_FOLDER ); ?></label>
66
  </th>
67
  <td>
68
  <?php $val = get_option("folders_show_in_menu"); ?>
82
  $total_folders = $total;
83
  }
84
  ?>
85
+ <span class="upgrade-message">You have used <span class='pink'><?php echo esc_attr($total) ?></span>/<?php echo esc_attr($total_folders) ?> Folders. <a class="pink" href="<?php echo esc_url(admin_url("admin.php?page=wcp_folders_upgrade")) ?>"><?php esc_html_e("Upgrade", WCP_FOLDER) ?></a></span>
86
  </td>
87
  </tr>
88
  </table>
templates/admin/help.php CHANGED
@@ -1,38 +1,38 @@
1
  <?php
2
- defined('ABSPATH') or die('Nope, not accessing this');
3
  ?>
4
  <div class="folder-help-form">
5
- <form action="<?php echo admin_url( 'admin-ajax.php' ) ?>" method="post" id="folder-help-form">
6
  <div class="folder-help-header">
7
  <b>Gal Dubinski</b> Co-Founder at Premio
8
  </div>
9
  <div class="folder-help-content">
10
- <p><?php echo __("Hello! Are you experiencing any problems with Folders? Please let me know :)", WCP_FOLDER) ?></p>
11
  <div class="folder-form-field">
12
- <input type="text" name="user_email" id="user_email" placeholder="<?php echo __("Email", WCP_FOLDER) ?>">
13
  </div>
14
  <div class="folder-form-field">
15
- <textarea type="text" name="textarea_text" id="textarea_text" placeholder="<?php echo __("How can I help you?", WCP_FOLDER) ?>"></textarea>
16
  </div>
17
  <div class="form-button">
18
- <button type="submit" class="folder-help-button" ><?php echo __("Chat") ?></button>
19
  <input type="hidden" name="action" value="wcp_folder_send_message_to_owner" >
20
- <input type="hidden" id="folder_help_nonce" name="folder_help_nonce" value="<?php echo wp_create_nonce('wcp_folder_help_nonce') ?>" >
21
  </div>
22
  </div>
23
  </form>
24
  </div>
25
  <div class="folder-help-btn">
26
- <a class="folder-help-tooltip" href="javascript:;"><img src="<?php echo WCP_FOLDER_URL ?>assets/images/owner.png" alt="<?php echo __("Need help?", WCP_FOLDER) ?>" /></a>
27
  </div>
28
  <script>
29
  jQuery(document).ready(function(){
30
  jQuery("#folder-help-form").submit(function(){
31
  jQuery(".folder-help-button").attr("disabled",true);
32
- jQuery(".folder-help-button").text("<?php echo __("Sending Request...") ?>");
33
  formData = jQuery(this).serialize();
34
  jQuery.ajax({
35
- url: "<?php echo admin_url( 'admin-ajax.php' ) ?>",
36
  data: formData,
37
  type: "post",
38
  success: function(responseText){
@@ -42,19 +42,19 @@ defined('ABSPATH') or die('Nope, not accessing this');
42
  responseArray = jQuery.parseJSON(responseText);
43
  if(responseArray.error == 1) {
44
  jQuery(".folder-help-button").attr("disabled",false);
45
- jQuery(".folder-help-button").text("<?php echo __("Chat", WCP_FOLDER) ?>");
46
  for(i=0;i<responseArray.errors.length;i++) {
47
  jQuery("#"+responseArray.errors[i]['key']).addClass("input-error");
48
  jQuery("#"+responseArray.errors[i]['key']).after('<span class="error-message">'+responseArray.errors[i]['message']+'</span>');
49
  }
50
  } else if(responseArray.status == 1) {
51
- jQuery(".folder-help-button").text("<?php echo __("Done!", WCP_FOLDER) ?>");
52
  setTimeout(function(){
53
  jQuery(".folder-help-header").remove();
54
- jQuery(".folder-help-content").html("<p class='success-p'><?php echo __("Your message is sent successfully.", WCP_FOLDER) ?></p>");
55
  },1000);
56
  } else if(responseArray.status == 0) {
57
- jQuery(".folder-help-content").html("<p class='error-p'><?php echo __("There is some problem in sending request. Please send us mail on <a href='mailto:contact@premio.io'>contact@premio.io</a>", WCP_FOLDER) ?></p>");
58
  }
59
  }
60
  });
1
  <?php
2
+ defined('ABSPATH') or wp_die('Nope, not accessing this');
3
  ?>
4
  <div class="folder-help-form">
5
+ <form action="<?php echo esc_url(admin_url( 'admin-ajax.php' )) ?>" method="post" id="folder-help-form">
6
  <div class="folder-help-header">
7
  <b>Gal Dubinski</b> Co-Founder at Premio
8
  </div>
9
  <div class="folder-help-content">
10
+ <p><?php esc_html_e("Hello! Are you experiencing any problems with Folders? Please let me know :)", WCP_FOLDER) ?></p>
11
  <div class="folder-form-field">
12
+ <input type="text" name="user_email" id="user_email" placeholder="<?php esc_html_e("Email", WCP_FOLDER) ?>">
13
  </div>
14
  <div class="folder-form-field">
15
+ <textarea type="text" name="textarea_text" id="textarea_text" placeholder="<?php esc_html_e("How can I help you?", WCP_FOLDER) ?>"></textarea>
16
  </div>
17
  <div class="form-button">
18
+ <button type="submit" class="folder-help-button" ><?php esc_html_e("Chat") ?></button>
19
  <input type="hidden" name="action" value="wcp_folder_send_message_to_owner" >
20
+ <input type="hidden" id="folder_help_nonce" name="folder_help_nonce" value="<?php echo esc_attr(wp_create_nonce('wcp_folder_help_nonce')) ?>" >
21
  </div>
22
  </div>
23
  </form>
24
  </div>
25
  <div class="folder-help-btn">
26
+ <a class="folder-help-tooltip" href="javascript:;"><img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/owner.png") ?>" alt="<?php esc_html_e("Need help?", WCP_FOLDER) ?>" /></a>
27
  </div>
28
  <script>
29
  jQuery(document).ready(function(){
30
  jQuery("#folder-help-form").submit(function(){
31
  jQuery(".folder-help-button").attr("disabled",true);
32
+ jQuery(".folder-help-button").text("<?php esc_html_e("Sending Request...") ?>");
33
  formData = jQuery(this).serialize();
34
  jQuery.ajax({
35
+ url: "<?php echo esc_url(admin_url( 'admin-ajax.php' )) ?>",
36
  data: formData,
37
  type: "post",
38
  success: function(responseText){
42
  responseArray = jQuery.parseJSON(responseText);
43
  if(responseArray.error == 1) {
44
  jQuery(".folder-help-button").attr("disabled",false);
45
+ jQuery(".folder-help-button").text("<?php esc_html_e("Chat", WCP_FOLDER) ?>");
46
  for(i=0;i<responseArray.errors.length;i++) {
47
  jQuery("#"+responseArray.errors[i]['key']).addClass("input-error");
48
  jQuery("#"+responseArray.errors[i]['key']).after('<span class="error-message">'+responseArray.errors[i]['message']+'</span>');
49
  }
50
  } else if(responseArray.status == 1) {
51
+ jQuery(".folder-help-button").text("<?php esc_html_e("Done!", WCP_FOLDER) ?>");
52
  setTimeout(function(){
53
  jQuery(".folder-help-header").remove();
54
+ jQuery(".folder-help-content").html("<p class='success-p'><?php esc_html_e("Your message is sent successfully.", WCP_FOLDER) ?></p>");
55
  },1000);
56
  } else if(responseArray.status == 0) {
57
+ jQuery(".folder-help-content").html("<p class='error-p'><?php esc_html_e("There is some problem in sending request. Please send us mail on <a href='mailto:contact@premio.io'>contact@premio.io</a>", WCP_FOLDER) ?></p>");
58
  }
59
  }
60
  });
templates/admin/upgrade-to-pro.php CHANGED
@@ -1,32 +1,32 @@
1
  <?php
2
- defined('ABSPATH') or die('Nope, not accessing this');
3
- $pro_url = $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=";
4
  ?>
5
- <link href="<?php echo WCP_FOLDER_URL ?>assets/css/admin-setting.css" type="text/css" rel="stylesheet" />
6
  <div class="wrap">
7
  <div class="key-table">
8
  <div class="modal-upgrade upgrade-block" id="folder-modal">
9
  <div class="easy-modal-inner">
10
  <div class="modal__wrap">
11
- <p class="udner-title"> <strong class="text-primary"><?php _e('Unlock All Features', WCP_FOLDER); ?></strong> </p>
12
  <div id="rpt_pricr" class="rpt_plans rpt_3_plans rpt_style_basic">
13
  <div class="">
14
  <div class="rpt_plan rpt_plan_0 ">
15
  <div style="text-align:left;" class="rpt_title rpt_title_0">Basic</div>
16
  <div class="rpt_head rpt_head_0">
17
  <div class="rpt_description rpt_description_0">
18
- <?php _e('For small website owners', WCP_FOLDER); ?>
19
  </div>
20
  <div class="rpt_price rpt_price_0">$19</div>
21
  <div class="rpt_description rpt_description_0 rpt_desc">
22
- <?php _e('Per year. Renewals for 25% off', WCP_FOLDER); ?>
23
  </div>
24
  <div style="clear:both;"></div>
25
  </div>
26
  <div class="rpt_features rpt_features_0">
27
- <div class="rpt_feature rpt_feature_0-0"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b><?php _e('Use Folders on 1 domain', WCP_FOLDER); ?></span><?php _e('1 website', WCP_FOLDER); ?> <span class="rpt_tooltip_plus"> +</span></a> </div>
28
  <div class="rpt_feature rpt_feature_1-1">
29
- <?php _e('Organize Pages, Posts and Media files', WCP_FOLDER); ?>
30
  </div>
31
  <div class="rpt_feature rpt_feature_0-2"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can add unlimited pages, posts and media files to your folders</span>Unlimited files<span class="rpt_tooltip_plus"> +</span></a></div>
32
  <div class="rpt_feature rpt_feature_0-3"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can create additional 2 tires of sub-folders</span>Sub-folders<span class="rpt_tooltip_plus"> +</span></a></div>
@@ -47,25 +47,25 @@ $pro_url = $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=
47
  </div>
48
  <div style="clear:both;"></div>
49
  <a target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options[price_id]=1" class="rpt_foot rpt_foot_0">
50
- <?php _e('Buy now', WCP_FOLDER); ?>
51
  </a>
52
  </div>
53
  <div class="rpt_plan rpt_plan_1 rpt_recommended_plan ">
54
- <div style="text-align:left;" class="rpt_title rpt_title_1">Pro<img class="rpt_recommended" src="<?php echo WCP_FOLDER_URL ?>assets/images/rpt_recommended.png" style="top: 27px;"></div>
55
  <div class="rpt_head rpt_head_1">
56
  <div class="rpt_description rpt_description_1">
57
- <?php _e('For businesses with multiple websites', WCP_FOLDER); ?>
58
  </div>
59
  <div class="rpt_price rpt_price_1">$39</div>
60
  <div class="rpt_description rpt_description_0 rpt_desc">
61
- <?php _e('Per year. Renewals for 25% off', WCP_FOLDER); ?>
62
  </div>
63
  <div style="clear:both;"></div>
64
  </div>
65
  <div class="rpt_features rpt_features_1">
66
- <div class="rpt_feature rpt_feature_1-0"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b><?php _e('Use Folders on 5 domains', WCP_FOLDER); ?></span><?php _e('5 website', WCP_FOLDER); ?> <span class="rpt_tooltip_plus"> +</span></a> </div>
67
  <div class="rpt_feature rpt_feature_1-1">
68
- <?php _e('Organize Pages, Posts and Media files', WCP_FOLDER); ?>
69
  </div>
70
  <div class="rpt_feature rpt_feature_0-2"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can add unlimited pages, posts and media files to your folders</span>Unlimited files<span class="rpt_tooltip_plus"> +</span></a></div>
71
  <div class="rpt_feature rpt_feature_0-3"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can create additional 2 tires of sub-folders</span>Sub-folders<span class="rpt_tooltip_plus"> +</span></a></div>
@@ -86,27 +86,27 @@ $pro_url = $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=
86
  </div>
87
  <div style="clear:both;"></div>
88
  <a target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options[price_id]=2" class="rpt_foot rpt_foot_1">
89
- <?php _e('Buy now', WCP_FOLDER); ?>
90
  </a>
91
  </div>
92
  <div class="rpt_plan rpt_plan_2 ">
93
  <div style="text-align:left;" class="rpt_title rpt_title_2">
94
- <?php _e('Agency', WCP_FOLDER); ?>
95
  </div>
96
  <div class="rpt_head rpt_head_2">
97
  <div class="rpt_description rpt_description_2">
98
- <?php _e('For agencies who manage clients', WCP_FOLDER); ?>
99
  </div>
100
  <div class="rpt_price rpt_price_2">$79</div>
101
  <div class="rpt_description rpt_description_0 rpt_desc">
102
- <?php _e('Per year. Renewals for 25% off', WCP_FOLDER); ?>
103
  </div>
104
  <div style="clear:both;"></div>
105
  </div>
106
  <div class="rpt_features rpt_features_2">
107
- <div class="rpt_feature rpt_feature_2-0"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b><?php _e('Use Folders on 20 domains', WCP_FOLDER); ?></span><?php _e('20 website', WCP_FOLDER); ?> <span class="rpt_tooltip_plus"> +</span></a> </div>
108
  <div class="rpt_feature rpt_feature_1-1">
109
- <?php _e('Organize Pages, Posts and Media files', WCP_FOLDER); ?>
110
  </div>
111
  <div class="rpt_feature rpt_feature_0-2"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can add unlimited pages, posts and media files to your folders</span>Unlimited files<span class="rpt_tooltip_plus"> +</span></a></div>
112
  <div class="rpt_feature rpt_feature_0-3"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can create additional 2 tires of sub-folders</span>Sub-folders<span class="rpt_tooltip_plus"> +</span></a></div>
@@ -127,7 +127,7 @@ $pro_url = $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=
127
  </div>
128
  <div style="clear:both;"></div>
129
  <a target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options[price_id]=3" class="rpt_foot rpt_foot_2">
130
- <?php _e('Buy now', WCP_FOLDER); ?>
131
  </a>
132
  </div>
133
  </div>
@@ -136,19 +136,19 @@ $pro_url = $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=
136
  <div class="text-center">
137
  <form method="post" action="https://www.paypal.com/cgi-bin/webscr">
138
  <p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
139
- <?php _e("30 days money back guaranteed", WCP_FOLDER); ?>
140
  </p>
141
  <p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
142
- <?php _e("The plugin will always keep working even if you don't renew your license", WCP_FOLDER); ?>
143
  </p>
144
  </form>
145
  <div class="payments">
146
- <img src="<?php echo WCP_FOLDER_URL ?>assets/images/payment.png" alt="Payment" class="payment-img" />
147
  </div>
148
  </div>
149
  <div class="folder-testimonial-list">
150
  <div class="folder-testimonial">
151
- <div class="testimonial-image"> <img src="<?php echo WCP_FOLDER_URL ?>assets/images/client-image.jpg"> </div>
152
  <div class="testimonial-data">
153
  <div class="testimonial-title">A brilliant solution!</div>
154
  <div class="testimonial-desc">I’ve used other folder plug-ins for my WordPress media files, but Folders is better than any of them. An uncluttered interface, intuitive to use, allows drag-and-drop and allows subfolders: exactly what I needed in a media library folder plug-in. I can’t believe it’s free!</div>
1
  <?php
2
+ defined('ABSPATH') or wp_die('Nope, not accessing this');
3
+ $pro_url = "https://go.premio.io/?edd_action=add_to_cart&download_id=687&edd_options[price_id]=";
4
  ?>
5
+ <link href="<?php echo esc_url(WCP_FOLDER_URL."assets/css/admin-setting.css") ?>" type="text/css" rel="stylesheet" />
6
  <div class="wrap">
7
  <div class="key-table">
8
  <div class="modal-upgrade upgrade-block" id="folder-modal">
9
  <div class="easy-modal-inner">
10
  <div class="modal__wrap">
11
+ <p class="udner-title"> <strong class="text-primary"><?php esc_html_e('Unlock All Features', WCP_FOLDER); ?></strong> </p>
12
  <div id="rpt_pricr" class="rpt_plans rpt_3_plans rpt_style_basic">
13
  <div class="">
14
  <div class="rpt_plan rpt_plan_0 ">
15
  <div style="text-align:left;" class="rpt_title rpt_title_0">Basic</div>
16
  <div class="rpt_head rpt_head_0">
17
  <div class="rpt_description rpt_description_0">
18
+ <?php esc_html_e('For small website owners', WCP_FOLDER); ?>
19
  </div>
20
  <div class="rpt_price rpt_price_0">$19</div>
21
  <div class="rpt_description rpt_description_0 rpt_desc">
22
+ <?php esc_html_e('Per year. Renewals for 25% off', WCP_FOLDER); ?>
23
  </div>
24
  <div style="clear:both;"></div>
25
  </div>
26
  <div class="rpt_features rpt_features_0">
27
+ <div class="rpt_feature rpt_feature_0-0"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b><?php esc_html_e('Use Folders on 1 domain', WCP_FOLDER); ?></span><?php esc_html_e('1 website', WCP_FOLDER); ?> <span class="rpt_tooltip_plus"> +</span></a> </div>
28
  <div class="rpt_feature rpt_feature_1-1">
29
+ <?php esc_html_e('Organize Pages, Posts and Media files', WCP_FOLDER); ?>
30
  </div>
31
  <div class="rpt_feature rpt_feature_0-2"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can add unlimited pages, posts and media files to your folders</span>Unlimited files<span class="rpt_tooltip_plus"> +</span></a></div>
32
  <div class="rpt_feature rpt_feature_0-3"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can create additional 2 tires of sub-folders</span>Sub-folders<span class="rpt_tooltip_plus"> +</span></a></div>
47
  </div>
48
  <div style="clear:both;"></div>
49
  <a target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options[price_id]=1" class="rpt_foot rpt_foot_0">
50
+ <?php esc_html_e('Buy now', WCP_FOLDER); ?>
51
  </a>
52
  </div>
53
  <div class="rpt_plan rpt_plan_1 rpt_recommended_plan ">
54
+ <div style="text-align:left;" class="rpt_title rpt_title_1">Pro<img class="rpt_recommended" src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/rpt_recommended.png") ?>" style="top: 27px;"></div>
55
  <div class="rpt_head rpt_head_1">
56
  <div class="rpt_description rpt_description_1">
57
+ <?php esc_html_e('For businesses with multiple websites', WCP_FOLDER); ?>
58
  </div>
59
  <div class="rpt_price rpt_price_1">$39</div>
60
  <div class="rpt_description rpt_description_0 rpt_desc">
61
+ <?php esc_html_e('Per year. Renewals for 25% off', WCP_FOLDER); ?>
62
  </div>
63
  <div style="clear:both;"></div>
64
  </div>
65
  <div class="rpt_features rpt_features_1">
66
+ <div class="rpt_feature rpt_feature_1-0"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b><?php esc_html_e('Use Folders on 5 domains', WCP_FOLDER); ?></span><?php esc_html_e('5 website', WCP_FOLDER); ?><span class="rpt_tooltip_plus"> +</span></a> </div>
67
  <div class="rpt_feature rpt_feature_1-1">
68
+ <?php esc_html_e('Organize Pages, Posts and Media files', WCP_FOLDER); ?>
69
  </div>
70
  <div class="rpt_feature rpt_feature_0-2"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can add unlimited pages, posts and media files to your folders</span>Unlimited files<span class="rpt_tooltip_plus"> +</span></a></div>
71
  <div class="rpt_feature rpt_feature_0-3"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can create additional 2 tires of sub-folders</span>Sub-folders<span class="rpt_tooltip_plus"> +</span></a></div>
86
  </div>
87
  <div style="clear:both;"></div>
88
  <a target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options[price_id]=2" class="rpt_foot rpt_foot_1">
89
+ <?php esc_html_e('Buy now', WCP_FOLDER); ?>
90
  </a>
91
  </div>
92
  <div class="rpt_plan rpt_plan_2 ">
93
  <div style="text-align:left;" class="rpt_title rpt_title_2">
94
+ <?php esc_html_e('Agency', WCP_FOLDER); ?>
95
  </div>
96
  <div class="rpt_head rpt_head_2">
97
  <div class="rpt_description rpt_description_2">
98
+ <?php esc_html_e('For agencies who manage clients', WCP_FOLDER); ?>
99
  </div>
100
  <div class="rpt_price rpt_price_2">$79</div>
101
  <div class="rpt_description rpt_description_0 rpt_desc">
102
+ <?php esc_html_e('Per year. Renewals for 25% off', WCP_FOLDER); ?>
103
  </div>
104
  <div style="clear:both;"></div>
105
  </div>
106
  <div class="rpt_features rpt_features_2">
107
+ <div class="rpt_feature rpt_feature_2-0"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b><?php esc_html_e('Use Folders on 20 domains', WCP_FOLDER); ?></span><?php esc_html_e('20 website', WCP_FOLDER); ?> <span class="rpt_tooltip_plus"> +</span></a> </div>
108
  <div class="rpt_feature rpt_feature_1-1">
109
+ <?php esc_html_e('Organize Pages, Posts and Media files', WCP_FOLDER); ?>
110
  </div>
111
  <div class="rpt_feature rpt_feature_0-2"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can add unlimited pages, posts and media files to your folders</span>Unlimited files<span class="rpt_tooltip_plus"> +</span></a></div>
112
  <div class="rpt_feature rpt_feature_0-3"><a href="javascript:void(0)" class="rpt_tooltip"><span class="intool"><b></b>You can create additional 2 tires of sub-folders</span>Sub-folders<span class="rpt_tooltip_plus"> +</span></a></div>
127
  </div>
128
  <div style="clear:both;"></div>
129
  <a target="_blank" href="https://go.premio.io/?edd_action=add_to_cart&amp;download_id=687&amp;edd_options[price_id]=3" class="rpt_foot rpt_foot_2">
130
+ <?php esc_html_e('Buy now', WCP_FOLDER); ?>
131
  </a>
132
  </div>
133
  </div>
136
  <div class="text-center">
137
  <form method="post" action="https://www.paypal.com/cgi-bin/webscr">
138
  <p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
139
+ <?php esc_html_e("30 days money back guaranteed", WCP_FOLDER); ?>
140
  </p>
141
  <p class="money-guaranteed"><span class="dashicons dashicons-yes"></span>
142
+ <?php esc_html_e("The plugin will always keep working even if you don't renew your license", WCP_FOLDER); ?>
143
  </p>
144
  </form>
145
  <div class="payments">
146
+ <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/payment.png") ?>" alt="Payment" class="payment-img" />
147
  </div>
148
  </div>
149
  <div class="folder-testimonial-list">
150
  <div class="folder-testimonial">
151
+ <div class="testimonial-image"> <img src="<?php echo esc_url(WCP_FOLDER_URL."assets/images/client-image.jpg") ?>"> </div>
152
  <div class="testimonial-data">
153
  <div class="testimonial-title">A brilliant solution!</div>
154
  <div class="testimonial-desc">I’ve used other folder plug-ins for my WordPress media files, but Folders is better than any of them. An uncluttered interface, intuitive to use, allows drag-and-drop and allows subfolders: exactly what I needed in a media library folder plug-in. I can’t believe it’s free!</div>