Document Gallery - Version 4.1.10

Version Description

  • Bug Fix: Resolves drag/drop issues in the meida manager.
Download this release

Release Info

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

Code changes from version 4.1.9 to 4.1.10

Files changed (3) hide show
  1. README.txt +4 -1
  2. admin/class-admin.php +7 -6
  3. document-gallery.php +2 -2
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.9
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -422,6 +422,9 @@ 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.9 =
426
  * **Bug Fix:** Addresses issues with the IMagick thumbnail generation.
427
  * **Enhancement:** Handling thumbnail generation for image attachments better (should be faster & more reliable).
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
  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
+
428
  = 4.1.9 =
429
  * **Bug Fix:** Addresses issues with the IMagick thumbnail generation.
430
  * **Enhancement:** Handling thumbnail generation for image attachments better (should be faster & more reliable).
admin/class-admin.php CHANGED
@@ -56,7 +56,7 @@ class DG_Admin {
56
  <?php
57
  settings_fields( DG_OPTION_NAME );
58
  do_settings_sections( DG_OPTION_NAME );
59
- if ( self::$current !== 'thumbnail-management-tab' && self::$current != 'logging-tab' ) {
60
  submit_button();
61
  }
62
  ?>
@@ -119,9 +119,7 @@ class DG_Admin {
119
  // Settings Page
120
  DG_Util::enqueueAsset( 'document-gallery-admin', 'assets/css/admin.css' );
121
 
122
- DG_Util::enqueueAsset( 'document-gallery-admin', 'assets/js/admin.js', array( 'jquery' ) );
123
- wp_localize_script( 'document-gallery-admin', 'dg_admin_vars', array( 'upload_limit' => wp_max_upload_size() ) );
124
- if ( $hook !== self::$hook ) { //if $hook is 'post.php' or 'post-new.php'
125
  global $dg_options;
126
 
127
  // Media Manager integration
@@ -149,6 +147,9 @@ class DG_Admin {
149
  // TinyMCE visual editor
150
  add_filter( 'mce_external_plugins', array( __CLASS__, 'mce_external_plugins' ) );
151
  add_filter( 'mce_css', array( __CLASS__, 'dg_plugin_mce_css' ) );
 
 
 
152
  }
153
  }
154
  }
@@ -257,7 +258,7 @@ class DG_Admin {
257
  }
258
  $info = getimagesize( $upload_path );
259
  if ( $info ) {
260
- if ( $info['mime'] != $upload_type ) {// in DG_Thumber::getExt() we'll define and set appropriate extension
261
  DG_Logger::writeLog(
262
  DG_LogLevel::Warning,
263
  __( 'File extension doesn\'t match the MIME type of the image: ', 'document-gallery' ) .
@@ -308,7 +309,7 @@ class DG_Admin {
308
  }
309
 
310
  /**
311
- * Adds meta box to the attchements' edit pages.
312
  */
313
  public static function addMetaBox() {
314
  $screens = array( 'attachment' );
56
  <?php
57
  settings_fields( DG_OPTION_NAME );
58
  do_settings_sections( DG_OPTION_NAME );
59
+ if ( self::$current !== 'thumbnail-management-tab' && self::$current !== 'logging-tab' ) {
60
  submit_button();
61
  }
62
  ?>
119
  // Settings Page
120
  DG_Util::enqueueAsset( 'document-gallery-admin', 'assets/css/admin.css' );
121
 
122
+ if ( $hook !== self::$hook && get_post_type( get_the_ID() ) !== 'attachment' ) { //if $hook is 'post.php' or 'post-new.php' and it's not an attachment page
 
 
123
  global $dg_options;
124
 
125
  // Media Manager integration
147
  // TinyMCE visual editor
148
  add_filter( 'mce_external_plugins', array( __CLASS__, 'mce_external_plugins' ) );
149
  add_filter( 'mce_css', array( __CLASS__, 'dg_plugin_mce_css' ) );
150
+ } else {
151
+ DG_Util::enqueueAsset( 'document-gallery-admin', 'assets/js/admin.js', array( 'jquery' ) );
152
+ wp_localize_script( 'document-gallery-admin', 'dg_admin_vars', array( 'upload_limit' => wp_max_upload_size() ) );
153
  }
154
  }
155
  }
258
  }
259
  $info = getimagesize( $upload_path );
260
  if ( $info ) {
261
+ if ( $info['mime'] !== $upload_type ) {// in DG_Thumber::getExt() we'll define and set appropriate extension
262
  DG_Logger::writeLog(
263
  DG_LogLevel::Warning,
264
  __( 'File extension doesn\'t match the MIME type of the image: ', 'document-gallery' ) .
309
  }
310
 
311
  /**
312
+ * Adds meta box to the attachments' edit pages.
313
  */
314
  public static function addMetaBox() {
315
  $screens = array( 'attachment' );
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.9
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.9' );
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.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' );