Media Library Assistant - Version 2.92

Version Description

  • Fix: Correct Media/Assistant Quick Edit error that deleted term assignments in the WordPress Categories taxonomy.
Download this release

Release Info

Developer dglingren
Plugin Icon 128x128 Media Library Assistant
Version 2.92
Comparing to
See all releases

Code changes from version 2.90 to 2.92

includes/class-mla-core.php CHANGED
@@ -21,7 +21,7 @@ class MLACore {
21
  *
22
  * @var string
23
  */
24
- const CURRENT_MLA_VERSION = '2.90';
25
 
26
  /**
27
  * Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)
@@ -629,7 +629,7 @@ class MLACore {
629
  $mla_reporting = trim( MLACore::mla_get_option( MLACoreOptions::MLA_DEBUG_REPLACE_LEVEL ) );
630
  if ( strlen( $mla_reporting ) ) {
631
  if ( ctype_digit( $mla_reporting ) ) {
632
- $mla_reporting = intval( $mla_reporting );
633
  } else{
634
  $mla_reporting = hexdec( $mla_reporting );
635
  }
21
  *
22
  * @var string
23
  */
24
+ const CURRENT_MLA_VERSION = '2.92';
25
 
26
  /**
27
  * Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)
629
  $mla_reporting = trim( MLACore::mla_get_option( MLACoreOptions::MLA_DEBUG_REPLACE_LEVEL ) );
630
  if ( strlen( $mla_reporting ) ) {
631
  if ( ctype_digit( $mla_reporting ) ) {
632
+ $mla_reporting = (int) $mla_reporting;
633
  } else{
634
  $mla_reporting = hexdec( $mla_reporting );
635
  }
includes/class-mla-data-query.php CHANGED
@@ -965,7 +965,7 @@ class MLAQuery {
965
  break;
966
  }
967
 
968
- $clean_request[ $key ] = intval( $value );
969
  break;
970
  case 'order':
971
  switch ( $value = strtoupper ($value ) ) {
965
  break;
966
  }
967
 
968
+ $clean_request[ $key ] = (int) $value;
969
  break;
970
  case 'order':
971
  switch ( $value = strtoupper ($value ) ) {
includes/class-mla-data.php CHANGED
@@ -1040,13 +1040,13 @@ class MLAData {
1040
 
1041
  if ( ! empty( $args['args'] ) ) {
1042
  if ( is_array( $args['args'] ) ) {
1043
- $start = intval( $args['args'][0] );
1044
 
1045
  if ( 1 < count( $args['args'] ) ) {
1046
- $length = intval( $args['args'][1] );
1047
  }
1048
  } else {
1049
- $start = intval( $args['args'] );
1050
  }
1051
  }
1052
 
@@ -1109,7 +1109,7 @@ class MLAData {
1109
  $return_value = $args['args'][1];
1110
 
1111
  if ( is_numeric( $return_value ) ) {
1112
- $return_value = intval( $return_value );
1113
  }
1114
  }
1115
  } else {
@@ -3305,7 +3305,7 @@ class MLAData {
3305
  if ( ( -1 <= $value ) && ( 1 >= $value ) ) {
3306
  return sprintf( $fraction_format, $fragments[0], $fragments[1] );
3307
  } else {
3308
- if ( $value == intval( $value ) ) {
3309
  return sprintf( $integer_format, $value );
3310
  }else {
3311
  return sprintf( $mixed_format, $value );
@@ -4506,7 +4506,7 @@ class MLAData {
4506
  ) );
4507
 
4508
  if ( ! empty( $_term ) ) {
4509
- $clean_terms[] = intval( $_term[0] );
4510
  } else {
4511
  // No existing term was found, so pass the string. A new term will be created.
4512
  $clean_terms[] = $tag;
1040
 
1041
  if ( ! empty( $args['args'] ) ) {
1042
  if ( is_array( $args['args'] ) ) {
1043
+ $start = (int) $args['args'][0];
1044
 
1045
  if ( 1 < count( $args['args'] ) ) {
1046
+ $length = (int) $args['args'][1];
1047
  }
1048
  } else {
1049
+ $start = (int) $args['args'];
1050
  }
1051
  }
1052
 
1109
  $return_value = $args['args'][1];
1110
 
1111
  if ( is_numeric( $return_value ) ) {
1112
+ $return_value = (int) $return_value;
1113
  }
1114
  }
1115
  } else {
3305
  if ( ( -1 <= $value ) && ( 1 >= $value ) ) {
3306
  return sprintf( $fraction_format, $fragments[0], $fragments[1] );
3307
  } else {
3308
+ if ( $value == (int) $value ) {
3309
  return sprintf( $integer_format, $value );
3310
  }else {
3311
  return sprintf( $mixed_format, $value );
4506
  ) );
4507
 
4508
  if ( ! empty( $_term ) ) {
4509
+ $clean_terms[] = (int) $_term[0];
4510
  } else {
4511
  // No existing term was found, so pass the string. A new term will be created.
4512
  $clean_terms[] = $tag;
includes/class-mla-image-processor.php CHANGED
@@ -351,19 +351,19 @@ class MLAImageProcessor {
351
  }
352
 
353
  // Process generation parameters and supply defaults
354
- $width = isset( $args['width'] ) ? abs( intval( $args['width'] ) ) : 0;
355
- $height = isset( $args['height'] ) ? abs( intval( $args['height'] ) ) : 0;
356
  $type = isset( $args['type'] ) ? $args['type'] : 'image/jpeg';
357
- $quality = isset( $args['quality'] ) ? abs( intval( $args['quality'] ) ) : 0;
358
- $frame = isset( $args['frame'] ) ? abs( intval( $args['frame'] ) ) : 0;
359
- $resolution = isset( $args['resolution'] ) ? abs( intval( $args['resolution'] ) ) : 72;
360
  $best_fit = isset( $args['best_fit'] ) ? (boolean) $args['best_fit'] : false;
361
  $ghostscript_path = isset( $args['ghostscript_path'] ) ? $args['ghostscript_path'] : '';
362
 
363
  // Retain WordPress type for _prepare_image and adjust defaults
364
  if ( 'WordPress' === $type ) {
365
  $mime_type = 'image/jpeg';
366
- $resolution = isset( $args['resolution'] ) ? abs( intval( $args['resolution'] ) ) : 128;
367
  } else {
368
  $mime_type = $type;
369
  }
@@ -481,12 +481,12 @@ class MLAImageProcessor {
481
  }
482
 
483
  $use_mutex = isset( $_REQUEST['mla_single_thread'] );
484
- $width = isset( $_REQUEST['mla_stream_width'] ) ? abs( intval( $_REQUEST['mla_stream_width'] ) ) : 0;
485
- $height = isset( $_REQUEST['mla_stream_height'] ) ? abs( intval( $_REQUEST['mla_stream_height'] ) ) : 0;
486
  $type = isset( $_REQUEST['mla_stream_type'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['mla_stream_type'] ) ) : 'image/jpeg';
487
- $quality = isset( $_REQUEST['mla_stream_quality'] ) ? abs( intval( $_REQUEST['mla_stream_quality'] ) ) : 0;
488
- $frame = isset( $_REQUEST['mla_stream_frame'] ) ? abs( intval( $_REQUEST['mla_stream_frame'] ) ) : 0;
489
- $resolution = isset( $_REQUEST['mla_stream_resolution'] ) ? abs( intval( $_REQUEST['mla_stream_resolution'] ) ) : 72;
490
  /*
491
  * If mla_ghostscript_path is present, a non-standard GS location can be found in a file written by
492
  * the [mla_gallery] shortcode processor.
351
  }
352
 
353
  // Process generation parameters and supply defaults
354
+ $width = isset( $args['width'] ) ? abs( (int) $args['width'] ) : 0;
355
+ $height = isset( $args['height'] ) ? abs( (int) $args['height'] ) : 0;
356
  $type = isset( $args['type'] ) ? $args['type'] : 'image/jpeg';
357
+ $quality = isset( $args['quality'] ) ? abs( (int) $args['quality'] ) : 0;
358
+ $frame = isset( $args['frame'] ) ? abs( (int) $args['frame'] ) : 0;
359
+ $resolution = isset( $args['resolution'] ) ? abs( (int) $args['resolution'] ) : 72;
360
  $best_fit = isset( $args['best_fit'] ) ? (boolean) $args['best_fit'] : false;
361
  $ghostscript_path = isset( $args['ghostscript_path'] ) ? $args['ghostscript_path'] : '';
362
 
363
  // Retain WordPress type for _prepare_image and adjust defaults
364
  if ( 'WordPress' === $type ) {
365
  $mime_type = 'image/jpeg';
366
+ $resolution = isset( $args['resolution'] ) ? abs( (int) $args['resolution'] ) : 128;
367
  } else {
368
  $mime_type = $type;
369
  }
481
  }
482
 
483
  $use_mutex = isset( $_REQUEST['mla_single_thread'] );
484
+ $width = isset( $_REQUEST['mla_stream_width'] ) ? abs( (int) $_REQUEST['mla_stream_width'] ) : 0;
485
+ $height = isset( $_REQUEST['mla_stream_height'] ) ? abs( (int) $_REQUEST['mla_stream_height'] ) : 0;
486
  $type = isset( $_REQUEST['mla_stream_type'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['mla_stream_type'] ) ) : 'image/jpeg';
487
+ $quality = isset( $_REQUEST['mla_stream_quality'] ) ? abs( (int) $_REQUEST['mla_stream_quality'] ) : 0;
488
+ $frame = isset( $_REQUEST['mla_stream_frame'] ) ? abs( (int) $_REQUEST['mla_stream_frame'] ) : 0;
489
+ $resolution = isset( $_REQUEST['mla_stream_resolution'] ) ? abs( (int) $_REQUEST['mla_stream_resolution'] ) : 72;
490
  /*
491
  * If mla_ghostscript_path is present, a non-standard GS location can be found in a file written by
492
  * the [mla_gallery] shortcode processor.
includes/class-mla-list-table.php CHANGED
@@ -352,7 +352,7 @@ class MLA_List_Table extends WP_List_Table {
352
  } else {
353
  if ( '0' !== $_REQUEST['mla_filter_term'] ) {
354
  // Format numeric, can be negative
355
- $submenu_arguments['mla_filter_term'] = intval( $_REQUEST['mla_filter_term'] );
356
  }
357
  }
358
  }
352
  } else {
353
  if ( '0' !== $_REQUEST['mla_filter_term'] ) {
354
  // Format numeric, can be negative
355
+ $submenu_arguments['mla_filter_term'] = (int) $_REQUEST['mla_filter_term'];
356
  }
357
  }
358
  }
includes/class-mla-main.php CHANGED
@@ -1921,7 +1921,7 @@ class MLA {
1921
  }
1922
 
1923
  if ( isset( $_REQUEST['post_category'] ) ) {
1924
- $_REQUEST['tax_input']['category'] = array_map( 'absint', $_REQUEST['post_category'], 'post' );
1925
  unset ( $_REQUEST['post_category'] );
1926
  }
1927
 
1921
  }
1922
 
1923
  if ( isset( $_REQUEST['post_category'] ) ) {
1924
+ $_REQUEST['tax_input']['category'] = array_map( 'absint', $_REQUEST['post_category'] );
1925
  unset ( $_REQUEST['post_category'] );
1926
  }
1927
 
includes/class-mla-media-modal-ajax.php CHANGED
@@ -95,9 +95,10 @@ class MLAModal_Ajax {
95
  /*
96
  * The 'query-attachments' action fills the Modal Window thumbnail pane with media items.
97
  * If the 's' value is an array, the MLA Enhanced elements are present; unpack the arguments
98
- * and substitute our handler for the WordPress default handler.
 
99
  */
100
- if ( ( $_REQUEST['action'] == 'query-attachments' ) && isset( $_POST['query']['s'] ) && is_array( $_POST['query']['s'] ) ){
101
  $keys = array_keys( array_map( 'absint', wp_unslash( $_POST['query']['s'] ) ) );
102
  foreach ( $keys as $key ) {
103
  switch ( $key ) {
@@ -645,7 +646,6 @@ class MLAModal_Ajax {
645
  * @return void passes array of post arrays to wp_send_json_success() for JSON encoding and transmission
646
  */
647
  public static function mla_query_attachments_action() {
648
- error_log( __LINE__ . ' mla_query_attachments_action query = ' . var_export( $_REQUEST['query'], true ), 0 );
649
  if ( ! current_user_can( 'upload_files' ) ) {
650
  wp_send_json_error();
651
  }
@@ -690,7 +690,7 @@ error_log( __LINE__ . ' mla_query_attachments_action query = ' . var_export( $_R
690
  // Process the enhanced search box OR fix up the default search box
691
  if ( isset( $query['mla_search_value'] ) ) {
692
  if ( ! empty( $query['mla_search_value'] ) ) {
693
- $query['s'] = wp_kses( wp_unslash( $query['mla_search_value'] ) );
694
  }
695
 
696
  unset( $query['mla_search_value'] );
@@ -749,7 +749,6 @@ error_log( __LINE__ . ' mla_query_attachments_action query = ' . var_export( $_R
749
  }
750
  }
751
 
752
- error_log( __LINE__ . ' mla_query_attachments_action query = ' . var_export( $_REQUEST['query'], true ), 0 );
753
  $query = MLAQuery::mla_query_media_modal_items( $query, $offset, $count );
754
  $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
755
  $posts = array_filter( $posts );
95
  /*
96
  * The 'query-attachments' action fills the Modal Window thumbnail pane with media items.
97
  * If the 's' value is an array, the MLA Enhanced elements are present; unpack the arguments
98
+ * and substitute our handler for the WordPress default handler. If, however, the 'post__in'
99
+ * argument is present let the WordPress query proceed, e.g., the "Edit Gallery" action.
100
  */
101
+ if ( ( $_REQUEST['action'] === 'query-attachments' ) && !isset( $_REQUEST['query']['post__in'] ) && isset( $_POST['query']['s'] ) && is_array( $_POST['query']['s'] ) ){
102
  $keys = array_keys( array_map( 'absint', wp_unslash( $_POST['query']['s'] ) ) );
103
  foreach ( $keys as $key ) {
104
  switch ( $key ) {
646
  * @return void passes array of post arrays to wp_send_json_success() for JSON encoding and transmission
647
  */
648
  public static function mla_query_attachments_action() {
 
649
  if ( ! current_user_can( 'upload_files' ) ) {
650
  wp_send_json_error();
651
  }
690
  // Process the enhanced search box OR fix up the default search box
691
  if ( isset( $query['mla_search_value'] ) ) {
692
  if ( ! empty( $query['mla_search_value'] ) ) {
693
+ $query['s'] = wp_kses( wp_unslash( $query['mla_search_value'] ), 'post' );
694
  }
695
 
696
  unset( $query['mla_search_value'] );
749
  }
750
  }
751
 
 
752
  $query = MLAQuery::mla_query_media_modal_items( $query, $offset, $count );
753
  $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
754
  $posts = array_filter( $posts );
includes/class-mla-settings-shortcodes-tab.php CHANGED
@@ -209,10 +209,8 @@ class MLASettings_Shortcodes {
209
  */
210
  private static function _update_template() {
211
  $value = self::_sanitize_template_item();
212
- error_log( __LINE__ . ' mla_update_template value = ' . var_export( $value, true ), 0 );
213
  $ID = $value['post_ID'];
214
  $old_value = MLA_Template_Query::mla_find_shortcode_template( $ID );
215
- error_log( __LINE__ . ' mla_update_template old_value = ' . var_export( $old_value, true ), 0 );
216
  $template_changed = false;
217
  $message_list = '';
218
  $error_list = '';
209
  */
210
  private static function _update_template() {
211
  $value = self::_sanitize_template_item();
 
212
  $ID = $value['post_ID'];
213
  $old_value = MLA_Template_Query::mla_find_shortcode_template( $ID );
 
214
  $template_changed = false;
215
  $message_list = '';
216
  $error_list = '';
includes/class-mla-shortcode-support.php CHANGED
@@ -2262,7 +2262,7 @@ class MLAShortcode_Support {
2262
  $link = get_edit_tag_link( $tag->term_id, $tag->taxonomy );
2263
  if ( ! is_wp_error( $link ) ) {
2264
  $tags[ $key ]->edit_link = $link;
2265
- $link = get_term_link( intval($tag->term_id), $tag->taxonomy );
2266
  $tags[ $key ]->term_link = $link;
2267
  }
2268
 
@@ -3554,7 +3554,7 @@ class MLAShortcode_Support {
3554
  if ( ! empty( $arguments['option_none_value'] ) ) {
3555
  $option_none_value = self::_process_shortcode_parameter( $arguments['option_none_value'], $page_values );
3556
  if ( is_numeric( $option_none_value ) ) {
3557
- $option_none_id = intval( $option_none_value );
3558
  $option_none_slug = sanitize_title( $arguments['option_none_text'] );
3559
  } else {
3560
  $option_none_id = -1;
@@ -3608,7 +3608,7 @@ class MLAShortcode_Support {
3608
  if ( ! empty( $arguments['option_all_value'] ) ) {
3609
  $option_all_value = self::_process_shortcode_parameter( $arguments['option_all_value'], $page_values );
3610
  if ( is_numeric( $option_all_value ) ) {
3611
- $option_all_id = intval( $option_all_value );
3612
  $option_all_slug = sanitize_title( $arguments['option_all_text'] );
3613
  } else {
3614
  $option_all_id = 0;
@@ -3654,7 +3654,7 @@ class MLAShortcode_Support {
3654
  $link = get_edit_tag_link( $tag->term_id, $tag->taxonomy );
3655
  if ( ! is_wp_error( $link ) ) {
3656
  $tags[ $key ]->edit_link = $link;
3657
- $link = get_term_link( intval($tag->term_id), $tag->taxonomy );
3658
  $tags[ $key ]->term_link = $link;
3659
  }
3660
 
@@ -5033,7 +5033,7 @@ class MLAShortcode_Support {
5033
  // fallthru
5034
  case 'id':
5035
  if ( is_numeric( $value ) ) {
5036
- $query_arguments[ $key ] = intval( $value );
5037
  if ( ! $children_ok ) {
5038
  $use_children = false;
5039
  }
@@ -5044,7 +5044,7 @@ class MLAShortcode_Support {
5044
  case 'posts_per_page':
5045
  case 'posts_per_archive_page':
5046
  if ( is_numeric( $value ) ) {
5047
- $value = intval( $value );
5048
  if ( ! empty( $value ) ) {
5049
  $query_arguments[ $key ] = $value;
5050
  }
@@ -5056,7 +5056,7 @@ class MLAShortcode_Support {
5056
  // fallthru
5057
  case 'offset':
5058
  if ( is_numeric( $value ) ) {
5059
- $query_arguments[ $key ] = intval( $value );
5060
  if ( ! $children_ok ) {
5061
  $use_children = false;
5062
  }
@@ -5075,7 +5075,7 @@ class MLAShortcode_Support {
5075
  $query_arguments[ $key ] = (get_query_var('paged')) ? get_query_var('paged') : 1;
5076
  }
5077
  } elseif ( is_numeric( $value ) ) {
5078
- $query_arguments[ $key ] = intval( $value );
5079
  } elseif ( '' === $value ) {
5080
  $query_arguments[ $key ] = 1;
5081
  }
@@ -5085,7 +5085,7 @@ class MLAShortcode_Support {
5085
  case $mla_page_parameter :
5086
  case 'mla_paginate_total':
5087
  if ( is_numeric( $value ) ) {
5088
- $query_arguments[ $key ] = intval( $value );
5089
  } elseif ( '' === $value ) {
5090
  $query_arguments[ $key ] = 1;
5091
  }
@@ -6262,7 +6262,7 @@ class MLAShortcode_Support {
6262
  $link = get_edit_tag_link( $term->term_id, $term->taxonomy );
6263
  if ( ! is_wp_error( $link ) ) {
6264
  $term->edit_link = $link;
6265
- $link = get_term_link( intval($term->term_id), $term->taxonomy );
6266
  $term->term_link = $link;
6267
  }
6268
 
2262
  $link = get_edit_tag_link( $tag->term_id, $tag->taxonomy );
2263
  if ( ! is_wp_error( $link ) ) {
2264
  $tags[ $key ]->edit_link = $link;
2265
+ $link = get_term_link( (int) $tag->term_id, $tag->taxonomy );
2266
  $tags[ $key ]->term_link = $link;
2267
  }
2268
 
3554
  if ( ! empty( $arguments['option_none_value'] ) ) {
3555
  $option_none_value = self::_process_shortcode_parameter( $arguments['option_none_value'], $page_values );
3556
  if ( is_numeric( $option_none_value ) ) {
3557
+ $option_none_id = (int) $option_none_value;
3558
  $option_none_slug = sanitize_title( $arguments['option_none_text'] );
3559
  } else {
3560
  $option_none_id = -1;
3608
  if ( ! empty( $arguments['option_all_value'] ) ) {
3609
  $option_all_value = self::_process_shortcode_parameter( $arguments['option_all_value'], $page_values );
3610
  if ( is_numeric( $option_all_value ) ) {
3611
+ $option_all_id = (int) $option_all_value;
3612
  $option_all_slug = sanitize_title( $arguments['option_all_text'] );
3613
  } else {
3614
  $option_all_id = 0;
3654
  $link = get_edit_tag_link( $tag->term_id, $tag->taxonomy );
3655
  if ( ! is_wp_error( $link ) ) {
3656
  $tags[ $key ]->edit_link = $link;
3657
+ $link = get_term_link( (int) $tag->term_id, $tag->taxonomy );
3658
  $tags[ $key ]->term_link = $link;
3659
  }
3660
 
5033
  // fallthru
5034
  case 'id':
5035
  if ( is_numeric( $value ) ) {
5036
+ $query_arguments[ $key ] = (int) $value;
5037
  if ( ! $children_ok ) {
5038
  $use_children = false;
5039
  }
5044
  case 'posts_per_page':
5045
  case 'posts_per_archive_page':
5046
  if ( is_numeric( $value ) ) {
5047
+ $value = (int) $value;
5048
  if ( ! empty( $value ) ) {
5049
  $query_arguments[ $key ] = $value;
5050
  }
5056
  // fallthru
5057
  case 'offset':
5058
  if ( is_numeric( $value ) ) {
5059
+ $query_arguments[ $key ] = (int) $value;
5060
  if ( ! $children_ok ) {
5061
  $use_children = false;
5062
  }
5075
  $query_arguments[ $key ] = (get_query_var('paged')) ? get_query_var('paged') : 1;
5076
  }
5077
  } elseif ( is_numeric( $value ) ) {
5078
+ $query_arguments[ $key ] = (int) $value;
5079
  } elseif ( '' === $value ) {
5080
  $query_arguments[ $key ] = 1;
5081
  }
5085
  case $mla_page_parameter :
5086
  case 'mla_paginate_total':
5087
  if ( is_numeric( $value ) ) {
5088
+ $query_arguments[ $key ] = (int) $value;
5089
  } elseif ( '' === $value ) {
5090
  $query_arguments[ $key ] = 1;
5091
  }
6262
  $link = get_edit_tag_link( $term->term_id, $term->taxonomy );
6263
  if ( ! is_wp_error( $link ) ) {
6264
  $term->edit_link = $link;
6265
+ $link = get_term_link( (int) $term->term_id, $term->taxonomy );
6266
  $term->term_link = $link;
6267
  }
6268
 
includes/class-mla-thumbnail-generation.php CHANGED
@@ -175,20 +175,6 @@ class MLA_Thumbnail {
175
  if ( self::MLA_GFI_ACTION != $bulk_action ) {
176
  return $item_content;
177
  }
178
- error_log( __LINE__ . ' mla_list_table_begin_bulk_action _REQUEST = ' . var_export( $_REQUEST, true ), 0 );
179
-
180
- /* 'mla_thumbnail_options' =>
181
- array (
182
- 'width' => '',
183
- 'height' => '',
184
- 'best_fit' => 'checked',
185
- 'page' => '',
186
- 'resolution' => '',
187
- 'quality' => '',
188
- 'type' => 'WordPress',
189
- 'existing_thumbnails' => 'keep',
190
- 'suffix' => '-Thumbnail',
191
- ), */
192
 
193
  self::$bulk_action_options = array();
194
  $request_options = isset( $_REQUEST['mla_thumbnail_options'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['mla_thumbnail_options'] ) ) : array();
@@ -200,7 +186,6 @@ error_log( __LINE__ . ' mla_list_table_begin_bulk_action _REQUEST = ' . var_expo
200
 
201
  foreach ( $request_options as $key => $value ) {
202
  if ( in_array( $key, array( 'width', 'height', 'page', 'resolution', 'quality', ) ) ) {
203
- // $value = 0 < absint( $value ) ? absint( $value ) : '';
204
  $value = absint( $value );
205
  }
206
 
@@ -211,7 +196,6 @@ error_log( __LINE__ . ' mla_list_table_begin_bulk_action _REQUEST = ' . var_expo
211
 
212
  // Convert checkboxes to booleans
213
  self::$bulk_action_options['best_fit'] = isset( $request_options['best_fit'] );
214
- //self::$bulk_action_options['clear_filters'] = isset( $request_options['clear_filters'] );
215
 
216
  // Convert page number to frame
217
  if ( isset( self::$bulk_action_options['page'] ) ) {
@@ -220,7 +204,6 @@ error_log( __LINE__ . ' mla_list_table_begin_bulk_action _REQUEST = ' . var_expo
220
  unset( self::$bulk_action_options['page'] );
221
  }
222
 
223
- error_log( __LINE__ . ' mla_list_table_begin_bulk_action bulk_action_options = ' . var_export( self::$bulk_action_options, true ), 0 );
224
  return $item_content;
225
  } // mla_list_table_begin_bulk_action
226
 
@@ -327,13 +310,13 @@ error_log( __LINE__ . ' mla_list_table_begin_bulk_action bulk_action_options = '
327
 
328
  foreach ( $fallback_sizes as $s ) {
329
  if ( isset( $_wp_additional_image_sizes[ $s ]['width'] ) ) {
330
- $sizes[ $s ]['width'] = intval( $_wp_additional_image_sizes[ $s ]['width'] );
331
  } else {
332
  $sizes[ $s ]['width'] = get_option( "{$s}_size_w" );
333
  }
334
 
335
  if ( isset( $_wp_additional_image_sizes[ $s ]['height'] ) ) {
336
- $sizes[ $s ]['height'] = intval( $_wp_additional_image_sizes[ $s ]['height'] );
337
  } else {
338
  $sizes[ $s ]['height'] = get_option( "{$s}_size_h" );
339
  }
175
  if ( self::MLA_GFI_ACTION != $bulk_action ) {
176
  return $item_content;
177
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
 
179
  self::$bulk_action_options = array();
180
  $request_options = isset( $_REQUEST['mla_thumbnail_options'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['mla_thumbnail_options'] ) ) : array();
186
 
187
  foreach ( $request_options as $key => $value ) {
188
  if ( in_array( $key, array( 'width', 'height', 'page', 'resolution', 'quality', ) ) ) {
 
189
  $value = absint( $value );
190
  }
191
 
196
 
197
  // Convert checkboxes to booleans
198
  self::$bulk_action_options['best_fit'] = isset( $request_options['best_fit'] );
 
199
 
200
  // Convert page number to frame
201
  if ( isset( self::$bulk_action_options['page'] ) ) {
204
  unset( self::$bulk_action_options['page'] );
205
  }
206
 
 
207
  return $item_content;
208
  } // mla_list_table_begin_bulk_action
209
 
310
 
311
  foreach ( $fallback_sizes as $s ) {
312
  if ( isset( $_wp_additional_image_sizes[ $s ]['width'] ) ) {
313
+ $sizes[ $s ]['width'] = (int) $_wp_additional_image_sizes[ $s ]['width'];
314
  } else {
315
  $sizes[ $s ]['width'] = get_option( "{$s}_size_w" );
316
  }
317
 
318
  if ( isset( $_wp_additional_image_sizes[ $s ]['height'] ) ) {
319
+ $sizes[ $s ]['height'] = (int) $_wp_additional_image_sizes[ $s ]['height'];
320
  } else {
321
  $sizes[ $s ]['height'] = get_option( "{$s}_size_h" );
322
  }
index.php CHANGED
@@ -6,17 +6,17 @@
6
  * will the rest of the plugin be loaded and run.
7
  *
8
  * @package Media Library Assistant
9
- * @version 2.90
10
  */
11
 
12
  /*
13
  Plugin Name: Media Library Assistant
14
  Plugin URI: http://davidlingren.com/#two
15
- Description: Enhances the Media Library; powerful [mla_gallery] [mla_tag_cloud] [mla_term_list], taxonomy support, IPTC/EXIF/XMP/PDF processing, bulk/quick edit.
16
  Author: David Lingren
17
  Text Domain: media-library-assistant
18
  Domain Path: /languages
19
- Version: 2.90
20
  Author URI: http://davidlingren.com/
21
 
22
  Copyright 2011-2020 David Lingren
6
  * will the rest of the plugin be loaded and run.
7
  *
8
  * @package Media Library Assistant
9
+ * @version 2.92
10
  */
11
 
12
  /*
13
  Plugin Name: Media Library Assistant
14
  Plugin URI: http://davidlingren.com/#two
15
+ Description: 20201124 Enhances the Media Library; powerful [mla_gallery] [mla_tag_cloud] [mla_term_list], taxonomy support, IPTC/EXIF/XMP/PDF processing, bulk/quick edit.
16
  Author: David Lingren
17
  Text Domain: media-library-assistant
18
  Domain Path: /languages
19
+ Version: 2.92
20
  Author URI: http://davidlingren.com/
21
 
22
  Copyright 2011-2020 David Lingren
languages/media-library-assistant-en_US - References.pot CHANGED
@@ -2,10 +2,10 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Media Library Assistant\n"
5
- "POT-Creation-Date: 2020-11-20 16:51-0800\n"
6
  "PO-Revision-Date: 2015-08-21 21:38-0800\n"
7
  "Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
8
- "Language-Team: David Lingren <david@fairtradejudaica.org>\n"
9
  "Language: en_US\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Media Library Assistant\n"
5
+ "POT-Creation-Date: 2020-11-20 17:00-0800\n"
6
  "PO-Revision-Date: 2015-08-21 21:38-0800\n"
7
  "Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
8
+ "Language-Team: David Lingren <david@davidlingren.com>\n"
9
  "Language: en_US\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: media, media library, gallery, images, categories, tags, attachments, IPTC
5
  Requires at least: 3.5.0
6
  Tested up to: 5.6
7
  Requires PHP: 5.3
8
- Stable tag: 2.90
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -181,6 +181,13 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
181
 
182
  == Changelog ==
183
 
 
 
 
 
 
 
 
184
  = 2.90 =
185
  * New: <strong>A new example plugin, "MLA Parent Custom Field Mapping"</strong>, allows IPTC/EXIF and Custom Field mapping rules to update custom fields in the item's parent post/page rather than the items's own fields. Support for Advanced Custom Fields and WP/LR Sync is included.
186
  * New: <strong>The "MLA Randon Galleries Example" plugin has been greatly enhanced</strong>. The new version has many more parameters and a new plugin options page. A Documentation tab on the settings page contains all the information you need to understand and use the new version.
@@ -307,8 +314,8 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
307
 
308
  == Upgrade Notice ==
309
 
310
- = 2.90 =
311
- WP 5.6 support, thorough review and update of all files for validating, sanitizing and escaping user data to reduce the risk of security exploits, two new example plugins. Seven enhancements in all, seven fixes.
312
 
313
  == Other Notes ==
314
 
5
  Requires at least: 3.5.0
6
  Tested up to: 5.6
7
  Requires PHP: 5.3
8
+ Stable tag: 2.92
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
181
 
182
  == Changelog ==
183
 
184
+ = 2.92 =
185
+ * Fix: Correct Media/Assistant Quick Edit error that deleted term assignments in the WordPress Categories taxonomy.
186
+
187
+ = 2.91 =
188
+ * Fix: Correct PHP Fatal "Uncaught ArgumentCountError" in some Media Manager query-attachments operations, e.g., Search Media.
189
+ * Fix: Correct defect that prevented Media Manager operations such as "Edit Gallery" from retaining all current items when opened.
190
+
191
  = 2.90 =
192
  * New: <strong>A new example plugin, "MLA Parent Custom Field Mapping"</strong>, allows IPTC/EXIF and Custom Field mapping rules to update custom fields in the item's parent post/page rather than the items's own fields. Support for Advanced Custom Fields and WP/LR Sync is included.
193
  * New: <strong>The "MLA Randon Galleries Example" plugin has been greatly enhanced</strong>. The new version has many more parameters and a new plugin options page. A Documentation tab on the settings page contains all the information you need to understand and use the new version.
314
 
315
  == Upgrade Notice ==
316
 
317
+ = 2.92 =
318
+ Correct Media/Assistant Quick Edit error that deleted term assignments in the WordPress Categories taxonomy.
319
 
320
  == Other Notes ==
321