Document Gallery - Version 4.1.11

Version Description

  • Bug Fix: Resolves bug that resulted in various issues, including Jetpack and some core WordPress functionality not working correctly.
Download this release

Release Info

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

Code changes from version 4.1.10 to 4.1.11

CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
  # Changelog
2
 
 
 
 
 
 
 
 
3
  ## 4.1.9
4
  * **Bug Fix:** Addresses issues with the IMagick thumbnail generation.
5
  * **Enhancement:** Handling thumbnail generation for image attachments better (should be faster & more reliable).
1
  # Changelog
2
 
3
+ ## 4.1.11
4
+ * **Bug Fix:** Resolves bug that resulted in various issues, including Jetpack and some core WordPress functionality
5
+ not working correctly.
6
+
7
+ ## 4.1.10
8
+ * **Bug Fix:** Resolves drag/drop issues in the meida manager.
9
+
10
  ## 4.1.9
11
  * **Bug Fix:** Addresses issues with the IMagick thumbnail generation.
12
  * **Enhancement:** Handling thumbnail generation for image attachments better (should be faster & more reliable).
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.10
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -422,6 +422,10 @@ 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.10 =
426
  * **Bug Fix:** Resolves drag/drop issues in the meida manager.
427
 
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.11
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.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.11 =
426
+ * **Bug Fix:** Resolves bug that resulted in various issues, including Jetpack and some core WordPress functionality
427
+ not working correctly.
428
+
429
  = 4.1.10 =
430
  * **Bug Fix:** Resolves drag/drop issues in the meida manager.
431
 
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.10
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.10' );
16
 
17
  if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
18
  add_action( 'admin_notices', 'dg_php_lt_three' );
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.11
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.11' );
16
 
17
  if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
18
  add_action( 'admin_notices', 'dg_php_lt_three' );
inc/thumbers/class-thumber-co-thumber.php CHANGED
@@ -132,13 +132,17 @@ class DG_ThumberCoThumber extends DG_AbstractThumber {
132
 
133
  /**
134
  * WP by default will not handle POSTs from Thumber so add a special case for the action we want to handle.
135
- * @param $origin
136
- * @param $origin_arg
137
  *
138
- * @return bool Whether WP will handle the action.
139
  */
140
  public static function allowThumberWebhooks($origin, $origin_arg) {
141
- return $origin || ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] === self::ThumberAction );
 
 
 
 
142
  }
143
 
144
  /**
132
 
133
  /**
134
  * WP by default will not handle POSTs from Thumber so add a special case for the action we want to handle.
135
+ * @param $origin string Origin URL. If not provided, the value of get_http_origin() is used.
136
+ * @param $origin_arg string Unused.
137
  *
138
+ * @return string Origin URL if allowed, empty string if not.
139
  */
140
  public static function allowThumberWebhooks($origin, $origin_arg) {
141
+ if ( !$origin && isset( $_REQUEST['action'] ) && $_REQUEST['action'] === self::ThumberAction ) {
142
+ $origin = get_http_origin();
143
+ }
144
+
145
+ return $origin;
146
  }
147
 
148
  /**