Media Library Categories - Version 1.3.1

Version Description

  • fixed bug (when having a category with apostrophe)
Download this release

Release Info

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

Code changes from version 1.3 to 1.3.1

Files changed (2) hide show
  1. index.php +5 -6
  2. readme.txt +9 -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.3
7
  * Author: Jeffrey-WP
8
  */
9
 
@@ -27,7 +27,6 @@ add_action( 'restrict_manage_posts', 'wpmediacategory_add_category_filter' );
27
 
28
  /** Add custom Bulk Action to the select menus */
29
  function wpmediacategory_custom_bulk_admin_footer() {
30
- //$terms = get_the_terms( 0, 'category' );
31
  $terms = get_terms( 'category', 'hide_empty=0' );
32
  if ( $terms && ! is_wp_error( $terms ) ) :
33
  ?>
@@ -35,12 +34,12 @@ function wpmediacategory_custom_bulk_admin_footer() {
35
  jQuery(document).ready(function() {
36
  <?php
37
  foreach ( $terms as $term ) {
38
- echo 'jQuery(\'<option>\').val(\'cat_' . $term->term_taxonomy_id . '\').text(\''. __( 'Category' ) . ': ' . $term->name . '\').appendTo("select[name=\'action\']");';
39
- echo 'jQuery(\'<option>\').val(\'cat_' . $term->term_taxonomy_id . '\').text(\''. __( 'Category' ) . ': ' . $term->name . '\').appendTo("select[name=\'action2\']");';
40
  }
41
  ?>
42
- jQuery('<option>').val('cat_0').text('<?php _e( 'Category' ); ?> <?php echo strtolower(__( 'Remove' )); ?>').appendTo("select[name='action']");
43
- jQuery('<option>').val('cat_0').text('<?php _e( 'Category' ); ?> <?php echo strtolower(__( 'Remove' )); ?>').appendTo("select[name='action2']");
44
  });
45
  </script>
46
  <?php
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.3.1
7
  * Author: Jeffrey-WP
8
  */
9
 
27
 
28
  /** Add custom Bulk Action to the select menus */
29
  function wpmediacategory_custom_bulk_admin_footer() {
 
30
  $terms = get_terms( 'category', 'hide_empty=0' );
31
  if ( $terms && ! is_wp_error( $terms ) ) :
32
  ?>
34
  jQuery(document).ready(function() {
35
  <?php
36
  foreach ( $terms as $term ) {
37
+ echo 'jQuery(\'<option>\').val(\'cat_' . $term->term_taxonomy_id . '\').text(\''. esc_js( __( 'Category' ) ) . ': ' . esc_js( $term->name ) . '\').appendTo("select[name=\'action\']");';
38
+ echo 'jQuery(\'<option>\').val(\'cat_' . $term->term_taxonomy_id . '\').text(\''. esc_js( __( 'Category' ) ) . ': ' . esc_js( $term->name ) . '\').appendTo("select[name=\'action2\']");';
39
  }
40
  ?>
41
+ jQuery('<option>').val('cat_0').text('<?php esc_js( _e( 'Category' ) ); ?> <?php echo esc_js( strtolower( __( 'Remove' ) ) ); ?>').appendTo("select[name='action']");
42
+ jQuery('<option>').val('cat_0').text('<?php esc_js( _e( 'Category' ) ); ?> <?php echo esc_js( strtolower( __( 'Remove' ) ) ); ?>').appendTo("select[name='action2']");
43
  });
44
  </script>
45
  <?php
readme.txt CHANGED
@@ -1,9 +1,10 @@
1
  === Plugin Name ===
2
  Contributors: jeffrey-wp
 
3
  Tags: category, categories, media, library, medialibrary
4
  Requires at least: 3.1
5
  Tested up to: 3.8
6
- Stable tag: 1.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -41,6 +42,10 @@ To upload the plugin through WordPress, instead of FTP:
41
 
42
  You can request new features on the [support page](http://wordpress.org/support/plugin/wp-media-library-categories)
43
 
 
 
 
 
44
  == Screenshots ==
45
 
46
  1. Filter by category in the media library
@@ -48,6 +53,9 @@ You can request new features on the [support page](http://wordpress.org/support/
48
 
49
  == Changelog ==
50
 
 
 
 
51
  = 1.3 =
52
  * Add support for bulk actions (to change category from multiple media items at once)
53
  * support for WordPress 3.8
1
  === Plugin Name ===
2
  Contributors: jeffrey-wp
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SSNQMST6R28Q2
4
  Tags: category, categories, media, library, medialibrary
5
  Requires at least: 3.1
6
  Tested up to: 3.8
7
+ Stable tag: 1.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
42
 
43
  You can request new features on the [support page](http://wordpress.org/support/plugin/wp-media-library-categories)
44
 
45
+ = I want to thank you, where can I make a donation? =
46
+ Maintaining a plugin and keeping it up to date is hard work. Please support me by making a donation. Thank you.
47
+ [Please donate here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SSNQMST6R28Q2)
48
+
49
  == Screenshots ==
50
 
51
  1. Filter by category in the media library
53
 
54
  == Changelog ==
55
 
56
+ = 1.3.1 =
57
+ * fixed bug (when having a category with apostrophe)
58
+
59
  = 1.3 =
60
  * Add support for bulk actions (to change category from multiple media items at once)
61
  * support for WordPress 3.8