Enhanced Media Library - Version 2.0.3

Version Description

Download this release

Release Info

Developer webbistro
Plugin Icon 128x128 Enhanced Media Library
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2.2 to 2.0.3

core/options-pages.php CHANGED
@@ -564,10 +564,10 @@ function wpuxss_eml_print_credits()
564
  <p>What's new in <a href="http://wordpress.org/plugins/enhanced-media-library/changelog/">version <?php echo $wpuxss_eml_version; ?></a>.</p>
565
 
566
  <h4>Enhanced Media Library PRO</h4>
567
- <p>More features under the hood <a href="http://wordpressuxsolutions.com/plugins/enhanced-media-library/">wordpressuxsolutions.com</a>.</p>
568
 
569
  <h4>Support</h4>
570
- <p>Feel free to ask for help on <a href="http://wordpressuxsolutions.com/support/">wordpressuxsolutions.com</a>. Support is free for both versions of the plugin.</p>
571
 
572
  <h4>Plugin rating</h4>
573
  <p>Please <a href="http://wordpress.org/support/view/plugin-reviews/enhanced-media-library">vote for the plugin</a>. Thanks!</p>
@@ -578,7 +578,7 @@ function wpuxss_eml_print_credits()
578
  </ul>
579
 
580
  <div class="author">
581
- <span><a href="http://wordpressuxsolutions.com/">WordPress UX Solutions</a> by <a class="logo-webbistro" href="http://twitter.com/webbistro"><span class="icon-webbistro">@</span>webbistro</a></span>
582
  </div>
583
 
584
  </div>
564
  <p>What's new in <a href="http://wordpress.org/plugins/enhanced-media-library/changelog/">version <?php echo $wpuxss_eml_version; ?></a>.</p>
565
 
566
  <h4>Enhanced Media Library PRO</h4>
567
+ <p>More features under the hood <a href="http://www.wpuxsolutions.com/plugins/enhanced-media-library/">www.wpuxsolutions.com</a>.</p>
568
 
569
  <h4>Support</h4>
570
+ <p>Feel free to ask for help on <a href="http://www.wpuxsolutions.com/support/">www.wpuxsolutions.com</a>. Support is free for both versions of the plugin.</p>
571
 
572
  <h4>Plugin rating</h4>
573
  <p>Please <a href="http://wordpress.org/support/view/plugin-reviews/enhanced-media-library">vote for the plugin</a>. Thanks!</p>
578
  </ul>
579
 
580
  <div class="author">
581
+ <span><a href="http://www.wpuxsolutions.com/">wpUXsolutions</a> by <a class="logo-webbistro" href="http://twitter.com/webbistro"><span class="icon-webbistro">@</span>webbistro</a></span>
582
  </div>
583
 
584
  </div>
