Media Library Categories - Version 1.6.1

Version Description

  • Support for SCRIPT_DEBUG.
  • Only load CSS when needed.
Download this release

Release Info

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

Code changes from version 1.6 to 1.6.1

Files changed (2) hide show
  1. index.php +10 -5
  2. readme.txt +6 -2
index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Media Library Categories
4
  * Plugin URI: https://wordpress.org/plugins/wp-media-library-categories/
5
  * Description: Adds the ability to use categories in the media library.
6
- * Version: 1.6
7
  * Author: Jeffrey-WP
8
  * Text Domain: wp-media-library-categories
9
  * Domain Path: /languages
@@ -22,6 +22,8 @@ if ( ! defined( 'ABSPATH' ) ) {
22
  */
23
  class wpMediaLibraryCategories {
24
 
 
 
25
  /**
26
  * Initialize the hooks and filters
27
  */
@@ -528,7 +530,7 @@ class wpMediaLibraryCategories {
528
  return array_merge(
529
  array(
530
  'settings' => '<a href="' . get_bloginfo( 'wpurl' ) . '/wp-admin/edit-tags.php?taxonomy=' . $taxonomy . '&amp;post_type=attachment">' . __( 'Categories', 'wp-media-library-categories' ) . '</a>',
531
- 'premium' => '<a href="https://codecanyon.net/item/media-library-categories-premium/6691290?ref=jeffrey-wp" style="color:#60a559;" target="_blank" title="Try Try Media Library Categories Premium today for just $20 - 100% money back guarantee">' . __( 'Try Premium Version', 'wp-media-library-categories' ) . '</a>'
532
  ),
533
  $links
534
  );
@@ -573,7 +575,10 @@ class wpMediaLibraryCategories {
573
  */
574
  public function wpmediacategory_enqueue_media_action() {
575
 
576
- global $pagenow;
 
 
 
577
  if ( wp_script_is( 'media-editor' ) && 'upload.php' == $pagenow ) {
578
 
579
  // Default taxonomy
@@ -613,9 +618,9 @@ class wpMediaLibraryCategories {
613
  echo '/* ]]> */';
614
  echo '</script>';
615
 
616
- wp_enqueue_script( 'wpmediacategory-media-views', plugins_url( 'js/wpmediacategory-media-views.min.js', __FILE__ ), array( 'media-views' ), '1.6', true );
 
617
  }
618
- wp_enqueue_style( 'wpmediacategory', plugins_url( 'css/wpmediacategory.min.css', __FILE__ ), array(), '1.6' );
619
  }
620
 
621
 
3
  * Plugin Name: Media Library Categories
4
  * Plugin URI: https://wordpress.org/plugins/wp-media-library-categories/
5
  * Description: Adds the ability to use categories in the media library.
6
+ * Version: 1.6.1
7
  * Author: Jeffrey-WP
8
  * Text Domain: wp-media-library-categories
9
  * Domain Path: /languages
22
  */
23
  class wpMediaLibraryCategories {
24
 
25
+ public $plugin_version = '1.6.1';
26
+
27
  /**
28
  * Initialize the hooks and filters
29
  */
530
  return array_merge(
531
  array(
532
  'settings' => '<a href="' . get_bloginfo( 'wpurl' ) . '/wp-admin/edit-tags.php?taxonomy=' . $taxonomy . '&amp;post_type=attachment">' . __( 'Categories', 'wp-media-library-categories' ) . '</a>',
533
+ 'premium' => '<a href="https://codecanyon.net/item/media-library-categories-premium/6691290?ref=jeffrey-wp" style="color:#60a559;" target="_blank" title="' . __( 'Try Media Library Categories Premium today for just $20 - 100% money back guarantee', 'wp-media-library-categories' ) . '">' . __( 'Try Premium Version', 'wp-media-library-categories' ) . '</a>'
534
  ),
535
  $links
536
  );
575
  */
576
  public function wpmediacategory_enqueue_media_action() {
577
 
578
+ global $pagenow, $plugin_version;
579
+
580
+ $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
581
+
582
  if ( wp_script_is( 'media-editor' ) && 'upload.php' == $pagenow ) {
583
 
584
  // Default taxonomy
618
  echo '/* ]]> */';
619
  echo '</script>';
620
 
621
+ wp_enqueue_script( 'wpmediacategory-media-views', plugins_url( 'js/wpmediacategory-media-views' . $suffix . '.js', __FILE__ ), array( 'media-views' ), $plugin_version, true );
622
+ wp_enqueue_style( 'wpmediacategory', plugins_url( 'css/wpmediacategory' . $suffix . '.css', __FILE__ ), array(), $plugin_version );
623
  }
 
624
  }
625
 
626
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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, image, images, media category, media categories
5
  Requires at least: 3.1
6
- Tested up to: 4.9.3
7
- Stable tag: 1.6
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -95,6 +95,10 @@ Maintaining a plugin and keeping it up to date is hard work. Please support me b
95
 
96
  == Changelog ==
97
 
 
 
 
 
98
  = 1.6 =
99
  * Notice for first time users how to separate media categories.
100
  * Rewrite entire plugin to improve quality and make it ready for future development.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SSNQMST6R28Q2
4
  Tags: category, categories, media, library, medialibrary, image, images, media category, media categories
5
  Requires at least: 3.1
6
+ Tested up to: 4.9.5
7
+ Stable tag: 1.6.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
95
 
96
  == Changelog ==
97
 
98
+ = 1.6.1 =
99
+ * Support for SCRIPT_DEBUG.
100
+ * Only load CSS when needed.
101
+
102
  = 1.6 =
103
  * Notice for first time users how to separate media categories.
104
  * Rewrite entire plugin to improve quality and make it ready for future development.