Version Description
Release Date - March 09, 2015
Download this release
Release Info
Developer | webbistro |
Plugin | Enhanced Media Library |
Version | 2.0.4.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.4.1 to 2.0.4.2
- core/taxonomies.php +50 -5
- enhanced-media-library.php +2 -2
- readme.txt +10 -1
core/taxonomies.php
CHANGED
@@ -302,10 +302,11 @@ if( ! function_exists( 'wpuxss_eml_restrict_manage_posts' ) ) {
|
|
302 |
|
303 |
function wpuxss_eml_restrict_manage_posts() {
|
304 |
|
305 |
-
global $current_screen
|
|
|
306 |
|
307 |
|
308 |
-
$media_library_mode = get_user_option( 'media_library_mode'
|
309 |
|
310 |
|
311 |
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode )
|
@@ -320,7 +321,7 @@ if( ! function_exists( 'wpuxss_eml_restrict_manage_posts' ) ) {
|
|
320 |
{
|
321 |
echo "<label for='{$taxonomy->name}' class='screen-reader-text'>" . __('Filter by ','eml') . "{$taxonomy->labels->singular_name}</label>";
|
322 |
|
323 |
-
$selected = ( ! $uncategorized && isset( $
|
324 |
|
325 |
wpuxss_eml_dropdown_terms(
|
326 |
array(
|
@@ -491,7 +492,27 @@ if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
|
491 |
global $current_screen;
|
492 |
|
493 |
|
494 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
|
496 |
|
497 |
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode )
|
@@ -503,6 +524,30 @@ if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
|
503 |
$query->query['category'] = $query->query_vars['category'] = $_REQUEST['category'];
|
504 |
}
|
505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
$tax_query = array( 'relation' => 'AND' );
|
507 |
|
508 |
foreach ( get_object_taxonomies( 'attachment','names' ) as $taxonomy )
|
@@ -522,7 +567,7 @@ if( ! function_exists( 'wpuxss_eml_parse_tax_query' ) ) {
|
|
522 |
if ( isset( $query->query_vars[$taxonomy] ) ) unset( $query->query_vars[$taxonomy] );
|
523 |
}
|
524 |
else
|
525 |
-
{
|
526 |
if ( isset( $query->query[$taxonomy] ) && $query->query[$taxonomy] )
|
527 |
{
|
528 |
if( is_numeric( $query->query[$taxonomy] ) )
|
302 |
|
303 |
function wpuxss_eml_restrict_manage_posts() {
|
304 |
|
305 |
+
global $current_screen,
|
306 |
+
$wp_query;
|
307 |
|
308 |
|
309 |
+
$media_library_mode = get_user_option( 'media_library_mode' ) ? get_user_option( 'media_library_mode' ) : 'grid';
|
310 |
|
311 |
|
312 |
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode )
|
321 |
{
|
322 |
echo "<label for='{$taxonomy->name}' class='screen-reader-text'>" . __('Filter by ','eml') . "{$taxonomy->labels->singular_name}</label>";
|
323 |
|
324 |
+
$selected = ( ! $uncategorized && isset( $wp_query->query[$taxonomy->name] ) ) ? $wp_query->query[$taxonomy->name] : 0;
|
325 |
|
326 |
wpuxss_eml_dropdown_terms(
|
327 |
array(
|
492 |
global $current_screen;
|
493 |
|
494 |
|
495 |
+
if ( ! is_admin() ) {
|
496 |
+
return;
|
497 |
+
}
|
498 |
+
|
499 |
+
/**
|
500 |
+
* actually just the fix for
|
501 |
+
*
|
502 |
+
* Fatal error: Call to undefined function get_userdata()
|
503 |
+
* in /wp-includes/user.php on line 360
|
504 |
+
*
|
505 |
+
* caused by, in particular, "Woocommerce Product Tabs" plugin
|
506 |
+
* /admin/class-woocommerce-product-tabs-admin.php
|
507 |
+
* line 56
|
508 |
+
* get_posts()!!!
|
509 |
+
*
|
510 |
+
* very strange error! test it more carefully!
|
511 |
+
*/
|
512 |
+
require_once( ABSPATH . 'wp-includes/pluggable.php' );
|
513 |
+
|
514 |
+
|
515 |
+
$media_library_mode = get_user_option( 'media_library_mode' ) ? get_user_option( 'media_library_mode' ) : 'grid';
|
516 |
|
517 |
|
518 |
if ( isset( $current_screen ) && 'upload' === $current_screen->base && 'list' === $media_library_mode )
|
524 |
$query->query['category'] = $query->query_vars['category'] = $_REQUEST['category'];
|
525 |
}
|
526 |
|
527 |
+
if ( isset( $query->query_vars['taxonomy'] ) && isset( $query->query_vars['term'] ) )
|
528 |
+
{
|
529 |
+
$tax = $query->query_vars['taxonomy'];
|
530 |
+
$term = get_term_by( 'slug', $query->query_vars['term'], $tax );
|
531 |
+
|
532 |
+
if ( $term )
|
533 |
+
{
|
534 |
+
if ( 'category' == $tax )
|
535 |
+
$tax = 'category_name';
|
536 |
+
|
537 |
+
if ( 'post_tag' == $tax )
|
538 |
+
$tax = 'tag';
|
539 |
+
|
540 |
+
$query->query_vars[$tax] = $term->term_id;
|
541 |
+
$query->query[$tax] = $term->term_id;
|
542 |
+
|
543 |
+
unset( $query->query_vars['taxonomy'] );
|
544 |
+
unset( $query->query_vars['term'] );
|
545 |
+
|
546 |
+
unset( $query->query['taxonomy'] );
|
547 |
+
unset( $query->query['term'] );
|
548 |
+
}
|
549 |
+
}
|
550 |
+
|
551 |
$tax_query = array( 'relation' => 'AND' );
|
552 |
|
553 |
foreach ( get_object_taxonomies( 'attachment','names' ) as $taxonomy )
|
567 |
if ( isset( $query->query_vars[$taxonomy] ) ) unset( $query->query_vars[$taxonomy] );
|
568 |
}
|
569 |
else
|
570 |
+
{
|
571 |
if ( isset( $query->query[$taxonomy] ) && $query->query[$taxonomy] )
|
572 |
{
|
573 |
if( is_numeric( $query->query[$taxonomy] ) )
|
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,7 @@ global $wp_version,
|
|
23 |
|
24 |
|
25 |
|
26 |
-
$wpuxss_eml_version = '2.0.4.
|
27 |
|
28 |
|
29 |
|
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.2
|
7 |
Author: wpUXsolutions
|
8 |
Author URI: http://wpUXsolutions.com
|
9 |
Text Domain: eml
|
23 |
|
24 |
|
25 |
|
26 |
+
$wpuxss_eml_version = '2.0.4.2';
|
27 |
|
28 |
|
29 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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.1.1
|
6 |
-
Stable tag: 2.0.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -127,6 +127,15 @@ Right now it is possible via WP_Query ([example of the code](http://wordpress.or
|
|
127 |
|
128 |
== Changelog ==
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
= 2.0.4.1 =
|
131 |
*Release Date - March 07, 2015*
|
132 |
|
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.1.1
|
6 |
+
Stable tag: 2.0.4.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
127 |
|
128 |
== Changelog ==
|
129 |
|
130 |
+
= 2.0.4.2 =
|
131 |
+
*Release Date - March 09, 2015*
|
132 |
+
|
133 |
+
= Bugfixes =
|
134 |
+
* The bug with "Fatal error: Call to undefined function get_userdata() in /wp-includes/user.php on line 360" fixed [Support Request](https://wordpress.org/support/topic/error-message-after-updating-3)
|
135 |
+
* The bug with incorrect filtering in Media Library List View fixed (when clicking directly on a media category name)
|
136 |
+
|
137 |
+
|
138 |
+
|
139 |
= 2.0.4.1 =
|
140 |
*Release Date - March 07, 2015*
|
141 |
|