Media Library Categories - Version 1.4.6

Version Description

  • fixed bug where in some rare cases the filter by category didn't work
Download this release

Release Info

Developer jeffrey-wp
Plugin Icon 128x128 Media Library Categories
Version 1.4.6
Comparing to
See all releases

Code changes from version 1.4.5 to 1.4.6

Files changed (2) hide show
  1. index.php +21 -11
  2. readme.txt +4 -1
index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Media Library Categories
4
  * Plugin URI: http://wordpress.org/plugins/wp-media-library-categories/
5
  * Description: Adds the ability to use categories in the media library.
6
- * Version: 1.4.5
7
  * Author: Jeffrey-WP
8
  * Author URI: http://codecanyon.net/user/jeffrey-wp/?ref=jeffrey-wp
9
  */
@@ -66,16 +66,26 @@ if( is_admin() ) {
66
  $taxonomy = 'category';
67
  // Add filter to change the default taxonomy
68
  $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
69
- $dropdown_options = array(
70
- 'taxonomy' => $taxonomy,
71
- 'name' => $taxonomy,
72
- 'show_option_all' => __( 'View all categories' ),
73
- 'hide_empty' => false,
74
- 'hierarchical' => true,
75
- 'orderby' => 'name',
76
- 'walker' => new wpmediacategory_walker_category_filter(),
77
- 'value' => 'slug'
78
- );
 
 
 
 
 
 
 
 
 
 
79
  wp_dropdown_categories( $dropdown_options );
80
  }
81
  }
3
  * Plugin Name: Media Library Categories
4
  * Plugin URI: http://wordpress.org/plugins/wp-media-library-categories/
5
  * Description: Adds the ability to use categories in the media library.
6
+ * Version: 1.4.6
7
  * Author: Jeffrey-WP
8
  * Author URI: http://codecanyon.net/user/jeffrey-wp/?ref=jeffrey-wp
9
  */
66
  $taxonomy = 'category';
67
  // Add filter to change the default taxonomy
68
  $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
69
+ if ( $taxonomy != 'category' ) {
70
+ $dropdown_options = array(
71
+ 'taxonomy' => $taxonomy,
72
+ 'name' => $taxonomy,
73
+ 'show_option_all' => __( 'View all categories' ),
74
+ 'hide_empty' => false,
75
+ 'hierarchical' => true,
76
+ 'orderby' => 'name',
77
+ 'walker' => new wpmediacategory_walker_category_filter(),
78
+ 'value' => 'slug'
79
+ );
80
+ } else {
81
+ $dropdown_options = array(
82
+ 'taxonomy' => $taxonomy,
83
+ 'show_option_all' => __( 'View all categories' ),
84
+ 'hide_empty' => false,
85
+ 'hierarchical' => true,
86
+ 'orderby' => 'name'
87
+ );
88
+ }
89
  wp_dropdown_categories( $dropdown_options );
90
  }
91
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: category, categories, media, library, medialibrary
5
  Requires at least: 3.1
6
  Tested up to: 3.8.1
7
- Stable tag: 1.4.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -68,6 +68,9 @@ add_filter( 'wpmediacategory_taxonomy', function(){ return 'category_media'; },
68
 
69
  == Changelog ==
70
 
 
 
 
71
  = 1.4.5 =
72
  * fixed bug in version 1.4.4 that made default categories in WordPress invisible
73
 
4
  Tags: category, categories, media, library, medialibrary
5
  Requires at least: 3.1
6
  Tested up to: 3.8.1
7
+ Stable tag: 1.4.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
68
 
69
  == Changelog ==
70
 
71
+ = 1.4.6 =
72
+ * fixed bug where in some rare cases the filter by category didn't work
73
+
74
  = 1.4.5 =
75
  * fixed bug in version 1.4.4 that made default categories in WordPress invisible
76