Taxonomy Images - Version 0.9.2

Version Description

Fix old and new media modal opening simultaneously in some circumstances.

Download this release

Release Info

Developer husobj
Plugin Icon 128x128 Taxonomy Images
Version 0.9.2
Comparing to
See all releases

Code changes from version 0.9.1 to 0.9.2

Files changed (4) hide show
  1. CHANGELOG.md +199 -0
  2. readme.md → README.md +24 -120
  3. readme.txt +47 -39
  4. taxonomy-images.php +7 -5
CHANGELOG.md ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+ This project adheres to [Semantic Versioning](http://semver.org/).
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.9.2] - 2015-12-15
8
+
9
+ ### Added
10
+ - Added CHANGELOG.md
11
+
12
+ ### Changed
13
+ - Documentation: Pedantic corrections. Props [Gary Jones](https://profiles.wordpress.org/garyj)
14
+
15
+ ### Fixed
16
+ - Fix old and new media modal opening simultaneously in some circumstances.
17
+
18
+ ## [0.9.1] - 2015-11-17
19
+
20
+ ### Changed
21
+ - Adhere to WordPress PHP coding standards.
22
+
23
+ ### Fixed
24
+ - Fixes media modal not opening on newly created terms.
25
+
26
+ ## [0.9] - 2015-11-10
27
+
28
+ ### Added
29
+ - Added screenshots for WordPress.org
30
+ - Add Spanish translation.
31
+ - Add husobj as a contributor.
32
+
33
+ ### Changed
34
+ - Make images retina sized in the admin.
35
+ - Re-color admin image and icons to fit with more recent versions of WordPress.
36
+ - Stop using deprecated `image_resize()` function.
37
+ - Stop using deprecated `screen_icon()` function.
38
+ - Move JavaScript and CSS files to subfolders.
39
+ - Confirmed minimum WordPress 3.4 required.
40
+
41
+ ### Fixed
42
+ - Add support for WordPress 3.5+ media modal.
43
+
44
+ ## [0.8.0] - 2013-08-06
45
+
46
+ ### Added
47
+ - Add jamiemchale as a contributor.
48
+
49
+ ### Changed
50
+ - Use `jQuery.on()` instead of `jQuery.live()`. Props [jamiemchale](https://profiles.wordpress.org/jamiemchale).
51
+ - Pass an empty array as default second parameter of `taxonomy_images_plugin_get_the_terms()` and `taxonomy_images_plugin_list_the_terms()`.
52
+ - Give the button on the custom admin screen a class of `button-primary`.
53
+ - Store the return value of `get_posts()` in a variable called `$images`. Not sure why, but this should not harm anything.
54
+ - Change license to `GPLv2 or later` for maximum flexibility and compatibility.
55
+ - Random whitespace fixes.
56
+ - Update Documentation.
57
+ - CSS coding standards.
58
+ - Bump version number.
59
+ - Update readme files.
60
+
61
+ ## [0.7.3] - 2011-06-20
62
+
63
+ ### Added
64
+ - Introduced `.pot` file and languages directory.
65
+
66
+ ### Changed
67
+ - Better escaping.
68
+
69
+ ### Fixed
70
+ - Fixed the delete image button on edit-terms.php.
71
+
72
+ ## [0.7.2] - 2011-06-20
73
+
74
+ ### Changed
75
+ - Return data for fullsize images in archive views. [See this thread](https://wordpress.org/support/topic/image-size-full).
76
+
77
+ ## [0.7.1] - 2011-06-01
78
+
79
+ ### Removed
80
+ - Remove unused link code which is throwing an error when no taxonomies support images.
81
+
82
+ ## [0.7] - 2011-05-31
83
+
84
+ ### Added
85
+ - Created a custom filter interface for plugin and theme integration.
86
+ - Lots of inline documentation added.
87
+ - Added custom notices if plugin is used in an unsupported way.
88
+ - Taxonomy modal button now available in search + upload states.
89
+ - Image interface has been added to single term edit screen.
90
+ - Users can now choose which taxonomys have image support.
91
+
92
+ ### Changed
93
+ - All strings are now internationalized.
94
+ - Add image to term functionality mimics "Add Featured Image".
95
+ - All functions are now private.
96
+
97
+ ### Deprecated
98
+ - Shortcode deprecated.
99
+ - All global variables and constants have been removed or deprecated.
100
+
101
+ ### Removed
102
+ - Deprecated function calls removed.
103
+
104
+ ### Fixed
105
+ - No longer breaks display of the [Better Plugin Compatibility Control](https://wordpress.org/plugins/better-plugin-compatibility-control/) plugin.
106
+ - No notices generated by PHP or WordPress.
107
+
108
+ ### Security
109
+ - Security updates.
110
+
111
+ ## 0.6 - Unreleased
112
+
113
+ ### Changed
114
+ - Completely recoded.
115
+
116
+ ## [0.5] - 2010-11-05
117
+
118
+ ### Added
119
+ - Direct link to upload new files from `edit-tag.php` has been introduced.
120
+ - Ability to create an image/term association immediately after upload has been introduced.
121
+ - Users can now delete image/term associations.
122
+
123
+ ### Changed
124
+ - Created standalone javascript files - removed inline scripts.
125
+ - Obsessive compulsive syntax modifications.
126
+ - Localization for strings - still need to "fine-tooth-comb" this.
127
+
128
+ ### Removed
129
+ - Removed all debug functions.
130
+
131
+ ## 0.4.4 - Unreleased
132
+
133
+ ### Fixed
134
+ - `get_image_html()` Now populates the image's `alt` attribute with appropriate data. Props to [jaygoldman](https://wordpress.org/support/profile/jaygoldman).
135
+
136
+ ## 0.4.3 - Unreleased
137
+
138
+ ### Added
139
+ - Support for WordPress 3.0 has been added.
140
+
141
+ ### Changed
142
+ - Removed use of deprecated function `is_taxonomy()` - props to [anointed](https://profiles.wordpress.org/users/anointed).
143
+ - Included a definition for `taxonomy_exists()` function for backwards compatibility with 2.9 branch. This function is new in WordPress version 3.0.
144
+
145
+ ### Removed
146
+ - Support for all beta versions of 3.0 has been dropped.
147
+
148
+ ## 0.4.2 - Unreleased
149
+
150
+ ### Added
151
+ - Support for 2.9 branch has been added again.
152
+
153
+ ### Changed
154
+ - Changed button name from "Category" to "Taxonomy".
155
+
156
+ ## 0.4.1 - Unreleased
157
+
158
+ ### Added
159
+ - Added support for dynamic taxonomy hooks for `_tag_row()`.
160
+
161
+ ### Removed
162
+ - Support for 2.9 branch has been temporarily removed.
163
+
164
+ ## 0.4 - Unreleased
165
+
166
+ ### Added
167
+ - Added "taxonomy_images_shortcode".
168
+
169
+ ### Fixed
170
+ - `get_thumb()` now returns the fullsize URL if there is no appropriate intermediate image.
171
+
172
+ ## 0.3 - Unreleased
173
+
174
+ ### Added
175
+ - Added Version check for PHP5.
176
+ - Added argument `$term_tax_id` to both `print_image_html()` and `get_image_html()`.
177
+
178
+ ### Changed
179
+ - Changed the firing order of every hook utilizing the `category_rows` method to 15. This allows this plugin to be compatible with [Reveal IDs for WP Admin](https://wordpress.org/plugins/reveal-ids-for-wp-admin-25/). Thanks to [Peter Kahoun](https://profiles.wordpress.org/kahi/)
180
+ - `$settings` and `$locale` are now public properties.
181
+ - Object name changed to `$taxonomy_images_plugin`.
182
+
183
+ ### Removed
184
+ - Deleted the `register_deactivation_hook()` function - sorry to all 8 who downloaded this plugin so far :)
185
+
186
+ ## 0.2 - Unreleased
187
+
188
+ ### Added
189
+ - Original Release - Works with WordPress 2.9.1.
190
+
191
+ [Unreleased]: https://github.com/benhuson/Taxonomy-Images/compare/0.9.1...HEAD
192
+ [0.9.1]: https://github.com/benhuson/Taxonomy-Images/compare/0.9...0.9.1
193
+ [0.9]: https://github.com/benhuson/Taxonomy-Images/compare/0.8.0...0.9
194
+ [0.8.0]: https://github.com/benhuson/Taxonomy-Images/compare/0.7.3...0.8.0
195
+ [0.7.3]: https://github.com/benhuson/Taxonomy-Images/compare/0.7.2...0.7.3
196
+ [0.7.2]: https://github.com/benhuson/Taxonomy-Images/compare/0.7.1...0.7.2
197
+ [0.7.1]: https://github.com/benhuson/Taxonomy-Images/compare/0.7...0.7.1
198
+ [0.7]: https://github.com/benhuson/Taxonomy-Images/compare/v0.5...0.7
199
+ [0.5]: https://github.com/benhuson/Taxonomy-Images/tree/v0.5
readme.md → README.md RENAMED
@@ -11,7 +11,7 @@ There are a few filters that you can use in your theme to display the image asso
11
  Display a single image representing the term archive
12
  ----------------------------------------------------
13
 
14
- The following filter will display the image associated with the term asked for in the query string of the url. This filter only works in views that naturally use templates like category.php, tag.php, taxonomy.php and all of their derivatives. Please read about [template hierarchy](http://codex.wordpress.org/Template_Hierarchy) for more information about these templates. The simplest use of this filter looks like:
15
 
16
  ```php
17
  print apply_filters( 'taxonomy-images-queried-term-image', '' );
@@ -21,7 +21,7 @@ This code will generate and print an image tag. It's output can be modifed by pa
21
 
22
  * __after__ _(string)_ - Text to append to the image's HTML.
23
 
24
- * __attr__ _(array)_ - Key/value pairs representing the attributes of the img tag. Available options include: alt, class, src and title. This array will be passed as the fourth parameter to WordPress core function wp_get_attachment_image() without modification.
25
 
26
  * __before__ _(string)_ - Text to prepend to the image's HTML.
27
 
@@ -59,7 +59,7 @@ If you need to get the full object of the image, you may want to use:
59
  $image = apply_filters( 'taxonomy-images-queried-term-image-object', '' );
60
  ```
61
 
62
- If you need to get the url to the image, you may want to use the following:
63
 
64
  ```php
65
  $image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' );
@@ -98,19 +98,19 @@ print apply_filters( 'taxonomy-images-list-the-terms', '' );
98
 
99
  This filter accepts an optional third parameter that you can use to customize its output. It is an array which recognizes the following keys:
100
 
101
- * __after__ _(string)_ - Text to append to the output. Default value is a closing unordered list element.
102
 
103
- * __after_image__ _(string)_ - Text to append to each image. Default value is a closing list-item element.
104
 
105
- * __before__ _(string)_ - Text to prepend to the output. Default value is an open unordered list element with an class attribute of "taxonomy-images-the-terms".
106
 
107
- * __before_image__ _(string)_ - Text to prepend to each image. Default value is an open list-item element.
108
 
109
  * __image_size__ _(string)_ - Any registered image size. Values will vary from installation to installation. Image sizes defined in core include: "thumbnail", "medium" and "large". "full" may also be used to get the unmodified image that was uploaded. Defaults to "thumbnail".
110
 
111
- * __post_id__ _(int)_ - The post to retrieve terms from. Defaults to the ID property of the global $post object.
112
 
113
- * __taxonomy__ _(string)_ - Name of a registered taxonomy to return terms from. Defaults to "category".
114
 
115
  Here's an example of what a fully customized version of this filter might look like:
116
 
@@ -129,13 +129,13 @@ print apply_filters( 'taxonomy-images-list-the-terms', '', array(
129
  Working with all terms of a given taxonomy
130
  ------------------------------------------
131
 
132
- You will want to use the 'taxonomy-images-get-terms' filter. This filter is basically a wrapper for WordPress core function [get_terms()](http://codex.wordpress.org/Function_Reference/get_terms). It will return an array of enhanced term objects: each term object will have a custom property named image_id which is an integer representing the database ID of the image associated with the term. This filter can be used to create custom lists of terms. Here's what it's default useage looks like:
133
 
134
  ```php
135
  $terms = apply_filters( 'taxonomy-images-get-terms', '' );
136
  ```
137
 
138
- Here is what php's print_r() function may return:
139
 
140
  ```
141
  Array
@@ -156,17 +156,17 @@ Array
156
  )
157
  ```
158
 
159
- As you can see, all of the goodness of get_terms() is there with an added bonus: the image_id parameter!
160
 
161
  This filter recognizes an optional third parameter which is an array of arguments that can be used to modify its output:
162
 
163
- * __cache_images__ _(bool)_ If this value is true all associated images will be queried and cached for later use in various template tags. If it is set to false, this query will be suppressed. Do not set this value to false unless you have a really good reason for doing so :) Default value is true.
164
 
165
- * __having_images__ _(bool)_ If this value is true then only terms that have associated images will be returned. Setting it to false will return all terms. Default value is true.
166
 
167
- * __taxonomy__ _(string)_ Name of a registered taxonomy to return terms from. Multiple taxonomies may be specified by separating each name by a comma. Defaults to "category".
168
 
169
- * __term_args__ _(array)_ Arguments to pass to [get_terms()](http://codex.wordpress.org/Function_Reference/get_terms) as the second parameter. Default value is an empty array.
170
 
171
  Here's an example of a simple custom loop that you can use to display all term images:
172
 
@@ -184,7 +184,7 @@ if ( ! empty( $terms ) ) {
184
  Support
185
  -------
186
 
187
- If you have questions about integrating this plugin into your site, please [add a new thread to the WordPress Support Forum](http://wordpress.org/tags/taxonomy-images?forum_id=10#postform). I try to answer these, but I may not always be able to. In the event that I cannot there may be someone else who can help.
188
 
189
  Bugs, Suggestions
190
  -----------------
@@ -196,9 +196,9 @@ Hook it up yo!
196
 
197
  If you have fallen in love with this plugin and would not be able to sleep without helping out in some way, please see the following list of ways that you can _hook it up!_:
198
 
199
- * __Rate it!__ - Use the star tool on the right-hand sidebar of the [plugin homepage](http://wordpress.org/extend/plugins/taxonomy-images/).
200
 
201
- * __Let me know if it works__ - Use the _Compatibility_ widget on the [plugin homepage](http://wordpress.org/extend/plugins/taxonomy-images/) to let everyone know that the current version works with your version of WordPress.
202
 
203
  * __Do you Twitter?__ Help promote by using this shortlink: [http://bit.ly/taxonomy-images](http://bit.ly/taxonomy-images)
204
 
@@ -213,7 +213,7 @@ Installation
213
  ------------
214
 
215
  1. Download
216
- 1. Unzip the package and upload to your /wp-content/plugins/ directory.
217
  1. Log into WordPress and navigate to the "Plugins" panel.
218
  1. Activate the plugin.
219
  1. Click the "Taxonomy Images" link under the Settings section in the admin menu. There you can select the taxonomies that you would like to add image support for.
@@ -221,6 +221,9 @@ Installation
221
  Upgrade Notice
222
  --------------
223
 
 
 
 
224
  ### 0.9.1
225
  Fixes media modal not opening on newly created terms.
226
 
@@ -236,103 +239,4 @@ Complete rewrite. Better everything. Many bug fixes.
236
  Changelog
237
  ---------
238
 
239
- ### 0.9.1
240
- * __BUGFIX:__ Fixes media modal not opening on newly created terms.
241
- * __UPDATE:__ Adhere to WordPress PHP coding standards.
242
-
243
- ### 0.9
244
- * __COMPAT:__ Add support for WordPress 3.5+ media modal.
245
- * __COMPAT:__ Confirmed minimum WordPress 3.4 required.
246
- * __UPDATE:__ Add Spanish translation.
247
- * __UPDATE:__ Make images retina sized in the admin.
248
- * __UPDATE:__ Re-color admin image and icons to fit with more recent versions of WordPress.
249
- * __UPDATE:__ Stop using deprecated image_resize() function.
250
- * __UPDATE:__ Stop using deprecated screen_icon() function.
251
- * __UPDATE:__ Move JavaScript and CSS files to subfolders.
252
- * __UPDATE:__ Added screenshots for WordPress.org
253
- * __UPDATE:__ Add husobj as a contributor.
254
-
255
- ### 0.8.0
256
- * __COMPAT:__ Use jQuery.on() instead of jQuery.live(). Props [jamiemchale](http://profiles.wordpress.org/jamiemchale).
257
- * __UPDATE:__ Pass an empty array as default second parameter of `taxonomy_images_plugin_get_the_terms()` and `taxonomy_images_plugin_list_the_terms()`.
258
- * __UPDATE:__ Give the button on the custom admin screen a class of `button-primary`.
259
- * __UPDATE:__ Store the return value of `get_posts()` in a variable called `$images`. Not sure why, but this should not harm anything.
260
- * __UPDATE:__ Change license to GPLv2 or later for maximum flexibility and compatibility.
261
- * __UPDATE:__ Random whitespace fixes.
262
- * __UPDATE:__ Update Documentation.
263
- * __UPDATE:__ CSS coding standards.
264
- * __UPDATE:__ Bump version number.
265
- * __UPDATE:__ Update readme files.
266
- * __UPDATE:__ Add jamiemchale as a contributor.
267
-
268
- ### 0.7.3
269
- * __BUGFIX:__ Fixed the delete image button on edit-terms.php.
270
- * __UPDATE:__ Better escaping.
271
- * __UPDATE:__ Introduced pot file and languages directory.
272
-
273
- ### 0.7.2
274
- * __UPDATE:__ Return data for fullsize images in archive views. [See this thread](http://wordpress.org/support/topic/image-size-full).
275
-
276
- ### 0.7.1
277
- * __BUGFIX:__ Remove unused link code which is throwing an error when no taxonomies support images.
278
-
279
- ### 0.7
280
- * __COMPAT:__ No longer breaks display of the [Better Plugin Compatibility Control](http://wordpress.org/extend/plugins/better-plugin-compatibility-control/) plugin.
281
- * __UPDATE:__ Created a custom filter interface for plugin and theme integration.
282
- * __UPDATE:__ Lots of inline documentation added.
283
- * __UPDATE:__ Added custom notices if plugin is used in an unsupported way.
284
- * __UPDATE:__ No notices generated by PHP or WordPress.
285
- * __UPDATE:__ Deprecated function calls removed.
286
- * __UPDATE:__ Security updates.
287
- * __UPDATE:__ All strings are now internationalized.
288
- * __UPDATE:__ Add image to term functionality mimics "Add Featured Image".
289
- * __UPDATE:__ Taxonomy modal button now available in search + upload states.
290
- * __UPDATE:__ Image interface has been added to single term edit screen.
291
- * __UPDATE:__ Users can now choose which taxonomys have image support.
292
- * __UPDATE:__ All functions are now private.
293
- * __UPDATE:__ Shortcode deprecated.
294
- * __UPDATE:__ All global variables and constants have been removed or deprecated.
295
-
296
- ### 0.6
297
- * __UPDATE:__ Completely recoded.
298
- * Never released.
299
-
300
- ### 0.5
301
- * __UPDATE:__ Direct link to upload new files from edit-tag.php has been introduced.
302
- * __UPDATE:__ Ability to create an image/term association immediately after upload has been introduced.
303
- * __UPDATE:__ Users can now delete image/term associations.
304
- * __UPDATE:__ Created standalone javascript files - removed inline scripts.
305
- * __UPDATE:__ Obsessive compulsive syntax modifications.
306
- * __UPDATE:__ Localization for strings - still need to "fine-tooth-comb" this.
307
- * __UPDATE:__ Removed all debug functions.
308
-
309
- ### 0.4.4
310
- * __BUGFIX:__ get_image_html() Now populates the image's alt attribute with appropriate data. Props to [jaygoldman](http://wordpress.org/support/profile/jaygoldman).
311
-
312
- ### 0.4.3
313
- * __COMPAT:__ Removed use of deprecated function is_taxonomy() - props to [anointed](http://profiles.wordpress.org/users/anointed).
314
- * __COMPAT:__ Included a definition for taxonomy_exists() function for backwards compatibility with 2.9 branch. This function is new in WordPress version 3.0.
315
- * __UPDATE:__ Support for WordPress 3.0 has been added. Support for all beta versions of 3.0 has been dropped.
316
-
317
- ### 0.4.2
318
- * __UPDATE:__ Changed button name from "Category" to "Taxonomy".
319
- * __UPDATE:__ Support for 2.9 branch has been added again.
320
-
321
- ### 0.4.1
322
- * __UPDATE:__ Added support for dynamic taxonomy hooks for _tag_row().
323
- * __BROKEN:__ Support for 2.9 branch has been temporarily removed.
324
-
325
- ### 0.4
326
- * __BUGFIX:__ get_thumb() now returns the fullsize url if there is no appropriate intermediate image.
327
- * __UPDATE:__ Added "taxonomy_images_shortcode".
328
-
329
- ### 0.3
330
- * __BUGFIX:__ Deleted the register_deactivation_hook() function - sorry to all 8 who downloaded this plugin so far :)
331
- * __COMPAT:__ Changed the firing order of every hook untilizing the 'category_rows' method to 15. This allows this plugin to be compatible with [Reveal IDs for WP Admin](http://wordpress.org/extend/plugins/reveal-ids-for-wp-admin-25/). Thanks to [Peter Kahoun](http://profiles.wordpress.org/kahi/)
332
- * __COMPAT:__ Added Version check for PHP5.
333
- * __UPDATE:__ `$settings` and `$locale` are now public properties.
334
- * __UPDATE:__ Object name changed to $taxonomy_images_plugin.
335
- * __UPDATE:__ Added argument $term_tax_id to both print_image_html() and get_image_html().
336
-
337
- ### 0.2
338
- * Original Release - Works with WordPress 2.9.1.
11
  Display a single image representing the term archive
12
  ----------------------------------------------------
13
 
14
+ The following filter will display the image associated with the term asked for in the query string of the URL. This filter only works in views that naturally use templates like category.php, tag.php, taxonomy.php and all of their derivatives. Please read about [template hierarchy](http://codex.wordpress.org/Template_Hierarchy) for more information about these templates. The simplest use of this filter looks like:
15
 
16
  ```php
17
  print apply_filters( 'taxonomy-images-queried-term-image', '' );
21
 
22
  * __after__ _(string)_ - Text to append to the image's HTML.
23
 
24
+ * __attr__ _(array)_ - Key / value pairs representing the attributes of the `img` tag. Available options include: `alt`, `class`, `src` and `title`. This array will be passed as the fourth parameter to WordPress core function `wp_get_attachment_image()` without modification.
25
 
26
  * __before__ _(string)_ - Text to prepend to the image's HTML.
27
 
59
  $image = apply_filters( 'taxonomy-images-queried-term-image-object', '' );
60
  ```
61
 
62
+ If you need to get the URL to the image, you may want to use the following:
63
 
64
  ```php
65
  $image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' );
98
 
99
  This filter accepts an optional third parameter that you can use to customize its output. It is an array which recognizes the following keys:
100
 
101
+ * __after__ _(string)_ - Text to append to the output. Default value is a closing unordered list tag.
102
 
103
+ * __after_image__ _(string)_ - Text to append to each image. Default value is a closing list-item tag.
104
 
105
+ * __before__ _(string)_ - Text to prepend to the output. Default value is an open unordered list tag with an class attribute of "taxonomy-images-the-terms".
106
 
107
+ * __before_image__ _(string)_ - Text to prepend to each image. Default value is an open list-item tag.
108
 
109
  * __image_size__ _(string)_ - Any registered image size. Values will vary from installation to installation. Image sizes defined in core include: "thumbnail", "medium" and "large". "full" may also be used to get the unmodified image that was uploaded. Defaults to "thumbnail".
110
 
111
+ * __post_id__ _(int)_ - The post to retrieve terms from. Defaults to the ID property of the global `$post object`.
112
 
113
+ * __taxonomy__ _(string)_ - Name of a registered taxonomy to return terms from. Defaults to `category`.
114
 
115
  Here's an example of what a fully customized version of this filter might look like:
116
 
129
  Working with all terms of a given taxonomy
130
  ------------------------------------------
131
 
132
+ You will want to use the `taxonomy-images-get-terms` filter. This filter is basically a wrapper for WordPress core function [get_terms()](http://codex.wordpress.org/Function_Reference/get_terms). It will return an array of enhanced term objects: each term object will have a custom property named `image_id` which is an integer representing the database ID of the image associated with the term. This filter can be used to create custom lists of terms. Here's what it's default useage looks like:
133
 
134
  ```php
135
  $terms = apply_filters( 'taxonomy-images-get-terms', '' );
136
  ```
137
 
138
+ Here is what php's `print_r()` function may return:
139
 
140
  ```
141
  Array
156
  )
157
  ```
158
 
159
+ As you can see, all of the goodness of `get_terms()` is there with an added bonus: the `image_id` parameter!
160
 
161
  This filter recognizes an optional third parameter which is an array of arguments that can be used to modify its output:
162
 
163
+ * __cache_images__ _(bool)_ If this value is `true` all associated images will be queried and cached for later use in various template tags. If it is set to `false`, this query will be suppressed. Do not set this value to `false` unless you have a really good reason for doing so :) Default value is `true`.
164
 
165
+ * __having_images__ _(bool)_ If this value is `true` then only terms that have associated images will be returned. Setting it to `false` will return all terms. Default value is `true`.
166
 
167
+ * __taxonomy__ _(string)_ Name of a registered taxonomy to return terms from. Multiple taxonomies may be specified by separating each name by a comma. Defaults to `category`.
168
 
169
+ * __term_args__ _(array)_ Arguments to pass to [`get_terms()`](http://codex.wordpress.org/Function_Reference/get_terms) as the second parameter. Default value is an empty array.
170
 
171
  Here's an example of a simple custom loop that you can use to display all term images:
172
 
184
  Support
185
  -------
186
 
187
+ If you have questions about integrating this plugin into your site, please [add a new thread to the WordPress Support Forum](https://wordpress.org/tags/taxonomy-images?forum_id=10#postform). I try to answer these, but I may not always be able to. In the event that I cannot there may be someone else who can help.
188
 
189
  Bugs, Suggestions
190
  -----------------
196
 
197
  If you have fallen in love with this plugin and would not be able to sleep without helping out in some way, please see the following list of ways that you can _hook it up!_:
198
 
199
+ * __Rate it!__ - Use the star tool on the right-hand sidebar of the [plugin homepage](https://wordpress.org/plugins/taxonomy-images/).
200
 
201
+ * __Let me know if it works__ - Use the _Compatibility_ widget on the [plugin homepage](https://wordpress.org/plugins/taxonomy-images/) to let everyone know that the current version works with your version of WordPress.
202
 
203
  * __Do you Twitter?__ Help promote by using this shortlink: [http://bit.ly/taxonomy-images](http://bit.ly/taxonomy-images)
204
 
213
  ------------
214
 
215
  1. Download
216
+ 1. Unzip the package and upload to your `/wp-content/plugins/` directory.
217
  1. Log into WordPress and navigate to the "Plugins" panel.
218
  1. Activate the plugin.
219
  1. Click the "Taxonomy Images" link under the Settings section in the admin menu. There you can select the taxonomies that you would like to add image support for.
221
  Upgrade Notice
222
  --------------
223
 
224
+ ### 0.9.2
225
+ Fix old and new media modal opening simultaneously in some circumstances.
226
+
227
  ### 0.9.1
228
  Fixes media modal not opening on newly created terms.
229
 
239
  Changelog
240
  ---------
241
 
242
+ View a list of all plugin changes in [CHANGELOG.md](https://github.com/benhuson/Taxonomy-Images/blob/master/CHANGELOG.md).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mfields, husobj, jamiemchale
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QSYTTQZBRKQVE
4
  Tags: taxonomy, tag, category, term, image, upload, media
5
  Requires at least: 3.4
6
- Tested up to: 4.3.1
7
- Stable tag: 0.9.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -18,7 +18,7 @@ There are a few filters that you can use in your theme to display the image asso
18
 
19
  = Display a single image representing the term archive =
20
 
21
- The following filter will display the image associated with the term asked for in the query string of the url. This filter only works in views that naturally use templates like category.php, tag.php, taxonomy.php and all of their derivatives. Please read about [template hierarchy](http://codex.wordpress.org/Template_Hierarchy) for more information about these templates. The simplest use of this filter looks like:
22
 
23
  `print apply_filters( 'taxonomy-images-queried-term-image', '' );`
24
 
@@ -26,7 +26,7 @@ This code will generate and print an image tag. It's output can be modifed by pa
26
 
27
  * __after__ _(string)_ - Text to append to the image's HTML.
28
 
29
- * __attr__ _(array)_ - Key/value pairs representing the attributes of the img tag. Available options include: alt, class, src and title. This array will be passed as the fourth parameter to WordPress core function wp_get_attachment_image() without modification.
30
 
31
  * __before__ _(string)_ - Text to prepend to the image's HTML.
32
 
@@ -57,7 +57,7 @@ If you need to get the full object of the image, you may want to use:
57
 
58
  `$image = apply_filters( 'taxonomy-images-queried-term-image-object', '' );`
59
 
60
- If you need to get the url to the image, you may want to use the following:
61
 
62
  `$image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' );`
63
 
@@ -89,19 +89,19 @@ When a post is being displayed you may want to display the images associated wit
89
 
90
  This filter accepts an optional third parameter that you can use to customize its output. It is an array which recognizes the following keys:
91
 
92
- * __after__ _(string)_ - Text to append to the output. Default value is a closing unordered list element.
93
 
94
- * __after_image__ _(string)_ - Text to append to each image. Default value is a closing list-item element.
95
 
96
- * __before__ _(string)_ - Text to prepend to the output. Default value is an open unordered list element with an class attribute of "taxonomy-images-the-terms".
97
 
98
- * __before_image__ _(string)_ - Text to prepend to each image. Default value is an open list-item element.
99
 
100
  * __image_size__ _(string)_ - Any registered image size. Values will vary from installation to installation. Image sizes defined in core include: "thumbnail", "medium" and "large". "full" may also be used to get the unmodified image that was uploaded. Defaults to "thumbnail".
101
 
102
- * __post_id__ _(int)_ - The post to retrieve terms from. Defaults to the ID property of the global $post object.
103
 
104
- * __taxonomy__ _(string)_ - Name of a registered taxonomy to return terms from. Defaults to "category".
105
 
106
  Here's an example of what a fully customized version of this filter might look like:
107
 
@@ -119,11 +119,11 @@ print apply_filters( 'taxonomy-images-list-the-terms', '', array(
119
 
120
  = Working with all terms of a given taxonomy =
121
 
122
- You will want to use the 'taxonomy-images-get-terms' filter. This filter is basically a wrapper for WordPress core function [get_terms()](http://codex.wordpress.org/Function_Reference/get_terms). It will return an array of enhanced term objects: each term object will have a custom property named image_id which is an integer representing the database ID of the image associated with the term. This filter can be used to create custom lists of terms. Here's what it's default useage looks like:
123
 
124
  `$terms = apply_filters( 'taxonomy-images-get-terms', '' );`
125
 
126
- Here is what php's print_r() function may return:
127
 
128
  `
129
  Array
@@ -144,17 +144,17 @@ Array
144
  )
145
  `
146
 
147
- As you can see, all of the goodness of get_terms() is there with an added bonus: the image_id parameter!
148
 
149
  This filter recognizes an optional third parameter which is an array of arguments that can be used to modify its output:
150
 
151
- * __cache_images__ _(bool)_ If this value is true all associated images will be queried and cached for later use in various template tags. If it is set to false, this query will be suppressed. Do not set this value to false unless you have a really good reason for doing so :) Default value is true.
152
 
153
- * __having_images__ _(bool)_ If this value is true then only terms that have associated images will be returned. Setting it to false will return all terms. Default value is true.
154
 
155
- * __taxonomy__ _(string)_ Name of a registered taxonomy to return terms from. Multiple taxonomies may be specified by separating each name by a comma. Defaults to "category".
156
 
157
- * __term_args__ _(array)_ Arguments to pass to [get_terms()](http://codex.wordpress.org/Function_Reference/get_terms) as the second parameter. Default value is an empty array.
158
 
159
  Here's an example of a simple custom loop that you can use to display all term images:
160
 
@@ -171,7 +171,7 @@ if ( ! empty( $terms ) ) {
171
 
172
  = Support =
173
 
174
- If you have questions about integrating this plugin into your site, please [add a new thread to the WordPress Support Forum](http://wordpress.org/tags/taxonomy-images?forum_id=10#postform). I try to answer these, but I may not always be able to. In the event that I cannot there may be someone else who can help.
175
 
176
  = Bugs, Suggestions =
177
 
@@ -181,9 +181,9 @@ Development of this plugin is hosted in a public repository on [Github](https://
181
 
182
  If you have fallen in love with this plugin and would not be able to sleep without helping out in some way, please see the following list of ways that you can _hook it up!_:
183
 
184
- * __Rate it!__ - Use the star tool on the right-hand sidebar of the [plugin homepage](http://wordpress.org/extend/plugins/taxonomy-images/).
185
 
186
- * __Let me know if it works__ - Use the _Compatibility_ widget on the [plugin homepage](http://wordpress.org/extend/plugins/taxonomy-images/) to let everyone know that the current version works with your version of WordPress.
187
 
188
  * __Do you Twitter?__ Help promote by using this shortlink: [http://bit.ly/taxonomy-images](http://bit.ly/taxonomy-images)
189
 
@@ -196,7 +196,7 @@ The original author of this plugin, Michael Fields, released a handful of plugin
196
  == Installation ==
197
 
198
  1. Download
199
- 1. Unzip the package and upload to your /wp-content/plugins/ directory.
200
  1. Log into WordPress and navigate to the "Plugins" panel.
201
  1. Activate the plugin.
202
  1. Click the "Taxonomy Images" link under the Settings section in the admin menu. There you can select the taxonomies that you would like to add image support for.
@@ -209,6 +209,9 @@ The original author of this plugin, Michael Fields, released a handful of plugin
209
 
210
  == Upgrade Notice ==
211
 
 
 
 
212
  = 0.9.1 =
213
  Fixes media modal not opening on newly created terms.
214
 
@@ -223,6 +226,11 @@ Complete rewrite. Better everything. Many bug fixes.
223
 
224
  == Changelog ==
225
 
 
 
 
 
 
226
  = 0.9.1 =
227
  * __BUGFIX:__ Fixes media modal not opening on newly created terms.
228
  * __UPDATE:__ Adhere to WordPress PHP coding standards.
@@ -233,18 +241,18 @@ Complete rewrite. Better everything. Many bug fixes.
233
  * __UPDATE:__ Add Spanish translation.
234
  * __UPDATE:__ Make images retina sized in the admin.
235
  * __UPDATE:__ Re-color admin image and icons to fit with more recent versions of WordPress.
236
- * __UPDATE:__ Stop using deprecated image_resize() function.
237
- * __UPDATE:__ Stop using deprecated screen_icon() function.
238
  * __UPDATE:__ Move JavaScript and CSS files to subfolders.
239
  * __UPDATE:__ Added screenshots for WordPress.org
240
  * __UPDATE:__ Add husobj as a contributor.
241
 
242
  = 0.8.0 =
243
- * __COMPAT:__ Use jQuery.on() instead of jQuery.live(). Props [jamiemchale](http://profiles.wordpress.org/jamiemchale).
244
  * __UPDATE:__ Pass an empty array as default second parameter of `taxonomy_images_plugin_get_the_terms()` and `taxonomy_images_plugin_list_the_terms()`.
245
  * __UPDATE:__ Give the button on the custom admin screen a class of `button-primary`.
246
  * __UPDATE:__ Store the return value of `get_posts()` in a variable called `$images`. Not sure why, but this should not harm anything.
247
- * __UPDATE:__ Change license to GPLv2 or later for maximum flexibility and compatibility.
248
  * __UPDATE:__ Random whitespace fixes.
249
  * __UPDATE:__ Update Documentation.
250
  * __UPDATE:__ CSS coding standards.
@@ -255,16 +263,16 @@ Complete rewrite. Better everything. Many bug fixes.
255
  = 0.7.3 =
256
  * __BUGFIX:__ Fixed the delete image button on edit-terms.php.
257
  * __UPDATE:__ Better escaping.
258
- * __UPDATE:__ Introduced pot file and languages directory.
259
 
260
  = 0.7.2 =
261
- * __UPDATE:__ Return data for fullsize images in archive views. [See this thread](http://wordpress.org/support/topic/image-size-full).
262
 
263
  = 0.7.1 =
264
  * __BUGFIX:__ Remove unused link code which is throwing an error when no taxonomies support images.
265
 
266
  = 0.7 =
267
- * __COMPAT:__ No longer breaks display of the [Better Plugin Compatibility Control](http://wordpress.org/extend/plugins/better-plugin-compatibility-control/) plugin.
268
  * __UPDATE:__ Created a custom filter interface for plugin and theme integration.
269
  * __UPDATE:__ Lots of inline documentation added.
270
  * __UPDATE:__ Added custom notices if plugin is used in an unsupported way.
@@ -285,7 +293,7 @@ Complete rewrite. Better everything. Many bug fixes.
285
  * Never released.
286
 
287
  = 0.5 =
288
- * __UPDATE:__ Direct link to upload new files from edit-tag.php has been introduced.
289
  * __UPDATE:__ Ability to create an image/term association immediately after upload has been introduced.
290
  * __UPDATE:__ Users can now delete image/term associations.
291
  * __UPDATE:__ Created standalone javascript files - removed inline scripts.
@@ -294,11 +302,11 @@ Complete rewrite. Better everything. Many bug fixes.
294
  * __UPDATE:__ Removed all debug functions.
295
 
296
  = 0.4.4 =
297
- * __BUGFIX:__ get_image_html() Now populates the image's alt attribute with appropriate data. Props to [jaygoldman](http://wordpress.org/support/profile/jaygoldman).
298
 
299
  = 0.4.3 =
300
- * __COMPAT:__ Removed use of deprecated function is_taxonomy() - props to [anointed](http://profiles.wordpress.org/users/anointed).
301
- * __COMPAT:__ Included a definition for taxonomy_exists() function for backwards compatibility with 2.9 branch. This function is new in WordPress version 3.0.
302
  * __UPDATE:__ Support for WordPress 3.0 has been added. Support for all beta versions of 3.0 has been dropped.
303
 
304
  = 0.4.2 =
@@ -306,20 +314,20 @@ Complete rewrite. Better everything. Many bug fixes.
306
  * __UPDATE:__ Support for 2.9 branch has been added again.
307
 
308
  = 0.4.1 =
309
- * __UPDATE:__ Added support for dynamic taxonomy hooks for _tag_row().
310
  * __BROKEN:__ Support for 2.9 branch has been temporarily removed.
311
 
312
  = 0.4 =
313
- * __BUGFIX:__ get_thumb() now returns the fullsize url if there is no appropriate intermediate image.
314
  * __UPDATE:__ Added "taxonomy_images_shortcode".
315
 
316
  = 0.3 =
317
- * __BUGFIX:__ Deleted the register_deactivation_hook() function - sorry to all 8 who downloaded this plugin so far :)
318
- * __COMPAT:__ Changed the firing order of every hook untilizing the 'category_rows' method to 15. This allows this plugin to be compatible with [Reveal IDs for WP Admin](http://wordpress.org/extend/plugins/reveal-ids-for-wp-admin-25/). Thanks to [Peter Kahoun](http://profiles.wordpress.org/kahi/)
319
  * __COMPAT:__ Added Version check for PHP5.
320
  * __UPDATE:__ `$settings` and `$locale` are now public properties.
321
- * __UPDATE:__ Object name changed to $taxonomy_images_plugin.
322
- * __UPDATE:__ Added argument $term_tax_id to both print_image_html() and get_image_html().
323
 
324
  = 0.2 =
325
  * Original Release - Works with WordPress 2.9.1.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QSYTTQZBRKQVE
4
  Tags: taxonomy, tag, category, term, image, upload, media
5
  Requires at least: 3.4
6
+ Tested up to: 4.4
7
+ Stable tag: 0.9.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
18
 
19
  = Display a single image representing the term archive =
20
 
21
+ The following filter will display the image associated with the term asked for in the query string of the URL. This filter only works in views that naturally use templates like category.php, tag.php, taxonomy.php and all of their derivatives. Please read about [template hierarchy](http://codex.wordpress.org/Template_Hierarchy) for more information about these templates. The simplest use of this filter looks like:
22
 
23
  `print apply_filters( 'taxonomy-images-queried-term-image', '' );`
24
 
26
 
27
  * __after__ _(string)_ - Text to append to the image's HTML.
28
 
29
+ * __attr__ _(array)_ - Key / value pairs representing the attributes of the `img` tag. Available options include: `alt`, `class`, `src` and `title`. This array will be passed as the fourth parameter to WordPress core function `wp_get_attachment_image()` without modification.
30
 
31
  * __before__ _(string)_ - Text to prepend to the image's HTML.
32
 
57
 
58
  `$image = apply_filters( 'taxonomy-images-queried-term-image-object', '' );`
59
 
60
+ If you need to get the URL to the image, you may want to use the following:
61
 
62
  `$image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' );`
63
 
89
 
90
  This filter accepts an optional third parameter that you can use to customize its output. It is an array which recognizes the following keys:
91
 
92
+ * __after__ _(string)_ - Text to append to the output. Default value is a closing unordered list tag.
93
 
94
+ * __after_image__ _(string)_ - Text to append to each image. Default value is a closing list-item tag.
95
 
96
+ * __before__ _(string)_ - Text to prepend to the output. Default value is an open unordered list tag with an class attribute of "taxonomy-images-the-terms".
97
 
98
+ * __before_image__ _(string)_ - Text to prepend to each image. Default value is an open list-item tag.
99
 
100
  * __image_size__ _(string)_ - Any registered image size. Values will vary from installation to installation. Image sizes defined in core include: "thumbnail", "medium" and "large". "full" may also be used to get the unmodified image that was uploaded. Defaults to "thumbnail".
101
 
102
+ * __post_id__ _(int)_ - The post to retrieve terms from. Defaults to the ID property of the global `$post` object.
103
 
104
+ * __taxonomy__ _(string)_ - Name of a registered taxonomy to return terms from. Defaults to `category`.
105
 
106
  Here's an example of what a fully customized version of this filter might look like:
107
 
119
 
120
  = Working with all terms of a given taxonomy =
121
 
122
+ You will want to use the `taxonomy-images-get-terms` filter. This filter is basically a wrapper for WordPress core function [get_terms()](http://codex.wordpress.org/Function_Reference/get_terms). It will return an array of enhanced term objects: each term object will have a custom property named `image_id` which is an integer representing the database ID of the image associated with the term. This filter can be used to create custom lists of terms. Here's what it's default useage looks like:
123
 
124
  `$terms = apply_filters( 'taxonomy-images-get-terms', '' );`
125
 
126
+ Here is what php's `print_r()` function may return:
127
 
128
  `
129
  Array
144
  )
145
  `
146
 
147
+ As you can see, all of the goodness of `get_terms()` is there with an added bonus: the `image_id` parameter!
148
 
149
  This filter recognizes an optional third parameter which is an array of arguments that can be used to modify its output:
150
 
151
+ * __cache_images__ _(bool)_ If this value is `true` all associated images will be queried and cached for later use in various template tags. If it is set to `false`, this query will be suppressed. Do not set this value to false unless you have a really good reason for doing so :) Default value is `true`.
152
 
153
+ * __having_images__ _(bool)_ If this value is `true` then only terms that have associated images will be returned. Setting it to `false` will return all terms. Default value is `true`.
154
 
155
+ * __taxonomy__ _(string)_ Name of a registered taxonomy to return terms from. Multiple taxonomies may be specified by separating each name by a comma. Defaults to `category`.
156
 
157
+ * __term_args__ _(array)_ Arguments to pass to [`get_terms()`](http://codex.wordpress.org/Function_Reference/get_terms) as the second parameter. Default value is an empty array.
158
 
159
  Here's an example of a simple custom loop that you can use to display all term images:
160
 
171
 
172
  = Support =
173
 
174
+ If you have questions about integrating this plugin into your site, please [add a new thread to the WordPress Support Forum](https://wordpress.org/tags/taxonomy-images?forum_id=10#postform). I try to answer these, but I may not always be able to. In the event that I cannot there may be someone else who can help.
175
 
176
  = Bugs, Suggestions =
177
 
181
 
182
  If you have fallen in love with this plugin and would not be able to sleep without helping out in some way, please see the following list of ways that you can _hook it up!_:
183
 
184
+ * __Rate it!__ - Use the star tool on the right-hand sidebar of the [plugin homepage](https://wordpress.org/plugins/taxonomy-images/).
185
 
186
+ * __Let me know if it works__ - Use the _Compatibility_ widget on the [plugin homepage](https://wordpress.org/plugins/taxonomy-images/) to let everyone know that the current version works with your version of WordPress.
187
 
188
  * __Do you Twitter?__ Help promote by using this shortlink: [http://bit.ly/taxonomy-images](http://bit.ly/taxonomy-images)
189
 
196
  == Installation ==
197
 
198
  1. Download
199
+ 1. Unzip the package and upload to your `/wp-content/plugins/` directory.
200
  1. Log into WordPress and navigate to the "Plugins" panel.
201
  1. Activate the plugin.
202
  1. Click the "Taxonomy Images" link under the Settings section in the admin menu. There you can select the taxonomies that you would like to add image support for.
209
 
210
  == Upgrade Notice ==
211
 
212
+ = 0.9.2 =
213
+ Fix old and new media modal opening simultaneously in some circumstances.
214
+
215
  = 0.9.1 =
216
  Fixes media modal not opening on newly created terms.
217
 
226
 
227
  == Changelog ==
228
 
229
+ = 0.9.2 =
230
+ * __BUGFIX:__ Fix old and new media modal opening simultaneously in some circumstances.
231
+ * __UPDATE:__ Documentation: Pedantic corrections. Props [Gary Jones](https://profiles.wordpress.org/garyj)
232
+ * __UPDATE:__ Added CHANGELOG.md file.
233
+
234
  = 0.9.1 =
235
  * __BUGFIX:__ Fixes media modal not opening on newly created terms.
236
  * __UPDATE:__ Adhere to WordPress PHP coding standards.
241
  * __UPDATE:__ Add Spanish translation.
242
  * __UPDATE:__ Make images retina sized in the admin.
243
  * __UPDATE:__ Re-color admin image and icons to fit with more recent versions of WordPress.
244
+ * __UPDATE:__ Stop using deprecated `image_resize()` function.
245
+ * __UPDATE:__ Stop using deprecated `screen_icon()` function.
246
  * __UPDATE:__ Move JavaScript and CSS files to subfolders.
247
  * __UPDATE:__ Added screenshots for WordPress.org
248
  * __UPDATE:__ Add husobj as a contributor.
249
 
250
  = 0.8.0 =
251
+ * __COMPAT:__ Use `jQuery.on()` instead of `jQuery.live()`. Props [jamiemchale](http://profiles.wordpress.org/jamiemchale).
252
  * __UPDATE:__ Pass an empty array as default second parameter of `taxonomy_images_plugin_get_the_terms()` and `taxonomy_images_plugin_list_the_terms()`.
253
  * __UPDATE:__ Give the button on the custom admin screen a class of `button-primary`.
254
  * __UPDATE:__ Store the return value of `get_posts()` in a variable called `$images`. Not sure why, but this should not harm anything.
255
+ * __UPDATE:__ Change license to `GPLv2 or later` for maximum flexibility and compatibility.
256
  * __UPDATE:__ Random whitespace fixes.
257
  * __UPDATE:__ Update Documentation.
258
  * __UPDATE:__ CSS coding standards.
263
  = 0.7.3 =
264
  * __BUGFIX:__ Fixed the delete image button on edit-terms.php.
265
  * __UPDATE:__ Better escaping.
266
+ * __UPDATE:__ Introduced `.pot` file and languages directory.
267
 
268
  = 0.7.2 =
269
+ * __UPDATE:__ Return data for fullsize images in archive views. [See this thread](https://wordpress.org/support/topic/image-size-full).
270
 
271
  = 0.7.1 =
272
  * __BUGFIX:__ Remove unused link code which is throwing an error when no taxonomies support images.
273
 
274
  = 0.7 =
275
+ * __COMPAT:__ No longer breaks display of the [Better Plugin Compatibility Control](https://wordpress.org/plugins/better-plugin-compatibility-control/) plugin.
276
  * __UPDATE:__ Created a custom filter interface for plugin and theme integration.
277
  * __UPDATE:__ Lots of inline documentation added.
278
  * __UPDATE:__ Added custom notices if plugin is used in an unsupported way.
293
  * Never released.
294
 
295
  = 0.5 =
296
+ * __UPDATE:__ Direct link to upload new files from `edit-tag.php` has been introduced.
297
  * __UPDATE:__ Ability to create an image/term association immediately after upload has been introduced.
298
  * __UPDATE:__ Users can now delete image/term associations.
299
  * __UPDATE:__ Created standalone javascript files - removed inline scripts.
302
  * __UPDATE:__ Removed all debug functions.
303
 
304
  = 0.4.4 =
305
+ * __BUGFIX:__ `get_image_html()` Now populates the image's `alt` attribute with appropriate data. Props to [jaygoldman](https://wordpress.org/support/profile/jaygoldman).
306
 
307
  = 0.4.3 =
308
+ * __COMPAT:__ Removed use of deprecated function `is_taxonomy()` - props to [anointed](https://profiles.wordpress.org/users/anointed).
309
+ * __COMPAT:__ Included a definition for `taxonomy_exists()` function for backwards compatibility with 2.9 branch. This function is new in WordPress version 3.0.
310
  * __UPDATE:__ Support for WordPress 3.0 has been added. Support for all beta versions of 3.0 has been dropped.
311
 
312
  = 0.4.2 =
314
  * __UPDATE:__ Support for 2.9 branch has been added again.
315
 
316
  = 0.4.1 =
317
+ * __UPDATE:__ Added support for dynamic taxonomy hooks for `_tag_row()`.
318
  * __BROKEN:__ Support for 2.9 branch has been temporarily removed.
319
 
320
  = 0.4 =
321
+ * __BUGFIX:__ `get_thumb()` now returns the fullsize URL if there is no appropriate intermediate image.
322
  * __UPDATE:__ Added "taxonomy_images_shortcode".
323
 
324
  = 0.3 =
325
+ * __BUGFIX:__ Deleted the `register_deactivation_hook()` function - sorry to all 8 who downloaded this plugin so far :)
326
+ * __COMPAT:__ Changed the firing order of every hook utilizing the `category_rows` method to 15. This allows this plugin to be compatible with [Reveal IDs for WP Admin](https://wordpress.org/plugins/reveal-ids-for-wp-admin-25/). Thanks to [Peter Kahoun](https://profiles.wordpress.org/kahi/)
327
  * __COMPAT:__ Added Version check for PHP5.
328
  * __UPDATE:__ `$settings` and `$locale` are now public properties.
329
+ * __UPDATE:__ Object name changed to `$taxonomy_images_plugin`.
330
+ * __UPDATE:__ Added argument `$term_tax_id` to both `print_image_html()` and `get_image_html()`.
331
 
332
  = 0.2 =
333
  * Original Release - Works with WordPress 2.9.1.
taxonomy-images.php CHANGED
@@ -4,9 +4,9 @@
4
  Plugin Name: Taxonomy Images
5
  Plugin URI: https://github.com/benhuson/Taxonomy-Images
6
  Description: Associate images from your media library to categories, tags and custom taxonomies.
7
- Version: 0.9.1
8
  Author: Michael Fields, Ben Huson
9
- Author URI: http://wordpress.mfields.org/
10
  License: GNU General Public License v2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -40,7 +40,7 @@ require_once( trailingslashit( dirname( __FILE__ ) ) . 'public-filters.php' );
40
  * @alter 0.7.4
41
  */
42
  function taxonomy_image_plugin_version() {
43
- return '0.9.1';
44
  }
45
 
46
 
@@ -809,9 +809,11 @@ function taxonomy_image_plugin_control_image( $term_id, $taxonomy ) {
809
  $nonce = wp_create_nonce( 'taxonomy-image-plugin-create-association' );
810
  $nonce_remove = wp_create_nonce( 'taxonomy-image-plugin-remove-association' );
811
 
 
 
812
  $o = "\n" . '<div id="' . esc_attr( 'taxonomy-image-control-' . $tt_id ) . '" class="taxonomy-image-control hide-if-no-js">';
813
- $o .= "\n" . '<a class="thickbox taxonomy-image-thumbnail" data-tt-id="' . $tt_id . '" data-attachment-id="' . $attachment_id . '" data-nonce="' . $nonce . '" href="' . esc_url( admin_url( 'media-upload.php' ) . '?type=image&tab=library&post_id=0&TB_iframe=true' ) . '" title="' . esc_attr( sprintf( __( 'Associate an image with the %1$s named &#8220;%2$s&#8221;.', 'taxonomy-images' ), $name, $term->name ) ) . '"><img id="' . esc_attr( 'taxonomy_image_plugin_' . $tt_id ) . '" src="' . esc_url( $img ) . '" alt="" /></a>';
814
- $o .= "\n" . '<a class="control upload thickbox" data-tt-id="' . $tt_id . '" data-attachment-id="' . $attachment_id . '" data-nonce="' . $nonce . '" href="' . esc_url( admin_url( 'media-upload.php' ) . '?type=image&tab=type&post_id=0&TB_iframe=true' ) . '" title="' . esc_attr( sprintf( __( 'Upload a new image for this %s.', 'taxonomy-images' ), $name ) ) . '">' . esc_html__( 'Upload.', 'taxonomy-images' ) . '</a>';
815
  $o .= "\n" . '<a class="control remove' . $hide . '" data-tt-id="' . $tt_id . '" data-nonce="' . $nonce_remove . '" href="#" id="' . esc_attr( 'remove-' . $tt_id ) . '" rel="' . esc_attr( $tt_id ) . '" title="' . esc_attr( sprintf( __( 'Remove image from this %s.', 'taxonomy-images' ), $name ) ) . '">' . esc_html__( 'Delete', 'taxonomy-images' ) . '</a>';
816
  $o .= "\n" . '<input type="hidden" class="tt_id" name="' . esc_attr( 'tt_id-' . $tt_id ) . '" value="' . esc_attr( $tt_id ) . '" />';
817
  $o .= "\n" . '<input type="hidden" class="image_id" name="' . esc_attr( 'image_id-' . $tt_id ) . '" value="' . esc_attr( $attachment_id ) . '" />';
4
  Plugin Name: Taxonomy Images
5
  Plugin URI: https://github.com/benhuson/Taxonomy-Images
6
  Description: Associate images from your media library to categories, tags and custom taxonomies.
7
+ Version: 0.9.2
8
  Author: Michael Fields, Ben Huson
9
+ Author URI: https://github.com/benhuson
10
  License: GNU General Public License v2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
40
  * @alter 0.7.4
41
  */
42
  function taxonomy_image_plugin_version() {
43
+ return '0.9.2';
44
  }
45
 
46
 
809
  $nonce = wp_create_nonce( 'taxonomy-image-plugin-create-association' );
810
  $nonce_remove = wp_create_nonce( 'taxonomy-image-plugin-remove-association' );
811
 
812
+ $thickbox_class = version_compare( get_bloginfo( 'version' ), 3.5 ) >= 0 ? '' : 'thickbox';
813
+
814
  $o = "\n" . '<div id="' . esc_attr( 'taxonomy-image-control-' . $tt_id ) . '" class="taxonomy-image-control hide-if-no-js">';
815
+ $o .= "\n" . '<a class="' . $thickbox_class . ' taxonomy-image-thumbnail" data-tt-id="' . $tt_id . '" data-attachment-id="' . $attachment_id . '" data-nonce="' . $nonce . '" href="' . esc_url( admin_url( 'media-upload.php' ) . '?type=image&tab=library&post_id=0&TB_iframe=true' ) . '" title="' . esc_attr( sprintf( __( 'Associate an image with the %1$s named &#8220;%2$s&#8221;.', 'taxonomy-images' ), $name, $term->name ) ) . '"><img id="' . esc_attr( 'taxonomy_image_plugin_' . $tt_id ) . '" src="' . esc_url( $img ) . '" alt="" /></a>';
816
+ $o .= "\n" . '<a class="control upload ' . $thickbox_class . '" data-tt-id="' . $tt_id . '" data-attachment-id="' . $attachment_id . '" data-nonce="' . $nonce . '" href="' . esc_url( admin_url( 'media-upload.php' ) . '?type=image&tab=type&post_id=0&TB_iframe=true' ) . '" title="' . esc_attr( sprintf( __( 'Upload a new image for this %s.', 'taxonomy-images' ), $name ) ) . '">' . esc_html__( 'Upload.', 'taxonomy-images' ) . '</a>';
817
  $o .= "\n" . '<a class="control remove' . $hide . '" data-tt-id="' . $tt_id . '" data-nonce="' . $nonce_remove . '" href="#" id="' . esc_attr( 'remove-' . $tt_id ) . '" rel="' . esc_attr( $tt_id ) . '" title="' . esc_attr( sprintf( __( 'Remove image from this %s.', 'taxonomy-images' ), $name ) ) . '">' . esc_html__( 'Delete', 'taxonomy-images' ) . '</a>';
818
  $o .= "\n" . '<input type="hidden" class="tt_id" name="' . esc_attr( 'tt_id-' . $tt_id ) . '" value="' . esc_attr( $tt_id ) . '" />';
819
  $o .= "\n" . '<input type="hidden" class="image_id" name="' . esc_attr( 'image_id-' . $tt_id ) . '" value="' . esc_attr( $attachment_id ) . '" />';