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

Version Description

Fixed php warnings for php higher version than 5.4

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

Code changes from version 2.0.2 to 2.0.3

Files changed (3) hide show
  1. folders.php +1 -1
  2. includes/folders.class.php +7 -0
  3. readme.txt +4 -1
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.0.2
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  */
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
+ * Version: 2.0.3
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  */
includes/folders.class.php CHANGED
@@ -89,6 +89,7 @@ class WCP_Folders
89
  public function total_term_folders()
90
  {
91
  $post_types = get_option(WCP_FOLDER_VAR);
 
92
  $total = 0;
93
  foreach ($post_types as $post_type) {
94
  $post_type = self::get_custom_post_type($post_type);
@@ -509,6 +510,7 @@ class WCP_Folders
509
  public function is_for_this_post_type($post_type)
510
  {
511
  $post_types = get_option(WCP_FOLDER_VAR);
 
512
  return in_array($post_type, $post_types);
513
  }
514
 
@@ -527,6 +529,7 @@ class WCP_Folders
527
  }
528
 
529
  $post_types = get_option(WCP_FOLDER_VAR);
 
530
 
531
  if(empty($typenow) && 'upload' == $current_screen->base ) {
532
  $typenow = "attachment";
@@ -543,6 +546,7 @@ class WCP_Folders
543
  $current_type = $current_screen->base;
544
  $action = $current_screen->action;
545
  $post_types = get_option(WCP_FOLDER_VAR);
 
546
  global $typenow;
547
  if (in_array($current_type, $post_types) && in_array($action, array("add", ""))) {
548
  $license_data = self::get_license_key_data();
@@ -632,6 +636,7 @@ class WCP_Folders
632
  public function create_folder_terms()
633
  {
634
  $options = get_option(WCP_FOLDER_VAR);
 
635
  $old_plugin_status = 0;
636
  $posts = array();
637
  if (!empty($options)) {
@@ -967,6 +972,7 @@ class WCP_Folders
967
 
968
  public function check_and_set_post_type() {
969
  $options = get_option(WCP_FOLDER_VAR);
 
970
  $old_plugin_status = 0;
971
  $post_array = array();
972
  if (!empty($options)) {
@@ -1138,6 +1144,7 @@ class WCP_Folders
1138
  public function set_default_values_if_not_exists()
1139
  {
1140
  $options = get_option(WCP_FOLDER_VAR);
 
1141
  foreach ($options as $option) {
1142
  $post_type = self::get_custom_post_type($option);
1143
  $terms = get_terms($post_type, array(
89
  public function total_term_folders()
90
  {
91
  $post_types = get_option(WCP_FOLDER_VAR);
92
+ $post_types = is_array($post_types)?$post_types:array();
93
  $total = 0;
94
  foreach ($post_types as $post_type) {
95
  $post_type = self::get_custom_post_type($post_type);
510
  public function is_for_this_post_type($post_type)
511
  {
512
  $post_types = get_option(WCP_FOLDER_VAR);
513
+ $post_types = is_array($post_types)?$post_types:array();
514
  return in_array($post_type, $post_types);
515
  }
516
 
529
  }
530
 
531
  $post_types = get_option(WCP_FOLDER_VAR);
532
+ $post_types = is_array($post_types)?$post_types:array();
533
 
534
  if(empty($typenow) && 'upload' == $current_screen->base ) {
535
  $typenow = "attachment";
546
  $current_type = $current_screen->base;
547
  $action = $current_screen->action;
548
  $post_types = get_option(WCP_FOLDER_VAR);
549
+ $post_types = is_array($post_types)?$post_types:array();
550
  global $typenow;
551
  if (in_array($current_type, $post_types) && in_array($action, array("add", ""))) {
552
  $license_data = self::get_license_key_data();
636
  public function create_folder_terms()
637
  {
638
  $options = get_option(WCP_FOLDER_VAR);
639
+ $options = is_array($options)?$options:array();
640
  $old_plugin_status = 0;
641
  $posts = array();
642
  if (!empty($options)) {
972
 
973
  public function check_and_set_post_type() {
974
  $options = get_option(WCP_FOLDER_VAR);
975
+ $options = is_array($options)?$options:array();
976
  $old_plugin_status = 0;
977
  $post_array = array();
978
  if (!empty($options)) {
1144
  public function set_default_values_if_not_exists()
1145
  {
1146
  $options = get_option(WCP_FOLDER_VAR);
1147
+ $options = is_array($options)?$options:array();
1148
  foreach ($options as $option) {
1149
  $post_type = self::get_custom_post_type($option);
1150
  $terms = get_terms($post_type, array(
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.1
6
- Stable tag: 2.0.2
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a FREE WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
@@ -107,6 +107,9 @@ Just follow our <a href="https://premio.io/wordpress-premio-pro-version-installa
107
 
108
  == Changelog ==
109
 
 
 
 
110
  = 2.0.2 = PHP 7.2 bug fix
111
 
112
  = 2.0.1 =
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.1
6
+ Stable tag: 2.0.3
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a FREE WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
107
 
108
  == Changelog ==
109
 
110
+ = 2.0.3 =
111
+ Fixed php warnings for php higher version than 5.4
112
+
113
  = 2.0.2 = PHP 7.2 bug fix
114
 
115
  = 2.0.1 =