Media Library Assistant - Version 1.93

Version Description

  • New: MLA enhancements have been added to the new WordPress 4.0 Media/Library Media Grid submenu. An option has been added to the Settings/Media Library Assistant General tab to disable them if they are not wanted.
  • New: An option has been added to the Settings/Media Library Assistant General tab to automatically populate taxonomy metaboxes in the Media Manager Details pane when the item is selected. The option is disabled by default.
  • New: A new mla-simple-mapping-hooks-example.php.txt example plugin has been added to the /media-library-assistant/examples directory.
  • Fix: Completed WordPress 4.0 compatibility work.
  • Fix: Media Manager toolbar controls for different modes, e.g., Insert Media, Set Featured Image, are now separated so each mode retains its own settings.
  • Fix: Media Manager MLA enhanced toolbar controls for MIME type, date and terms now work when the enhanced Search Media control is disabled.
  • Fix: The buddypress-hooks-example.php.txt example plugin now handles cover art for the most recent rtMedia releases.
Download this release

Release Info

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

Code changes from version 1.92 to 1.93

css/mla-media-modal-style.css CHANGED
@@ -3,7 +3,8 @@
3
  * CSS Document
4
  *
5
  * This file contains styling attributes for the Media Manager Modal Window,
6
- * adapted from /wp-admin/css/edit.css and given unique names to avoid conflicts.
 
7
  */
8
 
9
  .media-toolbar {
@@ -31,18 +32,24 @@
31
  .mla-search-options > li:last-child { margin-right: 0; }
32
 
33
  /**
34
- * Attachment Browser Dropdowns
35
- */
36
- .media-frame select.attachment-months,
37
- .media-frame select.attachment-terms,
38
- .media-frame input#mla-terms-search {
 
 
 
 
39
  margin-top: 11px;
40
- margin-right: 10px;
 
41
  }
42
 
43
  /**
44
  * Hide "Media Categories" meta box
45
  */
 
46
  .media-sidebar .compat-item .compat-field-MLA-has-disabled-this-instance_metabox {
47
  display: none;
48
  }
@@ -51,9 +58,9 @@
51
  * Checkbox-style taxonomy meta box
52
  */
53
 
54
- .media-modal.mla-expanded .media-toolbar { right: 612px; }
55
- .media-modal.mla-expanded .attachments { right: 612px; }
56
- .media-modal.mla-expanded .media-sidebar { 6px; min-width: 600px; }
57
 
58
  .media-modal .media-toolbar {
59
  right: 312px;
@@ -78,16 +85,19 @@
78
  display: none;
79
  }
80
 
 
81
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.categorydiv {
82
  margin-top: 0px;
83
  padding-top: 6px;
84
  }
85
 
 
86
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.tagsdiv {
87
  margin-top: 0px;
88
  padding-top: 6px;
89
  }
90
 
 
91
  .media-sidebar .compat-item .mla-taxonomy-row td.field div.tabs-panel {
92
  min-height: 200px;
93
  max-height: 200px;
@@ -102,19 +112,23 @@
102
  * Flat taxonomy meta box, from /wp-admin/css/edit.css "13.0 - Tags"
103
  */
104
 
 
105
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.ajaxtag .newtag {
106
  position: relative;
107
  }
108
 
 
109
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.tagsdiv .newtag {
110
  margin-right: 4px;
111
  width: 200px;
112
  }
113
 
 
114
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.tagsdiv .tagadd {
115
  width: auto;
116
  }
117
 
 
118
  .media-frame input.mla-taxonomy-add-submit {
119
  font-size: 13px;
120
  line-height: 16px;
@@ -123,6 +137,12 @@
123
  width: auto;
124
  }
125
 
 
 
 
 
 
 
126
  /*
127
  * /wp-includes/js/jquery/suggest.js tag auto-complete results
128
  */
3
  * CSS Document
4
  *
5
  * This file contains styling attributes for the Media Manager Modal Window,
6
+ * as well as the WordPress 4.0 Media Grid.
7
+ * Adapted from /wp-admin/css/edit.css and given unique names to avoid conflicts.
8
  */
9
 
10
  .media-toolbar {
32
  .mla-search-options > li:last-child { margin-right: 0; }
33
 
34
  /**
35
+ * Media Toolbar Controls
36
+ */
37
+ .mode-grid.media-frame .media-toolbar .select-mode-toggle-button,
38
+ .mode-grid.media-frame .media-toolbar input#mla-terms-search {
39
+ vertical-align:middle;
40
+ }
41
+
42
+ .mode-grid.media-frame .media-toolbar input#media-search-input,
43
+ .mode-grid.media-frame .media-toolbar input#mla-search-submit {
44
  margin-top: 11px;
45
+ position: static;
46
+ width:auto
47
  }
48
 
49
  /**
50
  * Hide "Media Categories" meta box
51
  */
52
+ .attachment-compat .compat-item .compat-field-MLA-has-disabled-this-instance_metabox,
53
  .media-sidebar .compat-item .compat-field-MLA-has-disabled-this-instance_metabox {
54
  display: none;
55
  }
58
  * Checkbox-style taxonomy meta box
59
  */
60
 
61
+ /* .media-modal.mla-expanded .media-toolbar { right: 612px; } */
62
+ /* .media-modal.mla-expanded .attachments { right: 612px; } */
63
+ /* .media-modal.mla-expanded .media-sidebar { 6px; min-width: 600px; } */
64
 
65
  .media-modal .media-toolbar {
66
  right: 312px;
85
  display: none;
86
  }
87
 
88
+ .attachment-compat .compat-item .mla-taxonomy-row .mla-taxonomy-field div.categorydiv,
89
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.categorydiv {
90
  margin-top: 0px;
91
  padding-top: 6px;
92
  }
93
 
94
+ .attachment-compat .compat-item .mla-taxonomy-row .mla-taxonomy-field div.tagsdiv,
95
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.tagsdiv {
96
  margin-top: 0px;
97
  padding-top: 6px;
98
  }
99
 
100
+ .attachment-compat .compat-item .mla-taxonomy-row td.field div.tabs-panel,
101
  .media-sidebar .compat-item .mla-taxonomy-row td.field div.tabs-panel {
102
  min-height: 200px;
103
  max-height: 200px;
112
  * Flat taxonomy meta box, from /wp-admin/css/edit.css "13.0 - Tags"
113
  */
114
 
115
+ .attachment-compat .compat-item .mla-taxonomy-row .mla-taxonomy-field div.ajaxtag .newtag,
116
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.ajaxtag .newtag {
117
  position: relative;
118
  }
119
 
120
+ .attachment-compat .compat-item .mla-taxonomy-row .mla-taxonomy-field div.tagsdiv .newtag,
121
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.tagsdiv .newtag {
122
  margin-right: 4px;
123
  width: 200px;
124
  }
125
 
126
+ .attachment-compat .compat-item .mla-taxonomy-row .mla-taxonomy-field div.tagsdiv .tagadd,
127
  .media-sidebar .compat-item .mla-taxonomy-row .mla-taxonomy-field div.tagsdiv .tagadd {
128
  width: auto;
129
  }
130
 
131
+ .edit-attachment-frame input.mla-taxonomy-add-submit,
132
  .media-frame input.mla-taxonomy-add-submit {
133
  font-size: 13px;
134
  line-height: 16px;
137
  width: auto;
138
  }
139
 
140
+ /* ntdelbutton in media grid */
141
+ .edit-attachment-frame .tagchecklist span a {
142
+ position:static;
143
+ margin-left: 0px
144
+ }
145
+
146
  /*
147
  * /wp-includes/js/jquery/suggest.js tag auto-complete results
148
  */
examples/buddypress-hooks-example.php.txt CHANGED
@@ -75,17 +75,17 @@ class MLABuddyPressHooksExample {
75
  //add_filter( 'mla_gallery_query_arguments', 'MLABuddyPressHooksExample::mla_gallery_query_arguments_filter', 10, 1 );
76
  add_action( 'mla_gallery_wp_query_object', 'MLABuddyPressHooksExample::mla_gallery_wp_query_object_action', 10, 1 );
77
  //add_filter( 'mla_gallery_final_content', 'MLABuddyPressHooksExample::mla_gallery_final_content_filter', 10, 1 );
78
-
79
  //add_filter( 'use_mla_gallery_style', 'MLABuddyPressHooksExample::use_mla_gallery_style_filter', 10, 2 );
80
-
81
  //add_filter( 'mla_gallery_style_values', 'MLABuddyPressHooksExample::mla_gallery_style_values_filter', 10, 1 );
82
  //add_filter( 'mla_gallery_style_template', 'MLABuddyPressHooksExample::mla_gallery_style_template_filter', 10, 1 );
83
  //add_filter( 'mla_gallery_style_parse', 'MLABuddyPressHooksExample::mla_gallery_style_parse_filter', 10, 3 );
84
-
85
  //add_filter( 'mla_gallery_open_values', 'MLABuddyPressHooksExample::mla_gallery_open_values_filter', 10, 1 );
86
  //add_filter( 'mla_gallery_open_template', 'MLABuddyPressHooksExample::mla_gallery_open_template_filter', 10, 1 );
87
  //add_filter( 'mla_gallery_open_parse', 'MLABuddyPressHooksExample::mla_gallery_open_parse_filter', 10, 3 );
88
-
89
  //add_filter( 'mla_gallery_style', 'MLABuddyPressHooksExample::mla_gallery_style_filter', 10, 5 );
90
 
91
  //add_filter( 'mla_gallery_row_open_values', 'MLABuddyPressHooksExample::mla_gallery_row_open_values_filter', 10, 1 );
@@ -113,7 +113,7 @@ class MLABuddyPressHooksExample {
113
  * @var array
114
  */
115
  private static $shortcode_attributes = array();
116
-
117
  /**
118
  * MLA Gallery Raw (Display) Attributes
119
  *
@@ -134,7 +134,7 @@ class MLABuddyPressHooksExample {
134
  * Uncomment the error_log statements in any of the filters to see what's passed in
135
  */
136
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_raw_attributes_filter $shortcode_attributes = ' . var_export( $shortcode_attributes, true ), 0 );
137
-
138
  /*
139
  * Note that the global $post; object is available here and in all later filters.
140
  * It contains the post/page on which the [mla_gallery] appears.
@@ -143,7 +143,7 @@ class MLABuddyPressHooksExample {
143
  */
144
  global $post;
145
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_raw_attributes_filter $post->ID = ' . var_export( $post->ID, true ), 0 );
146
-
147
  return $shortcode_attributes;
148
  } // mla_gallery_raw_attributes_filter
149
 
@@ -167,7 +167,7 @@ class MLABuddyPressHooksExample {
167
  * Uncomment the error_log statements in any of the filters to see what's passed in
168
  */
169
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_attributes_filter $shortcode_attributes = ' . var_export( $shortcode_attributes, true ), 0 );
170
-
171
  /*
172
  * Save the attributes for use in the later filters
173
  */
@@ -184,7 +184,7 @@ class MLABuddyPressHooksExample {
184
  * @var NULL|string
185
  */
186
  private static $shortcode_content = NULL;
187
-
188
  /**
189
  * MLA Gallery Enclosed Content, initial filter
190
  *
@@ -202,7 +202,7 @@ class MLABuddyPressHooksExample {
202
  public static function mla_gallery_initial_content_filter( $shortcode_content, $shortcode_attributes ) {
203
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_initial_content_filter $shortcode_content = ' . var_export( $shortcode_content, true ), 0 );
204
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_initial_content_filter $shortcode_attributes = ' . var_export( $shortcode_attributes, true ), 0 );
205
-
206
  /*
207
  * Save the attributes for use in the later filters
208
  */
@@ -219,7 +219,7 @@ class MLABuddyPressHooksExample {
219
  * @var array
220
  */
221
  private static $all_display_parameters = array();
222
-
223
  /**
224
  * MLA Gallery (Display) Arguments
225
  *
@@ -238,7 +238,7 @@ class MLABuddyPressHooksExample {
238
  */
239
  public static function mla_gallery_arguments_filter( $all_display_parameters ) {
240
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_arguments_filter $all_display_parameters = ' . var_export( $all_display_parameters, true ), 0 );
241
-
242
  self::$all_display_parameters = $all_display_parameters;
243
  return $all_display_parameters;
244
  } // mla_gallery_arguments_filter
@@ -251,7 +251,7 @@ class MLABuddyPressHooksExample {
251
  * @var array
252
  */
253
  private static $query_attributes = array();
254
-
255
  /**
256
  * MLA Gallery Query Attributes
257
  *
@@ -270,7 +270,7 @@ class MLABuddyPressHooksExample {
270
  */
271
  public static function mla_gallery_query_attributes_filter( $query_attributes ) {
272
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_query_attributes_filter $query_attributes = ' . var_export( $query_attributes, true ), 0 );
273
-
274
  self::$query_attributes = $query_attributes;
275
  return $query_attributes;
276
  } // mla_gallery_query_attributes_filter
@@ -283,7 +283,7 @@ class MLABuddyPressHooksExample {
283
  * @var array
284
  */
285
  private static $all_query_parameters = array();
286
-
287
  /**
288
  * MLA Gallery Query Arguments
289
  *
@@ -298,9 +298,9 @@ class MLABuddyPressHooksExample {
298
  */
299
  public static function mla_gallery_query_arguments_filter( $all_query_parameters ) {
300
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_query_arguments_filter $all_query_parameters = ' . var_export( $all_query_parameters, true ), 0 );
301
-
302
  self::$all_query_parameters = $all_query_parameters;
303
-
304
  return $all_query_parameters;
305
  } // mla_gallery_query_arguments_filter
306
 
@@ -312,7 +312,7 @@ class MLABuddyPressHooksExample {
312
  * @var array
313
  */
314
  private static $wp_query_properties = array();
315
-
316
  /**
317
  * MLA Gallery WP Query Object
318
  *
@@ -328,20 +328,20 @@ class MLABuddyPressHooksExample {
328
  */
329
  public static function mla_gallery_wp_query_object_action( $query_arguments ) {
330
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_wp_query_object_action $query_arguments = ' . var_export( $query_arguments, true ), 0 );
331
-
332
  self::$wp_query_properties = array();
333
  self::$wp_query_properties ['post_count'] = MLAShortcodes::$mla_gallery_wp_query_object->post_count;
334
-
335
  if ( empty( self::$shortcode_attributes['buddypress_urls'] ) ) {
336
  return; // Don't need custom URLs
337
  }
338
-
339
  if ( 0 == self::$wp_query_properties ['post_count'] ) {
340
  return; // Empty gallery - nothing to do
341
  }
342
-
343
  global $wpdb;
344
-
345
  // Assemble the WordPress attachment IDs
346
  $post_info = array();
347
  foreach( MLAShortcodes::$mla_gallery_wp_query_object->posts as $value ) {
@@ -352,10 +352,10 @@ class MLABuddyPressHooksExample {
352
  $query = array();
353
  $query_parameters = array();
354
 
355
- $query[] = "SELECT rtm.id, rtm.media_id, rtm.media_author, rtm.cover_art, u.user_nicename FROM {$wpdb->prefix}rt_rtm_media AS rtm";
356
  $query[] = "LEFT JOIN {$wpdb->users} as u";
357
  $query[] = "ON (rtm.media_author = u.ID)";
358
-
359
  $placeholders = array();
360
  foreach ( $post_info as $value ) {
361
  $placeholders[] = '%s';
@@ -373,9 +373,10 @@ class MLABuddyPressHooksExample {
373
  $post_info[ $value->media_id ] = $value;
374
  }
375
  }
376
-
 
377
  self::$wp_query_properties ['post_info'] = $post_info;
378
-
379
  /*
380
  * Unlike Filters, Actions never return anything
381
  */
@@ -419,7 +420,7 @@ class MLABuddyPressHooksExample {
419
  public static function use_mla_gallery_style_filter( $use_style_template, $style_template_name ) {
420
  //error_log( 'MLABuddyPressHooksExample::use_mla_gallery_style_filter $use_style_template = ' . var_export( $use_style_template, true ), 0 );
421
  //error_log( 'MLABuddyPressHooksExample::use_mla_gallery_style_filter $style_template_name = ' . var_export( $style_template_name, true ), 0 );
422
-
423
  /*
424
  * Filters must return the first argument passed in, unchanged or updated
425
  */
@@ -442,20 +443,20 @@ class MLABuddyPressHooksExample {
442
  */
443
  public static function mla_gallery_style_values_filter( $style_values ) {
444
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_values_filter $style_values = ' . var_export( $style_values, true ), 0 );
445
-
446
  /*
447
  * You also have access to the PHP Super Globals, e.g., $_REQUEST, $_SERVER
448
  */
449
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_values_filter $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
450
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_values_filter $_SERVER[ REQUEST_URI ] = ' . var_export( $_SERVER['REQUEST_URI'], true ), 0 );
451
-
452
  /*
453
  * You can use the WordPress globals like $wp_query, $wpdb and $table_prefix as well.
454
  * Note that $wp_query contains values for the post/page query, NOT the [mla_gallery] query.
455
  */
456
  global $wp_query;
457
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_values_filter $wp_query->query = ' . var_export( $wp_query->query, true ), 0 );
458
-
459
  return $style_values;
460
  } // mla_gallery_style_values_filter
461
 
@@ -475,7 +476,7 @@ class MLABuddyPressHooksExample {
475
  */
476
  public static function mla_gallery_style_template_filter( $style_template ) {
477
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_template_filter $style_template = ' . var_export( $style_template, true ), 0 );
478
-
479
  return $style_template;
480
  } // mla_gallery_style_template_filter
481
 
@@ -500,10 +501,10 @@ class MLABuddyPressHooksExample {
500
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
501
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_parse_filter $style_template = ' . var_export( $style_template, true ), 0 );
502
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_parse_filter $style_values = ' . var_export( $style_values, true ), 0 );
503
-
504
  return $html_markup;
505
  } // mla_gallery_style_parse_filter
506
-
507
  /**
508
  * MLA Gallery Open Values
509
  *
@@ -518,7 +519,7 @@ class MLABuddyPressHooksExample {
518
  */
519
  public static function mla_gallery_open_values_filter( $markup_values ) {
520
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_values_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
521
-
522
  return $markup_values;
523
  } // mla_gallery_open_values_filter
524
 
@@ -533,7 +534,7 @@ class MLABuddyPressHooksExample {
533
  */
534
  public static function mla_gallery_open_template_filter( $open_template ) {
535
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_template_filter $open_template = ' . var_export( $open_template, true ), 0 );
536
-
537
  return $open_template;
538
  } // mla_gallery_open_template_filter
539
 
@@ -552,10 +553,10 @@ class MLABuddyPressHooksExample {
552
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
553
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_parse_filter $open_template = ' . var_export( $open_template, true ), 0 );
554
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_parse_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
555
-
556
  return $html_markup;
557
  } // mla_gallery_open_parse_filter
558
-
559
  /**
560
  * MLA Gallery Style
561
  *
@@ -578,10 +579,10 @@ class MLABuddyPressHooksExample {
578
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_filter $open_values = ' . var_export( $open_values, true ), 0 );
579
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_filter $style_template = ' . var_export( $style_template, true ), 0 );
580
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_filter $open_template = ' . var_export( $open_template, true ), 0 );
581
-
582
  return $html_markup;
583
  } // mla_gallery_style_filter
584
-
585
  /**
586
  * MLA Gallery Row Open Values
587
  *
@@ -593,7 +594,7 @@ class MLABuddyPressHooksExample {
593
  */
594
  public static function mla_gallery_row_open_values_filter( $markup_values ) {
595
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_values_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
596
-
597
  return $markup_values;
598
  } // mla_gallery_row_open_values_filter
599
 
@@ -608,7 +609,7 @@ class MLABuddyPressHooksExample {
608
  */
609
  public static function mla_gallery_row_open_template_filter( $row_open_template ) {
610
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_template_filter $row_open_template = ' . var_export( $row_open_template, true ), 0 );
611
-
612
  return $row_open_template;
613
  } // mla_gallery_row_open_template_filter
614
 
@@ -627,10 +628,30 @@ class MLABuddyPressHooksExample {
627
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
628
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_parse_filter $row_open_template = ' . var_export( $row_open_template, true ), 0 );
629
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_parse_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
630
-
631
  return $html_markup;
632
  } // mla_gallery_row_open_parse_filter
633
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
634
  /**
635
  * MLA Gallery Item Values
636
  *
@@ -651,32 +672,60 @@ class MLABuddyPressHooksExample {
651
  if ( ! isset( self::$shortcode_attributes['buddypress_urls'] ) ) {
652
  return $item_values; // leave them unchanged
653
  }
654
-
655
- $use_cover_art = 'cover' == strtolower( trim( self::$shortcode_attributes['buddypress_urls'] ) );
656
-
657
  if ( isset( self::$wp_query_properties ['post_info'][ $item_values['attachment_ID'] ] ) ) {
658
  $post_info = self::$wp_query_properties ['post_info'][ $item_values['attachment_ID'] ];
659
  } else {
660
  return $item_values; // no matching rtMedia item
661
  }
662
-
663
  $new_url = $item_values['site_url'] . '/members/' . $post_info->user_nicename . '/media/' . $post_info->id . '/';
664
  $new_link = str_replace( $item_values['link_url'], $new_url, $item_values['link'] );
665
 
666
  // Add the "media thumbnail", if desired and present. Note that the size is fixed at 150x150 pixels.
667
- if ( $use_cover_art && ! empty( $post_info->cover_art ) ) {
668
- $new_thumbnail = '<img width="150" height="150" src="' . $post_info->cover_art . '" class="attachment-thumbnail" alt="' . $item_values['thumbnail_content'] . '" />';
669
- $new_link = str_replace( $item_values['thumbnail_content'] . '</a>', $new_thumbnail . '</a>', $new_link );
670
-
671
- $item_values['thumbnail_content'] = $new_thumbnail;
672
- $item_values['thumbnail_width'] = '150';
673
- $item_values['thumbnail_height'] = '150';
674
- $item_values['thumbnail_url'] = $post_info->cover_art;
675
- }
 
 
 
676
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
677
  $item_values['link_url'] = $new_url;
678
  $item_values['link'] = $new_link;
679
-
680
  return $item_values;
681
  } // mla_gallery_item_values_filter
682
 
@@ -691,7 +740,7 @@ class MLABuddyPressHooksExample {
691
  */
692
  public static function mla_gallery_item_template_filter( $item_template ) {
693
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_item_template_filter $item_template = ' . var_export( $item_template, true ), 0 );
694
-
695
  return $item_template;
696
  } // mla_gallery_item_template_filter
697
 
@@ -710,10 +759,10 @@ class MLABuddyPressHooksExample {
710
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_item_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
711
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_item_parse_filter $item_template = ' . var_export( $item_template, true ), 0 );
712
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_item_parse_filter $item_values = ' . var_export( $item_values, true ), 0 );
713
-
714
  return $html_markup;
715
  } // mla_gallery_item_parse_filter
716
-
717
  /**
718
  * MLA Gallery Row Close Values
719
  *
@@ -725,7 +774,7 @@ class MLABuddyPressHooksExample {
725
  */
726
  public static function mla_gallery_row_close_values_filter( $markup_values ) {
727
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_values_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
728
-
729
  return $markup_values;
730
  } // mla_gallery_row_close_values_filter
731
 
@@ -740,7 +789,7 @@ class MLABuddyPressHooksExample {
740
  */
741
  public static function mla_gallery_row_close_template_filter( $row_close_template ) {
742
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_template_filter $row_close_template = ' . var_export( $row_close_template, true ), 0 );
743
-
744
  return $row_close_template;
745
  } // mla_gallery_row_close_template_filter
746
 
@@ -759,10 +808,10 @@ class MLABuddyPressHooksExample {
759
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
760
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_parse_filter $row_close_template = ' . var_export( $row_close_template, true ), 0 );
761
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_parse_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
762
-
763
  return $html_markup;
764
  } // mla_gallery_row_close_parse_filter
765
-
766
  /**
767
  * MLA Gallery Close Values
768
  *
@@ -774,7 +823,7 @@ class MLABuddyPressHooksExample {
774
  */
775
  public static function mla_gallery_close_values_filter( $markup_values ) {
776
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_values_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
777
-
778
  return $markup_values;
779
  } // mla_gallery_close_values_filter
780
 
@@ -789,7 +838,7 @@ class MLABuddyPressHooksExample {
789
  */
790
  public static function mla_gallery_close_template_filter( $close_template ) {
791
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_template_filter $close_template = ' . var_export( $close_template, true ), 0 );
792
-
793
  return $close_template;
794
  } // mla_gallery_close_template_filter
795
 
@@ -808,10 +857,10 @@ class MLABuddyPressHooksExample {
808
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
809
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_parse_filter $close_template = ' . var_export( $close_template, true ), 0 );
810
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_parse_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
811
-
812
  return $html_markup;
813
  } // mla_gallery_close_parse_filter
814
-
815
  } // Class MLABuddyPressHooksExample
816
 
817
  /*
75
  //add_filter( 'mla_gallery_query_arguments', 'MLABuddyPressHooksExample::mla_gallery_query_arguments_filter', 10, 1 );
76
  add_action( 'mla_gallery_wp_query_object', 'MLABuddyPressHooksExample::mla_gallery_wp_query_object_action', 10, 1 );
77
  //add_filter( 'mla_gallery_final_content', 'MLABuddyPressHooksExample::mla_gallery_final_content_filter', 10, 1 );
78
+
79
  //add_filter( 'use_mla_gallery_style', 'MLABuddyPressHooksExample::use_mla_gallery_style_filter', 10, 2 );
80
+
81
  //add_filter( 'mla_gallery_style_values', 'MLABuddyPressHooksExample::mla_gallery_style_values_filter', 10, 1 );
82
  //add_filter( 'mla_gallery_style_template', 'MLABuddyPressHooksExample::mla_gallery_style_template_filter', 10, 1 );
83
  //add_filter( 'mla_gallery_style_parse', 'MLABuddyPressHooksExample::mla_gallery_style_parse_filter', 10, 3 );
84
+
85
  //add_filter( 'mla_gallery_open_values', 'MLABuddyPressHooksExample::mla_gallery_open_values_filter', 10, 1 );
86
  //add_filter( 'mla_gallery_open_template', 'MLABuddyPressHooksExample::mla_gallery_open_template_filter', 10, 1 );
87
  //add_filter( 'mla_gallery_open_parse', 'MLABuddyPressHooksExample::mla_gallery_open_parse_filter', 10, 3 );
88
+
89
  //add_filter( 'mla_gallery_style', 'MLABuddyPressHooksExample::mla_gallery_style_filter', 10, 5 );
90
 
91
  //add_filter( 'mla_gallery_row_open_values', 'MLABuddyPressHooksExample::mla_gallery_row_open_values_filter', 10, 1 );
113
  * @var array
114
  */
115
  private static $shortcode_attributes = array();
116
+
117
  /**
118
  * MLA Gallery Raw (Display) Attributes
119
  *
134
  * Uncomment the error_log statements in any of the filters to see what's passed in
135
  */
136
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_raw_attributes_filter $shortcode_attributes = ' . var_export( $shortcode_attributes, true ), 0 );
137
+
138
  /*
139
  * Note that the global $post; object is available here and in all later filters.
140
  * It contains the post/page on which the [mla_gallery] appears.
143
  */
144
  global $post;
145
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_raw_attributes_filter $post->ID = ' . var_export( $post->ID, true ), 0 );
146
+
147
  return $shortcode_attributes;
148
  } // mla_gallery_raw_attributes_filter
149
 
167
  * Uncomment the error_log statements in any of the filters to see what's passed in
168
  */
169
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_attributes_filter $shortcode_attributes = ' . var_export( $shortcode_attributes, true ), 0 );
170
+
171
  /*
172
  * Save the attributes for use in the later filters
173
  */
184
  * @var NULL|string
185
  */
186
  private static $shortcode_content = NULL;
187
+
188
  /**
189
  * MLA Gallery Enclosed Content, initial filter
190
  *
202
  public static function mla_gallery_initial_content_filter( $shortcode_content, $shortcode_attributes ) {
203
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_initial_content_filter $shortcode_content = ' . var_export( $shortcode_content, true ), 0 );
204
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_initial_content_filter $shortcode_attributes = ' . var_export( $shortcode_attributes, true ), 0 );
205
+
206
  /*
207
  * Save the attributes for use in the later filters
208
  */
219
  * @var array
220
  */
221
  private static $all_display_parameters = array();
222
+
223
  /**
224
  * MLA Gallery (Display) Arguments
225
  *
238
  */
239
  public static function mla_gallery_arguments_filter( $all_display_parameters ) {
240
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_arguments_filter $all_display_parameters = ' . var_export( $all_display_parameters, true ), 0 );
241
+
242
  self::$all_display_parameters = $all_display_parameters;
243
  return $all_display_parameters;
244
  } // mla_gallery_arguments_filter
251
  * @var array
252
  */
253
  private static $query_attributes = array();
254
+
255
  /**
256
  * MLA Gallery Query Attributes
257
  *
270
  */
271
  public static function mla_gallery_query_attributes_filter( $query_attributes ) {
272
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_query_attributes_filter $query_attributes = ' . var_export( $query_attributes, true ), 0 );
273
+
274
  self::$query_attributes = $query_attributes;
275
  return $query_attributes;
276
  } // mla_gallery_query_attributes_filter
283
  * @var array
284
  */
285
  private static $all_query_parameters = array();
286
+
287
  /**
288
  * MLA Gallery Query Arguments
289
  *
298
  */
299
  public static function mla_gallery_query_arguments_filter( $all_query_parameters ) {
300
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_query_arguments_filter $all_query_parameters = ' . var_export( $all_query_parameters, true ), 0 );
301
+
302
  self::$all_query_parameters = $all_query_parameters;
303
+
304
  return $all_query_parameters;
305
  } // mla_gallery_query_arguments_filter
306
 
312
  * @var array
313
  */
314
  private static $wp_query_properties = array();
315
+
316
  /**
317
  * MLA Gallery WP Query Object
318
  *
328
  */
329
  public static function mla_gallery_wp_query_object_action( $query_arguments ) {
330
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_wp_query_object_action $query_arguments = ' . var_export( $query_arguments, true ), 0 );
331
+
332
  self::$wp_query_properties = array();
333
  self::$wp_query_properties ['post_count'] = MLAShortcodes::$mla_gallery_wp_query_object->post_count;
334
+
335
  if ( empty( self::$shortcode_attributes['buddypress_urls'] ) ) {
336
  return; // Don't need custom URLs
337
  }
338
+
339
  if ( 0 == self::$wp_query_properties ['post_count'] ) {
340
  return; // Empty gallery - nothing to do
341
  }
342
+
343
  global $wpdb;
344
+
345
  // Assemble the WordPress attachment IDs
346
  $post_info = array();
347
  foreach( MLAShortcodes::$mla_gallery_wp_query_object->posts as $value ) {
352
  $query = array();
353
  $query_parameters = array();
354
 
355
+ $query[] = "SELECT rtm.id, rtm.media_id, rtm.media_author, rtm.media_type, rtm.cover_art, u.user_nicename FROM {$wpdb->prefix}rt_rtm_media AS rtm";
356
  $query[] = "LEFT JOIN {$wpdb->users} as u";
357
  $query[] = "ON (rtm.media_author = u.ID)";
358
+
359
  $placeholders = array();
360
  foreach ( $post_info as $value ) {
361
  $placeholders[] = '%s';
373
  $post_info[ $value->media_id ] = $value;
374
  }
375
  }
376
+
377
+ //error_log( 'MLABuddyPressHooksExample::mla_gallery_wp_query_object_action $post_info = ' . var_export( $post_info, true ), 0 );
378
  self::$wp_query_properties ['post_info'] = $post_info;
379
+
380
  /*
381
  * Unlike Filters, Actions never return anything
382
  */
420
  public static function use_mla_gallery_style_filter( $use_style_template, $style_template_name ) {
421
  //error_log( 'MLABuddyPressHooksExample::use_mla_gallery_style_filter $use_style_template = ' . var_export( $use_style_template, true ), 0 );
422
  //error_log( 'MLABuddyPressHooksExample::use_mla_gallery_style_filter $style_template_name = ' . var_export( $style_template_name, true ), 0 );
423
+
424
  /*
425
  * Filters must return the first argument passed in, unchanged or updated
426
  */
443
  */
444
  public static function mla_gallery_style_values_filter( $style_values ) {
445
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_values_filter $style_values = ' . var_export( $style_values, true ), 0 );
446
+
447
  /*
448
  * You also have access to the PHP Super Globals, e.g., $_REQUEST, $_SERVER
449
  */
450
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_values_filter $_REQUEST = ' . var_export( $_REQUEST, true ), 0 );
451
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_values_filter $_SERVER[ REQUEST_URI ] = ' . var_export( $_SERVER['REQUEST_URI'], true ), 0 );
452
+
453
  /*
454
  * You can use the WordPress globals like $wp_query, $wpdb and $table_prefix as well.
455
  * Note that $wp_query contains values for the post/page query, NOT the [mla_gallery] query.
456
  */
457
  global $wp_query;
458
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_values_filter $wp_query->query = ' . var_export( $wp_query->query, true ), 0 );
459
+
460
  return $style_values;
461
  } // mla_gallery_style_values_filter
462
 
476
  */
477
  public static function mla_gallery_style_template_filter( $style_template ) {
478
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_template_filter $style_template = ' . var_export( $style_template, true ), 0 );
479
+
480
  return $style_template;
481
  } // mla_gallery_style_template_filter
482
 
501
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
502
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_parse_filter $style_template = ' . var_export( $style_template, true ), 0 );
503
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_parse_filter $style_values = ' . var_export( $style_values, true ), 0 );
504
+
505
  return $html_markup;
506
  } // mla_gallery_style_parse_filter
507
+
508
  /**
509
  * MLA Gallery Open Values
510
  *
519
  */
520
  public static function mla_gallery_open_values_filter( $markup_values ) {
521
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_values_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
522
+
523
  return $markup_values;
524
  } // mla_gallery_open_values_filter
525
 
534
  */
535
  public static function mla_gallery_open_template_filter( $open_template ) {
536
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_template_filter $open_template = ' . var_export( $open_template, true ), 0 );
537
+
538
  return $open_template;
539
  } // mla_gallery_open_template_filter
540
 
553
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
554
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_parse_filter $open_template = ' . var_export( $open_template, true ), 0 );
555
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_open_parse_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
556
+
557
  return $html_markup;
558
  } // mla_gallery_open_parse_filter
559
+
560
  /**
561
  * MLA Gallery Style
562
  *
579
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_filter $open_values = ' . var_export( $open_values, true ), 0 );
580
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_filter $style_template = ' . var_export( $style_template, true ), 0 );
581
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_style_filter $open_template = ' . var_export( $open_template, true ), 0 );
582
+
583
  return $html_markup;
584
  } // mla_gallery_style_filter
585
+
586
  /**
587
  * MLA Gallery Row Open Values
588
  *
594
  */
595
  public static function mla_gallery_row_open_values_filter( $markup_values ) {
596
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_values_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
597
+
598
  return $markup_values;
599
  } // mla_gallery_row_open_values_filter
600
 
609
  */
610
  public static function mla_gallery_row_open_template_filter( $row_open_template ) {
611
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_template_filter $row_open_template = ' . var_export( $row_open_template, true ), 0 );
612
+
613
  return $row_open_template;
614
  } // mla_gallery_row_open_template_filter
615
 
628
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
629
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_parse_filter $row_open_template = ' . var_export( $row_open_template, true ), 0 );
630
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_open_parse_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
631
+
632
  return $html_markup;
633
  } // mla_gallery_row_open_parse_filter
634
 
635
+ /* FROM buddypress-media rt-template-functions.php
636
+
637
+ function rtmedia_get_cover_art_src( $id ) {
638
+ $model = new RTMediaModel();
639
+ $media = $model->get( array( "id" => $id ) );
640
+ $cover_art = $media[ 0 ]->cover_art;
641
+ if ( $cover_art != "" ){
642
+ if ( is_numeric( $cover_art ) ){
643
+ $thumbnail_info = wp_get_attachment_image_src( $cover_art, 'full' );
644
+
645
+ return $thumbnail_info[ 0 ];
646
+ } else {
647
+ return $cover_art;
648
+ }
649
+ } else {
650
+ return false;
651
+ }
652
+ }
653
+ */
654
+
655
  /**
656
  * MLA Gallery Item Values
657
  *
672
  if ( ! isset( self::$shortcode_attributes['buddypress_urls'] ) ) {
673
  return $item_values; // leave them unchanged
674
  }
675
+
 
 
676
  if ( isset( self::$wp_query_properties ['post_info'][ $item_values['attachment_ID'] ] ) ) {
677
  $post_info = self::$wp_query_properties ['post_info'][ $item_values['attachment_ID'] ];
678
  } else {
679
  return $item_values; // no matching rtMedia item
680
  }
681
+
682
  $new_url = $item_values['site_url'] . '/members/' . $post_info->user_nicename . '/media/' . $post_info->id . '/';
683
  $new_link = str_replace( $item_values['link_url'], $new_url, $item_values['link'] );
684
 
685
  // Add the "media thumbnail", if desired and present. Note that the size is fixed at 150x150 pixels.
686
+ if ( 'cover' == strtolower( trim( self::$shortcode_attributes['buddypress_urls'] ) ) ) {
687
+ // Supply a default image for video and music media
688
+ if ( empty( $post_info->cover_art ) && defined( 'RTMEDIA_URL' ) ) {
689
+ switch ( $post_info->media_type ) {
690
+ case 'video':
691
+ $post_info->cover_art = RTMEDIA_URL . 'app/assets/img/video_thumb.png';
692
+ break;
693
+ case 'music':
694
+ $post_info->cover_art = RTMEDIA_URL . 'app/assets/img/audio_thumb.png';
695
+ break;
696
+ }
697
+ }
698
 
699
+ if ( ! empty( $post_info->cover_art ) ) {
700
+ if ( is_numeric( $post_info->cover_art ) ){
701
+ $thumbnail_info = wp_get_attachment_image_src( $post_info->cover_art, 'thumbnail' );
702
+
703
+ if ( false === $thumbnail_info ) {
704
+ $thumbnail_info = wp_get_attachment_image_src( $post_info->cover_art, 'full' );
705
+ }
706
+
707
+ if ( is_array( $thumbnail_info ) ) {
708
+ $post_info->cover_art = $thumbnail_info[ 0 ];
709
+ } else {
710
+ $post_info->cover_art = '';
711
+ }
712
+ }
713
+
714
+ if ( ! empty( $post_info->cover_art ) ) {
715
+ $new_thumbnail = '<img width="150" height="150" src="' . $post_info->cover_art . '" class="attachment-thumbnail" alt="' . $item_values['thumbnail_content'] . '" />';
716
+ $new_link = str_replace( $item_values['thumbnail_content'] . '</a>', $new_thumbnail . '</a>', $new_link );
717
+
718
+ $item_values['thumbnail_content'] = $new_thumbnail;
719
+ $item_values['thumbnail_width'] = '150';
720
+ $item_values['thumbnail_height'] = '150';
721
+ $item_values['thumbnail_url'] = $post_info->cover_art;
722
+ }
723
+ } // has cover art
724
+ } // use cover art
725
+
726
  $item_values['link_url'] = $new_url;
727
  $item_values['link'] = $new_link;
728
+
729
  return $item_values;
730
  } // mla_gallery_item_values_filter
731
 
740
  */
741
  public static function mla_gallery_item_template_filter( $item_template ) {
742
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_item_template_filter $item_template = ' . var_export( $item_template, true ), 0 );
743
+
744
  return $item_template;
745
  } // mla_gallery_item_template_filter
746
 
759
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_item_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
760
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_item_parse_filter $item_template = ' . var_export( $item_template, true ), 0 );
761
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_item_parse_filter $item_values = ' . var_export( $item_values, true ), 0 );
762
+
763
  return $html_markup;
764
  } // mla_gallery_item_parse_filter
765
+
766
  /**
767
  * MLA Gallery Row Close Values
768
  *
774
  */
775
  public static function mla_gallery_row_close_values_filter( $markup_values ) {
776
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_values_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
777
+
778
  return $markup_values;
779
  } // mla_gallery_row_close_values_filter
780
 
789
  */
790
  public static function mla_gallery_row_close_template_filter( $row_close_template ) {
791
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_template_filter $row_close_template = ' . var_export( $row_close_template, true ), 0 );
792
+
793
  return $row_close_template;
794
  } // mla_gallery_row_close_template_filter
795
 
808
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
809
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_parse_filter $row_close_template = ' . var_export( $row_close_template, true ), 0 );
810
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_row_close_parse_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
811
+
812
  return $html_markup;
813
  } // mla_gallery_row_close_parse_filter
814
+
815
  /**
816
  * MLA Gallery Close Values
817
  *
823
  */
824
  public static function mla_gallery_close_values_filter( $markup_values ) {
825
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_values_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
826
+
827
  return $markup_values;
828
  } // mla_gallery_close_values_filter
829
 
838
  */
839
  public static function mla_gallery_close_template_filter( $close_template ) {
840
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_template_filter $close_template = ' . var_export( $close_template, true ), 0 );
841
+
842
  return $close_template;
843
  } // mla_gallery_close_template_filter
844
 
857
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_parse_filter $html_markup = ' . var_export( $html_markup, true ), 0 );
858
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_parse_filter $close_template = ' . var_export( $close_template, true ), 0 );
859
  //error_log( 'MLABuddyPressHooksExample::mla_gallery_close_parse_filter $markup_values = ' . var_export( $markup_values, true ), 0 );
860
+
861
  return $html_markup;
862
  } // mla_gallery_close_parse_filter
863
+
864
  } // Class MLABuddyPressHooksExample
865
 
866
  /*
examples/mla-simple-mapping-hooks-example.php.txt ADDED
@@ -0,0 +1,598 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Provides an example of the filters provided by the IPTC/EXIF and Custom Field mapping features
4
+ *
5
+ * In this example the Title and ALT Text values are cleaned up, replacing dashes and underscores with spaces.
6
+ *
7
+ * @package MLA Simple Mapping Hooks Example
8
+ * @version 1.00
9
+ */
10
+
11
+ /*
12
+ Plugin Name: MLA Simple Mapping Hooks Example
13
+ Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
14
+ Description: Provides an example of the filters provided by the IPTC/EXIF and Custom Field mapping features.
15
+ Author: David Lingren
16
+ Version: 1.00
17
+ Author URI: http://fairtradejudaica.org/our-story/staff/
18
+
19
+ Copyright 2014 David Lingren
20
+
21
+ This program is free software; you can redistribute it and/or modify
22
+ it under the terms of the GNU General Public License as published by
23
+ the Free Software Foundation; either version 2 of the License, or
24
+ (at your option) any later version.
25
+
26
+ This program is distributed in the hope that it will be useful,
27
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
28
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
+ GNU General Public License for more details.
30
+
31
+ You can get a copy of the GNU General Public License by writing to the
32
+ Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
33
+ */
34
+
35
+ /**
36
+ * Class MLA Simple Mapping Hooks Example hooks all of the filters provided by the IPTC/EXIF and Custom Field mapping features
37
+ *
38
+ * Call it anything you want, but give it an unlikely and hopefully unique name. Hiding enerything
39
+ * else inside a class means this is the only name you have to worry about.
40
+ *
41
+ * @package MLA Simple Mapping Hooks Example
42
+ * @since 1.00
43
+ */
44
+ class MLASimpleMappingHooksExample {
45
+ /**
46
+ * Initialization function, similar to __construct()
47
+ *
48
+ * Installs filters and actions that handle the MLA hooks for uploading and mapping.
49
+ *
50
+ * @since 1.00
51
+ *
52
+ * @return void
53
+ */
54
+ public static function initialize() {
55
+ /*
56
+ * The filters are only useful in the admin section; exit if in the "front-end" posts/pages.
57
+ */
58
+ if ( ! is_admin() )
59
+ return;
60
+
61
+ /*
62
+ * add_filter parameters:
63
+ * $tag - name of the hook you're filtering; defined by [mla_gallery]
64
+ * $function_to_add - function to be called when [mla_gallery] applies the filter
65
+ * $priority - default 10; lower runs earlier, higher runs later
66
+ * $accepted_args - number of arguments your function accepts
67
+ *
68
+ * Comment out the filters you don't need; save them for future use
69
+ */
70
+ //add_filter( 'mla_upload_prefilter', 'MLASimpleMappingHooksExample::mla_upload_prefilter_filter', 10, 2 );
71
+ //add_filter( 'mla_upload_filter', 'MLASimpleMappingHooksExample::mla_upload_filter_filter', 10, 2 );
72
+
73
+ //add_action( 'mla_add_attachment', 'MLASimpleMappingHooksExample::mla_add_attachment_action', 10, 1 );
74
+
75
+ //add_filter( 'mla_update_attachment_metadata_options', 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_options_filter', 10, 3 );
76
+ //add_filter( 'mla_update_attachment_metadata_prefilter', 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_prefilter_filter', 10, 3 );
77
+ //add_filter( 'mla_update_attachment_metadata_postfilter', 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_postfilter_filter', 10, 3 );
78
+
79
+ //add_filter( 'mla_mapping_settings', 'MLASimpleMappingHooksExample::mla_mapping_settings_filter', 10, 4 );
80
+ //add_filter( 'mla_mapping_rule', 'MLASimpleMappingHooksExample::mla_mapping_rule_filter', 10, 4 );
81
+ //add_filter( 'mla_mapping_custom_value', 'MLASimpleMappingHooksExample::mla_mapping_custom_value_filter', 10, 5 );
82
+ //add_filter( 'mla_mapping_iptc_value', 'MLASimpleMappingHooksExample::mla_mapping_iptc_value_filter', 10, 5 );
83
+ //add_filter( 'mla_mapping_exif_value', 'MLASimpleMappingHooksExample::mla_mapping_exif_value_filter', 10, 5 );
84
+ add_filter( 'mla_mapping_updates', 'MLASimpleMappingHooksExample::mla_mapping_updates_filter', 10, 5 );
85
+
86
+ //add_filter( 'mla_get_options_tablist', 'MLASimpleMappingHooksExample::mla_get_options_tablist_filter', 10, 3 );
87
+ }
88
+
89
+ /**
90
+ * Save the original image metadata when a file is first uploaded
91
+ *
92
+ * Array elements are:
93
+ * 'post_id' => 0,
94
+ * 'mla_iptc_metadata' => array(),
95
+ * 'mla_exif_metadata' => array(),
96
+ * 'wp_image_metadata' => array(),
97
+ *
98
+ * @since 1.00
99
+ *
100
+ * @var array
101
+ */
102
+ private static $image_metadata = array();
103
+
104
+ /**
105
+ * MLA Mapping Upload Prefilter
106
+ *
107
+ * This filter gives you an opportunity to record the original IPTC, EXIF and
108
+ * WordPress image_metadata before the file is stored in the Media Library.
109
+ * You can also modify the file name that will be used in the Media Library.
110
+ *
111
+ * Many plugins and image editing functions alter or destroy this information,
112
+ * so this may be your last change to preserve it.
113
+ *
114
+ * @since 1.00
115
+ *
116
+ * @param array the file name, type and location
117
+ * @param array the IPTC, EXIF and WordPress image_metadata
118
+ *
119
+ * @return array updated file name and other information
120
+ */
121
+ public static function mla_upload_prefilter_filter( $file, $image_metadata ) {
122
+ /*
123
+ * Uncomment the error_log statements in any of the filters to see what's passed in
124
+ */
125
+ //error_log( 'MLASimpleMappingHooksExample::mla_upload_prefilter_filter $file = ' . var_export( $file, true ), 0 );
126
+ //error_log( 'MLASimpleMappingHooksExample::mla_upload_prefilter_filter $image_metadata = ' . var_export( $image_metadata, true ), 0 );
127
+
128
+ /*
129
+ * Save the information for use in the later filters
130
+ */
131
+ self::$image_metadata = $image_metadata;
132
+ self::$image_metadata['preload_file'] = $file;
133
+
134
+ return $file;
135
+ } // mla_upload_prefilter_filter
136
+
137
+ /**
138
+ * MLA Mapping Upload Filter
139
+ *
140
+ * This filter gives you an opportunity to record some additional metadata
141
+ * for audio and video media after the file is stored in the Media Library.
142
+ *
143
+ * Many plugins and other functions alter or destroy this information,
144
+ * so this may be your last change to preserve it.
145
+ *
146
+ * @since 1.00
147
+ *
148
+ * @param array the file name, type and location
149
+ * @param array the ID3 metadata for audio and video files
150
+ *
151
+ * @return array updated file name, type and location
152
+ */
153
+ public static function mla_upload_filter_filter( $file, $id3_data ) {
154
+ //error_log( 'MLASimpleMappingHooksExample::mla_upload_filter_filter $file = ' . var_export( $file, true ), 0 );
155
+ //error_log( 'MLASimpleMappingHooksExample::mla_upload_filter_filter $id3_data = ' . var_export( $id3_data, true ), 0 );
156
+
157
+ /*
158
+ * Save the information for use in the later filters
159
+ */
160
+ self::$image_metadata['postload_file'] = $file;
161
+ self::$image_metadata['id3_metadata'] = $id3_data;
162
+
163
+ return $file;
164
+ } // mla_upload_filter_filter
165
+
166
+ /**
167
+ * MLA Add Attachment Action
168
+ *
169
+ * This filter is called at the end of the wp_insert_attachment() function,
170
+ * after the file is in place and the post object has been created in the database.
171
+ *
172
+ * By this time, other plugins have probably run their own 'add_attachment' filters
173
+ * and done their work/damage to metadata, etc.
174
+ *
175
+ * @since 1.00
176
+ *
177
+ * @param integer The Post ID of the new attachment
178
+ *
179
+ * @return void
180
+ */
181
+ public static function mla_add_attachment_action( $post_id ) {
182
+ //error_log( 'MLASimpleMappingHooksExample::mla_add_attachment_action $post_id = ' . var_export( $post_id, true ), 0 );
183
+
184
+ /*
185
+ * Save the information for use in the later filters
186
+ */
187
+ self::$image_metadata['post_id'] = $post_id;
188
+ } // mla_add_attachment_action
189
+
190
+ /**
191
+ * MLA Update Attachment Metadata Options
192
+ *
193
+ * This filter lets you inspect or change the processing options that will
194
+ * control the MLA mapping rules in the update_attachment_metadata filter.
195
+ *
196
+ * The options are:
197
+ * is_upload - true if this is part of the original file upload process
198
+ * enable_iptc_exif_mapping - true to apply IPTC/EXIF mapping to file uploads
199
+ * enable_custom_field_mapping - true to apply custom field mapping to file uploads
200
+ * enable_iptc_exif_update - true to apply IPTC/EXIF mapping to updates
201
+ * enable_custom_field_update - true to apply custom field mapping to updates
202
+ *
203
+ * @since 1.00
204
+ *
205
+ * @param array Processing options, e.g., 'is_upload'
206
+ * @param array attachment metadata
207
+ * @param integer The Post ID of the new/updated attachment
208
+ *
209
+ * @return array updated processing options
210
+ */
211
+ public static function mla_update_attachment_metadata_options_filter( $options, $data, $post_id ) {
212
+ //error_log( 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_options_filter $options = ' . var_export( $options, true ), 0 );
213
+ //error_log( 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_options_filter $data = ' . var_export( $data, true ), 0 );
214
+ //error_log( 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_options_filter $post_id = ' . var_export( $post_id, true ), 0 );
215
+
216
+ return $options;
217
+ } // mla_update_attachment_metadata_prefilter_filter
218
+
219
+ /**
220
+ * MLA Update Attachment Metadata Prefilter
221
+ *
222
+ * This filter is called at the end of the wp_update_attachment_metadata() function,
223
+ * BEFORE any MLA mapping rules are applied. The prefilter gives you an
224
+ * opportunity to record or update the metadata before the mapping.
225
+ *
226
+ * The wp_update_attachment_metadata() function is called at the end of the file upload process and at
227
+ * several later points, such as when an image attachment is edited or by
228
+ * plugins that alter the attachment file.
229
+ *
230
+ * @since 1.00
231
+ *
232
+ * @param array attachment metadata
233
+ * @param integer The Post ID of the new/updated attachment
234
+ * @param array Processing options, e.g., 'is_upload'
235
+ *
236
+ * @return array updated attachment metadata
237
+ */
238
+ public static function mla_update_attachment_metadata_prefilter_filter( $data, $post_id, $options ) {
239
+ //error_log( 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_prefilter_filter $data = ' . var_export( $data, true ), 0 );
240
+ //error_log( 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_prefilter_filter $post_id = ' . var_export( $post_id, true ), 0 );
241
+ //error_log( 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_prefilter_filter $options = ' . var_export( $options, true ), 0 );
242
+
243
+ return $data;
244
+ } // mla_update_attachment_metadata_prefilter_filter
245
+
246
+ /**
247
+ * MLA Update Attachment Metadata Postfilter
248
+ *
249
+ * This filter is called AFTER MLA mapping rules are applied during
250
+ * wp_update_attachment_metadata() processing. The postfilter gives you
251
+ * an opportunity to record or update the metadata after the mapping.
252
+ *
253
+ * @since 1.00
254
+ *
255
+ * @param array attachment metadata
256
+ * @param integer The Post ID of the new/updated attachment
257
+ * @param array Processing options, e.g., 'is_upload'
258
+ *
259
+ * @return array updated attachment metadata
260
+ */
261
+ public static function mla_update_attachment_metadata_postfilter_filter( $data, $post_id, $options ) {
262
+ //error_log( 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_postfilter_filter $data = ' . var_export( $data, true ), 0 );
263
+ //error_log( 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_postfilter_filter $post_id = ' . var_export( $post_id, true ), 0 );
264
+ //error_log( 'MLASimpleMappingHooksExample::mla_update_attachment_metadata_postfilter_filter $options = ' . var_export( $options, true ), 0 );
265
+
266
+ return $data;
267
+ } // mla_update_attachment_metadata_postfilter_filter
268
+
269
+ /**
270
+ * MLA Mapping Settings Filter
271
+ *
272
+ * This filter is called before any mapping rules are executed.
273
+ * You can add, change or delete rules from the array.
274
+ *
275
+ * @since 1.00
276
+ *
277
+ * @param array mapping rules
278
+ * @param integer post ID to be evaluated
279
+ * @param string category/scope to evaluate against, e.g., custom_field_mapping or single_attachment_mapping
280
+ * @param array attachment_metadata, default NULL
281
+ *
282
+ * @return array updated mapping rules
283
+ */
284
+ public static function mla_mapping_settings_filter( $settings, $post_id, $category, $attachment_metadata ) {
285
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_settings_filter $settings = ' . var_export( $settings, true ), 0 );
286
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_settings_filter $post_id = ' . var_export( $post_id, true ), 0 );
287
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_settings_filter $category = ' . var_export( $category, true ), 0 );
288
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_settings_filter $attachment_metadata = ' . var_export( $attachment_metadata, true ), 0 );
289
+
290
+ /*
291
+ * $category gives the context in which the rule is applied:
292
+ * 'custom_field_mapping' - mapping custom fields for ALL attachments
293
+ * 'single_attachment_mapping' - mapping custom fields for ONE attachments
294
+ *
295
+ * 'iptc_exif_mapping' - mapping ALL IPTC/EXIF rules
296
+ * 'iptc_exif_standard_mapping' - mapping standard field rules
297
+ * 'iptc_exif_taxonomy_mapping' - mapping taxonomy term rules
298
+ * 'iptc_exif_custom_mapping' - mapping IPTC/EXIF custom field rules
299
+ *
300
+ * NOTE: 'iptc_exif_mapping' will never be passed to the 'mla_mapping_rule' filter.
301
+ * There, one of the three more specific values will be passed.
302
+ */
303
+
304
+ /*
305
+ * For Custom Field Mapping, $settings is an array indexed by
306
+ * the custom field name.
307
+ * Each array element is a mapping rule; an array containing:
308
+ * 'name' => custom field name
309
+ * 'data_source' => 'none', 'meta', 'template' or data source name
310
+ * 'keep_existing' => boolean; true to preserve existing content
311
+ * 'format' => 'native', 'commas'
312
+ * 'mla_column' => boolean; not used
313
+ * 'quick_edit' => boolean; not used
314
+ * 'bulk_edit' => boolean; not used
315
+ * 'meta_name' => attachment metadata element name or content template
316
+ * 'option' => 'text', 'single', 'export', 'array', 'multi'
317
+ * 'no_null' => boolean; true to delete empty custom field values
318
+ *
319
+ * For IPTC/EXIF Mapping, $settings is an array indexed by
320
+ * the mapping category; 'standard', 'taxonomy' and 'custom'.
321
+ * Each category is an array of rules, with slightly different formats.
322
+ *
323
+ * Each 'standard' category array element is a rule (array) containing:
324
+ * 'name' => field slug; 'post_title', 'post_name', 'image_alt', 'post_excerpt', 'post_content'
325
+ * 'iptc_value' => IPTC Identifier or friendly name
326
+ * 'exif_value' => EXIF element name
327
+ * 'iptc_first' => boolean; true to prefer IPTC value over EXIF value
328
+ * 'keep_existing' => boolean; true to preserve existing content
329
+ *
330
+ * Each 'taxonomy' category array element is a rule (array) containing:
331
+ * 'name' => taxonomy slug, e.g., 'post_tag', 'attachment_category'
332
+ * 'hierarchical' => boolean; true for hierarchical taxonomies
333
+ * 'iptc_value' => IPTC Identifier or friendly name
334
+ * 'exif_value' => EXIF element name
335
+ * 'iptc_first' => boolean; true to prefer IPTC value over EXIF value
336
+ * 'keep_existing' => boolean; true to preserve existing content
337
+ * 'parent' => zero for none or the term_id of the parent
338
+ * 'delimiters' => term separator(s), e.g., ',;'
339
+ *
340
+ * Each 'custom' category array element is a rule (array) containing:
341
+ * 'name' => custom field name
342
+ * 'iptc_value' => IPTC Identifier or friendly name
343
+ * 'exif_value' => EXIF element name
344
+ * 'iptc_first' => boolean; true to prefer IPTC value over EXIF value
345
+ * 'keep_existing' => boolean; true to preserve existing content
346
+ */
347
+ return $settings;
348
+ } // mla_mapping_settings_filter
349
+
350
+ /**
351
+ * MLA Mapping Rule Filter
352
+ *
353
+ * This filter is called once for each mapping rule, before the rule
354
+ * is evaluated. You can change the rule parameters, or prevent rule
355
+ * evaluation by returning $setting_value['data_source'] = 'none';
356
+ *
357
+ * @since 1.00
358
+ *
359
+ * @param array custom_field_mapping rule
360
+ * @param integer post ID to be evaluated
361
+ * @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
362
+ * @param array attachment_metadata, default NULL
363
+ *
364
+ * @return array updated custom_field_mapping rule
365
+ */
366
+ public static function mla_mapping_rule_filter( $setting_value, $post_id, $category, $attachment_metadata ) {
367
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_rule_filter $setting_value = ' . var_export( $setting_value, true ), 0 );
368
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_rule_filter $post_id = ' . var_export( $post_id, true ), 0 );
369
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_rule_filter $category = ' . var_export( $category, true ), 0 );
370
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_rule_filter $attachment_metadata = ' . var_export( $attachment_metadata, true ), 0 );
371
+
372
+ /*
373
+ * $setting_value is an array containing a mapping rule; see above
374
+ * To stop this rule's evaluation and mapping, return NULL
375
+ */
376
+ return $setting_value;
377
+ } // mla_mapping_rule_filter
378
+
379
+ /**
380
+ * MLA Mapping Custom Field Value Filter
381
+ *
382
+ * This filter is called once for each custom field mapping rule, after the rule
383
+ * is evaluated. You can change the new value produced by the rule.
384
+ *
385
+ * @since 1.00
386
+ *
387
+ * @param mixed value returned by the rule
388
+ * @param array custom_field_mapping rule
389
+ * @param integer post ID to be evaluated
390
+ * @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
391
+ * @param array attachment_metadata, default NULL
392
+ *
393
+ * @return array updated rule value
394
+ */
395
+ public static function mla_mapping_custom_value_filter( $new_text, $setting_value, $post_id, $category, $attachment_metadata ) {
396
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_custom_value_filter $new_text = ' . var_export( $new_text, true ), 0 );
397
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_custom_value_filter $setting_value = ' . var_export( $setting_value, true ), 0 );
398
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_custom_value_filter $post_id = ' . var_export( $post_id, true ), 0 );
399
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_custom_value_filter $category = ' . var_export( $category, true ), 0 );
400
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_custom_value_filter $attachment_metadata = ' . var_export( $attachment_metadata, true ), 0 );
401
+
402
+ /*
403
+ * You can use MLAOptions::mla_get_data_source() to get anything available;
404
+ * for example:
405
+ */
406
+ $my_setting = array(
407
+ 'data_source' => 'size_names',
408
+ 'option' => 'array'
409
+ );
410
+ //$size_names = MLAOptions::mla_get_data_source($post_id, $category, $my_setting, $attachment_metadata);
411
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_custom_value_filter $size_names = ' . var_export( $size_names, true ), 0 );
412
+
413
+ /*
414
+ * For "empty" values, return ' '.
415
+ */
416
+ return $new_text;
417
+ } // mla_mapping_custom_value_filter
418
+
419
+ /**
420
+ * MLA Mapping IPTC Value Filter
421
+ *
422
+ * This filter is called once for each IPTC/EXIF mapping rule, after the IPTC
423
+ * portion of the rule is evaluated. You can change the new value produced by
424
+ * the rule.
425
+ *
426
+ * @since 1.00
427
+ *
428
+ * @param mixed IPTC value returned by the rule
429
+ * @param array custom_field_mapping rule
430
+ * @param integer post ID to be evaluated
431
+ * @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
432
+ * @param array attachment_metadata, default NULL
433
+ *
434
+ * @return array updated rule IPTC value
435
+ */
436
+ public static function mla_mapping_iptc_value_filter( $iptc_value, $setting_value, $post_id, $category, $attachment_metadata ) {
437
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_iptc_value_filter $iptc_value = ' . var_export( $iptc_value, true ), 0 );
438
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_iptc_value_filter $setting_value = ' . var_export( $setting_value, true ), 0 );
439
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_iptc_value_filter $post_id = ' . var_export( $post_id, true ), 0 );
440
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_iptc_value_filter $category = ' . var_export( $category, true ), 0 );
441
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_iptc_value_filter $attachment_metadata = ' . var_export( $attachment_metadata, true ), 0 );
442
+
443
+ /*
444
+ * You can use MLAOptions::mla_get_data_source() to get anything available;
445
+ * for example:
446
+ */
447
+ $my_setting = array(
448
+ 'data_source' => 'template',
449
+ 'meta_name' => '([+iptc:keywords+])',
450
+ 'option' => 'array'
451
+ );
452
+ //$keywords = MLAOptions::mla_get_data_source($post_id, $category, $my_setting, $attachment_metadata);
453
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_iptc_value_filter $keywords = ' . var_export( $keywords, true ), 0 );
454
+
455
+ /*
456
+ * For "empty" values, return ''.
457
+ */
458
+ return $iptc_value;
459
+ } // mla_mapping_iptc_value_filter
460
+
461
+ /**
462
+ * MLA Mapping EXIF Value Filter
463
+ *
464
+ * This filter is called once for each IPTC/EXIF mapping rule, after the EXIF
465
+ * portion of the rule is evaluated. You can change the new value produced by
466
+ * the rule.
467
+ *
468
+ * @since 1.00
469
+ *
470
+ * @param mixed EXIF/Template value returned by the rule
471
+ * @param array custom_field_mapping rule
472
+ * @param integer post ID to be evaluated
473
+ * @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
474
+ * @param array attachment_metadata, default NULL
475
+ *
476
+ * @return array updated rule EXIF/Template value
477
+ */
478
+ public static function mla_mapping_exif_value_filter( $exif_value, $setting_value, $post_id, $category, $attachment_metadata ) {
479
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_exif_value_filter $exif_value = ' . var_export( $exif_value, true ), 0 );
480
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_exif_value_filter $setting_value = ' . var_export( $setting_value, true ), 0 );
481
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_exif_value_filter $post_id = ' . var_export( $post_id, true ), 0 );
482
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_exif_value_filter $category = ' . var_export( $category, true ), 0 );
483
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_exif_value_filter $attachment_metadata = ' . var_export( $attachment_metadata, true ), 0 );
484
+
485
+ /*
486
+ * You can use MLAOptions::mla_get_data_source() to get anything available;
487
+ * for example:
488
+ */
489
+ $my_setting = array(
490
+ 'data_source' => 'template',
491
+ 'meta_name' => '([+exif:Copyright+])',
492
+ 'option' => 'array'
493
+ );
494
+ //$copyright = MLAOptions::mla_get_data_source($post_id, $category, $my_setting, $attachment_metadata);
495
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_exif_value_filter $copyright = ' . var_export( $copyright, true ), 0 );
496
+
497
+ /*
498
+ * For "empty" 'text' values, return ''.
499
+ * For "empty" 'array' values, return NULL.
500
+ */
501
+ return $exif_value;
502
+ } // mla_mapping_exif_value_filter
503
+
504
+ /**
505
+ * MLA Mapping Updates Filter
506
+ *
507
+ * This filter is called AFTER all mapping rules are applied.
508
+ * You can add, change or remove updates for the attachment's
509
+ * standard fields, taxonomies and/or custom fields.
510
+ *
511
+ * @since 1.00
512
+ *
513
+ * @param array updates for the attachment's standard fields, taxonomies and/or custom fields
514
+ * @param integer post ID to be evaluated
515
+ * @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
516
+ * @param array mapping rules
517
+ * @param array attachment_metadata, default NULL
518
+ *
519
+ * @return array updated attachment's updates
520
+ */
521
+ public static function mla_mapping_updates_filter( $updates, $post_id, $category, $settings, $attachment_metadata ) {
522
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_updates_filter $updates = ' . var_export( $updates, true ), 0 );
523
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_updates_filter $post_id = ' . var_export( $post_id, true ), 0 );
524
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_updates_filter $category = ' . var_export( $category, true ), 0 );
525
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_updates_filter $settings = ' . var_export( $settings, true ), 0 );
526
+ //error_log( 'MLASimpleMappingHooksExample::mla_mapping_updates_filter $attachment_metadata = ' . var_export( $attachment_metadata, true ), 0 );
527
+
528
+ /*
529
+ * If $updates[ 'post_title' ] is set, some mapping rule
530
+ * has been set up, so we respect the result. If not,
531
+ * use whatever the current Title value is.
532
+ */
533
+ if ( isset( $updates[ 'post_title' ] ) ) {
534
+ $old_value = $updates[ 'post_title' ];
535
+ } else {
536
+ $post = get_post( $post_id );
537
+ $old_value = $post->post_title;
538
+ }
539
+
540
+ /*
541
+ * Clean up the Title value. If the cleanup has changed the value,
542
+ * put the new value in the $updates array.
543
+ */
544
+ $new_title = str_replace( array( '-', '_', '.' ), ' ', $old_value );
545
+ if ( $old_value != $new_title ) {
546
+ $updates[ 'post_title' ] = $new_title;
547
+ }
548
+
549
+ // Find the current ALT Text value
550
+ if ( isset( $updates[ 'image_alt' ] ) ) {
551
+ $old_value = $updates[ 'image_alt' ];
552
+ } else {
553
+ $old_value = get_metadata( 'post', $post_id, '_wp_attachment_image_alt', true );
554
+ }
555
+
556
+ // Replace the ALT Text value with the clean Title
557
+ if ( $old_value != $new_title ) {
558
+ $updates[ 'image_alt' ] = $new_title;
559
+ }
560
+
561
+ /*
562
+ * To stop this rule's updates, return an empty array, i.e., return array();
563
+ */
564
+ return $updates;
565
+ } // mla_mapping_updates_filter
566
+
567
+ /**
568
+ * MLA Mapping Updates Filter
569
+ *
570
+ * This filter is called AFTER all mapping rules are applied.
571
+ * You can add, change or remove updates for the attachment's
572
+ * standard fields, taxonomies and/or custom fields.
573
+ *
574
+ * @since 1.02
575
+ *
576
+ * @param array|false The entire tablist ( $tab = NULL ), a single tab entry or false if not found/not allowed.
577
+ * @param array The entire tablist
578
+ * @param string|NULL tab slug for single-element return or NULL to return entire tablist
579
+ *
580
+ * @return array updated attachment's updates
581
+ */
582
+ public static function mla_get_options_tablist_filter( $results, $mla_tablist, $tab ) {
583
+ //error_log( 'MLASimpleMappingHooksExample::mla_get_options_tablist_filter $results = ' . var_export( $results, true ), 0 );
584
+ //error_log( 'MLASimpleMappingHooksExample::mla_get_options_tablist_filter $mla_tablist = ' . var_export( $mla_tablist, true ), 0 );
585
+ //error_log( 'MLASimpleMappingHooksExample::mla_get_options_tablist_filter $tab = ' . var_export( $tab, true ), 0 );
586
+
587
+ /*
588
+ * Return an updated $mla_tablist ( $tab = NULL ), an updated single element or false
589
+ */
590
+ return $results;
591
+ } // mla_get_options_tablist_filter
592
+ } //MLASimpleMappingHooksExample
593
+
594
+ /*
595
+ * Install the filters at an early opportunity
596
+ */
597
+ add_action('init', 'MLASimpleMappingHooksExample::initialize');
598
+ ?>
includes/class-mla-data.php CHANGED
@@ -1858,38 +1858,38 @@ class MLAData {
1858
  // $wp_4dot0_plus = version_compare( get_bloginfo('version'), '4.0', '>=' ); // after release
1859
  foreach ( $terms_search as $term ) {
1860
  if ( $wp_4dot0_plus ) {
1861
- $term = $percent . $wpdb->esc_like( $term ) . $percent;
1862
- $term = $wpdb->prepare( '%s', $term );
1863
  } else {
1864
- $term = "'" . $percent . esc_sql( like_escape( $term ) ) . $percent . "'";
1865
  }
1866
 
1867
  $inner_connector = '';
1868
  $inner_clause = '';
1869
 
1870
  if ( in_array( 'content', $fields ) ) {
1871
- $inner_clause .= "{$inner_connector}({$wpdb->posts}.post_content LIKE {$term})";
1872
  $inner_connector = ' OR ';
1873
  }
1874
 
1875
  if ( in_array( 'title', $fields ) ) {
1876
- $inner_clause .= "{$inner_connector}({$wpdb->posts}.post_title LIKE {$term})";
1877
  $inner_connector = ' OR ';
1878
  }
1879
 
1880
  if ( in_array( 'excerpt', $fields ) ) {
1881
- $inner_clause .= "{$inner_connector}({$wpdb->posts}.post_excerpt LIKE {$term})";
1882
  $inner_connector = ' OR ';
1883
  }
1884
 
1885
  if ( in_array( 'alt-text', $fields ) ) {
1886
  $view_name = self::$mla_alt_text_view;
1887
- $inner_clause .= "{$inner_connector}({$view_name}.meta_value LIKE {$term})";
1888
  $inner_connector = ' OR ';
1889
  }
1890
 
1891
  if ( in_array( 'name', $fields ) ) {
1892
- $inner_clause .= "{$inner_connector}({$wpdb->posts}.post_name LIKE {$term})";
1893
  }
1894
 
1895
  if ( ! empty($inner_clause) ) {
@@ -1936,7 +1936,15 @@ class MLAData {
1936
  } // foreach taxonomy
1937
  } // AND connector
1938
 
1939
- if ( ! empty( $tax_terms ) ) {
 
 
 
 
 
 
 
 
1940
  self::$query_parameters['tax_terms'] = $tax_terms;
1941
  $tax_index = 0;
1942
  $inner_connector = '';
1858
  // $wp_4dot0_plus = version_compare( get_bloginfo('version'), '4.0', '>=' ); // after release
1859
  foreach ( $terms_search as $term ) {
1860
  if ( $wp_4dot0_plus ) {
1861
+ $sql_term = $percent . $wpdb->esc_like( $term ) . $percent;
1862
+ $sql_term = $wpdb->prepare( '%s', $sql_term );
1863
  } else {
1864
+ $sql_term = "'" . $percent . esc_sql( like_escape( $term ) ) . $percent . "'";
1865
  }
1866
 
1867
  $inner_connector = '';
1868
  $inner_clause = '';
1869
 
1870
  if ( in_array( 'content', $fields ) ) {
1871
+ $inner_clause .= "{$inner_connector}({$wpdb->posts}.post_content LIKE {$sql_term})";
1872
  $inner_connector = ' OR ';
1873
  }
1874
 
1875
  if ( in_array( 'title', $fields ) ) {
1876
+ $inner_clause .= "{$inner_connector}({$wpdb->posts}.post_title LIKE {$sql_term})";
1877
  $inner_connector = ' OR ';
1878
  }
1879
 
1880
  if ( in_array( 'excerpt', $fields ) ) {
1881
+ $inner_clause .= "{$inner_connector}({$wpdb->posts}.post_excerpt LIKE {$sql_term})";
1882
  $inner_connector = ' OR ';
1883
  }
1884
 
1885
  if ( in_array( 'alt-text', $fields ) ) {
1886
  $view_name = self::$mla_alt_text_view;
1887
+ $inner_clause .= "{$inner_connector}({$view_name}.meta_value LIKE {$sql_term})";
1888
  $inner_connector = ' OR ';
1889
  }
1890
 
1891
  if ( in_array( 'name', $fields ) ) {
1892
+ $inner_clause .= "{$inner_connector}({$wpdb->posts}.post_name LIKE {$sql_term})";
1893
  }
1894
 
1895
  if ( ! empty($inner_clause) ) {
1936
  } // foreach taxonomy
1937
  } // AND connector
1938
 
1939
+ if ( empty( $tax_terms ) ) {
1940
+ /*
1941
+ * If "Terms" is the only field and no terms are present,
1942
+ * the search must fail.
1943
+ */
1944
+ if ( array( 'terms' ) == $fields ) {
1945
+ $tax_clause = '1=0';
1946
+ }
1947
+ } else {
1948
  self::$query_parameters['tax_terms'] = $tax_terms;
1949
  $tax_index = 0;
1950
  $inner_connector = '';
includes/class-mla-main.php CHANGED
@@ -29,7 +29,7 @@ class MLA {
29
  *
30
  * @var string
31
  */
32
- const CURRENT_MLA_VERSION = '1.92';
33
 
34
  /**
35
  * Slug for registering and enqueueing plugin style sheet
29
  *
30
  * @var string
31
  */
32
+ const CURRENT_MLA_VERSION = '1.93';
33
 
34
  /**
35
  * Slug for registering and enqueueing plugin style sheet
includes/class-mla-media-modal.php CHANGED
@@ -85,8 +85,8 @@ class MLAModal {
85
  */
86
  public static function initialize() {
87
  /*
88
- * WordPress 3.5's new Media Manager is supported on the server by
89
- * /wp-includes/media.php function wp_enqueue_media(), which contains:
90
  *
91
  * $settings = apply_filters( 'media_view_settings', $settings, $post );
92
  * $strings = apply_filters( 'media_view_strings', $strings, $post );
@@ -110,7 +110,7 @@ class MLAModal {
110
  * documented as: "Filter the attachment fields to edit."
111
  */
112
 
113
- if ( MLATest::$wordpress_3point5_plus && ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) ) {
114
  add_filter( 'get_media_item_args', 'MLAModal::mla_get_media_item_args_filter', 10, 1 );
115
  add_filter( 'attachment_fields_to_edit', 'MLAModal::mla_attachment_fields_to_edit_filter', 0x7FFFFFFF, 2 );
116
 
@@ -169,12 +169,13 @@ class MLAModal {
169
  * @return array updated descriptors for the "compat-attachment-fields"
170
  */
171
  public static function mla_attachment_fields_to_edit_filter( $form_fields, $post ) {
 
 
172
  /*
173
  * This logic is only required for the MLA-enhanced Media Manager Modal Window.
174
  * For the non-Modal Media/Edit Media screen, the MLAEdit::mla_add_meta_boxes_action
175
  * function changes the default meta box to the MLA searchable meta box.
176
  */
177
- // if ( self::$mla_query_attachments ) {
178
  if ( isset( self::$media_item_args['in_modal'] ) && self::$media_item_args['in_modal'] ) {
179
  foreach ( get_taxonomies( array ( 'show_ui' => true ), 'objects' ) as $key => $value ) {
180
  if ( MLAOptions::mla_taxonomy_support( $key ) ) {
@@ -237,7 +238,7 @@ class MLAModal {
237
  $list = join( ',', $list );
238
  $class = ( $value->hierarchical ) ? 'categorydiv' : 'tagsdiv';
239
 
240
- $row = "\t\t<tr class='compat-field-{$key} mla-taxonomy-row'>\n";
241
  $row .= "\t\t<th class='label' valign='top' scope='row'>\n";
242
  $row .= "\t\t<label for='mla-attachments-{$post_id}-{$key}'>\n";
243
  $row .= "\t\t<span title='" . __( 'Click to toggle', 'media-library-assistant' ) . "' class='alignleft'>{$label}</span><br class='clear'>\n";
@@ -251,7 +252,8 @@ class MLAModal {
251
  $row .= "\t\t</div>\n";
252
  $row .= "\t\t</td>\n";
253
  $row .= "\t\t</tr>\n";
254
- $form_fields[ $key ] = array( 'tr' => $row );
 
255
  } // is supported
256
  } // foreach
257
  } // in_modal
@@ -347,6 +349,8 @@ class MLAModal {
347
  * @var array
348
  */
349
  private static $mla_media_modal_settings = array(
 
 
350
  'comma' => ',',
351
  'ajaxNonce' => '',
352
  'ajaxFillCompatAction' => self::JAVASCRIPT_FILL_COMPAT_ACTION,
@@ -360,15 +364,18 @@ class MLAModal {
360
  'enableSearchBoxControls' => false,
361
  'enableTermsDropdown' => false,
362
  'enableTermsSearch' => false,
363
- // NULL values replaced by filtered initial values in mla_media_view_settings_filter
364
- 'filterMime' => NULL,
365
- 'filterMonth' => NULL,
366
- 'filterTerm' => NULL,
367
- 'searchConnector' => NULL,
368
- 'searchFields' => NULL,
369
- 'searchValue' => NULL,
370
- //'termsSearch' => NULL,
371
- 'searchClicks' => 0,
 
 
 
372
  'mimeTypes' => '',
373
  'months' => '',
374
  'termsClass' => array(),
@@ -390,23 +397,28 @@ class MLAModal {
390
  * @return array updated $settings array
391
  */
392
  public static function mla_media_view_settings_filter( $settings, $post ) {
 
 
 
393
  if ( function_exists( 'get_current_screen' ) ) {
394
  $screen = get_current_screen();
395
 
396
- /*
397
- * WordPress 4.0 adds the "grid view" to the Media/Library screen, and we don't want
398
- * to add our functionality to that screen.
399
- */
400
  if ( 'upload' == $screen->base ) {
401
- //if ( 'edit' != $screen->parent_base ) {
402
- return $settings;
 
403
  }
404
  }
405
-
406
  self::$mla_media_modal_settings['comma'] = _x( ',', 'tag delimiter' );
407
  self::$mla_media_modal_settings['ajaxNonce'] = wp_create_nonce( MLA::MLA_ADMIN_NONCE );
408
  self::$mla_media_modal_settings['mimeTypes'] = MLAMime::mla_pluck_table_views();
409
  self::$mla_media_modal_settings['mimeTypes']['detached'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['unattached']['plural'];
 
 
 
 
 
410
  self::$mla_media_modal_settings['months'] = self::_months_dropdown('attachment');
411
 
412
  self::$mla_media_modal_settings['termsTaxonomy'] = MLAOptions::mla_taxonomy_support('', 'filter');
@@ -420,6 +432,8 @@ class MLAModal {
420
  self::$mla_media_modal_settings['termsIndent'] = '-';
421
  }
422
 
 
 
423
  self::$mla_media_modal_settings['enableDetailsCategory'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX ) );
424
  self::$mla_media_modal_settings['enableDetailsTag'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_DETAILS_TAG_METABOX ) );
425
  self::$mla_media_modal_settings['enableMimeTypes'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_MIMETYPES ) );
@@ -428,6 +442,32 @@ class MLAModal {
428
  self::$mla_media_modal_settings['enableSearchBoxControls'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS ) );
429
  self::$mla_media_modal_settings['enableTermsDropdown'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TERMS ) );
430
  self::$mla_media_modal_settings['enableTermsSearch'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TERMS_SEARCH ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
 
432
  /*
433
  * Set and filter the initial values for toolbar controls
@@ -449,14 +489,14 @@ class MLAModal {
449
  * Except for filterMime/post_mime_type, these will be passed
450
  * back to the server in the query['s'] field.
451
  */
452
- self::$mla_media_modal_settings['filterMime'] = $initial_values['filterMime']; // post_mime_type 'image'; //
453
- self::$mla_media_modal_settings['filterMonth'] = $initial_values['filterMonth']; // mla_filter_month '201404'; //
454
- self::$mla_media_modal_settings['filterTerm'] = $initial_values['filterTerm']; // mla_filter_term '175'; //
455
- self::$mla_media_modal_settings['searchConnector'] = $initial_values['searchConnector']; // mla_search_connector 'OR'; //
456
- self::$mla_media_modal_settings['searchFields'] = $initial_values['searchFields']; // mla_search_fields array( 'excerpt', 'title', 'content' ); //
457
- self::$mla_media_modal_settings['searchValue'] = $initial_values['searchValue']; // mla_search_value 'col'; //
458
- //self::$mla_media_modal_settings['termsSearch'] = $initial_values['termsSearch']; // mla_terms_search
459
- self::$mla_media_modal_settings['searchClicks'] = 0; // mla_search_clicks, to force transmission
460
 
461
  $settings = array_merge( $settings, array( 'mla_settings' => self::$mla_media_modal_settings ) );
462
  return $settings;
@@ -474,19 +514,6 @@ class MLAModal {
474
  * @return array updated $strings array
475
  */
476
  public static function mla_media_view_strings_filter( $strings, $post ) {
477
- if ( function_exists( 'get_current_screen' ) ) {
478
- $screen = get_current_screen();
479
-
480
- /*
481
- * WordPress 4.0 adds the "grid view" to the Media/Library screen, and we don't want
482
- * to add our functionality to that screen.
483
- */
484
- if ( 'upload' == $screen->base ) {
485
- //if ( 'edit' != $screen->parent_base ) {
486
- return $strings;
487
- }
488
- }
489
-
490
  $mla_strings = array(
491
  'searchBoxPlaceholder' => __( 'Search Box', 'media-library-assistant' ),
492
  'loadingText' => __( 'Loading...', 'media-library-assistant' ),
@@ -506,15 +533,17 @@ class MLAModal {
506
  * @return void
507
  */
508
  public static function mla_wp_enqueue_media_action( ) {
 
 
 
509
  if ( function_exists( 'get_current_screen' ) ) {
510
  $screen = get_current_screen();
511
 
512
- /*
513
- * WordPress 4.0 adds the "grid view" to the Media/Library screen, and we don't want
514
- * to add our functionality to that screen.
515
- */
516
  if ( 'upload' == $screen->base ) {
517
- //if ( 'edit' != $screen->parent_base ) {
 
 
 
518
  return;
519
  }
520
  }
@@ -524,7 +553,7 @@ class MLAModal {
524
  wp_register_style( self::JAVASCRIPT_MEDIA_MODAL_STYLES, MLA_PLUGIN_URL . 'css/mla-media-modal-style.css', false, MLA::CURRENT_MLA_VERSION );
525
  wp_enqueue_style( self::JAVASCRIPT_MEDIA_MODAL_STYLES );
526
 
527
- wp_enqueue_script( self::JAVASCRIPT_MEDIA_MODAL_SLUG, MLA_PLUGIN_URL . "js/mla-media-modal-scripts{$suffix}.js", array( 'media-views' ), MLA::CURRENT_MLA_VERSION, false );
528
 
529
  if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TERMS_SEARCH ) ) {
530
  MLAModal::mla_add_terms_search_scripts();
@@ -540,43 +569,41 @@ class MLAModal {
540
  * @return void echoes HTML script tags for the templates
541
  */
542
  public static function mla_print_media_templates_action( ) {
 
 
 
543
  if ( function_exists( 'get_current_screen' ) ) {
544
  $screen = get_current_screen();
545
- //cause_an_error();
546
- //$cause_notice = $screen->bad_property;
547
- //trigger_error( 'mla_print_media_templates_action', E_USER_WARNING );
548
- //error_log( 'xdebug_get_function_stack = ' . var_export( xdebug_get_function_stack(), true), 0 );
549
-
550
- /*
551
- * WordPress 4.0 adds the "grid view" to the Media/Library screen, and we don't want
552
- * to add our functionality to that screen.
553
- */
554
  if ( 'upload' == $screen->base ) {
555
- //if ( 'edit' != $screen->parent_base ) {
 
 
 
556
  return;
557
  }
558
  }
559
 
560
  /*
561
  * Compose the Search Media box
562
- */
563
  if ( isset( $_REQUEST['query']['mla_search_value'] ) ) {
564
  $search_value = esc_attr( stripslashes( trim( $_REQUEST['query']['mla_search_value'] ) ) );
565
  } else {
566
- $search_value = self::$mla_media_modal_settings['searchValue'];
567
  }
568
 
569
  if ( isset( $_REQUEST['query']['mla_search_fields'] ) ) {
570
  $search_fields = $_REQUEST['query']['mla_search_fields'];
571
  } else {
572
- $search_fields = self::$mla_media_modal_settings['searchFields'];
573
  }
574
 
575
  if ( isset( $_REQUEST['query']['mla_search_connector'] ) ) {
576
  $search_connector = $_REQUEST['query']['mla_search_connector'];
577
  } else {
578
- $search_connector = self::$mla_media_modal_settings['searchConnector'];
579
- }
580
 
581
  // Include mla javascript templates
582
  require_once MLA_PLUGIN_PATH . '/includes/mla-media-modal-js-template.php';
@@ -622,6 +649,12 @@ class MLAModal {
622
  } // foreach taxonomy
623
 
624
  if ( ( defined('WP_ADMIN') && WP_ADMIN ) && ( defined('DOING_AJAX') && DOING_AJAX ) ) {
 
 
 
 
 
 
625
  /*
626
  * If there's no action variable, we have nothing to do
627
  */
@@ -920,6 +953,7 @@ class MLAModal {
920
  }
921
 
922
  wp_set_object_terms( $id, $terms, $key, false );
 
923
 
924
  if ( $use_checklist ) {
925
  if ( empty( $post ) ) {
@@ -966,19 +1000,6 @@ class MLAModal {
966
  wp_send_json_success( $results );
967
  } // mla_update_compat_fields_action
968
 
969
- /**
970
- * Executing mla_query_attachments_action
971
- *
972
- * Informs mla_attachment_fields_to_edit_filter() that MLA enhancements
973
- * be added to the compatible fields. Keeps our enhancements out of the
974
- * WP 4.0 Media Grid display.
975
- *
976
- * @since 1.91
977
- *
978
- * @var boolean true if performing MLA enhanced query attachments else false.
979
- */
980
- private static $mla_query_attachments = false;
981
-
982
  /**
983
  * Ajax handler for Media Manager "Query Attachments" queries
984
  *
@@ -1008,6 +1029,9 @@ class MLAModal {
1008
  if ( 'detached' == $query['post_mime_type'] ) {
1009
  $query['detached'] = '1';
1010
  unset( $query['post_mime_type'] );
 
 
 
1011
  } else {
1012
  $view = $query['post_mime_type'];
1013
  unset( $query['post_mime_type'] );
@@ -1076,15 +1100,16 @@ class MLAModal {
1076
  }
1077
 
1078
  $query['post_type'] = 'attachment';
1079
- $query['post_status'] = 'inherit';
1080
- if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) ) {
1081
- $query['post_status'] .= ',private';
 
 
 
1082
  }
1083
-
1084
  $query = MLAData::mla_query_media_modal_items( $query, $offset, $count );
1085
- self::$mla_query_attachments = true;
1086
  $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
1087
- self::$mla_query_attachments = false;
1088
  $posts = array_filter( $posts );
1089
 
1090
  wp_send_json_success( $posts );
85
  */
86
  public static function initialize() {
87
  /*
88
+ * WordPress 3.5's Media Manager and 4.0's Media Grid are supported on the server
89
+ * by /wp-includes/media.php function wp_enqueue_media(), which contains:
90
  *
91
  * $settings = apply_filters( 'media_view_settings', $settings, $post );
92
  * $strings = apply_filters( 'media_view_strings', $strings, $post );
110
  * documented as: "Filter the attachment fields to edit."
111
  */
112
 
113
+ if ( MLATest::$wordpress_3point5_plus && ( ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) || ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_GRID_TOOLBAR ) ) ) ) {
114
  add_filter( 'get_media_item_args', 'MLAModal::mla_get_media_item_args_filter', 10, 1 );
115
  add_filter( 'attachment_fields_to_edit', 'MLAModal::mla_attachment_fields_to_edit_filter', 0x7FFFFFFF, 2 );
116
 
169
  * @return array updated descriptors for the "compat-attachment-fields"
170
  */
171
  public static function mla_attachment_fields_to_edit_filter( $form_fields, $post ) {
172
+ $id = $post->ID;
173
+
174
  /*
175
  * This logic is only required for the MLA-enhanced Media Manager Modal Window.
176
  * For the non-Modal Media/Edit Media screen, the MLAEdit::mla_add_meta_boxes_action
177
  * function changes the default meta box to the MLA searchable meta box.
178
  */
 
179
  if ( isset( self::$media_item_args['in_modal'] ) && self::$media_item_args['in_modal'] ) {
180
  foreach ( get_taxonomies( array ( 'show_ui' => true ), 'objects' ) as $key => $value ) {
181
  if ( MLAOptions::mla_taxonomy_support( $key ) ) {
238
  $list = join( ',', $list );
239
  $class = ( $value->hierarchical ) ? 'categorydiv' : 'tagsdiv';
240
 
241
+ $row = "\t\t<tr class='compat-field-{$key} mla-taxonomy-row' style='display: none'>\n";
242
  $row .= "\t\t<th class='label' valign='top' scope='row'>\n";
243
  $row .= "\t\t<label for='mla-attachments-{$post_id}-{$key}'>\n";
244
  $row .= "\t\t<span title='" . __( 'Click to toggle', 'media-library-assistant' ) . "' class='alignleft'>{$label}</span><br class='clear'>\n";
252
  $row .= "\t\t</div>\n";
253
  $row .= "\t\t</td>\n";
254
  $row .= "\t\t</tr>\n";
255
+ //$form_fields[ $key ] = array( 'tr' => $row );
256
+ $form_fields[ 'mla-' . $key ] = array( 'tr' => $row );
257
  } // is supported
258
  } // foreach
259
  } // in_modal
349
  * @var array
350
  */
351
  private static $mla_media_modal_settings = array(
352
+ 'screen' => 'modal',
353
+ 'state' => 'initial',
354
  'comma' => ',',
355
  'ajaxNonce' => '',
356
  'ajaxFillCompatAction' => self::JAVASCRIPT_FILL_COMPAT_ACTION,
364
  'enableSearchBoxControls' => false,
365
  'enableTermsDropdown' => false,
366
  'enableTermsSearch' => false,
367
+ 'enableTermsAutofill' => false,
368
+ 'query' => array( 'initial' => array (
369
+ // NULL values replaced by filtered initial values in mla_media_view_settings_filter
370
+ 'filterMime' => NULL,
371
+ 'filterMonth' => NULL,
372
+ 'filterTerm' => NULL,
373
+ 'searchConnector' => NULL,
374
+ 'searchFields' => NULL,
375
+ 'searchValue' => NULL,
376
+ //'termsSearch' => NULL,
377
+ 'searchClicks' => 0,
378
+ ) ),
379
  'mimeTypes' => '',
380
  'months' => '',
381
  'termsClass' => array(),
397
  * @return array updated $settings array
398
  */
399
  public static function mla_media_view_settings_filter( $settings, $post ) {
400
+ /*
401
+ * If we know what screen we're on we can test our enabling options
402
+ */
403
  if ( function_exists( 'get_current_screen' ) ) {
404
  $screen = get_current_screen();
405
 
 
 
 
 
406
  if ( 'upload' == $screen->base ) {
407
+ self::$mla_media_modal_settings['screen'] = 'grid';
408
+ } else {
409
+ self::$mla_media_modal_settings['screen'] = 'modal';
410
  }
411
  }
412
+
413
  self::$mla_media_modal_settings['comma'] = _x( ',', 'tag delimiter' );
414
  self::$mla_media_modal_settings['ajaxNonce'] = wp_create_nonce( MLA::MLA_ADMIN_NONCE );
415
  self::$mla_media_modal_settings['mimeTypes'] = MLAMime::mla_pluck_table_views();
416
  self::$mla_media_modal_settings['mimeTypes']['detached'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['unattached']['plural'];
417
+
418
+ if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
419
+ self::$mla_media_modal_settings['mimeTypes']['trash'] = MLAOptions::$mla_option_definitions[ MLAOptions::MLA_POST_MIME_TYPES ]['std']['trash']['plural'];
420
+ }
421
+
422
  self::$mla_media_modal_settings['months'] = self::_months_dropdown('attachment');
423
 
424
  self::$mla_media_modal_settings['termsTaxonomy'] = MLAOptions::mla_taxonomy_support('', 'filter');
432
  self::$mla_media_modal_settings['termsIndent'] = '-';
433
  }
434
 
435
+ self::$mla_media_modal_settings['enableMediaGrid'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_GRID_TOOLBAR ) );
436
+ self::$mla_media_modal_settings['enableMediaModal'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TOOLBAR ) );
437
  self::$mla_media_modal_settings['enableDetailsCategory'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX ) );
438
  self::$mla_media_modal_settings['enableDetailsTag'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_DETAILS_TAG_METABOX ) );
439
  self::$mla_media_modal_settings['enableMimeTypes'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_MIMETYPES ) );
442
  self::$mla_media_modal_settings['enableSearchBoxControls'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_SEARCHBOX_CONTROLS ) );
443
  self::$mla_media_modal_settings['enableTermsDropdown'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TERMS ) );
444
  self::$mla_media_modal_settings['enableTermsSearch'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TERMS_SEARCH ) );
445
+ self::$mla_media_modal_settings['enableTermsAutofill'] = ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_DETAILS_AUTOFILL ) );
446
+
447
+ /*
448
+ * Compile a list of the enhanced taxonomies
449
+ */
450
+ self::$mla_media_modal_settings['enhancedTaxonomies'] = array();
451
+ foreach ( get_taxonomies( array ( 'show_ui' => true ), 'objects' ) as $key => $value ) {
452
+ if ( MLAOptions::mla_taxonomy_support( $key ) ) {
453
+ if ( ! $use_checklist = $value->hierarchical ) {
454
+ $use_checklist = MLAOptions::mla_taxonomy_support( $key, 'flat-checklist' );
455
+ }
456
+
457
+ /*
458
+ * Make sure the appropriate MMMW Enhancement option has been checked
459
+ */
460
+ if ( $use_checklist ) {
461
+ if ( 'checked' === MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_DETAILS_CATEGORY_METABOX ) ) {
462
+ self::$mla_media_modal_settings['enhancedTaxonomies'][] = $key;
463
+ }
464
+ } else {
465
+ if ( 'checked' === MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_DETAILS_TAG_METABOX ) ) {
466
+ self::$mla_media_modal_settings['enhancedTaxonomies'][] = $key;
467
+ }
468
+ }
469
+ } // taxonomy_support
470
+ } // each taxonomy
471
 
472
  /*
473
  * Set and filter the initial values for toolbar controls
489
  * Except for filterMime/post_mime_type, these will be passed
490
  * back to the server in the query['s'] field.
491
  */
492
+ self::$mla_media_modal_settings['query']['initial']['filterMime'] = $initial_values['filterMime']; // post_mime_type 'image'; //
493
+ self::$mla_media_modal_settings['query']['initial']['filterMonth'] = $initial_values['filterMonth']; // mla_filter_month '201404'; //
494
+ self::$mla_media_modal_settings['query']['initial']['filterTerm'] = $initial_values['filterTerm']; // mla_filter_term '175'; //
495
+ self::$mla_media_modal_settings['query']['initial']['searchConnector'] = $initial_values['searchConnector']; // mla_search_connector 'OR'; //
496
+ self::$mla_media_modal_settings['query']['initial']['searchFields'] = $initial_values['searchFields']; // mla_search_fields array( 'excerpt', 'title', 'content' ); //
497
+ self::$mla_media_modal_settings['query']['initial']['searchValue'] = $initial_values['searchValue']; // mla_search_value 'col'; //
498
+ //self::$mla_media_modal_settings['query']['initial']['termsSearch'] = $initial_values['termsSearch']; // mla_terms_search
499
+ self::$mla_media_modal_settings['query']['initial']['searchClicks'] = 0; // mla_search_clicks, to force transmission
500
 
501
  $settings = array_merge( $settings, array( 'mla_settings' => self::$mla_media_modal_settings ) );
502
  return $settings;
514
  * @return array updated $strings array
515
  */
516
  public static function mla_media_view_strings_filter( $strings, $post ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
517
  $mla_strings = array(
518
  'searchBoxPlaceholder' => __( 'Search Box', 'media-library-assistant' ),
519
  'loadingText' => __( 'Loading...', 'media-library-assistant' ),
533
  * @return void
534
  */
535
  public static function mla_wp_enqueue_media_action( ) {
536
+ /*
537
+ * If we know what screen we're on we can test our enabling options
538
+ */
539
  if ( function_exists( 'get_current_screen' ) ) {
540
  $screen = get_current_screen();
541
 
 
 
 
 
542
  if ( 'upload' == $screen->base ) {
543
+ if ( 'checked' != MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_GRID_TOOLBAR ) ) {
544
+ return;
545
+ }
546
+ } elseif ( 'checked' != MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) {
547
  return;
548
  }
549
  }
553
  wp_register_style( self::JAVASCRIPT_MEDIA_MODAL_STYLES, MLA_PLUGIN_URL . 'css/mla-media-modal-style.css', false, MLA::CURRENT_MLA_VERSION );
554
  wp_enqueue_style( self::JAVASCRIPT_MEDIA_MODAL_STYLES );
555
 
556
+ wp_enqueue_script( self::JAVASCRIPT_MEDIA_MODAL_SLUG, MLA_PLUGIN_URL . "js/mla-media-modal-scripts{$suffix}.js", array( 'media-views', 'wp-lists', 'suggest' ), MLA::CURRENT_MLA_VERSION, false );
557
 
558
  if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TERMS_SEARCH ) ) {
559
  MLAModal::mla_add_terms_search_scripts();
569
  * @return void echoes HTML script tags for the templates
570
  */
571
  public static function mla_print_media_templates_action( ) {
572
+ /*
573
+ * If we know what screen we're on we can test our enabling options
574
+ */
575
  if ( function_exists( 'get_current_screen' ) ) {
576
  $screen = get_current_screen();
577
+
 
 
 
 
 
 
 
 
578
  if ( 'upload' == $screen->base ) {
579
+ if ( 'checked' != MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_GRID_TOOLBAR ) ) {
580
+ return;
581
+ }
582
+ } elseif ( 'checked' != MLAOptions::mla_get_option( MLAOptions::MLA_MEDIA_MODAL_TOOLBAR ) ) {
583
  return;
584
  }
585
  }
586
 
587
  /*
588
  * Compose the Search Media box
589
+ * /
590
  if ( isset( $_REQUEST['query']['mla_search_value'] ) ) {
591
  $search_value = esc_attr( stripslashes( trim( $_REQUEST['query']['mla_search_value'] ) ) );
592
  } else {
593
+ $search_value = self::$mla_media_modal_settings['query']['initial']['searchValue'];
594
  }
595
 
596
  if ( isset( $_REQUEST['query']['mla_search_fields'] ) ) {
597
  $search_fields = $_REQUEST['query']['mla_search_fields'];
598
  } else {
599
+ $search_fields = self::$mla_media_modal_settings['query']['initial']['searchFields'];
600
  }
601
 
602
  if ( isset( $_REQUEST['query']['mla_search_connector'] ) ) {
603
  $search_connector = $_REQUEST['query']['mla_search_connector'];
604
  } else {
605
+ $search_connector = self::$mla_media_modal_settings['query']['initial']['searchConnector'];
606
+ } // */
607
 
608
  // Include mla javascript templates
609
  require_once MLA_PLUGIN_PATH . '/includes/mla-media-modal-js-template.php';
649
  } // foreach taxonomy
650
 
651
  if ( ( defined('WP_ADMIN') && WP_ADMIN ) && ( defined('DOING_AJAX') && DOING_AJAX ) ) {
652
+ //error_log( 'DEBUG: mla_admin_init_action $_POST = ' . var_export( $_POST, true ), 0 );
653
+ //cause_an_error();
654
+ //$cause_notice = $screen->bad_property;
655
+ //trigger_error( 'mla_print_media_templates_action', E_USER_WARNING );
656
+ //error_log( 'DEBUG: xdebug_get_function_stack = ' . var_export( xdebug_get_function_stack(), true), 0 );
657
+
658
  /*
659
  * If there's no action variable, we have nothing to do
660
  */
953
  }
954
 
955
  wp_set_object_terms( $id, $terms, $key, false );
956
+ delete_transient( MLA_OPTION_PREFIX . 't_term_counts_' . $key );
957
 
958
  if ( $use_checklist ) {
959
  if ( empty( $post ) ) {
1000
  wp_send_json_success( $results );
1001
  } // mla_update_compat_fields_action
1002
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1003
  /**
1004
  * Ajax handler for Media Manager "Query Attachments" queries
1005
  *
1029
  if ( 'detached' == $query['post_mime_type'] ) {
1030
  $query['detached'] = '1';
1031
  unset( $query['post_mime_type'] );
1032
+ } elseif ( 'trash' == $query['post_mime_type'] ) {
1033
+ $query['status'] = 'trash';
1034
+ unset( $query['post_mime_type'] );
1035
  } else {
1036
  $view = $query['post_mime_type'];
1037
  unset( $query['post_mime_type'] );
1100
  }
1101
 
1102
  $query['post_type'] = 'attachment';
1103
+
1104
+ if ( empty( $query['status'] ) ) {
1105
+ $query['post_status'] = 'inherit';
1106
+ if ( current_user_can( get_post_type_object( 'attachment' )->cap->read_private_posts ) ) {
1107
+ $query['post_status'] .= ',private';
1108
+ }
1109
  }
1110
+
1111
  $query = MLAData::mla_query_media_modal_items( $query, $offset, $count );
 
1112
  $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
 
1113
  $posts = array_filter( $posts );
1114
 
1115
  wp_send_json_success( $posts );
includes/class-mla-options.php CHANGED
@@ -141,6 +141,12 @@ class MLAOptions {
141
  */
142
  const MLA_EDIT_MEDIA_META_BOXES = 'edit_media_meta_boxes';
143
 
 
 
 
 
 
 
144
  /**
145
  * Provides a unique name for the Media Manager toolbar option, which
146
  * also controls the ATTACHMENT DETAILS enhancements
@@ -189,6 +195,11 @@ class MLAOptions {
189
  */
190
  const MLA_MEDIA_MODAL_DETAILS_TAG_METABOX = 'media_modal_details_tag_metabox';
191
 
 
 
 
 
 
192
  /**
193
  * Provides a unique name for the Media Manager orderby option
194
  */
@@ -675,15 +686,22 @@ class MLAOptions {
675
 
676
  'media_modal_header' =>
677
  array('tab' => 'general',
678
- 'name' => __( 'Media Manager Enhancements', 'media-library-assistant' ),
679
  'type' => 'header'),
680
 
 
 
 
 
 
 
 
681
  self::MLA_MEDIA_MODAL_TOOLBAR =>
682
  array('tab' => 'general',
683
  'name' => __( 'Enable Media Manager Enhancements', 'media-library-assistant' ),
684
  'type' => 'checkbox',
685
  'std' => 'checked',
686
- 'help' => __( 'Check/uncheck this option to enable/disable Media Manager Enhancements.', 'media-library-assistant' )),
687
 
688
  self::MLA_MEDIA_MODAL_MIMETYPES =>
689
  array('tab' => 'general',
@@ -741,6 +759,13 @@ class MLAOptions {
741
  'std' => 'checked',
742
  'help' => __( 'Check this option to enable MLA-enhanced meta boxes in the "ATTACHMENT DETAILS" pane.<br>&nbsp;&nbsp;This option is for <strong>flat taxonomies</strong>, e.g., "Tags" or "Att. Tags", that do not use the "checklist-style" meta box.', 'media-library-assistant' )),
743
 
 
 
 
 
 
 
 
744
  self::MLA_MEDIA_MODAL_ORDERBY =>
745
  array('tab' => '',
746
  'name' => __( 'Media Manager Order By', 'media-library-assistant' ),
141
  */
142
  const MLA_EDIT_MEDIA_META_BOXES = 'edit_media_meta_boxes';
143
 
144
+ /**
145
+ * Provides a unique name for the Media Grid toolbar option, which
146
+ * also controls the ATTACHMENT DETAILS enhancements
147
+ */
148
+ const MLA_MEDIA_GRID_TOOLBAR = 'media_grid_toolbar';
149
+
150
  /**
151
  * Provides a unique name for the Media Manager toolbar option, which
152
  * also controls the ATTACHMENT DETAILS enhancements
195
  */
196
  const MLA_MEDIA_MODAL_DETAILS_TAG_METABOX = 'media_modal_details_tag_metabox';
197
 
198
+ /**
199
+ * Provides a unique name for the Media Manager Attachment Details auto-fill option
200
+ */
201
+ const MLA_MEDIA_MODAL_DETAILS_AUTOFILL = 'media_modal_details_autofill';
202
+
203
  /**
204
  * Provides a unique name for the Media Manager orderby option
205
  */
686
 
687
  'media_modal_header' =>
688
  array('tab' => 'general',
689
+ 'name' => __( 'Media Manager/Media Grid Enhancements', 'media-library-assistant' ),
690
  'type' => 'header'),
691
 
692
+ self::MLA_MEDIA_GRID_TOOLBAR =>
693
+ array('tab' => 'general',
694
+ 'name' => __( 'Enable Media Grid Enhancements', 'media-library-assistant' ),
695
+ 'type' => 'checkbox',
696
+ 'std' => 'checked',
697
+ 'help' => __( 'Check/uncheck this option to enable/disable Media Library Grid View Enhancements.', 'media-library-assistant' )),
698
+
699
  self::MLA_MEDIA_MODAL_TOOLBAR =>
700
  array('tab' => 'general',
701
  'name' => __( 'Enable Media Manager Enhancements', 'media-library-assistant' ),
702
  'type' => 'checkbox',
703
  'std' => 'checked',
704
+ 'help' => __( 'Check/uncheck this option to enable/disable Media Manager Modal Window Enhancements.', 'media-library-assistant' )),
705
 
706
  self::MLA_MEDIA_MODAL_MIMETYPES =>
707
  array('tab' => 'general',
759
  'std' => 'checked',
760
  'help' => __( 'Check this option to enable MLA-enhanced meta boxes in the "ATTACHMENT DETAILS" pane.<br>&nbsp;&nbsp;This option is for <strong>flat taxonomies</strong>, e.g., "Tags" or "Att. Tags", that do not use the "checklist-style" meta box.', 'media-library-assistant' )),
761
 
762
+ self::MLA_MEDIA_MODAL_DETAILS_AUTOFILL =>
763
+ array('tab' => 'general',
764
+ 'name' => __( 'Media Manager auto-fill meta boxes', 'media-library-assistant' ),
765
+ 'type' => 'checkbox',
766
+ 'std' => '',
767
+ 'help' => __( 'Check this option to automatically fill MLA-enhanced meta boxes in the "ATTACHMENT DETAILS" pane<br>&nbsp;&nbsp;when the item is selected.', 'media-library-assistant' )),
768
+
769
  self::MLA_MEDIA_MODAL_ORDERBY =>
770
  array('tab' => '',
771
  'name' => __( 'Media Manager Order By', 'media-library-assistant' ),
includes/mla-media-modal-js-template.php CHANGED
@@ -16,44 +16,47 @@ global $post;
16
  <script type="text/html" id="tmpl-mla-search-box">
17
  <label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media', 'media-library-assistant' ); ?>:</label>
18
 
19
- <input type="search" id="media-search-input" name="s[mla_search_value]" class="search" value="<?php echo $search_value ?>" placeholder="{{ data.searchBoxPlaceholder }}" size="22" />
20
  <input type="submit" name="mla_search_submit" id="mla-search-submit" class="button search" value="<?php _e( 'Search', 'media-library-assistant' ); ?>" /><br>
21
  <ul class="mla-search-options" style="{{ data.searchBoxControlsStyle }}">
22
  <li>
23
- <input type="radio" name="s[mla_search_connector]" value="AND" <?php echo ( 'OR' === $search_connector ) ? '' : 'checked'; ?> />
24
  <?php _e( 'and', 'media-library-assistant' ); ?>
25
  </li>
26
  <li>
27
- <input type="radio" name="s[mla_search_connector]" value="OR" <?php echo ( 'OR' === $search_connector ) ? 'checked' : ''; ?> />
28
  <?php _e( 'or', 'media-library-assistant' ); ?>
29
  </li>
30
  <li>
31
- <input type="checkbox" name="s[mla_search_title]" id="search-title" value="title" <?php echo ( in_array( 'title', $search_fields ) ) ? 'checked' : ''; ?> />
32
  <?php _e( 'Title', 'media-library-assistant' ); ?>
33
  </li>
34
  <li>
35
- <input type="checkbox" name="s[mla_search_name]" id="search-name" value="name" <?php echo ( in_array( 'name', $search_fields ) ) ? 'checked' : ''; ?> />
36
  <?php _e( 'Name', 'media-library-assistant' ); ?>
37
  </li>
38
  <li>
39
- <input type="checkbox" name="s[mla_search_alt_text]" id="search-alt-text" value="alt-text" <?php echo ( in_array( 'alt-text', $search_fields ) ) ? 'checked' : ''; ?> />
40
  <?php _e( 'ALT Text', 'media-library-assistant' ); ?>
41
  </li>
42
  <br>
43
  <li>
44
- <input type="checkbox" name="s[mla_search_excerpt]" id="search-excerpt" value="excerpt" <?php echo ( in_array( 'excerpt', $search_fields ) ) ? 'checked' : ''; ?> />
45
  <?php _e( 'Caption', 'media-library-assistant' ); ?>
46
  </li>
47
  <li>
48
- <input type="checkbox" name="s[mla_search_content]" id="search-content" value="content" <?php echo ( in_array( 'content', $search_fields ) ) ? 'checked' : ''; ?> />
49
  <?php _e( 'Description', 'media-library-assistant' ); ?>
50
  </li>
51
  <li>
52
- <input type="checkbox" name="s[mla_search_terms]" id="search-terms" value="terms" <?php echo ( in_array( 'terms', $search_fields ) ) ? 'checked' : ''; ?> />
53
  <?php _e( 'Terms', 'media-library-assistant' ); ?>
54
  </li>
55
  </ul>
56
  </script>
57
  <script type="text/html" id="tmpl-mla-terms-search-button">
58
- <input type="button" name="mla_terms_search" id="mla-terms-search" class="button" value="<?php _e( 'Terms Search', 'media-library-assistant' ); ?>" />
 
 
 
59
  </script>
16
  <script type="text/html" id="tmpl-mla-search-box">
17
  <label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media', 'media-library-assistant' ); ?>:</label>
18
 
19
+ <input type="search" id="media-search-input" name="s[mla_search_value]" class="search" value="{{ data.searchValue }}" placeholder="{{ data.searchBoxPlaceholder }}" size="22" />
20
  <input type="submit" name="mla_search_submit" id="mla-search-submit" class="button search" value="<?php _e( 'Search', 'media-library-assistant' ); ?>" /><br>
21
  <ul class="mla-search-options" style="{{ data.searchBoxControlsStyle }}">
22
  <li>
23
+ <input type="radio" name="s[mla_search_connector]" value="AND" <# if ( 'OR' !== data.searchConnector ) { #>checked="checked"<# } #> />
24
  <?php _e( 'and', 'media-library-assistant' ); ?>
25
  </li>
26
  <li>
27
+ <input type="radio" name="s[mla_search_connector]" value="OR" <# if ( 'OR' === data.searchConnector ) { #>checked="checked"<# } #> />
28
  <?php _e( 'or', 'media-library-assistant' ); ?>
29
  </li>
30
  <li>
31
+ <input type="checkbox" name="s[mla_search_title]" id="search-title" value="title" <# if ( -1 != data.searchFields.indexOf( 'title' ) ) { #>checked<# } #> />
32
  <?php _e( 'Title', 'media-library-assistant' ); ?>
33
  </li>
34
  <li>
35
+ <input type="checkbox" name="s[mla_search_name]" id="search-name" value="name" <# if ( -1 != data.searchFields.indexOf( 'name' ) ) { #>checked<# } #> />
36
  <?php _e( 'Name', 'media-library-assistant' ); ?>
37
  </li>
38
  <li>
39
+ <input type="checkbox" name="s[mla_search_alt_text]" id="search-alt-text" value="alt-text" <# if ( -1 != data.searchFields.indexOf( 'alt-text' ) ) { #>checked<# } #> />
40
  <?php _e( 'ALT Text', 'media-library-assistant' ); ?>
41
  </li>
42
  <br>
43
  <li>
44
+ <input type="checkbox" name="s[mla_search_excerpt]" id="search-excerpt" value="excerpt" <# if ( -1 != data.searchFields.indexOf( 'excerpt' ) ) { #>checked<# } #> />
45
  <?php _e( 'Caption', 'media-library-assistant' ); ?>
46
  </li>
47
  <li>
48
+ <input type="checkbox" name="s[mla_search_content]" id="search-content" value="content" <# if ( -1 != data.searchFields.indexOf( 'content' ) ) { #>checked<# } #> />
49
  <?php _e( 'Description', 'media-library-assistant' ); ?>
50
  </li>
51
  <li>
52
+ <input type="checkbox" name="s[mla_search_terms]" id="search-terms" value="terms" <# if ( -1 != data.searchFields.indexOf( 'terms' ) ) { #>checked<# } #> />
53
  <?php _e( 'Terms', 'media-library-assistant' ); ?>
54
  </li>
55
  </ul>
56
  </script>
57
  <script type="text/html" id="tmpl-mla-terms-search-button">
58
+ <input type="button" name="mla_terms_search" id="mla-terms-search" class="button media-button button-large mla-terms-search-button" value="<?php _e( 'Terms Search', 'media-library-assistant' ); ?>" />
59
+ </script>
60
+ <script type="text/html" id="tmpl-mla-simulate-search-button">
61
+ <input style="display:none" type="button" name="mla_search_submit" id="mla-search-submit" class="button" value="<?php _e( 'Search', 'media-library-assistant' ); ?>" />
62
  </script>
index.php CHANGED
@@ -6,7 +6,7 @@
6
  * will the rest of the plugin be loaded and run.
7
  *
8
  * @package Media Library Assistant
9
- * @version 1.92
10
  */
11
 
12
  /*
@@ -16,7 +16,7 @@ Description: Enhances the Media Library; powerful[mla_gallery], taxonomy support
16
  Author: David Lingren
17
  Text Domain: media-library-assistant
18
  Domain Path: /languages
19
- Version: 1.92
20
  Author URI: http://fairtradejudaica.org/our-story/staff/
21
 
22
  Copyright 2011-2014 David Lingren
6
  * will the rest of the plugin be loaded and run.
7
  *
8
  * @package Media Library Assistant
9
+ * @version 1.93
10
  */
11
 
12
  /*
16
  Author: David Lingren
17
  Text Domain: media-library-assistant
18
  Domain Path: /languages
19
+ Version: 1.93
20
  Author URI: http://fairtradejudaica.org/our-story/staff/
21
 
22
  Copyright 2011-2014 David Lingren
js/mla-edit-media-scripts.js CHANGED
@@ -1,15 +1,17 @@
1
- var mla = {
2
- // Properties
3
- settings: {},
4
-
5
- // Utility functions
6
- utility: {
7
- },
8
-
9
- // Components
10
- setParent: null,
11
- mlaEditAttachment: null
12
- };
 
 
13
 
14
  ( function( $ ) {
15
  /**
@@ -56,7 +58,7 @@ var mla = {
56
  } );
57
 
58
  $( '#search-' + taxonomy ).keyup( function( event ){
59
- var searchValue, matchingTerms, matchingTermsPopular;
60
 
61
  if( 13 === event.keyCode ) {
62
  event.preventDefault();
@@ -64,9 +66,9 @@ var mla = {
64
  return;
65
  }
66
 
67
- searchValue = $( '#search-' + taxonomy ).val(),
68
- termList = $( '#' + taxonomy + 'checklist li' );
69
- termListPopular = $( '#' + taxonomy + 'checklist-pop li' );
70
 
71
  if ( 0 < searchValue.length ) {
72
  termList.hide();
@@ -122,12 +124,12 @@ var mla = {
122
  */
123
  $( '#mla-set-parent-submit' ).on( 'click', function( event ){
124
  event.preventDefault();
125
- mla.mlaEditAttachment.setParentSave( postId );
126
  return false;
127
  });
128
  },
129
 
130
- setParentSave : function( postId ) {
131
  var foundRow = $( '#mla-set-parent-response-div input:checked' ).closest( 'tr' ),
132
  parentId, parentTitle, newParent, newTitle;
133
 
@@ -143,7 +145,7 @@ var mla = {
143
 
144
  $( '#mla-set-parent-submit' ).off( 'click' );
145
  }
146
- } // mla.mlaEditAttachment
147
 
148
  $( document ).ready( function(){ mla.mlaEditAttachment.init(); } );
149
  })( jQuery );
1
+ var jQuery,
2
+ mla_edit_media_vars,
3
+ mla = {
4
+ // Properties
5
+ settings: {},
6
+
7
+ // Utility functions
8
+ utility: {
9
+ },
10
+
11
+ // Components
12
+ setParent: null,
13
+ mlaEditAttachment: null
14
+ };
15
 
16
  ( function( $ ) {
17
  /**
58
  } );
59
 
60
  $( '#search-' + taxonomy ).keyup( function( event ){
61
+ var searchValue, termList, termListPopular, matchingTerms, matchingTermsPopular;
62
 
63
  if( 13 === event.keyCode ) {
64
  event.preventDefault();
66
  return;
67
  }
68
 
69
+ searchValue = $( '#search-' + taxonomy ).val();
70
+ termList = $( '#' + taxonomy + 'checklist li' );
71
+ termListPopular = $( '#' + taxonomy + 'checklist-pop li' );
72
 
73
  if ( 0 < searchValue.length ) {
74
  termList.hide();
124
  */
125
  $( '#mla-set-parent-submit' ).on( 'click', function( event ){
126
  event.preventDefault();
127
+ mla.mlaEditAttachment.setParentSave();
128
  return false;
129
  });
130
  },
131
 
132
+ setParentSave : function() {
133
  var foundRow = $( '#mla-set-parent-response-div input:checked' ).closest( 'tr' ),
134
  parentId, parentTitle, newParent, newTitle;
135
 
145
 
146
  $( '#mla-set-parent-submit' ).off( 'click' );
147
  }
148
+ }; // mla.mlaEditAttachment
149
 
150
  $( document ).ready( function(){ mla.mlaEditAttachment.init(); } );
151
  })( jQuery );
js/mla-edit-media-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var mla={settings:{},utility:{},setParent:null,mlaEditAttachment:null};(function(a){mla.settings=typeof mla_edit_media_vars==="undefined"?{}:mla_edit_media_vars;mla_edit_media_vars=void 0;mla.mlaEditAttachment={init:function(){a("#mla_set_parent").on("click",function(){return mla.mlaEditAttachment.setParentOpen()});a(".categorydiv").each(function(){var e=a(this).attr("id"),d,b,c;d=e.split("-");d.shift();b=d.join("-");c=b+"_tab";if(b=="category"){c="cats"}a.extend(a.expr[":"],{matchTerms:function(h,g,f,j){return(h.textContent||h.innerText||"").toLowerCase().indexOf((f[3]||"").toLowerCase())>=0}});a("#search-"+b).keypress(function(f){if(13===f.keyCode){f.preventDefault();a("#search-"+b).val("");a("#"+b+"-searcher").addClass("wp-hidden-children");a("#"+b+"checklist li").show();a("#"+b+"checklist-pop li").show();return}});a("#search-"+b).keyup(function(h){var i,g,f;if(13===h.keyCode){h.preventDefault();a("#"+b+"-search-toggle").focus();return}i=a("#search-"+b).val(),termList=a("#"+b+"checklist li");termListPopular=a("#"+b+"checklist-pop li");if(0<i.length){termList.hide();termListPopular.hide()}else{termList.show();termListPopular.show()}g=a("#"+b+"checklist label:matchTerms('"+i+"')");g.closest("li").find("li").andSelf().show();g.parents("#"+b+"checklist li").show();f=a("#"+b+"checklist-pop label:matchTerms('"+i+"')");f.closest("li").find("li").andSelf().show();f.parents("#"+b+"checklist li").show()});a("#"+b+"-search-toggle").click(function(){a("#"+b+"-adder ").addClass("wp-hidden-children");a("#"+b+"-searcher").toggleClass("wp-hidden-children");a('a[href="#'+b+'-all"]',"#"+b+"-tabs").click();a("#"+b+"checklist li").show();a("#"+b+"checklist-pop li").show();if(false===a("#"+b+"-searcher").hasClass("wp-hidden-children")){a("#search-"+b).val("").removeClass("form-input-tip");a("#search-"+b).focus()}return false});a("#"+b+"-add-toggle").click(function(){a("#"+b+"-searcher").addClass("wp-hidden-children");return false})})},setParentOpen:function(){var d,b,c;d=a("#mla_post_parent").val()||"";b=a("#post_ID").val()||"";c=a("#title").val()||"";mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.mlaEditAttachment.setParentSave(b);return false})},setParentSave:function(b){var e=a("#mla-set-parent-response-div input:checked").closest("tr"),g,d,c,f;if(e.length){g=a(":radio",e).val()||"";d=a("label",e).html()||"";c=a("#mla_post_parent").clone(true).val(g);f=a("#mla_parent_info").clone(true).val(d);a("#mla_post_parent").replaceWith(c);a("#mla_parent_info").replaceWith(f);mla.setParent.close()}a("#mla-set-parent-submit").off("click")}};a(document).ready(function(){mla.mlaEditAttachment.init()})})(jQuery);
1
+ var jQuery,mla_edit_media_vars,mla={settings:{},utility:{},setParent:null,mlaEditAttachment:null};(function(a){mla.settings=typeof mla_edit_media_vars==="undefined"?{}:mla_edit_media_vars;mla_edit_media_vars=void 0;mla.mlaEditAttachment={init:function(){a("#mla_set_parent").on("click",function(){return mla.mlaEditAttachment.setParentOpen()});a(".categorydiv").each(function(){var e=a(this).attr("id"),d,b,c;d=e.split("-");d.shift();b=d.join("-");c=b+"_tab";if(b=="category"){c="cats"}a.extend(a.expr[":"],{matchTerms:function(h,g,f,j){return(h.textContent||h.innerText||"").toLowerCase().indexOf((f[3]||"").toLowerCase())>=0}});a("#search-"+b).keypress(function(f){if(13===f.keyCode){f.preventDefault();a("#search-"+b).val("");a("#"+b+"-searcher").addClass("wp-hidden-children");a("#"+b+"checklist li").show();a("#"+b+"checklist-pop li").show();return}});a("#search-"+b).keyup(function(h){var j,i,k,g,f;if(13===h.keyCode){h.preventDefault();a("#"+b+"-search-toggle").focus();return}j=a("#search-"+b).val();i=a("#"+b+"checklist li");k=a("#"+b+"checklist-pop li");if(0<j.length){i.hide();k.hide()}else{i.show();k.show()}g=a("#"+b+"checklist label:matchTerms('"+j+"')");g.closest("li").find("li").andSelf().show();g.parents("#"+b+"checklist li").show();f=a("#"+b+"checklist-pop label:matchTerms('"+j+"')");f.closest("li").find("li").andSelf().show();f.parents("#"+b+"checklist li").show()});a("#"+b+"-search-toggle").click(function(){a("#"+b+"-adder ").addClass("wp-hidden-children");a("#"+b+"-searcher").toggleClass("wp-hidden-children");a('a[href="#'+b+'-all"]',"#"+b+"-tabs").click();a("#"+b+"checklist li").show();a("#"+b+"checklist-pop li").show();if(false===a("#"+b+"-searcher").hasClass("wp-hidden-children")){a("#search-"+b).val("").removeClass("form-input-tip");a("#search-"+b).focus()}return false});a("#"+b+"-add-toggle").click(function(){a("#"+b+"-searcher").addClass("wp-hidden-children");return false})})},setParentOpen:function(){var d,b,c;d=a("#mla_post_parent").val()||"";b=a("#post_ID").val()||"";c=a("#title").val()||"";mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.mlaEditAttachment.setParentSave();return false})},setParentSave:function(){var d=a("#mla-set-parent-response-div input:checked").closest("tr"),f,c,b,e;if(d.length){f=a(":radio",d).val()||"";c=a("label",d).html()||"";b=a("#mla_post_parent").clone(true).val(f);e=a("#mla_parent_info").clone(true).val(c);a("#mla_post_parent").replaceWith(b);a("#mla_parent_info").replaceWith(e);mla.setParent.close()}a("#mla-set-parent-submit").off("click")}};a(document).ready(function(){mla.mlaEditAttachment.init()})})(jQuery);
js/mla-inline-edit-scripts.js CHANGED
@@ -1,17 +1,19 @@
1
  /* global ajaxurl */
2
 
3
- var mla = {
4
- // Properties
5
- settings: {},
6
-
7
- // Utility functions
8
- utility: {
9
- },
10
-
11
- // Components
12
- setParent: null,
13
- inlineEditAttachment: null
14
- };
 
 
15
 
16
  ( function( $ ) {
17
  /**
@@ -88,7 +90,7 @@ var mla = {
88
  });
89
 
90
  // Filter button (dates, categories) in top nav bar
91
- $('#post-query-submit').mousedown(function(e){
92
  t.revert();
93
  $('select[name^="action"]').val('-1');
94
  });
@@ -96,7 +98,12 @@ var mla = {
96
 
97
  toggle : function(el){
98
  var t = this;
99
- $(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el);
 
 
 
 
 
100
  },
101
 
102
  setBulk : function(){
@@ -107,7 +114,7 @@ var mla = {
107
  $('table.widefat tbody').prepend( $('#bulk-edit') );
108
  $('#bulk-edit').addClass('inline-editor').show();
109
 
110
- $('tbody th.check-column input[type="checkbox"]').each(function(i){
111
  if ( $(this).prop('checked') ) {
112
  c = false;
113
  var id = $(this).val(), theTitle;
@@ -169,13 +176,13 @@ var mla = {
169
  $(':input[name="' + fields[fIndex] + '"]', editRow).val( $('.'+fields[fIndex], rowData).text() );
170
  }
171
 
172
- if ( $('.image_alt', rowData).length == 0) {
173
  $('label.inline-edit-image-alt', editRow).hide();
174
  }
175
 
176
  // hierarchical taxonomies
177
  $('.mla_category', rowData).each(function(){
178
- var term_ids = $(this).text();
179
 
180
  if ( term_ids ) {
181
  taxname = $(this).attr('id').replace('_'+id, '');
@@ -216,7 +223,7 @@ var mla = {
216
  params = {
217
  action: mla.settings.ajax_action,
218
  nonce: mla.settings.ajax_nonce,
219
- post_type: typenow,
220
  post_ID: id,
221
  edit_date: 'true',
222
  post_status: page
@@ -242,8 +249,8 @@ var mla = {
242
  } else {
243
  $( '#edit-' + id + ' .inline-edit-save .error' ).html( mla.settings.error ).show();
244
  }
245
- }
246
- , 'html');
247
  return false;
248
  },
249
 
@@ -355,8 +362,7 @@ var mla = {
355
 
356
  $( '#attachment-' + postId ).before( response ).remove();
357
  $( '#attachment-' + postId ).hide().fadeIn();
358
- }
359
- , 'html');
360
  } else {
361
  tableCell.html( mla.settings.error );
362
  $( '#attachment-' + postId + " td.attached_to" ).replaceWith( tableCell );
1
  /* global ajaxurl */
2
 
3
+ var jQuery,
4
+ mla_inline_edit_vars,
5
+ mla = {
6
+ // Properties
7
+ settings: {},
8
+
9
+ // Utility functions
10
+ utility: {
11
+ },
12
+
13
+ // Components
14
+ setParent: null,
15
+ inlineEditAttachment: null
16
+ };
17
 
18
  ( function( $ ) {
19
  /**
90
  });
91
 
92
  // Filter button (dates, categories) in top nav bar
93
+ $('#post-query-submit').mousedown(function(){
94
  t.revert();
95
  $('select[name^="action"]').val('-1');
96
  });
98
 
99
  toggle : function(el){
100
  var t = this;
101
+
102
+ if ( 'none' == $( t.what + t.getId( el ) ).css('display') ) {
103
+ t.revert();
104
+ } else {
105
+ t.edit( el );
106
+ }
107
  },
108
 
109
  setBulk : function(){
114
  $('table.widefat tbody').prepend( $('#bulk-edit') );
115
  $('#bulk-edit').addClass('inline-editor').show();
116
 
117
+ $('tbody th.check-column input[type="checkbox"]').each(function(){
118
  if ( $(this).prop('checked') ) {
119
  c = false;
120
  var id = $(this).val(), theTitle;
176
  $(':input[name="' + fields[fIndex] + '"]', editRow).val( $('.'+fields[fIndex], rowData).text() );
177
  }
178
 
179
+ if ( $('.image_alt', rowData).length === 0) {
180
  $('label.inline-edit-image-alt', editRow).hide();
181
  }
182
 
183
  // hierarchical taxonomies
184
  $('.mla_category', rowData).each(function(){
185
+ var term_ids = $(this).text(), taxname;
186
 
187
  if ( term_ids ) {
188
  taxname = $(this).attr('id').replace('_'+id, '');
223
  params = {
224
  action: mla.settings.ajax_action,
225
  nonce: mla.settings.ajax_nonce,
226
+ post_type: 'attachment',
227
  post_ID: id,
228
  edit_date: 'true',
229
  post_status: page
249
  } else {
250
  $( '#edit-' + id + ' .inline-edit-save .error' ).html( mla.settings.error ).show();
251
  }
252
+ }, 'html');
253
+
254
  return false;
255
  },
256
 
362
 
363
  $( '#attachment-' + postId ).before( response ).remove();
364
  $( '#attachment-' + postId ).hide().fadeIn();
365
+ }, 'html');
 
366
  } else {
367
  tableCell.html( mla.settings.error );
368
  $( '#attachment-' + postId + " td.attached_to" ).replaceWith( tableCell );
js/mla-inline-edit-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var mla={settings:{},utility:{},setParent:null,inlineEditAttachment:null};(function(a){mla.settings=typeof mla_inline_edit_vars==="undefined"?{}:mla_inline_edit_vars;mla_inline_edit_vars=void 0;mla.inlineEditAttachment={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="attachment";c.what="#attachment-";d.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});b.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});a("#inline-edit-post-set-parent",d).on("click",function(){return mla.inlineEditAttachment.inlineParentOpen(this)});a("a.cancel",d).click(function(){return mla.inlineEditAttachment.revert()});a("a.save",d).click(function(){return mla.inlineEditAttachment.save(this)});a("td",d).keydown(function(f){if(f.which==13){return mla.inlineEditAttachment.save(this)}});a("#bulk-edit-set-parent",b).on("click",function(){return mla.inlineEditAttachment.bulkParentOpen()});a("a.cancel",b).click(function(){return mla.inlineEditAttachment.revert()});a("#the-list").on("click","a.editinline",function(){mla.inlineEditAttachment.edit(this);return false});a("span.catshow").click(function(){a(this).hide().next().show().parent().next().addClass("cat-hover")});a("span.cathide").click(function(){a(this).hide().prev().show().parent().next().removeClass("cat-hover")});a('select[name="_status"] option[value="future"]',b).remove();a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}});a("#post-query-submit").mousedown(function(f){c.revert();a('select[name^="action"]').val("-1")})},toggle:function(c){var b=this;a(b.what+b.getId(c)).css("display")=="none"?b.revert():b.edit(c)},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(e){if(a(this).prop("checked")){d=false;var f=a(this).val(),c;c=a("#inline_"+f+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+f+'"><a id="_'+f+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("textarea.mla_tags").each(function(){var c=a(this).attr("name").replace("]","").replace("tax_input[","");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+c,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});a("html, body").animate({scrollTop:0},"fast")},edit:function(g){var d=this,b,c,e,f;d.revert();if(typeof(g)=="object"){g=d.getId(g)}b=mla.settings.fields;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+g).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+g).hide().after(c);e=a("#inline_"+g);if(!a(':input[name="post_author"] option[value="'+a(".post_author",e).text()+'"]',c).val()){a(':input[name="post_author"]',c).prepend('<option value="'+a(".post_author",e).text()+'">'+a("#"+d.type+"-"+g+" .author").text()+"</option>")}if(a(':input[name="post_author"] option',c).length==1){a("label.inline-edit-author",c).hide()}for(f=0;f<b.length;f++){a(':input[name="'+b[f]+'"]',c).val(a("."+b[f],e).text())}if(a(".image_alt",e).length==0){a("label.inline-edit-image-alt",c).hide()}a(".mla_category",e).each(function(){var h=a(this).text();if(h){taxname=a(this).attr("id").replace("_"+g,"");a("ul."+taxname+"-checklist :checkbox",c).val(h.split(","))}});a(".mla_tags",e).each(function(){var j=a(this).text(),k=a(this).attr("id").replace("_"+g,""),i=a("textarea.tax_input_"+k,c),h=mla.settings.comma;if(j){if(","!==h){j=j.replace(/,/g,h)}i.val(j)}i.suggest(ajaxurl+"?action=ajax-tag-search&tax="+k,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});a(c).attr("id","edit-"+g).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=this.getId(e)}a("table.widefat .inline-edit-save .waiting").show();d={action:mla.settings.ajax_action,nonce:mla.settings.ajax_nonce,post_type:typenow,post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post(ajaxurl,d,function(f){a("table.widefat .inline-edit-save .waiting").hide();if(f){if(-1!=f.indexOf("<tr")){a(mla.inlineEditAttachment.what+e).remove();a("#edit-"+e).before(f).remove();a(mla.inlineEditAttachment.what+e).hide().fadeIn()}else{f=f.replace(/<.[^<>]*?>/g,"");a("#edit-"+e+" .inline-edit-save .error").html(f).show()}}else{a("#edit-"+e+" .inline-edit-save .error").html(mla.settings.error).show()}},"html");return false},inlineParentOpen:function(e){var d,b,c;if(typeof(e)=="object"){b=this.getId(e);d=a("#edit-"+b+' :input[name="post_parent"]').val()||"";c=a("#edit-"+b+' :input[name="post_title"]').val()||"";mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(f){f.preventDefault();mla.inlineEditAttachment.inlineParentSave(b);return false})}},inlineParentSave:function(b){var f=a("#mla-set-parent-response-div input:checked").closest("tr"),h,e,c=a("#edit-"+b),d,g;if(f.length){h=a(":radio",f).val()||"";e=a("label",f).html()||"";d=a(':input[name="post_parent"]',c).clone(true).val(h);g=a(':input[name="post_parent_title"]',c).clone(true).val(e);a(':input[name="post_parent"]',c).replaceWith(d);a(':input[name="post_parent_title"]',c).replaceWith(g)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},bulkParentOpen:function(){var d,b,c;b=-1;c=mla.settings.bulkTitle;d=a('#bulk-edit :input[name="post_parent"]').val()||-1;mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.bulkParentSave();return false})},bulkParentSave:function(){var c=a("#mla-set-parent-response-div input:checked").closest("tr"),d,b;if(c.length){d=a(":radio",c).val()||"";b=a('#bulk-edit :input[name="post_parent"]').clone(true).val(d);a('#bulk-edit :input[name="post_parent"]').replaceWith(b)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},tableParentOpen:function(d,b,c){mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.tableParentSave(b);return false})},tableParentSave:function(b){var d=a("#mla-set-parent-response-div input:checked").closest("tr"),f=a(":radio",d).val()||"-1",c,e=a("#attachment-"+b+" td.attached_to").clone(true);if(d.length&&(f>=0)){e=a("#attachment-"+b+" td.attached_to").clone(true);e.html('<span class="spinner"></span>');a("#attachment-"+b+" td.attached_to").replaceWith(e);a("#attachment-"+b+" td.attached_to .spinner").show();c=a.param({action:mla.settings.ajax_action+"-set-parent",nonce:mla.settings.ajax_nonce,post_ID:b,post_parent:f,});a.post(ajaxurl,c,function(g){if(g){if(-1==g.indexOf("tableParentOpen(")){g=g.replace(/<.[^<>]*?>/g,"")}}else{g=mla.settings.ajaxFailError}a("#attachment-"+b).before(g).remove();a("#attachment-"+b).hide().fadeIn()},"html")}else{e.html(mla.settings.error);a("#attachment-"+b+" td.attached_to").replaceWith(e)}a("#mla-set-parent-submit").off("click");mla.setParent.close()},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){mla.inlineEditAttachment.init()})})(jQuery);
1
+ var jQuery,mla_inline_edit_vars,mla={settings:{},utility:{},setParent:null,inlineEditAttachment:null};(function(a){mla.settings=typeof mla_inline_edit_vars==="undefined"?{}:mla_inline_edit_vars;mla_inline_edit_vars=void 0;mla.inlineEditAttachment={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="attachment";c.what="#attachment-";d.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});b.keyup(function(f){if(f.which==27){return mla.inlineEditAttachment.revert()}});a("#inline-edit-post-set-parent",d).on("click",function(){return mla.inlineEditAttachment.inlineParentOpen(this)});a("a.cancel",d).click(function(){return mla.inlineEditAttachment.revert()});a("a.save",d).click(function(){return mla.inlineEditAttachment.save(this)});a("td",d).keydown(function(f){if(f.which==13){return mla.inlineEditAttachment.save(this)}});a("#bulk-edit-set-parent",b).on("click",function(){return mla.inlineEditAttachment.bulkParentOpen()});a("a.cancel",b).click(function(){return mla.inlineEditAttachment.revert()});a("#the-list").on("click","a.editinline",function(){mla.inlineEditAttachment.edit(this);return false});a("span.catshow").click(function(){a(this).hide().next().show().parent().next().addClass("cat-hover")});a("span.cathide").click(function(){a(this).hide().prev().show().parent().next().removeClass("cat-hover")});a('select[name="_status"] option[value="future"]',b).remove();a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}});a("#post-query-submit").mousedown(function(){c.revert();a('select[name^="action"]').val("-1")})},toggle:function(c){var b=this;if("none"==a(b.what+b.getId(c)).css("display")){b.revert()}else{b.edit(c)}},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .post_title").text()||mla.settings.noTitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla.settings.ntdelTitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("textarea.mla_tags").each(function(){var c=a(this).attr("name").replace("]","").replace("tax_input[","");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+c,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});a("html, body").animate({scrollTop:0},"fast")},edit:function(g){var d=this,b,c,e,f;d.revert();if(typeof(g)=="object"){g=d.getId(g)}b=mla.settings.fields;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+g).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+g).hide().after(c);e=a("#inline_"+g);if(!a(':input[name="post_author"] option[value="'+a(".post_author",e).text()+'"]',c).val()){a(':input[name="post_author"]',c).prepend('<option value="'+a(".post_author",e).text()+'">'+a("#"+d.type+"-"+g+" .author").text()+"</option>")}if(a(':input[name="post_author"] option',c).length==1){a("label.inline-edit-author",c).hide()}for(f=0;f<b.length;f++){a(':input[name="'+b[f]+'"]',c).val(a("."+b[f],e).text())}if(a(".image_alt",e).length===0){a("label.inline-edit-image-alt",c).hide()}a(".mla_category",e).each(function(){var h=a(this).text(),i;if(h){i=a(this).attr("id").replace("_"+g,"");a("ul."+i+"-checklist :checkbox",c).val(h.split(","))}});a(".mla_tags",e).each(function(){var j=a(this).text(),k=a(this).attr("id").replace("_"+g,""),i=a("textarea.tax_input_"+k,c),h=mla.settings.comma;if(j){if(","!==h){j=j.replace(/,/g,h)}i.val(j)}i.suggest(ajaxurl+"?action=ajax-tag-search&tax="+k,{delay:500,minchars:2,multiple:true,multipleSep:mla.settings.comma+" "})});a(c).attr("id","edit-"+g).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=this.getId(e)}a("table.widefat .inline-edit-save .waiting").show();d={action:mla.settings.ajax_action,nonce:mla.settings.ajax_nonce,post_type:"attachment",post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post(ajaxurl,d,function(f){a("table.widefat .inline-edit-save .waiting").hide();if(f){if(-1!=f.indexOf("<tr")){a(mla.inlineEditAttachment.what+e).remove();a("#edit-"+e).before(f).remove();a(mla.inlineEditAttachment.what+e).hide().fadeIn()}else{f=f.replace(/<.[^<>]*?>/g,"");a("#edit-"+e+" .inline-edit-save .error").html(f).show()}}else{a("#edit-"+e+" .inline-edit-save .error").html(mla.settings.error).show()}},"html");return false},inlineParentOpen:function(e){var d,b,c;if(typeof(e)=="object"){b=this.getId(e);d=a("#edit-"+b+' :input[name="post_parent"]').val()||"";c=a("#edit-"+b+' :input[name="post_title"]').val()||"";mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(f){f.preventDefault();mla.inlineEditAttachment.inlineParentSave(b);return false})}},inlineParentSave:function(b){var f=a("#mla-set-parent-response-div input:checked").closest("tr"),h,e,c=a("#edit-"+b),d,g;if(f.length){h=a(":radio",f).val()||"";e=a("label",f).html()||"";d=a(':input[name="post_parent"]',c).clone(true).val(h);g=a(':input[name="post_parent_title"]',c).clone(true).val(e);a(':input[name="post_parent"]',c).replaceWith(d);a(':input[name="post_parent_title"]',c).replaceWith(g)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},bulkParentOpen:function(){var d,b,c;b=-1;c=mla.settings.bulkTitle;d=a('#bulk-edit :input[name="post_parent"]').val()||-1;mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.bulkParentSave();return false})},bulkParentSave:function(){var c=a("#mla-set-parent-response-div input:checked").closest("tr"),d,b;if(c.length){d=a(":radio",c).val()||"";b=a('#bulk-edit :input[name="post_parent"]').clone(true).val(d);a('#bulk-edit :input[name="post_parent"]').replaceWith(b)}mla.setParent.close();a("#mla-set-parent-submit").off("click")},tableParentOpen:function(d,b,c){mla.setParent.open(d,b,c);a("#mla-set-parent-submit").on("click",function(e){e.preventDefault();mla.inlineEditAttachment.tableParentSave(b);return false})},tableParentSave:function(b){var d=a("#mla-set-parent-response-div input:checked").closest("tr"),f=a(":radio",d).val()||"-1",c,e=a("#attachment-"+b+" td.attached_to").clone(true);if(d.length&&(f>=0)){e=a("#attachment-"+b+" td.attached_to").clone(true);e.html('<span class="spinner"></span>');a("#attachment-"+b+" td.attached_to").replaceWith(e);a("#attachment-"+b+" td.attached_to .spinner").show();c=a.param({action:mla.settings.ajax_action+"-set-parent",nonce:mla.settings.ajax_nonce,post_ID:b,post_parent:f,});a.post(ajaxurl,c,function(g){if(g){if(-1==g.indexOf("tableParentOpen(")){g=g.replace(/<.[^<>]*?>/g,"")}}else{g=mla.settings.ajaxFailError}a("#attachment-"+b).before(g).remove();a("#attachment-"+b).hide().fadeIn()},"html")}else{e.html(mla.settings.error);a("#attachment-"+b+" td.attached_to").replaceWith(e)}a("#mla-set-parent-submit").off("click");mla.setParent.close()},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){mla.inlineEditAttachment.init()})})(jQuery);
js/mla-inline-edit-upload-scripts.js CHANGED
@@ -1,4 +1,7 @@
1
  // These functions are adapted from wp-admin/js/inline-edit-post.js
 
 
 
2
  (function($) {
3
  inlineEditUpload = {
4
 
@@ -53,7 +56,12 @@ inlineEditUpload = {
53
 
54
  toggle : function(el){
55
  var t = this;
56
- $(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el);
 
 
 
 
 
57
  },
58
 
59
  setBulk : function(){
@@ -64,7 +72,7 @@ inlineEditUpload = {
64
  $('table.widefat tbody').prepend( $('#bulk-edit') );
65
  $('#bulk-edit').addClass('inline-editor').show();
66
 
67
- $('tbody th.check-column input[type="checkbox"]').each(function(i){
68
  if ( $(this).prop('checked') ) {
69
  c = false;
70
  var id = $(this).val(), theTitle;
@@ -160,8 +168,7 @@ inlineEditUpload = {
160
  } else {
161
  $('#edit-'+id+' .inline-edit-save .error').html(mla_inline_edit_upload_vars.error).show();
162
  }
163
- }
164
- , 'html');
165
  return false;
166
  },
167
 
1
  // These functions are adapted from wp-admin/js/inline-edit-post.js
2
+
3
+ var ajaxurl, jQuery, inlineEditUpload, mla_inline_edit_upload_vars;
4
+
5
  (function($) {
6
  inlineEditUpload = {
7
 
56
 
57
  toggle : function(el){
58
  var t = this;
59
+
60
+ if ( 'none' == $( t.what + t.getId( el ) ).css('display') ) {
61
+ t.revert();
62
+ } else {
63
+ t.edit( el );
64
+ }
65
  },
66
 
67
  setBulk : function(){
72
  $('table.widefat tbody').prepend( $('#bulk-edit') );
73
  $('#bulk-edit').addClass('inline-editor').show();
74
 
75
+ $('tbody th.check-column input[type="checkbox"]').each(function(){
76
  if ( $(this).prop('checked') ) {
77
  c = false;
78
  var id = $(this).val(), theTitle;
168
  } else {
169
  $('#edit-'+id+' .inline-edit-save .error').html(mla_inline_edit_upload_vars.error).show();
170
  }
171
+ }, 'html');
 
172
  return false;
173
  },
174
 
js/mla-inline-edit-upload-scripts.min.js CHANGED
@@ -1 +1 @@
1
- (function(a){inlineEditUpload={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="upload";c.what="#upload-";d.keyup(function(f){if(f.which==27){return inlineEditUpload.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditUpload.revert()}});a("a.cancel",d).click(function(){return inlineEditUpload.revert()});a("a.save",d).click(function(){return inlineEditUpload.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditUpload.save(this)}});a("a.cancel",b).click(function(){return inlineEditUpload.revert()});a("a.editinline").live("click",function(){inlineEditUpload.edit(this);return false});a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}})},toggle:function(c){var b=this;a(b.what+b.getId(c)).css("display")=="none"?b.revert():b.edit(c)},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(e){if(a(this).prop("checked")){d=false;var f=a(this).val(),c;c=a("#inline_"+f+" .slug").text()||mla_inline_edit_upload_vars.notitle;b+='<div id="ttle'+f+'"><a id="_'+f+'" class="ntdelbutton" title="'+mla_inline_edit_upload_vars.ntdeltitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("html, body").animate({scrollTop:0},"fast")},edit:function(h){var d=this,b,f,c,e,g;d.revert();if(typeof(h)=="object"){h=d.getId(h)}b=mla_inline_edit_upload_vars.fields;f=mla_inline_edit_upload_vars.checkboxes;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c);e=a("#inline_"+h);for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],e).text())}for(g=0;g<b.length;g++){if("1"==a("."+f[g],e).text()){a(':input[name="'+f[g]+'"]',c).attr("checked","checked")}else{a(':input[name="'+f[g]+'"]',c).removeAttr("checked")}}a(c).attr("id","edit-"+h).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(d){var c,b;if(typeof(d)=="object"){d=this.getId(d)}a("table.widefat .spinner").show();c={action:mla_inline_edit_upload_vars.ajax_action,nonce:mla_inline_edit_upload_vars.ajax_nonce,post_ID:d};b=a("#edit-"+d+" :input").serialize();c=b+"&"+a.param(c);a.post(ajaxurl,c,function(e){a("table.widefat .spinner").hide();if(e){if(-1!=e.indexOf("<tr")){a(inlineEditUpload.what+d).remove();a("#edit-"+d).before(e).remove();a(inlineEditUpload.what+d).hide().fadeIn()}else{e=e.replace(/<.[^<>]*?>/g,"");a("#edit-"+d+" .inline-edit-save .error").html(e).show()}}else{a("#edit-"+d+" .inline-edit-save .error").html(mla_inline_edit_upload_vars.error).show()}},"html");return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{a("table.widefat .spinner").hide();a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){inlineEditUpload.init()})})(jQuery);
1
+ var ajaxurl,jQuery,inlineEditUpload,mla_inline_edit_upload_vars;(function(a){inlineEditUpload={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="upload";c.what="#upload-";d.keyup(function(f){if(f.which==27){return inlineEditUpload.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditUpload.revert()}});a("a.cancel",d).click(function(){return inlineEditUpload.revert()});a("a.save",d).click(function(){return inlineEditUpload.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditUpload.save(this)}});a("a.cancel",b).click(function(){return inlineEditUpload.revert()});a("a.editinline").live("click",function(){inlineEditUpload.edit(this);return false});a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}})},toggle:function(c){var b=this;if("none"==a(b.what+b.getId(c)).css("display")){b.revert()}else{b.edit(c)}},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .slug").text()||mla_inline_edit_upload_vars.notitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla_inline_edit_upload_vars.ntdeltitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("html, body").animate({scrollTop:0},"fast")},edit:function(h){var d=this,b,f,c,e,g;d.revert();if(typeof(h)=="object"){h=d.getId(h)}b=mla_inline_edit_upload_vars.fields;f=mla_inline_edit_upload_vars.checkboxes;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c);e=a("#inline_"+h);for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],e).text())}for(g=0;g<b.length;g++){if("1"==a("."+f[g],e).text()){a(':input[name="'+f[g]+'"]',c).attr("checked","checked")}else{a(':input[name="'+f[g]+'"]',c).removeAttr("checked")}}a(c).attr("id","edit-"+h).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(d){var c,b;if(typeof(d)=="object"){d=this.getId(d)}a("table.widefat .spinner").show();c={action:mla_inline_edit_upload_vars.ajax_action,nonce:mla_inline_edit_upload_vars.ajax_nonce,post_ID:d};b=a("#edit-"+d+" :input").serialize();c=b+"&"+a.param(c);a.post(ajaxurl,c,function(e){a("table.widefat .spinner").hide();if(e){if(-1!=e.indexOf("<tr")){a(inlineEditUpload.what+d).remove();a("#edit-"+d).before(e).remove();a(inlineEditUpload.what+d).hide().fadeIn()}else{e=e.replace(/<.[^<>]*?>/g,"");a("#edit-"+d+" .inline-edit-save .error").html(e).show()}}else{a("#edit-"+d+" .inline-edit-save .error").html(mla_inline_edit_upload_vars.error).show()}},"html");return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{a("table.widefat .spinner").hide();a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){inlineEditUpload.init()})})(jQuery);
js/mla-inline-edit-view-scripts.js CHANGED
@@ -1,4 +1,7 @@
1
  // These functions are adapted from wp-admin/js/inline-edit-post.js
 
 
 
2
  (function($) {
3
  inlineEditView = {
4
 
@@ -53,7 +56,12 @@ inlineEditView = {
53
 
54
  toggle : function(el){
55
  var t = this;
56
- $(t.what+t.getId(el)).css('display') == 'none' ? t.revert() : t.edit(el);
 
 
 
 
 
57
  },
58
 
59
  setBulk : function(){
@@ -64,7 +72,7 @@ inlineEditView = {
64
  $('table.widefat tbody').prepend( $('#bulk-edit') );
65
  $('#bulk-edit').addClass('inline-editor').show();
66
 
67
- $('tbody th.check-column input[type="checkbox"]').each(function(i){
68
  if ( $(this).prop('checked') ) {
69
  c = false;
70
  var id = $(this).val(), theTitle;
@@ -160,8 +168,7 @@ inlineEditView = {
160
  } else {
161
  $('#edit-'+id+' .inline-edit-save .error').html(mla_inline_edit_view_vars.error).show();
162
  }
163
- }
164
- , 'html');
165
  return false;
166
  },
167
 
1
  // These functions are adapted from wp-admin/js/inline-edit-post.js
2
+
3
+ var ajaxurl, jQuery, inlineEditView, mla_inline_edit_view_vars;
4
+
5
  (function($) {
6
  inlineEditView = {
7
 
56
 
57
  toggle : function(el){
58
  var t = this;
59
+
60
+ if ( 'none' == $( t.what + t.getId( el ) ).css('display') ) {
61
+ t.revert();
62
+ } else {
63
+ t.edit( el );
64
+ }
65
  },
66
 
67
  setBulk : function(){
72
  $('table.widefat tbody').prepend( $('#bulk-edit') );
73
  $('#bulk-edit').addClass('inline-editor').show();
74
 
75
+ $('tbody th.check-column input[type="checkbox"]').each(function(){
76
  if ( $(this).prop('checked') ) {
77
  c = false;
78
  var id = $(this).val(), theTitle;
168
  } else {
169
  $('#edit-'+id+' .inline-edit-save .error').html(mla_inline_edit_view_vars.error).show();
170
  }
171
+ }, 'html');
 
172
  return false;
173
  },
174
 
js/mla-inline-edit-view-scripts.min.js CHANGED
@@ -1 +1 @@
1
- (function(a){inlineEditView={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="view";c.what="#view-";d.keyup(function(f){if(f.which==27){return inlineEditView.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditView.revert()}});a("a.cancel",d).click(function(){return inlineEditView.revert()});a("a.save",d).click(function(){return inlineEditView.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditView.save(this)}});a("a.cancel",b).click(function(){return inlineEditView.revert()});a("a.editinline").live("click",function(){inlineEditView.edit(this);return false});a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}})},toggle:function(c){var b=this;a(b.what+b.getId(c)).css("display")=="none"?b.revert():b.edit(c)},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(e){if(a(this).prop("checked")){d=false;var f=a(this).val(),c;c=a("#inline_"+f+" .slug").text()||mla_inline_edit_view_vars.notitle;b+='<div id="ttle'+f+'"><a id="_'+f+'" class="ntdelbutton" title="'+mla_inline_edit_view_vars.ntdeltitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("html, body").animate({scrollTop:0},"fast")},edit:function(h){var d=this,b,f,c,e,g;d.revert();if(typeof(h)=="object"){h=d.getId(h)}b=mla_inline_edit_view_vars.fields;f=mla_inline_edit_view_vars.checkboxes;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c);e=a("#inline_"+h);for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],e).text())}for(g=0;g<b.length;g++){if("1"==a("."+f[g],e).text()){a(':input[name="'+f[g]+'"]',c).attr("checked","checked")}else{a(':input[name="'+f[g]+'"]',c).removeAttr("checked")}}a(c).attr("id","edit-"+h).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(d){var c,b;if(typeof(d)=="object"){d=this.getId(d)}a("table.widefat .spinner").show();c={action:mla_inline_edit_view_vars.ajax_action,nonce:mla_inline_edit_view_vars.ajax_nonce,post_ID:d};b=a("#edit-"+d+" :input").serialize();c=b+"&"+a.param(c);a.post(ajaxurl,c,function(e){a("table.widefat .spinner").hide();if(e){if(-1!=e.indexOf("<tr")){a(inlineEditView.what+d).remove();a("#edit-"+d).before(e).remove();a(inlineEditView.what+d).hide().fadeIn()}else{e=e.replace(/<.[^<>]*?>/g,"");a("#edit-"+d+" .inline-edit-save .error").html(e).show()}}else{a("#edit-"+d+" .inline-edit-save .error").html(mla_inline_edit_view_vars.error).show()}},"html");return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{a("table.widefat .spinner").hide();a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){inlineEditView.init()})})(jQuery);
1
+ var ajaxurl,jQuery,inlineEditView,mla_inline_edit_view_vars;(function(a){inlineEditView={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="view";c.what="#view-";d.keyup(function(f){if(f.which==27){return inlineEditView.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditView.revert()}});a("a.cancel",d).click(function(){return inlineEditView.revert()});a("a.save",d).click(function(){return inlineEditView.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditView.save(this)}});a("a.cancel",b).click(function(){return inlineEditView.revert()});a("a.editinline").live("click",function(){inlineEditView.edit(this);return false});a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}})},toggle:function(c){var b=this;if("none"==a(b.what+b.getId(c)).css("display")){b.revert()}else{b.edit(c)}},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(){if(a(this).prop("checked")){d=false;var e=a(this).val(),c;c=a("#inline_"+e+" .slug").text()||mla_inline_edit_view_vars.notitle;b+='<div id="ttle'+e+'"><a id="_'+e+'" class="ntdelbutton" title="'+mla_inline_edit_view_vars.ntdeltitle+'">X</a>'+c+"</div>"}});if(d){return this.revert()}a("#bulk-titles").html(b);a("#bulk-titles a").click(function(){var c=a(this).attr("id").substr(1);a('table.widefat input[value="'+c+'"]').prop("checked",false);a("#ttle"+c).remove()});a("html, body").animate({scrollTop:0},"fast")},edit:function(h){var d=this,b,f,c,e,g;d.revert();if(typeof(h)=="object"){h=d.getId(h)}b=mla_inline_edit_view_vars.fields;f=mla_inline_edit_view_vars.checkboxes;c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+h).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+h).hide().after(c);e=a("#inline_"+h);for(g=0;g<b.length;g++){a(':input[name="'+b[g]+'"]',c).val(a("."+b[g],e).text())}for(g=0;g<b.length;g++){if("1"==a("."+f[g],e).text()){a(':input[name="'+f[g]+'"]',c).attr("checked","checked")}else{a(':input[name="'+f[g]+'"]',c).removeAttr("checked")}}a(c).attr("id","edit-"+h).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(d){var c,b;if(typeof(d)=="object"){d=this.getId(d)}a("table.widefat .spinner").show();c={action:mla_inline_edit_view_vars.ajax_action,nonce:mla_inline_edit_view_vars.ajax_nonce,post_ID:d};b=a("#edit-"+d+" :input").serialize();c=b+"&"+a.param(c);a.post(ajaxurl,c,function(e){a("table.widefat .spinner").hide();if(e){if(-1!=e.indexOf("<tr")){a(inlineEditView.what+d).remove();a("#edit-"+d).before(e).remove();a(inlineEditView.what+d).hide().fadeIn()}else{e=e.replace(/<.[^<>]*?>/g,"");a("#edit-"+d+" .inline-edit-save .error").html(e).show()}}else{a("#edit-"+d+" .inline-edit-save .error").html(mla_inline_edit_view_vars.error).show()}},"html");return false},revert:function(){var b=a("table.widefat tr.inline-editor").attr("id");if(b){a("table.widefat .inline-edit-save .waiting").hide();if("bulk-edit"==b){a("table.widefat #bulk-edit").removeClass("inline-editor").hide();a("#bulk-titles").html("");a("#inlineedit").append(a("#bulk-edit"))}else{a("table.widefat .spinner").hide();a("#"+b).remove();b=b.substr(b.lastIndexOf("-")+1);a(this.what+b).show()}}return false},getId:function(c){var d=a(c).closest("tr").attr("id"),b=d.split("-");return b[b.length-1]}};a(document).ready(function(){inlineEditView.init()})})(jQuery);
js/mla-media-modal-scripts.js CHANGED
@@ -1,55 +1,58 @@
1
  // uses Global ajaxurl
2
 
3
- var mlaModal = {
4
- // Properties
5
- strings: {},
6
- settings: {},
7
- initialHTML: {},
8
- uploading: false,
9
- cid: null,
10
-
11
- // Utility functions
12
- utility: {
13
- originalMediaAjax: null,
14
- mlaAttachmentsBrowser: null,
15
- parseTermsOptions: null,
16
- arrayCleanup: null,
17
- parseTaxonomyId: null,
18
- hookCompatTaxonomies: null,
19
- fillCompatTaxonomies: null,
20
- supportCompatTaxonomies: null
21
- },
22
-
23
- // Components
24
- tagBox: null
25
- };
 
 
 
26
 
27
  (function($){
28
  /* for debug : trace every event triggered in the MediaFrame controller * /
29
  var originalMediaFrameTrigger = wp.media.view.MediaFrame.prototype.trigger;
30
  wp.media.view.MediaFrame.prototype.trigger = function(){
31
- console.log('MediaFrame Event: ', arguments[0]);
32
  originalMediaFrameTrigger.apply(this, Array.prototype.slice.call(arguments));
33
  } // */
34
 
35
  /* for debug : trace every event triggered in the view.Attachment controller * /
36
  var originalAttachmentTrigger = wp.media.view.Attachment.prototype.trigger;
37
  wp.media.view.Attachment.prototype.trigger = function(){
38
- console.log('view.Attachment Event: ', arguments[0]);
39
  originalAttachmentTrigger.apply(this, Array.prototype.slice.call(arguments));
40
  } // */
41
 
42
  /* for debug : trace every event triggered in the model.Attachment controller * /
43
  var originalModelAttachmentTrigger = wp.media.model.Attachment.prototype.trigger;
44
  wp.media.model.Attachment.prototype.trigger = function(){
45
- console.log('model.Attachment Event: ', arguments[0]);
46
  originalModelAttachmentTrigger.apply(this, Array.prototype.slice.call(arguments));
47
  } // */
48
 
49
  /* for debug : trace every event triggered in the view.AttachmentCompat controller * /
50
  var originalAttachmentCompatTrigger = wp.media.view.AttachmentCompat.prototype.trigger;
51
  wp.media.view.AttachmentCompat.prototype.trigger = function(){
52
- console.log('view.AttachmentCompat Event: ', arguments[0]);
53
 
54
  originalAttachmentCompatTrigger.apply(this, Array.prototype.slice.call(arguments));
55
  } // */
@@ -57,7 +60,7 @@ var mlaModal = {
57
  /* for debug : trace every event triggered in the model.Selection controller * /
58
  var originalModelSelectionTrigger = wp.media.model.Selection.prototype.trigger;
59
  wp.media.model.Selection.prototype.trigger = function(){
60
- console.log('model.Selection Event: ', arguments[0]);
61
 
62
  originalModelSelectionTrigger.apply(this, Array.prototype.slice.call(arguments));
63
  } // */
@@ -65,8 +68,8 @@ var mlaModal = {
65
  /* for debug : trace every invocation of the media.post method * /
66
  var originalMediaPost = media.post;
67
  media.post = function( action, data ) {
68
- console.log('media.post action: ', action );
69
- console.log('media.post data: ', JSON.stringify( data ) );
70
 
71
  return originalMediaPost.apply(this, Array.prototype.slice.call(arguments));
72
  }; // */
@@ -74,18 +77,45 @@ var mlaModal = {
74
  /* for debug : trace every invocation of the wp.ajax.send function * /
75
  var originalWpAjaxSend = wp.ajax.send;
76
  wp.ajax.send = function( action, data ) {
77
- console.log('wp.ajax.send action: ', JSON.stringify( action ) );
78
- console.log('wp.ajax.send data: ', JSON.stringify( data ) );
79
 
80
  return originalWpAjaxSend.apply(this, Array.prototype.slice.call(arguments));
81
  }; // */
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  /*
84
  * Parse outgoing Ajax requests, look for the 'query-attachments' action and stuff
85
  * our arguments into the "s" field because MMMW only monitors that one field.
86
  */
87
  mlaModal.utility.originalMediaAjax = wp.media.ajax;
88
  wp.media.ajax = function( action, options ) {
 
 
89
  if ( _.isObject( action ) ) {
90
  options = action;
91
  } else {
@@ -94,39 +124,48 @@ var mlaModal = {
94
  }
95
 
96
  if ( 'query-attachments' == options.data.action ) {
97
- stype = typeof options.data.query.s;
 
98
  if ( 'object' == stype )
99
- s = options.data.query.s;
100
  else if ( 'string' == stype )
101
- s = { 'mla_search_value': options.data.query.s };
102
  else
103
- s = {};
104
 
105
- if ( 'undefined' != typeof options.data.query.post_mime_type )
106
- mlaModal.settings.filterMime = options.data.query.post_mime_type;
107
  else
108
- mlaModal.settings.filterMime = 'all';
109
-
110
- if ( 'undefined' != typeof s.mla_filter_month )
111
- mlaModal.settings.filterMonth = s.mla_filter_month;
 
 
 
 
 
 
 
 
112
 
113
  if ( 'undefined' != typeof s.mla_filter_term )
114
- mlaModal.settings.filterTerm = s.mla_filter_term;
115
 
116
  if ( 'undefined' != typeof s.mla_search_value )
117
- mlaModal.settings.searchValue = s.mla_search_value;
118
 
119
  searchValues = {
120
- 'mla_filter_month': mlaModal.settings.filterMonth,
121
- 'mla_filter_term': mlaModal.settings.filterTerm,
122
- 'mla_terms_search': mlaModal.settings.termsSearch,
123
- 'mla_search_clicks': mlaModal.settings.searchClicks,
124
- 'mla_search_value': mlaModal.settings.searchValue,
125
- 'mla_search_fields': mlaModal.settings.searchFields,
126
- 'mla_search_connector': mlaModal.settings.searchConnector };
127
 
128
  //Terms Search is not sticky
129
- mlaModal.settings.termsSearch = '';
130
  $( '#mla-terms-search-input' ).html( '' ).val( '' );
131
 
132
  options.data.query.s = searchValues;
@@ -135,33 +174,27 @@ var mlaModal = {
135
  return mlaModal.utility.originalMediaAjax.call(this, options );
136
  }; // wp.media.ajax
137
 
138
- /**
139
- * Localized settings and strings
140
- */
141
- mlaModal.strings = typeof wp.media.view.l10n.mla_strings === 'undefined' ? {} : wp.media.view.l10n.mla_strings;
142
- delete wp.media.view.l10n.mla_strings;
143
-
144
- mlaModal.settings = typeof wp.media.view.settings.mla_settings === 'undefined' ? {} : wp.media.view.settings.mla_settings;
145
- delete wp.media.view.settings.mla_settings;
146
-
147
  /**
148
  * Extended Filters dropdown with more mimeTypes
149
  */
150
  if ( mlaModal.settings.enableMimeTypes ) {
151
  wp.media.view.AttachmentFilters.Mla = wp.media.view.AttachmentFilters.extend({
152
  createFilters: function() {
153
- var filters = {};
 
154
 
155
  _.each( mlaModal.settings.mimeTypes || {}, function( text, key ) {
156
- filters[ key ] = {
157
- text: text,
158
- props: {
159
- type: key,
160
- uploadedTo: null,
161
- orderby: 'date',
162
- order: 'DESC'
163
- }
164
- };
 
 
165
  });
166
 
167
  filters.all = {
@@ -175,32 +208,63 @@ var mlaModal = {
175
  priority: 10
176
  };
177
 
178
- filters.uploaded = {
179
- text: wp.media.view.l10n.uploadedToThisPost,
180
- props: {
181
- type: null,
182
- uploadedTo: wp.media.view.settings.post.id,
183
- orderby: 'menuOrder',
184
- order: 'ASC'
185
- },
186
- priority: 20
187
- };
188
-
 
 
189
  this.filters = filters;
190
- if ( ( mlaModal.settings.filterMime != 'all' ) && ( 'undefined' !== typeof filters[ mlaModal.settings.filterMime ] ) )
191
- this.model.set( filters[ mlaModal.settings.filterMime ].props, { silent: false } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  },
193
 
194
  change: function() {
195
- var filter = this.filters[ this.el.value ];
 
196
 
197
  if ( filter ) {
 
198
  this.model.set( filter.props, { silent: true } );
199
  $( '#mla-search-submit' ).click();
200
  }
201
  }
202
  });
203
- };
204
 
205
  /**
206
  * Extended Filters dropdown with month and year selection values
@@ -210,7 +274,8 @@ var mlaModal = {
210
  className: 'attachment-months',
211
 
212
  createFilters: function() {
213
- var filters = {};
 
214
 
215
  _.each( mlaModal.settings.months || {}, function( text, key ) {
216
  filters[ key ] = {
@@ -220,30 +285,34 @@ var mlaModal = {
220
  });
221
 
222
  this.filters = filters;
223
- if ( ( mlaModal.settings.filterMonth > 0 ) && ( 'undefined' !== typeof filters[ mlaModal.settings.filterMonth ] ) )
224
- if ( mlaModal.settings.filterMonth > 0 )
225
- this.model.set( filters[ mlaModal.settings.filterMonth ].props, { silent: false } );
 
 
 
226
  },
227
 
228
  select: function() {
229
- var model = this.model,
230
- value = mlaModal.settings.filterMonth,
 
231
  props = model.toJSON();
232
 
233
  if ( _.isUndefined( props.s ) )
234
  props.s = {};
235
 
236
  if ( 'string' == typeof props.search )
237
- mlaModal.settings.searchValue = props.search;
238
 
239
  if (_.isUndefined( props.s.mla_filter_month ) )
240
- props.s.mla_filter_month = mlaModal.settings.filterMonth;
241
  else
242
- mlaModal.settings.filterMonth = props.s.mla_filter_month;
243
 
244
  _.find( this.filters, function( filter, id ) {
245
- var equal = _.all( filter.props, function( prop, key ) {
246
- return prop.mla_filter_month == mlaModal.settings.filterMonth;
247
  });
248
 
249
  if ( equal )
@@ -254,15 +323,17 @@ var mlaModal = {
254
  },
255
 
256
  change: function() {
257
- var filter = this.filters[ this.el.value ];
 
258
 
259
  if ( filter ) {
260
- this.model.set( filter.props /*, { silent: true } */ );
 
261
  $( '#mla-search-submit' ).click();
262
  }
263
  }
264
  });
265
- };
266
 
267
  /**
268
  * Extended Filters dropdown with taxonomy term selection values
@@ -272,7 +343,8 @@ var mlaModal = {
272
  className: 'attachment-terms',
273
 
274
  createFilters: function() {
275
- var filters = {};
 
276
 
277
  _.each( mlaModal.settings.termsText || {}, function( text, key ) {
278
  filters[ key ] = {
@@ -283,30 +355,31 @@ var mlaModal = {
283
 
284
  this.filters = filters;
285
  // need to translate from termsValue to the index value
286
- index = _.indexOf( mlaModal.settings.termsValue, mlaModal.settings.filterTerm );
287
  if ( index > 0 )
288
  this.model.set( filters[ index ].props, { silent: false } );
289
  },
290
 
291
  select: function() {
292
- var model = this.model,
293
- value = mlaModal.settings.filterTerm,
 
294
  props = model.toJSON();
295
 
296
  if ( _.isUndefined( props.s ) )
297
  props.s = {};
298
 
299
  if ( 'string' == typeof props.search )
300
- mlaModal.settings.searchValue = props.search;
301
 
302
  if (_.isUndefined( props.s.mla_filter_term ) )
303
- props.s.mla_filter_term = mlaModal.settings.filterTerm;
304
  else
305
- mlaModal.settings.filterTerm = props.s.mla_filter_term;
306
 
307
  _.find( this.filters, function( filter, id ) {
308
- var equal = _.all( filter.props, function( prop, key ) {
309
- return prop.mla_filter_term == mlaModal.settings.filterTerm;
310
  });
311
 
312
  if ( equal )
@@ -317,15 +390,17 @@ var mlaModal = {
317
  },
318
 
319
  change: function() {
320
- var filter = this.filters[ this.el.value ];
 
321
 
322
  if ( filter ) {
323
- this.model.set( filter.props /*, { silent: true } */ );
 
324
  $( '#mla-search-submit' ).click();
325
  }
326
  }
327
  });
328
- };
329
 
330
  /**
331
  * Extended Terms Search activation button
@@ -375,10 +450,10 @@ var mlaModal = {
375
  case 'mla_terms_search[taxonomies][]':
376
  termsSearch.taxonomies[ termsSearch.taxonomies.length ] = inputs[ inputIndex ].value;
377
  break;
378
- };
379
  }
380
 
381
- mlaModal.settings.termsSearch = termsSearch
382
  $( '#mla-search-submit' ).click();
383
  return false;
384
  });
@@ -391,8 +466,8 @@ var mlaModal = {
391
  });
392
  }
393
  }
394
- }); // wp.media.view.MlaSearch
395
- }; // mlaModal.settings.enableTermsSearch
396
 
397
  /**
398
  * Extended wp.media.view.Search
@@ -408,90 +483,143 @@ var mlaModal = {
408
  },
409
 
410
  events: {
 
411
  'change': 'search',
412
  'click': 'search',
413
  'search': 'search',
414
  'MlaSearch': 'search'
415
  },
416
 
 
 
 
 
 
 
 
 
 
417
  render: function() {
418
- this.$el.html( this.template( mlaModal.strings ) );
 
 
419
  return this;
420
  },
421
 
422
  search: function( event ) {
 
 
 
 
 
 
 
423
  if ( ( 'click' == event.type ) && ( 'mla_search_submit' != event.target.name ) ) {
424
  return;
425
  }
426
 
427
  switch ( event.target.name ) {
428
  case 's[mla_search_value]':
429
- mlaModal.settings.searchValue = event.target.value;
430
  break;
431
  case 'mla_search_submit':
432
  searchValues = {
433
- 'mla_filter_month': mlaModal.settings.filterMonth,
434
- 'mla_filter_term': mlaModal.settings.filterTerm,
435
- 'mla_terms_search': mlaModal.settings.termsSearch,
436
- 'mla_search_clicks': mlaModal.settings.searchClicks++,
437
- 'mla_search_value': mlaModal.settings.searchValue,
438
- 'mla_search_fields': mlaModal.settings.searchFields,
439
- 'mla_search_connector': mlaModal.settings.searchConnector };
440
  this.model.set({ 's': searchValues });
441
  break;
442
  case 's[mla_search_connector]':
443
- mlaModal.settings.searchConnector = event.target.value;
444
  break;
445
  case 's[mla_search_title]':
446
- index = mlaModal.settings.searchFields.indexOf( 'title' );
 
447
  if ( -1 == index )
448
- mlaModal.settings.searchFields.push( 'title' )
449
  else
450
- mlaModal.settings.searchFields.splice( index, 1 );
 
 
451
  break;
452
  case 's[mla_search_name]':
453
- index = mlaModal.settings.searchFields.indexOf( 'name' );
454
  if ( -1 == index )
455
- mlaModal.settings.searchFields.push( 'name' )
456
  else
457
- mlaModal.settings.searchFields.splice( index, 1 );
458
  break;
459
  case 's[mla_search_alt_text]':
460
- index = mlaModal.settings.searchFields.indexOf( 'alt-text' );
461
  if ( -1 == index )
462
- mlaModal.settings.searchFields.push( 'alt-text' )
463
  else
464
- mlaModal.settings.searchFields.splice( index, 1 );
465
  break;
466
  case 's[mla_search_excerpt]':
467
- index = mlaModal.settings.searchFields.indexOf( 'excerpt' );
468
  if ( -1 == index )
469
- mlaModal.settings.searchFields.push( 'excerpt' )
470
  else
471
- mlaModal.settings.searchFields.splice( index, 1 );
472
  break;
473
  case 's[mla_search_content]':
474
- index = mlaModal.settings.searchFields.indexOf( 'content' );
475
  if ( -1 == index )
476
- mlaModal.settings.searchFields.push( 'content' )
477
  else
478
- mlaModal.settings.searchFields.splice( index, 1 );
479
  break;
480
  case 's[mla_search_terms]':
481
- index = mlaModal.settings.searchFields.indexOf( 'terms' );
482
  if ( -1 == index )
483
- mlaModal.settings.searchFields.push( 'terms' )
484
  else
485
- mlaModal.settings.searchFields.splice( index, 1 );
486
  break;
487
  }
488
  }
489
  }); // wp.media.view.MlaSearch
490
- }; // mlaModal.settings.enableSearchBox
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
 
492
  /* for debug : trace every event triggered in the wp.media.frame * /
493
  function mediaFrameOn( eventName ) {
494
- console.log('wp.media.frame Event: ', eventName);
495
  } // */
496
 
497
  /**
@@ -499,12 +627,31 @@ function mediaFrameOn( eventName ) {
499
  */
500
  if ( mlaModal.settings.enableMimeTypes || mlaModal.settings.enableMonthsDropdown || mlaModal.settings.enableTermsDropdown || mlaModal.settings.enableTermsSearch || mlaModal.settings.enableSearchBox ) {
501
  wp.media.view.AttachmentsBrowser = wp.media.view.AttachmentsBrowser.extend({
 
 
 
 
 
 
 
502
  createToolbar: function() {
503
- var filters;
 
 
 
 
 
 
 
504
 
505
  /* for debug : trace every event triggered in the wp.media.frame * /
506
  wp.media.frame.off( 'all', mediaFrameOn );
507
  wp.media.frame.on( 'all', mediaFrameOn );
 
 
 
 
 
508
  // */
509
 
510
  // Apply the original method to create the toolbar
@@ -522,10 +669,11 @@ wp.media.frame.on( 'all', mediaFrameOn );
522
  }
523
 
524
  if ( this.options.search && mlaModal.settings.enableMonthsDropdown ) {
525
- this.toolbar.set( 'months', new wp.media.view.AttachmentFilters.MlaMonths({
 
526
  controller: this.controller,
527
  model: this.collection.props,
528
- priority: -80
529
  }).render() );
530
  }
531
 
@@ -533,7 +681,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
533
  this.toolbar.set( 'terms', new wp.media.view.AttachmentFilters.MlaTerms({
534
  controller: this.controller,
535
  model: this.collection.props,
536
- priority: -80
537
  }).render() );
538
  }
539
 
@@ -541,7 +689,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
541
  this.toolbar.set( 'termsSearch', new wp.media.view.MlaTermsSearch({
542
  controller: this.controller,
543
  model: this.collection.props,
544
- priority: -80
545
  }).render() );
546
  }
547
 
@@ -553,6 +701,12 @@ wp.media.frame.on( 'all', mediaFrameOn );
553
  model: this.collection.props,
554
  priority: 60
555
  }).render() );
 
 
 
 
 
 
556
  }
557
  }
558
  },
@@ -575,7 +729,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
575
  }
576
  }
577
  });
578
- }; // one or more MLA options enabled
579
 
580
  /**
581
  * extract value and text elements from Dropdown HTML option tags
@@ -615,7 +769,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
615
  'termsClass': 'level-0',
616
  'termsText': selectMarkup[ termId ],
617
  'termsValue': termId.toString()
618
- }
619
  }
620
 
621
  if ( termsCount === termsIndex ) {
@@ -645,7 +799,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
645
  termsOptions.termsClass[ termsIndex ] = results[ termId ].termsClass;
646
  termsOptions.termsText[ termsIndex ] = results[ termId ].termsText;
647
  termsOptions.termsValue[ termsIndex++ ] = results[ termId ].termsValue;
648
- };
649
 
650
  return termsOptions;
651
  }
@@ -653,10 +807,10 @@ wp.media.frame.on( 'all', mediaFrameOn );
653
  // Test the contents and skip the first match, the "no parent" placeholder
654
  results = regEx.exec( selectMarkup );
655
  while ( null !== ( results = regEx.exec( selectMarkup ) ) ) {
656
- termsOptions['termsClass'][termsCount] = results[3];
657
- termsOptions['termsValue'][termsCount] = ( 'undefined' === typeof results[6] ) ? results[9] : results[7];
658
- termsOptions['termsText'][termsCount++] = results[11].replace( '\&nbsp;', mlaModal.settings.termsIndent );
659
- };
660
 
661
  return termsOptions;
662
  };
@@ -876,7 +1030,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
876
  });
877
 
878
  // Update the taxonomy terms, if changed, on the server when the mouse leaves the tagsdiv area
879
- $( '.compat-field-' + taxonomy + ' td', context ).on( "mouseleave", function( event ) {
880
  var query, tableData = this,
881
  oldTerms = mlaModal.utility.arrayCleanup( $( '.server-tags', tableData ).val() ),
882
  termList = mlaModal.utility.arrayCleanup( $( '.the-tags', tableData ).val() );
@@ -941,7 +1095,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
941
  wp.media.view.AttachmentCompat.__super__.initialize.apply( this, arguments );
942
 
943
  // Hook the 'ready' event when the sidebar has been rendered so we can add our enhancements
944
- this.on( 'ready', function( event ) {
945
  mlaModal.utility.hookCompatTaxonomies( this.model.get('id'), this.el );
946
  });
947
  }
@@ -959,12 +1113,12 @@ wp.media.frame.on( 'all', mediaFrameOn );
959
  wp.media.model.Selection.__super__.initialize.apply( this, arguments );
960
 
961
  // Hook the 'selection:reset' event so we can add our enhancements when it's done
962
- this.on( 'selection:reset', function( model ) {
963
  mlaModal.cid = null;
964
  });
965
 
966
  // Hook the 'selection:unsingle' event so we can add our enhancements when it's done
967
- this.on( 'selection:unsingle', function( model ) {
968
  mlaModal.cid = null;
969
  });
970
 
@@ -974,17 +1128,34 @@ wp.media.frame.on( 'all', mediaFrameOn );
974
  });
975
 
976
  // Hook the 'change:uploading' event so we can add our enhancements when it's done
977
- this.on( 'change:uploading', function( model ) {
978
  mlaModal.uploading = true;
979
  });
980
 
981
  // Hook the 'change' event when the sidebar has been rendered so we can add our enhancements
982
  this.on( 'change', function( model ) {
 
 
983
  if ( mlaModal.uploading && mlaModal.cid === model.cid ) {
984
- var mediaFrame = wp.media.editor.get('content'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
985
  compat = mediaFrame.content.get('compat');
986
  mlaModal.utility.hookCompatTaxonomies( model.get('id'), compat.sidebar.$el );
987
- mlaModal.uploading = false;
988
  }
989
  });
990
  }
@@ -995,29 +1166,73 @@ wp.media.frame.on( 'all', mediaFrameOn );
995
  * Install the "click to expand" handler for MLA Searchable Taxonomy Meta Boxes
996
  */
997
  mlaModal.utility.hookCompatTaxonomies = function( attachmentId, context ) {
998
- var taxonomy;
999
 
1000
- if ( mlaModal.settings.enableDetailsCategory ) {
1001
- $('.mla-taxonomy-field .categorydiv', context ).each( function(){
1002
- taxonomy = mlaModal.utility.parseTaxonomyId( $(this).attr('id') );
1003
 
 
1004
  // Load the taxonomy checklists on first expansion
1005
  $( '.compat-field-' + taxonomy + ' th', context ).click( { id: attachmentId, currentTaxonomy: taxonomy, el: context }, function( event ) {
1006
  mlaModal.utility.fillCompatTaxonomies( event.data );
1007
  });
1008
- });
1009
- } // enableDetailsCategory
 
 
 
 
 
 
 
1010
 
1011
- if ( mlaModal.settings.enableDetailsTag ) {
1012
- $('.mla-taxonomy-field .tagsdiv', context ).each( function(){
1013
- taxonomy = mlaModal.utility.parseTaxonomyId( $(this).attr('id') );
 
 
 
 
 
 
 
 
 
 
 
 
1014
 
 
1015
  // Load the taxonomy checklists on first expansion
1016
  $( '.compat-field-' + taxonomy + ' th', context ).click( { id: attachmentId, currentTaxonomy: taxonomy, el: context }, function( event ) {
1017
  mlaModal.utility.fillCompatTaxonomies( event.data );
1018
  });
1019
- });
1020
- } // enableDetailsTag
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1021
  };
1022
 
1023
  /**
@@ -1026,39 +1241,34 @@ wp.media.frame.on( 'all', mediaFrameOn );
1026
  mlaModal.utility.fillCompatTaxonomies = function( data ) {
1027
  var context = data.el, query = [], taxonomy, fieldClass;
1028
 
1029
- if ( mlaModal.settings.enableDetailsCategory ) {
1030
- $('.mla-taxonomy-field .categorydiv', context ).each( function(){
1031
- taxonomy = mlaModal.utility.parseTaxonomyId( $(this).attr('id') );
1032
- query[ query.length ] = taxonomy;
1033
- fieldClass = '.compat-field-' + taxonomy;
1034
 
1035
- // Save the initial markup for when we change attachments
1036
- if ( "undefined" === typeof( mlaModal.initialHTML[ taxonomy ] ) ) {
1037
- mlaModal.initialHTML[ taxonomy ] = $( fieldClass, context ).html();
1038
- } else {
1039
- $( fieldClass, context ).html( mlaModal.initialHTML[ taxonomy ] );
1040
- }
1041
-
1042
- $( fieldClass + ' .categorydiv', context ).html( mlaModal.strings.loadingText );
1043
- });
1044
- } // mlaModal.settings.enableDetailsCategory
1045
 
1046
- if ( mlaModal.settings.enableDetailsTag ) {
1047
- $( '.mla-taxonomy-field .tagsdiv', context ).each( function(){
1048
- taxonomy = mlaModal.utility.parseTaxonomyId( $(this).attr('id') );
1049
- query[ query.length ] = taxonomy;
1050
- fieldClass = '.compat-field-' + taxonomy;
1051
 
1052
- if ( "undefined" === typeof( mlaModal.initialHTML[ taxonomy ] ) ) {
1053
- mlaModal.initialHTML[ taxonomy ] = $( fieldClass, context ).html();
1054
- } else {
1055
- $( fieldClass, context ).html( mlaModal.initialHTML[ taxonomy ] );
1056
- }
1057
 
1058
- $( fieldClass + ' .tagsdiv', context ).html( mlaModal.strings.loadingText );
1059
- });
1060
- } // mlaModal.settings.enableDetailsTag
 
 
1061
 
 
 
1062
 
1063
  if ( query.length ) {
1064
  /**
@@ -1121,10 +1331,10 @@ wp.media.frame.on( 'all', mediaFrameOn );
1121
  });
1122
 
1123
  // Update the taxonomy terms, if changed, on the server when the mouse leaves the checklist area
1124
- thisJQuery.on( "mouseleave", function( event ) {
1125
  var query, oldTerms, termList = [], checked = thisJQuery.find( taxonomyIdPrefix + '-checklist input:checked' );
1126
 
1127
- checked.each( function( index ) {
1128
  termList[ termList.length ] = $(this).val();
1129
  });
1130
 
@@ -1289,7 +1499,7 @@ wp.media.frame.on( 'all', mediaFrameOn );
1289
  } );
1290
 
1291
  thisJQuery.find( taxonomySearchIdSelector ).keyup( function( event ){
1292
- var searchValue, matchingTerms, matchingTermsPopular;
1293
 
1294
  // keyup happens after keypress; change the focus if the text box has been closed
1295
  if( 13 === event.keyCode ) {
@@ -1298,9 +1508,9 @@ wp.media.frame.on( 'all', mediaFrameOn );
1298
  return;
1299
  }
1300
 
1301
- searchValue = thisJQuery.find( taxonomySearchIdSelector ).val(),
1302
- termList = thisJQuery.find( taxonomyIdPrefix + '-checklist li' );
1303
- termListPopular = thisJQuery.find( taxonomyIdPrefix + '-checklist-pop li' );
1304
 
1305
  if ( 0 < searchValue.length ) {
1306
  termList.hide();
1
  // uses Global ajaxurl
2
 
3
+ var wp, wpAjax, ajaxurl, jQuery, _,
4
+ getUserSetting, setUserSetting, deleteUserSetting,
5
+ mlaTaxonomy,
6
+ mlaModal = {
7
+ // Properties
8
+ strings: {},
9
+ settings: {},
10
+ initialHTML: {},
11
+ uploading: false,
12
+ cid: null,
13
+
14
+ // Utility functions
15
+ utility: {
16
+ originalMediaAjax: null,
17
+ mlaAttachmentsBrowser: null,
18
+ parseTermsOptions: null,
19
+ arrayCleanup: null,
20
+ parseTaxonomyId: null,
21
+ hookCompatTaxonomies: null,
22
+ fillCompatTaxonomies: null,
23
+ supportCompatTaxonomies: null
24
+ },
25
+
26
+ // Components
27
+ tagBox: null
28
+ };
29
 
30
  (function($){
31
  /* for debug : trace every event triggered in the MediaFrame controller * /
32
  var originalMediaFrameTrigger = wp.media.view.MediaFrame.prototype.trigger;
33
  wp.media.view.MediaFrame.prototype.trigger = function(){
34
+ //console.log('MediaFrame Event: ', arguments[0]);
35
  originalMediaFrameTrigger.apply(this, Array.prototype.slice.call(arguments));
36
  } // */
37
 
38
  /* for debug : trace every event triggered in the view.Attachment controller * /
39
  var originalAttachmentTrigger = wp.media.view.Attachment.prototype.trigger;
40
  wp.media.view.Attachment.prototype.trigger = function(){
41
+ //console.log('view.Attachment Event: ', arguments[0]);
42
  originalAttachmentTrigger.apply(this, Array.prototype.slice.call(arguments));
43
  } // */
44
 
45
  /* for debug : trace every event triggered in the model.Attachment controller * /
46
  var originalModelAttachmentTrigger = wp.media.model.Attachment.prototype.trigger;
47
  wp.media.model.Attachment.prototype.trigger = function(){
48
+ //console.log('model.Attachment Event: ', arguments[0]);
49
  originalModelAttachmentTrigger.apply(this, Array.prototype.slice.call(arguments));
50
  } // */
51
 
52
  /* for debug : trace every event triggered in the view.AttachmentCompat controller * /
53
  var originalAttachmentCompatTrigger = wp.media.view.AttachmentCompat.prototype.trigger;
54
  wp.media.view.AttachmentCompat.prototype.trigger = function(){
55
+ //console.log('view.AttachmentCompat Event: ', arguments[0]);
56
 
57
  originalAttachmentCompatTrigger.apply(this, Array.prototype.slice.call(arguments));
58
  } // */
60
  /* for debug : trace every event triggered in the model.Selection controller * /
61
  var originalModelSelectionTrigger = wp.media.model.Selection.prototype.trigger;
62
  wp.media.model.Selection.prototype.trigger = function(){
63
+ //console.log('model.Selection Event: ', arguments[0]);
64
 
65
  originalModelSelectionTrigger.apply(this, Array.prototype.slice.call(arguments));
66
  } // */
68
  /* for debug : trace every invocation of the media.post method * /
69
  var originalMediaPost = media.post;
70
  media.post = function( action, data ) {
71
+ //console.log('media.post action: ', action );
72
+ //console.log('media.post data: ', JSON.stringify( data ) );
73
 
74
  return originalMediaPost.apply(this, Array.prototype.slice.call(arguments));
75
  }; // */
77
  /* for debug : trace every invocation of the wp.ajax.send function * /
78
  var originalWpAjaxSend = wp.ajax.send;
79
  wp.ajax.send = function( action, data ) {
80
+ //console.log('wp.ajax.send action: ', JSON.stringify( action ) );
81
+ //console.log('wp.ajax.send data: ', JSON.stringify( data ) );
82
 
83
  return originalWpAjaxSend.apply(this, Array.prototype.slice.call(arguments));
84
  }; // */
85
 
86
+ /**
87
+ * Localized settings and strings
88
+ */
89
+ mlaModal.strings = typeof wp.media.view.l10n.mla_strings === 'undefined' ? {} : wp.media.view.l10n.mla_strings;
90
+ delete wp.media.view.l10n.mla_strings;
91
+
92
+ mlaModal.settings = typeof wp.media.view.settings.mla_settings === 'undefined' ? { screen: 'unknown', enableMediaGrid: false, enableMediaModal: false } : wp.media.view.settings.mla_settings;
93
+ delete wp.media.view.settings.mla_settings;
94
+
95
+ /*
96
+ * Do not proceed unless there's positive indication that the MLA enhancements
97
+ * have been enabled!
98
+ */
99
+ if ( ! ( mlaModal.settings.enableMediaGrid || mlaModal.settings.enableMediaModal ) ) {
100
+ return;
101
+ }
102
+
103
+ if ( ( 'grid' === mlaModal.settings.screen ) && false === mlaModal.settings.enableMediaGrid ) {
104
+ return;
105
+ }
106
+
107
+ if ( ( 'modal' === mlaModal.settings.screen ) && false === mlaModal.settings.enableMediaModal ) {
108
+ return;
109
+ }
110
+
111
  /*
112
  * Parse outgoing Ajax requests, look for the 'query-attachments' action and stuff
113
  * our arguments into the "s" field because MMMW only monitors that one field.
114
  */
115
  mlaModal.utility.originalMediaAjax = wp.media.ajax;
116
  wp.media.ajax = function( action, options ) {
117
+ var state = mlaModal.settings.state, query, stype, s, searchValues;
118
+
119
  if ( _.isObject( action ) ) {
120
  options = action;
121
  } else {
124
  }
125
 
126
  if ( 'query-attachments' == options.data.action ) {
127
+ query = options.data.query;
128
+ stype = typeof query.s;
129
  if ( 'object' == stype )
130
+ s = query.s;
131
  else if ( 'string' == stype )
132
+ s = { 'mla_search_value': query.s };
133
  else
134
+ s = { 'mla_search_value': '' };
135
 
136
+ if ( 'undefined' != typeof query.post_mime_type )
137
+ mlaModal.settings.query[state].filterMime = query.post_mime_type;
138
  else
139
+ mlaModal.settings.query[state].filterMime = 'all';
140
+
141
+ if ( 'undefined' != typeof s.mla_filter_month ){
142
+ mlaModal.settings.query[state].filterMonth = s.mla_filter_month;
143
+ } else {
144
+ if ( 'undefined' != typeof query.year ) {
145
+ // Media Grid native dateFilter
146
+ mlaModal.settings.query[state].filterMonth = ( 100 * query.year ) + ( 1 * query.monthnum ) ;
147
+ } else {
148
+ mlaModal.settings.query[state].filterMonth = 0;
149
+ }
150
+ }
151
 
152
  if ( 'undefined' != typeof s.mla_filter_term )
153
+ mlaModal.settings.query[state].filterTerm = s.mla_filter_term;
154
 
155
  if ( 'undefined' != typeof s.mla_search_value )
156
+ mlaModal.settings.query[state].searchValue = s.mla_search_value;
157
 
158
  searchValues = {
159
+ 'mla_filter_month': mlaModal.settings.query[state].filterMonth,
160
+ 'mla_filter_term': mlaModal.settings.query[state].filterTerm,
161
+ 'mla_terms_search': mlaModal.settings.query[state].termsSearch,
162
+ 'mla_search_clicks': mlaModal.settings.query[state].searchClicks,
163
+ 'mla_search_value': mlaModal.settings.query[state].searchValue,
164
+ 'mla_search_fields': mlaModal.settings.query[state].searchFields,
165
+ 'mla_search_connector': mlaModal.settings.query[state].searchConnector };
166
 
167
  //Terms Search is not sticky
168
+ mlaModal.settings.query[state].termsSearch = '';
169
  $( '#mla-terms-search-input' ).html( '' ).val( '' );
170
 
171
  options.data.query.s = searchValues;
174
  return mlaModal.utility.originalMediaAjax.call(this, options );
175
  }; // wp.media.ajax
176
 
 
 
 
 
 
 
 
 
 
177
  /**
178
  * Extended Filters dropdown with more mimeTypes
179
  */
180
  if ( mlaModal.settings.enableMimeTypes ) {
181
  wp.media.view.AttachmentFilters.Mla = wp.media.view.AttachmentFilters.extend({
182
  createFilters: function() {
183
+ var state = this.controller._state,
184
+ filters = {};
185
 
186
  _.each( mlaModal.settings.mimeTypes || {}, function( text, key ) {
187
+ if ( ( 'grid' === mlaModal.settings.screen ) || ( 'trash' !== key ) ) {
188
+ filters[ key ] = {
189
+ text: text,
190
+ props: {
191
+ type: key,
192
+ uploadedTo: null,
193
+ orderby: 'date',
194
+ order: 'DESC'
195
+ }
196
+ };
197
+ }
198
  });
199
 
200
  filters.all = {
208
  priority: 10
209
  };
210
 
211
+ if ( wp.media.view.settings.post.id ) {
212
+ filters.uploaded = {
213
+ text: wp.media.view.l10n.uploadedToThisPost,
214
+ props: {
215
+ type: null,
216
+ uploadedTo: wp.media.view.settings.post.id,
217
+ orderby: 'menuOrder',
218
+ order: 'ASC'
219
+ },
220
+ priority: 20
221
+ };
222
+ }
223
+
224
  this.filters = filters;
225
+ if ( 'undefined' === typeof filters[ mlaModal.settings.query[state].filterMime ] ) {
226
+ mlaModal.settings.query[state].filterMime = 'all';
227
+ }
228
+
229
+ if ( mlaModal.settings.query[state].filterMime != 'all' ) {
230
+ this.model.set( filters[ mlaModal.settings.query[state].filterMime ].props, { silent: false } );
231
+ }
232
+ },
233
+
234
+ select: function() {
235
+ var state = this.controller._state,
236
+ model = this.model,
237
+ value = mlaModal.settings.query[state].filterMime,
238
+ props = model.toJSON();
239
+
240
+ if ( 'string' == typeof props.search )
241
+ mlaModal.settings.query[state].searchValue = props.search;
242
+
243
+ _.find( this.filters, function( filter, id ) {
244
+ var equal = _.all( filter.props, function( prop, key ) {
245
+ return prop === ( _.isUndefined( props[ key ] ) ? null : props[ key ] );
246
+ });
247
+
248
+ if ( equal ) {
249
+ return value = id;
250
+ }
251
+ });
252
+
253
+ this.$el.val( value );
254
  },
255
 
256
  change: function() {
257
+ var // state = this.controller._state,
258
+ filter = this.filters[ this.el.value ];
259
 
260
  if ( filter ) {
261
+ // silent because we must change the "s" prop before triggering an update
262
  this.model.set( filter.props, { silent: true } );
263
  $( '#mla-search-submit' ).click();
264
  }
265
  }
266
  });
267
+ }
268
 
269
  /**
270
  * Extended Filters dropdown with month and year selection values
274
  className: 'attachment-months',
275
 
276
  createFilters: function() {
277
+ var state = this.controller._state,
278
+ filters = {};
279
 
280
  _.each( mlaModal.settings.months || {}, function( text, key ) {
281
  filters[ key ] = {
285
  });
286
 
287
  this.filters = filters;
288
+ if ( 'undefined' === typeof filters[ mlaModal.settings.query[state].filterMonth ] ) {
289
+ mlaModal.settings.query[state].filterMonth = 0;
290
+ }
291
+
292
+ if ( mlaModal.settings.query[state].filterMonth > 0 )
293
+ this.model.set( filters[ mlaModal.settings.query[state].filterMonth ].props, { silent: false } );
294
  },
295
 
296
  select: function() {
297
+ var state = this.controller._state,
298
+ model = this.model,
299
+ value = mlaModal.settings.query[state].filterMonth,
300
  props = model.toJSON();
301
 
302
  if ( _.isUndefined( props.s ) )
303
  props.s = {};
304
 
305
  if ( 'string' == typeof props.search )
306
+ mlaModal.settings.query[state].searchValue = props.search;
307
 
308
  if (_.isUndefined( props.s.mla_filter_month ) )
309
+ props.s.mla_filter_month = mlaModal.settings.query[state].filterMonth;
310
  else
311
+ mlaModal.settings.query[state].filterMonth = props.s.mla_filter_month;
312
 
313
  _.find( this.filters, function( filter, id ) {
314
+ var equal = _.all( filter.props, function( prop ) {
315
+ return prop.mla_filter_month == mlaModal.settings.query[state].filterMonth;
316
  });
317
 
318
  if ( equal )
323
  },
324
 
325
  change: function() {
326
+ var // state = this.controller._state,
327
+ filter = this.filters[ this.el.value ], newProps;
328
 
329
  if ( filter ) {
330
+ newProps = { s: { 'mla_filter_month': filter.props.s.mla_filter_month } };
331
+ this.model.set( newProps /*, { silent: true } */ );
332
  $( '#mla-search-submit' ).click();
333
  }
334
  }
335
  });
336
+ }
337
 
338
  /**
339
  * Extended Filters dropdown with taxonomy term selection values
343
  className: 'attachment-terms',
344
 
345
  createFilters: function() {
346
+ var state = this.controller._state, index,
347
+ filters = {};
348
 
349
  _.each( mlaModal.settings.termsText || {}, function( text, key ) {
350
  filters[ key ] = {
355
 
356
  this.filters = filters;
357
  // need to translate from termsValue to the index value
358
+ index = _.indexOf( mlaModal.settings.termsValue, mlaModal.settings.query[state].filterTerm );
359
  if ( index > 0 )
360
  this.model.set( filters[ index ].props, { silent: false } );
361
  },
362
 
363
  select: function() {
364
+ var state = this.controller._state,
365
+ model = this.model,
366
+ value = mlaModal.settings.query[state].filterTerm,
367
  props = model.toJSON();
368
 
369
  if ( _.isUndefined( props.s ) )
370
  props.s = {};
371
 
372
  if ( 'string' == typeof props.search )
373
+ mlaModal.settings.query[state].searchValue = props.search;
374
 
375
  if (_.isUndefined( props.s.mla_filter_term ) )
376
+ props.s.mla_filter_term = mlaModal.settings.query[state].filterTerm;
377
  else
378
+ mlaModal.settings.query[state].filterTerm = props.s.mla_filter_term;
379
 
380
  _.find( this.filters, function( filter, id ) {
381
+ var equal = _.all( filter.props, function( prop ) {
382
+ return prop.mla_filter_term == mlaModal.settings.query[state].filterTerm;
383
  });
384
 
385
  if ( equal )
390
  },
391
 
392
  change: function() {
393
+ var // state = this.controller._state,
394
+ filter = this.filters[ this.el.value ], newProps;
395
 
396
  if ( filter ) {
397
+ newProps = { s: { 'mla_filter_term': filter.props.s.mla_filter_term } };
398
+ this.model.set( newProps /*, { silent: true } */ );
399
  $( '#mla-search-submit' ).click();
400
  }
401
  }
402
  });
403
+ }
404
 
405
  /**
406
  * Extended Terms Search activation button
450
  case 'mla_terms_search[taxonomies][]':
451
  termsSearch.taxonomies[ termsSearch.taxonomies.length ] = inputs[ inputIndex ].value;
452
  break;
453
+ }
454
  }
455
 
456
+ mlaModal.settings.query[mlaModal.settings.state].termsSearch = termsSearch;
457
  $( '#mla-search-submit' ).click();
458
  return false;
459
  });
466
  });
467
  }
468
  }
469
+ }); // wp.media.view.MlaTermsSearch
470
+ } // mlaModal.settings.enableTermsSearch
471
 
472
  /**
473
  * Extended wp.media.view.Search
483
  },
484
 
485
  events: {
486
+ 'input': 'search',
487
  'change': 'search',
488
  'click': 'search',
489
  'search': 'search',
490
  'MlaSearch': 'search'
491
  },
492
 
493
+ initialize: function() {
494
+ var state = this.controller._state;
495
+
496
+ if ( 'undefined' === typeof mlaModal.settings.query[ state ] ) {
497
+ mlaModal.settings.query[ state ] = _.clone( mlaModal.settings.query.initial );
498
+ mlaModal.settings.query[ state ].searchFields = _.clone( mlaModal.settings.query.initial.searchFields );
499
+ }
500
+ },
501
+
502
  render: function() {
503
+ var state = this.controller._state,
504
+ data = _.extend( mlaModal.strings, mlaModal.settings.query[ state ] );
505
+ this.$el.html( this.template( data ) );
506
  return this;
507
  },
508
 
509
  search: function( event ) {
510
+ var state = this.controller._state, searchValues, searchFields, index;
511
+
512
+ if ( ( 'input' == event.type ) && ( 's[mla_search_value]' == event.target.name ) ) {
513
+ mlaModal.settings.query[ state ].searchValue = event.target.value;
514
+ return;
515
+ }
516
+
517
  if ( ( 'click' == event.type ) && ( 'mla_search_submit' != event.target.name ) ) {
518
  return;
519
  }
520
 
521
  switch ( event.target.name ) {
522
  case 's[mla_search_value]':
523
+ mlaModal.settings.query[ state ].searchValue = event.target.value;
524
  break;
525
  case 'mla_search_submit':
526
  searchValues = {
527
+ 'mla_filter_month': mlaModal.settings.query[ state ].filterMonth,
528
+ 'mla_filter_term': mlaModal.settings.query[ state ].filterTerm,
529
+ 'mla_terms_search': mlaModal.settings.query[ state ].termsSearch,
530
+ 'mla_search_clicks': mlaModal.settings.query[ state ].searchClicks++,
531
+ 'mla_search_value': mlaModal.settings.query[ state ].searchValue,
532
+ 'mla_search_fields': mlaModal.settings.query[ state ].searchFields,
533
+ 'mla_search_connector': mlaModal.settings.query[ state ].searchConnector };
534
  this.model.set({ 's': searchValues });
535
  break;
536
  case 's[mla_search_connector]':
537
+ mlaModal.settings.query[ state ].searchConnector = event.target.value;
538
  break;
539
  case 's[mla_search_title]':
540
+ searchFields = mlaModal.settings.query[ state ].searchFields;
541
+ index = searchFields.indexOf( 'title' );
542
  if ( -1 == index )
543
+ searchFields.push( 'title' );
544
  else
545
+ searchFields.splice( index, 1 );
546
+
547
+ mlaModal.settings.query[ state ].searchFields = searchFields;
548
  break;
549
  case 's[mla_search_name]':
550
+ index = mlaModal.settings.query[ state ].searchFields.indexOf( 'name' );
551
  if ( -1 == index )
552
+ mlaModal.settings.query[ state ].searchFields.push( 'name' );
553
  else
554
+ mlaModal.settings.query[ state ].searchFields.splice( index, 1 );
555
  break;
556
  case 's[mla_search_alt_text]':
557
+ index = mlaModal.settings.query[ state ].searchFields.indexOf( 'alt-text' );
558
  if ( -1 == index )
559
+ mlaModal.settings.query[ state ].searchFields.push( 'alt-text' );
560
  else
561
+ mlaModal.settings.query[ state ].searchFields.splice( index, 1 );
562
  break;
563
  case 's[mla_search_excerpt]':
564
+ index = mlaModal.settings.query[ state ].searchFields.indexOf( 'excerpt' );
565
  if ( -1 == index )
566
+ mlaModal.settings.query[ state ].searchFields.push( 'excerpt' );
567
  else
568
+ mlaModal.settings.query[ state ].searchFields.splice( index, 1 );
569
  break;
570
  case 's[mla_search_content]':
571
+ index = mlaModal.settings.query[ state ].searchFields.indexOf( 'content' );
572
  if ( -1 == index )
573
+ mlaModal.settings.query[ state ].searchFields.push( 'content' );
574
  else
575
+ mlaModal.settings.query[ state ].searchFields.splice( index, 1 );
576
  break;
577
  case 's[mla_search_terms]':
578
+ index = mlaModal.settings.query[ state ].searchFields.indexOf( 'terms' );
579
  if ( -1 == index )
580
+ mlaModal.settings.query[ state ].searchFields.push( 'terms' );
581
  else
582
+ mlaModal.settings.query[ state ].searchFields.splice( index, 1 );
583
  break;
584
  }
585
  }
586
  }); // wp.media.view.MlaSearch
587
+ } else {
588
+ wp.media.view.MlaSearch = wp.media.View.extend({
589
+ tagName: 'span',
590
+ className: 'mla-simulate-search-button',
591
+ template: wp.media.template('mla-simulate-search-button'),
592
+
593
+ attributes: {
594
+ type: 'mla-simulate-search-button'
595
+ },
596
+
597
+ events: {
598
+ 'click': 'simulateSearch',
599
+ },
600
+
601
+ render: function() {
602
+ this.$el.html( this.template( mlaModal.strings ) );
603
+ return this;
604
+ },
605
+
606
+ simulateSearch: function() {
607
+ var searchValues = {
608
+ 'mla_filter_month': mlaModal.settings.query.initial.filterMonth,
609
+ 'mla_filter_term': mlaModal.settings.query.initial.filterTerm,
610
+ 'mla_terms_search': mlaModal.settings.termsSearch,
611
+ 'mla_search_clicks': mlaModal.settings.searchClicks++,
612
+ 'mla_search_value': mlaModal.settings.query.initial.searchValue,
613
+ 'mla_search_fields': mlaModal.settings.query.initial.searchFields,
614
+ 'mla_search_connector': mlaModal.settings.query.initial.searchConnector };
615
+ this.model.set({ 's': searchValues });
616
+ }
617
+ }); // Simulated search
618
+ } // mlaModal.settings.enableSearchBox
619
 
620
  /* for debug : trace every event triggered in the wp.media.frame * /
621
  function mediaFrameOn( eventName ) {
622
+ //console.log('wp.media.frame Event: ', eventName);
623
  } // */
624
 
625
  /**
627
  */
628
  if ( mlaModal.settings.enableMimeTypes || mlaModal.settings.enableMonthsDropdown || mlaModal.settings.enableTermsDropdown || mlaModal.settings.enableTermsSearch || mlaModal.settings.enableSearchBox ) {
629
  wp.media.view.AttachmentsBrowser = wp.media.view.AttachmentsBrowser.extend({
630
+ /* for debug : trace every event triggered in the wp.media.frame * /
631
+ toolbarEvent: function(eventName ) {
632
+ var id = this.model.attributes.id;
633
+ //console.log('toolbarEvent this.model.attributes: ', JSON.stringify( this.model.attributes ));
634
+ //console.log('toolbarEvent( ', id, ' ) Event: ', eventName);
635
+ }, // */
636
+
637
  createToolbar: function() {
638
+ var // id = this.model.attributes.id,
639
+ filters, state = this.controller._state;
640
+
641
+ mlaModal.settings.state = state;
642
+ if ( 'undefined' === typeof mlaModal.settings.query[ state ] ) {
643
+ mlaModal.settings.query[ state ] = _.clone( mlaModal.settings.query.initial );
644
+ mlaModal.settings.query[ state ].searchFields = _.clone( mlaModal.settings.query.initial.searchFields );
645
+ }
646
 
647
  /* for debug : trace every event triggered in the wp.media.frame * /
648
  wp.media.frame.off( 'all', mediaFrameOn );
649
  wp.media.frame.on( 'all', mediaFrameOn );
650
+ // */
651
+
652
+ /* for debug : trace every event triggered in the wp.media.frame */
653
+ //this.stopListening( wp.media.frame );
654
+ //this.listenTo( wp.media.frame, 'all', this.toolbarEvent );
655
  // */
656
 
657
  // Apply the original method to create the toolbar
669
  }
670
 
671
  if ( this.options.search && mlaModal.settings.enableMonthsDropdown ) {
672
+ this.toolbar.unset( 'dateFilter', { silent: true } );
673
+ this.toolbar.set( 'dateFilter', new wp.media.view.AttachmentFilters.MlaMonths({
674
  controller: this.controller,
675
  model: this.collection.props,
676
+ priority: -75
677
  }).render() );
678
  }
679
 
681
  this.toolbar.set( 'terms', new wp.media.view.AttachmentFilters.MlaTerms({
682
  controller: this.controller,
683
  model: this.collection.props,
684
+ priority: -50
685
  }).render() );
686
  }
687
 
689
  this.toolbar.set( 'termsSearch', new wp.media.view.MlaTermsSearch({
690
  controller: this.controller,
691
  model: this.collection.props,
692
+ priority: -50
693
  }).render() );
694
  }
695
 
701
  model: this.collection.props,
702
  priority: 60
703
  }).render() );
704
+ } else {
705
+ this.toolbar.set( 'MlaSearch', new wp.media.view.MlaSearch({
706
+ controller: this.controller,
707
+ model: this.collection.props,
708
+ priority: 70
709
+ }).render() );
710
  }
711
  }
712
  },
729
  }
730
  }
731
  });
732
+ } // one or more MLA options enabled
733
 
734
  /**
735
  * extract value and text elements from Dropdown HTML option tags
769
  'termsClass': 'level-0',
770
  'termsText': selectMarkup[ termId ],
771
  'termsValue': termId.toString()
772
+ };
773
  }
774
 
775
  if ( termsCount === termsIndex ) {
799
  termsOptions.termsClass[ termsIndex ] = results[ termId ].termsClass;
800
  termsOptions.termsText[ termsIndex ] = results[ termId ].termsText;
801
  termsOptions.termsValue[ termsIndex++ ] = results[ termId ].termsValue;
802
+ }
803
 
804
  return termsOptions;
805
  }
807
  // Test the contents and skip the first match, the "no parent" placeholder
808
  results = regEx.exec( selectMarkup );
809
  while ( null !== ( results = regEx.exec( selectMarkup ) ) ) {
810
+ termsOptions.termsClass[termsCount] = results[3];
811
+ termsOptions.termsValue[termsCount] = ( 'undefined' === typeof results[6] ) ? results[9] : results[7];
812
+ termsOptions.termsText[termsCount++] = results[11].replace( '&nbsp;', mlaModal.settings.termsIndent );
813
+ }
814
 
815
  return termsOptions;
816
  };
1030
  });
1031
 
1032
  // Update the taxonomy terms, if changed, on the server when the mouse leaves the tagsdiv area
1033
+ $( '.compat-field-' + taxonomy + ' td', context ).on( "mouseleave", function() {
1034
  var query, tableData = this,
1035
  oldTerms = mlaModal.utility.arrayCleanup( $( '.server-tags', tableData ).val() ),
1036
  termList = mlaModal.utility.arrayCleanup( $( '.the-tags', tableData ).val() );
1095
  wp.media.view.AttachmentCompat.__super__.initialize.apply( this, arguments );
1096
 
1097
  // Hook the 'ready' event when the sidebar has been rendered so we can add our enhancements
1098
+ this.on( 'ready', function() {
1099
  mlaModal.utility.hookCompatTaxonomies( this.model.get('id'), this.el );
1100
  });
1101
  }
1113
  wp.media.model.Selection.__super__.initialize.apply( this, arguments );
1114
 
1115
  // Hook the 'selection:reset' event so we can add our enhancements when it's done
1116
+ this.on( 'selection:reset', function( /* model */ ) {
1117
  mlaModal.cid = null;
1118
  });
1119
 
1120
  // Hook the 'selection:unsingle' event so we can add our enhancements when it's done
1121
+ this.on( 'selection:unsingle', function( /* model */ ) {
1122
  mlaModal.cid = null;
1123
  });
1124
 
1128
  });
1129
 
1130
  // Hook the 'change:uploading' event so we can add our enhancements when it's done
1131
+ this.on( 'change:uploading', function( /* model */ ) {
1132
  mlaModal.uploading = true;
1133
  });
1134
 
1135
  // Hook the 'change' event when the sidebar has been rendered so we can add our enhancements
1136
  this.on( 'change', function( model ) {
1137
+ var hookCompat = false, mediaFrame, compat, changed;
1138
+
1139
  if ( mlaModal.uploading && mlaModal.cid === model.cid ) {
1140
+ mlaModal.uploading = false;
1141
+ hookCompat = true;
1142
+ } else {
1143
+ // filter out trivial changes
1144
+ changed = model.changed;
1145
+ delete changed.title;
1146
+ delete changed.caption;
1147
+ delete changed.alt;
1148
+ delete changed.description;
1149
+
1150
+ if ( ! _.isEmpty( changed ) ) {
1151
+ hookCompat = true;
1152
+ }
1153
+ }
1154
+
1155
+ if ( true === hookCompat ) {
1156
+ mediaFrame = wp.media.editor.get('content');
1157
  compat = mediaFrame.content.get('compat');
1158
  mlaModal.utility.hookCompatTaxonomies( model.get('id'), compat.sidebar.$el );
 
1159
  }
1160
  });
1161
  }
1166
  * Install the "click to expand" handler for MLA Searchable Taxonomy Meta Boxes
1167
  */
1168
  mlaModal.utility.hookCompatTaxonomies = function( attachmentId, context ) {
1169
+ var taxonomy, clickTaxonomy = null;
1170
 
1171
+ $('.mla-taxonomy-field .categorydiv', context ).each( function(){
1172
+ taxonomy = mlaModal.utility.parseTaxonomyId( $(this).attr('id') );
 
1173
 
1174
+ if ( -1 != mlaModal.settings.enhancedTaxonomies.indexOf( taxonomy ) ) {
1175
  // Load the taxonomy checklists on first expansion
1176
  $( '.compat-field-' + taxonomy + ' th', context ).click( { id: attachmentId, currentTaxonomy: taxonomy, el: context }, function( event ) {
1177
  mlaModal.utility.fillCompatTaxonomies( event.data );
1178
  });
1179
+
1180
+ // Delete the default row, show the enhanced row
1181
+ $( 'tr.compat-field-' + taxonomy, context ).each( function(){
1182
+ if ( $(this).hasClass('mla-taxonomy-row') ) {
1183
+ $(this).show();
1184
+ } else {
1185
+ $(this).remove();
1186
+ }
1187
+ });
1188
 
1189
+ if ( null === clickTaxonomy ) {
1190
+ clickTaxonomy = taxonomy;
1191
+ }
1192
+ } else {
1193
+ // Delete the enhanced row
1194
+ $( 'tr.compat-field-' + taxonomy, context ).each( function(){
1195
+ if ( $(this).hasClass('mla-taxonomy-row') ) {
1196
+ $(this).remove();
1197
+ }
1198
+ });
1199
+ }
1200
+ });
1201
+
1202
+ $('.mla-taxonomy-field .tagsdiv', context ).each( function(){
1203
+ taxonomy = mlaModal.utility.parseTaxonomyId( $(this).attr('id') );
1204
 
1205
+ if ( -1 != mlaModal.settings.enhancedTaxonomies.indexOf( taxonomy ) ) {
1206
  // Load the taxonomy checklists on first expansion
1207
  $( '.compat-field-' + taxonomy + ' th', context ).click( { id: attachmentId, currentTaxonomy: taxonomy, el: context }, function( event ) {
1208
  mlaModal.utility.fillCompatTaxonomies( event.data );
1209
  });
1210
+
1211
+ // Delete the default row, show the enhanced row
1212
+ $( 'tr.compat-field-' + taxonomy, context ).each( function(){
1213
+ if ( $(this).hasClass('mla-taxonomy-row') ) {
1214
+ $(this).show();
1215
+ } else {
1216
+ $(this).remove();
1217
+ }
1218
+ });
1219
+
1220
+ if ( null === clickTaxonomy ) {
1221
+ clickTaxonomy = taxonomy;
1222
+ }
1223
+ } else {
1224
+ // Delete the enhanced row
1225
+ $( 'tr.compat-field-' + taxonomy, context ).each( function(){
1226
+ if ( $(this).hasClass('mla-taxonomy-row') ) {
1227
+ $(this).remove();
1228
+ }
1229
+ });
1230
+ }
1231
+ });
1232
+
1233
+ if ( mlaModal.settings.enableTermsAutofill && null !== clickTaxonomy ) {
1234
+ $( '.compat-field-' + clickTaxonomy + ' th', context ).click();
1235
+ }
1236
  };
1237
 
1238
  /**
1241
  mlaModal.utility.fillCompatTaxonomies = function( data ) {
1242
  var context = data.el, query = [], taxonomy, fieldClass;
1243
 
1244
+ $('.mla-taxonomy-field .categorydiv', context ).each( function(){
1245
+ taxonomy = mlaModal.utility.parseTaxonomyId( $(this).attr('id') );
1246
+ query[ query.length ] = taxonomy;
1247
+ fieldClass = '.compat-field-' + taxonomy;
 
1248
 
1249
+ // Save the initial markup for when we change attachments
1250
+ if ( "undefined" === typeof( mlaModal.initialHTML[ taxonomy ] ) ) {
1251
+ mlaModal.initialHTML[ taxonomy ] = $( fieldClass, context ).html();
1252
+ } else {
1253
+ $( fieldClass, context ).html( mlaModal.initialHTML[ taxonomy ] );
1254
+ }
 
 
 
 
1255
 
1256
+ $( fieldClass + ' .categorydiv', context ).html( mlaModal.strings.loadingText );
1257
+ });
 
 
 
1258
 
1259
+ $( '.mla-taxonomy-field .tagsdiv', context ).each( function(){
1260
+ taxonomy = mlaModal.utility.parseTaxonomyId( $(this).attr('id') );
1261
+ query[ query.length ] = taxonomy;
1262
+ fieldClass = '.compat-field-' + taxonomy;
 
1263
 
1264
+ if ( "undefined" === typeof( mlaModal.initialHTML[ taxonomy ] ) ) {
1265
+ mlaModal.initialHTML[ taxonomy ] = $( fieldClass, context ).html();
1266
+ } else {
1267
+ $( fieldClass, context ).html( mlaModal.initialHTML[ taxonomy ] );
1268
+ }
1269
 
1270
+ $( fieldClass + ' .tagsdiv', context ).html( mlaModal.strings.loadingText );
1271
+ });
1272
 
1273
  if ( query.length ) {
1274
  /**
1331
  });
1332
 
1333
  // Update the taxonomy terms, if changed, on the server when the mouse leaves the checklist area
1334
+ thisJQuery.on( "mouseleave", function() {
1335
  var query, oldTerms, termList = [], checked = thisJQuery.find( taxonomyIdPrefix + '-checklist input:checked' );
1336
 
1337
+ checked.each( function() {
1338
  termList[ termList.length ] = $(this).val();
1339
  });
1340
 
1499
  } );
1500
 
1501
  thisJQuery.find( taxonomySearchIdSelector ).keyup( function( event ){
1502
+ var searchValue, termList, termListPopular, matchingTerms, matchingTermsPopular;
1503
 
1504
  // keyup happens after keypress; change the focus if the text box has been closed
1505
  if( 13 === event.keyCode ) {
1508
  return;
1509
  }
1510
 
1511
+ searchValue = thisJQuery.find( taxonomySearchIdSelector ).val();
1512
+ termList = thisJQuery.find( taxonomyIdPrefix + '-checklist li' );
1513
+ termListPopular = thisJQuery.find( taxonomyIdPrefix + '-checklist-pop li' );
1514
 
1515
  if ( 0 < searchValue.length ) {
1516
  termList.hide();
js/mla-media-modal-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var mlaModal={strings:{},settings:{},initialHTML:{},uploading:false,cid:null,utility:{originalMediaAjax:null,mlaAttachmentsBrowser:null,parseTermsOptions:null,arrayCleanup:null,parseTaxonomyId:null,hookCompatTaxonomies:null,fillCompatTaxonomies:null,supportCompatTaxonomies:null},tagBox:null};(function(a){mlaModal.utility.originalMediaAjax=wp.media.ajax;wp.media.ajax=function(c,b){if(_.isObject(c)){b=c}else{b=b||{};b.data=_.extend(b.data||{},{action:c})}if("query-attachments"==b.data.action){stype=typeof b.data.query.s;if("object"==stype){s=b.data.query.s}else{if("string"==stype){s={mla_search_value:b.data.query.s}}else{s={}}}if("undefined"!=typeof b.data.query.post_mime_type){mlaModal.settings.filterMime=b.data.query.post_mime_type}else{mlaModal.settings.filterMime="all"}if("undefined"!=typeof s.mla_filter_month){mlaModal.settings.filterMonth=s.mla_filter_month}if("undefined"!=typeof s.mla_filter_term){mlaModal.settings.filterTerm=s.mla_filter_term}if("undefined"!=typeof s.mla_search_value){mlaModal.settings.searchValue=s.mla_search_value}searchValues={mla_filter_month:mlaModal.settings.filterMonth,mla_filter_term:mlaModal.settings.filterTerm,mla_terms_search:mlaModal.settings.termsSearch,mla_search_clicks:mlaModal.settings.searchClicks,mla_search_value:mlaModal.settings.searchValue,mla_search_fields:mlaModal.settings.searchFields,mla_search_connector:mlaModal.settings.searchConnector};mlaModal.settings.termsSearch="";a("#mla-terms-search-input").html("").val("");b.data.query.s=searchValues}return mlaModal.utility.originalMediaAjax.call(this,b)};mlaModal.strings=typeof wp.media.view.l10n.mla_strings==="undefined"?{}:wp.media.view.l10n.mla_strings;delete wp.media.view.l10n.mla_strings;mlaModal.settings=typeof wp.media.view.settings.mla_settings==="undefined"?{}:wp.media.view.settings.mla_settings;delete wp.media.view.settings.mla_settings;if(mlaModal.settings.enableMimeTypes){wp.media.view.AttachmentFilters.Mla=wp.media.view.AttachmentFilters.extend({createFilters:function(){var b={};_.each(mlaModal.settings.mimeTypes||{},function(d,c){b[c]={text:d,props:{type:c,uploadedTo:null,orderby:"date",order:"DESC"}}});b.all={text:wp.media.view.l10n.allMediaItems,props:{type:null,uploadedTo:null,orderby:"date",order:"DESC"},priority:10};b.uploaded={text:wp.media.view.l10n.uploadedToThisPost,props:{type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20};this.filters=b;if((mlaModal.settings.filterMime!="all")&&("undefined"!==typeof b[mlaModal.settings.filterMime])){this.model.set(b[mlaModal.settings.filterMime].props,{silent:false})}},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props,{silent:true});a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableMonthsDropdown){wp.media.view.AttachmentFilters.MlaMonths=wp.media.view.AttachmentFilters.extend({className:"attachment-months",createFilters:function(){var b={};_.each(mlaModal.settings.months||{},function(d,c){b[c]={text:d,props:{s:{mla_filter_month:c}}}});this.filters=b;if((mlaModal.settings.filterMonth>0)&&("undefined"!==typeof b[mlaModal.settings.filterMonth])){if(mlaModal.settings.filterMonth>0){this.model.set(b[mlaModal.settings.filterMonth].props,{silent:false})}}},select:function(){var b=this.model,d=mlaModal.settings.filterMonth,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if("string"==typeof c.search){mlaModal.settings.searchValue=c.search}if(_.isUndefined(c.s.mla_filter_month)){c.s.mla_filter_month=mlaModal.settings.filterMonth}else{mlaModal.settings.filterMonth=c.s.mla_filter_month}_.find(this.filters,function(f,g){var e=_.all(f.props,function(i,h){return i.mla_filter_month==mlaModal.settings.filterMonth});if(e){return d=g}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsDropdown){wp.media.view.AttachmentFilters.MlaTerms=wp.media.view.AttachmentFilters.extend({className:"attachment-terms",createFilters:function(){var b={};_.each(mlaModal.settings.termsText||{},function(d,c){b[c]={text:d,props:{s:{mla_filter_term:parseInt(mlaModal.settings.termsValue[c])}}}});this.filters=b;index=_.indexOf(mlaModal.settings.termsValue,mlaModal.settings.filterTerm);if(index>0){this.model.set(b[index].props,{silent:false})}},select:function(){var b=this.model,d=mlaModal.settings.filterTerm,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if("string"==typeof c.search){mlaModal.settings.searchValue=c.search}if(_.isUndefined(c.s.mla_filter_term)){c.s.mla_filter_term=mlaModal.settings.filterTerm}else{mlaModal.settings.filterTerm=c.s.mla_filter_term}_.find(this.filters,function(f,g){var e=_.all(f.props,function(i,h){return i.mla_filter_term==mlaModal.settings.filterTerm});if(e){return d=g}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsSearch){wp.media.view.MlaTermsSearch=wp.media.View.extend({tagName:"span",className:"mla-terms-search",template:wp.media.template("mla-terms-search-button"),attributes:{type:"mla-terms-search-button"},events:{change:"termsSearchOpen",click:"termsSearchOpen",},render:function(){this.$el.html(this.template(mlaModal.strings));return this},termsSearchOpen:function(b){if(("click"==b.type)&&("mla_terms_search"===b.target.name)){mlaTaxonomy.termsSearch.open();a("#mla-terms-search-form").off("submit");a("#mla-terms-search-form").submit(function(g){var c,f,d={phrases:"",taxonomies:[]};g.preventDefault();c=a("#mla-terms-search-form").serializeArray();for(f=0;f<c.length;f++){switch(c[f].name){case"mla_terms_search[phrases]":d.phrases=c[f].value;break;case"mla_terms_search[radio_phrases]":d.radio_phrases=c[f].value;break;case"mla_terms_search[radio_terms]":d.radio_terms=c[f].value;break;case"mla_terms_search[taxonomies][]":d.taxonomies[d.taxonomies.length]=c[f].value;break}}mlaModal.settings.termsSearch=d;a("#mla-search-submit").click();return false});a("#mla-terms-search-input").keypress(function(c){if(13==c.which){c.preventDefault();a("#mla-terms-search-submit").click()}})}}})}if(mlaModal.settings.enableSearchBox){wp.media.view.MlaSearch=wp.media.View.extend({tagName:"div",className:"mla-search-box",template:wp.media.template("mla-search-box"),attributes:{type:"mla-search-box"},events:{change:"search",click:"search",search:"search",MlaSearch:"search"},render:function(){this.$el.html(this.template(mlaModal.strings));return this},search:function(b){if(("click"==b.type)&&("mla_search_submit"!=b.target.name)){return}switch(b.target.name){case"s[mla_search_value]":mlaModal.settings.searchValue=b.target.value;break;case"mla_search_submit":searchValues={mla_filter_month:mlaModal.settings.filterMonth,mla_filter_term:mlaModal.settings.filterTerm,mla_terms_search:mlaModal.settings.termsSearch,mla_search_clicks:mlaModal.settings.searchClicks++,mla_search_value:mlaModal.settings.searchValue,mla_search_fields:mlaModal.settings.searchFields,mla_search_connector:mlaModal.settings.searchConnector};this.model.set({s:searchValues});break;case"s[mla_search_connector]":mlaModal.settings.searchConnector=b.target.value;break;case"s[mla_search_title]":index=mlaModal.settings.searchFields.indexOf("title");if(-1==index){mlaModal.settings.searchFields.push("title")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_name]":index=mlaModal.settings.searchFields.indexOf("name");if(-1==index){mlaModal.settings.searchFields.push("name")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_alt_text]":index=mlaModal.settings.searchFields.indexOf("alt-text");if(-1==index){mlaModal.settings.searchFields.push("alt-text")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_excerpt]":index=mlaModal.settings.searchFields.indexOf("excerpt");if(-1==index){mlaModal.settings.searchFields.push("excerpt")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_content]":index=mlaModal.settings.searchFields.indexOf("content");if(-1==index){mlaModal.settings.searchFields.push("content")}else{mlaModal.settings.searchFields.splice(index,1)}break;case"s[mla_search_terms]":index=mlaModal.settings.searchFields.indexOf("terms");if(-1==index){mlaModal.settings.searchFields.push("terms")}else{mlaModal.settings.searchFields.splice(index,1)}break}}})}if(mlaModal.settings.enableMimeTypes||mlaModal.settings.enableMonthsDropdown||mlaModal.settings.enableTermsDropdown||mlaModal.settings.enableTermsSearch||mlaModal.settings.enableSearchBox){wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){var b;wp.media.view.AttachmentsBrowser.__super__.createToolbar.apply(this,arguments);mlaModal.utility.mlaAttachmentsBrowser=this;b=this.options.filters;if(("all"===b)&&mlaModal.settings.enableMimeTypes){this.toolbar.unset("filters",{silent:true});this.toolbar.set("filters",new wp.media.view.AttachmentFilters.Mla({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableMonthsDropdown){this.toolbar.set("months",new wp.media.view.AttachmentFilters.MlaMonths({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableTermsDropdown){this.toolbar.set("terms",new wp.media.view.AttachmentFilters.MlaTerms({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableTermsSearch){this.toolbar.set("termsSearch",new wp.media.view.MlaTermsSearch({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search){if(mlaModal.settings.enableSearchBox){this.toolbar.unset("search",{silent:true});this.toolbar.set("MlaSearch",new wp.media.view.MlaSearch({controller:this.controller,model:this.collection.props,priority:60}).render())}}},updateFilters:function(b,c){var d={};if(this.options.search&&mlaModal.settings.enableTermsDropdown&&mlaModal.settings.termsTaxonomy==b){d=mlaModal.utility.parseTermsOptions(c);mlaModal.settings.termsClass=d.termsClass;mlaModal.settings.termsText=d.termsText;mlaModal.settings.termsValue=d.termsValue;this.toolbar.unset("terms",{silent:true});this.toolbar.set("terms",new wp.media.view.AttachmentFilters.MlaTerms({controller:this.controller,model:this.collection.props,priority:-80}).render())}}})}mlaModal.utility.parseTermsOptions=function(h){var g={termsClass:[mlaModal.settings.termsClass[0],mlaModal.settings.termsClass[1]],termsText:[mlaModal.settings.termsText[0],mlaModal.settings.termsText[1]],termsValue:[mlaModal.settings.termsValue[0],mlaModal.settings.termsValue[1]]},d=2,b,c,f=/\<option(( class=\"([^\"]+)\" )|( ))value=((\'([^\']+)\')|(\"([^\"]+)\"))([^\>]*)\>([^\<]*)\<.*/g,e=[];if("object"===typeof h){d=mlaModal.settings.termsValue.length;for(b=2;b<d;b++){e[b]={termsClass:mlaModal.settings.termsClass[b],termsText:mlaModal.settings.termsText[b],termsValue:mlaModal.settings.termsValue[b]};if("undefined"!==typeof h[mlaModal.settings.termsValue[b]]){delete h[mlaModal.settings.termsValue[b]]}}for(c in h){e[b++]={termsClass:"level-0",termsText:h[c],termsValue:c.toString()}}if(d===b){return{termsClass:mlaModal.settings.termsClass,termsText:mlaModal.settings.termsText,termsValue:mlaModal.settings.termsValue}}e.sort(function(j,i){if(j.termsText>i.termsText){return 1}else{if(j.termsText<i.termsText){return -1}else{return 0}}});b=2;for(c in e){g.termsClass[b]=e[c].termsClass;g.termsText[b]=e[c].termsText;g.termsValue[b++]=e[c].termsValue}return g}e=f.exec(h);while(null!==(e=f.exec(h))){g.termsClass[d]=e[3];g.termsValue[d]=("undefined"===typeof e[6])?e[9]:e[7];g.termsText[d++]=e[11].replace("&nbsp;",mlaModal.settings.termsIndent)}return g};mlaModal.utility.arrayCleanup=function(d){var c=[],b=("string"===typeof d);if(b){d=d.split(mlaModal.settings.comma)}jQuery.each(d,function(e,f){f=jQuery.trim(f);if(f&&jQuery.inArray(f,c)==-1){c.push(f)}});c.sort();if(b){c=c.join(mlaModal.settings.comma)}return c};mlaModal.utility.parseTaxonomyId=function(c){var b=c.split("-");b.shift();b.shift();return b.join("-")};mlaModal.tagBox={cleanTags:function(c){var b=mlaModal.settings.comma;if(","!==b){c=c.replace(new RegExp(b,"g"),",")}c=c.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==b){c=c.replace(/,/g,b)}return c},parseTags:function(e){var i=e.id,c=i.split("-check-num-")[1],f=a(e).closest(".tagsdiv"),h=f.find(".the-tags"),b=mlaModal.settings.comma,d=h.val().split(b),g=[];delete d[c];a.each(d,function(j,k){k=a.trim(k);if(k){g.push(k)}});h.val(this.cleanTags(g.join(b)));this.quickClicks(f);return false},quickClicks:function(d){var g=a(".the-tags",d),e=a(".tagchecklist",d),f=a(d).attr("id"),b,c;if(!g.length){return}c=g.prop("disabled");b=g.val().split(mlaModal.settings.comma);e.empty();a.each(b,function(i,k){var j,h;k=a.trim(k);if(!k){return}j=a("<span />").text(k);if(!c){h=a('<a id="'+f+"-check-num-"+i+'" class="ntdelbutton">X</a>');h.click(function(){mlaModal.tagBox.parseTags(this)});j.prepend("&nbsp;").prepend(h)}e.append(j)})},flushTags:function(h,d,c){var j,b,e,k=a(".the-tags",h),g=a("input.newtag",h),i=mlaModal.settings.comma;d=d||false;e=d?a(d).text():g.val();j=k.val();b=j?j+i+e:e;b=mlaModal.utility.arrayCleanup(this.cleanTags(b));k.val(b);this.quickClicks(h);if(!d){g.val("")}if("undefined"==typeof(c)){g.focus()}return false},getCloud:function(c,b){a.post(ajaxurl,{action:"get-tagcloud",tax:b},function(e,d){if(0===e||"success"!=d){e=wpAjax.broken}e=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+e+"</p>");a("a",e).click(function(){mlaModal.tagBox.flushTags(a(this).closest(".mla-taxonomy-field").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(f,b,d){var e,c;e=a("#mla-taxonomy-"+b,d);c=a("div.ajaxtag",e);mlaModal.tagBox.quickClicks(e);a("input.tagadd",c).click(function(){mlaModal.tagBox.flushTags(a(this).closest(".tagsdiv"))});a("input.newtag",c).keyup(function(g){if(13==g.which){mlaModal.tagBox.flushTags(e);return false}}).keypress(function(g){if(13==g.which){g.preventDefault();return false}}).each(function(){a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,resultsClass:"mla_ac_results",selectClass:"mla_ac_over",matchClass:"mla_ac_match",minchars:2,multiple:true,multipleSep:mlaModal.settings.comma+" "})});e.siblings(":first").click(function(){mlaModal.tagBox.getCloud(a("a",this).attr("id"),b);a("a",this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false});a(".compat-field-"+b+" td",d).on("mouseleave",function(i){var k,h=this,g=mlaModal.utility.arrayCleanup(a(".server-tags",h).val()),j=mlaModal.utility.arrayCleanup(a(".the-tags",h).val());if(g===j){return}a(h).css("opacity","0.5");k={id:f,};k[b]=j;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,k).done(function(m){var l,n;for(l in m){if("object"===typeof(m[l]["object-terms"])){if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(l,m[l]["object-terms"])}delete m[l]["object-terms"]}for(n in m[l]){a("#"+n,h).replaceWith(m[l][n])}}a(h).css("opacity","1.0")})});e.on("change",function(g){g.stopPropagation();return false});a(".the-tags, .server-tags .newtag",e).on("change",function(g){g.stopPropagation();return false})}};if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.view.AttachmentCompat=wp.media.view.AttachmentCompat.extend({initialize:function(){wp.media.view.AttachmentCompat.__super__.initialize.apply(this,arguments);this.on("ready",function(b){mlaModal.utility.hookCompatTaxonomies(this.model.get("id"),this.el)})}})}if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.model.Selection=wp.media.model.Selection.extend({initialize:function(){wp.media.model.Selection.__super__.initialize.apply(this,arguments);this.on("selection:reset",function(b){mlaModal.cid=null});this.on("selection:unsingle",function(b){mlaModal.cid=null});this.on("selection:single",function(b){mlaModal.cid=b.cid});this.on("change:uploading",function(b){mlaModal.uploading=true});this.on("change",function(d){if(mlaModal.uploading&&mlaModal.cid===d.cid){var b=wp.media.editor.get("content"),c=b.content.get("compat");mlaModal.utility.hookCompatTaxonomies(d.get("id"),c.sidebar.$el);mlaModal.uploading=false}})}})}mlaModal.utility.hookCompatTaxonomies=function(d,c){var b;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+b+" th",c).click({id:d,currentTaxonomy:b,el:c},function(e){mlaModal.utility.fillCompatTaxonomies(e.data)})})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+b+" th",c).click({id:d,currentTaxonomy:b,el:c},function(e){mlaModal.utility.fillCompatTaxonomies(e.data)})})}};mlaModal.utility.fillCompatTaxonomies=function(f){var c=f.el,e=[],b,d;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));e[e.length]=b;d=".compat-field-"+b;if("undefined"===typeof(mlaModal.initialHTML[b])){mlaModal.initialHTML[b]=a(d,c).html()}else{a(d,c).html(mlaModal.initialHTML[b])}a(d+" .categorydiv",c).html(mlaModal.strings.loadingText)})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));e[e.length]=b;d=".compat-field-"+b;if("undefined"===typeof(mlaModal.initialHTML[b])){mlaModal.initialHTML[b]=a(d,c).html()}else{a(d,c).html(mlaModal.initialHTML[b])}a(d+" .tagsdiv",c).html(mlaModal.strings.loadingText)})}if(e.length){wp.media.post(mlaModal.settings.ajaxFillCompatAction,{id:f.id,query:e,}).done(function(h){var g,i;for(g in h){i=".compat-field-"+g;a(i,c).html(h[g])}mlaModal.utility.supportCompatTaxonomies(f);a(".compat-field-"+f.currentTaxonomy+" td",c).show()})}};mlaModal.utility.supportCompatTaxonomies=function(d){var c=d.id,b=d.el;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",b).each(function(){var g=a(this),e,h,f,k,i,m,l,j;f=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));k=f+"_tab";i="#mla-"+f;m="#mla-new-"+f;l="#mla-search-"+f;j="#mla-attachments-"+c+"-"+f;if(f=="category"){k="cats"}g.find(".category-tabs").show();a(".compat-field-"+f+" th",b).click(function(){a(this).siblings("td").slideToggle()});g.on("mouseleave",function(p){var r,n,q=[],o=g.find(i+"-checklist input:checked");o.each(function(t){q[q.length]=a(this).val()});q.sort(function(u,t){return u-t});q=q.join(",");n=g.siblings(j).val();if(n===q){return}g.siblings(j).val(q);g.prop("disabled",true);r={id:c,};r[f]=q;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,r).done(function(u){var t,v;for(t in u){for(v in u[t]){g.find("#"+v).html(u[t][v])}}g.find(l).val("");g.find(i+"-searcher").addClass("mla-hidden-children");g.prop("disabled",false)})});g.on('change input[type="checkbox"]',function(n){n.stopPropagation();return false});g.find(i+"-tabs a").click(function(){var n=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs");g.find(i+"-tabs").siblings(".tabs-panel").hide();g.find(n).show();a(this).focus();if("#mla-"+f+"-all"==n){deleteUserSetting(k)}else{setUserSetting(k,"pop")}return false});if(getUserSetting(k)){g.find(i+'-tabs a[href="#mla-'+f+'-pop"]').click()}g.find(i+"-add-toggle").click(function(){g.find(i+"-searcher").addClass("mla-hidden-children");g.find(i+"-adder").toggleClass("mla-hidden-children");g.find(i+'-tabs a[href="#mla-'+f+'-all"]').click();g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();if(false===g.find(i+"-adder").hasClass("mla-hidden-children")){g.find(m).val("").removeClass("form-input-tip");g.find(m).focus()}return false});g.find(m).keypress(function(n){if(13===n.keyCode){n.preventDefault();g.find(i+"-add-submit").click()}});g.find(i+"-add-submit").click(function(){g.find(m).focus()});e=function(n){if(!g.find(m).val()){return false}n.data+="&"+g.find(i+"-checklist :checked").serialize();g.prop("disabled",true);return n};h=function(q,p){var o,n=g.find("#new"+f+"_parent");g.prop("disabled",false);if("undefined"!=p.parsed.responses[0]&&(o=p.parsed.responses[0].supplemental.newcat_parent)){n.before(o);n.remove();if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(f,o)}}};g.find(i+"-checklist").wpList({alt:"",response:"mla-"+f+"-ajax-response",addBefore:e,addAfter:h});g.find(i+"-checklist, "+i+"-checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var n=a(this),p=n.is(":checked"),o=n.val();if(o&&n.parents("#mla-taxonomy-"+f).length){a("#in-"+f+"-"+o+", #in-popular-"+f+"-"+o).prop("checked",p)}});a.extend(a.expr[":"],{matchTerms:function(p,o,n,q){return(p.textContent||p.innerText||"").toLowerCase().indexOf((n[3]||"").toLowerCase())>=0}});g.find(l).keypress(function(n){if(13===n.keyCode){n.preventDefault();g.find(l).val("");g.find(i+"-searcher").addClass("mla-hidden-children");g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();return}});g.find(l).keyup(function(p){var q,o,n;if(13===p.keyCode){p.preventDefault();g.find(i+"-search-toggle").focus();return}q=g.find(l).val(),termList=g.find(i+"-checklist li");termListPopular=g.find(i+"-checklist-pop li");if(0<q.length){termList.hide();termListPopular.hide()}else{termList.show();termListPopular.show()}o=g.find(i+"-checklist label:matchTerms('"+q+"')");o.closest("li").find("li").andSelf().show();o.parents(i+"-checklist li").show();n=g.find(i+"-checklist-pop label:matchTerms('"+q+"')");n.closest("li").find("li").andSelf().show();n.parents(i+"-checklist li").show()});g.find(i+"-search-toggle").click(function(){g.find(i+"-adder ").addClass("mla-hidden-children");g.find(i+"-searcher").toggleClass("mla-hidden-children");g.find(i+'-tabs a[href="#mla-'+f+'-all"]').click();g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();if(false===g.find(i+"-searcher").hasClass("mla-hidden-children")){g.find(l).val("").removeClass("form-input-tip");g.find(l).focus()}return false})})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",b).each(function(){var e=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+e+" th",b).click(function(){a(this).siblings("td").slideToggle()});mlaModal.tagBox.init(c,e,b)})}}}(jQuery));
1
+ var wp,wpAjax,ajaxurl,jQuery,_,getUserSetting,setUserSetting,deleteUserSetting,mlaTaxonomy,mlaModal={strings:{},settings:{},initialHTML:{},uploading:false,cid:null,utility:{originalMediaAjax:null,mlaAttachmentsBrowser:null,parseTermsOptions:null,arrayCleanup:null,parseTaxonomyId:null,hookCompatTaxonomies:null,fillCompatTaxonomies:null,supportCompatTaxonomies:null},tagBox:null};(function(a){mlaModal.strings=typeof wp.media.view.l10n.mla_strings==="undefined"?{}:wp.media.view.l10n.mla_strings;delete wp.media.view.l10n.mla_strings;mlaModal.settings=typeof wp.media.view.settings.mla_settings==="undefined"?{screen:"unknown",enableMediaGrid:false,enableMediaModal:false}:wp.media.view.settings.mla_settings;delete wp.media.view.settings.mla_settings;if(!(mlaModal.settings.enableMediaGrid||mlaModal.settings.enableMediaModal)){return}if(("grid"===mlaModal.settings.screen)&&false===mlaModal.settings.enableMediaGrid){return}if(("modal"===mlaModal.settings.screen)&&false===mlaModal.settings.enableMediaModal){return}mlaModal.utility.originalMediaAjax=wp.media.ajax;wp.media.ajax=function(h,d){var g=mlaModal.settings.state,f,c,e,b;if(_.isObject(h)){d=h}else{d=d||{};d.data=_.extend(d.data||{},{action:h})}if("query-attachments"==d.data.action){f=d.data.query;c=typeof f.s;if("object"==c){e=f.s}else{if("string"==c){e={mla_search_value:f.s}}else{e={mla_search_value:""}}}if("undefined"!=typeof f.post_mime_type){mlaModal.settings.query[g].filterMime=f.post_mime_type}else{mlaModal.settings.query[g].filterMime="all"}if("undefined"!=typeof e.mla_filter_month){mlaModal.settings.query[g].filterMonth=e.mla_filter_month}else{if("undefined"!=typeof f.year){mlaModal.settings.query[g].filterMonth=(100*f.year)+(1*f.monthnum)}else{mlaModal.settings.query[g].filterMonth=0}}if("undefined"!=typeof e.mla_filter_term){mlaModal.settings.query[g].filterTerm=e.mla_filter_term}if("undefined"!=typeof e.mla_search_value){mlaModal.settings.query[g].searchValue=e.mla_search_value}b={mla_filter_month:mlaModal.settings.query[g].filterMonth,mla_filter_term:mlaModal.settings.query[g].filterTerm,mla_terms_search:mlaModal.settings.query[g].termsSearch,mla_search_clicks:mlaModal.settings.query[g].searchClicks,mla_search_value:mlaModal.settings.query[g].searchValue,mla_search_fields:mlaModal.settings.query[g].searchFields,mla_search_connector:mlaModal.settings.query[g].searchConnector};mlaModal.settings.query[g].termsSearch="";a("#mla-terms-search-input").html("").val("");d.data.query.s=b}return mlaModal.utility.originalMediaAjax.call(this,d)};if(mlaModal.settings.enableMimeTypes){wp.media.view.AttachmentFilters.Mla=wp.media.view.AttachmentFilters.extend({createFilters:function(){var c=this.controller._state,b={};_.each(mlaModal.settings.mimeTypes||{},function(e,d){if(("grid"===mlaModal.settings.screen)||("trash"!==d)){b[d]={text:e,props:{type:d,uploadedTo:null,orderby:"date",order:"DESC"}}}});b.all={text:wp.media.view.l10n.allMediaItems,props:{type:null,uploadedTo:null,orderby:"date",order:"DESC"},priority:10};if(wp.media.view.settings.post.id){b.uploaded={text:wp.media.view.l10n.uploadedToThisPost,props:{type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20}}this.filters=b;if("undefined"===typeof b[mlaModal.settings.query[c].filterMime]){mlaModal.settings.query[c].filterMime="all"}if(mlaModal.settings.query[c].filterMime!="all"){this.model.set(b[mlaModal.settings.query[c].filterMime].props,{silent:false})}},select:function(){var e=this.controller._state,b=this.model,d=mlaModal.settings.query[e].filterMime,c=b.toJSON();if("string"==typeof c.search){mlaModal.settings.query[e].searchValue=c.search}_.find(this.filters,function(g,h){var f=_.all(g.props,function(j,i){return j===(_.isUndefined(c[i])?null:c[i])});if(f){return d=h}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value];if(b){this.model.set(b.props,{silent:true});a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableMonthsDropdown){wp.media.view.AttachmentFilters.MlaMonths=wp.media.view.AttachmentFilters.extend({className:"attachment-months",createFilters:function(){var c=this.controller._state,b={};_.each(mlaModal.settings.months||{},function(e,d){b[d]={text:e,props:{s:{mla_filter_month:d}}}});this.filters=b;if("undefined"===typeof b[mlaModal.settings.query[c].filterMonth]){mlaModal.settings.query[c].filterMonth=0}if(mlaModal.settings.query[c].filterMonth>0){this.model.set(b[mlaModal.settings.query[c].filterMonth].props,{silent:false})}},select:function(){var e=this.controller._state,b=this.model,d=mlaModal.settings.query[e].filterMonth,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if("string"==typeof c.search){mlaModal.settings.query[e].searchValue=c.search}if(_.isUndefined(c.s.mla_filter_month)){c.s.mla_filter_month=mlaModal.settings.query[e].filterMonth}else{mlaModal.settings.query[e].filterMonth=c.s.mla_filter_month}_.find(this.filters,function(g,h){var f=_.all(g.props,function(i){return i.mla_filter_month==mlaModal.settings.query[e].filterMonth});if(f){return d=h}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value],c;if(b){c={s:{mla_filter_month:b.props.s.mla_filter_month}};this.model.set(c);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsDropdown){wp.media.view.AttachmentFilters.MlaTerms=wp.media.view.AttachmentFilters.extend({className:"attachment-terms",createFilters:function(){var d=this.controller._state,b,c={};_.each(mlaModal.settings.termsText||{},function(f,e){c[e]={text:f,props:{s:{mla_filter_term:parseInt(mlaModal.settings.termsValue[e])}}}});this.filters=c;b=_.indexOf(mlaModal.settings.termsValue,mlaModal.settings.query[d].filterTerm);if(b>0){this.model.set(c[b].props,{silent:false})}},select:function(){var e=this.controller._state,b=this.model,d=mlaModal.settings.query[e].filterTerm,c=b.toJSON();if(_.isUndefined(c.s)){c.s={}}if("string"==typeof c.search){mlaModal.settings.query[e].searchValue=c.search}if(_.isUndefined(c.s.mla_filter_term)){c.s.mla_filter_term=mlaModal.settings.query[e].filterTerm}else{mlaModal.settings.query[e].filterTerm=c.s.mla_filter_term}_.find(this.filters,function(g,h){var f=_.all(g.props,function(i){return i.mla_filter_term==mlaModal.settings.query[e].filterTerm});if(f){return d=h}});this.$el.val(d)},change:function(){var b=this.filters[this.el.value],c;if(b){c={s:{mla_filter_term:b.props.s.mla_filter_term}};this.model.set(c);a("#mla-search-submit").click()}}})}if(mlaModal.settings.enableTermsSearch){wp.media.view.MlaTermsSearch=wp.media.View.extend({tagName:"span",className:"mla-terms-search",template:wp.media.template("mla-terms-search-button"),attributes:{type:"mla-terms-search-button"},events:{change:"termsSearchOpen",click:"termsSearchOpen",},render:function(){this.$el.html(this.template(mlaModal.strings));return this},termsSearchOpen:function(b){if(("click"==b.type)&&("mla_terms_search"===b.target.name)){mlaTaxonomy.termsSearch.open();a("#mla-terms-search-form").off("submit");a("#mla-terms-search-form").submit(function(g){var c,f,d={phrases:"",taxonomies:[]};g.preventDefault();c=a("#mla-terms-search-form").serializeArray();for(f=0;f<c.length;f++){switch(c[f].name){case"mla_terms_search[phrases]":d.phrases=c[f].value;break;case"mla_terms_search[radio_phrases]":d.radio_phrases=c[f].value;break;case"mla_terms_search[radio_terms]":d.radio_terms=c[f].value;break;case"mla_terms_search[taxonomies][]":d.taxonomies[d.taxonomies.length]=c[f].value;break}}mlaModal.settings.query[mlaModal.settings.state].termsSearch=d;a("#mla-search-submit").click();return false});a("#mla-terms-search-input").keypress(function(c){if(13==c.which){c.preventDefault();a("#mla-terms-search-submit").click()}})}}})}if(mlaModal.settings.enableSearchBox){wp.media.view.MlaSearch=wp.media.View.extend({tagName:"div",className:"mla-search-box",template:wp.media.template("mla-search-box"),attributes:{type:"mla-search-box"},events:{input:"search",change:"search",click:"search",search:"search",MlaSearch:"search"},initialize:function(){var b=this.controller._state;if("undefined"===typeof mlaModal.settings.query[b]){mlaModal.settings.query[b]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[b].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}},render:function(){var c=this.controller._state,b=_.extend(mlaModal.strings,mlaModal.settings.query[c]);this.$el.html(this.template(b));return this},search:function(d){var e=this.controller._state,b,f,c;if(("input"==d.type)&&("s[mla_search_value]"==d.target.name)){mlaModal.settings.query[e].searchValue=d.target.value;return}if(("click"==d.type)&&("mla_search_submit"!=d.target.name)){return}switch(d.target.name){case"s[mla_search_value]":mlaModal.settings.query[e].searchValue=d.target.value;break;case"mla_search_submit":b={mla_filter_month:mlaModal.settings.query[e].filterMonth,mla_filter_term:mlaModal.settings.query[e].filterTerm,mla_terms_search:mlaModal.settings.query[e].termsSearch,mla_search_clicks:mlaModal.settings.query[e].searchClicks++,mla_search_value:mlaModal.settings.query[e].searchValue,mla_search_fields:mlaModal.settings.query[e].searchFields,mla_search_connector:mlaModal.settings.query[e].searchConnector};this.model.set({s:b});break;case"s[mla_search_connector]":mlaModal.settings.query[e].searchConnector=d.target.value;break;case"s[mla_search_title]":f=mlaModal.settings.query[e].searchFields;c=f.indexOf("title");if(-1==c){f.push("title")}else{f.splice(c,1)}mlaModal.settings.query[e].searchFields=f;break;case"s[mla_search_name]":c=mlaModal.settings.query[e].searchFields.indexOf("name");if(-1==c){mlaModal.settings.query[e].searchFields.push("name")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_alt_text]":c=mlaModal.settings.query[e].searchFields.indexOf("alt-text");if(-1==c){mlaModal.settings.query[e].searchFields.push("alt-text")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_excerpt]":c=mlaModal.settings.query[e].searchFields.indexOf("excerpt");if(-1==c){mlaModal.settings.query[e].searchFields.push("excerpt")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_content]":c=mlaModal.settings.query[e].searchFields.indexOf("content");if(-1==c){mlaModal.settings.query[e].searchFields.push("content")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break;case"s[mla_search_terms]":c=mlaModal.settings.query[e].searchFields.indexOf("terms");if(-1==c){mlaModal.settings.query[e].searchFields.push("terms")}else{mlaModal.settings.query[e].searchFields.splice(c,1)}break}}})}else{wp.media.view.MlaSearch=wp.media.View.extend({tagName:"span",className:"mla-simulate-search-button",template:wp.media.template("mla-simulate-search-button"),attributes:{type:"mla-simulate-search-button"},events:{click:"simulateSearch",},render:function(){this.$el.html(this.template(mlaModal.strings));return this},simulateSearch:function(){var b={mla_filter_month:mlaModal.settings.query.initial.filterMonth,mla_filter_term:mlaModal.settings.query.initial.filterTerm,mla_terms_search:mlaModal.settings.termsSearch,mla_search_clicks:mlaModal.settings.searchClicks++,mla_search_value:mlaModal.settings.query.initial.searchValue,mla_search_fields:mlaModal.settings.query.initial.searchFields,mla_search_connector:mlaModal.settings.query.initial.searchConnector};this.model.set({s:b})}})}if(mlaModal.settings.enableMimeTypes||mlaModal.settings.enableMonthsDropdown||mlaModal.settings.enableTermsDropdown||mlaModal.settings.enableTermsSearch||mlaModal.settings.enableSearchBox){wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){var b,c=this.controller._state;mlaModal.settings.state=c;if("undefined"===typeof mlaModal.settings.query[c]){mlaModal.settings.query[c]=_.clone(mlaModal.settings.query.initial);mlaModal.settings.query[c].searchFields=_.clone(mlaModal.settings.query.initial.searchFields)}wp.media.view.AttachmentsBrowser.__super__.createToolbar.apply(this,arguments);mlaModal.utility.mlaAttachmentsBrowser=this;b=this.options.filters;if(("all"===b)&&mlaModal.settings.enableMimeTypes){this.toolbar.unset("filters",{silent:true});this.toolbar.set("filters",new wp.media.view.AttachmentFilters.Mla({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search&&mlaModal.settings.enableMonthsDropdown){this.toolbar.unset("dateFilter",{silent:true});this.toolbar.set("dateFilter",new wp.media.view.AttachmentFilters.MlaMonths({controller:this.controller,model:this.collection.props,priority:-75}).render())}if(this.options.search&&mlaModal.settings.enableTermsDropdown){this.toolbar.set("terms",new wp.media.view.AttachmentFilters.MlaTerms({controller:this.controller,model:this.collection.props,priority:-50}).render())}if(this.options.search&&mlaModal.settings.enableTermsSearch){this.toolbar.set("termsSearch",new wp.media.view.MlaTermsSearch({controller:this.controller,model:this.collection.props,priority:-50}).render())}if(this.options.search){if(mlaModal.settings.enableSearchBox){this.toolbar.unset("search",{silent:true});this.toolbar.set("MlaSearch",new wp.media.view.MlaSearch({controller:this.controller,model:this.collection.props,priority:60}).render())}else{this.toolbar.set("MlaSearch",new wp.media.view.MlaSearch({controller:this.controller,model:this.collection.props,priority:70}).render())}}},updateFilters:function(b,c){var d={};if(this.options.search&&mlaModal.settings.enableTermsDropdown&&mlaModal.settings.termsTaxonomy==b){d=mlaModal.utility.parseTermsOptions(c);mlaModal.settings.termsClass=d.termsClass;mlaModal.settings.termsText=d.termsText;mlaModal.settings.termsValue=d.termsValue;this.toolbar.unset("terms",{silent:true});this.toolbar.set("terms",new wp.media.view.AttachmentFilters.MlaTerms({controller:this.controller,model:this.collection.props,priority:-80}).render())}}})}mlaModal.utility.parseTermsOptions=function(h){var g={termsClass:[mlaModal.settings.termsClass[0],mlaModal.settings.termsClass[1]],termsText:[mlaModal.settings.termsText[0],mlaModal.settings.termsText[1]],termsValue:[mlaModal.settings.termsValue[0],mlaModal.settings.termsValue[1]]},d=2,b,c,f=/\<option(( class=\"([^\"]+)\" )|( ))value=((\'([^\']+)\')|(\"([^\"]+)\"))([^\>]*)\>([^\<]*)\<.*/g,e=[];if("object"===typeof h){d=mlaModal.settings.termsValue.length;for(b=2;b<d;b++){e[b]={termsClass:mlaModal.settings.termsClass[b],termsText:mlaModal.settings.termsText[b],termsValue:mlaModal.settings.termsValue[b]};if("undefined"!==typeof h[mlaModal.settings.termsValue[b]]){delete h[mlaModal.settings.termsValue[b]]}}for(c in h){e[b++]={termsClass:"level-0",termsText:h[c],termsValue:c.toString()}}if(d===b){return{termsClass:mlaModal.settings.termsClass,termsText:mlaModal.settings.termsText,termsValue:mlaModal.settings.termsValue}}e.sort(function(j,i){if(j.termsText>i.termsText){return 1}else{if(j.termsText<i.termsText){return -1}else{return 0}}});b=2;for(c in e){g.termsClass[b]=e[c].termsClass;g.termsText[b]=e[c].termsText;g.termsValue[b++]=e[c].termsValue}return g}e=f.exec(h);while(null!==(e=f.exec(h))){g.termsClass[d]=e[3];g.termsValue[d]=("undefined"===typeof e[6])?e[9]:e[7];g.termsText[d++]=e[11].replace("&nbsp;",mlaModal.settings.termsIndent)}return g};mlaModal.utility.arrayCleanup=function(d){var c=[],b=("string"===typeof d);if(b){d=d.split(mlaModal.settings.comma)}jQuery.each(d,function(e,f){f=jQuery.trim(f);if(f&&jQuery.inArray(f,c)==-1){c.push(f)}});c.sort();if(b){c=c.join(mlaModal.settings.comma)}return c};mlaModal.utility.parseTaxonomyId=function(c){var b=c.split("-");b.shift();b.shift();return b.join("-")};mlaModal.tagBox={cleanTags:function(c){var b=mlaModal.settings.comma;if(","!==b){c=c.replace(new RegExp(b,"g"),",")}c=c.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==b){c=c.replace(/,/g,b)}return c},parseTags:function(e){var i=e.id,c=i.split("-check-num-")[1],f=a(e).closest(".tagsdiv"),h=f.find(".the-tags"),b=mlaModal.settings.comma,d=h.val().split(b),g=[];delete d[c];a.each(d,function(j,k){k=a.trim(k);if(k){g.push(k)}});h.val(this.cleanTags(g.join(b)));this.quickClicks(f);return false},quickClicks:function(d){var g=a(".the-tags",d),e=a(".tagchecklist",d),f=a(d).attr("id"),b,c;if(!g.length){return}c=g.prop("disabled");b=g.val().split(mlaModal.settings.comma);e.empty();a.each(b,function(i,k){var j,h;k=a.trim(k);if(!k){return}j=a("<span />").text(k);if(!c){h=a('<a id="'+f+"-check-num-"+i+'" class="ntdelbutton">X</a>');h.click(function(){mlaModal.tagBox.parseTags(this)});j.prepend("&nbsp;").prepend(h)}e.append(j)})},flushTags:function(h,d,c){var j,b,e,k=a(".the-tags",h),g=a("input.newtag",h),i=mlaModal.settings.comma;d=d||false;e=d?a(d).text():g.val();j=k.val();b=j?j+i+e:e;b=mlaModal.utility.arrayCleanup(this.cleanTags(b));k.val(b);this.quickClicks(h);if(!d){g.val("")}if("undefined"==typeof(c)){g.focus()}return false},getCloud:function(c,b){a.post(ajaxurl,{action:"get-tagcloud",tax:b},function(e,d){if(0===e||"success"!=d){e=wpAjax.broken}e=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+e+"</p>");a("a",e).click(function(){mlaModal.tagBox.flushTags(a(this).closest(".mla-taxonomy-field").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(f,b,d){var e,c;e=a("#mla-taxonomy-"+b,d);c=a("div.ajaxtag",e);mlaModal.tagBox.quickClicks(e);a("input.tagadd",c).click(function(){mlaModal.tagBox.flushTags(a(this).closest(".tagsdiv"))});a("input.newtag",c).keyup(function(g){if(13==g.which){mlaModal.tagBox.flushTags(e);return false}}).keypress(function(g){if(13==g.which){g.preventDefault();return false}}).each(function(){a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+b,{delay:500,resultsClass:"mla_ac_results",selectClass:"mla_ac_over",matchClass:"mla_ac_match",minchars:2,multiple:true,multipleSep:mlaModal.settings.comma+" "})});e.siblings(":first").click(function(){mlaModal.tagBox.getCloud(a("a",this).attr("id"),b);a("a",this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false});a(".compat-field-"+b+" td",d).on("mouseleave",function(){var j,h=this,g=mlaModal.utility.arrayCleanup(a(".server-tags",h).val()),i=mlaModal.utility.arrayCleanup(a(".the-tags",h).val());if(g===i){return}a(h).css("opacity","0.5");j={id:f,};j[b]=i;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,j).done(function(l){var k,m;for(k in l){if("object"===typeof(l[k]["object-terms"])){if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(k,l[k]["object-terms"])}delete l[k]["object-terms"]}for(m in l[k]){a("#"+m,h).replaceWith(l[k][m])}}a(h).css("opacity","1.0")})});e.on("change",function(g){g.stopPropagation();return false});a(".the-tags, .server-tags .newtag",e).on("change",function(g){g.stopPropagation();return false})}};if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.view.AttachmentCompat=wp.media.view.AttachmentCompat.extend({initialize:function(){wp.media.view.AttachmentCompat.__super__.initialize.apply(this,arguments);this.on("ready",function(){mlaModal.utility.hookCompatTaxonomies(this.model.get("id"),this.el)})}})}if(mlaModal.settings.enableDetailsCategory||mlaModal.settings.enableDetailsTag){wp.media.model.Selection=wp.media.model.Selection.extend({initialize:function(){wp.media.model.Selection.__super__.initialize.apply(this,arguments);this.on("selection:reset",function(){mlaModal.cid=null});this.on("selection:unsingle",function(){mlaModal.cid=null});this.on("selection:single",function(b){mlaModal.cid=b.cid});this.on("change:uploading",function(){mlaModal.uploading=true});this.on("change",function(d){var e=false,b,c,f;if(mlaModal.uploading&&mlaModal.cid===d.cid){mlaModal.uploading=false;e=true}else{f=d.changed;delete f.title;delete f.caption;delete f.alt;delete f.description;if(!_.isEmpty(f)){e=true}}if(true===e){b=wp.media.editor.get("content");c=b.content.get("compat");mlaModal.utility.hookCompatTaxonomies(d.get("id"),c.sidebar.$el)}})}})}mlaModal.utility.hookCompatTaxonomies=function(e,c){var b,d=null;a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(b)){a(".compat-field-"+b+" th",c).click({id:e,currentTaxonomy:b,el:c},function(f){mlaModal.utility.fillCompatTaxonomies(f.data)});a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).show()}else{a(this).remove()}});if(null===d){d=b}}else{a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).remove()}})}});a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));if(-1!=mlaModal.settings.enhancedTaxonomies.indexOf(b)){a(".compat-field-"+b+" th",c).click({id:e,currentTaxonomy:b,el:c},function(f){mlaModal.utility.fillCompatTaxonomies(f.data)});a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).show()}else{a(this).remove()}});if(null===d){d=b}}else{a("tr.compat-field-"+b,c).each(function(){if(a(this).hasClass("mla-taxonomy-row")){a(this).remove()}})}});if(mlaModal.settings.enableTermsAutofill&&null!==d){a(".compat-field-"+d+" th",c).click()}};mlaModal.utility.fillCompatTaxonomies=function(f){var c=f.el,e=[],b,d;a(".mla-taxonomy-field .categorydiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));e[e.length]=b;d=".compat-field-"+b;if("undefined"===typeof(mlaModal.initialHTML[b])){mlaModal.initialHTML[b]=a(d,c).html()}else{a(d,c).html(mlaModal.initialHTML[b])}a(d+" .categorydiv",c).html(mlaModal.strings.loadingText)});a(".mla-taxonomy-field .tagsdiv",c).each(function(){b=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));e[e.length]=b;d=".compat-field-"+b;if("undefined"===typeof(mlaModal.initialHTML[b])){mlaModal.initialHTML[b]=a(d,c).html()}else{a(d,c).html(mlaModal.initialHTML[b])}a(d+" .tagsdiv",c).html(mlaModal.strings.loadingText)});if(e.length){wp.media.post(mlaModal.settings.ajaxFillCompatAction,{id:f.id,query:e,}).done(function(h){var g,i;for(g in h){i=".compat-field-"+g;a(i,c).html(h[g])}mlaModal.utility.supportCompatTaxonomies(f);a(".compat-field-"+f.currentTaxonomy+" td",c).show()})}};mlaModal.utility.supportCompatTaxonomies=function(d){var c=d.id,b=d.el;if(mlaModal.settings.enableDetailsCategory){a(".mla-taxonomy-field .categorydiv",b).each(function(){var g=a(this),e,h,f,k,i,m,l,j;f=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));k=f+"_tab";i="#mla-"+f;m="#mla-new-"+f;l="#mla-search-"+f;j="#mla-attachments-"+c+"-"+f;if(f=="category"){k="cats"}g.find(".category-tabs").show();a(".compat-field-"+f+" th",b).click(function(){a(this).siblings("td").slideToggle()});g.on("mouseleave",function(){var q,n,p=[],o=g.find(i+"-checklist input:checked");o.each(function(){p[p.length]=a(this).val()});p.sort(function(s,r){return s-r});p=p.join(",");n=g.siblings(j).val();if(n===p){return}g.siblings(j).val(p);g.prop("disabled",true);q={id:c,};q[f]=p;wp.media.post(mlaModal.settings.ajaxUpdateCompatAction,q).done(function(s){var r,t;for(r in s){for(t in s[r]){g.find("#"+t).html(s[r][t])}}g.find(l).val("");g.find(i+"-searcher").addClass("mla-hidden-children");g.prop("disabled",false)})});g.on('change input[type="checkbox"]',function(n){n.stopPropagation();return false});g.find(i+"-tabs a").click(function(){var n=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs");g.find(i+"-tabs").siblings(".tabs-panel").hide();g.find(n).show();a(this).focus();if("#mla-"+f+"-all"==n){deleteUserSetting(k)}else{setUserSetting(k,"pop")}return false});if(getUserSetting(k)){g.find(i+'-tabs a[href="#mla-'+f+'-pop"]').click()}g.find(i+"-add-toggle").click(function(){g.find(i+"-searcher").addClass("mla-hidden-children");g.find(i+"-adder").toggleClass("mla-hidden-children");g.find(i+'-tabs a[href="#mla-'+f+'-all"]').click();g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();if(false===g.find(i+"-adder").hasClass("mla-hidden-children")){g.find(m).val("").removeClass("form-input-tip");g.find(m).focus()}return false});g.find(m).keypress(function(n){if(13===n.keyCode){n.preventDefault();g.find(i+"-add-submit").click()}});g.find(i+"-add-submit").click(function(){g.find(m).focus()});e=function(n){if(!g.find(m).val()){return false}n.data+="&"+g.find(i+"-checklist :checked").serialize();g.prop("disabled",true);return n};h=function(q,p){var o,n=g.find("#new"+f+"_parent");g.prop("disabled",false);if("undefined"!=p.parsed.responses[0]&&(o=p.parsed.responses[0].supplemental.newcat_parent)){n.before(o);n.remove();if(null!==mlaModal.utility.mlaAttachmentsBrowser){mlaModal.utility.mlaAttachmentsBrowser.updateFilters(f,o)}}};g.find(i+"-checklist").wpList({alt:"",response:"mla-"+f+"-ajax-response",addBefore:e,addAfter:h});g.find(i+"-checklist, "+i+"-checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var n=a(this),p=n.is(":checked"),o=n.val();if(o&&n.parents("#mla-taxonomy-"+f).length){a("#in-"+f+"-"+o+", #in-popular-"+f+"-"+o).prop("checked",p)}});a.extend(a.expr[":"],{matchTerms:function(p,o,n,q){return(p.textContent||p.innerText||"").toLowerCase().indexOf((n[3]||"").toLowerCase())>=0}});g.find(l).keypress(function(n){if(13===n.keyCode){n.preventDefault();g.find(l).val("");g.find(i+"-searcher").addClass("mla-hidden-children");g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();return}});g.find(l).keyup(function(p){var r,q,s,o,n;if(13===p.keyCode){p.preventDefault();g.find(i+"-search-toggle").focus();return}r=g.find(l).val();q=g.find(i+"-checklist li");s=g.find(i+"-checklist-pop li");if(0<r.length){q.hide();s.hide()}else{q.show();s.show()}o=g.find(i+"-checklist label:matchTerms('"+r+"')");o.closest("li").find("li").andSelf().show();o.parents(i+"-checklist li").show();n=g.find(i+"-checklist-pop label:matchTerms('"+r+"')");n.closest("li").find("li").andSelf().show();n.parents(i+"-checklist li").show()});g.find(i+"-search-toggle").click(function(){g.find(i+"-adder ").addClass("mla-hidden-children");g.find(i+"-searcher").toggleClass("mla-hidden-children");g.find(i+'-tabs a[href="#mla-'+f+'-all"]').click();g.find(i+"-checklist li").show();g.find(i+"-checklist-pop li").show();if(false===g.find(i+"-searcher").hasClass("mla-hidden-children")){g.find(l).val("").removeClass("form-input-tip");g.find(l).focus()}return false})})}if(mlaModal.settings.enableDetailsTag){a(".mla-taxonomy-field .tagsdiv",b).each(function(){var e=mlaModal.utility.parseTaxonomyId(a(this).attr("id"));a(".compat-field-"+e+" th",b).click(function(){a(this).siblings("td").slideToggle()});mlaModal.tagBox.init(c,e,b)})}}}(jQuery));
js/mla-set-parent-scripts.js CHANGED
@@ -1,5 +1,7 @@
1
  /* global ajaxurl, mla */
2
 
 
 
3
  ( function( $ ) {
4
  /**
5
  * setParent displays a popup modal window with a post/page list
@@ -15,12 +17,12 @@
15
  });
16
 
17
  // Send setParent parent keywords for filtering
18
- $( '#mla-set-parent-search' ).click( function ( event ) {
19
  $( '#mla-set-parent-paged' ).val( 1 );
20
  mla.setParent.send();
21
  });
22
 
23
- $( '#mla-set-parent-search-div :input' ).keypress( function( event ) {
24
  if ( 13 == event.which ) {
25
  mla.setParent.send();
26
  return false;
@@ -28,13 +30,13 @@
28
  });
29
 
30
  // Send post type(s) for filtering
31
- $( '#mla-set-parent-post-type' ).change( function ( event ) {
32
  $( '#mla-set-parent-paged' ).val( 1 );
33
  mla.setParent.send();
34
  });
35
 
36
  // Pagination controls
37
- $( '#mla-set-parent-previous' ).click( function ( event ) {
38
  var paged = + $( '#mla-set-parent-paged' ).val();
39
 
40
  if ( paged > 1 ) {
@@ -46,7 +48,7 @@
46
  mla.setParent.send();
47
  });
48
 
49
- $( '#mla-set-parent-next' ).click( function ( event ) {
50
  var count = + $( '#mla-set-parent-count' ).val(),
51
  paged = + $( '#mla-set-parent-paged' ).val(),
52
  found = + $( '#mla-set-parent-found' ).val();
@@ -136,8 +138,7 @@
136
  action: 'mla_find_posts',
137
  _ajax_nonce: $('#mla-set-parent-ajax-nonce').val()
138
  },
139
- spinner = $( '#mla-set-parent-search-div .spinner' ),
140
- ajaxResponse = null;
141
 
142
  spinner.show();
143
 
@@ -167,7 +168,7 @@
167
  * See if we can "check" the current parent
168
  */
169
  id = $( '#mla-set-parent-parent' ).val();
170
- $( '#mla-set-parent-response-div #found-' + id ).each(function( index, element ){
171
  $( this ).prop( 'checked', true );
172
  });
173
  }
1
  /* global ajaxurl, mla */
2
 
3
+ var jQuery;
4
+
5
  ( function( $ ) {
6
  /**
7
  * setParent displays a popup modal window with a post/page list
17
  });
18
 
19
  // Send setParent parent keywords for filtering
20
+ $( '#mla-set-parent-search' ).click( function () {
21
  $( '#mla-set-parent-paged' ).val( 1 );
22
  mla.setParent.send();
23
  });
24
 
25
+ $( '#mla-set-parent-search-div :input' ).keypress( function() {
26
  if ( 13 == event.which ) {
27
  mla.setParent.send();
28
  return false;
30
  });
31
 
32
  // Send post type(s) for filtering
33
+ $( '#mla-set-parent-post-type' ).change( function () {
34
  $( '#mla-set-parent-paged' ).val( 1 );
35
  mla.setParent.send();
36
  });
37
 
38
  // Pagination controls
39
+ $( '#mla-set-parent-previous' ).click( function () {
40
  var paged = + $( '#mla-set-parent-paged' ).val();
41
 
42
  if ( paged > 1 ) {
48
  mla.setParent.send();
49
  });
50
 
51
+ $( '#mla-set-parent-next' ).click( function () {
52
  var count = + $( '#mla-set-parent-count' ).val(),
53
  paged = + $( '#mla-set-parent-paged' ).val(),
54
  found = + $( '#mla-set-parent-found' ).val();
138
  action: 'mla_find_posts',
139
  _ajax_nonce: $('#mla-set-parent-ajax-nonce').val()
140
  },
141
+ spinner = $( '#mla-set-parent-search-div .spinner' );
 
142
 
143
  spinner.show();
144
 
168
  * See if we can "check" the current parent
169
  */
170
  id = $( '#mla-set-parent-parent' ).val();
171
+ $( '#mla-set-parent-response-div #found-' + id ).each(function(){
172
  $( this ).prop( 'checked', true );
173
  });
174
  }
js/mla-set-parent-scripts.min.js CHANGED
@@ -1 +1 @@
1
- (function(a){mla.setParent={init:function(){a("#mla-set-parent-submit").click(function(b){if(!a('#mla-set-parent-response-div input[type="radio"]:checked').length){b.preventDefault()}});a("#mla-set-parent-search").click(function(b){a("#mla-set-parent-paged").val(1);mla.setParent.send()});a("#mla-set-parent-search-div :input").keypress(function(b){if(13==b.which){mla.setParent.send();return false}});a("#mla-set-parent-post-type").change(function(b){a("#mla-set-parent-paged").val(1);mla.setParent.send()});a("#mla-set-parent-previous").click(function(c){var b=+a("#mla-set-parent-paged").val();if(b>1){a("#mla-set-parent-paged").val(b-1)}else{a("#mla-set-parent-paged").val(1)}mla.setParent.send()});a("#mla-set-parent-next").click(function(d){var c=+a("#mla-set-parent-count").val(),b=+a("#mla-set-parent-paged").val(),e=+a("#mla-set-parent-found").val();if(e<c){a("#mla-set-parent-paged").val(1)}else{a("#mla-set-parent-paged").val(b+1)}mla.setParent.send()});a("#mla-set-parent-close-div").click(mla.setParent.close);a("#mla-set-parent-cancel").click(function(b){b.preventDefault();return mla.setParent.close()});a("#mla-set-parent-inside-div").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",true)})},open:function(e,d,b){var c=a("#mla-set-parent-overlay");if(c.length===0){a("body").append('<div id="mla-set-parent-overlay"></div>');mla.setParent.overlay()}c.show();if(e&&d){a("#mla-set-parent-parent").val(e);a("#mla-set-parent-children").val(d)}if(b){a("#mla-set-parent-titles").html(b)}if(mla.settings.useDashicons){a("#mla-set-parent-close-div").addClass("mla-set-parent-close-div-dashicons")}else{a("#mla-set-parent-close-div").html("x")}a("#mla-set-parent-div").show();a("#mla-set-parent-input ").focus().keyup(function(f){if(f.which==27){mla.setParent.close()}});mla.setParent.send();return false},close:function(){a("#mla-set-parent-input").val("");a("#mla-set-parent-post-type").val("all");a("#mla-set-parent-response-div").html("");a("#mla-set-parent-div").hide();a("#mla-set-parent-overlay").hide()},overlay:function(){a("#mla-set-parent-overlay").on("click",function(){mla.setParent.close()})},send:function(){var b={mla_set_parent_search_text:a("#mla-set-parent-input").val(),mla_set_parent_post_type:a("#mla-set-parent-post-type").val(),mla_set_parent_count:a("#mla-set-parent-count").val(),mla_set_parent_paged:a("#mla-set-parent-paged").val(),action:"mla_find_posts",_ajax_nonce:a("#mla-set-parent-ajax-nonce").val()},d=a("#mla-set-parent-search-div .spinner"),c=null;d.show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){d.hide()}).done(function(e){var f="no response.data",g=0;if(!e.success){if(e.responseData){f=e.data}a("#mla-set-parent-response-div").text(mla.settings.ajaxDoneError+" ("+f+")")}else{a("#mla-set-parent-response-div").html(e.data);a("#mla-set-parent-response-div table tbody tr:eq(0)").before(a("#found-0-row").clone());g=a("#mla-set-parent-parent").val();a("#mla-set-parent-response-div #found-"+g).each(function(h,i){a(this).prop("checked",true)})}}).fail(function(f,e){if(200==f.status){a("#mla-set-parent-response-div").text("("+e+") "+f.responseText)}else{a("#mla-set-parent-response-div").text(mla.settings.ajaxFailError+" ("+e+"), jqXHR( "+f.status+", "+f.statusText+", "+f.responseText+")")}})}};a(document).ready(function(){mla.setParent.init()})})(jQuery);
1
+ var jQuery;(function(a){mla.setParent={init:function(){a("#mla-set-parent-submit").click(function(b){if(!a('#mla-set-parent-response-div input[type="radio"]:checked').length){b.preventDefault()}});a("#mla-set-parent-search").click(function(){a("#mla-set-parent-paged").val(1);mla.setParent.send()});a("#mla-set-parent-search-div :input").keypress(function(){if(13==event.which){mla.setParent.send();return false}});a("#mla-set-parent-post-type").change(function(){a("#mla-set-parent-paged").val(1);mla.setParent.send()});a("#mla-set-parent-previous").click(function(){var b=+a("#mla-set-parent-paged").val();if(b>1){a("#mla-set-parent-paged").val(b-1)}else{a("#mla-set-parent-paged").val(1)}mla.setParent.send()});a("#mla-set-parent-next").click(function(){var c=+a("#mla-set-parent-count").val(),b=+a("#mla-set-parent-paged").val(),d=+a("#mla-set-parent-found").val();if(d<c){a("#mla-set-parent-paged").val(1)}else{a("#mla-set-parent-paged").val(b+1)}mla.setParent.send()});a("#mla-set-parent-close-div").click(mla.setParent.close);a("#mla-set-parent-cancel").click(function(b){b.preventDefault();return mla.setParent.close()});a("#mla-set-parent-inside-div").on("click","tr",function(){a(this).find(".found-radio input").prop("checked",true)})},open:function(e,d,b){var c=a("#mla-set-parent-overlay");if(c.length===0){a("body").append('<div id="mla-set-parent-overlay"></div>');mla.setParent.overlay()}c.show();if(e&&d){a("#mla-set-parent-parent").val(e);a("#mla-set-parent-children").val(d)}if(b){a("#mla-set-parent-titles").html(b)}if(mla.settings.useDashicons){a("#mla-set-parent-close-div").addClass("mla-set-parent-close-div-dashicons")}else{a("#mla-set-parent-close-div").html("x")}a("#mla-set-parent-div").show();a("#mla-set-parent-input ").focus().keyup(function(f){if(f.which==27){mla.setParent.close()}});mla.setParent.send();return false},close:function(){a("#mla-set-parent-input").val("");a("#mla-set-parent-post-type").val("all");a("#mla-set-parent-response-div").html("");a("#mla-set-parent-div").hide();a("#mla-set-parent-overlay").hide()},overlay:function(){a("#mla-set-parent-overlay").on("click",function(){mla.setParent.close()})},send:function(){var b={mla_set_parent_search_text:a("#mla-set-parent-input").val(),mla_set_parent_post_type:a("#mla-set-parent-post-type").val(),mla_set_parent_count:a("#mla-set-parent-count").val(),mla_set_parent_paged:a("#mla-set-parent-paged").val(),action:"mla_find_posts",_ajax_nonce:a("#mla-set-parent-ajax-nonce").val()},c=a("#mla-set-parent-search-div .spinner");c.show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:"json"}).always(function(){c.hide()}).done(function(d){var e="no response.data",f=0;if(!d.success){if(d.responseData){e=d.data}a("#mla-set-parent-response-div").text(mla.settings.ajaxDoneError+" ("+e+")")}else{a("#mla-set-parent-response-div").html(d.data);a("#mla-set-parent-response-div table tbody tr:eq(0)").before(a("#found-0-row").clone());f=a("#mla-set-parent-parent").val();a("#mla-set-parent-response-div #found-"+f).each(function(){a(this).prop("checked",true)})}}).fail(function(e,d){if(200==e.status){a("#mla-set-parent-response-div").text("("+d+") "+e.responseText)}else{a("#mla-set-parent-response-div").text(mla.settings.ajaxFailError+" ("+d+"), jqXHR( "+e.status+", "+e.statusText+", "+e.responseText+")")}})}};a(document).ready(function(){mla.setParent.init()})})(jQuery);
js/mla-single-edit-scripts.js CHANGED
@@ -1,6 +1,8 @@
1
  // These functions are adapted from wp-admin/js/post.js
2
 
3
- var tagBox;
 
 
4
 
5
  // return an array with any duplicate, whitespace or values removed
6
  function array_unique_noempty(a) {
@@ -87,7 +89,7 @@ function array_unique_noempty(a) {
87
  var tags = $('.the-tags', el),
88
  newtag = $('input.newtag', el),
89
  comma = mla_single_edit_vars.comma,
90
- newtags, text;
91
 
92
  text = a ? $(a).text() : newtag.val();
93
  tagsval = tags.val();
@@ -110,7 +112,7 @@ function array_unique_noempty(a) {
110
  var tax = id.substr(id.indexOf('-')+1);
111
 
112
  $.post(ajaxurl, {'action':'get-tagcloud', 'tax':tax}, function(r, stat) {
113
- if ( 0 == r || 'success' != stat )
114
  r = wpAjax.broken;
115
 
116
  r = $('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+'</p>');
@@ -139,7 +141,7 @@ function array_unique_noempty(a) {
139
  });
140
 
141
  $('input.newtag', ajaxtag).blur(function() {
142
- if ( this.value == '' )
143
  $(this).parent().siblings('.taghint').css('visibility', '');
144
  }).focus(function(){
145
  $(this).parent().siblings('.taghint').css('visibility', 'hidden');
@@ -193,7 +195,7 @@ jQuery(document).ready( function($) {
193
 
194
  // categories
195
  $('.categorydiv').each( function(){
196
- var this_id = $(this).attr('id'), noSyncChecks = false, syncChecks, catAddAfter, taxonomyParts, taxonomy, settingName;
197
 
198
  taxonomyParts = this_id.split('-');
199
  taxonomyParts.shift();
@@ -219,7 +221,7 @@ jQuery(document).ready( function($) {
219
  $('a[href="#' + taxonomy + '-pop"]', '#' + taxonomy + '-tabs').click();
220
 
221
  // Ajax Cat
222
- $('#new' + taxonomy).one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } );
223
  $('#' + taxonomy + '-add-submit').click( function(){ $('#new' + taxonomy).focus(); });
224
 
225
  syncChecks = function() {
1
  // These functions are adapted from wp-admin/js/post.js
2
 
3
+ var jQuery, wpAjax, ajaxurl, tagBox,
4
+ getUserSetting, setUserSetting, deleteUserSetting,
5
+ mla_single_edit_vars;
6
 
7
  // return an array with any duplicate, whitespace or values removed
8
  function array_unique_noempty(a) {
89
  var tags = $('.the-tags', el),
90
  newtag = $('input.newtag', el),
91
  comma = mla_single_edit_vars.comma,
92
+ tagsval, newtags, text;
93
 
94
  text = a ? $(a).text() : newtag.val();
95
  tagsval = tags.val();
112
  var tax = id.substr(id.indexOf('-')+1);
113
 
114
  $.post(ajaxurl, {'action':'get-tagcloud', 'tax':tax}, function(r, stat) {
115
+ if ( 0 === r || 'success' != stat )
116
  r = wpAjax.broken;
117
 
118
  r = $('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+'</p>');
141
  });
142
 
143
  $('input.newtag', ajaxtag).blur(function() {
144
+ if ( this.value === '' )
145
  $(this).parent().siblings('.taghint').css('visibility', '');
146
  }).focus(function(){
147
  $(this).parent().siblings('.taghint').css('visibility', 'hidden');
195
 
196
  // categories
197
  $('.categorydiv').each( function(){
198
+ var this_id = $(this).attr('id'), noSyncChecks = false, syncChecks, catAddBefore, catAddAfter, taxonomyParts, taxonomy, settingName;
199
 
200
  taxonomyParts = this_id.split('-');
201
  taxonomyParts.shift();
221
  $('a[href="#' + taxonomy + '-pop"]', '#' + taxonomy + '-tabs').click();
222
 
223
  // Ajax Cat
224
+ $('#new' + taxonomy).one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ); } );
225
  $('#' + taxonomy + '-add-submit').click( function(){ $('#new' + taxonomy).focus(); });
226
 
227
  syncChecks = function() {
js/mla-single-edit-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var tagBox;function array_unique_noempty(b){var c=[];jQuery.each(b,function(a,d){d=jQuery.trim(d);if(d&&jQuery.inArray(d,c)==-1){c.push(d)}});return c}(function(a){tagBox={clean:function(c){var b=mla_single_edit_vars.comma;if(","!==b){c=c.replace(new RegExp(b,"g"),",")}c=c.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==b){c=c.replace(/,/g,b)}return c},parseTags:function(f){var i=f.id,c=i.split("-check-num-")[1],e=a(f).closest(".tagsdiv"),h=e.find(".the-tags"),b=mla_single_edit_vars.comma,d=h.val().split(b),g=[];delete d[c];a.each(d,function(j,k){k=a.trim(k);if(k){g.push(k)}});h.val(this.clean(g.join(b)));this.quickClicks(e);return false},quickClicks:function(d){var g=a(".the-tags",d),e=a(".tagchecklist",d),f=a(d).attr("id"),b,c;if(!g.length){return}c=g.prop("disabled");b=g.val().split(mla_single_edit_vars.comma);e.empty();a.each(b,function(i,k){var j,h;k=a.trim(k);if(!k){return}j=a("<span />").text(k);if(!c){h=a('<a id="'+f+"-check-num-"+i+'" class="ntdelbutton">X</a>');h.click(function(){tagBox.parseTags(this)});j.prepend("&nbsp;").prepend(h)}e.append(j)})},flushTags:function(g,c,h){c=c||false;var d=a(".the-tags",g),j=a("input.newtag",g),b=mla_single_edit_vars.comma,e,i;i=c?a(c).text():j.val();tagsval=d.val();e=tagsval?tagsval+b+i:i;e=this.clean(e);e=array_unique_noempty(e.split(b)).join(b);d.val(e);this.quickClicks(g);if(!c){j.val("")}if("undefined"==typeof(h)){j.focus()}return false},get:function(c){var b=c.substr(c.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:b},function(e,d){if(0==e||"success"!=d){e=wpAjax.broken}e=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+e+"</p>");a("a",e).click(function(){tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)});a("input.tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))});a("div.taghint",c).click(function(){a(this).css("visibility","hidden").parent().siblings(".newtag").focus()});a("input.newtag",c).blur(function(){if(this.value==""){a(this).parent().siblings(".taghint").css("visibility","")}}).focus(function(){a(this).parent().siblings(".taghint").css("visibility","hidden")}).keyup(function(d){if(13==d.which){tagBox.flushTags(a(this).closest(".tagsdiv"));return false}}).keypress(function(d){if(13==d.which){d.preventDefault();return false}}).each(function(){var d=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+d,{delay:500,minchars:2,multiple:true,multipleSep:mla_single_edit_vars.comma+" "})});a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});a("a.tagcloud-link").click(function(){tagBox.get(a(this).attr("id"));a(this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false})}}})(jQuery);jQuery(document).ready(function(a){a("#side-info-column").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}});a(".categorydiv").each(function(){var g=a(this).attr("id"),c=false,f,h,e,b,d;e=g.split("-");e.shift();b=e.join("-");d=b+"_tab";a("a","#"+b+"-tabs").click(function(){var i=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs");a("#"+b+"-tabs").siblings(".tabs-panel").hide();a(i).show();if("#"+b+"-all"==i){deleteUserSetting(d)}else{setUserSetting(d,"pop")}return false});if(getUserSetting(d)){a('a[href="#'+b+'-pop"]',"#"+b+"-tabs").click()}a("#new"+b).one("focus",function(){a(this).val("").removeClass("form-input-tip")});a("#"+b+"-add-submit").click(function(){a("#new"+b).focus()});f=function(){if(c){return}c=true;var i=jQuery(this),k=i.is(":checked"),j=i.val().toString();a("#in-"+b+"-"+j+", #in-"+b+"-category-"+j).prop("checked",k);c=false};catAddBefore=function(i){if(!a("#new"+b).val()){return false}i.data+="&"+a(":checked","#"+b+"checklist").serialize();a("#"+b+"-add-submit").prop("disabled",true);return i};h=function(l,k){var j,i=a("#new"+b+"_parent");a("#"+b+"-add-submit").prop("disabled",false);if("undefined"!=k.parsed.responses[0]&&(j=k.parsed.responses[0].supplemental.newcat_parent)){i.before(j);i.remove()}};a("#"+b+"checklist").wpList({alt:"",response:b+"-ajax-response",addBefore:catAddBefore,addAfter:h});a("#"+b+"-add-toggle").click(function(){a("#"+b+"-adder").toggleClass("mla-hidden-children");a('a[href="#'+b+'-all"]',"#"+b+"-tabs").click();a("#new"+b).focus();return false});a("#"+b+"checklist li.popular-category :checkbox, #"+b+"checklist-pop :checkbox").live("click",function(){var i=a(this),k=i.is(":checked"),j=i.val();if(j&&i.parents("#taxonomy-"+b).length){a("#in-"+b+"-"+j+", #in-popular-"+b+"-"+j).prop("checked",k)}})})});
1
+ var jQuery,wpAjax,ajaxurl,tagBox,getUserSetting,setUserSetting,deleteUserSetting,mla_single_edit_vars;function array_unique_noempty(b){var c=[];jQuery.each(b,function(a,d){d=jQuery.trim(d);if(d&&jQuery.inArray(d,c)==-1){c.push(d)}});return c}(function(a){tagBox={clean:function(c){var b=mla_single_edit_vars.comma;if(","!==b){c=c.replace(new RegExp(b,"g"),",")}c=c.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==b){c=c.replace(/,/g,b)}return c},parseTags:function(f){var i=f.id,c=i.split("-check-num-")[1],e=a(f).closest(".tagsdiv"),h=e.find(".the-tags"),b=mla_single_edit_vars.comma,d=h.val().split(b),g=[];delete d[c];a.each(d,function(j,k){k=a.trim(k);if(k){g.push(k)}});h.val(this.clean(g.join(b)));this.quickClicks(e);return false},quickClicks:function(d){var g=a(".the-tags",d),e=a(".tagchecklist",d),f=a(d).attr("id"),b,c;if(!g.length){return}c=g.prop("disabled");b=g.val().split(mla_single_edit_vars.comma);e.empty();a.each(b,function(i,k){var j,h;k=a.trim(k);if(!k){return}j=a("<span />").text(k);if(!c){h=a('<a id="'+f+"-check-num-"+i+'" class="ntdelbutton">X</a>');h.click(function(){tagBox.parseTags(this)});j.prepend("&nbsp;").prepend(h)}e.append(j)})},flushTags:function(b,e,d){e=e||false;var j=a(".the-tags",b),h=a("input.newtag",b),k=mla_single_edit_vars.comma,i,c,g;g=e?a(e).text():h.val();i=j.val();c=i?i+k+g:g;c=this.clean(c);c=array_unique_noempty(c.split(k)).join(k);j.val(c);this.quickClicks(b);if(!e){h.val("")}if("undefined"==typeof(d)){h.focus()}return false},get:function(c){var b=c.substr(c.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:b},function(e,d){if(0===e||"success"!=d){e=wpAjax.broken}e=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+e+"</p>");a("a",e).click(function(){tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)});a("input.tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))});a("div.taghint",c).click(function(){a(this).css("visibility","hidden").parent().siblings(".newtag").focus()});a("input.newtag",c).blur(function(){if(this.value===""){a(this).parent().siblings(".taghint").css("visibility","")}}).focus(function(){a(this).parent().siblings(".taghint").css("visibility","hidden")}).keyup(function(d){if(13==d.which){tagBox.flushTags(a(this).closest(".tagsdiv"));return false}}).keypress(function(d){if(13==d.which){d.preventDefault();return false}}).each(function(){var d=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+d,{delay:500,minchars:2,multiple:true,multipleSep:mla_single_edit_vars.comma+" "})});a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});a("a.tagcloud-link").click(function(){tagBox.get(a(this).attr("id"));a(this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false})}}})(jQuery);jQuery(document).ready(function(a){a("#side-info-column").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}});a(".categorydiv").each(function(){var h=a(this).attr("id"),c=false,g,f,i,e,b,d;e=h.split("-");e.shift();b=e.join("-");d=b+"_tab";a("a","#"+b+"-tabs").click(function(){var j=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs");a("#"+b+"-tabs").siblings(".tabs-panel").hide();a(j).show();if("#"+b+"-all"==j){deleteUserSetting(d)}else{setUserSetting(d,"pop")}return false});if(getUserSetting(d)){a('a[href="#'+b+'-pop"]',"#"+b+"-tabs").click()}a("#new"+b).one("focus",function(){a(this).val("").removeClass("form-input-tip")});a("#"+b+"-add-submit").click(function(){a("#new"+b).focus()});g=function(){if(c){return}c=true;var j=jQuery(this),l=j.is(":checked"),k=j.val().toString();a("#in-"+b+"-"+k+", #in-"+b+"-category-"+k).prop("checked",l);c=false};f=function(j){if(!a("#new"+b).val()){return false}j.data+="&"+a(":checked","#"+b+"checklist").serialize();a("#"+b+"-add-submit").prop("disabled",true);return j};i=function(m,l){var k,j=a("#new"+b+"_parent");a("#"+b+"-add-submit").prop("disabled",false);if("undefined"!=l.parsed.responses[0]&&(k=l.parsed.responses[0].supplemental.newcat_parent)){j.before(k);j.remove()}};a("#"+b+"checklist").wpList({alt:"",response:b+"-ajax-response",addBefore:f,addAfter:i});a("#"+b+"-add-toggle").click(function(){a("#"+b+"-adder").toggleClass("mla-hidden-children");a('a[href="#'+b+'-all"]',"#"+b+"-tabs").click();a("#new"+b).focus();return false});a("#"+b+"checklist li.popular-category :checkbox, #"+b+"checklist-pop :checkbox").live("click",function(){var j=a(this),l=j.is(":checked"),k=j.val();if(k&&j.parents("#taxonomy-"+b).length){a("#in-"+b+"-"+k+", #in-popular-"+b+"-"+k).prop("checked",l)}})})});
js/mla-terms-search-scripts.js CHANGED
@@ -1,16 +1,18 @@
1
  /* global ajaxurl */
2
 
3
- var mlaTaxonomy = {
4
- // Properties
5
- settings: {},
6
-
7
- // Utility functions
8
- utility: {
9
- },
10
-
11
- // Components
12
- termsSearch: null
13
- };
 
 
14
 
15
  ( function( $ ) {
16
  /**
@@ -30,7 +32,7 @@ var mlaTaxonomy = {
30
  event.preventDefault();
31
  });
32
 
33
- $( '#mla-terms-search-submit' ).click( function( event ) {
34
  // $( '#mla-terms-search-search-div .spinner' ).show();
35
  mlaTaxonomy.termsSearch.close();
36
  });
@@ -133,7 +135,7 @@ var mlaTaxonomy = {
133
  * See if we can "check" the current parent
134
  */
135
  id = $( '#mla-terms-search-parent' ).val();
136
- $( '#mla-terms-search-response-div #found-' + id ).each(function( index, element ){
137
  $( this ).prop( 'checked', true );
138
  });
139
  }
1
  /* global ajaxurl */
2
 
3
+ var jQuery, wpAjax,
4
+ mla_terms_search_vars,
5
+ mlaTaxonomy = {
6
+ // Properties
7
+ settings: {},
8
+
9
+ // Utility functions
10
+ utility: {
11
+ },
12
+
13
+ // Components
14
+ termsSearch: null
15
+ };
16
 
17
  ( function( $ ) {
18
  /**
32
  event.preventDefault();
33
  });
34
 
35
+ $( '#mla-terms-search-submit' ).click( function() {
36
  // $( '#mla-terms-search-search-div .spinner' ).show();
37
  mlaTaxonomy.termsSearch.close();
38
  });
135
  * See if we can "check" the current parent
136
  */
137
  id = $( '#mla-terms-search-parent' ).val();
138
+ $( '#mla-terms-search-response-div #found-' + id ).each(function(){
139
  $( this ).prop( 'checked', true );
140
  });
141
  }
js/mla-terms-search-scripts.min.js CHANGED
@@ -1 +1 @@
1
- var mlaTaxonomy={settings:{},utility:{},termsSearch:null};(function(a){mlaTaxonomy.settings=typeof mla_terms_search_vars==="undefined"?{}:mla_terms_search_vars;mla_terms_search_vars=void 0;mlaTaxonomy.termsSearch={init:function(){a("#mla-terms-search-open").click(function(b){b.preventDefault()});a("#mla-terms-search-submit").click(function(b){mlaTaxonomy.termsSearch.close()});a("#mla-terms-search-close-div").click(mlaTaxonomy.termsSearch.close)},open:function(){var b=a("#mla-terms-search-overlay");if(b.length===0){a("body").append('<div id="mla-terms-search-overlay"></div>');mlaTaxonomy.termsSearch.overlay()}b.show();if(mlaTaxonomy.settings.useDashicons){a("#mla-terms-search-close-div").addClass("mla-terms-search-close-div-dashicons")}else{a("#mla-terms-search-close-div").html("x")}a("#mla-terms-search-div").show();a("#mla-terms-search-input ").focus().keyup(function(c){if(c.which==27){mlaTaxonomy.termsSearch.close()}});return false},close:function(){a("#mla-terms-search-response-div").html("");a("#mla-terms-search-div").hide();a("#mla-terms-search-overlay").hide()},overlay:function(){a("#mla-terms-search-overlay").on("click",function(){mlaTaxonomy.termsSearch.close()})},send:function(){var b={ps:a("#mla-terms-search-input").val(),action:"find_posts",_ajax_nonce:a("#mla-terms-search-ajax-nonce").val()},d=a("#mla-terms-search-search-div .spinner"),c=null;d.show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:mlaTaxonomy.settings.termsSearchDataType}).always(function(){d.hide()}).done(function(e){var f="no response.data",g=0;if("xml"===mlaTaxonomy.settings.termsSearchDataType){if("string"===typeof(e)){e={success:false,data:e}}else{c=wpAjax.parseAjaxResponse(e);if(c.errors){e={success:false,data:wpAjax.broken}}else{e={success:true,data:c.responses[0].data}}}}if(!e.success){if(e.responseData){f=e.data}a("#mla-terms-search-response-div").text(mlaTaxonomy.settings.ajaxDoneError+" ("+f+")")}else{a("#mla-terms-search-response-div").html(e.data);a("#mla-terms-search-response-div table tbody tr:eq(0)").before(a("#found-0-row").clone());g=a("#mla-terms-search-parent").val();a("#mla-terms-search-response-div #found-"+g).each(function(h,i){a(this).prop("checked",true)})}}).fail(function(f,e){if(200==f.status){a("#mla-terms-search-response-div").text("("+e+") "+f.responseText)}else{a("#mla-terms-search-response-div").text(mlaTaxonomy.settings.ajaxFailError+" ("+e+"), jqXHR( "+f.status+", "+f.statusText+", "+f.responseText+")")}})}};a(document).ready(function(){mlaTaxonomy.termsSearch.init()})})(jQuery);
1
+ var jQuery,wpAjax,mla_terms_search_vars,mlaTaxonomy={settings:{},utility:{},termsSearch:null};(function(a){mlaTaxonomy.settings=typeof mla_terms_search_vars==="undefined"?{}:mla_terms_search_vars;mla_terms_search_vars=void 0;mlaTaxonomy.termsSearch={init:function(){a("#mla-terms-search-open").click(function(b){b.preventDefault()});a("#mla-terms-search-submit").click(function(){mlaTaxonomy.termsSearch.close()});a("#mla-terms-search-close-div").click(mlaTaxonomy.termsSearch.close)},open:function(){var b=a("#mla-terms-search-overlay");if(b.length===0){a("body").append('<div id="mla-terms-search-overlay"></div>');mlaTaxonomy.termsSearch.overlay()}b.show();if(mlaTaxonomy.settings.useDashicons){a("#mla-terms-search-close-div").addClass("mla-terms-search-close-div-dashicons")}else{a("#mla-terms-search-close-div").html("x")}a("#mla-terms-search-div").show();a("#mla-terms-search-input ").focus().keyup(function(c){if(c.which==27){mlaTaxonomy.termsSearch.close()}});return false},close:function(){a("#mla-terms-search-response-div").html("");a("#mla-terms-search-div").hide();a("#mla-terms-search-overlay").hide()},overlay:function(){a("#mla-terms-search-overlay").on("click",function(){mlaTaxonomy.termsSearch.close()})},send:function(){var b={ps:a("#mla-terms-search-input").val(),action:"find_posts",_ajax_nonce:a("#mla-terms-search-ajax-nonce").val()},d=a("#mla-terms-search-search-div .spinner"),c=null;d.show();a.ajax(ajaxurl,{type:"POST",data:b,dataType:mlaTaxonomy.settings.termsSearchDataType}).always(function(){d.hide()}).done(function(e){var f="no response.data",g=0;if("xml"===mlaTaxonomy.settings.termsSearchDataType){if("string"===typeof(e)){e={success:false,data:e}}else{c=wpAjax.parseAjaxResponse(e);if(c.errors){e={success:false,data:wpAjax.broken}}else{e={success:true,data:c.responses[0].data}}}}if(!e.success){if(e.responseData){f=e.data}a("#mla-terms-search-response-div").text(mlaTaxonomy.settings.ajaxDoneError+" ("+f+")")}else{a("#mla-terms-search-response-div").html(e.data);a("#mla-terms-search-response-div table tbody tr:eq(0)").before(a("#found-0-row").clone());g=a("#mla-terms-search-parent").val();a("#mla-terms-search-response-div #found-"+g).each(function(){a(this).prop("checked",true)})}}).fail(function(f,e){if(200==f.status){a("#mla-terms-search-response-div").text("("+e+") "+f.responseText)}else{a("#mla-terms-search-response-div").text(mlaTaxonomy.settings.ajaxFailError+" ("+e+"), jqXHR( "+f.status+", "+f.statusText+", "+f.responseText+")")}})}};a(document).ready(function(){mlaTaxonomy.termsSearch.init()})})(jQuery);
languages/media-library-assistant-en_US.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Media Library Assistant\n"
4
- "POT-Creation-Date: 2014-08-15 17:04-0800\n"
5
- "PO-Revision-Date: 2014-08-15 17:04-0800\n"
6
  "Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
7
  "Language-Team: David Lingren <david@fairtradejudaica.org>\n"
8
  "Language: en_US\n"
@@ -90,7 +90,7 @@ msgstr ""
90
 
91
  #. translators: 1: function name 2: non-array value
92
  #: includes/class-mla-data.php:1256 includes/class-mla-main.php:1535
93
- #: includes/class-mla-main.php:1610 includes/class-mla-media-modal.php:1161
94
  #: includes/class-mla-mime-types.php:483
95
  #: includes/class-mla-mime-types.php:1218
96
  #: includes/class-mla-mime-types.php:2361 includes/class-mla-settings.php:1192
@@ -140,206 +140,206 @@ msgid "DEBUG: _execute_list_table_query SQL_request = \"%1$s\"."
140
  msgstr ""
141
 
142
  #. translators: 1: search filter details
143
- #: includes/class-mla-data.php:1976
144
  #, php-format
145
  msgid "mla_query_posts_search_filter not numeric, = \"%1$s\"."
146
  msgstr ""
147
 
148
  #. translators: 1: search filter details
149
- #: includes/class-mla-data.php:1979
150
  #, php-format
151
  msgctxt "error_log"
152
  msgid "DEBUG: mla_query_posts_search_filter not numeric, = \"%1$s\"."
153
  msgstr ""
154
 
155
  #. translators: 1: where filter details
156
- #: includes/class-mla-data.php:2041
157
  #, php-format
158
  msgid "mla_query_posts_where_filter = \"%1$s\"."
159
  msgstr ""
160
 
161
  #. translators: 1: where filter details
162
- #: includes/class-mla-data.php:2044
163
  #, php-format
164
  msgctxt "error_log"
165
  msgid "DEBUG: mla_query_posts_where_filter = \"%1$s\"."
166
  msgstr ""
167
 
168
  #. translators: 1: join filter details
169
- #: includes/class-mla-data.php:2095
170
  #, php-format
171
  msgid "mla_query_posts_join_filter = \"%1$s\"."
172
  msgstr ""
173
 
174
  #. translators: 1: join filter details
175
- #: includes/class-mla-data.php:2098
176
  #, php-format
177
  msgctxt "error_log"
178
  msgid "DEBUG: mla_query_posts_join_filter = \"%1$s\"."
179
  msgstr ""
180
 
181
  #. translators: 1: orderby details details
182
- #: includes/class-mla-data.php:2197
183
  #, php-format
184
  msgid "mla_query_posts_orderby_filter = \"%1$s\"."
185
  msgstr ""
186
 
187
  #. translators: 1: orderby details details
188
- #: includes/class-mla-data.php:2200
189
  #, php-format
190
  msgctxt "error_log"
191
  msgid "DEBUG: mla_query_posts_orderby_filter = \"%1$s\"."
192
  msgstr ""
193
 
194
  #. translators: 1: SQL clauses
195
- #: includes/class-mla-data.php:2236
196
  #, php-format
197
  msgid "mla_query_posts_clauses_filter = \"%1$s\"."
198
  msgstr ""
199
 
200
  #. translators: 1: SQL clauses
201
- #: includes/class-mla-data.php:2239
202
  #, php-format
203
  msgctxt "error_log"
204
  msgid "DEBUG: mla_query_posts_clauses_filter = \"%1$s\"."
205
  msgstr ""
206
 
207
  #. translators: 1: SQL clauses
208
- #: includes/class-mla-data.php:2260
209
  #, php-format
210
  msgid "mla_query_posts_clauses_request_filter = \"%1$s\"."
211
  msgstr ""
212
 
213
  #. translators: 1: SQL clauses
214
- #: includes/class-mla-data.php:2263
215
  #, php-format
216
  msgctxt "error_log"
217
  msgid "DEBUG: mla_query_posts_clauses_request_filter = \"%1$s\"."
218
  msgstr ""
219
 
220
  #. translators: 1: post ID
221
- #: includes/class-mla-data.php:2295
222
  #, php-format
223
  msgctxt "error_log"
224
  msgid "ERROR: mla_get_attachment_by_id(%1$d) not found."
225
  msgstr ""
226
 
227
  #. translators: 1: post ID 2: post_type
228
- #: includes/class-mla-data.php:2301
229
  #, php-format
230
  msgctxt "error_log"
231
  msgid "ERROR: mla_get_attachment_by_id(%1$d) wrong post_type \"%2$s\"."
232
  msgstr ""
233
 
234
- #: includes/class-mla-data.php:2854 includes/class-mla-list-table.php:830
235
  msgid "NO REFERENCE TESTS"
236
  msgstr ""
237
 
238
- #: includes/class-mla-data.php:2860 includes/class-mla-options.php:2616
239
- #: includes/class-mla-options.php:2617
240
  msgid "ORPHAN"
241
  msgstr ""
242
 
243
- #: includes/class-mla-data.php:2864
244
  msgid "UNUSED"
245
  msgstr ""
246
 
247
- #: includes/class-mla-data.php:2869
248
  msgid "UNATTACHED"
249
  msgstr ""
250
 
251
- #: includes/class-mla-data.php:2871
252
  msgid "INVALID PARENT"
253
  msgstr ""
254
 
255
  #. translators: 1: post_type, 2: post_title, 3: post ID, 4: query string, 5: error message
256
- #: includes/class-mla-data.php:3052
257
  #, php-format
258
  msgid "(%1$s) %2$s (ID %3$d) query \"%4$s\" failed, returning \"%5$s\""
259
  msgstr ""
260
 
261
  #. translators: 1: index
262
- #: includes/class-mla-data.php:3298
263
  #, php-format
264
  msgctxt "error_log"
265
  msgid "ERROR: _build_pdf_indirect_objects bad value at $index = \"%1$d\"."
266
  msgstr ""
267
 
268
  #. translators: 1: source offset 2: nest level
269
- #: includes/class-mla-data.php:3623
270
  #, php-format
271
  msgctxt "error_log"
272
  msgid "ERROR: _parse_pdf_dictionary offset = %1$d, nest = %2$d."
273
  msgstr ""
274
 
275
  #. translators: 1: dictionary excerpt
276
- #: includes/class-mla-data.php:3625
277
  #, php-format
278
  msgctxt "error_log"
279
  msgid "ERROR: _parse_pdf_dictionary no end delimiter dump = %1$s."
280
  msgstr ""
281
 
282
  #. translators: 1: entry name 2: value excerpt
283
- #: includes/class-mla-data.php:3671
284
  #, php-format
285
  msgctxt "error_log"
286
  msgid "ERROR: _parse_pdf_dictionary bad value [ %1$s ] dump = %2$s"
287
  msgstr ""
288
 
289
- #: includes/class-mla-data.php:3785
290
  msgctxt "error_log"
291
  msgid "ERROR: _parse_xmp_metadata xml_parse_into_struct failed."
292
  msgstr ""
293
 
294
- #: includes/class-mla-data.php:3788
295
  msgctxt "error_log"
296
  msgid "ERROR: _parse_xmp_metadata set option failed."
297
  msgstr ""
298
 
299
  #. translators: 1: path and file
300
- #: includes/class-mla-data.php:4145
301
  #, php-format
302
  msgctxt "error_log"
303
  msgid "ERROR: File \"%1$s\", startxref not found."
304
  msgstr ""
305
 
306
  #. translators: 1: meta_key
307
- #: includes/class-mla-data.php:5062
308
  #, php-format
309
  msgid "Deleting meta:%1$s"
310
  msgstr ""
311
 
312
  #. translators: 1: meta_key
313
- #: includes/class-mla-data.php:5065
314
  #, php-format
315
  msgid "ERROR: meta:%1$s not found"
316
  msgstr ""
317
 
318
  #. translators: 1: meta_key 2: meta_value
319
- #: includes/class-mla-data.php:5074
320
  #, php-format
321
  msgid "Adding meta:%1$s = %2$s"
322
  msgstr ""
323
 
324
  #. translators: 1: meta_key
325
- #: includes/class-mla-data.php:5078
326
  #, php-format
327
  msgid "ERROR: Adding meta:%1$s; not found"
328
  msgstr ""
329
 
330
  #. translators: 1: meta_key
331
- #: includes/class-mla-data.php:5085
332
  #, php-format
333
  msgid "Deleting Null meta:%1$s"
334
  msgstr ""
335
 
336
  #. translators: 1: element name 2: old_value 3: new_value
337
- #: includes/class-mla-data.php:5095 includes/class-mla-data.php:5246
338
- #: includes/class-mla-data.php:5307 includes/class-mla-data.php:5333
339
- #: includes/class-mla-data.php:5367 includes/class-mla-data.php:5380
340
- #: includes/class-mla-data.php:5389 includes/class-mla-data.php:5400
341
- #: includes/class-mla-data.php:5411 includes/class-mla-data.php:5424
342
- #: includes/class-mla-data.php:5433 includes/class-mla-data.php:5442
343
  #: includes/class-mla-mime-types.php:1052
344
  #: includes/class-mla-mime-types.php:2125
345
  #, php-format
@@ -347,102 +347,102 @@ msgid "Changing %1$s from \"%2$s\" to \"%3$s\""
347
  msgstr ""
348
 
349
  #. translators: 1: meta_key
350
- #: includes/class-mla-data.php:5100
351
  #, php-format
352
  msgid "ERROR: Changing meta:%1$s; not found"
353
  msgstr ""
354
 
355
  #. translators: 1: meta_key
356
- #: includes/class-mla-data.php:5160
357
  #, php-format
358
  msgid "Deleting %1$s"
359
  msgstr ""
360
 
361
  #. translators: 1: meta_key 2: new_value
362
- #: includes/class-mla-data.php:5171
363
  #, php-format
364
  msgid "Adding %1$s = [%2$s]"
365
  msgstr ""
366
 
367
  #. translators: 1: meta_key 2: meta_value
368
- #: includes/class-mla-data.php:5177
369
  #, php-format
370
  msgid "Adding %1$s = %2$s"
371
  msgstr ""
372
 
373
  #. translators: 1: meta_key
374
- #: includes/class-mla-data.php:5201
375
  #, php-format
376
  msgid "Deleting old %1$s values"
377
  msgstr ""
378
 
379
  #. translators: 1: meta_key 2: old_value 3: new_value 4: update count
380
- #: includes/class-mla-data.php:5231
381
  #, php-format
382
  msgid "Changing %1$s from \"%2$s\" to \"%3$s\"; %4$d updates"
383
  msgstr ""
384
 
385
- #: includes/class-mla-data.php:5289 includes/class-mla-main.php:1892
386
  msgid "ERROR: Could not retrieve Attachment."
387
  msgstr ""
388
 
389
- #: includes/class-mla-data.php:5307 includes/class-mla-main.php:1305
390
  #: includes/class-mla-main.php:1549 includes/class-mla-main.php:1739
391
  #: includes/class-mla-main.php:2110 includes/class-mla-objects.php:275
392
- #: includes/class-mla-options.php:992 includes/class-mla-options.php:1752
393
  #: includes/mla-main-search-box-template.php:42
394
  #: includes/mla-media-modal-js-template.php:32
395
  msgid "Title"
396
  msgstr ""
397
 
398
  #. translators: 1: old_value
399
- #: includes/class-mla-data.php:5330
400
  #, php-format
401
  msgid "ERROR: Could not change Name/Slug \"%1$s\"; name already exists"
402
  msgstr ""
403
 
404
- #: includes/class-mla-data.php:5333 includes/class-mla-main.php:1740
405
- #: includes/class-mla-main.php:2113 includes/class-mla-options.php:999
406
  msgid "Name/Slug"
407
  msgstr ""
408
 
409
  #. translators: 1: old_value
410
- #: includes/class-mla-data.php:5359
411
  #, php-format
412
  msgid "Deleting ALT Text, was \"%1$s\""
413
  msgstr ""
414
 
415
  #. translators: 1: old_value
416
- #: includes/class-mla-data.php:5362
417
  #, php-format
418
  msgid "ERROR: Could not delete ALT Text, remains \"%1$s\""
419
  msgstr ""
420
 
421
- #: includes/class-mla-data.php:5367 includes/class-mla-list-table.php:1069
422
  #: includes/class-mla-main.php:1743 includes/class-mla-main.php:2116
423
- #: includes/class-mla-options.php:1006 includes/class-mla-options.php:1758
424
  #: includes/mla-main-search-box-template.php:44
425
  #: includes/mla-media-modal-js-template.php:40
426
  msgid "ALT Text"
427
  msgstr ""
428
 
429
  #. translators: 1: old_value 2: new_value
430
- #: includes/class-mla-data.php:5370
431
  #, php-format
432
  msgid "ERROR: Could not change ALT Text from \"%1$s\" to \"%2$s\""
433
  msgstr ""
434
 
435
- #: includes/class-mla-data.php:5380 includes/class-mla-main.php:1741
436
- #: includes/class-mla-main.php:2119 includes/class-mla-options.php:1013
437
- #: includes/class-mla-options.php:1761
438
  #: includes/mla-main-search-box-template.php:45
439
  #: includes/mla-media-modal-js-template.php:45
440
  msgid "Caption"
441
  msgstr ""
442
 
443
- #: includes/class-mla-data.php:5389 includes/class-mla-main.php:1742
444
- #: includes/class-mla-main.php:2121 includes/class-mla-options.php:1020
445
- #: includes/class-mla-options.php:1764 includes/class-mla-settings.php:1158
446
  #: includes/class-mla-settings.php:1415 includes/class-mla-settings.php:1514
447
  #: includes/class-mla-settings.php:1878
448
  #: includes/mla-main-search-box-template.php:46
@@ -450,80 +450,80 @@ msgstr ""
450
  msgid "Description"
451
  msgstr ""
452
 
453
- #: includes/class-mla-data.php:5400 includes/class-mla-list-table.php:804
454
- #: includes/class-mla-list-table.php:896 includes/class-mla-options.php:4074
455
- #: includes/class-mla-options.php:4414
456
  msgid "Parent"
457
  msgstr ""
458
 
459
- #: includes/class-mla-data.php:5411 includes/class-mla-edit-media.php:307
460
  #: includes/class-mla-edit-media.php:447 includes/class-mla-main.php:1746
461
  #: includes/class-mla-main.php:2127 includes/class-mla-settings.php:1156
462
  #: includes/class-mla-settings.php:1413
463
  msgid "Menu Order"
464
  msgstr ""
465
 
466
- #: includes/class-mla-data.php:5424 includes/class-mla-list-table.php:1218
467
  #: includes/class-mla-main.php:1616 includes/class-mla-main.php:1718
468
  #: includes/class-mla-main.php:1941
469
  msgid "Author"
470
  msgstr ""
471
 
472
- #: includes/class-mla-data.php:5433 includes/class-mla-main.php:1757
473
  msgid "Comments"
474
  msgstr ""
475
 
476
- #: includes/class-mla-data.php:5442 includes/class-mla-main.php:1758
477
  msgid "Pings"
478
  msgstr ""
479
 
480
- #: includes/class-mla-data.php:5476
481
  msgid "Adding"
482
  msgstr ""
483
 
484
- #: includes/class-mla-data.php:5480
485
  msgid "Removing"
486
  msgstr ""
487
 
488
- #: includes/class-mla-data.php:5485
489
  msgid "Replacing"
490
  msgstr ""
491
 
492
- #: includes/class-mla-data.php:5489
493
  msgid "Ignoring"
494
  msgstr ""
495
 
496
  #. translators: 1: action_name, 2: taxonomy
497
- #: includes/class-mla-data.php:5501
498
  #, php-format
499
  msgid "%1$s \"%2$s\" terms"
500
  msgstr ""
501
 
502
  #. translators: 1: taxonomy
503
- #: includes/class-mla-data.php:5505
504
  #, php-format
505
  msgid "You cannot assign \"%1$s\" terms"
506
  msgstr ""
507
 
508
  #. translators: 1: post ID
509
- #: includes/class-mla-data.php:5517
510
  #, php-format
511
  msgid "Item %1$d, no changes detected."
512
  msgstr ""
513
 
514
  #. translators: 1: post ID
515
- #: includes/class-mla-data.php:5529
516
  #, php-format
517
  msgid "Item %1$d updated."
518
  msgstr ""
519
 
520
  #. translators: 1: post ID
521
- #: includes/class-mla-data.php:5543
522
  #, php-format
523
  msgid "ERROR: Item %1$d update failed."
524
  msgstr ""
525
 
526
- #: includes/class-mla-data.php:5566 includes/class-mla-edit-media.php:125
527
  #: includes/class-mla-edit-media.php:170 includes/class-mla-main.php:330
528
  #: includes/class-mla-main.php:358 includes/class-mla-main.php:1444
529
  #: includes/class-mla-settings.php:311 includes/class-mla-settings.php:329
@@ -582,23 +582,23 @@ msgid "Attachment Metadata"
582
  msgstr ""
583
 
584
  #: includes/class-mla-edit-media.php:318 includes/class-mla-edit-media.php:505
585
- #: includes/class-mla-main.php:2134 includes/class-mla-options.php:451
586
  msgid "Featured in"
587
  msgstr ""
588
 
589
  #: includes/class-mla-edit-media.php:322 includes/class-mla-edit-media.php:544
590
- #: includes/class-mla-main.php:2136 includes/class-mla-options.php:460
591
  msgid "Inserted in"
592
  msgstr ""
593
 
594
  #: includes/class-mla-edit-media.php:326 includes/class-mla-edit-media.php:579
595
- #: includes/class-mla-main.php:2138 includes/class-mla-options.php:469
596
  #: includes/class-mla-settings.php:3335
597
  msgid "Gallery in"
598
  msgstr ""
599
 
600
  #: includes/class-mla-edit-media.php:330 includes/class-mla-edit-media.php:614
601
- #: includes/class-mla-main.php:2140 includes/class-mla-options.php:478
602
  #: includes/class-mla-settings.php:3345
603
  msgid "MLA Gallery in"
604
  msgstr ""
@@ -764,9 +764,9 @@ msgid "Attached to"
764
  msgstr ""
765
 
766
  #: includes/class-mla-list-table.php:513
767
- #: includes/class-mla-list-table.php:1127 includes/class-mla-options.php:582
768
- #: includes/class-mla-options.php:750 includes/class-mla-options.php:774
769
- #: includes/class-mla-options.php:788 includes/class-mla-settings.php:1962
770
  msgid "None"
771
  msgstr ""
772
 
@@ -826,7 +826,7 @@ msgid "Edit this item inline"
826
  msgstr ""
827
 
828
  #: includes/class-mla-list-table.php:677 includes/class-mla-main.php:1738
829
- #: includes/class-mla-options.php:3177 includes/class-mla-options.php:3449
830
  #: includes/class-mla-upload-list-table.php:314
831
  #: includes/class-mla-view-list-table.php:304
832
  msgid "Quick Edit"
@@ -877,9 +877,9 @@ msgstr ""
877
  #: includes/class-mla-list-table.php:997
878
  #: includes/class-mla-list-table.php:1031 includes/class-mla-main.php:1962
879
  #: includes/class-mla-main.php:1982 includes/class-mla-main.php:1998
880
- #: includes/class-mla-main.php:2014 includes/class-mla-options.php:455
881
- #: includes/class-mla-options.php:464 includes/class-mla-options.php:473
882
- #: includes/class-mla-options.php:482
883
  msgid "Disabled"
884
  msgstr ""
885
 
@@ -919,7 +919,7 @@ msgstr ""
919
  msgid "Filter by Author ID"
920
  msgstr ""
921
 
922
- #: includes/class-mla-list-table.php:1254 includes/class-mla-options.php:1109
923
  msgctxt "post_mime_types_singular"
924
  msgid "Unattached"
925
  msgstr ""
@@ -1100,8 +1100,9 @@ msgstr ""
1100
  msgid "All Post Types"
1101
  msgstr ""
1102
 
1103
- #: includes/class-mla-main.php:1541 includes/class-mla-media-modal.php:1191
1104
  #: includes/mla-media-modal-js-template.php:20
 
1105
  msgid "Search"
1106
  msgstr ""
1107
 
@@ -1144,10 +1145,10 @@ msgid "Remove"
1144
  msgstr ""
1145
 
1146
  #: includes/class-mla-main.php:1657 includes/class-mla-main.php:1695
1147
- #: includes/class-mla-options.php:3275 includes/class-mla-options.php:3372
1148
- #: includes/class-mla-options.php:3414 includes/class-mla-options.php:4303
1149
- #: includes/class-mla-options.php:4353 includes/class-mla-options.php:4450
1150
- #: includes/class-mla-options.php:4494 includes/class-mla-options.php:4519
1151
  msgid "Replace"
1152
  msgstr ""
1153
 
@@ -1155,8 +1156,8 @@ msgstr ""
1155
  msgid "Parent ID"
1156
  msgstr ""
1157
 
1158
- #: includes/class-mla-main.php:1753 includes/class-mla-options.php:3191
1159
- #: includes/class-mla-options.php:3450 includes/class-mla-settings.php:1422
1160
  #: includes/class-mla-settings.php:1887
1161
  msgid "Bulk Edit"
1162
  msgstr ""
@@ -1272,72 +1273,77 @@ msgstr ""
1272
  msgid "ERROR: Item %1$d could NOT be moved to Trash."
1273
  msgstr ""
1274
 
1275
- #: includes/class-mla-media-modal.php:242
1276
- #: includes/class-mla-media-modal.php:248
1277
- #: includes/class-mla-media-modal.php:786
1278
- #: includes/class-mla-media-modal.php:820
1279
- #: includes/class-mla-media-modal.php:865
1280
  msgid "Click to toggle"
1281
  msgstr ""
1282
 
1283
- #: includes/class-mla-media-modal.php:284
1284
  msgid "Show all dates"
1285
  msgstr ""
1286
 
1287
  #. translators: 1: month name, 2: 4-digit year
1288
- #: includes/class-mla-media-modal.php:299
1289
  #, php-format
1290
  msgid "%1$s %2$d"
1291
  msgstr ""
1292
 
1293
- #: includes/class-mla-media-modal.php:484
 
 
 
 
 
1294
  msgid "Search Box"
1295
  msgstr ""
1296
 
1297
- #: includes/class-mla-media-modal.php:485
1298
  msgid "Loading..."
1299
  msgstr ""
1300
 
1301
- #: includes/class-mla-media-modal.php:831
1302
  msgid "Tags"
1303
  msgstr ""
1304
 
1305
  #. translators: %s: add new taxonomy label
1306
- #: includes/class-mla-media-modal.php:833
1307
  #, php-format
1308
  msgid "Add New %1$s"
1309
  msgstr ""
1310
 
1311
- #: includes/class-mla-media-modal.php:849
1312
  msgid "Choose from the most used tags"
1313
  msgstr ""
1314
 
1315
- #: includes/class-mla-media-modal.php:871
1316
  msgid "Not Supported"
1317
  msgstr ""
1318
 
1319
- #: includes/class-mla-media-modal.php:1174
1320
- #: includes/class-mla-media-modal.php:1190
1321
  msgid "Search Terms"
1322
  msgstr ""
1323
 
1324
- #: includes/class-mla-media-modal.php:1175
1325
  msgid "There are no taxonomies to search"
1326
  msgstr ""
1327
 
1328
- #: includes/class-mla-media-modal.php:1193
1329
  msgid "All phrases"
1330
  msgstr ""
1331
 
1332
- #: includes/class-mla-media-modal.php:1195
1333
  msgid "Any phrase"
1334
  msgstr ""
1335
 
1336
- #: includes/class-mla-media-modal.php:1197
1337
  msgid "All terms"
1338
  msgstr ""
1339
 
1340
- #: includes/class-mla-media-modal.php:1199
1341
  msgid "Any term"
1342
  msgstr ""
1343
 
@@ -1699,85 +1705,85 @@ msgstr ""
1699
  msgid "Automatically add paragraphs"
1700
  msgstr ""
1701
 
1702
- #: includes/class-mla-options.php:364
1703
  msgid "error loading tpls/mla-option-templates.tpl"
1704
  msgstr ""
1705
 
1706
- #: includes/class-mla-options.php:367
1707
  msgid "tpls/mla-option-templates.tpl not found"
1708
  msgstr ""
1709
 
1710
- #: includes/class-mla-options.php:420 includes/class-mla-options.php:1591
1711
  msgid "Attachment Categories"
1712
  msgstr ""
1713
 
1714
- #: includes/class-mla-options.php:423
1715
  msgid "Check this option to add support for Attachment Categories."
1716
  msgstr ""
1717
 
1718
- #: includes/class-mla-options.php:427 includes/class-mla-options.php:1606
1719
  msgid "Attachment Tags"
1720
  msgstr ""
1721
 
1722
- #: includes/class-mla-options.php:430
1723
  msgid "Check this option to add support for Attachment Tags."
1724
  msgstr ""
1725
 
1726
- #: includes/class-mla-options.php:434 includes/class-mla-settings.php:986
1727
  msgid "Where-used Reporting"
1728
  msgstr ""
1729
 
1730
- #: includes/class-mla-options.php:439
1731
  msgid "Exclude Revisions"
1732
  msgstr ""
1733
 
1734
- #: includes/class-mla-options.php:442
1735
  msgid "Check this option to exclude revisions from where-used reporting."
1736
  msgstr ""
1737
 
1738
- #: includes/class-mla-options.php:446
1739
  msgid "Where-used database access tuning"
1740
  msgstr ""
1741
 
1742
- #: includes/class-mla-options.php:455 includes/class-mla-options.php:464
1743
  msgid "Enabled"
1744
  msgstr ""
1745
 
1746
- #: includes/class-mla-options.php:456
1747
  msgid "Search database posts and pages for Featured Image attachments."
1748
  msgstr ""
1749
 
1750
- #: includes/class-mla-options.php:464
1751
  msgid "Base"
1752
  msgstr ""
1753
 
1754
- #: includes/class-mla-options.php:465
1755
  msgid ""
1756
  "Search database posts and pages for attachments embedded in content."
1757
  "<br>&nbsp;&nbsp;Base = ignore intermediate size suffixes; use path, base "
1758
  "name and extension only."
1759
  msgstr ""
1760
 
1761
- #: includes/class-mla-options.php:473 includes/class-mla-options.php:482
1762
  msgid "Dynamic"
1763
  msgstr ""
1764
 
1765
- #: includes/class-mla-options.php:473 includes/class-mla-options.php:482
1766
  msgid "Refresh"
1767
  msgstr ""
1768
 
1769
- #: includes/class-mla-options.php:473 includes/class-mla-options.php:482
1770
  msgid "Cached"
1771
  msgstr ""
1772
 
1773
- #: includes/class-mla-options.php:474
1774
  msgid ""
1775
  "Search database posts and pages for [gallery] shortcode results.<br>&nbsp;"
1776
  "&nbsp;Dynamic = once every page load, Cached = once every login, Disabled = "
1777
  "never.<br>&nbsp;&nbsp;Refresh = update references, then set to Cached."
1778
  msgstr ""
1779
 
1780
- #: includes/class-mla-options.php:483
1781
  msgid ""
1782
  "Search database posts and pages for [mla_gallery] shortcode results."
1783
  "<br>&nbsp;&nbsp;Dynamic = once every page load, Cached = once every login, "
@@ -1785,104 +1791,104 @@ msgid ""
1785
  "Cached."
1786
  msgstr ""
1787
 
1788
- #: includes/class-mla-options.php:487 includes/class-mla-settings.php:986
1789
  msgid "Taxonomy Support"
1790
  msgstr ""
1791
 
1792
- #: includes/class-mla-options.php:492
1793
  msgid "Compute Attachments Column"
1794
  msgstr ""
1795
 
1796
- #: includes/class-mla-options.php:495
1797
  msgid ""
1798
  "Check this option to calculate attachments per term in the Attachments "
1799
  "Column."
1800
  msgstr ""
1801
 
1802
- #: includes/class-mla-options.php:499
1803
  msgid ""
1804
  "Check the \"Support\" box to add the taxonomy to the Assistant and the Edit "
1805
  "Media screen."
1806
  msgstr ""
1807
 
1808
- #: includes/class-mla-options.php:500 includes/class-mla-options.php:506
1809
  msgid ""
1810
  "Check the \"Inline Edit\" box to display the taxonomy in the Quick Edit and "
1811
  "Bulk Edit areas."
1812
  msgstr ""
1813
 
1814
- #: includes/class-mla-options.php:501
1815
  msgid ""
1816
  "Check the \"Checklist\" box to enable the checklist-style meta box for a "
1817
  "flat taxonomy."
1818
  msgstr ""
1819
 
1820
- #: includes/class-mla-options.php:502
1821
  msgid ""
1822
  "You must also check the <strong>\"Enable enhanced checklist taxonomies\"</"
1823
  "strong> box below to enable this feature."
1824
  msgstr ""
1825
 
1826
- #: includes/class-mla-options.php:503
1827
  msgid ""
1828
  "Check the \"Term Search\" box to add the taxonomy to the \"Search Media/Terms"
1829
  "\" list."
1830
  msgstr ""
1831
 
1832
- #: includes/class-mla-options.php:504 includes/class-mla-options.php:674
1833
  #: includes/class-mla-settings.php:1018 includes/class-mla-settings.php:1019
1834
  msgid "For complete documentation"
1835
  msgstr ""
1836
 
1837
- #: includes/class-mla-options.php:504 includes/class-mla-options.php:674
1838
  #: includes/class-mla-settings.php:1018 includes/class-mla-settings.php:1019
1839
  msgid "click here"
1840
  msgstr ""
1841
 
1842
- #: includes/class-mla-options.php:507
1843
  msgid ""
1844
  "Use the \"List Filter\" option to select the taxonomy on which to filter the "
1845
  "Assistant table listing."
1846
  msgstr ""
1847
 
1848
- #: includes/class-mla-options.php:532
1849
  msgid "Media/Assistant Screen Options"
1850
  msgstr ""
1851
 
1852
- #: includes/class-mla-options.php:537
1853
  msgid "Admin Menu Options"
1854
  msgstr ""
1855
 
1856
- #: includes/class-mla-options.php:542
1857
  msgid "Page Title"
1858
  msgstr ""
1859
 
1860
- #: includes/class-mla-options.php:544 includes/class-mla-settings.php:360
1861
  #: includes/class-mla-settings.php:2559
1862
  msgid "Media Library Assistant"
1863
  msgstr ""
1864
 
1865
- #: includes/class-mla-options.php:546
1866
  msgid "Enter the title for the Media/Assistant submenu page"
1867
  msgstr ""
1868
 
1869
- #: includes/class-mla-options.php:550
1870
  msgid "Menu Title"
1871
  msgstr ""
1872
 
1873
- #: includes/class-mla-options.php:552
1874
  msgid "Assistant"
1875
  msgstr ""
1876
 
1877
- #: includes/class-mla-options.php:554
1878
  msgid "Enter the title for the Media/Assistant submenu entry"
1879
  msgstr ""
1880
 
1881
- #: includes/class-mla-options.php:558
1882
  msgid "Submenu Order"
1883
  msgstr ""
1884
 
1885
- #: includes/class-mla-options.php:562
1886
  msgid ""
1887
  "Enter the position of the Media/Assistant submenu entry.<br>&nbsp;&nbsp;0 = "
1888
  "natural order (at bottom),&nbsp;&nbsp;&nbsp;&nbsp;1 - 4 = at top<br>&nbsp;"
@@ -1890,211 +1896,223 @@ msgid ""
1890
  "\""
1891
  msgstr ""
1892
 
1893
- #: includes/class-mla-options.php:566
1894
  msgid "Display Media/Library"
1895
  msgstr ""
1896
 
1897
- #: includes/class-mla-options.php:569
1898
  msgid ""
1899
  "Check/uncheck this option to display/remove the WordPress Media/Library "
1900
  "submenu entry."
1901
  msgstr ""
1902
 
1903
- #: includes/class-mla-options.php:573
1904
  msgid "Table Defaults"
1905
  msgstr ""
1906
 
1907
- #: includes/class-mla-options.php:578
1908
  msgid "Order By"
1909
  msgstr ""
1910
 
1911
- #: includes/class-mla-options.php:582 includes/class-mla-options.php:750
1912
  msgid "Title/Name"
1913
  msgstr ""
1914
 
1915
- #: includes/class-mla-options.php:583
1916
  msgid "Select the column for the sort order of the Assistant table listing."
1917
  msgstr ""
1918
 
1919
- #: includes/class-mla-options.php:587
1920
  msgid "Order"
1921
  msgstr ""
1922
 
1923
- #: includes/class-mla-options.php:591
1924
  msgid "Ascending"
1925
  msgstr ""
1926
 
1927
- #: includes/class-mla-options.php:591
1928
  msgid "Descending"
1929
  msgstr ""
1930
 
1931
- #: includes/class-mla-options.php:592 includes/class-mla-options.php:760
1932
  msgid "Choose the sort order."
1933
  msgstr ""
1934
 
1935
- #: includes/class-mla-options.php:596
1936
  msgid "Views Width"
1937
  msgstr ""
1938
 
1939
- #: includes/class-mla-options.php:600
1940
  msgid "Enter the width for the views list, in pixels (px) or percent (%)"
1941
  msgstr ""
1942
 
1943
- #: includes/class-mla-options.php:604
1944
  msgid "Icon Size"
1945
  msgstr ""
1946
 
1947
- #: includes/class-mla-options.php:608
1948
  msgid "Enter the size of the thumbnail/icon images, in pixels"
1949
  msgstr ""
1950
 
1951
- #: includes/class-mla-options.php:612
1952
  msgid "Taxonomy Filter parameters"
1953
  msgstr ""
1954
 
1955
- #: includes/class-mla-options.php:617
1956
  msgid "Maximum Depth"
1957
  msgstr ""
1958
 
1959
- #: includes/class-mla-options.php:621
1960
  msgid ""
1961
  "Enter the number of levels displayed for hierarchial taxonomies; enter zero "
1962
  "for no limit."
1963
  msgstr ""
1964
 
1965
- #: includes/class-mla-options.php:625
1966
  msgid "Include Children"
1967
  msgstr ""
1968
 
1969
- #: includes/class-mla-options.php:628
1970
  msgid ""
1971
  "Check/uncheck this option to include/exclude children for hierarchical "
1972
  "taxonomies."
1973
  msgstr ""
1974
 
1975
- #: includes/class-mla-options.php:632
1976
  msgid "Search Media Defaults"
1977
  msgstr ""
1978
 
1979
- #: includes/class-mla-options.php:637
1980
  msgid "Display Search Controls"
1981
  msgstr ""
1982
 
1983
- #: includes/class-mla-options.php:640 includes/class-mla-options.php:728
1984
  msgid ""
1985
  "Check/uncheck this option to display/hide the and/or connector and search "
1986
  "fields controls."
1987
  msgstr ""
1988
 
1989
- #: includes/class-mla-options.php:644
1990
  msgid ""
1991
  "Use these controls to set defaults for the and/or connector and search "
1992
  "fields controls.<br>These defaults will be used for the Search Media boxes "
1993
  "on both the Media/Assistant submenu<br>and the Media Manager Modal Window."
1994
  msgstr ""
1995
 
1996
- #: includes/class-mla-options.php:657
1997
  msgid "Media/Edit Media Enhancements"
1998
  msgstr ""
1999
 
2000
- #: includes/class-mla-options.php:662
2001
  msgid "Enable enhanced \"checklist\" taxonomies"
2002
  msgstr ""
2003
 
2004
- #: includes/class-mla-options.php:665
2005
  msgid ""
2006
  "Check this option to enable the \"? Search\" feature for hierarchical "
2007
  "taxonomies, e.g., Att. Categories.<br>&nbsp;&nbsp;This option also enables "
2008
  "the \"checklist-style\" support for flat taxonomies, e.g., Att. Tags."
2009
  msgstr ""
2010
 
2011
- #: includes/class-mla-options.php:669
2012
  msgid "Enable Edit Media additional meta boxes"
2013
  msgstr ""
2014
 
2015
- #: includes/class-mla-options.php:672
2016
  msgid ""
2017
  "Check this option to add \"Parent Info\", \"Menu Order\", \"Attachment "
2018
  "Metadata\" and four \"where-used\" meta boxes to the Edit Media screen."
2019
  msgstr ""
2020
 
2021
- #: includes/class-mla-options.php:673
2022
  msgid "You can also use Filters to customize the meta boxes."
2023
  msgstr ""
2024
 
2025
- #: includes/class-mla-options.php:678 includes/class-mla-settings.php:986
2026
- msgid "Media Manager Enhancements"
2027
  msgstr ""
2028
 
2029
- #: includes/class-mla-options.php:683
 
 
 
 
 
 
 
 
 
 
2030
  msgid "Enable Media Manager Enhancements"
2031
  msgstr ""
2032
 
2033
- #: includes/class-mla-options.php:686
2034
- msgid "Check/uncheck this option to enable/disable Media Manager Enhancements."
 
 
2035
  msgstr ""
2036
 
2037
- #: includes/class-mla-options.php:690
2038
  msgid "Media Manager Enhanced MIME Type filter"
2039
  msgstr ""
2040
 
2041
- #: includes/class-mla-options.php:693
2042
  msgid ""
2043
  "Check this option to filter by more MIME Types, e.g., text, applications."
2044
  msgstr ""
2045
 
2046
- #: includes/class-mla-options.php:697
2047
  msgid "Media Manager Month and Year filter"
2048
  msgstr ""
2049
 
2050
- #: includes/class-mla-options.php:700
2051
  msgid "Check this option to filter by month and year uploaded."
2052
  msgstr ""
2053
 
2054
- #: includes/class-mla-options.php:704
2055
  msgid "Media Manager Category/Tag filter"
2056
  msgstr ""
2057
 
2058
- #: includes/class-mla-options.php:707
2059
  msgid "Check this option to filter by taxonomy terms."
2060
  msgstr ""
2061
 
2062
- #: includes/class-mla-options.php:711
2063
  msgid "Media Manager Terms Search popup"
2064
  msgstr ""
2065
 
2066
- #: includes/class-mla-options.php:714
2067
  msgid "Check this option to enable the \"Terms Search\" popup window."
2068
  msgstr ""
2069
 
2070
- #: includes/class-mla-options.php:718
2071
  msgid "Media Manager Enhanced Search Media box"
2072
  msgstr ""
2073
 
2074
- #: includes/class-mla-options.php:721
2075
  msgid "Check this option to enable search box enhancements."
2076
  msgstr ""
2077
 
2078
- #: includes/class-mla-options.php:725
2079
  msgid "Media Manager Enhanced Search Media Controls"
2080
  msgstr ""
2081
 
2082
- #: includes/class-mla-options.php:732
2083
  msgid "Media Manager Checklist meta boxes"
2084
  msgstr ""
2085
 
2086
- #: includes/class-mla-options.php:735
2087
  msgid ""
2088
  "Check this option to enable MLA-enhanced meta boxes in the \"ATTACHMENT "
2089
  "DETAILS\" pane.<br>&nbsp;&nbsp;This option is for any taxonomy that uses a "
2090
  "<strong>\"checklist-style\"</strong> meta box.</strong>"
2091
  msgstr ""
2092
 
2093
- #: includes/class-mla-options.php:739
2094
  msgid "Media Manager Flat meta boxes"
2095
  msgstr ""
2096
 
2097
- #: includes/class-mla-options.php:742
2098
  msgid ""
2099
  "Check this option to enable MLA-enhanced meta boxes in the \"ATTACHMENT "
2100
  "DETAILS\" pane.<br>&nbsp;&nbsp;This option is for <strong>flat taxonomies</"
@@ -2102,143 +2120,153 @@ msgid ""
2102
  "style\" meta box."
2103
  msgstr ""
2104
 
2105
- #: includes/class-mla-options.php:746
 
 
 
 
 
 
 
 
 
 
2106
  msgid "Media Manager Order By"
2107
  msgstr ""
2108
 
2109
- #: includes/class-mla-options.php:750 includes/class-mla-options.php:759
2110
- #: includes/class-mla-options.php:774 includes/class-mla-options.php:788
2111
- #: includes/class-mla-options.php:802 includes/class-mla-settings.php:1068
2112
  msgid "Media Manager Default"
2113
  msgstr ""
2114
 
2115
- #: includes/class-mla-options.php:751
2116
  msgid ""
2117
  "If you want to override the Media Manager default,<br>&nbsp;&nbsp;select a "
2118
  "column for the sort order of the Media Library listing."
2119
  msgstr ""
2120
 
2121
- #: includes/class-mla-options.php:755
2122
  msgid "Media Manager Order"
2123
  msgstr ""
2124
 
2125
- #: includes/class-mla-options.php:764
2126
  msgid "Attachment Display Settings"
2127
  msgstr ""
2128
 
2129
  #. translators: 1: option name, e.g., Alignment, Link To or Size
2130
- #: includes/class-mla-options.php:769 includes/class-mla-options.php:771
2131
  msgid "Alignment"
2132
  msgstr ""
2133
 
2134
- #: includes/class-mla-options.php:774
2135
  msgid "Left"
2136
  msgstr ""
2137
 
2138
- #: includes/class-mla-options.php:774
2139
  msgid "Center"
2140
  msgstr ""
2141
 
2142
- #: includes/class-mla-options.php:774
2143
  msgid "Right"
2144
  msgstr ""
2145
 
2146
  #. translators: 1: option name, e.g., Alignment, Link To or Size
2147
- #: includes/class-mla-options.php:783 includes/class-mla-options.php:785
2148
  msgid "Link To"
2149
  msgstr ""
2150
 
2151
- #: includes/class-mla-options.php:788
2152
  msgid "Media File"
2153
  msgstr ""
2154
 
2155
- #: includes/class-mla-options.php:788
2156
  msgid "Attachment Page"
2157
  msgstr ""
2158
 
2159
- #: includes/class-mla-options.php:788
2160
  msgid "Custom URL"
2161
  msgstr ""
2162
 
2163
  #. translators: 1: option name, e.g., Alignment, Link To or Size
2164
- #: includes/class-mla-options.php:797 includes/class-mla-options.php:799
2165
  msgid "Size"
2166
  msgstr ""
2167
 
2168
- #: includes/class-mla-options.php:802
2169
  msgid "Thumbnail"
2170
  msgstr ""
2171
 
2172
- #: includes/class-mla-options.php:802
2173
  msgid "Medium"
2174
  msgstr ""
2175
 
2176
- #: includes/class-mla-options.php:802
2177
  msgid "Large"
2178
  msgstr ""
2179
 
2180
- #: includes/class-mla-options.php:802
2181
  msgid "Full Size"
2182
  msgstr ""
2183
 
2184
- #: includes/class-mla-options.php:811
2185
  msgid "Default [mla_gallery] Templates and Settings"
2186
  msgstr ""
2187
 
2188
- #: includes/class-mla-options.php:816 includes/class-mla-options.php:860
2189
  msgid "Style Template"
2190
  msgstr ""
2191
 
2192
  #. translators: 1: template type 2: shortcode
2193
- #: includes/class-mla-options.php:822 includes/class-mla-options.php:832
2194
- #: includes/class-mla-options.php:866 includes/class-mla-options.php:876
2195
  #, php-format
2196
  msgid "Select the default %1$s for your %2$s shortcodes."
2197
  msgstr ""
2198
 
2199
- #: includes/class-mla-options.php:822 includes/class-mla-options.php:866
2200
  #: includes/class-mla-settings.php:2654 includes/class-mla-settings.php:2665
2201
  #: includes/class-mla-settings.php:2671 includes/class-mla-settings.php:2675
2202
  #: includes/class-mla-settings.php:2704 includes/class-mla-settings.php:2715
2203
  msgid "style template"
2204
  msgstr ""
2205
 
2206
- #: includes/class-mla-options.php:826 includes/class-mla-options.php:870
2207
  msgid "Markup Template"
2208
  msgstr ""
2209
 
2210
- #: includes/class-mla-options.php:832 includes/class-mla-options.php:876
2211
  #: includes/class-mla-settings.php:2744 includes/class-mla-settings.php:2757
2212
  #: includes/class-mla-settings.php:2763 includes/class-mla-settings.php:2767
2213
  #: includes/class-mla-settings.php:2836
2214
  msgid "markup template"
2215
  msgstr ""
2216
 
2217
- #: includes/class-mla-options.php:836 includes/class-mla-options.php:880
2218
  msgid "Default columns"
2219
  msgstr ""
2220
 
2221
- #: includes/class-mla-options.php:840
2222
  msgid ""
2223
  "Enter the number of [mla_tag_cloud] columns; must be a positive integer."
2224
  msgstr ""
2225
 
2226
- #: includes/class-mla-options.php:844 includes/class-mla-options.php:888
2227
  msgid "Default mla_margin"
2228
  msgstr ""
2229
 
2230
- #: includes/class-mla-options.php:848 includes/class-mla-options.php:892
2231
  msgid ""
2232
  "Enter the CSS \"margin\" property value, in length (px, em, pt, etc.), "
2233
  "percent (%), \"auto\" or \"inherit\".<br>&nbsp;&nbsp;Enter \"none\" to "
2234
  "remove the property entirely."
2235
  msgstr ""
2236
 
2237
- #: includes/class-mla-options.php:852 includes/class-mla-options.php:896
2238
  msgid "Default mla_itemwidth"
2239
  msgstr ""
2240
 
2241
- #: includes/class-mla-options.php:856 includes/class-mla-options.php:900
2242
  msgid ""
2243
  "Enter the CSS \"width\" property value, in length (px, em, pt, etc.), "
2244
  "percent (%), \"auto\" or \"inherit\".<br>&nbsp;&nbsp;Enter \"calculate"
@@ -2248,15 +2276,15 @@ msgid ""
2248
  "the property entirely."
2249
  msgstr ""
2250
 
2251
- #: includes/class-mla-options.php:884
2252
  msgid "Enter the number of [mla_gallery] columns; must be a positive integer."
2253
  msgstr ""
2254
 
2255
- #: includes/class-mla-options.php:920
2256
  msgid "Enable custom field mapping when adding new media"
2257
  msgstr ""
2258
 
2259
- #: includes/class-mla-options.php:923
2260
  msgid ""
2261
  "Check this option to enable mapping when uploading new media (attachments)."
2262
  "<br>&nbsp;&nbsp;Click Save Changes at the bottom of the screen if you change "
@@ -2264,18 +2292,18 @@ msgid ""
2264
  "buttons on the bulk edit, single edit and settings screens."
2265
  msgstr ""
2266
 
2267
- #: includes/class-mla-options.php:927
2268
  msgid "Enable custom field mapping when updating media metadata"
2269
  msgstr ""
2270
 
2271
- #: includes/class-mla-options.php:930 includes/class-mla-options.php:954
2272
  msgid ""
2273
  "Check this option to enable mapping when media (attachments) metadata is "
2274
  "regenerated,<br>&nbsp;&nbsp;e.g., when the Media/Edit Media \"Edit Image\" "
2275
  "functions are used."
2276
  msgstr ""
2277
 
2278
- #: includes/class-mla-options.php:934
2279
  msgid ""
2280
  "Update the custom field mapping values above, then click Save Changes to "
2281
  "make the updates permanent.<br>You can also make temporary updates and click "
@@ -2283,22 +2311,22 @@ msgid ""
2283
  "saving any rule changes."
2284
  msgstr ""
2285
 
2286
- #: includes/class-mla-options.php:944
2287
  msgid "Enable IPTC/EXIF Mapping when adding new media"
2288
  msgstr ""
2289
 
2290
- #: includes/class-mla-options.php:947
2291
  msgid ""
2292
  "Check this option to enable mapping when uploading new media (attachments)."
2293
  "<br>&nbsp;&nbsp;Does NOT affect the operation of the \"Map\" buttons on the "
2294
  "bulk edit, single edit and settings screens."
2295
  msgstr ""
2296
 
2297
- #: includes/class-mla-options.php:951
2298
  msgid "Enable IPTC/EXIF Mapping when updating media metadata"
2299
  msgstr ""
2300
 
2301
- #: includes/class-mla-options.php:958
2302
  msgid ""
2303
  "Update the standard field mapping values above, then click <strong>Save "
2304
  "Changes</strong> to make the updates permanent.<br>You can also make "
@@ -2307,13 +2335,13 @@ msgid ""
2307
  "changes."
2308
  msgstr ""
2309
 
2310
- #: includes/class-mla-options.php:968
2311
  msgid ""
2312
  "Update the taxonomy term mapping values above, then click <strong>Save "
2313
  "Changes</strong> or <strong>Map All Attachments, Taxonomy Terms Now</strong>."
2314
  msgstr ""
2315
 
2316
- #: includes/class-mla-options.php:978
2317
  msgid ""
2318
  "<strong>Update</strong> individual custom field mapping values above, or "
2319
  "make several updates and click <strong>Save Changes</strong> below to apply "
@@ -2324,245 +2352,245 @@ msgid ""
2324
  "changes."
2325
  msgstr ""
2326
 
2327
- #: includes/class-mla-options.php:988
2328
  msgid "IPTC/EXIF Mapping help"
2329
  msgstr ""
2330
 
2331
- #: includes/class-mla-options.php:1040
2332
  msgid "Enable View and Post MIME Type Support"
2333
  msgstr ""
2334
 
2335
- #: includes/class-mla-options.php:1043
2336
  msgid ""
2337
  "Check/uncheck this option to enable/disable Post MIME Type Support, then "
2338
  "click <strong>Save Changes</strong> to record the new setting."
2339
  msgstr ""
2340
 
2341
- #: includes/class-mla-options.php:1052
2342
  msgid "Post MIME Types help."
2343
  msgstr ""
2344
 
2345
- #: includes/class-mla-options.php:1055
2346
  msgctxt "post_mime_types_singular"
2347
  msgid "All"
2348
  msgstr ""
2349
 
2350
- #: includes/class-mla-options.php:1056
2351
  msgctxt "post_mime_types_plural"
2352
  msgid "All"
2353
  msgstr ""
2354
 
2355
- #: includes/class-mla-options.php:1061 includes/class-mla-options.php:1115
2356
- #: includes/class-mla-options.php:1124
2357
  msgctxt "post_mime_types_description"
2358
  msgid "Built-in view"
2359
  msgstr ""
2360
 
2361
- #: includes/class-mla-options.php:1064
2362
  msgctxt "post_mime_types_singular"
2363
  msgid "Image"
2364
  msgstr ""
2365
 
2366
- #: includes/class-mla-options.php:1065
2367
  msgctxt "post_mime_types_plural"
2368
  msgid "Images"
2369
  msgstr ""
2370
 
2371
- #: includes/class-mla-options.php:1070
2372
  msgctxt "post_mime_types_description"
2373
  msgid "All image subtypes"
2374
  msgstr ""
2375
 
2376
- #: includes/class-mla-options.php:1073
2377
  msgctxt "post_mime_types_singular"
2378
  msgid "Audio"
2379
  msgstr ""
2380
 
2381
- #: includes/class-mla-options.php:1074
2382
  msgctxt "post_mime_types_plural"
2383
  msgid "Audio"
2384
  msgstr ""
2385
 
2386
- #: includes/class-mla-options.php:1079
2387
  msgctxt "post_mime_types_description"
2388
  msgid "All audio subtypes"
2389
  msgstr ""
2390
 
2391
- #: includes/class-mla-options.php:1082
2392
  msgctxt "post_mime_types_singular"
2393
  msgid "Video"
2394
  msgstr ""
2395
 
2396
- #: includes/class-mla-options.php:1083
2397
  msgctxt "post_mime_types_plural"
2398
  msgid "Video"
2399
  msgstr ""
2400
 
2401
- #: includes/class-mla-options.php:1088
2402
  msgctxt "post_mime_types_description"
2403
  msgid "All video subtypes"
2404
  msgstr ""
2405
 
2406
- #: includes/class-mla-options.php:1091
2407
  msgctxt "post_mime_types_singular"
2408
  msgid "Text"
2409
  msgstr ""
2410
 
2411
- #: includes/class-mla-options.php:1092
2412
  msgctxt "post_mime_types_plural"
2413
  msgid "Text"
2414
  msgstr ""
2415
 
2416
- #: includes/class-mla-options.php:1097
2417
  msgctxt "post_mime_types_description"
2418
  msgid "All text subtypes"
2419
  msgstr ""
2420
 
2421
- #: includes/class-mla-options.php:1100
2422
  msgctxt "post_mime_types_singular"
2423
  msgid "Application"
2424
  msgstr ""
2425
 
2426
- #: includes/class-mla-options.php:1101
2427
  msgctxt "post_mime_types_plural"
2428
  msgid "Applications"
2429
  msgstr ""
2430
 
2431
- #: includes/class-mla-options.php:1106
2432
  msgctxt "post_mime_types_description"
2433
  msgid "All application subtypes"
2434
  msgstr ""
2435
 
2436
- #: includes/class-mla-options.php:1110
2437
  msgctxt "post_mime_types_plural"
2438
  msgid "Unattached"
2439
  msgstr ""
2440
 
2441
- #: includes/class-mla-options.php:1118
2442
  msgctxt "post_mime_types_singular"
2443
  msgid "Trash"
2444
  msgstr ""
2445
 
2446
- #: includes/class-mla-options.php:1119
2447
  msgctxt "post_mime_types_plural"
2448
  msgid "Trash"
2449
  msgstr ""
2450
 
2451
- #: includes/class-mla-options.php:1130
2452
  msgid "Enable Upload MIME Type Support"
2453
  msgstr ""
2454
 
2455
- #: includes/class-mla-options.php:1133
2456
  msgid ""
2457
  "Check/uncheck this option to enable/disable Upload MIME Type Support, then "
2458
  "click <strong>Save Changes</strong> to record the new setting."
2459
  msgstr ""
2460
 
2461
- #: includes/class-mla-options.php:1142
2462
  msgid "Upload MIME Types help."
2463
  msgstr ""
2464
 
2465
- #: includes/class-mla-options.php:1147
2466
  msgid "Enable MLA File Type Icons Support"
2467
  msgstr ""
2468
 
2469
- #: includes/class-mla-options.php:1150
2470
  msgid ""
2471
  "Check/uncheck this option to enable/disable MLA File Type Icons Support, "
2472
  "then click <strong>Save Changes</strong> to record the new setting."
2473
  msgstr ""
2474
 
2475
- #: includes/class-mla-options.php:1177 includes/class-mla-options.php:1199
2476
- #: includes/class-mla-options.php:1241
2477
  msgid "no templates exist"
2478
  msgstr ""
2479
 
2480
- #: includes/class-mla-options.php:1185
2481
  msgid "not found"
2482
  msgstr ""
2483
 
2484
  #. translators: 1: option name 2: action, e.g., update, delete, reset
2485
- #: includes/class-mla-options.php:1558 includes/class-mla-options.php:1722
2486
- #: includes/class-mla-options.php:1798 includes/class-mla-options.php:3488
2487
- #: includes/class-mla-options.php:4639
2488
  #, php-format
2489
  msgid "ERROR: Custom %1$s unknown action \"%2$s\""
2490
  msgstr ""
2491
 
2492
- #: includes/class-mla-options.php:1647
2493
  msgid "Support"
2494
  msgstr ""
2495
 
2496
- #: includes/class-mla-options.php:1648
2497
  msgid "Inline Edit"
2498
  msgstr ""
2499
 
2500
- #: includes/class-mla-options.php:1649
2501
  msgid "Checklist"
2502
  msgstr ""
2503
 
2504
- #: includes/class-mla-options.php:1650
2505
  msgid "Term Search"
2506
  msgstr ""
2507
 
2508
- #: includes/class-mla-options.php:1651
2509
  msgid "List Filter"
2510
  msgstr ""
2511
 
2512
- #: includes/class-mla-options.php:1652
2513
  msgid "Taxonomy"
2514
  msgstr ""
2515
 
2516
  #. translators: 1: taxonomy name
2517
- #: includes/class-mla-options.php:1670
2518
  #, php-format
2519
  msgid "List Filter ignored; %1$s not supported."
2520
  msgstr ""
2521
 
2522
  #. translators: 1: taxonomy name
2523
- #: includes/class-mla-options.php:1677
2524
  #, php-format
2525
  msgid "Inline Edit ignored; %1$s not supported."
2526
  msgstr ""
2527
 
2528
  #. translators: 1: taxonomy name
2529
- #: includes/class-mla-options.php:1687
2530
  #, php-format
2531
  msgid "Checklist ignored; %1$s not supported."
2532
  msgstr ""
2533
 
2534
  #. translators: 1: taxonomy name
2535
- #: includes/class-mla-options.php:1695
2536
  #, php-format
2537
  msgid "Term Search ignored; %1$s not supported."
2538
  msgstr ""
2539
 
2540
  #. translators: 1: option name, e.g., taxonomy_support
2541
- #: includes/class-mla-options.php:1712 includes/class-mla-options.php:1788
2542
  #, php-format
2543
  msgid "Update custom %1$s"
2544
  msgstr ""
2545
 
2546
  #. translators: 1: option name, e.g., taxonomy_support
2547
- #: includes/class-mla-options.php:1719 includes/class-mla-options.php:1795
2548
- #: includes/class-mla-options.php:4632
2549
  #, php-format
2550
  msgid "Reset custom %1$s"
2551
  msgstr ""
2552
 
2553
- #: includes/class-mla-options.php:1748
2554
  #: includes/mla-main-search-box-template.php:38
2555
  #: includes/mla-media-modal-js-template.php:24
2556
  msgid "and"
2557
  msgstr ""
2558
 
2559
- #: includes/class-mla-options.php:1750
2560
  #: includes/mla-main-search-box-template.php:40
2561
  #: includes/mla-media-modal-js-template.php:28
2562
  msgid "or"
2563
  msgstr ""
2564
 
2565
- #: includes/class-mla-options.php:1755 includes/class-mla-settings.php:2017
2566
  #: includes/class-mla-settings.php:2050 includes/class-mla-settings.php:2076
2567
  #: includes/class-mla-settings.php:2111 includes/class-mla-settings.php:2168
2568
  #: includes/class-mla-settings.php:2218
@@ -2571,348 +2599,348 @@ msgstr ""
2571
  msgid "Name"
2572
  msgstr ""
2573
 
2574
- #: includes/class-mla-options.php:1767
2575
  #: includes/mla-main-search-box-template.php:47
2576
  #: includes/mla-media-modal-js-template.php:53
2577
  msgid "Terms"
2578
  msgstr ""
2579
 
2580
- #: includes/class-mla-options.php:2860 includes/class-mla-options.php:2980
2581
- #: includes/class-mla-options.php:3820 includes/class-mla-options.php:3851
2582
  #: includes/class-mla-settings.php:1467
2583
  msgid "None (select a value)"
2584
  msgstr ""
2585
 
2586
- #: includes/class-mla-options.php:2987
2587
  msgid "Metadata (see below)"
2588
  msgstr ""
2589
 
2590
- #: includes/class-mla-options.php:2994
2591
  msgid "Template (see below)"
2592
  msgstr ""
2593
 
2594
  #. translators: 1: custom field name
2595
- #: includes/class-mla-options.php:3059 includes/class-mla-options.php:4123
2596
  #, php-format
2597
  msgid "ERROR: New field %1$s already exists."
2598
  msgstr ""
2599
 
2600
  #. translators: 1: custom field name
2601
- #: includes/class-mla-options.php:3064 includes/class-mla-options.php:4128
2602
  #, php-format
2603
  msgid "Adding new field %1$s."
2604
  msgstr ""
2605
 
2606
  #. translators: 1: custom field name
2607
- #: includes/class-mla-options.php:3074 includes/class-mla-options.php:4138
2608
  #, php-format
2609
  msgid "Adding new rule for %1$s."
2610
  msgstr ""
2611
 
2612
  #. translators: 1: custom field name
2613
- #: includes/class-mla-options.php:3105 includes/class-mla-options.php:4000
2614
- #: includes/class-mla-options.php:4159
2615
  #, php-format
2616
  msgid "Deleting rule for %1$s."
2617
  msgstr ""
2618
 
2619
  #. translators: 1: custom field name 2: attribute 3: old value 4: new value
2620
- #: includes/class-mla-options.php:3128 includes/class-mla-options.php:3149
2621
- #: includes/class-mla-options.php:3199 includes/class-mla-options.php:3206
2622
- #: includes/class-mla-options.php:3917 includes/class-mla-options.php:3924
2623
- #: includes/class-mla-options.php:3931 includes/class-mla-options.php:4025
2624
- #: includes/class-mla-options.php:4032 includes/class-mla-options.php:4067
2625
- #: includes/class-mla-options.php:4074 includes/class-mla-options.php:4169
2626
- #: includes/class-mla-options.php:4176
2627
  #, php-format
2628
  msgid "%1$s changing %2$s from %3$s to %4$s."
2629
  msgstr ""
2630
 
2631
- #: includes/class-mla-options.php:3128 includes/class-mla-options.php:3445
2632
  msgid "Data Source"
2633
  msgstr ""
2634
 
2635
- #: includes/class-mla-options.php:3134 includes/class-mla-options.php:3951
2636
- #: includes/class-mla-options.php:4052 includes/class-mla-options.php:4196
2637
  msgid "Replace to Keep"
2638
  msgstr ""
2639
 
2640
- #: includes/class-mla-options.php:3137 includes/class-mla-options.php:3954
2641
- #: includes/class-mla-options.php:4055 includes/class-mla-options.php:4199
2642
  msgid "Keep to Replace"
2643
  msgstr ""
2644
 
2645
  #. translators: 1: custom field name 2: attribute 3: old value 'to' new value
2646
- #: includes/class-mla-options.php:3142 includes/class-mla-options.php:3163
2647
- #: includes/class-mla-options.php:3177 includes/class-mla-options.php:3191
2648
- #: includes/class-mla-options.php:3220 includes/class-mla-options.php:3945
2649
- #: includes/class-mla-options.php:3959 includes/class-mla-options.php:4046
2650
- #: includes/class-mla-options.php:4060 includes/class-mla-options.php:4190
2651
- #: includes/class-mla-options.php:4204
2652
  #, php-format
2653
  msgid "%1$s changing %2$s value from %3$s."
2654
  msgstr ""
2655
 
2656
- #: includes/class-mla-options.php:3142 includes/class-mla-options.php:3446
2657
- #: includes/class-mla-options.php:3959 includes/class-mla-options.php:4060
2658
- #: includes/class-mla-options.php:4204 includes/class-mla-options.php:4326
2659
- #: includes/class-mla-options.php:4412 includes/class-mla-options.php:4530
2660
  msgid "Existing Text"
2661
  msgstr ""
2662
 
2663
- #: includes/class-mla-options.php:3149 includes/class-mla-options.php:3447
2664
  msgid "Format"
2665
  msgstr ""
2666
 
2667
- #: includes/class-mla-options.php:3155 includes/class-mla-options.php:3169
2668
- #: includes/class-mla-options.php:3183 includes/class-mla-options.php:3212
2669
  msgid "unchecked to checked"
2670
  msgstr ""
2671
 
2672
- #: includes/class-mla-options.php:3158 includes/class-mla-options.php:3172
2673
- #: includes/class-mla-options.php:3186 includes/class-mla-options.php:3215
2674
  msgid "checked to unchecked"
2675
  msgstr ""
2676
 
2677
- #: includes/class-mla-options.php:3163 includes/class-mla-options.php:3448
2678
  msgid "MLA Column"
2679
  msgstr ""
2680
 
2681
- #: includes/class-mla-options.php:3199
2682
  msgid "Metavalue name"
2683
  msgstr ""
2684
 
2685
- #: includes/class-mla-options.php:3206 includes/class-mla-options.php:3287
2686
- #: includes/class-mla-options.php:3383 includes/class-mla-options.php:3425
2687
  msgid "Option"
2688
  msgstr ""
2689
 
2690
- #: includes/class-mla-options.php:3220
2691
  msgid "Delete NULL"
2692
  msgstr ""
2693
 
2694
- #: includes/class-mla-options.php:3259 includes/class-mla-options.php:4424
2695
  msgid "No Custom Field Mapping Rules Defined"
2696
  msgstr ""
2697
 
2698
- #: includes/class-mla-options.php:3273 includes/class-mla-options.php:3370
2699
- #: includes/class-mla-options.php:3412 includes/class-mla-options.php:4301
2700
- #: includes/class-mla-options.php:4351 includes/class-mla-options.php:4448
2701
- #: includes/class-mla-options.php:4492 includes/class-mla-options.php:4517
2702
  msgid "Keep"
2703
  msgstr ""
2704
 
2705
- #: includes/class-mla-options.php:3277 includes/class-mla-options.php:3374
2706
- #: includes/class-mla-options.php:3416
2707
  msgid "Native"
2708
  msgstr ""
2709
 
2710
- #: includes/class-mla-options.php:3279 includes/class-mla-options.php:3376
2711
- #: includes/class-mla-options.php:3418
2712
  msgid "Commas"
2713
  msgstr ""
2714
 
2715
- #: includes/class-mla-options.php:3289 includes/class-mla-options.php:3385
2716
- #: includes/class-mla-options.php:3427
2717
  msgid "Text"
2718
  msgstr ""
2719
 
2720
- #: includes/class-mla-options.php:3291 includes/class-mla-options.php:3387
2721
- #: includes/class-mla-options.php:3429
2722
  msgid "Single"
2723
  msgstr ""
2724
 
2725
- #: includes/class-mla-options.php:3293 includes/class-mla-options.php:3389
2726
- #: includes/class-mla-options.php:3431
2727
  msgid "Export"
2728
  msgstr ""
2729
 
2730
- #: includes/class-mla-options.php:3295 includes/class-mla-options.php:3391
2731
- #: includes/class-mla-options.php:3433
2732
  msgid "Array"
2733
  msgstr ""
2734
 
2735
- #: includes/class-mla-options.php:3297 includes/class-mla-options.php:3393
2736
- #: includes/class-mla-options.php:3435
2737
  msgid "Multi"
2738
  msgstr ""
2739
 
2740
- #: includes/class-mla-options.php:3299 includes/class-mla-options.php:3395
2741
- #: includes/class-mla-options.php:3437
2742
  msgid "Delete NULL values"
2743
  msgstr ""
2744
 
2745
- #: includes/class-mla-options.php:3300 includes/class-mla-options.php:4451
2746
  msgid "Delete Rule"
2747
  msgstr ""
2748
 
2749
- #: includes/class-mla-options.php:3301 includes/class-mla-options.php:4452
2750
  msgid "Delete Rule AND Field"
2751
  msgstr ""
2752
 
2753
- #: includes/class-mla-options.php:3302 includes/class-mla-options.php:4453
2754
  msgid "Update Rule"
2755
  msgstr ""
2756
 
2757
- #: includes/class-mla-options.php:3303 includes/class-mla-options.php:4454
2758
  msgid "Map All Attachments"
2759
  msgstr ""
2760
 
2761
- #: includes/class-mla-options.php:3365 includes/class-mla-options.php:4481
2762
  msgid "Add a new Mapping Rule"
2763
  msgstr ""
2764
 
2765
- #: includes/class-mla-options.php:3396 includes/class-mla-options.php:4495
2766
  msgid "Add Rule"
2767
  msgstr ""
2768
 
2769
- #: includes/class-mla-options.php:3397 includes/class-mla-options.php:4496
2770
  msgid "Add Rule and Map All Attachments"
2771
  msgstr ""
2772
 
2773
- #: includes/class-mla-options.php:3407 includes/class-mla-options.php:4506
2774
  msgid "Add a new Field and Mapping Rule"
2775
  msgstr ""
2776
 
2777
- #: includes/class-mla-options.php:3438 includes/class-mla-options.php:4520
2778
  msgid "Add Field"
2779
  msgstr ""
2780
 
2781
- #: includes/class-mla-options.php:3439 includes/class-mla-options.php:4521
2782
  msgid "Add Field and Map All Attachments"
2783
  msgstr ""
2784
 
2785
- #: includes/class-mla-options.php:3444 includes/class-mla-options.php:3917
2786
- #: includes/class-mla-options.php:4322 includes/class-mla-options.php:4408
2787
- #: includes/class-mla-options.php:4526
2788
  msgid "Field Title"
2789
  msgstr ""
2790
 
2791
- #: includes/class-mla-options.php:3469
2792
  msgid "Custom field mapping rules updated."
2793
  msgstr ""
2794
 
2795
- #: includes/class-mla-options.php:3471
2796
  msgid "ERROR: Custom field mapping rules update failed."
2797
  msgstr ""
2798
 
2799
- #: includes/class-mla-options.php:3474
2800
  msgid "Custom field no mapping rule changes detected."
2801
  msgstr ""
2802
 
2803
- #: includes/class-mla-options.php:3482
2804
  msgid "Custom field mapping settings saved."
2805
  msgstr ""
2806
 
2807
- #: includes/class-mla-options.php:3484
2808
  msgid "ERROR: Custom field mapping settings reset failed."
2809
  msgstr ""
2810
 
2811
  #. translators: 1: custom field name
2812
- #: includes/class-mla-options.php:3905
2813
  #, php-format
2814
  msgid "ERROR: No old values for %1$s."
2815
  msgstr ""
2816
 
2817
- #: includes/class-mla-options.php:3924 includes/class-mla-options.php:4025
2818
- #: includes/class-mla-options.php:4169 includes/class-mla-options.php:4323
2819
- #: includes/class-mla-options.php:4409 includes/class-mla-options.php:4527
2820
  msgid "IPTC Value"
2821
  msgstr ""
2822
 
2823
- #: includes/class-mla-options.php:3931 includes/class-mla-options.php:4032
2824
- #: includes/class-mla-options.php:4176
2825
  msgid "EXIF Value"
2826
  msgstr ""
2827
 
2828
- #: includes/class-mla-options.php:3937 includes/class-mla-options.php:4038
2829
- #: includes/class-mla-options.php:4182
2830
  msgid "EXIF to IPTC"
2831
  msgstr ""
2832
 
2833
- #: includes/class-mla-options.php:3940 includes/class-mla-options.php:4041
2834
- #: includes/class-mla-options.php:4185
2835
  msgid "IPTC to EXIF"
2836
  msgstr ""
2837
 
2838
- #: includes/class-mla-options.php:3945 includes/class-mla-options.php:4046
2839
- #: includes/class-mla-options.php:4190 includes/class-mla-options.php:4325
2840
- #: includes/class-mla-options.php:4411 includes/class-mla-options.php:4529
2841
  msgid "Priority"
2842
  msgstr ""
2843
 
2844
- #: includes/class-mla-options.php:4067 includes/class-mla-options.php:4413
2845
  msgid "Delimiter(s)"
2846
  msgstr ""
2847
 
2848
- #: includes/class-mla-options.php:4297 includes/class-mla-options.php:4347
2849
- #: includes/class-mla-options.php:4444 includes/class-mla-options.php:4488
2850
- #: includes/class-mla-options.php:4513
2851
  msgid "IPTC"
2852
  msgstr ""
2853
 
2854
- #: includes/class-mla-options.php:4299 includes/class-mla-options.php:4349
2855
- #: includes/class-mla-options.php:4446 includes/class-mla-options.php:4490
2856
- #: includes/class-mla-options.php:4515
2857
  msgid "EXIF"
2858
  msgstr ""
2859
 
2860
- #: includes/class-mla-options.php:4324 includes/class-mla-options.php:4410
2861
- #: includes/class-mla-options.php:4528
2862
  msgid "EXIF/Template Value"
2863
  msgstr ""
2864
 
2865
  #. translators: 1: option name
2866
- #: includes/class-mla-options.php:4538
2867
  #, php-format
2868
  msgid "ERROR: Render unknown custom %1$s."
2869
  msgstr ""
2870
 
2871
  #. translators: 1: option name
2872
- #: includes/class-mla-options.php:4582
2873
  #, php-format
2874
  msgid "ERROR: Update/delete unknown custom %1$s."
2875
  msgstr ""
2876
 
2877
- #: includes/class-mla-options.php:4588
2878
  msgid "IPTC/EXIF mapping settings updated."
2879
  msgstr ""
2880
 
2881
- #: includes/class-mla-options.php:4590
2882
  msgid "ERROR: IPTC/EXIF settings update failed."
2883
  msgstr ""
2884
 
2885
- #: includes/class-mla-options.php:4593
2886
  msgid "IPTC/EXIF no mapping changes detected."
2887
  msgstr ""
2888
 
2889
  #. translators: 1: field type
2890
- #: includes/class-mla-options.php:4604 includes/class-mla-options.php:4614
2891
- #: includes/class-mla-options.php:4624 includes/class-mla-settings.php:2842
2892
  #, php-format
2893
  msgid "%1$s settings saved."
2894
  msgstr ""
2895
 
2896
- #: includes/class-mla-options.php:4604 includes/class-mla-options.php:4607
2897
  #: includes/class-mla-settings.php:3073 includes/class-mla-settings.php:3107
2898
  #: includes/class-mla-settings.php:3110
2899
  msgid "Standard field"
2900
  msgstr ""
2901
 
2902
  #. translators: 1: field type
2903
- #: includes/class-mla-options.php:4607 includes/class-mla-options.php:4617
2904
- #: includes/class-mla-options.php:4627
2905
  #, php-format
2906
  msgid "ERROR: IPTC/EXIF %1$s settings update failed."
2907
  msgstr ""
2908
 
2909
- #: includes/class-mla-options.php:4614 includes/class-mla-options.php:4617
2910
  #: includes/class-mla-settings.php:3133 includes/class-mla-settings.php:3167
2911
  #: includes/class-mla-settings.php:3170
2912
  msgid "Taxonomy term"
2913
  msgstr ""
2914
 
2915
- #: includes/class-mla-options.php:4624 includes/class-mla-options.php:4627
2916
  #: includes/class-mla-settings.php:2980 includes/class-mla-settings.php:2983
2917
  #: includes/class-mla-settings.php:3208 includes/class-mla-settings.php:3242
2918
  #: includes/class-mla-settings.php:3245
@@ -2920,7 +2948,7 @@ msgid "Custom field"
2920
  msgstr ""
2921
 
2922
  #. translators: 1: option name, e.g., taxonomy_support
2923
- #: includes/class-mla-options.php:4635
2924
  #, php-format
2925
  msgid "ERROR: Reset unknown custom %1$s"
2926
  msgstr ""
@@ -3012,6 +3040,10 @@ msgstr ""
3012
  msgid "Media/Assistant Table Defaults"
3013
  msgstr ""
3014
 
 
 
 
 
3015
  #: includes/class-mla-settings.php:987 includes/class-mla-settings.php:1347
3016
  #: includes/class-mla-settings.php:1400 includes/class-mla-settings.php:1817
3017
  #: includes/class-mla-settings.php:1867 includes/class-mla-settings.php:1953
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Media Library Assistant\n"
4
+ "POT-Creation-Date: 2014-08-25 16:35-0800\n"
5
+ "PO-Revision-Date: 2014-08-25 16:35-0800\n"
6
  "Last-Translator: David Lingren <david@fairtradejudaica.org>\n"
7
  "Language-Team: David Lingren <david@fairtradejudaica.org>\n"
8
  "Language: en_US\n"
90
 
91
  #. translators: 1: function name 2: non-array value
92
  #: includes/class-mla-data.php:1256 includes/class-mla-main.php:1535
93
+ #: includes/class-mla-main.php:1610 includes/class-mla-media-modal.php:1197
94
  #: includes/class-mla-mime-types.php:483
95
  #: includes/class-mla-mime-types.php:1218
96
  #: includes/class-mla-mime-types.php:2361 includes/class-mla-settings.php:1192
140
  msgstr ""
141
 
142
  #. translators: 1: search filter details
143
+ #: includes/class-mla-data.php:1984
144
  #, php-format
145
  msgid "mla_query_posts_search_filter not numeric, = \"%1$s\"."
146
  msgstr ""
147
 
148
  #. translators: 1: search filter details
149
+ #: includes/class-mla-data.php:1987
150
  #, php-format
151
  msgctxt "error_log"
152
  msgid "DEBUG: mla_query_posts_search_filter not numeric, = \"%1$s\"."
153
  msgstr ""
154
 
155
  #. translators: 1: where filter details
156
+ #: includes/class-mla-data.php:2049
157
  #, php-format
158
  msgid "mla_query_posts_where_filter = \"%1$s\"."
159
  msgstr ""
160
 
161
  #. translators: 1: where filter details
162
+ #: includes/class-mla-data.php:2052
163
  #, php-format
164
  msgctxt "error_log"
165
  msgid "DEBUG: mla_query_posts_where_filter = \"%1$s\"."
166
  msgstr ""
167
 
168
  #. translators: 1: join filter details
169
+ #: includes/class-mla-data.php:2103
170
  #, php-format
171
  msgid "mla_query_posts_join_filter = \"%1$s\"."
172
  msgstr ""
173
 
174
  #. translators: 1: join filter details
175
+ #: includes/class-mla-data.php:2106
176
  #, php-format
177
  msgctxt "error_log"
178
  msgid "DEBUG: mla_query_posts_join_filter = \"%1$s\"."
179
  msgstr ""
180
 
181
  #. translators: 1: orderby details details
182
+ #: includes/class-mla-data.php:2205
183
  #, php-format
184
  msgid "mla_query_posts_orderby_filter = \"%1$s\"."
185
  msgstr ""
186
 
187
  #. translators: 1: orderby details details
188
+ #: includes/class-mla-data.php:2208
189
  #, php-format
190
  msgctxt "error_log"
191
  msgid "DEBUG: mla_query_posts_orderby_filter = \"%1$s\"."
192
  msgstr ""
193
 
194
  #. translators: 1: SQL clauses
195
+ #: includes/class-mla-data.php:2244
196
  #, php-format
197
  msgid "mla_query_posts_clauses_filter = \"%1$s\"."
198
  msgstr ""
199
 
200
  #. translators: 1: SQL clauses
201
+ #: includes/class-mla-data.php:2247
202
  #, php-format
203
  msgctxt "error_log"
204
  msgid "DEBUG: mla_query_posts_clauses_filter = \"%1$s\"."
205
  msgstr ""
206
 
207
  #. translators: 1: SQL clauses
208
+ #: includes/class-mla-data.php:2268
209
  #, php-format
210
  msgid "mla_query_posts_clauses_request_filter = \"%1$s\"."
211
  msgstr ""
212
 
213
  #. translators: 1: SQL clauses
214
+ #: includes/class-mla-data.php:2271
215
  #, php-format
216
  msgctxt "error_log"
217
  msgid "DEBUG: mla_query_posts_clauses_request_filter = \"%1$s\"."
218
  msgstr ""
219
 
220
  #. translators: 1: post ID
221
+ #: includes/class-mla-data.php:2303
222
  #, php-format
223
  msgctxt "error_log"
224
  msgid "ERROR: mla_get_attachment_by_id(%1$d) not found."
225
  msgstr ""
226
 
227
  #. translators: 1: post ID 2: post_type
228
+ #: includes/class-mla-data.php:2309
229
  #, php-format
230
  msgctxt "error_log"
231
  msgid "ERROR: mla_get_attachment_by_id(%1$d) wrong post_type \"%2$s\"."
232
  msgstr ""
233
 
234
+ #: includes/class-mla-data.php:2862 includes/class-mla-list-table.php:830
235
  msgid "NO REFERENCE TESTS"
236
  msgstr ""
237
 
238
+ #: includes/class-mla-data.php:2868 includes/class-mla-options.php:2641
239
+ #: includes/class-mla-options.php:2642
240
  msgid "ORPHAN"
241
  msgstr ""
242
 
243
+ #: includes/class-mla-data.php:2872
244
  msgid "UNUSED"
245
  msgstr ""
246
 
247
+ #: includes/class-mla-data.php:2877
248
  msgid "UNATTACHED"
249
  msgstr ""
250
 
251
+ #: includes/class-mla-data.php:2879
252
  msgid "INVALID PARENT"
253
  msgstr ""
254
 
255
  #. translators: 1: post_type, 2: post_title, 3: post ID, 4: query string, 5: error message
256
+ #: includes/class-mla-data.php:3060
257
  #, php-format
258
  msgid "(%1$s) %2$s (ID %3$d) query \"%4$s\" failed, returning \"%5$s\""
259
  msgstr ""
260
 
261
  #. translators: 1: index
262
+ #: includes/class-mla-data.php:3306
263
  #, php-format
264
  msgctxt "error_log"
265
  msgid "ERROR: _build_pdf_indirect_objects bad value at $index = \"%1$d\"."
266
  msgstr ""
267
 
268
  #. translators: 1: source offset 2: nest level
269
+ #: includes/class-mla-data.php:3631
270
  #, php-format
271
  msgctxt "error_log"
272
  msgid "ERROR: _parse_pdf_dictionary offset = %1$d, nest = %2$d."
273
  msgstr ""
274
 
275
  #. translators: 1: dictionary excerpt
276
+ #: includes/class-mla-data.php:3633
277
  #, php-format
278
  msgctxt "error_log"
279
  msgid "ERROR: _parse_pdf_dictionary no end delimiter dump = %1$s."
280
  msgstr ""
281
 
282
  #. translators: 1: entry name 2: value excerpt
283
+ #: includes/class-mla-data.php:3679
284
  #, php-format
285
  msgctxt "error_log"
286
  msgid "ERROR: _parse_pdf_dictionary bad value [ %1$s ] dump = %2$s"
287
  msgstr ""
288
 
289
+ #: includes/class-mla-data.php:3793
290
  msgctxt "error_log"
291
  msgid "ERROR: _parse_xmp_metadata xml_parse_into_struct failed."
292
  msgstr ""
293
 
294
+ #: includes/class-mla-data.php:3796
295
  msgctxt "error_log"
296
  msgid "ERROR: _parse_xmp_metadata set option failed."
297
  msgstr ""
298
 
299
  #. translators: 1: path and file
300
+ #: includes/class-mla-data.php:4153
301
  #, php-format
302
  msgctxt "error_log"
303
  msgid "ERROR: File \"%1$s\", startxref not found."
304
  msgstr ""
305
 
306
  #. translators: 1: meta_key
307
+ #: includes/class-mla-data.php:5070
308
  #, php-format
309
  msgid "Deleting meta:%1$s"
310
  msgstr ""
311
 
312
  #. translators: 1: meta_key
313
+ #: includes/class-mla-data.php:5073
314
  #, php-format
315
  msgid "ERROR: meta:%1$s not found"
316
  msgstr ""
317
 
318
  #. translators: 1: meta_key 2: meta_value
319
+ #: includes/class-mla-data.php:5082
320
  #, php-format
321
  msgid "Adding meta:%1$s = %2$s"
322
  msgstr ""
323
 
324
  #. translators: 1: meta_key
325
+ #: includes/class-mla-data.php:5086
326
  #, php-format
327
  msgid "ERROR: Adding meta:%1$s; not found"
328
  msgstr ""
329
 
330
  #. translators: 1: meta_key
331
+ #: includes/class-mla-data.php:5093
332
  #, php-format
333
  msgid "Deleting Null meta:%1$s"
334
  msgstr ""
335
 
336
  #. translators: 1: element name 2: old_value 3: new_value
337
+ #: includes/class-mla-data.php:5103 includes/class-mla-data.php:5254
338
+ #: includes/class-mla-data.php:5315 includes/class-mla-data.php:5341
339
+ #: includes/class-mla-data.php:5375 includes/class-mla-data.php:5388
340
+ #: includes/class-mla-data.php:5397 includes/class-mla-data.php:5408
341
+ #: includes/class-mla-data.php:5419 includes/class-mla-data.php:5432
342
+ #: includes/class-mla-data.php:5441 includes/class-mla-data.php:5450
343
  #: includes/class-mla-mime-types.php:1052
344
  #: includes/class-mla-mime-types.php:2125
345
  #, php-format
347
  msgstr ""
348
 
349
  #. translators: 1: meta_key
350
+ #: includes/class-mla-data.php:5108
351
  #, php-format
352
  msgid "ERROR: Changing meta:%1$s; not found"
353
  msgstr ""
354
 
355
  #. translators: 1: meta_key
356
+ #: includes/class-mla-data.php:5168
357
  #, php-format
358
  msgid "Deleting %1$s"
359
  msgstr ""
360
 
361
  #. translators: 1: meta_key 2: new_value
362
+ #: includes/class-mla-data.php:5179
363
  #, php-format
364
  msgid "Adding %1$s = [%2$s]"
365
  msgstr ""
366
 
367
  #. translators: 1: meta_key 2: meta_value
368
+ #: includes/class-mla-data.php:5185
369
  #, php-format
370
  msgid "Adding %1$s = %2$s"
371
  msgstr ""
372
 
373
  #. translators: 1: meta_key
374
+ #: includes/class-mla-data.php:5209
375
  #, php-format
376
  msgid "Deleting old %1$s values"
377
  msgstr ""
378
 
379
  #. translators: 1: meta_key 2: old_value 3: new_value 4: update count
380
+ #: includes/class-mla-data.php:5239
381
  #, php-format
382
  msgid "Changing %1$s from \"%2$s\" to \"%3$s\"; %4$d updates"
383
  msgstr ""
384
 
385
+ #: includes/class-mla-data.php:5297 includes/class-mla-main.php:1892
386
  msgid "ERROR: Could not retrieve Attachment."
387
  msgstr ""
388
 
389
+ #: includes/class-mla-data.php:5315 includes/class-mla-main.php:1305
390
  #: includes/class-mla-main.php:1549 includes/class-mla-main.php:1739
391
  #: includes/class-mla-main.php:2110 includes/class-mla-objects.php:275
392
+ #: includes/class-mla-options.php:1017 includes/class-mla-options.php:1777
393
  #: includes/mla-main-search-box-template.php:42
394
  #: includes/mla-media-modal-js-template.php:32
395
  msgid "Title"
396
  msgstr ""
397
 
398
  #. translators: 1: old_value
399
+ #: includes/class-mla-data.php:5338
400
  #, php-format
401
  msgid "ERROR: Could not change Name/Slug \"%1$s\"; name already exists"
402
  msgstr ""
403
 
404
+ #: includes/class-mla-data.php:5341 includes/class-mla-main.php:1740
405
+ #: includes/class-mla-main.php:2113 includes/class-mla-options.php:1024
406
  msgid "Name/Slug"
407
  msgstr ""
408
 
409
  #. translators: 1: old_value
410
+ #: includes/class-mla-data.php:5367
411
  #, php-format
412
  msgid "Deleting ALT Text, was \"%1$s\""
413
  msgstr ""
414
 
415
  #. translators: 1: old_value
416
+ #: includes/class-mla-data.php:5370
417
  #, php-format
418
  msgid "ERROR: Could not delete ALT Text, remains \"%1$s\""
419
  msgstr ""
420
 
421
+ #: includes/class-mla-data.php:5375 includes/class-mla-list-table.php:1069
422
  #: includes/class-mla-main.php:1743 includes/class-mla-main.php:2116
423
+ #: includes/class-mla-options.php:1031 includes/class-mla-options.php:1783
424
  #: includes/mla-main-search-box-template.php:44
425
  #: includes/mla-media-modal-js-template.php:40
426
  msgid "ALT Text"
427
  msgstr ""
428
 
429
  #. translators: 1: old_value 2: new_value
430
+ #: includes/class-mla-data.php:5378
431
  #, php-format
432
  msgid "ERROR: Could not change ALT Text from \"%1$s\" to \"%2$s\""
433
  msgstr ""
434
 
435
+ #: includes/class-mla-data.php:5388 includes/class-mla-main.php:1741
436
+ #: includes/class-mla-main.php:2119 includes/class-mla-options.php:1038
437
+ #: includes/class-mla-options.php:1786
438
  #: includes/mla-main-search-box-template.php:45
439
  #: includes/mla-media-modal-js-template.php:45
440
  msgid "Caption"
441
  msgstr ""
442
 
443
+ #: includes/class-mla-data.php:5397 includes/class-mla-main.php:1742
444
+ #: includes/class-mla-main.php:2121 includes/class-mla-options.php:1045
445
+ #: includes/class-mla-options.php:1789 includes/class-mla-settings.php:1158
446
  #: includes/class-mla-settings.php:1415 includes/class-mla-settings.php:1514
447
  #: includes/class-mla-settings.php:1878
448
  #: includes/mla-main-search-box-template.php:46
450
  msgid "Description"
451
  msgstr ""
452
 
453
+ #: includes/class-mla-data.php:5408 includes/class-mla-list-table.php:804
454
+ #: includes/class-mla-list-table.php:896 includes/class-mla-options.php:4099
455
+ #: includes/class-mla-options.php:4439
456
  msgid "Parent"
457
  msgstr ""
458
 
459
+ #: includes/class-mla-data.php:5419 includes/class-mla-edit-media.php:307
460
  #: includes/class-mla-edit-media.php:447 includes/class-mla-main.php:1746
461
  #: includes/class-mla-main.php:2127 includes/class-mla-settings.php:1156
462
  #: includes/class-mla-settings.php:1413
463
  msgid "Menu Order"
464
  msgstr ""
465
 
466
+ #: includes/class-mla-data.php:5432 includes/class-mla-list-table.php:1218
467
  #: includes/class-mla-main.php:1616 includes/class-mla-main.php:1718
468
  #: includes/class-mla-main.php:1941
469
  msgid "Author"
470
  msgstr ""
471
 
472
+ #: includes/class-mla-data.php:5441 includes/class-mla-main.php:1757
473
  msgid "Comments"
474
  msgstr ""
475
 
476
+ #: includes/class-mla-data.php:5450 includes/class-mla-main.php:1758
477
  msgid "Pings"
478
  msgstr ""
479
 
480
+ #: includes/class-mla-data.php:5484
481
  msgid "Adding"
482
  msgstr ""
483
 
484
+ #: includes/class-mla-data.php:5488
485
  msgid "Removing"
486
  msgstr ""
487
 
488
+ #: includes/class-mla-data.php:5493
489
  msgid "Replacing"
490
  msgstr ""
491
 
492
+ #: includes/class-mla-data.php:5497
493
  msgid "Ignoring"
494
  msgstr ""
495
 
496
  #. translators: 1: action_name, 2: taxonomy
497
+ #: includes/class-mla-data.php:5509
498
  #, php-format
499
  msgid "%1$s \"%2$s\" terms"
500
  msgstr ""
501
 
502
  #. translators: 1: taxonomy
503
+ #: includes/class-mla-data.php:5513
504
  #, php-format
505
  msgid "You cannot assign \"%1$s\" terms"
506
  msgstr ""
507
 
508
  #. translators: 1: post ID
509
+ #: includes/class-mla-data.php:5525
510
  #, php-format
511
  msgid "Item %1$d, no changes detected."
512
  msgstr ""
513
 
514
  #. translators: 1: post ID
515
+ #: includes/class-mla-data.php:5537
516
  #, php-format
517
  msgid "Item %1$d updated."
518
  msgstr ""
519
 
520
  #. translators: 1: post ID
521
+ #: includes/class-mla-data.php:5551
522
  #, php-format
523
  msgid "ERROR: Item %1$d update failed."
524
  msgstr ""
525
 
526
+ #: includes/class-mla-data.php:5574 includes/class-mla-edit-media.php:125
527
  #: includes/class-mla-edit-media.php:170 includes/class-mla-main.php:330
528
  #: includes/class-mla-main.php:358 includes/class-mla-main.php:1444
529
  #: includes/class-mla-settings.php:311 includes/class-mla-settings.php:329
582
  msgstr ""
583
 
584
  #: includes/class-mla-edit-media.php:318 includes/class-mla-edit-media.php:505
585
+ #: includes/class-mla-main.php:2134 includes/class-mla-options.php:462
586
  msgid "Featured in"
587
  msgstr ""
588
 
589
  #: includes/class-mla-edit-media.php:322 includes/class-mla-edit-media.php:544
590
+ #: includes/class-mla-main.php:2136 includes/class-mla-options.php:471
591
  msgid "Inserted in"
592
  msgstr ""
593
 
594
  #: includes/class-mla-edit-media.php:326 includes/class-mla-edit-media.php:579
595
+ #: includes/class-mla-main.php:2138 includes/class-mla-options.php:480
596
  #: includes/class-mla-settings.php:3335
597
  msgid "Gallery in"
598
  msgstr ""
599
 
600
  #: includes/class-mla-edit-media.php:330 includes/class-mla-edit-media.php:614
601
+ #: includes/class-mla-main.php:2140 includes/class-mla-options.php:489
602
  #: includes/class-mla-settings.php:3345
603
  msgid "MLA Gallery in"
604
  msgstr ""
764
  msgstr ""
765
 
766
  #: includes/class-mla-list-table.php:513
767
+ #: includes/class-mla-list-table.php:1127 includes/class-mla-options.php:593
768
+ #: includes/class-mla-options.php:775 includes/class-mla-options.php:799
769
+ #: includes/class-mla-options.php:813 includes/class-mla-settings.php:1962
770
  msgid "None"
771
  msgstr ""
772
 
826
  msgstr ""
827
 
828
  #: includes/class-mla-list-table.php:677 includes/class-mla-main.php:1738
829
+ #: includes/class-mla-options.php:3202 includes/class-mla-options.php:3474
830
  #: includes/class-mla-upload-list-table.php:314
831
  #: includes/class-mla-view-list-table.php:304
832
  msgid "Quick Edit"
877
  #: includes/class-mla-list-table.php:997
878
  #: includes/class-mla-list-table.php:1031 includes/class-mla-main.php:1962
879
  #: includes/class-mla-main.php:1982 includes/class-mla-main.php:1998
880
+ #: includes/class-mla-main.php:2014 includes/class-mla-options.php:466
881
+ #: includes/class-mla-options.php:475 includes/class-mla-options.php:484
882
+ #: includes/class-mla-options.php:493
883
  msgid "Disabled"
884
  msgstr ""
885
 
919
  msgid "Filter by Author ID"
920
  msgstr ""
921
 
922
+ #: includes/class-mla-list-table.php:1254 includes/class-mla-options.php:1134
923
  msgctxt "post_mime_types_singular"
924
  msgid "Unattached"
925
  msgstr ""
1100
  msgid "All Post Types"
1101
  msgstr ""
1102
 
1103
+ #: includes/class-mla-main.php:1541 includes/class-mla-media-modal.php:1227
1104
  #: includes/mla-media-modal-js-template.php:20
1105
+ #: includes/mla-media-modal-js-template.php:61
1106
  msgid "Search"
1107
  msgstr ""
1108
 
1145
  msgstr ""
1146
 
1147
  #: includes/class-mla-main.php:1657 includes/class-mla-main.php:1695
1148
+ #: includes/class-mla-options.php:3300 includes/class-mla-options.php:3397
1149
+ #: includes/class-mla-options.php:3439 includes/class-mla-options.php:4328
1150
+ #: includes/class-mla-options.php:4378 includes/class-mla-options.php:4475
1151
+ #: includes/class-mla-options.php:4519 includes/class-mla-options.php:4544
1152
  msgid "Replace"
1153
  msgstr ""
1154
 
1156
  msgid "Parent ID"
1157
  msgstr ""
1158
 
1159
+ #: includes/class-mla-main.php:1753 includes/class-mla-options.php:3216
1160
+ #: includes/class-mla-options.php:3475 includes/class-mla-settings.php:1422
1161
  #: includes/class-mla-settings.php:1887
1162
  msgid "Bulk Edit"
1163
  msgstr ""
1273
  msgid "ERROR: Item %1$d could NOT be moved to Trash."
1274
  msgstr ""
1275
 
1276
+ #: includes/class-mla-media-modal.php:244
1277
+ #: includes/class-mla-media-modal.php:250
1278
+ #: includes/class-mla-media-modal.php:830
1279
+ #: includes/class-mla-media-modal.php:864
1280
+ #: includes/class-mla-media-modal.php:909
1281
  msgid "Click to toggle"
1282
  msgstr ""
1283
 
1284
+ #: includes/class-mla-media-modal.php:287
1285
  msgid "Show all dates"
1286
  msgstr ""
1287
 
1288
  #. translators: 1: month name, 2: 4-digit year
1289
+ #: includes/class-mla-media-modal.php:302
1290
  #, php-format
1291
  msgid "%1$s %2$d"
1292
  msgstr ""
1293
 
1294
+ #: includes/class-mla-media-modal.php:413
1295
+ msgctxt "tag delimiter"
1296
+ msgid ","
1297
+ msgstr ""
1298
+
1299
+ #: includes/class-mla-media-modal.php:518
1300
  msgid "Search Box"
1301
  msgstr ""
1302
 
1303
+ #: includes/class-mla-media-modal.php:519
1304
  msgid "Loading..."
1305
  msgstr ""
1306
 
1307
+ #: includes/class-mla-media-modal.php:875
1308
  msgid "Tags"
1309
  msgstr ""
1310
 
1311
  #. translators: %s: add new taxonomy label
1312
+ #: includes/class-mla-media-modal.php:877
1313
  #, php-format
1314
  msgid "Add New %1$s"
1315
  msgstr ""
1316
 
1317
+ #: includes/class-mla-media-modal.php:893
1318
  msgid "Choose from the most used tags"
1319
  msgstr ""
1320
 
1321
+ #: includes/class-mla-media-modal.php:915
1322
  msgid "Not Supported"
1323
  msgstr ""
1324
 
1325
+ #: includes/class-mla-media-modal.php:1210
1326
+ #: includes/class-mla-media-modal.php:1226
1327
  msgid "Search Terms"
1328
  msgstr ""
1329
 
1330
+ #: includes/class-mla-media-modal.php:1211
1331
  msgid "There are no taxonomies to search"
1332
  msgstr ""
1333
 
1334
+ #: includes/class-mla-media-modal.php:1229
1335
  msgid "All phrases"
1336
  msgstr ""
1337
 
1338
+ #: includes/class-mla-media-modal.php:1231
1339
  msgid "Any phrase"
1340
  msgstr ""
1341
 
1342
+ #: includes/class-mla-media-modal.php:1233
1343
  msgid "All terms"
1344
  msgstr ""
1345
 
1346
+ #: includes/class-mla-media-modal.php:1235
1347
  msgid "Any term"
1348
  msgstr ""
1349
 
1705
  msgid "Automatically add paragraphs"
1706
  msgstr ""
1707
 
1708
+ #: includes/class-mla-options.php:375
1709
  msgid "error loading tpls/mla-option-templates.tpl"
1710
  msgstr ""
1711
 
1712
+ #: includes/class-mla-options.php:378
1713
  msgid "tpls/mla-option-templates.tpl not found"
1714
  msgstr ""
1715
 
1716
+ #: includes/class-mla-options.php:431 includes/class-mla-options.php:1616
1717
  msgid "Attachment Categories"
1718
  msgstr ""
1719
 
1720
+ #: includes/class-mla-options.php:434
1721
  msgid "Check this option to add support for Attachment Categories."
1722
  msgstr ""
1723
 
1724
+ #: includes/class-mla-options.php:438 includes/class-mla-options.php:1631
1725
  msgid "Attachment Tags"
1726
  msgstr ""
1727
 
1728
+ #: includes/class-mla-options.php:441
1729
  msgid "Check this option to add support for Attachment Tags."
1730
  msgstr ""
1731
 
1732
+ #: includes/class-mla-options.php:445 includes/class-mla-settings.php:986
1733
  msgid "Where-used Reporting"
1734
  msgstr ""
1735
 
1736
+ #: includes/class-mla-options.php:450
1737
  msgid "Exclude Revisions"
1738
  msgstr ""
1739
 
1740
+ #: includes/class-mla-options.php:453
1741
  msgid "Check this option to exclude revisions from where-used reporting."
1742
  msgstr ""
1743
 
1744
+ #: includes/class-mla-options.php:457
1745
  msgid "Where-used database access tuning"
1746
  msgstr ""
1747
 
1748
+ #: includes/class-mla-options.php:466 includes/class-mla-options.php:475
1749
  msgid "Enabled"
1750
  msgstr ""
1751
 
1752
+ #: includes/class-mla-options.php:467
1753
  msgid "Search database posts and pages for Featured Image attachments."
1754
  msgstr ""
1755
 
1756
+ #: includes/class-mla-options.php:475
1757
  msgid "Base"
1758
  msgstr ""
1759
 
1760
+ #: includes/class-mla-options.php:476
1761
  msgid ""
1762
  "Search database posts and pages for attachments embedded in content."
1763
  "<br>&nbsp;&nbsp;Base = ignore intermediate size suffixes; use path, base "
1764
  "name and extension only."
1765
  msgstr ""
1766
 
1767
+ #: includes/class-mla-options.php:484 includes/class-mla-options.php:493
1768
  msgid "Dynamic"
1769
  msgstr ""
1770
 
1771
+ #: includes/class-mla-options.php:484 includes/class-mla-options.php:493
1772
  msgid "Refresh"
1773
  msgstr ""
1774
 
1775
+ #: includes/class-mla-options.php:484 includes/class-mla-options.php:493
1776
  msgid "Cached"
1777
  msgstr ""
1778
 
1779
+ #: includes/class-mla-options.php:485
1780
  msgid ""
1781
  "Search database posts and pages for [gallery] shortcode results.<br>&nbsp;"
1782
  "&nbsp;Dynamic = once every page load, Cached = once every login, Disabled = "
1783
  "never.<br>&nbsp;&nbsp;Refresh = update references, then set to Cached."
1784
  msgstr ""
1785
 
1786
+ #: includes/class-mla-options.php:494
1787
  msgid ""
1788
  "Search database posts and pages for [mla_gallery] shortcode results."
1789
  "<br>&nbsp;&nbsp;Dynamic = once every page load, Cached = once every login, "
1791
  "Cached."
1792
  msgstr ""
1793
 
1794
+ #: includes/class-mla-options.php:498 includes/class-mla-settings.php:986
1795
  msgid "Taxonomy Support"
1796
  msgstr ""
1797
 
1798
+ #: includes/class-mla-options.php:503
1799
  msgid "Compute Attachments Column"
1800
  msgstr ""
1801
 
1802
+ #: includes/class-mla-options.php:506
1803
  msgid ""
1804
  "Check this option to calculate attachments per term in the Attachments "
1805
  "Column."
1806
  msgstr ""
1807
 
1808
+ #: includes/class-mla-options.php:510
1809
  msgid ""
1810
  "Check the \"Support\" box to add the taxonomy to the Assistant and the Edit "
1811
  "Media screen."
1812
  msgstr ""
1813
 
1814
+ #: includes/class-mla-options.php:511 includes/class-mla-options.php:517
1815
  msgid ""
1816
  "Check the \"Inline Edit\" box to display the taxonomy in the Quick Edit and "
1817
  "Bulk Edit areas."
1818
  msgstr ""
1819
 
1820
+ #: includes/class-mla-options.php:512
1821
  msgid ""
1822
  "Check the \"Checklist\" box to enable the checklist-style meta box for a "
1823
  "flat taxonomy."
1824
  msgstr ""
1825
 
1826
+ #: includes/class-mla-options.php:513
1827
  msgid ""
1828
  "You must also check the <strong>\"Enable enhanced checklist taxonomies\"</"
1829
  "strong> box below to enable this feature."
1830
  msgstr ""
1831
 
1832
+ #: includes/class-mla-options.php:514
1833
  msgid ""
1834
  "Check the \"Term Search\" box to add the taxonomy to the \"Search Media/Terms"
1835
  "\" list."
1836
  msgstr ""
1837
 
1838
+ #: includes/class-mla-options.php:515 includes/class-mla-options.php:685
1839
  #: includes/class-mla-settings.php:1018 includes/class-mla-settings.php:1019
1840
  msgid "For complete documentation"
1841
  msgstr ""
1842
 
1843
+ #: includes/class-mla-options.php:515 includes/class-mla-options.php:685
1844
  #: includes/class-mla-settings.php:1018 includes/class-mla-settings.php:1019
1845
  msgid "click here"
1846
  msgstr ""
1847
 
1848
+ #: includes/class-mla-options.php:518
1849
  msgid ""
1850
  "Use the \"List Filter\" option to select the taxonomy on which to filter the "
1851
  "Assistant table listing."
1852
  msgstr ""
1853
 
1854
+ #: includes/class-mla-options.php:543
1855
  msgid "Media/Assistant Screen Options"
1856
  msgstr ""
1857
 
1858
+ #: includes/class-mla-options.php:548
1859
  msgid "Admin Menu Options"
1860
  msgstr ""
1861
 
1862
+ #: includes/class-mla-options.php:553
1863
  msgid "Page Title"
1864
  msgstr ""
1865
 
1866
+ #: includes/class-mla-options.php:555 includes/class-mla-settings.php:360
1867
  #: includes/class-mla-settings.php:2559
1868
  msgid "Media Library Assistant"
1869
  msgstr ""
1870
 
1871
+ #: includes/class-mla-options.php:557
1872
  msgid "Enter the title for the Media/Assistant submenu page"
1873
  msgstr ""
1874
 
1875
+ #: includes/class-mla-options.php:561
1876
  msgid "Menu Title"
1877
  msgstr ""
1878
 
1879
+ #: includes/class-mla-options.php:563
1880
  msgid "Assistant"
1881
  msgstr ""
1882
 
1883
+ #: includes/class-mla-options.php:565
1884
  msgid "Enter the title for the Media/Assistant submenu entry"
1885
  msgstr ""
1886
 
1887
+ #: includes/class-mla-options.php:569
1888
  msgid "Submenu Order"
1889
  msgstr ""
1890
 
1891
+ #: includes/class-mla-options.php:573
1892
  msgid ""
1893
  "Enter the position of the Media/Assistant submenu entry.<br>&nbsp;&nbsp;0 = "
1894
  "natural order (at bottom),&nbsp;&nbsp;&nbsp;&nbsp;1 - 4 = at top<br>&nbsp;"
1896
  "\""
1897
  msgstr ""
1898
 
1899
+ #: includes/class-mla-options.php:577
1900
  msgid "Display Media/Library"
1901
  msgstr ""
1902
 
1903
+ #: includes/class-mla-options.php:580
1904
  msgid ""
1905
  "Check/uncheck this option to display/remove the WordPress Media/Library "
1906
  "submenu entry."
1907
  msgstr ""
1908
 
1909
+ #: includes/class-mla-options.php:584
1910
  msgid "Table Defaults"
1911
  msgstr ""
1912
 
1913
+ #: includes/class-mla-options.php:589
1914
  msgid "Order By"
1915
  msgstr ""
1916
 
1917
+ #: includes/class-mla-options.php:593 includes/class-mla-options.php:775
1918
  msgid "Title/Name"
1919
  msgstr ""
1920
 
1921
+ #: includes/class-mla-options.php:594
1922
  msgid "Select the column for the sort order of the Assistant table listing."
1923
  msgstr ""
1924
 
1925
+ #: includes/class-mla-options.php:598
1926
  msgid "Order"
1927
  msgstr ""
1928
 
1929
+ #: includes/class-mla-options.php:602
1930
  msgid "Ascending"
1931
  msgstr ""
1932
 
1933
+ #: includes/class-mla-options.php:602
1934
  msgid "Descending"
1935
  msgstr ""
1936
 
1937
+ #: includes/class-mla-options.php:603 includes/class-mla-options.php:785
1938
  msgid "Choose the sort order."
1939
  msgstr ""
1940
 
1941
+ #: includes/class-mla-options.php:607
1942
  msgid "Views Width"
1943
  msgstr ""
1944
 
1945
+ #: includes/class-mla-options.php:611
1946
  msgid "Enter the width for the views list, in pixels (px) or percent (%)"
1947
  msgstr ""
1948
 
1949
+ #: includes/class-mla-options.php:615
1950
  msgid "Icon Size"
1951
  msgstr ""
1952
 
1953
+ #: includes/class-mla-options.php:619
1954
  msgid "Enter the size of the thumbnail/icon images, in pixels"
1955
  msgstr ""
1956
 
1957
+ #: includes/class-mla-options.php:623
1958
  msgid "Taxonomy Filter parameters"
1959
  msgstr ""
1960
 
1961
+ #: includes/class-mla-options.php:628
1962
  msgid "Maximum Depth"
1963
  msgstr ""
1964
 
1965
+ #: includes/class-mla-options.php:632
1966
  msgid ""
1967
  "Enter the number of levels displayed for hierarchial taxonomies; enter zero "
1968
  "for no limit."
1969
  msgstr ""
1970
 
1971
+ #: includes/class-mla-options.php:636
1972
  msgid "Include Children"
1973
  msgstr ""
1974
 
1975
+ #: includes/class-mla-options.php:639
1976
  msgid ""
1977
  "Check/uncheck this option to include/exclude children for hierarchical "
1978
  "taxonomies."
1979
  msgstr ""
1980
 
1981
+ #: includes/class-mla-options.php:643
1982
  msgid "Search Media Defaults"
1983
  msgstr ""
1984
 
1985
+ #: includes/class-mla-options.php:648
1986
  msgid "Display Search Controls"
1987
  msgstr ""
1988
 
1989
+ #: includes/class-mla-options.php:651 includes/class-mla-options.php:746
1990
  msgid ""
1991
  "Check/uncheck this option to display/hide the and/or connector and search "
1992
  "fields controls."
1993
  msgstr ""
1994
 
1995
+ #: includes/class-mla-options.php:655
1996
  msgid ""
1997
  "Use these controls to set defaults for the and/or connector and search "
1998
  "fields controls.<br>These defaults will be used for the Search Media boxes "
1999
  "on both the Media/Assistant submenu<br>and the Media Manager Modal Window."
2000
  msgstr ""
2001
 
2002
+ #: includes/class-mla-options.php:668
2003
  msgid "Media/Edit Media Enhancements"
2004
  msgstr ""
2005
 
2006
+ #: includes/class-mla-options.php:673
2007
  msgid "Enable enhanced \"checklist\" taxonomies"
2008
  msgstr ""
2009
 
2010
+ #: includes/class-mla-options.php:676
2011
  msgid ""
2012
  "Check this option to enable the \"? Search\" feature for hierarchical "
2013
  "taxonomies, e.g., Att. Categories.<br>&nbsp;&nbsp;This option also enables "
2014
  "the \"checklist-style\" support for flat taxonomies, e.g., Att. Tags."
2015
  msgstr ""
2016
 
2017
+ #: includes/class-mla-options.php:680
2018
  msgid "Enable Edit Media additional meta boxes"
2019
  msgstr ""
2020
 
2021
+ #: includes/class-mla-options.php:683
2022
  msgid ""
2023
  "Check this option to add \"Parent Info\", \"Menu Order\", \"Attachment "
2024
  "Metadata\" and four \"where-used\" meta boxes to the Edit Media screen."
2025
  msgstr ""
2026
 
2027
+ #: includes/class-mla-options.php:684
2028
  msgid "You can also use Filters to customize the meta boxes."
2029
  msgstr ""
2030
 
2031
+ #: includes/class-mla-options.php:689
2032
+ msgid "Media Manager/Media Grid Enhancements"
2033
  msgstr ""
2034
 
2035
+ #: includes/class-mla-options.php:694
2036
+ msgid "Enable Media Grid Enhancements"
2037
+ msgstr ""
2038
+
2039
+ #: includes/class-mla-options.php:697
2040
+ msgid ""
2041
+ "Check/uncheck this option to enable/disable Media Library Grid View "
2042
+ "Enhancements."
2043
+ msgstr ""
2044
+
2045
+ #: includes/class-mla-options.php:701
2046
  msgid "Enable Media Manager Enhancements"
2047
  msgstr ""
2048
 
2049
+ #: includes/class-mla-options.php:704
2050
+ msgid ""
2051
+ "Check/uncheck this option to enable/disable Media Manager Modal Window "
2052
+ "Enhancements."
2053
  msgstr ""
2054
 
2055
+ #: includes/class-mla-options.php:708
2056
  msgid "Media Manager Enhanced MIME Type filter"
2057
  msgstr ""
2058
 
2059
+ #: includes/class-mla-options.php:711
2060
  msgid ""
2061
  "Check this option to filter by more MIME Types, e.g., text, applications."
2062
  msgstr ""
2063
 
2064
+ #: includes/class-mla-options.php:715
2065
  msgid "Media Manager Month and Year filter"
2066
  msgstr ""
2067
 
2068
+ #: includes/class-mla-options.php:718
2069
  msgid "Check this option to filter by month and year uploaded."
2070
  msgstr ""
2071
 
2072
+ #: includes/class-mla-options.php:722
2073
  msgid "Media Manager Category/Tag filter"
2074
  msgstr ""
2075
 
2076
+ #: includes/class-mla-options.php:725
2077
  msgid "Check this option to filter by taxonomy terms."
2078
  msgstr ""
2079
 
2080
+ #: includes/class-mla-options.php:729
2081
  msgid "Media Manager Terms Search popup"
2082
  msgstr ""
2083
 
2084
+ #: includes/class-mla-options.php:732
2085
  msgid "Check this option to enable the \"Terms Search\" popup window."
2086
  msgstr ""
2087
 
2088
+ #: includes/class-mla-options.php:736
2089
  msgid "Media Manager Enhanced Search Media box"
2090
  msgstr ""
2091
 
2092
+ #: includes/class-mla-options.php:739
2093
  msgid "Check this option to enable search box enhancements."
2094
  msgstr ""
2095
 
2096
+ #: includes/class-mla-options.php:743
2097
  msgid "Media Manager Enhanced Search Media Controls"
2098
  msgstr ""
2099
 
2100
+ #: includes/class-mla-options.php:750
2101
  msgid "Media Manager Checklist meta boxes"
2102
  msgstr ""
2103
 
2104
+ #: includes/class-mla-options.php:753
2105
  msgid ""
2106
  "Check this option to enable MLA-enhanced meta boxes in the \"ATTACHMENT "
2107
  "DETAILS\" pane.<br>&nbsp;&nbsp;This option is for any taxonomy that uses a "
2108
  "<strong>\"checklist-style\"</strong> meta box.</strong>"
2109
  msgstr ""
2110
 
2111
+ #: includes/class-mla-options.php:757
2112
  msgid "Media Manager Flat meta boxes"
2113
  msgstr ""
2114
 
2115
+ #: includes/class-mla-options.php:760
2116
  msgid ""
2117
  "Check this option to enable MLA-enhanced meta boxes in the \"ATTACHMENT "
2118
  "DETAILS\" pane.<br>&nbsp;&nbsp;This option is for <strong>flat taxonomies</"
2120
  "style\" meta box."
2121
  msgstr ""
2122
 
2123
+ #: includes/class-mla-options.php:764
2124
+ msgid "Media Manager auto-fill meta boxes"
2125
+ msgstr ""
2126
+
2127
+ #: includes/class-mla-options.php:767
2128
+ msgid ""
2129
+ "Check this option to automatically fill MLA-enhanced meta boxes in the "
2130
+ "\"ATTACHMENT DETAILS\" pane<br>&nbsp;&nbsp;when the item is selected."
2131
+ msgstr ""
2132
+
2133
+ #: includes/class-mla-options.php:771
2134
  msgid "Media Manager Order By"
2135
  msgstr ""
2136
 
2137
+ #: includes/class-mla-options.php:775 includes/class-mla-options.php:784
2138
+ #: includes/class-mla-options.php:799 includes/class-mla-options.php:813
2139
+ #: includes/class-mla-options.php:827 includes/class-mla-settings.php:1068
2140
  msgid "Media Manager Default"
2141
  msgstr ""
2142
 
2143
+ #: includes/class-mla-options.php:776
2144
  msgid ""
2145
  "If you want to override the Media Manager default,<br>&nbsp;&nbsp;select a "
2146
  "column for the sort order of the Media Library listing."
2147
  msgstr ""
2148
 
2149
+ #: includes/class-mla-options.php:780
2150
  msgid "Media Manager Order"
2151
  msgstr ""
2152
 
2153
+ #: includes/class-mla-options.php:789
2154
  msgid "Attachment Display Settings"
2155
  msgstr ""
2156
 
2157
  #. translators: 1: option name, e.g., Alignment, Link To or Size
2158
+ #: includes/class-mla-options.php:794 includes/class-mla-options.php:796
2159
  msgid "Alignment"
2160
  msgstr ""
2161
 
2162
+ #: includes/class-mla-options.php:799
2163
  msgid "Left"
2164
  msgstr ""
2165
 
2166
+ #: includes/class-mla-options.php:799
2167
  msgid "Center"
2168
  msgstr ""
2169
 
2170
+ #: includes/class-mla-options.php:799
2171
  msgid "Right"
2172
  msgstr ""
2173
 
2174
  #. translators: 1: option name, e.g., Alignment, Link To or Size
2175
+ #: includes/class-mla-options.php:808 includes/class-mla-options.php:810
2176
  msgid "Link To"
2177
  msgstr ""
2178
 
2179
+ #: includes/class-mla-options.php:813
2180
  msgid "Media File"
2181
  msgstr ""
2182
 
2183
+ #: includes/class-mla-options.php:813
2184
  msgid "Attachment Page"
2185
  msgstr ""
2186
 
2187
+ #: includes/class-mla-options.php:813
2188
  msgid "Custom URL"
2189
  msgstr ""
2190
 
2191
  #. translators: 1: option name, e.g., Alignment, Link To or Size
2192
+ #: includes/class-mla-options.php:822 includes/class-mla-options.php:824
2193
  msgid "Size"
2194
  msgstr ""
2195
 
2196
+ #: includes/class-mla-options.php:827
2197
  msgid "Thumbnail"
2198
  msgstr ""
2199
 
2200
+ #: includes/class-mla-options.php:827
2201
  msgid "Medium"
2202
  msgstr ""
2203
 
2204
+ #: includes/class-mla-options.php:827
2205
  msgid "Large"
2206
  msgstr ""
2207
 
2208
+ #: includes/class-mla-options.php:827
2209
  msgid "Full Size"
2210
  msgstr ""
2211
 
2212
+ #: includes/class-mla-options.php:836
2213
  msgid "Default [mla_gallery] Templates and Settings"
2214
  msgstr ""
2215
 
2216
+ #: includes/class-mla-options.php:841 includes/class-mla-options.php:885
2217
  msgid "Style Template"
2218
  msgstr ""
2219
 
2220
  #. translators: 1: template type 2: shortcode
2221
+ #: includes/class-mla-options.php:847 includes/class-mla-options.php:857
2222
+ #: includes/class-mla-options.php:891 includes/class-mla-options.php:901
2223
  #, php-format
2224
  msgid "Select the default %1$s for your %2$s shortcodes."
2225
  msgstr ""
2226
 
2227
+ #: includes/class-mla-options.php:847 includes/class-mla-options.php:891
2228
  #: includes/class-mla-settings.php:2654 includes/class-mla-settings.php:2665
2229
  #: includes/class-mla-settings.php:2671 includes/class-mla-settings.php:2675
2230
  #: includes/class-mla-settings.php:2704 includes/class-mla-settings.php:2715
2231
  msgid "style template"
2232
  msgstr ""
2233
 
2234
+ #: includes/class-mla-options.php:851 includes/class-mla-options.php:895
2235
  msgid "Markup Template"
2236
  msgstr ""
2237
 
2238
+ #: includes/class-mla-options.php:857 includes/class-mla-options.php:901
2239
  #: includes/class-mla-settings.php:2744 includes/class-mla-settings.php:2757
2240
  #: includes/class-mla-settings.php:2763 includes/class-mla-settings.php:2767
2241
  #: includes/class-mla-settings.php:2836
2242
  msgid "markup template"
2243
  msgstr ""
2244
 
2245
+ #: includes/class-mla-options.php:861 includes/class-mla-options.php:905
2246
  msgid "Default columns"
2247
  msgstr ""
2248
 
2249
+ #: includes/class-mla-options.php:865
2250
  msgid ""
2251
  "Enter the number of [mla_tag_cloud] columns; must be a positive integer."
2252
  msgstr ""
2253
 
2254
+ #: includes/class-mla-options.php:869 includes/class-mla-options.php:913
2255
  msgid "Default mla_margin"
2256
  msgstr ""
2257
 
2258
+ #: includes/class-mla-options.php:873 includes/class-mla-options.php:917
2259
  msgid ""
2260
  "Enter the CSS \"margin\" property value, in length (px, em, pt, etc.), "
2261
  "percent (%), \"auto\" or \"inherit\".<br>&nbsp;&nbsp;Enter \"none\" to "
2262
  "remove the property entirely."
2263
  msgstr ""
2264
 
2265
+ #: includes/class-mla-options.php:877 includes/class-mla-options.php:921
2266
  msgid "Default mla_itemwidth"
2267
  msgstr ""
2268
 
2269
+ #: includes/class-mla-options.php:881 includes/class-mla-options.php:925
2270
  msgid ""
2271
  "Enter the CSS \"width\" property value, in length (px, em, pt, etc.), "
2272
  "percent (%), \"auto\" or \"inherit\".<br>&nbsp;&nbsp;Enter \"calculate"
2276
  "the property entirely."
2277
  msgstr ""
2278
 
2279
+ #: includes/class-mla-options.php:909
2280
  msgid "Enter the number of [mla_gallery] columns; must be a positive integer."
2281
  msgstr ""
2282
 
2283
+ #: includes/class-mla-options.php:945
2284
  msgid "Enable custom field mapping when adding new media"
2285
  msgstr ""
2286
 
2287
+ #: includes/class-mla-options.php:948
2288
  msgid ""
2289
  "Check this option to enable mapping when uploading new media (attachments)."
2290
  "<br>&nbsp;&nbsp;Click Save Changes at the bottom of the screen if you change "
2292
  "buttons on the bulk edit, single edit and settings screens."
2293
  msgstr ""
2294
 
2295
+ #: includes/class-mla-options.php:952
2296
  msgid "Enable custom field mapping when updating media metadata"
2297
  msgstr ""
2298
 
2299
+ #: includes/class-mla-options.php:955 includes/class-mla-options.php:979
2300
  msgid ""
2301
  "Check this option to enable mapping when media (attachments) metadata is "
2302
  "regenerated,<br>&nbsp;&nbsp;e.g., when the Media/Edit Media \"Edit Image\" "
2303
  "functions are used."
2304
  msgstr ""
2305
 
2306
+ #: includes/class-mla-options.php:959
2307
  msgid ""
2308
  "Update the custom field mapping values above, then click Save Changes to "
2309
  "make the updates permanent.<br>You can also make temporary updates and click "
2311
  "saving any rule changes."
2312
  msgstr ""
2313
 
2314
+ #: includes/class-mla-options.php:969
2315
  msgid "Enable IPTC/EXIF Mapping when adding new media"
2316
  msgstr ""
2317
 
2318
+ #: includes/class-mla-options.php:972
2319
  msgid ""
2320
  "Check this option to enable mapping when uploading new media (attachments)."
2321
  "<br>&nbsp;&nbsp;Does NOT affect the operation of the \"Map\" buttons on the "
2322
  "bulk edit, single edit and settings screens."
2323
  msgstr ""
2324
 
2325
+ #: includes/class-mla-options.php:976
2326
  msgid "Enable IPTC/EXIF Mapping when updating media metadata"
2327
  msgstr ""
2328
 
2329
+ #: includes/class-mla-options.php:983
2330
  msgid ""
2331
  "Update the standard field mapping values above, then click <strong>Save "
2332
  "Changes</strong> to make the updates permanent.<br>You can also make "
2335
  "changes."
2336
  msgstr ""
2337
 
2338
+ #: includes/class-mla-options.php:993
2339
  msgid ""
2340
  "Update the taxonomy term mapping values above, then click <strong>Save "
2341
  "Changes</strong> or <strong>Map All Attachments, Taxonomy Terms Now</strong>."
2342
  msgstr ""
2343
 
2344
+ #: includes/class-mla-options.php:1003
2345
  msgid ""
2346
  "<strong>Update</strong> individual custom field mapping values above, or "
2347
  "make several updates and click <strong>Save Changes</strong> below to apply "
2352
  "changes."
2353
  msgstr ""
2354
 
2355
+ #: includes/class-mla-options.php:1013
2356
  msgid "IPTC/EXIF Mapping help"
2357
  msgstr ""
2358
 
2359
+ #: includes/class-mla-options.php:1065
2360
  msgid "Enable View and Post MIME Type Support"
2361
  msgstr ""
2362
 
2363
+ #: includes/class-mla-options.php:1068
2364
  msgid ""
2365
  "Check/uncheck this option to enable/disable Post MIME Type Support, then "
2366
  "click <strong>Save Changes</strong> to record the new setting."
2367
  msgstr ""
2368
 
2369
+ #: includes/class-mla-options.php:1077
2370
  msgid "Post MIME Types help."
2371
  msgstr ""
2372
 
2373
+ #: includes/class-mla-options.php:1080
2374
  msgctxt "post_mime_types_singular"
2375
  msgid "All"
2376
  msgstr ""
2377
 
2378
+ #: includes/class-mla-options.php:1081
2379
  msgctxt "post_mime_types_plural"
2380
  msgid "All"
2381
  msgstr ""
2382
 
2383
+ #: includes/class-mla-options.php:1086 includes/class-mla-options.php:1140
2384
+ #: includes/class-mla-options.php:1149
2385
  msgctxt "post_mime_types_description"
2386
  msgid "Built-in view"
2387
  msgstr ""
2388
 
2389
+ #: includes/class-mla-options.php:1089
2390
  msgctxt "post_mime_types_singular"
2391
  msgid "Image"
2392
  msgstr ""
2393
 
2394
+ #: includes/class-mla-options.php:1090
2395
  msgctxt "post_mime_types_plural"
2396
  msgid "Images"
2397
  msgstr ""
2398
 
2399
+ #: includes/class-mla-options.php:1095
2400
  msgctxt "post_mime_types_description"
2401
  msgid "All image subtypes"
2402
  msgstr ""
2403
 
2404
+ #: includes/class-mla-options.php:1098
2405
  msgctxt "post_mime_types_singular"
2406
  msgid "Audio"
2407
  msgstr ""
2408
 
2409
+ #: includes/class-mla-options.php:1099
2410
  msgctxt "post_mime_types_plural"
2411
  msgid "Audio"
2412
  msgstr ""
2413
 
2414
+ #: includes/class-mla-options.php:1104
2415
  msgctxt "post_mime_types_description"
2416
  msgid "All audio subtypes"
2417
  msgstr ""
2418
 
2419
+ #: includes/class-mla-options.php:1107
2420
  msgctxt "post_mime_types_singular"
2421
  msgid "Video"
2422
  msgstr ""
2423
 
2424
+ #: includes/class-mla-options.php:1108
2425
  msgctxt "post_mime_types_plural"
2426
  msgid "Video"
2427
  msgstr ""
2428
 
2429
+ #: includes/class-mla-options.php:1113
2430
  msgctxt "post_mime_types_description"
2431
  msgid "All video subtypes"
2432
  msgstr ""
2433
 
2434
+ #: includes/class-mla-options.php:1116
2435
  msgctxt "post_mime_types_singular"
2436
  msgid "Text"
2437
  msgstr ""
2438
 
2439
+ #: includes/class-mla-options.php:1117
2440
  msgctxt "post_mime_types_plural"
2441
  msgid "Text"
2442
  msgstr ""
2443
 
2444
+ #: includes/class-mla-options.php:1122
2445
  msgctxt "post_mime_types_description"
2446
  msgid "All text subtypes"
2447
  msgstr ""
2448
 
2449
+ #: includes/class-mla-options.php:1125
2450
  msgctxt "post_mime_types_singular"
2451
  msgid "Application"
2452
  msgstr ""
2453
 
2454
+ #: includes/class-mla-options.php:1126
2455
  msgctxt "post_mime_types_plural"
2456
  msgid "Applications"
2457
  msgstr ""
2458
 
2459
+ #: includes/class-mla-options.php:1131
2460
  msgctxt "post_mime_types_description"
2461
  msgid "All application subtypes"
2462
  msgstr ""
2463
 
2464
+ #: includes/class-mla-options.php:1135
2465
  msgctxt "post_mime_types_plural"
2466
  msgid "Unattached"
2467
  msgstr ""
2468
 
2469
+ #: includes/class-mla-options.php:1143
2470
  msgctxt "post_mime_types_singular"
2471
  msgid "Trash"
2472
  msgstr ""
2473
 
2474
+ #: includes/class-mla-options.php:1144
2475
  msgctxt "post_mime_types_plural"
2476
  msgid "Trash"
2477
  msgstr ""
2478
 
2479
+ #: includes/class-mla-options.php:1155
2480
  msgid "Enable Upload MIME Type Support"
2481
  msgstr ""
2482
 
2483
+ #: includes/class-mla-options.php:1158
2484
  msgid ""
2485
  "Check/uncheck this option to enable/disable Upload MIME Type Support, then "
2486
  "click <strong>Save Changes</strong> to record the new setting."
2487
  msgstr ""
2488
 
2489
+ #: includes/class-mla-options.php:1167
2490
  msgid "Upload MIME Types help."
2491
  msgstr ""
2492
 
2493
+ #: includes/class-mla-options.php:1172
2494
  msgid "Enable MLA File Type Icons Support"
2495
  msgstr ""
2496
 
2497
+ #: includes/class-mla-options.php:1175
2498
  msgid ""
2499
  "Check/uncheck this option to enable/disable MLA File Type Icons Support, "
2500
  "then click <strong>Save Changes</strong> to record the new setting."
2501
  msgstr ""
2502
 
2503
+ #: includes/class-mla-options.php:1202 includes/class-mla-options.php:1224
2504
+ #: includes/class-mla-options.php:1266
2505
  msgid "no templates exist"
2506
  msgstr ""
2507
 
2508
+ #: includes/class-mla-options.php:1210
2509
  msgid "not found"
2510
  msgstr ""
2511
 
2512
  #. translators: 1: option name 2: action, e.g., update, delete, reset
2513
+ #: includes/class-mla-options.php:1583 includes/class-mla-options.php:1747
2514
+ #: includes/class-mla-options.php:1823 includes/class-mla-options.php:3513
2515
+ #: includes/class-mla-options.php:4664
2516
  #, php-format
2517
  msgid "ERROR: Custom %1$s unknown action \"%2$s\""
2518
  msgstr ""
2519
 
2520
+ #: includes/class-mla-options.php:1672
2521
  msgid "Support"
2522
  msgstr ""
2523
 
2524
+ #: includes/class-mla-options.php:1673
2525
  msgid "Inline Edit"
2526
  msgstr ""
2527
 
2528
+ #: includes/class-mla-options.php:1674
2529
  msgid "Checklist"
2530
  msgstr ""
2531
 
2532
+ #: includes/class-mla-options.php:1675
2533
  msgid "Term Search"
2534
  msgstr ""
2535
 
2536
+ #: includes/class-mla-options.php:1676
2537
  msgid "List Filter"
2538
  msgstr ""
2539
 
2540
+ #: includes/class-mla-options.php:1677
2541
  msgid "Taxonomy"
2542
  msgstr ""
2543
 
2544
  #. translators: 1: taxonomy name
2545
+ #: includes/class-mla-options.php:1695
2546
  #, php-format
2547
  msgid "List Filter ignored; %1$s not supported."
2548
  msgstr ""
2549
 
2550
  #. translators: 1: taxonomy name
2551
+ #: includes/class-mla-options.php:1702
2552
  #, php-format
2553
  msgid "Inline Edit ignored; %1$s not supported."
2554
  msgstr ""
2555
 
2556
  #. translators: 1: taxonomy name
2557
+ #: includes/class-mla-options.php:1712
2558
  #, php-format
2559
  msgid "Checklist ignored; %1$s not supported."
2560
  msgstr ""
2561
 
2562
  #. translators: 1: taxonomy name
2563
+ #: includes/class-mla-options.php:1720
2564
  #, php-format
2565
  msgid "Term Search ignored; %1$s not supported."
2566
  msgstr ""
2567
 
2568
  #. translators: 1: option name, e.g., taxonomy_support
2569
+ #: includes/class-mla-options.php:1737 includes/class-mla-options.php:1813
2570
  #, php-format
2571
  msgid "Update custom %1$s"
2572
  msgstr ""
2573
 
2574
  #. translators: 1: option name, e.g., taxonomy_support
2575
+ #: includes/class-mla-options.php:1744 includes/class-mla-options.php:1820
2576
+ #: includes/class-mla-options.php:4657
2577
  #, php-format
2578
  msgid "Reset custom %1$s"
2579
  msgstr ""
2580
 
2581
+ #: includes/class-mla-options.php:1773
2582
  #: includes/mla-main-search-box-template.php:38
2583
  #: includes/mla-media-modal-js-template.php:24
2584
  msgid "and"
2585
  msgstr ""
2586
 
2587
+ #: includes/class-mla-options.php:1775
2588
  #: includes/mla-main-search-box-template.php:40
2589
  #: includes/mla-media-modal-js-template.php:28
2590
  msgid "or"
2591
  msgstr ""
2592
 
2593
+ #: includes/class-mla-options.php:1780 includes/class-mla-settings.php:2017
2594
  #: includes/class-mla-settings.php:2050 includes/class-mla-settings.php:2076
2595
  #: includes/class-mla-settings.php:2111 includes/class-mla-settings.php:2168
2596
  #: includes/class-mla-settings.php:2218
2599
  msgid "Name"
2600
  msgstr ""
2601
 
2602
+ #: includes/class-mla-options.php:1792
2603
  #: includes/mla-main-search-box-template.php:47
2604
  #: includes/mla-media-modal-js-template.php:53
2605
  msgid "Terms"
2606
  msgstr ""
2607
 
2608
+ #: includes/class-mla-options.php:2885 includes/class-mla-options.php:3005
2609
+ #: includes/class-mla-options.php:3845 includes/class-mla-options.php:3876
2610
  #: includes/class-mla-settings.php:1467
2611
  msgid "None (select a value)"
2612
  msgstr ""
2613
 
2614
+ #: includes/class-mla-options.php:3012
2615
  msgid "Metadata (see below)"
2616
  msgstr ""
2617
 
2618
+ #: includes/class-mla-options.php:3019
2619
  msgid "Template (see below)"
2620
  msgstr ""
2621
 
2622
  #. translators: 1: custom field name
2623
+ #: includes/class-mla-options.php:3084 includes/class-mla-options.php:4148
2624
  #, php-format
2625
  msgid "ERROR: New field %1$s already exists."
2626
  msgstr ""
2627
 
2628
  #. translators: 1: custom field name
2629
+ #: includes/class-mla-options.php:3089 includes/class-mla-options.php:4153
2630
  #, php-format
2631
  msgid "Adding new field %1$s."
2632
  msgstr ""
2633
 
2634
  #. translators: 1: custom field name
2635
+ #: includes/class-mla-options.php:3099 includes/class-mla-options.php:4163
2636
  #, php-format
2637
  msgid "Adding new rule for %1$s."
2638
  msgstr ""
2639
 
2640
  #. translators: 1: custom field name
2641
+ #: includes/class-mla-options.php:3130 includes/class-mla-options.php:4025
2642
+ #: includes/class-mla-options.php:4184
2643
  #, php-format
2644
  msgid "Deleting rule for %1$s."
2645
  msgstr ""
2646
 
2647
  #. translators: 1: custom field name 2: attribute 3: old value 4: new value
2648
+ #: includes/class-mla-options.php:3153 includes/class-mla-options.php:3174
2649
+ #: includes/class-mla-options.php:3224 includes/class-mla-options.php:3231
2650
+ #: includes/class-mla-options.php:3942 includes/class-mla-options.php:3949
2651
+ #: includes/class-mla-options.php:3956 includes/class-mla-options.php:4050
2652
+ #: includes/class-mla-options.php:4057 includes/class-mla-options.php:4092
2653
+ #: includes/class-mla-options.php:4099 includes/class-mla-options.php:4194
2654
+ #: includes/class-mla-options.php:4201
2655
  #, php-format
2656
  msgid "%1$s changing %2$s from %3$s to %4$s."
2657
  msgstr ""
2658
 
2659
+ #: includes/class-mla-options.php:3153 includes/class-mla-options.php:3470
2660
  msgid "Data Source"
2661
  msgstr ""
2662
 
2663
+ #: includes/class-mla-options.php:3159 includes/class-mla-options.php:3976
2664
+ #: includes/class-mla-options.php:4077 includes/class-mla-options.php:4221
2665
  msgid "Replace to Keep"
2666
  msgstr ""
2667
 
2668
+ #: includes/class-mla-options.php:3162 includes/class-mla-options.php:3979
2669
+ #: includes/class-mla-options.php:4080 includes/class-mla-options.php:4224
2670
  msgid "Keep to Replace"
2671
  msgstr ""
2672
 
2673
  #. translators: 1: custom field name 2: attribute 3: old value 'to' new value
2674
+ #: includes/class-mla-options.php:3167 includes/class-mla-options.php:3188
2675
+ #: includes/class-mla-options.php:3202 includes/class-mla-options.php:3216
2676
+ #: includes/class-mla-options.php:3245 includes/class-mla-options.php:3970
2677
+ #: includes/class-mla-options.php:3984 includes/class-mla-options.php:4071
2678
+ #: includes/class-mla-options.php:4085 includes/class-mla-options.php:4215
2679
+ #: includes/class-mla-options.php:4229
2680
  #, php-format
2681
  msgid "%1$s changing %2$s value from %3$s."
2682
  msgstr ""
2683
 
2684
+ #: includes/class-mla-options.php:3167 includes/class-mla-options.php:3471
2685
+ #: includes/class-mla-options.php:3984 includes/class-mla-options.php:4085
2686
+ #: includes/class-mla-options.php:4229 includes/class-mla-options.php:4351
2687
+ #: includes/class-mla-options.php:4437 includes/class-mla-options.php:4555
2688
  msgid "Existing Text"
2689
  msgstr ""
2690
 
2691
+ #: includes/class-mla-options.php:3174 includes/class-mla-options.php:3472
2692
  msgid "Format"
2693
  msgstr ""
2694
 
2695
+ #: includes/class-mla-options.php:3180 includes/class-mla-options.php:3194
2696
+ #: includes/class-mla-options.php:3208 includes/class-mla-options.php:3237
2697
  msgid "unchecked to checked"
2698
  msgstr ""
2699
 
2700
+ #: includes/class-mla-options.php:3183 includes/class-mla-options.php:3197
2701
+ #: includes/class-mla-options.php:3211 includes/class-mla-options.php:3240
2702
  msgid "checked to unchecked"
2703
  msgstr ""
2704
 
2705
+ #: includes/class-mla-options.php:3188 includes/class-mla-options.php:3473
2706
  msgid "MLA Column"
2707
  msgstr ""
2708
 
2709
+ #: includes/class-mla-options.php:3224
2710
  msgid "Metavalue name"
2711
  msgstr ""
2712
 
2713
+ #: includes/class-mla-options.php:3231 includes/class-mla-options.php:3312
2714
+ #: includes/class-mla-options.php:3408 includes/class-mla-options.php:3450
2715
  msgid "Option"
2716
  msgstr ""
2717
 
2718
+ #: includes/class-mla-options.php:3245
2719
  msgid "Delete NULL"
2720
  msgstr ""
2721
 
2722
+ #: includes/class-mla-options.php:3284 includes/class-mla-options.php:4449
2723
  msgid "No Custom Field Mapping Rules Defined"
2724
  msgstr ""
2725
 
2726
+ #: includes/class-mla-options.php:3298 includes/class-mla-options.php:3395
2727
+ #: includes/class-mla-options.php:3437 includes/class-mla-options.php:4326
2728
+ #: includes/class-mla-options.php:4376 includes/class-mla-options.php:4473
2729
+ #: includes/class-mla-options.php:4517 includes/class-mla-options.php:4542
2730
  msgid "Keep"
2731
  msgstr ""
2732
 
2733
+ #: includes/class-mla-options.php:3302 includes/class-mla-options.php:3399
2734
+ #: includes/class-mla-options.php:3441
2735
  msgid "Native"
2736
  msgstr ""
2737
 
2738
+ #: includes/class-mla-options.php:3304 includes/class-mla-options.php:3401
2739
+ #: includes/class-mla-options.php:3443
2740
  msgid "Commas"
2741
  msgstr ""
2742
 
2743
+ #: includes/class-mla-options.php:3314 includes/class-mla-options.php:3410
2744
+ #: includes/class-mla-options.php:3452
2745
  msgid "Text"
2746
  msgstr ""
2747
 
2748
+ #: includes/class-mla-options.php:3316 includes/class-mla-options.php:3412
2749
+ #: includes/class-mla-options.php:3454
2750
  msgid "Single"
2751
  msgstr ""
2752
 
2753
+ #: includes/class-mla-options.php:3318 includes/class-mla-options.php:3414
2754
+ #: includes/class-mla-options.php:3456
2755
  msgid "Export"
2756
  msgstr ""
2757
 
2758
+ #: includes/class-mla-options.php:3320 includes/class-mla-options.php:3416
2759
+ #: includes/class-mla-options.php:3458
2760
  msgid "Array"
2761
  msgstr ""
2762
 
2763
+ #: includes/class-mla-options.php:3322 includes/class-mla-options.php:3418
2764
+ #: includes/class-mla-options.php:3460
2765
  msgid "Multi"
2766
  msgstr ""
2767
 
2768
+ #: includes/class-mla-options.php:3324 includes/class-mla-options.php:3420
2769
+ #: includes/class-mla-options.php:3462
2770
  msgid "Delete NULL values"
2771
  msgstr ""
2772
 
2773
+ #: includes/class-mla-options.php:3325 includes/class-mla-options.php:4476
2774
  msgid "Delete Rule"
2775
  msgstr ""
2776
 
2777
+ #: includes/class-mla-options.php:3326 includes/class-mla-options.php:4477
2778
  msgid "Delete Rule AND Field"
2779
  msgstr ""
2780
 
2781
+ #: includes/class-mla-options.php:3327 includes/class-mla-options.php:4478
2782
  msgid "Update Rule"
2783
  msgstr ""
2784
 
2785
+ #: includes/class-mla-options.php:3328 includes/class-mla-options.php:4479
2786
  msgid "Map All Attachments"
2787
  msgstr ""
2788
 
2789
+ #: includes/class-mla-options.php:3390 includes/class-mla-options.php:4506
2790
  msgid "Add a new Mapping Rule"
2791
  msgstr ""
2792
 
2793
+ #: includes/class-mla-options.php:3421 includes/class-mla-options.php:4520
2794
  msgid "Add Rule"
2795
  msgstr ""
2796
 
2797
+ #: includes/class-mla-options.php:3422 includes/class-mla-options.php:4521
2798
  msgid "Add Rule and Map All Attachments"
2799
  msgstr ""
2800
 
2801
+ #: includes/class-mla-options.php:3432 includes/class-mla-options.php:4531
2802
  msgid "Add a new Field and Mapping Rule"
2803
  msgstr ""
2804
 
2805
+ #: includes/class-mla-options.php:3463 includes/class-mla-options.php:4545
2806
  msgid "Add Field"
2807
  msgstr ""
2808
 
2809
+ #: includes/class-mla-options.php:3464 includes/class-mla-options.php:4546
2810
  msgid "Add Field and Map All Attachments"
2811
  msgstr ""
2812
 
2813
+ #: includes/class-mla-options.php:3469 includes/class-mla-options.php:3942
2814
+ #: includes/class-mla-options.php:4347 includes/class-mla-options.php:4433
2815
+ #: includes/class-mla-options.php:4551
2816
  msgid "Field Title"
2817
  msgstr ""
2818
 
2819
+ #: includes/class-mla-options.php:3494
2820
  msgid "Custom field mapping rules updated."
2821
  msgstr ""
2822
 
2823
+ #: includes/class-mla-options.php:3496
2824
  msgid "ERROR: Custom field mapping rules update failed."
2825
  msgstr ""
2826
 
2827
+ #: includes/class-mla-options.php:3499
2828
  msgid "Custom field no mapping rule changes detected."
2829
  msgstr ""
2830
 
2831
+ #: includes/class-mla-options.php:3507
2832
  msgid "Custom field mapping settings saved."
2833
  msgstr ""
2834
 
2835
+ #: includes/class-mla-options.php:3509
2836
  msgid "ERROR: Custom field mapping settings reset failed."
2837
  msgstr ""
2838
 
2839
  #. translators: 1: custom field name
2840
+ #: includes/class-mla-options.php:3930
2841
  #, php-format
2842
  msgid "ERROR: No old values for %1$s."
2843
  msgstr ""
2844
 
2845
+ #: includes/class-mla-options.php:3949 includes/class-mla-options.php:4050
2846
+ #: includes/class-mla-options.php:4194 includes/class-mla-options.php:4348
2847
+ #: includes/class-mla-options.php:4434 includes/class-mla-options.php:4552
2848
  msgid "IPTC Value"
2849
  msgstr ""
2850
 
2851
+ #: includes/class-mla-options.php:3956 includes/class-mla-options.php:4057
2852
+ #: includes/class-mla-options.php:4201
2853
  msgid "EXIF Value"
2854
  msgstr ""
2855
 
2856
+ #: includes/class-mla-options.php:3962 includes/class-mla-options.php:4063
2857
+ #: includes/class-mla-options.php:4207
2858
  msgid "EXIF to IPTC"
2859
  msgstr ""
2860
 
2861
+ #: includes/class-mla-options.php:3965 includes/class-mla-options.php:4066
2862
+ #: includes/class-mla-options.php:4210
2863
  msgid "IPTC to EXIF"
2864
  msgstr ""
2865
 
2866
+ #: includes/class-mla-options.php:3970 includes/class-mla-options.php:4071
2867
+ #: includes/class-mla-options.php:4215 includes/class-mla-options.php:4350
2868
+ #: includes/class-mla-options.php:4436 includes/class-mla-options.php:4554
2869
  msgid "Priority"
2870
  msgstr ""
2871
 
2872
+ #: includes/class-mla-options.php:4092 includes/class-mla-options.php:4438
2873
  msgid "Delimiter(s)"
2874
  msgstr ""
2875
 
2876
+ #: includes/class-mla-options.php:4322 includes/class-mla-options.php:4372
2877
+ #: includes/class-mla-options.php:4469 includes/class-mla-options.php:4513
2878
+ #: includes/class-mla-options.php:4538
2879
  msgid "IPTC"
2880
  msgstr ""
2881
 
2882
+ #: includes/class-mla-options.php:4324 includes/class-mla-options.php:4374
2883
+ #: includes/class-mla-options.php:4471 includes/class-mla-options.php:4515
2884
+ #: includes/class-mla-options.php:4540
2885
  msgid "EXIF"
2886
  msgstr ""
2887
 
2888
+ #: includes/class-mla-options.php:4349 includes/class-mla-options.php:4435
2889
+ #: includes/class-mla-options.php:4553
2890
  msgid "EXIF/Template Value"
2891
  msgstr ""
2892
 
2893
  #. translators: 1: option name
2894
+ #: includes/class-mla-options.php:4563
2895
  #, php-format
2896
  msgid "ERROR: Render unknown custom %1$s."
2897
  msgstr ""
2898
 
2899
  #. translators: 1: option name
2900
+ #: includes/class-mla-options.php:4607
2901
  #, php-format
2902
  msgid "ERROR: Update/delete unknown custom %1$s."
2903
  msgstr ""
2904
 
2905
+ #: includes/class-mla-options.php:4613
2906
  msgid "IPTC/EXIF mapping settings updated."
2907
  msgstr ""
2908
 
2909
+ #: includes/class-mla-options.php:4615
2910
  msgid "ERROR: IPTC/EXIF settings update failed."
2911
  msgstr ""
2912
 
2913
+ #: includes/class-mla-options.php:4618
2914
  msgid "IPTC/EXIF no mapping changes detected."
2915
  msgstr ""
2916
 
2917
  #. translators: 1: field type
2918
+ #: includes/class-mla-options.php:4629 includes/class-mla-options.php:4639
2919
+ #: includes/class-mla-options.php:4649 includes/class-mla-settings.php:2842
2920
  #, php-format
2921
  msgid "%1$s settings saved."
2922
  msgstr ""
2923
 
2924
+ #: includes/class-mla-options.php:4629 includes/class-mla-options.php:4632
2925
  #: includes/class-mla-settings.php:3073 includes/class-mla-settings.php:3107
2926
  #: includes/class-mla-settings.php:3110
2927
  msgid "Standard field"
2928
  msgstr ""
2929
 
2930
  #. translators: 1: field type
2931
+ #: includes/class-mla-options.php:4632 includes/class-mla-options.php:4642
2932
+ #: includes/class-mla-options.php:4652
2933
  #, php-format
2934
  msgid "ERROR: IPTC/EXIF %1$s settings update failed."
2935
  msgstr ""
2936
 
2937
+ #: includes/class-mla-options.php:4639 includes/class-mla-options.php:4642
2938
  #: includes/class-mla-settings.php:3133 includes/class-mla-settings.php:3167
2939
  #: includes/class-mla-settings.php:3170
2940
  msgid "Taxonomy term"
2941
  msgstr ""
2942
 
2943
+ #: includes/class-mla-options.php:4649 includes/class-mla-options.php:4652
2944
  #: includes/class-mla-settings.php:2980 includes/class-mla-settings.php:2983
2945
  #: includes/class-mla-settings.php:3208 includes/class-mla-settings.php:3242
2946
  #: includes/class-mla-settings.php:3245
2948
  msgstr ""
2949
 
2950
  #. translators: 1: option name, e.g., taxonomy_support
2951
+ #: includes/class-mla-options.php:4660
2952
  #, php-format
2953
  msgid "ERROR: Reset unknown custom %1$s"
2954
  msgstr ""
3040
  msgid "Media/Assistant Table Defaults"
3041
  msgstr ""
3042
 
3043
+ #: includes/class-mla-settings.php:986
3044
+ msgid "Media Manager Enhancements"
3045
+ msgstr ""
3046
+
3047
  #: includes/class-mla-settings.php:987 includes/class-mla-settings.php:1347
3048
  #: includes/class-mla-settings.php:1400 includes/class-mla-settings.php:1817
3049
  #: includes/class-mla-settings.php:1867 includes/class-mla-settings.php:1953
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dglingren
3
  Donate link: http://fairtradejudaica.org/make-a-difference/donate/
4
  Tags: attachment, attachments, documents, gallery, image, images, media, library, media library, tag cloud, media-tags, media tags, tags, media categories, categories, IPTC, EXIF, GPS, PDF, meta, metadata, photo, photos, photograph, photographs, photoblog, photo albums, lightroom, photoshop, MIME, mime-type, icon, upload, file extensions
5
  Requires at least: 3.3
6
- Tested up to: 3.9.2
7
- Stable tag: 1.92
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -152,6 +152,16 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
152
 
153
  == Changelog ==
154
 
 
 
 
 
 
 
 
 
 
 
155
  = 1.92 =
156
  * Fix: PHP "Fatal error: Call to undefined function get_current_screen ()" has been fixed.
157
  * Fix: Enhanced taxonomy support for drag & drop file uploads has been restored.
@@ -248,8 +258,8 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
248
 
249
  == Upgrade Notice ==
250
 
251
- = 1.92 =
252
- Three bug fixes, one serious.
253
 
254
  == Other Notes ==
255
 
3
  Donate link: http://fairtradejudaica.org/make-a-difference/donate/
4
  Tags: attachment, attachments, documents, gallery, image, images, media, library, media library, tag cloud, media-tags, media tags, tags, media categories, categories, IPTC, EXIF, GPS, PDF, meta, metadata, photo, photos, photograph, photographs, photoblog, photo albums, lightroom, photoshop, MIME, mime-type, icon, upload, file extensions
5
  Requires at least: 3.3
6
+ Tested up to: 4.0
7
+ Stable tag: 1.93
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
152
 
153
  == Changelog ==
154
 
155
+ = 1.93 =
156
+
157
+ * New: MLA enhancements have been added to the new WordPress 4.0 Media/Library Media Grid submenu. An option has been added to the Settings/Media Library Assistant General tab to disable them if they are not wanted.
158
+ * New: An option has been added to the Settings/Media Library Assistant General tab to automatically populate taxonomy metaboxes in the Media Manager Details pane when the item is selected. The option is disabled by default.
159
+ * New: A new mla-simple-mapping-hooks-example.php.txt example plugin has been added to the /media-library-assistant/examples directory.
160
+ * Fix: Completed WordPress 4.0 compatibility work.
161
+ * Fix: Media Manager toolbar controls for different modes, e.g., Insert Media, Set Featured Image, are now separated so each mode retains its own settings.
162
+ * Fix: Media Manager MLA enhanced toolbar controls for MIME type, date and terms now work when the enhanced Search Media control is disabled.
163
+ * Fix: The buddypress-hooks-example.php.txt example plugin now handles cover art for the most recent rtMedia releases.
164
+
165
  = 1.92 =
166
  * Fix: PHP "Fatal error: Call to undefined function get_current_screen ()" has been fixed.
167
  * Fix: Enhanced taxonomy support for drag & drop file uploads has been restored.
258
 
259
  == Upgrade Notice ==
260
 
261
+ = 1.93 =
262
+ WordPress 4.0 Media Grid enhancements (optional) and compatibility fixes. New auto-fill option for Media Manager taxonomy meta boxes. One other enhancement, three other fixes.
263
 
264
  == Other Notes ==
265