Document Gallery - Version 4.1.5

Version Description

  • Bug Fix: For a subset of the users upgrading from 4.0 to 4.1.x, the thumbnail images will have been corrupted during the upgrade process. This release addresses the problem.
Download this release

Release Info

Developer dan.rossiter
Plugin Icon 128x128 Document Gallery
Version 4.1.5
Comparing to
See all releases

Code changes from version 4.1.2 to 4.1.5

CHANGELOG.md ADDED
@@ -0,0 +1,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ == Changelog ==
2
+
3
+ = 4.1.1 & 4.1.2 & 4.1.3 & 4.1.4 =
4
+ * **Bug Fix:** Resolves various errors reported following `4.1` release.
5
+
6
+ = 4.1 =
7
+ * **Enhancement:** At long last, support for Microsoft Office files (Word, PowerPoint, Publisher, Visio), as well as a
8
+ boat-load of [other formats](https://www.thumber.co/about#filetypes), has been re-added to Document Gallery by way of
9
+ integration with the [Thumber.co](https://www.thumber.co) service. For a small fee you can generate images for all of your
10
+ attachments using a service designed specifically to work well with Document Gallery. **For a limited time,
11
+ Thumber.co is offering a free 7-day trial of the basic subscription. If you don't like it, all you have to do is
12
+ cancel and you won't pay a penny.**
13
+ * **Enhancement:** The pagination footer now includes more than just "prev" and "next", allowing for quicker navigation
14
+ of long multi-page galleries. Additionally, the pagination footer will no longer be included if pagination is enabled,
15
+ but there are less than a page-length's worth of attachments in the gallery.
16
+ * **Enhancement:** Massive rewrite of some core logic that had become unmaintainable. This will mean nothing to most
17
+ users, with the noted exception that if you were using the `dg_thumbers` filter you'll need to change some things.
18
+ If this applies to you then you'll want to hold off on upgrading until you've had a chance to rework your usage of the
19
+ filter to map to the new expected values.
20
+
21
+ = 4.0 =
22
+ * **Enhancement:** The WordPress visual editor now displays a full gallery preview.
23
+ * **Enhancement:** You can now paginate your galleries. This is especially useful in large multi-hundred item galleries.
24
+ To enable pagination in your galleries, simply use `limit=##`.
25
+ * **Enhancement:** All CSS & JavaScript is now served minified to ensure the fastest possible load time for your site.
26
+ * **Enhancement:** When using taxonomies to generate your galleries (eg: media categories) you can now use term slug
27
+ instead of the name. *Thanks andremalenfant for suggesting this!*
28
+ * **Enhancement:** The structure of the gallery output has been cleaned up, making it easier to style if you chose to
29
+ use custom CSS. *NOTE: This modified structure may break existing custom CSS or PHP filtering, so be sure to check
30
+ this if you're using either of those features.*
31
+ * **Bug Fix:** The storage of the DG thumbnail cache was very broken. Due to how the cache was originally designed, it
32
+ ran into issues at large scale and on busy sites, which resulted in difficult to track bugs. The entire storage
33
+ mechanism for the cache has been rewritten from the ground up to address this issue, which will result in faster
34
+ gallery generation and more reliable performance.
35
+ * **Bug Fix:** In the thumbnail management tab of the DG settings, sorting by title was broken. This has been fixed.
36
+ * **Bug Fix:** `Limit` was not working in cases where the `ids` or `include` attribute were present. This has been fixed.
37
+ * **Tested Up To:** Document Gallery has been tested in WP 4.4 beta.
38
+
39
+ = 3.5.4 =
40
+ * **Bug Fix:** There were issues in the structure of HTML generated for galleries. This resulted in issues
41
+ with icon generation.
42
+ * **Notice:** For any developers using PHP filters with Document Gallery, the structure of the content being
43
+ filtered in `dg_gallery_template` has changed. Documentation has been updated accordingly.
44
+
45
+ = 3.5.3 =
46
+ * **Bug Fix:** The `images` attribute was not being parsed correctly. Thanks to
47
+ [kalico](https://wordpress.org/support/profile/kalico) for pointing this out!
48
+
49
+ = 3.5.2 =
50
+ * **Bug Fix:** There was an issue with the Media Manager integration preventing using the Document Gallery creation
51
+ within the "Add Media" dialog.
52
+
53
+ = 3.5.1 =
54
+ * **Bug Fix:** There was a minor bug in `3.5` with the new gallery loading logic. It was a compatibility issue with
55
+ other plugins.
56
+
57
+ = 3.5 =
58
+ * **Enhancement:** No more waiting a **LONG** time for your new gallery to load. If you create a new gallery and view
59
+ it, rendering will complete immediately and the thumbnails will be generated after your gallery initially loads.
60
+ This should provide a significantly improved user experience!
61
+ * **Enhancement:** All JS and CSS files are now served compressed, making your WordPress that much faster!
62
+
63
+ = 3.4.2 =
64
+ * **Bug Fix:** Resolves issues in handling manual thumbnail uploads that were introduced in `3.4`.
65
+
66
+ = 3.4 =
67
+ * **Enhancement:** To address recent issues resulting from corrupt plugin options, we're making option validation no longer
68
+ optional. This was an advanced feature that most users were likely not aware of, but it allows us to provide more
69
+ robust option management moving forward. Any options that have been previously corrupted will be reset during upgrading
70
+ to this version of DG.
71
+ * **Enhancement:** Various under-the-hood tweaks in preparation for supporting numerous additional file types
72
+ (eg: MS Office). [Stay tuned.](https://wordpress.org/support/topic/notice-google-drive-viewer-not-working)
73
+ * **Bug Fix:** Log purging was not working correctly. Issue is resolved.
74
+ * **Bug Fix:** There were some CSS changes in WP 3.3 which broke some styling in the DG settings dialogs. These have
75
+ been resolved.
76
+
77
+ = 3.3.1 =
78
+ * **Bug Fix:** A couple of the translation files (Finnish & Ukrainian) were named incorrectly, resulting in them
79
+ never actually being loaded.
80
+
81
+ = 3.3 =
82
+ * **Enhancement:** Developers using the Document Gallery API now have access to new
83
+ values when using the `dg_icon_template` filter.
84
+ (Thanks to [pierowbmstr](https://wordpress.org/support/profile/pierowbmstr)!)
85
+ * **Bug Fix:** Resolved some advanced CSS commands (e.g.: `calc()`) breaking in custom CSS.
86
+ * **Bug Fix:** Some DG options were not being saved correctly resulting in odd behavior
87
+ in some edge cases.
88
+ * **Bug Fix:** Resolved Media Manager integration not being available when first creating
89
+ a post.
90
+
91
+ = 3.2 =
92
+ * **Enhancement:** The long awaited option to open thumbnail links in a new window
93
+ has been added. Simply use `[dg new_window=true]`.
94
+
95
+ = 3.1 =
96
+ * **Enhancement:** The Media Manager can now be used to generate a gallery without
97
+ needing to manually write the shortcode.
98
+ * **Enhancement:** Document Gallery logs can now be rolled over at regular intervals
99
+ to avoid generating massive log files over extended periods of time.
100
+
101
+ = 3.0.2 =
102
+ * **Bug Fix:** The update process was broken in 3.0 -- this resolves that issue.
103
+
104
+ = 3.0 =
105
+ * **Notice:** Google Drive support has been removed as recent changes to how the service functions
106
+ have made it no longer useful in thumbnail generation. A replacement for supporting MS Office
107
+ filetypes (and other filetypes not supported in existing options) is in the works and we hope
108
+ to release it soon.
109
+ * **Enhancement:** Thumbnails can now be manually overridden. To do this, either navigate to
110
+ `Dashboard -> Settings -> Document Gallery -> Thumbnail Management` and add the image
111
+ to the target attachment, or set the thumbnail in the attachment edit window.
112
+ * **Enhancement:** Users can now specify the number of columns for a gallery.
113
+ * **Enhancement:** Users can now create galleries with specific filetype(s) by using the `mime_types`
114
+ option. Thanks for suggesting this functionality,
115
+ [mepmepmep](https://wordpress.org/support/topic/dynamic-gallery-for-all-documents-of-a-certain-type)!
116
+ * **Enhancement:** Options to `include` or `exclude` specific attachments in a gallery have been added.
117
+ * **Enhancement:** The document gallery CSS has been modified to make all icon images responsive.
118
+ We've also added the `dg_use_default_gallery_style` so that developers may completely disabled
119
+ Document Gallery CSS and replace it with his/her own.
120
+ * **Deprecation:** The deprecated `dg_doc_icon` filter has been removed. Developers should use
121
+ `dg_icon_template`.
122
+ * **Deprecation:** The `localpost` option has been deprecated and will be removed at a future date.
123
+ If you are currently using `localpost=false` then it should be replaced by `id=-1`.
124
+
125
+ = 2.3.7 =
126
+ * **Bug Fix:** There was an issue that resulted in an error being thrown in certain situations.
127
+
128
+ = 2.3.6 =
129
+ * **Bug Fix:** There was an issue that resulted in the the Document Gallery Settings view crashing on some systems.
130
+
131
+ = 2.3.5 =
132
+ * **Bug Fix:** There was an issue with how custom CSS was being processed that is resolved in this version.
133
+
134
+ = 2.3.4 =
135
+ * **Bug Fix:** A bug was introduced that broke the `ids` parameter. This is resolved now.
136
+
137
+ = 2.3.3 =
138
+ * **Bug Fix:** Update script was failing following new release. This resolves that issue.
139
+
140
+ = 2.3.2 =
141
+ * **Translation:** Russian and Ukrainian translations have been updated.
142
+
143
+ = 2.3.1 =
144
+ * **Bug Fix:** Resolved a couple of bugs introduced with new `2.3` functionality.
145
+
146
+ = 2.3 =
147
+ * **Enhancement:** Taxonomy support now includes handling for both relationships
148
+ between different taxons and relationships between different terms within a single
149
+ taxon. See installation tab for more details.
150
+ * **Enhancement:** You can now limit how many results are displayed in the gallery with
151
+ the *limit* attribute.
152
+ * **Enhancement:** The *post_type* and *post_status* used when generating
153
+ a gallery are now configurable. (In most cases, these should be left at their default
154
+ values, however advanced users may find a use case for this functionality.)
155
+ * **Enhancement:** Support was added for detecting when your site is running behind a
156
+ firewall or on a local network where Google Drive Viewer will not be able to function.
157
+ * **Enhancement:** Handling of custom CSS was improved. Page load speed should be improved
158
+ in some cases.
159
+ * **Bug Fix:** When Ghostscript chokes on a PDF, it will no longer print the error message
160
+ in the Document Gallery output (instead it will end up in Document Gallery Logging).
161
+
162
+ = 2.2.7 =
163
+ * **Bug Fix:** There was an issue with a few phrases not being translated in the
164
+ admin dialogs. Dates in the logs were also not being properly translated.
165
+
166
+ = 2.2.6 =
167
+ * **Enhancement:** Improved how Ghostscript executable is detected.
168
+
169
+ = 2.2.5 =
170
+ * **Bug Fix:** Resolves a bug where document descriptions were not being displayed
171
+ correctly.
172
+ * **Translation:** Thanks, Marc Liotard and [Traffic Influence](http://www.trafic-influence.com/)
173
+ for updating the French translation to include new phrases throughout the plugin!
174
+
175
+ = 2.2.4 =
176
+ * **Translation:**: Thanks to [mepmepmep](http://wordpress.org/support/profile/mepmepmep)
177
+ who has just updated the Document Gallery Swedish translation!
178
+
179
+ = 2.2.3 =
180
+ * **Enhancement:** This will only be relevant to developers. `%descriptions%` tag
181
+ is now available in the `dg_icon_template` filter.
182
+
183
+ = 2.2.2 =
184
+ * **Bug Fix:** Resolves minor issue in `2.2.1` that resulted in a warning being
185
+ logged while interacting with the new thumbnail management table in the
186
+ Document Gallery settings.
187
+
188
+ = 2.2.1 =
189
+ * **Bug Fix:** PHP installs older than 5.3 were crashing with version 2.2. This release
190
+ patches the issue.
191
+
192
+ = 2.2 =
193
+ * **Note:** This release is the first release where development has been done by
194
+ multiple people. I would like to give a massive thank you to
195
+ [demur](http://wordpress.org/support/profile/demur) who has been an equal
196
+ partner throughout the development of this version. Couldn't have done it without you!
197
+ * **Note:** With multiple developing this project, it made sense to setup
198
+ a formal method to track issues and possible future enhancements. With this in mind
199
+ we've begun to maintain an [issue tracker](https://github.com/thenadz/document-gallery/issues).
200
+ Feel free to read through possible future features and even suggest new features
201
+ you would like to see!
202
+ * **Enhancement:** You can now view which thumbnails have been generated and manually
203
+ delete individual thumbnails from the Document Gallery settings page, located at
204
+ Dashboard -> Settings -> Document Gallery.
205
+ * **Enhancement:* The logging for Document Gallery is now **much** more advanced.
206
+ Logging can be configured and viewed directly from the Document Gallery settings
207
+ page.
208
+ * **Enhancement:** Max width and height of generated thumbnails is now configurable.
209
+ * **Enhancement:** We had a couple of reports of the Document Gallery options
210
+ being corrupted in some installs, so we added functionality to force validation
211
+ of option structure on save. This will not be of much use to most users, but
212
+ will help us track down some of the more difficult to reproduce bugs.
213
+ * **Enhancement:** For developers. New filters have been added to support modifying all
214
+ aspects of HTML generated by the plugin. Look at the Installation tab for documentation
215
+ on these new filters.
216
+
217
+ = 2.1.1 =
218
+ * **Translation:** Thanks to [mepmepmep](http://wordpress.org/support/profile/mepmepmep)
219
+ who has translated Document Gallery into Swedish!
220
+ * **Translation:** Thanks to Marc Liotard who has translated Document Gallery into French!
221
+ * **Note:** If you would like to help translate Document Gallery into another language,
222
+ get started [here](http://wordpress.org/support/topic/seeking-translators)!
223
+ * **Note:** This is an extremely minor release, but big changes are on the
224
+ way in version `2.2`! Stay tuned as it should be going live in the very
225
+ near future. Look for a complete makeover of the admin options including
226
+ lots of new ways to configure DG to best meet your needs!
227
+
228
+ = 2.1 =
229
+ * **Enhancement:** Document Gallery now supports
230
+ [multisite networks](http://codex.wordpress.org/Create_A_Network).
231
+
232
+ = 2.0.10 =
233
+ * **Enhancement:** Ghostscript detection should now work correctly on GoDaddy
234
+ and some other hosts that don't properly setup their executables.
235
+ * **Translation:** Thanks *again* to
236
+ [demur](http://wordpress.org/support/profile/demur) who has translated
237
+ Document Gallery into Russian and Ukrainian! If you would like to help
238
+ translate Document Gallery into another language, get started
239
+ [here](http://wordpress.org/support/topic/seeking-translators)!
240
+
241
+ = 2.0.9 =
242
+ * **Bug Fix:** The `order` attribute was documented and implemented as being `ASC`
243
+ or `DEC`, but the latter should actually have been `DESC`. Documentation and
244
+ implementation for this option has been corrected. Thanks again to
245
+ [demur](http://wordpress.org/support/profile/demur) for catching this!
246
+
247
+ = 2.0.8 =
248
+ * **Enhancement:** Ghostscript will now handle PS and EPS files if enabled.
249
+ * **Bug Fix:** There were a couple of issues in how the `ids` attribute was being
250
+ handled. Thanks, [demur](http://wordpress.org/support/profile/demur) for catching
251
+ these!
252
+
253
+ = 2.0.7 =
254
+ * **Bug Fix:** `2.0.6` did not fully resolve the bug described below. This should.
255
+
256
+ = 2.0.6 =
257
+ * **Bug Fix:** If DG failed to automagically detect the location of the
258
+ Ghostscript binary, manually setting the location did not enable using it.
259
+ Thanks for tracking this bug down,
260
+ [Chris](http://wordpress.org/support/profile/fredd500)!
261
+ * **Minor:** Included various enhancements in handling thumbnail generation
262
+ for image types.
263
+ * **Tested Up To:** Document Gallery has been tested in WP 3.9 (RC 1).
264
+
265
+ = 2.0.5 =
266
+ * **Bug Fix:** Rolling back part of CSS enhancments in 2.0.4 that were causing
267
+ errors on some servers. May revisit at a later date.
268
+
269
+ = 2.0.4 =
270
+ * **Enhancement:** Custom CSS is now loaded faster, meaning faster page loads
271
+ for your users. Tests are showing a speedup of around 30% over where it was
272
+ in the last release.
273
+ * **Enhancement:** All of the default icons were sent through
274
+ [Yahoo! Smush.it](http://www.smushit.com/ysmush.it/), giving a few percentage
275
+ points decrease in size. Thanks for the suggestion,
276
+ [wm](http://wordpress.org/support/profile/webbmasterpianise)!
277
+
278
+ = 2.0.3 =
279
+ * **Enhancement:** Now handles custom user CSS more securely.
280
+ * **Enhancement:** Now handles calling Ghostscript executable more securely.
281
+ * **Enhancement:** Now provides timing information for gallery generation
282
+ when running WordPress in [WP_DEBUG](https://codex.wordpress.org/WP_DEBUG)
283
+ mode. When enabled, DG will log to the PHP error log file.
284
+ * **Info:** Did you know that in tests I performed, Ghostscript (GS) performed
285
+ 350% faster than using Imagick (IM)? Try testing with
286
+ [this file](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf),
287
+ which finished almost instantly using GS, but took multiple minutes when
288
+ using IM on my test server (results may vary). See new FAQ tab to find out why.
289
+
290
+ = 2.0.2 =
291
+ * **Bug Fix:** Imagick was actually never working... My bad -- it is now! Thanks to
292
+ [kaldimar](http://wordpress.org/support/profile/kaldimar) for reporting this.
293
+ * **Enhancement:** Document Gallery en el Español por Andrew de
294
+ [WebHostingHub](http://www.webhostinghub.com/). (To help translate to another
295
+ language, [see here](http://wordpress.org/support/topic/seeking-translators).)
296
+
297
+ = 2.0.1 =
298
+ * **Bug Fix:** Resolves issue with `2.0` where DG options were not properly
299
+ initialized when the plugin was updated. This caused the settings page to
300
+ behave oddly and many other things throughout to not work as expected when
301
+ you updated through the dashboard. Thanks to jawhite & rigbypa for
302
+ [reporting this](http://wordpress.org/support/topic/errors-after-updating-to-20)!
303
+
304
+ = 2.0 =
305
+ * **Enhancement:** This release is a **BIG** deal! We are introducing true
306
+ document thumbnails (rather than the boring static images that were the same
307
+ for every document), meaning that you will be able to generate and display
308
+ thumbnails for most of your documents so your users can see a preview of the
309
+ document before downloading. This has been
310
+ [months in development](http://wordpress.org/support/topic/pdf-thumbnails-instead-of-generic-icon)
311
+ and I really hope that you all enjoy it!
312
+ * **Enhancement:** Document Gallery now has a settings page where you can
313
+ configure the default options for your galleries and chose how thumbnails are
314
+ generated.
315
+ * **Enhancement:** Customizing CSS for your document gallery is now *much easier*.
316
+ If you want to add additional styling, just navigate to `Settings -> Document Gallery`
317
+ in your dashboard and enter valid CSS in the "Custom CSS" textbox. See the changes
318
+ instantly in your galleries!
319
+ * **Enhancement:** Entire plugin is now
320
+ [Internationalization-enabled](https://codex.wordpress.org/I18n_for_WordPress_Developers).
321
+ This means that we can now support users speaking all languages. If you are
322
+ interested in translating Document Gallery into a language that you speak,
323
+ please [let me know](http://wordpress.org/support/topic/seeking-translators)!
324
+ * **Enhancement:** This release saw much of the backend refactored to better
325
+ support future development. Nothing you will notice unless you're digging into
326
+ the code, but it will keep me sane long-term ;)
327
+ * **Note:** The thumbnail generation implementation works very hard to support
328
+ all hosting servers (including Unix and Windows systems). That said, I cannot
329
+ test on all hosts out there, so there is the potential for bugs to appear.
330
+ If you notice something that doesn't look right, please don't hesitate to
331
+ [report the issue](http://wordpress.org/support/plugin/document-gallery)
332
+ so that I can resolve it. Thanks!
333
+
334
+ = 1.4.3 =
335
+ * **Bug Fix:** Resolves minor bug introduced in version 1.4.2. Thanks, tkokholm!
336
+
337
+ = 1.4.2 =
338
+ * **Note:** This release includes an increase in the minimum WP version to 3.5.
339
+ If you have not yet upgraded to at least this version, you should consider doing
340
+ so as future releases include a number of *fantastic* new features as well as
341
+ many security improvements. If you chose not to upgrade, you must stay with
342
+ Document Gallery 1.4.1 or lower until you do. Sorry for the inconvenience!
343
+ * **Bug Fix:** Resolved icons being displayed differently depending on which
344
+ user was currently logged in. (Thanks to
345
+ [Sean](http://wordpress.org/support/topic/error-after-update-19?replies=12#post-5041251)
346
+ for reporting the issue.)
347
+ * **Enhancement:** A number of new icons were added (mainly for the iWork suite
348
+ and source code filetypes) and a number of pre-existing icons were removed if
349
+ they were very similar to another icon.
350
+ * **Under The Hood:** Many, many cool things. Stay tuned for a big reveal in the
351
+ coming weeks!
352
+ PS: If you're really curious, there are some clues in the source code ;)
353
+
354
+ = 1.4.1 =
355
+ * **Bug Fix:** This resolves a bug introduced in `1.4`, which caused a warning
356
+ to be thrown when no attributes were used (i.e.: `[dg]`). (Thanks to
357
+ [wtfbingo](http://wordpress.org/support/topic/error-after-update-19) for
358
+ pointing this out!)
359
+
360
+ = 1.4 =
361
+
362
+ * **New Feature:** This release features the addition of *category/taxonomy* support,
363
+ [as suggested by Pyo](http://wordpress.org/support/topic/sorting-documents-by-categorytag-or-other-taxonomy).
364
+ * **Under The Hood:** The plugin was completely rewritten for this release. Logic
365
+ was cleaned up to make maintenance easier and facilitate some *big* changes
366
+ planned for version 2.0 of Document Gallery.
367
+
368
+ = 1.3.1 =
369
+
370
+ * **Bug Fix:** This resolves a bug introduced in version `1.3`. (Thanks to JKChad
371
+ for pointing this out!)
372
+
373
+ = 1.3 =
374
+
375
+ * **New Feature:** It is now possible to filter the HTML produced to represent
376
+ each individual icon, making it possible to add extra attributes and other
377
+ modifications on the fly as document icons are generated. This will probably
378
+ only be of use to developers and people who don't mind getting their hands
379
+ dirty. *(See bottom **Installation** tab for more details.)*
380
+ * **Enhancement:** There have been a lot of optimizations to the underlying
381
+ plugin code to make it run more efficiently and be easier to read, if you
382
+ are so inclined.
383
+ * **Enhancement:** Changed how images, when included within the gallery, are
384
+ generated so that the format of the icon returned now matches the rest of
385
+ the icons.
386
+
387
+ = 1.2.1 =
388
+
389
+ * **Bug Fix:** Resolved issue with the `ids` attribute in `1.2` not working.
390
+ Sorry about that!
391
+
392
+ = 1.2 =
393
+
394
+ * **New Feature:** Images can now be included alongside documents in a
395
+ document gallery (using `images=true` attribute).
396
+ (Thanks for the suggestion, Luca!)
397
+ * **New Feature:** Attachment ids can now be explicitly listed, allowing for
398
+ documents not attached to a post or page to be included in a document
399
+ gallery (e.g.: `ids=2,42,57,1`). Note that no spaces should be included.
400
+ * **Enhancement:** The CSS stylesheet has been enhanced for more flexibility
401
+ in sizing icons.
402
+
403
+ = 1.1 =
404
+
405
+ * **New Feature:** Included option to link to the attachment page as well as
406
+ to the actual document.
407
+ * **Enhancement:** Added documentation for customizing the appearance of the plugin.
408
+ * **Enhancement:** Many improvements to the backend, including pretty HTML output
409
+ and best practice implementation in calls to WordPress core functions.
410
+
411
+ = 1.0.4 =
412
+
413
+ * **Bug Fix:** Removed extra `div` at bottom when number of documents is
414
+ evenly divisible by 4. (Thanks, joero4ri!)
415
+
416
+ = 1.0.3 =
417
+
418
+ * **Bug Fix:** Resolved issue with detecting plugin directory. (Thanks,
419
+ Brigitte!)
420
+ * **Enhancement:** Minor improvement to how linking to individual
421
+ documents is handled.
422
+
423
+ = 1.0.2 =
424
+
425
+ * **Bug Fix:** Merge for changes in 1.0 did not go through correctly so users
426
+ downloaded the old icon set which broke the plugin. Sorry about that, but
427
+ all is resolved with this release!
428
+
429
+ = 1.0.1 =
430
+
431
+ * **Bug Fix:** Resolved issue with long document titles being cut off in some themes.
432
+
433
+ = 1.0 =
434
+
435
+ * **New Feature:** Plugin now has **36 icons** representing **72 filetypes**!
436
+ * **Enhancement:** Optimized gallery generation (faster!)
437
+ * **Enhancement:** Added fallback to WordPress default icons if you happen to
438
+ include one of the few filetypes not yet supported.
439
+ * **Enhancement:** Changed shortcode to `[dg]` (`[document gallery]` will still
440
+ work for backward compatibility).
441
+ * **Enhancement:** Gave documentation some **much needed** revisions.
442
+
443
+ = 0.8.5 =
444
+
445
+ * **Enhancement:** Added support for
446
+ [OpenDocuments](http://en.wikipedia.org/wiki/OpenDocument).
447
+
448
+ = 0.8 =
449
+
450
+ * **Release:** First public release of Document Gallery.
451
+ * **Feature:** Displays PDF, Word, PowerPoint, Excel, and ZIP documents from a
452
+ given page or post.
453
+ * **Feature:** Documents can be ordered by a number of
454
+ different factors.
README.txt CHANGED
@@ -4,7 +4,7 @@ Tags: attachments, library, thumbnail, documents, gallery, word, pdf
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EE5LWRLG933EN&lc=US&item_name=Document%20Gallery%20Plugin&item_number=document%2dgallery&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 4.1
6
  Tested up to: 4.4
7
- Stable tag: 4.1.2
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -422,8 +422,12 @@ To see a list of features planned for the future as well as to propose your own
422
  ideas for future Document Gallery development, take a look at our
423
  [issue tracker](https://github.com/thenadz/document-gallery/issues).
424
 
425
- = 4.1.1 & 4.1.2 =
426
- * **Bug Fix:** Resolves various errors reported following release.
 
 
 
 
427
 
428
  = 4.1 =
429
  * **Enhancement:** At long last, support for Microsoft Office files (Word, PowerPoint, Publisher, Visio), as well as a
@@ -458,419 +462,4 @@ ideas for future Document Gallery development, take a look at our
458
  * **Bug Fix:** `Limit` was not working in cases where the `ids` or `include` attribute were present. This has been fixed.
459
  * **Tested Up To:** Document Gallery has been tested in WP 4.4 beta.
460
 
461
- = 3.5.4 =
462
- * **Bug Fix:** There were issues in the structure of HTML generated for galleries. This resulted in issues
463
- with icon generation.
464
- * **Notice:** For any developers using PHP filters with Document Gallery, the structure of the content being
465
- filtered in `dg_gallery_template` has changed. Documentation has been updated accordingly.
466
-
467
- = 3.5.3 =
468
- * **Bug Fix:** The `images` attribute was not being parsed correctly. Thanks to
469
- [kalico](https://wordpress.org/support/profile/kalico) for pointing this out!
470
-
471
- = 3.5.2 =
472
- * **Bug Fix:** There was an issue with the Media Manager integration preventing using the Document Gallery creation
473
- within the "Add Media" dialog.
474
-
475
- = 3.5.1 =
476
- * **Bug Fix:** There was a minor bug in `3.5` with the new gallery loading logic. It was a compatibility issue with
477
- other plugins.
478
-
479
- = 3.5 =
480
- * **Enhancement:** No more waiting a **LONG** time for your new gallery to load. If you create a new gallery and view
481
- it, rendering will complete immediately and the thumbnails will be generated after your gallery initially loads.
482
- This should provide a significantly improved user experience!
483
- * **Enhancement:** All JS and CSS files are now served compressed, making your WordPress that much faster!
484
-
485
- = 3.4.2 =
486
- * **Bug Fix:** Resolves issues in handling manual thumbnail uploads that were introduced in `3.4`.
487
-
488
- = 3.4 =
489
- * **Enhancement:** To address recent issues resulting from corrupt plugin options, we're making option validation no longer
490
- optional. This was an advanced feature that most users were likely not aware of, but it allows us to provide more
491
- robust option management moving forward. Any options that have been previously corrupted will be reset during upgrading
492
- to this version of DG.
493
- * **Enhancement:** Various under-the-hood tweaks in preparation for supporting numerous additional file types
494
- (eg: MS Office). [Stay tuned.](https://wordpress.org/support/topic/notice-google-drive-viewer-not-working)
495
- * **Bug Fix:** Log purging was not working correctly. Issue is resolved.
496
- * **Bug Fix:** There were some CSS changes in WP 3.3 which broke some styling in the DG settings dialogs. These have
497
- been resolved.
498
-
499
- = 3.3.1 =
500
- * **Bug Fix:** A couple of the translation files (Finnish & Ukrainian) were named incorrectly, resulting in them
501
- never actually being loaded.
502
-
503
- = 3.3 =
504
- * **Enhancement:** Developers using the Document Gallery API now have access to new
505
- values when using the `dg_icon_template` filter.
506
- (Thanks to [pierowbmstr](https://wordpress.org/support/profile/pierowbmstr)!)
507
- * **Bug Fix:** Resolved some advanced CSS commands (e.g.: `calc()`) breaking in custom CSS.
508
- * **Bug Fix:** Some DG options were not being saved correctly resulting in odd behavior
509
- in some edge cases.
510
- * **Bug Fix:** Resolved Media Manager integration not being available when first creating
511
- a post.
512
-
513
- = 3.2 =
514
- * **Enhancement:** The long awaited option to open thumbnail links in a new window
515
- has been added. Simply use `[dg new_window=true]`.
516
-
517
- = 3.1 =
518
- * **Enhancement:** The Media Manager can now be used to generate a gallery without
519
- needing to manually write the shortcode.
520
- * **Enhancement:** Document Gallery logs can now be rolled over at regular intervals
521
- to avoid generating massive log files over extended periods of time.
522
-
523
- = 3.0.2 =
524
- * **Bug Fix:** The update process was broken in 3.0 -- this resolves that issue.
525
-
526
- = 3.0 =
527
- * **Notice:** Google Drive support has been removed as recent changes to how the service functions
528
- have made it no longer useful in thumbnail generation. A replacement for supporting MS Office
529
- filetypes (and other filetypes not supported in existing options) is in the works and we hope
530
- to release it soon.
531
- * **Enhancement:** Thumbnails can now be manually overridden. To do this, either navigate to
532
- `Dashboard -> Settings -> Document Gallery -> Thumbnail Management` and add the image
533
- to the target attachment, or set the thumbnail in the attachment edit window.
534
- * **Enhancement:** Users can now specify the number of columns for a gallery.
535
- * **Enhancement:** Users can now create galleries with specific filetype(s) by using the `mime_types`
536
- option. Thanks for suggesting this functionality,
537
- [mepmepmep](https://wordpress.org/support/topic/dynamic-gallery-for-all-documents-of-a-certain-type)!
538
- * **Enhancement:** Options to `include` or `exclude` specific attachments in a gallery have been added.
539
- * **Enhancement:** The document gallery CSS has been modified to make all icon images responsive.
540
- We've also added the `dg_use_default_gallery_style` so that developers may completely disabled
541
- Document Gallery CSS and replace it with his/her own.
542
- * **Deprecation:** The deprecated `dg_doc_icon` filter has been removed. Developers should use
543
- `dg_icon_template`.
544
- * **Deprecation:** The `localpost` option has been deprecated and will be removed at a future date.
545
- If you are currently using `localpost=false` then it should be replaced by `id=-1`.
546
-
547
- = 2.3.7 =
548
- * **Bug Fix:** There was an issue that resulted in an error being thrown in certain situations.
549
-
550
- = 2.3.6 =
551
- * **Bug Fix:** There was an issue that resulted in the the Document Gallery Settings view crashing on some systems.
552
-
553
- = 2.3.5 =
554
- * **Bug Fix:** There was an issue with how custom CSS was being processed that is resolved in this version.
555
-
556
- = 2.3.4 =
557
- * **Bug Fix:** A bug was introduced that broke the `ids` parameter. This is resolved now.
558
-
559
- = 2.3.3 =
560
- * **Bug Fix:** Update script was failing following new release. This resolves that issue.
561
-
562
- = 2.3.2 =
563
- * **Translation:** Russian and Ukrainian translations have been updated.
564
-
565
- = 2.3.1 =
566
- * **Bug Fix:** Resolved a couple of bugs introduced with new `2.3` functionality.
567
-
568
- = 2.3 =
569
- * **Enhancement:** Taxonomy support now includes handling for both relationships
570
- between different taxons and relationships between different terms within a single
571
- taxon. See installation tab for more details.
572
- * **Enhancement:** You can now limit how many results are displayed in the gallery with
573
- the *limit* attribute.
574
- * **Enhancement:** The *post_type* and *post_status* used when generating
575
- a gallery are now configurable. (In most cases, these should be left at their default
576
- values, however advanced users may find a use case for this functionality.)
577
- * **Enhancement:** Support was added for detecting when your site is running behind a
578
- firewall or on a local network where Google Drive Viewer will not be able to function.
579
- * **Enhancement:** Handling of custom CSS was improved. Page load speed should be improved
580
- in some cases.
581
- * **Bug Fix:** When Ghostscript chokes on a PDF, it will no longer print the error message
582
- in the Document Gallery output (instead it will end up in Document Gallery Logging).
583
-
584
- = 2.2.7 =
585
- * **Bug Fix:** There was an issue with a few phrases not being translated in the
586
- admin dialogs. Dates in the logs were also not being properly translated.
587
-
588
- = 2.2.6 =
589
- * **Enhancement:** Improved how Ghostscript executable is detected.
590
-
591
- = 2.2.5 =
592
- * **Bug Fix:** Resolves a bug where document descriptions were not being displayed
593
- correctly.
594
- * **Translation:** Thanks, Marc Liotard and [Traffic Influence](http://www.trafic-influence.com/)
595
- for updating the French translation to include new phrases throughout the plugin!
596
-
597
- = 2.2.4 =
598
- * **Translation:**: Thanks to [mepmepmep](http://wordpress.org/support/profile/mepmepmep)
599
- who has just updated the Document Gallery Swedish translation!
600
-
601
- = 2.2.3 =
602
- * **Enhancement:** This will only be relevant to developers. `%descriptions%` tag
603
- is now available in the `dg_icon_template` filter.
604
-
605
- = 2.2.2 =
606
- * **Bug Fix:** Resolves minor issue in `2.2.1` that resulted in a warning being
607
- logged while interacting with the new thumbnail management table in the
608
- Document Gallery settings.
609
-
610
- = 2.2.1 =
611
- * **Bug Fix:** PHP installs older than 5.3 were crashing with version 2.2. This release
612
- patches the issue.
613
-
614
- = 2.2 =
615
- * **Note:** This release is the first release where development has been done by
616
- multiple people. I would like to give a massive thank you to
617
- [demur](http://wordpress.org/support/profile/demur) who has been an equal
618
- partner throughout the development of this version. Couldn't have done it without you!
619
- * **Note:** With multiple developing this project, it made sense to setup
620
- a formal method to track issues and possible future enhancements. With this in mind
621
- we've begun to maintain an [issue tracker](https://github.com/thenadz/document-gallery/issues).
622
- Feel free to read through possible future features and even suggest new features
623
- you would like to see!
624
- * **Enhancement:** You can now view which thumbnails have been generated and manually
625
- delete individual thumbnails from the Document Gallery settings page, located at
626
- Dashboard -> Settings -> Document Gallery.
627
- * **Enhancement:* The logging for Document Gallery is now **much** more advanced.
628
- Logging can be configured and viewed directly from the Document Gallery settings
629
- page.
630
- * **Enhancement:** Max width and height of generated thumbnails is now configurable.
631
- * **Enhancement:** We had a couple of reports of the Document Gallery options
632
- being corrupted in some installs, so we added functionality to force validation
633
- of option structure on save. This will not be of much use to most users, but
634
- will help us track down some of the more difficult to reproduce bugs.
635
- * **Enhancement:** For developers. New filters have been added to support modifying all
636
- aspects of HTML generated by the plugin. Look at the Installation tab for documentation
637
- on these new filters.
638
-
639
- = 2.1.1 =
640
- * **Translation:** Thanks to [mepmepmep](http://wordpress.org/support/profile/mepmepmep)
641
- who has translated Document Gallery into Swedish!
642
- * **Translation:** Thanks to Marc Liotard who has translated Document Gallery into French!
643
- * **Note:** If you would like to help translate Document Gallery into another language,
644
- get started [here](http://wordpress.org/support/topic/seeking-translators)!
645
- * **Note:** This is an extremely minor release, but big changes are on the
646
- way in version `2.2`! Stay tuned as it should be going live in the very
647
- near future. Look for a complete makeover of the admin options including
648
- lots of new ways to configure DG to best meet your needs!
649
-
650
- = 2.1 =
651
- * **Enhancement:** Document Gallery now supports
652
- [multisite networks](http://codex.wordpress.org/Create_A_Network).
653
-
654
- = 2.0.10 =
655
- * **Enhancement:** Ghostscript detection should now work correctly on GoDaddy
656
- and some other hosts that don't properly setup their executables.
657
- * **Translation:** Thanks *again* to
658
- [demur](http://wordpress.org/support/profile/demur) who has translated
659
- Document Gallery into Russian and Ukrainian! If you would like to help
660
- translate Document Gallery into another language, get started
661
- [here](http://wordpress.org/support/topic/seeking-translators)!
662
-
663
- = 2.0.9 =
664
- * **Bug Fix:** The `order` attribute was documented and implemented as being `ASC`
665
- or `DEC`, but the latter should actually have been `DESC`. Documentation and
666
- implementation for this option has been corrected. Thanks again to
667
- [demur](http://wordpress.org/support/profile/demur) for catching this!
668
-
669
- = 2.0.8 =
670
- * **Enhancement:** Ghostscript will now handle PS and EPS files if enabled.
671
- * **Bug Fix:** There were a couple of issues in how the `ids` attribute was being
672
- handled. Thanks, [demur](http://wordpress.org/support/profile/demur) for catching
673
- these!
674
-
675
- = 2.0.7 =
676
- * **Bug Fix:** `2.0.6` did not fully resolve the bug described below. This should.
677
-
678
- = 2.0.6 =
679
- * **Bug Fix:** If DG failed to automagically detect the location of the
680
- Ghostscript binary, manually setting the location did not enable using it.
681
- Thanks for tracking this bug down,
682
- [Chris](http://wordpress.org/support/profile/fredd500)!
683
- * **Minor:** Included various enhancements in handling thumbnail generation
684
- for image types.
685
- * **Tested Up To:** Document Gallery has been tested in WP 3.9 (RC 1).
686
-
687
- = 2.0.5 =
688
- * **Bug Fix:** Rolling back part of CSS enhancments in 2.0.4 that were causing
689
- errors on some servers. May revisit at a later date.
690
-
691
- = 2.0.4 =
692
- * **Enhancement:** Custom CSS is now loaded faster, meaning faster page loads
693
- for your users. Tests are showing a speedup of around 30% over where it was
694
- in the last release.
695
- * **Enhancement:** All of the default icons were sent through
696
- [Yahoo! Smush.it](http://www.smushit.com/ysmush.it/), giving a few percentage
697
- points decrease in size. Thanks for the suggestion,
698
- [wm](http://wordpress.org/support/profile/webbmasterpianise)!
699
-
700
- = 2.0.3 =
701
- * **Enhancement:** Now handles custom user CSS more securely.
702
- * **Enhancement:** Now handles calling Ghostscript executable more securely.
703
- * **Enhancement:** Now provides timing information for gallery generation
704
- when running WordPress in [WP_DEBUG](https://codex.wordpress.org/WP_DEBUG)
705
- mode. When enabled, DG will log to the PHP error log file.
706
- * **Info:** Did you know that in tests I performed, Ghostscript (GS) performed
707
- 350% faster than using Imagick (IM)? Try testing with
708
- [this file](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf),
709
- which finished almost instantly using GS, but took multiple minutes when
710
- using IM on my test server (results may vary). See new FAQ tab to find out why.
711
-
712
- = 2.0.2 =
713
- * **Bug Fix:** Imagick was actually never working... My bad -- it is now! Thanks to
714
- [kaldimar](http://wordpress.org/support/profile/kaldimar) for reporting this.
715
- * **Enhancement:** Document Gallery en el Español por Andrew de
716
- [WebHostingHub](http://www.webhostinghub.com/). (To help translate to another
717
- language, [see here](http://wordpress.org/support/topic/seeking-translators).)
718
-
719
- = 2.0.1 =
720
- * **Bug Fix:** Resolves issue with `2.0` where DG options were not properly
721
- initialized when the plugin was updated. This caused the settings page to
722
- behave oddly and many other things throughout to not work as expected when
723
- you updated through the dashboard. Thanks to jawhite & rigbypa for
724
- [reporting this](http://wordpress.org/support/topic/errors-after-updating-to-20)!
725
-
726
- = 2.0 =
727
- * **Enhancement:** This release is a **BIG** deal! We are introducing true
728
- document thumbnails (rather than the boring static images that were the same
729
- for every document), meaning that you will be able to generate and display
730
- thumbnails for most of your documents so your users can see a preview of the
731
- document before downloading. This has been
732
- [months in development](http://wordpress.org/support/topic/pdf-thumbnails-instead-of-generic-icon)
733
- and I really hope that you all enjoy it!
734
- * **Enhancement:** Document Gallery now has a settings page where you can
735
- configure the default options for your galleries and chose how thumbnails are
736
- generated.
737
- * **Enhancement:** Customizing CSS for your document gallery is now *much easier*.
738
- If you want to add additional styling, just navigate to `Settings -> Document Gallery`
739
- in your dashboard and enter valid CSS in the "Custom CSS" textbox. See the changes
740
- instantly in your galleries!
741
- * **Enhancement:** Entire plugin is now
742
- [Internationalization-enabled](https://codex.wordpress.org/I18n_for_WordPress_Developers).
743
- This means that we can now support users speaking all languages. If you are
744
- interested in translating Document Gallery into a language that you speak,
745
- please [let me know](http://wordpress.org/support/topic/seeking-translators)!
746
- * **Enhancement:** This release saw much of the backend refactored to better
747
- support future development. Nothing you will notice unless you're digging into
748
- the code, but it will keep me sane long-term ;)
749
- * **Note:** The thumbnail generation implementation works very hard to support
750
- all hosting servers (including Unix and Windows systems). That said, I cannot
751
- test on all hosts out there, so there is the potential for bugs to appear.
752
- If you notice something that doesn't look right, please don't hesitate to
753
- [report the issue](http://wordpress.org/support/plugin/document-gallery)
754
- so that I can resolve it. Thanks!
755
-
756
- = 1.4.3 =
757
- * **Bug Fix:** Resolves minor bug introduced in version 1.4.2. Thanks, tkokholm!
758
-
759
- = 1.4.2 =
760
- * **Note:** This release includes an increase in the minimum WP version to 3.5.
761
- If you have not yet upgraded to at least this version, you should consider doing
762
- so as future releases include a number of *fantastic* new features as well as
763
- many security improvements. If you chose not to upgrade, you must stay with
764
- Document Gallery 1.4.1 or lower until you do. Sorry for the inconvenience!
765
- * **Bug Fix:** Resolved icons being displayed differently depending on which
766
- user was currently logged in. (Thanks to
767
- [Sean](http://wordpress.org/support/topic/error-after-update-19?replies=12#post-5041251)
768
- for reporting the issue.)
769
- * **Enhancement:** A number of new icons were added (mainly for the iWork suite
770
- and source code filetypes) and a number of pre-existing icons were removed if
771
- they were very similar to another icon.
772
- * **Under The Hood:** Many, many cool things. Stay tuned for a big reveal in the
773
- coming weeks!
774
- PS: If you're really curious, there are some clues in the source code ;)
775
-
776
- = 1.4.1 =
777
- * **Bug Fix:** This resolves a bug introduced in `1.4`, which caused a warning
778
- to be thrown when no attributes were used (i.e.: `[dg]`). (Thanks to
779
- [wtfbingo](http://wordpress.org/support/topic/error-after-update-19) for
780
- pointing this out!)
781
-
782
- = 1.4 =
783
-
784
- * **New Feature:** This release features the addition of *category/taxonomy* support,
785
- [as suggested by Pyo](http://wordpress.org/support/topic/sorting-documents-by-categorytag-or-other-taxonomy).
786
- * **Under The Hood:** The plugin was completely rewritten for this release. Logic
787
- was cleaned up to make maintenance easier and facilitate some *big* changes
788
- planned for version 2.0 of Document Gallery.
789
-
790
- = 1.3.1 =
791
-
792
- * **Bug Fix:** This resolves a bug introduced in version `1.3`. (Thanks to JKChad
793
- for pointing this out!)
794
-
795
- = 1.3 =
796
-
797
- * **New Feature:** It is now possible to filter the HTML produced to represent
798
- each individual icon, making it possible to add extra attributes and other
799
- modifications on the fly as document icons are generated. This will probably
800
- only be of use to developers and people who don't mind getting their hands
801
- dirty. *(See bottom **Installation** tab for more details.)*
802
- * **Enhancement:** There have been a lot of optimizations to the underlying
803
- plugin code to make it run more efficiently and be easier to read, if you
804
- are so inclined.
805
- * **Enhancement:** Changed how images, when included within the gallery, are
806
- generated so that the format of the icon returned now matches the rest of
807
- the icons.
808
-
809
- = 1.2.1 =
810
-
811
- * **Bug Fix:** Resolved issue with the `ids` attribute in `1.2` not working.
812
- Sorry about that!
813
-
814
- = 1.2 =
815
-
816
- * **New Feature:** Images can now be included alongside documents in a
817
- document gallery (using `images=true` attribute).
818
- (Thanks for the suggestion, Luca!)
819
- * **New Feature:** Attachment ids can now be explicitly listed, allowing for
820
- documents not attached to a post or page to be included in a document
821
- gallery (e.g.: `ids=2,42,57,1`). Note that no spaces should be included.
822
- * **Enhancement:** The CSS stylesheet has been enhanced for more flexibility
823
- in sizing icons.
824
-
825
- = 1.1 =
826
-
827
- * **New Feature:** Included option to link to the attachment page as well as
828
- to the actual document.
829
- * **Enhancement:** Added documentation for customizing the appearance of the plugin.
830
- * **Enhancement:** Many improvements to the backend, including pretty HTML output
831
- and best practice implementation in calls to WordPress core functions.
832
-
833
- = 1.0.4 =
834
-
835
- * **Bug Fix:** Removed extra `div` at bottom when number of documents is
836
- evenly divisible by 4. (Thanks, joero4ri!)
837
-
838
- = 1.0.3 =
839
-
840
- * **Bug Fix:** Resolved issue with detecting plugin directory. (Thanks,
841
- Brigitte!)
842
- * **Enhancement:** Minor improvement to how linking to individual
843
- documents is handled.
844
-
845
- = 1.0.2 =
846
-
847
- * **Bug Fix:** Merge for changes in 1.0 did not go through correctly so users
848
- downloaded the old icon set which broke the plugin. Sorry about that, but
849
- all is resolved with this release!
850
-
851
- = 1.0.1 =
852
-
853
- * **Bug Fix:** Resolved issue with long document titles being cut off in some themes.
854
-
855
- = 1.0 =
856
-
857
- * **New Feature:** Plugin now has **36 icons** representing **72 filetypes**!
858
- * **Enhancement:** Optimized gallery generation (faster!)
859
- * **Enhancement:** Added fallback to WordPress default icons if you happen to
860
- include one of the few filetypes not yet supported.
861
- * **Enhancement:** Changed shortcode to `[dg]` (`[document gallery]` will still
862
- work for backward compatibility).
863
- * **Enhancement:** Gave documentation some **much needed** revisions.
864
-
865
- = 0.8.5 =
866
-
867
- * **Enhancement:** Added support for
868
- [OpenDocuments](http://en.wikipedia.org/wiki/OpenDocument).
869
-
870
- = 0.8 =
871
-
872
- * **Release:** First public release of Document Gallery.
873
- * **Feature:** Displays PDF, Word, PowerPoint, Excel, and ZIP documents from a
874
- given page or post.
875
- * **Feature:** Documents can be ordered by a number of
876
- different factors.
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EE5LWRLG933EN&lc=US&item_name=Document%20Gallery%20Plugin&item_number=document%2dgallery&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 4.1
6
  Tested up to: 4.4
7
+ Stable tag: 4.1.5
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
422
  ideas for future Document Gallery development, take a look at our
423
  [issue tracker](https://github.com/thenadz/document-gallery/issues).
424
 
425
+ = 4.1.5 =
426
+ * **Bug Fix:** For a subset of the users upgrading from `4.0` to `4.1.x`, the thumbnail images will have been corrupted
427
+ during the upgrade process. This release addresses the problem.
428
+
429
+ = 4.1.1 & 4.1.2 & 4.1.3 & 4.1.4 =
430
+ * **Bug Fix:** Resolves various errors reported following `4.1` release.
431
 
432
  = 4.1 =
433
  * **Enhancement:** At long last, support for Microsoft Office files (Word, PowerPoint, Publisher, Visio), as well as a
462
  * **Bug Fix:** `Limit` was not working in cases where the `ids` or `include` attribute were present. This has been fixed.
463
  * **Tested Up To:** Document Gallery has been tested in WP 4.4 beta.
464
 
465
+ **NOTE: All earlier changes may be found in the CHANGELOG.md file.**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/class-admin.php CHANGED
@@ -370,8 +370,7 @@ class DG_Admin {
370
  $ID = - 1;
371
  }
372
 
373
- $thumbs = DG_Thumb::getThumbs();
374
- if ( isset( $_POST[DG_OPTION_NAME]['upload'] ) && isset( $_FILES['file'] ) && isset( $thumbs[$ID] ) ) {
375
  $uploaded_filename = self::validateUploadedFile();
376
  if ( $uploaded_filename && ( $thumb = DG_Thumber::setThumbnail( $ID, $uploaded_filename ) ) ) {
377
  $responseArr['result'] = true;
370
  $ID = - 1;
371
  }
372
 
373
+ if ( isset( $_POST[DG_OPTION_NAME]['upload'] ) && isset( $_FILES['file'] ) ) {
 
374
  $uploaded_filename = self::validateUploadedFile();
375
  if ( $uploaded_filename && ( $thumb = DG_Thumber::setThumbnail( $ID, $uploaded_filename ) ) ) {
376
  $responseArr['result'] = true;
admin/tabs/thumbnail-management-tab.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  defined( 'WPINC' ) OR exit;
3
 
 
4
  $dg_url_params = array( 'page' => DG_OPTION_NAME, 'tab' => 'thumbnail-management-tab' );
5
 
6
  /**
@@ -95,6 +96,7 @@ function dg_render_thumbnail_section() {
95
  $order = $dg_url_params['order'] = dg_get_order_param( $order_options );
96
  $limit = $dg_url_params['limit'] = dg_get_limit_param();
97
 
 
98
  $thumbs = DG_Thumb::getThumbs( $options['width'] . 'x' . $options['height'] );
99
  uasort( $thumbs, 'dg_cmp_thumb' );
100
  $thumbs_number = count( $thumbs );
1
  <?php
2
  defined( 'WPINC' ) OR exit;
3
 
4
+ global $dg_url_params;
5
  $dg_url_params = array( 'page' => DG_OPTION_NAME, 'tab' => 'thumbnail-management-tab' );
6
 
7
  /**
96
  $order = $dg_url_params['order'] = dg_get_order_param( $order_options );
97
  $limit = $dg_url_params['limit'] = dg_get_limit_param();
98
 
99
+ /** @var DG_Thumb[] $thumbs */
100
  $thumbs = DG_Thumb::getThumbs( $options['width'] . 'x' . $options['height'] );
101
  uasort( $thumbs, 'dg_cmp_thumb' );
102
  $thumbs_number = count( $thumbs );
document-gallery.php CHANGED
@@ -5,14 +5,14 @@ defined( 'WPINC' ) OR exit;
5
  Plugin Name: Document Gallery
6
  Plugin URI: http://wordpress.org/extend/plugins/document-gallery/
7
  Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
8
- Version: 4.1.2
9
  Author: Dan Rossiter
10
  Author URI: http://danrossiter.org/
11
  License: GPLv3
12
  Text Domain: document-gallery
13
  */
14
 
15
- define( 'DG_VERSION', '4.1.2' );
16
 
17
  // define helper paths & URLs
18
  define( 'DG_BASENAME', plugin_basename( __FILE__ ) );
5
  Plugin Name: Document Gallery
6
  Plugin URI: http://wordpress.org/extend/plugins/document-gallery/
7
  Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
8
+ Version: 4.1.5
9
  Author: Dan Rossiter
10
  Author URI: http://danrossiter.org/
11
  License: GPLv3
12
  Text Domain: document-gallery
13
  */
14
 
15
+ define( 'DG_VERSION', '4.1.5' );
16
 
17
  // define helper paths & URLs
18
  define( 'DG_BASENAME', plugin_basename( __FILE__ ) );
inc/class-setup.php CHANGED
@@ -150,6 +150,7 @@ class DG_Setup {
150
  self::threePointFive( $options );
151
  self::fourPointZero( $options );
152
  self::fourPointOne( $options );
 
153
 
154
  // update plugin meta data
155
  $options['meta']['version'] = DG_VERSION;
@@ -406,8 +407,8 @@ class DG_Setup {
406
  'mime_types' => array()
407
  );
408
 
409
- $old_thumbs = DG_Thumb::getThumbs();
410
- DG_Thumb::purgeThumbs();
411
  foreach ( $old_thumbs as $thumb ) {
412
  if ( $thumb->isSuccess() ) {
413
  $generator = $thumb->getGenerator();
@@ -425,6 +426,26 @@ class DG_Setup {
425
  }
426
  }
427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  /**
429
  * Sets up Document Gallery on all blog(s) activated.
430
  *
150
  self::threePointFive( $options );
151
  self::fourPointZero( $options );
152
  self::fourPointOne( $options );
153
+ self::fourPointOnePointFive( $options );
154
 
155
  // update plugin meta data
156
  $options['meta']['version'] = DG_VERSION;
407
  'mime_types' => array()
408
  );
409
 
410
+ $old_thumbs = DG_Thumb::getThumbs( $options['thumber']['width'] . 'x' . $options['thumber']['height'] );
411
+ DG_Thumb::purgeThumbs( null, null, false );
412
  foreach ( $old_thumbs as $thumb ) {
413
  if ( $thumb->isSuccess() ) {
414
  $generator = $thumb->getGenerator();
426
  }
427
  }
428
 
429
+ /**
430
+ * Cleans up the mess created in the fourPointOne upgrade script. The
431
+ * thumbnail files were removed, while the thumbnail DB entries were left.
432
+ *
433
+ * @param mixed[][] $options The options to be modified.
434
+ */
435
+ private static function fourPointOnePointFive( &$options ) {
436
+ if ( version_compare( $options['meta']['version'], '4.1.5', '<' ) ) {
437
+ $thumbs = DG_Thumb::getThumbs( $options['thumber']['width'] . 'x' . $options['thumber']['height'] );
438
+ $ids = array();
439
+ foreach ( $thumbs as $thumb ) {
440
+ if ( $thumb->isSuccess() && !@file_exists( $thumb->getPath() ) ) {
441
+ $ids[] = $thumb->getPostId();
442
+ }
443
+ }
444
+
445
+ DG_Thumb::purgeThumbs( $ids );
446
+ }
447
+ }
448
+
449
  /**
450
  * Sets up Document Gallery on all blog(s) activated.
451
  *
inc/class-thumb.php CHANGED
@@ -210,7 +210,7 @@ class DG_Thumb {
210
  // post_id + dimensions must be unique so purge the old entry if one exists
211
  $old_thumb = self::getThumb( $this->post_id, $this->dimensions );
212
  if ( ! is_null( $old_thumb ) ) {
213
- $old_thumb->delete();
214
  }
215
 
216
  DG_Logger::writeLog( DG_LogLevel::Detail, 'Saving thumb with post_id = ' . $this->post_id );
@@ -231,8 +231,10 @@ class DG_Thumb {
231
 
232
  /**
233
  * Deletes the current instances from the DB and filesystem.
 
 
234
  */
235
- public function delete() {
236
  if ( ! isset( $this->meta_id ) ) return;
237
 
238
  DG_Logger::writeLog( DG_LogLevel::Detail, 'Deleting thumb with post_id = ' . $this->post_id );
@@ -314,7 +316,7 @@ class DG_Thumb {
314
  * Gets either a nested associative array mapping ID to dimension to thumb or an associative array mapping ID to thumb.
315
  *
316
  * @param $dimensions string WIDTHxHEIGHT
317
- * @return DG_Thumb[] The matched thumbs.
318
  */
319
  public static function getThumbs($dimensions = null) {
320
  self::initThumbs();
@@ -337,8 +339,9 @@ class DG_Thumb {
337
  * Removes thumbs from the DB.
338
  * @param $ids int[]|int|null Optional. The post IDs to be purged. If not given then all are purged.
339
  * @param $blog_id null|int Optional. The blog to purge from. Defaults to active blog.
 
340
  */
341
- public static function purgeThumbs($ids = null, $blog_id = null) {
342
  global $wpdb;
343
 
344
  if ( ! is_null( $ids ) ) {
@@ -356,8 +359,10 @@ class DG_Thumb {
356
 
357
  if ( $result ) {
358
  // cleanup filesystem
359
- foreach ( self::$thumbs as $thumbs ) {
360
- self::cleanupThumbFiles( $thumbs );
 
 
361
  }
362
 
363
  self::$thumbs = null;
210
  // post_id + dimensions must be unique so purge the old entry if one exists
211
  $old_thumb = self::getThumb( $this->post_id, $this->dimensions );
212
  if ( ! is_null( $old_thumb ) ) {
213
+ $old_thumb->delete( $old_thumb->relative_path != $this->relative_path );
214
  }
215
 
216
  DG_Logger::writeLog( DG_LogLevel::Detail, 'Saving thumb with post_id = ' . $this->post_id );
231
 
232
  /**
233
  * Deletes the current instances from the DB and filesystem.
234
+ *
235
+ * @param $delete_files bool Whether files for the thumb should be deleted.
236
  */
237
+ public function delete( $delete_files = true ) {
238
  if ( ! isset( $this->meta_id ) ) return;
239
 
240
  DG_Logger::writeLog( DG_LogLevel::Detail, 'Deleting thumb with post_id = ' . $this->post_id );
316
  * Gets either a nested associative array mapping ID to dimension to thumb or an associative array mapping ID to thumb.
317
  *
318
  * @param $dimensions string WIDTHxHEIGHT
319
+ * @return DG_Thumb[]|DG_Thumb[][] The matched thumbs.
320
  */
321
  public static function getThumbs($dimensions = null) {
322
  self::initThumbs();
339
  * Removes thumbs from the DB.
340
  * @param $ids int[]|int|null Optional. The post IDs to be purged. If not given then all are purged.
341
  * @param $blog_id null|int Optional. The blog to purge from. Defaults to active blog.
342
+ * @param $delete_files bool Whether files for the thumb should be deleted.
343
  */
344
+ public static function purgeThumbs( $ids = null, $blog_id = null, $delete_files = true ) {
345
  global $wpdb;
346
 
347
  if ( ! is_null( $ids ) ) {
359
 
360
  if ( $result ) {
361
  // cleanup filesystem
362
+ if ( $delete_files ) {
363
+ foreach ( self::$thumbs as $thumbs ) {
364
+ self::cleanupThumbFiles( $thumbs );
365
+ }
366
  }
367
 
368
  self::$thumbs = null;
inc/class-thumber.php CHANGED
@@ -61,8 +61,9 @@ class DG_Thumber extends DG_AbstractThumber {
61
  }
62
 
63
  $thumb = isset( $generated ) ? $generated : DG_Thumb::getThumb( $ID, $dimensions );
64
- $is_default = ! isset( $thumb ) || ! $thumb->isSuccess();
65
- if ( ! isset( $thumb ) ) {
 
66
  $thumb = self::setThumbnailFailed( $ID );
67
  }
68
 
@@ -237,6 +238,9 @@ class DG_Thumber extends DG_AbstractThumber {
237
  if ( false === ( $temp_path = $generator->getThumbnail( $ID, $pg ) ) ) {
238
  return false;
239
  }
 
 
 
240
  } else {
241
  DG_Logger::writeLog(
242
  DG_LogLevel::Error,
@@ -292,7 +296,7 @@ class DG_Thumber extends DG_AbstractThumber {
292
  $thumb->setDimensions( $options['width'] . 'x' . $options['height'] );
293
  $thumb->setTimestamp( time() );
294
  $thumb->setRelativePath( substr( $thumb_path, strlen( $upload['basedir'] ) + 1 ) );
295
- $thumb->setGenerator( get_class( $generator ) );
296
  $thumb->save();
297
 
298
  return $thumb;
@@ -315,5 +319,6 @@ class DG_Thumber extends DG_AbstractThumber {
315
 
316
  // include all internal DG thumbers
317
  foreach ( glob( DG_PATH . 'inc/thumbers/*.php' ) as $path ) {
 
318
  include_once $path;
319
  }
61
  }
62
 
63
  $thumb = isset( $generated ) ? $generated : DG_Thumb::getThumb( $ID, $dimensions );
64
+ $is_thumb = is_a( $thumb, 'DG_Thumb' );
65
+ $is_default = ! $is_thumb || ! $thumb->isSuccess();
66
+ if ( ! $is_thumb ) {
67
  $thumb = self::setThumbnailFailed( $ID );
68
  }
69
 
238
  if ( false === ( $temp_path = $generator->getThumbnail( $ID, $pg ) ) ) {
239
  return false;
240
  }
241
+
242
+ // NOTE: get string representation to be stored with thumb in DB
243
+ $generator = get_class( $generator );
244
  } else {
245
  DG_Logger::writeLog(
246
  DG_LogLevel::Error,
296
  $thumb->setDimensions( $options['width'] . 'x' . $options['height'] );
297
  $thumb->setTimestamp( time() );
298
  $thumb->setRelativePath( substr( $thumb_path, strlen( $upload['basedir'] ) + 1 ) );
299
+ $thumb->setGenerator( $generator );
300
  $thumb->save();
301
 
302
  return $thumb;
319
 
320
  // include all internal DG thumbers
321
  foreach ( glob( DG_PATH . 'inc/thumbers/*.php' ) as $path ) {
322
+ /** @noinspection PhpIncludeInspection */
323
  include_once $path;
324
  }
inc/thumbers/class-thumber-co-thumber.php CHANGED
@@ -35,8 +35,7 @@ class DG_ThumberCoThumber extends DG_AbstractThumber {
35
  */
36
  public static function init() {
37
  $options = DG_Thumber::getOptions();
38
- $active = $options['active'];
39
- if ( $active['thumber-co'] ) {
40
  parent::init();
41
  self::$webhook = admin_url( 'admin-post.php?action=' . self::ThumberAction );
42
  self::$client = DG_ThumberClient::getInstance();
35
  */
36
  public static function init() {
37
  $options = DG_Thumber::getOptions();
38
+ if ( $options['active']['thumber-co'] ) {
 
39
  parent::init();
40
  self::$webhook = admin_url( 'admin-post.php?action=' . self::ThumberAction );
41
  self::$client = DG_ThumberClient::getInstance();