Version Description
Release Date - April 24, 2015
Download this release
Release Info
Developer | webbistro |
Plugin | Enhanced Media Library |
Version | 2.0.4.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.4.3 to 2.0.4.5
- core/class-eml-media-list-table.php +17 -4
- core/eml-upload.php +2 -0
- core/taxonomies.php +91 -124
- enhanced-media-library.php +5 -4
- languages/eml-nl_NL.po +2 -2
- languages/eml-pl_PL.po +2 -2
- languages/eml.pot +2 -2
- readme.txt +26 -10
- wpml-config.xml +0 -5
core/class-eml-media-list-table.php
CHANGED
@@ -13,17 +13,28 @@
|
|
13 |
*/
|
14 |
|
15 |
class WPUXSS_EML_Media_List_Table extends WP_Media_List_Table {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
public function __construct( $args = array() )
|
18 |
-
{
|
|
|
|
|
19 |
$this->uncategorized = ( isset( $_REQUEST['attachment-filter'] ) && 'uncategorized' === $_REQUEST['attachment-filter'] );
|
|
|
|
|
20 |
|
21 |
parent::__construct();
|
22 |
}
|
23 |
|
24 |
|
25 |
-
protected function get_views()
|
26 |
-
|
27 |
global $wpdb, $post_mime_types, $avail_post_mime_types;
|
28 |
|
29 |
$type_links = array();
|
@@ -45,7 +56,7 @@ class WPUXSS_EML_Media_List_Table extends WP_Media_List_Table {
|
|
45 |
if ( !empty( $_GET['attachment-filter'] ) && strpos( $_GET['attachment-filter'], 'post_mime_type:' ) === 0 && wp_match_mime_types( $mime_type, str_replace( 'post_mime_type:', '', $_GET['attachment-filter'] ) ) )
|
46 |
$selected = ' selected="selected"';
|
47 |
if ( !empty( $num_posts[$mime_type] ) )
|
48 |
-
$type_links[$mime_type] = '<option value="post_mime_type:' .
|
49 |
}
|
50 |
$type_links['detached'] = '<option value="detached"' . ( $this->detached ? ' selected="selected"' : '' ) . '>' . sprintf( _nx( 'Unattached (%s)', 'Unattached (%s)', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</option>';
|
51 |
|
@@ -86,3 +97,5 @@ class WPUXSS_EML_Media_List_Table extends WP_Media_List_Table {
|
|
86 |
}
|
87 |
|
88 |
}
|
|
|
|
13 |
*/
|
14 |
|
15 |
class WPUXSS_EML_Media_List_Table extends WP_Media_List_Table {
|
16 |
+
|
17 |
+
protected $detached;
|
18 |
+
|
19 |
+
protected $uncategorized;
|
20 |
+
|
21 |
+
protected $is_trash;
|
22 |
+
|
23 |
|
24 |
public function __construct( $args = array() )
|
25 |
+
{
|
26 |
+
$this->detached = ( isset( $_REQUEST['attachment-filter'] ) && 'detached' === $_REQUEST['attachment-filter'] );
|
27 |
+
|
28 |
$this->uncategorized = ( isset( $_REQUEST['attachment-filter'] ) && 'uncategorized' === $_REQUEST['attachment-filter'] );
|
29 |
+
|
30 |
+
$this->is_trash = isset( $_REQUEST['attachment-filter'] ) && 'trash' == $_REQUEST['attachment-filter'];
|
31 |
|
32 |
parent::__construct();
|
33 |
}
|
34 |
|
35 |
|
36 |
+
protected function get_views() {
|
37 |
+
|
38 |
global $wpdb, $post_mime_types, $avail_post_mime_types;
|
39 |
|
40 |
$type_links = array();
|
56 |
if ( !empty( $_GET['attachment-filter'] ) && strpos( $_GET['attachment-filter'], 'post_mime_type:' ) === 0 && wp_match_mime_types( $mime_type, str_replace( 'post_mime_type:', '', $_GET['attachment-filter'] ) ) )
|
57 |
$selected = ' selected="selected"';
|
58 |
if ( !empty( $num_posts[$mime_type] ) )
|
59 |
+
$type_links[$mime_type] = '<option value="post_mime_type:' . esc_attr( $mime_type ) . '"' . $selected . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</option>';
|
60 |
}
|
61 |
$type_links['detached'] = '<option value="detached"' . ( $this->detached ? ' selected="selected"' : '' ) . '>' . sprintf( _nx( 'Unattached (%s)', 'Unattached (%s)', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</option>';
|
62 |
|
97 |
}
|
98 |
|
99 |
}
|
100 |
+
|
101 |
+
?>
|
core/eml-upload.php
CHANGED
@@ -307,3 +307,5 @@ if ( !empty($message) ) { ?>
|
|
307 |
|
308 |
<?php
|
309 |
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
|
|
|
307 |
|
308 |
<?php
|
309 |
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
310 |
+
|
311 |
+
?>
|
core/taxonomies.php
CHANGED
@@ -171,7 +171,6 @@ if( ! function_exists( 'wpuxss_eml_tax_options_validate' ) ) {
|
|
171 |
|
172 |
add_action( 'wp_ajax_query-attachments', 'wpuxss_eml_ajax_query_attachments', 0 );
|
173 |
|
174 |
-
|
175 |
if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
176 |
|
177 |
function wpuxss_eml_ajax_query_attachments() {
|
@@ -207,8 +206,6 @@ if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
|
207 |
'post_parent', 'post__in', 'post__not_in', 'year', 'monthnum'
|
208 |
) ) );
|
209 |
}
|
210 |
-
|
211 |
-
$query['tax_query'] = array( 'relation' => 'AND' );
|
212 |
|
213 |
foreach ( get_object_taxonomies( 'attachment', 'names' ) as $taxonomy )
|
214 |
{
|
@@ -216,32 +213,32 @@ if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
|
216 |
{
|
217 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
218 |
|
219 |
-
$
|
220 |
'taxonomy' => $taxonomy,
|
221 |
-
'field' => '
|
222 |
'terms' => $terms,
|
223 |
'operator' => 'NOT IN',
|
224 |
);
|
225 |
}
|
226 |
else
|
227 |
{
|
228 |
-
if ( isset( $_REQUEST['query'][$taxonomy] ) )
|
229 |
{
|
230 |
if( is_numeric( $_REQUEST['query'][$taxonomy] ) )
|
231 |
{
|
232 |
-
$
|
233 |
'taxonomy' => $taxonomy,
|
234 |
-
'field' => '
|
235 |
-
'terms' => $_REQUEST['query'][$taxonomy]
|
236 |
);
|
237 |
}
|
238 |
elseif ( 'not_in' === $_REQUEST['query'][$taxonomy] )
|
239 |
{
|
240 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
241 |
|
242 |
-
$
|
243 |
'taxonomy' => $taxonomy,
|
244 |
-
'field' => '
|
245 |
'terms' => $terms,
|
246 |
'operator' => 'NOT IN',
|
247 |
);
|
@@ -250,9 +247,9 @@ if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
|
250 |
{
|
251 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
252 |
|
253 |
-
$
|
254 |
'taxonomy' => $taxonomy,
|
255 |
-
'field' => '
|
256 |
'terms' => $terms,
|
257 |
'operator' => 'IN',
|
258 |
);
|
@@ -260,7 +257,12 @@ if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
|
260 |
}
|
261 |
}
|
262 |
} // endforeach
|
263 |
-
|
|
|
|
|
|
|
|
|
|
|
264 |
$query['post_type'] = 'attachment';
|
265 |
|
266 |
if ( MEDIA_TRASH
|
@@ -287,10 +289,11 @@ if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
|
287 |
|
288 |
|
289 |
|
|
|
290 |
/**
|
291 |
* wpuxss_eml_restrict_manage_posts
|
292 |
*
|
293 |
-
* Adds taxonomy filters to Media Library List
|
294 |
*
|
295 |
* @since 1.0
|
296 |
* @created 11/08/13
|
@@ -323,7 +326,7 @@ if( ! function_exists( 'wpuxss_eml_restrict_manage_posts' ) ) {
|
|
323 |
|
324 |
$selected = ( ! $uncategorized && isset( $wp_query->query[$taxonomy->name] ) ) ? $wp_query->query[$taxonomy->name] : 0;
|
325 |
|
326 |
-
|
327 |
array(
|
328 |
'show_option_all' => __( 'Filter by ', 'eml' ) . $taxonomy->labels->singular_name,
|
329 |
'show_option_in' => '— ' . __( 'All ', 'eml' ) . $taxonomy->labels->name . ' —',
|
@@ -349,6 +352,70 @@ if( ! function_exists( 'wpuxss_eml_restrict_manage_posts' ) ) {
|
|
349 |
|
350 |
|
351 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
/**
|
353 |
* wpuxss_eml_custom_media
|
354 |
*
|
@@ -378,109 +445,11 @@ if( ! function_exists( 'wpuxss_eml_custom_media' ) ) {
|
|
378 |
|
379 |
|
380 |
|
381 |
-
/**
|
382 |
-
* wpuxss_eml_dropdown_terms
|
383 |
-
*
|
384 |
-
* Based on wp_dropdown_categories()
|
385 |
-
*
|
386 |
-
* @since 2.0.4
|
387 |
-
* @created 12/02/15
|
388 |
-
*/
|
389 |
-
|
390 |
-
if( ! function_exists( 'wpuxss_eml_dropdown_terms' ) ) {
|
391 |
-
|
392 |
-
function wpuxss_eml_dropdown_terms( $args = '' ) {
|
393 |
-
|
394 |
-
$defaults = array(
|
395 |
-
'show_option_all' => '',
|
396 |
-
'show_option_in' => '',
|
397 |
-
'show_option_not_in' => '',
|
398 |
-
'orderby' => 'id',
|
399 |
-
'order' => 'ASC',
|
400 |
-
'show_count' => 0,
|
401 |
-
'hide_empty' => 1,
|
402 |
-
'child_of' => 0,
|
403 |
-
'exclude' => '',
|
404 |
-
'echo' => 1,
|
405 |
-
'selected' => 0,
|
406 |
-
'hierarchical' => 0,
|
407 |
-
'name' => '',
|
408 |
-
'id' => '',
|
409 |
-
'class' => 'postform',
|
410 |
-
'depth' => 0,
|
411 |
-
'tab_index' => 0,
|
412 |
-
'taxonomy' => 'category',
|
413 |
-
'hide_if_empty' => false,
|
414 |
-
);
|
415 |
-
|
416 |
-
$r = wp_parse_args( $args, $defaults );
|
417 |
-
|
418 |
-
$terms = get_terms( $r['taxonomy'], $r );
|
419 |
-
$name = esc_attr( $r['name'] );
|
420 |
-
$class = esc_attr( $r['class'] );
|
421 |
-
$id = $r['id'] ? esc_attr( $r['id'] ) : $name;
|
422 |
-
|
423 |
-
if ( ! $r['hide_if_empty'] || ! empty( $terms ) )
|
424 |
-
{
|
425 |
-
$output = "<select name='$name' id='$id' class='$class'>\n";
|
426 |
-
$show_option_all = $r['show_option_all'];
|
427 |
-
$selected = ( '0' === strval($r['selected']) ) ? " selected='selected'" : '';
|
428 |
-
$output .= "\t<option value='0'$selected>$show_option_all</option>\n";
|
429 |
-
}
|
430 |
-
else
|
431 |
-
{
|
432 |
-
$output = '';
|
433 |
-
}
|
434 |
-
|
435 |
-
if ( ! empty( $terms ) )
|
436 |
-
{
|
437 |
-
if ( $r['show_option_in'] )
|
438 |
-
{
|
439 |
-
$show_option_in = $r['show_option_in'];
|
440 |
-
$selected = ( 'in' === strval($r['selected']) ) ? " selected='selected'" : '';
|
441 |
-
$output .= "\t<option value='in'$selected>$show_option_in</option>\n";
|
442 |
-
}
|
443 |
-
|
444 |
-
if ( $r['show_option_not_in'] )
|
445 |
-
{
|
446 |
-
$show_option_not_in = $r['show_option_not_in'];
|
447 |
-
$selected = ( 'not_in' === strval($r['selected']) ) ? " selected='selected'" : '';
|
448 |
-
$output .= "\t<option value='not_in'$selected>$show_option_not_in</option>\n";
|
449 |
-
}
|
450 |
-
|
451 |
-
if ( $r['hierarchical'] )
|
452 |
-
{
|
453 |
-
$depth = $r['depth']; // Walk the full depth.
|
454 |
-
}
|
455 |
-
else
|
456 |
-
{
|
457 |
-
$depth = -1; // Flat.
|
458 |
-
}
|
459 |
-
$output .= walk_category_dropdown_tree( $terms, $depth, $r );
|
460 |
-
}
|
461 |
-
|
462 |
-
if ( ! $r['hide_if_empty'] || ! empty( $terms ) )
|
463 |
-
{
|
464 |
-
$output .= "</select>\n";
|
465 |
-
}
|
466 |
-
|
467 |
-
if ( $r['echo'] )
|
468 |
-
{
|
469 |
-
echo $output;
|
470 |
-
}
|
471 |
-
return $output;
|
472 |
-
}
|
473 |
-
}
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
/**
|
480 |
* wpuxss_eml_parse_tax_query
|
481 |
*
|
482 |
* @since 2.0.4
|
483 |
-
* @created 19/02/
|
484 |
*/
|
485 |
|
486 |
add_action( 'parse_tax_query', 'wpuxss_eml_parse_tax_query' );
|
@@ -535,10 +504,7 @@ if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
|
535 |
$term = get_term_by( 'slug', $query->query_vars['term'], $tax );
|
536 |
|
537 |
if ( $term )
|
538 |
-
{
|
539 |
-
if ( 'category' == $tax )
|
540 |
-
$tax = 'category_name';
|
541 |
-
|
542 |
$query->query_vars[$tax] = $term->term_id;
|
543 |
$query->query[$tax] = $term->term_id;
|
544 |
|
@@ -550,8 +516,6 @@ if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
|
550 |
}
|
551 |
}
|
552 |
|
553 |
-
$tax_query = array( 'relation' => 'AND' );
|
554 |
-
|
555 |
foreach ( get_object_taxonomies( 'attachment','names' ) as $taxonomy )
|
556 |
{
|
557 |
if ( $uncategorized )
|
@@ -560,7 +524,7 @@ if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
|
560 |
|
561 |
$tax_query[] = array(
|
562 |
'taxonomy' => $taxonomy,
|
563 |
-
'field' => '
|
564 |
'terms' => $terms,
|
565 |
'operator' => 'NOT IN',
|
566 |
);
|
@@ -597,7 +561,7 @@ if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
|
597 |
|
598 |
$tax_query[] = array(
|
599 |
'taxonomy' => $taxonomy,
|
600 |
-
'field' => '
|
601 |
'terms' => $terms,
|
602 |
'operator' => 'IN',
|
603 |
);
|
@@ -606,7 +570,10 @@ if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
|
606 |
}
|
607 |
} // endforeach
|
608 |
|
609 |
-
|
|
|
|
|
|
|
610 |
|
611 |
} // endif
|
612 |
}
|
171 |
|
172 |
add_action( 'wp_ajax_query-attachments', 'wpuxss_eml_ajax_query_attachments', 0 );
|
173 |
|
|
|
174 |
if( ! function_exists( 'wpuxss_eml_ajax_query_attachments' ) ) {
|
175 |
|
176 |
function wpuxss_eml_ajax_query_attachments() {
|
206 |
'post_parent', 'post__in', 'post__not_in', 'year', 'monthnum'
|
207 |
) ) );
|
208 |
}
|
|
|
|
|
209 |
|
210 |
foreach ( get_object_taxonomies( 'attachment', 'names' ) as $taxonomy )
|
211 |
{
|
213 |
{
|
214 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
215 |
|
216 |
+
$tax_query[] = array(
|
217 |
'taxonomy' => $taxonomy,
|
218 |
+
'field' => 'term_id',
|
219 |
'terms' => $terms,
|
220 |
'operator' => 'NOT IN',
|
221 |
);
|
222 |
}
|
223 |
else
|
224 |
{
|
225 |
+
if ( isset( $_REQUEST['query'][$taxonomy] ) && $_REQUEST['query'][$taxonomy] )
|
226 |
{
|
227 |
if( is_numeric( $_REQUEST['query'][$taxonomy] ) )
|
228 |
{
|
229 |
+
$tax_query[] = array(
|
230 |
'taxonomy' => $taxonomy,
|
231 |
+
'field' => 'term_id',
|
232 |
+
'terms' => array( $_REQUEST['query'][$taxonomy] )
|
233 |
);
|
234 |
}
|
235 |
elseif ( 'not_in' === $_REQUEST['query'][$taxonomy] )
|
236 |
{
|
237 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
238 |
|
239 |
+
$tax_query[] = array(
|
240 |
'taxonomy' => $taxonomy,
|
241 |
+
'field' => 'term_id',
|
242 |
'terms' => $terms,
|
243 |
'operator' => 'NOT IN',
|
244 |
);
|
247 |
{
|
248 |
$terms = get_terms( $taxonomy, array('fields'=>'ids','get'=>'all') );
|
249 |
|
250 |
+
$tax_query[] = array(
|
251 |
'taxonomy' => $taxonomy,
|
252 |
+
'field' => 'term_id',
|
253 |
'terms' => $terms,
|
254 |
'operator' => 'IN',
|
255 |
);
|
257 |
}
|
258 |
}
|
259 |
} // endforeach
|
260 |
+
|
261 |
+
if ( ! empty( $tax_query ) )
|
262 |
+
{
|
263 |
+
$query['tax_query'] = $tax_query;
|
264 |
+
}
|
265 |
+
|
266 |
$query['post_type'] = 'attachment';
|
267 |
|
268 |
if ( MEDIA_TRASH
|
289 |
|
290 |
|
291 |
|
292 |
+
|
293 |
/**
|
294 |
* wpuxss_eml_restrict_manage_posts
|
295 |
*
|
296 |
+
* Adds taxonomy filters to Media Library List View
|
297 |
*
|
298 |
* @since 1.0
|
299 |
* @created 11/08/13
|
326 |
|
327 |
$selected = ( ! $uncategorized && isset( $wp_query->query[$taxonomy->name] ) ) ? $wp_query->query[$taxonomy->name] : 0;
|
328 |
|
329 |
+
wp_dropdown_categories(
|
330 |
array(
|
331 |
'show_option_all' => __( 'Filter by ', 'eml' ) . $taxonomy->labels->singular_name,
|
332 |
'show_option_in' => '— ' . __( 'All ', 'eml' ) . $taxonomy->labels->name . ' —',
|
352 |
|
353 |
|
354 |
|
355 |
+
/**
|
356 |
+
* wpuxss_eml_dropdown_cats
|
357 |
+
*
|
358 |
+
* Modifies taxonomy filters in Media Library List View
|
359 |
+
*
|
360 |
+
* @since 2.0.4.5
|
361 |
+
* @created 19/04/15
|
362 |
+
*/
|
363 |
+
|
364 |
+
add_filter( 'wp_dropdown_cats', 'wpuxss_eml_dropdown_cats', 10, 2 );
|
365 |
+
|
366 |
+
if( ! function_exists( 'wpuxss_eml_dropdown_cats' ) ) {
|
367 |
+
|
368 |
+
function wpuxss_eml_dropdown_cats( $output, $r ) {
|
369 |
+
|
370 |
+
global $current_screen;
|
371 |
+
|
372 |
+
if ( ! is_admin() ) {
|
373 |
+
return;
|
374 |
+
}
|
375 |
+
|
376 |
+
$media_library_mode = get_user_option( 'media_library_mode' ) ? get_user_option( 'media_library_mode' ) : 'grid';
|
377 |
+
|
378 |
+
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode )
|
379 |
+
{
|
380 |
+
$whole_select = $output;
|
381 |
+
|
382 |
+
$options_array = array();
|
383 |
+
while ( false !== ( $option_pos = strpos ( $whole_select, '<option', 7 ) ) )
|
384 |
+
{
|
385 |
+
$options_array[] = substr($whole_select, 0, $option_pos);
|
386 |
+
$whole_select = substr($whole_select, $option_pos);
|
387 |
+
}
|
388 |
+
$options_array[] = $whole_select;
|
389 |
+
|
390 |
+
$new_output = '';
|
391 |
+
|
392 |
+
if ( isset( $r['show_option_in'] ) && $r['show_option_in'] )
|
393 |
+
{
|
394 |
+
$show_option_in = $r['show_option_in'];
|
395 |
+
$selected = ( 'in' === strval($r['selected']) ) ? " selected='selected'" : '';
|
396 |
+
$new_output .= "\t<option value='in'$selected>$show_option_in</option>\n";
|
397 |
+
}
|
398 |
+
|
399 |
+
if ( isset( $r['show_option_not_in'] ) && $r['show_option_not_in'] )
|
400 |
+
{
|
401 |
+
$show_option_not_in = $r['show_option_not_in'];
|
402 |
+
$selected = ( 'not_in' === strval($r['selected']) ) ? " selected='selected'" : '';
|
403 |
+
$new_output .= "\t<option value='not_in'$selected>$show_option_not_in</option>\n";
|
404 |
+
}
|
405 |
+
|
406 |
+
array_splice( $options_array, 2, 0, $new_output );
|
407 |
+
|
408 |
+
$output = implode('', $options_array);
|
409 |
+
}
|
410 |
+
|
411 |
+
return $output;
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
+
|
416 |
+
|
417 |
+
|
418 |
+
|
419 |
/**
|
420 |
* wpuxss_eml_custom_media
|
421 |
*
|
445 |
|
446 |
|
447 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
448 |
/**
|
449 |
* wpuxss_eml_parse_tax_query
|
450 |
*
|
451 |
* @since 2.0.4
|
452 |
+
* @created 19/02/15
|
453 |
*/
|
454 |
|
455 |
add_action( 'parse_tax_query', 'wpuxss_eml_parse_tax_query' );
|
504 |
$term = get_term_by( 'slug', $query->query_vars['term'], $tax );
|
505 |
|
506 |
if ( $term )
|
507 |
+
{
|
|
|
|
|
|
|
508 |
$query->query_vars[$tax] = $term->term_id;
|
509 |
$query->query[$tax] = $term->term_id;
|
510 |
|
516 |
}
|
517 |
}
|
518 |
|
|
|
|
|
519 |
foreach ( get_object_taxonomies( 'attachment','names' ) as $taxonomy )
|
520 |
{
|
521 |
if ( $uncategorized )
|
524 |
|
525 |
$tax_query[] = array(
|
526 |
'taxonomy' => $taxonomy,
|
527 |
+
'field' => 'term_id',
|
528 |
'terms' => $terms,
|
529 |
'operator' => 'NOT IN',
|
530 |
);
|
561 |
|
562 |
$tax_query[] = array(
|
563 |
'taxonomy' => $taxonomy,
|
564 |
+
'field' => 'term_id',
|
565 |
'terms' => $terms,
|
566 |
'operator' => 'IN',
|
567 |
);
|
570 |
}
|
571 |
} // endforeach
|
572 |
|
573 |
+
if ( ! empty( $tax_query ) )
|
574 |
+
{
|
575 |
+
$query->tax_query = new WP_Tax_Query( $tax_query );
|
576 |
+
}
|
577 |
|
578 |
} // endif
|
579 |
}
|
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.4.
|
7 |
Author: wpUXsolutions
|
8 |
Author URI: http://wpUXsolutions.com
|
9 |
Text Domain: eml
|
@@ -23,7 +23,8 @@ global $wp_version,
|
|
23 |
|
24 |
|
25 |
|
26 |
-
$wpuxss_eml_version = '2.0.4.
|
|
|
27 |
|
28 |
|
29 |
|
@@ -34,7 +35,7 @@ if( is_admin() ) {
|
|
34 |
|
35 |
include_once( 'core/options-pages.php' );
|
36 |
}
|
37 |
-
|
38 |
|
39 |
|
40 |
|
@@ -522,4 +523,4 @@ if ( ! function_exists( 'wpuxss_eml_on_activation_update' ) ) {
|
|
522 |
}
|
523 |
}
|
524 |
|
525 |
-
?>
|
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.4.5
|
7 |
Author: wpUXsolutions
|
8 |
Author URI: http://wpUXsolutions.com
|
9 |
Text Domain: eml
|
23 |
|
24 |
|
25 |
|
26 |
+
$wpuxss_eml_version = '2.0.4.5';
|
27 |
+
|
28 |
|
29 |
|
30 |
|
35 |
|
36 |
include_once( 'core/options-pages.php' );
|
37 |
}
|
38 |
+
|
39 |
|
40 |
|
41 |
|
523 |
}
|
524 |
}
|
525 |
|
526 |
+
?>
|
languages/eml-nl_NL.po
CHANGED
@@ -719,7 +719,7 @@ msgstr ""
|
|
719 |
msgid ""
|
720 |
"To unlock updates, please enter your license key below. You can see your "
|
721 |
"license key in <a href=\"http://www.wpuxsolutions.com/account/\">Your "
|
722 |
-
"Account</a>. If you don’t have a licence key,
|
723 |
"href=\"http://www.wpuxsolutions.com/pricing/\">purchase it</a>."
|
724 |
msgstr ""
|
725 |
|
@@ -753,7 +753,7 @@ msgstr ""
|
|
753 |
msgid ""
|
754 |
"To unlock updates, please enter your license key on the <a href=\"%s"
|
755 |
"\">Updates</a> page. You can see your license key in <a href=\"%s\">Your "
|
756 |
-
"Account</a>. If you don’t have a licence key,
|
757 |
"href=\"%s\">purchase it</a>."
|
758 |
msgstr ""
|
759 |
|
719 |
msgid ""
|
720 |
"To unlock updates, please enter your license key below. You can see your "
|
721 |
"license key in <a href=\"http://www.wpuxsolutions.com/account/\">Your "
|
722 |
+
"Account</a>. If you don’t have a licence key, you are welcome to <a "
|
723 |
"href=\"http://www.wpuxsolutions.com/pricing/\">purchase it</a>."
|
724 |
msgstr ""
|
725 |
|
753 |
msgid ""
|
754 |
"To unlock updates, please enter your license key on the <a href=\"%s"
|
755 |
"\">Updates</a> page. You can see your license key in <a href=\"%s\">Your "
|
756 |
+
"Account</a>. If you don’t have a licence key, you are welcome to <a "
|
757 |
"href=\"%s\">purchase it</a>."
|
758 |
msgstr ""
|
759 |
|
languages/eml-pl_PL.po
CHANGED
@@ -654,7 +654,7 @@ msgstr ""
|
|
654 |
msgid ""
|
655 |
"To unlock updates, please enter your license key below. You can see your license key "
|
656 |
"in <a href=\"http://www.wpuxsolutions.com/account/\">Your Account</a>. If you "
|
657 |
-
"don’t have a licence key,
|
658 |
"wpuxsolutions.com/pricing/\">purchase it</a>."
|
659 |
msgstr ""
|
660 |
|
@@ -688,7 +688,7 @@ msgstr ""
|
|
688 |
msgid ""
|
689 |
"To unlock updates, please enter your license key on the <a href=\"%s\">Updates</a> "
|
690 |
"page. You can see your license key in <a href=\"%s\">Your Account</a>. If you "
|
691 |
-
"don’t have a licence key,
|
692 |
msgstr ""
|
693 |
|
694 |
#: pro/enhanced-media-library-pro.php:89 pro/enhanced-media-library-pro.php:100
|
654 |
msgid ""
|
655 |
"To unlock updates, please enter your license key below. You can see your license key "
|
656 |
"in <a href=\"http://www.wpuxsolutions.com/account/\">Your Account</a>. If you "
|
657 |
+
"don’t have a licence key, you are welcome to <a href=\"http://www."
|
658 |
"wpuxsolutions.com/pricing/\">purchase it</a>."
|
659 |
msgstr ""
|
660 |
|
688 |
msgid ""
|
689 |
"To unlock updates, please enter your license key on the <a href=\"%s\">Updates</a> "
|
690 |
"page. You can see your license key in <a href=\"%s\">Your Account</a>. If you "
|
691 |
+
"don’t have a licence key, you are welcome to <a href=\"%s\">purchase it</a>."
|
692 |
msgstr ""
|
693 |
|
694 |
#: pro/enhanced-media-library-pro.php:89 pro/enhanced-media-library-pro.php:100
|
languages/eml.pot
CHANGED
@@ -666,7 +666,7 @@ msgstr ""
|
|
666 |
msgid ""
|
667 |
"To unlock updates, please enter your license key below. You can see your "
|
668 |
"license key in <a href=\"http://www.wpuxsolutions.com/account/\">Your "
|
669 |
-
"Account</a>. If you don’t have a licence key,
|
670 |
"href=\"http://www.wpuxsolutions.com/pricing/\">purchase it</a>."
|
671 |
msgstr ""
|
672 |
|
@@ -700,7 +700,7 @@ msgstr ""
|
|
700 |
msgid ""
|
701 |
"To unlock updates, please enter your license key on the <a href=\"%s"
|
702 |
"\">Updates</a> page. You can see your license key in <a href=\"%s\">Your "
|
703 |
-
"Account</a>. If you don’t have a licence key,
|
704 |
"href=\"%s\">purchase it</a>."
|
705 |
msgstr ""
|
706 |
|
666 |
msgid ""
|
667 |
"To unlock updates, please enter your license key below. You can see your "
|
668 |
"license key in <a href=\"http://www.wpuxsolutions.com/account/\">Your "
|
669 |
+
"Account</a>. If you don’t have a licence key, you are welcome to <a "
|
670 |
"href=\"http://www.wpuxsolutions.com/pricing/\">purchase it</a>."
|
671 |
msgstr ""
|
672 |
|
700 |
msgid ""
|
701 |
"To unlock updates, please enter your license key on the <a href=\"%s"
|
702 |
"\">Updates</a> page. You can see your license key in <a href=\"%s\">Your "
|
703 |
+
"Account</a>. If you don’t have a licence key, you are welcome to <a "
|
704 |
"href=\"%s\">purchase it</a>."
|
705 |
msgstr ""
|
706 |
|
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: 4.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 2.0.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -17,6 +17,7 @@ A better management for WordPress Media Library
|
|
17 |
|
18 |
This plugin will be handy for those who need to manage a lot of media files.
|
19 |
|
|
|
20 |
= Media Taxonomies (Categories for Media Files) =
|
21 |
|
22 |
* create unlimited amount of media taxonomies (like categories and tags),
|
@@ -28,6 +29,7 @@ This plugin will be handy for those who need to manage a lot of media files.
|
|
28 |
* filter media files in Media Library / Media Popup by your custom categories,
|
29 |
* get you media category archive page (front-end) working with EML activated
|
30 |
|
|
|
31 |
= MIME Types (Media File Types) =
|
32 |
|
33 |
* create new MIME types (media file types, for example, PDFs, Documents, V-Cards, etc),
|
@@ -36,6 +38,17 @@ This plugin will be handy for those who need to manage a lot of media files.
|
|
36 |
* filter media files by file types in Media Library / Media Popup,
|
37 |
* be in total control of the names of your file type filters
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
> #### Enhanced Media Library PRO
|
40 |
|
41 |
> * The free version of Enhanced Media Library does NOT support bulk features.
|
@@ -54,14 +67,6 @@ This plugin will be handy for those who need to manage a lot of media files.
|
|
54 |
* Select/deselect all media files (within a category) with a single click
|
55 |
* Delete all media files (within a category) right in media popup window
|
56 |
|
57 |
-
= Compatiblity with Other Plugins =
|
58 |
-
|
59 |
-
* Advanced Custom Fields / Advanced Custom Fields PRO
|
60 |
-
* WooCommerce
|
61 |
-
* Meta Slider
|
62 |
-
|
63 |
-
Please let us know if you find any issue with the plugins from the list above or others.
|
64 |
-
|
65 |
|
66 |
= Useful Links =
|
67 |
|
@@ -127,6 +132,17 @@ Right now it is possible via WP_Query ([example of the code](http://wordpress.or
|
|
127 |
|
128 |
== Changelog ==
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
= 2.0.4.3 =
|
131 |
*Release Date - March 21, 2015*
|
132 |
|
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: 4.0
|
5 |
+
Tested up to: 4.2
|
6 |
+
Stable tag: 2.0.4.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
17 |
|
18 |
This plugin will be handy for those who need to manage a lot of media files.
|
19 |
|
20 |
+
|
21 |
= Media Taxonomies (Categories for Media Files) =
|
22 |
|
23 |
* create unlimited amount of media taxonomies (like categories and tags),
|
29 |
* filter media files in Media Library / Media Popup by your custom categories,
|
30 |
* get you media category archive page (front-end) working with EML activated
|
31 |
|
32 |
+
|
33 |
= MIME Types (Media File Types) =
|
34 |
|
35 |
* create new MIME types (media file types, for example, PDFs, Documents, V-Cards, etc),
|
38 |
* filter media files by file types in Media Library / Media Popup,
|
39 |
* be in total control of the names of your file type filters
|
40 |
|
41 |
+
|
42 |
+
= Compatiblity with Other Plugins =
|
43 |
+
|
44 |
+
* Advanced Custom Fields / Advanced Custom Fields PRO
|
45 |
+
* WooCommerce
|
46 |
+
* Meta Slider
|
47 |
+
* Search & Filter
|
48 |
+
|
49 |
+
Please let us know if you find any issue with the plugins from the list above or others.
|
50 |
+
|
51 |
+
|
52 |
> #### Enhanced Media Library PRO
|
53 |
|
54 |
> * The free version of Enhanced Media Library does NOT support bulk features.
|
67 |
* Select/deselect all media files (within a category) with a single click
|
68 |
* Delete all media files (within a category) right in media popup window
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
= Useful Links =
|
72 |
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 2.0.4.5 =
|
136 |
+
*Release Date - April 24, 2015*
|
137 |
+
|
138 |
+
= Compatibility =
|
139 |
+
* Wordpress 4.2 compatibility ensured
|
140 |
+
|
141 |
+
= Bugfixes =
|
142 |
+
* Blank (empty) media library screen fixed for List and Grid views
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
= 2.0.4.3 =
|
147 |
*Release Date - March 21, 2015*
|
148 |
|
wpml-config.xml
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<wpml-config>
|
2 |
-
<taxonomies>
|
3 |
-
<taxonomy translate="1">media_category</taxonomy>
|
4 |
-
</taxonomies>
|
5 |
-
</wpml-config>
|
|
|
|
|
|
|
|
|
|