Version Description
- Remember pagenumber when using bulk actions
- Only use wp_safe_redirect instead of wp_redirect
- Changed donation information. Donations are still possible and very welcome ;-)
Download this release
Release Info
Developer | jeffrey-wp |
Plugin | Media Library Categories |
Version | 1.5.6 |
Comparing to | |
See all releases |
Code changes from version 1.5.5 to 1.5.6
- index.php +5 -5
- readme.txt +7 -3
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.5.
|
7 |
* Author: Jeffrey-WP
|
8 |
* Text Domain: wp-media-library-categories
|
9 |
* Domain Path: /languages
|
@@ -358,7 +358,7 @@ if ( is_admin() ) {
|
|
358 |
|
359 |
// remember pagenumber
|
360 |
$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
|
361 |
-
$sendback =
|
362 |
|
363 |
// remember orderby
|
364 |
if ( isset( $_REQUEST['orderby'] ) ) {
|
@@ -425,7 +425,7 @@ if ( is_admin() ) {
|
|
425 |
|
426 |
wpmediacategory_update_count_callback();
|
427 |
|
428 |
-
|
429 |
exit();
|
430 |
}
|
431 |
add_action( 'load-upload.php', 'wpmediacategory_custom_bulk_action' );
|
@@ -531,9 +531,9 @@ if ( is_admin() ) {
|
|
531 |
echo '/* ]]> */';
|
532 |
echo '</script>';
|
533 |
|
534 |
-
wp_enqueue_script( 'wpmediacategory-media-views', plugins_url( 'js/wpmediacategory-media-views.min.js', __FILE__ ), array( 'media-views' ), '1.5.
|
535 |
}
|
536 |
-
wp_enqueue_style( 'wpmediacategory', plugins_url( 'css/wpmediacategory.min.css', __FILE__ ), array(), '1.5.
|
537 |
}
|
538 |
add_action( 'admin_enqueue_scripts', 'wpmediacategory_enqueue_media_action' );
|
539 |
|
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.5.6
|
7 |
* Author: Jeffrey-WP
|
8 |
* Text Domain: wp-media-library-categories
|
9 |
* Domain Path: /languages
|
358 |
|
359 |
// remember pagenumber
|
360 |
$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
|
361 |
+
$sendback = add_query_arg( 'paged', $pagenum, $sendback );
|
362 |
|
363 |
// remember orderby
|
364 |
if ( isset( $_REQUEST['orderby'] ) ) {
|
425 |
|
426 |
wpmediacategory_update_count_callback();
|
427 |
|
428 |
+
wp_safe_redirect( $sendback ); // perform a safe (local) redirect
|
429 |
exit();
|
430 |
}
|
431 |
add_action( 'load-upload.php', 'wpmediacategory_custom_bulk_action' );
|
531 |
echo '/* ]]> */';
|
532 |
echo '</script>';
|
533 |
|
534 |
+
wp_enqueue_script( 'wpmediacategory-media-views', plugins_url( 'js/wpmediacategory-media-views.min.js', __FILE__ ), array( 'media-views' ), '1.5.6', true );
|
535 |
}
|
536 |
+
wp_enqueue_style( 'wpmediacategory', plugins_url( 'css/wpmediacategory.min.css', __FILE__ ), array(), '1.5.6' );
|
537 |
}
|
538 |
add_action( 'admin_enqueue_scripts', 'wpmediacategory_enqueue_media_action' );
|
539 |
|
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: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -42,7 +42,6 @@ To upload the plugin through WordPress, instead of FTP:
|
|
42 |
|
43 |
= How to use separate categories for the WordPress Media Library (and don't use the same categories as in posts & pages)? =
|
44 |
By default the WordPress Media Library uses the same categories as WordPress does (such as in posts & pages). If you want to use separate categories for the WordPress Media Library add this code to the file functions.php located in your theme or child-theme:
|
45 |
-
Add this code to the file functions.php located in your theme or child-theme:
|
46 |
`/**
|
47 |
* separate media categories from post categories
|
48 |
* use a custom category called 'category_media' for the categories in the media library
|
@@ -82,6 +81,11 @@ Maintaining a plugin and keeping it up to date is hard work. Please support me b
|
|
82 |
|
83 |
== Changelog ==
|
84 |
|
|
|
|
|
|
|
|
|
|
|
85 |
= 1.5.5 =
|
86 |
* Better detection if category is empty in gallery shortcode.
|
87 |
* Use id attribute in gallery shortcode and show attachments in selected category and uploaded to post ID. `[gallery category="my-category-slug" id="123"]`
|
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
|
7 |
+
Stable tag: 1.5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
42 |
|
43 |
= How to use separate categories for the WordPress Media Library (and don't use the same categories as in posts & pages)? =
|
44 |
By default the WordPress Media Library uses the same categories as WordPress does (such as in posts & pages). If you want to use separate categories for the WordPress Media Library add this code to the file functions.php located in your theme or child-theme:
|
|
|
45 |
`/**
|
46 |
* separate media categories from post categories
|
47 |
* use a custom category called 'category_media' for the categories in the media library
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 1.5.6 =
|
85 |
+
* Remember pagenumber when using bulk actions
|
86 |
+
* Only use wp_safe_redirect instead of wp_redirect
|
87 |
+
* Changed donation information. [Donations are still possible and very welcome ;-)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SSNQMST6R28Q2)
|
88 |
+
|
89 |
= 1.5.5 =
|
90 |
* Better detection if category is empty in gallery shortcode.
|
91 |
* Use id attribute in gallery shortcode and show attachments in selected category and uploaded to post ID. `[gallery category="my-category-slug" id="123"]`
|