Media Library Categories - Version 1.9

Version Description

  • Add interface (located under Settings Media) to separate the media categories from the default WordPress categories
Download this release

Release Info

Developer jeffrey-wp
Plugin Icon 128x128 Media Library Categories
Version 1.9
Comparing to
See all releases

Code changes from version 1.8 to 1.9

Files changed (3) hide show
  1. index.php +104 -44
  2. languages/wp-media-library-categories.pot +32 -16
  3. readme.txt +6 -10
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.8
7
  * Author: Jeffrey-WP
8
  * Text Domain: wp-media-library-categories
9
  * Domain Path: /languages
@@ -49,6 +49,7 @@ class wpMediaLibraryCategories {
49
  add_action( 'admin_enqueue_scripts', array( $this, 'wpmediacategory_enqueue_media_action' ) );
50
  add_action( 'wp_ajax_save-attachment-compat', array( $this, 'wpmediacategory_save_attachment_compat' ), 0 );
51
  add_filter( 'attachment_fields_to_edit', array( $this, 'wpmediacategory_attachment_fields_to_edit' ), 10, 2 );
 
52
 
53
  }
54
  }
@@ -81,15 +82,13 @@ class wpMediaLibraryCategories {
81
  // Check transient, if available display notice
82
  if ( get_transient( 'wpmlc-admin-activation-notice' ) ) {
83
 
84
- // Default taxonomy
85
- $taxonomy = 'category';
86
- // Add filter to change the default taxonomy
87
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
88
  if ( $taxonomy == 'category' ) { // check if category hasn't already been changed
89
  ?>
90
  <div class="notice notice-info is-dismissible">
91
  <p><?php _e( 'Thank you for using the <strong>Media Library Categories</strong> plugin.', 'wp-media-library-categories' ); ?></p>
92
- <p><?php _e( 'By default the WordPress Media Library uses the same categories as WordPress does (such as in posts &amp; pages).<br />If you want to use separate categories for the WordPress Media Library take a look at our <a href="https://wordpress.org/plugins/wp-media-library-categories/#faq" target="_blank">Frequently asked questions</a>.', 'wp-media-library-categories' ); ?></p>
93
  </div>
94
  <?php
95
  }
@@ -105,10 +104,8 @@ class wpMediaLibraryCategories {
105
  * @action init
106
  */
107
  public function wpmediacategory_init() {
108
- // Default taxonomy
109
- $taxonomy = 'category';
110
- // Add filter to change the default taxonomy
111
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
112
 
113
  if ( taxonomy_exists( $taxonomy ) ) {
114
  register_taxonomy_for_object_type( $taxonomy, 'attachment' );
@@ -130,10 +127,8 @@ class wpMediaLibraryCategories {
130
  public function wpmediacategory_change_category_update_count_callback() {
131
  global $wp_taxonomies;
132
 
133
- // Default taxonomy
134
- $taxonomy = 'category';
135
- // Add filter to change the default taxonomy
136
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
137
 
138
  if ( $taxonomy == 'category' ) {
139
  if ( ! taxonomy_exists( 'category' ) ) {
@@ -154,10 +149,8 @@ class wpMediaLibraryCategories {
154
  public function wpmediacategory_update_count_callback( $terms = array(), $taxonomy = 'category' ) {
155
  global $wpdb;
156
 
157
- // default taxonomy
158
- $taxonomy = 'category';
159
- // add filter to change the default taxonomy
160
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
161
 
162
  // select id & count from taxonomy
163
  $query = "SELECT term_taxonomy_id, MAX(total) AS total FROM ((
@@ -184,10 +177,8 @@ class wpMediaLibraryCategories {
184
 
185
  if ( isset( $atts['category'] ) ) {
186
 
187
- // Default taxonomy
188
- $taxonomy = 'category';
189
- // Add filter to change the default taxonomy
190
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
191
 
192
  $category = $atts['category'];
193
  $include = isset( $result['include'] ) ? $result['include'] : '';
@@ -291,10 +282,8 @@ class wpMediaLibraryCategories {
291
  */
292
  public function wpmediacategory_set_attachment_category( $post_ID ) {
293
 
294
- // default taxonomy
295
- $taxonomy = 'category';
296
- // add filter to change the default taxonomy
297
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
298
 
299
  // if attachment already have categories, stop here
300
  if ( wp_get_object_terms( $post_ID, $taxonomy ) ) {
@@ -318,10 +307,8 @@ class wpMediaLibraryCategories {
318
  public function wpmediacategory_add_category_filter() {
319
  global $pagenow;
320
  if ( 'upload.php' == $pagenow ) {
321
- // Default taxonomy
322
- $taxonomy = 'category';
323
- // Add filter to change the default taxonomy
324
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
325
  if ( $taxonomy != 'category' ) {
326
  $dropdown_options = array(
327
  'taxonomy' => $taxonomy,
@@ -356,10 +343,8 @@ class wpMediaLibraryCategories {
356
  * @action admin_footer-upload.php
357
  */
358
  public function wpmediacategory_custom_bulk_admin_footer() {
359
- // default taxonomy
360
- $taxonomy = 'category';
361
- // add filter to change the default taxonomy
362
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
363
  $terms = get_terms( $taxonomy, 'hide_empty=0' );
364
  if ( $terms && ! is_wp_error( $terms ) ) :
365
 
@@ -513,14 +498,13 @@ class wpMediaLibraryCategories {
513
  * @action plugin_action_links_*
514
  */
515
  public function wpmediacategory_add_plugin_action_links( $links ) {
516
- // default taxonomy
517
- $taxonomy = 'category';
518
- // add filter to change the default taxonomy
519
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
520
  return array_merge(
521
  array(
522
- 'settings' => '<a href="' . get_bloginfo( 'wpurl' ) . '/wp-admin/edit-tags.php?taxonomy=' . $taxonomy . '&amp;post_type=attachment">' . __( 'Categories', 'wp-media-library-categories' ) . '</a>',
523
- 'premium' => '<a href="https://1.envato.market/c/1206953/275988/4415?subId1=wpmlcp&subId2=plugin&u=https%3A%2F%2Fcodecanyon.net%2Fitem%2Fmedia-library-categories-premium%2F6691290" style="color:#60a559;" target="_blank" title="' . __( 'Try Media Library Categories Premium today - 100% money back guarantee', 'wp-media-library-categories' ) . '">' . __( 'Try Premium Version', 'wp-media-library-categories' ) . '</a>'
 
524
  ),
525
  $links
526
  );
@@ -571,10 +555,8 @@ class wpMediaLibraryCategories {
571
 
572
  if ( wp_script_is( 'media-editor' ) && 'upload.php' == $pagenow ) {
573
 
574
- // Default taxonomy
575
- $taxonomy = 'category';
576
- // Add filter to change the default taxonomy
577
- $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
578
 
579
  if ( $taxonomy != 'category' ) {
580
  $dropdown_options = array(
@@ -729,6 +711,84 @@ class wpMediaLibraryCategories {
729
  return $form_fields;
730
  }
731
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
  }
733
  $wpmedialibrarycategories = new wpMediaLibraryCategories();
734
 
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.9
7
  * Author: Jeffrey-WP
8
  * Text Domain: wp-media-library-categories
9
  * Domain Path: /languages
49
  add_action( 'admin_enqueue_scripts', array( $this, 'wpmediacategory_enqueue_media_action' ) );
50
  add_action( 'wp_ajax_save-attachment-compat', array( $this, 'wpmediacategory_save_attachment_compat' ), 0 );
51
  add_filter( 'attachment_fields_to_edit', array( $this, 'wpmediacategory_attachment_fields_to_edit' ), 10, 2 );
52
+ add_action( 'admin_init', array( $this, 'wpmediacategory_settings_init' ) );
53
 
54
  }
55
  }
82
  // Check transient, if available display notice
83
  if ( get_transient( 'wpmlc-admin-activation-notice' ) ) {
84
 
85
+ // Get taxonomy name
86
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
87
  if ( $taxonomy == 'category' ) { // check if category hasn't already been changed
88
  ?>
89
  <div class="notice notice-info is-dismissible">
90
  <p><?php _e( 'Thank you for using the <strong>Media Library Categories</strong> plugin.', 'wp-media-library-categories' ); ?></p>
91
+ <p><?php _e( 'By default the WordPress Media Library uses the same categories as WordPress does (such as in posts &amp; pages).<br />If you want to use separate categories for the WordPress Media Library you can change this in the <a href="' . admin_url( 'options-media.php#wpmlc_settings' ) . '">media settings</a>.', 'wp-media-library-categories' ); ?></p>
92
  </div>
93
  <?php
94
  }
104
  * @action init
105
  */
106
  public function wpmediacategory_init() {
107
+ // Get taxonomy name
108
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
109
 
110
  if ( taxonomy_exists( $taxonomy ) ) {
111
  register_taxonomy_for_object_type( $taxonomy, 'attachment' );
127
  public function wpmediacategory_change_category_update_count_callback() {
128
  global $wp_taxonomies;
129
 
130
+ // Get taxonomy name
131
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
132
 
133
  if ( $taxonomy == 'category' ) {
134
  if ( ! taxonomy_exists( 'category' ) ) {
149
  public function wpmediacategory_update_count_callback( $terms = array(), $taxonomy = 'category' ) {
150
  global $wpdb;
151
 
152
+ // Get taxonomy name
153
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
154
 
155
  // select id & count from taxonomy
156
  $query = "SELECT term_taxonomy_id, MAX(total) AS total FROM ((
177
 
178
  if ( isset( $atts['category'] ) ) {
179
 
180
+ // Get taxonomy name
181
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
182
 
183
  $category = $atts['category'];
184
  $include = isset( $result['include'] ) ? $result['include'] : '';
282
  */
283
  public function wpmediacategory_set_attachment_category( $post_ID ) {
284
 
285
+ // Get taxonomy name
286
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
287
 
288
  // if attachment already have categories, stop here
289
  if ( wp_get_object_terms( $post_ID, $taxonomy ) ) {
307
  public function wpmediacategory_add_category_filter() {
308
  global $pagenow;
309
  if ( 'upload.php' == $pagenow ) {
310
+ // Get taxonomy name
311
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
312
  if ( $taxonomy != 'category' ) {
313
  $dropdown_options = array(
314
  'taxonomy' => $taxonomy,
343
  * @action admin_footer-upload.php
344
  */
345
  public function wpmediacategory_custom_bulk_admin_footer() {
346
+ // Get taxonomy name
347
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
348
  $terms = get_terms( $taxonomy, 'hide_empty=0' );
349
  if ( $terms && ! is_wp_error( $terms ) ) :
350
 
498
  * @action plugin_action_links_*
499
  */
500
  public function wpmediacategory_add_plugin_action_links( $links ) {
501
+ // Get taxonomy name
502
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
503
  return array_merge(
504
  array(
505
+ 'categories' => '<a href="' . admin_url( 'edit-tags.php?taxonomy=' . $taxonomy . '&post_type=attachment' ) . '">' . __( 'Categories', 'wp-media-library-categories' ) . '</a>',
506
+ 'settings' => '<a href="' . admin_url( 'options-media.php#wpmlc_settings' ) . '">' . __( 'Settings', 'wp-media-library-categories' ) . '</a>',
507
+ 'premium' => '<a href="https://1.envato.market/c/1206953/275988/4415?subId1=wpmlcp&subId2=plugin&u=https%3A%2F%2Fcodecanyon.net%2Fitem%2Fmedia-library-categories-premium%2F6691290" style="color:#60a559;" target="_blank" title="' . __( 'Try Media Library Categories Premium today - 100% money back guarantee', 'wp-media-library-categories' ) . '">' . __( 'Try Premium Version', 'wp-media-library-categories' ) . '</a>'
508
  ),
509
  $links
510
  );
555
 
556
  if ( wp_script_is( 'media-editor' ) && 'upload.php' == $pagenow ) {
557
 
558
+ // Get taxonomy name
559
+ $taxonomy = $this->get_wpmlc_taxonomy();
 
 
560
 
561
  if ( $taxonomy != 'category' ) {
562
  $dropdown_options = array(
711
  return $form_fields;
712
  }
713
 
714
+ /**
715
+ * Get taxonomy name.
716
+ */
717
+ public function get_wpmlc_taxonomy() {
718
+
719
+ // Default taxonomy
720
+ $taxonomy = 'category';
721
+ // Add filter to change the default taxonomy (so we can set the override in a custom script)
722
+ $taxonomy = apply_filters( 'wpmediacategory_taxonomy', $taxonomy );
723
+
724
+ // Get filter from settings page
725
+ $options = get_option( 'wpmlc_settings' );
726
+ if ( ! empty( $options ) && ! empty( $options['wpmediacategory_taxonomy'] ) ) {
727
+ $taxonomy = $options['wpmediacategory_taxonomy'];
728
+ }
729
+
730
+ return $taxonomy;
731
+
732
+ }
733
+
734
+ /**
735
+ * Initialize the settings data.
736
+ *
737
+ * @action admin_init
738
+ */
739
+ public function wpmediacategory_settings_init() {
740
+ register_setting( 'media', 'wpmlc_settings' );
741
+
742
+ add_settings_section(
743
+ 'wpmlc_section',
744
+ '',
745
+ array( $this, 'wpmlc_settings_section' ),
746
+ 'media'
747
+ );
748
+
749
+ add_settings_field(
750
+ 'wpmlc_settings_field',
751
+ __( 'Custom taxonomy slug', 'wp-media-library-categories' ),
752
+ array( $this, 'wpmlc_settings_field' ),
753
+ 'media',
754
+ 'wpmlc_section'
755
+ );
756
+
757
+ }
758
+
759
+ /**
760
+ * Render callback for the section description.
761
+ */
762
+ public function wpmlc_settings_section() {
763
+ echo '<h2 id="wpmlc_settings" class="title">' . __( 'Media Library Categories', 'wp-media-library-categories' ) . '</h2>';
764
+
765
+ $taxonomy_code_override = apply_filters( 'wpmediacategory_taxonomy', 'category' );
766
+ if ( $taxonomy_code_override !== 'category' ) {
767
+ ?>
768
+ <div class="notice notice-warning is-dismissible">
769
+ <p><?php printf( 'You are already using a custom taxonomy slug called "<strong>%s</strong>" in the code of your (child) theme. It will be ignored if you use the custom taxonomy slug below.', $taxonomy_code_override ); ?></p>
770
+ <button type="button" class="notice-dismiss">
771
+ <span class="screen-reader-text"><?php _e( 'Dismiss this notice.' ); ?></span>
772
+ </button>
773
+ </div>
774
+ <?php
775
+ }
776
+
777
+ echo '<p>' . sprintf( 'Separate the media categories from the default WordPress categories by entering a custom taxonomy slug below (different then "<strong>%s</strong>").', 'category' ) . '</p>';
778
+ }
779
+
780
+ /**
781
+ * Render the field position.
782
+ */
783
+ public function wpmlc_settings_field() {
784
+
785
+ // Get taxonomy name
786
+ $taxonomy = $this->get_wpmlc_taxonomy();
787
+
788
+ echo '<input type="text" name="wpmlc_settings[wpmediacategory_taxonomy]" value="' . ( ( $taxonomy === 'category' ) ? '' : $taxonomy ) . '" placeholder="category">';
789
+
790
+ }
791
+
792
  }
793
  $wpmedialibrarycategories = new wpMediaLibraryCategories();
794
 
languages/wp-media-library-categories.pot CHANGED
@@ -6,62 +6,78 @@ msgstr ""
6
  "Project-Id-Version: Media Library Categories\n"
7
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-media-library-"
8
  "categories\n"
9
- "POT-Creation-Date: 2018-11-29 22:05+0100\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
- "X-Generator: Poedit 2.1.1\n"
17
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
18
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
19
- "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
 
20
  "X-Poedit-Basepath: ..\n"
21
  "X-Poedit-SearchPath-0: .\n"
22
 
23
- #: index.php:91
24
  msgid ""
25
  "Thank you for using the <strong>Media Library Categories</strong> plugin."
26
  msgstr ""
27
 
28
- #: index.php:92
29
  msgid ""
30
  "By default the WordPress Media Library uses the same categories as "
31
  "WordPress does (such as in posts &amp; pages).<br />If you want to use "
32
- "separate categories for the WordPress Media Library take a look at our <a "
33
- "href=\"https://wordpress.org/plugins/wp-media-library-categories/#faq\" "
34
- "target=\"_blank\">Frequently asked questions</a>."
35
  msgstr ""
36
 
37
- #: index.php:329 index.php:340 index.php:607
38
  msgid "View all categories"
39
  msgstr ""
40
 
41
- #: index.php:368 index.php:369 index.php:522
42
  msgid "Categories"
43
  msgstr ""
44
 
45
- #: index.php:373
46
  msgid "Add"
47
  msgstr ""
48
 
49
- #: index.php:379
50
  msgid "Remove"
51
  msgstr ""
52
 
53
- #: index.php:384 index.php:385
54
  msgid "Remove all categories"
55
  msgstr ""
56
 
57
- #: index.php:506
58
  msgid "Category changes are saved."
59
  msgstr ""
60
 
61
- #: index.php:523
 
 
 
 
62
  msgid "Try Media Library Categories Premium today - 100% money back guarantee"
63
  msgstr ""
64
 
65
- #: index.php:523
66
  msgid "Try Premium Version"
67
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
6
  "Project-Id-Version: Media Library Categories\n"
7
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-media-library-"
8
  "categories\n"
9
+ "POT-Creation-Date: 2019-11-18 21:49+0100\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
+ "X-Generator: Poedit 2.2.4\n"
17
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
18
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
19
+ "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;"
20
+ "esc_html_x:1,2c\n"
21
  "X-Poedit-Basepath: ..\n"
22
  "X-Poedit-SearchPath-0: .\n"
23
 
24
+ #: index.php:90
25
  msgid ""
26
  "Thank you for using the <strong>Media Library Categories</strong> plugin."
27
  msgstr ""
28
 
29
+ #: index.php:91
30
  msgid ""
31
  "By default the WordPress Media Library uses the same categories as "
32
  "WordPress does (such as in posts &amp; pages).<br />If you want to use "
33
+ "separate categories for the WordPress Media Library you can change this in "
34
+ "the <a href=\""
 
35
  msgstr ""
36
 
37
+ #: index.php:316 index.php:327 index.php:589
38
  msgid "View all categories"
39
  msgstr ""
40
 
41
+ #: index.php:353 index.php:354 index.php:505
42
  msgid "Categories"
43
  msgstr ""
44
 
45
+ #: index.php:358
46
  msgid "Add"
47
  msgstr ""
48
 
49
+ #: index.php:364
50
  msgid "Remove"
51
  msgstr ""
52
 
53
+ #: index.php:369 index.php:370
54
  msgid "Remove all categories"
55
  msgstr ""
56
 
57
+ #: index.php:491
58
  msgid "Category changes are saved."
59
  msgstr ""
60
 
61
+ #: index.php:506
62
+ msgid "Settings"
63
+ msgstr ""
64
+
65
+ #: index.php:507
66
  msgid "Try Media Library Categories Premium today - 100% money back guarantee"
67
  msgstr ""
68
 
69
+ #: index.php:507
70
  msgid "Try Premium Version"
71
  msgstr ""
72
+
73
+ #: index.php:749
74
+ msgid "Custom taxonomy slug"
75
+ msgstr ""
76
+
77
+ #: index.php:761
78
+ msgid "Media Library Categories"
79
+ msgstr ""
80
+
81
+ #: index.php:769
82
+ msgid "Dismiss this notice."
83
+ msgstr ""
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  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: 5.3
7
- Stable tag: 1.8
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -55,14 +55,7 @@ To upload the plugin through WordPress, instead of FTP:
55
  == Frequently Asked Questions ==
56
 
57
  = How to use separate categories for the WordPress Media Library (and don't use the same categories as in posts & pages)? =
58
- 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:
59
- <code>
60
- /**
61
- * separate media categories from post categories
62
- * use a custom category called 'category_media' for the categories in the media library
63
- */
64
- add_filter( 'wpmediacategory_taxonomy', function(){ return 'category_media'; } ); //requires PHP 5.3 or newer
65
- </code>
66
 
67
 
68
  = How to use category in the [gallery] shortcode? =
@@ -104,6 +97,9 @@ Maintaining a plugin and keeping it up to date is hard work. Please support me b
104
 
105
  == Changelog ==
106
 
 
 
 
107
  = 1.8 =
108
  * Indent child categories in checklist media popup
109
 
2
  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: 4.0
6
  Tested up to: 5.3
7
+ Stable tag: 1.9
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
55
  == Frequently Asked Questions ==
56
 
57
  = How to use separate categories for the WordPress Media Library (and don't use the same categories as in posts & pages)? =
58
+ 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 you can use a custom taxonomy, this can be set under Settings → Media (or click on the settings quicklink on the WordPress plugins overview page).
 
 
 
 
 
 
 
59
 
60
 
61
  = How to use category in the [gallery] shortcode? =
97
 
98
  == Changelog ==
99
 
100
+ = 1.9 =
101
+ * Add interface (located under Settings → Media) to separate the media categories from the default WordPress categories
102
+
103
  = 1.8 =
104
  * Indent child categories in checklist media popup
105