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

Version Description

The Add new page of the media library is not connected to Folders

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.4.9
Comparing to
See all releases

Code changes from version 2.4.8 to 2.4.9

assets/js/new-media.js ADDED
@@ -0,0 +1 @@
 
1
+ var folders_media={addMedia:function(){jQuery("body").hasClass("media-new-php")&&setTimeout(function(){"undefined"!=typeof uploader&&jQuery(".folder_for_media").length&&uploader&&uploader.bind("BeforeUpload",function(e,d){e.settings.multipart_params.folder_for_media=jQuery(".folder_for_media").val(),jQuery("#media-item-"+d.id).find(".filename")})}.bind(this),500)}};jQuery(document).ready(function(){folders_media.addMedia()});
folders.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
- * Version: 2.4.8
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  * Text Domain: folders
@@ -30,7 +30,7 @@ if(!defined("WCP_FOLDER_URL")) {
30
  define('WCP_FOLDER_URL', plugin_dir_url(__FILE__));
31
  }
32
  if(!defined("WCP_FOLDER_VERSION")) {
33
- define('WCP_FOLDER_VERSION', "2.4.8");
34
  }
35
 
36
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
+ * Version: 2.4.9
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  * Text Domain: folders
30
  define('WCP_FOLDER_URL', plugin_dir_url(__FILE__));
31
  }
32
  if(!defined("WCP_FOLDER_VERSION")) {
33
+ define('WCP_FOLDER_VERSION', "2.4.9");
34
  }
35
 
36
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
includes/folders.class.php CHANGED
@@ -692,6 +692,7 @@ class WCP_Folders
692
  $options = get_option('folders_settings');
693
  $options = (empty($options) || !is_array($options))?array():$options;
694
  $last_status = get_option("last_folder_status_for".$typenow);
 
695
  if(!$isAjax && (in_array($typenow, $options) || !empty($last_status)) && (isset($current_screen->base) && ($current_screen->base == "edit" || ($current_screen->base == "upload")))) {
696
 
697
  $default_folders = get_option('default_folders');
@@ -1925,6 +1926,8 @@ class WCP_Folders
1925
  return true;
1926
  }
1927
  }
 
 
1928
  return false;
1929
  }
1930
 
@@ -2337,7 +2340,7 @@ class WCP_Folders
2337
  }
2338
  }
2339
 
2340
- function folders_admin_scripts()
2341
  {
2342
  if (self::is_active_for_screen()) {
2343
  global $typenow;
@@ -2419,6 +2422,12 @@ class WCP_Folders
2419
  } else {
2420
  self::is_add_update_screen();
2421
  }
 
 
 
 
 
 
2422
  }
2423
 
2424
  public function plugin_action_links($links)
692
  $options = get_option('folders_settings');
693
  $options = (empty($options) || !is_array($options))?array():$options;
694
  $last_status = get_option("last_folder_status_for".$typenow);
695
+
696
  if(!$isAjax && (in_array($typenow, $options) || !empty($last_status)) && (isset($current_screen->base) && ($current_screen->base == "edit" || ($current_screen->base == "upload")))) {
697
 
698
  $default_folders = get_option('default_folders');
1926
  return true;
1927
  }
1928
  }
1929
+
1930
+
1931
  return false;
1932
  }
1933
 
2340
  }
2341
  }
2342
 
2343
+ function folders_admin_scripts($hook)
2344
  {
2345
  if (self::is_active_for_screen()) {
2346
  global $typenow;
2422
  } else {
2423
  self::is_add_update_screen();
2424
  }
2425
+
2426
+ if($hook == "media-new.php") {
2427
+ if(self::is_for_this_post_type('attachment') || self::is_for_this_post_type('media')) {
2428
+ wp_enqueue_script('wcp-folders-add-new-media', plugin_dir_url(dirname(__FILE__)) . 'assets/js/new-media.js', array('jquery'), WCP_FOLDER_VERSION);
2429
+ }
2430
+ }
2431
  }
2432
 
2433
  public function plugin_action_links($links)
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.4
6
- Stable tag: 2.4.8
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.
@@ -156,6 +156,9 @@ A live demo for the Folders plugin is available at <a href="https://demo.premio.
156
 
157
  == Changelog ==
158
 
 
 
 
159
  = 2.4.8 =
160
  Update issue fixed
161
 
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.4
6
+ Stable tag: 2.4.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.
156
 
157
  == Changelog ==
158
 
159
+ = 2.4.9 =
160
+ The Add new page of the media library is not connected to Folders
161
+
162
  = 2.4.8 =
163
  Update issue fixed
164