Media Library Categories - Version 1.4.5

Version Description

  • fixed bug in version 1.4.4 that made default categories in WordPress invisible
Download this release

Release Info

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

Code changes from version 1.4.4 to 1.4.5

Files changed (2) hide show
  1. index.php +10 -6
  2. readme.txt +5 -5
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.4
7
  * Author: Jeffrey-WP
8
  * Author URI: http://codecanyon.net/user/jeffrey-wp/?ref=jeffrey-wp
9
  */
@@ -15,11 +15,15 @@ function wpmediacategory_init() {
15
  // Add filter to change the default taxonomy
16
  $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
17
 
18
- $args = array(
19
- 'hierarchical' => true, // hierarchical: true = display as categories, false = display as tags
20
- 'show_admin_column' => true
21
- );
22
- register_taxonomy( $taxonomy, array( 'attachment' ), $args );
 
 
 
 
23
  }
24
  add_action( 'init', 'wpmediacategory_init' );
25
 
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
  */
15
  // Add filter to change the default taxonomy
16
  $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
17
 
18
+ if ( $taxonomy != 'category' ) {
19
+ $args = array(
20
+ 'hierarchical' => true, // hierarchical: true = display as categories, false = display as tags
21
+ 'show_admin_column' => true
22
+ );
23
+ register_taxonomy( $taxonomy, array( 'attachment' ), $args );
24
+ } else {
25
+ register_taxonomy_for_object_type( $taxonomy, 'attachment' );
26
+ }
27
  }
28
  add_action( 'init', 'wpmediacategory_init' );
29
 
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.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -68,13 +68,13 @@ add_filter( 'wpmediacategory_taxonomy', function(){ return 'category_media'; },
68
 
69
  == Changelog ==
70
 
 
 
 
71
  = 1.4.4 =
72
  * By default the WordPress Media Library uses the same categories as WordPress does (such as posts & pages). Now you can use separate categories for the WordPress Media Library. [see the FAQ for howto](http://wordpress.org/plugins/wp-media-library-categories/faq/)
73
 
74
- = 1.4.3 =
75
- * [(premium only)](http://codecanyon.net/item/media-library-categories-premium/6691290?ref=jeffrey-wp)
76
-
77
- = 1.4.2 =
78
  * [(premium only)](http://codecanyon.net/item/media-library-categories-premium/6691290?ref=jeffrey-wp)
79
 
80
  = 1.4.1 =
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
 
69
  == Changelog ==
70
 
71
+ = 1.4.5 =
72
+ * fixed bug in version 1.4.4 that made default categories in WordPress invisible
73
+
74
  = 1.4.4 =
75
  * By default the WordPress Media Library uses the same categories as WordPress does (such as posts & pages). Now you can use separate categories for the WordPress Media Library. [see the FAQ for howto](http://wordpress.org/plugins/wp-media-library-categories/faq/)
76
 
77
+ = 1.4.2 & 1.4.3 =
 
 
 
78
  * [(premium only)](http://codecanyon.net/item/media-library-categories-premium/6691290?ref=jeffrey-wp)
79
 
80
  = 1.4.1 =