core/taxonomies.php CHANGED
@@ -141,25 +141,35 @@ add_action( 'wp_ajax_query-attachments', 'wpuxss_eml_ajax_query_attachments', 0
141
 
142
  function wpuxss_eml_ajax_query_attachments() {
143
 
 
 
144
  if ( ! current_user_can( 'upload_files' ) )
145
  wp_send_json_error();
146
 
147
  $query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
148
 
149
- // TODO: rewrite date query as soon as WP core bug fixed
150
- if ( isset( $query['year'] ) && $query['year'] &&
151
- isset( $query['monthnum'] ) && $query['monthnum'] ) {
152
-
153
- $query['m'] = $query['year'] . $query['monthnum'];
154
- } else {
 
 
 
 
155
 
156
- $query['m'] = '';
157
- }
 
 
 
158
 
159
- $query = array_intersect_key( $query, array_flip( array(
160
- 's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
161
- 'post_parent', 'post__in', 'post__not_in', 'm'
162
- ) ) );
 
163
 
164
  $query['tax_query'] = array( 'relation' => 'AND' );
165
 
@@ -329,7 +339,7 @@ function wpuxss_eml_attachment_fields_to_edit( $form_fields, $post ) {
329
  foreach ( get_attachment_taxonomies($post) as $taxonomy ) {
330
 
331
  $t = (array) get_taxonomy($taxonomy);
332
- if ( ! $t['public'] || ! $t['show_ui'] )
333
  continue;
334
  if ( empty($t['label']) )
335
  $t['label'] = $taxonomy;
@@ -348,7 +358,7 @@ function wpuxss_eml_attachment_fields_to_edit( $form_fields, $post ) {
348
  $t['value'] = join(', ', $values);
349
  $t['show_in_edit'] = false;
350
 
351
- if ( $t['hierarchical'] )
352
  {
353
  ob_start();
354
 
141
 
142
  function wpuxss_eml_ajax_query_attachments() {
143
 
144
+ global $wp_version;
145
+
146
  if ( ! current_user_can( 'upload_files' ) )
147
  wp_send_json_error();
148
 
149
  $query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
150
 
151
+ if ( version_compare( $wp_version, '4.1', '<' ) ) {
152
+
153
+ if ( isset( $query['year'] ) && $query['year'] &&
154
+ isset( $query['monthnum'] ) && $query['monthnum'] ) {
155
+
156
+ $query['m'] = $query['year'] . $query['monthnum'];
157
+ } else {
158
+
159
+ $query['m'] = '';
160
+ }
161
 
162
+ $query = array_intersect_key( $query, array_flip( array(
163
+ 's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
164
+ 'post_parent', 'post__in', 'post__not_in', 'm'
165
+ ) ) );
166
+ } else {
167
 
168
+ $query = array_intersect_key( $query, array_flip( array(
169
+ 's', 'order', 'orderby', 'posts_per_page', 'paged', 'post_mime_type',
170
+ 'post_parent', 'post__in', 'post__not_in', 'year', 'monthnum'
171
+ ) ) );
172
+ }
173
 
174
  $query['tax_query'] = array( 'relation' => 'AND' );
175
 
339
  foreach ( get_attachment_taxonomies($post) as $taxonomy ) {
340
 
341
  $t = (array) get_taxonomy($taxonomy);
342
+ if ( ! $t['show_ui'] )
343
  continue;
344
  if ( empty($t['label']) )
345
  $t['label'] = $taxonomy;
358
  $t['value'] = join(', ', $values);
359
  $t['show_in_edit'] = false;
360
 
361
+ if ( $t['hierarchical'] && function_exists( 'wp_terms_checklist' ) )
362
  {
363
  ob_start();
364
 
css/eml-admin.css CHANGED
@@ -56,6 +56,7 @@ body.eml-media-css .attachments-browser .media-toolbar-primary {
56
  }
57
  body.eml-media-css .attachments-browser .media-toolbar-secondary {
58
  width: 80%;
 
59
  position: relative;
60
  }
61
  body.eml-media-css .attachments-browser .media-toolbar-secondary select {
56
  }
57
  body.eml-media-css .attachments-browser .media-toolbar-secondary {
58
  width: 80%;
59
+ max-width: 80%;
60
  position: relative;
61
  }
62
  body.eml-media-css .attachments-browser .media-toolbar-secondary select {
enhanced-media-library.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Enhanced Media Library
4
  Plugin URI: http://wpUXsolutions.com
5
  Description: This plugin will be handy for those who need to manage a lot of media files.
6
- Version: 2.0.2.2
7
  Author: wpUXsolutions
8
  Author URI: http://wpUXsolutions.com
9
  Text Domain: eml
@@ -21,7 +21,7 @@ global $wp_version;
21
 
22
 
23
 
24
- $wpuxss_eml_version = '2.0.2.2';
25
  $wpuxss_eml_old_version = get_option('wpuxss_eml_version', false);
26
  $wpuxss_eml_dir = plugin_dir_url( __FILE__ );
27
  $wpuxss_eml_path = plugin_dir_path( __FILE__ );
@@ -204,15 +204,15 @@ function wpuxss_eml_enqueue_media() {
204
 
205
  global $wpuxss_eml_version,
206
  $wpuxss_eml_dir,
207
- $wp_version;
 
208
 
209
 
210
  if ( ! is_admin() ) {
211
  return;
212
  }
213
 
214
-
215
- $screen = get_current_screen();
216
  $media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
217
 
218
 
@@ -226,7 +226,7 @@ function wpuxss_eml_enqueue_media() {
226
  $terms_array = array();
227
  $terms = array();
228
 
229
- if ( $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'] )
230
  {
231
 
232
  ob_start();
@@ -290,7 +290,7 @@ function wpuxss_eml_enqueue_media() {
290
 
291
 
292
  // scripts for grid view :: /wp-admin/upload.php
293
- if ( isset( $screen ) && 'upload' === $screen->base && 'grid' === $media_library_mode )
294
  {
295
  wp_enqueue_script(
296
  'wpuxss-eml-media-grid-script',
@@ -302,7 +302,7 @@ function wpuxss_eml_enqueue_media() {
302
  }
303
 
304
  // scripts for Appearance -> Header
305
- if ( isset( $screen ) && 'appearance_page_custom-header' === $screen->base ) {
306
 
307
  wp_enqueue_script(
308
  'wpuxss-eml-custom-header-script',
@@ -314,7 +314,7 @@ function wpuxss_eml_enqueue_media() {
314
  }
315
 
316
  // scripts for Appearance -> Background
317
- if ( isset( $screen ) && 'appearance_page_custom-background' === $screen->base ) {
318
 
319
  wp_enqueue_script(
320
  'wpuxss-eml-custom-background-script',
@@ -327,7 +327,7 @@ function wpuxss_eml_enqueue_media() {
327
 
328
 
329
  // scripts for /wp-admin/customize.php
330
- if ( isset( $screen ) && 'customize' === $screen->base )
331
  {
332
  wp_enqueue_script(
333
  'wpuxss-eml-customize-controls-script',
3
  Plugin Name: Enhanced Media Library
4
  Plugin URI: http://wpUXsolutions.com
5
  Description: This plugin will be handy for those who need to manage a lot of media files.
6
+ Version: 2.0.3
7
  Author: wpUXsolutions
8
  Author URI: http://wpUXsolutions.com
9
  Text Domain: eml
21
 
22
 
23
 
24
+ $wpuxss_eml_version = '2.0.3';
25
  $wpuxss_eml_old_version = get_option('wpuxss_eml_version', false);
26
  $wpuxss_eml_dir = plugin_dir_url( __FILE__ );
27
  $wpuxss_eml_path = plugin_dir_path( __FILE__ );
204
 
205
  global $wpuxss_eml_version,
206
  $wpuxss_eml_dir,
207
+ $wp_version,
208
+ $current_screen;
209
 
210
 
211
  if ( ! is_admin() ) {
212
  return;
213
  }
214
 
215
+
 
216
  $media_library_mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
217
 
218
 
226
  $terms_array = array();
227
  $terms = array();
228
 
229
+ if ( $wpuxss_eml_taxonomies[$taxonomy->name]['media_uploader_filter'] && function_exists( 'wp_terms_checklist' ) )
230
  {
231
 
232
  ob_start();
290
 
291
 
292
  // scripts for grid view :: /wp-admin/upload.php
293
+ if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'grid' === $media_library_mode )
294
  {
295
  wp_enqueue_script(
296
  'wpuxss-eml-media-grid-script',
302
  }
303
 
304
  // scripts for Appearance -> Header
305
+ if ( isset( $current_screen ) && 'appearance_page_custom-header' === $current_screen->base ) {
306
 
307
  wp_enqueue_script(
308
  'wpuxss-eml-custom-header-script',
314
  }
315
 
316
  // scripts for Appearance -> Background
317
+ if ( isset( $current_screen ) && 'appearance_page_custom-background' === $current_screen->base ) {
318
 
319
  wp_enqueue_script(
320
  'wpuxss-eml-custom-background-script',
327
 
328
 
329
  // scripts for /wp-admin/customize.php
330
+ if ( isset( $current_screen ) && 'customize' === $current_screen->base )
331
  {
332
  wp_enqueue_script(
333
  'wpuxss-eml-customize-controls-script',
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: webbistro
3
  Tags: media library, taxonomy, taxonomies, mime, mime type, attachment, media category, media categories, media tag, media tags, media taxonomy, media taxonomies, media filter, media organizer, file types, media types, media uploader, custom, media management, attachment management, files management, ux, user experience, wp-admin, admin, categories, category, filter, image, images, media, upload
4
  Requires at least: 3.5
5
- Tested up to: 4.0.1
6
- Stable tag: 2.0.2.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -118,25 +118,45 @@ Right now it is possible via WP_Query ([example of the code](http://wordpress.or
118
  == Changelog ==
119
 
120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  = 2.0.2.3 (PRO only) =
 
122
  = Bugfixes =
123
- Fixed the bug with ACF < 5.0 compatibility
124
 
125
 
126
  &nbsp;
127
  = 2.0.2.2 =
 
128
  = Bugfixes =
129
- Minor JS bug of v2.0 fixed [Support Request](https://wordpress.org/support/topic/upload-hangs-2)
130
 
131
 
132
  &nbsp;
133
  = 2.0.2.1 =
 
134
  = Bugfixes =
135
- Minor JS bug of v2.0.2 fixed
136
 
137
 
138
  &nbsp;
139
  = 2.0.2 =
 
140
  = Improvements =
141
  * Taxonomy Settings: you can now rewrite taxonomy slug and permalinks front base
142
 
2
  Contributors: webbistro
3
  Tags: media library, taxonomy, taxonomies, mime, mime type, attachment, media category, media categories, media tag, media tags, media taxonomy, media taxonomies, media filter, media organizer, file types, media types, media uploader, custom, media management, attachment management, files management, ux, user experience, wp-admin, admin, categories, category, filter, image, images, media, upload
4
  Requires at least: 3.5
5
+ Tested up to: 4.1
6
+ Stable tag: 2.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
118
  == Changelog ==
119
 
120
 
121
+ = 2.0.3 =
122
+
123
+ = Improvements (PRO only) =
124
+ * Bulk Edit added to the List View of Media Library
125
+ * Bulk Edit Media Popup (for Media Library > List View and Media Library > Add New page) is now being opened with pre-selected multiple media files
126
+
127
+ = Compatibility =
128
+ * Wordpress 4.1 compatibility ensured
129
+ * Improved compatibility with other plugins and custom taxonomies
130
+
131
+ = Bugfixes =
132
+ * "PHP Fatal Error: Call to undefined function get_current_screen()" issue fixed
133
+ * Minor bugs fixed
134
+
135
+
136
+ &nbsp;
137
  = 2.0.2.3 (PRO only) =
138
+
139
  = Bugfixes =
140
+ * Fixed the bug with ACF < 5.0 compatibility
141
 
142
 
143
  &nbsp;
144
  = 2.0.2.2 =
145
+
146
  = Bugfixes =
147
+ * Minor JS bug of v2.0 fixed [Support Request](https://wordpress.org/support/topic/upload-hangs-2)
148
 
149
 
150
  &nbsp;
151
  = 2.0.2.1 =
152
+
153
  = Bugfixes =
154
+ * Minor JS bug of v2.0.2 fixed
155
 
156
 
157
  &nbsp;
158
  = 2.0.2 =
159
+
160
  = Improvements =
161
  * Taxonomy Settings: you can now rewrite taxonomy slug and permalinks front base
162