Version Description
- Support for WordPress 4.2
- Security enhancement for add_query_arg
- remember selected category
Download this release
Release Info
Developer | jeffrey-wp |
Plugin | Media Library Categories |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.0 to 1.5.1
- css/wpmediacategory.css +0 -6
- css/wpmediacategory.min.css +1 -1
- index.php +10 -7
- readme.txt +7 -2
css/wpmediacategory.css
CHANGED
@@ -1,9 +1,3 @@
|
|
1 |
-
|
2 |
-
.mode-grid .wpmediacategory-filter {
|
3 |
-
float: left;
|
4 |
-
}
|
5 |
-
|
6 |
-
|
7 |
/* media-toolbar */
|
8 |
.attachments-browser .media-toolbar {
|
9 |
height: auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/* media-toolbar */
|
2 |
.attachments-browser .media-toolbar {
|
3 |
height: auto;
|
css/wpmediacategory.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.
|
1 |
+
.attachments-browser .media-toolbar{height:auto}.attachments-browser .attachments,.attachments-browser .uploader-inline{top:72px}.compat-item .term-list{background-color:#fff;border:1px solid #dfdfdf;border-radius:3px;margin:0 0 10px;padding:10px 10px 5px}.compat-item .term-list li{line-height:22px}.compat-item .term-list li input[type=checkbox]{margin:-4px 4px 0 0!important;width:auto}.compat-item .term-list li input[type=checkbox]:indeterminate:before{content:'\f147';color:#CBCBCB;display:inline-block;float:left;font:400 21px/1 dashicons;margin:-3px 0 0 -4px;speak:none;vertical-align:middle;width:16px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.compat-item .term-list .children{margin:5px 0 0 20px}
|
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.5.
|
7 |
* Author: Jeffrey-WP
|
8 |
* Author URI: http://codecanyon.net/user/jeffrey-wp/?ref=jeffrey-wp
|
9 |
*/
|
@@ -214,6 +214,9 @@ if ( is_admin() ) {
|
|
214 |
}
|
215 |
|
216 |
$value = ( $args['value']=='slug' ? $category->slug : $category->term_id );
|
|
|
|
|
|
|
217 |
|
218 |
$output .= '<option class="level-' . $depth . '" value="' . $value . '"';
|
219 |
if ( $value === (string) $args['selected'] ) {
|
@@ -335,22 +338,22 @@ if ( is_admin() ) {
|
|
335 |
|
336 |
// remember pagenumber
|
337 |
$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
|
338 |
-
$sendback = add_query_arg( 'paged', $pagenum, $sendback );
|
339 |
|
340 |
// remember orderby
|
341 |
if ( isset( $_REQUEST['orderby'] ) ) {
|
342 |
$sOrderby = $_REQUEST['orderby'];
|
343 |
-
$sendback = add_query_arg( 'orderby', $sOrderby, $sendback );
|
344 |
}
|
345 |
// remember order
|
346 |
if ( isset( $_REQUEST['order'] ) ) {
|
347 |
$sOrder = $_REQUEST['order'];
|
348 |
-
$sendback = add_query_arg( 'order', $sOrder, $sendback );
|
349 |
}
|
350 |
// remember author
|
351 |
if ( isset( $_REQUEST['author'] ) ) {
|
352 |
$sOrderby = $_REQUEST['author'];
|
353 |
-
$sendback = add_query_arg( 'author', $sOrderby, $sendback );
|
354 |
}
|
355 |
|
356 |
foreach( $post_ids as $post_id ) {
|
@@ -525,9 +528,9 @@ if ( is_admin() ) {
|
|
525 |
echo '/* ]]> */';
|
526 |
echo '</script>';
|
527 |
|
528 |
-
wp_enqueue_script( 'wpmediacategory-media-views', plugins_url( 'js/wpmediacategory-media-views.min.js', __FILE__ ), array( 'media-views' ), '1.5.
|
529 |
}
|
530 |
-
wp_enqueue_style( 'wpmediacategory', plugins_url( 'css/wpmediacategory.min.css', __FILE__ ), array(), '1.5.
|
531 |
}
|
532 |
add_action( 'admin_enqueue_scripts', 'wpmediacategory_enqueue_media_action' );
|
533 |
|
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.5.1
|
7 |
* Author: Jeffrey-WP
|
8 |
* Author URI: http://codecanyon.net/user/jeffrey-wp/?ref=jeffrey-wp
|
9 |
*/
|
214 |
}
|
215 |
|
216 |
$value = ( $args['value']=='slug' ? $category->slug : $category->term_id );
|
217 |
+
if ( 0 == $args['selected'] && isset( $_GET['category_media'] ) && '' != $_GET['category_media'] ) {
|
218 |
+
$args['selected'] = $_GET['category_media'];
|
219 |
+
}
|
220 |
|
221 |
$output .= '<option class="level-' . $depth . '" value="' . $value . '"';
|
222 |
if ( $value === (string) $args['selected'] ) {
|
338 |
|
339 |
// remember pagenumber
|
340 |
$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
|
341 |
+
$sendback = esc_url( add_query_arg( 'paged', $pagenum, $sendback ) );
|
342 |
|
343 |
// remember orderby
|
344 |
if ( isset( $_REQUEST['orderby'] ) ) {
|
345 |
$sOrderby = $_REQUEST['orderby'];
|
346 |
+
$sendback = esc_url( add_query_arg( 'orderby', $sOrderby, $sendback ) );
|
347 |
}
|
348 |
// remember order
|
349 |
if ( isset( $_REQUEST['order'] ) ) {
|
350 |
$sOrder = $_REQUEST['order'];
|
351 |
+
$sendback = esc_url( add_query_arg( 'order', $sOrder, $sendback ) );
|
352 |
}
|
353 |
// remember author
|
354 |
if ( isset( $_REQUEST['author'] ) ) {
|
355 |
$sOrderby = $_REQUEST['author'];
|
356 |
+
$sendback = esc_url( add_query_arg( 'author', $sOrderby, $sendback ) );
|
357 |
}
|
358 |
|
359 |
foreach( $post_ids as $post_id ) {
|
528 |
echo '/* ]]> */';
|
529 |
echo '</script>';
|
530 |
|
531 |
+
wp_enqueue_script( 'wpmediacategory-media-views', plugins_url( 'js/wpmediacategory-media-views.min.js', __FILE__ ), array( 'media-views' ), '1.5.1', true );
|
532 |
}
|
533 |
+
wp_enqueue_style( 'wpmediacategory', plugins_url( 'css/wpmediacategory.min.css', __FILE__ ), array(), '1.5.1' );
|
534 |
}
|
535 |
add_action( 'admin_enqueue_scripts', 'wpmediacategory_enqueue_media_action' );
|
536 |
|
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.
|
7 |
-
Stable tag: 1.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -78,6 +78,11 @@ Maintaining a plugin and keeping it up to date is hard work. Please support me b
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
|
|
81 |
= 1.5 =
|
82 |
* Support for WordPress 4.1
|
83 |
* Add category checkboxes to attachment details on insert media popup
|
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.3
|
7 |
+
Stable tag: 1.5.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 1.5.1 =
|
82 |
+
* Support for WordPress 4.2
|
83 |
+
* Security enhancement for add_query_arg
|
84 |
+
* remember selected category
|
85 |
+
|
86 |
= 1.5 =
|
87 |
* Support for WordPress 4.1
|
88 |
* Add category checkboxes to attachment details on insert media popup
|