Version Description
- Bug Fix: Rolling back part of CSS enhancments in 2.0.4 that were causing errors on some servers. May revisit at a later date.
Download this release
Release Info
Developer | dan.rossiter |
Plugin | Document Gallery |
Version | 2.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 2.0.5
- README.txt +5 -1
- document-gallery.php +6 -10
- inc/class-image-editor-imagick.php +2 -2
- inc/class-thumber.php +3 -3
README.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: attachments, thumbnail, documents, gallery, MS office, 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¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 3.8.1
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -297,6 +297,10 @@ Note that the display inherits styling from your active theme.
|
|
297 |
forum](http://wordpress.org/support/plugin/document-gallery) if you have
|
298 |
ideas)!
|
299 |
|
|
|
|
|
|
|
|
|
300 |
= 2.0.4 =
|
301 |
* **Enhancement:** Custom CSS is now loaded faster, meaning faster page loads
|
302 |
for your users. Tests are showing a speedup of around 30% over where it was
|
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¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 2.0.5
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
297 |
forum](http://wordpress.org/support/plugin/document-gallery) if you have
|
298 |
ideas)!
|
299 |
|
300 |
+
= 2.0.5 =
|
301 |
+
* **Bug Fix:** Rolling back part of CSS enhancments in 2.0.4 that were causing
|
302 |
+
errors on some servers. May revisit at a later date.
|
303 |
+
|
304 |
= 2.0.4 =
|
305 |
* **Enhancement:** Custom CSS is now loaded faster, meaning faster page loads
|
306 |
for your users. Tests are showing a speedup of around 30% over where it was
|
document-gallery.php
CHANGED
@@ -5,7 +5,7 @@ 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: 2.0.
|
9 |
Author: Dan Rossiter
|
10 |
Author URI: http://danrossiter.org/
|
11 |
License: GPLv2
|
@@ -13,15 +13,11 @@ defined('WPINC') OR exit;
|
|
13 |
*/
|
14 |
|
15 |
// define helper paths & URLs
|
16 |
-
define('DG_VERSION', '2.0.
|
17 |
define('DG_URL', plugin_dir_url(__FILE__));
|
18 |
define('DG_PATH', plugin_dir_path(__FILE__));
|
19 |
-
|
20 |
-
|
21 |
-
}
|
22 |
-
if(!defined('WP_ADMIN_DIR')) {
|
23 |
-
define('WP_ADMIN_DIR', preg_replace('/wp-content$/', 'wp-admin', WP_CONTENT_DIR));
|
24 |
-
}
|
25 |
|
26 |
// init DG options for use throughout plugin
|
27 |
global $dg_options;
|
@@ -139,7 +135,7 @@ class DocumentGallery {
|
|
139 |
public static function buildCustomCss() {
|
140 |
if (1 == intval(get_query_var(self::$query_var))) {
|
141 |
global $dg_options;
|
142 |
-
|
143 |
header('Content-type: text/css');
|
144 |
header('Cache-Control: no-transform,public,maxage=' . 31536000);
|
145 |
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');
|
@@ -193,7 +189,7 @@ class DocumentGallery {
|
|
193 |
$css = file_get_contents(DG_PATH . 'assets/css/style.css');
|
194 |
$css .= str_replace('>', '>', esc_html($custom));
|
195 |
|
196 |
-
return
|
197 |
}
|
198 |
|
199 |
/**
|
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: 2.0.5
|
9 |
Author: Dan Rossiter
|
10 |
Author URI: http://danrossiter.org/
|
11 |
License: GPLv2
|
13 |
*/
|
14 |
|
15 |
// define helper paths & URLs
|
16 |
+
define('DG_VERSION', '2.0.5');
|
17 |
define('DG_URL', plugin_dir_url(__FILE__));
|
18 |
define('DG_PATH', plugin_dir_path(__FILE__));
|
19 |
+
define('DG_WPINC_PATH', ABSPATH . WPINC . '/');
|
20 |
+
define('DG_WPADMIN_PATH', ABSPATH . 'wp-admin/');
|
|
|
|
|
|
|
|
|
21 |
|
22 |
// init DG options for use throughout plugin
|
23 |
global $dg_options;
|
135 |
public static function buildCustomCss() {
|
136 |
if (1 == intval(get_query_var(self::$query_var))) {
|
137 |
global $dg_options;
|
138 |
+
|
139 |
header('Content-type: text/css');
|
140 |
header('Cache-Control: no-transform,public,maxage=' . 31536000);
|
141 |
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');
|
189 |
$css = file_get_contents(DG_PATH . 'assets/css/style.css');
|
190 |
$css .= str_replace('>', '>', esc_html($custom));
|
191 |
|
192 |
+
return $css;
|
193 |
}
|
194 |
|
195 |
/**
|
inc/class-image-editor-imagick.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
defined('WPINC') OR exit;
|
3 |
|
4 |
-
include_once
|
5 |
-
include_once
|
6 |
|
7 |
/**
|
8 |
* Extends WP_Image_Editor_Imagick to support specifying which
|
1 |
<?php
|
2 |
defined('WPINC') OR exit;
|
3 |
|
4 |
+
include_once DG_WPINC_PATH . 'class-wp-image-editor.php';
|
5 |
+
include_once DG_WPINC_PATH . 'class-wp-image-editor-imagick.php';
|
6 |
|
7 |
/**
|
8 |
* Extends WP_Image_Editor_Imagick to support specifying which
|
inc/class-thumber.php
CHANGED
@@ -92,7 +92,7 @@ class DG_Thumber {
|
|
92 |
* @return bool|str False on failure, URL to thumb on success.
|
93 |
*/
|
94 |
public static function getAudioVideoThumbnail($ID, $pg = 1) {
|
95 |
-
include_once
|
96 |
|
97 |
$attachment = get_post($ID);
|
98 |
$doc_path = get_attached_file($ID);
|
@@ -188,8 +188,8 @@ class DG_Thumber {
|
|
188 |
static $ret = null;
|
189 |
|
190 |
if (is_null($ret)) {
|
191 |
-
include_once
|
192 |
-
include_once
|
193 |
$ret = WP_Image_Editor_Imagick::test();
|
194 |
}
|
195 |
|
92 |
* @return bool|str False on failure, URL to thumb on success.
|
93 |
*/
|
94 |
public static function getAudioVideoThumbnail($ID, $pg = 1) {
|
95 |
+
include_once DG_WPADMIN_PATH . 'includes/media.php';
|
96 |
|
97 |
$attachment = get_post($ID);
|
98 |
$doc_path = get_attached_file($ID);
|
188 |
static $ret = null;
|
189 |
|
190 |
if (is_null($ret)) {
|
191 |
+
include_once DG_WPINC_PATH . 'class-wp-image-editor.php';
|
192 |
+
include_once DG_WPINC_PATH . 'class-wp-image-editor-imagick.php';
|
193 |
$ret = WP_Image_Editor_Imagick::test();
|
194 |
}
|
195 |
|