Media Library Assistant - Version 1.40

Version Description

  • New: "base" selection for the where-used database access tuning "Inserted in" option can significantly improve performance while retaining the most useful part of the where-used information. It's on the Settings/Media Library Assistant screen, General tab.
  • New: Add Post MIME Types and define new views for the Media/Library screen and the Media Manager/Add Media "media items" drop down list.
  • New: MLA's Media/Assistant screen and the Media Manager/Add Media "media items" drop down list use an enhanced version of the list, Table Views, to support views with multiple MIME Types (e.g., "audio,video") and wildcard specifications (e.g. "/*ms"). You can also create views based on custom field values.
  • New: Add file extensions and MIME types for uploads to the Media Library. Search the list of over 1,500 extension/MIME type associations to get the best matches possible.
  • New: Choose from 112 enhanced file type images to associate more specific and colorful icons with non-image file extensions for admin screens and [gallery] or [mla_gallery] displays.
  • New: For [mla_gallery], four new "Gallery Display Content" parameters, mla_link_attributes, mla_image_attributes, mla_image_class and mla_image_alt, give you complete control over the link and image portions of gallery items without requiring custom style or markup templates.
  • New: upload_date, parent_date and eight "where used" values added to the custom field data sources list.
  • New: Five options for mapping multi-value custom fields, "text", "single", "export", "array" and "multi", give more control over the process.
  • New: "Delete NULL values" option offers better control over storing custom field values mapped from MLA data sources.
  • New: The Media/Assistant "MIME Type" column now links to a table listing filtered by MIME Type.
  • Fix: Better performance for database-intensive oprations such as custom field mapping rules processing.
  • Fix: MLA help tabs are not added to edit taxonomy screens when post_type is not "attachment".
  • Fix: Duplicate MLA help tabs not added to the WordPress Edit Tags and Categories screens.
  • Fix: Quick edit data now populates in Title/Name, Title or Name columns when ID/Parent column is hidden.
  • Fix: Terms dropdown list is now sorted by name (was by term-id) on the Media/Assistant table listing and on the Media Manager "Add Media" dialog box.
  • Fix: Where-used reporting "Gallery in" and "MLA Gallery in" results now properly handle [gallery] and [mla_gallery] shortcodes embedded within other (enclosing) shortcodes.
  • Fix: Taxonomy support now properly handles custom taxonomies registered with `show_ui
Download this release

Release Info

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

Code changes from version 1.30 to 1.40

Files changed (156) hide show
  1. css/mla-style.css +51 -0
  2. images/crystal/3d.png +0 -0
  3. images/crystal/Globe.png +0 -0
  4. images/crystal/aktion.png +0 -0
  5. images/crystal/applix.png +0 -0
  6. images/crystal/archive.png +0 -0
  7. images/crystal/audio.png +0 -0
  8. images/crystal/binary.png +0 -0
  9. images/crystal/cal.png +0 -0
  10. images/crystal/calendar.png +0 -0
  11. images/crystal/cdimage.png +0 -0
  12. images/crystal/cdtrack.png +0 -0
  13. images/crystal/code.png +0 -0
  14. images/crystal/colorset.png +0 -0
  15. images/crystal/core.png +0 -0
  16. images/crystal/crystal.pdf +0 -0
  17. images/crystal/database.png +0 -0
  18. images/crystal/deb.png +0 -0
  19. images/crystal/default.png +0 -0
  20. images/crystal/document.png +0 -0
  21. images/crystal/dvi.png +0 -0
  22. images/crystal/encrypted.png +0 -0
  23. images/crystal/exec.png +0 -0
  24. images/crystal/exec_wine.png +0 -0
  25. images/crystal/file_broken.png +0 -0
  26. images/crystal/file_temporary.png +0 -0
  27. images/crystal/flash.png +0 -0
  28. images/crystal/font.png +0 -0
  29. images/crystal/font_bitmap.png +0 -0
  30. images/crystal/font_truetype.png +0 -0
  31. images/crystal/font_type1.png +0 -0
  32. images/crystal/html.png +0 -0
  33. images/crystal/icons.png +0 -0
  34. images/crystal/image.png +0 -0
  35. images/crystal/images.png +0 -0
  36. images/crystal/info.png +0 -0
  37. images/crystal/interactive.png +0 -0
  38. images/crystal/karbon.png +0 -0
  39. images/crystal/kate.png +0 -0
  40. images/crystal/kexi_kexi.png +0 -0
  41. images/crystal/kformula.png +0 -0
  42. images/crystal/kformula_kfo.png +0 -0
  43. images/crystal/kivio.png +0 -0
  44. images/crystal/kivio_flw.png +0 -0
  45. images/crystal/kmultiple.png +0 -0
  46. images/crystal/knotes.png +0 -0
  47. images/crystal/koffice.png +0 -0
  48. images/crystal/konqsidebar_news.png +0 -0
  49. images/crystal/kpaint.png +0 -0
  50. images/crystal/krita_kra.png +0 -0
  51. images/crystal/kspread_ksp.png +0 -0
  52. images/crystal/kugar_kud.png +0 -0
  53. images/crystal/kugardata.png +0 -0
  54. images/crystal/kword_kwd.png +0 -0
  55. images/crystal/log.png +0 -0
  56. images/crystal/mac.png +0 -0
  57. images/crystal/make.png +0 -0
  58. images/crystal/man.png +0 -0
  59. images/crystal/message.png +0 -0
  60. images/crystal/metafont.png +0 -0
  61. images/crystal/mime_cdr.png +0 -0
  62. images/crystal/misc.png +0 -0
  63. images/crystal/moc_src.png +0 -0
  64. images/crystal/mozilla_doc.png +0 -0
  65. images/crystal/netscape.png +0 -0
  66. images/crystal/news.png +0 -0
  67. images/crystal/pdf.png +0 -0
  68. images/crystal/php.png +0 -0
  69. images/crystal/pk.png +0 -0
  70. images/crystal/postscript.png +0 -0
  71. images/crystal/ps.png +0 -0
  72. images/crystal/quicktime.png +0 -0
  73. images/crystal/readme.png +0 -0
  74. images/crystal/real.png +0 -0
  75. images/crystal/recycled.png +0 -0
  76. images/crystal/resource.png +0 -0
  77. images/crystal/rpm.png +0 -0
  78. images/crystal/schedule.png +0 -0
  79. images/crystal/shell1.png +0 -0
  80. images/crystal/shellscript.png +0 -0
  81. images/crystal/soffice.png +0 -0
  82. images/crystal/sound.png +0 -0
  83. images/crystal/source_c.png +0 -0
  84. images/crystal/source_cpp.png +0 -0
  85. images/crystal/source_f.png +0 -0
  86. images/crystal/source_h.png +0 -0
  87. images/crystal/source_j.png +0 -0
  88. images/crystal/source_java.png +0 -0
  89. images/crystal/source_l.png +0 -0
  90. images/crystal/source_moc.png +0 -0
  91. images/crystal/source_o.png +0 -0
  92. images/crystal/source_p.png +0 -0
  93. images/crystal/source_php.png +0 -0
  94. images/crystal/source_pl.png +0 -0
  95. images/crystal/source_py.png +0 -0
  96. images/crystal/source_s.png +0 -0
  97. images/crystal/source_y.png +0 -0
  98. images/crystal/sownd.png +0 -0
  99. images/crystal/spreadsheet.png +0 -0
  100. images/crystal/style.png +0 -0
  101. images/crystal/stylesheet.png +0 -0
  102. images/crystal/templates.png +0 -0
  103. images/crystal/tex.png +0 -0
  104. images/crystal/text.png +0 -0
  105. images/crystal/tgz.png +0 -0
  106. images/crystal/trash.png +0 -0
  107. images/crystal/vcalendar.png +0 -0
  108. images/crystal/vcard.png +0 -0
  109. images/crystal/vectorgfx.png +0 -0
  110. images/crystal/video.png +0 -0
  111. images/crystal/widget_doc.png +0 -0
  112. images/crystal/x.png +0 -0
  113. images/crystal/xcf.png +0 -0
  114. images/crystal/zip.png +0 -0
  115. includes/class-mla-data.php +368 -77
  116. includes/class-mla-edit-media.php +10 -4
  117. includes/class-mla-list-table.php +201 -172
  118. includes/class-mla-main.php +60 -17
  119. includes/class-mla-media-modal.php +11 -4
  120. includes/class-mla-mime-types.php +2399 -0
  121. includes/class-mla-objects.php +3 -3
  122. includes/class-mla-options.php +463 -104
  123. includes/class-mla-settings.php +1222 -20
  124. includes/class-mla-shortcodes.php +127 -42
  125. includes/class-mla-upload-list-table.php +681 -0
  126. includes/class-mla-upload-optional-list-table.php +486 -0
  127. includes/class-mla-view-list-table.php +579 -0
  128. includes/mla-plugin-loader.php +27 -3
  129. index.php +7 -3
  130. js/mla-inline-edit-upload-scripts.js +197 -0
  131. js/mla-inline-edit-upload-scripts.min.js +1 -0
  132. js/mla-inline-edit-view-scripts.js +197 -0
  133. js/mla-inline-edit-view-scripts.min.js +1 -0
  134. phpDocs/classes.svg +85 -42
  135. phpDocs/classes/MLA.html +3 -4
  136. phpDocs/classes/MLAData.html +62 -15
  137. phpDocs/classes/MLAEdit.html +4 -3
  138. phpDocs/classes/MLAMime.html +1269 -0
  139. phpDocs/classes/MLAModal.html +1 -1
  140. phpDocs/classes/MLAObjects.html +1 -1
  141. phpDocs/classes/MLAOptions.html +101 -3
  142. phpDocs/classes/MLASettings.html +408 -4
  143. phpDocs/classes/MLAShortcodes.html +26 -1
  144. phpDocs/classes/MLATest.html +1 -1
  145. phpDocs/classes/MLA_List_Table.html +33 -27
  146. phpDocs/classes/MLA_Upload_List_Table.html +721 -0
  147. phpDocs/classes/MLA_Upload_Optional_List_Table.html +539 -0
  148. phpDocs/classes/MLA_View_List_Table.html +618 -0
  149. phpDocs/deprecated.html +1 -1
  150. phpDocs/errors.html +5 -1
  151. phpDocs/graph_class.html +1 -1
  152. phpDocs/index.html +1 -1
  153. phpDocs/markers.html +1 -1
  154. phpDocs/namespaces/global.html +31 -1
  155. phpDocs/packages/Media Library Assistant.html +37 -1
  156. phpDocs/structure.xml +4151 -897
css/mla-style.css CHANGED
@@ -19,6 +19,16 @@ div.mla_messages {
19
  -webkit-border-radius:5px;
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
22
  /*
23
  * MLA List Table ID_parent column
24
  */
@@ -121,6 +131,47 @@ textarea[readonly] {
121
  width: 99%
122
  }
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  /*
125
  * MLA Settings page
126
  */
19
  -webkit-border-radius:5px;
20
  }
21
 
22
+ div.mla_errors {
23
+ background:#FFE0E0;
24
+ border:1px solid #CCC;
25
+ padding:0 10px;
26
+ margin-top:5px;
27
+ border-radius:5px;
28
+ -moz-border-radius:5px;
29
+ -webkit-border-radius:5px;
30
+ }
31
+
32
  /*
33
  * MLA List Table ID_parent column
34
  */
131
  width: 99%
132
  }
133
 
134
+ /*
135
+ * MLA Settings page, Views and Uploads tab inline editing - adapted from load-styles.php
136
+ */
137
+ #wpbody-content .bulk-edit-row-upload .inline-edit-col-left,
138
+ #wpbody-content .bulk-edit-row-view .inline-edit-col-left {
139
+ width: 40%
140
+ }
141
+
142
+ #wpbody-content .bulk-edit-row-upload .inline-edit-col-right,
143
+ #wpbody-content .bulk-edit-row-view .inline-edit-col-right {
144
+ width: 59%
145
+ }
146
+
147
+ .quick-edit-row-upload fieldset.inline-edit-col label span.title,
148
+ .bulk-edit-row-upload fieldset.inline-edit-col-right label span.title,
149
+ .quick-edit-row-view fieldset.inline-edit-col label span.title,
150
+ .bulk-edit-row-view fieldset.inline-edit-col-right label span.title {
151
+ width: 8em
152
+ }
153
+
154
+ .quick-edit-row-upload fieldset.inline-edit-col label span.input-text-wrap,
155
+ .bulk-edit-row-upload fieldset.inline-edit-col-right label span.input-text-wrap,
156
+ .quick-edit-row-view fieldset.inline-edit-col label span.input-text-wrap,
157
+ .bulk-edit-row-view fieldset.inline-edit-col-right label span.input-text-wrap {
158
+ margin-left: 8em;
159
+ width: 12em
160
+ }
161
+
162
+ .quick-edit-row-upload fieldset.inline-edit-col label,
163
+ .quick-edit-row-view fieldset.inline-edit-col label {
164
+ float:left;
165
+ width: 23em
166
+ }
167
+
168
+ .quick-edit-row-upload fieldset.inline-edit-col input.inline-edit-menu-order,
169
+ .bulk-edit-row-upload fieldset.inline-edit-col-right label.inline-edit-menu-order span.input-text-wrap,
170
+ .quick-edit-row-view fieldset.inline-edit-col input.inline-edit-menu-order,
171
+ .bulk-edit-row-view fieldset.inline-edit-col-right label.inline-edit-menu-order span.input-text-wrap {
172
+ width: 5em
173
+ }
174
+
175
  /*
176
  * MLA Settings page
177
  */
images/crystal/3d.png ADDED
Binary file
images/crystal/Globe.png ADDED
Binary file
images/crystal/aktion.png ADDED
Binary file
images/crystal/applix.png ADDED
Binary file
images/crystal/archive.png ADDED
Binary file
images/crystal/audio.png ADDED
Binary file
images/crystal/binary.png ADDED
Binary file
images/crystal/cal.png ADDED
Binary file
images/crystal/calendar.png ADDED
Binary file
images/crystal/cdimage.png ADDED
Binary file
images/crystal/cdtrack.png ADDED
Binary file
images/crystal/code.png ADDED
Binary file
images/crystal/colorset.png ADDED
Binary file
images/crystal/core.png ADDED
Binary file
images/crystal/crystal.pdf ADDED
Binary file
images/crystal/database.png ADDED
Binary file
images/crystal/deb.png ADDED
Binary file
images/crystal/default.png ADDED
Binary file
images/crystal/document.png ADDED
Binary file
images/crystal/dvi.png ADDED
Binary file
images/crystal/encrypted.png ADDED
Binary file
images/crystal/exec.png ADDED
Binary file
images/crystal/exec_wine.png ADDED
Binary file
images/crystal/file_broken.png ADDED
Binary file
images/crystal/file_temporary.png ADDED
Binary file
images/crystal/flash.png ADDED
Binary file
images/crystal/font.png ADDED
Binary file
images/crystal/font_bitmap.png ADDED
Binary file
images/crystal/font_truetype.png ADDED
Binary file
images/crystal/font_type1.png ADDED
Binary file
images/crystal/html.png ADDED
Binary file
images/crystal/icons.png ADDED
Binary file
images/crystal/image.png ADDED
Binary file
images/crystal/images.png ADDED
Binary file
images/crystal/info.png ADDED
Binary file
images/crystal/interactive.png ADDED
Binary file
images/crystal/karbon.png ADDED
Binary file
images/crystal/kate.png ADDED
Binary file
images/crystal/kexi_kexi.png ADDED
Binary file
images/crystal/kformula.png ADDED
Binary file
images/crystal/kformula_kfo.png ADDED
Binary file
images/crystal/kivio.png ADDED
Binary file
images/crystal/kivio_flw.png ADDED
Binary file
images/crystal/kmultiple.png ADDED
Binary file
images/crystal/knotes.png ADDED
Binary file
images/crystal/koffice.png ADDED
Binary file
images/crystal/konqsidebar_news.png ADDED
Binary file
images/crystal/kpaint.png ADDED
Binary file
images/crystal/krita_kra.png ADDED
Binary file
images/crystal/kspread_ksp.png ADDED
Binary file
images/crystal/kugar_kud.png ADDED
Binary file
images/crystal/kugardata.png ADDED
Binary file
images/crystal/kword_kwd.png ADDED
Binary file
images/crystal/log.png ADDED
Binary file
images/crystal/mac.png ADDED
Binary file
images/crystal/make.png ADDED
Binary file
images/crystal/man.png ADDED
Binary file
images/crystal/message.png ADDED
Binary file
images/crystal/metafont.png ADDED
Binary file
images/crystal/mime_cdr.png ADDED
Binary file
images/crystal/misc.png ADDED
Binary file
images/crystal/moc_src.png ADDED
Binary file
images/crystal/mozilla_doc.png ADDED
Binary file
images/crystal/netscape.png ADDED
Binary file
images/crystal/news.png ADDED
Binary file
images/crystal/pdf.png ADDED
Binary file
images/crystal/php.png ADDED
Binary file
images/crystal/pk.png ADDED
Binary file
images/crystal/postscript.png ADDED
Binary file
images/crystal/ps.png ADDED
Binary file
images/crystal/quicktime.png ADDED
Binary file
images/crystal/readme.png ADDED
Binary file
images/crystal/real.png ADDED
Binary file
images/crystal/recycled.png ADDED
Binary file
images/crystal/resource.png ADDED
Binary file
images/crystal/rpm.png ADDED
Binary file
images/crystal/schedule.png ADDED
Binary file
images/crystal/shell1.png ADDED
Binary file
images/crystal/shellscript.png ADDED
Binary file
images/crystal/soffice.png ADDED
Binary file
images/crystal/sound.png ADDED
Binary file
images/crystal/source_c.png ADDED
Binary file
images/crystal/source_cpp.png ADDED
Binary file
images/crystal/source_f.png ADDED
Binary file
images/crystal/source_h.png ADDED
Binary file
images/crystal/source_j.png ADDED
Binary file
images/crystal/source_java.png ADDED
Binary file
images/crystal/source_l.png ADDED
Binary file
images/crystal/source_moc.png ADDED
Binary file
images/crystal/source_o.png ADDED
Binary file
images/crystal/source_p.png ADDED
Binary file
images/crystal/source_php.png ADDED
Binary file
images/crystal/source_pl.png ADDED
Binary file
images/crystal/source_py.png ADDED
Binary file
images/crystal/source_s.png ADDED
Binary file
images/crystal/source_y.png ADDED
Binary file
images/crystal/sownd.png ADDED
Binary file
images/crystal/spreadsheet.png ADDED
Binary file
images/crystal/style.png ADDED
Binary file
images/crystal/stylesheet.png ADDED
Binary file
images/crystal/templates.png ADDED
Binary file
images/crystal/tex.png ADDED
Binary file
images/crystal/text.png ADDED
Binary file
images/crystal/tgz.png ADDED
Binary file
images/crystal/trash.png ADDED
Binary file
images/crystal/vcalendar.png ADDED
Binary file
images/crystal/vcard.png ADDED
Binary file
images/crystal/vectorgfx.png ADDED
Binary file
images/crystal/video.png ADDED
Binary file
images/crystal/widget_doc.png ADDED
Binary file
images/crystal/x.png ADDED
Binary file
images/crystal/xcf.png ADDED
Binary file
images/crystal/zip.png ADDED
Binary file
includes/class-mla-data.php CHANGED
@@ -176,7 +176,7 @@ class MLAData {
176
  * @param string A formatting string containing [+placeholders+]
177
  *
178
  * @return array Placeholder information: each entry is an array with
179
- * ['prefix'] => string, ['value'] => string, ['single'] => boolean
180
  */
181
  public static function mla_get_template_placeholders( $tpl ) {
182
  $results = array();
@@ -186,7 +186,7 @@ class MLAData {
186
 
187
  foreach ( $matches[0] as $match ) {
188
  $key = substr( $match, 2, (strlen( $match ) - 4 ) );
189
- $result = array( 'prefix' => '', 'value' => '', 'single' => false, 'export' => false );
190
  $match_count = preg_match( '/\[\+(.+):(.+)/', $match, $matches );
191
  if ( 1 == $match_count ) {
192
  $result['prefix'] = $matches[1];
@@ -199,8 +199,7 @@ class MLAData {
199
  $match_count = preg_match( '/([^,]+)(,(single|export))\+\]/', $tail, $matches );
200
  if ( 1 == $match_count ) {
201
  $result['value'] = $matches[1];
202
- $result['single'] = 'single' == $matches[3];
203
- $result['export'] = 'export' == $matches[3];
204
  }
205
  else {
206
  $result['value'] = substr( $tail, 0, (strlen( $tail ) - 2 ) );
@@ -212,19 +211,38 @@ class MLAData {
212
  return $results;
213
  }
214
 
 
 
 
 
 
 
 
 
 
215
  /**
216
  * Get the total number of attachment posts
217
  *
218
  * @since 0.30
219
  *
220
  * @param array Query variables, e.g., from $_REQUEST
 
 
221
  *
222
  * @return integer Number of attachment posts
223
  */
224
- public static function mla_count_list_table_items( $request )
225
  {
 
 
 
 
 
 
226
  $request = self::_prepare_list_table_query( $request );
227
  $results = self::_execute_list_table_query( $request );
 
 
228
  return $results->found_posts;
229
  }
230
 
@@ -243,10 +261,12 @@ class MLAData {
243
  * @return array attachment objects (posts) including parent data, meta data and references
244
  */
245
  public static function mla_query_list_table_items( $request, $offset, $count ) {
246
- $request = self::_prepare_list_table_query( $request, $offset, $count );
247
- $results = self::_execute_list_table_query( $request );
248
- $attachments = $results->posts;
249
-
 
 
250
  foreach ( $attachments as $index => $attachment ) {
251
  /*
252
  * Add parent data
@@ -298,7 +318,7 @@ class MLAData {
298
  * The parameters are set up in the _prepare_list_table_query function, and
299
  * any further logic required to translate those values is contained in the filters.
300
  *
301
- * Array index values are: use_postmeta_view, postmeta_key, detached, orderby, order, s, mla_search_connector, mla_search_fields, sentence, exact
302
  *
303
  * @since 0.30
304
  *
@@ -366,8 +386,7 @@ class MLAData {
366
  }
367
  break;
368
  case 'post_mime_type':
369
- if ( array_key_exists( $value, MLA_List_Table::mla_get_attachment_mime_types( ) ) )
370
- $clean_request[ $key ] = $value;
371
  break;
372
  case 'parent':
373
  case 'post_parent':
@@ -409,7 +428,22 @@ class MLAData {
409
  * ['mla_search_connector'], ['mla_search_fields'] - Search Media options
410
  */
411
  case 's':
412
- $clean_request[ $key ] = stripslashes( trim( $value ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  break;
414
  case 'mla_search_connector':
415
  case 'mla_search_fields':
@@ -419,6 +453,15 @@ class MLAData {
419
  case 'mla-metavalue':
420
  $clean_request[ $key ] = stripslashes( $value );
421
  break;
 
 
 
 
 
 
 
 
 
422
  default:
423
  // ignore anything else in $_REQUEST
424
  } // switch $key
@@ -427,11 +470,29 @@ class MLAData {
427
  /*
428
  * Pass query parameters to the filters for _execute_list_table_query
429
  */
430
- self::$query_parameters = array( 'use_postmeta_view' => false );
431
  self::$query_parameters['detached'] = isset( $clean_request['detached'] );
432
- self::$query_parameters['orderby'] = $clean_request['orderby'];
433
- self::$query_parameters['order'] = $clean_request['order'];
 
 
 
 
 
 
 
 
 
 
 
 
 
434
 
 
 
 
 
 
435
  /*
436
  * We must patch the WHERE clause if there are leading spaces in the meta_value
437
  */
@@ -581,7 +642,7 @@ class MLAData {
581
  */
582
  private static function _execute_list_table_query( $request ) {
583
  global $wpdb, $table_prefix;
584
-
585
  /*
586
  * Custom fields are special; we have to use an SQL VIEW to build
587
  * an intermediate table and modify the JOIN to include posts
@@ -608,6 +669,23 @@ class MLAData {
608
  add_filter( 'posts_orderby', 'MLAData::mla_query_posts_orderby_filter' );
609
 
610
  $results = new WP_Query( $request );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
611
 
612
  remove_filter( 'posts_orderby', 'MLAData::mla_query_posts_orderby_filter' );
613
  remove_filter( 'posts_where', 'MLAData::mla_query_posts_where_filter' );
@@ -635,18 +713,38 @@ class MLAData {
635
  */
636
  public static function mla_query_posts_search_filter( $search_string, &$query_object ) {
637
  global $table_prefix, $wpdb;
638
-
639
  /*
640
  * Process the keyword search argument, if present.
641
  */
642
  $search_clause = '';
643
  if ( isset( self::$query_parameters['s'] ) ) {
 
 
 
 
 
 
 
 
 
 
644
  /*
645
  * Interpret a numeric value as the ID of a specific attachment or the ID of a parent post/page
646
  */
647
- if(is_numeric( self::$query_parameters['s'] )) {
648
  $id = absint( self::$query_parameters['s'] );
649
- return ' AND ( ( ' . $wpdb->posts . '.ID = ' . $id . ' ) OR ( ' . $wpdb->posts . '.post_parent = ' . $id . ' ) ) ';
 
 
 
 
 
 
 
 
 
 
 
650
  }
651
 
652
  if ( self::$query_parameters['sentence'] ) {
@@ -704,7 +802,7 @@ class MLAData {
704
  }
705
 
706
  /**
707
- * Adds a JOIN clause, if required, to handle sorting/searching on ALT Text
708
  *
709
  * Defined as public because it's a filter.
710
  *
@@ -751,6 +849,26 @@ class MLAData {
751
  $where_clause = preg_replace( '/(^.*meta_value AS CHAR\) = \')([^\']*)/', '${1}' . self::$query_parameters['mla-metavalue'], $where_clause );
752
  }
753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
754
  if ( self::$query_parameters['detached'] )
755
  $where_clause .= " AND {$table_prefix}posts.post_parent < 1";
756
 
@@ -780,6 +898,7 @@ class MLAData {
780
  switch ( self::$query_parameters['orderby'] ) {
781
  case 'none':
782
  $orderby = '';
 
783
  break;
784
  /*
785
  * There are two columns defined that end up sorting on post_title,
@@ -829,6 +948,14 @@ class MLAData {
829
  */
830
  function mla_get_attachment_by_id( $post_id ) {
831
  global $post;
 
 
 
 
 
 
 
 
832
 
833
  $item = get_post( $post_id );
834
  if ( empty( $item ) ) {
@@ -860,6 +987,7 @@ class MLAData {
860
  */
861
  $post_data['mla_references'] = self::mla_fetch_attachment_references( $post_id, $post_data['post_parent'] );
862
 
 
863
  return $post_data;
864
  }
865
 
@@ -873,6 +1001,11 @@ class MLAData {
873
  * @return array Parent information; post_date, post_title and post_type
874
  */
875
  public static function mla_fetch_attachment_parent_data( $parent_id ) {
 
 
 
 
 
876
  $parent_data = array();
877
  if ( $parent_id ) {
878
  $parent = get_post( $parent_id );
@@ -884,6 +1017,7 @@ class MLAData {
884
  $parent_data['parent_type'] = $parent->post_type;
885
  }
886
 
 
887
  return $parent_data;
888
  }
889
 
@@ -897,12 +1031,12 @@ class MLAData {
897
  *
898
  * @param string key value, e.g. array1.array2.element
899
  * @param array PHP nested arrays
900
- * @param boolean return first element of an array result
901
- * @param boolean return results in var_export() format
902
  *
903
  * @return string value matching key(.key ...) or ''
904
  */
905
- public static function mla_find_array_element( $needle, $haystack, $single = false, $export = false ) {
906
  $key_array = explode( '.', $needle );
907
  if ( is_array( $key_array ) ) {
908
  foreach( $key_array as $key ) {
@@ -918,14 +1052,24 @@ class MLAData {
918
  }
919
  else $haystack = '';
920
 
921
- if ( $single && is_array( $haystack ))
922
  $haystack = current( $haystack );
923
 
924
  if ( is_array( $haystack ) ) {
925
- if ( $export )
926
- $haystack = var_export( $haystack, true );
927
- else
928
- $haystack = implode( ',', $haystack );
 
 
 
 
 
 
 
 
 
 
929
  }
930
 
931
  return sanitize_text_field( $haystack );
@@ -945,6 +1089,11 @@ class MLAData {
945
  * @return array Meta data variables
946
  */
947
  public static function mla_fetch_attachment_metadata( $post_id ) {
 
 
 
 
 
948
  $attached_file = NULL;
949
  $results = array();
950
  $post_meta = get_metadata( 'post', $post_id );
@@ -994,6 +1143,7 @@ class MLAData {
994
  } // $attached_file
995
  } // is_array($post_meta)
996
 
 
997
  return $results;
998
  }
999
 
@@ -1012,6 +1162,10 @@ class MLAData {
1012
  */
1013
  public static function mla_fetch_attachment_references( $ID, $parent ) {
1014
  global $wpdb;
 
 
 
 
1015
 
1016
  /*
1017
  * tested_reference true if any of the four where-used types was processed
@@ -1075,15 +1229,12 @@ class MLAData {
1075
  }
1076
 
1077
  $references['files'][ $references['base_file'] ] = $references['base_file'];
1078
- $last_slash = strrpos( $references['base_file'], '/' );
1079
- if ( false === $last_slash ) {
 
1080
  $references['path'] = '';
1081
- $references['file'] = $references['base_file'];
1082
- }
1083
- else {
1084
- $references['path'] = substr( $references['base_file'], 0, $last_slash + 1 );
1085
- $references['file'] = substr( $references['base_file'], $last_slash + 1 );
1086
- }
1087
 
1088
  /*
1089
  * Process the where-used settings option
@@ -1138,8 +1289,12 @@ class MLAData {
1138
  */
1139
  if ( MLAOptions::$process_inserted_in ) {
1140
  $reference_tests++;
1141
- foreach ( $references['files'] as $file => $file_data ) {
1142
- $like = like_escape( $file );
 
 
 
 
1143
  $inserts = $wpdb->get_results(
1144
  $wpdb->prepare(
1145
  "
@@ -1154,7 +1309,7 @@ class MLAData {
1154
 
1155
  if ( !empty( $inserts ) ) {
1156
  $references['found_reference'] = true;
1157
- $references['inserts'][ $file ] = $inserts;
1158
 
1159
  foreach ( $inserts as $insert ) {
1160
  if ( $insert->ID == $parent ) {
@@ -1162,7 +1317,34 @@ class MLAData {
1162
  }
1163
  } // foreach $insert
1164
  } // !empty
1165
- } // foreach $file
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1166
  } // $process_inserted_in
1167
 
1168
  /*
@@ -1234,6 +1416,8 @@ class MLAData {
1234
  $errors .= '(INVALID PARENT) ';
1235
 
1236
  $references['parent_errors'] = trim( $errors );
 
 
1237
  return $references;
1238
  }
1239
 
@@ -1244,12 +1428,13 @@ class MLAData {
1244
  * and array(s) of which attachments each [gallery] contains. The arrays are built once
1245
  * each page load and cached for subsequent calls.
1246
  *
1247
- * The outer array is keyed by post_id. It contains an array of [gallery] entries numbered from one (1).
1248
- * Each inner array has these elements:
1249
  * ['parent_title'] post_title of the gallery parent,
1250
  * ['parent_type'] 'post' or 'page' or the custom post_type of the gallery parent,
1251
- * ['query'] contains a string with the arguments of the [gallery],
1252
- * ['results'] contains an array of post_ids for the objects in the gallery.
 
 
1253
  *
1254
  * @since 0.70
1255
  *
@@ -1374,7 +1559,7 @@ class MLAData {
1374
  return false;
1375
 
1376
  foreach ( $results as $result ) {
1377
- $count = preg_match_all( "/\\{$shortcode}(.*)\\]/", $result->post_content, $matches, PREG_PATTERN_ORDER );
1378
  if ( $count ) {
1379
  $result_id = $result->ID;
1380
  $galleries_array[ $result_id ]['parent_title'] = $result->post_title;
@@ -1394,16 +1579,20 @@ class MLAData {
1394
 
1395
  $post = $result; // set global variable for mla_gallery_shortcode
1396
  $attachments = MLAShortcodes::mla_get_shortcode_attachments( $result_id, $galleries_array[ $result_id ]['galleries'][ $instance ]['query'] );
1397
- if ( ! empty( $attachments ) )
 
 
 
 
1398
  foreach ( $attachments as $attachment ) {
1399
  $galleries_array[ $result_id ]['results'][ $attachment->ID ] = $attachment->ID;
1400
  $galleries_array[ $result_id ]['galleries'][ $instance ]['results'][] = $attachment->ID;
1401
- }
1402
  } // exact match
1403
  } // foreach $match
1404
  } // if $count
1405
  } // foreach $result
1406
-
1407
  /*
1408
  * Maybe cache the results
1409
  */
@@ -1534,6 +1723,131 @@ class MLAData {
1534
  return $results;
1535
  }
1536
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1537
  /**
1538
  * Update a single item; change the meta data
1539
  * for a single attachment.
@@ -1718,34 +2032,8 @@ class MLAData {
1718
  } // foreach $tax_input
1719
  } // !empty $tax_input
1720
 
1721
- if ( is_array( $new_meta ) ) {
1722
- foreach ( $new_meta as $meta_key => $meta_value ) {
1723
- if ( isset( $post_data[ 'mla_item_' . $meta_key ] ) )
1724
- $old_meta_value = $post_data[ 'mla_item_' . $meta_key ];
1725
- else
1726
- $old_meta_value = '';
1727
-
1728
- if ( is_array( $old_meta_value ) ) {
1729
- $do_update = false;
1730
-
1731
- foreach ( $old_meta_value as $old_key => $old_value ) {
1732
- if ( $old_value != $meta_value ) {
1733
- $message .= sprintf( 'Changing %1$s[%2$d] from "%3$s" to "%4$s"<br>', $meta_key, $old_key, $old_value, $meta_value );
1734
- $do_update = true;
1735
- }
1736
- } // foreach $old_meta_value
1737
-
1738
- if ($do_update)
1739
- $results = update_post_meta( $post_id, $meta_key, $meta_value );
1740
- }
1741
- else {
1742
- if ( $old_meta_value != $meta_value ) {
1743
- $message .= sprintf( 'Changing %1$s from "%2$s" to "%3$s"<br>', $meta_key, $old_meta_value, $meta_value );
1744
- $results = update_post_meta( $post_id, $meta_key, $meta_value );
1745
- }
1746
- }
1747
- } // foreach $new_meta
1748
- }
1749
 
1750
  if ( empty( $message ) )
1751
  return array(
@@ -1753,12 +2041,15 @@ class MLAData {
1753
  'body' => ''
1754
  );
1755
  else {
 
 
1756
  if ( wp_update_post( $updates ) ) {
1757
  $final_message = 'Item: ' . $post_id . ' updated.';
1758
  /*
1759
  * Uncomment this for debugging.
1760
  */
1761
  // $final_message .= '<br>' . $message;
 
1762
 
1763
  return array(
1764
  'message' => $final_message,
176
  * @param string A formatting string containing [+placeholders+]
177
  *
178
  * @return array Placeholder information: each entry is an array with
179
+ * ['prefix'] => string, ['value'] => string, ['option'] => string 'single'|'export'
180
  */
181
  public static function mla_get_template_placeholders( $tpl ) {
182
  $results = array();
186
 
187
  foreach ( $matches[0] as $match ) {
188
  $key = substr( $match, 2, (strlen( $match ) - 4 ) );
189
+ $result = array( 'prefix' => '', 'value' => '', 'option' => 'text' );
190
  $match_count = preg_match( '/\[\+(.+):(.+)/', $match, $matches );
191
  if ( 1 == $match_count ) {
192
  $result['prefix'] = $matches[1];
199
  $match_count = preg_match( '/([^,]+)(,(single|export))\+\]/', $tail, $matches );
200
  if ( 1 == $match_count ) {
201
  $result['value'] = $matches[1];
202
+ $result['option'] = $matches[3];
 
203
  }
204
  else {
205
  $result['value'] = substr( $tail, 0, (strlen( $tail ) - 2 ) );
211
  return $results;
212
  }
213
 
214
+ /**
215
+ * Cache the results of mla_count_list_table_items for reuse in mla_query_list_table_items
216
+ *
217
+ * @since 1.40
218
+ *
219
+ * @var array
220
+ */
221
+ private static $mla_list_table_items = NULL;
222
+
223
  /**
224
  * Get the total number of attachment posts
225
  *
226
  * @since 0.30
227
  *
228
  * @param array Query variables, e.g., from $_REQUEST
229
+ * @param int (optional) number of rows to skip over to reach desired page
230
+ * @param int (optional) number of rows on each page
231
  *
232
  * @return integer Number of attachment posts
233
  */
234
+ public static function mla_count_list_table_items( $request, $offset = NULL, $count = NULL )
235
  {
236
+ if ( NULL != $offset && NULL != $count ) {
237
+ $request = self::_prepare_list_table_query( $request, $offset, $count );
238
+ self::$mla_list_table_items = self::_execute_list_table_query( $request );
239
+ return self::$mla_list_table_items->found_posts;
240
+ }
241
+
242
  $request = self::_prepare_list_table_query( $request );
243
  $results = self::_execute_list_table_query( $request );
244
+ self::$mla_list_table_items = NULL;
245
+
246
  return $results->found_posts;
247
  }
248
 
261
  * @return array attachment objects (posts) including parent data, meta data and references
262
  */
263
  public static function mla_query_list_table_items( $request, $offset, $count ) {
264
+ if ( NULL == self::$mla_list_table_items ) {
265
+ $request = self::_prepare_list_table_query( $request, $offset, $count );
266
+ self::$mla_list_table_items = self::_execute_list_table_query( $request );
267
+ }
268
+
269
+ $attachments = self::$mla_list_table_items->posts;
270
  foreach ( $attachments as $index => $attachment ) {
271
  /*
272
  * Add parent data
318
  * The parameters are set up in the _prepare_list_table_query function, and
319
  * any further logic required to translate those values is contained in the filters.
320
  *
321
+ * Array index values are: use_postmeta_view, postmeta_key, postmeta_value, patterns, detached, orderby, order, mla-metavalue, debug, s, mla_search_connector, mla_search_fields, sentence, exact
322
  *
323
  * @since 0.30
324
  *
386
  }
387
  break;
388
  case 'post_mime_type':
389
+ $clean_request[ $key ] = $value;
 
390
  break;
391
  case 'parent':
392
  case 'post_parent':
428
  * ['mla_search_connector'], ['mla_search_fields'] - Search Media options
429
  */
430
  case 's':
431
+ switch ( substr( $value, 0, 3 ) ) {
432
+ case '>|<':
433
+ $clean_request['debug'] = 'console';
434
+ break;
435
+ case '<|>':
436
+ $clean_request['debug'] = 'log';
437
+ break;
438
+ }
439
+
440
+ if ( isset( $clean_request['debug'] ) )
441
+ $value = substr( $value, 3 );
442
+
443
+ $value = stripslashes( trim( $value ) );
444
+
445
+ if ( ! empty( $value ) )
446
+ $clean_request[ $key ] = $value;
447
  break;
448
  case 'mla_search_connector':
449
  case 'mla_search_fields':
453
  case 'mla-metavalue':
454
  $clean_request[ $key ] = stripslashes( $value );
455
  break;
456
+ case 'meta_query':
457
+ if ( ! empty( $value ) ) {
458
+ if ( is_array( $value ) )
459
+ $clean_request[ $key ] = $value;
460
+ else {
461
+ $clean_request[ $key ] = unserialize( stripslashes( $value ) );
462
+ } // not array
463
+ }
464
+ break;
465
  default:
466
  // ignore anything else in $_REQUEST
467
  } // switch $key
470
  /*
471
  * Pass query parameters to the filters for _execute_list_table_query
472
  */
473
+ self::$query_parameters = array( 'use_postmeta_view' => false, 'orderby' => $clean_request['orderby'], 'order' => $clean_request['order'] );
474
  self::$query_parameters['detached'] = isset( $clean_request['detached'] );
475
+
476
+ /*
477
+ * Matching a meta_value to NULL requires a LEFT JOIN to a view and a special WHERE clause
478
+ * Matching a wildcard pattern requires mainpulating the WHERE clause, too
479
+ */
480
+ if ( isset( $clean_request['meta_query']['key'] ) ) {
481
+ self::$query_parameters['use_postmeta_view'] = true;
482
+ self::$query_parameters['postmeta_key'] = $clean_request['meta_query']['key'];
483
+ self::$query_parameters['postmeta_value'] = NULL;
484
+ unset( $clean_request['meta_query'] );
485
+ }
486
+ elseif ( isset( $clean_request['meta_query']['patterns'] ) ) {
487
+ self::$query_parameters['patterns'] = $clean_request['meta_query']['patterns'];
488
+ unset( $clean_request['meta_query']['patterns'] );
489
+ }
490
 
491
+ if ( isset( $clean_request['debug'] ) ) {
492
+ self::$query_parameters['debug'] = $clean_request['debug'];
493
+ unset( $clean_request['debug'] );
494
+ }
495
+
496
  /*
497
  * We must patch the WHERE clause if there are leading spaces in the meta_value
498
  */
642
  */
643
  private static function _execute_list_table_query( $request ) {
644
  global $wpdb, $table_prefix;
645
+
646
  /*
647
  * Custom fields are special; we have to use an SQL VIEW to build
648
  * an intermediate table and modify the JOIN to include posts
669
  add_filter( 'posts_orderby', 'MLAData::mla_query_posts_orderby_filter' );
670
 
671
  $results = new WP_Query( $request );
672
+
673
+ if ( isset( self::$query_parameters['debug'] ) ) {
674
+ if ( 'console' == self::$query_parameters['debug'] ) {
675
+ trigger_error( '_execute_list_table_query $request = ' . var_export( $request, true ), E_USER_WARNING );
676
+ trigger_error( '_execute_list_table_query self::$query_parameters = ' . var_export( self::$query_parameters, true ), E_USER_WARNING );
677
+ trigger_error( '_execute_list_table_query $results->request = ' . var_export( $results->request, true ), E_USER_WARNING );
678
+ trigger_error( '_execute_list_table_query $results->post_count = ' . var_export( $results->post_count, true ), E_USER_WARNING );
679
+ trigger_error( '_execute_list_table_query $results->found_posts = ' . var_export( $results->found_posts, true ), E_USER_WARNING );
680
+ }
681
+ else {
682
+ error_log( '_execute_list_table_query $request = ' . var_export( $request, true ), 0 );
683
+ error_log( '_execute_list_table_query self::$query_parameters = ' . var_export( self::$query_parameters, true ), 0 );
684
+ error_log( '_execute_list_table_query $results->request = ' . var_export( $results->request, true ), 0 );
685
+ error_log( '_execute_list_table_query $results->post_count = ' . var_export( $results->post_count, true ), 0 );
686
+ error_log( '_execute_list_table_query $results->found_posts = ' . var_export( $results->found_posts, true ) . "\r\n", 0 );
687
+ }
688
+ } // debug
689
 
690
  remove_filter( 'posts_orderby', 'MLAData::mla_query_posts_orderby_filter' );
691
  remove_filter( 'posts_where', 'MLAData::mla_query_posts_where_filter' );
713
  */
714
  public static function mla_query_posts_search_filter( $search_string, &$query_object ) {
715
  global $table_prefix, $wpdb;
 
716
  /*
717
  * Process the keyword search argument, if present.
718
  */
719
  $search_clause = '';
720
  if ( isset( self::$query_parameters['s'] ) ) {
721
+
722
+ if ( isset( self::$query_parameters['debug'] ) ) {
723
+ if ( 'console' == self::$query_parameters['debug'] ) {
724
+ trigger_error( 'mla_query_posts_search_filter search = ' . var_export( self::$query_parameters['s'], true ), E_USER_WARNING );
725
+ }
726
+ else {
727
+ error_log( 'mla_query_posts_search_filter search = ' . var_export( self::$query_parameters['s'], true ), 0 );
728
+ }
729
+ } // debug
730
+
731
  /*
732
  * Interpret a numeric value as the ID of a specific attachment or the ID of a parent post/page
733
  */
734
+ if( is_numeric( self::$query_parameters['s'] ) ) {
735
  $id = absint( self::$query_parameters['s'] );
736
+ $search_clause = ' AND ( ( ' . $wpdb->posts . '.ID = ' . $id . ' ) OR ( ' . $wpdb->posts . '.post_parent = ' . $id . ' ) ) ';
737
+
738
+ if ( isset( self::$query_parameters['debug'] ) ) {
739
+ if ( 'console' == self::$query_parameters['debug'] ) {
740
+ trigger_error( 'mla_query_posts_search_filter $search_clause = ' . var_export( $search_clause, true ), E_USER_WARNING );
741
+ }
742
+ else {
743
+ error_log( 'mla_query_posts_search_filter $search_clause = ' . var_export( $search_clause, true ), 0 );
744
+ }
745
+ } // debug
746
+
747
+ return $search_clause;
748
  }
749
 
750
  if ( self::$query_parameters['sentence'] ) {
802
  }
803
 
804
  /**
805
+ * Adds a JOIN clause, if required, to handle sorting/searching on custom fields or ALT Text
806
  *
807
  * Defined as public because it's a filter.
808
  *
849
  $where_clause = preg_replace( '/(^.*meta_value AS CHAR\) = \')([^\']*)/', '${1}' . self::$query_parameters['mla-metavalue'], $where_clause );
850
  }
851
 
852
+ /*
853
+ * Matching a NULL meta value
854
+ */
855
+ if ( array_key_exists( 'postmeta_value', self::$query_parameters ) && NULL == self::$query_parameters['postmeta_value'] ) {
856
+ $where_clause .= ' AND ' . self::$mla_alt_text_view . '.meta_value IS NULL';
857
+ }
858
+
859
+ /*
860
+ * WordPress modifies the LIKE clause - which we must reverse
861
+ */
862
+ if ( isset( self::$query_parameters['patterns'] ) ) {
863
+ foreach ( self::$query_parameters['patterns'] as $pattern ) {
864
+ $match_clause = '%' . str_replace( '%', '\\\\%', $pattern ) . '%';
865
+ $where_clause = str_replace( "LIKE '{$match_clause}'", "LIKE '{$pattern}'", $where_clause );
866
+ }
867
+ }
868
+
869
+ /*
870
+ * Unattached items require some help
871
+ */
872
  if ( self::$query_parameters['detached'] )
873
  $where_clause .= " AND {$table_prefix}posts.post_parent < 1";
874
 
898
  switch ( self::$query_parameters['orderby'] ) {
899
  case 'none':
900
  $orderby = '';
901
+ $orderby_clause = '';
902
  break;
903
  /*
904
  * There are two columns defined that end up sorting on post_title,
948
  */
949
  function mla_get_attachment_by_id( $post_id ) {
950
  global $post;
951
+ static $save_id = -1, $post_data;
952
+
953
+ if ( $post_id == $save_id )
954
+ return $post_data;
955
+ elseif ( $post_id == -1 ) {
956
+ $save_id = -1;
957
+ return NULL;
958
+ }
959
 
960
  $item = get_post( $post_id );
961
  if ( empty( $item ) ) {
987
  */
988
  $post_data['mla_references'] = self::mla_fetch_attachment_references( $post_id, $post_data['post_parent'] );
989
 
990
+ $save_id = $post_id;
991
  return $post_data;
992
  }
993
 
1001
  * @return array Parent information; post_date, post_title and post_type
1002
  */
1003
  public static function mla_fetch_attachment_parent_data( $parent_id ) {
1004
+ static $save_id = -1, $parent_data;
1005
+
1006
+ if ( $save_id == $parent_id )
1007
+ return $parent_data;
1008
+
1009
  $parent_data = array();
1010
  if ( $parent_id ) {
1011
  $parent = get_post( $parent_id );
1017
  $parent_data['parent_type'] = $parent->post_type;
1018
  }
1019
 
1020
+ $save_id = $parent_id;
1021
  return $parent_data;
1022
  }
1023
 
1031
  *
1032
  * @param string key value, e.g. array1.array2.element
1033
  * @param array PHP nested arrays
1034
+ * @param string format option 'text'|'single'|'export'|'array'|'multi'
1035
+ * @param boolean keep existing values - for 'multi' option
1036
  *
1037
  * @return string value matching key(.key ...) or ''
1038
  */
1039
+ public static function mla_find_array_element( $needle, $haystack, $option, $keep_existing = false ) {
1040
  $key_array = explode( '.', $needle );
1041
  if ( is_array( $key_array ) ) {
1042
  foreach( $key_array as $key ) {
1052
  }
1053
  else $haystack = '';
1054
 
1055
+ if ( 'single' == $option && is_array( $haystack ))
1056
  $haystack = current( $haystack );
1057
 
1058
  if ( is_array( $haystack ) ) {
1059
+ switch ( $option ) {
1060
+ case 'export':
1061
+ $haystack = var_export( $haystack, true );
1062
+ break;
1063
+ case 'multi':
1064
+ $haystack[0x80000000] = $option;
1065
+ $haystack[0x80000001] = $keep_existing;
1066
+ // fallthru
1067
+ case 'array':
1068
+ return $haystack;
1069
+ break;
1070
+ default:
1071
+ $haystack = implode( ',', $haystack );
1072
+ } // $option
1073
  }
1074
 
1075
  return sanitize_text_field( $haystack );
1089
  * @return array Meta data variables
1090
  */
1091
  public static function mla_fetch_attachment_metadata( $post_id ) {
1092
+ static $save_id = 0, $results;
1093
+
1094
+ if ( $save_id == $post_id )
1095
+ return $results;
1096
+
1097
  $attached_file = NULL;
1098
  $results = array();
1099
  $post_meta = get_metadata( 'post', $post_id );
1143
  } // $attached_file
1144
  } // is_array($post_meta)
1145
 
1146
+ $save_id = $post_id;
1147
  return $results;
1148
  }
1149
 
1162
  */
1163
  public static function mla_fetch_attachment_references( $ID, $parent ) {
1164
  global $wpdb;
1165
+ static $save_id = 0, $references, $inserted_in_option = NULL;
1166
+
1167
+ if ( $save_id == $ID )
1168
+ return $references;
1169
 
1170
  /*
1171
  * tested_reference true if any of the four where-used types was processed
1229
  }
1230
 
1231
  $references['files'][ $references['base_file'] ] = $references['base_file'];
1232
+ $pathinfo = pathinfo($references['base_file']);
1233
+ $references['file'] = $pathinfo['basename'];
1234
+ if ( '.' == $pathinfo['dirname'] )
1235
  $references['path'] = '';
1236
+ else
1237
+ $references['path'] = $pathinfo['dirname'] . '/';
 
 
 
 
1238
 
1239
  /*
1240
  * Process the where-used settings option
1289
  */
1290
  if ( MLAOptions::$process_inserted_in ) {
1291
  $reference_tests++;
1292
+
1293
+ if ( NULL == $inserted_in_option )
1294
+ $inserted_in_option = MLAOptions::mla_get_option( MLAOptions::MLA_INSERTED_IN_TUNING );
1295
+
1296
+ if ( 'base' == $inserted_in_option ) {
1297
+ $like = like_escape( $references['path'] . $pathinfo['filename'] ) . '%.' . like_escape( $pathinfo['extension'] );
1298
  $inserts = $wpdb->get_results(
1299
  $wpdb->prepare(
1300
  "
1309
 
1310
  if ( !empty( $inserts ) ) {
1311
  $references['found_reference'] = true;
1312
+ $references['inserts'][ $pathinfo['filename'] ] = $inserts;
1313
 
1314
  foreach ( $inserts as $insert ) {
1315
  if ( $insert->ID == $parent ) {
1317
  }
1318
  } // foreach $insert
1319
  } // !empty
1320
+ } // process base names
1321
+ else {
1322
+ foreach ( $references['files'] as $file => $file_data ) {
1323
+ $like = like_escape( $file );
1324
+ $inserts = $wpdb->get_results(
1325
+ $wpdb->prepare(
1326
+ "
1327
+ SELECT ID, post_type, post_title
1328
+ FROM {$wpdb->posts}
1329
+ WHERE {$exclude_revisions}(
1330
+ CONVERT(`post_content` USING utf8 )
1331
+ LIKE %s)
1332
+ ", "%{$like}%"
1333
+ )
1334
+ );
1335
+
1336
+ if ( !empty( $inserts ) ) {
1337
+ $references['found_reference'] = true;
1338
+ $references['inserts'][ $file ] = $inserts;
1339
+
1340
+ foreach ( $inserts as $insert ) {
1341
+ if ( $insert->ID == $parent ) {
1342
+ $references['found_parent'] = true;
1343
+ }
1344
+ } // foreach $insert
1345
+ } // !empty
1346
+ } // foreach $file
1347
+ } // process intermediate sizes
1348
  } // $process_inserted_in
1349
 
1350
  /*
1416
  $errors .= '(INVALID PARENT) ';
1417
 
1418
  $references['parent_errors'] = trim( $errors );
1419
+
1420
+ $save_id = $ID;
1421
  return $references;
1422
  }
1423
 
1428
  * and array(s) of which attachments each [gallery] contains. The arrays are built once
1429
  * each page load and cached for subsequent calls.
1430
  *
1431
+ * The outer array is keyed by post_id. It contains an associative array with:
 
1432
  * ['parent_title'] post_title of the gallery parent,
1433
  * ['parent_type'] 'post' or 'page' or the custom post_type of the gallery parent,
1434
+ * ['results'] array ( ID => ID ) of attachments appearing in ANY of the parent's galleries.
1435
+ * ['galleries'] array of [gallery] entries numbered from one (1), containing:
1436
+ * galleries[X]['query'] contains a string with the arguments of the [gallery],
1437
+ * galleries[X]['results'] contains an array ( ID ) of post_ids for the objects in the gallery.
1438
  *
1439
  * @since 0.70
1440
  *
1559
  return false;
1560
 
1561
  foreach ( $results as $result ) {
1562
+ $count = preg_match_all( "/\\{$shortcode}([^\\]]*)\\]/", $result->post_content, $matches, PREG_PATTERN_ORDER );
1563
  if ( $count ) {
1564
  $result_id = $result->ID;
1565
  $galleries_array[ $result_id ]['parent_title'] = $result->post_title;
1579
 
1580
  $post = $result; // set global variable for mla_gallery_shortcode
1581
  $attachments = MLAShortcodes::mla_get_shortcode_attachments( $result_id, $galleries_array[ $result_id ]['galleries'][ $instance ]['query'] );
1582
+
1583
+ if ( is_string( $attachments ) ) {
1584
+ trigger_error( htmlentities( sprintf( '(%1$s) %2$s (ID %3$d) query "%4$s" failed, returning "%5$s"', $result->post_type, $result->post_title, $result->ID, $galleries_array[ $result_id ]['galleries'][ $instance ]['query'], $attachments) ), E_USER_WARNING );
1585
+ }
1586
+ elseif ( ! empty( $attachments ) )
1587
  foreach ( $attachments as $attachment ) {
1588
  $galleries_array[ $result_id ]['results'][ $attachment->ID ] = $attachment->ID;
1589
  $galleries_array[ $result_id ]['galleries'][ $instance ]['results'][] = $attachment->ID;
1590
+ } // foreach $attachment
1591
  } // exact match
1592
  } // foreach $match
1593
  } // if $count
1594
  } // foreach $result
1595
+
1596
  /*
1597
  * Maybe cache the results
1598
  */
1723
  return $results;
1724
  }
1725
 
1726
+ /**
1727
+ * Update custom field data for a single attachment.
1728
+ *
1729
+ * @since 1.40
1730
+ *
1731
+ * @param int The ID of the attachment to be updated
1732
+ * @param array Field name => value pairs
1733
+ *
1734
+ * @return string success/failure message(s)
1735
+ */
1736
+ public static function mla_update_item_postmeta( $post_id, $new_meta ) {
1737
+ $post_data = MLAData::mla_fetch_attachment_metadata( $post_id );
1738
+ $message = '';
1739
+
1740
+ foreach ( $new_meta as $meta_key => $meta_value ) {
1741
+ if ( $multi_key = isset( $meta_value[0x80000000] ) )
1742
+ unset( $meta_value[0x80000000] );
1743
+
1744
+ if ( $keep_existing = isset( $meta_value[0x80000001] ) ) {
1745
+ $keep_existing = (boolean) $meta_value[0x80000001];
1746
+ unset( $meta_value[0x80000001] );
1747
+ }
1748
+
1749
+ if ( $no_null = isset( $meta_value[0x80000002] ) ) {
1750
+ $no_null = (boolean) $meta_value[0x80000002];
1751
+ unset( $meta_value[0x80000002] );
1752
+ }
1753
+
1754
+ if ( isset( $post_data[ 'mla_item_' . $meta_key ] ) ) {
1755
+ $old_meta_value = $post_data[ 'mla_item_' . $meta_key ];
1756
+
1757
+ if ( $multi_key && $no_null ) {
1758
+ if ( is_string( $old_meta_value ) )
1759
+ $old_meta_value = trim( $old_meta_value );
1760
+
1761
+ $delete = empty( $old_meta_value );
1762
+ }
1763
+ else
1764
+ $delete = NULL == $meta_value;
1765
+
1766
+ if ( $delete) {
1767
+ if ( delete_post_meta( $post_id, $meta_key ) )
1768
+ $message .= sprintf( 'Deleting %1$s<br>', $meta_key );
1769
+
1770
+ continue;
1771
+ }
1772
+ }
1773
+ else {
1774
+ if ( NULL != $meta_value ) {
1775
+ if ( $multi_key )
1776
+ foreach ( $meta_value as $new_value ) {
1777
+ if ( add_post_meta( $post_id, $meta_key, $new_value ) )
1778
+ $message .= sprintf( 'Adding %1$s = [%2$s]<br>', $meta_key, $new_value );
1779
+ }
1780
+ else
1781
+ if ( add_post_meta( $post_id, $meta_key, $meta_value ) )
1782
+ $message .= sprintf( 'Adding %1$s = %2$s<br>', $meta_key, $meta_value );
1783
+ }
1784
+
1785
+ continue; // no change or message if old and new are both NULL
1786
+ } // no old value
1787
+
1788
+ if ( is_array( $old_meta_value ) ) {
1789
+ $old_text = var_export( $old_meta_value, true );
1790
+ }
1791
+ else
1792
+ $old_text = $old_meta_value;
1793
+
1794
+ /*
1795
+ * Multi-key change from existing values to new values
1796
+ */
1797
+ if ( $multi_key ) {
1798
+ /*
1799
+ * Test for "no changes"
1800
+ */
1801
+ if ( $meta_value == (array) $old_meta_value )
1802
+ continue;
1803
+
1804
+ if ( ! $keep_existing ) {
1805
+ if ( delete_post_meta( $post_id, $meta_key ) )
1806
+ $message .= sprintf( 'Deleting old %1$s values<br>', $meta_key );
1807
+ $old_meta_value = array();
1808
+ }
1809
+ elseif ( $old_text == $old_meta_value ) // single value
1810
+ $old_meta_value = array( $old_meta_value );
1811
+
1812
+ $updated = 0;
1813
+ foreach ( $meta_value as $new_value ) {
1814
+ if ( ! in_array( $new_value, $old_meta_value ) ) {
1815
+ add_post_meta( $post_id, $meta_key, $new_value );
1816
+ $old_meta_value[] = $new_value; // prevent duplicates
1817
+ $updated++;
1818
+ }
1819
+ }
1820
+
1821
+ if ( $updated ) {
1822
+ $meta_value = get_post_meta( $post_id, $meta_key );
1823
+ if ( is_array( $meta_value ) )
1824
+ if ( 1 == count( $meta_value ) )
1825
+ $new_text = $meta_value[0];
1826
+ else
1827
+ $new_text = var_export( $meta_value, true );
1828
+ else
1829
+ $new_text = $meta_value;
1830
+
1831
+ $message .= sprintf( 'Changing %1$s from "%2$s" to "%3$s"; %4$d updates<br>', $meta_key, $old_text, $new_text, $updated );
1832
+ }
1833
+ }
1834
+ elseif ( $old_meta_value != $meta_value ) {
1835
+ if ( is_array( $old_meta_value ) )
1836
+ delete_post_meta( $post_id, $meta_key );
1837
+
1838
+ if ( is_array( $meta_value ) )
1839
+ $new_text = var_export( $meta_value, true );
1840
+ else
1841
+ $new_text = $meta_value;
1842
+
1843
+ $message .= sprintf( 'Changing %1$s from "%2$s" to "%3$s"<br>', $meta_key, $old_text, $new_text );
1844
+ $results = update_post_meta( $post_id, $meta_key, $meta_value );
1845
+ }
1846
+ } // foreach $new_meta
1847
+
1848
+ return $message;
1849
+ }
1850
+
1851
  /**
1852
  * Update a single item; change the meta data
1853
  * for a single attachment.
2032
  } // foreach $tax_input
2033
  } // !empty $tax_input
2034
 
2035
+ if ( is_array( $new_meta ) )
2036
+ $message .= self::mla_update_item_postmeta( $post_id, $new_meta );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2037
 
2038
  if ( empty( $message ) )
2039
  return array(
2041
  'body' => ''
2042
  );
2043
  else {
2044
+ MLAData::mla_get_attachment_by_id( -1 ); // invalidate the cached item
2045
+
2046
  if ( wp_update_post( $updates ) ) {
2047
  $final_message = 'Item: ' . $post_id . ' updated.';
2048
  /*
2049
  * Uncomment this for debugging.
2050
  */
2051
  // $final_message .= '<br>' . $message;
2052
+ // error_log( 'message = ' . var_export( $message, true ), 0 );
2053
 
2054
  return array(
2055
  'message' => $final_message,
includes/class-mla-edit-media.php CHANGED
@@ -94,7 +94,7 @@ class MLAEdit {
94
  echo "</div><!-- .misc-pub-section -->\r\n";
95
  echo '<div class="misc-pub-section mla-links">' . "\r\n";
96
 
97
- $view_args = array( 'page' => 'mla-menu', 'mla_item_ID' => $post->ID );
98
  if ( isset( $_REQUEST['mla_source'] ) )
99
  $view_args['mla_source'] = $_REQUEST['mla_source'];
100
 
@@ -111,12 +111,18 @@ class MLAEdit {
111
  *
112
  * @since 0.80
113
  *
114
- * @param string type of the current post, e.g., 'attachment'
115
- * @param object current post
116
  *
117
  * @return void
118
  */
119
- public static function mla_add_meta_boxes_action( $post_type, $post ) {
 
 
 
 
 
 
120
  if ( 'attachment' == $post_type ) {
121
  add_meta_box( 'mla-parent-info', 'Parent Info', 'MLAEdit::mla_parent_info_handler', 'attachment', 'normal', 'core' );
122
  add_meta_box( 'mla-menu-order', 'Menu Order', 'MLAEdit::mla_menu_order_handler', 'attachment', 'normal', 'core' );
94
  echo "</div><!-- .misc-pub-section -->\r\n";
95
  echo '<div class="misc-pub-section mla-links">' . "\r\n";
96
 
97
+ $view_args = array( 'page' => MLA::ADMIN_PAGE_SLUG, 'mla_item_ID' => $post->ID );
98
  if ( isset( $_REQUEST['mla_source'] ) )
99
  $view_args['mla_source'] = $_REQUEST['mla_source'];
100
 
111
  *
112
  * @since 0.80
113
  *
114
+ * @param string type of the current post, e.g., 'attachment' (optional, default 'unknown')
115
+ * @param object current post (optional, default (object) array ( 'ID' => 0 ))
116
  *
117
  * @return void
118
  */
119
+ public static function mla_add_meta_boxes_action( $post_type = 'unknown', $post = NULL ) {
120
+ /*
121
+ * Plugins call this action with varying numbers of arguments!
122
+ */
123
+ if ( NULL == $post )
124
+ $post = (object) array ( 'ID' => 0 );
125
+
126
  if ( 'attachment' == $post_type ) {
127
  add_meta_box( 'mla-parent-info', 'Parent Info', 'MLAEdit::mla_parent_info_handler', 'attachment', 'normal', 'core' );
128
  add_meta_box( 'mla-menu-order', 'Menu Order', 'MLAEdit::mla_menu_order_handler', 'attachment', 'normal', 'core' );
includes/class-mla-list-table.php CHANGED
@@ -133,6 +133,7 @@ class MLA_List_Table extends WP_List_Table {
133
  'author',
134
  'attached_to',
135
  // taxonomy columns added by mla_admin_init_action
 
136
  );
137
 
138
  /**
@@ -189,14 +190,14 @@ class MLA_List_Table extends WP_List_Table {
189
  }
190
 
191
  /**
192
- * Get mime types with one or more attachments for view preparation
193
  *
194
  * Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
195
- * with additional entries.
196
  *
197
  * @since 0.1
198
  *
199
- * @param array Number of posts for each mime type
200
  *
201
  * @return array Mime type names
202
  */
@@ -211,81 +212,6 @@ class MLA_List_Table extends WP_List_Table {
211
  return $available;
212
  }
213
 
214
- /**
215
- * Get possible mime types for view preparation
216
- *
217
- * Modeled after get_post_mime_types in wp-includes/post.php,
218
- * with additional entries.
219
- *
220
- * @since 0.1
221
- *
222
- * @return array Mime type names and HTML markup for views
223
- */
224
- public static function mla_get_attachment_mime_types( ) {
225
- return array(
226
- 'image' => array(
227
- 0 => 'Images',
228
- 1 => 'Manage Images',
229
- 2 => array(
230
- 0 => 'Image <span class="count">(%s)</span>',
231
- 1 => 'Images <span class="count">(%s)</span>',
232
- 'singular' => 'Image <span class="count">(%s)</span>',
233
- 'plural' => 'Images <span class="count">(%s)</span>',
234
- 'context' => NULL,
235
- 'domain' => NULL
236
- )
237
- ),
238
- 'audio' => array(
239
- 0 => 'Audio',
240
- 1 => 'Manage Audio',
241
- 2 => array(
242
- 0 => 'Audio <span class="count">(%s)</span>',
243
- 1 => 'Audio <span class="count">(%s)</span>',
244
- 'singular' => 'Audio <span class="count">(%s)</span>',
245
- 'plural' => 'Audio <span class="count">(%s)</span>',
246
- 'context' => NULL,
247
- 'domain' => NULL
248
- )
249
- ),
250
- 'video' => array(
251
- 0 => 'Video',
252
- 1 => 'Manage Video',
253
- 2 => array(
254
- 0 => 'Video <span class="count">(%s)</span>',
255
- 1 => 'Video <span class="count">(%s)</span>',
256
- 'singular' => 'Video <span class="count">(%s)</span>',
257
- 'plural' => 'Video <span class="count">(%s)</span>',
258
- 'context' => NULL,
259
- 'domain' => NULL
260
- )
261
- ),
262
- 'text' => array(
263
- 0 => 'Text',
264
- 1 => 'Manage Text',
265
- 2 => array(
266
- 0 => 'Text <span class="count">(%s)</span>',
267
- 1 => 'Text <span class="count">(%s)</span>',
268
- 'singular' => 'Text <span class="count">(%s)</span>',
269
- 'plural' => 'Text <span class="count">(%s)</span>',
270
- 'context' => NULL,
271
- 'domain' => NULL
272
- )
273
- ),
274
- 'application' => array(
275
- 0 => 'Applications',
276
- 1 => 'Manage Applications',
277
- 2 => array(
278
- 0 => 'Application <span class="count">(%s)</span>',
279
- 1 => 'Applications <span class="count">(%s)</span>',
280
- 'singular' => 'Application <span class="count">(%s)</span>',
281
- 'plural' => 'Applications <span class="count">(%s)</span>',
282
- 'context' => NULL,
283
- 'domain' => NULL
284
- )
285
- )
286
- );
287
- }
288
-
289
  /**
290
  * Get dropdown box of terms to filter by, if available
291
  *
@@ -304,7 +230,7 @@ class MLA_List_Table extends WP_List_Table {
304
  $dropdown_options = array(
305
  'show_option_all' => 'All ' . $tax_object->labels->name,
306
  'show_option_none' => 'No ' . $tax_object->labels->name,
307
- 'orderby' => 'ID',
308
  'order' => 'ASC',
309
  'show_count' => false,
310
  'hide_empty' => false,
@@ -391,7 +317,7 @@ class MLA_List_Table extends WP_List_Table {
391
  }
392
 
393
  /**
394
- * Adds support for taxonomy columns
395
  *
396
  * Called in the admin_init action because the list_table object isn't
397
  * created in time to affect the "screen options" setup.
@@ -402,7 +328,7 @@ class MLA_List_Table extends WP_List_Table {
402
  */
403
  public static function mla_admin_init_action( )
404
  {
405
- $taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'names' );
406
 
407
  foreach ( $taxonomies as $tax_name ) {
408
  if ( MLAOptions::mla_taxonomy_support( $tax_name ) ) {
@@ -435,7 +361,7 @@ class MLA_List_Table extends WP_List_Table {
435
  'singular' => 'attachment', //singular name of the listed records
436
  'plural' => 'attachments', //plural name of the listed records
437
  'ajax' => true, //does this table support ajax?
438
- 'screen' => 'media_page_mla-menu'
439
  ) );
440
 
441
  $this->currently_hidden = self::get_hidden_columns();
@@ -449,9 +375,9 @@ class MLA_List_Table extends WP_List_Table {
449
  /**
450
  * Supply a column value if no column-specific function has been defined
451
  *
452
- * Called when the parent class can't find a method specifically built for a
453
- * given column. The taxonomy columns are handled here. All other columns should
454
- * have a specific method, so this function returns a troubleshooting message.
455
  *
456
  * @since 0.1
457
  *
@@ -472,7 +398,7 @@ class MLA_List_Table extends WP_List_Table {
472
  $list = array();
473
  foreach ( $terms as $term ) {
474
  $list[ ] = sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
475
- 'page' => 'mla-menu',
476
  'mla-tax' => $taxonomy,
477
  'mla-term' => $term->slug,
478
  'heading_suffix' => urlencode( $tax_object->label . ': ' . $term->name )
@@ -492,12 +418,19 @@ class MLA_List_Table extends WP_List_Table {
492
 
493
  $list = array();
494
  foreach( $values as $index => $value ) {
495
- $list[ ] = sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
496
- 'page' => 'mla-menu',
497
- 'mla-metakey' => urlencode( MLA_List_Table::$default_columns[ $column_name ] ),
498
- 'mla-metavalue' => urlencode( $value ),
499
- 'heading_suffix' => urlencode( MLA_List_Table::$default_columns[ $column_name ] . ': ' . $value )
500
- ), 'upload.php' ) ), esc_html( $value ) );
 
 
 
 
 
 
 
501
  }
502
 
503
  if ( count( $list ) > 1 )
@@ -538,7 +471,10 @@ class MLA_List_Table extends WP_List_Table {
538
  */
539
  function column_icon( $item )
540
  {
541
- return wp_get_attachment_image( $item->ID, array( 80, 60 ), true );
 
 
 
542
  }
543
 
544
  /**
@@ -687,7 +623,7 @@ class MLA_List_Table extends WP_List_Table {
687
  $parent_title = '(no title: bad ID)';
688
 
689
  $parent = sprintf( '<a href="%1$s">(parent:%2$s)</a>', esc_url( add_query_arg( array(
690
- 'page' => 'mla-menu',
691
  'parent' => $item->post_parent,
692
  'heading_suffix' => urlencode( 'Parent: ' . $parent_title )
693
  ), 'upload.php' ) ), (string) $item->post_parent );
@@ -719,7 +655,7 @@ class MLA_List_Table extends WP_List_Table {
719
  $errors = '';
720
 
721
  if ( !empty( $row_actions ) ) {
722
- return sprintf( '%1$s<br>%2$s<br>%3$s%4$s', /*%1$s*/ $post_title, /*%2$s*/ $post_name, /*%3$s*/ $errors, /*%4$s*/ $this->row_actions( $row_actions ) );
723
  } else {
724
  return sprintf( '%1$s<br>%2$s<br>%3$s', /*%1$s*/ $post_title, /*%2$s*/ $post_name, /*%3$s*/ $errors );
725
  }
@@ -737,7 +673,7 @@ class MLA_List_Table extends WP_List_Table {
737
  $row_actions = self::_build_rollover_actions( $item, 'post_title' );
738
 
739
  if ( !empty( $row_actions ) ) {
740
- return sprintf( '%1$s<br>%2$s', /*%1$s*/ esc_attr( $item->post_title ), /*%2$s*/ $this->row_actions( $row_actions ) );
741
  } else {
742
  return esc_attr( $item->post_title );
743
  }
@@ -755,7 +691,7 @@ class MLA_List_Table extends WP_List_Table {
755
  $row_actions = self::_build_rollover_actions( $item, 'post_name' );
756
 
757
  if ( !empty( $row_actions ) ) {
758
- return sprintf( '%1$s<br>%2$s', /*%1$s*/ esc_attr( $item->post_name ), /*%2$s*/ $this->row_actions( $row_actions ) );
759
  } else {
760
  return esc_attr( $item->post_name );
761
  }
@@ -777,7 +713,7 @@ class MLA_List_Table extends WP_List_Table {
777
  $parent_title = '(no title: bad ID)';
778
 
779
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
780
- 'page' => 'mla-menu',
781
  'parent' => $item->post_parent,
782
  'heading_suffix' => urlencode( 'Parent: ' . $parent_title )
783
  ), 'upload.php' ) ), (string) $item->post_parent );
@@ -937,7 +873,7 @@ class MLA_List_Table extends WP_List_Table {
937
  function column_alt_text( $item ) {
938
  if ( isset( $item->mla_wp_attachment_image_alt ) )
939
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
940
- 'page' => 'mla-menu',
941
  'mla-metakey' => '_wp_attachment_image_alt',
942
  'mla-metavalue' => urlencode( $item->mla_wp_attachment_image_alt ),
943
  'heading_suffix' => urlencode( 'ALT Text: ' . $item->mla_wp_attachment_image_alt )
@@ -979,7 +915,11 @@ class MLA_List_Table extends WP_List_Table {
979
  * @return string HTML markup to be placed inside the column
980
  */
981
  function column_post_mime_type( $item ) {
982
- return $item->post_mime_type;
 
 
 
 
983
  }
984
 
985
  /**
@@ -1065,7 +1005,7 @@ class MLA_List_Table extends WP_List_Table {
1065
 
1066
  if ( isset( $user->data->display_name ) )
1067
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
1068
- 'page' => 'mla-menu',
1069
  'author' => $item->post_author,
1070
  'heading_suffix' => urlencode( 'Author: ' . $user->data->display_name )
1071
  ), 'upload.php' ) ), esc_html( $user->data->display_name ) );
@@ -1124,7 +1064,7 @@ class MLA_List_Table extends WP_List_Table {
1124
  */
1125
  function get_hidden_columns( )
1126
  {
1127
- $columns = get_user_option( 'managemedia_page_mla-menucolumnshidden' );
1128
 
1129
  if ( is_array( $columns ) )
1130
  return $columns;
@@ -1162,78 +1102,166 @@ class MLA_List_Table extends WP_List_Table {
1162
  }
1163
 
1164
  /**
1165
- * Returns an associative array listing all the views that can be used with this table.
1166
- * These are listed across the top of the page and managed by WordPress.
1167
  *
1168
- * @since 0.1
 
 
 
1169
  *
1170
- * @return array View information,e.g., array ( id => link )
1171
  */
1172
- function get_views( ) {
1173
  global $wpdb;
 
1174
 
1175
- $type_links = array();
1176
- $_num_posts = (array) wp_count_attachments();
1177
- $_total_posts = array_sum( $_num_posts ) - $_num_posts['trash'];
1178
- $total_orphans = $wpdb->get_var(
1179
- "
1180
- SELECT COUNT( * ) FROM {$wpdb->posts}
1181
- WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1
1182
- "
1183
- );
1184
-
1185
- $post_mime_types = self::mla_get_attachment_mime_types();
1186
- $avail_post_mime_types = $this->_avail_mime_types( $_num_posts );
1187
- $matches = wp_match_mime_types( array_keys( $post_mime_types ), array_keys( $_num_posts ) );
1188
-
1189
  /*
1190
- * Remember the view filters
1191
  */
1192
- $base_url = 'upload.php?page=mla-menu';
1193
-
1194
- if ( isset( $_REQUEST['m'] ) )
1195
- $base_url = add_query_arg( array(
1196
- 'm' => $_REQUEST['m']
1197
- ), $base_url );
1198
-
1199
- if ( isset( $_REQUEST['mla_filter_term'] ) )
1200
- $base_url = add_query_arg( array(
1201
- 'mla_filter_term' => $_REQUEST['mla_filter_term']
1202
- ), $base_url );
1203
-
1204
- foreach ( $matches as $type => $reals )
1205
- foreach ( $reals as $real )
1206
- $num_posts[ $type ] = ( isset( $num_posts[ $type ] ) ) ? $num_posts[ $type ] + $_num_posts[ $real ] : $_num_posts[ $real ];
1207
-
1208
- $class = ( empty( $_REQUEST['post_mime_type'] ) && !$this->detached && !$this->is_trash ) ? ' class="current"' : '';
1209
- $type_links['all'] = "<a href='{$base_url}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '</a>';
1210
 
1211
- foreach ( $post_mime_types as $mime_type => $label ) {
1212
- $class = '';
 
1213
 
1214
- if ( !wp_match_mime_types( $mime_type, $avail_post_mime_types ) )
1215
- continue;
 
 
1216
 
1217
- if ( !empty( $_REQUEST['post_mime_type'] ) && wp_match_mime_types( $mime_type, $_REQUEST['post_mime_type'] ) )
1218
- $class = ' class="current"';
 
 
1219
 
1220
- if ( !empty( $num_posts[ $mime_type ] ) ) {
1221
- $type_links[ $mime_type ] = "<a href='" . add_query_arg( array(
1222
- 'post_mime_type' => $mime_type
1223
- ), $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $label[ 2 ], $num_posts[ $mime_type ] ), number_format_i18n( $num_posts[ $mime_type ] ) ) . '</a>';
1224
- }
1225
- } // foreach post_mime_type
1226
-
1227
- $type_links['detached'] = '<a href="' . add_query_arg( array(
1228
- 'detached' => '1'
1229
- ), $base_url ) . '"' . ( $this->detached ? ' class="current"' : '' ) . '>' . sprintf( _nx( 'Unattached <span class="count">(%s)</span>', 'Unattached <span class="count">(%s)</span>', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</a>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1230
 
1231
- if ( !empty( $_num_posts['trash'] ) )
1232
- $type_links['trash'] = '<a href="' . add_query_arg( array(
1233
- 'status' => 'trash'
1234
- ), $base_url ) . '"' . ( $this->is_trash ? ' class="current"' : '' ) . '>' . sprintf( _nx( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', $_num_posts['trash'], 'uploaded files' ), number_format_i18n( $_num_posts['trash'] ) ) . '</a>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1235
 
1236
- return $type_links;
 
 
 
 
 
 
 
 
 
 
 
 
 
1237
  }
1238
 
1239
  /**
@@ -1318,7 +1346,6 @@ class MLA_List_Table extends WP_List_Table {
1318
  /*
1319
  * REQUIRED for pagination.
1320
  */
1321
- $total_items = MLAData::mla_count_list_table_items( $_REQUEST );
1322
  $user = get_current_user_id();
1323
  $screen = get_current_screen();
1324
  $option = $screen->get_option( 'per_page', 'option' );
@@ -1326,6 +1353,16 @@ class MLA_List_Table extends WP_List_Table {
1326
  if ( empty( $per_page ) || $per_page < 1 ) {
1327
  $per_page = $screen->get_option( 'per_page', 'default' );
1328
  }
 
 
 
 
 
 
 
 
 
 
1329
 
1330
  /*
1331
  * REQUIRED. We also have to register our pagination options & calculations.
@@ -1335,14 +1372,6 @@ class MLA_List_Table extends WP_List_Table {
1335
  'per_page' => $per_page, //WE have to determine how many items to show on a page
1336
  'total_pages' => ceil( $total_items / $per_page ) //WE have to calculate the total number of pages
1337
  ) );
1338
-
1339
- $current_page = $this->get_pagenum();
1340
-
1341
- /*
1342
- * REQUIRED. Assign sorted and paginated data to the items property, where
1343
- * it can be used by the rest of the class.
1344
- */
1345
- $this->items = MLAData::mla_query_list_table_items( $_REQUEST, ( ( $current_page - 1 ) * $per_page ), $per_page );
1346
  }
1347
 
1348
  /**
@@ -1370,6 +1399,6 @@ class MLA_List_Table extends WP_List_Table {
1370
  */
1371
  add_action( 'admin_init', 'MLA_List_Table::mla_admin_init_action' );
1372
 
1373
- add_filter( 'get_user_option_managemedia_page_mla-menucolumnshidden', 'MLA_List_Table::mla_manage_hidden_columns_filter', 10, 3 );
1374
- add_filter( 'manage_media_page_mla-menu_columns', 'MLA_List_Table::mla_manage_columns_filter', 10, 0 );
1375
  ?>
133
  'author',
134
  'attached_to',
135
  // taxonomy columns added by mla_admin_init_action
136
+ // custom field columns added by mla_admin_init_action
137
  );
138
 
139
  /**
190
  }
191
 
192
  /**
193
+ * Get MIME types with one or more attachments for view preparation
194
  *
195
  * Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
196
+ * but uses the output of wp_count_attachments() as input.
197
  *
198
  * @since 0.1
199
  *
200
+ * @param array Number of posts for each MIME type
201
  *
202
  * @return array Mime type names
203
  */
212
  return $available;
213
  }
214
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  /**
216
  * Get dropdown box of terms to filter by, if available
217
  *
230
  $dropdown_options = array(
231
  'show_option_all' => 'All ' . $tax_object->labels->name,
232
  'show_option_none' => 'No ' . $tax_object->labels->name,
233
+ 'orderby' => 'name',
234
  'order' => 'ASC',
235
  'show_count' => false,
236
  'hide_empty' => false,
317
  }
318
 
319
  /**
320
+ * Adds support for taxonomy and custom field columns
321
  *
322
  * Called in the admin_init action because the list_table object isn't
323
  * created in time to affect the "screen options" setup.
328
  */
329
  public static function mla_admin_init_action( )
330
  {
331
+ $taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'names' );
332
 
333
  foreach ( $taxonomies as $tax_name ) {
334
  if ( MLAOptions::mla_taxonomy_support( $tax_name ) ) {
361
  'singular' => 'attachment', //singular name of the listed records
362
  'plural' => 'attachments', //plural name of the listed records
363
  'ajax' => true, //does this table support ajax?
364
+ 'screen' => 'media_page_' . MLA::ADMIN_PAGE_SLUG
365
  ) );
366
 
367
  $this->currently_hidden = self::get_hidden_columns();
375
  /**
376
  * Supply a column value if no column-specific function has been defined
377
  *
378
+ * Called when the parent class can't find a method specifically built for a given column.
379
+ * The taxonomy and custom field columns are handled here. All other columns should have
380
+ * a specific method, so this function returns a troubleshooting message.
381
  *
382
  * @since 0.1
383
  *
398
  $list = array();
399
  foreach ( $terms as $term ) {
400
  $list[ ] = sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
401
+ 'page' => MLA::ADMIN_PAGE_SLUG,
402
  'mla-tax' => $taxonomy,
403
  'mla-term' => $term->slug,
404
  'heading_suffix' => urlencode( $tax_object->label . ': ' . $term->name )
418
 
419
  $list = array();
420
  foreach( $values as $index => $value ) {
421
+ /*
422
+ * For display purposes, convert array values.
423
+ * They are not links because no search will match them.
424
+ */
425
+ if ( is_array( $value ) )
426
+ $list[ ] = 'array( ' . implode( ', ', $value ) . ' )';
427
+ else
428
+ $list[ ] = sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
429
+ 'page' => MLA::ADMIN_PAGE_SLUG,
430
+ 'mla-metakey' => urlencode( MLA_List_Table::$default_columns[ $column_name ] ),
431
+ 'mla-metavalue' => urlencode( $value ),
432
+ 'heading_suffix' => urlencode( MLA_List_Table::$default_columns[ $column_name ] . ': ' . $value )
433
+ ), 'upload.php' ) ), esc_html( $value ) );
434
  }
435
 
436
  if ( count( $list ) > 1 )
471
  */
472
  function column_icon( $item )
473
  {
474
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) )
475
+ return wp_get_attachment_image( $item->ID, array( 64, 64 ), true );
476
+ else
477
+ return wp_get_attachment_image( $item->ID, array( 80, 60 ), true );
478
  }
479
 
480
  /**
623
  $parent_title = '(no title: bad ID)';
624
 
625
  $parent = sprintf( '<a href="%1$s">(parent:%2$s)</a>', esc_url( add_query_arg( array(
626
+ 'page' => MLA::ADMIN_PAGE_SLUG,
627
  'parent' => $item->post_parent,
628
  'heading_suffix' => urlencode( 'Parent: ' . $parent_title )
629
  ), 'upload.php' ) ), (string) $item->post_parent );
655
  $errors = '';
656
 
657
  if ( !empty( $row_actions ) ) {
658
+ return sprintf( '%1$s<br>%2$s<br>%3$s%4$s%5$s', /*%1$s*/ $post_title, /*%2$s*/ $post_name, /*%3$s*/ $errors, /*%4$s*/ $this->row_actions( $row_actions ), /*%5$s*/ $this->_build_inline_data( $item ) );
659
  } else {
660
  return sprintf( '%1$s<br>%2$s<br>%3$s', /*%1$s*/ $post_title, /*%2$s*/ $post_name, /*%3$s*/ $errors );
661
  }
673
  $row_actions = self::_build_rollover_actions( $item, 'post_title' );
674
 
675
  if ( !empty( $row_actions ) ) {
676
+ return sprintf( '%1$s<br>%2$s%3$s', /*%1$s*/ esc_attr( $item->post_title ), /*%2$s*/ $this->row_actions( $row_actions ), /*%3$s*/ $this->_build_inline_data( $item ) );
677
  } else {
678
  return esc_attr( $item->post_title );
679
  }
691
  $row_actions = self::_build_rollover_actions( $item, 'post_name' );
692
 
693
  if ( !empty( $row_actions ) ) {
694
+ return sprintf( '%1$s<br>%2$s%3$s', /*%1$s*/ esc_attr( $item->post_name ), /*%2$s*/ $this->row_actions( $row_actions ), /*%3$s*/ $this->_build_inline_data( $item ) );
695
  } else {
696
  return esc_attr( $item->post_name );
697
  }
713
  $parent_title = '(no title: bad ID)';
714
 
715
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
716
+ 'page' => MLA::ADMIN_PAGE_SLUG,
717
  'parent' => $item->post_parent,
718
  'heading_suffix' => urlencode( 'Parent: ' . $parent_title )
719
  ), 'upload.php' ) ), (string) $item->post_parent );
873
  function column_alt_text( $item ) {
874
  if ( isset( $item->mla_wp_attachment_image_alt ) )
875
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
876
+ 'page' => MLA::ADMIN_PAGE_SLUG,
877
  'mla-metakey' => '_wp_attachment_image_alt',
878
  'mla-metavalue' => urlencode( $item->mla_wp_attachment_image_alt ),
879
  'heading_suffix' => urlencode( 'ALT Text: ' . $item->mla_wp_attachment_image_alt )
915
  * @return string HTML markup to be placed inside the column
916
  */
917
  function column_post_mime_type( $item ) {
918
+ return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
919
+ 'page' => MLA::ADMIN_PAGE_SLUG,
920
+ 'post_mime_type' => urlencode( $item->post_mime_type ),
921
+ 'heading_suffix' => urlencode( 'MIME Type: ' . $item->post_mime_type )
922
+ ), 'upload.php' ) ), esc_html( $item->post_mime_type ) );
923
  }
924
 
925
  /**
1005
 
1006
  if ( isset( $user->data->display_name ) )
1007
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
1008
+ 'page' => MLA::ADMIN_PAGE_SLUG,
1009
  'author' => $item->post_author,
1010
  'heading_suffix' => urlencode( 'Author: ' . $user->data->display_name )
1011
  ), 'upload.php' ) ), esc_html( $user->data->display_name ) );
1064
  */
1065
  function get_hidden_columns( )
1066
  {
1067
+ $columns = get_user_option( 'managemedia_page_' . MLA::ADMIN_PAGE_SLUG . 'columnshidden' );
1068
 
1069
  if ( is_array( $columns ) )
1070
  return $columns;
1102
  }
1103
 
1104
  /**
1105
+ * Returns HTML markup for one view that can be used with this table
 
1106
  *
1107
+ * @since 1.40
1108
+ *
1109
+ * @param string View slug, key to MLA_POST_MIME_TYPES array
1110
+ * @param string Slug for current view
1111
  *
1112
+ * @return string | false HTML for link to display the view, false if count = zero
1113
  */
1114
+ function _get_view( $view_slug, $current_view ) {
1115
  global $wpdb;
1116
+ static $mla_types = NULL, $posts_per_type, $post_mime_types, $avail_post_mime_types, $matches, $num_posts, $base_url;
1117
 
1118
+ $class = ( $view_slug == $current_view ) ? ' class="current"' : '';
1119
+
 
 
 
 
 
 
 
 
 
 
 
 
1120
  /*
1121
+ * Calculate the common values once per page load
1122
  */
1123
+ if ( is_null( $mla_types ) ) {
1124
+ $query_types = MLAMime::mla_query_view_items( array( 'orderby' => 'menu_order' ), 0, 0 );
1125
+ if ( ! is_array( $query_types ) )
1126
+ $query_types = array ();
1127
+
1128
+ $mla_types = array ();
1129
+ foreach( $query_types as $value )
1130
+ $mla_types[ $value->slug ] = $value;
1131
+
1132
+ $posts_per_type = (array) wp_count_attachments();
1133
+ $post_mime_types = get_post_mime_types();
1134
+ $avail_post_mime_types = $this->_avail_mime_types( $posts_per_type );
1135
+ $matches = wp_match_mime_types( array_keys( $post_mime_types ), array_keys( $posts_per_type ) );
 
 
 
 
 
1136
 
1137
+ foreach ( $matches as $type => $reals )
1138
+ foreach ( $reals as $real )
1139
+ $num_posts[ $type ] = ( isset( $num_posts[ $type ] ) ) ? $num_posts[ $type ] + $posts_per_type[ $real ] : $posts_per_type[ $real ];
1140
 
1141
+ /*
1142
+ * Remember the view filters
1143
+ */
1144
+ $base_url = 'upload.php?page=' . MLA::ADMIN_PAGE_SLUG;
1145
 
1146
+ if ( isset( $_REQUEST['m'] ) )
1147
+ $base_url = add_query_arg( array(
1148
+ 'm' => $_REQUEST['m']
1149
+ ), $base_url );
1150
 
1151
+ if ( isset( $_REQUEST['mla_filter_term'] ) )
1152
+ $base_url = add_query_arg( array(
1153
+ 'mla_filter_term' => $_REQUEST['mla_filter_term']
1154
+ ), $base_url );
1155
+ }
1156
+
1157
+ /*
1158
+ * Handle the special cases: all, unattached and trash
1159
+ */
1160
+ switch( $view_slug ) {
1161
+ case 'all':
1162
+ $total_items = array_sum( $posts_per_type ) - $posts_per_type['trash'];
1163
+ return "<a href='{$base_url}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_items, 'uploaded files' ), number_format_i18n( $total_items ) ) . '</a>';
1164
+ case 'unattached':
1165
+ $total_items = $wpdb->get_var(
1166
+ "
1167
+ SELECT COUNT( * ) FROM {$wpdb->posts}
1168
+ WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1
1169
+ "
1170
+ );
1171
+
1172
+ if ( $total_items )
1173
+ return '<a href="' . add_query_arg( array( 'detached' => '1' ), $base_url ) . '"' . $class . '>' . sprintf( _nx( 'Unattached <span class="count">(%s)</span>', 'Unattached <span class="count">(%s)</span>', $total_items, 'detached files' ), number_format_i18n( $total_items ) ) . '</a>';
1174
+ else
1175
+ return false;
1176
+ case 'trash':
1177
+ if ( $posts_per_type['trash'] )
1178
+ return '<a href="' . add_query_arg( array(
1179
+ 'status' => 'trash'
1180
+ ), $base_url ) . '"' . $class . '>' . sprintf( _nx( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', $posts_per_type['trash'], 'uploaded files' ), number_format_i18n( $posts_per_type['trash'] ) ) . '</a>';
1181
+ else
1182
+ return false;
1183
+ } // switch special cases
1184
+
1185
+ /*
1186
+ * Make sure the slug is in our list
1187
+ */
1188
+ if ( array_key_exists( $view_slug, $mla_types ) )
1189
+ $mla_type = $mla_types[ $view_slug ];
1190
+ else
1191
+ return false;
1192
 
1193
+ /*
1194
+ * Handle post_mime_types
1195
+ */
1196
+ if ( $mla_type->post_mime_type ) {
1197
+ if ( !empty( $num_posts[ $view_slug ] ) )
1198
+ return "<a href='" . add_query_arg( array(
1199
+ 'post_mime_type' => $view_slug
1200
+ ), $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $post_mime_types[ $view_slug ][ 2 ], $num_posts[ $view_slug ] ), number_format_i18n( $num_posts[ $view_slug ] ) ) . '</a>';
1201
+ else
1202
+ return false;
1203
+ }
1204
+
1205
+ /*
1206
+ * Handle extended specification types
1207
+ */
1208
+ if ( empty( $mla_type->specification ) )
1209
+ $query = array ( 'post_mime_type' => $view_slug );
1210
+ else
1211
+ $query = MLAMime::mla_prepare_view_query( $mla_type->specification );
1212
+
1213
+ $total_items = MLAData::mla_count_list_table_items( $query );
1214
+ if ( $total_items ) {
1215
+ $singular = sprintf('%s <span class="count">(%%s)</span>', $mla_type->singular );
1216
+ $plural = sprintf('%s <span class="count">(%%s)</span>', $mla_type->plural );
1217
+ $nooped_plural = _n_noop( $singular, $plural );
1218
+
1219
+ if ( isset( $query['post_mime_type'] ) )
1220
+ $query['post_mime_type'] = urlencode( $query['post_mime_type'] );
1221
+ else
1222
+ $query['meta_query'] = urlencode( serialize( $query['meta_query'] ) );
1223
+
1224
+ return "<a href='" . add_query_arg( $query, $base_url ) . "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $total_items ), number_format_i18n( $total_items ) ) . '</a>';
1225
+ }
1226
+
1227
+ return false;
1228
+ } // _get_view
1229
+
1230
+ /**
1231
+ * Returns an associative array listing all the views that can be used with this table.
1232
+ * These are listed across the top of the page and managed by WordPress.
1233
+ *
1234
+ * @since 0.1
1235
+ *
1236
+ * @return array View information,e.g., array ( id => link )
1237
+ */
1238
+ function get_views( ) {
1239
+ /*
1240
+ * Find current view
1241
+ */
1242
+ if ( $this->detached )
1243
+ $current_view = 'unattached';
1244
+ elseif ( $this->is_trash )
1245
+ $current_view = 'trash';
1246
+ elseif ( empty( $_REQUEST['post_mime_type'] ) )
1247
+ $current_view = 'all';
1248
+ else
1249
+ $current_view = $_REQUEST['post_mime_type'];
1250
 
1251
+ $mla_types = MLAMime::mla_query_view_items( array( 'orderby' => 'menu_order' ), 0, 0 );
1252
+ if ( ! is_array( $mla_types ) )
1253
+ $mla_types = array ();
1254
+
1255
+ /*
1256
+ * Filter the list, generate the views
1257
+ */
1258
+ $view_links = array();
1259
+ foreach ( $mla_types as $value ) {
1260
+ if ( $value->table_view && $link = self::_get_view( $value->slug, $current_view ) )
1261
+ $view_links[ $value->slug ] = $link;
1262
+ }
1263
+
1264
+ return $view_links;
1265
  }
1266
 
1267
  /**
1346
  /*
1347
  * REQUIRED for pagination.
1348
  */
 
1349
  $user = get_current_user_id();
1350
  $screen = get_current_screen();
1351
  $option = $screen->get_option( 'per_page', 'option' );
1353
  if ( empty( $per_page ) || $per_page < 1 ) {
1354
  $per_page = $screen->get_option( 'per_page', 'default' );
1355
  }
1356
+
1357
+ // $current_page = $this->get_pagenum();
1358
+ $current_page = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
1359
+
1360
+ /*
1361
+ * REQUIRED. Assign sorted and paginated data to the items property, where
1362
+ * it can be used by the rest of the class.
1363
+ */
1364
+ $total_items = MLAData::mla_count_list_table_items( $_REQUEST, ( ( $current_page - 1 ) * $per_page ), $per_page );
1365
+ $this->items = MLAData::mla_query_list_table_items( $_REQUEST, ( ( $current_page - 1 ) * $per_page ), $per_page );
1366
 
1367
  /*
1368
  * REQUIRED. We also have to register our pagination options & calculations.
1372
  'per_page' => $per_page, //WE have to determine how many items to show on a page
1373
  'total_pages' => ceil( $total_items / $per_page ) //WE have to calculate the total number of pages
1374
  ) );
 
 
 
 
 
 
 
 
1375
  }
1376
 
1377
  /**
1399
  */
1400
  add_action( 'admin_init', 'MLA_List_Table::mla_admin_init_action' );
1401
 
1402
+ add_filter( 'get_user_option_managemedia_page_' . MLA::ADMIN_PAGE_SLUG . 'columnshidden', 'MLA_List_Table::mla_manage_hidden_columns_filter', 10, 3 );
1403
+ add_filter( 'manage_media_page_' . MLA::ADMIN_PAGE_SLUG . '_columns', 'MLA_List_Table::mla_manage_columns_filter', 10, 0 );
1404
  ?>
includes/class-mla-main.php CHANGED
@@ -38,7 +38,7 @@ class MLA {
38
  *
39
  * @var string
40
  */
41
- const CURRENT_MLA_VERSION = '1.30';
42
 
43
  /**
44
  * Slug for registering and enqueueing plugin style sheet
@@ -253,7 +253,7 @@ class MLA {
253
  return;
254
  }
255
 
256
- if ( ( 'media_page_mla-menu' != $page_hook ) && ( 'settings_page_mla-settings-menu' != $page_hook ) )
257
  return;
258
 
259
  wp_register_style( self::STYLESHEET_SLUG, MLA_PLUGIN_URL . 'css/mla-style.css', false, self::CURRENT_MLA_VERSION );
@@ -331,7 +331,10 @@ class MLA {
331
  self::$page_hooks[ $hook ] = 't_' . $tax_name;
332
  } // foreach $taxonomies
333
 
334
- add_action( 'load-edit-tags.php', 'MLA::mla_add_help_tab' );
 
 
 
335
  }
336
 
337
  add_filter( 'parent_file', 'MLA::mla_parent_file_filter', 10, 1 );
@@ -366,13 +369,14 @@ class MLA {
366
  public static function mla_add_help_tab( )
367
  {
368
  $screen = get_current_screen();
369
-
370
  /*
371
  * Is this one of our pages?
372
  */
373
- if ( !array_key_exists( $screen->id, self::$page_hooks ) ) {
 
 
 
374
  return;
375
- }
376
 
377
  $file_suffix = $screen->id;
378
 
@@ -412,10 +416,14 @@ class MLA {
412
  return;
413
  }
414
 
415
- if ( !empty( $template_array['sidebar'] ) ) {
416
- $screen->set_help_sidebar( $template_array['sidebar'] );
417
- unset( $template_array['sidebar'] );
418
- }
 
 
 
 
419
 
420
  /*
421
  * Provide explicit control over tab order
@@ -438,6 +446,13 @@ class MLA {
438
 
439
  ksort( $tab_array, SORT_NUMERIC );
440
  foreach ( $tab_array as $indx => $value ) {
 
 
 
 
 
 
 
441
  $screen->add_help_tab( $value );
442
  }
443
  }
@@ -455,8 +470,8 @@ class MLA {
455
  public static function mla_screen_options_show_screen_filter( $show_screen, $this_screen ) {
456
  if ( isset( $_REQUEST['mla_admin_action'] ) && ( $_REQUEST['mla_admin_action'] == self::MLA_ADMIN_SINGLE_EDIT_DISPLAY ) )
457
  return false;
458
- else
459
- return $show_screen;
460
  }
461
 
462
  /**
@@ -464,7 +479,7 @@ class MLA {
464
  *
465
  * @since 0.1
466
  *
467
- * @param boolean Unknown - always false?
468
  * @param string Name of the option being changed
469
  * @param string New value of the option
470
  *
@@ -474,6 +489,8 @@ class MLA {
474
  {
475
  if ( 'mla_entries_per_page' == $option )
476
  return $value;
 
 
477
  }
478
 
479
  /**
@@ -527,7 +544,7 @@ class MLA {
527
  * Make sure the "Assistant" submenu line is bolded when we go to the Edit Media page
528
  */
529
  if ( isset( $_REQUEST['mla_source'] ) )
530
- $submenu_file = 'mla-menu';
531
 
532
  /*
533
  * WordPress 3.5 adds native support for taxonomies
@@ -711,7 +728,12 @@ class MLA {
711
 
712
  if ( !empty( $page_content['body'] ) ) {
713
  if ( !empty( $page_content['message'] ) ) {
714
- echo " <div class=\"mla_messages\"><p>\r\n";
 
 
 
 
 
715
  echo ' ' . $page_content['message'] . "\r\n";
716
  echo " </p></div>\r\n"; // id="message"
717
  }
@@ -740,11 +762,32 @@ class MLA {
740
  echo "</h2>\r\n";
741
 
742
  if ( !empty( $page_content['message'] ) ) {
743
- echo " <div class=\"mla_messages\"><p>\r\n";
 
 
 
 
 
744
  echo ' ' . $page_content['message'] . "\r\n";
745
  echo " </p></div>\r\n"; // id="message"
746
  }
747
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
748
  // Create an instance of our package class...
749
  $MLAListTable = new MLA_List_Table();
750
 
@@ -753,7 +796,7 @@ class MLA {
753
  $MLAListTable->views();
754
 
755
  // Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions
756
- echo '<form id="mla-filter" action="' . admin_url( 'upload.php' ) . "\" method=\"get\">\r\n";
757
  /*
758
  * Compose the Search Media box
759
  */
38
  *
39
  * @var string
40
  */
41
+ const CURRENT_MLA_VERSION = '1.40';
42
 
43
  /**
44
  * Slug for registering and enqueueing plugin style sheet
253
  return;
254
  }
255
 
256
+ if ( 'media_page_' . self::ADMIN_PAGE_SLUG != $page_hook )
257
  return;
258
 
259
  wp_register_style( self::STYLESHEET_SLUG, MLA_PLUGIN_URL . 'css/mla-style.css', false, self::CURRENT_MLA_VERSION );
331
  self::$page_hooks[ $hook ] = 't_' . $tax_name;
332
  } // foreach $taxonomies
333
 
334
+ /*
335
+ * Load here, not 'load-edit-tags.php', to put our tab after the defaults
336
+ */
337
+ add_action( 'admin_head-edit-tags.php', 'MLA::mla_add_help_tab' );
338
  }
339
 
340
  add_filter( 'parent_file', 'MLA::mla_parent_file_filter', 10, 1 );
369
  public static function mla_add_help_tab( )
370
  {
371
  $screen = get_current_screen();
 
372
  /*
373
  * Is this one of our pages?
374
  */
375
+ if ( !array_key_exists( $screen->id, self::$page_hooks ) )
376
+ return;
377
+
378
+ if ( 'edit-tags' == $screen->base && 'attachment' != $screen->post_type )
379
  return;
 
380
 
381
  $file_suffix = $screen->id;
382
 
416
  return;
417
  }
418
 
419
+ /*
420
+ * Don't add sidebar to the WordPress category and post_tag screens
421
+ */
422
+ if ( ! ( 'edit-tags' == $screen->base && in_array( $screen->taxonomy, array( 'post_tag', 'category' ) ) ) )
423
+ if ( !empty( $template_array['sidebar'] ) ) {
424
+ $screen->set_help_sidebar( $template_array['sidebar'] );
425
+ unset( $template_array['sidebar'] );
426
+ }
427
 
428
  /*
429
  * Provide explicit control over tab order
446
 
447
  ksort( $tab_array, SORT_NUMERIC );
448
  foreach ( $tab_array as $indx => $value ) {
449
+ /*
450
+ * Don't add duplicate tabs to the WordPress category and post_tag screens
451
+ */
452
+ if ( 'edit-tags' == $screen->base && in_array( $screen->taxonomy, array( 'post_tag', 'category' ) ) )
453
+ if ( 'mla-attachments-column' != $value['id'] )
454
+ continue;
455
+
456
  $screen->add_help_tab( $value );
457
  }
458
  }
470
  public static function mla_screen_options_show_screen_filter( $show_screen, $this_screen ) {
471
  if ( isset( $_REQUEST['mla_admin_action'] ) && ( $_REQUEST['mla_admin_action'] == self::MLA_ADMIN_SINGLE_EDIT_DISPLAY ) )
472
  return false;
473
+
474
+ return $show_screen;
475
  }
476
 
477
  /**
479
  *
480
  * @since 0.1
481
  *
482
+ * @param mixed false or value returned by previous filter
483
  * @param string Name of the option being changed
484
  * @param string New value of the option
485
  *
489
  {
490
  if ( 'mla_entries_per_page' == $option )
491
  return $value;
492
+ elseif ( $status )
493
+ return $status;
494
  }
495
 
496
  /**
544
  * Make sure the "Assistant" submenu line is bolded when we go to the Edit Media page
545
  */
546
  if ( isset( $_REQUEST['mla_source'] ) )
547
+ $submenu_file = self::ADMIN_PAGE_SLUG;
548
 
549
  /*
550
  * WordPress 3.5 adds native support for taxonomies
728
 
729
  if ( !empty( $page_content['body'] ) ) {
730
  if ( !empty( $page_content['message'] ) ) {
731
+ if ( false !== strpos( $page_content['message'], 'ERROR:' ) )
732
+ $messages_class = 'mla_errors';
733
+ else
734
+ $messages_class = 'mla_messages';
735
+
736
+ echo " <div class=\"{$messages_class}\"><p>\r\n";
737
  echo ' ' . $page_content['message'] . "\r\n";
738
  echo " </p></div>\r\n"; // id="message"
739
  }
762
  echo "</h2>\r\n";
763
 
764
  if ( !empty( $page_content['message'] ) ) {
765
+ if ( false !== strpos( $page_content['message'], 'ERROR:' ) )
766
+ $messages_class = 'mla_errors';
767
+ else
768
+ $messages_class = 'mla_messages';
769
+
770
+ echo " <div class=\"{$messages_class}\"><p>\r\n";
771
  echo ' ' . $page_content['message'] . "\r\n";
772
  echo " </p></div>\r\n"; // id="message"
773
  }
774
 
775
+ /*
776
+ * Optional - limit width of the views list
777
+ */
778
+ $view_width = MLAOptions::mla_get_option( 'table_views_width' );
779
+ if ( !empty( $view_width ) ) {
780
+ if ( is_numeric( $view_width ) )
781
+ $view_width .= 'px';
782
+
783
+ echo " <style type='text/css'>\r\n";
784
+ echo " ul.subsubsub {\r\n";
785
+ echo " width: {$view_width};\r\n";
786
+ echo " max-width: {$view_width};\r\n";
787
+ echo " }\r\n";
788
+ echo " </style>\r\n";
789
+ }
790
+
791
  // Create an instance of our package class...
792
  $MLAListTable = new MLA_List_Table();
793
 
796
  $MLAListTable->views();
797
 
798
  // Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions
799
+ echo '<form action="' . admin_url( 'upload.php' ) . '" method="get" id="mla-filter">' . "\r\n";
800
  /*
801
  * Compose the Search Media box
802
  */
includes/class-mla-media-modal.php CHANGED
@@ -179,7 +179,7 @@ class MLAModal {
179
  */
180
  public static function mla_media_view_settings_filter( $settings, $post ) {
181
  self::$mla_media_modal_settings['ajaxNonce'] = wp_create_nonce( MLA::MLA_ADMIN_NONCE );
182
- self::$mla_media_modal_settings['mimeTypes'] = wp_list_pluck( MLA_List_Table::mla_get_attachment_mime_types( ), 0 );
183
  self::$mla_media_modal_settings['mimeTypes']['detached'] = 'Unattached';
184
  self::$mla_media_modal_settings['months'] = self::_months_dropdown('attachment');
185
 
@@ -377,9 +377,16 @@ class MLAModal {
377
  'mla_search_value', 'mla_search_fields', 'mla_search_connector'
378
  ) ) );
379
 
380
- if ( isset( $query['post_mime_type'] ) && ( 'detached' == $query['post_mime_type'] ) ) {
381
- $query['detached'] = '1';
382
- unset( $query['post_mime_type'] );
 
 
 
 
 
 
 
383
  }
384
 
385
  if ( isset( $query['mla_search_value'] ) ) {
179
  */
180
  public static function mla_media_view_settings_filter( $settings, $post ) {
181
  self::$mla_media_modal_settings['ajaxNonce'] = wp_create_nonce( MLA::MLA_ADMIN_NONCE );
182
+ self::$mla_media_modal_settings['mimeTypes'] = MLAMime::mla_pluck_table_views();
183
  self::$mla_media_modal_settings['mimeTypes']['detached'] = 'Unattached';
184
  self::$mla_media_modal_settings['months'] = self::_months_dropdown('attachment');
185
 
377
  'mla_search_value', 'mla_search_fields', 'mla_search_connector'
378
  ) ) );
379
 
380
+ if ( isset( $query['post_mime_type'] ) ) {
381
+ if ( 'detached' == $query['post_mime_type'] ) {
382
+ $query['detached'] = '1';
383
+ unset( $query['post_mime_type'] );
384
+ }
385
+ else {
386
+ $view = $query['post_mime_type'];
387
+ unset( $query['post_mime_type'] );
388
+ $query = array_merge( $query, MLAMime::mla_prepare_view_query( $view ) );
389
+ }
390
  }
391
 
392
  if ( isset( $query['mla_search_value'] ) ) {
includes/class-mla-mime-types.php ADDED
@@ -0,0 +1,2399 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Media Library Assistant MIME Type Support
4
+ *
5
+ * @package Media Library Assistant
6
+ * @since 1.40
7
+ */
8
+
9
+ /**
10
+ * Class MLA (Media Library Assistant) MIME filters WordPress MIME Type functions and supports
11
+ * the Views and Uploads Settings tabs
12
+ *
13
+ * @package Media Library Assistant
14
+ * @since 1.40
15
+ */
16
+ class MLAMime {
17
+ /**
18
+ * Initialization function, similar to __construct()
19
+ *
20
+ * @since 1.40
21
+ *
22
+ * @return void
23
+ */
24
+ public static function initialize() {
25
+ // add_filter( 'sanitize_mime_type', 'MLAMime::mla_sanitize_mime_type_filter', 0x7FFFFFFF, 2 );
26
+ add_filter( 'ext2type', 'MLAMime::mla_ext2type_filter', 0x7FFFFFFF, 1 );
27
+ // add_filter( 'wp_check_filetype_and_ext', 'MLAMime::mla_wp_check_filetype_and_ext_filter', 0x7FFFFFFF, 4 );
28
+
29
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_UPLOAD_MIMES ) ) {
30
+ if ( function_exists('wp_get_mime_types') )
31
+ add_filter( 'mime_types', 'MLAMime::mla_mime_types_filter', 0x7FFFFFFF, 1 );
32
+
33
+ add_filter( 'upload_mimes', 'MLAMime::mla_upload_mimes_filter', 0x7FFFFFFF, 1 );
34
+ }
35
+
36
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_POST_MIME_TYPES ) )
37
+ add_filter( 'post_mime_types', 'MLAMime::mla_post_mime_types_filter', 0x7FFFFFFF, 1 );
38
+
39
+ add_filter( 'icon_dir', 'MLAMime::mla_icon_dir_filter', 0x7FFFFFFF, 1 );
40
+ add_filter( 'icon_dir_uri', 'MLAMime::mla_icon_dir_uri_filter', 0x7FFFFFFF, 1 );
41
+ add_filter( 'icon_dirs', 'MLAMime::mla_icon_dirs_filter', 0x7FFFFFFF, 1 );
42
+ // add_filter( 'wp_mime_type_icon', 'MLAMime::mla_wp_mime_type_icon_filter', 0x7FFFFFFF, 3 );
43
+ }
44
+
45
+ /**
46
+ * Disable MIME filtering during option initialization
47
+ *
48
+ * @since 1.40
49
+ *
50
+ * @var boolean
51
+ */
52
+ private static $disable_mla_filtering = false;
53
+
54
+ /**
55
+ * Sanitize a MIME type
56
+ *
57
+ * Called from /wp-includes/formatting.php, function sanitize_mime_type().
58
+ * Defined as public because it's a filter.
59
+ *
60
+ * @since 1.40
61
+ *
62
+ * @param string Sanitized MIME type
63
+ * @param string Raw MIME type
64
+ *
65
+ * @return string Updated sanitized MIME type
66
+ */
67
+ public static function mla_sanitize_mime_type_filter( $sanitized_mime_type, $raw_mime_type ) {
68
+ global $wp_filter;
69
+ // error_log( 'mla_sanitize_mime_type_filter $sanitized_mime_type = ' . var_export( $sanitized_mime_type, true ), 0 );
70
+ // error_log( 'mla_sanitize_mime_type_filter $raw_mime_type = ' . var_export( $raw_mime_type, true ), 0 );
71
+ // error_log( ' $wp_filter[sanitize_mime_type] = ' . var_export( $wp_filter['sanitize_mime_type'], true ), 0 );
72
+ return $sanitized_mime_type;
73
+ } // mla_sanitize_mime_type_filter
74
+
75
+ /**
76
+ * In-memory representation of the Icon Type => file extension(s) associations
77
+ *
78
+ * @since 1.40
79
+ *
80
+ * @var array slug => ( singular, plural, specification, post_mime_type, table_view, menu_order, description )
81
+ */
82
+ private static $mla_icon_type_associations = NULL;
83
+
84
+ /**
85
+ * Update the file extension to icon type (e.g., xls => spreadsheet, doc => document) array
86
+ *
87
+ * Note that the calling function, wp_ext2type, takes an extension and returns an icon type.
88
+ * This filter updates the array of possible matches to support the calling function.
89
+ *
90
+ * Called from /wp-includes/functions.php, function wp_ext2type(). That function is called from
91
+ * /wp-admin/includes/ajax-actions.php, function wp_ajax_send_link_to_editor(),
92
+ * /wp-admin/includes/media.php, function wp_media_upload_handler(), and
93
+ * /wp-includes/post.php, function wp_mime_type_icon(). The first two calls look for "audio"
94
+ * and "video" files to call the appropriate filter. The third call assigns the appropriate icon
95
+ * to the file for display purposes.
96
+ *
97
+ * Defined as public because it's a filter.
98
+ *
99
+ * @since 1.40
100
+ *
101
+ * @param array The type => ( extensions ) associations.
102
+ *
103
+ * @return array The updated associations array.
104
+ */
105
+ public static function mla_ext2type_filter( $standard_types ) {
106
+ global $wp_filter;
107
+
108
+ if ( self::$disable_mla_filtering ) {
109
+ self::$mla_core_icon_types = $standard_types;
110
+ return $standard_types;
111
+ }
112
+
113
+ if ( NULL != self::$mla_icon_type_associations )
114
+ return self::$mla_icon_type_associations;
115
+
116
+ if ( ! self::_get_upload_mime_templates() )
117
+ return $standard_types;
118
+
119
+ /*
120
+ * Build and sort the type => extensions list
121
+ */
122
+ $items = self::mla_query_upload_items( array( 'mla_upload_view' => 'active' ), 0, 0 );
123
+ $pairs = array();
124
+ foreach ( $items as $value )
125
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) )
126
+ $pairs[ $value->slug ] = $value->icon_type;
127
+ else
128
+ $pairs[ $value->slug ] = $value->wp_icon_type;
129
+
130
+ asort( $pairs );
131
+
132
+ /*
133
+ * Compress the list, grouping by icon_type
134
+ */
135
+ self::$mla_icon_type_associations = array();
136
+ $icon_type = '.bad.value.'; // prime the pump
137
+ $extensions = array ( 'xxx' );
138
+ foreach( $pairs as $this_extension => $this_type ) {
139
+ if ( $this_type != $icon_type ) {
140
+ self::$mla_icon_type_associations[ $icon_type ] = $extensions;
141
+ $extensions = array( $this_extension );
142
+ $icon_type = $this_type;
143
+ }
144
+ else
145
+ $extensions[] = $this_extension;
146
+ }
147
+
148
+ self::$mla_icon_type_associations[ $icon_type ] = $extensions;
149
+ unset( self::$mla_icon_type_associations['.bad.value.'] );
150
+
151
+ return self::$mla_icon_type_associations;
152
+ } // mla_ext2type_filter
153
+
154
+ /**
155
+ * Attempts to determine the real file type of a file
156
+ *
157
+ * Called from /wp-includes/functions.php, function wp_check_filetype_and_ext().
158
+ * Defined as public because it's a filter.
159
+ *
160
+ * @since 1.40
161
+ *
162
+ * @param array array( ext, type, proper_filename (string or false) )
163
+ * @param string Full path to the image
164
+ * @param string The filename of the image
165
+ * @param array Optional array of MIME types
166
+ *
167
+ * @return array Updated array( ext, type, proper_filename (string or false) )
168
+ */
169
+ public static function mla_wp_check_filetype_and_ext_filter( $validate, $file, $filename, $mimes ) {
170
+ global $wp_filter;
171
+ // error_log( 'mla_wp_check_filetype_and_ext_filter $validate = ' . var_export( $validate, true ), 0 );
172
+ // error_log( 'mla_wp_check_filetype_and_ext_filter $file = ' . var_export( $file, true ), 0 );
173
+ // error_log( 'mla_wp_check_filetype_and_ext_filter $filename = ' . var_export( $filename, true ), 0 );
174
+ // error_log( 'mla_wp_check_filetype_and_ext_filter $mimes = ' . var_export( $mimes, true ), 0 );
175
+ // error_log( ' $wp_filter[wp_check_filetype_and_ext] = ' . var_export( $wp_filter['wp_check_filetype_and_ext'], true ), 0 );
176
+ return $validate;
177
+ } // mla_wp_check_filetype_and_ext_filter
178
+
179
+ /**
180
+ * Retrieve list of MIME types and file extensions; use this filter to add types
181
+ *
182
+ * Called from /wp-includes/functions.php, function wp_get_mime_types(). That function
183
+ * is called from /wp-includes/class-wp-image-editor.php functions get_mime_type()
184
+ * and get_extension(), and from /wp-includes/functions.php, functions do_enclose()
185
+ * and get_allowed_mime_types().
186
+ *
187
+ * Defined as public because it's a filter.
188
+ *
189
+ * @since 1.40
190
+ *
191
+ * @param array Mime types keyed by the file extension regex corresponding to those types
192
+ *
193
+ * @return array Updated MIME types
194
+ */
195
+ public static function mla_mime_types_filter( $mime_types ) {
196
+ global $wp_filter;
197
+
198
+ if ( self::$disable_mla_filtering || ! self::_get_upload_mime_templates() )
199
+ return $mime_types;
200
+
201
+ /*
202
+ * Build and sort the extension => type list
203
+ */
204
+ $items = self::mla_query_upload_items( array( 'mla_upload_view' => 'active' ), 0, 0 );
205
+ $pairs = array();
206
+ foreach ( $items as $value )
207
+ $pairs[ $value->slug ] = $value->mime_type;
208
+
209
+ asort( $pairs );
210
+
211
+ /*
212
+ * Compress the list, grouping my mime_type
213
+ */
214
+ $items = array();
215
+ $extensions = '.bad.value.'; // prime the pump
216
+ $mime_type = '';
217
+ foreach( $pairs as $this_extension => $this_type ) {
218
+ if ( $this_type != $mime_type ) {
219
+ $items[ $extensions ] = $mime_type;
220
+ $extensions = $this_extension;
221
+ $mime_type = $this_type;
222
+ }
223
+ else
224
+ $extensions .= '|' . $this_extension;
225
+ }
226
+
227
+ $items[ $extensions ] = $mime_type;
228
+ unset( $items['.bad.value.'] );
229
+
230
+ return $items; // $mime_types;
231
+ } // mla_mime_types_filter
232
+
233
+ /**
234
+ * Retrieve list of allowed MIME types and file extensions; use this filter to remove types
235
+ *
236
+ * Called from /wp-includes/functions.php, function get_allowed_mime_types(). That function
237
+ * is called from /wp-includes/formatting.php function sanitize_file_name() and from
238
+ * /wp-includes/functions.php, function wp_check_filetype(). wp_check_filetype returns only one
239
+ * MIME type for a given file extension, so the file extension should/must be a unique key.
240
+ *
241
+ * This filter is also hooked by /wp-includes/ms-functions.php and processed in function
242
+ * check_upload_mimes(), which "is used to filter that list against the filetype whitelist
243
+ * provided by Multisite Super Admins at wp-admin/network/settings.php." Multisite installs must
244
+ * respect this restriction, so any list we produce will be passed thru that function if it exists.
245
+ *
246
+ * This function is defined as public because it's a filter.
247
+ *
248
+ * @since 1.40
249
+ *
250
+ * @param array Mime types keyed by the file extension regex corresponding to those types
251
+ *
252
+ * @return array Updated allowed MIME types
253
+ */
254
+ public static function mla_upload_mimes_filter( $mime_types ) {
255
+ global $wp_filter;
256
+
257
+ if ( self::$disable_mla_filtering || ! self::_get_upload_mime_templates() )
258
+ return $mime_types;
259
+
260
+ /*
261
+ * Build and sort the extension => type list
262
+ */
263
+ $items = self::mla_query_upload_items( array( 'mla_upload_view' => 'active' ), 0, 0 );
264
+ $pairs = array();
265
+ foreach ( $items as $value )
266
+ $pairs[ $value->slug ] = $value->mime_type;
267
+
268
+ asort( $pairs );
269
+
270
+ /*
271
+ * Compress the list, grouping by mime_type
272
+ */
273
+ $items = array();
274
+ $extensions = '.bad.value.'; // prime the pump
275
+ $mime_type = '';
276
+ foreach( $pairs as $this_extension => $this_type ) {
277
+ if ( $this_type != $mime_type ) {
278
+ $items[ $extensions ] = $mime_type;
279
+ $extensions = $this_extension;
280
+ $mime_type = $this_type;
281
+ }
282
+ else
283
+ $extensions .= '|' . $this_extension;
284
+ }
285
+
286
+ $items[ $extensions ] = $mime_type;
287
+ unset( $items['.bad.value.'] );
288
+
289
+ return $mime_types;
290
+ } // mla_upload_mimes_filter
291
+
292
+ /**
293
+ * Get default Post MIME Types
294
+ *
295
+ * Called from /wp-includes/post.php, function get_post_mime_types(). That function
296
+ * is called from:
297
+ * /wp-admin/includes/media.php function get_media_item(), to validate the type of an
298
+ * attachment when it is edited,
299
+ * /wp-admin/includes/post.php, function wp_edit_attachments_query() to count the number
300
+ * of attachments of each type, and
301
+ * /wp-includes/media.php function wp_enqueue_media(), to populate the the Media Manager/Add Media
302
+ * "media items" drop down list.
303
+ *
304
+ * Defined as public because it's a filter.
305
+ *
306
+ * @since 1.40
307
+ *
308
+ * @param array Content types (image, audio, video) and presentation strings, e.g.
309
+ * 'image' => array(__('Images'), __('Manage Images'),
310
+ * _n_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')),
311
+ *
312
+ * @return array Updated allowed MIME types
313
+ */
314
+ public static function mla_post_mime_types_filter( $post_mime_types ) {
315
+ global $wp_filter;
316
+
317
+ if ( self::$disable_mla_filtering || ! self::_get_post_mime_templates() )
318
+ return $post_mime_types;
319
+
320
+ /*
321
+ * Filter the list and sort by menu_order
322
+ */
323
+ $minor_sort = 0;
324
+ $sorted_types = array();
325
+ foreach ( self::$mla_post_mime_templates as $slug => $value )
326
+ if ( $value['post_mime_type'] ) {
327
+ $value['slug'] = $slug;
328
+ $sorted_types[ ( $value['menu_order'] * 1000 ) + $minor_sort++ ] = $value;
329
+ } // new type
330
+ ksort( $sorted_types, SORT_NUMERIC );
331
+
332
+ /*
333
+ * Generate the merged, sorted list
334
+ */
335
+ $new_mime_types = array();
336
+ foreach ( $sorted_types as $value ) {
337
+ $singular = sprintf('%s <span class="count">(%%s)</span>', $value['singular'] );
338
+ $plural = sprintf('%s <span class="count">(%%s)</span>', $value['plural'] );
339
+ $new_mime_types[ $value['slug'] ] = array(
340
+ __( $value['plural'] ),
341
+ __( 'Manage ' . $value['plural'] ),
342
+ _n_noop( $singular, $plural )
343
+ );
344
+ }
345
+
346
+ return $new_mime_types;
347
+ } // mla_post_mime_types_filter
348
+
349
+ /**
350
+ * Retrieve the icon directory for a MIME type
351
+ *
352
+ * Called from /wp-includes/deprecated.php, function get_attachment_icon_src().
353
+ * Called from /wp-includes/media.php, function wp_get_attachment_image_src().
354
+ * Called from /wp-includes/post.php, function wp_mime_type_icon().
355
+ * Defined as public because it's a filter.
356
+ *
357
+ * @since 1.40
358
+ *
359
+ * @param string Path to the icon directory
360
+ *
361
+ * @return string Updated path to the icon directory, no trailing slash
362
+ */
363
+ public static function mla_icon_dir_filter( $path ) {
364
+ global $wp_filter;
365
+
366
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) )
367
+ return MLA_PLUGIN_PATH . 'images/crystal';
368
+
369
+ return $path;
370
+ } // mla_icon_dir_filter
371
+
372
+ /**
373
+ * Retrieve the icon directory URL for a MIME type
374
+ *
375
+ * Called from /wp-includes/post.php, function wp_mime_type_icon().
376
+ * Defined as public because it's a filter.
377
+ *
378
+ * @since 1.40
379
+ *
380
+ * @param string Path to the icon directory URL
381
+ *
382
+ * @return string Updated path to the icon directory URL, no trailing slash
383
+ */
384
+ public static function mla_icon_dir_uri_filter( $uri ) {
385
+ global $wp_filter;
386
+
387
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) )
388
+ return MLA_PLUGIN_URL . 'images/crystal';
389
+
390
+ return $uri;
391
+ } // mla_icon_dir_uri_filter
392
+
393
+ /**
394
+ * Retrieve the icon (directory => URI) array for a MIME type
395
+ *
396
+ * Called from /wp-includes/post.php, function wp_mime_type_icon().
397
+ * Defined as public because it's a filter.
398
+ *
399
+ * @since 1.40
400
+ *
401
+ * @param array Path(s) and URI(s) to the icon directories
402
+ *
403
+ * @return array Updated (path => URI) array
404
+ */
405
+ public static function mla_icon_dirs_filter( $path_uri_array ) {
406
+ global $wp_filter;
407
+
408
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) )
409
+ $path_uri_array [ MLA_PLUGIN_PATH . 'images/crystal' ] = MLA_PLUGIN_URL . 'images/crystal';
410
+
411
+ return $path_uri_array;
412
+ } // mla_icon_dirs_filter
413
+
414
+ /**
415
+ * Retrieve the icon for a MIME type
416
+ *
417
+ * Called from /wp-includes/post.php, function wp_mime_type_icon().
418
+ * Defined as public because it's a filter.
419
+ *
420
+ * @since 1.40
421
+ *
422
+ * @param string URI to the MIME type icon
423
+ * @param string MIME type represented by the icon
424
+ * @param integer Attachment ID or zero (0) if MIME type passed in
425
+ *
426
+ * @return array Updated (path => URI) array
427
+ */
428
+ public static function mla_wp_mime_type_icon_filter( $icon, $mime, $post_id ) {
429
+ return $icon;
430
+ } // mla_wp_mime_type_icon_filter
431
+
432
+ /**
433
+ * Sanitize and expand query arguments from request variables
434
+ *
435
+ * @since 1.40
436
+ *
437
+ * @param array query parameters from web page, usually found in $_REQUEST
438
+ * @param int Optional number of rows (default 0) to skip over to reach desired page
439
+ * @param int Optional number of rows on each page (0 = all rows, default)
440
+ *
441
+ * @return array revised arguments suitable for query
442
+ */
443
+ private static function _prepare_view_items_query( $raw_request, $offset = 0, $count = 0 ) {
444
+ /*
445
+ * Go through the $raw_request, take only the arguments that are used in the query and
446
+ * sanitize or validate them.
447
+ */
448
+ if ( ! is_array( $raw_request ) ) {
449
+ error_log( 'ERROR: _prepare_view_items_query $raw_request = ' . var_export( $raw_request, true ), 0 );
450
+ return NULL;
451
+ }
452
+
453
+ $clean_request = array (
454
+ 'orderby' => 'slug',
455
+ 'order' => 'ASC',
456
+ 's' => ''
457
+ );
458
+
459
+ foreach ( $raw_request as $key => $value ) {
460
+ switch ( $key ) {
461
+ case 'orderby':
462
+ if ( 'none' == $value )
463
+ $clean_request[ $key ] = $value;
464
+ else {
465
+ $sortable_columns = MLA_View_List_Table::mla_get_sortable_columns();
466
+ foreach ($sortable_columns as $sort_key => $sort_value ) {
467
+ if ( $value == $sort_value[0] ) {
468
+ $clean_request[ $key ] = $value;
469
+ break;
470
+ }
471
+ } // foreach
472
+ }
473
+ break;
474
+ case 'order':
475
+ switch ( $value = strtoupper ($value ) ) {
476
+ case 'ASC':
477
+ case 'DESC':
478
+ $clean_request[ $key ] = $value;
479
+ break;
480
+ default:
481
+ $clean_request[ $key ] = 'ASC';
482
+ }
483
+ break;
484
+ /*
485
+ * ['s'] - Search Media by one or more keywords
486
+ */
487
+ case 's':
488
+ $clean_request[ $key ] = stripslashes( trim( $value ) );
489
+ break;
490
+ default:
491
+ // ignore anything else in $_REQUEST
492
+ } // switch $key
493
+ } // foreach $raw_request
494
+
495
+ /*
496
+ * Ignore incoming paged value; use offset and count instead
497
+ */
498
+ if ( ( (int) $count ) > 0 ) {
499
+ $clean_request['offset'] = $offset;
500
+ $clean_request['posts_per_page'] = $count;
501
+ }
502
+
503
+ return $clean_request;
504
+ }
505
+
506
+ /**
507
+ * Add filters, run query, remove filters
508
+ *
509
+ * @since 1.40
510
+ *
511
+ * @param array query parameters from web page, usually found in $_REQUEST
512
+ *
513
+ * @return array query results; array of MLA post_mime_type objects
514
+ */
515
+ private static function _execute_view_items_query( $request ) {
516
+ if ( ! self::_get_post_mime_templates() )
517
+ return array ();
518
+
519
+ /*
520
+ * Sort and filter the list
521
+ */
522
+ $keyword = isset( $request['s'] ) ? $request['s'] : '';
523
+ $index = 0;
524
+ $sorted_types = array();
525
+
526
+ foreach ( self::$mla_post_mime_templates as $slug => $value ) {
527
+ $index++;
528
+ if ( ! empty( $keyword ) ) {
529
+ $found = false !== stripos( $slug, $keyword );
530
+ $found |= false !== stripos( $value['specification'], $keyword );
531
+ $found |= false !== stripos( $value['singular'], $keyword );
532
+ $found |= false !== stripos( $value['plural'], $keyword );
533
+ $found |= false !== stripos( $value['description'], $keyword );
534
+
535
+ if ( ! $found )
536
+ continue;
537
+ }
538
+
539
+ $value['slug'] = $slug;
540
+ $value['post_ID'] = $index;
541
+ switch ( $request['orderby'] ) {
542
+ case 'slug':
543
+ $sorted_types[ $slug ] = (object) $value;
544
+ break;
545
+ case 'specification':
546
+ $sorted_types[ ( empty( $value['specification'] ) ? chr(1) : $value['specification'] ) . $index ] = (object) $value;
547
+ break;
548
+ case 'post_mime_type':
549
+ $sorted_types[ ( $value['post_mime_type'] ? 'yes' : 'no' ) . $index ] = (object) $value;
550
+ break;
551
+ case 'table_view':
552
+ $sorted_types[ ( $value['table_view'] ? 'yes' : 'no' ) . $index ] = (object) $value;
553
+ break;
554
+ case 'singular':
555
+ $sorted_types[ ( empty( $value['singular'] ) ? chr(1) : $value['singular'] ) . $index ] = (object) $value;
556
+ break;
557
+ case 'plural':
558
+ $sorted_types[ ( empty( $value['plural'] ) ? chr(1) : $value['plural'] ) . $index ] = (object) $value;
559
+ break;
560
+ case 'menu_order':
561
+ $sorted_types[ empty( $value['menu_order'] ) ? $index : ( 1000 * $value['menu_order'] ) + $index ] = (object) $value;
562
+ break;
563
+ case 'description':
564
+ $sorted_types[ ( empty( $value['description'] ) ? chr(1) : $value['description'] ) . $index ] = (object) $value;
565
+ break;
566
+ default:
567
+ $sorted_types[ $slug ] = (object) $value;
568
+ break;
569
+ } //orderby
570
+ }
571
+ ksort( $sorted_types );
572
+
573
+ if ( 'DESC' == $request['order'] )
574
+ $sorted_types = array_reverse( $sorted_types, true );
575
+
576
+ /*
577
+ * Paginate the sorted list
578
+ */
579
+ $results = array();
580
+ $offset = isset( $request['offset'] ) ? $request['offset'] : 0;
581
+ $count = isset( $request['posts_per_page'] ) ? $request['posts_per_page'] : -1;
582
+ foreach ( $sorted_types as $value ) {
583
+ if ( $offset )
584
+ $offset--;
585
+ elseif ( $count-- )
586
+ $results[] = $value;
587
+ else
588
+ break;
589
+ }
590
+
591
+ return $results;
592
+ }
593
+
594
+ /**
595
+ * Get the total number of MLA post_mime_type objects
596
+ *
597
+ * @since 1.40
598
+ *
599
+ * @param array Query variables, e.g., from $_REQUEST
600
+ *
601
+ * @return integer Number of MLA post_mime_type objects
602
+ */
603
+ public static function mla_count_view_items( $request ) {
604
+ $request = self::_prepare_view_items_query( $request );
605
+ $results = self::_execute_view_items_query( $request );
606
+ return count( $results );
607
+ }
608
+
609
+ /**
610
+ * Retrieve MLA post_mime_type objects for list table display
611
+ *
612
+ * @since 1.40
613
+ *
614
+ * @param array query parameters from web page, usually found in $_REQUEST
615
+ * @param int number of rows to skip over to reach desired page
616
+ * @param int number of rows on each page
617
+ *
618
+ * @return array MLA post_mime_type objects
619
+ */
620
+ public static function mla_query_view_items( $request, $offset, $count ) {
621
+ $request = self::_prepare_view_items_query( $request, $offset, $count );
622
+ $results = self::_execute_view_items_query( $request );
623
+ return $results;
624
+ }
625
+
626
+ /**
627
+ * Retrieve views eligible for Media/Assistant table display
628
+ *
629
+ * @since 1.40
630
+ *
631
+ * @return array table views array ( specification => Plural Label )
632
+ */
633
+ public static function mla_pluck_table_views() {
634
+ $mla_types = MLAMime::mla_query_view_items( array( 'orderby' => 'menu_order' ), 0, 0 );
635
+ if ( ! is_array( $mla_types ) )
636
+ $mla_types = array ();
637
+
638
+ /*
639
+ * Filter the list, generate the list
640
+ */
641
+ $results = array();
642
+ foreach ( $mla_types as $value ) {
643
+ if ( in_array( $value->slug, array( 'all', 'trash', 'unattached' ) ) )
644
+ continue;
645
+
646
+ if ( $value->table_view ) {
647
+ if ( empty( $value->specification ) )
648
+ $results[ $value->slug ] = $value->plural;
649
+ else
650
+ $results[ $value->specification ] = $value->plural;
651
+ }
652
+ }
653
+
654
+ return $results;
655
+ }
656
+
657
+ /**
658
+ * In-memory representation of the Post MIME Types
659
+ *
660
+ * @since 1.40
661
+ *
662
+ * @var array slug => ( singular, plural, specification, post_mime_type, table_view, menu_order, description )
663
+ */
664
+ private static $mla_post_mime_templates = NULL;
665
+
666
+ /**
667
+ * Highest existing Post MIME Type ID value
668
+ *
669
+ * @since 1.40
670
+ *
671
+ * @var integer
672
+ */
673
+ private static $mla_post_mime_highest_ID = 0;
674
+
675
+ /**
676
+ * Assemble the in-memory representation of the Post MIME Types
677
+ *
678
+ * @since 1.40
679
+ *
680
+ * @param boolean Force a reload/recalculation of types
681
+ *
682
+ * @return boolean Success (true) or failure (false) of the operation
683
+ */
684
+ private static function _get_post_mime_templates( $force_refresh = false ) {
685
+ if ( false == $force_refresh && NULL != self::$mla_post_mime_templates )
686
+ return true;
687
+
688
+ /*
689
+ * Start with MLA standard types
690
+ */
691
+ $mla_types = MLAOptions::mla_get_option( MLAOptions::MLA_POST_MIME_TYPES, true );
692
+ if ( ! is_array( $mla_types ) )
693
+ $mla_types = array ();
694
+
695
+ /*
696
+ * If this is the first time MLA Post MIME support is invoked, match to the
697
+ * filter-enhanced extensions, retain anything new as a custom type.
698
+ * Otherwise, add the current MLA custom types.
699
+ */
700
+ $custom_types = MLAOptions::mla_get_option( MLAOptions::MLA_POST_MIME_TYPES, false, true );
701
+
702
+ if ( is_array( $custom_types ) ) {
703
+ $mla_types = array_merge( $mla_types, $custom_types );
704
+ }
705
+ else {
706
+ /*
707
+ * Add existing types that are not already in the MLA list
708
+ */
709
+ self::$disable_mla_filtering = true;
710
+ $post_mime_types = get_post_mime_types();
711
+ self::$disable_mla_filtering = false;
712
+
713
+ foreach ( $post_mime_types as $slug => $value )
714
+ if ( ! isset( $mla_types[ $slug ] ) ) {
715
+ $mla_types[ $slug ] = array(
716
+ 'singular' => substr( $value[2][0], 0, strpos( $value[2][0], ' <' ) ),
717
+ 'plural' => $value[0],
718
+ 'specification' => '',
719
+ 'post_mime_type' => true,
720
+ 'table_view' => true,
721
+ 'menu_order' => 0,
722
+ 'description' => 'Copied from previous filter/plugin'
723
+ );
724
+ } // new type
725
+ } // First time called
726
+
727
+ self::$mla_post_mime_templates = array();
728
+ self::$mla_post_mime_highest_ID = 0;
729
+
730
+ /*
731
+ * Load and number the entries
732
+ */
733
+ foreach( $mla_types as $slug => $value ) {
734
+ self::$mla_post_mime_templates[ $slug ] = $value;
735
+ self::$mla_post_mime_templates[ $slug ]['post_ID'] = ++self::$mla_post_mime_highest_ID;
736
+ }
737
+
738
+ self::_put_post_mime_templates();
739
+ return true;
740
+ }
741
+
742
+ /**
743
+ * Store the custom entries of the Post MIME Types
744
+ *
745
+ * @since 1.40
746
+ *
747
+ * @return boolean Success (true) or failure (false) of the operation
748
+ */
749
+ private static function _put_post_mime_templates() {
750
+ $mla_post_mimes = array ();
751
+
752
+ $mla_types = MLAOptions::mla_get_option( MLAOptions::MLA_POST_MIME_TYPES, true );
753
+
754
+ foreach ( self::$mla_post_mime_templates as $slug => $value ) {
755
+ unset( $value['post_ID'] );
756
+ if ( isset ( $mla_types[ $slug ] ) && $value == $mla_types[ $slug ] )
757
+ continue;
758
+
759
+ $mla_post_mimes[ $slug ] = $value;
760
+ }
761
+
762
+ MLAOptions::mla_update_option( MLAOptions::MLA_POST_MIME_TYPES, $mla_post_mimes );
763
+ return true;
764
+ }
765
+
766
+ /**
767
+ * Convert a Library View/Post MIME Type specification to WP_Query parameters
768
+ *
769
+ * @since 1.40
770
+ *
771
+ * @param string A specification, e.g., "custom:Field,null" or "audio,application/vnd.*ms*"
772
+ *
773
+ * @return array post_mime_type specification or custom field query
774
+ */
775
+ public static function mla_prepare_view_query( $specification ) {
776
+ $query = array ();
777
+ $specification = self::mla_parse_view_specification( $specification );
778
+ if ( 'mime' == $specification['prefix'] )
779
+ $query['post_mime_type'] = $specification['value'];
780
+ else {
781
+ $meta_query = array( 'relation' => 'OR', 'patterns' => array () );
782
+ switch( $specification['option'] ) {
783
+ case 'match':
784
+ $patterns = array_map( 'trim', explode( ',', $specification['value'] ) );
785
+ foreach ( (array) $patterns as $pattern ) {
786
+ $pattern = preg_replace( '/\*+/', '%', $pattern );
787
+ if ( false !== strpos( $pattern, '%' ) ) {
788
+ /*
789
+ * Preserve the pattern - it will be used in the "where" filter
790
+ */
791
+ $meta_query['patterns'][] = $pattern;
792
+ $meta_query[] = array( 'key' => $specification['name'], 'value' => $pattern, 'compare' => 'LIKE' );
793
+ }
794
+ else
795
+ $meta_query[] = array( 'key' => $specification['name'], 'value' => $pattern, 'compare' => '=' );
796
+ } // foreach pattern
797
+
798
+ if ( empty( $meta_query['patterns'] ) )
799
+ unset( $meta_query['patterns'] );
800
+
801
+ break;
802
+ case 'null':
803
+ $meta_query['key'] = $specification['name'];
804
+ $meta_query['value'] = 'NULL';
805
+ break;
806
+ default: // '', 'any'
807
+ $meta_query[] = array( 'key' => $specification['name'], 'value' => NULL, 'compare' => '!=' );
808
+ }
809
+
810
+ $query['meta_query'] = $meta_query;
811
+ } // custom field specification
812
+
813
+ return $query;
814
+ }
815
+
816
+ /**
817
+ * Analyze a Library View/Post MIME Type specification, returning an array of the place holders it contains
818
+ *
819
+ * @since 1.40
820
+ *
821
+ * @param string A specification, e.g., "custom:Field,null" or "audio,application/vnd.*ms*"
822
+ *
823
+ * @return array ( ['prefix'] => string, ['name'] => string, ['value'] => string, ['option'] => string, optional ['error'] => string )
824
+ */
825
+ public static function mla_parse_view_specification( $specification ) {
826
+ $result = array( 'prefix' => '', 'name' => '', 'value' => '', 'option' => '' );
827
+ $match_count = preg_match( '/^(.+):(.+)/', $specification, $matches );
828
+ if ( 1 == $match_count ) {
829
+ $result['prefix'] = trim( strtolower( $matches[1] ) );
830
+ $tail = $matches[2];
831
+
832
+ $match_count = preg_match( '/([^,=]+)((,|=)(.+))$/', $tail, $matches );
833
+ if ( 1 == $match_count ) {
834
+ $result['name'] = $matches[1];
835
+
836
+ if ( ',' == $matches[3] )
837
+ $result['option'] = trim( strtolower( $matches[4] ));
838
+ else {
839
+ $result['option'] = 'match';
840
+ $result['value'] = $matches[4];
841
+ }
842
+ }
843
+ else {
844
+ $result['option'] = 'any';
845
+ $result['name'] = $tail;
846
+ }
847
+ }
848
+ else {
849
+ $result['prefix'] = 'mime';
850
+ $result['value'] = $specification;
851
+ }
852
+
853
+ /*
854
+ * Validate the results
855
+ */
856
+ if ( 'mime' == $result['prefix'] ) {
857
+ $mime_types = array_map( 'trim', explode( ',', $result['value'] ) );
858
+ foreach ( (array) $mime_types as $raw_mime_type ) {
859
+ $no_wildcards = str_replace( '*', 'X', $raw_mime_type );
860
+ $clean_mime_type = sanitize_mime_type( $no_wildcards );
861
+ if ( $clean_mime_type != $no_wildcards )
862
+ $result['error'] = sprintf( '<br>ERROR: Bad specification part "%1$s"', $raw_mime_type );
863
+ } // foreach
864
+ } // mime
865
+ elseif ( 'custom' == $result['prefix'] ) {
866
+ if ( ! in_array( $result['option'], array( '', 'any', 'match', 'null' ) ) )
867
+ $result['error'] = sprintf( '<br>ERROR: Bad specification option "%1$s"', $specification['option'] );
868
+ }
869
+ else
870
+ $result['error'] = sprintf( '<br>ERROR: Bad specification prefix "%1$s"', $specification['prefix'] );
871
+
872
+ return $result;
873
+ }
874
+
875
+ /**
876
+ * Add an MLA post_mime_type object
877
+ *
878
+ * @since 1.40
879
+ *
880
+ * @param array Query variables for a single object, including slug
881
+ *
882
+ * @return array Message(s) reflecting the results of the operation
883
+ */
884
+ public static function mla_add_post_mime_type( $request ) {
885
+ if ( ! self::_get_post_mime_templates() )
886
+ self::$mla_post_mime_templates = array ();
887
+
888
+ $messages = '';
889
+ $errors = '';
890
+
891
+ /*
892
+ * Sanitize slug value
893
+ */
894
+ $slug = sanitize_mime_type( $request['slug'] );
895
+ if ( $request['post_mime_type'] ) {
896
+
897
+ if ( !empty( $request['specification'] ) ) {
898
+ $request['specification'] = '';
899
+ $messages .= '<br>Ignoring specification for Post MIME Type; using slug';
900
+ }
901
+ }
902
+
903
+ if ( $slug != $request['slug'] )
904
+ $messages .= sprintf( '<br>Changing Slug "%1$s" to valid value "%2$s"', $request['slug'], $slug );
905
+
906
+ /*
907
+ * Make sure new slug is unique
908
+ */
909
+ if ( isset( self::$mla_post_mime_templates[ $slug ] ) )
910
+ $errors .= sprintf( '<br>ERROR: Could not add Slug "%1$s"; value already exists', $slug );
911
+
912
+ /*
913
+ * Validate specification, if present
914
+ */
915
+ if ( !empty( $request['specification'] ) ) {
916
+ $specification = self::mla_parse_view_specification( $request['specification'] );
917
+ if ( isset( $specification['error'] ) )
918
+ $errors .= $specification['error'];
919
+ }
920
+
921
+ if ( ! empty( $errors ) )
922
+ return array(
923
+ 'message' => substr( $errors . $messages, 4),
924
+ 'body' => ''
925
+ );
926
+
927
+ $new_type = array();
928
+ $new_type['singular'] = sanitize_text_field( $request['singular'] );
929
+ $new_type['plural'] = sanitize_text_field( $request['plural'] );
930
+ $new_type['specification'] = trim( $request['specification'] );
931
+ $new_type['post_mime_type'] = $request['post_mime_type'];
932
+ $new_type['table_view'] = $request['table_view'];
933
+ $new_type['menu_order'] = absint( $request['menu_order'] );
934
+ $new_type['description'] = sanitize_text_field( $request['description'] );
935
+ $new_type['post_ID'] = ++self::$mla_post_mime_highest_ID;
936
+
937
+ self::$mla_post_mime_templates[ $slug ] = $new_type;
938
+ self::_put_post_mime_templates();
939
+
940
+ return array(
941
+ 'message' => substr( $messages . sprintf( '<br>Edit view "%1$s"; added', $slug ), 4),
942
+ 'body' => ''
943
+ );
944
+ }
945
+
946
+ /**
947
+ * Update an MLA post_mime_type object
948
+ *
949
+ * @since 1.40
950
+ *
951
+ * @param array Query variables for new object values, including optional original_slug
952
+ *
953
+ * @return array Message(s) reflecting the results of the operation
954
+ */
955
+ public static function mla_update_post_mime_type( $request ) {
956
+ if ( ! self::_get_post_mime_templates() )
957
+ self::$mla_post_mime_templates = array ();
958
+
959
+ $messages = '';
960
+ $errors = '';
961
+ $slug = sanitize_mime_type( $request['slug'] );
962
+ $original_slug = isset( $request['original_slug'] ) ? $request['original_slug'] : $slug;
963
+ unset( $request['original_slug'] );
964
+
965
+ if ( isset( self::$mla_post_mime_templates[ $original_slug ] ) )
966
+ $original_type = self::$mla_post_mime_templates[ $original_slug ];
967
+ else
968
+ $original_type = array(
969
+ 'singular' => '',
970
+ 'plural' => '',
971
+ 'specification' => '',
972
+ 'post_mime_type' => 'checked="checked"',
973
+ 'table_view' => 'checked="checked"',
974
+ 'menu_order' => '',
975
+ 'description' => ''
976
+ );
977
+
978
+ /*
979
+ * Validate changed slug value
980
+ */
981
+ if ( $slug != $original_slug ) {
982
+ if ( $slug != $request['slug'] )
983
+ $messages .= sprintf( '<br>Changing new Slug "%1$s" to valid value "%2$s"', $request['slug'], $slug );
984
+
985
+ /*
986
+ * Make sure new slug is unique
987
+ */
988
+ if ( isset( self::$mla_post_mime_templates[ $slug ] ) )
989
+ $errors .= sprintf( '<br>ERROR: Could not add new Slug "%1$s"; value already exists', $slug );
990
+ else
991
+ $messages .= sprintf( '<br>Changing Slug from "%1$s" to "%2$s"', $original_slug, $slug );
992
+ }
993
+
994
+ /*
995
+ * Validate specification, if present and allowed
996
+ */
997
+ $specification = trim( isset( $request['specification'] ) ? $request['specification'] : $original_type['specification'] );
998
+ $post_mime_type = isset( $request['post_mime_type'] ) ? $request['post_mime_type'] : $original_type['post_mime_type'];
999
+ if ( $post_mime_type ) {
1000
+ if ( !empty( $specification ) ) {
1001
+ $specification = '';
1002
+ $messages .= '<br>Ignoring specification for Post MIME Type; using slug';
1003
+ }
1004
+ }
1005
+
1006
+ if ( !empty( $specification ) ) {
1007
+ $result = self::mla_parse_view_specification( $request['specification'] );
1008
+ if ( isset( $result['error'] ) )
1009
+ $errors .= $result['error'];
1010
+ }
1011
+
1012
+ if ( ! empty( $errors ) )
1013
+ return array(
1014
+ 'message' => substr( $errors . $messages, 4),
1015
+ 'body' => ''
1016
+ );
1017
+
1018
+ $new_type = array();
1019
+ $new_type['singular'] = isset( $request['singular'] ) ? sanitize_text_field( $request['singular'] ) : $original_type['singular'];
1020
+ $new_type['plural'] = isset( $request['plural'] ) ? sanitize_text_field( $request['plural'] ) : $original_type['plural'];
1021
+ $new_type['specification'] = $specification;
1022
+ $new_type['post_mime_type'] = $post_mime_type;
1023
+ $new_type['table_view'] = isset( $request['table_view'] ) ? $request['table_view'] : $original_type['table_view'];
1024
+ $new_type['menu_order'] = isset( $request['menu_order'] ) ? absint( $request['menu_order'] ) : $original_type['menu_order'];
1025
+ $new_type['description'] = isset( $request['description'] ) ? sanitize_text_field( $request['description'] ) : $original_type['description'];
1026
+
1027
+ if ( ( $slug == $original_slug ) && ( self::$mla_post_mime_templates[ $slug ] == $new_type ) )
1028
+ return array(
1029
+ 'message' => substr( $messages . sprintf( '<br>Edit view "%1$s"; no changes detected', $slug ), 4),
1030
+ 'body' => ''
1031
+ );
1032
+
1033
+ self::$mla_post_mime_templates[ $slug ] = $new_type;
1034
+
1035
+ if ( $slug != $original_slug )
1036
+ unset( self::$mla_post_mime_templates[ $original_slug ] );
1037
+
1038
+ self::_put_post_mime_templates();
1039
+ return array(
1040
+ 'message' => $messages = substr( $messages . sprintf( '<br>Edit view "%1$s"; updated', $slug ), 4),
1041
+ 'body' => ''
1042
+ );
1043
+ }
1044
+
1045
+ /**
1046
+ * Retrieve an MLA post_mime_type slug given a post_ID
1047
+ *
1048
+ * @since 1.40
1049
+ *
1050
+ * @param integer MLA post_mime_type post_ID
1051
+ *
1052
+ * @return mixed string with slug of the requested object; false if object not found
1053
+ */
1054
+ public static function mla_get_post_mime_type_slug( $post_ID ) {
1055
+ if ( ! self::_get_post_mime_templates() )
1056
+ self::$mla_post_mime_templates = array ();
1057
+
1058
+ foreach ( self::$mla_post_mime_templates as $slug => $value ) {
1059
+ if ( $post_ID == $value['post_ID'] )
1060
+ return $slug;
1061
+ }
1062
+
1063
+ return false;
1064
+ }
1065
+
1066
+ /**
1067
+ * Retrieve an MLA post_mime_type object
1068
+ *
1069
+ * @since 1.40
1070
+ *
1071
+ * @param string MLA post_mime_type slug
1072
+ *
1073
+ * @return mixed Array of elements, including slug, for the requested object; false if object not found
1074
+ */
1075
+ public static function mla_get_post_mime_type( $slug ) {
1076
+ if ( ! self::_get_post_mime_templates() )
1077
+ self::$mla_post_mime_templates = array ();
1078
+
1079
+ if ( isset( self::$mla_post_mime_templates[ $slug ] ) ) {
1080
+ $matched_value = self::$mla_post_mime_templates[ $slug ];
1081
+ $matched_value['slug'] = $slug;
1082
+ return $matched_value;
1083
+ }
1084
+
1085
+ return false;
1086
+ }
1087
+
1088
+ /**
1089
+ * Delete an MLA post_mime_type object
1090
+ *
1091
+ * @since 1.40
1092
+ *
1093
+ * @param string MLA post_mime_type slug
1094
+ *
1095
+ * @return array Message(s) reflecting the results of the operation
1096
+ */
1097
+ public static function mla_delete_post_mime_type( $slug ) {
1098
+ if ( ! self::_get_post_mime_templates() )
1099
+ self::$mla_post_mime_templates = array ();
1100
+
1101
+ if ( isset( self::$mla_post_mime_templates[ $slug ] ) ) {
1102
+ unset( self::$mla_post_mime_templates[ $slug ] );
1103
+ self::_put_post_mime_templates();
1104
+ self::_get_post_mime_templates( true );
1105
+
1106
+ if ( isset( self::$mla_post_mime_templates[ $slug ] ) )
1107
+ return array(
1108
+ 'message' => sprintf( 'View "%1$s" reverted to standard', $slug ),
1109
+ 'body' => ''
1110
+ );
1111
+ else
1112
+ return array(
1113
+ 'message' => sprintf( 'View "%1$s" deleted', $slug ),
1114
+ 'body' => ''
1115
+ );
1116
+ }
1117
+
1118
+ return array(
1119
+ 'message' => sprintf( 'ERROR: Did not find view "%1$s"', $slug ),
1120
+ 'body' => ''
1121
+ );
1122
+ }
1123
+
1124
+ /**
1125
+ * Sanitize and expand Upload MIME Type query arguments from request variables
1126
+ *
1127
+ * @since 1.40
1128
+ *
1129
+ * @param array query parameters from web page, usually found in $_REQUEST
1130
+ * @param int Optional number of rows (default 0) to skip over to reach desired page
1131
+ * @param int Optional number of rows on each page (0 = all rows, default)
1132
+ *
1133
+ * @return array revised arguments suitable for query
1134
+ */
1135
+ private static function _prepare_upload_items_query( $raw_request, $offset = 0, $count = 0 ) {
1136
+ /*
1137
+ * Go through the $raw_request, take only the arguments that are used in the query and
1138
+ * sanitize or validate them.
1139
+ */
1140
+ if ( ! is_array( $raw_request ) ) {
1141
+ error_log( 'ERROR: _prepare_upload_items_query $raw_request = ' . var_export( $raw_request, true ), 0 );
1142
+ return NULL;
1143
+ }
1144
+
1145
+ $clean_request = array (
1146
+ 'mla_upload_view' => 'all',
1147
+ 'orderby' => 'slug',
1148
+ 'order' => 'ASC',
1149
+ 's' => ''
1150
+ );
1151
+
1152
+ foreach ( $raw_request as $key => $value ) {
1153
+ switch ( $key ) {
1154
+ case 'mla_upload_view':
1155
+ $clean_request[ $key ] = $value;
1156
+ break;
1157
+ case 'orderby':
1158
+ if ( 'none' == $value )
1159
+ $clean_request[ $key ] = $value;
1160
+ else {
1161
+ $sortable_columns = MLA_Upload_List_Table::mla_get_sortable_columns();
1162
+ foreach ($sortable_columns as $sort_key => $sort_value ) {
1163
+ if ( $value == $sort_value[0] ) {
1164
+ $clean_request[ $key ] = $value;
1165
+ break;
1166
+ }
1167
+ } // foreach
1168
+ }
1169
+ break;
1170
+ case 'order':
1171
+ switch ( $value = strtoupper ($value ) ) {
1172
+ case 'ASC':
1173
+ case 'DESC':
1174
+ $clean_request[ $key ] = $value;
1175
+ break;
1176
+ default:
1177
+ $clean_request[ $key ] = 'ASC';
1178
+ }
1179
+ break;
1180
+ /*
1181
+ * ['s'] - Search Media by one or more keywords
1182
+ */
1183
+ case 's':
1184
+ $clean_request[ $key ] = stripslashes( trim( $value ) );
1185
+ break;
1186
+ default:
1187
+ // ignore anything else in $_REQUEST
1188
+ } // switch $key
1189
+ } // foreach $raw_request
1190
+
1191
+ /*
1192
+ * Ignore incoming paged value; use offset and count instead
1193
+ */
1194
+ if ( ( (int) $count ) > 0 ) {
1195
+ $clean_request['offset'] = $offset;
1196
+ $clean_request['posts_per_page'] = $count;
1197
+ }
1198
+
1199
+ return $clean_request;
1200
+ }
1201
+
1202
+ /**
1203
+ * Execute an Upload MIME Types query
1204
+ *
1205
+ * @since 1.40
1206
+ *
1207
+ * @param array query parameters from web page, usually found in $_REQUEST
1208
+ *
1209
+ * @return array query results; array of MLA Upload MIME Type objects
1210
+ */
1211
+ private static function _execute_upload_items_query( $request ) {
1212
+ if ( ! self::_get_upload_mime_templates() )
1213
+ return array ();
1214
+
1215
+ /*
1216
+ * Sort and filter the list
1217
+ */
1218
+ $keyword = isset( $request['s'] ) ? $request['s'] : '';
1219
+ $extension = 0 === strpos( $keyword, '.' ) ? substr( $keyword, 1) : false;
1220
+ $view = isset( $request['mla_upload_view'] ) ? $request['mla_upload_view'] : 'all';
1221
+ $sorted_types = array();
1222
+
1223
+ foreach ( self::$mla_upload_mime_templates as $slug => $value ) {
1224
+ if ( ! empty( $keyword ) ) {
1225
+ if ( false === $extension ) {
1226
+ $found = false !== stripos( $slug, $keyword );
1227
+ $found |= false !== stripos( $value['mime_type'], $keyword );
1228
+ $found |= false !== stripos( $value['icon_type'], $keyword );
1229
+ $found |= false !== stripos( $value['core_type'], $keyword );
1230
+ $found |= false !== stripos( $value['mla_type'], $keyword );
1231
+ $found |= false !== stripos( $value['core_icon_type'], $keyword );
1232
+ $found |= false !== stripos( $value['description'], $keyword );
1233
+ }
1234
+ else
1235
+ $found = false !== stripos( $slug, $extension );
1236
+
1237
+ if ( ! $found )
1238
+ continue;
1239
+ }
1240
+
1241
+ switch( $view ) {
1242
+ case 'active':
1243
+ $found = ! $value['disabled'];
1244
+ break;
1245
+ case 'inactive':
1246
+ $found = $value['disabled'];
1247
+ break;
1248
+ case 'core':
1249
+ case 'mla':
1250
+ case 'custom':
1251
+ $found = $view == $value['source'];
1252
+ break;
1253
+ default:
1254
+ $found = true;
1255
+ }// $view
1256
+
1257
+ if ( ! $found )
1258
+ continue;
1259
+
1260
+ $value['slug'] = $slug;
1261
+ switch ( $request['orderby'] ) {
1262
+ case 'slug':
1263
+ $sorted_types[ $slug ] = (object) $value;
1264
+ break;
1265
+ case 'mime_type':
1266
+ $sorted_types[ ( empty( $value['mime_type'] ) ? chr(1) : $value['mime_type'] ) . $value['post_ID'] ] = (object) $value;
1267
+ break;
1268
+ case 'icon_type':
1269
+ $sorted_types[ ( empty( $value['icon_type'] ) ? chr(1) : $value['icon_type'] ) . $value['post_ID'] ] = (object) $value;
1270
+ break;
1271
+ case 'source':
1272
+ $sorted_types[ ( empty( $value['source'] ) ? chr(1) : $value['source'] ) . $value['post_ID'] ] = (object) $value;
1273
+ break;
1274
+ case 'disabled':
1275
+ $sorted_types[ ( $value['disabled'] ? 'inactive' : 'active' ) . $value['post_ID'] ] = (object) $value;
1276
+ break;
1277
+ case 'core_type':
1278
+ $sorted_types[ ( empty( $value['core_type'] ) ? chr(1) : $value['core_type'] ) . $value['post_ID'] ] = (object) $value;
1279
+ break;
1280
+ case 'mla_type':
1281
+ $sorted_types[ ( empty( $value['mla_type'] ) ? chr(1) : $value['mla_type'] ) . $value['post_ID'] ] = (object) $value;
1282
+ break;
1283
+ case 'standard_source':
1284
+ $sorted_types[ ( empty( $value['standard_source'] ) ? chr(1) : $value['standard_source'] ) . $value['post_ID'] ] = (object) $value;
1285
+ break;
1286
+ case 'core_icon_type':
1287
+ $sorted_types[ ( empty( $value['core_icon_type'] ) ? chr(1) : $value['core_icon_type'] ) . $value['post_ID'] ] = (object) $value;
1288
+ break;
1289
+ case 'description':
1290
+ $sorted_types[ ( empty( $value['description'] ) ? chr(1) : $value['description'] ) . $value['post_ID'] ] = (object) $value;
1291
+ break;
1292
+ default:
1293
+ $sorted_types[ $slug ] = (object) $value;
1294
+ break;
1295
+ } //orderby
1296
+ }
1297
+ ksort( $sorted_types );
1298
+
1299
+ if ( 'DESC' == $request['order'] )
1300
+ $sorted_types = array_reverse( $sorted_types, true );
1301
+
1302
+ /*
1303
+ * Paginate the sorted list
1304
+ */
1305
+ $results = array();
1306
+ $offset = isset( $request['offset'] ) ? $request['offset'] : 0;
1307
+ $count = isset( $request['posts_per_page'] ) ? $request['posts_per_page'] : -1;
1308
+ foreach ( $sorted_types as $value ) {
1309
+ if ( $offset )
1310
+ $offset--;
1311
+ elseif ( $count-- )
1312
+ $results[] = $value;
1313
+ else
1314
+ break;
1315
+ }
1316
+
1317
+ return $results;
1318
+ }
1319
+
1320
+ /**
1321
+ * Get the total number of MLA Upload MIME Type objects
1322
+ *
1323
+ * @since 1.40
1324
+ *
1325
+ * @param array Query variables, e.g., from $_REQUEST
1326
+ *
1327
+ * @return integer Number of MLA Upload MIME Type objects
1328
+ */
1329
+ public static function mla_count_upload_items( $request ) {
1330
+ $request = self::_prepare_upload_items_query( $request );
1331
+ $results = self::_execute_upload_items_query( $request );
1332
+ return count( $results );
1333
+ }
1334
+
1335
+ /**
1336
+ * Retrieve MLA Upload MIME Type objects for list table display
1337
+ *
1338
+ * @since 1.40
1339
+ *
1340
+ * @param array query parameters from web page, usually found in $_REQUEST
1341
+ * @param int number of rows to skip over to reach desired page
1342
+ * @param int number of rows on each page
1343
+ *
1344
+ * @return array MLA Upload MIME Type objects
1345
+ */
1346
+ public static function mla_query_upload_items( $request, $offset, $count ) {
1347
+ $request = self::_prepare_upload_items_query( $request, $offset, $count );
1348
+ $results = self::_execute_upload_items_query( $request );
1349
+ return $results;
1350
+ }
1351
+
1352
+ /**
1353
+ * Tabulate MLA Upload MIME Type objects by view for list table display
1354
+ *
1355
+ * @since 1.40
1356
+ *
1357
+ * @param string keyword search criterion, optional
1358
+ *
1359
+ * @return array ( 'singular' label, 'plural' label, 'count' of items )
1360
+ */
1361
+ public static function mla_tabulate_upload_items( $s = '' ) {
1362
+ if ( empty( $s ) )
1363
+ $request = array( 'mla_upload_view' => 'all' );
1364
+ else
1365
+ $request = array( 's' => $s );
1366
+
1367
+ $items = self::mla_query_upload_items( $request, 0, 0 );
1368
+
1369
+ $upload_items = array(
1370
+ 'all' => array( 'singular' => 'All', 'plural' => 'All', 'count' => 0 ),
1371
+ 'active' => array( 'singular' => 'Active', 'plural' => 'Active', 'count' => 0 ),
1372
+ 'inactive' => array( 'singular' => 'Inactive', 'plural' => 'Inactive', 'count' => 0 ),
1373
+ 'core' => array( 'singular' => 'WordPress', 'plural' => 'WordPress', 'count' => 0 ),
1374
+ 'mla' => array( 'singular' => 'MLA', 'plural' => 'MLA', 'count' => 0 ),
1375
+ 'custom' => array( 'singular' => 'Custom', 'plural' => 'Custom', 'count' => 0 ),
1376
+ );
1377
+
1378
+ foreach ( $items as $value ) {
1379
+ $upload_items['all']['count']++;
1380
+ $value->disabled ? $upload_items['inactive']['count']++ : $upload_items['active']['count']++;
1381
+ $upload_items[ $value->source ]['count']++;
1382
+ }
1383
+
1384
+ return $upload_items;
1385
+ }
1386
+
1387
+ /**
1388
+ * Icon types without MLA filtering
1389
+ *
1390
+ * @since 1.40
1391
+ *
1392
+ * @var array extension => ( core_icon_type )
1393
+ */
1394
+ private static $mla_core_icon_types = NULL;
1395
+
1396
+ /**
1397
+ * Icon types with MLA filtering - basenames of files in the current icon directory
1398
+ *
1399
+ * @since 1.40
1400
+ *
1401
+ * @var array ( icon_type => icon_image_uri )
1402
+ */
1403
+ private static $mla_current_icon_types = NULL;
1404
+
1405
+ /**
1406
+ * In-memory representation of the Upload MIME Types
1407
+ *
1408
+ * @since 1.40
1409
+ *
1410
+ * @var array extension => ( post_ID, mime_type, core_type, mla_type, source, standard_source, disabled, description, icon_type, wp_icon_type, mla_icon_type, core_icon_type )
1411
+ */
1412
+ private static $mla_upload_mime_templates = NULL;
1413
+
1414
+ /**
1415
+ * Highest existing Upload MIME Type ID value
1416
+ *
1417
+ * @since 1.40
1418
+ *
1419
+ * @var integer
1420
+ */
1421
+ private static $mla_upload_mime_highest_ID = 0;
1422
+
1423
+ /**
1424
+ * Assemble the list of icon types without MLA filtering
1425
+ *
1426
+ * @since 1.40
1427
+ *
1428
+ * @return boolean Success (true) or failure (false) of the operation
1429
+ */
1430
+ private static function _get_core_icon_types() {
1431
+ global $wp_filter;
1432
+
1433
+ if ( NULL != self::$mla_core_icon_types )
1434
+ return true;
1435
+
1436
+ /*
1437
+ * wp_ext2type will apply our filter in a special mode, initializing the list
1438
+ */
1439
+ self::$disable_mla_filtering = true;
1440
+ $save_filters = $wp_filter['ext2type'];
1441
+ unset( $wp_filter['ext2type'] );
1442
+ add_filter( 'ext2type', 'MLAMime::mla_ext2type_filter', 0x7FFFFFFF, 1 );
1443
+ wp_ext2type( 'xxx' );
1444
+ $wp_filter['ext2type'] = $save_filters;
1445
+ self::$disable_mla_filtering = false;
1446
+
1447
+ /*
1448
+ * Rebuild the list as extension => type,
1449
+ * Explode any entries with multiple extensions
1450
+ */
1451
+ $standard_types = array ();
1452
+ foreach ( self::$mla_core_icon_types as $key => $extensions )
1453
+ foreach ( $extensions as $extension )
1454
+ $standard_types[ $extension ] = $key;
1455
+ ksort( $standard_types );
1456
+ self::$mla_core_icon_types = $standard_types;
1457
+ return true;
1458
+ }
1459
+
1460
+ /**
1461
+ * Assemble the list of icon types with MLA filtering
1462
+ *
1463
+ * @since 1.40
1464
+ *
1465
+ * @return boolean Success (true) or failure (false) of the operation
1466
+ */
1467
+ private static function _get_current_icon_types() {
1468
+ if ( NULL != self::$mla_current_icon_types )
1469
+ return true;
1470
+
1471
+ /*
1472
+ * Get the directories in reverse order, so earlier entries will overwrite later entries and win
1473
+ */
1474
+ $icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' );
1475
+ $icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url('images/crystal') );
1476
+ $dirs = array_reverse( apply_filters( 'icon_dirs', array($icon_dir => $icon_dir_uri) ), true );
1477
+
1478
+ self::$mla_current_icon_types = array();
1479
+ while ( $dirs ) {
1480
+ $keys = array_keys( $dirs );
1481
+ $dir = array_shift( $keys );
1482
+ $uri = array_shift( $dirs );
1483
+ if ( $dh = opendir($dir) ) {
1484
+ while ( false !== $file = readdir($dh) ) {
1485
+ $file = basename($file);
1486
+ if ( substr($file, 0, 1) == '.' )
1487
+ continue;
1488
+ if ( !in_array(strtolower(substr($file, -4)), array('.png', '.gif', '.jpg') ) ) {
1489
+ if ( is_dir("$dir/$file") )
1490
+ $dirs["$dir/$file"] = "$uri/$file";
1491
+ continue;
1492
+ }
1493
+ $name = substr( $file, 0, -4);
1494
+ self::$mla_current_icon_types[ $name ] = "$uri/$file";
1495
+ }
1496
+ closedir($dh);
1497
+ }
1498
+ }
1499
+
1500
+ return true;
1501
+ }
1502
+
1503
+ /**
1504
+ * Retrieve a standard icon type, i.e., without MLA filtering
1505
+ *
1506
+ * @since 1.40
1507
+ *
1508
+ * @param string file extension
1509
+ *
1510
+ * @return string icon type for the requested extension; 'default' if extension not found
1511
+ */
1512
+ public static function mla_get_core_icon_type( $extension ) {
1513
+ if ( self::_get_core_icon_types() )
1514
+ if ( isset( self::$mla_core_icon_types[ $extension ] ) )
1515
+ return self::$mla_core_icon_types[ $extension ];
1516
+
1517
+ return 'default';
1518
+ }
1519
+
1520
+ /**
1521
+ * Get an HTML img element representing an attachment icon
1522
+ *
1523
+ * @since 1.40
1524
+ *
1525
+ * @param string Icon Type, e.g., audio, video, spreadsheet
1526
+ * @param array ( width, height ) optional image size, default (64, 64).
1527
+ *
1528
+ * @return string HTML img element or empty string on failure.
1529
+ */
1530
+ public static function mla_get_icon_type_image( $icon_type, $size = NULL ) {
1531
+ $icon_file = wp_mime_type_icon( $icon_type );
1532
+
1533
+ if (is_array( $size ) ) {
1534
+ $width = $size[0];
1535
+ $height = $size[1];
1536
+ }
1537
+ else
1538
+ @list($width, $height) = getimagesize($icon_file);
1539
+
1540
+ $hwstring = image_hwstring($width, $height);
1541
+ $size = $width . 'x' . $height;
1542
+ $default_attr = array(
1543
+ 'src' => $icon_file,
1544
+ 'class' => "attachment-$size",
1545
+ 'alt' => $icon_type . ' icon'
1546
+ );
1547
+
1548
+ $attr = array_map( 'esc_attr', $default_attr );
1549
+ $html = rtrim("<img $hwstring");
1550
+ foreach ( $attr as $name => $value ) {
1551
+ $html .= " $name=" . '"' . $value . '"';
1552
+ }
1553
+ $html .= ' />';
1554
+
1555
+ return $html;
1556
+ }
1557
+
1558
+ /**
1559
+ * Get an array of current Icon Type names
1560
+ *
1561
+ * @since 1.40
1562
+ *
1563
+ * @return array ( icon_type ) or false on failure.
1564
+ */
1565
+ public static function mla_get_current_icon_types() {
1566
+ if ( self::_get_current_icon_types() )
1567
+ return array_keys( self::$mla_current_icon_types );
1568
+
1569
+ return false;
1570
+ }
1571
+
1572
+ /**
1573
+ * Assemble the in-memory representation of the Upload MIME Types
1574
+ *
1575
+ * @since 1.40
1576
+ *
1577
+ * @param boolean Force a reload/recalculation of types
1578
+ * @return boolean Success (true) or failure (false) of the operation
1579
+ */
1580
+ private static function _get_upload_mime_templates( $force_refresh = false ) {
1581
+ self::_get_core_icon_types();
1582
+ self::_get_current_icon_types();
1583
+
1584
+ if ( false == $force_refresh && NULL != self::$mla_upload_mime_templates )
1585
+ return true;
1586
+
1587
+ /*
1588
+ * Find the WordPress-standard (unfiltered) extensions
1589
+ * WordPress 3.4.x and earlier do not implement wp_get_mime_types
1590
+ */
1591
+ global $wp_filter;
1592
+ if ( function_exists('wp_get_mime_types') ) {
1593
+ if ( isset( $wp_filter['mime_types'] ) ) {
1594
+ $save_filters = $wp_filter['mime_types'];
1595
+ unset( $wp_filter['mime_types'] );
1596
+ $core_types = wp_get_mime_types();
1597
+ $wp_filter['mime_types'] = $save_filters;
1598
+ }
1599
+ else
1600
+ $core_types = wp_get_mime_types();
1601
+ }
1602
+ else {
1603
+ if ( isset( $wp_filter['upload_mimes'] ) ) {
1604
+ $save_filters = $wp_filter['upload_mimes'];
1605
+ unset( $wp_filter['upload_mimes'] );
1606
+ $core_types = get_allowed_mime_types();
1607
+ $wp_filter['upload_mimes'] = $save_filters;
1608
+ }
1609
+ else
1610
+ $core_types = get_allowed_mime_types();
1611
+ }
1612
+
1613
+ /*
1614
+ * If this is the first time MLA Upload support is invoked, match to the
1615
+ * filter-enhanced extensions, retain anything new as a custom type.
1616
+ */
1617
+ $custom_types = array();
1618
+ $mla_upload_mimes = MLAOptions::mla_get_option( MLAOptions::MLA_UPLOAD_MIMES );
1619
+ if ( is_array( $mla_upload_mimes ) ) {
1620
+ $first_time_called = false;
1621
+ $custom_types = $mla_upload_mimes['custom'];
1622
+ }
1623
+ else {
1624
+ $first_time_called = true;
1625
+ $mla_upload_mimes = array ( 'custom' => array(), 'disabled' => array(), 'description' => array(), 'icon_type' => array() );
1626
+ self::$disable_mla_filtering = true;
1627
+ foreach( get_allowed_mime_types() as $key => $value )
1628
+ if ( ! isset( $core_types[ $key ]) )
1629
+ $custom_types[ $key ] = $value;
1630
+ self::$disable_mla_filtering = false;
1631
+ }
1632
+
1633
+ /*
1634
+ * Explode any entries with multiple extensions
1635
+ */
1636
+ foreach ( $core_types as $key => $value )
1637
+ if ( false !== strpos( $key, '|' ) ) {
1638
+ unset( $core_types[ $key ] );
1639
+ $extensions = explode( '|', $key );
1640
+ foreach ( $extensions as $extension )
1641
+ $core_types[ $extension ] = $value;
1642
+ }
1643
+
1644
+ foreach ( $custom_types as $key => $value )
1645
+ if ( false !== strpos( $key, '|' ) ) {
1646
+ unset( $custom_types[ $key ] );
1647
+ $extensions = explode( '|', $key );
1648
+ foreach ( $extensions as $extension )
1649
+ $custom_types[ $extension ] = $value;
1650
+ }
1651
+
1652
+ self::$mla_upload_mime_templates = array();
1653
+ self::$mla_upload_mime_highest_ID = 0;
1654
+
1655
+ /*
1656
+ * Start with the MLA extensions, initialized to an inactive state
1657
+ */
1658
+ $template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/mla-default-mime-types.tpl' );
1659
+ if ( isset( $template_array['mla-mime-types'] ) ) {
1660
+ $mla_mime_types = preg_split('/[\r\n]+/', $template_array['mla-mime-types'] );
1661
+ foreach( $mla_mime_types as $mla_type ) {
1662
+ $array = explode(',', $mla_type );
1663
+ $key = strtolower( $array[0] );
1664
+ self::$mla_upload_mime_templates[ $key ] = array(
1665
+ 'post_ID' => ++self::$mla_upload_mime_highest_ID,
1666
+ 'mime_type' => $array[1],
1667
+ 'core_type' => '',
1668
+ 'mla_type' => $array[1],
1669
+ 'source' => 'mla',
1670
+ 'standard_source' => 'mla',
1671
+ 'disabled' => true,
1672
+ 'description' => $array[4],
1673
+ 'icon_type' => $array[2],
1674
+ 'wp_icon_type' => $array[2],
1675
+ 'mla_icon_type' => $array[3],
1676
+ 'core_icon_type' => self::mla_get_core_icon_type( $array[0] )
1677
+ );
1678
+
1679
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) )
1680
+ self::$mla_upload_mime_templates[ $key ]['icon_type'] = self::$mla_upload_mime_templates[ $array[0] ]['mla_icon_type'];
1681
+ }
1682
+ }
1683
+
1684
+ /*
1685
+ * Add the WordPress-standard (unfiltered) extensions, initialized to an active state
1686
+ */
1687
+ foreach ( $core_types as $key => $value ) {
1688
+ $key = strtolower( $key );
1689
+ if ( isset( self::$mla_upload_mime_templates[ $key ] ) ) {
1690
+ $post_ID = self::$mla_upload_mime_templates[ $key ]['post_ID'];
1691
+ $mla_type = self::$mla_upload_mime_templates[ $key ]['mla_type'];
1692
+ $description = self::$mla_upload_mime_templates[ $key ]['description'];
1693
+ $icon_type = self::$mla_upload_mime_templates[ $key ]['icon_type'];
1694
+ $wp_icon_type = self::$mla_upload_mime_templates[ $key ]['wp_icon_type'];
1695
+ $mla_icon_type = self::$mla_upload_mime_templates[ $key ]['mla_icon_type'];
1696
+ $core_icon_type = self::$mla_upload_mime_templates[ $key ]['core_icon_type'];
1697
+ }
1698
+ else {
1699
+ $post_ID = ++self::$mla_upload_mime_highest_ID;
1700
+ $mla_type = '';
1701
+ $description = '';
1702
+
1703
+ if ( NULL == $icon_type = wp_ext2type( $key ) )
1704
+ $icon_type = 'default';
1705
+
1706
+ $wp_icon_type = $icon_type;
1707
+ $mla_icon_type = $icon_type;
1708
+ $core_icon_type = self::mla_get_core_icon_type( $key );
1709
+ }
1710
+
1711
+
1712
+ self::$mla_upload_mime_templates[ $key ] = array(
1713
+ 'post_ID' => $post_ID,
1714
+ 'mime_type' => $value,
1715
+ 'core_type' => $value,
1716
+ 'mla_type' => $mla_type,
1717
+ 'source' => 'core',
1718
+ 'standard_source' => 'core',
1719
+ 'disabled' => false,
1720
+ 'description' => $description ,
1721
+ 'icon_type' => $icon_type,
1722
+ 'wp_icon_type' => $wp_icon_type,
1723
+ 'mla_icon_type' => $mla_icon_type,
1724
+ 'core_icon_type' => $core_icon_type
1725
+ );
1726
+
1727
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) )
1728
+ self::$mla_upload_mime_templates[ $array[0] ]['icon_type'] = self::$mla_upload_mime_templates[ $array[0] ]['mla_icon_type'];
1729
+ }
1730
+
1731
+ /*
1732
+ * Add the user-defined custom types
1733
+ */
1734
+ foreach ( $custom_types as $key => $value ) {
1735
+ $key = strtolower( $key );
1736
+ if ( isset( self::$mla_upload_mime_templates[ $key ] ) ) {
1737
+ extract( self::$mla_upload_mime_templates[ $key ] );
1738
+ /*
1739
+ * Make sure it's really custom
1740
+ */
1741
+ if ( ( 'core' == $source && $value == $core_type ) ||
1742
+ ( 'mla' == $source && $value == $mla_type ) )
1743
+ continue;
1744
+ } // existing type
1745
+ else {
1746
+ $core_type = '';
1747
+ $mla_type = '';
1748
+ $standard_source = '';
1749
+ } // brand new type
1750
+
1751
+ if ( NULL == $icon_type = wp_ext2type( $key ) )
1752
+ $icon_type = 'default';
1753
+
1754
+ self::$mla_upload_mime_templates[ $key ] = array(
1755
+ 'post_ID' => ++self::$mla_upload_mime_highest_ID,
1756
+ 'mime_type' => $value,
1757
+ 'core_type' => $core_type,
1758
+ 'mla_type' => $mla_type,
1759
+ 'source' => 'custom',
1760
+ 'standard_source' => $standard_source,
1761
+ 'disabled' => false,
1762
+ 'description' => '',
1763
+ 'icon_type' => $icon_type,
1764
+ 'wp_icon_type' => $icon_type,
1765
+ 'mla_icon_type' => $icon_type,
1766
+ 'core_icon_type' => self::mla_get_core_icon_type( $key )
1767
+ );
1768
+ }
1769
+
1770
+ if ( $first_time_called ) {
1771
+ self::_put_upload_mime_templates();
1772
+ return true;
1773
+ }
1774
+
1775
+ /*
1776
+ * Apply the current settings, if any
1777
+ */
1778
+ foreach ( self::$mla_upload_mime_templates as $key => $value ) {
1779
+ self::$mla_upload_mime_templates[ $key ]['disabled'] = isset( $mla_upload_mimes['disabled'][ $key ] );
1780
+ self::$mla_upload_mime_templates[ $key ]['description'] = isset( $mla_upload_mimes['description'][ $key ] ) ? $mla_upload_mimes['description'][ $key ] : '';
1781
+ if ( isset( $mla_upload_mimes['icon_type'][ $key ] ) )
1782
+ self::$mla_upload_mime_templates[ $key ]['icon_type'] = $mla_upload_mimes['icon_type'][ $key ];
1783
+ }
1784
+
1785
+ return true;
1786
+ }
1787
+
1788
+ /**
1789
+ * Store the options portion of the Upload MIME Types
1790
+ *
1791
+ * @since 1.40
1792
+ *
1793
+ * @return boolean Success (true) or failure (false) of the operation
1794
+ */
1795
+ private static function _put_upload_mime_templates() {
1796
+ $mla_upload_mimes = array ( 'custom' => array(), 'disabled' => array(), 'description' => array(), 'icon_type' => array() );
1797
+
1798
+ foreach ( self::$mla_upload_mime_templates as $key => $value ) {
1799
+ if ( 'custom' == $value['source'] )
1800
+ $mla_upload_mimes['custom'][ $key ] = $value['mime_type'];
1801
+
1802
+ if ( $value['disabled'] )
1803
+ $mla_upload_mimes['disabled'][ $key ] = true;
1804
+
1805
+ $description = trim( $value['description'] );
1806
+ if ( ! empty( $description ) )
1807
+ $mla_upload_mimes['description'][ $key ] = $description;
1808
+
1809
+ if ( $value['icon_type'] != $value['core_icon_type'] )
1810
+ $mla_upload_mimes['icon_type'][ $key ] = $value['icon_type'];
1811
+ }
1812
+
1813
+ MLAOptions::mla_update_option( MLAOptions::MLA_UPLOAD_MIMES, $mla_upload_mimes );
1814
+ return true;
1815
+ }
1816
+
1817
+ /**
1818
+ * Add an MLA Upload MIME Type object
1819
+ *
1820
+ * @since 1.40
1821
+ *
1822
+ * @param array Query variables for a single object, including slug
1823
+ *
1824
+ * @return array Message(s) reflecting the results of the operation
1825
+ */
1826
+ public static function mla_add_upload_mime( $request ) {
1827
+ if ( self::_get_upload_mime_templates() )
1828
+ $errors = '';
1829
+ else
1830
+ return array(
1831
+ 'message' => 'ERROR: Cannot load Upload MIME Types',
1832
+ 'body' => ''
1833
+ );
1834
+
1835
+ $messages = '';
1836
+
1837
+ /*
1838
+ * Sanitize slug value
1839
+ */
1840
+ if ( empty( $request['slug'] ) )
1841
+ $errors .= '<br>ERROR: Extension is required';
1842
+ else {
1843
+ $slug = pathinfo( 'X.' . strtolower( trim( $request['slug'] ) ), PATHINFO_EXTENSION );
1844
+ if ( $slug != $request['slug'] )
1845
+ $messages .= sprintf( '<br>Changing extension "%1$s" to valid value "%2$s"', $request['slug'], $slug );
1846
+
1847
+ /*
1848
+ * Make sure new slug is unique
1849
+ */
1850
+ if ( isset( self::$mla_upload_mime_templates[ $slug ] ) )
1851
+ $errors .= sprintf( '<br>ERROR: Could not add extension "%1$s"; value already exists', $slug );
1852
+ }
1853
+
1854
+ /*
1855
+ * Validate mime_type
1856
+ */
1857
+ if ( empty( $request['mime_type'] ) )
1858
+ $errors .= '<br>ERROR: MIME type is required';
1859
+ else {
1860
+ $clean_mime_type = sanitize_mime_type( $request['mime_type'] );
1861
+ if ( $clean_mime_type != $request['mime_type'] )
1862
+ $errors .= sprintf( '<br>ERROR: Bad MIME type; try "%1$s"', $clean_mime_type );
1863
+ }
1864
+
1865
+ if ( ! empty( $errors ) )
1866
+ return array(
1867
+ 'message' => substr( $errors . $messages, 4),
1868
+ 'body' => ''
1869
+ );
1870
+
1871
+ if ( '.none.' == $request['icon_type'] ) {
1872
+ if ( NULL == $icon_type = wp_ext2type( $slug ) )
1873
+ $icon_type = 'default';
1874
+ }
1875
+ else
1876
+ $icon_type = $request['icon_type'];
1877
+
1878
+ $new_type = array();
1879
+ $new_type['post_ID'] = ++self::$mla_upload_mime_highest_ID;
1880
+ $new_type['mime_type'] = $clean_mime_type;
1881
+ $new_type['core_type'] = '';
1882
+ $new_type['mla_type'] = '';
1883
+ $new_type['source'] = 'custom';
1884
+ $new_type['standard_source'] = '';
1885
+ $new_type['disabled'] = isset( $request['disabled'] ) ? $request['disabled'] : false;
1886
+ $new_type['description'] = isset( $request['description'] ) ? sanitize_text_field( $request['description'] ) : '';
1887
+ $new_type['icon_type'] = $icon_type;
1888
+ $new_type['wp_icon_type'] = $icon_type;
1889
+ $new_type['mla_icon_type'] = $icon_type;
1890
+ $new_type['core_icon_type'] = self::mla_get_core_icon_type( $slug );
1891
+
1892
+ self::$mla_upload_mime_templates[ $slug ] = $new_type;
1893
+ if ( self::_put_upload_mime_templates() )
1894
+ return array(
1895
+ 'message' => substr( $messages . sprintf( '<br>Upload MIME Type "%1$s"; added', $slug ), 4),
1896
+ 'body' => ''
1897
+ );
1898
+
1899
+ return array(
1900
+ 'message' => 'ERROR: Cannot update Upload MIME Types',
1901
+ 'body' => ''
1902
+ );
1903
+ }
1904
+
1905
+ /**
1906
+ * Update an MLA Upload MIME Type object
1907
+ *
1908
+ * @since 1.40
1909
+ *
1910
+ * @param array Query variables for new object values, including optional original_slug
1911
+ *
1912
+ * @return array Message(s) reflecting the results of the operation
1913
+ */
1914
+ public static function mla_update_upload_mime( $request ) {
1915
+ if ( self::_get_upload_mime_templates() )
1916
+ $errors = '';
1917
+ else
1918
+ return array(
1919
+ 'message' => 'ERROR: Cannot load Upload MIME Types',
1920
+ 'body' => ''
1921
+ );
1922
+
1923
+ $messages = '';
1924
+ $slug = pathinfo( 'X.' . strtolower( trim( $request['slug'] ) ), PATHINFO_EXTENSION );
1925
+ $original_slug = isset( $request['original_slug'] ) ? $request['original_slug'] : $slug;
1926
+ unset( $request['original_slug'] );
1927
+
1928
+ if ( isset( self::$mla_upload_mime_templates[ $original_slug ] ) )
1929
+ $original_type = self::$mla_upload_mime_templates[ $original_slug ];
1930
+ else
1931
+ $original_type = array(
1932
+ 'post_ID' => 0,
1933
+ 'mime_type' => '',
1934
+ 'core_type' => '',
1935
+ 'mla_type' => '',
1936
+ 'source' => '',
1937
+ 'standard_source' => '',
1938
+ 'disabled' => false,
1939
+ 'description' => '',
1940
+ 'wp_icon_type' => '',
1941
+ 'mla_icon_type' => '',
1942
+ 'icon_type' => '',
1943
+ 'core_icon_type' => ''
1944
+ );
1945
+
1946
+ /*
1947
+ * Validate changed slug value
1948
+ */
1949
+ if ( $slug != $original_slug ) {
1950
+ if ( $slug != $request['slug'] )
1951
+ $messages .= sprintf( '<br>Changing new extension "%1$s" to valid value "%2$s"', $request['slug'], $slug );
1952
+
1953
+ /*
1954
+ * Make sure new slug is unique
1955
+ */
1956
+ if ( isset( self::$mla_upload_mime_templates[ $slug ] ) )
1957
+ $errors .= sprintf( '<br>ERROR: Could not add new extension "%1$s"; value already exists', $slug );
1958
+ else
1959
+ $messages .= sprintf( '<br>Changing extension from "%1$s" to "%2$s"', $original_slug, $slug );
1960
+
1961
+ /*
1962
+ * A new extension cannot have an $original_type
1963
+ */
1964
+ $original_type = array(
1965
+ 'post_ID' => 0,
1966
+ 'mime_type' => '',
1967
+ 'core_type' => '',
1968
+ 'mla_type' => '',
1969
+ 'source' => '',
1970
+ 'standard_source' => '',
1971
+ 'disabled' => false,
1972
+ 'description' => '',
1973
+ 'icon_type' => '',
1974
+ 'wp_icon_type' => '',
1975
+ 'mla_icon_type' => '',
1976
+ 'core_icon_type' => ''
1977
+ );
1978
+ }
1979
+
1980
+ /*
1981
+ * Validate mime_type
1982
+ */
1983
+ if ( empty( $request['mime_type'] ) )
1984
+ $clean_mime_type = $original_type['mime_type'];
1985
+ else {
1986
+ $clean_mime_type = sanitize_mime_type( $request['mime_type'] );
1987
+ if ( $clean_mime_type != $request['mime_type'] )
1988
+ $errors .= sprintf( '<br>ERROR: Bad MIME type; try "%1$s"', $clean_mime_type );
1989
+ }
1990
+
1991
+ if ( ! empty( $errors ) )
1992
+ return array(
1993
+ 'message' => substr( $errors . $messages, 4),
1994
+ 'body' => ''
1995
+ );
1996
+
1997
+ $new_type = array();
1998
+ if( 0 == $original_type['post_ID'] )
1999
+ $new_type['post_ID'] = ++self::$mla_upload_mime_highest_ID;
2000
+ else
2001
+ $new_type['post_ID'] = $original_type['post_ID'];
2002
+
2003
+ $new_type['mime_type'] = $clean_mime_type;
2004
+ $new_type['core_type'] = $original_type['core_type'];
2005
+ $new_type['mla_type'] = $original_type['mla_type'];
2006
+
2007
+ /*
2008
+ * Determine the source
2009
+ */
2010
+ if ( 'core' == $original_type['standard_source'] && $clean_mime_type == $original_type['core_type'] )
2011
+ $new_type['source'] = 'core';
2012
+ elseif ( 'mla' == $original_type['standard_source'] && $clean_mime_type == $original_type['mla_type'] )
2013
+ $new_type['source'] = 'mla';
2014
+ else
2015
+ $new_type['source'] = 'custom';
2016
+
2017
+ /*
2018
+ * Determine new icon types
2019
+ */
2020
+ $new_type['core_icon_type'] = self::mla_get_core_icon_type( $slug );
2021
+
2022
+ if ( isset( $request['icon_type'] ) ) {
2023
+ $new_type['icon_type'] = '.none.' == $request['icon_type'] ? 'default' : $request['icon_type'];
2024
+ }
2025
+ elseif ( ! empty( $original_type['icon_type'] ) )
2026
+ $new_type['icon_type'] = $original_type['icon_type'];
2027
+ else
2028
+ $new_type['icon_type'] = $new_type['core_icon_type'];
2029
+
2030
+ if ( ! empty( $original_type['wp_icon_type'] ) )
2031
+ $new_type['wp_icon_type'] = $original_type['wp_icon_type'];
2032
+ else
2033
+ $new_type['wp_icon_type'] = $new_type['icon_type'];
2034
+
2035
+ if ( ! empty( $original_type['mla_icon_type'] ) )
2036
+ $new_type['mla_icon_type'] = $original_type['mla_icon_type'];
2037
+ else
2038
+ $new_type['mla_icon_type'] = $new_type['icon_type'];
2039
+
2040
+ $new_type['standard_source'] = $original_type['standard_source'];
2041
+ $new_type['disabled'] = isset( $request['disabled'] ) ? $request['disabled'] : $original_type['disabled'];
2042
+ $new_type['description'] = isset( $request['description'] ) ? sanitize_text_field( $request['description'] ) : $original_type['description'];
2043
+
2044
+ if ( ( $slug == $original_slug ) && ( self::$mla_upload_mime_templates[ $slug ] == $new_type ) )
2045
+ return array(
2046
+ 'message' => substr( $messages . sprintf( '<br>Edit type "%1$s"; no changes detected', $slug ), 4),
2047
+ 'body' => ''
2048
+ );
2049
+
2050
+ self::$mla_upload_mime_templates[ $slug ] = $new_type;
2051
+
2052
+ if ( $slug != $original_slug )
2053
+ unset( self::$mla_upload_mime_templates[ $original_slug ] );
2054
+
2055
+ if ( self::_put_upload_mime_templates() )
2056
+ return array(
2057
+ 'message' => substr( $messages . sprintf( '<br>Edit type "%1$s"; updated', $slug ), 4),
2058
+ 'body' => ''
2059
+ );
2060
+
2061
+ return array(
2062
+ 'message' => 'ERROR: Cannot update Upload MIME Types',
2063
+ 'body' => ''
2064
+ );
2065
+ }
2066
+
2067
+ /**
2068
+ * Retrieve an MLA Upload MIME Type slug given a post_ID
2069
+ *
2070
+ * @since 1.40
2071
+ *
2072
+ * @param integer MLA Upload MIME Type post_ID
2073
+ *
2074
+ * @return mixed string with slug of the requested object; false if object not found
2075
+ */
2076
+ public static function mla_get_upload_mime_slug( $post_ID ) {
2077
+ if ( self::_get_upload_mime_templates() )
2078
+ foreach ( self::$mla_upload_mime_templates as $slug => $value )
2079
+ if ( $post_ID == $value['post_ID'] )
2080
+ return $slug;
2081
+
2082
+ return false;
2083
+ }
2084
+
2085
+ /**
2086
+ * Retrieve an MLA Upload MIME Type object
2087
+ *
2088
+ * @since 1.40
2089
+ *
2090
+ * @param string MLA Upload MIME Type slug
2091
+ *
2092
+ * @return mixed Array of elements, including slug, for the requested object; false if object not found
2093
+ */
2094
+ public static function mla_get_upload_mime( $slug ) {
2095
+ if ( self::_get_upload_mime_templates() )
2096
+ if ( isset( self::$mla_upload_mime_templates[ $slug ] ) ) {
2097
+ $matched_value = self::$mla_upload_mime_templates[ $slug ];
2098
+ $matched_value['slug'] = $slug;
2099
+ return $matched_value;
2100
+ }
2101
+
2102
+ return false;
2103
+ }
2104
+
2105
+ /**
2106
+ * Delete an MLA Upload MIME Type object
2107
+ *
2108
+ * @since 1.40
2109
+ *
2110
+ * @param string MLA Upload MIME Type slug
2111
+ *
2112
+ * @return array Message(s) reflecting the results of the operation
2113
+ */
2114
+ public static function mla_delete_upload_mime( $slug ) {
2115
+ if ( self::_get_upload_mime_templates() )
2116
+ if ( isset( self::$mla_upload_mime_templates[ $slug ] ) ) {
2117
+ unset( self::$mla_upload_mime_templates[ $slug ] );
2118
+
2119
+ if ( self::_put_upload_mime_templates() ) {
2120
+ self::_get_upload_mime_templates( true );
2121
+
2122
+ if ( isset( self::$mla_upload_mime_templates[ $slug ] ) )
2123
+ return array(
2124
+ 'message' => sprintf( 'Upload MIME Type "%1$s"; reverted to standard', $slug ),
2125
+ 'body' => ''
2126
+ );
2127
+ else
2128
+ return array(
2129
+ 'message' => sprintf( 'Upload MIME Type "%1$s"; deleted', $slug ),
2130
+ 'body' => ''
2131
+ );
2132
+ }
2133
+ else
2134
+ return array(
2135
+ 'message' => 'ERROR: Cannot update Upload MIME Types',
2136
+ 'body' => ''
2137
+ );
2138
+ }
2139
+
2140
+ return array(
2141
+ 'message' => sprintf( 'ERROR: Did not find Upload type "%1$s"', $slug ),
2142
+ 'body' => ''
2143
+ );
2144
+ }
2145
+
2146
+ /**
2147
+ * In-memory representation of the (read-only) Optional Upload MIME Types
2148
+ *
2149
+ * @since 1.40
2150
+ *
2151
+ * @var array ( ID, slug, mime_type, core_type, mla_type, description )
2152
+ */
2153
+ private static $mla_optional_upload_mime_templates = NULL;
2154
+
2155
+ /**
2156
+ * Sanitize and expand Optional Upload MIME Type query arguments from request variables
2157
+ *
2158
+ * @since 1.40
2159
+ *
2160
+ * @param array query parameters from web page, usually found in $_REQUEST
2161
+ * @param int Optional number of rows (default 0) to skip over to reach desired page
2162
+ * @param int Optional number of rows on each page (0 = all rows, default)
2163
+ *
2164
+ * @return array revised arguments suitable for query
2165
+ */
2166
+ private static function _prepare_optional_upload_items_query( $raw_request, $offset = 0, $count = 0 ) {
2167
+ /*
2168
+ * Go through the $raw_request, take only the arguments that are used in the query and
2169
+ * sanitize or validate them.
2170
+ */
2171
+ if ( ! is_array( $raw_request ) ) {
2172
+ error_log( 'ERROR: _prepare_optional_upload_items_query $raw_request = ' . var_export( $raw_request, true ), 0 );
2173
+ return NULL;
2174
+ }
2175
+
2176
+ $clean_request = array (
2177
+ 'orderby' => 'slug',
2178
+ 'order' => 'ASC',
2179
+ 's' => ''
2180
+ );
2181
+
2182
+ foreach ( $raw_request as $key => $value ) {
2183
+ switch ( $key ) {
2184
+ case 'orderby':
2185
+ if ( 'none' == $value )
2186
+ $clean_request[ $key ] = $value;
2187
+ else {
2188
+ $sortable_columns = MLA_Upload_Optional_List_Table::mla_get_sortable_columns();
2189
+ foreach ($sortable_columns as $sort_key => $sort_value ) {
2190
+ if ( $value == $sort_value[0] ) {
2191
+ $clean_request[ $key ] = $value;
2192
+ break;
2193
+ }
2194
+ } // foreach
2195
+ }
2196
+ break;
2197
+ case 'order':
2198
+ switch ( $value = strtoupper ($value ) ) {
2199
+ case 'ASC':
2200
+ case 'DESC':
2201
+ $clean_request[ $key ] = $value;
2202
+ break;
2203
+ default:
2204
+ $clean_request[ $key ] = 'ASC';
2205
+ }
2206
+ break;
2207
+ /*
2208
+ * ['s'] - Search Media by one or more keywords
2209
+ */
2210
+ case 's':
2211
+ $clean_request[ $key ] = stripslashes( trim( $value ) );
2212
+ break;
2213
+ default:
2214
+ // ignore anything else in $_REQUEST
2215
+ } // switch $key
2216
+ } // foreach $raw_request
2217
+
2218
+ /*
2219
+ * Ignore incoming paged value; use offset and count instead
2220
+ */
2221
+ if ( ( (int) $count ) > 0 ) {
2222
+ $clean_request['offset'] = $offset;
2223
+ $clean_request['posts_per_page'] = $count;
2224
+ }
2225
+
2226
+ return $clean_request;
2227
+ }
2228
+
2229
+ /**
2230
+ * Execute an Optional Upload MIME Types query
2231
+ *
2232
+ * @since 1.40
2233
+ *
2234
+ * @param array query parameters from web page, usually found in $_REQUEST
2235
+ *
2236
+ * @return array query results; array of MLA Optional Upload MIME Type objects
2237
+ */
2238
+ private static function _execute_optional_upload_items_query( $request ) {
2239
+ if ( ! self::_get_optional_upload_mime_templates() )
2240
+ return array ();
2241
+
2242
+ /*
2243
+ * Sort and filter the list
2244
+ */
2245
+ $keyword = isset( $request['s'] ) ? $request['s'] : '';
2246
+ $extension = 0 === strpos( $keyword, '.' ) ? substr( $keyword, 1) : false;
2247
+ $sorted_types = array();
2248
+
2249
+ foreach ( self::$mla_optional_upload_mime_templates as $ID => $value ) {
2250
+ if ( ! empty( $keyword ) ) {
2251
+ if ( false === $extension ) {
2252
+ $found = false !== stripos( $value['slug'], $keyword );
2253
+ $found |= false !== stripos( $value['mime_type'], $keyword );
2254
+ $found |= false !== stripos( $value['description'], $keyword );
2255
+ }
2256
+ else
2257
+ $found = false !== stripos( $value['slug'], $extension );
2258
+
2259
+ if ( ! $found )
2260
+ continue;
2261
+ }
2262
+
2263
+ switch ( $request['orderby'] ) {
2264
+ case 'slug':
2265
+ $sorted_types[ $value['slug'] . $ID ] = (object) $value;
2266
+ break;
2267
+ case 'mime_type':
2268
+ $sorted_types[ ( empty( $value['mime_type'] ) ? chr(1) : $value['mime_type'] ) . $ID ] = (object) $value;
2269
+ break;
2270
+ case 'core_type':
2271
+ $sorted_types[ ( empty( $value['core_type'] ) ? chr(1) : $value['core_type'] ) . $ID ] = (object) $value;
2272
+ break;
2273
+ case 'mla_type':
2274
+ $sorted_types[ ( empty( $value['mla_type'] ) ? chr(1) : $value['mla_type'] ) . $ID ] = (object) $value;
2275
+ break;
2276
+ case 'description':
2277
+ $sorted_types[ ( empty( $value['description'] ) ? chr(1) : $value['description'] ) . $ID ] = (object) $value;
2278
+ break;
2279
+ default:
2280
+ $sorted_types[ $value['slug'] . $ID ] = (object) $value;
2281
+ break;
2282
+ } //orderby
2283
+ }
2284
+ ksort( $sorted_types );
2285
+
2286
+ if ( 'DESC' == $request['order'] )
2287
+ $sorted_types = array_reverse( $sorted_types, true );
2288
+
2289
+ /*
2290
+ * Paginate the sorted list
2291
+ */
2292
+ $results = array();
2293
+ $offset = isset( $request['offset'] ) ? $request['offset'] : 0;
2294
+ $count = isset( $request['posts_per_page'] ) ? $request['posts_per_page'] : -1;
2295
+ foreach ( $sorted_types as $value ) {
2296
+ if ( $offset )
2297
+ $offset--;
2298
+ elseif ( $count-- )
2299
+ $results[] = $value;
2300
+ else
2301
+ break;
2302
+ }
2303
+
2304
+ return $results;
2305
+ }
2306
+
2307
+ /**
2308
+ * Get the total number of MLA Upload MIME Type objects
2309
+ *
2310
+ * @since 1.40
2311
+ *
2312
+ * @param array Query variables, e.g., from $_REQUEST
2313
+ *
2314
+ * @return integer Number of MLA Upload MIME Type objects
2315
+ */
2316
+ public static function mla_count_optional_upload_items( $request ) {
2317
+ $request = self::_prepare_optional_upload_items_query( $request );
2318
+ $results = self::_execute_optional_upload_items_query( $request );
2319
+ return count( $results );
2320
+ }
2321
+
2322
+ /**
2323
+ * Retrieve MLA Upload MIME Type objects for list table display
2324
+ *
2325
+ * @since 1.40
2326
+ *
2327
+ * @param array query parameters from web page, usually found in $_REQUEST
2328
+ * @param int number of rows to skip over to reach desired page
2329
+ * @param int number of rows on each page
2330
+ *
2331
+ * @return array MLA Upload MIME Type objects
2332
+ */
2333
+ public static function mla_query_optional_upload_items( $request, $offset, $count ) {
2334
+ $request = self::_prepare_optional_upload_items_query( $request, $offset, $count );
2335
+ $results = self::_execute_optional_upload_items_query( $request );
2336
+ return $results;
2337
+ }
2338
+
2339
+ /**
2340
+ * Assemble the in-memory representation of the (read-only) Optional Upload MIME Types
2341
+ *
2342
+ * @since 1.40
2343
+ *
2344
+ * @return boolean Success (true) or failure (false) of the operation
2345
+ */
2346
+ private static function _get_optional_upload_mime_templates() {
2347
+ if ( NULL != self::$mla_optional_upload_mime_templates )
2348
+ return true;
2349
+
2350
+ self::$mla_optional_upload_mime_templates = array ();
2351
+ $template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/mla-default-mime-types.tpl' );
2352
+ if ( isset( $template_array['mla-optional-mime-types'] ) ) {
2353
+ $mla_mime_types = preg_split('/[\r\n]+/', $template_array['mla-optional-mime-types'] );
2354
+
2355
+ $ID = 0;
2356
+ foreach( $mla_mime_types as $mla_type ) {
2357
+ $array = explode(',', $mla_type );
2358
+ $slug = $array[0];
2359
+ if ( $matched_type = self::mla_get_upload_mime( $slug ) ) {
2360
+ $core_type = $matched_type['core_type'];
2361
+ $mla_type = $matched_type['mla_type'];
2362
+ }
2363
+ else {
2364
+ $core_type = '';
2365
+ $mla_type = '';
2366
+ }
2367
+
2368
+ self::$mla_optional_upload_mime_templates[ ++$ID ] = array(
2369
+ 'ID' => $ID,
2370
+ 'slug' => $slug,
2371
+ 'mime_type' => $array[1],
2372
+ 'core_type' => $core_type,
2373
+ 'mla_type' => $mla_type,
2374
+ 'description' => $array[2]
2375
+ );
2376
+ }
2377
+ }
2378
+
2379
+ return true;
2380
+ }
2381
+
2382
+ /**
2383
+ * Retrieve an MLA Optional Upload MIME Type given an ID
2384
+ *
2385
+ * @since 1.40
2386
+ *
2387
+ * @param integer MLA Optional Upload MIME Type ID
2388
+ *
2389
+ * @return mixed the requested object; false if object not found
2390
+ */
2391
+ public static function mla_get_optional_upload_mime( $ID ) {
2392
+ if ( self::_get_optional_upload_mime_templates() )
2393
+ if ( isset( self::$mla_optional_upload_mime_templates[ $ID ] ) )
2394
+ return self::$mla_optional_upload_mime_templates[ $ID ];
2395
+
2396
+ return false;
2397
+ }
2398
+ } //Class MLAMime
2399
+ ?>
includes/class-mla-objects.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Media Library Assistant Custom Taxonomy and Post Type objects
4
  *
5
  * @package Media Library Assistant
6
  * @since 0.1
@@ -89,7 +89,7 @@ class MLAObjects {
89
  );
90
  }
91
 
92
- $taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'names' );
93
  foreach ( $taxonomies as $tax_name ) {
94
  if ( MLAOptions::mla_taxonomy_support( $tax_name ) ) {
95
  register_taxonomy_for_object_type( $tax_name, 'attachment');
@@ -194,7 +194,7 @@ class MLAObjects {
194
  $tax_object = get_taxonomy($taxonomy);
195
 
196
  return sprintf( '<a href="%1$s">%2$s</a>', esc_url( add_query_arg(
197
- array( 'page' => 'mla-menu', 'mla-tax' => $taxonomy, 'mla-term' => $term->slug, 'heading_suffix' => urlencode( $tax_object->label . ':' . $term->name ) ), 'upload.php' ) ), number_format_i18n( $results->post_count ) );
198
  }
199
  } //Class MLAObjects
200
  ?>
1
  <?php
2
  /**
3
+ * Media Library Assistant Custom Taxonomy objects
4
  *
5
  * @package Media Library Assistant
6
  * @since 0.1
89
  );
90
  }
91
 
92
+ $taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'names' );
93
  foreach ( $taxonomies as $tax_name ) {
94
  if ( MLAOptions::mla_taxonomy_support( $tax_name ) ) {
95
  register_taxonomy_for_object_type( $tax_name, 'attachment');
194
  $tax_object = get_taxonomy($taxonomy);
195
 
196
  return sprintf( '<a href="%1$s">%2$s</a>', esc_url( add_query_arg(
197
+ array( 'page' => MLA::ADMIN_PAGE_SLUG, 'mla-tax' => $taxonomy, 'mla-term' => $term->slug, 'heading_suffix' => urlencode( $tax_object->label . ':' . $term->name ) ), 'upload.php' ) ), number_format_i18n( $results->post_count ) );
198
  }
199
  } //Class MLAObjects
200
  ?>
includes/class-mla-options.php CHANGED
@@ -76,6 +76,31 @@ class MLAOptions {
76
  */
77
  const MLA_MEDIA_MODAL_SEARCHBOX = 'media_modal_searchbox';
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  /**
80
  * Option setting for "Featured in" reporting
81
  *
@@ -202,10 +227,10 @@ class MLAOptions {
202
  array('tab' => 'general',
203
  'name' => 'Inserted in',
204
  'type' => 'select',
205
- 'std' => 'enabled',
206
- 'options' => array('enabled', 'disabled'),
207
- 'texts' => array('Enabled', 'Disabled'),
208
- 'help' => 'Search database posts and pages for attachments embedded in content.'),
209
 
210
  self::MLA_GALLERY_IN_TUNING =>
211
  array('tab' => 'general',
@@ -259,7 +284,7 @@ class MLAOptions {
259
 
260
  'orderby_heading' =>
261
  array('tab' => 'general',
262
- 'name' => 'Default Table Listing Sort Order',
263
  'type' => 'header'),
264
 
265
  'default_orderby' =>
@@ -280,6 +305,14 @@ class MLAOptions {
280
  'texts' => array('Ascending', 'Descending'),
281
  'help' => 'Choose the sort order.'),
282
 
 
 
 
 
 
 
 
 
283
  'media_modal_heading' =>
284
  array('tab' => 'general',
285
  'name' => 'Media Manager Enhancements',
@@ -321,12 +354,12 @@ class MLAOptions {
321
  'help' => 'Check this option to enable search box enhancements.'),
322
 
323
  'template_heading' =>
324
- array('tab' => 'mla-gallery',
325
  'name' => 'Default [mla_gallery] Templates',
326
  'type' => 'header'),
327
 
328
  'default_style' =>
329
- array('tab' => 'mla-gallery',
330
  'name' => 'Style Template',
331
  'type' => 'select',
332
  'std' => 'default',
@@ -335,7 +368,7 @@ class MLAOptions {
335
  'help' => 'Select the default style template for your [mla_gallery] shortcodes.'),
336
 
337
  'default_markup' =>
338
- array('tab' => 'mla-gallery',
339
  'name' => 'Markup Template',
340
  'type' => 'select',
341
  'std' => 'default',
@@ -360,7 +393,7 @@ class MLAOptions {
360
  'std' => array()),
361
 
362
  'enable_custom_field_mapping' =>
363
- array('tab' => 'custom-field',
364
  'name' => 'Enable custom field mapping when adding new media',
365
  'type' => 'checkbox',
366
  'std' => '',
@@ -377,7 +410,7 @@ class MLAOptions {
377
  'reset' => 'mla_custom_field_option_handler'),
378
 
379
  'enable_iptc_exif_mapping' =>
380
- array('tab' => 'iptc-exif',
381
  'name' => 'Enable IPTC/EXIF Mapping when adding new media',
382
  'type' => 'checkbox',
383
  'std' => '',
@@ -465,16 +498,124 @@ class MLAOptions {
465
  'delete' => 'mla_iptc_exif_option_handler',
466
  'reset' => 'mla_iptc_exif_option_handler'),
467
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
  /* Here are examples of the other option types
469
- 'text' =>
470
- array('name' => 'Text Field',
471
- 'type' => 'text',
472
- 'std' => 'default text',
473
- 'size' => 20,
474
- 'help' => 'Enter the text...'),
475
-
476
  'textarea' =>
477
- array('name' => 'Text Area',
 
478
  'type' => 'textarea',
479
  'std' => 'default text area',
480
  'cols' => 60,
@@ -708,18 +849,26 @@ class MLAOptions {
708
  * @since 0.1
709
  *
710
  * @param string Name of the desired option
 
 
711
  *
712
  * @return mixed Value(s) for the option or false if the option is not a defined MLA option
713
  */
714
- public static function mla_get_option( $option ) {
715
- if ( array_key_exists( $option, self::$mla_option_definitions ) ) {
 
 
 
716
  if ( array_key_exists( 'std', self::$mla_option_definitions[ $option ] ) )
717
- return get_option( MLA_OPTION_PREFIX . $option, self::$mla_option_definitions[ $option ]['std'] );
718
  else
719
- return get_option( MLA_OPTION_PREFIX . $option, false );
720
- }
721
 
722
- return false;
 
 
 
723
  }
724
 
725
  /**
@@ -848,7 +997,7 @@ class MLAOptions {
848
  public static function mla_taxonomy_option_handler( $action, $key, $value, $args = null ) {
849
  switch ( $action ) {
850
  case 'render':
851
- $taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'objects' );
852
  $current_values = self::mla_get_option( $key );
853
  $tax_support = isset( $current_values['tax_support'] ) ? $current_values['tax_support'] : array();
854
  $tax_quick_edit = isset( $current_values['tax_quick_edit'] ) ? $current_values['tax_quick_edit'] : array();
@@ -1117,6 +1266,75 @@ class MLAOptions {
1117
  return $results;
1118
  } // _evaluate_file_information
1119
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1120
  /**
1121
  * Evaluate custom field mapping data source
1122
  *
@@ -1124,7 +1342,7 @@ class MLAOptions {
1124
  *
1125
  * @param integer post->ID of attachment
1126
  * @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
1127
- * @param array data source specification (name, format, meta_name, meta_single, meta_export)
1128
  * @param array (optional) attachment_metadata, default NULL (use current postmeta database value)
1129
  *
1130
  * @return string data source value
@@ -1132,7 +1350,7 @@ class MLAOptions {
1132
  private static function _evaluate_data_source( $post_id, $category, $data_value, $attachment_metadata = NULL ) {
1133
  global $wpdb;
1134
  static $upload_dir, $intermediate_sizes = NULL, $wp_attached_files = NULL, $wp_attachment_metadata = NULL;
1135
- static $current_id = 0, $file_info = NULL;
1136
 
1137
  if ( 'none' == $data_value['data_source'] )
1138
  return '';
@@ -1164,6 +1382,9 @@ class MLAOptions {
1164
  */
1165
  if ( $current_id != $post_id ) {
1166
  $current_id = $post_id;
 
 
 
1167
  if ( 'single_attachment_mapping' == $category ) {
1168
  $meta_value = get_metadata( 'post', $post_id, '_wp_attached_file' );
1169
  $wp_attached_files = array( $post_id => (object) array( 'post_id' => $post_id, 'meta_value' => $meta_value[0] ) );
@@ -1195,10 +1416,8 @@ class MLAOptions {
1195
 
1196
  switch( $data_source ) {
1197
  case 'meta':
1198
- $meta_single = ( isset( $data_value['meta_single'] ) && $data_value['meta_single'] );
1199
- $meta_export = ( isset( $data_value['meta_export'] ) && $data_value['meta_export'] );
1200
  $attachment_metadata = isset( $wp_attachment_metadata[ $post_id ]->meta_value ) ? unserialize( $wp_attachment_metadata[ $post_id ]->meta_value ) : array();
1201
- $result = MLAData::mla_find_array_element( $data_value['meta_name'], $attachment_metadata, $meta_single, $meta_export );
1202
  break;
1203
  case 'path':
1204
  case 'file_name':
@@ -1224,6 +1443,9 @@ class MLAOptions {
1224
  if ( ! (false === $filesize ) )
1225
  $result = $filesize;
1226
  break;
 
 
 
1227
  case 'dimensions':
1228
  $result = $file_info['width'] . 'x' . $file_info['height'];
1229
  if ( 'x' == $result )
@@ -1237,26 +1459,27 @@ class MLAOptions {
1237
  $result = (string) $result;
1238
  break;
1239
  case 'size_keys':
1240
- foreach( $file_info['sizes'] as $key => $value ) {
1241
- $result .= $key . ', ';
1242
- }
1243
- if ( $result )
1244
- $result = rtrim( $result, ', ' );
1245
  break;
1246
  case 'size_names':
1247
- foreach( $file_info['sizes'] as $key => $value ) {
1248
- $result .= $value['file'] . ', ';
1249
- }
1250
- if ( $result )
1251
- $result = rtrim( $result, ', ' );
1252
  break;
1253
  case 'size_bytes':
 
1254
  foreach( $file_info['sizes'] as $key => $value ) {
1255
  $filesize = @ filesize( $file_info['absolute_path'] . $value['file'] );
1256
  if ( false === $filesize )
1257
- $result .= '?, ';
1258
  else {
1259
- switch( $format ) {
1260
  case 'commas':
1261
  if ( is_numeric( $filesize ) )
1262
  $filesize = number_format( (float)$filesize );
@@ -1264,17 +1487,18 @@ class MLAOptions {
1264
  default:
1265
  // no change
1266
  } // format
1267
- $result .= $filesize . ', ';
1268
  }
1269
  }
1270
- if ( $result )
1271
- $result = rtrim( $result, ', ' );
1272
  break;
1273
  case 'size_pixels':
 
1274
  foreach( $file_info['sizes'] as $key => $value ) {
1275
  $pixels = absint( (int) $value['width'] * (int) $value['height'] );
1276
 
1277
- switch( $format ) {
1278
  case 'commas':
1279
  if ( is_numeric( $pixels ) )
1280
  $pixels = number_format( (float)$pixels );
@@ -1282,17 +1506,18 @@ class MLAOptions {
1282
  default:
1283
  // no change
1284
  } // format
1285
- $result .= $pixels . ', ';
1286
  }
1287
- if ( $result )
1288
- $result = rtrim( $result, ', ' );
1289
  break;
1290
  case 'size_dimensions':
 
1291
  foreach( $file_info['sizes'] as $key => $value ) {
1292
- $result .= $value['width'] . 'x' . $value['height'] . ', ';
1293
  }
1294
- if ( $result )
1295
- $result = rtrim( $result, ', ' );
1296
  break;
1297
  case 'size_name[size]':
1298
  $result = $size_info['file'];
@@ -1300,7 +1525,7 @@ class MLAOptions {
1300
  case 'size_bytes[size]':
1301
  $result = @ filesize( $file_info['absolute_path'] . $size_info['file'] );
1302
  if ( false === $result )
1303
- $result .= '?';
1304
  break;
1305
  case 'size_pixels[size]':
1306
  $result = absint( (int) $size_info['width'] * (int) $size_info['height'] );
@@ -1310,20 +1535,23 @@ class MLAOptions {
1310
  if ( 'x' == $result )
1311
  $result = '';
1312
  break;
 
 
 
 
1313
  case 'parent_type':
1314
  case 'parent_title':
1315
- $parent_info = $wpdb->get_col( "SELECT post_parent FROM {$wpdb->posts} WHERE ID = '{$post_id}'" );
1316
- if ( is_array( $parent_info) ) {
1317
- $parent_info = MLAData::mla_fetch_attachment_parent_data( $parent_info[0] );
1318
- if ( isset( $parent_info[ $data_source ] ) )
1319
- $result = $parent_info[ $data_source ];
1320
  }
 
 
 
1321
  break;
1322
  case 'parent_issues':
1323
- $parent_info = $wpdb->get_col( "SELECT post_parent FROM {$wpdb->posts} WHERE ID = '{$post_id}'" );
1324
- $parent_id = is_array( $parent_info) ? $parent_info[0] : 0;
1325
- $references = MLAData::mla_fetch_attachment_references( $post_id, $parent_id );
1326
-
1327
  if ( !empty( $references['parent_errors'] ) ) {
1328
  $result = $references['parent_errors'];
1329
  /*
@@ -1336,12 +1564,86 @@ class MLAOptions {
1336
  }
1337
  break;
1338
  case 'reference_issues':
1339
- $parent_info = $wpdb->get_col( "SELECT post_parent FROM {$wpdb->posts} WHERE ID = '{$post_id}'" );
1340
- $parent_id = is_array( $parent_info) ? $parent_info[0] : 0;
1341
- $references = MLAData::mla_fetch_attachment_references( $post_id, $parent_id );
1342
  if ( !empty( $references['parent_errors'] ) )
1343
  $result = $references['parent_errors'];
1344
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1345
  default:
1346
  return '';
1347
  } // switch $data_source
@@ -1381,7 +1683,6 @@ class MLAOptions {
1381
  public static function mla_evaluate_custom_field_mapping( $post_id, $category, $settings = NULL, $attachment_metadata = NULL ) {
1382
  if ( NULL == $settings )
1383
  $settings = self::mla_get_option( 'custom_field_mapping' );
1384
-
1385
  $updates = array();
1386
  $custom_updates = array();
1387
 
@@ -1389,17 +1690,48 @@ class MLAOptions {
1389
  if ( 'none' == $new_value['data_source'] )
1390
  continue;
1391
 
 
 
 
 
 
1392
  $new_text = self::_evaluate_data_source( $post_id, $category, $new_value, $attachment_metadata );
1393
- if ( $new_value['keep_existing'] ) {
1394
- $old_text = get_metadata( 'post', $post_id, $new_key, true );
1395
- if ( ( ! empty( $new_text ) ) && empty( $old_text ) )
1396
- $custom_updates[ $new_value['name'] ] = $new_text;
1397
- }
1398
- else {
 
 
 
 
 
 
 
 
 
 
 
 
1399
  $custom_updates[ $new_value['name'] ] = $new_text;
1400
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1401
  } // foreach new setting
1402
-
1403
  if ( ! empty( $custom_updates ) )
1404
  $updates['custom_updates'] = $custom_updates;
1405
 
@@ -1455,6 +1787,7 @@ class MLAOptions {
1455
  'file_name',
1456
  'extension',
1457
  'file_size',
 
1458
  'dimensions',
1459
  'pixels',
1460
  'width',
@@ -1469,10 +1802,20 @@ class MLAOptions {
1469
  'size_bytes[size]',
1470
  'size_pixels[size]',
1471
  'size_dimensions[size]',
 
 
1472
  'parent_type',
1473
  'parent_title',
1474
  'parent_issues',
1475
  'reference_issues',
 
 
 
 
 
 
 
 
1476
  'aperture',
1477
  'credit',
1478
  'camera',
@@ -1603,8 +1946,8 @@ class MLAOptions {
1603
  'quick_edit' => false,
1604
  'bulk_edit' => false,
1605
  'meta_name' => '',
1606
- 'meta_single' => false,
1607
- 'meta_export' => false
1608
  );
1609
  }
1610
 
@@ -1622,8 +1965,6 @@ class MLAOptions {
1622
 
1623
  if ( 'meta' == $old_values['data_source'] ) {
1624
  $new_value['meta_name'] = '';
1625
- unset( $new_value['meta_single'] );
1626
- unset( $new_value['meta_export'] );
1627
  }
1628
 
1629
  $message_list .= "<br>{$old_values['name']} changing Data Source from {$old_values['data_source']} to {$new_value['data_source']}.\r\n";
@@ -1699,21 +2040,13 @@ class MLAOptions {
1699
  $old_values['meta_name'] = $new_value['meta_name'];
1700
  }
1701
 
1702
- if ( isset( $new_value['meta_single'] ) ) {
1703
- $boolean_value = true;
1704
- $boolean_text = 'unchecked to checked';
1705
- }
1706
- else {
1707
- $boolean_value = false;
1708
- $boolean_text = 'checked to unchecked';
1709
- }
1710
- if ( $old_values['meta_single'] != $boolean_value ) {
1711
  $any_setting_changed = true;
1712
- $message_list .= "<br>{$old_values['name']} changing Single value from {$boolean_text}.\r\n";
1713
- $old_values['meta_single'] = $boolean_value;
1714
  }
1715
-
1716
- if ( isset( $new_value['meta_export'] ) ) {
1717
  $boolean_value = true;
1718
  $boolean_text = 'unchecked to checked';
1719
  }
@@ -1721,10 +2054,10 @@ class MLAOptions {
1721
  $boolean_value = false;
1722
  $boolean_text = 'checked to unchecked';
1723
  }
1724
- if ( $old_values['meta_export'] != $boolean_value ) {
1725
  $any_setting_changed = true;
1726
- $message_list .= "<br>{$old_values['name']} changing Export value from {$boolean_text}.\r\n";
1727
- $old_values['meta_export'] = $boolean_value;
1728
  }
1729
 
1730
  if ( $any_setting_changed ) {
@@ -1784,8 +2117,12 @@ class MLAOptions {
1784
  'meta_name_size' => 30,
1785
  'meta_name' => $current_value['meta_name'],
1786
  'column_count_meta' => (7 - 2),
1787
- 'meta_single_checked' => '',
1788
- 'meta_export_checked' => ''
 
 
 
 
1789
  );
1790
 
1791
  if ( $current_value['keep_existing'] )
@@ -1813,11 +2150,25 @@ class MLAOptions {
1813
  if ( $current_value['bulk_edit'] )
1814
  $row_values['bulk_edit_checked'] = 'checked="checked"';
1815
 
1816
- if ( $current_value['meta_single'] )
1817
- $row_values['meta_single_checked'] = 'checked="checked"';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1818
 
1819
- if ( $current_value['meta_export'] )
1820
- $row_values['meta_export_checked'] = 'checked="checked"';
1821
 
1822
  $table_rows .= MLAData::mla_parse_template( $row_template, $row_values );
1823
  } // foreach current_value
@@ -1841,8 +2192,12 @@ class MLAOptions {
1841
  'meta_name_size' => 30,
1842
  'meta_name' => '',
1843
  'column_count_meta' => (7 - 2),
1844
- 'meta_single_checked' => '',
1845
- 'meta_export_checked' => ''
 
 
 
 
1846
  );
1847
  $table_rows .= MLAData::mla_parse_template( $row_template, $row_values );
1848
 
@@ -1865,8 +2220,12 @@ class MLAOptions {
1865
  'meta_name_size' => 30,
1866
  'meta_name' => '',
1867
  'column_count_meta' => (7 - 2),
1868
- 'meta_single_checked' => '',
1869
- 'meta_export_checked' => ''
 
 
 
 
1870
  );
1871
  $table_rows .= MLAData::mla_parse_template( $row_template, $row_values );
1872
 
@@ -2517,7 +2876,7 @@ class MLAOptions {
2517
  $row_template = self::$mla_option_templates['iptc-exif-taxonomy-row'];
2518
  $select_template = self::$mla_option_templates['iptc-exif-select'];
2519
  $table_rows = '';
2520
- $taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'objects' );
2521
 
2522
  foreach ( $taxonomies as $row_name => $row_value ) {
2523
  $row_values = array (
76
  */
77
  const MLA_MEDIA_MODAL_SEARCHBOX = 'media_modal_searchbox';
78
 
79
+ /**
80
+ * Provides a unique name for the Post MIME Types option
81
+ */
82
+ const MLA_POST_MIME_TYPES = 'post_mime_types';
83
+
84
+ /**
85
+ * Provides a unique name for the Enable Post MIME Types option
86
+ */
87
+ const MLA_ENABLE_POST_MIME_TYPES = 'enable_post_mime_types';
88
+
89
+ /**
90
+ * Provides a unique name for the Upload MIME Types option
91
+ */
92
+ const MLA_UPLOAD_MIMES = 'upload_mimes';
93
+
94
+ /**
95
+ * Provides a unique name for the Enable Upload MIME Types option
96
+ */
97
+ const MLA_ENABLE_UPLOAD_MIMES = 'enable_upload_mimes';
98
+
99
+ /**
100
+ * Provides a unique name for the Enable MLA Icons option
101
+ */
102
+ const MLA_ENABLE_MLA_ICONS = 'enable_mla_icons';
103
+
104
  /**
105
  * Option setting for "Featured in" reporting
106
  *
227
  array('tab' => 'general',
228
  'name' => 'Inserted in',
229
  'type' => 'select',
230
+ 'std' => 'base',
231
+ 'options' => array('enabled', 'base', 'disabled'),
232
+ 'texts' => array('Enabled', 'Base', 'Disabled'),
233
+ 'help' => 'Search database posts and pages for attachments embedded in content.<br>&nbsp;&nbsp;Base = ignore intermediate size suffixes; use path, base name and extension only.'),
234
 
235
  self::MLA_GALLERY_IN_TUNING =>
236
  array('tab' => 'general',
284
 
285
  'orderby_heading' =>
286
  array('tab' => 'general',
287
+ 'name' => 'Media/Assistant Table Defaults',
288
  'type' => 'header'),
289
 
290
  'default_orderby' =>
305
  'texts' => array('Ascending', 'Descending'),
306
  'help' => 'Choose the sort order.'),
307
 
308
+ 'table_views_width' =>
309
+ array('tab' => 'general',
310
+ 'name' => 'Views Width',
311
+ 'type' => 'text',
312
+ 'std' => '',
313
+ 'size' => 10,
314
+ 'help' => 'Enter the width for the views list, in pixels (px) or percent (%)'),
315
+
316
  'media_modal_heading' =>
317
  array('tab' => 'general',
318
  'name' => 'Media Manager Enhancements',
354
  'help' => 'Check this option to enable search box enhancements.'),
355
 
356
  'template_heading' =>
357
+ array('tab' => 'mla_gallery',
358
  'name' => 'Default [mla_gallery] Templates',
359
  'type' => 'header'),
360
 
361
  'default_style' =>
362
+ array('tab' => 'mla_gallery',
363
  'name' => 'Style Template',
364
  'type' => 'select',
365
  'std' => 'default',
368
  'help' => 'Select the default style template for your [mla_gallery] shortcodes.'),
369
 
370
  'default_markup' =>
371
+ array('tab' => 'mla_gallery',
372
  'name' => 'Markup Template',
373
  'type' => 'select',
374
  'std' => 'default',
393
  'std' => array()),
394
 
395
  'enable_custom_field_mapping' =>
396
+ array('tab' => 'custom_field',
397
  'name' => 'Enable custom field mapping when adding new media',
398
  'type' => 'checkbox',
399
  'std' => '',
410
  'reset' => 'mla_custom_field_option_handler'),
411
 
412
  'enable_iptc_exif_mapping' =>
413
+ array('tab' => 'iptc_exif',
414
  'name' => 'Enable IPTC/EXIF Mapping when adding new media',
415
  'type' => 'checkbox',
416
  'std' => '',
498
  'delete' => 'mla_iptc_exif_option_handler',
499
  'reset' => 'mla_iptc_exif_option_handler'),
500
 
501
+ self::MLA_ENABLE_POST_MIME_TYPES =>
502
+ array('tab' => 'view',
503
+ 'name' => 'Enable View and Post MIME Type Support',
504
+ 'type' => 'checkbox',
505
+ 'std' => 'checked',
506
+ 'help' => 'Check/uncheck this option to enable/disable Post MIME Type Support, then click <strong>Save Changes</strong> to record the new setting.'),
507
+
508
+ self::MLA_POST_MIME_TYPES =>
509
+ array('tab' => '',
510
+ 'type' => 'custom',
511
+ 'render' => 'mla_post_mime_types_option_handler',
512
+ 'update' => 'mla_post_mime_types_option_handler',
513
+ 'delete' => 'mla_post_mime_types_option_handler',
514
+ 'reset' => 'mla_post_mime_types_option_handler',
515
+ 'help' => 'Post MIME Types help.',
516
+ 'std' => array(
517
+ 'all' => array(
518
+ 'singular' => 'All',
519
+ 'plural' => 'All',
520
+ 'specification' => '',
521
+ 'post_mime_type' => false,
522
+ 'table_view' => true,
523
+ 'menu_order' => 0,
524
+ 'description' => 'Built-in view'
525
+ ),
526
+ 'image' => array(
527
+ 'singular' => 'Image',
528
+ 'plural' => 'Images',
529
+ 'specification' => '',
530
+ 'post_mime_type' => true,
531
+ 'table_view' => true,
532
+ 'menu_order' => 0,
533
+ 'description' => 'All image subtypes'
534
+ ),
535
+ 'audio' => array(
536
+ 'singular' => 'Audio',
537
+ 'plural' => 'Audio',
538
+ 'specification' => '',
539
+ 'post_mime_type' => true,
540
+ 'table_view' => true,
541
+ 'menu_order' => 0,
542
+ 'description' => 'All audio subtypes'
543
+ ),
544
+ 'video' => array(
545
+ 'singular' => 'Video',
546
+ 'plural' => 'Video',
547
+ 'specification' => '',
548
+ 'post_mime_type' => true,
549
+ 'table_view' => true,
550
+ 'menu_order' => 0,
551
+ 'description' => 'All video subtypes'
552
+ ),
553
+ 'text' => array(
554
+ 'singular' => 'Text',
555
+ 'plural' => 'Text',
556
+ 'specification' => '',
557
+ 'post_mime_type' => true,
558
+ 'table_view' => true,
559
+ 'menu_order' => 0,
560
+ 'description' => 'All text subtypes'
561
+ ),
562
+ 'application' => array(
563
+ 'singular' => 'Application',
564
+ 'plural' => 'Applications',
565
+ 'specification' => '',
566
+ 'post_mime_type' => true,
567
+ 'table_view' => true,
568
+ 'menu_order' => 0,
569
+ 'description' => 'All application subtypes'
570
+ ),
571
+ 'unattached' => array(
572
+ 'singular' => 'Unattached',
573
+ 'plural' => 'Unattached',
574
+ 'specification' => '',
575
+ 'post_mime_type' => false,
576
+ 'table_view' => true,
577
+ 'menu_order' => 0,
578
+ 'description' => 'Built-in view'
579
+ ),
580
+ 'trash' => array(
581
+ 'singular' => 'Trash',
582
+ 'plural' => 'Trash',
583
+ 'specification' => '',
584
+ 'post_mime_type' => false,
585
+ 'table_view' => true,
586
+ 'menu_order' => 0,
587
+ 'description' => 'Built-in view'
588
+ )
589
+ )),
590
+
591
+ self::MLA_ENABLE_UPLOAD_MIMES =>
592
+ array('tab' => 'upload',
593
+ 'name' => 'Enable Upload MIME Type Support',
594
+ 'type' => 'checkbox',
595
+ 'std' => 'checked',
596
+ 'help' => 'Check/uncheck this option to enable/disable Upload MIME Type Support, then click <strong>Save Changes</strong> to record the new setting.'),
597
+
598
+ self::MLA_UPLOAD_MIMES =>
599
+ array('tab' => '',
600
+ 'type' => 'custom',
601
+ 'render' => 'mla_upload_mimes_option_handler',
602
+ 'update' => 'mla_upload_mimes_option_handler',
603
+ 'delete' => 'mla_upload_mimes_option_handler',
604
+ 'reset' => 'mla_upload_mimes_option_handler',
605
+ 'help' => 'Upload MIME Types help.',
606
+ 'std' => false), // false to detect first-time load; will become an array
607
+
608
+ self::MLA_ENABLE_MLA_ICONS =>
609
+ array('tab' => 'upload',
610
+ 'name' => 'Enable MLA File Type Icons Support',
611
+ 'type' => 'checkbox',
612
+ 'std' => 'checked',
613
+ 'help' => 'Check/uncheck this option to enable/disable MLA File Type Icons Support, then click <strong>Save Changes</strong> to record the new setting.'),
614
+
615
  /* Here are examples of the other option types
 
 
 
 
 
 
 
616
  'textarea' =>
617
+ array('tab' => '',
618
+ 'name' => 'Text Area',
619
  'type' => 'textarea',
620
  'std' => 'default text area',
621
  'cols' => 60,
849
  * @since 0.1
850
  *
851
  * @param string Name of the desired option
852
+ * @param boolean True to ignore current setting and return default values
853
+ * @param boolean True to ignore default values and return only stored values
854
  *
855
  * @return mixed Value(s) for the option or false if the option is not a defined MLA option
856
  */
857
+ public static function mla_get_option( $option, $get_default = false, $get_stored = false ) {
858
+ if ( ! array_key_exists( $option, self::$mla_option_definitions ) )
859
+ return false;
860
+
861
+ if ( $get_default ) {
862
  if ( array_key_exists( 'std', self::$mla_option_definitions[ $option ] ) )
863
+ return self::$mla_option_definitions[ $option ]['std'];
864
  else
865
+ return false;
866
+ } // $get_default
867
 
868
+ if ( ! $get_stored && array_key_exists( 'std', self::$mla_option_definitions[ $option ] ) )
869
+ return get_option( MLA_OPTION_PREFIX . $option, self::$mla_option_definitions[ $option ]['std'] );
870
+
871
+ return get_option( MLA_OPTION_PREFIX . $option, false );
872
  }
873
 
874
  /**
997
  public static function mla_taxonomy_option_handler( $action, $key, $value, $args = null ) {
998
  switch ( $action ) {
999
  case 'render':
1000
+ $taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'objects' );
1001
  $current_values = self::mla_get_option( $key );
1002
  $tax_support = isset( $current_values['tax_support'] ) ? $current_values['tax_support'] : array();
1003
  $tax_quick_edit = isset( $current_values['tax_quick_edit'] ) ? $current_values['tax_quick_edit'] : array();
1266
  return $results;
1267
  } // _evaluate_file_information
1268
 
1269
+ /**
1270
+ * Evaluate post information for custom field mapping
1271
+ *
1272
+ * @since 1.40
1273
+ *
1274
+ * @param integer post->ID of attachment
1275
+ * @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
1276
+ * @param string data source name ( post_date or post_parent )
1277
+ *
1278
+ * @return mixed 'post_date' => (string) upload date, 'post_parent' => (integer) ID of parent or zero )
1279
+ */
1280
+ private static function _evaluate_post_information( $post_id, $category, $data_source ) {
1281
+ global $wpdb;
1282
+ static $post_info = NULL;
1283
+
1284
+ if ( NULL == $post_info ) {
1285
+ if ( 'custom_field_mapping' == $category ) {
1286
+ $post_info = $wpdb->get_results( "SELECT ID, post_date, post_parent FROM {$wpdb->posts} WHERE post_type = 'attachment'", OBJECT_K );
1287
+ }
1288
+ else {
1289
+ $post_info = $wpdb->get_results( "SELECT ID, post_date, post_parent FROM {$wpdb->posts} WHERE ID = '{$post_id}'", OBJECT_K );
1290
+ }
1291
+ }
1292
+
1293
+ switch ( $data_source ) {
1294
+ case 'post_date':
1295
+ return isset( $post_info[ $post_id ]->post_date ) ? $post_info[ $post_id ]->post_date : '';
1296
+ case 'post_parent':
1297
+ return isset( $post_info[ $post_id ]->post_parent ) ? $post_info[ $post_id ]->post_parent : 0;
1298
+ default:
1299
+ return false;
1300
+ }
1301
+ } // _evaluate_post_information
1302
+
1303
+ /**
1304
+ * Evaluate post information for custom field mapping
1305
+ *
1306
+ * @since 1.40
1307
+ *
1308
+ * @param array field value(s)
1309
+ * @param string format option text|single|export|array|multi
1310
+ * @param boolean keep existing value(s) - for 'multi' option
1311
+ *
1312
+ * @return mixed array for option = array|multi else string
1313
+ */
1314
+ private static function _evaluate_array_result( $value, $option, $keep_existing ) {
1315
+ if ( empty( $value ) )
1316
+ return '';
1317
+
1318
+ if ( is_array( $value ) ) {
1319
+ if ( 'single' == $option || 1 == count( $value ) )
1320
+ return current( $value );
1321
+ elseif ( 'export' == $option )
1322
+ return var_export( $value, true );
1323
+ elseif ( 'text' == $option )
1324
+ return implode( ',', $value );
1325
+ elseif ( 'multi' == $option ) {
1326
+ $value[0x80000000] = $option;
1327
+ $value[0x80000001] = $keep_existing;
1328
+ return $value;
1329
+ }
1330
+ }
1331
+
1332
+ /*
1333
+ * $option = array returns the array
1334
+ */
1335
+ return $value;
1336
+ } // _evaluate_array_result
1337
+
1338
  /**
1339
  * Evaluate custom field mapping data source
1340
  *
1342
  *
1343
  * @param integer post->ID of attachment
1344
  * @param string category/scope to evaluate against: custom_field_mapping or single_attachment_mapping
1345
+ * @param array data source specification ( name, data_source, keep_existing, format, mla_column, quick_edit, bulk_edit, meta_name, no_null, option )
1346
  * @param array (optional) attachment_metadata, default NULL (use current postmeta database value)
1347
  *
1348
  * @return string data source value
1350
  private static function _evaluate_data_source( $post_id, $category, $data_value, $attachment_metadata = NULL ) {
1351
  global $wpdb;
1352
  static $upload_dir, $intermediate_sizes = NULL, $wp_attached_files = NULL, $wp_attachment_metadata = NULL;
1353
+ static $current_id = 0, $file_info = NULL, $parent_info = NULL, $references = NULL;
1354
 
1355
  if ( 'none' == $data_value['data_source'] )
1356
  return '';
1382
  */
1383
  if ( $current_id != $post_id ) {
1384
  $current_id = $post_id;
1385
+ $parent_info = NULL;
1386
+ $references = NULL;
1387
+
1388
  if ( 'single_attachment_mapping' == $category ) {
1389
  $meta_value = get_metadata( 'post', $post_id, '_wp_attached_file' );
1390
  $wp_attached_files = array( $post_id => (object) array( 'post_id' => $post_id, 'meta_value' => $meta_value[0] ) );
1416
 
1417
  switch( $data_source ) {
1418
  case 'meta':
 
 
1419
  $attachment_metadata = isset( $wp_attachment_metadata[ $post_id ]->meta_value ) ? unserialize( $wp_attachment_metadata[ $post_id ]->meta_value ) : array();
1420
+ $result = MLAData::mla_find_array_element( $data_value['meta_name'], $attachment_metadata, $data_value['option'], $data_value['keep_existing'] );
1421
  break;
1422
  case 'path':
1423
  case 'file_name':
1443
  if ( ! (false === $filesize ) )
1444
  $result = $filesize;
1445
  break;
1446
+ case 'upload_date':
1447
+ $result = self::_evaluate_post_information( $post_id, $category, 'post_date' );
1448
+ break;
1449
  case 'dimensions':
1450
  $result = $file_info['width'] . 'x' . $file_info['height'];
1451
  if ( 'x' == $result )
1459
  $result = (string) $result;
1460
  break;
1461
  case 'size_keys':
1462
+ $result = array();
1463
+ foreach( $file_info['sizes'] as $key => $value )
1464
+ $result[] = $key;
1465
+
1466
+ $result = self::_evaluate_array_result( $result, $data_value['option'], $data_value['keep_existing'] );
1467
  break;
1468
  case 'size_names':
1469
+ $result = array();
1470
+ foreach( $file_info['sizes'] as $key => $value )
1471
+ $result[] = $value['file'];
1472
+
1473
+ $result = self::_evaluate_array_result( $result, $data_value['option'], $data_value['keep_existing'] );
1474
  break;
1475
  case 'size_bytes':
1476
+ $result = array();
1477
  foreach( $file_info['sizes'] as $key => $value ) {
1478
  $filesize = @ filesize( $file_info['absolute_path'] . $value['file'] );
1479
  if ( false === $filesize )
1480
+ $result[] = '?';
1481
  else {
1482
+ switch( $data_value['format'] ) {
1483
  case 'commas':
1484
  if ( is_numeric( $filesize ) )
1485
  $filesize = number_format( (float)$filesize );
1487
  default:
1488
  // no change
1489
  } // format
1490
+ $result[] = $filesize;
1491
  }
1492
  }
1493
+
1494
+ $result = self::_evaluate_array_result( $result, $data_value['option'], $data_value['keep_existing'] );
1495
  break;
1496
  case 'size_pixels':
1497
+ $result = array();
1498
  foreach( $file_info['sizes'] as $key => $value ) {
1499
  $pixels = absint( (int) $value['width'] * (int) $value['height'] );
1500
 
1501
+ switch( $data_value['format'] ) {
1502
  case 'commas':
1503
  if ( is_numeric( $pixels ) )
1504
  $pixels = number_format( (float)$pixels );
1506
  default:
1507
  // no change
1508
  } // format
1509
+ $result[] = $pixels;
1510
  }
1511
+
1512
+ $result = self::_evaluate_array_result( $result, $data_value['option'], $data_value['keep_existing'] );
1513
  break;
1514
  case 'size_dimensions':
1515
+ $result = array();
1516
  foreach( $file_info['sizes'] as $key => $value ) {
1517
+ $result[] = $value['width'] . 'x' . $value['height'];
1518
  }
1519
+
1520
+ $result = self::_evaluate_array_result( $result, $data_value['option'], $data_value['keep_existing'] );
1521
  break;
1522
  case 'size_name[size]':
1523
  $result = $size_info['file'];
1525
  case 'size_bytes[size]':
1526
  $result = @ filesize( $file_info['absolute_path'] . $size_info['file'] );
1527
  if ( false === $result )
1528
+ $result = '?';
1529
  break;
1530
  case 'size_pixels[size]':
1531
  $result = absint( (int) $size_info['width'] * (int) $size_info['height'] );
1535
  if ( 'x' == $result )
1536
  $result = '';
1537
  break;
1538
+ case 'parent':
1539
+ $result = absint( self::_evaluate_post_information( $post_id, $category, 'post_parent' ) );
1540
+ break;
1541
+ case 'parent_date':
1542
  case 'parent_type':
1543
  case 'parent_title':
1544
+ if ( is_null( $parent_info ) ) {
1545
+ $parent_info = MLAData::mla_fetch_attachment_parent_data( self::_evaluate_post_information( $post_id, $category, 'post_parent' ) );
 
 
 
1546
  }
1547
+
1548
+ if ( isset( $parent_info[ $data_source ] ) )
1549
+ $result = $parent_info[ $data_source ];
1550
  break;
1551
  case 'parent_issues':
1552
+ if ( is_null( $references ) )
1553
+ $references = MLAData::mla_fetch_attachment_references( $post_id, self::_evaluate_post_information( $post_id, $category, 'post_parent' ) );
1554
+
 
1555
  if ( !empty( $references['parent_errors'] ) ) {
1556
  $result = $references['parent_errors'];
1557
  /*
1564
  }
1565
  break;
1566
  case 'reference_issues':
1567
+ if ( is_null( $references ) )
1568
+ $references = MLAData::mla_fetch_attachment_references( $post_id, self::_evaluate_post_information( $post_id, $category, 'post_parent' ) );
1569
+
1570
  if ( !empty( $references['parent_errors'] ) )
1571
  $result = $references['parent_errors'];
1572
  break;
1573
+ case 'featured_in':
1574
+ case 'featured_in_title':
1575
+ if ( is_null( $references ) )
1576
+ $references = MLAData::mla_fetch_attachment_references( $post_id, self::_evaluate_post_information( $post_id, $category, 'post_parent' ) );
1577
+
1578
+ if ( !empty( $references['features'] ) ) {
1579
+ $result = array();
1580
+ foreach ( $references['features'] as $ID => $value )
1581
+ if ( 'featured_in' == $data_source )
1582
+ $result[] = sprintf( '%1$s (%2$s %3$d)', $value->post_title, $value->post_type, $ID );
1583
+ else
1584
+ $result[] = $value->post_title;
1585
+
1586
+ $result = self::_evaluate_array_result( $result, $data_value['option'], $data_value['keep_existing'] );
1587
+ }
1588
+ else
1589
+ $result = '';
1590
+ break;
1591
+ case 'inserted_in':
1592
+ case 'inserted_in_title':
1593
+ if ( is_null( $references ) )
1594
+ $references = MLAData::mla_fetch_attachment_references( $post_id, self::_evaluate_post_information( $post_id, $category, 'post_parent' ) );
1595
+
1596
+ if ( !empty( $references['inserts'] ) ) {
1597
+ $result = array();
1598
+ foreach ( $references['inserts'] as $base_file => $inserts )
1599
+ foreach ( $inserts as $value )
1600
+ if ( 'inserted_in' == $data_source )
1601
+ $result[] = sprintf( '%1$s (%2$s %3$d)', $value->post_title, $value->post_type, $value->ID );
1602
+ else
1603
+ $result[] = $value->post_title;
1604
+ ksort( $result );
1605
+
1606
+ $result = self::_evaluate_array_result( $result, $data_value['option'], $data_value['keep_existing'] );
1607
+ }
1608
+ else
1609
+ $result = '';
1610
+ break;
1611
+ case 'gallery_in':
1612
+ case 'gallery_in_title':
1613
+ if ( is_null( $references ) )
1614
+ $references = MLAData::mla_fetch_attachment_references( $post_id, self::_evaluate_post_information( $post_id, $category, 'post_parent' ) );
1615
+
1616
+ if ( !empty( $references['galleries'] ) ) {
1617
+ $result = array();
1618
+ foreach ( $references['galleries'] as $ID => $value )
1619
+ if ( 'gallery_in' == $data_source )
1620
+ $result[] = sprintf( '%1$s (%2$s %3$d)', $value['post_title'], $value['post_type'], $ID );
1621
+ else
1622
+ $result[] = $value['post_title'];
1623
+
1624
+ $result = self::_evaluate_array_result( $result, $data_value['option'], $data_value['keep_existing'] );
1625
+ }
1626
+ else
1627
+ $result = '';
1628
+ break;
1629
+ case 'mla_gallery_in':
1630
+ case 'mla_gallery_in_title':
1631
+ if ( is_null( $references ) )
1632
+ $references = MLAData::mla_fetch_attachment_references( $post_id, self::_evaluate_post_information( $post_id, $category, 'post_parent' ) );
1633
+
1634
+ if ( !empty( $references['mla_galleries'] ) ) {
1635
+ $result = array();
1636
+ foreach ( $references['mla_galleries'] as $ID => $value )
1637
+ if ( 'mla_gallery_in' == $data_source )
1638
+ $result[] = sprintf( '%1$s (%2$s %3$d)', $value['post_title'], $value['post_type'], $ID );
1639
+ else
1640
+ $result[] = $value['post_title'];
1641
+
1642
+ $result = self::_evaluate_array_result( $result, $data_value['option'], $data_value['keep_existing'] );
1643
+ }
1644
+ else
1645
+ $result = '';
1646
+ break;
1647
  default:
1648
  return '';
1649
  } // switch $data_source
1683
  public static function mla_evaluate_custom_field_mapping( $post_id, $category, $settings = NULL, $attachment_metadata = NULL ) {
1684
  if ( NULL == $settings )
1685
  $settings = self::mla_get_option( 'custom_field_mapping' );
 
1686
  $updates = array();
1687
  $custom_updates = array();
1688
 
1690
  if ( 'none' == $new_value['data_source'] )
1691
  continue;
1692
 
1693
+ /*
1694
+ * Convert checkbox value(s)
1695
+ */
1696
+ $new_value['no_null'] = isset( $new_value['no_null'] ) ? (boolean) isset( $new_value['no_null'] ) : false;
1697
+
1698
  $new_text = self::_evaluate_data_source( $post_id, $category, $new_value, $attachment_metadata );
1699
+ if ( 'multi' == $new_value['option'] ) {
1700
+ if ( ' ' == $new_text ) {
1701
+ $new_text = array(
1702
+ 0x80000000 => $new_value['option'],
1703
+ 0x80000001 => $new_value['keep_existing'],
1704
+ 0x80000002 => $new_value['no_null']
1705
+ );
1706
+
1707
+ if ( ! $new_value['no_null'] )
1708
+ $new_text [0x00000000] = ' ';
1709
+ }
1710
+ elseif ( is_string( $new_text ) )
1711
+ $new_text = array(
1712
+ 0x00000000 => $new_text,
1713
+ 0x80000000 => $new_value['option'],
1714
+ 0x80000001 => $new_value['keep_existing']
1715
+ );
1716
+
1717
  $custom_updates[ $new_value['name'] ] = $new_text;
1718
  }
1719
+ else {
1720
+ if ( $new_value['keep_existing'] ) {
1721
+ if ( is_string( $old_text = get_metadata( 'post', $post_id, $new_value['name'], true ) ) )
1722
+ $old_text = trim( $old_text );
1723
+
1724
+ if ( ( ' ' != $new_text ) && empty( $old_text ) )
1725
+ $custom_updates[ $new_value['name'] ] = $new_text;
1726
+ }
1727
+ else {
1728
+ if ( ' ' == $new_text && $new_value['no_null'] )
1729
+ $new_text = NULL;
1730
+
1731
+ $custom_updates[ $new_value['name'] ] = $new_text;
1732
+ }
1733
+ } // ! multi
1734
  } // foreach new setting
 
1735
  if ( ! empty( $custom_updates ) )
1736
  $updates['custom_updates'] = $custom_updates;
1737
 
1787
  'file_name',
1788
  'extension',
1789
  'file_size',
1790
+ 'upload_date',
1791
  'dimensions',
1792
  'pixels',
1793
  'width',
1802
  'size_bytes[size]',
1803
  'size_pixels[size]',
1804
  'size_dimensions[size]',
1805
+ 'parent',
1806
+ 'parent_date',
1807
  'parent_type',
1808
  'parent_title',
1809
  'parent_issues',
1810
  'reference_issues',
1811
+ 'featured_in',
1812
+ 'featured_in_title',
1813
+ 'inserted_in',
1814
+ 'inserted_in_title',
1815
+ 'gallery_in',
1816
+ 'gallery_in_title',
1817
+ 'mla_gallery_in',
1818
+ 'mla_gallery_in_title',
1819
  'aperture',
1820
  'credit',
1821
  'camera',
1946
  'quick_edit' => false,
1947
  'bulk_edit' => false,
1948
  'meta_name' => '',
1949
+ 'option' => 'text',
1950
+ 'no_null' => false
1951
  );
1952
  }
1953
 
1965
 
1966
  if ( 'meta' == $old_values['data_source'] ) {
1967
  $new_value['meta_name'] = '';
 
 
1968
  }
1969
 
1970
  $message_list .= "<br>{$old_values['name']} changing Data Source from {$old_values['data_source']} to {$new_value['data_source']}.\r\n";
2040
  $old_values['meta_name'] = $new_value['meta_name'];
2041
  }
2042
 
2043
+ if ( $old_values['option'] != $new_value['option'] ) {
 
 
 
 
 
 
 
 
2044
  $any_setting_changed = true;
2045
+ $message_list .= "<br>{$old_values['name']} changing Option from {$old_values['option']} to {$new_value['option']}.\r\n";
2046
+ $old_values['option'] = $new_value['option'];
2047
  }
2048
+
2049
+ if ( isset( $new_value['no_null'] ) ) {
2050
  $boolean_value = true;
2051
  $boolean_text = 'unchecked to checked';
2052
  }
2054
  $boolean_value = false;
2055
  $boolean_text = 'checked to unchecked';
2056
  }
2057
+ if ( $old_values['no_null'] != $boolean_value ) {
2058
  $any_setting_changed = true;
2059
+ $message_list .= "<br>{$old_values['name']} changing Delete NULL value from {$boolean_text}.\r\n";
2060
+ $old_values['no_null'] = $boolean_value;
2061
  }
2062
 
2063
  if ( $any_setting_changed ) {
2117
  'meta_name_size' => 30,
2118
  'meta_name' => $current_value['meta_name'],
2119
  'column_count_meta' => (7 - 2),
2120
+ 'text_option' => '',
2121
+ 'single_option' => '',
2122
+ 'export_option' => '',
2123
+ 'array_option' => '',
2124
+ 'multi_option' => '',
2125
+ 'no_null_checked' => ''
2126
  );
2127
 
2128
  if ( $current_value['keep_existing'] )
2150
  if ( $current_value['bulk_edit'] )
2151
  $row_values['bulk_edit_checked'] = 'checked="checked"';
2152
 
2153
+ switch( $current_value['option'] ) {
2154
+ case 'single':
2155
+ $row_values['single_option'] = 'selected="selected"';
2156
+ break;
2157
+ case 'export':
2158
+ $row_values['export_option'] = 'selected="selected"';
2159
+ break;
2160
+ case 'array':
2161
+ $row_values['array_option'] = 'selected="selected"';
2162
+ break;
2163
+ case 'multi':
2164
+ $row_values['multi_option'] = 'selected="selected"';
2165
+ break;
2166
+ default:
2167
+ $row_values['text_option'] = 'selected="selected"';
2168
+ } // option
2169
 
2170
+ if ( $current_value['no_null'] )
2171
+ $row_values['no_null_checked'] = 'checked="checked"';
2172
 
2173
  $table_rows .= MLAData::mla_parse_template( $row_template, $row_values );
2174
  } // foreach current_value
2192
  'meta_name_size' => 30,
2193
  'meta_name' => '',
2194
  'column_count_meta' => (7 - 2),
2195
+ 'text_option' => '',
2196
+ 'single_option' => '',
2197
+ 'export_option' => '',
2198
+ 'array_option' => '',
2199
+ 'multi_option' => '',
2200
+ 'no_null_checked' => ''
2201
  );
2202
  $table_rows .= MLAData::mla_parse_template( $row_template, $row_values );
2203
 
2220
  'meta_name_size' => 30,
2221
  'meta_name' => '',
2222
  'column_count_meta' => (7 - 2),
2223
+ 'text_option' => '',
2224
+ 'single_option' => '',
2225
+ 'export_option' => '',
2226
+ 'array_option' => '',
2227
+ 'multi_option' => '',
2228
+ 'no_null_checked' => ''
2229
  );
2230
  $table_rows .= MLAData::mla_parse_template( $row_template, $row_values );
2231
 
2876
  $row_template = self::$mla_option_templates['iptc-exif-taxonomy-row'];
2877
  $select_template = self::$mla_option_templates['iptc-exif-select'];
2878
  $table_rows = '';
2879
+ $taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'objects' );
2880
 
2881
  foreach ( $taxonomies as $row_name => $row_value ) {
2882
  $row_values = array (
includes/class-mla-settings.php CHANGED
@@ -13,11 +13,56 @@
13
  * @since 0.1
14
  */
15
  class MLASettings {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  /**
17
  * Provides a unique name for the settings page
18
  */
19
  const MLA_SETTINGS_SLUG = 'mla-settings-menu';
20
 
 
 
 
 
 
 
 
 
 
21
  /**
22
  * Initialization function, similar to __construct()
23
  *
@@ -26,7 +71,12 @@ class MLASettings {
26
  * @return void
27
  */
28
  public static function initialize( ) {
 
 
29
  add_action( 'admin_menu', 'MLASettings::mla_admin_menu_action' );
 
 
 
30
  self::_version_upgrade();
31
  }
32
 
@@ -97,6 +147,31 @@ class MLASettings {
97
  MLAOptions::mla_update_option( 'custom_field_mapping', $new_values );
98
  } // version is less than 1.30
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  MLAOptions::mla_update_option( MLAOptions::MLA_VERSION_OPTION, MLA::CURRENT_MLA_VERSION );
101
  }
102
 
@@ -133,8 +208,105 @@ class MLASettings {
133
  }
134
  }
135
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  /**
137
  * Add settings page in the "Settings" section,
 
138
  * add settings link in the Plugins section entry for MLA.
139
  *
140
  * @since 0.1
@@ -142,11 +314,247 @@ class MLASettings {
142
  * @return void
143
  */
144
  public static function mla_admin_menu_action( ) {
145
- $hook = add_submenu_page( 'options-general.php', 'Media Library Assistant Settings', 'Media Library Assistant', 'manage_options', self::MLA_SETTINGS_SLUG, 'MLASettings::mla_render_settings_page' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
 
147
- add_filter( 'plugin_action_links', 'MLASettings::mla_add_plugin_settings_link', 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  }
151
 
152
  /**
@@ -159,9 +567,9 @@ class MLASettings {
159
  *
160
  * @return array Updated array of links for the Plugin
161
  */
162
- public static function mla_add_plugin_settings_link( $links, $file ) {
163
  if ( $file == 'media-library-assistant/index.php' ) {
164
- $settings_link = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=' . self::MLA_SETTINGS_SLUG ), 'Settings' );
165
  array_unshift( $links, $settings_link );
166
  }
167
 
@@ -329,7 +737,6 @@ class MLASettings {
329
  $option_values = array(
330
  'key' => MLA_OPTION_PREFIX . $key,
331
  'value' => $value['name'],
332
- 'options' => $select_options,
333
  'help' => $value['help'],
334
  'size' => '40',
335
  'text' => ''
@@ -403,9 +810,11 @@ class MLASettings {
403
  */
404
  private static $mla_tablist = array(
405
  'general' => array( 'title' => 'General', 'render' => '_compose_general_tab' ),
406
- 'mla-gallery' => array( 'title' => 'MLA Gallery', 'render' => '_compose_mla_gallery_tab' ),
407
- 'custom-field' => array( 'title' => 'Custom Fields', 'render' => '_compose_custom_field_tab' ),
408
- 'iptc-exif' => array( 'title' => 'IPTC/EXIF', 'render' => '_compose_iptc_exif_tab' ),
 
 
409
  'documentation' => array( 'title' => 'Documentation', 'render' => '_compose_documentation_tab' )
410
  );
411
 
@@ -426,7 +835,7 @@ class MLASettings {
426
  $item_values = array(
427
  'data-tab-id' => $key,
428
  'nav-tab-active' => ( $active_tab == $key ) ? 'nav-tab-active' : '',
429
- 'settings-page' => self::MLA_SETTINGS_SLUG,
430
  'title' => $item['title']
431
  );
432
 
@@ -471,6 +880,7 @@ class MLASettings {
471
  'shortcode_list' => '',
472
  'options_list' => '',
473
  'donateURL' => MLA_PLUGIN_URL . 'images/DonateButton.jpg',
 
474
  '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
475
  '_wp_http_referer' => wp_referer_field( false )
476
  );
@@ -488,7 +898,7 @@ class MLASettings {
488
  $shortcodes = array(
489
  // array("name" => "shortcode", "description" => "This shortcode...")
490
  array( 'name' => 'mla_attachment_list', 'description' => 'renders a complete list of all attachments and references to them.' ),
491
- array( 'name' => 'mla_gallery', 'description' => 'enhanced version of the WordPress [gallery] shortcode. For complete documentation <a href="?page=' . self::MLA_SETTINGS_SLUG . '&amp;mla_tab=documentation">click here</a>.' )
492
  );
493
 
494
  $shortcode_list = '';
@@ -522,6 +932,705 @@ class MLASettings {
522
  return $page_content;
523
  }
524
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
525
  /**
526
  * Compose the MLA Gallery tab content for the Settings subpage
527
  *
@@ -553,6 +1662,7 @@ class MLASettings {
553
  'options_list' => '',
554
  'style_options_list' => '',
555
  'markup_options_list' => '',
 
556
  '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
557
  '_wp_http_referer' => wp_referer_field( false )
558
  );
@@ -582,7 +1692,7 @@ class MLASettings {
582
  */
583
  $options_list = '';
584
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
585
- if ( 'mla-gallery' == $value['tab'] )
586
  $options_list .= self::_compose_option_row( $key, $value );
587
  }
588
 
@@ -905,6 +2015,7 @@ class MLASettings {
905
  $page_values = array(
906
  'options_list' => '',
907
  'custom_options_list' => '',
 
908
  '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
909
  '_wp_http_referer' => wp_referer_field( false )
910
  );
@@ -914,7 +2025,7 @@ class MLASettings {
914
  */
915
  $options_list = '';
916
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
917
- if ( 'custom-field' == $value['tab'] )
918
  $options_list .= self::_compose_option_row( $key, $value );
919
  }
920
 
@@ -1008,6 +2119,7 @@ class MLASettings {
1008
  'standard_options_list' => '',
1009
  'taxonomy_options_list' => '',
1010
  'custom_options_list' => '',
 
1011
  '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
1012
  '_wp_http_referer' => wp_referer_field( false )
1013
  );
@@ -1017,7 +2129,7 @@ class MLASettings {
1017
  */
1018
  $options_list = '';
1019
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1020
- if ( 'iptc-exif' == $value['tab'] )
1021
  $options_list .= self::_compose_option_row( $key, $value );
1022
  }
1023
 
@@ -1096,10 +2208,17 @@ class MLASettings {
1096
  $page_content = array( 'message' => 'ERROR: unknown content tab', 'body' => '' );
1097
  }
1098
 
1099
- if ( ! empty( $page_content['message'] ) )
 
 
 
 
 
1100
  $page_values['messages'] = MLAData::mla_parse_template( self::$page_template_array['messages'], array(
1101
- 'messages' => $page_content['message']
 
1102
  ) );
 
1103
 
1104
  $page_values['tab_content'] = $page_content['body'];
1105
  echo MLAData::mla_parse_template( self::$page_template_array['page'], $page_values );
@@ -1123,7 +2242,7 @@ class MLASettings {
1123
  * Start with any page-level options
1124
  */
1125
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1126
- if ( 'mla-gallery' == $value['tab'] && ( 'select' == $value['type'] ) ) {
1127
  $old_value = MLAOptions::mla_get_option( $key );
1128
  if ( $old_value != $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) {
1129
  $settings_changed = true;
@@ -1336,6 +2455,71 @@ class MLASettings {
1336
  return $page_content;
1337
  } // _save_gallery_settings
1338
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1339
  /**
1340
  * Process custom field settings against all image attachments
1341
  * without saving the settings to the mla_option
@@ -1373,8 +2557,8 @@ class MLASettings {
1373
 
1374
  $examine_count += 1;
1375
  if ( ! empty( $updates ) ) {
1376
- $results = MLAData::mla_update_single_item( (integer) $post_id, $updates );
1377
- if ( stripos( $results['message'], 'updated.' ) )
1378
  $update_count += 1;
1379
  }
1380
  } // foreach post
@@ -1432,7 +2616,7 @@ class MLASettings {
1432
  * Start with any page-level options
1433
  */
1434
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1435
- if ( 'custom-field' == $value['tab'] )
1436
  $option_messages .= self::_update_option_row( $key, $value );
1437
  }
1438
 
@@ -1476,6 +2660,12 @@ class MLASettings {
1476
  $query = array( 'orderby' => 'none', 'post_parent' => 'all' );
1477
  $posts = MLAShortcodes::mla_get_shortcode_attachments( 0, $query );
1478
 
 
 
 
 
 
 
1479
  foreach( $posts as $key => $post ) {
1480
  $updates = MLAOptions::mla_evaluate_iptc_exif_mapping( $post, 'iptc_exif_standard_mapping', $_REQUEST['iptc_exif_mapping'] );
1481
 
@@ -1520,6 +2710,12 @@ class MLASettings {
1520
  $query = array( 'orderby' => 'none', 'post_parent' => 'all' );
1521
  $posts = MLAShortcodes::mla_get_shortcode_attachments( 0, $query );
1522
 
 
 
 
 
 
 
1523
  foreach( $posts as $key => $post ) {
1524
  $updates = MLAOptions::mla_evaluate_iptc_exif_mapping( $post, 'iptc_exif_taxonomy_mapping', $_REQUEST['iptc_exif_mapping'] );
1525
 
@@ -1575,6 +2771,12 @@ class MLASettings {
1575
  $query = array( 'orderby' => 'none', 'post_parent' => 'all' );
1576
  $posts = MLAShortcodes::mla_get_shortcode_attachments( 0, $query );
1577
 
 
 
 
 
 
 
1578
  foreach( $posts as $key => $post ) {
1579
  $updates = MLAOptions::mla_evaluate_iptc_exif_mapping( $post, 'iptc_exif_custom_mapping', $settings );
1580
 
@@ -1630,7 +2832,7 @@ class MLASettings {
1630
  * Start with any page-level options
1631
  */
1632
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1633
- if ( 'iptc-exif' == $value['tab'] )
1634
  $option_messages .= self::_update_option_row( $key, $value );
1635
  }
1636
 
13
  * @since 0.1
14
  */
15
  class MLASettings {
16
+ /**
17
+ * Slug for localizing and enqueueing JavaScript - MLA View List Table
18
+ *
19
+ * @since 1.40
20
+ *
21
+ * @var string
22
+ */
23
+ const JAVASCRIPT_INLINE_EDIT_VIEW_SLUG = 'mla-inline-edit-view-scripts';
24
+
25
+ /**
26
+ * Object name for localizing JavaScript - MLA View List Table
27
+ *
28
+ * @since 1.40
29
+ *
30
+ * @var string
31
+ */
32
+ const JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT = 'mla_inline_edit_view_vars';
33
+
34
+ /**
35
+ * Slug for localizing and enqueueing JavaScript - MLA View List Table
36
+ *
37
+ * @since 1.40
38
+ *
39
+ * @var string
40
+ */
41
+ const JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG = 'mla-inline-edit-upload-scripts';
42
+
43
+ /**
44
+ * Object name for localizing JavaScript - MLA View List Table
45
+ *
46
+ * @since 1.40
47
+ *
48
+ * @var string
49
+ */
50
+ const JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT = 'mla_inline_edit_upload_vars';
51
+
52
  /**
53
  * Provides a unique name for the settings page
54
  */
55
  const MLA_SETTINGS_SLUG = 'mla-settings-menu';
56
 
57
+ /**
58
+ * Holds screen id to match help text to corresponding screen
59
+ *
60
+ * @since 1.40
61
+ *
62
+ * @var array
63
+ */
64
+ private static $current_page_hook = '';
65
+
66
  /**
67
  * Initialization function, similar to __construct()
68
  *
71
  * @return void
72
  */
73
  public static function initialize( ) {
74
+ // add_action( 'admin_page_access_denied', 'MLASettings::mla_admin_page_access_denied_action' );
75
+ add_action( 'admin_init', 'MLASettings::mla_admin_init_action' );
76
  add_action( 'admin_menu', 'MLASettings::mla_admin_menu_action' );
77
+ add_action( 'admin_enqueue_scripts', 'MLASettings::mla_admin_enqueue_scripts_action' );
78
+ add_filter( 'set-screen-option', 'MLASettings::mla_set_screen_option_filter', 10, 3 ); // $status, $option, $value
79
+ add_filter( 'screen_options_show_screen', 'MLASettings::mla_screen_options_show_screen_filter', 10, 2 ); // $show_screen, $this
80
  self::_version_upgrade();
81
  }
82
 
147
  MLAOptions::mla_update_option( 'custom_field_mapping', $new_values );
148
  } // version is less than 1.30
149
 
150
+ if ( ((float)'1.40') > ((float)$current_version) ) {
151
+ /*
152
+ * Add metadata values to custom field mapping rules
153
+ */
154
+ $new_values = array();
155
+
156
+ foreach( MLAOptions::mla_get_option( 'custom_field_mapping' ) as $key => $value ) {
157
+ $value['no_null'] = ( isset( $value['no_null'] ) && $value['no_null'] ) ? true : false;
158
+
159
+ if ( isset( $value['meta_single'] ) && $value['meta_single'] )
160
+ $value['option'] = 'single';
161
+ elseif ( isset( $value['meta_export'] ) && $value['meta_export'] )
162
+ $value['option'] = 'export';
163
+ else
164
+ $value['option'] = 'text';
165
+
166
+ unset( $value['meta_single'] );
167
+ unset( $value['meta_export'] );
168
+
169
+ $new_values[ $key ] = $value;
170
+ }
171
+
172
+ MLAOptions::mla_update_option( 'custom_field_mapping', $new_values );
173
+ } // version is less than 1.30
174
+
175
  MLAOptions::mla_update_option( MLAOptions::MLA_VERSION_OPTION, MLA::CURRENT_MLA_VERSION );
176
  }
177
 
208
  }
209
  }
210
 
211
+ /**
212
+ * Debug logging for "You do not have sufficient permissions to access this page."
213
+ *
214
+ * @since 1.40
215
+ *
216
+ * @return void
217
+ * /
218
+ public static function mla_admin_page_access_denied_action() {
219
+ global $pagenow;
220
+ global $menu;
221
+ global $submenu;
222
+ global $_wp_menu_nopriv;
223
+ global $_wp_submenu_nopriv;
224
+ global $plugin_page;
225
+ global $_registered_pages;
226
+
227
+ error_log( 'mla_admin_page_access_denied_action $_SERVER[REQUEST_URI] = ' . var_export( $_SERVER['REQUEST_URI'], true), 0 );
228
+ error_log( 'mla_admin_page_access_denied_action $_REQUEST = ' . var_export( $_REQUEST, true), 0 );
229
+ error_log( 'mla_admin_page_access_denied_action $pagenow = ' . var_export( $pagenow, true), 0 );
230
+ error_log( 'mla_admin_page_access_denied_action $parent = ' . var_export( get_admin_page_parent(), true), 0 );
231
+ error_log( 'mla_admin_page_access_denied_action $menu = ' . var_export( $menu, true), 0 );
232
+ error_log( 'mla_admin_page_access_denied_action $submenu = ' . var_export( $submenu, true), 0 );
233
+ error_log( 'mla_admin_page_access_denied_action $_wp_menu_nopriv = ' . var_export( $_wp_menu_nopriv, true), 0 );
234
+ error_log( 'mla_admin_page_access_denied_action $_wp_submenu_nopriv = ' . var_export( $_wp_submenu_nopriv, true), 0 );
235
+ error_log( 'mla_admin_page_access_denied_action $plugin_page = ' . var_export( $plugin_page, true), 0 );
236
+ error_log( 'mla_admin_page_access_denied_action $_registered_pages = ' . var_export( $_registered_pages, true), 0 );
237
+ }
238
+ */
239
+
240
+ /**
241
+ * Load the plugin's Ajax handler
242
+ *
243
+ * @since 1.40
244
+ *
245
+ * @return void
246
+ */
247
+ public static function mla_admin_init_action() {
248
+ add_action( 'wp_ajax_' . self::JAVASCRIPT_INLINE_EDIT_VIEW_SLUG, 'MLASettings::mla_inline_edit_view_action' );
249
+ add_action( 'wp_ajax_' . self::JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG, 'MLASettings::mla_inline_edit_upload_action' );
250
+ }
251
+
252
+ /**
253
+ * Load the plugin's Style Sheet and Javascript files
254
+ *
255
+ * @since 1.40
256
+ *
257
+ * @param string Name of the page being loaded
258
+ *
259
+ * @return void
260
+ */
261
+ public static function mla_admin_enqueue_scripts_action( $page_hook ) {
262
+ $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
263
+
264
+ if ( self::$current_page_hook != $page_hook )
265
+ return;
266
+
267
+ wp_register_style( MLA::STYLESHEET_SLUG, MLA_PLUGIN_URL . 'css/mla-style.css', false, MLA::CURRENT_MLA_VERSION );
268
+ wp_enqueue_style( MLA::STYLESHEET_SLUG );
269
+
270
+ if ( isset( $_REQUEST['mla_tab'] ) && ( $_REQUEST['mla_tab'] == 'view' ) ) {
271
+ wp_enqueue_script( self::JAVASCRIPT_INLINE_EDIT_VIEW_SLUG, MLA_PLUGIN_URL . "js/mla-inline-edit-view-scripts{$suffix}.js",
272
+ array( 'wp-lists', 'suggest', 'jquery' ), MLA::CURRENT_MLA_VERSION, false );
273
+
274
+ $script_variables = array(
275
+ 'fields' => array( 'original_slug', 'slug', 'singular', 'plural', 'specification', 'menu_order' ),
276
+ 'checkboxes' => array( 'post_mime_type', 'table_view' ),
277
+ 'error' => 'Error while saving the changes.',
278
+ 'ntdeltitle' => 'Remove From Bulk Edit',
279
+ 'notitle' => '(no slug)',
280
+ 'comma' => _x( ',', 'tag delimiter' ),
281
+ 'ajax_action' => self::JAVASCRIPT_INLINE_EDIT_VIEW_SLUG,
282
+ 'ajax_nonce' => wp_create_nonce( MLA::MLA_ADMIN_NONCE )
283
+ );
284
+ wp_localize_script( self::JAVASCRIPT_INLINE_EDIT_VIEW_SLUG, self::JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT, $script_variables );
285
+ return;
286
+ }
287
+
288
+ if ( isset( $_REQUEST['mla_tab'] ) && ( $_REQUEST['mla_tab'] == 'upload' ) ) {
289
+ wp_enqueue_script( self::JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG, MLA_PLUGIN_URL . "js/mla-inline-edit-upload-scripts{$suffix}.js",
290
+ array( 'wp-lists', 'suggest', 'jquery' ), MLA::CURRENT_MLA_VERSION, false );
291
+
292
+ $script_variables = array(
293
+ 'fields' => array( 'original_slug', 'slug', 'mime_type', 'icon_type', 'core_type', 'mla_type', 'source', 'standard_source' ),
294
+ 'checkboxes' => array( 'disabled' ),
295
+ 'error' => 'Error while saving the changes.',
296
+ 'ntdeltitle' => 'Remove From Bulk Edit',
297
+ 'notitle' => '(no slug)',
298
+ 'comma' => _x( ',', 'tag delimiter' ),
299
+ 'ajax_action' => self::JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG,
300
+ 'ajax_nonce' => wp_create_nonce( MLA::MLA_ADMIN_NONCE )
301
+ );
302
+ wp_localize_script( self::JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG, self::JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT, $script_variables );
303
+ return;
304
+ }
305
+ }
306
+
307
  /**
308
  * Add settings page in the "Settings" section,
309
+ * add screen options and help tabs,
310
  * add settings link in the Plugins section entry for MLA.
311
  *
312
  * @since 0.1
314
  * @return void
315
  */
316
  public static function mla_admin_menu_action( ) {
317
+ /*
318
+ * We need a tab-specific page ID to manage the screen options on the Views and Uploads tabs.
319
+ * Use the URL suffix, if present. If the URL doesn't have a tab suffix, use '-general'.
320
+ * This hack is required to pass the WordPress "referer" validation.
321
+ */
322
+ $tab = isset( $_REQUEST['page'] ) ? substr( $_REQUEST['page'], 1 + strrpos( $_REQUEST['page'], '-' ) ) : 'general';
323
+ $tab = isset ( self::$mla_tablist[ $tab ] ) ? '-' . $tab : '-general';
324
+ self::$current_page_hook = add_submenu_page( 'options-general.php', 'Media Library Assistant Settings', 'Media Library Assistant', 'manage_options', self::MLA_SETTINGS_SLUG . $tab, 'MLASettings::mla_render_settings_page' );
325
+ add_action( 'load-' . self::$current_page_hook, 'MLASettings::mla_add_menu_options_action' );
326
+ add_action( 'load-' . self::$current_page_hook, 'MLASettings::mla_add_help_tab_action' );
327
+ add_filter( 'plugin_action_links', 'MLASettings::mla_add_plugin_settings_link_filter', 10, 2 );
328
+ }
329
+
330
+ /**
331
+ * Add the "XX Entries per page" filter to the Screen Options tab
332
+ *
333
+ * @since 1.40
334
+ *
335
+ * @return void
336
+ */
337
+ public static function mla_add_menu_options_action( ) {
338
+ if ( isset( $_REQUEST['mla_tab'] ) ) {
339
+ if ( 'view' == $_REQUEST['mla_tab'] ) {
340
+ $option = 'per_page';
341
+
342
+ $args = array(
343
+ 'label' => 'Views per page',
344
+ 'default' => 10,
345
+ 'option' => 'mla_views_per_page'
346
+ );
347
+
348
+ add_screen_option( $option, $args );
349
+ } // view
350
+ elseif ( isset( $_REQUEST['mla-optional-uploads-display'] ) || isset( $_REQUEST['mla-optional-uploads-search'] ) ) {
351
+ $option = 'per_page';
352
+
353
+ $args = array(
354
+ 'label' => 'Types per page',
355
+ 'default' => 10,
356
+ 'option' => 'mla_types_per_page'
357
+ );
358
+
359
+ add_screen_option( $option, $args );
360
+ } // optional upload
361
+ elseif ( 'upload' == $_REQUEST['mla_tab'] ) {
362
+ $option = 'per_page';
363
+
364
+ $args = array(
365
+ 'label' => 'Upload types per page',
366
+ 'default' => 10,
367
+ 'option' => 'mla_uploads_per_page'
368
+ );
369
+
370
+ add_screen_option( $option, $args );
371
+ } // upload
372
+ } // isset mla_tab
373
+ }
374
+
375
+ /**
376
+ * Add contextual help tabs to all the MLA pages
377
+ *
378
+ * @since 1.40
379
+ *
380
+ * @return void
381
+ */
382
+ public static function mla_add_help_tab_action( )
383
+ {
384
+ $screen = get_current_screen();
385
+
386
+ /*
387
+ * Is this our page and the Views or Uploads tab?
388
+ */
389
+ if ( ! in_array( $screen->id, array( 'settings_page_' . self::MLA_SETTINGS_SLUG . '-view', 'settings_page_' . self::MLA_SETTINGS_SLUG . '-upload' ) ) )
390
+ return;
391
+
392
+ $file_suffix = self::$current_page_hook;
393
+
394
+ /*
395
+ * Override the screen suffix if we are going to display something other than the attachment table
396
+ */
397
+ if ( isset( $_REQUEST['mla-optional-uploads-display'] ) || isset( $_REQUEST['mla-optional-uploads-search'] ) ) {
398
+ $file_suffix .= '-optional';
399
+ }
400
+ elseif ( isset( $_REQUEST['mla_admin_action'] ) ) {
401
+ switch ( $_REQUEST['mla_admin_action'] ) {
402
+ case MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY:
403
+ $file_suffix .= '-edit';
404
+ break;
405
+ } // switch
406
+ } // isset( $_REQUEST['mla_admin_action'] )
407
+
408
+ $template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/help-for-' . $file_suffix . '.tpl' );
409
+ if ( empty( $template_array ) ) {
410
+ return;
411
+ }
412
+
413
+ if ( !empty( $template_array['sidebar'] ) ) {
414
+ $screen->set_help_sidebar( $template_array['sidebar'] );
415
+ unset( $template_array['sidebar'] );
416
+ }
417
+
418
+ /*
419
+ * Provide explicit control over tab order
420
+ */
421
+ $tab_array = array();
422
+
423
+ foreach ( $template_array as $id => $content ) {
424
+ $match_count = preg_match( '#\<!-- title="(.+)" order="(.+)" --\>#', $content, $matches, PREG_OFFSET_CAPTURE );
425
+
426
+ if ( $match_count > 0 ) {
427
+ $tab_array[ $matches[ 2 ][ 0 ] ] = array(
428
+ 'id' => $id,
429
+ 'title' => $matches[ 1 ][ 0 ],
430
+ 'content' => $content
431
+ );
432
+ } else {
433
+ error_log( 'ERROR: mla_add_help_tab_action discarding '.var_export( $id, true ), 0 );
434
+ }
435
+ }
436
+
437
+ ksort( $tab_array, SORT_NUMERIC );
438
+ foreach ( $tab_array as $indx => $value ) {
439
+ $screen->add_help_tab( $value );
440
+ }
441
+ }
442
+
443
+ /**
444
+ * Only show screen options on the View and Upload tabs
445
+ *
446
+ * @since 1.40
447
+ *
448
+ * @param boolean True to display "Screen Options", false to suppress them
449
+ * @param string Name of the page being loaded
450
+ *
451
+ * @return boolean True to display "Screen Options", false to suppress them
452
+ */
453
+ public static function mla_screen_options_show_screen_filter( $show_screen, $this_screen ) {
454
+ if ( self::$current_page_hook == $this_screen->base ) {
455
+ if ( isset( $_REQUEST['mla_tab'] ) && in_array( $_REQUEST['mla_tab'], array( 'view', 'upload' ) ) )
456
+ return true;
457
+ }
458
 
459
+ return $show_screen;
460
+ }
461
+
462
+ /**
463
+ * Save the "Views/Uploads per page" option set by this user
464
+ *
465
+ * @since 1.40
466
+ *
467
+ * @param mixed false or value returned by previous filter
468
+ * @param string Name of the option being changed
469
+ * @param string New value of the option
470
+ *
471
+ * @return string|void New value if this is our option, otherwise nothing
472
+ */
473
+ public static function mla_set_screen_option_filter( $status, $option, $value ) {
474
+ if ( 'mla_views_per_page' == $option || 'mla_uploads_per_page' == $option || 'mla_types_per_page' == $option )
475
+ return $value;
476
+ elseif ( $status )
477
+ return $status;
478
+ }
479
+
480
+ /**
481
+ * Ajax handler for Post MIME Types inline editing (quick and bulk edit)
482
+ *
483
+ * Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php
484
+ *
485
+ * @since 1.40
486
+ *
487
+ * @return void echo HTML <tr> markup for updated row or error message, then die()
488
+ */
489
+ public static function mla_inline_edit_view_action() {
490
+ set_current_screen( $_REQUEST['screen'] );
491
+
492
+ check_ajax_referer( MLA::MLA_ADMIN_NONCE, 'nonce' );
493
 
494
+ if ( empty( $_REQUEST['original_slug'] ) ) {
495
+ echo 'Error: no view slug found';
496
+ die();
497
+ }
498
+
499
+ $request = array( 'original_slug' => $_REQUEST['original_slug'] );
500
+ $request['slug'] = $_REQUEST['slug'];
501
+ $request['specification'] = $_REQUEST['specification'];
502
+ $request['singular'] = $_REQUEST['singular'];
503
+ $request['plural'] = $_REQUEST['plural'];
504
+ $request['post_mime_type'] = isset( $_REQUEST['post_mime_type'] ) && ( '1' == $_REQUEST['post_mime_type'] );
505
+ $request['table_view'] = isset( $_REQUEST['table_view'] ) && ( '1' == $_REQUEST['table_view'] );
506
+ $request['menu_order'] = $_REQUEST['menu_order'];
507
+ $results = MLAMime::mla_update_post_mime_type( $request );
508
+
509
+ if ( false === strpos( $results['message'], 'ERROR:' ) )
510
+ $new_item = (object) MLAMime::mla_get_post_mime_type( $_REQUEST['slug'] );
511
+ else
512
+ $new_item = (object) MLAMime::mla_get_post_mime_type( $_REQUEST['original_slug'] );
513
+
514
+ $new_item->post_ID = $_REQUEST['post_ID'];
515
+
516
+ // Create an instance of our package class and echo the new HTML
517
+ $MLAListViewTable = new MLA_View_List_Table();
518
+ $MLAListViewTable->single_row( $new_item );
519
+ die(); // this is required to return a proper result
520
+ }
521
+
522
+ /**
523
+ * Ajax handler for Upload MIME Types inline editing (quick and bulk edit)
524
+ *
525
+ * Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php
526
+ *
527
+ * @since 1.40
528
+ *
529
+ * @return void echo HTML <tr> markup for updated row or error message, then die()
530
+ */
531
+ public static function mla_inline_edit_upload_action() {
532
+ set_current_screen( $_REQUEST['screen'] );
533
+
534
+ check_ajax_referer( MLA::MLA_ADMIN_NONCE, 'nonce' );
535
 
536
+ if ( empty( $_REQUEST['original_slug'] ) ) {
537
+ echo 'Error: no upload slug found';
538
+ die();
539
+ }
540
+
541
+ $request = array( 'original_slug' => $_REQUEST['original_slug'] );
542
+ $request['slug'] = $_REQUEST['slug'];
543
+ $request['mime_type'] = $_REQUEST['mime_type'];
544
+ $request['icon_type'] = $_REQUEST['icon_type'];
545
+ $request['disabled'] = isset( $_REQUEST['disabled'] ) && ( '1' == $_REQUEST['disabled'] );
546
+ $results = MLAMime::mla_update_upload_mime( $request );
547
+
548
+ if ( false === strpos( $results['message'], 'ERROR:' ) )
549
+ $new_item = (object) MLAMime::mla_get_upload_mime( $_REQUEST['slug'] );
550
+ else
551
+ $new_item = (object) MLAMime::mla_get_upload_mime( $_REQUEST['original_slug'] );
552
+ $new_item->post_ID = $_REQUEST['post_ID'];
553
+
554
+ // Create an instance of our package class and echo the new HTML
555
+ $MLAListUploadTable = new MLA_Upload_List_Table();
556
+ $MLAListUploadTable->single_row( $new_item );
557
+ die(); // this is required to return a proper result
558
  }
559
 
560
  /**
567
  *
568
  * @return array Updated array of links for the Plugin
569
  */
570
+ public static function mla_add_plugin_settings_link_filter( $links, $file ) {
571
  if ( $file == 'media-library-assistant/index.php' ) {
572
+ $settings_link = sprintf( '<a href="%s">%s</a>', admin_url( 'options-general.php?page=' . self::MLA_SETTINGS_SLUG . '-general' ), 'Settings' );
573
  array_unshift( $links, $settings_link );
574
  }
575
 
737
  $option_values = array(
738
  'key' => MLA_OPTION_PREFIX . $key,
739
  'value' => $value['name'],
 
740
  'help' => $value['help'],
741
  'size' => '40',
742
  'text' => ''
810
  */
811
  private static $mla_tablist = array(
812
  'general' => array( 'title' => 'General', 'render' => '_compose_general_tab' ),
813
+ 'view' => array( 'title' => 'Views', 'render' => '_compose_view_tab' ),
814
+ 'upload' => array( 'title' => 'Uploads', 'render' => '_compose_upload_tab' ),
815
+ 'mla_gallery' => array( 'title' => 'MLA Gallery', 'render' => '_compose_mla_gallery_tab' ),
816
+ 'custom_field' => array( 'title' => 'Custom Fields', 'render' => '_compose_custom_field_tab' ),
817
+ 'iptc_exif' => array( 'title' => 'IPTC/EXIF', 'render' => '_compose_iptc_exif_tab' ),
818
  'documentation' => array( 'title' => 'Documentation', 'render' => '_compose_documentation_tab' )
819
  );
820
 
835
  $item_values = array(
836
  'data-tab-id' => $key,
837
  'nav-tab-active' => ( $active_tab == $key ) ? 'nav-tab-active' : '',
838
+ 'settings-page' => self::MLA_SETTINGS_SLUG . '-' . $key,
839
  'title' => $item['title']
840
  );
841
 
880
  'shortcode_list' => '',
881
  'options_list' => '',
882
  'donateURL' => MLA_PLUGIN_URL . 'images/DonateButton.jpg',
883
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-general&mla_tab=general',
884
  '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
885
  '_wp_http_referer' => wp_referer_field( false )
886
  );
898
  $shortcodes = array(
899
  // array("name" => "shortcode", "description" => "This shortcode...")
900
  array( 'name' => 'mla_attachment_list', 'description' => 'renders a complete list of all attachments and references to them.' ),
901
+ array( 'name' => 'mla_gallery', 'description' => 'enhanced version of the WordPress [gallery] shortcode. For complete documentation <a href="?page=' . self::MLA_SETTINGS_SLUG . '-documentation&amp;mla_tab=documentation">click here</a>.' )
902
  );
903
 
904
  $shortcode_list = '';
932
  return $page_content;
933
  }
934
 
935
+ /**
936
+ * Get the current action selected from the bulk actions dropdown
937
+ *
938
+ * @since 1.40
939
+ *
940
+ * @return string|false The action name or False if no action was selected
941
+ */
942
+ private static function _current_bulk_action( ) {
943
+ $action = false;
944
+
945
+ if ( isset( $_REQUEST['action'] ) ) {
946
+ if ( -1 != $_REQUEST['action'] )
947
+ return $_REQUEST['action'];
948
+ else
949
+ $action = 'none';
950
+ } // isset action
951
+
952
+ if ( isset( $_REQUEST['action2'] ) ) {
953
+ if ( -1 != $_REQUEST['action2'] )
954
+ return $_REQUEST['action2'];
955
+ else
956
+ $action = 'none';
957
+ } // isset action2
958
+
959
+ return $action;
960
+ }
961
+
962
+ /**
963
+ * Compose the Edit View tab content for the Settings subpage
964
+ *
965
+ * @since 1.40
966
+ *
967
+ * @param array data values for the item
968
+ * @param string Display template
969
+ *
970
+ * @return array 'message' => status/error messages, 'body' => tab content
971
+ */
972
+ private static function _compose_edit_view_tab( $view, $template ) {
973
+ $page_values = array(
974
+ 'action' => MLA::MLA_ADMIN_SINGLE_EDIT_UPDATE,
975
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-view&mla_tab=view',
976
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
977
+ 'original_slug' => $view['slug']
978
+ );
979
+
980
+ foreach ( $view as $key => $value ) {
981
+ switch ( $key ) {
982
+ case 'post_mime_type':
983
+ case 'table_view':
984
+ $page_values[ $key ] = $value ? 'checked="checked"' : '';
985
+ break;
986
+ default:
987
+ $page_values[ $key ] = $value;
988
+ }
989
+ }
990
+
991
+ return array(
992
+ 'message' => '',
993
+ 'body' => MLAData::mla_parse_template( $template, $page_values )
994
+ );
995
+ }
996
+
997
+ /**
998
+ * Compose the Post MIME Type Views tab content for the Settings subpage
999
+ *
1000
+ * @since 1.40
1001
+ *
1002
+ * @return array 'message' => status/error messages, 'body' => tab content
1003
+ */
1004
+ private static function _compose_view_tab( ) {
1005
+ $page_template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/admin-display-settings-view-tab.tpl' );
1006
+ if ( ! array( $page_template_array ) ) {
1007
+ error_log( "ERROR: MLASettings::_compose_view_tab \$page_template_array = " . var_export( $page_template_array, true ), 0 );
1008
+ return '';
1009
+ }
1010
+
1011
+ /*
1012
+ * Convert checkbox values, if present
1013
+ */
1014
+ if ( isset( $_REQUEST['mla_view_item'] ) ) {
1015
+ $_REQUEST['mla_view_item']['post_mime_type'] = isset( $_REQUEST['mla_view_item']['post_mime_type'] );
1016
+ $_REQUEST['mla_view_item']['table_view'] = isset( $_REQUEST['mla_view_item']['table_view'] );
1017
+ }
1018
+
1019
+ /*
1020
+ * Set default values, check for Add New Post MIME Type View button
1021
+ */
1022
+ $add_form_values = array (
1023
+ 'slug' => '',
1024
+ 'singular' => '',
1025
+ 'plural' => '',
1026
+ 'specification' => '',
1027
+ 'post_mime_type' => 'checked="checked"',
1028
+ 'table_view' => 'checked="checked"',
1029
+ 'menu_order' => '',
1030
+ 'description' => ''
1031
+ );
1032
+
1033
+ if ( !empty( $_REQUEST['mla-view-options-save'] ) ) {
1034
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
1035
+ $page_content = self::_save_view_settings( );
1036
+ }
1037
+ elseif ( !empty( $_REQUEST['mla-add-view-submit'] ) ) {
1038
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
1039
+ $page_content = MLAMime::mla_add_post_mime_type( $_REQUEST['mla_view_item'] );
1040
+ if ( false !== strpos( $page_content['message'], 'ERROR:' ) ) {
1041
+ $add_form_values = $_REQUEST['mla_view_item'];
1042
+ $add_form_values['post_mime_type'] = $add_form_values['post_mime_type'] ? 'checked="checked"' : '';
1043
+ $add_form_values['table_view'] = $add_form_values['table_view'] ? 'checked="checked"' : '';
1044
+ }
1045
+ } else {
1046
+ $page_content = array(
1047
+ 'message' => '',
1048
+ 'body' => ''
1049
+ );
1050
+ }
1051
+
1052
+ /*
1053
+ * Process bulk actions that affect an array of items
1054
+ */
1055
+ $bulk_action = self::_current_bulk_action();
1056
+ if ( $bulk_action && ( $bulk_action != 'none' ) ) {
1057
+ if ( isset( $_REQUEST['cb_mla_item_ID'] ) ) {
1058
+ /*
1059
+ * Convert post-ID to slug; separate loop required because delete changes post_IDs
1060
+ */
1061
+ $slugs = array();
1062
+ foreach ( $_REQUEST['cb_mla_item_ID'] as $post_ID )
1063
+ $slugs[] = MLAMime::mla_get_post_mime_type_slug( $post_ID );
1064
+
1065
+ foreach ( $slugs as $slug ) {
1066
+ switch ( $bulk_action ) {
1067
+ case 'delete':
1068
+ $item_content = MLAMime::mla_delete_post_mime_type( $slug );
1069
+ break;
1070
+ case 'edit':
1071
+ $request = array( 'slug' => $slug );
1072
+ if ( '-1' != $_REQUEST['post_mime_type'] )
1073
+ $request['post_mime_type'] = '1' == $_REQUEST['post_mime_type'];
1074
+ if ( '-1' != $_REQUEST['table_view'] )
1075
+ $request['table_view'] = '1' == $_REQUEST['table_view'];
1076
+ if ( !empty( $_REQUEST['menu_order'] ) )
1077
+ $request['menu_order'] = $_REQUEST['menu_order'];
1078
+ $item_content = MLAMime::mla_update_post_mime_type( $request );
1079
+ break;
1080
+ default:
1081
+ $item_content = array(
1082
+ 'message' => sprintf( 'Unknown bulk action %s', $bulk_action ),
1083
+ 'body' => ''
1084
+ );
1085
+ } // switch $bulk_action
1086
+
1087
+ $page_content['message'] .= $item_content['message'] . '<br>';
1088
+ } // foreach cb_attachment
1089
+ } // isset cb_attachment
1090
+ else {
1091
+ $page_content['message'] = 'Bulk Action ' . $bulk_action . ' - no items selected.';
1092
+ }
1093
+ } // $bulk_action
1094
+
1095
+ /*
1096
+ * Process row-level actions that affect a single item
1097
+ */
1098
+ if ( !empty( $_REQUEST['mla_admin_action'] ) ) {
1099
+ check_admin_referer( MLA::MLA_ADMIN_NONCE );
1100
+
1101
+ switch ( $_REQUEST['mla_admin_action'] ) {
1102
+ case MLA::MLA_ADMIN_SINGLE_DELETE:
1103
+ $page_content = MLAMime::mla_delete_post_mime_type( $_REQUEST['mla_item_slug'] );
1104
+ break;
1105
+ case MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY:
1106
+ $view = MLAMime::mla_get_post_mime_type( $_REQUEST['mla_item_slug'] );
1107
+ $page_content = self::_compose_edit_view_tab( $view, $page_template_array['single-item-edit'] );
1108
+ break;
1109
+ case MLA::MLA_ADMIN_SINGLE_EDIT_UPDATE:
1110
+ if ( !empty( $_REQUEST['update'] ) ) {
1111
+ $page_content = MLAMime::mla_update_post_mime_type( $_REQUEST['mla_view_item'] );
1112
+ if ( false !== strpos( $page_content['message'], 'ERROR:' ) ) {
1113
+ $message = $page_content['message'];
1114
+ $page_content = self::_compose_edit_view_tab( $_REQUEST['mla_view_item'], $page_template_array['single-item-edit'] );
1115
+ $page_content['message'] = $message;
1116
+ }
1117
+ } else {
1118
+ $page_content = array(
1119
+ 'message' => 'Edit view "' . $_REQUEST['mla_view_item']['original_slug'] . '" cancelled.',
1120
+ 'body' => ''
1121
+ );
1122
+ }
1123
+ break;
1124
+ default:
1125
+ $page_content = array(
1126
+ 'message' => sprintf( 'Unknown mla_admin_action - "%1$s"', $_REQUEST['mla_admin_action'] ),
1127
+ 'body' => ''
1128
+ );
1129
+ break;
1130
+ } // switch ($_REQUEST['mla_admin_action'])
1131
+ } // (!empty($_REQUEST['mla_admin_action'])
1132
+
1133
+ if ( !empty( $page_content['body'] ) ) {
1134
+ return $page_content;
1135
+ }
1136
+
1137
+ /*
1138
+ * Check for disabled status
1139
+ */
1140
+ if ( 'checked' != MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_POST_MIME_TYPES ) ) {
1141
+ /*
1142
+ * Fill in with any page-level options
1143
+ */
1144
+ $options_list = '';
1145
+ foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1146
+ if ( 'view' == $value['tab'] )
1147
+ $options_list .= self::_compose_option_row( $key, $value );
1148
+ }
1149
+
1150
+ $page_values = array(
1151
+ 'options_list' => $options_list,
1152
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
1153
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-view&mla_tab=view',
1154
+ );
1155
+
1156
+ $page_content['body'] .= MLAData::mla_parse_template( $page_template_array['view-disabled'], $page_values );
1157
+ return $page_content;
1158
+ }
1159
+
1160
+ /*
1161
+ * Display the View Table
1162
+ */
1163
+ $_SERVER['REQUEST_URI'] = remove_query_arg( array(
1164
+ 'mla_admin_action',
1165
+ 'mla_item_slug',
1166
+ 'mla_item_ID',
1167
+ '_wpnonce',
1168
+ '_wp_http_referer',
1169
+ 'action',
1170
+ 'action2',
1171
+ 'cb_mla_item_ID',
1172
+ 'mla-optional-uploads-search',
1173
+ 'mla-optional-uploads-display'
1174
+ ), $_SERVER['REQUEST_URI'] );
1175
+
1176
+ // Create an instance of our package class
1177
+ $MLAListViewTable = new MLA_View_List_Table();
1178
+
1179
+ // Fetch, prepare, sort, and filter our data
1180
+ $MLAListViewTable->prepare_items();
1181
+ $MLAListViewTable->views();
1182
+
1183
+ /*
1184
+ * Start with any page-level options
1185
+ */
1186
+ $options_list = '';
1187
+ foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1188
+ if ( 'view' == $value['tab'] )
1189
+ $options_list .= self::_compose_option_row( $key, $value );
1190
+ }
1191
+
1192
+ $page_values = array(
1193
+ 'options_list' => $options_list,
1194
+ 'colspan' => count( $MLAListViewTable->get_columns() ),
1195
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
1196
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-view&mla_tab=view',
1197
+ 'results' => ! empty( $_REQUEST['s'] ) ? '<h3 style="float:left">Displaying search results for: "' . $_REQUEST['s'] . '"</h3>' : '',
1198
+ 's' => isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : ''
1199
+ );
1200
+
1201
+ foreach ( $add_form_values as $key => $value ) {
1202
+ $page_values[ $key ] = $value;
1203
+ }
1204
+ $page_content['body'] = MLAData::mla_parse_template( $page_template_array['before-table'], $page_values );
1205
+
1206
+ // Now we can render the completed list table
1207
+ ob_start();
1208
+ $MLAListViewTable->display();
1209
+ $page_content['body'] .= ob_get_contents();
1210
+ ob_end_clean();
1211
+
1212
+ $page_content['body'] .= MLAData::mla_parse_template( $page_template_array['after-table'], $page_values );
1213
+
1214
+ return $page_content;
1215
+ }
1216
+
1217
+ /**
1218
+ * Get an HTML select element representing a list of icon types
1219
+ *
1220
+ * @since 1.40
1221
+ *
1222
+ * @param array Display template array
1223
+ * @param string HTML name attribute value
1224
+ * @param string currently selected Icon Type
1225
+ *
1226
+ * @return string HTML select element or empty string on failure.
1227
+ */
1228
+ public static function mla_get_icon_type_dropdown( $templates, $name, $selection = '.none.' ) {
1229
+ $option_template = $templates['icon-type-select-option'];
1230
+ if ( '.nochange.' == $selection )
1231
+ $option_values = array (
1232
+ 'selected' => 'selected="selected"',
1233
+ 'value' => '.none.',
1234
+ 'text' => '&mdash; No Change &mdash;'
1235
+ );
1236
+ else
1237
+ $option_values = array (
1238
+ 'selected' => ( '.none.' == $selection ) ? 'selected="selected"' : '',
1239
+ 'value' => '.none.',
1240
+ 'text' => ' &mdash; None (select a value) &mdash; '
1241
+ );
1242
+
1243
+ $options = MLAData::mla_parse_template( $option_template, $option_values );
1244
+
1245
+ $icon_types = MLAMime::mla_get_current_icon_types();
1246
+ foreach ( $icon_types as $icon_type ) {
1247
+ $option_values = array (
1248
+ 'selected' => ( $icon_type == $selection ) ? 'selected="selected"' : '',
1249
+ 'value' => $icon_type,
1250
+ 'text' => $icon_type
1251
+ );
1252
+
1253
+ $options .= MLAData::mla_parse_template( $option_template, $option_values );
1254
+ } // foreach icon_type
1255
+
1256
+ return MLAData::mla_parse_template( $templates['icon-type-select'], array( 'name' => $name, 'options' => $options ) );
1257
+ }
1258
+
1259
+ /**
1260
+ * Compose the Edit Upload type tab content for the Settings subpage
1261
+ *
1262
+ * @since 1.40
1263
+ *
1264
+ * @param array data values for the item
1265
+ * @param string Display template array
1266
+ *
1267
+ * @return array 'message' => status/error messages, 'body' => tab content
1268
+ */
1269
+ private static function _compose_edit_upload_tab( $item, &$templates ) {
1270
+ $page_values = array(
1271
+ 'action' => MLA::MLA_ADMIN_SINGLE_EDIT_UPDATE,
1272
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-upload&mla_tab=upload',
1273
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
1274
+ 'original_slug' => $item['slug'],
1275
+ 'icon_types' => self::mla_get_icon_type_dropdown( $templates, 'mla_upload_item[icon_type]', $item['icon_type'] )
1276
+ );
1277
+
1278
+ foreach ( $item as $key => $value ) {
1279
+ switch ( $key ) {
1280
+ case 'disabled':
1281
+ $page_values[ $key ] = $value ? 'checked="checked"' : '';
1282
+ break;
1283
+ default:
1284
+ $page_values[ $key ] = $value;
1285
+ }
1286
+ }
1287
+
1288
+ return array(
1289
+ 'message' => '',
1290
+ 'body' => MLAData::mla_parse_template( $templates['single-item-edit'], $page_values )
1291
+ );
1292
+ }
1293
+
1294
+ /**
1295
+ * Compose the Optional File Upload MIME Types tab content for the Settings subpage
1296
+ *
1297
+ * @since 1.40
1298
+ *
1299
+ * @param string Display templates
1300
+ *
1301
+ * @return array 'message' => status/error messages, 'body' => tab content
1302
+ */
1303
+ private static function _compose_optional_upload_tab( $page_template_array ) {
1304
+ /*
1305
+ * Display the Optional Upload MIME Types Table
1306
+ */
1307
+ $_SERVER['REQUEST_URI'] = add_query_arg( array( 'mla-optional-uploads-display' => 'true' ), remove_query_arg( array(
1308
+ 'mla_admin_action',
1309
+ 'mla_item_slug',
1310
+ 'mla_item_ID',
1311
+ '_wpnonce',
1312
+ '_wp_http_referer',
1313
+ 'action',
1314
+ 'action2',
1315
+ 'cb_attachment',
1316
+ 'mla-optional-uploads-search'
1317
+ ), $_SERVER['REQUEST_URI'] ) );
1318
+
1319
+ /*
1320
+ * Suppress display of the hidden columns selection list
1321
+ */
1322
+ echo " <style type='text/css'>\r\n";
1323
+ echo " form#adv-settings div.metabox-prefs {\r\n";
1324
+ echo " display: none;\r\n";
1325
+ echo " }\r\n";
1326
+ echo " </style>\r\n";
1327
+
1328
+ // Create an instance of our package class
1329
+ $MLAListUploadTable = new MLA_Upload_Optional_List_Table();
1330
+
1331
+ // Fetch, prepare, sort, and filter our data
1332
+ $MLAListUploadTable->prepare_items();
1333
+
1334
+ $page_content = array(
1335
+ 'message' => '',
1336
+ 'body' => ''
1337
+ );
1338
+
1339
+ $page_values = array(
1340
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
1341
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-upload&mla_tab=upload',
1342
+ 'results' => ! empty( $_REQUEST['s'] ) ? '<br>&nbsp;<br>Displaying search results for: "' . $_REQUEST['s'] . '"' : '',
1343
+ 's' => isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : ''
1344
+ );
1345
+
1346
+ $page_content['body'] = MLAData::mla_parse_template( $page_template_array['before-optional-uploads-table'], $page_values );
1347
+
1348
+ // Now we can render the completed list table
1349
+ ob_start();
1350
+ // $MLAListUploadTable->views();
1351
+ $MLAListUploadTable->display();
1352
+ $page_content['body'] .= ob_get_contents();
1353
+ ob_end_clean();
1354
+
1355
+ $page_content['body'] .= MLAData::mla_parse_template( $page_template_array['after-optional-uploads-table'], $page_values );
1356
+
1357
+ return $page_content;
1358
+ }
1359
+
1360
+ /**
1361
+ * Process an Optional Upload MIME Type selection
1362
+ *
1363
+ * @since 1.40
1364
+ *
1365
+ * @param intger MLA Optional Upload MIME Type ID
1366
+ *
1367
+ * @return array 'message' => status/error messages, 'body' => tab content
1368
+ */
1369
+ private static function _process_optional_upload_mime( $ID ) {
1370
+ $optional_type = MLAMime::mla_get_optional_upload_mime( $ID );
1371
+ $optional_type['disabled'] = false;
1372
+
1373
+ if ( false === $upload_type = MLAMime::mla_get_upload_mime( $optional_type['slug'] ) ) {
1374
+ $optional_type['icon_type'] = '.none.';
1375
+ return MLAMime::mla_add_upload_mime( $optional_type );
1376
+ }
1377
+
1378
+ $optional_type['original_slug'] = $optional_type['slug'];
1379
+ return MLAMime::mla_update_upload_mime( $optional_type );
1380
+ }
1381
+
1382
+ /**
1383
+ * Compose the File Upload MIME Types tab content for the Settings subpage
1384
+ *
1385
+ * @since 1.40
1386
+ *
1387
+ * @return array 'message' => status/error messages, 'body' => tab content
1388
+ */
1389
+ private static function _compose_upload_tab( ) {
1390
+ $page_template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/admin-display-settings-upload-tab.tpl' );
1391
+ if ( ! array( $page_template_array ) ) {
1392
+ error_log( "ERROR: MLASettings::_compose_upload_tab \$page_template_array = " . var_export( $page_template_array, true ), 0 );
1393
+ return '';
1394
+ }
1395
+
1396
+ /*
1397
+ * Untangle confusion between searching, canceling and selecting on the Optional Uploads screen
1398
+ */
1399
+ $bulk_action = self::_current_bulk_action();
1400
+ if ( isset( $_REQUEST['mla-optional-uploads-cancel'] ) || $bulk_action && ( $bulk_action == 'select' ) ) {
1401
+ unset( $_REQUEST['mla-optional-uploads-search'] );
1402
+ unset( $_REQUEST['s'] );
1403
+ }
1404
+
1405
+ /*
1406
+ * Convert checkbox values, if present
1407
+ */
1408
+ if ( isset( $_REQUEST['mla_upload_item'] ) ) {
1409
+ $_REQUEST['mla_upload_item']['disabled'] = isset( $_REQUEST['mla_upload_item']['disabled'] );
1410
+ }
1411
+
1412
+ /*
1413
+ * Set default values, check for Add New Post MIME Type View button
1414
+ */
1415
+ $add_form_values = array (
1416
+ 'slug' => '',
1417
+ 'mime_type' => '',
1418
+ 'icon_type' => '.none.',
1419
+ 'disabled' => '',
1420
+ 'description' => ''
1421
+ );
1422
+
1423
+ if ( !empty( $_REQUEST['mla-upload-options-save'] ) ) {
1424
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
1425
+ $page_content = self::_save_upload_settings( );
1426
+ }
1427
+ elseif ( !empty( $_REQUEST['mla-optional-uploads-search'] ) ) {
1428
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
1429
+ $page_content = self::_compose_optional_upload_tab( $page_template_array );
1430
+ }
1431
+ elseif ( !empty( $_REQUEST['mla-optional-uploads-cancel'] ) ) {
1432
+ $page_content = array(
1433
+ 'message' => '',
1434
+ 'body' => ''
1435
+ );
1436
+ }
1437
+ elseif ( !empty( $_REQUEST['mla-optional-uploads-display'] ) ) {
1438
+ if ( 'true' != $_REQUEST['mla-optional-uploads-display'] ) {
1439
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
1440
+ unset( $_REQUEST['s'] );
1441
+ }
1442
+ $page_content = self::_compose_optional_upload_tab( $page_template_array );
1443
+ }
1444
+ elseif ( !empty( $_REQUEST['mla-add-upload-submit'] ) ) {
1445
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
1446
+ $page_content = MLAMime::mla_add_upload_mime( $_REQUEST['mla_upload_item'] );
1447
+ if ( false !== strpos( $page_content['message'], 'ERROR:' ) ) {
1448
+ $add_form_values = $_REQUEST['mla_upload_item'];
1449
+ $add_form_values['disabled'] = $add_form_values['disabled'] ? 'checked="checked"' : '';
1450
+ }
1451
+ } else {
1452
+ $page_content = array(
1453
+ 'message' => '',
1454
+ 'body' => ''
1455
+ );
1456
+ }
1457
+
1458
+ /*
1459
+ * Process bulk actions that affect an array of items
1460
+ */
1461
+ if ( $bulk_action && ( $bulk_action != 'none' ) ) {
1462
+ if ( isset( $_REQUEST['cb_mla_item_ID'] ) ) {
1463
+ if ( 'select' == $bulk_action ) {
1464
+ foreach ( $_REQUEST['cb_mla_item_ID'] as $ID ) {
1465
+ $item_content = MLASettings::_process_optional_upload_mime( $ID );
1466
+ $page_content['message'] .= $item_content['message'] . '<br>';
1467
+ }
1468
+ }
1469
+ else {
1470
+ /*
1471
+ * Convert post-ID to slug; separate loop required because delete changes post_IDs
1472
+ */
1473
+ $slugs = array();
1474
+ foreach ( $_REQUEST['cb_mla_item_ID'] as $post_ID )
1475
+ $slugs[] = MLAMime::mla_get_upload_mime_slug( $post_ID );
1476
+
1477
+ foreach ( $slugs as $slug ) {
1478
+ switch ( $bulk_action ) {
1479
+ case 'delete':
1480
+ $item_content = MLAMime::mla_delete_upload_mime( $slug );
1481
+ break;
1482
+ case 'edit':
1483
+ $request = array( 'slug' => $slug );
1484
+ if ( '-1' != $_REQUEST['disabled'] )
1485
+ $request['disabled'] = '1' == $_REQUEST['disabled'];
1486
+ if ( '.none.' != $_REQUEST['icon_type'] )
1487
+ $request['icon_type'] = $_REQUEST['icon_type'];
1488
+ $item_content = MLAMime::mla_update_upload_mime( $request );
1489
+ break;
1490
+ default:
1491
+ $item_content = array(
1492
+ 'message' => sprintf( 'Unknown bulk action %s', $bulk_action ),
1493
+ 'body' => ''
1494
+ );
1495
+ } // switch $bulk_action
1496
+
1497
+ $page_content['message'] .= $item_content['message'] . '<br>';
1498
+ } // foreach cb_attachment
1499
+ } // != select
1500
+ } // isset cb_attachment
1501
+ else {
1502
+ $page_content['message'] = 'Bulk Action ' . $bulk_action . ' - no items selected.';
1503
+ }
1504
+ } // $bulk_action
1505
+
1506
+ /*
1507
+ * Process row-level actions that affect a single item
1508
+ */
1509
+ if ( !empty( $_REQUEST['mla_admin_action'] ) ) {
1510
+ check_admin_referer( MLA::MLA_ADMIN_NONCE );
1511
+
1512
+ switch ( $_REQUEST['mla_admin_action'] ) {
1513
+ case MLA::MLA_ADMIN_SINGLE_DELETE:
1514
+ $page_content = MLAMime::mla_delete_upload_mime( $_REQUEST['mla_item_slug'] );
1515
+ break;
1516
+ case MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY:
1517
+ $view = MLAMime::mla_get_upload_mime( $_REQUEST['mla_item_slug'] );
1518
+ $page_content = self::_compose_edit_upload_tab( $view, $page_template_array );
1519
+ break;
1520
+ case MLA::MLA_ADMIN_SINGLE_EDIT_UPDATE:
1521
+ if ( !empty( $_REQUEST['update'] ) ) {
1522
+ $page_content = MLAMime::mla_update_upload_mime( $_REQUEST['mla_upload_item'] );
1523
+ if ( false !== strpos( $page_content['message'], 'ERROR:' ) ) {
1524
+ $message = $page_content['message'];
1525
+ $page_content = self::_compose_edit_upload_tab( $_REQUEST['mla_upload_item'], $page_template_array );
1526
+ $page_content['message'] = $message;
1527
+ }
1528
+ }
1529
+ elseif ( !empty( $_REQUEST['mla_item_ID'] ) ) {
1530
+ $page_content = self::_process_optional_upload_mime( $_REQUEST['mla_item_ID'] );
1531
+ } else {
1532
+ $page_content = array(
1533
+ 'message' => 'Edit view "' . $_REQUEST['mla_upload_item']['original_slug'] . '" cancelled.',
1534
+ 'body' => ''
1535
+ );
1536
+ }
1537
+ break;
1538
+ default:
1539
+ $page_content = array(
1540
+ 'message' => sprintf( 'Unknown mla_admin_action - "%1$s"', $_REQUEST['mla_admin_action'] ),
1541
+ 'body' => ''
1542
+ );
1543
+ break;
1544
+ } // switch ($_REQUEST['mla_admin_action'])
1545
+ } // (!empty($_REQUEST['mla_admin_action'])
1546
+
1547
+ if ( !empty( $page_content['body'] ) ) {
1548
+ return $page_content;
1549
+ }
1550
+
1551
+ /*
1552
+ * Check for disabled status
1553
+ */
1554
+ if ( 'checked' != MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_UPLOAD_MIMES ) ) {
1555
+ /*
1556
+ * Fill in with any page-level options
1557
+ */
1558
+ $options_list = '';
1559
+ foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1560
+ if ( 'upload' == $value['tab'] )
1561
+ $options_list .= self::_compose_option_row( $key, $value );
1562
+ }
1563
+
1564
+ $page_values = array(
1565
+ 'options_list' => $options_list,
1566
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
1567
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-upload&mla_tab=upload',
1568
+ );
1569
+
1570
+ $page_content['body'] .= MLAData::mla_parse_template( $page_template_array['upload-disabled'], $page_values );
1571
+ return $page_content;
1572
+ }
1573
+
1574
+ /*
1575
+ * Display the Upload MIME Types Table
1576
+ */
1577
+ $_SERVER['REQUEST_URI'] = remove_query_arg( array(
1578
+ 'mla_admin_action',
1579
+ 'mla_item_slug',
1580
+ 'mla_item_ID',
1581
+ '_wpnonce',
1582
+ '_wp_http_referer',
1583
+ 'action',
1584
+ 'action2',
1585
+ 'cb_mla_item_ID',
1586
+ 'mla-optional-uploads-search',
1587
+ ), $_SERVER['REQUEST_URI'] );
1588
+
1589
+ // Create an instance of our package class
1590
+ $MLAListUploadTable = new MLA_Upload_List_Table();
1591
+
1592
+ // Fetch, prepare, sort, and filter our data
1593
+ $MLAListUploadTable->prepare_items();
1594
+
1595
+ /*
1596
+ * Start with any page-level options
1597
+ */
1598
+ $options_list = '';
1599
+ foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1600
+ if ( 'upload' == $value['tab'] )
1601
+ $options_list .= self::_compose_option_row( $key, $value );
1602
+ }
1603
+
1604
+ $page_values = array(
1605
+ 'options_list' => $options_list,
1606
+ 'colspan' => count( $MLAListUploadTable->get_columns() ),
1607
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
1608
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-upload&mla_tab=upload',
1609
+ 'results' => ! empty( $_REQUEST['s'] ) ? '<h3 style="float:left">Displaying search results for: "' . $_REQUEST['s'] . '"</h3>' : '',
1610
+ 's' => isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '',
1611
+ 'icon_types' => self::mla_get_icon_type_dropdown( $page_template_array, 'mla_upload_item[icon_type]' ),
1612
+ 'inline_icon_types' => self::mla_get_icon_type_dropdown( $page_template_array, 'icon_type' ),
1613
+ 'bulk_icon_types' => self::mla_get_icon_type_dropdown( $page_template_array, 'icon_type', '.nochange.' ),
1614
+ 'search_url' => wp_nonce_url( '?page=mla-settings-menu-upload&mla_tab=upload&mla-optional-uploads-search=Search', MLA::MLA_ADMIN_NONCE )
1615
+ );
1616
+
1617
+ foreach ( $add_form_values as $key => $value ) {
1618
+ $page_values[ $key ] = $value;
1619
+ }
1620
+ $page_content['body'] = MLAData::mla_parse_template( $page_template_array['before-table'], $page_values );
1621
+
1622
+ // Now we can render the completed list table
1623
+ ob_start();
1624
+ $MLAListUploadTable->views();
1625
+ $MLAListUploadTable->display();
1626
+ $page_content['body'] .= ob_get_contents();
1627
+ ob_end_clean();
1628
+
1629
+ $page_content['body'] .= MLAData::mla_parse_template( $page_template_array['after-table'], $page_values );
1630
+
1631
+ return $page_content;
1632
+ }
1633
+
1634
  /**
1635
  * Compose the MLA Gallery tab content for the Settings subpage
1636
  *
1662
  'options_list' => '',
1663
  'style_options_list' => '',
1664
  'markup_options_list' => '',
1665
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-mla_gallery&mla_tab=mla_gallery',
1666
  '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
1667
  '_wp_http_referer' => wp_referer_field( false )
1668
  );
1692
  */
1693
  $options_list = '';
1694
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
1695
+ if ( 'mla_gallery' == $value['tab'] )
1696
  $options_list .= self::_compose_option_row( $key, $value );
1697
  }
1698
 
2015
  $page_values = array(
2016
  'options_list' => '',
2017
  'custom_options_list' => '',
2018
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-custom_field&mla_tab=custom_field',
2019
  '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
2020
  '_wp_http_referer' => wp_referer_field( false )
2021
  );
2025
  */
2026
  $options_list = '';
2027
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2028
+ if ( 'custom_field' == $value['tab'] )
2029
  $options_list .= self::_compose_option_row( $key, $value );
2030
  }
2031
 
2119
  'standard_options_list' => '',
2120
  'taxonomy_options_list' => '',
2121
  'custom_options_list' => '',
2122
+ 'form_url' => admin_url( 'options-general.php' ) . '?page=mla-settings-menu-iptc_exif&mla_tab=iptc_exif',
2123
  '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
2124
  '_wp_http_referer' => wp_referer_field( false )
2125
  );
2129
  */
2130
  $options_list = '';
2131
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2132
+ if ( 'iptc_exif' == $value['tab'] )
2133
  $options_list .= self::_compose_option_row( $key, $value );
2134
  }
2135
 
2208
  $page_content = array( 'message' => 'ERROR: unknown content tab', 'body' => '' );
2209
  }
2210
 
2211
+ if ( ! empty( $page_content['message'] ) ) {
2212
+ if ( false !== strpos( $page_content['message'], 'ERROR:' ) )
2213
+ $messages_class = 'mla_errors';
2214
+ else
2215
+ $messages_class = 'mla_messages';
2216
+
2217
  $page_values['messages'] = MLAData::mla_parse_template( self::$page_template_array['messages'], array(
2218
+ 'messages' => $page_content['message'],
2219
+ 'mla_messages_class' => $messages_class
2220
  ) );
2221
+ }
2222
 
2223
  $page_values['tab_content'] = $page_content['body'];
2224
  echo MLAData::mla_parse_template( self::$page_template_array['page'], $page_values );
2242
  * Start with any page-level options
2243
  */
2244
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2245
+ if ( 'mla_gallery' == $value['tab'] && ( 'select' == $value['type'] ) ) {
2246
  $old_value = MLAOptions::mla_get_option( $key );
2247
  if ( $old_value != $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) {
2248
  $settings_changed = true;
2455
  return $page_content;
2456
  } // _save_gallery_settings
2457
 
2458
+ /**
2459
+ * Save View settings to the options table
2460
+ *
2461
+ * @since 1.40
2462
+ *
2463
+ * @uses $_REQUEST
2464
+ *
2465
+ * @return array Message(s) reflecting the results of the operation
2466
+ */
2467
+ private static function _save_view_settings( ) {
2468
+ $message_list = '';
2469
+
2470
+ foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2471
+ if ( 'view' == $value['tab'] ) {
2472
+ $message_list .= self::_update_option_row( $key, $value );
2473
+ } // view option
2474
+ } // foreach mla_options
2475
+
2476
+ $page_content = array(
2477
+ 'message' => "View settings saved.\r\n",
2478
+ 'body' => ''
2479
+ );
2480
+
2481
+ /*
2482
+ * Uncomment this for debugging.
2483
+ */
2484
+ // $page_content['message'] .= $message_list;
2485
+
2486
+ return $page_content;
2487
+ } // _save_view_settings
2488
+
2489
+ /**
2490
+ * Save Upload settings to the options table
2491
+ *
2492
+ * @since 1.40
2493
+ *
2494
+ * @uses $_REQUEST
2495
+ *
2496
+ * @return array Message(s) reflecting the results of the operation
2497
+ */
2498
+ private static function _save_upload_settings( ) {
2499
+ $message_list = '';
2500
+
2501
+ if ( ! isset( $_REQUEST[ MLA_OPTION_PREFIX . MLAOptions::MLA_ENABLE_UPLOAD_MIMES ] ) )
2502
+ unset( $_REQUEST[ MLA_OPTION_PREFIX . MLAOptions::MLA_ENABLE_MLA_ICONS ] );
2503
+
2504
+ foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2505
+ if ( 'upload' == $value['tab'] ) {
2506
+ $message_list .= self::_update_option_row( $key, $value );
2507
+ } // upload option
2508
+ } // foreach mla_options
2509
+
2510
+ $page_content = array(
2511
+ 'message' => "Upload MIME Type settings saved.\r\n",
2512
+ 'body' => ''
2513
+ );
2514
+
2515
+ /*
2516
+ * Uncomment this for debugging.
2517
+ */
2518
+ // $page_content['message'] .= $message_list;
2519
+
2520
+ return $page_content;
2521
+ } // _save_upload_settings
2522
+
2523
  /**
2524
  * Process custom field settings against all image attachments
2525
  * without saving the settings to the mla_option
2557
 
2558
  $examine_count += 1;
2559
  if ( ! empty( $updates ) ) {
2560
+ $results = MLAData::mla_update_item_postmeta( (integer) $post_id, $updates['custom_updates'] );
2561
+ if ( ! empty( $results ) )
2562
  $update_count += 1;
2563
  }
2564
  } // foreach post
2616
  * Start with any page-level options
2617
  */
2618
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2619
+ if ( 'custom_field' == $value['tab'] )
2620
  $option_messages .= self::_update_option_row( $key, $value );
2621
  }
2622
 
2660
  $query = array( 'orderby' => 'none', 'post_parent' => 'all' );
2661
  $posts = MLAShortcodes::mla_get_shortcode_attachments( 0, $query );
2662
 
2663
+ if ( is_string( $posts ) )
2664
+ return array(
2665
+ 'message' => $posts,
2666
+ 'body' => ''
2667
+ );
2668
+
2669
  foreach( $posts as $key => $post ) {
2670
  $updates = MLAOptions::mla_evaluate_iptc_exif_mapping( $post, 'iptc_exif_standard_mapping', $_REQUEST['iptc_exif_mapping'] );
2671
 
2710
  $query = array( 'orderby' => 'none', 'post_parent' => 'all' );
2711
  $posts = MLAShortcodes::mla_get_shortcode_attachments( 0, $query );
2712
 
2713
+ if ( is_string( $posts ) )
2714
+ return array(
2715
+ 'message' => $posts,
2716
+ 'body' => ''
2717
+ );
2718
+
2719
  foreach( $posts as $key => $post ) {
2720
  $updates = MLAOptions::mla_evaluate_iptc_exif_mapping( $post, 'iptc_exif_taxonomy_mapping', $_REQUEST['iptc_exif_mapping'] );
2721
 
2771
  $query = array( 'orderby' => 'none', 'post_parent' => 'all' );
2772
  $posts = MLAShortcodes::mla_get_shortcode_attachments( 0, $query );
2773
 
2774
+ if ( is_string( $posts ) )
2775
+ return array(
2776
+ 'message' => $posts,
2777
+ 'body' => ''
2778
+ );
2779
+
2780
  foreach( $posts as $key => $post ) {
2781
  $updates = MLAOptions::mla_evaluate_iptc_exif_mapping( $post, 'iptc_exif_custom_mapping', $settings );
2782
 
2832
  * Start with any page-level options
2833
  */
2834
  foreach ( MLAOptions::$mla_option_definitions as $key => $value ) {
2835
+ if ( 'iptc_exif' == $value['tab'] )
2836
  $option_messages .= self::_update_option_row( $key, $value );
2837
  }
2838
 
includes/class-mla-shortcodes.php CHANGED
@@ -174,8 +174,12 @@ class MLAShortcodes {
174
  'mla_itemwidth' => NULL,
175
  'mla_margin' => '1.5',
176
  'mla_link_href' => '',
 
177
  'mla_link_text' => '',
178
  'mla_rollover_text' => '',
 
 
 
179
  'mla_caption' => '',
180
  'mla_target' => '',
181
  'mla_debug' => false,
@@ -241,7 +245,7 @@ class MLAShortcodes {
241
  /*
242
  * Replace data-selection parameters with the "ids" list
243
  */
244
- $blacklist = array_merge( $mla_arguments, self::$data_selection_parameters );
245
  $new_args = '';
246
  foreach ( $attr as $key => $value ) {
247
  if ( array_key_exists( $key, $blacklist ) ) {
@@ -263,10 +267,16 @@ class MLAShortcodes {
263
 
264
  $new_ids = $arguments['mla_alt_ids_name'] . '="' . $new_ids . '"';
265
 
 
 
 
 
 
 
266
  /*
267
  * Execute the alternate gallery shortcode with the new parameters
268
  */
269
- return do_shortcode( sprintf( '[%1$s %2$s %3$s]', $arguments['mla_alt_shortcode'], $new_ids, $new_args ) );
270
  } // mla_alt_shortcode
271
 
272
  /*
@@ -292,7 +302,11 @@ class MLAShortcodes {
292
 
293
  $size = $size_class = $arguments['size'];
294
  if ( 'icon' == strtolower( $size) ) {
295
- $size = array( 60, 60 );
 
 
 
 
296
  $show_icon = true;
297
  }
298
  else
@@ -429,7 +443,7 @@ class MLAShortcodes {
429
  /*
430
  * Look for variable query and item-level placeholders
431
  */
432
- $new_text = str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_link_href'] . $arguments['mla_link_text'] . $arguments['mla_rollover_text'] . $arguments['mla_caption'] ) );
433
 
434
  $placeholders = MLAData::mla_get_template_placeholders( $new_text . $open_template . $row_open_template . $item_template . $row_close_template . $close_template );
435
  foreach ($placeholders as $key => $value ) {
@@ -562,18 +576,18 @@ class MLAShortcodes {
562
  */
563
  $image_metadata = get_metadata( 'post', $attachment->ID, '_wp_attachment_metadata', true );
564
  foreach ( $meta_placeholders as $key => $value ) {
565
- $markup_values[ $key ] = MLAData::mla_find_array_element( $value['value'], $image_metadata, $value['single'], $value['export'] );
566
  } // $meta_placeholders */
567
 
568
  foreach ( $terms_placeholders as $key => $value ) {
569
  $text = '';
570
  $terms = wp_get_object_terms( $attachment->ID, $value['value'] );
571
 
572
- if ( is_wp_error( $terms ) || empty( $terms ) )
573
- $text = '';
574
- else {
575
- if ( $value['single'] )
576
  $text = sanitize_term_field( 'name', $terms[0]->name, $terms[0]->term_id, $value, 'display' );
 
 
577
  else
578
  foreach ( $terms as $term ) {
579
  $term_name = sanitize_term_field( 'name', $term->name, $term->term_id, $value, 'display' );
@@ -585,17 +599,21 @@ class MLAShortcodes {
585
  } // $terms_placeholders
586
 
587
  foreach ( $custom_placeholders as $key => $value ) {
588
- $record = get_metadata( 'post', $attachment->ID, $value['value'], $value['single'] );
589
 
590
  if ( is_wp_error( $record ) || empty( $record ) )
591
  $text = '';
592
  elseif ( is_scalar( $record ) )
593
  $text = sanitize_text_field( (string) $record );
594
  elseif ( is_array( $record ) ) {
595
- $text = '';
596
- foreach ( $record as $term ) {
597
- $term_name = sanitize_text_field( $term );
598
- $text .= strlen( $text ) ? ', ' . $term_name : $term_name;
 
 
 
 
599
  }
600
  } // is_array
601
  else
@@ -618,8 +636,10 @@ class MLAShortcodes {
618
  if ( array_key_exists( $value['value'], $image_metadata['mla_iptc_metadata'] ) ) {
619
  $record = $image_metadata['mla_iptc_metadata'][ $value['value'] ];
620
  if ( is_array( $record ) ) {
621
- if ( $value['single'] )
622
  $text = $record[0];
 
 
623
  else
624
  foreach ( $record as $term ) {
625
  $term_name = sanitize_text_field( $term );
@@ -652,34 +672,39 @@ class MLAShortcodes {
652
  );
653
 
654
  if ( $markup_values['captiontag'] ) {
655
- if ( ! empty( $arguments['mla_caption'] ) ) {
656
- $new_text = str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_caption'] ) );
657
- $markup_values['caption'] = wptexturize( MLAData::mla_parse_template( $new_text, $markup_values ) );
658
- }
659
- else
660
- $markup_values['caption'] = wptexturize( $attachment->post_excerpt );
661
  }
662
  else
663
  $markup_values['caption'] = '';
664
 
665
- if ( ! empty( $arguments['mla_link_text'] ) ) {
666
- $link_text = str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_link_text'] ) );
667
- $link_text = MLAData::mla_parse_template( $link_text, $markup_values );
668
- }
669
  else
670
  $link_text = false;
671
 
672
  $markup_values['pagelink'] = wp_get_attachment_link($attachment->ID, $size, true, $show_icon, $link_text);
673
  $markup_values['filelink'] = wp_get_attachment_link($attachment->ID, $size, false, $show_icon, $link_text);
674
-
675
- if ( ! empty( $arguments['mla_target'] ) ) {
676
- $markup_values['pagelink'] = str_replace( '<a href=', '<a target="' . $arguments['mla_target'] . '" href=', $markup_values['pagelink'] );
677
- $markup_values['filelink'] = str_replace( '<a href=', '<a target="' . $arguments['mla_target'] . '" href=', $markup_values['filelink'] );
 
 
 
 
 
 
 
 
 
 
 
678
  }
679
 
680
  if ( ! empty( $arguments['mla_rollover_text'] ) ) {
681
- $new_text = str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_rollover_text'] ) );
682
- $new_text = MLAData::mla_parse_template( $new_text, $markup_values );
683
 
684
  /*
685
  * Replace single- and double-quote delimited values
@@ -689,6 +714,43 @@ class MLAShortcodes {
689
  $markup_values['filelink'] = preg_replace('# title=\'([^\']*)\'#', " title='{$new_text}'", $markup_values['filelink'] );
690
  $markup_values['filelink'] = preg_replace('# title=\"([^\"]*)\"#', " title=\"{$new_text}\"", $markup_values['filelink'] );
691
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
692
 
693
  switch ( $arguments['link'] ) {
694
  case 'permalink':
@@ -714,7 +776,7 @@ class MLAShortcodes {
714
  /*
715
  * Extract target and thumbnail fields
716
  */
717
- $match_count = preg_match_all( '#href=\'([^\']+)\' title=\'([^\']*)\'#', $markup_values['pagelink'], $matches, PREG_OFFSET_CAPTURE );
718
  if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
719
  $markup_values['pagelink_url'] = $matches[1][0][0];
720
  }
@@ -739,8 +801,7 @@ class MLAShortcodes {
739
  * Override the link value; leave filelink and pagelink unchanged
740
  */
741
  if ( ! empty( $arguments['mla_link_href'] ) ) {
742
- $new_text = str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_link_href'] ) );
743
- $new_text = MLAData::mla_parse_template( $new_text, $markup_values );
744
 
745
  /*
746
  * Replace single- and double-quote delimited values
@@ -756,7 +817,7 @@ class MLAShortcodes {
756
  else
757
  $markup_values['thumbnail_content'] = '';
758
 
759
- $match_count = preg_match_all( '#img width=\"([^\"]+)\" height=\"([^\"]+)\" src=\"([^\"]+)\"#', $markup_values['link'], $matches, PREG_OFFSET_CAPTURE );
760
  if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
761
  $markup_values['thumbnail_width'] = $matches[1][0][0];
762
  $markup_values['thumbnail_height'] = $matches[2][0][0];
@@ -777,8 +838,9 @@ class MLAShortcodes {
777
  $extension = substr( $markup_values['file'], $last_dot + 1 );
778
  if ( in_array( $extension, $arguments['mla_viewer_extensions'] ) ) {
779
  $markup_values['thumbnail_content'] = sprintf( '<img src="http://docs.google.com/viewer?url=%1$s&a=bi&pagenumber=%2$d&w=%3$d">', $markup_values['filelink_url'], $arguments['mla_viewer_page'], $arguments['mla_viewer_width'] );
780
- $markup_values['pagelink'] = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $markup_values['pagelink_url'], $markup_values['title'], $markup_values['thumbnail_content'] );
781
- $markup_values['filelink'] = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $markup_values['filelink_url'], $markup_values['title'], $markup_values['thumbnail_content'] );
 
782
 
783
  if ( 'permalink' == $arguments['link'] )
784
  $markup_values['link'] = $markup_values['pagelink'];
@@ -818,6 +880,22 @@ class MLAShortcodes {
818
  return $output;
819
  }
820
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
821
  /**
822
  * WP_Query filter "parameters"
823
  *
@@ -1039,7 +1117,7 @@ class MLAShortcodes {
1039
  /*
1040
  * Extract taxonomy arguments
1041
  */
1042
- $taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'names' ); // 'objects'
1043
  $query_arguments = array();
1044
  if ( ! empty( $attr ) ) {
1045
  foreach ( $attr as $key => $value ) {
@@ -1047,11 +1125,14 @@ class MLAShortcodes {
1047
  if ( is_array( $value ) )
1048
  $query_arguments[ $key ] = $value;
1049
  else {
 
1050
  $value = self::_sanitize_query_specification( $value );
1051
  $function = @create_function('', 'return ' . $value . ';' );
1052
-
1053
  if ( is_callable( $function ) )
1054
- $query_arguments[ $key ] = $function();
 
 
 
1055
  else
1056
  return '<p>ERROR: invalid mla_gallery tax_query = ' . var_export( $value, true ) . '</p>';
1057
  } // not array
@@ -1227,10 +1308,14 @@ class MLAShortcodes {
1227
  if ( is_array( $value ) )
1228
  $query_arguments[ $key ] = $value;
1229
  else {
 
 
1230
  $function = @create_function('', 'return ' . $value . ';' );
1231
-
1232
  if ( is_callable( $function ) )
1233
- $query_arguments[ $key ] = $function();
 
 
 
1234
  else
1235
  return '<p>ERROR: invalid mla_gallery meta_query = ' . var_export( $value, true ) . '</p>';
1236
  } // not array
174
  'mla_itemwidth' => NULL,
175
  'mla_margin' => '1.5',
176
  'mla_link_href' => '',
177
+ 'mla_link_attributes' => '',
178
  'mla_link_text' => '',
179
  'mla_rollover_text' => '',
180
+ 'mla_image_class' => '',
181
+ 'mla_image_alt' => '',
182
+ 'mla_image_attributes' => '',
183
  'mla_caption' => '',
184
  'mla_target' => '',
185
  'mla_debug' => false,
245
  /*
246
  * Replace data-selection parameters with the "ids" list
247
  */
248
+ $blacklist = array_merge( $mla_arguments, self::$data_selection_parameters );
249
  $new_args = '';
250
  foreach ( $attr as $key => $value ) {
251
  if ( array_key_exists( $key, $blacklist ) ) {
267
 
268
  $new_ids = $arguments['mla_alt_ids_name'] . '="' . $new_ids . '"';
269
 
270
+ if ( self::$mla_debug ) {
271
+ $output = self::$mla_debug_messages;
272
+ self::$mla_debug_messages = '';
273
+ }
274
+ else
275
+ $output = '';
276
  /*
277
  * Execute the alternate gallery shortcode with the new parameters
278
  */
279
+ return $output . do_shortcode( sprintf( '[%1$s %2$s %3$s]', $arguments['mla_alt_shortcode'], $new_ids, $new_args ) );
280
  } // mla_alt_shortcode
281
 
282
  /*
302
 
303
  $size = $size_class = $arguments['size'];
304
  if ( 'icon' == strtolower( $size) ) {
305
+ if ( 'checked' == MLAOptions::mla_get_option( MLAOptions::MLA_ENABLE_MLA_ICONS ) )
306
+ $size = array( 64, 64 );
307
+ else
308
+ $size = array( 60, 60 );
309
+
310
  $show_icon = true;
311
  }
312
  else
443
  /*
444
  * Look for variable query and item-level placeholders
445
  */
446
+ $new_text = str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_link_href'] . $arguments['mla_link_attributes'] . $arguments['mla_link_text'] . $arguments['mla_rollover_text'] . $arguments['mla_image_class'] . $arguments['mla_image_alt'] . $arguments['mla_image_attributes'] . $arguments['mla_caption'] ) );
447
 
448
  $placeholders = MLAData::mla_get_template_placeholders( $new_text . $open_template . $row_open_template . $item_template . $row_close_template . $close_template );
449
  foreach ($placeholders as $key => $value ) {
576
  */
577
  $image_metadata = get_metadata( 'post', $attachment->ID, '_wp_attachment_metadata', true );
578
  foreach ( $meta_placeholders as $key => $value ) {
579
+ $markup_values[ $key ] = MLAData::mla_find_array_element( $value['value'], $image_metadata, $value['option'] );
580
  } // $meta_placeholders */
581
 
582
  foreach ( $terms_placeholders as $key => $value ) {
583
  $text = '';
584
  $terms = wp_get_object_terms( $attachment->ID, $value['value'] );
585
 
586
+ if ( ! ( is_wp_error( $terms ) || empty( $terms ) ) ) {
587
+ if ( 'single' == $value['option'] || 1 == count( $terms ) )
 
 
588
  $text = sanitize_term_field( 'name', $terms[0]->name, $terms[0]->term_id, $value, 'display' );
589
+ elseif ( 'export' == $value['option'] )
590
+ $text = sanitize_text_field( var_export( $terms, true ) );
591
  else
592
  foreach ( $terms as $term ) {
593
  $term_name = sanitize_term_field( 'name', $term->name, $term->term_id, $value, 'display' );
599
  } // $terms_placeholders
600
 
601
  foreach ( $custom_placeholders as $key => $value ) {
602
+ $record = get_metadata( 'post', $attachment->ID, $value['value'], 'single' == $value['option'] );
603
 
604
  if ( is_wp_error( $record ) || empty( $record ) )
605
  $text = '';
606
  elseif ( is_scalar( $record ) )
607
  $text = sanitize_text_field( (string) $record );
608
  elseif ( is_array( $record ) ) {
609
+ if ( 'export' == $value['option'] )
610
+ $text = sanitize_text_field( var_export( $haystack, true ) );
611
+ else {
612
+ $text = '';
613
+ foreach ( $record as $term ) {
614
+ $term_name = sanitize_text_field( $term );
615
+ $text .= strlen( $text ) ? ', ' . $term_name : $term_name;
616
+ }
617
  }
618
  } // is_array
619
  else
636
  if ( array_key_exists( $value['value'], $image_metadata['mla_iptc_metadata'] ) ) {
637
  $record = $image_metadata['mla_iptc_metadata'][ $value['value'] ];
638
  if ( is_array( $record ) ) {
639
+ if ( 'single' == $value['option'] )
640
  $text = $record[0];
641
+ elseif ( 'export' == $value['option'] )
642
+ $text = sanitize_text_field( var_export( $record, true ) );
643
  else
644
  foreach ( $record as $term ) {
645
  $term_name = sanitize_text_field( $term );
672
  );
673
 
674
  if ( $markup_values['captiontag'] ) {
675
+ $markup_values['caption'] = wptexturize( $attachment->post_excerpt );
676
+ if ( ! empty( $arguments['mla_caption'] ) )
677
+ $markup_values['caption'] = wptexturize( self::_process_shortcode_parameter( $arguments['mla_caption'], $markup_values ) );
 
 
 
678
  }
679
  else
680
  $markup_values['caption'] = '';
681
 
682
+ if ( ! empty( $arguments['mla_link_text'] ) )
683
+ $link_text = self::_process_shortcode_parameter( $arguments['mla_link_text'], $markup_values );
 
 
684
  else
685
  $link_text = false;
686
 
687
  $markup_values['pagelink'] = wp_get_attachment_link($attachment->ID, $size, true, $show_icon, $link_text);
688
  $markup_values['filelink'] = wp_get_attachment_link($attachment->ID, $size, false, $show_icon, $link_text);
689
+
690
+ /*
691
+ * Apply the Gallery Display Content parameters
692
+ */
693
+ if ( ! empty( $arguments['mla_target'] ) )
694
+ $attributes = 'target="' . $arguments['mla_target'] . '" ';
695
+ else
696
+ $attributes = '';
697
+
698
+ if ( ! empty( $arguments['mla_link_attributes'] ) )
699
+ $attributes .= self::_process_shortcode_parameter( $arguments['mla_link_attributes'], $markup_values );
700
+
701
+ if ( ! empty( $attributes ) ) {
702
+ $markup_values['pagelink'] = str_replace( '<a href=', '<a ' . $attributes . ' href=', $markup_values['pagelink'] );
703
+ $markup_values['filelink'] = str_replace( '<a href=', '<a ' . $attributes . ' href=', $markup_values['filelink'] );
704
  }
705
 
706
  if ( ! empty( $arguments['mla_rollover_text'] ) ) {
707
+ $new_text = esc_attr( self::_process_shortcode_parameter( $arguments['mla_rollover_text'], $markup_values ) );
 
708
 
709
  /*
710
  * Replace single- and double-quote delimited values
714
  $markup_values['filelink'] = preg_replace('# title=\'([^\']*)\'#', " title='{$new_text}'", $markup_values['filelink'] );
715
  $markup_values['filelink'] = preg_replace('# title=\"([^\"]*)\"#', " title=\"{$new_text}\"", $markup_values['filelink'] );
716
  }
717
+
718
+ /*
719
+ * Process the <img> tag, if present
720
+ */
721
+ if ( false !== strpos( $markup_values['pagelink'], '<img ' ) ) {
722
+ if ( ! empty( $arguments['mla_image_attributes'] ) )
723
+ $attributes = self::_process_shortcode_parameter( $arguments['mla_image_attributes'], $markup_values );
724
+
725
+ if ( ! empty( $attributes ) ) {
726
+ $markup_values['pagelink'] = str_replace( '<img ', '<img ' . $attributes . ' ', $markup_values['pagelink'] );
727
+ $markup_values['filelink'] = str_replace( '<img ', '<img ' . $attributes . ' ', $markup_values['filelink'] );
728
+ }
729
+
730
+ /*
731
+ * Extract existing class values and add to them
732
+ */
733
+ if ( ! empty( $arguments['mla_image_class'] ) ) {
734
+ $match_count = preg_match_all( '# class=\"([^\"]+)\" #', $markup_values['pagelink'], $matches, PREG_OFFSET_CAPTURE );
735
+ if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
736
+ $class = $matches[1][0][0] . ' ';
737
+ }
738
+ else
739
+ $class = '';
740
+
741
+ $class .= $arguments['mla_image_class'];
742
+
743
+ $markup_values['pagelink'] = preg_replace('# class=\"([^\"]*)\"#', " class=\"{$class}\"", $markup_values['pagelink'] );
744
+ $markup_values['filelink'] = preg_replace('# class=\"([^\"]*)\"#', " class=\"{$class}\"", $markup_values['filelink'] );
745
+ }
746
+
747
+ if ( ! empty( $arguments['mla_image_alt'] ) ) {
748
+ $new_text = esc_attr( self::_process_shortcode_parameter( $arguments['mla_image_alt'], $markup_values ) );
749
+
750
+ $markup_values['pagelink'] = preg_replace('# alt=\"([^\"]*)\"#', " alt=\"{$new_text}\"", $markup_values['pagelink'] );
751
+ $markup_values['filelink'] = preg_replace('# alt=\"([^\"]*)\"#', " alt=\"{$new_text}\"", $markup_values['filelink'] );
752
+ }
753
+ } // process <img> tag
754
 
755
  switch ( $arguments['link'] ) {
756
  case 'permalink':
776
  /*
777
  * Extract target and thumbnail fields
778
  */
779
+ $match_count = preg_match_all( '#href=\'([^\']+)\'#', $markup_values['pagelink'], $matches, PREG_OFFSET_CAPTURE );
780
  if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
781
  $markup_values['pagelink_url'] = $matches[1][0][0];
782
  }
801
  * Override the link value; leave filelink and pagelink unchanged
802
  */
803
  if ( ! empty( $arguments['mla_link_href'] ) ) {
804
+ $new_text = self::_process_shortcode_parameter( $arguments['mla_link_href'], $markup_values );
 
805
 
806
  /*
807
  * Replace single- and double-quote delimited values
817
  else
818
  $markup_values['thumbnail_content'] = '';
819
 
820
+ $match_count = preg_match_all( '# width=\"([^\"]+)\" height=\"([^\"]+)\" src=\"([^\"]+)\" #', $markup_values['link'], $matches, PREG_OFFSET_CAPTURE );
821
  if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
822
  $markup_values['thumbnail_width'] = $matches[1][0][0];
823
  $markup_values['thumbnail_height'] = $matches[2][0][0];
838
  $extension = substr( $markup_values['file'], $last_dot + 1 );
839
  if ( in_array( $extension, $arguments['mla_viewer_extensions'] ) ) {
840
  $markup_values['thumbnail_content'] = sprintf( '<img src="http://docs.google.com/viewer?url=%1$s&a=bi&pagenumber=%2$d&w=%3$d">', $markup_values['filelink_url'], $arguments['mla_viewer_page'], $arguments['mla_viewer_width'] );
841
+ $target = !empty( $arguments['mla_target'] ) ? ' target= "' . $arguments['mla_target'] . '"' : '';
842
+ $markup_values['pagelink'] = sprintf( '<a href="%1$s" title="%2$s"%3$s>%4$s</a>', $markup_values['pagelink_url'], $markup_values['title'], $target, $markup_values['thumbnail_content'] );
843
+ $markup_values['filelink'] = sprintf( '<a href="%1$s" title="%2$s"%3$s>%4$s</a>', $markup_values['filelink_url'], $markup_values['title'], $target, $markup_values['thumbnail_content'] );
844
 
845
  if ( 'permalink' == $arguments['link'] )
846
  $markup_values['link'] = $markup_values['pagelink'];
880
  return $output;
881
  }
882
 
883
+ /**
884
+ * Handles brace/bracket escaping and parses template for a shortcode parameter
885
+ *
886
+ * @since 1.14
887
+ *
888
+ * @param string raw shortcode parameter, e.g., "text {+field+} {brackets} \\{braces\\}"
889
+ * @param string template substitution values, e.g., ('instance' => '1', ... )
890
+ *
891
+ * @return string query specification with HTML escape sequences and line breaks removed
892
+ */
893
+ private static function _process_shortcode_parameter( $text, $markup_values ) {
894
+ $new_text = str_replace( '{', '[', str_replace( '}', ']', $text ) );
895
+ $new_text = str_replace( '\[', '{', str_replace( '\]', '}', $new_text ) );
896
+ return MLAData::mla_parse_template( $new_text, $markup_values );
897
+ }
898
+
899
  /**
900
  * WP_Query filter "parameters"
901
  *
1117
  /*
1118
  * Extract taxonomy arguments
1119
  */
1120
+ $taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'names' ); // 'objects'
1121
  $query_arguments = array();
1122
  if ( ! empty( $attr ) ) {
1123
  foreach ( $attr as $key => $value ) {
1125
  if ( is_array( $value ) )
1126
  $query_arguments[ $key ] = $value;
1127
  else {
1128
+ $tax_query = NULL;
1129
  $value = self::_sanitize_query_specification( $value );
1130
  $function = @create_function('', 'return ' . $value . ';' );
 
1131
  if ( is_callable( $function ) )
1132
+ $tax_query = $function();
1133
+
1134
+ if ( is_array( $tax_query ) )
1135
+ $query_arguments[ $key ] = $tax_query;
1136
  else
1137
  return '<p>ERROR: invalid mla_gallery tax_query = ' . var_export( $value, true ) . '</p>';
1138
  } // not array
1308
  if ( is_array( $value ) )
1309
  $query_arguments[ $key ] = $value;
1310
  else {
1311
+ $meta_query = NULL;
1312
+ $value = self::_sanitize_query_specification( $value );
1313
  $function = @create_function('', 'return ' . $value . ';' );
 
1314
  if ( is_callable( $function ) )
1315
+ $meta_query = $function();
1316
+
1317
+ if ( is_array( $meta_query ) )
1318
+ $query_arguments[ $key ] = $meta_query;
1319
  else
1320
  return '<p>ERROR: invalid mla_gallery meta_query = ' . var_export( $value, true ) . '</p>';
1321
  } // not array
includes/class-mla-upload-list-table.php ADDED
@@ -0,0 +1,681 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Media Library Assistant extended List Table class
4
+ *
5
+ * @package Media Library Assistant
6
+ * @since 1.40
7
+ */
8
+
9
+ /*
10
+ * The WP_List_Table class isn't automatically available to plugins
11
+ */
12
+ if ( !class_exists( 'WP_List_Table' ) ) {
13
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
14
+ }
15
+
16
+ /**
17
+ * Class MLA (Media Library Assistant) Upload List Table implements the "Upload" admin settings tab
18
+ *
19
+ * Extends the core WP_List_Table class.
20
+ *
21
+ * @package Media Library Assistant
22
+ * @since 1.40
23
+ */
24
+ class MLA_Upload_List_Table extends WP_List_Table {
25
+ /*
26
+ * These arrays define the table columns.
27
+ */
28
+
29
+ /**
30
+ * Table column definitions
31
+ *
32
+ * This array defines table columns and titles where the key is the column slug (and class)
33
+ * and the value is the column's title text.
34
+ *
35
+ * @since 1.40
36
+ *
37
+ * @var array
38
+ */
39
+ private static $default_columns = array(
40
+ // '_title' => 'underscore title',
41
+ 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
42
+ 'icon' => '',
43
+ 'name' => 'Extension',
44
+ 'mime_type' => 'MIME Type',
45
+ 'icon_type' => 'Icon Type',
46
+ 'source' => 'Source',
47
+ 'status' => 'Status',
48
+ 'core_type' => 'WordPress Type',
49
+ 'mla_type' => 'MLA Type',
50
+ 'standard_source' => 'Std. Source',
51
+ 'core_icon_type' => 'Std. Icon Type',
52
+ 'description' => 'Description'
53
+ );
54
+
55
+ /**
56
+ * Default values for hidden columns
57
+ *
58
+ * This array is used when the user-level option is not set, i.e.,
59
+ * the user has not altered the selection of hidden columns.
60
+ *
61
+ * The value on the right-hand side must match the column slug, e.g.,
62
+ * array(0 => 'ID_parent, 1 => 'title_name').
63
+ *
64
+ * @since 1.40
65
+ *
66
+ * @var array
67
+ */
68
+ private static $default_hidden_columns = array(
69
+ // 'name',
70
+ // 'mime_type',
71
+ 'icon_type',
72
+ // 'source',
73
+ // 'status',
74
+ 'core_type',
75
+ 'mla_type',
76
+ 'standard_source',
77
+ 'core_icon_type',
78
+ 'description'
79
+ );
80
+
81
+ /**
82
+ * Sortable column definitions
83
+ *
84
+ * This array defines the table columns that can be sorted. The array key
85
+ * is the column slug that needs to be sortable, and the value is database column
86
+ * to sort by. Often, the key and value will be the same, but this is not always
87
+ * the case (as the value is a column name from the database, not the list table).
88
+ *
89
+ * The array value also contains a boolean which is 'true' if the data is currently
90
+ * sorted by that column. This is computed each time the table is displayed.
91
+ *
92
+ * @since 1.40
93
+ *
94
+ * @var array
95
+ */
96
+ private static $default_sortable_columns = array(
97
+ 'name' => array('slug',false),
98
+ 'mime_type' => array('mime_type',false),
99
+ 'icon_type' => array('icon_type',false),
100
+ 'source' => array('source',false),
101
+ 'status' => array('disabled',false),
102
+ 'core_type' => array('core_type',false),
103
+ 'mla_type' => array('mla_type',false),
104
+ 'standard_source' => array('standard_source',false),
105
+ 'core_icon_type' => array('core_icon_type',false),
106
+ 'description' => array('description',false)
107
+ );
108
+
109
+ /**
110
+ * Access the default list of hidden columns
111
+ *
112
+ * @since 1.40
113
+ *
114
+ * @return array default list of hidden columns
115
+ */
116
+ private static function _default_hidden_columns( ) {
117
+ return self::$default_hidden_columns;
118
+ }
119
+
120
+ /**
121
+ * Return the names and display values of the sortable columns
122
+ *
123
+ * @since 1.40
124
+ *
125
+ * @return array name => array( orderby value, heading ) for sortable columns
126
+ */
127
+ public static function mla_get_sortable_columns( )
128
+ {
129
+ $results = array() ;
130
+
131
+ foreach ( self::$default_sortable_columns as $key => $value ) {
132
+ $value[1] = self::$default_columns[ $key ];
133
+ $results[ $key ] = $value;
134
+ }
135
+
136
+ return $results;
137
+ }
138
+
139
+ /**
140
+ * Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-uploadcolumnshidden'
141
+ *
142
+ * Required because the screen.php get_hidden_columns function only uses
143
+ * the get_user_option result. Set when the file is loaded because the object
144
+ * is not created in time for the call from screen.php.
145
+ *
146
+ * @since 1.40
147
+ *
148
+ * @param mixed false or array with current list of hidden columns, if any
149
+ * @param string 'managesettings_page_mla-settings-menucolumnshidden'
150
+ * @param object WP_User object, if logged in
151
+ *
152
+ * @return array updated list of hidden columns
153
+ */
154
+ public static function mla_manage_hidden_columns_filter( $result, $option, $user_data ) {
155
+ if ( $result )
156
+ return $result;
157
+ else
158
+ return self::_default_hidden_columns();
159
+ }
160
+
161
+ /**
162
+ * Handler for filter 'manage_settings_page_mla-settings-menu_columns'
163
+ *
164
+ * This required filter dictates the table's columns and titles. Set when the
165
+ * file is loaded because the list_table object isn't created in time
166
+ * to affect the "screen options" setup.
167
+ *
168
+ * @since 1.40
169
+ *
170
+ * @return array list of table columns
171
+ */
172
+ public static function mla_manage_columns_filter( )
173
+ {
174
+ return self::$default_columns;
175
+ }
176
+
177
+ /**
178
+ * Called in the admin_init action because the list_table object isn't
179
+ * created in time to affect the "screen options" setup.
180
+ *
181
+ * @since 1.40
182
+ *
183
+ * @return void
184
+ */
185
+ public static function mla_admin_init_action( )
186
+ {
187
+ if ( isset( $_REQUEST['mla-optional-uploads-display'] ) || isset( $_REQUEST['mla-optional-uploads-search'] ) )
188
+ return;
189
+
190
+ if ( isset( $_REQUEST['mla_tab'] ) && $_REQUEST['mla_tab'] == 'upload' ) {
191
+ add_filter( 'get_user_option_managesettings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-uploadcolumnshidden', 'MLA_Upload_list_Table::mla_manage_hidden_columns_filter', 10, 3 );
192
+ add_filter( 'manage_settings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-upload_columns', 'MLA_Upload_list_Table::mla_manage_columns_filter', 10, 0 );
193
+ }
194
+ }
195
+
196
+ /**
197
+ * Initializes some properties from $_REQUEST variables, then
198
+ * calls the parent constructor to set some default configs.
199
+ *
200
+ * @since 1.40
201
+ *
202
+ * @return void
203
+ */
204
+ function __construct( ) {
205
+ //Set parent defaults
206
+ parent::__construct( array(
207
+ 'singular' => 'upload_type', //singular name of the listed records
208
+ 'plural' => 'upload_types', //plural name of the listed records
209
+ 'ajax' => true, //does this table support ajax?
210
+ 'screen' => 'settings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-upload'
211
+ ) );
212
+
213
+ /*
214
+ * NOTE: There is one add_action call at the end of this source file.
215
+ * NOTE: There are two add_filter calls at the end of this source file.
216
+ */
217
+ }
218
+
219
+ /**
220
+ * Supply a column value if no column-specific function has been defined
221
+ *
222
+ * Called when the parent class can't find a method specifically built for a
223
+ * given column. All columns should have a specific method, so this function
224
+ * returns a troubleshooting message.
225
+ *
226
+ * @since 1.40
227
+ *
228
+ * @param array A singular item (one full row's worth of data)
229
+ * @param array The name/slug of the column to be processed
230
+ * @return string Text or HTML to be placed inside the column
231
+ */
232
+ function column_default( $item, $column_name ) {
233
+ //Show the whole array for troubleshooting purposes
234
+ return 'column_default: ' . $column_name . ', ' . print_r( $item, true );
235
+ }
236
+
237
+ /**
238
+ * Displays checkboxes for using bulk actions. The 'cb' column
239
+ * is given special treatment when columns are processed.
240
+ *
241
+ * @since 1.40
242
+ *
243
+ * @param object An MLA upload_type object
244
+ * @return string HTML markup to be placed inside the column
245
+ */
246
+ function column_cb( $item )
247
+ {
248
+ return sprintf( '<input type="checkbox" name="cb_mla_item_ID[]" value="%1$s" />',
249
+ /*%1$s*/ $item->post_ID
250
+ );
251
+ }
252
+
253
+ /**
254
+ * Supply the content for a custom column
255
+ *
256
+ * @since 0.1
257
+ *
258
+ * @param array A singular attachment (post) object
259
+ * @return string HTML markup to be placed inside the column
260
+ */
261
+ function column_icon( $item )
262
+ {
263
+ return MLAMime::mla_get_icon_type_image( $item->icon_type );
264
+ }
265
+
266
+ /**
267
+ * Add rollover actions to a table column
268
+ *
269
+ * @since 1.40
270
+ *
271
+ * @param object An MLA upload_type object
272
+ * @param string Current column name
273
+ *
274
+ * @return array Names and URLs of row-level actions
275
+ */
276
+ private function _build_rollover_actions( $item, $column ) {
277
+ $actions = array();
278
+
279
+ /*
280
+ * Compose view arguments
281
+ */
282
+
283
+ $view_args = array(
284
+ 'page' => MLASettings::MLA_SETTINGS_SLUG . '-upload',
285
+ 'mla_tab' => 'upload',
286
+ 'mla_item_slug' => urlencode( $item->slug )
287
+ );
288
+
289
+ if ( isset( $_REQUEST['paged'] ) )
290
+ $view_args['paged'] = $_REQUEST['paged'];
291
+
292
+ if ( isset( $_REQUEST['order'] ) )
293
+ $view_args['order'] = $_REQUEST['order'];
294
+
295
+ if ( isset( $_REQUEST['orderby'] ) )
296
+ $view_args['orderby'] = $_REQUEST['orderby'];
297
+
298
+ $actions['edit'] = '<a href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY, MLA::MLA_ADMIN_NONCE ) ) . '" title="Edit this item">Edit</a>';
299
+
300
+ $actions['inline hide-if-no-js'] = '<a class="editinline" href="#" title="Edit this item inline">Quick Edit</a>';
301
+
302
+ if ( 'custom' == $item->source ) {
303
+ if ( empty( $item->standard_source ) )
304
+ $actions['delete'] = '<a class="delete-tag"' . ' href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_DELETE, MLA::MLA_ADMIN_NONCE ) ) . '" title="Delete this item permanently">Delete Permanently</a>';
305
+ else
306
+ $actions['delete'] = '<a class="delete-tag"' . ' href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_DELETE, MLA::MLA_ADMIN_NONCE ) ) . '" title="Revert to standard item">Revert to Standard</a>';
307
+ }
308
+
309
+ return $actions;
310
+ }
311
+
312
+ /**
313
+ * Add hidden fields with the data for use in the inline editor
314
+ *
315
+ * @since 1.40
316
+ *
317
+ * @param object An MLA upload_type object
318
+ *
319
+ * @return string HTML <div> with row data
320
+ */
321
+ private function _build_inline_data( $item ) {
322
+ $inline_data = "\r\n" . '<div class="hidden" id="inline_' . $item->post_ID . "\">\r\n";
323
+ $inline_data .= ' <div class="original_slug">' . esc_attr( $item->slug ) . "</div>\r\n";
324
+ $inline_data .= ' <div class="slug">' . esc_attr( $item->slug ) . "</div>\r\n";
325
+ $inline_data .= ' <div class="mime_type">' . esc_attr( $item->mime_type ) . "</div>\r\n";
326
+ $inline_data .= ' <div class="icon_type">' . esc_attr( $item->icon_type ) . "</div>\r\n";
327
+ $inline_data .= ' <div class="core_type">' . esc_attr( $item->core_type ) . "</div>\r\n";
328
+ $inline_data .= ' <div class="mla_type">' . esc_attr( $item->mla_type ) . "</div>\r\n";
329
+ $inline_data .= ' <div class="source">' . esc_attr( $item->source ) . "</div>\r\n";
330
+ $inline_data .= ' <div class="standard_source">' . esc_attr( $item->standard_source ) . "</div>\r\n";
331
+ $inline_data .= ' <div class="disabled">' . esc_attr( $item->disabled ) . "</div>\r\n";
332
+ $inline_data .= ' <div class="description">' . esc_attr( $item->description ) . "</div>\r\n";
333
+ $inline_data .= ' <div class="wp_icon_type">' . esc_attr( $item->wp_icon_type ) . "</div>\r\n";
334
+ $inline_data .= ' <div class="mla_icon_type">' . esc_attr( $item->mla_icon_type ) . "</div>\r\n";
335
+ $inline_data .= ' <div class="core_icon_type">' . esc_attr( $item->core_icon_type ) . "</div>\r\n";
336
+ $inline_data .= "</div>\r\n";
337
+ return $inline_data;
338
+ }
339
+
340
+ /**
341
+ * Supply the content for a custom column
342
+ *
343
+ * @since 1.40
344
+ *
345
+ * @param object An MLA upload_type object
346
+ * @return string HTML markup to be placed inside the column
347
+ */
348
+ function column_name( $item ) {
349
+ $row_actions = self::_build_rollover_actions( $item, 'name' );
350
+ $slug = esc_attr( $item->slug );
351
+ return sprintf( '%1$s<br>%2$s%3$s', /*%1$s*/ $slug, /*%2$s*/ $this->row_actions( $row_actions ), /*%3$s*/ $this->_build_inline_data( $item ) );
352
+ }
353
+
354
+ /**
355
+ * Supply the content for a custom column
356
+ *
357
+ * @since 1.40
358
+ *
359
+ * @param object An MLA upload_type object
360
+ * @return string HTML markup to be placed inside the column
361
+ */
362
+ function column_mime_type( $item ) {
363
+ return esc_attr( $item->mime_type );
364
+ }
365
+
366
+ /**
367
+ * Supply the content for a custom column
368
+ *
369
+ * @since 1.40
370
+ *
371
+ * @param object An MLA upload_type object
372
+ * @return string HTML markup to be placed inside the column
373
+ */
374
+ function column_icon_type( $item ) {
375
+ return esc_attr( $item->icon_type );
376
+ }
377
+
378
+ /**
379
+ * Supply the content for a custom column
380
+ *
381
+ * @since 1.40
382
+ *
383
+ * @param object An MLA upload_type object
384
+ * @return string HTML markup to be placed inside the column
385
+ */
386
+ function column_source( $item ) {
387
+ return esc_attr( $item->source );
388
+ }
389
+
390
+ /**
391
+ * Supply the content for a custom column
392
+ *
393
+ * @since 1.40
394
+ *
395
+ * @param object An MLA upload_type object
396
+ * @return string HTML markup to be placed inside the column
397
+ */
398
+ function column_status( $item ) {
399
+ if ( $item->disabled )
400
+ return 'inactive';
401
+ else
402
+ return 'active';
403
+ }
404
+
405
+ /**
406
+ * Supply the content for a custom column
407
+ *
408
+ * @since 1.40
409
+ *
410
+ * @param object An MLA upload_type object
411
+ * @return string HTML markup to be placed inside the column
412
+ */
413
+ function column_core_type( $item ) {
414
+ return esc_attr( $item->core_type );
415
+ }
416
+
417
+ /**
418
+ * Supply the content for a custom column
419
+ *
420
+ * @since 1.40
421
+ *
422
+ * @param object An MLA upload_type object
423
+ * @return string HTML markup to be placed inside the column
424
+ */
425
+ function column_mla_type( $item ) {
426
+ return esc_attr( $item->mla_type );
427
+ }
428
+
429
+ /**
430
+ * Supply the content for a custom column
431
+ *
432
+ * @since 1.40
433
+ *
434
+ * @param object An MLA upload_type object
435
+ * @return string HTML markup to be placed inside the column
436
+ */
437
+ function column_standard_source( $item ) {
438
+ return (string) $item->standard_source;
439
+ }
440
+
441
+ /**
442
+ * Supply the content for a custom column
443
+ *
444
+ * @since 1.40
445
+ *
446
+ * @param object An MLA upload_type object
447
+ * @return string HTML markup to be placed inside the column
448
+ */
449
+ function column_core_icon_type( $item ) {
450
+ return esc_attr( $item->core_icon_type );
451
+ }
452
+
453
+ /**
454
+ * Supply the content for a custom column
455
+ *
456
+ * @since 1.40
457
+ *
458
+ * @param object An MLA upload_type object
459
+ * @return string HTML markup to be placed inside the column
460
+ */
461
+ function column_description( $item ) {
462
+ return esc_attr( $item->description );
463
+ }
464
+
465
+ /**
466
+ * This method dictates the table's columns and titles
467
+ *
468
+ * @since 1.40
469
+ *
470
+ * @return array Column information: 'slugs'=>'Visible Titles'
471
+ */
472
+ function get_columns( ) {
473
+ return MLA_Upload_list_Table::mla_manage_columns_filter();
474
+ }
475
+
476
+ /**
477
+ * Returns the list of currently hidden columns from a user option or
478
+ * from default values if the option is not set
479
+ *
480
+ * @since 1.40
481
+ *
482
+ * @return array Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')
483
+ */
484
+ function get_hidden_columns( )
485
+ {
486
+ $columns = get_user_option( 'managesettings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-uploadcolumnshidden' );
487
+
488
+ if ( is_array( $columns ) ) {
489
+ return $columns;
490
+ }
491
+ else
492
+ return self::_default_hidden_columns();
493
+ }
494
+
495
+ /**
496
+ * Returns an array where the key is the column that needs to be sortable
497
+ * and the value is db column to sort by. Also notes the current sort column,
498
+ * if set.
499
+ *
500
+ * @since 1.40
501
+ *
502
+ * @return array Sortable column information,e.g.,
503
+ * 'slugs'=>array('data_values',boolean)
504
+ */
505
+ function get_sortable_columns( ) {
506
+ $columns = self::$default_sortable_columns;
507
+
508
+ if ( isset( $_REQUEST['orderby'] ) ) {
509
+ $needle = array(
510
+ $_REQUEST['orderby'],
511
+ false
512
+ );
513
+ $key = array_search( $needle, $columns );
514
+ if ( $key )
515
+ $columns[ $key ][ 1 ] = true;
516
+ } else {
517
+ $columns['menu_order'][ 1 ] = true;
518
+ }
519
+
520
+ return $columns;
521
+ }
522
+
523
+ /**
524
+ * Returns HTML markup for one view that can be used with this table
525
+ *
526
+ * @since 1.40
527
+ *
528
+ * @param string View slug
529
+ * @param array count and labels for the View
530
+ * @param string Slug for current view
531
+ *
532
+ * @return string | false HTML for link to display the view, false if count = zero
533
+ */
534
+ function _get_view( $view_slug, $upload_item, $current_view ) {
535
+ static $base_url = NULL;
536
+
537
+ $class = ( $view_slug == $current_view ) ? ' class="current"' : '';
538
+
539
+ /*
540
+ * Calculate the common values once per page load
541
+ */
542
+ if ( is_null( $base_url ) ) {
543
+ /*
544
+ * Remember the view filters
545
+ */
546
+ $base_url = 'options-general.php?page=' . MLASettings::MLA_SETTINGS_SLUG . '-upload&mla_tab=upload';
547
+
548
+ if ( isset( $_REQUEST['s'] ) )
549
+ $base_url = add_query_arg( array(
550
+ 's' => $_REQUEST['s']
551
+ ), $base_url );
552
+ }
553
+
554
+ $singular = sprintf('%s <span class="count">(%%s)</span>', $upload_item['singular'] );
555
+ $plural = sprintf('%s <span class="count">(%%s)</span>', $upload_item['plural'] );
556
+ $nooped_plural = _n_noop( $singular, $plural );
557
+ return "<a href='" . add_query_arg( array( 'mla_upload_view' => $view_slug ), $base_url )
558
+ . "'$class>" . sprintf( translate_nooped_plural( $nooped_plural, $upload_item['count'] ), number_format_i18n( $upload_item['count'] ) ) . '</a>';
559
+ } // _get_view
560
+
561
+ /**
562
+ * Returns an associative array listing all the views that can be used with this table.
563
+ * These are listed across the top of the page and managed by WordPress.
564
+ *
565
+ * @since 1.40
566
+ *
567
+ * @return array View information,e.g., array ( id => link )
568
+ */
569
+ function get_views( ) {
570
+ /*
571
+ * Find current view
572
+ */
573
+ $current_view = isset( $_REQUEST['mla_upload_view'] ) ? $_REQUEST['mla_upload_view'] : 'all';
574
+
575
+ /*
576
+ * Generate the list of views, retaining keyword search criterion
577
+ */
578
+ $s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : '';
579
+ $upload_items = MLAMime::mla_tabulate_upload_items( $s );
580
+ $view_links = array();
581
+ foreach( $upload_items as $slug => $item )
582
+ $view_links[ $slug ] = self::_get_view( $slug, $item, $current_view );
583
+
584
+ return $view_links;
585
+ }
586
+
587
+ /**
588
+ * Get an associative array ( option_name => option_title ) with the list
589
+ * of bulk actions available on this table.
590
+ *
591
+ * @since 1.40
592
+ *
593
+ * @return array Contains all the bulk actions: 'slugs'=>'Visible Titles'
594
+ */
595
+ function get_bulk_actions( )
596
+ {
597
+ $actions = array();
598
+
599
+ $actions['edit'] = 'Edit';
600
+ $actions['delete'] = 'Delete/Revert Custom';
601
+
602
+ return $actions;
603
+ }
604
+
605
+ /**
606
+ * Prepares the list of items for displaying
607
+ *
608
+ * This is where you prepare your data for display. This method will usually
609
+ * be used to query the database, sort and filter the data, and generally
610
+ * get it ready to be displayed. At a minimum, we should set $this->items and
611
+ * $this->set_pagination_args().
612
+ *
613
+ * @since 1.40
614
+ *
615
+ * @return void
616
+ */
617
+ function prepare_items( ) {
618
+ $this->_column_headers = array(
619
+ $this->get_columns(),
620
+ $this->get_hidden_columns(),
621
+ $this->get_sortable_columns()
622
+ );
623
+
624
+ /*
625
+ * REQUIRED for pagination.
626
+ */
627
+ $total_items = MLAMime::mla_count_upload_items( $_REQUEST );
628
+ $user = get_current_user_id();
629
+ $screen = get_current_screen();
630
+ $option = $screen->get_option( 'per_page', 'option' );
631
+ if ( is_string( $option ) )
632
+ $per_page = get_user_meta( $user, $option, true );
633
+ else
634
+ $per_page = 10;
635
+
636
+ if ( empty( $per_page ) || $per_page < 1 )
637
+ $per_page = $screen->get_option( 'per_page', 'default' );
638
+
639
+ /*
640
+ * REQUIRED. We also have to register our pagination options & calculations.
641
+ */
642
+ $this->set_pagination_args( array(
643
+ 'total_items' => $total_items,
644
+ 'per_page' => $per_page,
645
+ 'total_pages' => ceil( $total_items / $per_page )
646
+ ) );
647
+
648
+ $current_page = $this->get_pagenum();
649
+
650
+ /*
651
+ * REQUIRED. Assign sorted and paginated data to the items property, where
652
+ * it can be used by the rest of the class.
653
+ */
654
+ $this->items = MLAMime::mla_query_upload_items( $_REQUEST, ( ( $current_page - 1 ) * $per_page ), $per_page );
655
+ }
656
+
657
+ /**
658
+ * Generates (echoes) content for a single row of the table
659
+ *
660
+ * @since 1.40
661
+ *
662
+ * @param object the current item
663
+ *
664
+ * @return void Echoes the row HTML
665
+ */
666
+ function single_row( $item ) {
667
+ static $row_class = '';
668
+ $row_class = ( $row_class == '' ? ' class="alternate"' : '' );
669
+
670
+ echo '<tr id="upload-' . $item->post_ID . '"' . $row_class . '>';
671
+ echo parent::single_row_columns( $item );
672
+ echo '</tr>';
673
+ }
674
+ } // class MLA_Upload_List_Table
675
+
676
+ /*
677
+ * Actions are added here, when the source file is loaded, because the MLA_Upload_list_Table
678
+ * object is created too late to be useful.
679
+ */
680
+ add_action( 'admin_init', 'MLA_Upload_list_Table::mla_admin_init_action' );
681
+ ?>
includes/class-mla-upload-optional-list-table.php ADDED
@@ -0,0 +1,486 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Media Library Assistant extended List Table class
4
+ *
5
+ * @package Media Library Assistant
6
+ * @since 1.40
7
+ */
8
+
9
+ /*
10
+ * The WP_List_Table class isn't automatically available to plugins
11
+ */
12
+ if ( !class_exists( 'WP_List_Table' ) ) {
13
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
14
+ }
15
+
16
+ /**
17
+ * Class MLA (Media Library Assistant) Upload Optional List Table implements the
18
+ * searchable database of exension/type associations for the "Uploads" admin settings tab
19
+ *
20
+ * Extends the core WP_List_Table class.
21
+ *
22
+ * @package Media Library Assistant
23
+ * @since 1.40
24
+ */
25
+ class MLA_Upload_Optional_List_Table extends WP_List_Table {
26
+ /*
27
+ * These arrays define the table columns.
28
+ */
29
+
30
+ /**
31
+ * Table column definitions
32
+ *
33
+ * This array defines table columns and titles where the key is the column slug (and class)
34
+ * and the value is the column's title text.
35
+ *
36
+ * @since 1.40
37
+ *
38
+ * @var array
39
+ */
40
+ private static $default_columns = array(
41
+ 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
42
+ 'name' => 'Extension',
43
+ 'mime_type' => 'MIME Type',
44
+ 'core_type' => 'WordPress Type',
45
+ 'mla_type' => 'MLA Type',
46
+ 'description' => 'Description'
47
+ );
48
+
49
+ /**
50
+ * Default values for hidden columns
51
+ *
52
+ * This array is used when the user-level option is not set, i.e.,
53
+ * the user has not altered the selection of hidden columns.
54
+ *
55
+ * The value on the right-hand side must match the column slug, e.g.,
56
+ * array(0 => 'ID_parent, 1 => 'title_name').
57
+ *
58
+ * @since 1.40
59
+ *
60
+ * @var array
61
+ */
62
+ private static $default_hidden_columns = array(
63
+ // 'name',
64
+ // 'mime_type',
65
+ // 'core_type',
66
+ // 'mla_type',
67
+ // 'description'
68
+ );
69
+
70
+ /**
71
+ * Sortable column definitions
72
+ *
73
+ * This array defines the table columns that can be sorted. The array key
74
+ * is the column slug that needs to be sortable, and the value is database column
75
+ * to sort by. Often, the key and value will be the same, but this is not always
76
+ * the case (as the value is a column name from the database, not the list table).
77
+ *
78
+ * The array value also contains a boolean which is 'true' if the data is currently
79
+ * sorted by that column. This is computed each time the table is displayed.
80
+ *
81
+ * @since 1.40
82
+ *
83
+ * @var array
84
+ */
85
+ private static $default_sortable_columns = array(
86
+ 'name' => array('slug',false),
87
+ 'mime_type' => array('mime_type',false),
88
+ 'core_type' => array('core_type',false),
89
+ 'mla_type' => array('mla_type',false),
90
+ 'description' => array('description',false)
91
+ );
92
+
93
+ /**
94
+ * Access the default list of hidden columns
95
+ *
96
+ * @since 1.40
97
+ *
98
+ * @return array default list of hidden columns
99
+ */
100
+ private static function _default_hidden_columns( ) {
101
+ return self::$default_hidden_columns;
102
+ }
103
+
104
+ /**
105
+ * Return the names and display values of the sortable columns
106
+ *
107
+ * @since 1.40
108
+ *
109
+ * @return array name => array( orderby value, heading ) for sortable columns
110
+ */
111
+ public static function mla_get_sortable_columns( )
112
+ {
113
+ $results = array() ;
114
+
115
+ foreach ( self::$default_sortable_columns as $key => $value ) {
116
+ $value[1] = self::$default_columns[ $key ];
117
+ $results[ $key ] = $value;
118
+ }
119
+
120
+ return $results;
121
+ }
122
+
123
+ /**
124
+ * Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-viewcolumnshidden'
125
+ *
126
+ * Required because the screen.php get_hidden_columns function only uses
127
+ * the get_user_option result. Set when the file is loaded because the object
128
+ * is not created in time for the call from screen.php.
129
+ *
130
+ * @since 1.40
131
+ *
132
+ * @param mixed false or array with current list of hidden columns, if any
133
+ * @param string 'managesettings_page_mla-settings-menucolumnshidden'
134
+ * @param object WP_User object, if logged in
135
+ *
136
+ * @return array updated list of hidden columns
137
+ */
138
+ public static function mla_manage_hidden_columns_filter( $result, $option, $user_data ) {
139
+ return $result;
140
+
141
+ if ( $result )
142
+ return $result;
143
+ else
144
+ return self::_default_hidden_columns();
145
+ }
146
+
147
+ /**
148
+ * Handler for filter 'manage_settings_page_mla-settings-menu_columns'
149
+ *
150
+ * This required filter dictates the table's columns and titles. Set when the
151
+ * file is loaded because the list_table object isn't created in time
152
+ * to affect the "screen options" setup.
153
+ *
154
+ * @since 1.40
155
+ *
156
+ * @return array list of table columns
157
+ */
158
+ public static function mla_manage_columns_filter( )
159
+ {
160
+ return self::$default_columns;
161
+ }
162
+
163
+ /**
164
+ * Called in the admin_init action because the list_table object isn't
165
+ * created in time to affect the "screen options" setup.
166
+ *
167
+ * @since 1.40
168
+ *
169
+ * @return void
170
+ */
171
+ public static function mla_admin_init_action( )
172
+ {
173
+ if ( isset( $_REQUEST['mla-optional-uploads-display'] ) || isset( $_REQUEST['mla-optional-uploads-search'] ) ) {
174
+ add_filter( 'get_user_option_managesettings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-uploadcolumnshidden', 'MLA_Upload_Optional_List_Table::mla_manage_hidden_columns_filter', 10, 3 );
175
+ add_filter( 'manage_settings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-upload_columns', 'MLA_Upload_Optional_List_Table::mla_manage_columns_filter', 10, 0 );
176
+ }
177
+ }
178
+
179
+ /**
180
+ * Initializes some properties from $_REQUEST variables, then
181
+ * calls the parent constructor to set some default configs.
182
+ *
183
+ * @since 1.40
184
+ *
185
+ * @return void
186
+ */
187
+ function __construct( ) {
188
+ //Set parent defaults
189
+ parent::__construct( array(
190
+ 'singular' => 'optional_upload_type', //singular name of the listed records
191
+ 'plural' => 'optional_upload_types', //plural name of the listed records
192
+ 'ajax' => false, //does this table support ajax?
193
+ 'screen' => 'settings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-upload'
194
+ ) );
195
+
196
+ /*
197
+ * NOTE: There is one add_action call at the end of this source file.
198
+ * NOTE: There are two add_filter calls at the end of this source file.
199
+ */
200
+ }
201
+
202
+ /**
203
+ * Supply a column value if no column-specific function has been defined
204
+ *
205
+ * Called when the parent class can't find a method specifically built for a
206
+ * given column. All columns should have a specific method, so this function
207
+ * returns a troubleshooting message.
208
+ *
209
+ * @since 1.40
210
+ *
211
+ * @param array A singular item (one full row's worth of data)
212
+ * @param array The name/slug of the column to be processed
213
+ * @return string Text or HTML to be placed inside the column
214
+ */
215
+ function column_default( $item, $column_name ) {
216
+ //Show the whole array for troubleshooting purposes
217
+ return 'column_default: ' . $column_name . ', ' . print_r( $item, true );
218
+ }
219
+
220
+ /**
221
+ * Displays checkboxes for using bulk actions. The 'cb' column
222
+ * is given special treatment when columns are processed.
223
+ *
224
+ * @since 1.40
225
+ *
226
+ * @param object An MLA post_mime_type object
227
+ * @return string HTML markup to be placed inside the column
228
+ */
229
+ function column_cb( $item )
230
+ {
231
+ return sprintf( '<input type="checkbox" name="cb_mla_item_ID[]" value="%1$s" />',
232
+ /*%1$s*/ $item->ID
233
+ );
234
+ }
235
+
236
+ /**
237
+ * Add rollover actions to a table column
238
+ *
239
+ * @since 1.40
240
+ *
241
+ * @param object An MLA post_mime_type object
242
+ * @param string Current column name
243
+ *
244
+ * @return array Names and URLs of row-level actions
245
+ */
246
+ private function _build_rollover_actions( $item, $column ) {
247
+ $actions = array();
248
+
249
+ /*
250
+ * Compose view arguments
251
+ */
252
+
253
+ $view_args = array(
254
+ 'page' => MLASettings::MLA_SETTINGS_SLUG . '-upload',
255
+ 'mla_tab' => 'upload',
256
+ 'mla_item_ID' => urlencode( $item->ID )
257
+ );
258
+
259
+ if ( isset( $_REQUEST['paged'] ) )
260
+ $view_args['paged'] = $_REQUEST['paged'];
261
+
262
+ if ( isset( $_REQUEST['order'] ) )
263
+ $view_args['order'] = $_REQUEST['order'];
264
+
265
+ if ( isset( $_REQUEST['orderby'] ) )
266
+ $view_args['orderby'] = $_REQUEST['orderby'];
267
+
268
+ $actions['select'] = '<a href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_EDIT_UPDATE, MLA::MLA_ADMIN_NONCE ) ) . '" title="Select this entry">Select</a>';
269
+
270
+ return $actions;
271
+ }
272
+
273
+ /**
274
+ * Supply the content for a custom column
275
+ *
276
+ * @since 1.40
277
+ *
278
+ * @param object An MLA post_mime_type object
279
+ * @return string HTML markup to be placed inside the column
280
+ */
281
+ function column_name( $item ) {
282
+ $row_actions = self::_build_rollover_actions( $item, 'name' );
283
+ $slug = esc_attr( $item->slug );
284
+ return sprintf( '%1$s<br>%2$s', /*%1$s*/ $slug, /*%2$s*/ $this->row_actions( $row_actions ) );
285
+ }
286
+
287
+ /**
288
+ * Supply the content for a custom column
289
+ *
290
+ * @since 1.40
291
+ *
292
+ * @param object An MLA post_mime_type object
293
+ * @return string HTML markup to be placed inside the column
294
+ */
295
+ function column_mime_type( $item ) {
296
+ return esc_attr( $item->mime_type );
297
+ }
298
+
299
+ /**
300
+ * Supply the content for a custom column
301
+ *
302
+ * @since 1.40
303
+ *
304
+ * @param object An MLA post_mime_type object
305
+ * @return string HTML markup to be placed inside the column
306
+ */
307
+ function column_core_type( $item ) {
308
+ return esc_attr( $item->core_type );
309
+ }
310
+
311
+ /**
312
+ * Supply the content for a custom column
313
+ *
314
+ * @since 1.40
315
+ *
316
+ * @param object An MLA post_mime_type object
317
+ * @return string HTML markup to be placed inside the column
318
+ */
319
+ function column_mla_type( $item ) {
320
+ return esc_attr( $item->mla_type );
321
+ }
322
+
323
+ /**
324
+ * Supply the content for a custom column
325
+ *
326
+ * @since 1.40
327
+ *
328
+ * @param object An MLA post_mime_type object
329
+ * @return string HTML markup to be placed inside the column
330
+ */
331
+ function column_description( $item ) {
332
+ return esc_attr( $item->description );
333
+ }
334
+
335
+ /**
336
+ * This method dictates the table's columns and titles
337
+ *
338
+ * @since 1.40
339
+ *
340
+ * @return array Column information: 'slugs'=>'Visible Titles'
341
+ */
342
+ function get_columns( ) {
343
+ return $columns = MLA_Upload_Optional_List_Table::mla_manage_columns_filter();
344
+ }
345
+
346
+ /**
347
+ * Returns the list of currently hidden columns from a user option or
348
+ * from default values if the option is not set
349
+ *
350
+ * @since 1.40
351
+ *
352
+ * @return array Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')
353
+ */
354
+ function get_hidden_columns( )
355
+ {
356
+ $columns = get_user_option( 'managesettings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-viewcolumnshidden' );
357
+
358
+ if ( is_array( $columns ) ) {
359
+ return $columns;
360
+ }
361
+ else
362
+ return self::_default_hidden_columns();
363
+ }
364
+
365
+ /**
366
+ * Returns an array where the key is the column that needs to be sortable
367
+ * and the value is db column to sort by. Also notes the current sort column,
368
+ * if set.
369
+ *
370
+ * @since 1.40
371
+ *
372
+ * @return array Sortable column information,e.g.,
373
+ * 'slugs'=>array('data_values',boolean)
374
+ */
375
+ function get_sortable_columns( ) {
376
+ $columns = self::$default_sortable_columns;
377
+
378
+ if ( isset( $_REQUEST['orderby'] ) ) {
379
+ $needle = array(
380
+ $_REQUEST['orderby'],
381
+ false
382
+ );
383
+ $key = array_search( $needle, $columns );
384
+ if ( $key )
385
+ $columns[ $key ][ 1 ] = true;
386
+ } else {
387
+ $columns['menu_order'][ 1 ] = true;
388
+ }
389
+
390
+ return $columns;
391
+ }
392
+
393
+ /**
394
+ * Get an associative array ( option_name => option_title ) with the list
395
+ * of bulk actions available on this table.
396
+ *
397
+ * @since 1.40
398
+ *
399
+ * @return array Contains all the bulk actions: 'slugs'=>'Visible Titles'
400
+ */
401
+ function get_bulk_actions( )
402
+ {
403
+ $actions = array();
404
+
405
+ $actions['select'] = 'Select these entries';
406
+
407
+ return $actions;
408
+ }
409
+
410
+ /**
411
+ * Prepares the list of items for displaying
412
+ *
413
+ * This is where you prepare your data for display. This method will usually
414
+ * be used to query the database, sort and filter the data, and generally
415
+ * get it ready to be displayed. At a minimum, we should set $this->items and
416
+ * $this->set_pagination_args().
417
+ *
418
+ * @since 1.40
419
+ *
420
+ * @return void
421
+ */
422
+ function prepare_items( ) {
423
+ $this->_column_headers = array(
424
+ $this->get_columns(),
425
+ $this->get_hidden_columns(),
426
+ $this->get_sortable_columns()
427
+ );
428
+
429
+ /*
430
+ * REQUIRED for pagination.
431
+ */
432
+ $total_items = MLAMime::mla_count_optional_upload_items( $_REQUEST );
433
+ $user = get_current_user_id();
434
+ $screen = get_current_screen();
435
+ $option = $screen->get_option( 'per_page', 'option' );
436
+ if ( is_string( $option ) )
437
+ $per_page = get_user_meta( $user, $option, true );
438
+ else
439
+ $per_page = 10;
440
+
441
+ if ( empty( $per_page ) || $per_page < 1 )
442
+ $per_page = $screen->get_option( 'per_page', 'default' );
443
+
444
+ /*
445
+ * REQUIRED. We also have to register our pagination options & calculations.
446
+ */
447
+ $this->set_pagination_args( array(
448
+ 'total_items' => $total_items,
449
+ 'per_page' => $per_page,
450
+ 'total_pages' => ceil( $total_items / $per_page )
451
+ ) );
452
+
453
+ $current_page = $this->get_pagenum();
454
+
455
+ /*
456
+ * REQUIRED. Assign sorted and paginated data to the items property, where
457
+ * it can be used by the rest of the class.
458
+ */
459
+ $this->items = MLAMime::mla_query_optional_upload_items( $_REQUEST, ( ( $current_page - 1 ) * $per_page ), $per_page );
460
+ }
461
+
462
+ /**
463
+ * Generates (echoes) content for a single row of the table
464
+ *
465
+ * @since 1.40
466
+ *
467
+ * @param object the current item
468
+ *
469
+ * @return void Echoes the row HTML
470
+ */
471
+ function single_row( $item ) {
472
+ static $row_class = '';
473
+ $row_class = ( $row_class == '' ? ' class="alternate"' : '' );
474
+
475
+ echo '<tr id="optional-upload-' . $item->ID . '"' . $row_class . '>';
476
+ echo parent::single_row_columns( $item );
477
+ echo '</tr>';
478
+ }
479
+ } // class MLA_Upload_Optional_List_Table
480
+
481
+ /*
482
+ * Actions are added here, when the source file is loaded, because the MLA_Upload_Optional_List_Table
483
+ * object is created too late to be useful.
484
+ */
485
+ add_action( 'admin_init', 'MLA_Upload_Optional_List_Table::mla_admin_init_action' );
486
+ ?>
includes/class-mla-view-list-table.php ADDED
@@ -0,0 +1,579 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Media Library Assistant extended List Table class
4
+ *
5
+ * @package Media Library Assistant
6
+ * @since 1.40
7
+ */
8
+
9
+ /*
10
+ * The WP_List_Table class isn't automatically available to plugins
11
+ */
12
+ if ( !class_exists( 'WP_List_Table' ) ) {
13
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
14
+ }
15
+
16
+ /**
17
+ * Class MLA (Media Library Assistant) View List Table implements the "Views" admin settings tab
18
+ *
19
+ * Extends the core WP_List_Table class.
20
+ *
21
+ * @package Media Library Assistant
22
+ * @since 1.40
23
+ */
24
+ class MLA_View_List_Table extends WP_List_Table {
25
+ /*
26
+ * These arrays define the table columns.
27
+ */
28
+
29
+ /**
30
+ * Table column definitions
31
+ *
32
+ * This array defines table columns and titles where the key is the column slug (and class)
33
+ * and the value is the column's title text.
34
+ *
35
+ * @since 1.40
36
+ *
37
+ * @var array
38
+ */
39
+ private static $default_columns = array(
40
+ 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
41
+ 'name' => 'Slug',
42
+ 'specification' => 'Specification',
43
+ 'post_mime_type' => 'Post Mime',
44
+ 'table_view' => 'Table View',
45
+ 'singular' => 'Singular Name',
46
+ 'plural' => 'Plural Name',
47
+ 'menu_order' => 'Order',
48
+ 'description' => 'Description'
49
+ );
50
+
51
+ /**
52
+ * Default values for hidden columns
53
+ *
54
+ * This array is used when the user-level option is not set, i.e.,
55
+ * the user has not altered the selection of hidden columns.
56
+ *
57
+ * The value on the right-hand side must match the column slug, e.g.,
58
+ * array(0 => 'ID_parent, 1 => 'title_name').
59
+ *
60
+ * @since 1.40
61
+ *
62
+ * @var array
63
+ */
64
+ private static $default_hidden_columns = array(
65
+ // 'name',
66
+ // 'specification',
67
+ // 'post_mime_type',
68
+ // 'table_view',
69
+ 'singular',
70
+ // 'plural',
71
+ 'menu_order',
72
+ 'description'
73
+ );
74
+
75
+ /**
76
+ * Sortable column definitions
77
+ *
78
+ * This array defines the table columns that can be sorted. The array key
79
+ * is the column slug that needs to be sortable, and the value is database column
80
+ * to sort by. Often, the key and value will be the same, but this is not always
81
+ * the case (as the value is a column name from the database, not the list table).
82
+ *
83
+ * The array value also contains a boolean which is 'true' if the data is currently
84
+ * sorted by that column. This is computed each time the table is displayed.
85
+ *
86
+ * @since 1.40
87
+ *
88
+ * @var array
89
+ */
90
+ private static $default_sortable_columns = array(
91
+ 'name' => array('slug',false),
92
+ 'specification' => array('specification',false),
93
+ 'post_mime_type' => array('post_mime_type',false),
94
+ 'table_view' => array('table_view',false),
95
+ 'singular' => array('singular',false),
96
+ 'plural' => array('plural',false),
97
+ 'menu_order' => array('menu_order',false),
98
+ 'description' => array('description',false)
99
+ );
100
+
101
+ /**
102
+ * Access the default list of hidden columns
103
+ *
104
+ * @since 1.40
105
+ *
106
+ * @return array default list of hidden columns
107
+ */
108
+ private static function _default_hidden_columns( ) {
109
+ return self::$default_hidden_columns;
110
+ }
111
+
112
+ /**
113
+ * Return the names and display values of the sortable columns
114
+ *
115
+ * @since 1.40
116
+ *
117
+ * @return array name => array( orderby value, heading ) for sortable columns
118
+ */
119
+ public static function mla_get_sortable_columns( )
120
+ {
121
+ $results = array() ;
122
+
123
+ foreach ( self::$default_sortable_columns as $key => $value ) {
124
+ $value[1] = self::$default_columns[ $key ];
125
+ $results[ $key ] = $value;
126
+ }
127
+
128
+ return $results;
129
+ }
130
+
131
+ /**
132
+ * Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-viewcolumnshidden'
133
+ *
134
+ * Required because the screen.php get_hidden_columns function only uses
135
+ * the get_user_option result. Set when the file is loaded because the object
136
+ * is not created in time for the call from screen.php.
137
+ *
138
+ * @since 1.40
139
+ *
140
+ * @param mixed false or array with current list of hidden columns, if any
141
+ * @param string 'managesettings_page_mla-settings-menucolumnshidden'
142
+ * @param object WP_User object, if logged in
143
+ *
144
+ * @return array updated list of hidden columns
145
+ */
146
+ public static function mla_manage_hidden_columns_filter( $result, $option, $user_data ) {
147
+ if ( $result )
148
+ return $result;
149
+ else
150
+ return self::_default_hidden_columns();
151
+ }
152
+
153
+ /**
154
+ * Handler for filter 'manage_settings_page_mla-settings-menu_columns'
155
+ *
156
+ * This required filter dictates the table's columns and titles. Set when the
157
+ * file is loaded because the list_table object isn't created in time
158
+ * to affect the "screen options" setup.
159
+ *
160
+ * @since 1.40
161
+ *
162
+ * @return array list of table columns
163
+ */
164
+ public static function mla_manage_columns_filter( )
165
+ {
166
+ return self::$default_columns;
167
+ }
168
+
169
+ /**
170
+ * Called in the admin_init action because the list_table object isn't
171
+ * created in time to affect the "screen options" setup.
172
+ *
173
+ * @since 1.40
174
+ *
175
+ * @return void
176
+ */
177
+ public static function mla_admin_init_action( )
178
+ {
179
+ if ( isset( $_REQUEST['mla_tab'] ) && $_REQUEST['mla_tab'] == 'view' ) {
180
+ add_filter( 'get_user_option_managesettings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-viewcolumnshidden', 'MLA_View_List_Table::mla_manage_hidden_columns_filter', 10, 3 );
181
+ add_filter( 'manage_settings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-view_columns', 'MLA_View_List_Table::mla_manage_columns_filter', 10, 0 );
182
+ }
183
+ }
184
+
185
+ /**
186
+ * Initializes some properties from $_REQUEST variables, then
187
+ * calls the parent constructor to set some default configs.
188
+ *
189
+ * @since 1.40
190
+ *
191
+ * @return void
192
+ */
193
+ function __construct( ) {
194
+ //Set parent defaults
195
+ parent::__construct( array(
196
+ 'singular' => 'post_mime_type', //singular name of the listed records
197
+ 'plural' => 'post_mime_types', //plural name of the listed records
198
+ 'ajax' => true, //does this table support ajax?
199
+ 'screen' => 'settings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-view'
200
+ ) );
201
+
202
+ /*
203
+ * NOTE: There is one add_action call at the end of this source file.
204
+ * NOTE: There are two add_filter calls at the end of this source file.
205
+ */
206
+ }
207
+
208
+ /**
209
+ * Supply a column value if no column-specific function has been defined
210
+ *
211
+ * Called when the parent class can't find a method specifically built for a
212
+ * given column. All columns should have a specific method, so this function
213
+ * returns a troubleshooting message.
214
+ *
215
+ * @since 1.40
216
+ *
217
+ * @param array A singular item (one full row's worth of data)
218
+ * @param array The name/slug of the column to be processed
219
+ * @return string Text or HTML to be placed inside the column
220
+ */
221
+ function column_default( $item, $column_name ) {
222
+ //Show the whole array for troubleshooting purposes
223
+ return 'column_default: ' . $column_name . ', ' . print_r( $item, true );
224
+ }
225
+
226
+ /**
227
+ * Displays checkboxes for using bulk actions. The 'cb' column
228
+ * is given special treatment when columns are processed.
229
+ *
230
+ * @since 1.40
231
+ *
232
+ * @param object An MLA post_mime_type object
233
+ * @return string HTML markup to be placed inside the column
234
+ */
235
+ function column_cb( $item )
236
+ {
237
+ return sprintf( '<input type="checkbox" name="cb_mla_item_ID[]" value="%1$s" />',
238
+ /*%1$s*/ $item->post_ID
239
+ );
240
+ }
241
+
242
+ /**
243
+ * Add rollover actions to a table column
244
+ *
245
+ * @since 1.40
246
+ *
247
+ * @param object An MLA post_mime_type object
248
+ * @param string Current column name
249
+ *
250
+ * @return array Names and URLs of row-level actions
251
+ */
252
+ private function _build_rollover_actions( $item, $column ) {
253
+ $actions = array();
254
+
255
+ /*
256
+ * Compose view arguments
257
+ */
258
+
259
+ $view_args = array(
260
+ 'page' => MLASettings::MLA_SETTINGS_SLUG . '-view',
261
+ 'mla_tab' => 'view',
262
+ 'mla_item_slug' => urlencode( $item->slug )
263
+ );
264
+
265
+ if ( isset( $_REQUEST['paged'] ) )
266
+ $view_args['paged'] = $_REQUEST['paged'];
267
+
268
+ if ( isset( $_REQUEST['order'] ) )
269
+ $view_args['order'] = $_REQUEST['order'];
270
+
271
+ if ( isset( $_REQUEST['orderby'] ) )
272
+ $view_args['orderby'] = $_REQUEST['orderby'];
273
+
274
+ /*
275
+ * Get the standard and custom types
276
+ */
277
+ $mla_types = MLAOptions::mla_get_option( MLAOptions::MLA_POST_MIME_TYPES, true );
278
+ if ( ! is_array( $mla_types ) )
279
+ $mla_types = array ();
280
+
281
+ $custom_types = MLAOptions::mla_get_option( MLAOptions::MLA_POST_MIME_TYPES, false, true );
282
+ if ( ! is_array( $custom_types ) )
283
+ $custom_types = array ();
284
+
285
+ $actions['edit'] = '<a href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_EDIT_DISPLAY, MLA::MLA_ADMIN_NONCE ) ) . '" title="Edit this item">Edit</a>';
286
+
287
+ $actions['inline hide-if-no-js'] = '<a class="editinline" href="#" title="Edit this item inline">Quick Edit</a>';
288
+
289
+ if ( isset( $custom_types[ $item->slug ] ) ) {
290
+ if ( isset( $mla_types[ $item->slug ] ) )
291
+ $actions['delete'] = '<a class="delete-tag"' . ' href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_DELETE, MLA::MLA_ADMIN_NONCE ) ) . '" title="Revert to standard item">Revert to Standard</a>';
292
+ else
293
+ $actions['delete'] = '<a class="delete-tag"' . ' href="' . add_query_arg( $view_args, wp_nonce_url( '?mla_admin_action=' . MLA::MLA_ADMIN_SINGLE_DELETE, MLA::MLA_ADMIN_NONCE ) ) . '" title="Delete this item permanently">Delete Permanently</a>';
294
+ } // custom type
295
+
296
+ return $actions;
297
+ }
298
+
299
+ /**
300
+ * Add hidden fields with the data for use in the inline editor
301
+ *
302
+ * @since 1.40
303
+ *
304
+ * @param object An MLA post_mime_type object
305
+ *
306
+ * @return string HTML <div> with row data
307
+ */
308
+ private function _build_inline_data( $item ) {
309
+ $inline_data = "\r\n" . '<div class="hidden" id="inline_' . $item->post_ID . "\">\r\n";
310
+ $inline_data .= ' <div class="original_slug">' . esc_attr( $item->slug ) . "</div>\r\n";
311
+ $inline_data .= ' <div class="slug">' . esc_attr( $item->slug ) . "</div>\r\n";
312
+ $inline_data .= ' <div class="singular">' . esc_attr( $item->singular ) . "</div>\r\n";
313
+ $inline_data .= ' <div class="plural">' . esc_attr( $item->plural ) . "</div>\r\n";
314
+ $inline_data .= ' <div class="specification">' . esc_attr( $item->specification ) . "</div>\r\n";
315
+ $inline_data .= ' <div class="post_mime_type">' . esc_attr( $item->post_mime_type ) . "</div>\r\n";
316
+ $inline_data .= ' <div class="table_view">' . esc_attr( $item->table_view ) . "</div>\r\n";
317
+ $inline_data .= ' <div class="menu_order">' . esc_attr( $item->menu_order ) . "</div>\r\n";
318
+ $inline_data .= ' <div class="description">' . esc_attr( $item->description ) . "</div>\r\n";
319
+ $inline_data .= "</div>\r\n";
320
+ return $inline_data;
321
+ }
322
+
323
+ /**
324
+ * Supply the content for a custom column
325
+ *
326
+ * @since 1.40
327
+ *
328
+ * @param object An MLA post_mime_type object
329
+ * @return string HTML markup to be placed inside the column
330
+ */
331
+ function column_name( $item ) {
332
+ $row_actions = self::_build_rollover_actions( $item, 'name' );
333
+ $slug = esc_attr( $item->slug );
334
+ return sprintf( '%1$s<br>%2$s%3$s', /*%1$s*/ $slug, /*%2$s*/ $this->row_actions( $row_actions ), /*%3$s*/ $this->_build_inline_data( $item ) );
335
+ }
336
+
337
+ /**
338
+ * Supply the content for a custom column
339
+ *
340
+ * @since 1.40
341
+ *
342
+ * @param object An MLA post_mime_type object
343
+ * @return string HTML markup to be placed inside the column
344
+ */
345
+ function column_specification( $item ) {
346
+ return esc_attr( $item->specification );
347
+ }
348
+
349
+ /**
350
+ * Supply the content for a custom column
351
+ *
352
+ * @since 1.40
353
+ *
354
+ * @param object An MLA post_mime_type object
355
+ * @return string HTML markup to be placed inside the column
356
+ */
357
+ function column_post_mime_type( $item ) {
358
+ if ( $item->post_mime_type )
359
+ return 'yes';
360
+ else
361
+ return 'no';
362
+ }
363
+
364
+ /**
365
+ * Supply the content for a custom column
366
+ *
367
+ * @since 1.40
368
+ *
369
+ * @param object An MLA post_mime_type object
370
+ * @return string HTML markup to be placed inside the column
371
+ */
372
+ function column_table_view( $item ) {
373
+ if ( $item->table_view )
374
+ return 'yes';
375
+ else
376
+ return 'no';
377
+ }
378
+
379
+ /**
380
+ * Supply the content for a custom column
381
+ *
382
+ * @since 1.40
383
+ *
384
+ * @param object An MLA post_mime_type object
385
+ * @return string HTML markup to be placed inside the column
386
+ */
387
+ function column_singular( $item ) {
388
+ return esc_attr( $item->singular );
389
+ }
390
+
391
+ /**
392
+ * Supply the content for a custom column
393
+ *
394
+ * @since 1.40
395
+ *
396
+ * @param object An MLA post_mime_type object
397
+ * @return string HTML markup to be placed inside the column
398
+ */
399
+ function column_plural( $item ) {
400
+ return esc_attr( $item->plural );
401
+ }
402
+
403
+ /**
404
+ * Supply the content for a custom column
405
+ *
406
+ * @since 1.40
407
+ *
408
+ * @param object An MLA post_mime_type object
409
+ * @return string HTML markup to be placed inside the column
410
+ */
411
+ function column_menu_order( $item ) {
412
+ return (string) $item->menu_order;
413
+ }
414
+
415
+ /**
416
+ * Supply the content for a custom column
417
+ *
418
+ * @since 1.40
419
+ *
420
+ * @param object An MLA post_mime_type object
421
+ * @return string HTML markup to be placed inside the column
422
+ */
423
+ function column_description( $item ) {
424
+ return esc_attr( $item->description );
425
+ }
426
+
427
+ /**
428
+ * This method dictates the table's columns and titles
429
+ *
430
+ * @since 1.40
431
+ *
432
+ * @return array Column information: 'slugs'=>'Visible Titles'
433
+ */
434
+ function get_columns( ) {
435
+ return $columns = MLA_View_List_Table::mla_manage_columns_filter();
436
+ }
437
+
438
+ /**
439
+ * Returns the list of currently hidden columns from a user option or
440
+ * from default values if the option is not set
441
+ *
442
+ * @since 1.40
443
+ *
444
+ * @return array Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')
445
+ */
446
+ function get_hidden_columns( )
447
+ {
448
+ $columns = get_user_option( 'managesettings_page_' . MLASettings::MLA_SETTINGS_SLUG . '-viewcolumnshidden' );
449
+
450
+ if ( is_array( $columns ) ) {
451
+ return $columns;
452
+ }
453
+ else
454
+ return self::_default_hidden_columns();
455
+ }
456
+
457
+ /**
458
+ * Returns an array where the key is the column that needs to be sortable
459
+ * and the value is db column to sort by. Also notes the current sort column,
460
+ * if set.
461
+ *
462
+ * @since 1.40
463
+ *
464
+ * @return array Sortable column information,e.g.,
465
+ * 'slugs'=>array('data_values',boolean)
466
+ */
467
+ function get_sortable_columns( ) {
468
+ $columns = self::$default_sortable_columns;
469
+
470
+ if ( isset( $_REQUEST['orderby'] ) ) {
471
+ $needle = array(
472
+ $_REQUEST['orderby'],
473
+ false
474
+ );
475
+ $key = array_search( $needle, $columns );
476
+ if ( $key )
477
+ $columns[ $key ][ 1 ] = true;
478
+ } else {
479
+ $columns['menu_order'][ 1 ] = true;
480
+ }
481
+
482
+ return $columns;
483
+ }
484
+
485
+ /**
486
+ * Get an associative array ( option_name => option_title ) with the list
487
+ * of bulk actions available on this table.
488
+ *
489
+ * @since 1.40
490
+ *
491
+ * @return array Contains all the bulk actions: 'slugs'=>'Visible Titles'
492
+ */
493
+ function get_bulk_actions( )
494
+ {
495
+ $actions = array();
496
+
497
+ $actions['edit'] = 'Edit';
498
+ $actions['delete'] = 'Delete Permanently';
499
+
500
+ return $actions;
501
+ }
502
+
503
+ /**
504
+ * Prepares the list of items for displaying
505
+ *
506
+ * This is where you prepare your data for display. This method will usually
507
+ * be used to query the database, sort and filter the data, and generally
508
+ * get it ready to be displayed. At a minimum, we should set $this->items and
509
+ * $this->set_pagination_args().
510
+ *
511
+ * @since 1.40
512
+ *
513
+ * @return void
514
+ */
515
+ function prepare_items( ) {
516
+ $this->_column_headers = array(
517
+ $this->get_columns(),
518
+ $this->get_hidden_columns(),
519
+ $this->get_sortable_columns()
520
+ );
521
+
522
+ /*
523
+ * REQUIRED for pagination.
524
+ */
525
+ $total_items = MLAMime::mla_count_view_items( $_REQUEST );
526
+ $user = get_current_user_id();
527
+ $screen = get_current_screen();
528
+ $option = $screen->get_option( 'per_page', 'option' );
529
+ if ( is_string( $option ) )
530
+ $per_page = get_user_meta( $user, $option, true );
531
+ else
532
+ $per_page = 10;
533
+
534
+ if ( empty( $per_page ) || $per_page < 1 )
535
+ $per_page = $screen->get_option( 'per_page', 'default' );
536
+
537
+ /*
538
+ * REQUIRED. We also have to register our pagination options & calculations.
539
+ */
540
+ $this->set_pagination_args( array(
541
+ 'total_items' => $total_items,
542
+ 'per_page' => $per_page,
543
+ 'total_pages' => ceil( $total_items / $per_page )
544
+ ) );
545
+
546
+ $current_page = $this->get_pagenum();
547
+
548
+ /*
549
+ * REQUIRED. Assign sorted and paginated data to the items property, where
550
+ * it can be used by the rest of the class.
551
+ */
552
+ $this->items = MLAMime::mla_query_view_items( $_REQUEST, ( ( $current_page - 1 ) * $per_page ), $per_page );
553
+ }
554
+
555
+ /**
556
+ * Generates (echoes) content for a single row of the table
557
+ *
558
+ * @since 1.40
559
+ *
560
+ * @param object the current item
561
+ *
562
+ * @return void Echoes the row HTML
563
+ */
564
+ function single_row( $item ) {
565
+ static $row_class = '';
566
+ $row_class = ( $row_class == '' ? ' class="alternate"' : '' );
567
+
568
+ echo '<tr id="view-' . $item->post_ID . '"' . $row_class . '>';
569
+ echo parent::single_row_columns( $item );
570
+ echo '</tr>';
571
+ }
572
+ } // class MLA_View_List_Table
573
+
574
+ /*
575
+ * Actions are added here, when the source file is loaded, because the MLA_View_List_Table
576
+ * object is created too late to be useful.
577
+ */
578
+ add_action( 'admin_init', 'MLA_View_List_Table::mla_admin_init_action' );
579
+ ?>
includes/mla-plugin-loader.php CHANGED
@@ -61,6 +61,12 @@ else {
61
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-objects.php' );
62
  add_action('init', 'MLAObjects::initialize');
63
 
 
 
 
 
 
 
64
  /*
65
  * Shortcodes
66
  */
@@ -94,6 +100,12 @@ else {
94
  */
95
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-settings.php' );
96
  add_action( 'init', 'MLASettings::initialize' );
 
 
 
 
 
 
97
 
98
  /*
99
  * Custom list table package that extends the core WP_List_Table class.
@@ -102,9 +114,21 @@ else {
102
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
103
 
104
  /*
105
- * Main program
 
106
  */
107
- require_once( MLA_PLUGIN_PATH . 'includes/class-mla-main.php');
108
- add_action('init', 'MLA::initialize');
 
 
 
 
 
 
 
 
 
 
 
109
  }
110
  ?>
61
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-objects.php' );
62
  add_action('init', 'MLAObjects::initialize');
63
 
64
+ /*
65
+ * MIME Type functions.
66
+ */
67
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-mime-types.php' );
68
+ add_action('init', 'MLAMime::initialize');
69
+
70
  /*
71
  * Shortcodes
72
  */
100
  */
101
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-settings.php' );
102
  add_action( 'init', 'MLASettings::initialize' );
103
+
104
+ /*
105
+ * Main program
106
+ */
107
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-main.php');
108
+ add_action('init', 'MLA::initialize');
109
 
110
  /*
111
  * Custom list table package that extends the core WP_List_Table class.
114
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
115
 
116
  /*
117
+ * Custom list table package for the Post MIME Type Views.
118
+ * Doesn't need an initialize function; has a constructor.
119
  */
120
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-view-list-table.php' );
121
+
122
+ /*
123
+ * Custom list table package for the Optional Upload MIME Type Views.
124
+ * Doesn't need an initialize function; has a constructor.
125
+ */
126
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-optional-list-table.php' );
127
+
128
+ /*
129
+ * Custom list table package for the Upoload MIME Type Views.
130
+ * Doesn't need an initialize function; has a constructor.
131
+ */
132
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-upload-list-table.php' );
133
  }
134
  ?>
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.30
10
  */
11
 
12
  /*
@@ -14,7 +14,7 @@ Plugin Name: Media Library Assistant
14
  Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
15
  Description: Enhances the Media Library; powerful[mla_gallery], taxonomy support, IPTC/EXIF processing, bulk & quick edit actions and where-used reporting.
16
  Author: David Lingren
17
- Version: 1.30
18
  Author URI: http://fairtradejudaica.org/our-story/staff/
19
  */
20
 
@@ -56,12 +56,16 @@ $mla_name_conflict_candidates =
56
  'MLA' => 'class',
57
  'MLAData' => 'class',
58
  'MLAEdit' => 'class',
 
59
  'MLAModal' => 'class',
60
  'MLAObjects' => 'class',
61
  'MLASettings' => 'class',
62
  'MLAShortcodes' => 'class',
63
  'MLATest' => 'class',
64
- 'MLA_List_Table' => 'class'
 
 
 
65
  );
66
 
67
  /*
6
  * will the rest of the plugin be loaded and run.
7
  *
8
  * @package Media Library Assistant
9
+ * @version 1.40
10
  */
11
 
12
  /*
14
  Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
15
  Description: Enhances the Media Library; powerful[mla_gallery], taxonomy support, IPTC/EXIF processing, bulk & quick edit actions and where-used reporting.
16
  Author: David Lingren
17
+ Version: 1.40
18
  Author URI: http://fairtradejudaica.org/our-story/staff/
19
  */
20
 
56
  'MLA' => 'class',
57
  'MLAData' => 'class',
58
  'MLAEdit' => 'class',
59
+ 'MLAMime' => 'class',
60
  'MLAModal' => 'class',
61
  'MLAObjects' => 'class',
62
  'MLASettings' => 'class',
63
  'MLAShortcodes' => 'class',
64
  'MLATest' => 'class',
65
+ 'MLA_List_Table' => 'class',
66
+ 'MLA_View_List_Table' => 'class',
67
+ 'MLA_Optional_Upload_List_Table' => 'class',
68
+ 'MLA_Upload_List_Table' => 'class'
69
  );
70
 
71
  /*
js/mla-inline-edit-upload-scripts.js ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // These functions are adapted from wp-admin/js/inline-edit-post.js
2
+ (function($) {
3
+ inlineEditUpload = {
4
+
5
+ init : function(){
6
+ var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit');
7
+
8
+ t.type = 'upload';
9
+ t.what = '#upload-';
10
+
11
+ // prepare the edit rows
12
+ qeRow.keyup(function(e){
13
+ if (e.which == 27)
14
+ return inlineEditUpload.revert();
15
+ });
16
+ bulkRow.keyup(function(e){
17
+ if (e.which == 27)
18
+ return inlineEditUpload.revert();
19
+ });
20
+
21
+ $('a.cancel', qeRow).click(function(){
22
+ return inlineEditUpload.revert();
23
+ });
24
+ $('a.save', qeRow).click(function(){
25
+ return inlineEditUpload.save(this);
26
+ });
27
+ $('td', qeRow).keydown(function(e){
28
+ if ( e.which == 13 )
29
+ return inlineEditUpload.save(this);
30
+ });
31
+
32
+ $('a.cancel', bulkRow).click(function(){
33
+ return inlineEditUpload.revert();
34
+ });
35
+
36
+ // add events
37
+ $('a.editinline').live('click', function(){
38
+ inlineEditUpload.edit(this);
39
+ return false;
40
+ });
41
+
42
+ $('#doaction, #doaction2').click(function(e){
43
+ var n = $(this).attr('id').substr(2);
44
+
45
+ if ( $('select[name="'+n+'"]').val() == 'edit' ) {
46
+ e.preventDefault();
47
+ t.setBulk();
48
+ } else if ( $('form#posts-filter tr.inline-editor').length > 0 ) {
49
+ t.revert();
50
+ }
51
+ });
52
+ },
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(){
60
+ var te = '', c = true;
61
+ this.revert();
62
+
63
+ $('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length);
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;
71
+ theTitle = $('#inline_'+id+' .slug').text() || mla_inline_edit_upload_vars.notitle;
72
+ te += '<div id="ttle'+id+'"><a id="_'+id+'" class="ntdelbutton" title="'+mla_inline_edit_upload_vars.ntdeltitle+'">X</a>'+theTitle+'</div>';
73
+ }
74
+ });
75
+
76
+ if ( c )
77
+ return this.revert();
78
+
79
+ $('#bulk-titles').html(te);
80
+ $('#bulk-titles a').click(function(){
81
+ var id = $(this).attr('id').substr(1);
82
+
83
+ $('table.widefat input[value="' + id + '"]').prop('checked', false);
84
+ $('#ttle'+id).remove();
85
+ });
86
+
87
+ $('html, body').animate( { scrollTop: 0 }, 'fast' );
88
+ },
89
+
90
+ edit : function(id) {
91
+ var t = this, fields, checkboxes, editRow, rowData, fIndex;
92
+ t.revert();
93
+
94
+ if ( typeof(id) == 'object' )
95
+ id = t.getId(id);
96
+
97
+ fields = mla_inline_edit_upload_vars.fields;
98
+ checkboxes = mla_inline_edit_upload_vars.checkboxes;
99
+
100
+ // add the new blank row
101
+ editRow = $('#inline-edit').clone(true);
102
+ $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length);
103
+
104
+ if ( $(t.what+id).hasClass('alternate') )
105
+ $(editRow).addClass('alternate');
106
+
107
+ $(t.what+id).hide().after(editRow);
108
+
109
+ // populate the data
110
+ rowData = $('#inline_'+id);
111
+
112
+ for ( fIndex = 0; fIndex < fields.length; fIndex++ ) {
113
+ $(':input[name="' + fields[fIndex] + '"]', editRow).val( $('.'+fields[fIndex], rowData).text() );
114
+ }
115
+
116
+ for ( fIndex = 0; fIndex < fields.length; fIndex++ ) {
117
+ if ( '1' == $('.'+checkboxes[fIndex], rowData).text() )
118
+ $(':input[name="' + checkboxes[fIndex] + '"]', editRow).attr( 'checked', 'checked' );
119
+ else
120
+ $(':input[name="' + checkboxes[fIndex] + '"]', editRow).removeAttr('checked');
121
+ }
122
+
123
+ $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show();
124
+ $('.ptitle', editRow).focus(); // $('.ptitle', editRow).eq(0).focus();
125
+
126
+ return false;
127
+ },
128
+
129
+ save : function(id) {
130
+ var params, fields;
131
+
132
+ if ( typeof(id) == 'object' )
133
+ id = this.getId(id);
134
+
135
+ $('table.widefat .spinner').show();
136
+
137
+ params = {
138
+ action: mla_inline_edit_upload_vars.ajax_action,
139
+ nonce: mla_inline_edit_upload_vars.ajax_nonce,
140
+ post_ID: id
141
+ };
142
+
143
+ fields = $('#edit-'+id+' :input').serialize();
144
+ params = fields + '&' + $.param(params);
145
+
146
+ // make ajax request
147
+ $.post( ajaxurl, params,
148
+ function(r) {
149
+ $('table.widefat .spinner').hide();
150
+
151
+ if (r) {
152
+ if ( -1 != r.indexOf('<tr') ) {
153
+ $(inlineEditUpload.what+id).remove();
154
+ $('#edit-'+id).before(r).remove();
155
+ $(inlineEditUpload.what+id).hide().fadeIn();
156
+ } else {
157
+ r = r.replace( /<.[^<>]*?>/g, '' );
158
+ $('#edit-'+id+' .inline-edit-save .error').html(r).show();
159
+ }
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
+
168
+ revert : function(){
169
+ var id = $('table.widefat tr.inline-editor').attr('id');
170
+
171
+ if ( id ) {
172
+ $('table.widefat .inline-edit-save .waiting').hide();
173
+
174
+ if ( 'bulk-edit' == id ) {
175
+ $('table.widefat #bulk-edit').removeClass('inline-editor').hide();
176
+ $('#bulk-titles').html('');
177
+ $('#inlineedit').append( $('#bulk-edit') );
178
+ } else {
179
+ $('table.widefat .spinner').hide();
180
+ $('#'+id).remove();
181
+ id = id.substr( id.lastIndexOf('-') + 1 );
182
+ $(this.what+id).show();
183
+ }
184
+ }
185
+
186
+ return false;
187
+ },
188
+
189
+ getId : function(o) {
190
+ var id = $(o).closest('tr').attr('id'),
191
+ parts = id.split('-');
192
+ return parts[parts.length - 1];
193
+ }
194
+ };
195
+
196
+ $(document).ready(function(){inlineEditUpload.init();});
197
+ })(jQuery);
js/mla-inline-edit-upload-scripts.min.js ADDED
@@ -0,0 +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);
js/mla-inline-edit-view-scripts.js ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // These functions are adapted from wp-admin/js/inline-edit-post.js
2
+ (function($) {
3
+ inlineEditView = {
4
+
5
+ init : function(){
6
+ var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit');
7
+
8
+ t.type = 'view';
9
+ t.what = '#view-';
10
+
11
+ // prepare the edit rows
12
+ qeRow.keyup(function(e){
13
+ if (e.which == 27)
14
+ return inlineEditView.revert();
15
+ });
16
+ bulkRow.keyup(function(e){
17
+ if (e.which == 27)
18
+ return inlineEditView.revert();
19
+ });
20
+
21
+ $('a.cancel', qeRow).click(function(){
22
+ return inlineEditView.revert();
23
+ });
24
+ $('a.save', qeRow).click(function(){
25
+ return inlineEditView.save(this);
26
+ });
27
+ $('td', qeRow).keydown(function(e){
28
+ if ( e.which == 13 )
29
+ return inlineEditView.save(this);
30
+ });
31
+
32
+ $('a.cancel', bulkRow).click(function(){
33
+ return inlineEditView.revert();
34
+ });
35
+
36
+ // add events
37
+ $('a.editinline').live('click', function(){
38
+ inlineEditView.edit(this);
39
+ return false;
40
+ });
41
+
42
+ $('#doaction, #doaction2').click(function(e){
43
+ var n = $(this).attr('id').substr(2);
44
+
45
+ if ( $('select[name="'+n+'"]').val() == 'edit' ) {
46
+ e.preventDefault();
47
+ t.setBulk();
48
+ } else if ( $('form#posts-filter tr.inline-editor').length > 0 ) {
49
+ t.revert();
50
+ }
51
+ });
52
+ },
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(){
60
+ var te = '', c = true;
61
+ this.revert();
62
+
63
+ $('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length);
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;
71
+ theTitle = $('#inline_'+id+' .slug').text() || mla_inline_edit_view_vars.notitle;
72
+ te += '<div id="ttle'+id+'"><a id="_'+id+'" class="ntdelbutton" title="'+mla_inline_edit_view_vars.ntdeltitle+'">X</a>'+theTitle+'</div>';
73
+ }
74
+ });
75
+
76
+ if ( c )
77
+ return this.revert();
78
+
79
+ $('#bulk-titles').html(te);
80
+ $('#bulk-titles a').click(function(){
81
+ var id = $(this).attr('id').substr(1);
82
+
83
+ $('table.widefat input[value="' + id + '"]').prop('checked', false);
84
+ $('#ttle'+id).remove();
85
+ });
86
+
87
+ $('html, body').animate( { scrollTop: 0 }, 'fast' );
88
+ },
89
+
90
+ edit : function(id) {
91
+ var t = this, fields, checkboxes, editRow, rowData, fIndex;
92
+ t.revert();
93
+
94
+ if ( typeof(id) == 'object' )
95
+ id = t.getId(id);
96
+
97
+ fields = mla_inline_edit_view_vars.fields;
98
+ checkboxes = mla_inline_edit_view_vars.checkboxes;
99
+
100
+ // add the new blank row
101
+ editRow = $('#inline-edit').clone(true);
102
+ $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length);
103
+
104
+ if ( $(t.what+id).hasClass('alternate') )
105
+ $(editRow).addClass('alternate');
106
+
107
+ $(t.what+id).hide().after(editRow);
108
+
109
+ // populate the data
110
+ rowData = $('#inline_'+id);
111
+
112
+ for ( fIndex = 0; fIndex < fields.length; fIndex++ ) {
113
+ $(':input[name="' + fields[fIndex] + '"]', editRow).val( $('.'+fields[fIndex], rowData).text() );
114
+ }
115
+
116
+ for ( fIndex = 0; fIndex < fields.length; fIndex++ ) {
117
+ if ( '1' == $('.'+checkboxes[fIndex], rowData).text() )
118
+ $(':input[name="' + checkboxes[fIndex] + '"]', editRow).attr( 'checked', 'checked' );
119
+ else
120
+ $(':input[name="' + checkboxes[fIndex] + '"]', editRow).removeAttr('checked');
121
+ }
122
+
123
+ $(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show();
124
+ $('.ptitle', editRow).focus(); // $('.ptitle', editRow).eq(0).focus();
125
+
126
+ return false;
127
+ },
128
+
129
+ save : function(id) {
130
+ var params, fields;
131
+
132
+ if ( typeof(id) == 'object' )
133
+ id = this.getId(id);
134
+
135
+ $('table.widefat .spinner').show();
136
+
137
+ params = {
138
+ action: mla_inline_edit_view_vars.ajax_action,
139
+ nonce: mla_inline_edit_view_vars.ajax_nonce,
140
+ post_ID: id
141
+ };
142
+
143
+ fields = $('#edit-'+id+' :input').serialize();
144
+ params = fields + '&' + $.param(params);
145
+
146
+ // make ajax request
147
+ $.post( ajaxurl, params,
148
+ function(r) {
149
+ $('table.widefat .spinner').hide();
150
+
151
+ if (r) {
152
+ if ( -1 != r.indexOf('<tr') ) {
153
+ $(inlineEditView.what+id).remove();
154
+ $('#edit-'+id).before(r).remove();
155
+ $(inlineEditView.what+id).hide().fadeIn();
156
+ } else {
157
+ r = r.replace( /<.[^<>]*?>/g, '' );
158
+ $('#edit-'+id+' .inline-edit-save .error').html(r).show();
159
+ }
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
+
168
+ revert : function(){
169
+ var id = $('table.widefat tr.inline-editor').attr('id');
170
+
171
+ if ( id ) {
172
+ $('table.widefat .inline-edit-save .waiting').hide();
173
+
174
+ if ( 'bulk-edit' == id ) {
175
+ $('table.widefat #bulk-edit').removeClass('inline-editor').hide();
176
+ $('#bulk-titles').html('');
177
+ $('#inlineedit').append( $('#bulk-edit') );
178
+ } else {
179
+ $('table.widefat .spinner').hide();
180
+ $('#'+id).remove();
181
+ id = id.substr( id.lastIndexOf('-') + 1 );
182
+ $(this.what+id).show();
183
+ }
184
+ }
185
+
186
+ return false;
187
+ },
188
+
189
+ getId : function(o) {
190
+ var id = $(o).closest('tr').attr('id'),
191
+ parts = id.split('-');
192
+ return parts[parts.length - 1];
193
+ }
194
+ };
195
+
196
+ $(document).ready(function(){inlineEditView.init();});
197
+ })(jQuery);
js/mla-inline-edit-view-scripts.min.js ADDED
@@ -0,0 +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);
phpDocs/classes.svg CHANGED
@@ -4,100 +4,143 @@
4
  <!-- Generated by graphviz version 2.28.0 (20110507.0327)
5
  -->
6
  <!-- Title: G Pages: 1 -->
7
- <svg width="352pt" height="582pt"
8
- viewBox="0.00 0.00 352.00 582.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
- <g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 578)">
10
  <title>G</title>
11
- <polygon fill="white" stroke="white" points="-4,5 -4,-578 349,-578 349,5 -4,5"/>
12
  <g id="graph2" class="cluster"><title>cluster_global</title>
13
- <polyline fill="none" stroke="gray" points="220,-8 324,-8 "/>
14
- <path fill="none" stroke="gray" d="M324,-8C330,-8 336,-14 336,-20"/>
15
- <polyline fill="none" stroke="gray" points="336,-20 336,-554 "/>
16
- <path fill="none" stroke="gray" d="M336,-554C336,-560 330,-566 324,-566"/>
17
- <polyline fill="none" stroke="gray" points="324,-566 220,-566 "/>
18
- <path fill="none" stroke="gray" d="M220,-566C214,-566 208,-560 208,-554"/>
19
- <polyline fill="none" stroke="gray" points="208,-554 208,-20 "/>
20
  <path fill="none" stroke="gray" d="M208,-20C208,-14 214,-8 220,-8"/>
21
- <text text-anchor="middle" x="272" y="-553.2" font-family="Times New Roman,serif" font-size="11.00" fill="gray">global</text>
22
  </g>
23
  <!-- \\MLAData -->
24
  <g id="node2" class="node"><title>\\MLAData</title>
25
  <a xlink:href="includes.class-mla-data.html" xlink:title="MLAData" target="_parent">
26
- <polygon fill="none" stroke="black" points="304,-538 240,-538 240,-502 304,-502 304,-538"/>
27
- <text text-anchor="middle" x="272" y="-517.2" font-family="Courier,monospace" font-size="11.00">MLAData</text>
28
  </a>
29
  </g>
30
  <!-- \\MLAEdit -->
31
  <g id="node3" class="node"><title>\\MLAEdit</title>
32
  <a xlink:href="includes.class-mla-edit-media.html" xlink:title="MLAEdit" target="_parent">
33
- <polygon fill="none" stroke="black" points="304,-484 240,-484 240,-448 304,-448 304,-484"/>
34
- <text text-anchor="middle" x="272" y="-463.2" font-family="Courier,monospace" font-size="11.00">MLAEdit</text>
35
  </a>
36
  </g>
37
  <!-- \\MLA_List_Table -->
38
  <g id="node4" class="node"><title>\\MLA_List_Table</title>
39
  <a xlink:href="includes.class-mla-list-table.html" xlink:title="MLA_List_Table" target="_parent">
40
- <polygon fill="none" stroke="black" points="327.5,-430 216.5,-430 216.5,-394 327.5,-394 327.5,-430"/>
41
- <text text-anchor="middle" x="272" y="-409.2" font-family="Courier,monospace" font-size="11.00">MLA_List_Table</text>
42
  </a>
43
  </g>
44
  <!-- \\WP_List_Table -->
45
- <g id="node13" class="node"><title>\\WP_List_Table</title>
46
- <ellipse fill="none" stroke="black" cx="72" cy="-412" rx="71.4873" ry="18"/>
47
- <text text-anchor="middle" x="72" y="-408.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_List_Table</text>
48
  </g>
49
  <!-- \\MLA_List_Table&#45;&gt;\\WP_List_Table -->
50
  <g id="edge3" class="edge"><title>\\MLA_List_Table&#45;&gt;\\WP_List_Table</title>
51
- <path fill="none" stroke="black" d="M216.371,-412C197.091,-412 174.98,-412 153.987,-412"/>
52
- <polygon fill="none" stroke="black" points="153.788,-408.5 143.788,-412 153.788,-415.5 153.788,-408.5"/>
53
  </g>
54
  <!-- \\MLA -->
55
  <g id="node5" class="node"><title>\\MLA</title>
56
  <a xlink:href="includes.class-mla-main.html" xlink:title="MLA" target="_parent">
57
- <polygon fill="none" stroke="black" points="299,-376 245,-376 245,-340 299,-340 299,-376"/>
58
- <text text-anchor="middle" x="272" y="-355.2" font-family="Courier,monospace" font-size="11.00">MLA</text>
59
  </a>
60
  </g>
61
  <!-- \\MLAModal -->
62
  <g id="node6" class="node"><title>\\MLAModal</title>
63
  <a xlink:href="includes.class-mla-media-modal.html" xlink:title="MLAModal" target="_parent">
64
- <polygon fill="none" stroke="black" points="307.5,-322 236.5,-322 236.5,-286 307.5,-286 307.5,-322"/>
65
- <text text-anchor="middle" x="272" y="-301.2" font-family="Courier,monospace" font-size="11.00">MLAModal</text>
 
 
 
 
 
 
 
66
  </a>
67
  </g>
68
  <!-- \\MLAObjects -->
69
- <g id="node7" class="node"><title>\\MLAObjects</title>
70
  <a xlink:href="includes.class-mla-objects.html" xlink:title="MLAObjects" target="_parent">
71
- <polygon fill="none" stroke="black" points="314,-268 230,-268 230,-232 314,-232 314,-268"/>
72
- <text text-anchor="middle" x="272" y="-247.2" font-family="Courier,monospace" font-size="11.00">MLAObjects</text>
73
  </a>
74
  </g>
75
  <!-- \\MLAOptions -->
76
- <g id="node8" class="node"><title>\\MLAOptions</title>
77
  <a xlink:href="includes.class-mla-options.html" xlink:title="MLAOptions" target="_parent">
78
- <polygon fill="none" stroke="black" points="314,-214 230,-214 230,-178 314,-178 314,-214"/>
79
- <text text-anchor="middle" x="272" y="-193.2" font-family="Courier,monospace" font-size="11.00">MLAOptions</text>
80
  </a>
81
  </g>
82
  <!-- \\MLASettings -->
83
- <g id="node9" class="node"><title>\\MLASettings</title>
84
  <a xlink:href="includes.class-mla-settings.html" xlink:title="MLASettings" target="_parent">
85
- <polygon fill="none" stroke="black" points="317.5,-160 226.5,-160 226.5,-124 317.5,-124 317.5,-160"/>
86
- <text text-anchor="middle" x="272" y="-139.2" font-family="Courier,monospace" font-size="11.00">MLASettings</text>
87
  </a>
88
  </g>
89
  <!-- \\MLAShortcodes -->
90
- <g id="node10" class="node"><title>\\MLAShortcodes</title>
91
  <a xlink:href="includes.class-mla-shortcodes.html" xlink:title="MLAShortcodes" target="_parent">
92
- <polygon fill="none" stroke="black" points="324,-106 220,-106 220,-70 324,-70 324,-106"/>
93
- <text text-anchor="middle" x="272" y="-85.2" font-family="Courier,monospace" font-size="11.00">MLAShortcodes</text>
 
 
 
 
 
 
 
94
  </a>
95
  </g>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  <!-- \\MLATest -->
97
- <g id="node11" class="node"><title>\\MLATest</title>
98
  <a xlink:href="tests.class-mla-tests.html" xlink:title="MLATest" target="_parent">
99
- <polygon fill="none" stroke="black" points="304,-52 240,-52 240,-16 304,-16 304,-52"/>
100
- <text text-anchor="middle" x="272" y="-31.2" font-family="Courier,monospace" font-size="11.00">MLATest</text>
101
  </a>
102
  </g>
103
  </g>
4
  <!-- Generated by graphviz version 2.28.0 (20110507.0327)
5
  -->
6
  <!-- Title: G Pages: 1 -->
7
+ <svg width="460pt" height="798pt"
8
+ viewBox="0.00 0.00 460.00 798.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 794)">
10
  <title>G</title>
11
+ <polygon fill="white" stroke="white" points="-4,5 -4,-794 457,-794 457,5 -4,5"/>
12
  <g id="graph2" class="cluster"><title>cluster_global</title>
13
+ <polyline fill="none" stroke="gray" points="220,-8 432,-8 "/>
14
+ <path fill="none" stroke="gray" d="M432,-8C438,-8 444,-14 444,-20"/>
15
+ <polyline fill="none" stroke="gray" points="444,-20 444,-770 "/>
16
+ <path fill="none" stroke="gray" d="M444,-770C444,-776 438,-782 432,-782"/>
17
+ <polyline fill="none" stroke="gray" points="432,-782 220,-782 "/>
18
+ <path fill="none" stroke="gray" d="M220,-782C214,-782 208,-776 208,-770"/>
19
+ <polyline fill="none" stroke="gray" points="208,-770 208,-20 "/>
20
  <path fill="none" stroke="gray" d="M208,-20C208,-14 214,-8 220,-8"/>
21
+ <text text-anchor="middle" x="326" y="-769.2" font-family="Times New Roman,serif" font-size="11.00" fill="gray">global</text>
22
  </g>
23
  <!-- \\MLAData -->
24
  <g id="node2" class="node"><title>\\MLAData</title>
25
  <a xlink:href="includes.class-mla-data.html" xlink:title="MLAData" target="_parent">
26
+ <polygon fill="none" stroke="black" points="358,-754 294,-754 294,-718 358,-718 358,-754"/>
27
+ <text text-anchor="middle" x="326" y="-733.2" font-family="Courier,monospace" font-size="11.00">MLAData</text>
28
  </a>
29
  </g>
30
  <!-- \\MLAEdit -->
31
  <g id="node3" class="node"><title>\\MLAEdit</title>
32
  <a xlink:href="includes.class-mla-edit-media.html" xlink:title="MLAEdit" target="_parent">
33
+ <polygon fill="none" stroke="black" points="358,-700 294,-700 294,-664 358,-664 358,-700"/>
34
+ <text text-anchor="middle" x="326" y="-679.2" font-family="Courier,monospace" font-size="11.00">MLAEdit</text>
35
  </a>
36
  </g>
37
  <!-- \\MLA_List_Table -->
38
  <g id="node4" class="node"><title>\\MLA_List_Table</title>
39
  <a xlink:href="includes.class-mla-list-table.html" xlink:title="MLA_List_Table" target="_parent">
40
+ <polygon fill="none" stroke="black" points="381.5,-646 270.5,-646 270.5,-610 381.5,-610 381.5,-646"/>
41
+ <text text-anchor="middle" x="326" y="-625.2" font-family="Courier,monospace" font-size="11.00">MLA_List_Table</text>
42
  </a>
43
  </g>
44
  <!-- \\WP_List_Table -->
45
+ <g id="node17" class="node"><title>\\WP_List_Table</title>
46
+ <ellipse fill="none" stroke="black" cx="72" cy="-169" rx="71.4873" ry="18"/>
47
+ <text text-anchor="middle" x="72" y="-165.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_List_Table</text>
48
  </g>
49
  <!-- \\MLA_List_Table&#45;&gt;\\WP_List_Table -->
50
  <g id="edge3" class="edge"><title>\\MLA_List_Table&#45;&gt;\\WP_List_Table</title>
51
+ <path fill="none" stroke="black" d="M270.355,-626.837C248.569,-623.698 224.743,-616.515 208,-601 88.2448,-490.027 73.9534,-274.607 72.8183,-197.394"/>
52
+ <polygon fill="none" stroke="black" points="76.3154,-197.005 72.7353,-187.034 69.3156,-197.061 76.3154,-197.005"/>
53
  </g>
54
  <!-- \\MLA -->
55
  <g id="node5" class="node"><title>\\MLA</title>
56
  <a xlink:href="includes.class-mla-main.html" xlink:title="MLA" target="_parent">
57
+ <polygon fill="none" stroke="black" points="353,-592 299,-592 299,-556 353,-556 353,-592"/>
58
+ <text text-anchor="middle" x="326" y="-571.2" font-family="Courier,monospace" font-size="11.00">MLA</text>
59
  </a>
60
  </g>
61
  <!-- \\MLAModal -->
62
  <g id="node6" class="node"><title>\\MLAModal</title>
63
  <a xlink:href="includes.class-mla-media-modal.html" xlink:title="MLAModal" target="_parent">
64
+ <polygon fill="none" stroke="black" points="361.5,-538 290.5,-538 290.5,-502 361.5,-502 361.5,-538"/>
65
+ <text text-anchor="middle" x="326" y="-517.2" font-family="Courier,monospace" font-size="11.00">MLAModal</text>
66
+ </a>
67
+ </g>
68
+ <!-- \\MLAMime -->
69
+ <g id="node7" class="node"><title>\\MLAMime</title>
70
+ <a xlink:href="includes.class-mla-mime-types.html" xlink:title="MLAMime" target="_parent">
71
+ <polygon fill="none" stroke="black" points="358,-484 294,-484 294,-448 358,-448 358,-484"/>
72
+ <text text-anchor="middle" x="326" y="-463.2" font-family="Courier,monospace" font-size="11.00">MLAMime</text>
73
  </a>
74
  </g>
75
  <!-- \\MLAObjects -->
76
+ <g id="node8" class="node"><title>\\MLAObjects</title>
77
  <a xlink:href="includes.class-mla-objects.html" xlink:title="MLAObjects" target="_parent">
78
+ <polygon fill="none" stroke="black" points="368,-430 284,-430 284,-394 368,-394 368,-430"/>
79
+ <text text-anchor="middle" x="326" y="-409.2" font-family="Courier,monospace" font-size="11.00">MLAObjects</text>
80
  </a>
81
  </g>
82
  <!-- \\MLAOptions -->
83
+ <g id="node9" class="node"><title>\\MLAOptions</title>
84
  <a xlink:href="includes.class-mla-options.html" xlink:title="MLAOptions" target="_parent">
85
+ <polygon fill="none" stroke="black" points="368,-376 284,-376 284,-340 368,-340 368,-376"/>
86
+ <text text-anchor="middle" x="326" y="-355.2" font-family="Courier,monospace" font-size="11.00">MLAOptions</text>
87
  </a>
88
  </g>
89
  <!-- \\MLASettings -->
90
+ <g id="node10" class="node"><title>\\MLASettings</title>
91
  <a xlink:href="includes.class-mla-settings.html" xlink:title="MLASettings" target="_parent">
92
+ <polygon fill="none" stroke="black" points="371.5,-322 280.5,-322 280.5,-286 371.5,-286 371.5,-322"/>
93
+ <text text-anchor="middle" x="326" y="-301.2" font-family="Courier,monospace" font-size="11.00">MLASettings</text>
94
  </a>
95
  </g>
96
  <!-- \\MLAShortcodes -->
97
+ <g id="node11" class="node"><title>\\MLAShortcodes</title>
98
  <a xlink:href="includes.class-mla-shortcodes.html" xlink:title="MLAShortcodes" target="_parent">
99
+ <polygon fill="none" stroke="black" points="378,-268 274,-268 274,-232 378,-232 378,-268"/>
100
+ <text text-anchor="middle" x="326" y="-247.2" font-family="Courier,monospace" font-size="11.00">MLAShortcodes</text>
101
+ </a>
102
+ </g>
103
+ <!-- \\MLA_Upload_List_Table -->
104
+ <g id="node12" class="node"><title>\\MLA_Upload_List_Table</title>
105
+ <a xlink:href="includes.class-mla-upload-list-table.html" xlink:title="MLA_Upload_List_Table" target="_parent">
106
+ <polygon fill="none" stroke="black" points="405,-214 247,-214 247,-178 405,-178 405,-214"/>
107
+ <text text-anchor="middle" x="326" y="-193.2" font-family="Courier,monospace" font-size="11.00">MLA_Upload_List_Table</text>
108
  </a>
109
  </g>
110
+ <!-- \\MLA_Upload_List_Table&#45;&gt;\\WP_List_Table -->
111
+ <g id="edge5" class="edge"><title>\\MLA_Upload_List_Table&#45;&gt;\\WP_List_Table</title>
112
+ <path fill="none" stroke="black" d="M246.991,-187.642C215.426,-184.26 179.137,-180.372 147.895,-177.024"/>
113
+ <polygon fill="none" stroke="black" points="148.257,-173.543 137.941,-175.958 147.511,-180.503 148.257,-173.543"/>
114
+ </g>
115
+ <!-- \\MLA_Upload_Optional_List_Table -->
116
+ <g id="node13" class="node"><title>\\MLA_Upload_Optional_List_Table</title>
117
+ <a xlink:href="includes.class-mla-upload-optional-list-table.html" xlink:title="MLA_Upload_Optional_List_Table" target="_parent">
118
+ <polygon fill="none" stroke="black" points="435.5,-160 216.5,-160 216.5,-124 435.5,-124 435.5,-160"/>
119
+ <text text-anchor="middle" x="326" y="-139.2" font-family="Courier,monospace" font-size="11.00">MLA_Upload_Optional_List_Table</text>
120
+ </a>
121
+ </g>
122
+ <!-- \\MLA_Upload_Optional_List_Table&#45;&gt;\\WP_List_Table -->
123
+ <g id="edge7" class="edge"><title>\\MLA_Upload_Optional_List_Table&#45;&gt;\\WP_List_Table</title>
124
+ <path fill="none" stroke="black" d="M216.301,-153.646C193.301,-156.111 169.518,-158.659 148.095,-160.954"/>
125
+ <polygon fill="none" stroke="black" points="147.676,-157.479 138.106,-162.024 148.422,-164.439 147.676,-157.479"/>
126
+ </g>
127
+ <!-- \\MLA_View_List_Table -->
128
+ <g id="node14" class="node"><title>\\MLA_View_List_Table</title>
129
+ <a xlink:href="includes.class-mla-view-list-table.html" xlink:title="MLA_View_List_Table" target="_parent">
130
+ <polygon fill="none" stroke="black" points="398.5,-106 253.5,-106 253.5,-70 398.5,-70 398.5,-106"/>
131
+ <text text-anchor="middle" x="326" y="-85.2" font-family="Courier,monospace" font-size="11.00">MLA_View_List_Table</text>
132
+ </a>
133
+ </g>
134
+ <!-- \\MLA_View_List_Table&#45;&gt;\\WP_List_Table -->
135
+ <g id="edge9" class="edge"><title>\\MLA_View_List_Table&#45;&gt;\\WP_List_Table</title>
136
+ <path fill="none" stroke="black" d="M253.377,-102.69C238.275,-106.299 222.522,-110.45 208,-115 177,-124.714 143.05,-138.308 116.952,-149.426"/>
137
+ <polygon fill="none" stroke="black" points="115.516,-146.234 107.712,-153.399 118.281,-152.665 115.516,-146.234"/>
138
+ </g>
139
  <!-- \\MLATest -->
140
+ <g id="node15" class="node"><title>\\MLATest</title>
141
  <a xlink:href="tests.class-mla-tests.html" xlink:title="MLATest" target="_parent">
142
+ <polygon fill="none" stroke="black" points="358,-52 294,-52 294,-16 358,-16 358,-52"/>
143
+ <text text-anchor="middle" x="326" y="-31.2" font-family="Courier,monospace" font-size="11.00">MLATest</text>
144
  </a>
145
  </g>
146
  </g>
phpDocs/classes/MLA.html CHANGED
@@ -297,7 +297,7 @@ going to the Edit Media screen.</p></p>
297
  </div>
298
  <a name="mla_set_screen_option_filter" id="mla_set_screen_option_filter"></a><div class="element clickable method public mla_set_screen_option_filter" data-toggle="collapse" data-target=".mla_set_screen_option_filter .collapse">
299
  <h2>Save the "Entries per page" option set by this user</h2>
300
- <pre>mla_set_screen_option_filter(boolean $status, string $option, string $value) : string | void</pre>
301
  <div class="labels"></div>
302
  <div class="row collapse"><div class="detail-description">
303
  <p class="long_description"></p>
@@ -308,8 +308,7 @@ going to the Edit Media screen.</p></p>
308
  <h3>Parameters</h3>
309
  <div class="subelement argument">
310
  <h4>$status</h4>
311
- <code>boolean</code><p>Unknown - always false?</p>
312
- </div>
313
  <div class="subelement argument">
314
  <h4>$option</h4>
315
  <code>string</code><p>Name of the option being changed</p></div>
@@ -674,7 +673,7 @@ change the meta data for a single attachment.</h2>
674
  <div class="row"><footer class="span12">
675
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
676
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
677
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
678
  </div>
679
  </body>
680
  </html>
297
  </div>
298
  <a name="mla_set_screen_option_filter" id="mla_set_screen_option_filter"></a><div class="element clickable method public mla_set_screen_option_filter" data-toggle="collapse" data-target=".mla_set_screen_option_filter .collapse">
299
  <h2>Save the "Entries per page" option set by this user</h2>
300
+ <pre>mla_set_screen_option_filter(mixed $status, string $option, string $value) : string | void</pre>
301
  <div class="labels"></div>
302
  <div class="row collapse"><div class="detail-description">
303
  <p class="long_description"></p>
308
  <h3>Parameters</h3>
309
  <div class="subelement argument">
310
  <h4>$status</h4>
311
+ <code>mixed</code><p>false or value returned by previous filter</p></div>
 
312
  <div class="subelement argument">
313
  <h4>$option</h4>
314
  <code>string</code><p>Name of the option being changed</p></div>
673
  <div class="row"><footer class="span12">
674
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
675
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
676
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
677
  </div>
678
  </body>
679
  </html>
phpDocs/classes/MLAData.html CHANGED
@@ -67,11 +67,12 @@
67
  <li class="method public "><a href="#mla_parse_template" title="mla_parse_template :: Expand a template, replacing place holders with their values"><span class="description">Expand a template, replacing place holders with their values</span><pre>mla_parse_template()</pre></a></li>
68
  <li class="method public "><a href="#mla_query_list_table_items" title="mla_query_list_table_items :: Retrieve attachment objects for list table display"><span class="description">Retrieve attachment objects for list table display</span><pre>mla_query_list_table_items()</pre></a></li>
69
  <li class="method public "><a href="#mla_query_media_modal_items" title="mla_query_media_modal_items :: Retrieve attachment objects for the WordPress Media Manager"><span class="description">Retrieve attachment objects for the WordPress Media Manager</span><pre>mla_query_media_modal_items()</pre></a></li>
70
- <li class="method public "><a href="#mla_query_posts_join_filter" title="mla_query_posts_join_filter :: Adds a JOIN clause, if required, to handle sorting/searching on ALT Text"><span class="description">Adds a JOIN clause, if required, to handle sorting/searching on ALT Text</span><pre>mla_query_posts_join_filter()</pre></a></li>
71
  <li class="method public "><a href="#mla_query_posts_orderby_filter" title="mla_query_posts_orderby_filter :: Adds a ORDERBY clause, if required"><span class="description">Adds a ORDERBY clause, if required</span><pre>mla_query_posts_orderby_filter()</pre></a></li>
72
  <li class="method public "><a href="#mla_query_posts_search_filter" title="mla_query_posts_search_filter :: Adds a keyword search to the WHERE clause, if required"><span class="description">Adds a keyword search to the WHERE clause, if required</span><pre>mla_query_posts_search_filter()</pre></a></li>
73
  <li class="method public "><a href="#mla_query_posts_where_filter" title="mla_query_posts_where_filter :: Adds a WHERE clause for detached items"><span class="description">Adds a WHERE clause for detached items</span><pre>mla_query_posts_where_filter()</pre></a></li>
74
  <li class="method public "><a href="#mla_save_post_action" title="mla_save_post_action :: Invalidates $mla_galleries and $galleries arrays and cached values after post, page or attachment updates"><span class="description">Invalidates $mla_galleries and $galleries arrays and cached values after post, page or attachment updates</span><pre>mla_save_post_action()</pre></a></li>
 
75
  <li class="method public "><a href="#mla_update_single_item" title="mla_update_single_item :: Update a single item; change the meta data
76
  for a single attachment."><span class="description">Update a single item; change the meta data
77
  for a single attachment.</span><pre>mla_update_single_item()</pre></a></li>
@@ -88,6 +89,7 @@ for a single attachment.</span><pre>mla_update_single_item()</pre></a></li>
88
  <li class="property private "><a href="#%24galleries" title="$galleries :: Objects containing [gallery] shortcodes"><span class="description">Objects containing [gallery] shortcodes</span><pre>$galleries</pre></a></li>
89
  <li class="property private "><a href="#%24mla_alt_text_view" title="$mla_alt_text_view :: Provides a unique name for the ALT Text SQL VIEW"><span class="description">Provides a unique name for the ALT Text SQL VIEW</span><pre>$mla_alt_text_view</pre></a></li>
90
  <li class="property private "><a href="#%24mla_galleries" title="$mla_galleries :: Objects containing [mla_gallery] shortcodes"><span class="description">Objects containing [mla_gallery] shortcodes</span><pre>$mla_galleries</pre></a></li>
 
91
  <li class="property private "><a href="#%24query_parameters" title='$query_parameters :: WP_Query filter "parameters"'><span class="description">WP_Query filter "parameters"</span><pre>$query_parameters</pre></a></li>
92
  <li class="nav-header">
93
  <i class="icon-custom icon-constant"></i> Constants</li>
@@ -135,7 +137,7 @@ Templates separate HTML markup from PHP code for easier maintenance and localiza
135
  </div>
136
  <a name="mla_count_list_table_items" id="mla_count_list_table_items"></a><div class="element clickable method public mla_count_list_table_items" data-toggle="collapse" data-target=".mla_count_list_table_items .collapse">
137
  <h2>Get the total number of attachment posts</h2>
138
- <pre>mla_count_list_table_items(array $request) : integer</pre>
139
  <div class="labels"></div>
140
  <div class="row collapse"><div class="detail-description">
141
  <p class="long_description"></p>
@@ -148,6 +150,14 @@ Templates separate HTML markup from PHP code for easier maintenance and localiza
148
  <h4>$request</h4>
149
  <code>array</code><p>Query variables, e.g., from $_REQUEST</p>
150
  </div>
 
 
 
 
 
 
 
 
151
  <h3>Returns</h3>
152
  <div class="subelement response">
153
  <code>integer</code>Number of attachment posts</div>
@@ -267,7 +277,7 @@ as a Featured Image or inserted in the post as an image or link.</p></p>
267
  </div>
268
  <a name="mla_find_array_element" id="mla_find_array_element"></a><div class="element clickable method public mla_find_array_element" data-toggle="collapse" data-target=".mla_find_array_element .collapse">
269
  <h2>Finds the value of a key in a possibily nested array structure</h2>
270
- <pre>mla_find_array_element(string $needle, array $haystack, boolean $single, boolean $export) : string</pre>
271
  <div class="labels"></div>
272
  <div class="row collapse"><div class="detail-description">
273
  <p class="long_description"><p>Used primarily to extract fields from the _wp_attachment_metadata custom field.
@@ -284,11 +294,12 @@ Could also be used with the ID3 metadata exposed in WordPress 3.6 and later.</p>
284
  <h4>$haystack</h4>
285
  <code>array</code><p>PHP nested arrays</p></div>
286
  <div class="subelement argument">
287
- <h4>$single</h4>
288
- <code>boolean</code><p>return first element of an array result</p></div>
 
289
  <div class="subelement argument">
290
- <h4>$export</h4>
291
- <code>boolean</code><p>return results in var_export() format</p>
292
  </div>
293
  <h3>Returns</h3>
294
  <div class="subelement response">
@@ -355,7 +366,7 @@ the posts and postmeta tables, and all references to the attachment.</p></p>
355
  </div>
356
  <h3>Returns</h3>
357
  <div class="subelement response">
358
- <code>array</code>Placeholder information: each entry is an array with ['prefix'] => string, ['value'] => string, ['single'] => boolean</div>
359
  </div></div>
360
  </div>
361
  <a name="mla_load_template" id="mla_load_template"></a><div class="element clickable method public mla_load_template" data-toggle="collapse" data-target=".mla_load_template .collapse">
@@ -460,7 +471,7 @@ Modeled after wp_edit_attachments_query in wp-admin/post.php</p></p>
460
  </div></div>
461
  </div>
462
  <a name="mla_query_posts_join_filter" id="mla_query_posts_join_filter"></a><div class="element clickable method public mla_query_posts_join_filter" data-toggle="collapse" data-target=".mla_query_posts_join_filter .collapse">
463
- <h2>Adds a JOIN clause, if required, to handle sorting/searching on ALT Text</h2>
464
  <pre>mla_query_posts_join_filter(string $join_clause) : string</pre>
465
  <div class="labels"></div>
466
  <div class="row collapse"><div class="detail-description">
@@ -557,6 +568,29 @@ Defined as public because it's a filter.</p></p>
557
  </div>
558
  </div></div>
559
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  <a name="mla_update_single_item" id="mla_update_single_item"></a><div class="element clickable method public mla_update_single_item" data-toggle="collapse" data-target=".mla_update_single_item .collapse">
561
  <h2>Update a single item; change the meta data
562
  for a single attachment.</h2>
@@ -751,12 +785,13 @@ Modeled after wp_edit_attachments_query in wp-admin/post.php</p></p>
751
  and array(s) of which attachments each [gallery] contains. The arrays are built once
752
  each page load and cached for subsequent calls.</p>
753
 
754
- <p>The outer array is keyed by post_id. It contains an array of [gallery] entries numbered from one (1).
755
- Each inner array has these elements:
756
  ['parent_title'] post_title of the gallery parent,
757
  ['parent_type'] 'post' or 'page' or the custom post_type of the gallery parent,
758
- ['query'] contains a string with the arguments of the [gallery],
759
- ['results'] contains an array of post_ids for the objects in the gallery.</p></p>
 
 
760
  <table class="table table-bordered"><tr>
761
  <th>since</th>
762
  <td>0.70</td>
@@ -789,6 +824,18 @@ each page load and cached for subsequent calls.</p></p>
789
  </tr></table>
790
  </div></div>
791
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
792
  <a name="%24query_parameters" id="$query_parameters"> </a><div class="element clickable property private $query_parameters" data-toggle="collapse" data-target=".$query_parameters .collapse">
793
  <h2>WP_Query filter "parameters"</h2>
794
  <pre>$query_parameters : array</pre>
@@ -798,7 +845,7 @@ each page load and cached for subsequent calls.</p></p>
798
  The parameters are set up in the _prepare_list_table_query function, and
799
  any further logic required to translate those values is contained in the filters.</p>
800
 
801
- <p>Array index values are: use_postmeta_view, postmeta_key, detached, orderby, order, s, mla_search_connector, mla_search_fields, sentence, exact</p></p>
802
  <table class="table table-bordered"><tr>
803
  <th>since</th>
804
  <td>0.30</td>
@@ -826,7 +873,7 @@ any further logic required to translate those values is contained in the filters
826
  <div class="row"><footer class="span12">
827
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
828
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
829
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
830
  </div>
831
  </body>
832
  </html>
67
  <li class="method public "><a href="#mla_parse_template" title="mla_parse_template :: Expand a template, replacing place holders with their values"><span class="description">Expand a template, replacing place holders with their values</span><pre>mla_parse_template()</pre></a></li>
68
  <li class="method public "><a href="#mla_query_list_table_items" title="mla_query_list_table_items :: Retrieve attachment objects for list table display"><span class="description">Retrieve attachment objects for list table display</span><pre>mla_query_list_table_items()</pre></a></li>
69
  <li class="method public "><a href="#mla_query_media_modal_items" title="mla_query_media_modal_items :: Retrieve attachment objects for the WordPress Media Manager"><span class="description">Retrieve attachment objects for the WordPress Media Manager</span><pre>mla_query_media_modal_items()</pre></a></li>
70
+ <li class="method public "><a href="#mla_query_posts_join_filter" title="mla_query_posts_join_filter :: Adds a JOIN clause, if required, to handle sorting/searching on custom fields or ALT Text"><span class="description">Adds a JOIN clause, if required, to handle sorting/searching on custom fields or ALT Text</span><pre>mla_query_posts_join_filter()</pre></a></li>
71
  <li class="method public "><a href="#mla_query_posts_orderby_filter" title="mla_query_posts_orderby_filter :: Adds a ORDERBY clause, if required"><span class="description">Adds a ORDERBY clause, if required</span><pre>mla_query_posts_orderby_filter()</pre></a></li>
72
  <li class="method public "><a href="#mla_query_posts_search_filter" title="mla_query_posts_search_filter :: Adds a keyword search to the WHERE clause, if required"><span class="description">Adds a keyword search to the WHERE clause, if required</span><pre>mla_query_posts_search_filter()</pre></a></li>
73
  <li class="method public "><a href="#mla_query_posts_where_filter" title="mla_query_posts_where_filter :: Adds a WHERE clause for detached items"><span class="description">Adds a WHERE clause for detached items</span><pre>mla_query_posts_where_filter()</pre></a></li>
74
  <li class="method public "><a href="#mla_save_post_action" title="mla_save_post_action :: Invalidates $mla_galleries and $galleries arrays and cached values after post, page or attachment updates"><span class="description">Invalidates $mla_galleries and $galleries arrays and cached values after post, page or attachment updates</span><pre>mla_save_post_action()</pre></a></li>
75
+ <li class="method public "><a href="#mla_update_item_postmeta" title="mla_update_item_postmeta :: Update custom field data for a single attachment."><span class="description">Update custom field data for a single attachment.</span><pre>mla_update_item_postmeta()</pre></a></li>
76
  <li class="method public "><a href="#mla_update_single_item" title="mla_update_single_item :: Update a single item; change the meta data
77
  for a single attachment."><span class="description">Update a single item; change the meta data
78
  for a single attachment.</span><pre>mla_update_single_item()</pre></a></li>
89
  <li class="property private "><a href="#%24galleries" title="$galleries :: Objects containing [gallery] shortcodes"><span class="description">Objects containing [gallery] shortcodes</span><pre>$galleries</pre></a></li>
90
  <li class="property private "><a href="#%24mla_alt_text_view" title="$mla_alt_text_view :: Provides a unique name for the ALT Text SQL VIEW"><span class="description">Provides a unique name for the ALT Text SQL VIEW</span><pre>$mla_alt_text_view</pre></a></li>
91
  <li class="property private "><a href="#%24mla_galleries" title="$mla_galleries :: Objects containing [mla_gallery] shortcodes"><span class="description">Objects containing [mla_gallery] shortcodes</span><pre>$mla_galleries</pre></a></li>
92
+ <li class="property private "><a href="#%24mla_list_table_items" title="$mla_list_table_items :: Cache the results of mla_count_list_table_items for reuse in mla_query_list_table_items"><span class="description">Cache the results of mla_count_list_table_items for reuse in mla_query_list_table_items</span><pre>$mla_list_table_items</pre></a></li>
93
  <li class="property private "><a href="#%24query_parameters" title='$query_parameters :: WP_Query filter "parameters"'><span class="description">WP_Query filter "parameters"</span><pre>$query_parameters</pre></a></li>
94
  <li class="nav-header">
95
  <i class="icon-custom icon-constant"></i> Constants</li>
137
  </div>
138
  <a name="mla_count_list_table_items" id="mla_count_list_table_items"></a><div class="element clickable method public mla_count_list_table_items" data-toggle="collapse" data-target=".mla_count_list_table_items .collapse">
139
  <h2>Get the total number of attachment posts</h2>
140
+ <pre>mla_count_list_table_items(array $request, int $offset, int $count) : integer</pre>
141
  <div class="labels"></div>
142
  <div class="row collapse"><div class="detail-description">
143
  <p class="long_description"></p>
150
  <h4>$request</h4>
151
  <code>array</code><p>Query variables, e.g., from $_REQUEST</p>
152
  </div>
153
+ <div class="subelement argument">
154
+ <h4>$offset</h4>
155
+ <code>int</code><p>(optional) number of rows to skip over to reach desired page</p>
156
+ </div>
157
+ <div class="subelement argument">
158
+ <h4>$count</h4>
159
+ <code>int</code><p>(optional) number of rows on each page</p>
160
+ </div>
161
  <h3>Returns</h3>
162
  <div class="subelement response">
163
  <code>integer</code>Number of attachment posts</div>
277
  </div>
278
  <a name="mla_find_array_element" id="mla_find_array_element"></a><div class="element clickable method public mla_find_array_element" data-toggle="collapse" data-target=".mla_find_array_element .collapse">
279
  <h2>Finds the value of a key in a possibily nested array structure</h2>
280
+ <pre>mla_find_array_element(string $needle, array $haystack, string $option, boolean $keep_existing) : string</pre>
281
  <div class="labels"></div>
282
  <div class="row collapse"><div class="detail-description">
283
  <p class="long_description"><p>Used primarily to extract fields from the _wp_attachment_metadata custom field.
294
  <h4>$haystack</h4>
295
  <code>array</code><p>PHP nested arrays</p></div>
296
  <div class="subelement argument">
297
+ <h4>$option</h4>
298
+ <code>string</code><p>format option 'text'|'single'|'export'|'array'|'multi'</p>
299
+ </div>
300
  <div class="subelement argument">
301
+ <h4>$keep_existing</h4>
302
+ <code>boolean</code><p>keep existing values - for 'multi' option</p>
303
  </div>
304
  <h3>Returns</h3>
305
  <div class="subelement response">
366
  </div>
367
  <h3>Returns</h3>
368
  <div class="subelement response">
369
+ <code>array</code>Placeholder information: each entry is an array with ['prefix'] => string, ['value'] => string, ['option'] => string 'single'|'export'</div>
370
  </div></div>
371
  </div>
372
  <a name="mla_load_template" id="mla_load_template"></a><div class="element clickable method public mla_load_template" data-toggle="collapse" data-target=".mla_load_template .collapse">
471
  </div></div>
472
  </div>
473
  <a name="mla_query_posts_join_filter" id="mla_query_posts_join_filter"></a><div class="element clickable method public mla_query_posts_join_filter" data-toggle="collapse" data-target=".mla_query_posts_join_filter .collapse">
474
+ <h2>Adds a JOIN clause, if required, to handle sorting/searching on custom fields or ALT Text</h2>
475
  <pre>mla_query_posts_join_filter(string $join_clause) : string</pre>
476
  <div class="labels"></div>
477
  <div class="row collapse"><div class="detail-description">
568
  </div>
569
  </div></div>
570
  </div>
571
+ <a name="mla_update_item_postmeta" id="mla_update_item_postmeta"></a><div class="element clickable method public mla_update_item_postmeta" data-toggle="collapse" data-target=".mla_update_item_postmeta .collapse">
572
+ <h2>Update custom field data for a single attachment.</h2>
573
+ <pre>mla_update_item_postmeta(int $post_id, array $new_meta) : string</pre>
574
+ <div class="labels"></div>
575
+ <div class="row collapse"><div class="detail-description">
576
+ <p class="long_description"></p>
577
+ <table class="table table-bordered"><tr>
578
+ <th>since</th>
579
+ <td>1.40</td>
580
+ </tr></table>
581
+ <h3>Parameters</h3>
582
+ <div class="subelement argument">
583
+ <h4>$post_id</h4>
584
+ <code>int</code><p>The ID of the attachment to be updated</p></div>
585
+ <div class="subelement argument">
586
+ <h4>$new_meta</h4>
587
+ <code>array</code><p>Field name => value pairs</p>
588
+ </div>
589
+ <h3>Returns</h3>
590
+ <div class="subelement response">
591
+ <code>string</code>success/failure message(s)</div>
592
+ </div></div>
593
+ </div>
594
  <a name="mla_update_single_item" id="mla_update_single_item"></a><div class="element clickable method public mla_update_single_item" data-toggle="collapse" data-target=".mla_update_single_item .collapse">
595
  <h2>Update a single item; change the meta data
596
  for a single attachment.</h2>
785
  and array(s) of which attachments each [gallery] contains. The arrays are built once
786
  each page load and cached for subsequent calls.</p>
787
 
788
+ <p>The outer array is keyed by post_id. It contains an associative array with:
 
789
  ['parent_title'] post_title of the gallery parent,
790
  ['parent_type'] 'post' or 'page' or the custom post_type of the gallery parent,
791
+ ['results'] array ( ID => ID ) of attachments appearing in ANY of the parent's galleries.
792
+ ['galleries'] array of [gallery] entries numbered from one (1), containing:
793
+ galleries[X]['query'] contains a string with the arguments of the [gallery],
794
+ galleries[X]['results'] contains an array ( ID ) of post_ids for the objects in the gallery.</p></p>
795
  <table class="table table-bordered"><tr>
796
  <th>since</th>
797
  <td>0.70</td>
824
  </tr></table>
825
  </div></div>
826
  </div>
827
+ <a name="%24mla_list_table_items" id="$mla_list_table_items"> </a><div class="element clickable property private $mla_list_table_items" data-toggle="collapse" data-target=".$mla_list_table_items .collapse">
828
+ <h2>Cache the results of mla_count_list_table_items for reuse in mla_query_list_table_items</h2>
829
+ <pre>$mla_list_table_items : array</pre>
830
+ <div class="labels"></div>
831
+ <div class="row collapse"><div class="detail-description">
832
+ <p class="long_description"></p>
833
+ <table class="table table-bordered"><tr>
834
+ <th>since</th>
835
+ <td>1.40</td>
836
+ </tr></table>
837
+ </div></div>
838
+ </div>
839
  <a name="%24query_parameters" id="$query_parameters"> </a><div class="element clickable property private $query_parameters" data-toggle="collapse" data-target=".$query_parameters .collapse">
840
  <h2>WP_Query filter "parameters"</h2>
841
  <pre>$query_parameters : array</pre>
845
  The parameters are set up in the _prepare_list_table_query function, and
846
  any further logic required to translate those values is contained in the filters.</p>
847
 
848
+ <p>Array index values are: use_postmeta_view, postmeta_key, postmeta_value, patterns, detached, orderby, order, mla-metavalue, debug, s, mla_search_connector, mla_search_fields, sentence, exact</p></p>
849
  <table class="table table-bordered"><tr>
850
  <th>since</th>
851
  <td>0.30</td>
873
  <div class="row"><footer class="span12">
874
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
875
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
876
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
877
  </div>
878
  </body>
879
  </html>
phpDocs/classes/MLAEdit.html CHANGED
@@ -123,11 +123,12 @@
123
  <h3>Parameters</h3>
124
  <div class="subelement argument">
125
  <h4>$post_type</h4>
126
- <code>string</code><p>type of the current post, e.g., 'attachment'</p>
127
  </div>
128
  <div class="subelement argument">
129
  <h4>$post</h4>
130
- <code>object</code><p>current post</p></div>
 
131
  </div></div>
132
  </div>
133
  <a name="mla_attachment_submitbox_action" id="mla_attachment_submitbox_action"></a><div class="element clickable method public mla_attachment_submitbox_action" data-toggle="collapse" data-target=".mla_attachment_submitbox_action .collapse">
@@ -342,7 +343,7 @@ The array is built once each page load and cached for subsequent calls.</p></p>
342
  <div class="row"><footer class="span12">
343
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
344
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
345
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
346
  </div>
347
  </body>
348
  </html>
123
  <h3>Parameters</h3>
124
  <div class="subelement argument">
125
  <h4>$post_type</h4>
126
+ <code>string</code><p>type of the current post, e.g., 'attachment' (optional, default 'unknown')</p>
127
  </div>
128
  <div class="subelement argument">
129
  <h4>$post</h4>
130
+ <code>object</code><p>current post (optional, default (object) array ( 'ID' => 0 ))</p>
131
+ </div>
132
  </div></div>
133
  </div>
134
  <a name="mla_attachment_submitbox_action" id="mla_attachment_submitbox_action"></a><div class="element clickable method public mla_attachment_submitbox_action" data-toggle="collapse" data-target=".mla_attachment_submitbox_action .collapse">
343
  <div class="row"><footer class="span12">
344
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
345
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
346
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
347
  </div>
348
  </body>
349
  </html>
phpDocs/classes/MLAMime.html ADDED
@@ -0,0 +1,1269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
5
+ <meta charset="utf-8">
6
+ <title>Media Library Assistant » \MLAMime</title>
7
+ <meta name="author" content="Mike van Riel">
8
+ <meta name="description" content="">
9
+ <link href="../css/template.css" rel="stylesheet" media="all">
10
+ <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
11
+ <link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
12
+ <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
13
+ <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
14
+ </head>
15
+ <body>
16
+ <div class="navbar navbar-fixed-top">
17
+ <div class="navbar-inner"><div class="container">
18
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Media Library Assistant</a><div class="nav-collapse"><ul class="nav">
19
+ <li class="dropdown">
20
+ <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
21
+ API Documentation <b class="caret"></b></a><ul class="dropdown-menu"></ul>
22
+ </li>
23
+ <li class="dropdown" id="charts-menu">
24
+ <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
25
+ Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
26
+ </li>
27
+ <li class="dropdown" id="reports-menu">
28
+ <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
29
+ Reports <b class="caret"></b></a><ul class="dropdown-menu">
30
+ <li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
31
+ <span class="label label-info">0</span></a></li>
32
+ <li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
33
+ <ul></ul></a></li>
34
+ <li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
35
+ <span class="label label-info">0</span></a></li>
36
+ </ul>
37
+ </li>
38
+ </ul></div>
39
+ </div></div>
40
+ <div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
41
+ </div>
42
+ <div id="___" class="container">
43
+ <noscript><div class="alert alert-warning">
44
+ Javascript is disabled; several features are only available
45
+ if Javascript is enabled.
46
+ </div></noscript>
47
+ <div class="row">
48
+ <div class="span4">
49
+ <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
50
+ <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
51
+ </div>
52
+ <ul class="side-nav nav nav-list">
53
+ <li class="nav-header">
54
+ <i class="icon-custom icon-method"></i> Methods</li>
55
+ <li class="method public "><a href="#initialize" title="initialize :: Initialization function, similar to __construct()"><span class="description">Initialization function, similar to __construct()</span><pre>initialize()</pre></a></li>
56
+ <li class="method public "><a href="#mla_add_post_mime_type" title="mla_add_post_mime_type :: Add an MLA post_mime_type object"><span class="description">Add an MLA post_mime_type object</span><pre>mla_add_post_mime_type()</pre></a></li>
57
+ <li class="method public "><a href="#mla_add_upload_mime" title="mla_add_upload_mime :: Add an MLA Upload MIME Type object"><span class="description">Add an MLA Upload MIME Type object</span><pre>mla_add_upload_mime()</pre></a></li>
58
+ <li class="method public "><a href="#mla_count_optional_upload_items" title="mla_count_optional_upload_items :: Get the total number of MLA Upload MIME Type objects"><span class="description">Get the total number of MLA Upload MIME Type objects</span><pre>mla_count_optional_upload_items()</pre></a></li>
59
+ <li class="method public "><a href="#mla_count_upload_items" title="mla_count_upload_items :: Get the total number of MLA Upload MIME Type objects"><span class="description">Get the total number of MLA Upload MIME Type objects</span><pre>mla_count_upload_items()</pre></a></li>
60
+ <li class="method public "><a href="#mla_count_view_items" title="mla_count_view_items :: Get the total number of MLA post_mime_type objects"><span class="description">Get the total number of MLA post_mime_type objects</span><pre>mla_count_view_items()</pre></a></li>
61
+ <li class="method public "><a href="#mla_delete_post_mime_type" title="mla_delete_post_mime_type :: Delete an MLA post_mime_type object"><span class="description">Delete an MLA post_mime_type object</span><pre>mla_delete_post_mime_type()</pre></a></li>
62
+ <li class="method public "><a href="#mla_delete_upload_mime" title="mla_delete_upload_mime :: Delete an MLA Upload MIME Type object"><span class="description">Delete an MLA Upload MIME Type object</span><pre>mla_delete_upload_mime()</pre></a></li>
63
+ <li class="method public "><a href="#mla_ext2type_filter" title="mla_ext2type_filter :: Update the file extension to icon type (e.g., xls =&gt; spreadsheet, doc =&gt; document) array"><span class="description">Update the file extension to icon type (e.g., xls =&gt; spreadsheet, doc =&gt; document) array</span><pre>mla_ext2type_filter()</pre></a></li>
64
+ <li class="method public "><a href="#mla_get_core_icon_type" title="mla_get_core_icon_type :: Retrieve a standard icon type, i.e., without MLA filtering"><span class="description">Retrieve a standard icon type, i.e., without MLA filtering</span><pre>mla_get_core_icon_type()</pre></a></li>
65
+ <li class="method public "><a href="#mla_get_current_icon_types" title="mla_get_current_icon_types :: Get an array of current Icon Type names"><span class="description">Get an array of current Icon Type names</span><pre>mla_get_current_icon_types()</pre></a></li>
66
+ <li class="method public "><a href="#mla_get_icon_type_image" title="mla_get_icon_type_image :: Get an HTML img element representing an attachment icon"><span class="description">Get an HTML img element representing an attachment icon</span><pre>mla_get_icon_type_image()</pre></a></li>
67
+ <li class="method public "><a href="#mla_get_optional_upload_mime" title="mla_get_optional_upload_mime :: Retrieve an MLA Optional Upload MIME Type given an ID"><span class="description">Retrieve an MLA Optional Upload MIME Type given an ID</span><pre>mla_get_optional_upload_mime()</pre></a></li>
68
+ <li class="method public "><a href="#mla_get_post_mime_type" title="mla_get_post_mime_type :: Retrieve an MLA post_mime_type object"><span class="description">Retrieve an MLA post_mime_type object</span><pre>mla_get_post_mime_type()</pre></a></li>
69
+ <li class="method public "><a href="#mla_get_post_mime_type_slug" title="mla_get_post_mime_type_slug :: Retrieve an MLA post_mime_type slug given a post_ID"><span class="description">Retrieve an MLA post_mime_type slug given a post_ID</span><pre>mla_get_post_mime_type_slug()</pre></a></li>
70
+ <li class="method public "><a href="#mla_get_upload_mime" title="mla_get_upload_mime :: Retrieve an MLA Upload MIME Type object"><span class="description">Retrieve an MLA Upload MIME Type object</span><pre>mla_get_upload_mime()</pre></a></li>
71
+ <li class="method public "><a href="#mla_get_upload_mime_slug" title="mla_get_upload_mime_slug :: Retrieve an MLA Upload MIME Type slug given a post_ID"><span class="description">Retrieve an MLA Upload MIME Type slug given a post_ID</span><pre>mla_get_upload_mime_slug()</pre></a></li>
72
+ <li class="method public "><a href="#mla_icon_dir_filter" title="mla_icon_dir_filter :: Retrieve the icon directory for a MIME type"><span class="description">Retrieve the icon directory for a MIME type</span><pre>mla_icon_dir_filter()</pre></a></li>
73
+ <li class="method public "><a href="#mla_icon_dir_uri_filter" title="mla_icon_dir_uri_filter :: Retrieve the icon directory URL for a MIME type"><span class="description">Retrieve the icon directory URL for a MIME type</span><pre>mla_icon_dir_uri_filter()</pre></a></li>
74
+ <li class="method public "><a href="#mla_icon_dirs_filter" title="mla_icon_dirs_filter :: Retrieve the icon (directory =&gt; URI) array for a MIME type"><span class="description">Retrieve the icon (directory =&gt; URI) array for a MIME type</span><pre>mla_icon_dirs_filter()</pre></a></li>
75
+ <li class="method public "><a href="#mla_mime_types_filter" title="mla_mime_types_filter :: Retrieve list of MIME types and file extensions; use this filter to add types"><span class="description">Retrieve list of MIME types and file extensions; use this filter to add types</span><pre>mla_mime_types_filter()</pre></a></li>
76
+ <li class="method public "><a href="#mla_parse_view_specification" title="mla_parse_view_specification :: Analyze a Library View/Post MIME Type specification, returning an array of the place holders it contains"><span class="description">Analyze a Library View/Post MIME Type specification, returning an array of the place holders it contains</span><pre>mla_parse_view_specification()</pre></a></li>
77
+ <li class="method public "><a href="#mla_pluck_table_views" title="mla_pluck_table_views :: Retrieve views eligible for Media/Assistant table display"><span class="description">Retrieve views eligible for Media/Assistant table display</span><pre>mla_pluck_table_views()</pre></a></li>
78
+ <li class="method public "><a href="#mla_post_mime_types_filter" title="mla_post_mime_types_filter :: Get default Post MIME Types"><span class="description">Get default Post MIME Types</span><pre>mla_post_mime_types_filter()</pre></a></li>
79
+ <li class="method public "><a href="#mla_prepare_view_query" title="mla_prepare_view_query :: Convert a Library View/Post MIME Type specification to WP_Query parameters"><span class="description">Convert a Library View/Post MIME Type specification to WP_Query parameters</span><pre>mla_prepare_view_query()</pre></a></li>
80
+ <li class="method public "><a href="#mla_query_optional_upload_items" title="mla_query_optional_upload_items :: Retrieve MLA Upload MIME Type objects for list table display"><span class="description">Retrieve MLA Upload MIME Type objects for list table display</span><pre>mla_query_optional_upload_items()</pre></a></li>
81
+ <li class="method public "><a href="#mla_query_upload_items" title="mla_query_upload_items :: Retrieve MLA Upload MIME Type objects for list table display"><span class="description">Retrieve MLA Upload MIME Type objects for list table display</span><pre>mla_query_upload_items()</pre></a></li>
82
+ <li class="method public "><a href="#mla_query_view_items" title="mla_query_view_items :: Retrieve MLA post_mime_type objects for list table display"><span class="description">Retrieve MLA post_mime_type objects for list table display</span><pre>mla_query_view_items()</pre></a></li>
83
+ <li class="method public "><a href="#mla_sanitize_mime_type_filter" title="mla_sanitize_mime_type_filter :: Sanitize a MIME type"><span class="description">Sanitize a MIME type</span><pre>mla_sanitize_mime_type_filter()</pre></a></li>
84
+ <li class="method public "><a href="#mla_tabulate_upload_items" title="mla_tabulate_upload_items :: Tabulate MLA Upload MIME Type objects by view for list table display"><span class="description">Tabulate MLA Upload MIME Type objects by view for list table display</span><pre>mla_tabulate_upload_items()</pre></a></li>
85
+ <li class="method public "><a href="#mla_update_post_mime_type" title="mla_update_post_mime_type :: Update an MLA post_mime_type object"><span class="description">Update an MLA post_mime_type object</span><pre>mla_update_post_mime_type()</pre></a></li>
86
+ <li class="method public "><a href="#mla_update_upload_mime" title="mla_update_upload_mime :: Update an MLA Upload MIME Type object"><span class="description">Update an MLA Upload MIME Type object</span><pre>mla_update_upload_mime()</pre></a></li>
87
+ <li class="method public "><a href="#mla_upload_mimes_filter" title="mla_upload_mimes_filter :: Retrieve list of allowed MIME types and file extensions; use this filter to remove types"><span class="description">Retrieve list of allowed MIME types and file extensions; use this filter to remove types</span><pre>mla_upload_mimes_filter()</pre></a></li>
88
+ <li class="method public "><a href="#mla_wp_check_filetype_and_ext_filter" title="mla_wp_check_filetype_and_ext_filter :: Attempts to determine the real file type of a file"><span class="description">Attempts to determine the real file type of a file</span><pre>mla_wp_check_filetype_and_ext_filter()</pre></a></li>
89
+ <li class="method public "><a href="#mla_wp_mime_type_icon_filter" title="mla_wp_mime_type_icon_filter :: Retrieve the icon for a MIME type"><span class="description">Retrieve the icon for a MIME type</span><pre>mla_wp_mime_type_icon_filter()</pre></a></li>
90
+ <li class="nav-header private">» Private</li>
91
+ <li class="method private "><a href="#_execute_optional_upload_items_query" title="_execute_optional_upload_items_query :: Execute an Optional Upload MIME Types query"><span class="description">Execute an Optional Upload MIME Types query</span><pre>_execute_optional_upload_items_query()</pre></a></li>
92
+ <li class="method private "><a href="#_execute_upload_items_query" title="_execute_upload_items_query :: Execute an Upload MIME Types query"><span class="description">Execute an Upload MIME Types query</span><pre>_execute_upload_items_query()</pre></a></li>
93
+ <li class="method private "><a href="#_execute_view_items_query" title="_execute_view_items_query :: Add filters, run query, remove filters"><span class="description">Add filters, run query, remove filters</span><pre>_execute_view_items_query()</pre></a></li>
94
+ <li class="method private "><a href="#_get_core_icon_types" title="_get_core_icon_types :: Assemble the list of icon types without MLA filtering"><span class="description">Assemble the list of icon types without MLA filtering</span><pre>_get_core_icon_types()</pre></a></li>
95
+ <li class="method private "><a href="#_get_current_icon_types" title="_get_current_icon_types :: Assemble the list of icon types with MLA filtering"><span class="description">Assemble the list of icon types with MLA filtering</span><pre>_get_current_icon_types()</pre></a></li>
96
+ <li class="method private "><a href="#_get_optional_upload_mime_templates" title="_get_optional_upload_mime_templates :: Assemble the in-memory representation of the (read-only) Optional Upload MIME Types"><span class="description">Assemble the in-memory representation of the (read-only) Optional Upload MIME Types</span><pre>_get_optional_upload_mime_templates()</pre></a></li>
97
+ <li class="method private "><a href="#_get_post_mime_templates" title="_get_post_mime_templates :: Assemble the in-memory representation of the Post MIME Types"><span class="description">Assemble the in-memory representation of the Post MIME Types</span><pre>_get_post_mime_templates()</pre></a></li>
98
+ <li class="method private "><a href="#_get_upload_mime_templates" title="_get_upload_mime_templates :: Assemble the in-memory representation of the Upload MIME Types"><span class="description">Assemble the in-memory representation of the Upload MIME Types</span><pre>_get_upload_mime_templates()</pre></a></li>
99
+ <li class="method private "><a href="#_prepare_optional_upload_items_query" title="_prepare_optional_upload_items_query :: Sanitize and expand Optional Upload MIME Type query arguments from request variables"><span class="description">Sanitize and expand Optional Upload MIME Type query arguments from request variables</span><pre>_prepare_optional_upload_items_query()</pre></a></li>
100
+ <li class="method private "><a href="#_prepare_upload_items_query" title="_prepare_upload_items_query :: Sanitize and expand Upload MIME Type query arguments from request variables"><span class="description">Sanitize and expand Upload MIME Type query arguments from request variables</span><pre>_prepare_upload_items_query()</pre></a></li>
101
+ <li class="method private "><a href="#_prepare_view_items_query" title="_prepare_view_items_query :: Sanitize and expand query arguments from request variables"><span class="description">Sanitize and expand query arguments from request variables</span><pre>_prepare_view_items_query()</pre></a></li>
102
+ <li class="method private "><a href="#_put_post_mime_templates" title="_put_post_mime_templates :: Store the custom entries of the Post MIME Types"><span class="description">Store the custom entries of the Post MIME Types</span><pre>_put_post_mime_templates()</pre></a></li>
103
+ <li class="method private "><a href="#_put_upload_mime_templates" title="_put_upload_mime_templates :: Store the options portion of the Upload MIME Types"><span class="description">Store the options portion of the Upload MIME Types</span><pre>_put_upload_mime_templates()</pre></a></li>
104
+ <li class="nav-header">
105
+ <i class="icon-custom icon-property"></i> Properties</li>
106
+ <li class="nav-header private">» Private</li>
107
+ <li class="property private "><a href="#%24disable_mla_filtering" title="$disable_mla_filtering :: Disable MIME filtering during option initialization"><span class="description">Disable MIME filtering during option initialization</span><pre>$disable_mla_filtering</pre></a></li>
108
+ <li class="property private "><a href="#%24mla_core_icon_types" title="$mla_core_icon_types :: Icon types without MLA filtering"><span class="description">Icon types without MLA filtering</span><pre>$mla_core_icon_types</pre></a></li>
109
+ <li class="property private "><a href="#%24mla_current_icon_types" title="$mla_current_icon_types :: Icon types with MLA filtering - basenames of files in the current icon directory"><span class="description">Icon types with MLA filtering - basenames of files in the current icon directory</span><pre>$mla_current_icon_types</pre></a></li>
110
+ <li class="property private "><a href="#%24mla_icon_type_associations" title="$mla_icon_type_associations :: In-memory representation of the Icon Type =&gt; file extension(s) associations"><span class="description">In-memory representation of the Icon Type =&gt; file extension(s) associations</span><pre>$mla_icon_type_associations</pre></a></li>
111
+ <li class="property private "><a href="#%24mla_optional_upload_mime_templates" title="$mla_optional_upload_mime_templates :: In-memory representation of the (read-only) Optional Upload MIME Types"><span class="description">In-memory representation of the (read-only) Optional Upload MIME Types</span><pre>$mla_optional_upload_mime_templates</pre></a></li>
112
+ <li class="property private "><a href="#%24mla_post_mime_highest_ID" title="$mla_post_mime_highest_ID :: Highest existing Post MIME Type ID value"><span class="description">Highest existing Post MIME Type ID value</span><pre>$mla_post_mime_highest_ID</pre></a></li>
113
+ <li class="property private "><a href="#%24mla_post_mime_templates" title="$mla_post_mime_templates :: In-memory representation of the Post MIME Types"><span class="description">In-memory representation of the Post MIME Types</span><pre>$mla_post_mime_templates</pre></a></li>
114
+ <li class="property private "><a href="#%24mla_upload_mime_highest_ID" title="$mla_upload_mime_highest_ID :: Highest existing Upload MIME Type ID value"><span class="description">Highest existing Upload MIME Type ID value</span><pre>$mla_upload_mime_highest_ID</pre></a></li>
115
+ <li class="property private "><a href="#%24mla_upload_mime_templates" title="$mla_upload_mime_templates :: In-memory representation of the Upload MIME Types"><span class="description">In-memory representation of the Upload MIME Types</span><pre>$mla_upload_mime_templates</pre></a></li>
116
+ </ul>
117
+ </div>
118
+ <div class="span8">
119
+ <a name="%5CMLAMime" id="\MLAMime"></a><ul class="breadcrumb">
120
+ <li>
121
+ <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
122
+ </li>
123
+ <li><a href="../namespaces/global.html">global</a></li>
124
+ <li class="active">
125
+ <span class="divider">\</span><a href="../classes/MLAMime.html">MLAMime</a>
126
+ </li>
127
+ </ul>
128
+ <div href="../classes/MLAMime.html" class="element class">
129
+ <p class="short_description">Class MLA (Media Library Assistant) MIME filters WordPress MIME Type functions and supports
130
+ the Views and Uploads Settings tabs</p>
131
+ <div class="details">
132
+ <p class="long_description"></p>
133
+ <table class="table table-bordered">
134
+ <tr>
135
+ <th>package</th>
136
+ <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
137
+ </tr>
138
+ <tr>
139
+ <th>since</th>
140
+ <td>1.40</td>
141
+ </tr>
142
+ </table>
143
+ <h3>
144
+ <i class="icon-custom icon-method"></i> Methods</h3>
145
+ <a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
146
+ <h2>Initialization function, similar to __construct()</h2>
147
+ <pre>initialize() : void</pre>
148
+ <div class="labels"></div>
149
+ <div class="row collapse"><div class="detail-description">
150
+ <p class="long_description"></p>
151
+ <table class="table table-bordered"><tr>
152
+ <th>since</th>
153
+ <td>1.40</td>
154
+ </tr></table>
155
+ </div></div>
156
+ </div>
157
+ <a name="mla_add_post_mime_type" id="mla_add_post_mime_type"></a><div class="element clickable method public mla_add_post_mime_type" data-toggle="collapse" data-target=".mla_add_post_mime_type .collapse">
158
+ <h2>Add an MLA post_mime_type object</h2>
159
+ <pre>mla_add_post_mime_type(array $request) : array</pre>
160
+ <div class="labels"></div>
161
+ <div class="row collapse"><div class="detail-description">
162
+ <p class="long_description"></p>
163
+ <table class="table table-bordered"><tr>
164
+ <th>since</th>
165
+ <td>1.40</td>
166
+ </tr></table>
167
+ <h3>Parameters</h3>
168
+ <div class="subelement argument">
169
+ <h4>$request</h4>
170
+ <code>array</code><p>Query variables for a single object, including slug</p></div>
171
+ <h3>Returns</h3>
172
+ <div class="subelement response">
173
+ <code>array</code>Message(s) reflecting the results of the operation</div>
174
+ </div></div>
175
+ </div>
176
+ <a name="mla_add_upload_mime" id="mla_add_upload_mime"></a><div class="element clickable method public mla_add_upload_mime" data-toggle="collapse" data-target=".mla_add_upload_mime .collapse">
177
+ <h2>Add an MLA Upload MIME Type object</h2>
178
+ <pre>mla_add_upload_mime(array $request) : array</pre>
179
+ <div class="labels"></div>
180
+ <div class="row collapse"><div class="detail-description">
181
+ <p class="long_description"></p>
182
+ <table class="table table-bordered"><tr>
183
+ <th>since</th>
184
+ <td>1.40</td>
185
+ </tr></table>
186
+ <h3>Parameters</h3>
187
+ <div class="subelement argument">
188
+ <h4>$request</h4>
189
+ <code>array</code><p>Query variables for a single object, including slug</p></div>
190
+ <h3>Returns</h3>
191
+ <div class="subelement response">
192
+ <code>array</code>Message(s) reflecting the results of the operation</div>
193
+ </div></div>
194
+ </div>
195
+ <a name="mla_count_optional_upload_items" id="mla_count_optional_upload_items"></a><div class="element clickable method public mla_count_optional_upload_items" data-toggle="collapse" data-target=".mla_count_optional_upload_items .collapse">
196
+ <h2>Get the total number of MLA Upload MIME Type objects</h2>
197
+ <pre>mla_count_optional_upload_items(array $request) : integer</pre>
198
+ <div class="labels"></div>
199
+ <div class="row collapse"><div class="detail-description">
200
+ <p class="long_description"></p>
201
+ <table class="table table-bordered"><tr>
202
+ <th>since</th>
203
+ <td>1.40</td>
204
+ </tr></table>
205
+ <h3>Parameters</h3>
206
+ <div class="subelement argument">
207
+ <h4>$request</h4>
208
+ <code>array</code><p>Query variables, e.g., from $_REQUEST</p>
209
+ </div>
210
+ <h3>Returns</h3>
211
+ <div class="subelement response">
212
+ <code>integer</code>Number of MLA Upload MIME Type objects</div>
213
+ </div></div>
214
+ </div>
215
+ <a name="mla_count_upload_items" id="mla_count_upload_items"></a><div class="element clickable method public mla_count_upload_items" data-toggle="collapse" data-target=".mla_count_upload_items .collapse">
216
+ <h2>Get the total number of MLA Upload MIME Type objects</h2>
217
+ <pre>mla_count_upload_items(array $request) : integer</pre>
218
+ <div class="labels"></div>
219
+ <div class="row collapse"><div class="detail-description">
220
+ <p class="long_description"></p>
221
+ <table class="table table-bordered"><tr>
222
+ <th>since</th>
223
+ <td>1.40</td>
224
+ </tr></table>
225
+ <h3>Parameters</h3>
226
+ <div class="subelement argument">
227
+ <h4>$request</h4>
228
+ <code>array</code><p>Query variables, e.g., from $_REQUEST</p>
229
+ </div>
230
+ <h3>Returns</h3>
231
+ <div class="subelement response">
232
+ <code>integer</code>Number of MLA Upload MIME Type objects</div>
233
+ </div></div>
234
+ </div>
235
+ <a name="mla_count_view_items" id="mla_count_view_items"></a><div class="element clickable method public mla_count_view_items" data-toggle="collapse" data-target=".mla_count_view_items .collapse">
236
+ <h2>Get the total number of MLA post_mime_type objects</h2>
237
+ <pre>mla_count_view_items(array $request) : integer</pre>
238
+ <div class="labels"></div>
239
+ <div class="row collapse"><div class="detail-description">
240
+ <p class="long_description"></p>
241
+ <table class="table table-bordered"><tr>
242
+ <th>since</th>
243
+ <td>1.40</td>
244
+ </tr></table>
245
+ <h3>Parameters</h3>
246
+ <div class="subelement argument">
247
+ <h4>$request</h4>
248
+ <code>array</code><p>Query variables, e.g., from $_REQUEST</p>
249
+ </div>
250
+ <h3>Returns</h3>
251
+ <div class="subelement response">
252
+ <code>integer</code>Number of MLA post_mime_type objects</div>
253
+ </div></div>
254
+ </div>
255
+ <a name="mla_delete_post_mime_type" id="mla_delete_post_mime_type"></a><div class="element clickable method public mla_delete_post_mime_type" data-toggle="collapse" data-target=".mla_delete_post_mime_type .collapse">
256
+ <h2>Delete an MLA post_mime_type object</h2>
257
+ <pre>mla_delete_post_mime_type(string $slug) : array</pre>
258
+ <div class="labels"></div>
259
+ <div class="row collapse"><div class="detail-description">
260
+ <p class="long_description"></p>
261
+ <table class="table table-bordered"><tr>
262
+ <th>since</th>
263
+ <td>1.40</td>
264
+ </tr></table>
265
+ <h3>Parameters</h3>
266
+ <div class="subelement argument">
267
+ <h4>$slug</h4>
268
+ <code>string</code><p>MLA post_mime_type slug</p></div>
269
+ <h3>Returns</h3>
270
+ <div class="subelement response">
271
+ <code>array</code>Message(s) reflecting the results of the operation</div>
272
+ </div></div>
273
+ </div>
274
+ <a name="mla_delete_upload_mime" id="mla_delete_upload_mime"></a><div class="element clickable method public mla_delete_upload_mime" data-toggle="collapse" data-target=".mla_delete_upload_mime .collapse">
275
+ <h2>Delete an MLA Upload MIME Type object</h2>
276
+ <pre>mla_delete_upload_mime(string $slug) : array</pre>
277
+ <div class="labels"></div>
278
+ <div class="row collapse"><div class="detail-description">
279
+ <p class="long_description"></p>
280
+ <table class="table table-bordered"><tr>
281
+ <th>since</th>
282
+ <td>1.40</td>
283
+ </tr></table>
284
+ <h3>Parameters</h3>
285
+ <div class="subelement argument">
286
+ <h4>$slug</h4>
287
+ <code>string</code><p>MLA Upload MIME Type slug</p></div>
288
+ <h3>Returns</h3>
289
+ <div class="subelement response">
290
+ <code>array</code>Message(s) reflecting the results of the operation</div>
291
+ </div></div>
292
+ </div>
293
+ <a name="mla_ext2type_filter" id="mla_ext2type_filter"></a><div class="element clickable method public mla_ext2type_filter" data-toggle="collapse" data-target=".mla_ext2type_filter .collapse">
294
+ <h2>Update the file extension to icon type (e.g., xls =&gt; spreadsheet, doc =&gt; document) array</h2>
295
+ <pre>mla_ext2type_filter(array $standard_types) : array</pre>
296
+ <div class="labels"></div>
297
+ <div class="row collapse"><div class="detail-description">
298
+ <p class="long_description"><p>Note that the calling function, wp_ext2type, takes an extension and returns an icon type.
299
+ This filter updates the array of possible matches to support the calling function.</p>
300
+
301
+ <p>Called from /wp-includes/functions.php, function wp_ext2type(). That function is called from
302
+ /wp-admin/includes/ajax-actions.php, function wp_ajax_send_link_to_editor(),
303
+ /wp-admin/includes/media.php, function wp_media_upload_handler(), and
304
+ /wp-includes/post.php, function wp_mime_type_icon(). The first two calls look for "audio"
305
+ and "video" files to call the appropriate filter. The third call assigns the appropriate icon
306
+ to the file for display purposes.</p>
307
+
308
+ <p>Defined as public because it's a filter.</p></p>
309
+ <table class="table table-bordered"><tr>
310
+ <th>since</th>
311
+ <td>1.40</td>
312
+ </tr></table>
313
+ <h3>Parameters</h3>
314
+ <div class="subelement argument">
315
+ <h4>$standard_types</h4>
316
+ <code>array</code><p>The type => ( extensions ) associations.</p>
317
+ </div>
318
+ <h3>Returns</h3>
319
+ <div class="subelement response">
320
+ <code>array</code>The updated associations array.</div>
321
+ </div></div>
322
+ </div>
323
+ <a name="mla_get_core_icon_type" id="mla_get_core_icon_type"></a><div class="element clickable method public mla_get_core_icon_type" data-toggle="collapse" data-target=".mla_get_core_icon_type .collapse">
324
+ <h2>Retrieve a standard icon type, i.e., without MLA filtering</h2>
325
+ <pre>mla_get_core_icon_type(string $extension) : string</pre>
326
+ <div class="labels"></div>
327
+ <div class="row collapse"><div class="detail-description">
328
+ <p class="long_description"></p>
329
+ <table class="table table-bordered"><tr>
330
+ <th>since</th>
331
+ <td>1.40</td>
332
+ </tr></table>
333
+ <h3>Parameters</h3>
334
+ <div class="subelement argument">
335
+ <h4>$extension</h4>
336
+ <code>string</code><p>file extension</p></div>
337
+ <h3>Returns</h3>
338
+ <div class="subelement response">
339
+ <code>string</code>icon type for the requested extension; 'default' if extension not found</div>
340
+ </div></div>
341
+ </div>
342
+ <a name="mla_get_current_icon_types" id="mla_get_current_icon_types"></a><div class="element clickable method public mla_get_current_icon_types" data-toggle="collapse" data-target=".mla_get_current_icon_types .collapse">
343
+ <h2>Get an array of current Icon Type names</h2>
344
+ <pre>mla_get_current_icon_types() : array</pre>
345
+ <div class="labels"></div>
346
+ <div class="row collapse"><div class="detail-description">
347
+ <p class="long_description"></p>
348
+ <table class="table table-bordered"><tr>
349
+ <th>since</th>
350
+ <td>1.40</td>
351
+ </tr></table>
352
+ <h3>Returns</h3>
353
+ <div class="subelement response">
354
+ <code>array</code>( icon_type ) or false on failure.</div>
355
+ </div></div>
356
+ </div>
357
+ <a name="mla_get_icon_type_image" id="mla_get_icon_type_image"></a><div class="element clickable method public mla_get_icon_type_image" data-toggle="collapse" data-target=".mla_get_icon_type_image .collapse">
358
+ <h2>Get an HTML img element representing an attachment icon</h2>
359
+ <pre>mla_get_icon_type_image(string $icon_type, array $size) : string</pre>
360
+ <div class="labels"></div>
361
+ <div class="row collapse"><div class="detail-description">
362
+ <p class="long_description"></p>
363
+ <table class="table table-bordered"><tr>
364
+ <th>since</th>
365
+ <td>1.40</td>
366
+ </tr></table>
367
+ <h3>Parameters</h3>
368
+ <div class="subelement argument">
369
+ <h4>$icon_type</h4>
370
+ <code>string</code><p>Icon Type, e.g., audio, video, spreadsheet</p></div>
371
+ <div class="subelement argument">
372
+ <h4>$size</h4>
373
+ <code>array</code><p>( width, height ) optional image size, default (64, 64).</p>
374
+ </div>
375
+ <h3>Returns</h3>
376
+ <div class="subelement response">
377
+ <code>string</code>HTML img element or empty string on failure.</div>
378
+ </div></div>
379
+ </div>
380
+ <a name="mla_get_optional_upload_mime" id="mla_get_optional_upload_mime"></a><div class="element clickable method public mla_get_optional_upload_mime" data-toggle="collapse" data-target=".mla_get_optional_upload_mime .collapse">
381
+ <h2>Retrieve an MLA Optional Upload MIME Type given an ID</h2>
382
+ <pre>mla_get_optional_upload_mime(integer $ID) : mixed</pre>
383
+ <div class="labels"></div>
384
+ <div class="row collapse"><div class="detail-description">
385
+ <p class="long_description"></p>
386
+ <table class="table table-bordered"><tr>
387
+ <th>since</th>
388
+ <td>1.40</td>
389
+ </tr></table>
390
+ <h3>Parameters</h3>
391
+ <div class="subelement argument">
392
+ <h4>$ID</h4>
393
+ <code>integer</code><p>MLA Optional Upload MIME Type ID</p></div>
394
+ <h3>Returns</h3>
395
+ <div class="subelement response">
396
+ <code>mixed</code>the requested object; false if object not found</div>
397
+ </div></div>
398
+ </div>
399
+ <a name="mla_get_post_mime_type" id="mla_get_post_mime_type"></a><div class="element clickable method public mla_get_post_mime_type" data-toggle="collapse" data-target=".mla_get_post_mime_type .collapse">
400
+ <h2>Retrieve an MLA post_mime_type object</h2>
401
+ <pre>mla_get_post_mime_type(string $slug) : mixed</pre>
402
+ <div class="labels"></div>
403
+ <div class="row collapse"><div class="detail-description">
404
+ <p class="long_description"></p>
405
+ <table class="table table-bordered"><tr>
406
+ <th>since</th>
407
+ <td>1.40</td>
408
+ </tr></table>
409
+ <h3>Parameters</h3>
410
+ <div class="subelement argument">
411
+ <h4>$slug</h4>
412
+ <code>string</code><p>MLA post_mime_type slug</p></div>
413
+ <h3>Returns</h3>
414
+ <div class="subelement response">
415
+ <code>mixed</code>Array of elements, including slug, for the requested object; false if object not found</div>
416
+ </div></div>
417
+ </div>
418
+ <a name="mla_get_post_mime_type_slug" id="mla_get_post_mime_type_slug"></a><div class="element clickable method public mla_get_post_mime_type_slug" data-toggle="collapse" data-target=".mla_get_post_mime_type_slug .collapse">
419
+ <h2>Retrieve an MLA post_mime_type slug given a post_ID</h2>
420
+ <pre>mla_get_post_mime_type_slug(integer $post_ID) : mixed</pre>
421
+ <div class="labels"></div>
422
+ <div class="row collapse"><div class="detail-description">
423
+ <p class="long_description"></p>
424
+ <table class="table table-bordered"><tr>
425
+ <th>since</th>
426
+ <td>1.40</td>
427
+ </tr></table>
428
+ <h3>Parameters</h3>
429
+ <div class="subelement argument">
430
+ <h4>$post_ID</h4>
431
+ <code>integer</code><p>MLA post_mime_type post_ID</p></div>
432
+ <h3>Returns</h3>
433
+ <div class="subelement response">
434
+ <code>mixed</code>string with slug of the requested object; false if object not found</div>
435
+ </div></div>
436
+ </div>
437
+ <a name="mla_get_upload_mime" id="mla_get_upload_mime"></a><div class="element clickable method public mla_get_upload_mime" data-toggle="collapse" data-target=".mla_get_upload_mime .collapse">
438
+ <h2>Retrieve an MLA Upload MIME Type object</h2>
439
+ <pre>mla_get_upload_mime(string $slug) : mixed</pre>
440
+ <div class="labels"></div>
441
+ <div class="row collapse"><div class="detail-description">
442
+ <p class="long_description"></p>
443
+ <table class="table table-bordered"><tr>
444
+ <th>since</th>
445
+ <td>1.40</td>
446
+ </tr></table>
447
+ <h3>Parameters</h3>
448
+ <div class="subelement argument">
449
+ <h4>$slug</h4>
450
+ <code>string</code><p>MLA Upload MIME Type slug</p></div>
451
+ <h3>Returns</h3>
452
+ <div class="subelement response">
453
+ <code>mixed</code>Array of elements, including slug, for the requested object; false if object not found</div>
454
+ </div></div>
455
+ </div>
456
+ <a name="mla_get_upload_mime_slug" id="mla_get_upload_mime_slug"></a><div class="element clickable method public mla_get_upload_mime_slug" data-toggle="collapse" data-target=".mla_get_upload_mime_slug .collapse">
457
+ <h2>Retrieve an MLA Upload MIME Type slug given a post_ID</h2>
458
+ <pre>mla_get_upload_mime_slug(integer $post_ID) : mixed</pre>
459
+ <div class="labels"></div>
460
+ <div class="row collapse"><div class="detail-description">
461
+ <p class="long_description"></p>
462
+ <table class="table table-bordered"><tr>
463
+ <th>since</th>
464
+ <td>1.40</td>
465
+ </tr></table>
466
+ <h3>Parameters</h3>
467
+ <div class="subelement argument">
468
+ <h4>$post_ID</h4>
469
+ <code>integer</code><p>MLA Upload MIME Type post_ID</p></div>
470
+ <h3>Returns</h3>
471
+ <div class="subelement response">
472
+ <code>mixed</code>string with slug of the requested object; false if object not found</div>
473
+ </div></div>
474
+ </div>
475
+ <a name="mla_icon_dir_filter" id="mla_icon_dir_filter"></a><div class="element clickable method public mla_icon_dir_filter" data-toggle="collapse" data-target=".mla_icon_dir_filter .collapse">
476
+ <h2>Retrieve the icon directory for a MIME type</h2>
477
+ <pre>mla_icon_dir_filter(string $path) : string</pre>
478
+ <div class="labels"></div>
479
+ <div class="row collapse"><div class="detail-description">
480
+ <p class="long_description"><p>Called from /wp-includes/deprecated.php, function get_attachment_icon_src().
481
+ Called from /wp-includes/media.php, function wp_get_attachment_image_src().
482
+ Called from /wp-includes/post.php, function wp_mime_type_icon().
483
+ Defined as public because it's a filter.</p></p>
484
+ <table class="table table-bordered"><tr>
485
+ <th>since</th>
486
+ <td>1.40</td>
487
+ </tr></table>
488
+ <h3>Parameters</h3>
489
+ <div class="subelement argument">
490
+ <h4>$path</h4>
491
+ <code>string</code><p>Path to the icon directory</p></div>
492
+ <h3>Returns</h3>
493
+ <div class="subelement response">
494
+ <code>string</code>Updated path to the icon directory, no trailing slash</div>
495
+ </div></div>
496
+ </div>
497
+ <a name="mla_icon_dir_uri_filter" id="mla_icon_dir_uri_filter"></a><div class="element clickable method public mla_icon_dir_uri_filter" data-toggle="collapse" data-target=".mla_icon_dir_uri_filter .collapse">
498
+ <h2>Retrieve the icon directory URL for a MIME type</h2>
499
+ <pre>mla_icon_dir_uri_filter(string $uri) : string</pre>
500
+ <div class="labels"></div>
501
+ <div class="row collapse"><div class="detail-description">
502
+ <p class="long_description"><p>Called from /wp-includes/post.php, function wp_mime_type_icon().
503
+ Defined as public because it's a filter.</p></p>
504
+ <table class="table table-bordered"><tr>
505
+ <th>since</th>
506
+ <td>1.40</td>
507
+ </tr></table>
508
+ <h3>Parameters</h3>
509
+ <div class="subelement argument">
510
+ <h4>$uri</h4>
511
+ <code>string</code><p>Path to the icon directory URL</p></div>
512
+ <h3>Returns</h3>
513
+ <div class="subelement response">
514
+ <code>string</code>Updated path to the icon directory URL, no trailing slash</div>
515
+ </div></div>
516
+ </div>
517
+ <a name="mla_icon_dirs_filter" id="mla_icon_dirs_filter"></a><div class="element clickable method public mla_icon_dirs_filter" data-toggle="collapse" data-target=".mla_icon_dirs_filter .collapse">
518
+ <h2>Retrieve the icon (directory =&gt; URI) array for a MIME type</h2>
519
+ <pre>mla_icon_dirs_filter(array $path_uri_array) : array</pre>
520
+ <div class="labels"></div>
521
+ <div class="row collapse"><div class="detail-description">
522
+ <p class="long_description"><p>Called from /wp-includes/post.php, function wp_mime_type_icon().
523
+ Defined as public because it's a filter.</p></p>
524
+ <table class="table table-bordered"><tr>
525
+ <th>since</th>
526
+ <td>1.40</td>
527
+ </tr></table>
528
+ <h3>Parameters</h3>
529
+ <div class="subelement argument">
530
+ <h4>$path_uri_array</h4>
531
+ <code>array</code><p>Path(s) and URI(s) to the icon directories</p>
532
+ </div>
533
+ <h3>Returns</h3>
534
+ <div class="subelement response">
535
+ <code>array</code>Updated (path => URI) array</div>
536
+ </div></div>
537
+ </div>
538
+ <a name="mla_mime_types_filter" id="mla_mime_types_filter"></a><div class="element clickable method public mla_mime_types_filter" data-toggle="collapse" data-target=".mla_mime_types_filter .collapse">
539
+ <h2>Retrieve list of MIME types and file extensions; use this filter to add types</h2>
540
+ <pre>mla_mime_types_filter(array $mime_types) : array</pre>
541
+ <div class="labels"></div>
542
+ <div class="row collapse"><div class="detail-description">
543
+ <p class="long_description"><p>Called from /wp-includes/functions.php, function wp_get_mime_types(). That function
544
+ is called from /wp-includes/class-wp-image-editor.php functions get_mime_type()
545
+ and get_extension(), and from /wp-includes/functions.php, functions do_enclose()
546
+ and get_allowed_mime_types().</p>
547
+
548
+ <p>Defined as public because it's a filter.</p></p>
549
+ <table class="table table-bordered"><tr>
550
+ <th>since</th>
551
+ <td>1.40</td>
552
+ </tr></table>
553
+ <h3>Parameters</h3>
554
+ <div class="subelement argument">
555
+ <h4>$mime_types</h4>
556
+ <code>array</code><p>Mime types keyed by the file extension regex corresponding to those types</p></div>
557
+ <h3>Returns</h3>
558
+ <div class="subelement response">
559
+ <code>array</code>Updated MIME types</div>
560
+ </div></div>
561
+ </div>
562
+ <a name="mla_parse_view_specification" id="mla_parse_view_specification"></a><div class="element clickable method public mla_parse_view_specification" data-toggle="collapse" data-target=".mla_parse_view_specification .collapse">
563
+ <h2>Analyze a Library View/Post MIME Type specification, returning an array of the place holders it contains</h2>
564
+ <pre>mla_parse_view_specification(string $specification) : array</pre>
565
+ <div class="labels"></div>
566
+ <div class="row collapse"><div class="detail-description">
567
+ <p class="long_description"></p>
568
+ <table class="table table-bordered"><tr>
569
+ <th>since</th>
570
+ <td>1.40</td>
571
+ </tr></table>
572
+ <h3>Parameters</h3>
573
+ <div class="subelement argument">
574
+ <h4>$specification</h4>
575
+ <code>string</code><p>A specification, e.g., "custom:Field,null" or "audio,application/vnd.<em>ms</em>"</p>
576
+ </div>
577
+ <h3>Returns</h3>
578
+ <div class="subelement response">
579
+ <code>array</code>( ['prefix'] => string, ['name'] => string, ['value'] => string, ['option'] => string, optional ['error'] => string )</div>
580
+ </div></div>
581
+ </div>
582
+ <a name="mla_pluck_table_views" id="mla_pluck_table_views"></a><div class="element clickable method public mla_pluck_table_views" data-toggle="collapse" data-target=".mla_pluck_table_views .collapse">
583
+ <h2>Retrieve views eligible for Media/Assistant table display</h2>
584
+ <pre>mla_pluck_table_views() : array</pre>
585
+ <div class="labels"></div>
586
+ <div class="row collapse"><div class="detail-description">
587
+ <p class="long_description"></p>
588
+ <table class="table table-bordered"><tr>
589
+ <th>since</th>
590
+ <td>1.40</td>
591
+ </tr></table>
592
+ <h3>Returns</h3>
593
+ <div class="subelement response">
594
+ <code>array</code>table views array ( specification => Plural Label )</div>
595
+ </div></div>
596
+ </div>
597
+ <a name="mla_post_mime_types_filter" id="mla_post_mime_types_filter"></a><div class="element clickable method public mla_post_mime_types_filter" data-toggle="collapse" data-target=".mla_post_mime_types_filter .collapse">
598
+ <h2>Get default Post MIME Types</h2>
599
+ <pre>mla_post_mime_types_filter(array $post_mime_types) : array</pre>
600
+ <div class="labels"></div>
601
+ <div class="row collapse"><div class="detail-description">
602
+ <p class="long_description"><p>Called from /wp-includes/post.php, function get_post_mime_types(). That function
603
+ is called from:
604
+ /wp-admin/includes/media.php function get_media_item(), to validate the type of an
605
+ attachment when it is edited,
606
+ /wp-admin/includes/post.php, function wp_edit_attachments_query() to count the number
607
+ of attachments of each type, and
608
+ /wp-includes/media.php function wp_enqueue_media(), to populate the the Media Manager/Add Media
609
+ "media items" drop down list.</p>
610
+
611
+ <p>Defined as public because it's a filter.</p></p>
612
+ <table class="table table-bordered"><tr>
613
+ <th>since</th>
614
+ <td>1.40</td>
615
+ </tr></table>
616
+ <h3>Parameters</h3>
617
+ <div class="subelement argument">
618
+ <h4>$post_mime_types</h4>
619
+ <code>array</code><p>Content types (image, audio, video) and presentation strings, e.g. 'image' => array(__('Images'), __('Manage Images'), _n_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')),</p>
620
+ </div>
621
+ <h3>Returns</h3>
622
+ <div class="subelement response">
623
+ <code>array</code>Updated allowed MIME types</div>
624
+ </div></div>
625
+ </div>
626
+ <a name="mla_prepare_view_query" id="mla_prepare_view_query"></a><div class="element clickable method public mla_prepare_view_query" data-toggle="collapse" data-target=".mla_prepare_view_query .collapse">
627
+ <h2>Convert a Library View/Post MIME Type specification to WP_Query parameters</h2>
628
+ <pre>mla_prepare_view_query(string $specification) : array</pre>
629
+ <div class="labels"></div>
630
+ <div class="row collapse"><div class="detail-description">
631
+ <p class="long_description"></p>
632
+ <table class="table table-bordered"><tr>
633
+ <th>since</th>
634
+ <td>1.40</td>
635
+ </tr></table>
636
+ <h3>Parameters</h3>
637
+ <div class="subelement argument">
638
+ <h4>$specification</h4>
639
+ <code>string</code><p>A specification, e.g., "custom:Field,null" or "audio,application/vnd.<em>ms</em>"</p>
640
+ </div>
641
+ <h3>Returns</h3>
642
+ <div class="subelement response">
643
+ <code>array</code>post_mime_type specification or custom field query</div>
644
+ </div></div>
645
+ </div>
646
+ <a name="mla_query_optional_upload_items" id="mla_query_optional_upload_items"></a><div class="element clickable method public mla_query_optional_upload_items" data-toggle="collapse" data-target=".mla_query_optional_upload_items .collapse">
647
+ <h2>Retrieve MLA Upload MIME Type objects for list table display</h2>
648
+ <pre>mla_query_optional_upload_items(array $request, int $offset, int $count) : array</pre>
649
+ <div class="labels"></div>
650
+ <div class="row collapse"><div class="detail-description">
651
+ <p class="long_description"></p>
652
+ <table class="table table-bordered"><tr>
653
+ <th>since</th>
654
+ <td>1.40</td>
655
+ </tr></table>
656
+ <h3>Parameters</h3>
657
+ <div class="subelement argument">
658
+ <h4>$request</h4>
659
+ <code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
660
+ </div>
661
+ <div class="subelement argument">
662
+ <h4>$offset</h4>
663
+ <code>int</code><p>number of rows to skip over to reach desired page</p></div>
664
+ <div class="subelement argument">
665
+ <h4>$count</h4>
666
+ <code>int</code><p>number of rows on each page</p></div>
667
+ <h3>Returns</h3>
668
+ <div class="subelement response">
669
+ <code>array</code>MLA Upload MIME Type objects</div>
670
+ </div></div>
671
+ </div>
672
+ <a name="mla_query_upload_items" id="mla_query_upload_items"></a><div class="element clickable method public mla_query_upload_items" data-toggle="collapse" data-target=".mla_query_upload_items .collapse">
673
+ <h2>Retrieve MLA Upload MIME Type objects for list table display</h2>
674
+ <pre>mla_query_upload_items(array $request, int $offset, int $count) : array</pre>
675
+ <div class="labels"></div>
676
+ <div class="row collapse"><div class="detail-description">
677
+ <p class="long_description"></p>
678
+ <table class="table table-bordered"><tr>
679
+ <th>since</th>
680
+ <td>1.40</td>
681
+ </tr></table>
682
+ <h3>Parameters</h3>
683
+ <div class="subelement argument">
684
+ <h4>$request</h4>
685
+ <code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
686
+ </div>
687
+ <div class="subelement argument">
688
+ <h4>$offset</h4>
689
+ <code>int</code><p>number of rows to skip over to reach desired page</p></div>
690
+ <div class="subelement argument">
691
+ <h4>$count</h4>
692
+ <code>int</code><p>number of rows on each page</p></div>
693
+ <h3>Returns</h3>
694
+ <div class="subelement response">
695
+ <code>array</code>MLA Upload MIME Type objects</div>
696
+ </div></div>
697
+ </div>
698
+ <a name="mla_query_view_items" id="mla_query_view_items"></a><div class="element clickable method public mla_query_view_items" data-toggle="collapse" data-target=".mla_query_view_items .collapse">
699
+ <h2>Retrieve MLA post_mime_type objects for list table display</h2>
700
+ <pre>mla_query_view_items(array $request, int $offset, int $count) : array</pre>
701
+ <div class="labels"></div>
702
+ <div class="row collapse"><div class="detail-description">
703
+ <p class="long_description"></p>
704
+ <table class="table table-bordered"><tr>
705
+ <th>since</th>
706
+ <td>1.40</td>
707
+ </tr></table>
708
+ <h3>Parameters</h3>
709
+ <div class="subelement argument">
710
+ <h4>$request</h4>
711
+ <code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
712
+ </div>
713
+ <div class="subelement argument">
714
+ <h4>$offset</h4>
715
+ <code>int</code><p>number of rows to skip over to reach desired page</p></div>
716
+ <div class="subelement argument">
717
+ <h4>$count</h4>
718
+ <code>int</code><p>number of rows on each page</p></div>
719
+ <h3>Returns</h3>
720
+ <div class="subelement response">
721
+ <code>array</code>MLA post_mime_type objects</div>
722
+ </div></div>
723
+ </div>
724
+ <a name="mla_sanitize_mime_type_filter" id="mla_sanitize_mime_type_filter"></a><div class="element clickable method public mla_sanitize_mime_type_filter" data-toggle="collapse" data-target=".mla_sanitize_mime_type_filter .collapse">
725
+ <h2>Sanitize a MIME type</h2>
726
+ <pre>mla_sanitize_mime_type_filter(string $sanitized_mime_type, string $raw_mime_type) : string</pre>
727
+ <div class="labels"></div>
728
+ <div class="row collapse"><div class="detail-description">
729
+ <p class="long_description"><p>Called from /wp-includes/formatting.php, function sanitize_mime_type().
730
+ Defined as public because it's a filter.</p></p>
731
+ <table class="table table-bordered"><tr>
732
+ <th>since</th>
733
+ <td>1.40</td>
734
+ </tr></table>
735
+ <h3>Parameters</h3>
736
+ <div class="subelement argument">
737
+ <h4>$sanitized_mime_type</h4>
738
+ <code>string</code><p>Sanitized MIME type</p></div>
739
+ <div class="subelement argument">
740
+ <h4>$raw_mime_type</h4>
741
+ <code>string</code><p>Raw MIME type</p></div>
742
+ <h3>Returns</h3>
743
+ <div class="subelement response">
744
+ <code>string</code>Updated sanitized MIME type</div>
745
+ </div></div>
746
+ </div>
747
+ <a name="mla_tabulate_upload_items" id="mla_tabulate_upload_items"></a><div class="element clickable method public mla_tabulate_upload_items" data-toggle="collapse" data-target=".mla_tabulate_upload_items .collapse">
748
+ <h2>Tabulate MLA Upload MIME Type objects by view for list table display</h2>
749
+ <pre>mla_tabulate_upload_items(string $s) : array</pre>
750
+ <div class="labels"></div>
751
+ <div class="row collapse"><div class="detail-description">
752
+ <p class="long_description"></p>
753
+ <table class="table table-bordered"><tr>
754
+ <th>since</th>
755
+ <td>1.40</td>
756
+ </tr></table>
757
+ <h3>Parameters</h3>
758
+ <div class="subelement argument">
759
+ <h4>$s</h4>
760
+ <code>string</code><p>keyword search criterion, optional</p></div>
761
+ <h3>Returns</h3>
762
+ <div class="subelement response">
763
+ <code>array</code>( 'singular' label, 'plural' label, 'count' of items )</div>
764
+ </div></div>
765
+ </div>
766
+ <a name="mla_update_post_mime_type" id="mla_update_post_mime_type"></a><div class="element clickable method public mla_update_post_mime_type" data-toggle="collapse" data-target=".mla_update_post_mime_type .collapse">
767
+ <h2>Update an MLA post_mime_type object</h2>
768
+ <pre>mla_update_post_mime_type(array $request) : array</pre>
769
+ <div class="labels"></div>
770
+ <div class="row collapse"><div class="detail-description">
771
+ <p class="long_description"></p>
772
+ <table class="table table-bordered"><tr>
773
+ <th>since</th>
774
+ <td>1.40</td>
775
+ </tr></table>
776
+ <h3>Parameters</h3>
777
+ <div class="subelement argument">
778
+ <h4>$request</h4>
779
+ <code>array</code><p>Query variables for new object values, including optional original_slug</p></div>
780
+ <h3>Returns</h3>
781
+ <div class="subelement response">
782
+ <code>array</code>Message(s) reflecting the results of the operation</div>
783
+ </div></div>
784
+ </div>
785
+ <a name="mla_update_upload_mime" id="mla_update_upload_mime"></a><div class="element clickable method public mla_update_upload_mime" data-toggle="collapse" data-target=".mla_update_upload_mime .collapse">
786
+ <h2>Update an MLA Upload MIME Type object</h2>
787
+ <pre>mla_update_upload_mime(array $request) : array</pre>
788
+ <div class="labels"></div>
789
+ <div class="row collapse"><div class="detail-description">
790
+ <p class="long_description"></p>
791
+ <table class="table table-bordered"><tr>
792
+ <th>since</th>
793
+ <td>1.40</td>
794
+ </tr></table>
795
+ <h3>Parameters</h3>
796
+ <div class="subelement argument">
797
+ <h4>$request</h4>
798
+ <code>array</code><p>Query variables for new object values, including optional original_slug</p></div>
799
+ <h3>Returns</h3>
800
+ <div class="subelement response">
801
+ <code>array</code>Message(s) reflecting the results of the operation</div>
802
+ </div></div>
803
+ </div>
804
+ <a name="mla_upload_mimes_filter" id="mla_upload_mimes_filter"></a><div class="element clickable method public mla_upload_mimes_filter" data-toggle="collapse" data-target=".mla_upload_mimes_filter .collapse">
805
+ <h2>Retrieve list of allowed MIME types and file extensions; use this filter to remove types</h2>
806
+ <pre>mla_upload_mimes_filter(array $mime_types) : array</pre>
807
+ <div class="labels"></div>
808
+ <div class="row collapse"><div class="detail-description">
809
+ <p class="long_description"><p>Called from /wp-includes/functions.php, function get_allowed_mime_types(). That function
810
+ is called from /wp-includes/formatting.php function sanitize_file_name() and from
811
+ /wp-includes/functions.php, function wp_check_filetype(). wp_check_filetype returns only one
812
+ MIME type for a given file extension, so the file extension should/must be a unique key.</p>
813
+
814
+ <p>This filter is also hooked by /wp-includes/ms-functions.php and processed in function
815
+ check_upload_mimes(), which "is used to filter that list against the filetype whitelist
816
+ provided by Multisite Super Admins at wp-admin/network/settings.php." Multisite installs must
817
+ respect this restriction, so any list we produce will be passed thru that function if it exists.</p>
818
+
819
+ <p>This function is defined as public because it's a filter.</p></p>
820
+ <table class="table table-bordered"><tr>
821
+ <th>since</th>
822
+ <td>1.40</td>
823
+ </tr></table>
824
+ <h3>Parameters</h3>
825
+ <div class="subelement argument">
826
+ <h4>$mime_types</h4>
827
+ <code>array</code><p>Mime types keyed by the file extension regex corresponding to those types</p></div>
828
+ <h3>Returns</h3>
829
+ <div class="subelement response">
830
+ <code>array</code>Updated allowed MIME types</div>
831
+ </div></div>
832
+ </div>
833
+ <a name="mla_wp_check_filetype_and_ext_filter" id="mla_wp_check_filetype_and_ext_filter"></a><div class="element clickable method public mla_wp_check_filetype_and_ext_filter" data-toggle="collapse" data-target=".mla_wp_check_filetype_and_ext_filter .collapse">
834
+ <h2>Attempts to determine the real file type of a file</h2>
835
+ <pre>mla_wp_check_filetype_and_ext_filter(array $validate, string $file, string $filename, array $mimes) : array</pre>
836
+ <div class="labels"></div>
837
+ <div class="row collapse"><div class="detail-description">
838
+ <p class="long_description"><p>Called from /wp-includes/functions.php, function wp_check_filetype_and_ext().
839
+ Defined as public because it's a filter.</p></p>
840
+ <table class="table table-bordered"><tr>
841
+ <th>since</th>
842
+ <td>1.40</td>
843
+ </tr></table>
844
+ <h3>Parameters</h3>
845
+ <div class="subelement argument">
846
+ <h4>$validate</h4>
847
+ <code>array</code><p>array( ext, type, proper_filename (string or false) )</p>
848
+ </div>
849
+ <div class="subelement argument">
850
+ <h4>$file</h4>
851
+ <code>string</code><p>Full path to the image</p></div>
852
+ <div class="subelement argument">
853
+ <h4>$filename</h4>
854
+ <code>string</code><p>The filename of the image</p></div>
855
+ <div class="subelement argument">
856
+ <h4>$mimes</h4>
857
+ <code>array</code><p>Optional array of MIME types</p></div>
858
+ <h3>Returns</h3>
859
+ <div class="subelement response">
860
+ <code>array</code>Updated array( ext, type, proper_filename (string or false) )</div>
861
+ </div></div>
862
+ </div>
863
+ <a name="mla_wp_mime_type_icon_filter" id="mla_wp_mime_type_icon_filter"></a><div class="element clickable method public mla_wp_mime_type_icon_filter" data-toggle="collapse" data-target=".mla_wp_mime_type_icon_filter .collapse">
864
+ <h2>Retrieve the icon for a MIME type</h2>
865
+ <pre>mla_wp_mime_type_icon_filter(string $icon, string $mime, integer $post_id) : array</pre>
866
+ <div class="labels"></div>
867
+ <div class="row collapse"><div class="detail-description">
868
+ <p class="long_description"><p>Called from /wp-includes/post.php, function wp_mime_type_icon().
869
+ Defined as public because it's a filter.</p></p>
870
+ <table class="table table-bordered"><tr>
871
+ <th>since</th>
872
+ <td>1.40</td>
873
+ </tr></table>
874
+ <h3>Parameters</h3>
875
+ <div class="subelement argument">
876
+ <h4>$icon</h4>
877
+ <code>string</code><p>URI to the MIME type icon</p></div>
878
+ <div class="subelement argument">
879
+ <h4>$mime</h4>
880
+ <code>string</code><p>MIME type represented by the icon</p></div>
881
+ <div class="subelement argument">
882
+ <h4>$post_id</h4>
883
+ <code>integer</code><p>Attachment ID or zero (0) if MIME type passed in</p>
884
+ </div>
885
+ <h3>Returns</h3>
886
+ <div class="subelement response">
887
+ <code>array</code>Updated (path => URI) array</div>
888
+ </div></div>
889
+ </div>
890
+ <a name="_execute_optional_upload_items_query" id="_execute_optional_upload_items_query"></a><div class="element clickable method private _execute_optional_upload_items_query" data-toggle="collapse" data-target="._execute_optional_upload_items_query .collapse">
891
+ <h2>Execute an Optional Upload MIME Types query</h2>
892
+ <pre>_execute_optional_upload_items_query(array $request) : array</pre>
893
+ <div class="labels"></div>
894
+ <div class="row collapse"><div class="detail-description">
895
+ <p class="long_description"></p>
896
+ <table class="table table-bordered"><tr>
897
+ <th>since</th>
898
+ <td>1.40</td>
899
+ </tr></table>
900
+ <h3>Parameters</h3>
901
+ <div class="subelement argument">
902
+ <h4>$request</h4>
903
+ <code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
904
+ </div>
905
+ <h3>Returns</h3>
906
+ <div class="subelement response">
907
+ <code>array</code>query results; array of MLA Optional Upload MIME Type objects</div>
908
+ </div></div>
909
+ </div>
910
+ <a name="_execute_upload_items_query" id="_execute_upload_items_query"></a><div class="element clickable method private _execute_upload_items_query" data-toggle="collapse" data-target="._execute_upload_items_query .collapse">
911
+ <h2>Execute an Upload MIME Types query</h2>
912
+ <pre>_execute_upload_items_query(array $request) : array</pre>
913
+ <div class="labels"></div>
914
+ <div class="row collapse"><div class="detail-description">
915
+ <p class="long_description"></p>
916
+ <table class="table table-bordered"><tr>
917
+ <th>since</th>
918
+ <td>1.40</td>
919
+ </tr></table>
920
+ <h3>Parameters</h3>
921
+ <div class="subelement argument">
922
+ <h4>$request</h4>
923
+ <code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
924
+ </div>
925
+ <h3>Returns</h3>
926
+ <div class="subelement response">
927
+ <code>array</code>query results; array of MLA Upload MIME Type objects</div>
928
+ </div></div>
929
+ </div>
930
+ <a name="_execute_view_items_query" id="_execute_view_items_query"></a><div class="element clickable method private _execute_view_items_query" data-toggle="collapse" data-target="._execute_view_items_query .collapse">
931
+ <h2>Add filters, run query, remove filters</h2>
932
+ <pre>_execute_view_items_query(array $request) : array</pre>
933
+ <div class="labels"></div>
934
+ <div class="row collapse"><div class="detail-description">
935
+ <p class="long_description"></p>
936
+ <table class="table table-bordered"><tr>
937
+ <th>since</th>
938
+ <td>1.40</td>
939
+ </tr></table>
940
+ <h3>Parameters</h3>
941
+ <div class="subelement argument">
942
+ <h4>$request</h4>
943
+ <code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
944
+ </div>
945
+ <h3>Returns</h3>
946
+ <div class="subelement response">
947
+ <code>array</code>query results; array of MLA post_mime_type objects</div>
948
+ </div></div>
949
+ </div>
950
+ <a name="_get_core_icon_types" id="_get_core_icon_types"></a><div class="element clickable method private _get_core_icon_types" data-toggle="collapse" data-target="._get_core_icon_types .collapse">
951
+ <h2>Assemble the list of icon types without MLA filtering</h2>
952
+ <pre>_get_core_icon_types() : boolean</pre>
953
+ <div class="labels"></div>
954
+ <div class="row collapse"><div class="detail-description">
955
+ <p class="long_description"></p>
956
+ <table class="table table-bordered"><tr>
957
+ <th>since</th>
958
+ <td>1.40</td>
959
+ </tr></table>
960
+ <h3>Returns</h3>
961
+ <div class="subelement response">
962
+ <code>boolean</code>Success (true) or failure (false) of the operation</div>
963
+ </div></div>
964
+ </div>
965
+ <a name="_get_current_icon_types" id="_get_current_icon_types"></a><div class="element clickable method private _get_current_icon_types" data-toggle="collapse" data-target="._get_current_icon_types .collapse">
966
+ <h2>Assemble the list of icon types with MLA filtering</h2>
967
+ <pre>_get_current_icon_types() : boolean</pre>
968
+ <div class="labels"></div>
969
+ <div class="row collapse"><div class="detail-description">
970
+ <p class="long_description"></p>
971
+ <table class="table table-bordered"><tr>
972
+ <th>since</th>
973
+ <td>1.40</td>
974
+ </tr></table>
975
+ <h3>Returns</h3>
976
+ <div class="subelement response">
977
+ <code>boolean</code>Success (true) or failure (false) of the operation</div>
978
+ </div></div>
979
+ </div>
980
+ <a name="_get_optional_upload_mime_templates" id="_get_optional_upload_mime_templates"></a><div class="element clickable method private _get_optional_upload_mime_templates" data-toggle="collapse" data-target="._get_optional_upload_mime_templates .collapse">
981
+ <h2>Assemble the in-memory representation of the (read-only) Optional Upload MIME Types</h2>
982
+ <pre>_get_optional_upload_mime_templates() : boolean</pre>
983
+ <div class="labels"></div>
984
+ <div class="row collapse"><div class="detail-description">
985
+ <p class="long_description"></p>
986
+ <table class="table table-bordered"><tr>
987
+ <th>since</th>
988
+ <td>1.40</td>
989
+ </tr></table>
990
+ <h3>Returns</h3>
991
+ <div class="subelement response">
992
+ <code>boolean</code>Success (true) or failure (false) of the operation</div>
993
+ </div></div>
994
+ </div>
995
+ <a name="_get_post_mime_templates" id="_get_post_mime_templates"></a><div class="element clickable method private _get_post_mime_templates" data-toggle="collapse" data-target="._get_post_mime_templates .collapse">
996
+ <h2>Assemble the in-memory representation of the Post MIME Types</h2>
997
+ <pre>_get_post_mime_templates(boolean $force_refresh) : boolean</pre>
998
+ <div class="labels"></div>
999
+ <div class="row collapse"><div class="detail-description">
1000
+ <p class="long_description"></p>
1001
+ <table class="table table-bordered"><tr>
1002
+ <th>since</th>
1003
+ <td>1.40</td>
1004
+ </tr></table>
1005
+ <h3>Parameters</h3>
1006
+ <div class="subelement argument">
1007
+ <h4>$force_refresh</h4>
1008
+ <code>boolean</code><p>Force a reload/recalculation of types</p>
1009
+ </div>
1010
+ <h3>Returns</h3>
1011
+ <div class="subelement response">
1012
+ <code>boolean</code>Success (true) or failure (false) of the operation</div>
1013
+ </div></div>
1014
+ </div>
1015
+ <a name="_get_upload_mime_templates" id="_get_upload_mime_templates"></a><div class="element clickable method private _get_upload_mime_templates" data-toggle="collapse" data-target="._get_upload_mime_templates .collapse">
1016
+ <h2>Assemble the in-memory representation of the Upload MIME Types</h2>
1017
+ <pre>_get_upload_mime_templates(boolean $force_refresh) : boolean</pre>
1018
+ <div class="labels"></div>
1019
+ <div class="row collapse"><div class="detail-description">
1020
+ <p class="long_description"></p>
1021
+ <table class="table table-bordered"><tr>
1022
+ <th>since</th>
1023
+ <td>1.40</td>
1024
+ </tr></table>
1025
+ <h3>Parameters</h3>
1026
+ <div class="subelement argument">
1027
+ <h4>$force_refresh</h4>
1028
+ <code>boolean</code><p>Force a reload/recalculation of types</p>
1029
+ </div>
1030
+ <h3>Returns</h3>
1031
+ <div class="subelement response">
1032
+ <code>boolean</code>Success (true) or failure (false) of the operation</div>
1033
+ </div></div>
1034
+ </div>
1035
+ <a name="_prepare_optional_upload_items_query" id="_prepare_optional_upload_items_query"></a><div class="element clickable method private _prepare_optional_upload_items_query" data-toggle="collapse" data-target="._prepare_optional_upload_items_query .collapse">
1036
+ <h2>Sanitize and expand Optional Upload MIME Type query arguments from request variables</h2>
1037
+ <pre>_prepare_optional_upload_items_query(array $raw_request, int $offset, int $count) : array</pre>
1038
+ <div class="labels"></div>
1039
+ <div class="row collapse"><div class="detail-description">
1040
+ <p class="long_description"></p>
1041
+ <table class="table table-bordered"><tr>
1042
+ <th>since</th>
1043
+ <td>1.40</td>
1044
+ </tr></table>
1045
+ <h3>Parameters</h3>
1046
+ <div class="subelement argument">
1047
+ <h4>$raw_request</h4>
1048
+ <code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
1049
+ </div>
1050
+ <div class="subelement argument">
1051
+ <h4>$offset</h4>
1052
+ <code>int</code><p>Optional number of rows (default 0) to skip over to reach desired page</p>
1053
+ </div>
1054
+ <div class="subelement argument">
1055
+ <h4>$count</h4>
1056
+ <code>int</code><p>Optional number of rows on each page (0 = all rows, default)</p>
1057
+ </div>
1058
+ <h3>Returns</h3>
1059
+ <div class="subelement response">
1060
+ <code>array</code>revised arguments suitable for query</div>
1061
+ </div></div>
1062
+ </div>
1063
+ <a name="_prepare_upload_items_query" id="_prepare_upload_items_query"></a><div class="element clickable method private _prepare_upload_items_query" data-toggle="collapse" data-target="._prepare_upload_items_query .collapse">
1064
+ <h2>Sanitize and expand Upload MIME Type query arguments from request variables</h2>
1065
+ <pre>_prepare_upload_items_query(array $raw_request, int $offset, int $count) : array</pre>
1066
+ <div class="labels"></div>
1067
+ <div class="row collapse"><div class="detail-description">
1068
+ <p class="long_description"></p>
1069
+ <table class="table table-bordered"><tr>
1070
+ <th>since</th>
1071
+ <td>1.40</td>
1072
+ </tr></table>
1073
+ <h3>Parameters</h3>
1074
+ <div class="subelement argument">
1075
+ <h4>$raw_request</h4>
1076
+ <code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
1077
+ </div>
1078
+ <div class="subelement argument">
1079
+ <h4>$offset</h4>
1080
+ <code>int</code><p>Optional number of rows (default 0) to skip over to reach desired page</p>
1081
+ </div>
1082
+ <div class="subelement argument">
1083
+ <h4>$count</h4>
1084
+ <code>int</code><p>Optional number of rows on each page (0 = all rows, default)</p>
1085
+ </div>
1086
+ <h3>Returns</h3>
1087
+ <div class="subelement response">
1088
+ <code>array</code>revised arguments suitable for query</div>
1089
+ </div></div>
1090
+ </div>
1091
+ <a name="_prepare_view_items_query" id="_prepare_view_items_query"></a><div class="element clickable method private _prepare_view_items_query" data-toggle="collapse" data-target="._prepare_view_items_query .collapse">
1092
+ <h2>Sanitize and expand query arguments from request variables</h2>
1093
+ <pre>_prepare_view_items_query(array $raw_request, int $offset, int $count) : array</pre>
1094
+ <div class="labels"></div>
1095
+ <div class="row collapse"><div class="detail-description">
1096
+ <p class="long_description"></p>
1097
+ <table class="table table-bordered"><tr>
1098
+ <th>since</th>
1099
+ <td>1.40</td>
1100
+ </tr></table>
1101
+ <h3>Parameters</h3>
1102
+ <div class="subelement argument">
1103
+ <h4>$raw_request</h4>
1104
+ <code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
1105
+ </div>
1106
+ <div class="subelement argument">
1107
+ <h4>$offset</h4>
1108
+ <code>int</code><p>Optional number of rows (default 0) to skip over to reach desired page</p>
1109
+ </div>
1110
+ <div class="subelement argument">
1111
+ <h4>$count</h4>
1112
+ <code>int</code><p>Optional number of rows on each page (0 = all rows, default)</p>
1113
+ </div>
1114
+ <h3>Returns</h3>
1115
+ <div class="subelement response">
1116
+ <code>array</code>revised arguments suitable for query</div>
1117
+ </div></div>
1118
+ </div>
1119
+ <a name="_put_post_mime_templates" id="_put_post_mime_templates"></a><div class="element clickable method private _put_post_mime_templates" data-toggle="collapse" data-target="._put_post_mime_templates .collapse">
1120
+ <h2>Store the custom entries of the Post MIME Types</h2>
1121
+ <pre>_put_post_mime_templates() : boolean</pre>
1122
+ <div class="labels"></div>
1123
+ <div class="row collapse"><div class="detail-description">
1124
+ <p class="long_description"></p>
1125
+ <table class="table table-bordered"><tr>
1126
+ <th>since</th>
1127
+ <td>1.40</td>
1128
+ </tr></table>
1129
+ <h3>Returns</h3>
1130
+ <div class="subelement response">
1131
+ <code>boolean</code>Success (true) or failure (false) of the operation</div>
1132
+ </div></div>
1133
+ </div>
1134
+ <a name="_put_upload_mime_templates" id="_put_upload_mime_templates"></a><div class="element clickable method private _put_upload_mime_templates" data-toggle="collapse" data-target="._put_upload_mime_templates .collapse">
1135
+ <h2>Store the options portion of the Upload MIME Types</h2>
1136
+ <pre>_put_upload_mime_templates() : boolean</pre>
1137
+ <div class="labels"></div>
1138
+ <div class="row collapse"><div class="detail-description">
1139
+ <p class="long_description"></p>
1140
+ <table class="table table-bordered"><tr>
1141
+ <th>since</th>
1142
+ <td>1.40</td>
1143
+ </tr></table>
1144
+ <h3>Returns</h3>
1145
+ <div class="subelement response">
1146
+ <code>boolean</code>Success (true) or failure (false) of the operation</div>
1147
+ </div></div>
1148
+ </div>
1149
+ <h3>
1150
+ <i class="icon-custom icon-property"></i> Properties</h3>
1151
+ <a name="%24disable_mla_filtering" id="$disable_mla_filtering"> </a><div class="element clickable property private $disable_mla_filtering" data-toggle="collapse" data-target=".$disable_mla_filtering .collapse">
1152
+ <h2>Disable MIME filtering during option initialization</h2>
1153
+ <pre>$disable_mla_filtering : boolean</pre>
1154
+ <div class="labels"></div>
1155
+ <div class="row collapse"><div class="detail-description">
1156
+ <p class="long_description"></p>
1157
+ <table class="table table-bordered"><tr>
1158
+ <th>since</th>
1159
+ <td>1.40</td>
1160
+ </tr></table>
1161
+ </div></div>
1162
+ </div>
1163
+ <a name="%24mla_core_icon_types" id="$mla_core_icon_types"> </a><div class="element clickable property private $mla_core_icon_types" data-toggle="collapse" data-target=".$mla_core_icon_types .collapse">
1164
+ <h2>Icon types without MLA filtering</h2>
1165
+ <pre>$mla_core_icon_types : array</pre>
1166
+ <div class="labels"></div>
1167
+ <div class="row collapse"><div class="detail-description">
1168
+ <p class="long_description"></p>
1169
+ <table class="table table-bordered"><tr>
1170
+ <th>since</th>
1171
+ <td>1.40</td>
1172
+ </tr></table>
1173
+ </div></div>
1174
+ </div>
1175
+ <a name="%24mla_current_icon_types" id="$mla_current_icon_types"> </a><div class="element clickable property private $mla_current_icon_types" data-toggle="collapse" data-target=".$mla_current_icon_types .collapse">
1176
+ <h2>Icon types with MLA filtering - basenames of files in the current icon directory</h2>
1177
+ <pre>$mla_current_icon_types : array</pre>
1178
+ <div class="labels"></div>
1179
+ <div class="row collapse"><div class="detail-description">
1180
+ <p class="long_description"></p>
1181
+ <table class="table table-bordered"><tr>
1182
+ <th>since</th>
1183
+ <td>1.40</td>
1184
+ </tr></table>
1185
+ </div></div>
1186
+ </div>
1187
+ <a name="%24mla_icon_type_associations" id="$mla_icon_type_associations"> </a><div class="element clickable property private $mla_icon_type_associations" data-toggle="collapse" data-target=".$mla_icon_type_associations .collapse">
1188
+ <h2>In-memory representation of the Icon Type =&gt; file extension(s) associations</h2>
1189
+ <pre>$mla_icon_type_associations : array</pre>
1190
+ <div class="labels"></div>
1191
+ <div class="row collapse"><div class="detail-description">
1192
+ <p class="long_description"></p>
1193
+ <table class="table table-bordered"><tr>
1194
+ <th>since</th>
1195
+ <td>1.40</td>
1196
+ </tr></table>
1197
+ </div></div>
1198
+ </div>
1199
+ <a name="%24mla_optional_upload_mime_templates" id="$mla_optional_upload_mime_templates"> </a><div class="element clickable property private $mla_optional_upload_mime_templates" data-toggle="collapse" data-target=".$mla_optional_upload_mime_templates .collapse">
1200
+ <h2>In-memory representation of the (read-only) Optional Upload MIME Types</h2>
1201
+ <pre>$mla_optional_upload_mime_templates : array</pre>
1202
+ <div class="labels"></div>
1203
+ <div class="row collapse"><div class="detail-description">
1204
+ <p class="long_description"></p>
1205
+ <table class="table table-bordered"><tr>
1206
+ <th>since</th>
1207
+ <td>1.40</td>
1208
+ </tr></table>
1209
+ </div></div>
1210
+ </div>
1211
+ <a name="%24mla_post_mime_highest_ID" id="$mla_post_mime_highest_ID"> </a><div class="element clickable property private $mla_post_mime_highest_ID" data-toggle="collapse" data-target=".$mla_post_mime_highest_ID .collapse">
1212
+ <h2>Highest existing Post MIME Type ID value</h2>
1213
+ <pre>$mla_post_mime_highest_ID : integer</pre>
1214
+ <div class="labels"></div>
1215
+ <div class="row collapse"><div class="detail-description">
1216
+ <p class="long_description"></p>
1217
+ <table class="table table-bordered"><tr>
1218
+ <th>since</th>
1219
+ <td>1.40</td>
1220
+ </tr></table>
1221
+ </div></div>
1222
+ </div>
1223
+ <a name="%24mla_post_mime_templates" id="$mla_post_mime_templates"> </a><div class="element clickable property private $mla_post_mime_templates" data-toggle="collapse" data-target=".$mla_post_mime_templates .collapse">
1224
+ <h2>In-memory representation of the Post MIME Types</h2>
1225
+ <pre>$mla_post_mime_templates : array</pre>
1226
+ <div class="labels"></div>
1227
+ <div class="row collapse"><div class="detail-description">
1228
+ <p class="long_description"></p>
1229
+ <table class="table table-bordered"><tr>
1230
+ <th>since</th>
1231
+ <td>1.40</td>
1232
+ </tr></table>
1233
+ </div></div>
1234
+ </div>
1235
+ <a name="%24mla_upload_mime_highest_ID" id="$mla_upload_mime_highest_ID"> </a><div class="element clickable property private $mla_upload_mime_highest_ID" data-toggle="collapse" data-target=".$mla_upload_mime_highest_ID .collapse">
1236
+ <h2>Highest existing Upload MIME Type ID value</h2>
1237
+ <pre>$mla_upload_mime_highest_ID : integer</pre>
1238
+ <div class="labels"></div>
1239
+ <div class="row collapse"><div class="detail-description">
1240
+ <p class="long_description"></p>
1241
+ <table class="table table-bordered"><tr>
1242
+ <th>since</th>
1243
+ <td>1.40</td>
1244
+ </tr></table>
1245
+ </div></div>
1246
+ </div>
1247
+ <a name="%24mla_upload_mime_templates" id="$mla_upload_mime_templates"> </a><div class="element clickable property private $mla_upload_mime_templates" data-toggle="collapse" data-target=".$mla_upload_mime_templates .collapse">
1248
+ <h2>In-memory representation of the Upload MIME Types</h2>
1249
+ <pre>$mla_upload_mime_templates : array</pre>
1250
+ <div class="labels"></div>
1251
+ <div class="row collapse"><div class="detail-description">
1252
+ <p class="long_description"></p>
1253
+ <table class="table table-bordered"><tr>
1254
+ <th>since</th>
1255
+ <td>1.40</td>
1256
+ </tr></table>
1257
+ </div></div>
1258
+ </div>
1259
+ </div>
1260
+ </div>
1261
+ </div>
1262
+ </div>
1263
+ <div class="row"><footer class="span12">
1264
+ Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1265
+ Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1266
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
1267
+ </div>
1268
+ </body>
1269
+ </html>
phpDocs/classes/MLAModal.html CHANGED
@@ -307,7 +307,7 @@ and mla_print_media_templates_action</h2>
307
  <div class="row"><footer class="span12">
308
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
309
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
310
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
311
  </div>
312
  </body>
313
  </html>
307
  <div class="row"><footer class="span12">
308
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
309
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
310
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
311
  </div>
312
  </body>
313
  </html>
phpDocs/classes/MLAObjects.html CHANGED
@@ -167,7 +167,7 @@ which replaces the "Posts" column with an equivalent "Attachments" column.</h2>
167
  <div class="row"><footer class="span12">
168
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
169
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
170
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
171
  </div>
172
  </body>
173
  </html>
167
  <div class="row"><footer class="span12">
168
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
169
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
170
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
171
  </div>
172
  </body>
173
  </html>
phpDocs/classes/MLAOptions.html CHANGED
@@ -78,8 +78,10 @@ settings are being updated or reset.</span><pre>mla_taxonomy_support()</pre></a>
78
  <li class="method private "><a href="#_compose_data_source_option_list" title="_compose_data_source_option_list :: Compose a (Custom Field) Data Source Options list with current selection"><span class="description">Compose a (Custom Field) Data Source Options list with current selection</span><pre>_compose_data_source_option_list()</pre></a></li>
79
  <li class="method private "><a href="#_compose_iptc_option_list" title="_compose_iptc_option_list :: Compose an IPTC Options list with current selection"><span class="description">Compose an IPTC Options list with current selection</span><pre>_compose_iptc_option_list()</pre></a></li>
80
  <li class="method private "><a href="#_compose_parent_option_list" title="_compose_parent_option_list :: Compose an hierarchical taxonomy Parent options list with current selection"><span class="description">Compose an hierarchical taxonomy Parent options list with current selection</span><pre>_compose_parent_option_list()</pre></a></li>
 
81
  <li class="method private "><a href="#_evaluate_data_source" title="_evaluate_data_source :: Evaluate custom field mapping data source"><span class="description">Evaluate custom field mapping data source</span><pre>_evaluate_data_source()</pre></a></li>
82
  <li class="method private "><a href="#_evaluate_file_information" title="_evaluate_file_information :: Evaluate file information for custom field mapping"><span class="description">Evaluate file information for custom field mapping</span><pre>_evaluate_file_information()</pre></a></li>
 
83
  <li class="method private "><a href="#_get_custom_field_names" title="_get_custom_field_names :: Generate a list of all (post) Custom Field names"><span class="description">Generate a list of all (post) Custom Field names</span><pre>_get_custom_field_names()</pre></a></li>
84
  <li class="method private "><a href="#_load_option_templates" title="_load_option_templates :: Load style and markup templates to $mla_templates"><span class="description">Load style and markup templates to $mla_templates</span><pre>_load_option_templates()</pre></a></li>
85
  <li class="method private "><a href="#_update_custom_field_mapping" title="_update_custom_field_mapping :: Update custom field mappings"><span class="description">Update custom field mappings</span><pre>_update_custom_field_mapping()</pre></a></li>
@@ -98,6 +100,9 @@ settings are being updated or reset.</span><pre>mla_taxonomy_support()</pre></a>
98
  <li class="property private "><a href="#%24mla_option_templates" title="$mla_option_templates :: Style and Markup templates"><span class="description">Style and Markup templates</span><pre>$mla_option_templates</pre></a></li>
99
  <li class="nav-header">
100
  <i class="icon-custom icon-constant"></i> Constants</li>
 
 
 
101
  <li class="constant "><a href="#MLA_FEATURED_IN_TUNING" title="MLA_FEATURED_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_FEATURED_IN_TUNING</pre></a></li>
102
  <li class="constant "><a href="#MLA_GALLERY_IN_TUNING" title="MLA_GALLERY_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_GALLERY_IN_TUNING</pre></a></li>
103
  <li class="constant "><a href="#MLA_INSERTED_IN_TUNING" title="MLA_INSERTED_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_INSERTED_IN_TUNING</pre></a></li>
@@ -109,6 +114,8 @@ settings are being updated or reset.</span><pre>mla_taxonomy_support()</pre></a>
109
  <li class="constant "><a href="#MLA_MLA_GALLERY_IN_TUNING" title="MLA_MLA_GALLERY_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_MLA_GALLERY_IN_TUNING</pre></a></li>
110
  <li class="constant "><a href="#MLA_NEW_CUSTOM_FIELD" title='MLA_NEW_CUSTOM_FIELD :: Provides a unique name for the Custom Field "new field" key'><span class="description">Provides a unique name for the Custom Field "new field" key</span><pre>MLA_NEW_CUSTOM_FIELD</pre></a></li>
111
  <li class="constant "><a href="#MLA_NEW_CUSTOM_RULE" title='MLA_NEW_CUSTOM_RULE :: Provides a unique name for the Custom Field "new rule" key'><span class="description">Provides a unique name for the Custom Field "new rule" key</span><pre>MLA_NEW_CUSTOM_RULE</pre></a></li>
 
 
112
  <li class="constant "><a href="#MLA_VERSION_OPTION" title="MLA_VERSION_OPTION :: Provides a unique name for the current version option"><span class="description">Provides a unique name for the current version option</span><pre>MLA_VERSION_OPTION</pre></a></li>
113
  </ul>
114
  </div>
@@ -361,7 +368,7 @@ and provides functions to get and put them from/to WordPress option variables</p
361
  </div>
362
  <a name="mla_get_option" id="mla_get_option"></a><div class="element clickable method public mla_get_option" data-toggle="collapse" data-target=".mla_get_option .collapse">
363
  <h2>Return the stored value or default value of a defined MLA option</h2>
364
- <pre>mla_get_option(string $option) : mixed</pre>
365
  <div class="labels"></div>
366
  <div class="row collapse"><div class="detail-description">
367
  <p class="long_description"></p>
@@ -373,6 +380,12 @@ and provides functions to get and put them from/to WordPress option variables</p
373
  <div class="subelement argument">
374
  <h4>$option</h4>
375
  <code>string</code><p>Name of the desired option</p></div>
 
 
 
 
 
 
376
  <h3>Returns</h3>
377
  <div class="subelement response">
378
  <code>mixed</code>Value(s) for the option or false if the option is not a defined MLA option</div>
@@ -684,6 +697,33 @@ settings are being updated or reset.</h2>
684
  <code>string</code>HTML markup with select field options</div>
685
  </div></div>
686
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
687
  <a name="_evaluate_data_source" id="_evaluate_data_source"></a><div class="element clickable method private _evaluate_data_source" data-toggle="collapse" data-target="._evaluate_data_source .collapse">
688
  <h2>Evaluate custom field mapping data source</h2>
689
  <pre>_evaluate_data_source(integer $post_id, string $category, array $data_value, array $attachment_metadata) : string</pre>
@@ -705,7 +745,7 @@ settings are being updated or reset.</h2>
705
  </div>
706
  <div class="subelement argument">
707
  <h4>$data_value</h4>
708
- <code>array</code><p>data source specification (name, format, meta_name, meta_single, meta_export)</p>
709
  </div>
710
  <div class="subelement argument">
711
  <h4>$attachment_metadata</h4>
@@ -745,6 +785,34 @@ settings are being updated or reset.</h2>
745
  <code>array</code>absolute_path, base_file, path, file_name, extension, dimensions, width, height, hwstring_small, array of intermediate sizes</div>
746
  </div></div>
747
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
748
  <a name="_get_custom_field_names" id="_get_custom_field_names"></a><div class="element clickable method private _get_custom_field_names" data-toggle="collapse" data-target="._get_custom_field_names .collapse">
749
  <h2>Generate a list of all (post) Custom Field names</h2>
750
  <pre>_get_custom_field_names() : array</pre>
@@ -963,6 +1031,24 @@ reset => reset function for 'custom' options; returns nothing. Usage:
963
  </div>
964
  <h3>
965
  <i class="icon-custom icon-constant"></i> Constants</h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
966
  <a name="MLA_FEATURED_IN_TUNING" id="MLA_FEATURED_IN_TUNING"> </a><div class="element clickable constant MLA_FEATURED_IN_TUNING" data-toggle="collapse" data-target=".MLA_FEATURED_IN_TUNING .collapse">
967
  <h2>Provides a unique name for a database tuning option</h2>
968
  <pre>MLA_FEATURED_IN_TUNING </pre>
@@ -1029,6 +1115,18 @@ reset => reset function for 'custom' options; returns nothing. Usage:
1029
  <div class="labels"></div>
1030
  <div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
1031
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
1032
  <a name="MLA_VERSION_OPTION" id="MLA_VERSION_OPTION"> </a><div class="element clickable constant MLA_VERSION_OPTION" data-toggle="collapse" data-target=".MLA_VERSION_OPTION .collapse">
1033
  <h2>Provides a unique name for the current version option</h2>
1034
  <pre>MLA_VERSION_OPTION </pre>
@@ -1042,7 +1140,7 @@ reset => reset function for 'custom' options; returns nothing. Usage:
1042
  <div class="row"><footer class="span12">
1043
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1044
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1045
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
1046
  </div>
1047
  </body>
1048
  </html>
78
  <li class="method private "><a href="#_compose_data_source_option_list" title="_compose_data_source_option_list :: Compose a (Custom Field) Data Source Options list with current selection"><span class="description">Compose a (Custom Field) Data Source Options list with current selection</span><pre>_compose_data_source_option_list()</pre></a></li>
79
  <li class="method private "><a href="#_compose_iptc_option_list" title="_compose_iptc_option_list :: Compose an IPTC Options list with current selection"><span class="description">Compose an IPTC Options list with current selection</span><pre>_compose_iptc_option_list()</pre></a></li>
80
  <li class="method private "><a href="#_compose_parent_option_list" title="_compose_parent_option_list :: Compose an hierarchical taxonomy Parent options list with current selection"><span class="description">Compose an hierarchical taxonomy Parent options list with current selection</span><pre>_compose_parent_option_list()</pre></a></li>
81
+ <li class="method private "><a href="#_evaluate_array_result" title="_evaluate_array_result :: Evaluate post information for custom field mapping"><span class="description">Evaluate post information for custom field mapping</span><pre>_evaluate_array_result()</pre></a></li>
82
  <li class="method private "><a href="#_evaluate_data_source" title="_evaluate_data_source :: Evaluate custom field mapping data source"><span class="description">Evaluate custom field mapping data source</span><pre>_evaluate_data_source()</pre></a></li>
83
  <li class="method private "><a href="#_evaluate_file_information" title="_evaluate_file_information :: Evaluate file information for custom field mapping"><span class="description">Evaluate file information for custom field mapping</span><pre>_evaluate_file_information()</pre></a></li>
84
+ <li class="method private "><a href="#_evaluate_post_information" title="_evaluate_post_information :: Evaluate post information for custom field mapping"><span class="description">Evaluate post information for custom field mapping</span><pre>_evaluate_post_information()</pre></a></li>
85
  <li class="method private "><a href="#_get_custom_field_names" title="_get_custom_field_names :: Generate a list of all (post) Custom Field names"><span class="description">Generate a list of all (post) Custom Field names</span><pre>_get_custom_field_names()</pre></a></li>
86
  <li class="method private "><a href="#_load_option_templates" title="_load_option_templates :: Load style and markup templates to $mla_templates"><span class="description">Load style and markup templates to $mla_templates</span><pre>_load_option_templates()</pre></a></li>
87
  <li class="method private "><a href="#_update_custom_field_mapping" title="_update_custom_field_mapping :: Update custom field mappings"><span class="description">Update custom field mappings</span><pre>_update_custom_field_mapping()</pre></a></li>
100
  <li class="property private "><a href="#%24mla_option_templates" title="$mla_option_templates :: Style and Markup templates"><span class="description">Style and Markup templates</span><pre>$mla_option_templates</pre></a></li>
101
  <li class="nav-header">
102
  <i class="icon-custom icon-constant"></i> Constants</li>
103
+ <li class="constant "><a href="#MLA_ENABLE_MLA_ICONS" title="MLA_ENABLE_MLA_ICONS :: Provides a unique name for the Enable MLA Icons option"><span class="description">Provides a unique name for the Enable MLA Icons option</span><pre>MLA_ENABLE_MLA_ICONS</pre></a></li>
104
+ <li class="constant "><a href="#MLA_ENABLE_POST_MIME_TYPES" title="MLA_ENABLE_POST_MIME_TYPES :: Provides a unique name for the Enable Post MIME Types option"><span class="description">Provides a unique name for the Enable Post MIME Types option</span><pre>MLA_ENABLE_POST_MIME_TYPES</pre></a></li>
105
+ <li class="constant "><a href="#MLA_ENABLE_UPLOAD_MIMES" title="MLA_ENABLE_UPLOAD_MIMES :: Provides a unique name for the Enable Upload MIME Types option"><span class="description">Provides a unique name for the Enable Upload MIME Types option</span><pre>MLA_ENABLE_UPLOAD_MIMES</pre></a></li>
106
  <li class="constant "><a href="#MLA_FEATURED_IN_TUNING" title="MLA_FEATURED_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_FEATURED_IN_TUNING</pre></a></li>
107
  <li class="constant "><a href="#MLA_GALLERY_IN_TUNING" title="MLA_GALLERY_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_GALLERY_IN_TUNING</pre></a></li>
108
  <li class="constant "><a href="#MLA_INSERTED_IN_TUNING" title="MLA_INSERTED_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_INSERTED_IN_TUNING</pre></a></li>
114
  <li class="constant "><a href="#MLA_MLA_GALLERY_IN_TUNING" title="MLA_MLA_GALLERY_IN_TUNING :: Provides a unique name for a database tuning option"><span class="description">Provides a unique name for a database tuning option</span><pre>MLA_MLA_GALLERY_IN_TUNING</pre></a></li>
115
  <li class="constant "><a href="#MLA_NEW_CUSTOM_FIELD" title='MLA_NEW_CUSTOM_FIELD :: Provides a unique name for the Custom Field "new field" key'><span class="description">Provides a unique name for the Custom Field "new field" key</span><pre>MLA_NEW_CUSTOM_FIELD</pre></a></li>
116
  <li class="constant "><a href="#MLA_NEW_CUSTOM_RULE" title='MLA_NEW_CUSTOM_RULE :: Provides a unique name for the Custom Field "new rule" key'><span class="description">Provides a unique name for the Custom Field "new rule" key</span><pre>MLA_NEW_CUSTOM_RULE</pre></a></li>
117
+ <li class="constant "><a href="#MLA_POST_MIME_TYPES" title="MLA_POST_MIME_TYPES :: Provides a unique name for the Post MIME Types option"><span class="description">Provides a unique name for the Post MIME Types option</span><pre>MLA_POST_MIME_TYPES</pre></a></li>
118
+ <li class="constant "><a href="#MLA_UPLOAD_MIMES" title="MLA_UPLOAD_MIMES :: Provides a unique name for the Upload MIME Types option"><span class="description">Provides a unique name for the Upload MIME Types option</span><pre>MLA_UPLOAD_MIMES</pre></a></li>
119
  <li class="constant "><a href="#MLA_VERSION_OPTION" title="MLA_VERSION_OPTION :: Provides a unique name for the current version option"><span class="description">Provides a unique name for the current version option</span><pre>MLA_VERSION_OPTION</pre></a></li>
120
  </ul>
121
  </div>
368
  </div>
369
  <a name="mla_get_option" id="mla_get_option"></a><div class="element clickable method public mla_get_option" data-toggle="collapse" data-target=".mla_get_option .collapse">
370
  <h2>Return the stored value or default value of a defined MLA option</h2>
371
+ <pre>mla_get_option(string $option, boolean $get_default, boolean $get_stored) : mixed</pre>
372
  <div class="labels"></div>
373
  <div class="row collapse"><div class="detail-description">
374
  <p class="long_description"></p>
380
  <div class="subelement argument">
381
  <h4>$option</h4>
382
  <code>string</code><p>Name of the desired option</p></div>
383
+ <div class="subelement argument">
384
+ <h4>$get_default</h4>
385
+ <code>boolean</code><p>True to ignore current setting and return default values</p></div>
386
+ <div class="subelement argument">
387
+ <h4>$get_stored</h4>
388
+ <code>boolean</code><p>True to ignore default values and return only stored values</p></div>
389
  <h3>Returns</h3>
390
  <div class="subelement response">
391
  <code>mixed</code>Value(s) for the option or false if the option is not a defined MLA option</div>
697
  <code>string</code>HTML markup with select field options</div>
698
  </div></div>
699
  </div>
700
+ <a name="_evaluate_array_result" id="_evaluate_array_result"></a><div class="element clickable method private _evaluate_array_result" data-toggle="collapse" data-target="._evaluate_array_result .collapse">
701
+ <h2>Evaluate post information for custom field mapping</h2>
702
+ <pre>_evaluate_array_result(array $value, string $option, boolean $keep_existing) : mixed</pre>
703
+ <div class="labels"></div>
704
+ <div class="row collapse"><div class="detail-description">
705
+ <p class="long_description"></p>
706
+ <table class="table table-bordered"><tr>
707
+ <th>since</th>
708
+ <td>1.40</td>
709
+ </tr></table>
710
+ <h3>Parameters</h3>
711
+ <div class="subelement argument">
712
+ <h4>$value</h4>
713
+ <code>array</code><p>field value(s)</p>
714
+ </div>
715
+ <div class="subelement argument">
716
+ <h4>$option</h4>
717
+ <code>string</code><p>format option text|single|export|array|multi</p></div>
718
+ <div class="subelement argument">
719
+ <h4>$keep_existing</h4>
720
+ <code>boolean</code><p>keep existing value(s) - for 'multi' option</p>
721
+ </div>
722
+ <h3>Returns</h3>
723
+ <div class="subelement response">
724
+ <code>mixed</code>array for option = array|multi else string</div>
725
+ </div></div>
726
+ </div>
727
  <a name="_evaluate_data_source" id="_evaluate_data_source"></a><div class="element clickable method private _evaluate_data_source" data-toggle="collapse" data-target="._evaluate_data_source .collapse">
728
  <h2>Evaluate custom field mapping data source</h2>
729
  <pre>_evaluate_data_source(integer $post_id, string $category, array $data_value, array $attachment_metadata) : string</pre>
745
  </div>
746
  <div class="subelement argument">
747
  <h4>$data_value</h4>
748
+ <code>array</code><p>data source specification ( name, data_source, keep_existing, format, mla_column, quick_edit, bulk_edit, meta_name, no_null, option )</p>
749
  </div>
750
  <div class="subelement argument">
751
  <h4>$attachment_metadata</h4>
785
  <code>array</code>absolute_path, base_file, path, file_name, extension, dimensions, width, height, hwstring_small, array of intermediate sizes</div>
786
  </div></div>
787
  </div>
788
+ <a name="_evaluate_post_information" id="_evaluate_post_information"></a><div class="element clickable method private _evaluate_post_information" data-toggle="collapse" data-target="._evaluate_post_information .collapse">
789
+ <h2>Evaluate post information for custom field mapping</h2>
790
+ <pre>_evaluate_post_information(integer $post_id, string $category, string $data_source) : mixed</pre>
791
+ <div class="labels"></div>
792
+ <div class="row collapse"><div class="detail-description">
793
+ <p class="long_description"></p>
794
+ <table class="table table-bordered"><tr>
795
+ <th>since</th>
796
+ <td>1.40</td>
797
+ </tr></table>
798
+ <h3>Parameters</h3>
799
+ <div class="subelement argument">
800
+ <h4>$post_id</h4>
801
+ <code>integer</code><p>post->ID of attachment</p>
802
+ </div>
803
+ <div class="subelement argument">
804
+ <h4>$category</h4>
805
+ <code>string</code><p>category/scope to evaluate against: custom_field_mapping or single_attachment_mapping</p>
806
+ </div>
807
+ <div class="subelement argument">
808
+ <h4>$data_source</h4>
809
+ <code>string</code><p>data source name ( post_date or post_parent )</p>
810
+ </div>
811
+ <h3>Returns</h3>
812
+ <div class="subelement response">
813
+ <code>mixed</code>'post_date' => (string) upload date, 'post_parent' => (integer) ID of parent or zero )</div>
814
+ </div></div>
815
+ </div>
816
  <a name="_get_custom_field_names" id="_get_custom_field_names"></a><div class="element clickable method private _get_custom_field_names" data-toggle="collapse" data-target="._get_custom_field_names .collapse">
817
  <h2>Generate a list of all (post) Custom Field names</h2>
818
  <pre>_get_custom_field_names() : array</pre>
1031
  </div>
1032
  <h3>
1033
  <i class="icon-custom icon-constant"></i> Constants</h3>
1034
+ <a name="MLA_ENABLE_MLA_ICONS" id="MLA_ENABLE_MLA_ICONS"> </a><div class="element clickable constant MLA_ENABLE_MLA_ICONS" data-toggle="collapse" data-target=".MLA_ENABLE_MLA_ICONS .collapse">
1035
+ <h2>Provides a unique name for the Enable MLA Icons option</h2>
1036
+ <pre>MLA_ENABLE_MLA_ICONS </pre>
1037
+ <div class="labels"></div>
1038
+ <div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
1039
+ </div>
1040
+ <a name="MLA_ENABLE_POST_MIME_TYPES" id="MLA_ENABLE_POST_MIME_TYPES"> </a><div class="element clickable constant MLA_ENABLE_POST_MIME_TYPES" data-toggle="collapse" data-target=".MLA_ENABLE_POST_MIME_TYPES .collapse">
1041
+ <h2>Provides a unique name for the Enable Post MIME Types option</h2>
1042
+ <pre>MLA_ENABLE_POST_MIME_TYPES </pre>
1043
+ <div class="labels"></div>
1044
+ <div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
1045
+ </div>
1046
+ <a name="MLA_ENABLE_UPLOAD_MIMES" id="MLA_ENABLE_UPLOAD_MIMES"> </a><div class="element clickable constant MLA_ENABLE_UPLOAD_MIMES" data-toggle="collapse" data-target=".MLA_ENABLE_UPLOAD_MIMES .collapse">
1047
+ <h2>Provides a unique name for the Enable Upload MIME Types option</h2>
1048
+ <pre>MLA_ENABLE_UPLOAD_MIMES </pre>
1049
+ <div class="labels"></div>
1050
+ <div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
1051
+ </div>
1052
  <a name="MLA_FEATURED_IN_TUNING" id="MLA_FEATURED_IN_TUNING"> </a><div class="element clickable constant MLA_FEATURED_IN_TUNING" data-toggle="collapse" data-target=".MLA_FEATURED_IN_TUNING .collapse">
1053
  <h2>Provides a unique name for a database tuning option</h2>
1054
  <pre>MLA_FEATURED_IN_TUNING </pre>
1115
  <div class="labels"></div>
1116
  <div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
1117
  </div>
1118
+ <a name="MLA_POST_MIME_TYPES" id="MLA_POST_MIME_TYPES"> </a><div class="element clickable constant MLA_POST_MIME_TYPES" data-toggle="collapse" data-target=".MLA_POST_MIME_TYPES .collapse">
1119
+ <h2>Provides a unique name for the Post MIME Types option</h2>
1120
+ <pre>MLA_POST_MIME_TYPES </pre>
1121
+ <div class="labels"></div>
1122
+ <div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
1123
+ </div>
1124
+ <a name="MLA_UPLOAD_MIMES" id="MLA_UPLOAD_MIMES"> </a><div class="element clickable constant MLA_UPLOAD_MIMES" data-toggle="collapse" data-target=".MLA_UPLOAD_MIMES .collapse">
1125
+ <h2>Provides a unique name for the Upload MIME Types option</h2>
1126
+ <pre>MLA_UPLOAD_MIMES </pre>
1127
+ <div class="labels"></div>
1128
+ <div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
1129
+ </div>
1130
  <a name="MLA_VERSION_OPTION" id="MLA_VERSION_OPTION"> </a><div class="element clickable constant MLA_VERSION_OPTION" data-toggle="collapse" data-target=".MLA_VERSION_OPTION .collapse">
1131
  <h2>Provides a unique name for the current version option</h2>
1132
  <pre>MLA_VERSION_OPTION </pre>
1140
  <div class="row"><footer class="span12">
1141
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1142
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1143
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
1144
  </div>
1145
  </body>
1146
  </html>
phpDocs/classes/MLASettings.html CHANGED
@@ -54,20 +54,37 @@
54
  <i class="icon-custom icon-method"></i> Methods</li>
55
  <li class="method public "><a href="#initialize" title="initialize :: Initialization function, similar to __construct()"><span class="description">Initialization function, similar to __construct()</span><pre>initialize()</pre></a></li>
56
  <li class="method public "><a href="#mla_activation_hook" title="mla_activation_hook :: Perform one-time actions on plugin activation"><span class="description">Perform one-time actions on plugin activation</span><pre>mla_activation_hook()</pre></a></li>
57
- <li class="method public "><a href="#mla_add_plugin_settings_link" title='mla_add_plugin_settings_link :: Add the "Settings" link to the MLA entry in the Plugins section'><span class="description">Add the "Settings" link to the MLA entry in the Plugins section</span><pre>mla_add_plugin_settings_link()</pre></a></li>
 
 
 
 
58
  <li class="method public "><a href="#mla_admin_menu_action" title='mla_admin_menu_action :: Add settings page in the "Settings" section,
 
59
  add settings link in the Plugins section entry for MLA.'><span class="description">Add settings page in the "Settings" section,
 
60
  add settings link in the Plugins section entry for MLA.</span><pre>mla_admin_menu_action()</pre></a></li>
61
  <li class="method public "><a href="#mla_deactivation_hook" title="mla_deactivation_hook :: Perform one-time actions on plugin deactivation"><span class="description">Perform one-time actions on plugin deactivation</span><pre>mla_deactivation_hook()</pre></a></li>
 
 
 
62
  <li class="method public "><a href="#mla_render_settings_page" title='mla_render_settings_page :: Render (echo) the "Media Library Assistant" subpage in the Settings section'><span class="description">Render (echo) the "Media Library Assistant" subpage in the Settings section</span><pre>mla_render_settings_page()</pre></a></li>
 
 
63
  <li class="nav-header private">» Private</li>
64
  <li class="method private "><a href="#_compose_custom_field_tab" title="_compose_custom_field_tab :: Compose the Custom Field tab content for the Settings subpage"><span class="description">Compose the Custom Field tab content for the Settings subpage</span><pre>_compose_custom_field_tab()</pre></a></li>
65
  <li class="method private "><a href="#_compose_documentation_tab" title="_compose_documentation_tab :: Compose the Documentation tab content for the Settings subpage"><span class="description">Compose the Documentation tab content for the Settings subpage</span><pre>_compose_documentation_tab()</pre></a></li>
 
 
66
  <li class="method private "><a href="#_compose_general_tab" title="_compose_general_tab :: Compose the General tab content for the Settings subpage"><span class="description">Compose the General tab content for the Settings subpage</span><pre>_compose_general_tab()</pre></a></li>
67
  <li class="method private "><a href="#_compose_iptc_exif_tab" title="_compose_iptc_exif_tab :: Compose the IPTC/EXIF tab content for the Settings subpage"><span class="description">Compose the IPTC/EXIF tab content for the Settings subpage</span><pre>_compose_iptc_exif_tab()</pre></a></li>
68
  <li class="method private "><a href="#_compose_mla_gallery_tab" title="_compose_mla_gallery_tab :: Compose the MLA Gallery tab content for the Settings subpage"><span class="description">Compose the MLA Gallery tab content for the Settings subpage</span><pre>_compose_mla_gallery_tab()</pre></a></li>
69
  <li class="method private "><a href="#_compose_option_row" title="_compose_option_row :: Compose the table row for a single MLA option"><span class="description">Compose the table row for a single MLA option</span><pre>_compose_option_row()</pre></a></li>
 
70
  <li class="method private "><a href="#_compose_settings_tabs" title="_compose_settings_tabs :: Compose the navigation tabs for the Settings subpage"><span class="description">Compose the navigation tabs for the Settings subpage</span><pre>_compose_settings_tabs()</pre></a></li>
 
 
 
71
  <li class="method private "><a href="#_delete_custom_field" title="_delete_custom_field :: Delete a custom field from the wp_postmeta table"><span class="description">Delete a custom field from the wp_postmeta table</span><pre>_delete_custom_field()</pre></a></li>
72
  <li class="method private "><a href="#_process_custom_field_mapping" title="_process_custom_field_mapping :: Process custom field settings against all image attachments
73
  without saving the settings to the mla_option"><span class="description">Process custom field settings against all image attachments
@@ -81,23 +98,31 @@ without saving the settings to the mla_option</span><pre>_process_iptc_exif_stan
81
  <li class="method private "><a href="#_process_iptc_exif_taxonomy" title="_process_iptc_exif_taxonomy :: Process IPTC/EXIF taxonomy term settings against all image attachments
82
  without saving the settings to the mla_option"><span class="description">Process IPTC/EXIF taxonomy term settings against all image attachments
83
  without saving the settings to the mla_option</span><pre>_process_iptc_exif_taxonomy()</pre></a></li>
 
84
  <li class="method private "><a href="#_reset_general_settings" title="_reset_general_settings :: Delete saved settings, restoring default values"><span class="description">Delete saved settings, restoring default values</span><pre>_reset_general_settings()</pre></a></li>
85
  <li class="method private "><a href="#_save_custom_field_settings" title="_save_custom_field_settings :: Save custom field settings to the options table"><span class="description">Save custom field settings to the options table</span><pre>_save_custom_field_settings()</pre></a></li>
86
  <li class="method private "><a href="#_save_gallery_settings" title="_save_gallery_settings :: Save MLA Gallery settings to the options table"><span class="description">Save MLA Gallery settings to the options table</span><pre>_save_gallery_settings()</pre></a></li>
87
  <li class="method private "><a href="#_save_general_settings" title="_save_general_settings :: Save General settings to the options table"><span class="description">Save General settings to the options table</span><pre>_save_general_settings()</pre></a></li>
88
  <li class="method private "><a href="#_save_iptc_exif_custom_settings" title="_save_iptc_exif_custom_settings :: Save IPTC/EXIF custom field settings to the options table"><span class="description">Save IPTC/EXIF custom field settings to the options table</span><pre>_save_iptc_exif_custom_settings()</pre></a></li>
89
  <li class="method private "><a href="#_save_iptc_exif_settings" title="_save_iptc_exif_settings :: Save IPTC/EXIF settings to the options table"><span class="description">Save IPTC/EXIF settings to the options table</span><pre>_save_iptc_exif_settings()</pre></a></li>
 
 
90
  <li class="method private "><a href="#_update_option_row" title="_update_option_row :: Update or delete a single MLA option value"><span class="description">Update or delete a single MLA option value</span><pre>_update_option_row()</pre></a></li>
91
  <li class="method private "><a href="#_version_upgrade" title="_version_upgrade :: Database and option update check, for installing new versions"><span class="description">Database and option update check, for installing new versions</span><pre>_version_upgrade()</pre></a></li>
92
  <li class="nav-header">
93
  <i class="icon-custom icon-property"></i> Properties</li>
94
  <li class="nav-header private">» Private</li>
 
95
  <li class="property private "><a href="#%24mla_tablist" title="$mla_tablist :: Definitions for Settings page tab ids, titles and handlers
96
  Each tab is defined by an array with the following elements:"><span class="description">Definitions for Settings page tab ids, titles and handlers
97
  Each tab is defined by an array with the following elements:</span><pre>$mla_tablist</pre></a></li>
98
  <li class="property private "><a href="#%24page_template_array" title="$page_template_array :: Template file for the Settings page(s) and parts"><span class="description">Template file for the Settings page(s) and parts</span><pre>$page_template_array</pre></a></li>
99
  <li class="nav-header">
100
  <i class="icon-custom icon-constant"></i> Constants</li>
 
 
 
 
101
  <li class="constant "><a href="#MLA_SETTINGS_SLUG" title="MLA_SETTINGS_SLUG :: Provides a unique name for the settings page"><span class="description">Provides a unique name for the settings page</span><pre>MLA_SETTINGS_SLUG</pre></a></li>
102
  </ul>
103
  </div>
@@ -151,9 +176,33 @@ Each tab is defined by an array with the following elements:</span><pre>$mla_tab
151
  </tr></table>
152
  </div></div>
153
  </div>
154
- <a name="mla_add_plugin_settings_link" id="mla_add_plugin_settings_link"></a><div class="element clickable method public mla_add_plugin_settings_link" data-toggle="collapse" data-target=".mla_add_plugin_settings_link .collapse">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  <h2>Add the "Settings" link to the MLA entry in the Plugins section</h2>
156
- <pre>mla_add_plugin_settings_link(array $links, string $file) : array</pre>
157
  <div class="labels"></div>
158
  <div class="row collapse"><div class="detail-description">
159
  <p class="long_description"></p>
@@ -174,8 +223,37 @@ Each tab is defined by an array with the following elements:</span><pre>$mla_tab
174
  <code>array</code>Updated array of links for the Plugin</div>
175
  </div></div>
176
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  <a name="mla_admin_menu_action" id="mla_admin_menu_action"></a><div class="element clickable method public mla_admin_menu_action" data-toggle="collapse" data-target=".mla_admin_menu_action .collapse">
178
  <h2>Add settings page in the "Settings" section,
 
179
  add settings link in the Plugins section entry for MLA.</h2>
180
  <pre>mla_admin_menu_action() : void</pre>
181
  <div class="labels"></div>
@@ -199,6 +277,55 @@ add settings link in the Plugins section entry for MLA.</h2>
199
  </tr></table>
200
  </div></div>
201
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  <a name="mla_render_settings_page" id="mla_render_settings_page"></a><div class="element clickable method public mla_render_settings_page" data-toggle="collapse" data-target=".mla_render_settings_page .collapse">
203
  <h2>Render (echo) the "Media Library Assistant" subpage in the Settings section</h2>
204
  <pre>mla_render_settings_page() : void</pre>
@@ -211,6 +338,54 @@ add settings link in the Plugins section entry for MLA.</h2>
211
  </tr></table>
212
  </div></div>
213
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  <a name="_compose_custom_field_tab" id="_compose_custom_field_tab"></a><div class="element clickable method private _compose_custom_field_tab" data-toggle="collapse" data-target="._compose_custom_field_tab .collapse">
215
  <h2>Compose the Custom Field tab content for the Settings subpage</h2>
216
  <pre>_compose_custom_field_tab() : array</pre>
@@ -253,6 +428,50 @@ add settings link in the Plugins section entry for MLA.</h2>
253
  <code>array</code>'message' => status/error messages, 'body' => tab content</div>
254
  </div></div>
255
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  <a name="_compose_general_tab" id="_compose_general_tab"></a><div class="element clickable method private _compose_general_tab" data-toggle="collapse" data-target="._compose_general_tab .collapse">
257
  <h2>Compose the General tab content for the Settings subpage</h2>
258
  <pre>_compose_general_tab() : array</pre>
@@ -346,6 +565,25 @@ add settings link in the Plugins section entry for MLA.</h2>
346
  <code>string</code>HTML markup for the option's table row</div>
347
  </div></div>
348
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
  <a name="_compose_settings_tabs" id="_compose_settings_tabs"></a><div class="element clickable method private _compose_settings_tabs" data-toggle="collapse" data-target="._compose_settings_tabs .collapse">
350
  <h2>Compose the navigation tabs for the Settings subpage</h2>
351
  <pre>_compose_settings_tabs(string $active_tab) : string</pre>
@@ -372,6 +610,51 @@ add settings link in the Plugins section entry for MLA.</h2>
372
  <code>string</code>HTML markup for the Settings subpage navigation tabs</div>
373
  </div></div>
374
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  <a name="_delete_custom_field" id="_delete_custom_field"></a><div class="element clickable method private _delete_custom_field" data-toggle="collapse" data-target="._delete_custom_field .collapse">
376
  <h2>Delete a custom field from the wp_postmeta table</h2>
377
  <pre>_delete_custom_field(array $value) : array</pre>
@@ -487,6 +770,25 @@ without saving the settings to the mla_option</h2>
487
  <code>array</code>Message(s) reflecting the results of the operation</div>
488
  </div></div>
489
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
  <a name="_reset_general_settings" id="_reset_general_settings"></a><div class="element clickable method private _reset_general_settings" data-toggle="collapse" data-target="._reset_general_settings .collapse">
491
  <h2>Delete saved settings, restoring default values</h2>
492
  <pre>_reset_general_settings() : array</pre>
@@ -609,6 +911,48 @@ without saving the settings to the mla_option</h2>
609
  <code>array</code>Message(s) reflecting the results of the operation</div>
610
  </div></div>
611
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
612
  <a name="_update_option_row" id="_update_option_row"></a><div class="element clickable method private _update_option_row" data-toggle="collapse" data-target="._update_option_row .collapse">
613
  <h2>Update or delete a single MLA option value</h2>
614
  <pre>_update_option_row(string $key, array $value) : string</pre>
@@ -653,6 +997,18 @@ without saving the settings to the mla_option</h2>
653
  </div>
654
  <h3>
655
  <i class="icon-custom icon-property"></i> Properties</h3>
 
 
 
 
 
 
 
 
 
 
 
 
656
  <a name="%24mla_tablist" id="$mla_tablist"> </a><div class="element clickable property private $mla_tablist" data-toggle="collapse" data-target=".$mla_tablist .collapse">
657
  <h2>Definitions for Settings page tab ids, titles and handlers
658
  Each tab is defined by an array with the following elements:</h2>
@@ -685,6 +1041,54 @@ each page load and cached for subsequent use.</p></p>
685
  </div>
686
  <h3>
687
  <i class="icon-custom icon-constant"></i> Constants</h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
688
  <a name="MLA_SETTINGS_SLUG" id="MLA_SETTINGS_SLUG"> </a><div class="element clickable constant MLA_SETTINGS_SLUG" data-toggle="collapse" data-target=".MLA_SETTINGS_SLUG .collapse">
689
  <h2>Provides a unique name for the settings page</h2>
690
  <pre>MLA_SETTINGS_SLUG </pre>
@@ -698,7 +1102,7 @@ each page load and cached for subsequent use.</p></p>
698
  <div class="row"><footer class="span12">
699
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
700
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
701
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
702
  </div>
703
  </body>
704
  </html>
54
  <i class="icon-custom icon-method"></i> Methods</li>
55
  <li class="method public "><a href="#initialize" title="initialize :: Initialization function, similar to __construct()"><span class="description">Initialization function, similar to __construct()</span><pre>initialize()</pre></a></li>
56
  <li class="method public "><a href="#mla_activation_hook" title="mla_activation_hook :: Perform one-time actions on plugin activation"><span class="description">Perform one-time actions on plugin activation</span><pre>mla_activation_hook()</pre></a></li>
57
+ <li class="method public "><a href="#mla_add_help_tab_action" title="mla_add_help_tab_action :: Add contextual help tabs to all the MLA pages"><span class="description">Add contextual help tabs to all the MLA pages</span><pre>mla_add_help_tab_action()</pre></a></li>
58
+ <li class="method public "><a href="#mla_add_menu_options_action" title='mla_add_menu_options_action :: Add the "XX Entries per page" filter to the Screen Options tab'><span class="description">Add the "XX Entries per page" filter to the Screen Options tab</span><pre>mla_add_menu_options_action()</pre></a></li>
59
+ <li class="method public "><a href="#mla_add_plugin_settings_link_filter" title='mla_add_plugin_settings_link_filter :: Add the "Settings" link to the MLA entry in the Plugins section'><span class="description">Add the "Settings" link to the MLA entry in the Plugins section</span><pre>mla_add_plugin_settings_link_filter()</pre></a></li>
60
+ <li class="method public "><a href="#mla_admin_enqueue_scripts_action" title="mla_admin_enqueue_scripts_action :: Load the plugin's Style Sheet and Javascript files"><span class="description">Load the plugin's Style Sheet and Javascript files</span><pre>mla_admin_enqueue_scripts_action()</pre></a></li>
61
+ <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Load the plugin's Ajax handler"><span class="description">Load the plugin's Ajax handler</span><pre>mla_admin_init_action()</pre></a></li>
62
  <li class="method public "><a href="#mla_admin_menu_action" title='mla_admin_menu_action :: Add settings page in the "Settings" section,
63
+ add screen options and help tabs,
64
  add settings link in the Plugins section entry for MLA.'><span class="description">Add settings page in the "Settings" section,
65
+ add screen options and help tabs,
66
  add settings link in the Plugins section entry for MLA.</span><pre>mla_admin_menu_action()</pre></a></li>
67
  <li class="method public "><a href="#mla_deactivation_hook" title="mla_deactivation_hook :: Perform one-time actions on plugin deactivation"><span class="description">Perform one-time actions on plugin deactivation</span><pre>mla_deactivation_hook()</pre></a></li>
68
+ <li class="method public "><a href="#mla_get_icon_type_dropdown" title="mla_get_icon_type_dropdown :: Get an HTML select element representing a list of icon types"><span class="description">Get an HTML select element representing a list of icon types</span><pre>mla_get_icon_type_dropdown()</pre></a></li>
69
+ <li class="method public "><a href="#mla_inline_edit_upload_action" title="mla_inline_edit_upload_action :: Ajax handler for Upload MIME Types inline editing (quick and bulk edit)"><span class="description">Ajax handler for Upload MIME Types inline editing (quick and bulk edit)</span><pre>mla_inline_edit_upload_action()</pre></a></li>
70
+ <li class="method public "><a href="#mla_inline_edit_view_action" title="mla_inline_edit_view_action :: Ajax handler for Post MIME Types inline editing (quick and bulk edit)"><span class="description">Ajax handler for Post MIME Types inline editing (quick and bulk edit)</span><pre>mla_inline_edit_view_action()</pre></a></li>
71
  <li class="method public "><a href="#mla_render_settings_page" title='mla_render_settings_page :: Render (echo) the "Media Library Assistant" subpage in the Settings section'><span class="description">Render (echo) the "Media Library Assistant" subpage in the Settings section</span><pre>mla_render_settings_page()</pre></a></li>
72
+ <li class="method public "><a href="#mla_screen_options_show_screen_filter" title="mla_screen_options_show_screen_filter :: Only show screen options on the View and Upload tabs"><span class="description">Only show screen options on the View and Upload tabs</span><pre>mla_screen_options_show_screen_filter()</pre></a></li>
73
+ <li class="method public "><a href="#mla_set_screen_option_filter" title='mla_set_screen_option_filter :: Save the "Views/Uploads per page" option set by this user'><span class="description">Save the "Views/Uploads per page" option set by this user</span><pre>mla_set_screen_option_filter()</pre></a></li>
74
  <li class="nav-header private">» Private</li>
75
  <li class="method private "><a href="#_compose_custom_field_tab" title="_compose_custom_field_tab :: Compose the Custom Field tab content for the Settings subpage"><span class="description">Compose the Custom Field tab content for the Settings subpage</span><pre>_compose_custom_field_tab()</pre></a></li>
76
  <li class="method private "><a href="#_compose_documentation_tab" title="_compose_documentation_tab :: Compose the Documentation tab content for the Settings subpage"><span class="description">Compose the Documentation tab content for the Settings subpage</span><pre>_compose_documentation_tab()</pre></a></li>
77
+ <li class="method private "><a href="#_compose_edit_upload_tab" title="_compose_edit_upload_tab :: Compose the Edit Upload type tab content for the Settings subpage"><span class="description">Compose the Edit Upload type tab content for the Settings subpage</span><pre>_compose_edit_upload_tab()</pre></a></li>
78
+ <li class="method private "><a href="#_compose_edit_view_tab" title="_compose_edit_view_tab :: Compose the Edit View tab content for the Settings subpage"><span class="description">Compose the Edit View tab content for the Settings subpage</span><pre>_compose_edit_view_tab()</pre></a></li>
79
  <li class="method private "><a href="#_compose_general_tab" title="_compose_general_tab :: Compose the General tab content for the Settings subpage"><span class="description">Compose the General tab content for the Settings subpage</span><pre>_compose_general_tab()</pre></a></li>
80
  <li class="method private "><a href="#_compose_iptc_exif_tab" title="_compose_iptc_exif_tab :: Compose the IPTC/EXIF tab content for the Settings subpage"><span class="description">Compose the IPTC/EXIF tab content for the Settings subpage</span><pre>_compose_iptc_exif_tab()</pre></a></li>
81
  <li class="method private "><a href="#_compose_mla_gallery_tab" title="_compose_mla_gallery_tab :: Compose the MLA Gallery tab content for the Settings subpage"><span class="description">Compose the MLA Gallery tab content for the Settings subpage</span><pre>_compose_mla_gallery_tab()</pre></a></li>
82
  <li class="method private "><a href="#_compose_option_row" title="_compose_option_row :: Compose the table row for a single MLA option"><span class="description">Compose the table row for a single MLA option</span><pre>_compose_option_row()</pre></a></li>
83
+ <li class="method private "><a href="#_compose_optional_upload_tab" title="_compose_optional_upload_tab :: Compose the Optional File Upload MIME Types tab content for the Settings subpage"><span class="description">Compose the Optional File Upload MIME Types tab content for the Settings subpage</span><pre>_compose_optional_upload_tab()</pre></a></li>
84
  <li class="method private "><a href="#_compose_settings_tabs" title="_compose_settings_tabs :: Compose the navigation tabs for the Settings subpage"><span class="description">Compose the navigation tabs for the Settings subpage</span><pre>_compose_settings_tabs()</pre></a></li>
85
+ <li class="method private "><a href="#_compose_upload_tab" title="_compose_upload_tab :: Compose the File Upload MIME Types tab content for the Settings subpage"><span class="description">Compose the File Upload MIME Types tab content for the Settings subpage</span><pre>_compose_upload_tab()</pre></a></li>
86
+ <li class="method private "><a href="#_compose_view_tab" title="_compose_view_tab :: Compose the Post MIME Type Views tab content for the Settings subpage"><span class="description">Compose the Post MIME Type Views tab content for the Settings subpage</span><pre>_compose_view_tab()</pre></a></li>
87
+ <li class="method private "><a href="#_current_bulk_action" title="_current_bulk_action :: Get the current action selected from the bulk actions dropdown"><span class="description">Get the current action selected from the bulk actions dropdown</span><pre>_current_bulk_action()</pre></a></li>
88
  <li class="method private "><a href="#_delete_custom_field" title="_delete_custom_field :: Delete a custom field from the wp_postmeta table"><span class="description">Delete a custom field from the wp_postmeta table</span><pre>_delete_custom_field()</pre></a></li>
89
  <li class="method private "><a href="#_process_custom_field_mapping" title="_process_custom_field_mapping :: Process custom field settings against all image attachments
90
  without saving the settings to the mla_option"><span class="description">Process custom field settings against all image attachments
98
  <li class="method private "><a href="#_process_iptc_exif_taxonomy" title="_process_iptc_exif_taxonomy :: Process IPTC/EXIF taxonomy term settings against all image attachments
99
  without saving the settings to the mla_option"><span class="description">Process IPTC/EXIF taxonomy term settings against all image attachments
100
  without saving the settings to the mla_option</span><pre>_process_iptc_exif_taxonomy()</pre></a></li>
101
+ <li class="method private "><a href="#_process_optional_upload_mime" title="_process_optional_upload_mime :: Process an Optional Upload MIME Type selection"><span class="description">Process an Optional Upload MIME Type selection</span><pre>_process_optional_upload_mime()</pre></a></li>
102
  <li class="method private "><a href="#_reset_general_settings" title="_reset_general_settings :: Delete saved settings, restoring default values"><span class="description">Delete saved settings, restoring default values</span><pre>_reset_general_settings()</pre></a></li>
103
  <li class="method private "><a href="#_save_custom_field_settings" title="_save_custom_field_settings :: Save custom field settings to the options table"><span class="description">Save custom field settings to the options table</span><pre>_save_custom_field_settings()</pre></a></li>
104
  <li class="method private "><a href="#_save_gallery_settings" title="_save_gallery_settings :: Save MLA Gallery settings to the options table"><span class="description">Save MLA Gallery settings to the options table</span><pre>_save_gallery_settings()</pre></a></li>
105
  <li class="method private "><a href="#_save_general_settings" title="_save_general_settings :: Save General settings to the options table"><span class="description">Save General settings to the options table</span><pre>_save_general_settings()</pre></a></li>
106
  <li class="method private "><a href="#_save_iptc_exif_custom_settings" title="_save_iptc_exif_custom_settings :: Save IPTC/EXIF custom field settings to the options table"><span class="description">Save IPTC/EXIF custom field settings to the options table</span><pre>_save_iptc_exif_custom_settings()</pre></a></li>
107
  <li class="method private "><a href="#_save_iptc_exif_settings" title="_save_iptc_exif_settings :: Save IPTC/EXIF settings to the options table"><span class="description">Save IPTC/EXIF settings to the options table</span><pre>_save_iptc_exif_settings()</pre></a></li>
108
+ <li class="method private "><a href="#_save_upload_settings" title="_save_upload_settings :: Save Upload settings to the options table"><span class="description">Save Upload settings to the options table</span><pre>_save_upload_settings()</pre></a></li>
109
+ <li class="method private "><a href="#_save_view_settings" title="_save_view_settings :: Save View settings to the options table"><span class="description">Save View settings to the options table</span><pre>_save_view_settings()</pre></a></li>
110
  <li class="method private "><a href="#_update_option_row" title="_update_option_row :: Update or delete a single MLA option value"><span class="description">Update or delete a single MLA option value</span><pre>_update_option_row()</pre></a></li>
111
  <li class="method private "><a href="#_version_upgrade" title="_version_upgrade :: Database and option update check, for installing new versions"><span class="description">Database and option update check, for installing new versions</span><pre>_version_upgrade()</pre></a></li>
112
  <li class="nav-header">
113
  <i class="icon-custom icon-property"></i> Properties</li>
114
  <li class="nav-header private">» Private</li>
115
+ <li class="property private "><a href="#%24current_page_hook" title="$current_page_hook :: Holds screen id to match help text to corresponding screen"><span class="description">Holds screen id to match help text to corresponding screen</span><pre>$current_page_hook</pre></a></li>
116
  <li class="property private "><a href="#%24mla_tablist" title="$mla_tablist :: Definitions for Settings page tab ids, titles and handlers
117
  Each tab is defined by an array with the following elements:"><span class="description">Definitions for Settings page tab ids, titles and handlers
118
  Each tab is defined by an array with the following elements:</span><pre>$mla_tablist</pre></a></li>
119
  <li class="property private "><a href="#%24page_template_array" title="$page_template_array :: Template file for the Settings page(s) and parts"><span class="description">Template file for the Settings page(s) and parts</span><pre>$page_template_array</pre></a></li>
120
  <li class="nav-header">
121
  <i class="icon-custom icon-constant"></i> Constants</li>
122
+ <li class="constant "><a href="#JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT" title="JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT :: Object name for localizing JavaScript - MLA View List Table"><span class="description">Object name for localizing JavaScript - MLA View List Table</span><pre>JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT</pre></a></li>
123
+ <li class="constant "><a href="#JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG" title="JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG :: Slug for localizing and enqueueing JavaScript - MLA View List Table"><span class="description">Slug for localizing and enqueueing JavaScript - MLA View List Table</span><pre>JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG</pre></a></li>
124
+ <li class="constant "><a href="#JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT" title="JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT :: Object name for localizing JavaScript - MLA View List Table"><span class="description">Object name for localizing JavaScript - MLA View List Table</span><pre>JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT</pre></a></li>
125
+ <li class="constant "><a href="#JAVASCRIPT_INLINE_EDIT_VIEW_SLUG" title="JAVASCRIPT_INLINE_EDIT_VIEW_SLUG :: Slug for localizing and enqueueing JavaScript - MLA View List Table"><span class="description">Slug for localizing and enqueueing JavaScript - MLA View List Table</span><pre>JAVASCRIPT_INLINE_EDIT_VIEW_SLUG</pre></a></li>
126
  <li class="constant "><a href="#MLA_SETTINGS_SLUG" title="MLA_SETTINGS_SLUG :: Provides a unique name for the settings page"><span class="description">Provides a unique name for the settings page</span><pre>MLA_SETTINGS_SLUG</pre></a></li>
127
  </ul>
128
  </div>
176
  </tr></table>
177
  </div></div>
178
  </div>
179
+ <a name="mla_add_help_tab_action" id="mla_add_help_tab_action"></a><div class="element clickable method public mla_add_help_tab_action" data-toggle="collapse" data-target=".mla_add_help_tab_action .collapse">
180
+ <h2>Add contextual help tabs to all the MLA pages</h2>
181
+ <pre>mla_add_help_tab_action() : void</pre>
182
+ <div class="labels"></div>
183
+ <div class="row collapse"><div class="detail-description">
184
+ <p class="long_description"></p>
185
+ <table class="table table-bordered"><tr>
186
+ <th>since</th>
187
+ <td>1.40</td>
188
+ </tr></table>
189
+ </div></div>
190
+ </div>
191
+ <a name="mla_add_menu_options_action" id="mla_add_menu_options_action"></a><div class="element clickable method public mla_add_menu_options_action" data-toggle="collapse" data-target=".mla_add_menu_options_action .collapse">
192
+ <h2>Add the "XX Entries per page" filter to the Screen Options tab</h2>
193
+ <pre>mla_add_menu_options_action() : void</pre>
194
+ <div class="labels"></div>
195
+ <div class="row collapse"><div class="detail-description">
196
+ <p class="long_description"></p>
197
+ <table class="table table-bordered"><tr>
198
+ <th>since</th>
199
+ <td>1.40</td>
200
+ </tr></table>
201
+ </div></div>
202
+ </div>
203
+ <a name="mla_add_plugin_settings_link_filter" id="mla_add_plugin_settings_link_filter"></a><div class="element clickable method public mla_add_plugin_settings_link_filter" data-toggle="collapse" data-target=".mla_add_plugin_settings_link_filter .collapse">
204
  <h2>Add the "Settings" link to the MLA entry in the Plugins section</h2>
205
+ <pre>mla_add_plugin_settings_link_filter(array $links, string $file) : array</pre>
206
  <div class="labels"></div>
207
  <div class="row collapse"><div class="detail-description">
208
  <p class="long_description"></p>
223
  <code>array</code>Updated array of links for the Plugin</div>
224
  </div></div>
225
  </div>
226
+ <a name="mla_admin_enqueue_scripts_action" id="mla_admin_enqueue_scripts_action"></a><div class="element clickable method public mla_admin_enqueue_scripts_action" data-toggle="collapse" data-target=".mla_admin_enqueue_scripts_action .collapse">
227
+ <h2>Load the plugin's Style Sheet and Javascript files</h2>
228
+ <pre>mla_admin_enqueue_scripts_action(string $page_hook) : void</pre>
229
+ <div class="labels"></div>
230
+ <div class="row collapse"><div class="detail-description">
231
+ <p class="long_description"></p>
232
+ <table class="table table-bordered"><tr>
233
+ <th>since</th>
234
+ <td>1.40</td>
235
+ </tr></table>
236
+ <h3>Parameters</h3>
237
+ <div class="subelement argument">
238
+ <h4>$page_hook</h4>
239
+ <code>string</code><p>Name of the page being loaded</p></div>
240
+ </div></div>
241
+ </div>
242
+ <a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
243
+ <h2>Load the plugin's Ajax handler</h2>
244
+ <pre>mla_admin_init_action() : void</pre>
245
+ <div class="labels"></div>
246
+ <div class="row collapse"><div class="detail-description">
247
+ <p class="long_description"></p>
248
+ <table class="table table-bordered"><tr>
249
+ <th>since</th>
250
+ <td>1.40</td>
251
+ </tr></table>
252
+ </div></div>
253
+ </div>
254
  <a name="mla_admin_menu_action" id="mla_admin_menu_action"></a><div class="element clickable method public mla_admin_menu_action" data-toggle="collapse" data-target=".mla_admin_menu_action .collapse">
255
  <h2>Add settings page in the "Settings" section,
256
+ add screen options and help tabs,
257
  add settings link in the Plugins section entry for MLA.</h2>
258
  <pre>mla_admin_menu_action() : void</pre>
259
  <div class="labels"></div>
277
  </tr></table>
278
  </div></div>
279
  </div>
280
+ <a name="mla_get_icon_type_dropdown" id="mla_get_icon_type_dropdown"></a><div class="element clickable method public mla_get_icon_type_dropdown" data-toggle="collapse" data-target=".mla_get_icon_type_dropdown .collapse">
281
+ <h2>Get an HTML select element representing a list of icon types</h2>
282
+ <pre>mla_get_icon_type_dropdown(array $templates, string $name, string $selection) : string</pre>
283
+ <div class="labels"></div>
284
+ <div class="row collapse"><div class="detail-description">
285
+ <p class="long_description"></p>
286
+ <table class="table table-bordered"><tr>
287
+ <th>since</th>
288
+ <td>1.40</td>
289
+ </tr></table>
290
+ <h3>Parameters</h3>
291
+ <div class="subelement argument">
292
+ <h4>$templates</h4>
293
+ <code>array</code><p>Display template array</p></div>
294
+ <div class="subelement argument">
295
+ <h4>$name</h4>
296
+ <code>string</code><p>HTML name attribute value</p></div>
297
+ <div class="subelement argument">
298
+ <h4>$selection</h4>
299
+ <code>string</code><p>currently selected Icon Type</p></div>
300
+ <h3>Returns</h3>
301
+ <div class="subelement response">
302
+ <code>string</code>HTML select element or empty string on failure.</div>
303
+ </div></div>
304
+ </div>
305
+ <a name="mla_inline_edit_upload_action" id="mla_inline_edit_upload_action"></a><div class="element clickable method public mla_inline_edit_upload_action" data-toggle="collapse" data-target=".mla_inline_edit_upload_action .collapse">
306
+ <h2>Ajax handler for Upload MIME Types inline editing (quick and bulk edit)</h2>
307
+ <pre>mla_inline_edit_upload_action() : void</pre>
308
+ <div class="labels"></div>
309
+ <div class="row collapse"><div class="detail-description">
310
+ <p class="long_description"><p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p></p>
311
+ <table class="table table-bordered"><tr>
312
+ <th>since</th>
313
+ <td>1.40</td>
314
+ </tr></table>
315
+ </div></div>
316
+ </div>
317
+ <a name="mla_inline_edit_view_action" id="mla_inline_edit_view_action"></a><div class="element clickable method public mla_inline_edit_view_action" data-toggle="collapse" data-target=".mla_inline_edit_view_action .collapse">
318
+ <h2>Ajax handler for Post MIME Types inline editing (quick and bulk edit)</h2>
319
+ <pre>mla_inline_edit_view_action() : void</pre>
320
+ <div class="labels"></div>
321
+ <div class="row collapse"><div class="detail-description">
322
+ <p class="long_description"><p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p></p>
323
+ <table class="table table-bordered"><tr>
324
+ <th>since</th>
325
+ <td>1.40</td>
326
+ </tr></table>
327
+ </div></div>
328
+ </div>
329
  <a name="mla_render_settings_page" id="mla_render_settings_page"></a><div class="element clickable method public mla_render_settings_page" data-toggle="collapse" data-target=".mla_render_settings_page .collapse">
330
  <h2>Render (echo) the "Media Library Assistant" subpage in the Settings section</h2>
331
  <pre>mla_render_settings_page() : void</pre>
338
  </tr></table>
339
  </div></div>
340
  </div>
341
+ <a name="mla_screen_options_show_screen_filter" id="mla_screen_options_show_screen_filter"></a><div class="element clickable method public mla_screen_options_show_screen_filter" data-toggle="collapse" data-target=".mla_screen_options_show_screen_filter .collapse">
342
+ <h2>Only show screen options on the View and Upload tabs</h2>
343
+ <pre>mla_screen_options_show_screen_filter(boolean $show_screen, string $this_screen) : boolean</pre>
344
+ <div class="labels"></div>
345
+ <div class="row collapse"><div class="detail-description">
346
+ <p class="long_description"></p>
347
+ <table class="table table-bordered"><tr>
348
+ <th>since</th>
349
+ <td>1.40</td>
350
+ </tr></table>
351
+ <h3>Parameters</h3>
352
+ <div class="subelement argument">
353
+ <h4>$show_screen</h4>
354
+ <code>boolean</code><p>True to display "Screen Options", false to suppress them</p>
355
+ </div>
356
+ <div class="subelement argument">
357
+ <h4>$this_screen</h4>
358
+ <code>string</code><p>Name of the page being loaded</p></div>
359
+ <h3>Returns</h3>
360
+ <div class="subelement response">
361
+ <code>boolean</code>True to display "Screen Options", false to suppress them</div>
362
+ </div></div>
363
+ </div>
364
+ <a name="mla_set_screen_option_filter" id="mla_set_screen_option_filter"></a><div class="element clickable method public mla_set_screen_option_filter" data-toggle="collapse" data-target=".mla_set_screen_option_filter .collapse">
365
+ <h2>Save the "Views/Uploads per page" option set by this user</h2>
366
+ <pre>mla_set_screen_option_filter(mixed $status, string $option, string $value) : string | void</pre>
367
+ <div class="labels"></div>
368
+ <div class="row collapse"><div class="detail-description">
369
+ <p class="long_description"></p>
370
+ <table class="table table-bordered"><tr>
371
+ <th>since</th>
372
+ <td>1.40</td>
373
+ </tr></table>
374
+ <h3>Parameters</h3>
375
+ <div class="subelement argument">
376
+ <h4>$status</h4>
377
+ <code>mixed</code><p>false or value returned by previous filter</p></div>
378
+ <div class="subelement argument">
379
+ <h4>$option</h4>
380
+ <code>string</code><p>Name of the option being changed</p></div>
381
+ <div class="subelement argument">
382
+ <h4>$value</h4>
383
+ <code>string</code><p>New value of the option</p></div>
384
+ <h3>Returns</h3>
385
+ <div class="subelement response">
386
+ <code>string</code><code>void</code>New value if this is our option, otherwise nothing</div>
387
+ </div></div>
388
+ </div>
389
  <a name="_compose_custom_field_tab" id="_compose_custom_field_tab"></a><div class="element clickable method private _compose_custom_field_tab" data-toggle="collapse" data-target="._compose_custom_field_tab .collapse">
390
  <h2>Compose the Custom Field tab content for the Settings subpage</h2>
391
  <pre>_compose_custom_field_tab() : array</pre>
428
  <code>array</code>'message' => status/error messages, 'body' => tab content</div>
429
  </div></div>
430
  </div>
431
+ <a name="_compose_edit_upload_tab" id="_compose_edit_upload_tab"></a><div class="element clickable method private _compose_edit_upload_tab" data-toggle="collapse" data-target="._compose_edit_upload_tab .collapse">
432
+ <h2>Compose the Edit Upload type tab content for the Settings subpage</h2>
433
+ <pre>_compose_edit_upload_tab(array $item, string $templates) : array</pre>
434
+ <div class="labels"></div>
435
+ <div class="row collapse"><div class="detail-description">
436
+ <p class="long_description"></p>
437
+ <table class="table table-bordered"><tr>
438
+ <th>since</th>
439
+ <td>1.40</td>
440
+ </tr></table>
441
+ <h3>Parameters</h3>
442
+ <div class="subelement argument">
443
+ <h4>$item</h4>
444
+ <code>array</code><p>data values for the item</p></div>
445
+ <div class="subelement argument">
446
+ <h4>$templates</h4>
447
+ <code>string</code><p>Display template array</p></div>
448
+ <h3>Returns</h3>
449
+ <div class="subelement response">
450
+ <code>array</code>'message' => status/error messages, 'body' => tab content</div>
451
+ </div></div>
452
+ </div>
453
+ <a name="_compose_edit_view_tab" id="_compose_edit_view_tab"></a><div class="element clickable method private _compose_edit_view_tab" data-toggle="collapse" data-target="._compose_edit_view_tab .collapse">
454
+ <h2>Compose the Edit View tab content for the Settings subpage</h2>
455
+ <pre>_compose_edit_view_tab(array $view, string $template) : array</pre>
456
+ <div class="labels"></div>
457
+ <div class="row collapse"><div class="detail-description">
458
+ <p class="long_description"></p>
459
+ <table class="table table-bordered"><tr>
460
+ <th>since</th>
461
+ <td>1.40</td>
462
+ </tr></table>
463
+ <h3>Parameters</h3>
464
+ <div class="subelement argument">
465
+ <h4>$view</h4>
466
+ <code>array</code><p>data values for the item</p></div>
467
+ <div class="subelement argument">
468
+ <h4>$template</h4>
469
+ <code>string</code><p>Display template</p></div>
470
+ <h3>Returns</h3>
471
+ <div class="subelement response">
472
+ <code>array</code>'message' => status/error messages, 'body' => tab content</div>
473
+ </div></div>
474
+ </div>
475
  <a name="_compose_general_tab" id="_compose_general_tab"></a><div class="element clickable method private _compose_general_tab" data-toggle="collapse" data-target="._compose_general_tab .collapse">
476
  <h2>Compose the General tab content for the Settings subpage</h2>
477
  <pre>_compose_general_tab() : array</pre>
565
  <code>string</code>HTML markup for the option's table row</div>
566
  </div></div>
567
  </div>
568
+ <a name="_compose_optional_upload_tab" id="_compose_optional_upload_tab"></a><div class="element clickable method private _compose_optional_upload_tab" data-toggle="collapse" data-target="._compose_optional_upload_tab .collapse">
569
+ <h2>Compose the Optional File Upload MIME Types tab content for the Settings subpage</h2>
570
+ <pre>_compose_optional_upload_tab(string $page_template_array) : array</pre>
571
+ <div class="labels"></div>
572
+ <div class="row collapse"><div class="detail-description">
573
+ <p class="long_description"></p>
574
+ <table class="table table-bordered"><tr>
575
+ <th>since</th>
576
+ <td>1.40</td>
577
+ </tr></table>
578
+ <h3>Parameters</h3>
579
+ <div class="subelement argument">
580
+ <h4>$page_template_array</h4>
581
+ <code>string</code><p>Display templates</p></div>
582
+ <h3>Returns</h3>
583
+ <div class="subelement response">
584
+ <code>array</code>'message' => status/error messages, 'body' => tab content</div>
585
+ </div></div>
586
+ </div>
587
  <a name="_compose_settings_tabs" id="_compose_settings_tabs"></a><div class="element clickable method private _compose_settings_tabs" data-toggle="collapse" data-target="._compose_settings_tabs .collapse">
588
  <h2>Compose the navigation tabs for the Settings subpage</h2>
589
  <pre>_compose_settings_tabs(string $active_tab) : string</pre>
610
  <code>string</code>HTML markup for the Settings subpage navigation tabs</div>
611
  </div></div>
612
  </div>
613
+ <a name="_compose_upload_tab" id="_compose_upload_tab"></a><div class="element clickable method private _compose_upload_tab" data-toggle="collapse" data-target="._compose_upload_tab .collapse">
614
+ <h2>Compose the File Upload MIME Types tab content for the Settings subpage</h2>
615
+ <pre>_compose_upload_tab() : array</pre>
616
+ <div class="labels"></div>
617
+ <div class="row collapse"><div class="detail-description">
618
+ <p class="long_description"></p>
619
+ <table class="table table-bordered"><tr>
620
+ <th>since</th>
621
+ <td>1.40</td>
622
+ </tr></table>
623
+ <h3>Returns</h3>
624
+ <div class="subelement response">
625
+ <code>array</code>'message' => status/error messages, 'body' => tab content</div>
626
+ </div></div>
627
+ </div>
628
+ <a name="_compose_view_tab" id="_compose_view_tab"></a><div class="element clickable method private _compose_view_tab" data-toggle="collapse" data-target="._compose_view_tab .collapse">
629
+ <h2>Compose the Post MIME Type Views tab content for the Settings subpage</h2>
630
+ <pre>_compose_view_tab() : array</pre>
631
+ <div class="labels"></div>
632
+ <div class="row collapse"><div class="detail-description">
633
+ <p class="long_description"></p>
634
+ <table class="table table-bordered"><tr>
635
+ <th>since</th>
636
+ <td>1.40</td>
637
+ </tr></table>
638
+ <h3>Returns</h3>
639
+ <div class="subelement response">
640
+ <code>array</code>'message' => status/error messages, 'body' => tab content</div>
641
+ </div></div>
642
+ </div>
643
+ <a name="_current_bulk_action" id="_current_bulk_action"></a><div class="element clickable method private _current_bulk_action" data-toggle="collapse" data-target="._current_bulk_action .collapse">
644
+ <h2>Get the current action selected from the bulk actions dropdown</h2>
645
+ <pre>_current_bulk_action() : string | false</pre>
646
+ <div class="labels"></div>
647
+ <div class="row collapse"><div class="detail-description">
648
+ <p class="long_description"></p>
649
+ <table class="table table-bordered"><tr>
650
+ <th>since</th>
651
+ <td>1.40</td>
652
+ </tr></table>
653
+ <h3>Returns</h3>
654
+ <div class="subelement response">
655
+ <code>string</code><code>false</code>The action name or False if no action was selected</div>
656
+ </div></div>
657
+ </div>
658
  <a name="_delete_custom_field" id="_delete_custom_field"></a><div class="element clickable method private _delete_custom_field" data-toggle="collapse" data-target="._delete_custom_field .collapse">
659
  <h2>Delete a custom field from the wp_postmeta table</h2>
660
  <pre>_delete_custom_field(array $value) : array</pre>
770
  <code>array</code>Message(s) reflecting the results of the operation</div>
771
  </div></div>
772
  </div>
773
+ <a name="_process_optional_upload_mime" id="_process_optional_upload_mime"></a><div class="element clickable method private _process_optional_upload_mime" data-toggle="collapse" data-target="._process_optional_upload_mime .collapse">
774
+ <h2>Process an Optional Upload MIME Type selection</h2>
775
+ <pre>_process_optional_upload_mime(\intger $ID) : array</pre>
776
+ <div class="labels"></div>
777
+ <div class="row collapse"><div class="detail-description">
778
+ <p class="long_description"></p>
779
+ <table class="table table-bordered"><tr>
780
+ <th>since</th>
781
+ <td>1.40</td>
782
+ </tr></table>
783
+ <h3>Parameters</h3>
784
+ <div class="subelement argument">
785
+ <h4>$ID</h4>
786
+ <code>\intger</code><p>MLA Optional Upload MIME Type ID</p></div>
787
+ <h3>Returns</h3>
788
+ <div class="subelement response">
789
+ <code>array</code>'message' => status/error messages, 'body' => tab content</div>
790
+ </div></div>
791
+ </div>
792
  <a name="_reset_general_settings" id="_reset_general_settings"></a><div class="element clickable method private _reset_general_settings" data-toggle="collapse" data-target="._reset_general_settings .collapse">
793
  <h2>Delete saved settings, restoring default values</h2>
794
  <pre>_reset_general_settings() : array</pre>
911
  <code>array</code>Message(s) reflecting the results of the operation</div>
912
  </div></div>
913
  </div>
914
+ <a name="_save_upload_settings" id="_save_upload_settings"></a><div class="element clickable method private _save_upload_settings" data-toggle="collapse" data-target="._save_upload_settings .collapse">
915
+ <h2>Save Upload settings to the options table</h2>
916
+ <pre>_save_upload_settings() : array</pre>
917
+ <div class="labels"></div>
918
+ <div class="row collapse"><div class="detail-description">
919
+ <p class="long_description"></p>
920
+ <table class="table table-bordered">
921
+ <tr>
922
+ <th>since</th>
923
+ <td>1.40</td>
924
+ </tr>
925
+ <tr>
926
+ <th>uses</th>
927
+ <td>\global\$_REQUEST</td>
928
+ </tr>
929
+ </table>
930
+ <h3>Returns</h3>
931
+ <div class="subelement response">
932
+ <code>array</code>Message(s) reflecting the results of the operation</div>
933
+ </div></div>
934
+ </div>
935
+ <a name="_save_view_settings" id="_save_view_settings"></a><div class="element clickable method private _save_view_settings" data-toggle="collapse" data-target="._save_view_settings .collapse">
936
+ <h2>Save View settings to the options table</h2>
937
+ <pre>_save_view_settings() : array</pre>
938
+ <div class="labels"></div>
939
+ <div class="row collapse"><div class="detail-description">
940
+ <p class="long_description"></p>
941
+ <table class="table table-bordered">
942
+ <tr>
943
+ <th>since</th>
944
+ <td>1.40</td>
945
+ </tr>
946
+ <tr>
947
+ <th>uses</th>
948
+ <td>\global\$_REQUEST</td>
949
+ </tr>
950
+ </table>
951
+ <h3>Returns</h3>
952
+ <div class="subelement response">
953
+ <code>array</code>Message(s) reflecting the results of the operation</div>
954
+ </div></div>
955
+ </div>
956
  <a name="_update_option_row" id="_update_option_row"></a><div class="element clickable method private _update_option_row" data-toggle="collapse" data-target="._update_option_row .collapse">
957
  <h2>Update or delete a single MLA option value</h2>
958
  <pre>_update_option_row(string $key, array $value) : string</pre>
997
  </div>
998
  <h3>
999
  <i class="icon-custom icon-property"></i> Properties</h3>
1000
+ <a name="%24current_page_hook" id="$current_page_hook"> </a><div class="element clickable property private $current_page_hook" data-toggle="collapse" data-target=".$current_page_hook .collapse">
1001
+ <h2>Holds screen id to match help text to corresponding screen</h2>
1002
+ <pre>$current_page_hook : array</pre>
1003
+ <div class="labels"></div>
1004
+ <div class="row collapse"><div class="detail-description">
1005
+ <p class="long_description"></p>
1006
+ <table class="table table-bordered"><tr>
1007
+ <th>since</th>
1008
+ <td>1.40</td>
1009
+ </tr></table>
1010
+ </div></div>
1011
+ </div>
1012
  <a name="%24mla_tablist" id="$mla_tablist"> </a><div class="element clickable property private $mla_tablist" data-toggle="collapse" data-target=".$mla_tablist .collapse">
1013
  <h2>Definitions for Settings page tab ids, titles and handlers
1014
  Each tab is defined by an array with the following elements:</h2>
1041
  </div>
1042
  <h3>
1043
  <i class="icon-custom icon-constant"></i> Constants</h3>
1044
+ <a name="JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT" id="JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT"> </a><div class="element clickable constant JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT" data-toggle="collapse" data-target=".JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT .collapse">
1045
+ <h2>Object name for localizing JavaScript - MLA View List Table</h2>
1046
+ <pre>JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT : string</pre>
1047
+ <div class="labels"></div>
1048
+ <div class="row collapse"><div class="detail-description">
1049
+ <p class="long_description"></p>
1050
+ <table class="table table-bordered"><tr>
1051
+ <th>since</th>
1052
+ <td>1.40</td>
1053
+ </tr></table>
1054
+ </div></div>
1055
+ </div>
1056
+ <a name="JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG" id="JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG"> </a><div class="element clickable constant JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG" data-toggle="collapse" data-target=".JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG .collapse">
1057
+ <h2>Slug for localizing and enqueueing JavaScript - MLA View List Table</h2>
1058
+ <pre>JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG : string</pre>
1059
+ <div class="labels"></div>
1060
+ <div class="row collapse"><div class="detail-description">
1061
+ <p class="long_description"></p>
1062
+ <table class="table table-bordered"><tr>
1063
+ <th>since</th>
1064
+ <td>1.40</td>
1065
+ </tr></table>
1066
+ </div></div>
1067
+ </div>
1068
+ <a name="JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT" id="JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT"> </a><div class="element clickable constant JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT" data-toggle="collapse" data-target=".JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT .collapse">
1069
+ <h2>Object name for localizing JavaScript - MLA View List Table</h2>
1070
+ <pre>JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT : string</pre>
1071
+ <div class="labels"></div>
1072
+ <div class="row collapse"><div class="detail-description">
1073
+ <p class="long_description"></p>
1074
+ <table class="table table-bordered"><tr>
1075
+ <th>since</th>
1076
+ <td>1.40</td>
1077
+ </tr></table>
1078
+ </div></div>
1079
+ </div>
1080
+ <a name="JAVASCRIPT_INLINE_EDIT_VIEW_SLUG" id="JAVASCRIPT_INLINE_EDIT_VIEW_SLUG"> </a><div class="element clickable constant JAVASCRIPT_INLINE_EDIT_VIEW_SLUG" data-toggle="collapse" data-target=".JAVASCRIPT_INLINE_EDIT_VIEW_SLUG .collapse">
1081
+ <h2>Slug for localizing and enqueueing JavaScript - MLA View List Table</h2>
1082
+ <pre>JAVASCRIPT_INLINE_EDIT_VIEW_SLUG : string</pre>
1083
+ <div class="labels"></div>
1084
+ <div class="row collapse"><div class="detail-description">
1085
+ <p class="long_description"></p>
1086
+ <table class="table table-bordered"><tr>
1087
+ <th>since</th>
1088
+ <td>1.40</td>
1089
+ </tr></table>
1090
+ </div></div>
1091
+ </div>
1092
  <a name="MLA_SETTINGS_SLUG" id="MLA_SETTINGS_SLUG"> </a><div class="element clickable constant MLA_SETTINGS_SLUG" data-toggle="collapse" data-target=".MLA_SETTINGS_SLUG .collapse">
1093
  <h2>Provides a unique name for the settings page</h2>
1094
  <pre>MLA_SETTINGS_SLUG </pre>
1102
  <div class="row"><footer class="span12">
1103
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1104
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1105
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
1106
  </div>
1107
  </body>
1108
  </html>
phpDocs/classes/MLAShortcodes.html CHANGED
@@ -61,6 +61,7 @@
61
  <li class="method public "><a href="#mla_shortcode_query_posts_orderby_filter" title="mla_shortcode_query_posts_orderby_filter :: Filters the ORDERBY clause for shortcode queries"><span class="description">Filters the ORDERBY clause for shortcode queries</span><pre>mla_shortcode_query_posts_orderby_filter()</pre></a></li>
62
  <li class="method public "><a href="#mla_shortcode_query_posts_where_filter" title="mla_shortcode_query_posts_where_filter :: Filters the WHERE clause for shortcode queries"><span class="description">Filters the WHERE clause for shortcode queries</span><pre>mla_shortcode_query_posts_where_filter()</pre></a></li>
63
  <li class="nav-header private">» Private</li>
 
64
  <li class="method private "><a href="#_sanitize_query_specification" title="_sanitize_query_specification :: Cleans up damage caused by the Visual Editor to the tax_query and meta_query specifications"><span class="description">Cleans up damage caused by the Visual Editor to the tax_query and meta_query specifications</span><pre>_sanitize_query_specification()</pre></a></li>
65
  <li class="method private "><a href="#_validate_sql_orderby" title="_validate_sql_orderby :: Translates query parameters to a valid SQL order by clause."><span class="description">Translates query parameters to a valid SQL order by clause.</span><pre>_validate_sql_orderby()</pre></a></li>
66
  <li class="nav-header">
@@ -252,6 +253,30 @@ Defined as public because it's a filter.</p></p>
252
  <code>string</code>query clause after modification</div>
253
  </div></div>
254
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  <a name="_sanitize_query_specification" id="_sanitize_query_specification"></a><div class="element clickable method private _sanitize_query_specification" data-toggle="collapse" data-target="._sanitize_query_specification .collapse">
256
  <h2>Cleans up damage caused by the Visual Editor to the tax_query and meta_query specifications</h2>
257
  <pre>_sanitize_query_specification(string $specification) : string</pre>
@@ -418,7 +443,7 @@ any further logic required to translate those values is contained in the filter.
418
  <div class="row"><footer class="span12">
419
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
420
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
421
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
422
  </div>
423
  </body>
424
  </html>
61
  <li class="method public "><a href="#mla_shortcode_query_posts_orderby_filter" title="mla_shortcode_query_posts_orderby_filter :: Filters the ORDERBY clause for shortcode queries"><span class="description">Filters the ORDERBY clause for shortcode queries</span><pre>mla_shortcode_query_posts_orderby_filter()</pre></a></li>
62
  <li class="method public "><a href="#mla_shortcode_query_posts_where_filter" title="mla_shortcode_query_posts_where_filter :: Filters the WHERE clause for shortcode queries"><span class="description">Filters the WHERE clause for shortcode queries</span><pre>mla_shortcode_query_posts_where_filter()</pre></a></li>
63
  <li class="nav-header private">» Private</li>
64
+ <li class="method private "><a href="#_process_shortcode_parameter" title="_process_shortcode_parameter :: Handles brace/bracket escaping and parses template for a shortcode parameter"><span class="description">Handles brace/bracket escaping and parses template for a shortcode parameter</span><pre>_process_shortcode_parameter()</pre></a></li>
65
  <li class="method private "><a href="#_sanitize_query_specification" title="_sanitize_query_specification :: Cleans up damage caused by the Visual Editor to the tax_query and meta_query specifications"><span class="description">Cleans up damage caused by the Visual Editor to the tax_query and meta_query specifications</span><pre>_sanitize_query_specification()</pre></a></li>
66
  <li class="method private "><a href="#_validate_sql_orderby" title="_validate_sql_orderby :: Translates query parameters to a valid SQL order by clause."><span class="description">Translates query parameters to a valid SQL order by clause.</span><pre>_validate_sql_orderby()</pre></a></li>
67
  <li class="nav-header">
253
  <code>string</code>query clause after modification</div>
254
  </div></div>
255
  </div>
256
+ <a name="_process_shortcode_parameter" id="_process_shortcode_parameter"></a><div class="element clickable method private _process_shortcode_parameter" data-toggle="collapse" data-target="._process_shortcode_parameter .collapse">
257
+ <h2>Handles brace/bracket escaping and parses template for a shortcode parameter</h2>
258
+ <pre>_process_shortcode_parameter(string $text, string $markup_values) : string</pre>
259
+ <div class="labels"></div>
260
+ <div class="row collapse"><div class="detail-description">
261
+ <p class="long_description"></p>
262
+ <table class="table table-bordered"><tr>
263
+ <th>since</th>
264
+ <td>1.14</td>
265
+ </tr></table>
266
+ <h3>Parameters</h3>
267
+ <div class="subelement argument">
268
+ <h4>$text</h4>
269
+ <code>string</code><p>raw shortcode parameter, e.g., "text {+field+} {brackets} \{braces\}"</p>
270
+ </div>
271
+ <div class="subelement argument">
272
+ <h4>$markup_values</h4>
273
+ <code>string</code><p>template substitution values, e.g., ('instance' => '1', ... )</p>
274
+ </div>
275
+ <h3>Returns</h3>
276
+ <div class="subelement response">
277
+ <code>string</code>query specification with HTML escape sequences and line breaks removed</div>
278
+ </div></div>
279
+ </div>
280
  <a name="_sanitize_query_specification" id="_sanitize_query_specification"></a><div class="element clickable method private _sanitize_query_specification" data-toggle="collapse" data-target="._sanitize_query_specification .collapse">
281
  <h2>Cleans up damage caused by the Visual Editor to the tax_query and meta_query specifications</h2>
282
  <pre>_sanitize_query_specification(string $specification) : string</pre>
443
  <div class="row"><footer class="span12">
444
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
445
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
446
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
447
  </div>
448
  </body>
449
  </html>
phpDocs/classes/MLATest.html CHANGED
@@ -160,7 +160,7 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
160
  <div class="row"><footer class="span12">
161
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
162
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
163
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
164
  </div>
165
  </body>
166
  </html>
160
  <div class="row"><footer class="span12">
161
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
162
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
163
+ generated on 2013-06-18T20:20:00-07:00.<br></footer></div>
164
  </div>
165
  </body>
166
  </html>
phpDocs/classes/MLA_List_Table.html CHANGED
@@ -55,6 +55,7 @@
55
  <li class="method public "><a href="#__construct" title="__construct :: Initializes some properties from $_REQUEST vairables, then
56
  calls the parent constructor to set some default configs."><span class="description">Initializes some properties from $_REQUEST vairables, then
57
  calls the parent constructor to set some default configs.</span><pre>__construct()</pre></a></li>
 
58
  <li class="method public "><a href="#column_ID_parent" title="column_ID_parent :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_ID_parent()</pre></a></li>
59
  <li class="method public "><a href="#column_alt_text" title="column_alt_text :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_alt_text()</pre></a></li>
60
  <li class="method public "><a href="#column_attached_to" title="column_attached_to :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_attached_to()</pre></a></li>
@@ -89,8 +90,7 @@ from default values if the option is not set</span><pre>get_hidden_columns()</pr
89
  and the value is db column to sort by."><span class="description">Returns an array where the key is the column that needs to be sortable
90
  and the value is db column to sort by.</span><pre>get_sortable_columns()</pre></a></li>
91
  <li class="method public "><a href="#get_views" title="get_views :: Returns an associative array listing all the views that can be used with this table."><span class="description">Returns an associative array listing all the views that can be used with this table.</span><pre>get_views()</pre></a></li>
92
- <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Adds support for taxonomy columns"><span class="description">Adds support for taxonomy columns</span><pre>mla_admin_init_action()</pre></a></li>
93
- <li class="method public "><a href="#mla_get_attachment_mime_types" title="mla_get_attachment_mime_types :: Get possible mime types for view preparation"><span class="description">Get possible mime types for view preparation</span><pre>mla_get_attachment_mime_types()</pre></a></li>
94
  <li class="method public "><a href="#mla_get_sortable_columns" title="mla_get_sortable_columns :: Return the names and display values of the sortable columns"><span class="description">Return the names and display values of the sortable columns</span><pre>mla_get_sortable_columns()</pre></a></li>
95
  <li class="method public "><a href="#mla_get_taxonomy_filter_dropdown" title="mla_get_taxonomy_filter_dropdown :: Get dropdown box of terms to filter by, if available"><span class="description">Get dropdown box of terms to filter by, if available</span><pre>mla_get_taxonomy_filter_dropdown()</pre></a></li>
96
  <li class="method public "><a href="#mla_manage_columns_filter" title="mla_manage_columns_filter :: Handler for filter 'manage_media_page_mla-menu_columns'"><span class="description">Handler for filter 'manage_media_page_mla-menu_columns'</span><pre>mla_manage_columns_filter()</pre></a></li>
@@ -98,7 +98,7 @@ and the value is db column to sort by.</span><pre>get_sortable_columns()</pre></
98
  <li class="method public "><a href="#prepare_items" title="prepare_items :: Prepares the list of items for displaying"><span class="description">Prepares the list of items for displaying</span><pre>prepare_items()</pre></a></li>
99
  <li class="method public "><a href="#single_row" title="single_row :: Generates (echoes) content for a single row of the table"><span class="description">Generates (echoes) content for a single row of the table</span><pre>single_row()</pre></a></li>
100
  <li class="nav-header private">» Private</li>
101
- <li class="method private "><a href="#_avail_mime_types" title="_avail_mime_types :: Get mime types with one or more attachments for view preparation"><span class="description">Get mime types with one or more attachments for view preparation</span><pre>_avail_mime_types()</pre></a></li>
102
  <li class="method private "><a href="#_build_inline_data" title="_build_inline_data :: Add hidden fields with the data for use in the inline editor"><span class="description">Add hidden fields with the data for use in the inline editor</span><pre>_build_inline_data()</pre></a></li>
103
  <li class="method private "><a href="#_build_rollover_actions" title="_build_rollover_actions :: Add rollover actions to exactly one of the following displayed columns:
104
  'ID_parent', 'title_name', 'post_title', 'post_name'"><span class="description">Add rollover actions to exactly one of the following displayed columns:
@@ -153,6 +153,28 @@ calls the parent constructor to set some default configs.</h2>
153
  </tr></table>
154
  </div></div>
155
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  <a name="column_ID_parent" id="column_ID_parent"></a><div class="element clickable method public column_ID_parent" data-toggle="collapse" data-target=".column_ID_parent .collapse">
157
  <h2>Supply the content for a custom column</h2>
158
  <pre>column_ID_parent(array $item) : string</pre>
@@ -319,9 +341,9 @@ is given special treatment when columns are processed.</p></p>
319
  <pre>column_default(array $item, array $column_name) : string</pre>
320
  <div class="labels"></div>
321
  <div class="row collapse"><div class="detail-description">
322
- <p class="long_description"><p>Called when the parent class can't find a method specifically built for a
323
- given column. The taxonomy columns are handled here. All other columns should
324
- have a specific method, so this function returns a troubleshooting message.</p></p>
325
  <table class="table table-bordered"><tr>
326
  <th>since</th>
327
  <td>0.1</td>
@@ -700,7 +722,7 @@ if set.</p></p>
700
  </div></div>
701
  </div>
702
  <a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
703
- <h2>Adds support for taxonomy columns</h2>
704
  <pre>mla_admin_init_action() : void</pre>
705
  <div class="labels"></div>
706
  <div class="row collapse"><div class="detail-description">
@@ -712,22 +734,6 @@ created in time to affect the "screen options" setup.</p></p>
712
  </tr></table>
713
  </div></div>
714
  </div>
715
- <a name="mla_get_attachment_mime_types" id="mla_get_attachment_mime_types"></a><div class="element clickable method public mla_get_attachment_mime_types" data-toggle="collapse" data-target=".mla_get_attachment_mime_types .collapse">
716
- <h2>Get possible mime types for view preparation</h2>
717
- <pre>mla_get_attachment_mime_types() : array</pre>
718
- <div class="labels"></div>
719
- <div class="row collapse"><div class="detail-description">
720
- <p class="long_description"><p>Modeled after get_post_mime_types in wp-includes/post.php,
721
- with additional entries.</p></p>
722
- <table class="table table-bordered"><tr>
723
- <th>since</th>
724
- <td>0.1</td>
725
- </tr></table>
726
- <h3>Returns</h3>
727
- <div class="subelement response">
728
- <code>array</code>Mime type names and HTML markup for views</div>
729
- </div></div>
730
- </div>
731
  <a name="mla_get_sortable_columns" id="mla_get_sortable_columns"></a><div class="element clickable method public mla_get_sortable_columns" data-toggle="collapse" data-target=".mla_get_sortable_columns .collapse">
732
  <h2>Return the names and display values of the sortable columns</h2>
733
  <pre>mla_get_sortable_columns() : array</pre>
@@ -840,12 +846,12 @@ $this->set_pagination_args().</p></p>
840
  </div></div>
841
  </div>
842
  <a name="_avail_mime_types" id="_avail_mime_types"></a><div class="element clickable method private _avail_mime_types" data-toggle="collapse" data-target="._avail_mime_types .collapse">
843
- <h2>Get mime types with one or more attachments for view preparation</h2>
844
  <pre>_avail_mime_types(array $num_posts) : array</pre>
845
  <div class="labels"></div>
846
  <div class="row collapse"><div class="detail-description">
847
  <p class="long_description"><p>Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
848
- with additional entries.</p></p>
849
  <table class="table table-bordered"><tr>
850
  <th>since</th>
851
  <td>0.1</td>
@@ -853,7 +859,7 @@ with additional entries.</p></p>
853
  <h3>Parameters</h3>
854
  <div class="subelement argument">
855
  <h4>$num_posts</h4>
856
- <code>array</code><p>Number of posts for each mime type</p></div>
857
  <h3>Returns</h3>
858
  <div class="subelement response">
859
  <code>array</code>Mime type names</div>
@@ -1012,7 +1018,7 @@ Custom field columns are added to this array by mla_admin_init_action.</p></p>
1012
  <div class="row"><footer class="span12">
1013
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1014
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1015
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
1016
  </div>
1017
  </body>
1018
  </html>
55
  <li class="method public "><a href="#__construct" title="__construct :: Initializes some properties from $_REQUEST vairables, then
56
  calls the parent constructor to set some default configs."><span class="description">Initializes some properties from $_REQUEST vairables, then
57
  calls the parent constructor to set some default configs.</span><pre>__construct()</pre></a></li>
58
+ <li class="method public "><a href="#_get_view" title="_get_view :: Returns HTML markup for one view that can be used with this table"><span class="description">Returns HTML markup for one view that can be used with this table</span><pre>_get_view()</pre></a></li>
59
  <li class="method public "><a href="#column_ID_parent" title="column_ID_parent :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_ID_parent()</pre></a></li>
60
  <li class="method public "><a href="#column_alt_text" title="column_alt_text :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_alt_text()</pre></a></li>
61
  <li class="method public "><a href="#column_attached_to" title="column_attached_to :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_attached_to()</pre></a></li>
90
  and the value is db column to sort by."><span class="description">Returns an array where the key is the column that needs to be sortable
91
  and the value is db column to sort by.</span><pre>get_sortable_columns()</pre></a></li>
92
  <li class="method public "><a href="#get_views" title="get_views :: Returns an associative array listing all the views that can be used with this table."><span class="description">Returns an associative array listing all the views that can be used with this table.</span><pre>get_views()</pre></a></li>
93
+ <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Adds support for taxonomy and custom field columns"><span class="description">Adds support for taxonomy and custom field columns</span><pre>mla_admin_init_action()</pre></a></li>
 
94
  <li class="method public "><a href="#mla_get_sortable_columns" title="mla_get_sortable_columns :: Return the names and display values of the sortable columns"><span class="description">Return the names and display values of the sortable columns</span><pre>mla_get_sortable_columns()</pre></a></li>
95
  <li class="method public "><a href="#mla_get_taxonomy_filter_dropdown" title="mla_get_taxonomy_filter_dropdown :: Get dropdown box of terms to filter by, if available"><span class="description">Get dropdown box of terms to filter by, if available</span><pre>mla_get_taxonomy_filter_dropdown()</pre></a></li>
96
  <li class="method public "><a href="#mla_manage_columns_filter" title="mla_manage_columns_filter :: Handler for filter 'manage_media_page_mla-menu_columns'"><span class="description">Handler for filter 'manage_media_page_mla-menu_columns'</span><pre>mla_manage_columns_filter()</pre></a></li>
98
  <li class="method public "><a href="#prepare_items" title="prepare_items :: Prepares the list of items for displaying"><span class="description">Prepares the list of items for displaying</span><pre>prepare_items()</pre></a></li>
99
  <li class="method public "><a href="#single_row" title="single_row :: Generates (echoes) content for a single row of the table"><span class="description">Generates (echoes) content for a single row of the table</span><pre>single_row()</pre></a></li>
100
  <li class="nav-header private">» Private</li>
101
+ <li class="method private "><a href="#_avail_mime_types" title="_avail_mime_types :: Get MIME types with one or more attachments for view preparation"><span class="description">Get MIME types with one or more attachments for view preparation</span><pre>_avail_mime_types()</pre></a></li>
102
  <li class="method private "><a href="#_build_inline_data" title="_build_inline_data :: Add hidden fields with the data for use in the inline editor"><span class="description">Add hidden fields with the data for use in the inline editor</span><pre>_build_inline_data()</pre></a></li>
103
  <li class="method private "><a href="#_build_rollover_actions" title="_build_rollover_actions :: Add rollover actions to exactly one of the following displayed columns:
104
  'ID_parent', 'title_name', 'post_title', 'post_name'"><span class="description">Add rollover actions to exactly one of the following displayed columns:
153
  </tr></table>
154
  </div></div>
155
  </div>
156
+ <a name="_get_view" id="_get_view"></a><div class="element clickable method public _get_view" data-toggle="collapse" data-target="._get_view .collapse">
157
+ <h2>Returns HTML markup for one view that can be used with this table</h2>
158
+ <pre>_get_view(string $view_slug, string $current_view) : string</pre>
159
+ <div class="labels"></div>
160
+ <div class="row collapse"><div class="detail-description">
161
+ <p class="long_description"></p>
162
+ <table class="table table-bordered"><tr>
163
+ <th>since</th>
164
+ <td>1.40</td>
165
+ </tr></table>
166
+ <h3>Parameters</h3>
167
+ <div class="subelement argument">
168
+ <h4>$view_slug</h4>
169
+ <code>string</code><p>View slug, key to MLA_POST_MIME_TYPES array</p></div>
170
+ <div class="subelement argument">
171
+ <h4>$current_view</h4>
172
+ <code>string</code><p>Slug for current view</p></div>
173
+ <h3>Returns</h3>
174
+ <div class="subelement response">
175
+ <code>string</code>| false HTML for link to display the view, false if count = zero</div>
176
+ </div></div>
177
+ </div>
178
  <a name="column_ID_parent" id="column_ID_parent"></a><div class="element clickable method public column_ID_parent" data-toggle="collapse" data-target=".column_ID_parent .collapse">
179
  <h2>Supply the content for a custom column</h2>
180
  <pre>column_ID_parent(array $item) : string</pre>
341
  <pre>column_default(array $item, array $column_name) : string</pre>
342
  <div class="labels"></div>
343
  <div class="row collapse"><div class="detail-description">
344
+ <p class="long_description"><p>Called when the parent class can't find a method specifically built for a given column.
345
+ The taxonomy and custom field columns are handled here. All other columns should have
346
+ a specific method, so this function returns a troubleshooting message.</p></p>
347
  <table class="table table-bordered"><tr>
348
  <th>since</th>
349
  <td>0.1</td>
722
  </div></div>
723
  </div>
724
  <a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
725
+ <h2>Adds support for taxonomy and custom field columns</h2>
726
  <pre>mla_admin_init_action() : void</pre>
727
  <div class="labels"></div>
728
  <div class="row collapse"><div class="detail-description">
734
  </tr></table>
735
  </div></div>
736
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
737
  <a name="mla_get_sortable_columns" id="mla_get_sortable_columns"></a><div class="element clickable method public mla_get_sortable_columns" data-toggle="collapse" data-target=".mla_get_sortable_columns .collapse">
738
  <h2>Return the names and display values of the sortable columns</h2>
739
  <pre>mla_get_sortable_columns() : array</pre>
846
  </div></div>
847
  </div>
848
  <a name="_avail_mime_types" id="_avail_mime_types"></a><div class="element clickable method private _avail_mime_types" data-toggle="collapse" data-target="._avail_mime_types .collapse">
849
+ <h2>Get MIME types with one or more attachments for view preparation</h2>
850
  <pre>_avail_mime_types(array $num_posts) : array</pre>
851
  <div class="labels"></div>
852
  <div class="row collapse"><div class="detail-description">
853
  <p class="long_description"><p>Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
854
+ but uses the output of wp_count_attachments() as input.</p></p>
855
  <table class="table table-bordered"><tr>
856
  <th>since</th>
857
  <td>0.1</td>
859
  <h3>Parameters</h3>
860
  <div class="subelement argument">
861
  <h4>$num_posts</h4>
862
+ <code>array</code><p>Number of posts for each MIME type</p></div>
863
  <h3>Returns</h3>
864
  <div class="subelement response">
865
  <code>array</code>Mime type names</div>
1018
  <div class="row"><footer class="span12">
1019
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
1020
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
1021
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
1022
  </div>
1023
  </body>
1024
  </html>
phpDocs/classes/MLA_Upload_List_Table.html ADDED
@@ -0,0 +1,721 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
5
+ <meta charset="utf-8">
6
+ <title>Media Library Assistant » \MLA_Upload_List_Table</title>
7
+ <meta name="author" content="Mike van Riel">
8
+ <meta name="description" content="">
9
+ <link href="../css/template.css" rel="stylesheet" media="all">
10
+ <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
11
+ <link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
12
+ <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
13
+ <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
14
+ </head>
15
+ <body>
16
+ <div class="navbar navbar-fixed-top">
17
+ <div class="navbar-inner"><div class="container">
18
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Media Library Assistant</a><div class="nav-collapse"><ul class="nav">
19
+ <li class="dropdown">
20
+ <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
21
+ API Documentation <b class="caret"></b></a><ul class="dropdown-menu"></ul>
22
+ </li>
23
+ <li class="dropdown" id="charts-menu">
24
+ <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
25
+ Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
26
+ </li>
27
+ <li class="dropdown" id="reports-menu">
28
+ <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
29
+ Reports <b class="caret"></b></a><ul class="dropdown-menu">
30
+ <li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
31
+ <span class="label label-info">0</span></a></li>
32
+ <li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
33
+ <ul></ul></a></li>
34
+ <li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
35
+ <span class="label label-info">0</span></a></li>
36
+ </ul>
37
+ </li>
38
+ </ul></div>
39
+ </div></div>
40
+ <div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
41
+ </div>
42
+ <div id="___" class="container">
43
+ <noscript><div class="alert alert-warning">
44
+ Javascript is disabled; several features are only available
45
+ if Javascript is enabled.
46
+ </div></noscript>
47
+ <div class="row">
48
+ <div class="span4">
49
+ <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
50
+ <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
51
+ </div>
52
+ <ul class="side-nav nav nav-list">
53
+ <li class="nav-header">
54
+ <i class="icon-custom icon-method"></i> Methods</li>
55
+ <li class="method public "><a href="#__construct" title="__construct :: Initializes some properties from $_REQUEST variables, then
56
+ calls the parent constructor to set some default configs."><span class="description">Initializes some properties from $_REQUEST variables, then
57
+ calls the parent constructor to set some default configs.</span><pre>__construct()</pre></a></li>
58
+ <li class="method public "><a href="#_get_view" title="_get_view :: Returns HTML markup for one view that can be used with this table"><span class="description">Returns HTML markup for one view that can be used with this table</span><pre>_get_view()</pre></a></li>
59
+ <li class="method public "><a href="#column_cb" title="column_cb :: Displays checkboxes for using bulk actions."><span class="description">Displays checkboxes for using bulk actions.</span><pre>column_cb()</pre></a></li>
60
+ <li class="method public "><a href="#column_core_icon_type" title="column_core_icon_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_core_icon_type()</pre></a></li>
61
+ <li class="method public "><a href="#column_core_type" title="column_core_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_core_type()</pre></a></li>
62
+ <li class="method public "><a href="#column_default" title="column_default :: Supply a column value if no column-specific function has been defined"><span class="description">Supply a column value if no column-specific function has been defined</span><pre>column_default()</pre></a></li>
63
+ <li class="method public "><a href="#column_description" title="column_description :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_description()</pre></a></li>
64
+ <li class="method public "><a href="#column_icon" title="column_icon :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_icon()</pre></a></li>
65
+ <li class="method public "><a href="#column_icon_type" title="column_icon_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_icon_type()</pre></a></li>
66
+ <li class="method public "><a href="#column_mime_type" title="column_mime_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_mime_type()</pre></a></li>
67
+ <li class="method public "><a href="#column_mla_type" title="column_mla_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_mla_type()</pre></a></li>
68
+ <li class="method public "><a href="#column_name" title="column_name :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_name()</pre></a></li>
69
+ <li class="method public "><a href="#column_source" title="column_source :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_source()</pre></a></li>
70
+ <li class="method public "><a href="#column_standard_source" title="column_standard_source :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_standard_source()</pre></a></li>
71
+ <li class="method public "><a href="#column_status" title="column_status :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_status()</pre></a></li>
72
+ <li class="method public "><a href="#get_bulk_actions" title="get_bulk_actions :: Get an associative array ( option_name =&gt; option_title ) with the list
73
+ of bulk actions available on this table."><span class="description">Get an associative array ( option_name =&gt; option_title ) with the list
74
+ of bulk actions available on this table.</span><pre>get_bulk_actions()</pre></a></li>
75
+ <li class="method public "><a href="#get_columns" title="get_columns :: This method dictates the table's columns and titles"><span class="description">This method dictates the table's columns and titles</span><pre>get_columns()</pre></a></li>
76
+ <li class="method public "><a href="#get_hidden_columns" title="get_hidden_columns :: Returns the list of currently hidden columns from a user option or
77
+ from default values if the option is not set"><span class="description">Returns the list of currently hidden columns from a user option or
78
+ from default values if the option is not set</span><pre>get_hidden_columns()</pre></a></li>
79
+ <li class="method public "><a href="#get_sortable_columns" title="get_sortable_columns :: Returns an array where the key is the column that needs to be sortable
80
+ and the value is db column to sort by."><span class="description">Returns an array where the key is the column that needs to be sortable
81
+ and the value is db column to sort by.</span><pre>get_sortable_columns()</pre></a></li>
82
+ <li class="method public "><a href="#get_views" title="get_views :: Returns an associative array listing all the views that can be used with this table."><span class="description">Returns an associative array listing all the views that can be used with this table.</span><pre>get_views()</pre></a></li>
83
+ <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Called in the admin_init action because the list_table object isn't
84
+ created in time to affect the &quot;screen options&quot; setup."><span class="description">Called in the admin_init action because the list_table object isn't
85
+ created in time to affect the "screen options" setup.</span><pre>mla_admin_init_action()</pre></a></li>
86
+ <li class="method public "><a href="#mla_get_sortable_columns" title="mla_get_sortable_columns :: Return the names and display values of the sortable columns"><span class="description">Return the names and display values of the sortable columns</span><pre>mla_get_sortable_columns()</pre></a></li>
87
+ <li class="method public "><a href="#mla_manage_columns_filter" title="mla_manage_columns_filter :: Handler for filter 'manage_settings_page_mla-settings-menu_columns'"><span class="description">Handler for filter 'manage_settings_page_mla-settings-menu_columns'</span><pre>mla_manage_columns_filter()</pre></a></li>
88
+ <li class="method public "><a href="#mla_manage_hidden_columns_filter" title="mla_manage_hidden_columns_filter :: Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-uploadcolumnshidden'"><span class="description">Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-uploadcolumnshidden'</span><pre>mla_manage_hidden_columns_filter()</pre></a></li>
89
+ <li class="method public "><a href="#prepare_items" title="prepare_items :: Prepares the list of items for displaying"><span class="description">Prepares the list of items for displaying</span><pre>prepare_items()</pre></a></li>
90
+ <li class="method public "><a href="#single_row" title="single_row :: Generates (echoes) content for a single row of the table"><span class="description">Generates (echoes) content for a single row of the table</span><pre>single_row()</pre></a></li>
91
+ <li class="nav-header private">» Private</li>
92
+ <li class="method private "><a href="#_build_inline_data" title="_build_inline_data :: Add hidden fields with the data for use in the inline editor"><span class="description">Add hidden fields with the data for use in the inline editor</span><pre>_build_inline_data()</pre></a></li>
93
+ <li class="method private "><a href="#_build_rollover_actions" title="_build_rollover_actions :: Add rollover actions to a table column"><span class="description">Add rollover actions to a table column</span><pre>_build_rollover_actions()</pre></a></li>
94
+ <li class="method private "><a href="#_default_hidden_columns" title="_default_hidden_columns :: Access the default list of hidden columns"><span class="description">Access the default list of hidden columns</span><pre>_default_hidden_columns()</pre></a></li>
95
+ <li class="nav-header">
96
+ <i class="icon-custom icon-property"></i> Properties</li>
97
+ <li class="nav-header private">» Private</li>
98
+ <li class="property private "><a href="#%24default_columns" title="$default_columns :: Table column definitions"><span class="description">Table column definitions</span><pre>$default_columns</pre></a></li>
99
+ <li class="property private "><a href="#%24default_hidden_columns" title="$default_hidden_columns :: Default values for hidden columns"><span class="description">Default values for hidden columns</span><pre>$default_hidden_columns</pre></a></li>
100
+ <li class="property private "><a href="#%24default_sortable_columns" title="$default_sortable_columns :: Sortable column definitions"><span class="description">Sortable column definitions</span><pre>$default_sortable_columns</pre></a></li>
101
+ </ul>
102
+ </div>
103
+ <div class="span8">
104
+ <a name="%5CMLA_Upload_List_Table" id="\MLA_Upload_List_Table"></a><ul class="breadcrumb">
105
+ <li>
106
+ <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
107
+ </li>
108
+ <li><a href="../namespaces/global.html">global</a></li>
109
+ <li class="active">
110
+ <span class="divider">\</span><a href="../classes/MLA_Upload_List_Table.html">MLA_Upload_List_Table</a>
111
+ </li>
112
+ </ul>
113
+ <div href="../classes/MLA_Upload_List_Table.html" class="element class">
114
+ <p class="short_description">Class MLA (Media Library Assistant) Upload List Table implements the "Upload" admin settings tab</p>
115
+ <div class="details">
116
+ <p class="long_description"><p>Extends the core WP_List_Table class.</p></p>
117
+ <table class="table table-bordered">
118
+ <tr>
119
+ <th>package</th>
120
+ <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
121
+ </tr>
122
+ <tr>
123
+ <th>since</th>
124
+ <td>1.40</td>
125
+ </tr>
126
+ </table>
127
+ <h3>
128
+ <i class="icon-custom icon-method"></i> Methods</h3>
129
+ <a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
130
+ <h2>Initializes some properties from $_REQUEST variables, then
131
+ calls the parent constructor to set some default configs.</h2>
132
+ <pre>__construct() : void</pre>
133
+ <div class="labels"></div>
134
+ <div class="row collapse"><div class="detail-description">
135
+ <p class="long_description"></p>
136
+ <table class="table table-bordered"><tr>
137
+ <th>since</th>
138
+ <td>1.40</td>
139
+ </tr></table>
140
+ </div></div>
141
+ </div>
142
+ <a name="_get_view" id="_get_view"></a><div class="element clickable method public _get_view" data-toggle="collapse" data-target="._get_view .collapse">
143
+ <h2>Returns HTML markup for one view that can be used with this table</h2>
144
+ <pre>_get_view(string $view_slug, array $upload_item, string $current_view) : string</pre>
145
+ <div class="labels"></div>
146
+ <div class="row collapse"><div class="detail-description">
147
+ <p class="long_description"></p>
148
+ <table class="table table-bordered"><tr>
149
+ <th>since</th>
150
+ <td>1.40</td>
151
+ </tr></table>
152
+ <h3>Parameters</h3>
153
+ <div class="subelement argument">
154
+ <h4>$view_slug</h4>
155
+ <code>string</code><p>View slug</p></div>
156
+ <div class="subelement argument">
157
+ <h4>$upload_item</h4>
158
+ <code>array</code><p>count and labels for the View</p></div>
159
+ <div class="subelement argument">
160
+ <h4>$current_view</h4>
161
+ <code>string</code><p>Slug for current view</p></div>
162
+ <h3>Returns</h3>
163
+ <div class="subelement response">
164
+ <code>string</code>| false HTML for link to display the view, false if count = zero</div>
165
+ </div></div>
166
+ </div>
167
+ <a name="column_cb" id="column_cb"></a><div class="element clickable method public column_cb" data-toggle="collapse" data-target=".column_cb .collapse">
168
+ <h2>Displays checkboxes for using bulk actions.</h2>
169
+ <pre>column_cb(object $item) : string</pre>
170
+ <div class="labels"></div>
171
+ <div class="row collapse"><div class="detail-description">
172
+ <p class="long_description"><p>The 'cb' column
173
+ is given special treatment when columns are processed.</p></p>
174
+ <table class="table table-bordered"><tr>
175
+ <th>since</th>
176
+ <td>1.40</td>
177
+ </tr></table>
178
+ <h3>Parameters</h3>
179
+ <div class="subelement argument">
180
+ <h4>$item</h4>
181
+ <code>object</code><p>An MLA upload_type object</p></div>
182
+ <h3>Returns</h3>
183
+ <div class="subelement response">
184
+ <code>string</code>HTML markup to be placed inside the column</div>
185
+ </div></div>
186
+ </div>
187
+ <a name="column_core_icon_type" id="column_core_icon_type"></a><div class="element clickable method public column_core_icon_type" data-toggle="collapse" data-target=".column_core_icon_type .collapse">
188
+ <h2>Supply the content for a custom column</h2>
189
+ <pre>column_core_icon_type(object $item) : string</pre>
190
+ <div class="labels"></div>
191
+ <div class="row collapse"><div class="detail-description">
192
+ <p class="long_description"></p>
193
+ <table class="table table-bordered"><tr>
194
+ <th>since</th>
195
+ <td>1.40</td>
196
+ </tr></table>
197
+ <h3>Parameters</h3>
198
+ <div class="subelement argument">
199
+ <h4>$item</h4>
200
+ <code>object</code><p>An MLA upload_type object</p></div>
201
+ <h3>Returns</h3>
202
+ <div class="subelement response">
203
+ <code>string</code>HTML markup to be placed inside the column</div>
204
+ </div></div>
205
+ </div>
206
+ <a name="column_core_type" id="column_core_type"></a><div class="element clickable method public column_core_type" data-toggle="collapse" data-target=".column_core_type .collapse">
207
+ <h2>Supply the content for a custom column</h2>
208
+ <pre>column_core_type(object $item) : string</pre>
209
+ <div class="labels"></div>
210
+ <div class="row collapse"><div class="detail-description">
211
+ <p class="long_description"></p>
212
+ <table class="table table-bordered"><tr>
213
+ <th>since</th>
214
+ <td>1.40</td>
215
+ </tr></table>
216
+ <h3>Parameters</h3>
217
+ <div class="subelement argument">
218
+ <h4>$item</h4>
219
+ <code>object</code><p>An MLA upload_type object</p></div>
220
+ <h3>Returns</h3>
221
+ <div class="subelement response">
222
+ <code>string</code>HTML markup to be placed inside the column</div>
223
+ </div></div>
224
+ </div>
225
+ <a name="column_default" id="column_default"></a><div class="element clickable method public column_default" data-toggle="collapse" data-target=".column_default .collapse">
226
+ <h2>Supply a column value if no column-specific function has been defined</h2>
227
+ <pre>column_default(array $item, array $column_name) : string</pre>
228
+ <div class="labels"></div>
229
+ <div class="row collapse"><div class="detail-description">
230
+ <p class="long_description"><p>Called when the parent class can't find a method specifically built for a
231
+ given column. All columns should have a specific method, so this function
232
+ returns a troubleshooting message.</p></p>
233
+ <table class="table table-bordered"><tr>
234
+ <th>since</th>
235
+ <td>1.40</td>
236
+ </tr></table>
237
+ <h3>Parameters</h3>
238
+ <div class="subelement argument">
239
+ <h4>$item</h4>
240
+ <code>array</code><p>A singular item (one full row's worth of data)</p>
241
+ </div>
242
+ <div class="subelement argument">
243
+ <h4>$column_name</h4>
244
+ <code>array</code><p>The name/slug of the column to be processed</p>
245
+ </div>
246
+ <h3>Returns</h3>
247
+ <div class="subelement response">
248
+ <code>string</code>Text or HTML to be placed inside the column</div>
249
+ </div></div>
250
+ </div>
251
+ <a name="column_description" id="column_description"></a><div class="element clickable method public column_description" data-toggle="collapse" data-target=".column_description .collapse">
252
+ <h2>Supply the content for a custom column</h2>
253
+ <pre>column_description(object $item) : string</pre>
254
+ <div class="labels"></div>
255
+ <div class="row collapse"><div class="detail-description">
256
+ <p class="long_description"></p>
257
+ <table class="table table-bordered"><tr>
258
+ <th>since</th>
259
+ <td>1.40</td>
260
+ </tr></table>
261
+ <h3>Parameters</h3>
262
+ <div class="subelement argument">
263
+ <h4>$item</h4>
264
+ <code>object</code><p>An MLA upload_type object</p></div>
265
+ <h3>Returns</h3>
266
+ <div class="subelement response">
267
+ <code>string</code>HTML markup to be placed inside the column</div>
268
+ </div></div>
269
+ </div>
270
+ <a name="column_icon" id="column_icon"></a><div class="element clickable method public column_icon" data-toggle="collapse" data-target=".column_icon .collapse">
271
+ <h2>Supply the content for a custom column</h2>
272
+ <pre>column_icon(array $item) : string</pre>
273
+ <div class="labels"></div>
274
+ <div class="row collapse"><div class="detail-description">
275
+ <p class="long_description"></p>
276
+ <table class="table table-bordered"><tr>
277
+ <th>since</th>
278
+ <td>0.1</td>
279
+ </tr></table>
280
+ <h3>Parameters</h3>
281
+ <div class="subelement argument">
282
+ <h4>$item</h4>
283
+ <code>array</code><p>A singular attachment (post) object</p>
284
+ </div>
285
+ <h3>Returns</h3>
286
+ <div class="subelement response">
287
+ <code>string</code>HTML markup to be placed inside the column</div>
288
+ </div></div>
289
+ </div>
290
+ <a name="column_icon_type" id="column_icon_type"></a><div class="element clickable method public column_icon_type" data-toggle="collapse" data-target=".column_icon_type .collapse">
291
+ <h2>Supply the content for a custom column</h2>
292
+ <pre>column_icon_type(object $item) : string</pre>
293
+ <div class="labels"></div>
294
+ <div class="row collapse"><div class="detail-description">
295
+ <p class="long_description"></p>
296
+ <table class="table table-bordered"><tr>
297
+ <th>since</th>
298
+ <td>1.40</td>
299
+ </tr></table>
300
+ <h3>Parameters</h3>
301
+ <div class="subelement argument">
302
+ <h4>$item</h4>
303
+ <code>object</code><p>An MLA upload_type object</p></div>
304
+ <h3>Returns</h3>
305
+ <div class="subelement response">
306
+ <code>string</code>HTML markup to be placed inside the column</div>
307
+ </div></div>
308
+ </div>
309
+ <a name="column_mime_type" id="column_mime_type"></a><div class="element clickable method public column_mime_type" data-toggle="collapse" data-target=".column_mime_type .collapse">
310
+ <h2>Supply the content for a custom column</h2>
311
+ <pre>column_mime_type(object $item) : string</pre>
312
+ <div class="labels"></div>
313
+ <div class="row collapse"><div class="detail-description">
314
+ <p class="long_description"></p>
315
+ <table class="table table-bordered"><tr>
316
+ <th>since</th>
317
+ <td>1.40</td>
318
+ </tr></table>
319
+ <h3>Parameters</h3>
320
+ <div class="subelement argument">
321
+ <h4>$item</h4>
322
+ <code>object</code><p>An MLA upload_type object</p></div>
323
+ <h3>Returns</h3>
324
+ <div class="subelement response">
325
+ <code>string</code>HTML markup to be placed inside the column</div>
326
+ </div></div>
327
+ </div>
328
+ <a name="column_mla_type" id="column_mla_type"></a><div class="element clickable method public column_mla_type" data-toggle="collapse" data-target=".column_mla_type .collapse">
329
+ <h2>Supply the content for a custom column</h2>
330
+ <pre>column_mla_type(object $item) : string</pre>
331
+ <div class="labels"></div>
332
+ <div class="row collapse"><div class="detail-description">
333
+ <p class="long_description"></p>
334
+ <table class="table table-bordered"><tr>
335
+ <th>since</th>
336
+ <td>1.40</td>
337
+ </tr></table>
338
+ <h3>Parameters</h3>
339
+ <div class="subelement argument">
340
+ <h4>$item</h4>
341
+ <code>object</code><p>An MLA upload_type object</p></div>
342
+ <h3>Returns</h3>
343
+ <div class="subelement response">
344
+ <code>string</code>HTML markup to be placed inside the column</div>
345
+ </div></div>
346
+ </div>
347
+ <a name="column_name" id="column_name"></a><div class="element clickable method public column_name" data-toggle="collapse" data-target=".column_name .collapse">
348
+ <h2>Supply the content for a custom column</h2>
349
+ <pre>column_name(object $item) : string</pre>
350
+ <div class="labels"></div>
351
+ <div class="row collapse"><div class="detail-description">
352
+ <p class="long_description"></p>
353
+ <table class="table table-bordered"><tr>
354
+ <th>since</th>
355
+ <td>1.40</td>
356
+ </tr></table>
357
+ <h3>Parameters</h3>
358
+ <div class="subelement argument">
359
+ <h4>$item</h4>
360
+ <code>object</code><p>An MLA upload_type object</p></div>
361
+ <h3>Returns</h3>
362
+ <div class="subelement response">
363
+ <code>string</code>HTML markup to be placed inside the column</div>
364
+ </div></div>
365
+ </div>
366
+ <a name="column_source" id="column_source"></a><div class="element clickable method public column_source" data-toggle="collapse" data-target=".column_source .collapse">
367
+ <h2>Supply the content for a custom column</h2>
368
+ <pre>column_source(object $item) : string</pre>
369
+ <div class="labels"></div>
370
+ <div class="row collapse"><div class="detail-description">
371
+ <p class="long_description"></p>
372
+ <table class="table table-bordered"><tr>
373
+ <th>since</th>
374
+ <td>1.40</td>
375
+ </tr></table>
376
+ <h3>Parameters</h3>
377
+ <div class="subelement argument">
378
+ <h4>$item</h4>
379
+ <code>object</code><p>An MLA upload_type object</p></div>
380
+ <h3>Returns</h3>
381
+ <div class="subelement response">
382
+ <code>string</code>HTML markup to be placed inside the column</div>
383
+ </div></div>
384
+ </div>
385
+ <a name="column_standard_source" id="column_standard_source"></a><div class="element clickable method public column_standard_source" data-toggle="collapse" data-target=".column_standard_source .collapse">
386
+ <h2>Supply the content for a custom column</h2>
387
+ <pre>column_standard_source(object $item) : string</pre>
388
+ <div class="labels"></div>
389
+ <div class="row collapse"><div class="detail-description">
390
+ <p class="long_description"></p>
391
+ <table class="table table-bordered"><tr>
392
+ <th>since</th>
393
+ <td>1.40</td>
394
+ </tr></table>
395
+ <h3>Parameters</h3>
396
+ <div class="subelement argument">
397
+ <h4>$item</h4>
398
+ <code>object</code><p>An MLA upload_type object</p></div>
399
+ <h3>Returns</h3>
400
+ <div class="subelement response">
401
+ <code>string</code>HTML markup to be placed inside the column</div>
402
+ </div></div>
403
+ </div>
404
+ <a name="column_status" id="column_status"></a><div class="element clickable method public column_status" data-toggle="collapse" data-target=".column_status .collapse">
405
+ <h2>Supply the content for a custom column</h2>
406
+ <pre>column_status(object $item) : string</pre>
407
+ <div class="labels"></div>
408
+ <div class="row collapse"><div class="detail-description">
409
+ <p class="long_description"></p>
410
+ <table class="table table-bordered"><tr>
411
+ <th>since</th>
412
+ <td>1.40</td>
413
+ </tr></table>
414
+ <h3>Parameters</h3>
415
+ <div class="subelement argument">
416
+ <h4>$item</h4>
417
+ <code>object</code><p>An MLA upload_type object</p></div>
418
+ <h3>Returns</h3>
419
+ <div class="subelement response">
420
+ <code>string</code>HTML markup to be placed inside the column</div>
421
+ </div></div>
422
+ </div>
423
+ <a name="get_bulk_actions" id="get_bulk_actions"></a><div class="element clickable method public get_bulk_actions" data-toggle="collapse" data-target=".get_bulk_actions .collapse">
424
+ <h2>Get an associative array ( option_name =&gt; option_title ) with the list
425
+ of bulk actions available on this table.</h2>
426
+ <pre>get_bulk_actions() : array</pre>
427
+ <div class="labels"></div>
428
+ <div class="row collapse"><div class="detail-description">
429
+ <p class="long_description"></p>
430
+ <table class="table table-bordered"><tr>
431
+ <th>since</th>
432
+ <td>1.40</td>
433
+ </tr></table>
434
+ <h3>Returns</h3>
435
+ <div class="subelement response">
436
+ <code>array</code>Contains all the bulk actions: 'slugs'=>'Visible Titles'</div>
437
+ </div></div>
438
+ </div>
439
+ <a name="get_columns" id="get_columns"></a><div class="element clickable method public get_columns" data-toggle="collapse" data-target=".get_columns .collapse">
440
+ <h2>This method dictates the table's columns and titles</h2>
441
+ <pre>get_columns() : array</pre>
442
+ <div class="labels"></div>
443
+ <div class="row collapse"><div class="detail-description">
444
+ <p class="long_description"></p>
445
+ <table class="table table-bordered"><tr>
446
+ <th>since</th>
447
+ <td>1.40</td>
448
+ </tr></table>
449
+ <h3>Returns</h3>
450
+ <div class="subelement response">
451
+ <code>array</code>Column information: 'slugs'=>'Visible Titles'</div>
452
+ </div></div>
453
+ </div>
454
+ <a name="get_hidden_columns" id="get_hidden_columns"></a><div class="element clickable method public get_hidden_columns" data-toggle="collapse" data-target=".get_hidden_columns .collapse">
455
+ <h2>Returns the list of currently hidden columns from a user option or
456
+ from default values if the option is not set</h2>
457
+ <pre>get_hidden_columns() : array</pre>
458
+ <div class="labels"></div>
459
+ <div class="row collapse"><div class="detail-description">
460
+ <p class="long_description"></p>
461
+ <table class="table table-bordered"><tr>
462
+ <th>since</th>
463
+ <td>1.40</td>
464
+ </tr></table>
465
+ <h3>Returns</h3>
466
+ <div class="subelement response">
467
+ <code>array</code>Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')</div>
468
+ </div></div>
469
+ </div>
470
+ <a name="get_sortable_columns" id="get_sortable_columns"></a><div class="element clickable method public get_sortable_columns" data-toggle="collapse" data-target=".get_sortable_columns .collapse">
471
+ <h2>Returns an array where the key is the column that needs to be sortable
472
+ and the value is db column to sort by.</h2>
473
+ <pre>get_sortable_columns() : array</pre>
474
+ <div class="labels"></div>
475
+ <div class="row collapse"><div class="detail-description">
476
+ <p class="long_description"><p>Also notes the current sort column,
477
+ if set.</p></p>
478
+ <table class="table table-bordered"><tr>
479
+ <th>since</th>
480
+ <td>1.40</td>
481
+ </tr></table>
482
+ <h3>Returns</h3>
483
+ <div class="subelement response">
484
+ <code>array</code>Sortable column information,e.g., 'slugs'=>array('data_values',boolean)</div>
485
+ </div></div>
486
+ </div>
487
+ <a name="get_views" id="get_views"></a><div class="element clickable method public get_views" data-toggle="collapse" data-target=".get_views .collapse">
488
+ <h2>Returns an associative array listing all the views that can be used with this table.</h2>
489
+ <pre>get_views() : array</pre>
490
+ <div class="labels"></div>
491
+ <div class="row collapse"><div class="detail-description">
492
+ <p class="long_description"><p>These are listed across the top of the page and managed by WordPress.</p></p>
493
+ <table class="table table-bordered"><tr>
494
+ <th>since</th>
495
+ <td>1.40</td>
496
+ </tr></table>
497
+ <h3>Returns</h3>
498
+ <div class="subelement response">
499
+ <code>array</code>View information,e.g., array ( id => link )</div>
500
+ </div></div>
501
+ </div>
502
+ <a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
503
+ <h2>Called in the admin_init action because the list_table object isn't
504
+ created in time to affect the "screen options" setup.</h2>
505
+ <pre>mla_admin_init_action() : void</pre>
506
+ <div class="labels"></div>
507
+ <div class="row collapse"><div class="detail-description">
508
+ <p class="long_description"></p>
509
+ <table class="table table-bordered"><tr>
510
+ <th>since</th>
511
+ <td>1.40</td>
512
+ </tr></table>
513
+ </div></div>
514
+ </div>
515
+ <a name="mla_get_sortable_columns" id="mla_get_sortable_columns"></a><div class="element clickable method public mla_get_sortable_columns" data-toggle="collapse" data-target=".mla_get_sortable_columns .collapse">
516
+ <h2>Return the names and display values of the sortable columns</h2>
517
+ <pre>mla_get_sortable_columns() : array</pre>
518
+ <div class="labels"></div>
519
+ <div class="row collapse"><div class="detail-description">
520
+ <p class="long_description"></p>
521
+ <table class="table table-bordered"><tr>
522
+ <th>since</th>
523
+ <td>1.40</td>
524
+ </tr></table>
525
+ <h3>Returns</h3>
526
+ <div class="subelement response">
527
+ <code>array</code>name => array( orderby value, heading ) for sortable columns</div>
528
+ </div></div>
529
+ </div>
530
+ <a name="mla_manage_columns_filter" id="mla_manage_columns_filter"></a><div class="element clickable method public mla_manage_columns_filter" data-toggle="collapse" data-target=".mla_manage_columns_filter .collapse">
531
+ <h2>Handler for filter 'manage_settings_page_mla-settings-menu_columns'</h2>
532
+ <pre>mla_manage_columns_filter() : array</pre>
533
+ <div class="labels"></div>
534
+ <div class="row collapse"><div class="detail-description">
535
+ <p class="long_description"><p>This required filter dictates the table's columns and titles. Set when the
536
+ file is loaded because the list_table object isn't created in time
537
+ to affect the "screen options" setup.</p></p>
538
+ <table class="table table-bordered"><tr>
539
+ <th>since</th>
540
+ <td>1.40</td>
541
+ </tr></table>
542
+ <h3>Returns</h3>
543
+ <div class="subelement response">
544
+ <code>array</code>list of table columns</div>
545
+ </div></div>
546
+ </div>
547
+ <a name="mla_manage_hidden_columns_filter" id="mla_manage_hidden_columns_filter"></a><div class="element clickable method public mla_manage_hidden_columns_filter" data-toggle="collapse" data-target=".mla_manage_hidden_columns_filter .collapse">
548
+ <h2>Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-uploadcolumnshidden'</h2>
549
+ <pre>mla_manage_hidden_columns_filter(mixed $result, string $option, object $user_data) : array</pre>
550
+ <div class="labels"></div>
551
+ <div class="row collapse"><div class="detail-description">
552
+ <p class="long_description"><p>Required because the screen.php get_hidden_columns function only uses
553
+ the get_user_option result. Set when the file is loaded because the object
554
+ is not created in time for the call from screen.php.</p></p>
555
+ <table class="table table-bordered"><tr>
556
+ <th>since</th>
557
+ <td>1.40</td>
558
+ </tr></table>
559
+ <h3>Parameters</h3>
560
+ <div class="subelement argument">
561
+ <h4>$result</h4>
562
+ <code>mixed</code><p>false or array with current list of hidden columns, if any</p></div>
563
+ <div class="subelement argument">
564
+ <h4>$option</h4>
565
+ <code>string</code><p>'managesettings_page_mla-settings-menucolumnshidden'</p>
566
+ </div>
567
+ <div class="subelement argument">
568
+ <h4>$user_data</h4>
569
+ <code>object</code><p>WP_User object, if logged in</p></div>
570
+ <h3>Returns</h3>
571
+ <div class="subelement response">
572
+ <code>array</code>updated list of hidden columns</div>
573
+ </div></div>
574
+ </div>
575
+ <a name="prepare_items" id="prepare_items"></a><div class="element clickable method public prepare_items" data-toggle="collapse" data-target=".prepare_items .collapse">
576
+ <h2>Prepares the list of items for displaying</h2>
577
+ <pre>prepare_items() : void</pre>
578
+ <div class="labels"></div>
579
+ <div class="row collapse"><div class="detail-description">
580
+ <p class="long_description"><p>This is where you prepare your data for display. This method will usually
581
+ be used to query the database, sort and filter the data, and generally
582
+ get it ready to be displayed. At a minimum, we should set $this->items and
583
+ $this->set_pagination_args().</p></p>
584
+ <table class="table table-bordered"><tr>
585
+ <th>since</th>
586
+ <td>1.40</td>
587
+ </tr></table>
588
+ </div></div>
589
+ </div>
590
+ <a name="single_row" id="single_row"></a><div class="element clickable method public single_row" data-toggle="collapse" data-target=".single_row .collapse">
591
+ <h2>Generates (echoes) content for a single row of the table</h2>
592
+ <pre>single_row(object $item) : void</pre>
593
+ <div class="labels"></div>
594
+ <div class="row collapse"><div class="detail-description">
595
+ <p class="long_description"></p>
596
+ <table class="table table-bordered"><tr>
597
+ <th>since</th>
598
+ <td>1.40</td>
599
+ </tr></table>
600
+ <h3>Parameters</h3>
601
+ <div class="subelement argument">
602
+ <h4>$item</h4>
603
+ <code>object</code><p>the current item</p></div>
604
+ </div></div>
605
+ </div>
606
+ <a name="_build_inline_data" id="_build_inline_data"></a><div class="element clickable method private _build_inline_data" data-toggle="collapse" data-target="._build_inline_data .collapse">
607
+ <h2>Add hidden fields with the data for use in the inline editor</h2>
608
+ <pre>_build_inline_data(object $item) : string</pre>
609
+ <div class="labels"></div>
610
+ <div class="row collapse"><div class="detail-description">
611
+ <p class="long_description"></p>
612
+ <table class="table table-bordered"><tr>
613
+ <th>since</th>
614
+ <td>1.40</td>
615
+ </tr></table>
616
+ <h3>Parameters</h3>
617
+ <div class="subelement argument">
618
+ <h4>$item</h4>
619
+ <code>object</code><p>An MLA upload_type object</p></div>
620
+ <h3>Returns</h3>
621
+ <div class="subelement response">
622
+ <code>string</code>HTML <div> with row data</div>
623
+ </div></div>
624
+ </div>
625
+ <a name="_build_rollover_actions" id="_build_rollover_actions"></a><div class="element clickable method private _build_rollover_actions" data-toggle="collapse" data-target="._build_rollover_actions .collapse">
626
+ <h2>Add rollover actions to a table column</h2>
627
+ <pre>_build_rollover_actions(object $item, string $column) : array</pre>
628
+ <div class="labels"></div>
629
+ <div class="row collapse"><div class="detail-description">
630
+ <p class="long_description"></p>
631
+ <table class="table table-bordered"><tr>
632
+ <th>since</th>
633
+ <td>1.40</td>
634
+ </tr></table>
635
+ <h3>Parameters</h3>
636
+ <div class="subelement argument">
637
+ <h4>$item</h4>
638
+ <code>object</code><p>An MLA upload_type object</p></div>
639
+ <div class="subelement argument">
640
+ <h4>$column</h4>
641
+ <code>string</code><p>Current column name</p></div>
642
+ <h3>Returns</h3>
643
+ <div class="subelement response">
644
+ <code>array</code>Names and URLs of row-level actions</div>
645
+ </div></div>
646
+ </div>
647
+ <a name="_default_hidden_columns" id="_default_hidden_columns"></a><div class="element clickable method private _default_hidden_columns" data-toggle="collapse" data-target="._default_hidden_columns .collapse">
648
+ <h2>Access the default list of hidden columns</h2>
649
+ <pre>_default_hidden_columns() : array</pre>
650
+ <div class="labels"></div>
651
+ <div class="row collapse"><div class="detail-description">
652
+ <p class="long_description"></p>
653
+ <table class="table table-bordered"><tr>
654
+ <th>since</th>
655
+ <td>1.40</td>
656
+ </tr></table>
657
+ <h3>Returns</h3>
658
+ <div class="subelement response">
659
+ <code>array</code>default list of hidden columns</div>
660
+ </div></div>
661
+ </div>
662
+ <h3>
663
+ <i class="icon-custom icon-property"></i> Properties</h3>
664
+ <a name="%24default_columns" id="$default_columns"> </a><div class="element clickable property private $default_columns" data-toggle="collapse" data-target=".$default_columns .collapse">
665
+ <h2>Table column definitions</h2>
666
+ <pre>$default_columns : array</pre>
667
+ <div class="labels"></div>
668
+ <div class="row collapse"><div class="detail-description">
669
+ <p class="long_description"><p>This array defines table columns and titles where the key is the column slug (and class)
670
+ and the value is the column's title text.</p></p>
671
+ <table class="table table-bordered"><tr>
672
+ <th>since</th>
673
+ <td>1.40</td>
674
+ </tr></table>
675
+ </div></div>
676
+ </div>
677
+ <a name="%24default_hidden_columns" id="$default_hidden_columns"> </a><div class="element clickable property private $default_hidden_columns" data-toggle="collapse" data-target=".$default_hidden_columns .collapse">
678
+ <h2>Default values for hidden columns</h2>
679
+ <pre>$default_hidden_columns : array</pre>
680
+ <div class="labels"></div>
681
+ <div class="row collapse"><div class="detail-description">
682
+ <p class="long_description"><p>This array is used when the user-level option is not set, i.e.,
683
+ the user has not altered the selection of hidden columns.</p>
684
+
685
+ <p>The value on the right-hand side must match the column slug, e.g.,
686
+ array(0 => 'ID_parent, 1 => 'title_name').</p></p>
687
+ <table class="table table-bordered"><tr>
688
+ <th>since</th>
689
+ <td>1.40</td>
690
+ </tr></table>
691
+ </div></div>
692
+ </div>
693
+ <a name="%24default_sortable_columns" id="$default_sortable_columns"> </a><div class="element clickable property private $default_sortable_columns" data-toggle="collapse" data-target=".$default_sortable_columns .collapse">
694
+ <h2>Sortable column definitions</h2>
695
+ <pre>$default_sortable_columns : array</pre>
696
+ <div class="labels"></div>
697
+ <div class="row collapse"><div class="detail-description">
698
+ <p class="long_description"><p>This array defines the table columns that can be sorted. The array key
699
+ is the column slug that needs to be sortable, and the value is database column
700
+ to sort by. Often, the key and value will be the same, but this is not always
701
+ the case (as the value is a column name from the database, not the list table).</p>
702
+
703
+ <p>The array value also contains a boolean which is 'true' if the data is currently
704
+ sorted by that column. This is computed each time the table is displayed.</p></p>
705
+ <table class="table table-bordered"><tr>
706
+ <th>since</th>
707
+ <td>1.40</td>
708
+ </tr></table>
709
+ </div></div>
710
+ </div>
711
+ </div>
712
+ </div>
713
+ </div>
714
+ </div>
715
+ <div class="row"><footer class="span12">
716
+ Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
717
+ Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
718
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
719
+ </div>
720
+ </body>
721
+ </html>
phpDocs/classes/MLA_Upload_Optional_List_Table.html ADDED
@@ -0,0 +1,539 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
5
+ <meta charset="utf-8">
6
+ <title>Media Library Assistant » \MLA_Upload_Optional_List_Table</title>
7
+ <meta name="author" content="Mike van Riel">
8
+ <meta name="description" content="">
9
+ <link href="../css/template.css" rel="stylesheet" media="all">
10
+ <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
11
+ <link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
12
+ <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
13
+ <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
14
+ </head>
15
+ <body>
16
+ <div class="navbar navbar-fixed-top">
17
+ <div class="navbar-inner"><div class="container">
18
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Media Library Assistant</a><div class="nav-collapse"><ul class="nav">
19
+ <li class="dropdown">
20
+ <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
21
+ API Documentation <b class="caret"></b></a><ul class="dropdown-menu"></ul>
22
+ </li>
23
+ <li class="dropdown" id="charts-menu">
24
+ <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
25
+ Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
26
+ </li>
27
+ <li class="dropdown" id="reports-menu">
28
+ <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
29
+ Reports <b class="caret"></b></a><ul class="dropdown-menu">
30
+ <li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
31
+ <span class="label label-info">0</span></a></li>
32
+ <li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
33
+ <ul></ul></a></li>
34
+ <li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
35
+ <span class="label label-info">0</span></a></li>
36
+ </ul>
37
+ </li>
38
+ </ul></div>
39
+ </div></div>
40
+ <div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
41
+ </div>
42
+ <div id="___" class="container">
43
+ <noscript><div class="alert alert-warning">
44
+ Javascript is disabled; several features are only available
45
+ if Javascript is enabled.
46
+ </div></noscript>
47
+ <div class="row">
48
+ <div class="span4">
49
+ <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
50
+ <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
51
+ </div>
52
+ <ul class="side-nav nav nav-list">
53
+ <li class="nav-header">
54
+ <i class="icon-custom icon-method"></i> Methods</li>
55
+ <li class="method public "><a href="#__construct" title="__construct :: Initializes some properties from $_REQUEST variables, then
56
+ calls the parent constructor to set some default configs."><span class="description">Initializes some properties from $_REQUEST variables, then
57
+ calls the parent constructor to set some default configs.</span><pre>__construct()</pre></a></li>
58
+ <li class="method public "><a href="#column_cb" title="column_cb :: Displays checkboxes for using bulk actions."><span class="description">Displays checkboxes for using bulk actions.</span><pre>column_cb()</pre></a></li>
59
+ <li class="method public "><a href="#column_core_type" title="column_core_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_core_type()</pre></a></li>
60
+ <li class="method public "><a href="#column_default" title="column_default :: Supply a column value if no column-specific function has been defined"><span class="description">Supply a column value if no column-specific function has been defined</span><pre>column_default()</pre></a></li>
61
+ <li class="method public "><a href="#column_description" title="column_description :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_description()</pre></a></li>
62
+ <li class="method public "><a href="#column_mime_type" title="column_mime_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_mime_type()</pre></a></li>
63
+ <li class="method public "><a href="#column_mla_type" title="column_mla_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_mla_type()</pre></a></li>
64
+ <li class="method public "><a href="#column_name" title="column_name :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_name()</pre></a></li>
65
+ <li class="method public "><a href="#get_bulk_actions" title="get_bulk_actions :: Get an associative array ( option_name =&gt; option_title ) with the list
66
+ of bulk actions available on this table."><span class="description">Get an associative array ( option_name =&gt; option_title ) with the list
67
+ of bulk actions available on this table.</span><pre>get_bulk_actions()</pre></a></li>
68
+ <li class="method public "><a href="#get_columns" title="get_columns :: This method dictates the table's columns and titles"><span class="description">This method dictates the table's columns and titles</span><pre>get_columns()</pre></a></li>
69
+ <li class="method public "><a href="#get_hidden_columns" title="get_hidden_columns :: Returns the list of currently hidden columns from a user option or
70
+ from default values if the option is not set"><span class="description">Returns the list of currently hidden columns from a user option or
71
+ from default values if the option is not set</span><pre>get_hidden_columns()</pre></a></li>
72
+ <li class="method public "><a href="#get_sortable_columns" title="get_sortable_columns :: Returns an array where the key is the column that needs to be sortable
73
+ and the value is db column to sort by."><span class="description">Returns an array where the key is the column that needs to be sortable
74
+ and the value is db column to sort by.</span><pre>get_sortable_columns()</pre></a></li>
75
+ <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Called in the admin_init action because the list_table object isn't
76
+ created in time to affect the &quot;screen options&quot; setup."><span class="description">Called in the admin_init action because the list_table object isn't
77
+ created in time to affect the "screen options" setup.</span><pre>mla_admin_init_action()</pre></a></li>
78
+ <li class="method public "><a href="#mla_get_sortable_columns" title="mla_get_sortable_columns :: Return the names and display values of the sortable columns"><span class="description">Return the names and display values of the sortable columns</span><pre>mla_get_sortable_columns()</pre></a></li>
79
+ <li class="method public "><a href="#mla_manage_columns_filter" title="mla_manage_columns_filter :: Handler for filter 'manage_settings_page_mla-settings-menu_columns'"><span class="description">Handler for filter 'manage_settings_page_mla-settings-menu_columns'</span><pre>mla_manage_columns_filter()</pre></a></li>
80
+ <li class="method public "><a href="#mla_manage_hidden_columns_filter" title="mla_manage_hidden_columns_filter :: Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-viewcolumnshidden'"><span class="description">Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-viewcolumnshidden'</span><pre>mla_manage_hidden_columns_filter()</pre></a></li>
81
+ <li class="method public "><a href="#prepare_items" title="prepare_items :: Prepares the list of items for displaying"><span class="description">Prepares the list of items for displaying</span><pre>prepare_items()</pre></a></li>
82
+ <li class="method public "><a href="#single_row" title="single_row :: Generates (echoes) content for a single row of the table"><span class="description">Generates (echoes) content for a single row of the table</span><pre>single_row()</pre></a></li>
83
+ <li class="nav-header private">» Private</li>
84
+ <li class="method private "><a href="#_build_rollover_actions" title="_build_rollover_actions :: Add rollover actions to a table column"><span class="description">Add rollover actions to a table column</span><pre>_build_rollover_actions()</pre></a></li>
85
+ <li class="method private "><a href="#_default_hidden_columns" title="_default_hidden_columns :: Access the default list of hidden columns"><span class="description">Access the default list of hidden columns</span><pre>_default_hidden_columns()</pre></a></li>
86
+ <li class="nav-header">
87
+ <i class="icon-custom icon-property"></i> Properties</li>
88
+ <li class="nav-header private">» Private</li>
89
+ <li class="property private "><a href="#%24default_columns" title="$default_columns :: Table column definitions"><span class="description">Table column definitions</span><pre>$default_columns</pre></a></li>
90
+ <li class="property private "><a href="#%24default_hidden_columns" title="$default_hidden_columns :: Default values for hidden columns"><span class="description">Default values for hidden columns</span><pre>$default_hidden_columns</pre></a></li>
91
+ <li class="property private "><a href="#%24default_sortable_columns" title="$default_sortable_columns :: Sortable column definitions"><span class="description">Sortable column definitions</span><pre>$default_sortable_columns</pre></a></li>
92
+ </ul>
93
+ </div>
94
+ <div class="span8">
95
+ <a name="%5CMLA_Upload_Optional_List_Table" id="\MLA_Upload_Optional_List_Table"></a><ul class="breadcrumb">
96
+ <li>
97
+ <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
98
+ </li>
99
+ <li><a href="../namespaces/global.html">global</a></li>
100
+ <li class="active">
101
+ <span class="divider">\</span><a href="../classes/MLA_Upload_Optional_List_Table.html">MLA_Upload_Optional_List_Table</a>
102
+ </li>
103
+ </ul>
104
+ <div href="../classes/MLA_Upload_Optional_List_Table.html" class="element class">
105
+ <p class="short_description">Class MLA (Media Library Assistant) Upload Optional List Table implements the
106
+ searchable database of exension/type associations for the "Uploads" admin settings tab</p>
107
+ <div class="details">
108
+ <p class="long_description"><p>Extends the core WP_List_Table class.</p></p>
109
+ <table class="table table-bordered">
110
+ <tr>
111
+ <th>package</th>
112
+ <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
113
+ </tr>
114
+ <tr>
115
+ <th>since</th>
116
+ <td>1.40</td>
117
+ </tr>
118
+ </table>
119
+ <h3>
120
+ <i class="icon-custom icon-method"></i> Methods</h3>
121
+ <a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
122
+ <h2>Initializes some properties from $_REQUEST variables, then
123
+ calls the parent constructor to set some default configs.</h2>
124
+ <pre>__construct() : void</pre>
125
+ <div class="labels"></div>
126
+ <div class="row collapse"><div class="detail-description">
127
+ <p class="long_description"></p>
128
+ <table class="table table-bordered"><tr>
129
+ <th>since</th>
130
+ <td>1.40</td>
131
+ </tr></table>
132
+ </div></div>
133
+ </div>
134
+ <a name="column_cb" id="column_cb"></a><div class="element clickable method public column_cb" data-toggle="collapse" data-target=".column_cb .collapse">
135
+ <h2>Displays checkboxes for using bulk actions.</h2>
136
+ <pre>column_cb(object $item) : string</pre>
137
+ <div class="labels"></div>
138
+ <div class="row collapse"><div class="detail-description">
139
+ <p class="long_description"><p>The 'cb' column
140
+ is given special treatment when columns are processed.</p></p>
141
+ <table class="table table-bordered"><tr>
142
+ <th>since</th>
143
+ <td>1.40</td>
144
+ </tr></table>
145
+ <h3>Parameters</h3>
146
+ <div class="subelement argument">
147
+ <h4>$item</h4>
148
+ <code>object</code><p>An MLA post_mime_type object</p></div>
149
+ <h3>Returns</h3>
150
+ <div class="subelement response">
151
+ <code>string</code>HTML markup to be placed inside the column</div>
152
+ </div></div>
153
+ </div>
154
+ <a name="column_core_type" id="column_core_type"></a><div class="element clickable method public column_core_type" data-toggle="collapse" data-target=".column_core_type .collapse">
155
+ <h2>Supply the content for a custom column</h2>
156
+ <pre>column_core_type(object $item) : string</pre>
157
+ <div class="labels"></div>
158
+ <div class="row collapse"><div class="detail-description">
159
+ <p class="long_description"></p>
160
+ <table class="table table-bordered"><tr>
161
+ <th>since</th>
162
+ <td>1.40</td>
163
+ </tr></table>
164
+ <h3>Parameters</h3>
165
+ <div class="subelement argument">
166
+ <h4>$item</h4>
167
+ <code>object</code><p>An MLA post_mime_type object</p></div>
168
+ <h3>Returns</h3>
169
+ <div class="subelement response">
170
+ <code>string</code>HTML markup to be placed inside the column</div>
171
+ </div></div>
172
+ </div>
173
+ <a name="column_default" id="column_default"></a><div class="element clickable method public column_default" data-toggle="collapse" data-target=".column_default .collapse">
174
+ <h2>Supply a column value if no column-specific function has been defined</h2>
175
+ <pre>column_default(array $item, array $column_name) : string</pre>
176
+ <div class="labels"></div>
177
+ <div class="row collapse"><div class="detail-description">
178
+ <p class="long_description"><p>Called when the parent class can't find a method specifically built for a
179
+ given column. All columns should have a specific method, so this function
180
+ returns a troubleshooting message.</p></p>
181
+ <table class="table table-bordered"><tr>
182
+ <th>since</th>
183
+ <td>1.40</td>
184
+ </tr></table>
185
+ <h3>Parameters</h3>
186
+ <div class="subelement argument">
187
+ <h4>$item</h4>
188
+ <code>array</code><p>A singular item (one full row's worth of data)</p>
189
+ </div>
190
+ <div class="subelement argument">
191
+ <h4>$column_name</h4>
192
+ <code>array</code><p>The name/slug of the column to be processed</p>
193
+ </div>
194
+ <h3>Returns</h3>
195
+ <div class="subelement response">
196
+ <code>string</code>Text or HTML to be placed inside the column</div>
197
+ </div></div>
198
+ </div>
199
+ <a name="column_description" id="column_description"></a><div class="element clickable method public column_description" data-toggle="collapse" data-target=".column_description .collapse">
200
+ <h2>Supply the content for a custom column</h2>
201
+ <pre>column_description(object $item) : string</pre>
202
+ <div class="labels"></div>
203
+ <div class="row collapse"><div class="detail-description">
204
+ <p class="long_description"></p>
205
+ <table class="table table-bordered"><tr>
206
+ <th>since</th>
207
+ <td>1.40</td>
208
+ </tr></table>
209
+ <h3>Parameters</h3>
210
+ <div class="subelement argument">
211
+ <h4>$item</h4>
212
+ <code>object</code><p>An MLA post_mime_type object</p></div>
213
+ <h3>Returns</h3>
214
+ <div class="subelement response">
215
+ <code>string</code>HTML markup to be placed inside the column</div>
216
+ </div></div>
217
+ </div>
218
+ <a name="column_mime_type" id="column_mime_type"></a><div class="element clickable method public column_mime_type" data-toggle="collapse" data-target=".column_mime_type .collapse">
219
+ <h2>Supply the content for a custom column</h2>
220
+ <pre>column_mime_type(object $item) : string</pre>
221
+ <div class="labels"></div>
222
+ <div class="row collapse"><div class="detail-description">
223
+ <p class="long_description"></p>
224
+ <table class="table table-bordered"><tr>
225
+ <th>since</th>
226
+ <td>1.40</td>
227
+ </tr></table>
228
+ <h3>Parameters</h3>
229
+ <div class="subelement argument">
230
+ <h4>$item</h4>
231
+ <code>object</code><p>An MLA post_mime_type object</p></div>
232
+ <h3>Returns</h3>
233
+ <div class="subelement response">
234
+ <code>string</code>HTML markup to be placed inside the column</div>
235
+ </div></div>
236
+ </div>
237
+ <a name="column_mla_type" id="column_mla_type"></a><div class="element clickable method public column_mla_type" data-toggle="collapse" data-target=".column_mla_type .collapse">
238
+ <h2>Supply the content for a custom column</h2>
239
+ <pre>column_mla_type(object $item) : string</pre>
240
+ <div class="labels"></div>
241
+ <div class="row collapse"><div class="detail-description">
242
+ <p class="long_description"></p>
243
+ <table class="table table-bordered"><tr>
244
+ <th>since</th>
245
+ <td>1.40</td>
246
+ </tr></table>
247
+ <h3>Parameters</h3>
248
+ <div class="subelement argument">
249
+ <h4>$item</h4>
250
+ <code>object</code><p>An MLA post_mime_type object</p></div>
251
+ <h3>Returns</h3>
252
+ <div class="subelement response">
253
+ <code>string</code>HTML markup to be placed inside the column</div>
254
+ </div></div>
255
+ </div>
256
+ <a name="column_name" id="column_name"></a><div class="element clickable method public column_name" data-toggle="collapse" data-target=".column_name .collapse">
257
+ <h2>Supply the content for a custom column</h2>
258
+ <pre>column_name(object $item) : string</pre>
259
+ <div class="labels"></div>
260
+ <div class="row collapse"><div class="detail-description">
261
+ <p class="long_description"></p>
262
+ <table class="table table-bordered"><tr>
263
+ <th>since</th>
264
+ <td>1.40</td>
265
+ </tr></table>
266
+ <h3>Parameters</h3>
267
+ <div class="subelement argument">
268
+ <h4>$item</h4>
269
+ <code>object</code><p>An MLA post_mime_type object</p></div>
270
+ <h3>Returns</h3>
271
+ <div class="subelement response">
272
+ <code>string</code>HTML markup to be placed inside the column</div>
273
+ </div></div>
274
+ </div>
275
+ <a name="get_bulk_actions" id="get_bulk_actions"></a><div class="element clickable method public get_bulk_actions" data-toggle="collapse" data-target=".get_bulk_actions .collapse">
276
+ <h2>Get an associative array ( option_name =&gt; option_title ) with the list
277
+ of bulk actions available on this table.</h2>
278
+ <pre>get_bulk_actions() : array</pre>
279
+ <div class="labels"></div>
280
+ <div class="row collapse"><div class="detail-description">
281
+ <p class="long_description"></p>
282
+ <table class="table table-bordered"><tr>
283
+ <th>since</th>
284
+ <td>1.40</td>
285
+ </tr></table>
286
+ <h3>Returns</h3>
287
+ <div class="subelement response">
288
+ <code>array</code>Contains all the bulk actions: 'slugs'=>'Visible Titles'</div>
289
+ </div></div>
290
+ </div>
291
+ <a name="get_columns" id="get_columns"></a><div class="element clickable method public get_columns" data-toggle="collapse" data-target=".get_columns .collapse">
292
+ <h2>This method dictates the table's columns and titles</h2>
293
+ <pre>get_columns() : array</pre>
294
+ <div class="labels"></div>
295
+ <div class="row collapse"><div class="detail-description">
296
+ <p class="long_description"></p>
297
+ <table class="table table-bordered"><tr>
298
+ <th>since</th>
299
+ <td>1.40</td>
300
+ </tr></table>
301
+ <h3>Returns</h3>
302
+ <div class="subelement response">
303
+ <code>array</code>Column information: 'slugs'=>'Visible Titles'</div>
304
+ </div></div>
305
+ </div>
306
+ <a name="get_hidden_columns" id="get_hidden_columns"></a><div class="element clickable method public get_hidden_columns" data-toggle="collapse" data-target=".get_hidden_columns .collapse">
307
+ <h2>Returns the list of currently hidden columns from a user option or
308
+ from default values if the option is not set</h2>
309
+ <pre>get_hidden_columns() : array</pre>
310
+ <div class="labels"></div>
311
+ <div class="row collapse"><div class="detail-description">
312
+ <p class="long_description"></p>
313
+ <table class="table table-bordered"><tr>
314
+ <th>since</th>
315
+ <td>1.40</td>
316
+ </tr></table>
317
+ <h3>Returns</h3>
318
+ <div class="subelement response">
319
+ <code>array</code>Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')</div>
320
+ </div></div>
321
+ </div>
322
+ <a name="get_sortable_columns" id="get_sortable_columns"></a><div class="element clickable method public get_sortable_columns" data-toggle="collapse" data-target=".get_sortable_columns .collapse">
323
+ <h2>Returns an array where the key is the column that needs to be sortable
324
+ and the value is db column to sort by.</h2>
325
+ <pre>get_sortable_columns() : array</pre>
326
+ <div class="labels"></div>
327
+ <div class="row collapse"><div class="detail-description">
328
+ <p class="long_description"><p>Also notes the current sort column,
329
+ if set.</p></p>
330
+ <table class="table table-bordered"><tr>
331
+ <th>since</th>
332
+ <td>1.40</td>
333
+ </tr></table>
334
+ <h3>Returns</h3>
335
+ <div class="subelement response">
336
+ <code>array</code>Sortable column information,e.g., 'slugs'=>array('data_values',boolean)</div>
337
+ </div></div>
338
+ </div>
339
+ <a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
340
+ <h2>Called in the admin_init action because the list_table object isn't
341
+ created in time to affect the "screen options" setup.</h2>
342
+ <pre>mla_admin_init_action() : void</pre>
343
+ <div class="labels"></div>
344
+ <div class="row collapse"><div class="detail-description">
345
+ <p class="long_description"></p>
346
+ <table class="table table-bordered"><tr>
347
+ <th>since</th>
348
+ <td>1.40</td>
349
+ </tr></table>
350
+ </div></div>
351
+ </div>
352
+ <a name="mla_get_sortable_columns" id="mla_get_sortable_columns"></a><div class="element clickable method public mla_get_sortable_columns" data-toggle="collapse" data-target=".mla_get_sortable_columns .collapse">
353
+ <h2>Return the names and display values of the sortable columns</h2>
354
+ <pre>mla_get_sortable_columns() : array</pre>
355
+ <div class="labels"></div>
356
+ <div class="row collapse"><div class="detail-description">
357
+ <p class="long_description"></p>
358
+ <table class="table table-bordered"><tr>
359
+ <th>since</th>
360
+ <td>1.40</td>
361
+ </tr></table>
362
+ <h3>Returns</h3>
363
+ <div class="subelement response">
364
+ <code>array</code>name => array( orderby value, heading ) for sortable columns</div>
365
+ </div></div>
366
+ </div>
367
+ <a name="mla_manage_columns_filter" id="mla_manage_columns_filter"></a><div class="element clickable method public mla_manage_columns_filter" data-toggle="collapse" data-target=".mla_manage_columns_filter .collapse">
368
+ <h2>Handler for filter 'manage_settings_page_mla-settings-menu_columns'</h2>
369
+ <pre>mla_manage_columns_filter() : array</pre>
370
+ <div class="labels"></div>
371
+ <div class="row collapse"><div class="detail-description">
372
+ <p class="long_description"><p>This required filter dictates the table's columns and titles. Set when the
373
+ file is loaded because the list_table object isn't created in time
374
+ to affect the "screen options" setup.</p></p>
375
+ <table class="table table-bordered"><tr>
376
+ <th>since</th>
377
+ <td>1.40</td>
378
+ </tr></table>
379
+ <h3>Returns</h3>
380
+ <div class="subelement response">
381
+ <code>array</code>list of table columns</div>
382
+ </div></div>
383
+ </div>
384
+ <a name="mla_manage_hidden_columns_filter" id="mla_manage_hidden_columns_filter"></a><div class="element clickable method public mla_manage_hidden_columns_filter" data-toggle="collapse" data-target=".mla_manage_hidden_columns_filter .collapse">
385
+ <h2>Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-viewcolumnshidden'</h2>
386
+ <pre>mla_manage_hidden_columns_filter(mixed $result, string $option, object $user_data) : array</pre>
387
+ <div class="labels"></div>
388
+ <div class="row collapse"><div class="detail-description">
389
+ <p class="long_description"><p>Required because the screen.php get_hidden_columns function only uses
390
+ the get_user_option result. Set when the file is loaded because the object
391
+ is not created in time for the call from screen.php.</p></p>
392
+ <table class="table table-bordered"><tr>
393
+ <th>since</th>
394
+ <td>1.40</td>
395
+ </tr></table>
396
+ <h3>Parameters</h3>
397
+ <div class="subelement argument">
398
+ <h4>$result</h4>
399
+ <code>mixed</code><p>false or array with current list of hidden columns, if any</p></div>
400
+ <div class="subelement argument">
401
+ <h4>$option</h4>
402
+ <code>string</code><p>'managesettings_page_mla-settings-menucolumnshidden'</p>
403
+ </div>
404
+ <div class="subelement argument">
405
+ <h4>$user_data</h4>
406
+ <code>object</code><p>WP_User object, if logged in</p></div>
407
+ <h3>Returns</h3>
408
+ <div class="subelement response">
409
+ <code>array</code>updated list of hidden columns</div>
410
+ </div></div>
411
+ </div>
412
+ <a name="prepare_items" id="prepare_items"></a><div class="element clickable method public prepare_items" data-toggle="collapse" data-target=".prepare_items .collapse">
413
+ <h2>Prepares the list of items for displaying</h2>
414
+ <pre>prepare_items() : void</pre>
415
+ <div class="labels"></div>
416
+ <div class="row collapse"><div class="detail-description">
417
+ <p class="long_description"><p>This is where you prepare your data for display. This method will usually
418
+ be used to query the database, sort and filter the data, and generally
419
+ get it ready to be displayed. At a minimum, we should set $this->items and
420
+ $this->set_pagination_args().</p></p>
421
+ <table class="table table-bordered"><tr>
422
+ <th>since</th>
423
+ <td>1.40</td>
424
+ </tr></table>
425
+ </div></div>
426
+ </div>
427
+ <a name="single_row" id="single_row"></a><div class="element clickable method public single_row" data-toggle="collapse" data-target=".single_row .collapse">
428
+ <h2>Generates (echoes) content for a single row of the table</h2>
429
+ <pre>single_row(object $item) : void</pre>
430
+ <div class="labels"></div>
431
+ <div class="row collapse"><div class="detail-description">
432
+ <p class="long_description"></p>
433
+ <table class="table table-bordered"><tr>
434
+ <th>since</th>
435
+ <td>1.40</td>
436
+ </tr></table>
437
+ <h3>Parameters</h3>
438
+ <div class="subelement argument">
439
+ <h4>$item</h4>
440
+ <code>object</code><p>the current item</p></div>
441
+ </div></div>
442
+ </div>
443
+ <a name="_build_rollover_actions" id="_build_rollover_actions"></a><div class="element clickable method private _build_rollover_actions" data-toggle="collapse" data-target="._build_rollover_actions .collapse">
444
+ <h2>Add rollover actions to a table column</h2>
445
+ <pre>_build_rollover_actions(object $item, string $column) : array</pre>
446
+ <div class="labels"></div>
447
+ <div class="row collapse"><div class="detail-description">
448
+ <p class="long_description"></p>
449
+ <table class="table table-bordered"><tr>
450
+ <th>since</th>
451
+ <td>1.40</td>
452
+ </tr></table>
453
+ <h3>Parameters</h3>
454
+ <div class="subelement argument">
455
+ <h4>$item</h4>
456
+ <code>object</code><p>An MLA post_mime_type object</p></div>
457
+ <div class="subelement argument">
458
+ <h4>$column</h4>
459
+ <code>string</code><p>Current column name</p></div>
460
+ <h3>Returns</h3>
461
+ <div class="subelement response">
462
+ <code>array</code>Names and URLs of row-level actions</div>
463
+ </div></div>
464
+ </div>
465
+ <a name="_default_hidden_columns" id="_default_hidden_columns"></a><div class="element clickable method private _default_hidden_columns" data-toggle="collapse" data-target="._default_hidden_columns .collapse">
466
+ <h2>Access the default list of hidden columns</h2>
467
+ <pre>_default_hidden_columns() : array</pre>
468
+ <div class="labels"></div>
469
+ <div class="row collapse"><div class="detail-description">
470
+ <p class="long_description"></p>
471
+ <table class="table table-bordered"><tr>
472
+ <th>since</th>
473
+ <td>1.40</td>
474
+ </tr></table>
475
+ <h3>Returns</h3>
476
+ <div class="subelement response">
477
+ <code>array</code>default list of hidden columns</div>
478
+ </div></div>
479
+ </div>
480
+ <h3>
481
+ <i class="icon-custom icon-property"></i> Properties</h3>
482
+ <a name="%24default_columns" id="$default_columns"> </a><div class="element clickable property private $default_columns" data-toggle="collapse" data-target=".$default_columns .collapse">
483
+ <h2>Table column definitions</h2>
484
+ <pre>$default_columns : array</pre>
485
+ <div class="labels"></div>
486
+ <div class="row collapse"><div class="detail-description">
487
+ <p class="long_description"><p>This array defines table columns and titles where the key is the column slug (and class)
488
+ and the value is the column's title text.</p></p>
489
+ <table class="table table-bordered"><tr>
490
+ <th>since</th>
491
+ <td>1.40</td>
492
+ </tr></table>
493
+ </div></div>
494
+ </div>
495
+ <a name="%24default_hidden_columns" id="$default_hidden_columns"> </a><div class="element clickable property private $default_hidden_columns" data-toggle="collapse" data-target=".$default_hidden_columns .collapse">
496
+ <h2>Default values for hidden columns</h2>
497
+ <pre>$default_hidden_columns : array</pre>
498
+ <div class="labels"></div>
499
+ <div class="row collapse"><div class="detail-description">
500
+ <p class="long_description"><p>This array is used when the user-level option is not set, i.e.,
501
+ the user has not altered the selection of hidden columns.</p>
502
+
503
+ <p>The value on the right-hand side must match the column slug, e.g.,
504
+ array(0 => 'ID_parent, 1 => 'title_name').</p></p>
505
+ <table class="table table-bordered"><tr>
506
+ <th>since</th>
507
+ <td>1.40</td>
508
+ </tr></table>
509
+ </div></div>
510
+ </div>
511
+ <a name="%24default_sortable_columns" id="$default_sortable_columns"> </a><div class="element clickable property private $default_sortable_columns" data-toggle="collapse" data-target=".$default_sortable_columns .collapse">
512
+ <h2>Sortable column definitions</h2>
513
+ <pre>$default_sortable_columns : array</pre>
514
+ <div class="labels"></div>
515
+ <div class="row collapse"><div class="detail-description">
516
+ <p class="long_description"><p>This array defines the table columns that can be sorted. The array key
517
+ is the column slug that needs to be sortable, and the value is database column
518
+ to sort by. Often, the key and value will be the same, but this is not always
519
+ the case (as the value is a column name from the database, not the list table).</p>
520
+
521
+ <p>The array value also contains a boolean which is 'true' if the data is currently
522
+ sorted by that column. This is computed each time the table is displayed.</p></p>
523
+ <table class="table table-bordered"><tr>
524
+ <th>since</th>
525
+ <td>1.40</td>
526
+ </tr></table>
527
+ </div></div>
528
+ </div>
529
+ </div>
530
+ </div>
531
+ </div>
532
+ </div>
533
+ <div class="row"><footer class="span12">
534
+ Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
535
+ Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
536
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
537
+ </div>
538
+ </body>
539
+ </html>
phpDocs/classes/MLA_View_List_Table.html ADDED
@@ -0,0 +1,618 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
5
+ <meta charset="utf-8">
6
+ <title>Media Library Assistant » \MLA_View_List_Table</title>
7
+ <meta name="author" content="Mike van Riel">
8
+ <meta name="description" content="">
9
+ <link href="../css/template.css" rel="stylesheet" media="all">
10
+ <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
11
+ <link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
12
+ <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
13
+ <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
14
+ </head>
15
+ <body>
16
+ <div class="navbar navbar-fixed-top">
17
+ <div class="navbar-inner"><div class="container">
18
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Media Library Assistant</a><div class="nav-collapse"><ul class="nav">
19
+ <li class="dropdown">
20
+ <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
21
+ API Documentation <b class="caret"></b></a><ul class="dropdown-menu"></ul>
22
+ </li>
23
+ <li class="dropdown" id="charts-menu">
24
+ <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
25
+ Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
26
+ </li>
27
+ <li class="dropdown" id="reports-menu">
28
+ <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
29
+ Reports <b class="caret"></b></a><ul class="dropdown-menu">
30
+ <li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
31
+ <span class="label label-info">0</span></a></li>
32
+ <li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
33
+ <ul></ul></a></li>
34
+ <li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
35
+ <span class="label label-info">0</span></a></li>
36
+ </ul>
37
+ </li>
38
+ </ul></div>
39
+ </div></div>
40
+ <div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
41
+ </div>
42
+ <div id="___" class="container">
43
+ <noscript><div class="alert alert-warning">
44
+ Javascript is disabled; several features are only available
45
+ if Javascript is enabled.
46
+ </div></noscript>
47
+ <div class="row">
48
+ <div class="span4">
49
+ <span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
50
+ <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
51
+ </div>
52
+ <ul class="side-nav nav nav-list">
53
+ <li class="nav-header">
54
+ <i class="icon-custom icon-method"></i> Methods</li>
55
+ <li class="method public "><a href="#__construct" title="__construct :: Initializes some properties from $_REQUEST variables, then
56
+ calls the parent constructor to set some default configs."><span class="description">Initializes some properties from $_REQUEST variables, then
57
+ calls the parent constructor to set some default configs.</span><pre>__construct()</pre></a></li>
58
+ <li class="method public "><a href="#column_cb" title="column_cb :: Displays checkboxes for using bulk actions."><span class="description">Displays checkboxes for using bulk actions.</span><pre>column_cb()</pre></a></li>
59
+ <li class="method public "><a href="#column_default" title="column_default :: Supply a column value if no column-specific function has been defined"><span class="description">Supply a column value if no column-specific function has been defined</span><pre>column_default()</pre></a></li>
60
+ <li class="method public "><a href="#column_description" title="column_description :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_description()</pre></a></li>
61
+ <li class="method public "><a href="#column_menu_order" title="column_menu_order :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_menu_order()</pre></a></li>
62
+ <li class="method public "><a href="#column_name" title="column_name :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_name()</pre></a></li>
63
+ <li class="method public "><a href="#column_plural" title="column_plural :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_plural()</pre></a></li>
64
+ <li class="method public "><a href="#column_post_mime_type" title="column_post_mime_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_post_mime_type()</pre></a></li>
65
+ <li class="method public "><a href="#column_singular" title="column_singular :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_singular()</pre></a></li>
66
+ <li class="method public "><a href="#column_specification" title="column_specification :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_specification()</pre></a></li>
67
+ <li class="method public "><a href="#column_table_view" title="column_table_view :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_table_view()</pre></a></li>
68
+ <li class="method public "><a href="#get_bulk_actions" title="get_bulk_actions :: Get an associative array ( option_name =&gt; option_title ) with the list
69
+ of bulk actions available on this table."><span class="description">Get an associative array ( option_name =&gt; option_title ) with the list
70
+ of bulk actions available on this table.</span><pre>get_bulk_actions()</pre></a></li>
71
+ <li class="method public "><a href="#get_columns" title="get_columns :: This method dictates the table's columns and titles"><span class="description">This method dictates the table's columns and titles</span><pre>get_columns()</pre></a></li>
72
+ <li class="method public "><a href="#get_hidden_columns" title="get_hidden_columns :: Returns the list of currently hidden columns from a user option or
73
+ from default values if the option is not set"><span class="description">Returns the list of currently hidden columns from a user option or
74
+ from default values if the option is not set</span><pre>get_hidden_columns()</pre></a></li>
75
+ <li class="method public "><a href="#get_sortable_columns" title="get_sortable_columns :: Returns an array where the key is the column that needs to be sortable
76
+ and the value is db column to sort by."><span class="description">Returns an array where the key is the column that needs to be sortable
77
+ and the value is db column to sort by.</span><pre>get_sortable_columns()</pre></a></li>
78
+ <li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Called in the admin_init action because the list_table object isn't
79
+ created in time to affect the &quot;screen options&quot; setup."><span class="description">Called in the admin_init action because the list_table object isn't
80
+ created in time to affect the "screen options" setup.</span><pre>mla_admin_init_action()</pre></a></li>
81
+ <li class="method public "><a href="#mla_get_sortable_columns" title="mla_get_sortable_columns :: Return the names and display values of the sortable columns"><span class="description">Return the names and display values of the sortable columns</span><pre>mla_get_sortable_columns()</pre></a></li>
82
+ <li class="method public "><a href="#mla_manage_columns_filter" title="mla_manage_columns_filter :: Handler for filter 'manage_settings_page_mla-settings-menu_columns'"><span class="description">Handler for filter 'manage_settings_page_mla-settings-menu_columns'</span><pre>mla_manage_columns_filter()</pre></a></li>
83
+ <li class="method public "><a href="#mla_manage_hidden_columns_filter" title="mla_manage_hidden_columns_filter :: Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-viewcolumnshidden'"><span class="description">Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-viewcolumnshidden'</span><pre>mla_manage_hidden_columns_filter()</pre></a></li>
84
+ <li class="method public "><a href="#prepare_items" title="prepare_items :: Prepares the list of items for displaying"><span class="description">Prepares the list of items for displaying</span><pre>prepare_items()</pre></a></li>
85
+ <li class="method public "><a href="#single_row" title="single_row :: Generates (echoes) content for a single row of the table"><span class="description">Generates (echoes) content for a single row of the table</span><pre>single_row()</pre></a></li>
86
+ <li class="nav-header private">» Private</li>
87
+ <li class="method private "><a href="#_build_inline_data" title="_build_inline_data :: Add hidden fields with the data for use in the inline editor"><span class="description">Add hidden fields with the data for use in the inline editor</span><pre>_build_inline_data()</pre></a></li>
88
+ <li class="method private "><a href="#_build_rollover_actions" title="_build_rollover_actions :: Add rollover actions to a table column"><span class="description">Add rollover actions to a table column</span><pre>_build_rollover_actions()</pre></a></li>
89
+ <li class="method private "><a href="#_default_hidden_columns" title="_default_hidden_columns :: Access the default list of hidden columns"><span class="description">Access the default list of hidden columns</span><pre>_default_hidden_columns()</pre></a></li>
90
+ <li class="nav-header">
91
+ <i class="icon-custom icon-property"></i> Properties</li>
92
+ <li class="nav-header private">» Private</li>
93
+ <li class="property private "><a href="#%24default_columns" title="$default_columns :: Table column definitions"><span class="description">Table column definitions</span><pre>$default_columns</pre></a></li>
94
+ <li class="property private "><a href="#%24default_hidden_columns" title="$default_hidden_columns :: Default values for hidden columns"><span class="description">Default values for hidden columns</span><pre>$default_hidden_columns</pre></a></li>
95
+ <li class="property private "><a href="#%24default_sortable_columns" title="$default_sortable_columns :: Sortable column definitions"><span class="description">Sortable column definitions</span><pre>$default_sortable_columns</pre></a></li>
96
+ </ul>
97
+ </div>
98
+ <div class="span8">
99
+ <a name="%5CMLA_View_List_Table" id="\MLA_View_List_Table"></a><ul class="breadcrumb">
100
+ <li>
101
+ <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
102
+ </li>
103
+ <li><a href="../namespaces/global.html">global</a></li>
104
+ <li class="active">
105
+ <span class="divider">\</span><a href="../classes/MLA_View_List_Table.html">MLA_View_List_Table</a>
106
+ </li>
107
+ </ul>
108
+ <div href="../classes/MLA_View_List_Table.html" class="element class">
109
+ <p class="short_description">Class MLA (Media Library Assistant) View List Table implements the "Views" admin settings tab</p>
110
+ <div class="details">
111
+ <p class="long_description"><p>Extends the core WP_List_Table class.</p></p>
112
+ <table class="table table-bordered">
113
+ <tr>
114
+ <th>package</th>
115
+ <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
116
+ </tr>
117
+ <tr>
118
+ <th>since</th>
119
+ <td>1.40</td>
120
+ </tr>
121
+ </table>
122
+ <h3>
123
+ <i class="icon-custom icon-method"></i> Methods</h3>
124
+ <a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
125
+ <h2>Initializes some properties from $_REQUEST variables, then
126
+ calls the parent constructor to set some default configs.</h2>
127
+ <pre>__construct() : void</pre>
128
+ <div class="labels"></div>
129
+ <div class="row collapse"><div class="detail-description">
130
+ <p class="long_description"></p>
131
+ <table class="table table-bordered"><tr>
132
+ <th>since</th>
133
+ <td>1.40</td>
134
+ </tr></table>
135
+ </div></div>
136
+ </div>
137
+ <a name="column_cb" id="column_cb"></a><div class="element clickable method public column_cb" data-toggle="collapse" data-target=".column_cb .collapse">
138
+ <h2>Displays checkboxes for using bulk actions.</h2>
139
+ <pre>column_cb(object $item) : string</pre>
140
+ <div class="labels"></div>
141
+ <div class="row collapse"><div class="detail-description">
142
+ <p class="long_description"><p>The 'cb' column
143
+ is given special treatment when columns are processed.</p></p>
144
+ <table class="table table-bordered"><tr>
145
+ <th>since</th>
146
+ <td>1.40</td>
147
+ </tr></table>
148
+ <h3>Parameters</h3>
149
+ <div class="subelement argument">
150
+ <h4>$item</h4>
151
+ <code>object</code><p>An MLA post_mime_type object</p></div>
152
+ <h3>Returns</h3>
153
+ <div class="subelement response">
154
+ <code>string</code>HTML markup to be placed inside the column</div>
155
+ </div></div>
156
+ </div>
157
+ <a name="column_default" id="column_default"></a><div class="element clickable method public column_default" data-toggle="collapse" data-target=".column_default .collapse">
158
+ <h2>Supply a column value if no column-specific function has been defined</h2>
159
+ <pre>column_default(array $item, array $column_name) : string</pre>
160
+ <div class="labels"></div>
161
+ <div class="row collapse"><div class="detail-description">
162
+ <p class="long_description"><p>Called when the parent class can't find a method specifically built for a
163
+ given column. All columns should have a specific method, so this function
164
+ returns a troubleshooting message.</p></p>
165
+ <table class="table table-bordered"><tr>
166
+ <th>since</th>
167
+ <td>1.40</td>
168
+ </tr></table>
169
+ <h3>Parameters</h3>
170
+ <div class="subelement argument">
171
+ <h4>$item</h4>
172
+ <code>array</code><p>A singular item (one full row's worth of data)</p>
173
+ </div>
174
+ <div class="subelement argument">
175
+ <h4>$column_name</h4>
176
+ <code>array</code><p>The name/slug of the column to be processed</p>
177
+ </div>
178
+ <h3>Returns</h3>
179
+ <div class="subelement response">
180
+ <code>string</code>Text or HTML to be placed inside the column</div>
181
+ </div></div>
182
+ </div>
183
+ <a name="column_description" id="column_description"></a><div class="element clickable method public column_description" data-toggle="collapse" data-target=".column_description .collapse">
184
+ <h2>Supply the content for a custom column</h2>
185
+ <pre>column_description(object $item) : string</pre>
186
+ <div class="labels"></div>
187
+ <div class="row collapse"><div class="detail-description">
188
+ <p class="long_description"></p>
189
+ <table class="table table-bordered"><tr>
190
+ <th>since</th>
191
+ <td>1.40</td>
192
+ </tr></table>
193
+ <h3>Parameters</h3>
194
+ <div class="subelement argument">
195
+ <h4>$item</h4>
196
+ <code>object</code><p>An MLA post_mime_type object</p></div>
197
+ <h3>Returns</h3>
198
+ <div class="subelement response">
199
+ <code>string</code>HTML markup to be placed inside the column</div>
200
+ </div></div>
201
+ </div>
202
+ <a name="column_menu_order" id="column_menu_order"></a><div class="element clickable method public column_menu_order" data-toggle="collapse" data-target=".column_menu_order .collapse">
203
+ <h2>Supply the content for a custom column</h2>
204
+ <pre>column_menu_order(object $item) : string</pre>
205
+ <div class="labels"></div>
206
+ <div class="row collapse"><div class="detail-description">
207
+ <p class="long_description"></p>
208
+ <table class="table table-bordered"><tr>
209
+ <th>since</th>
210
+ <td>1.40</td>
211
+ </tr></table>
212
+ <h3>Parameters</h3>
213
+ <div class="subelement argument">
214
+ <h4>$item</h4>
215
+ <code>object</code><p>An MLA post_mime_type object</p></div>
216
+ <h3>Returns</h3>
217
+ <div class="subelement response">
218
+ <code>string</code>HTML markup to be placed inside the column</div>
219
+ </div></div>
220
+ </div>
221
+ <a name="column_name" id="column_name"></a><div class="element clickable method public column_name" data-toggle="collapse" data-target=".column_name .collapse">
222
+ <h2>Supply the content for a custom column</h2>
223
+ <pre>column_name(object $item) : string</pre>
224
+ <div class="labels"></div>
225
+ <div class="row collapse"><div class="detail-description">
226
+ <p class="long_description"></p>
227
+ <table class="table table-bordered"><tr>
228
+ <th>since</th>
229
+ <td>1.40</td>
230
+ </tr></table>
231
+ <h3>Parameters</h3>
232
+ <div class="subelement argument">
233
+ <h4>$item</h4>
234
+ <code>object</code><p>An MLA post_mime_type object</p></div>
235
+ <h3>Returns</h3>
236
+ <div class="subelement response">
237
+ <code>string</code>HTML markup to be placed inside the column</div>
238
+ </div></div>
239
+ </div>
240
+ <a name="column_plural" id="column_plural"></a><div class="element clickable method public column_plural" data-toggle="collapse" data-target=".column_plural .collapse">
241
+ <h2>Supply the content for a custom column</h2>
242
+ <pre>column_plural(object $item) : string</pre>
243
+ <div class="labels"></div>
244
+ <div class="row collapse"><div class="detail-description">
245
+ <p class="long_description"></p>
246
+ <table class="table table-bordered"><tr>
247
+ <th>since</th>
248
+ <td>1.40</td>
249
+ </tr></table>
250
+ <h3>Parameters</h3>
251
+ <div class="subelement argument">
252
+ <h4>$item</h4>
253
+ <code>object</code><p>An MLA post_mime_type object</p></div>
254
+ <h3>Returns</h3>
255
+ <div class="subelement response">
256
+ <code>string</code>HTML markup to be placed inside the column</div>
257
+ </div></div>
258
+ </div>
259
+ <a name="column_post_mime_type" id="column_post_mime_type"></a><div class="element clickable method public column_post_mime_type" data-toggle="collapse" data-target=".column_post_mime_type .collapse">
260
+ <h2>Supply the content for a custom column</h2>
261
+ <pre>column_post_mime_type(object $item) : string</pre>
262
+ <div class="labels"></div>
263
+ <div class="row collapse"><div class="detail-description">
264
+ <p class="long_description"></p>
265
+ <table class="table table-bordered"><tr>
266
+ <th>since</th>
267
+ <td>1.40</td>
268
+ </tr></table>
269
+ <h3>Parameters</h3>
270
+ <div class="subelement argument">
271
+ <h4>$item</h4>
272
+ <code>object</code><p>An MLA post_mime_type object</p></div>
273
+ <h3>Returns</h3>
274
+ <div class="subelement response">
275
+ <code>string</code>HTML markup to be placed inside the column</div>
276
+ </div></div>
277
+ </div>
278
+ <a name="column_singular" id="column_singular"></a><div class="element clickable method public column_singular" data-toggle="collapse" data-target=".column_singular .collapse">
279
+ <h2>Supply the content for a custom column</h2>
280
+ <pre>column_singular(object $item) : string</pre>
281
+ <div class="labels"></div>
282
+ <div class="row collapse"><div class="detail-description">
283
+ <p class="long_description"></p>
284
+ <table class="table table-bordered"><tr>
285
+ <th>since</th>
286
+ <td>1.40</td>
287
+ </tr></table>
288
+ <h3>Parameters</h3>
289
+ <div class="subelement argument">
290
+ <h4>$item</h4>
291
+ <code>object</code><p>An MLA post_mime_type object</p></div>
292
+ <h3>Returns</h3>
293
+ <div class="subelement response">
294
+ <code>string</code>HTML markup to be placed inside the column</div>
295
+ </div></div>
296
+ </div>
297
+ <a name="column_specification" id="column_specification"></a><div class="element clickable method public column_specification" data-toggle="collapse" data-target=".column_specification .collapse">
298
+ <h2>Supply the content for a custom column</h2>
299
+ <pre>column_specification(object $item) : string</pre>
300
+ <div class="labels"></div>
301
+ <div class="row collapse"><div class="detail-description">
302
+ <p class="long_description"></p>
303
+ <table class="table table-bordered"><tr>
304
+ <th>since</th>
305
+ <td>1.40</td>
306
+ </tr></table>
307
+ <h3>Parameters</h3>
308
+ <div class="subelement argument">
309
+ <h4>$item</h4>
310
+ <code>object</code><p>An MLA post_mime_type object</p></div>
311
+ <h3>Returns</h3>
312
+ <div class="subelement response">
313
+ <code>string</code>HTML markup to be placed inside the column</div>
314
+ </div></div>
315
+ </div>
316
+ <a name="column_table_view" id="column_table_view"></a><div class="element clickable method public column_table_view" data-toggle="collapse" data-target=".column_table_view .collapse">
317
+ <h2>Supply the content for a custom column</h2>
318
+ <pre>column_table_view(object $item) : string</pre>
319
+ <div class="labels"></div>
320
+ <div class="row collapse"><div class="detail-description">
321
+ <p class="long_description"></p>
322
+ <table class="table table-bordered"><tr>
323
+ <th>since</th>
324
+ <td>1.40</td>
325
+ </tr></table>
326
+ <h3>Parameters</h3>
327
+ <div class="subelement argument">
328
+ <h4>$item</h4>
329
+ <code>object</code><p>An MLA post_mime_type object</p></div>
330
+ <h3>Returns</h3>
331
+ <div class="subelement response">
332
+ <code>string</code>HTML markup to be placed inside the column</div>
333
+ </div></div>
334
+ </div>
335
+ <a name="get_bulk_actions" id="get_bulk_actions"></a><div class="element clickable method public get_bulk_actions" data-toggle="collapse" data-target=".get_bulk_actions .collapse">
336
+ <h2>Get an associative array ( option_name =&gt; option_title ) with the list
337
+ of bulk actions available on this table.</h2>
338
+ <pre>get_bulk_actions() : array</pre>
339
+ <div class="labels"></div>
340
+ <div class="row collapse"><div class="detail-description">
341
+ <p class="long_description"></p>
342
+ <table class="table table-bordered"><tr>
343
+ <th>since</th>
344
+ <td>1.40</td>
345
+ </tr></table>
346
+ <h3>Returns</h3>
347
+ <div class="subelement response">
348
+ <code>array</code>Contains all the bulk actions: 'slugs'=>'Visible Titles'</div>
349
+ </div></div>
350
+ </div>
351
+ <a name="get_columns" id="get_columns"></a><div class="element clickable method public get_columns" data-toggle="collapse" data-target=".get_columns .collapse">
352
+ <h2>This method dictates the table's columns and titles</h2>
353
+ <pre>get_columns() : array</pre>
354
+ <div class="labels"></div>
355
+ <div class="row collapse"><div class="detail-description">
356
+ <p class="long_description"></p>
357
+ <table class="table table-bordered"><tr>
358
+ <th>since</th>
359
+ <td>1.40</td>
360
+ </tr></table>
361
+ <h3>Returns</h3>
362
+ <div class="subelement response">
363
+ <code>array</code>Column information: 'slugs'=>'Visible Titles'</div>
364
+ </div></div>
365
+ </div>
366
+ <a name="get_hidden_columns" id="get_hidden_columns"></a><div class="element clickable method public get_hidden_columns" data-toggle="collapse" data-target=".get_hidden_columns .collapse">
367
+ <h2>Returns the list of currently hidden columns from a user option or
368
+ from default values if the option is not set</h2>
369
+ <pre>get_hidden_columns() : array</pre>
370
+ <div class="labels"></div>
371
+ <div class="row collapse"><div class="detail-description">
372
+ <p class="long_description"></p>
373
+ <table class="table table-bordered"><tr>
374
+ <th>since</th>
375
+ <td>1.40</td>
376
+ </tr></table>
377
+ <h3>Returns</h3>
378
+ <div class="subelement response">
379
+ <code>array</code>Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')</div>
380
+ </div></div>
381
+ </div>
382
+ <a name="get_sortable_columns" id="get_sortable_columns"></a><div class="element clickable method public get_sortable_columns" data-toggle="collapse" data-target=".get_sortable_columns .collapse">
383
+ <h2>Returns an array where the key is the column that needs to be sortable
384
+ and the value is db column to sort by.</h2>
385
+ <pre>get_sortable_columns() : array</pre>
386
+ <div class="labels"></div>
387
+ <div class="row collapse"><div class="detail-description">
388
+ <p class="long_description"><p>Also notes the current sort column,
389
+ if set.</p></p>
390
+ <table class="table table-bordered"><tr>
391
+ <th>since</th>
392
+ <td>1.40</td>
393
+ </tr></table>
394
+ <h3>Returns</h3>
395
+ <div class="subelement response">
396
+ <code>array</code>Sortable column information,e.g., 'slugs'=>array('data_values',boolean)</div>
397
+ </div></div>
398
+ </div>
399
+ <a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
400
+ <h2>Called in the admin_init action because the list_table object isn't
401
+ created in time to affect the "screen options" setup.</h2>
402
+ <pre>mla_admin_init_action() : void</pre>
403
+ <div class="labels"></div>
404
+ <div class="row collapse"><div class="detail-description">
405
+ <p class="long_description"></p>
406
+ <table class="table table-bordered"><tr>
407
+ <th>since</th>
408
+ <td>1.40</td>
409
+ </tr></table>
410
+ </div></div>
411
+ </div>
412
+ <a name="mla_get_sortable_columns" id="mla_get_sortable_columns"></a><div class="element clickable method public mla_get_sortable_columns" data-toggle="collapse" data-target=".mla_get_sortable_columns .collapse">
413
+ <h2>Return the names and display values of the sortable columns</h2>
414
+ <pre>mla_get_sortable_columns() : array</pre>
415
+ <div class="labels"></div>
416
+ <div class="row collapse"><div class="detail-description">
417
+ <p class="long_description"></p>
418
+ <table class="table table-bordered"><tr>
419
+ <th>since</th>
420
+ <td>1.40</td>
421
+ </tr></table>
422
+ <h3>Returns</h3>
423
+ <div class="subelement response">
424
+ <code>array</code>name => array( orderby value, heading ) for sortable columns</div>
425
+ </div></div>
426
+ </div>
427
+ <a name="mla_manage_columns_filter" id="mla_manage_columns_filter"></a><div class="element clickable method public mla_manage_columns_filter" data-toggle="collapse" data-target=".mla_manage_columns_filter .collapse">
428
+ <h2>Handler for filter 'manage_settings_page_mla-settings-menu_columns'</h2>
429
+ <pre>mla_manage_columns_filter() : array</pre>
430
+ <div class="labels"></div>
431
+ <div class="row collapse"><div class="detail-description">
432
+ <p class="long_description"><p>This required filter dictates the table's columns and titles. Set when the
433
+ file is loaded because the list_table object isn't created in time
434
+ to affect the "screen options" setup.</p></p>
435
+ <table class="table table-bordered"><tr>
436
+ <th>since</th>
437
+ <td>1.40</td>
438
+ </tr></table>
439
+ <h3>Returns</h3>
440
+ <div class="subelement response">
441
+ <code>array</code>list of table columns</div>
442
+ </div></div>
443
+ </div>
444
+ <a name="mla_manage_hidden_columns_filter" id="mla_manage_hidden_columns_filter"></a><div class="element clickable method public mla_manage_hidden_columns_filter" data-toggle="collapse" data-target=".mla_manage_hidden_columns_filter .collapse">
445
+ <h2>Handler for filter 'get_user_option_managesettings_page_mla-settings-menu-viewcolumnshidden'</h2>
446
+ <pre>mla_manage_hidden_columns_filter(mixed $result, string $option, object $user_data) : array</pre>
447
+ <div class="labels"></div>
448
+ <div class="row collapse"><div class="detail-description">
449
+ <p class="long_description"><p>Required because the screen.php get_hidden_columns function only uses
450
+ the get_user_option result. Set when the file is loaded because the object
451
+ is not created in time for the call from screen.php.</p></p>
452
+ <table class="table table-bordered"><tr>
453
+ <th>since</th>
454
+ <td>1.40</td>
455
+ </tr></table>
456
+ <h3>Parameters</h3>
457
+ <div class="subelement argument">
458
+ <h4>$result</h4>
459
+ <code>mixed</code><p>false or array with current list of hidden columns, if any</p></div>
460
+ <div class="subelement argument">
461
+ <h4>$option</h4>
462
+ <code>string</code><p>'managesettings_page_mla-settings-menucolumnshidden'</p>
463
+ </div>
464
+ <div class="subelement argument">
465
+ <h4>$user_data</h4>
466
+ <code>object</code><p>WP_User object, if logged in</p></div>
467
+ <h3>Returns</h3>
468
+ <div class="subelement response">
469
+ <code>array</code>updated list of hidden columns</div>
470
+ </div></div>
471
+ </div>
472
+ <a name="prepare_items" id="prepare_items"></a><div class="element clickable method public prepare_items" data-toggle="collapse" data-target=".prepare_items .collapse">
473
+ <h2>Prepares the list of items for displaying</h2>
474
+ <pre>prepare_items() : void</pre>
475
+ <div class="labels"></div>
476
+ <div class="row collapse"><div class="detail-description">
477
+ <p class="long_description"><p>This is where you prepare your data for display. This method will usually
478
+ be used to query the database, sort and filter the data, and generally
479
+ get it ready to be displayed. At a minimum, we should set $this->items and
480
+ $this->set_pagination_args().</p></p>
481
+ <table class="table table-bordered"><tr>
482
+ <th>since</th>
483
+ <td>1.40</td>
484
+ </tr></table>
485
+ </div></div>
486
+ </div>
487
+ <a name="single_row" id="single_row"></a><div class="element clickable method public single_row" data-toggle="collapse" data-target=".single_row .collapse">
488
+ <h2>Generates (echoes) content for a single row of the table</h2>
489
+ <pre>single_row(object $item) : void</pre>
490
+ <div class="labels"></div>
491
+ <div class="row collapse"><div class="detail-description">
492
+ <p class="long_description"></p>
493
+ <table class="table table-bordered"><tr>
494
+ <th>since</th>
495
+ <td>1.40</td>
496
+ </tr></table>
497
+ <h3>Parameters</h3>
498
+ <div class="subelement argument">
499
+ <h4>$item</h4>
500
+ <code>object</code><p>the current item</p></div>
501
+ </div></div>
502
+ </div>
503
+ <a name="_build_inline_data" id="_build_inline_data"></a><div class="element clickable method private _build_inline_data" data-toggle="collapse" data-target="._build_inline_data .collapse">
504
+ <h2>Add hidden fields with the data for use in the inline editor</h2>
505
+ <pre>_build_inline_data(object $item) : string</pre>
506
+ <div class="labels"></div>
507
+ <div class="row collapse"><div class="detail-description">
508
+ <p class="long_description"></p>
509
+ <table class="table table-bordered"><tr>
510
+ <th>since</th>
511
+ <td>1.40</td>
512
+ </tr></table>
513
+ <h3>Parameters</h3>
514
+ <div class="subelement argument">
515
+ <h4>$item</h4>
516
+ <code>object</code><p>An MLA post_mime_type object</p></div>
517
+ <h3>Returns</h3>
518
+ <div class="subelement response">
519
+ <code>string</code>HTML <div> with row data</div>
520
+ </div></div>
521
+ </div>
522
+ <a name="_build_rollover_actions" id="_build_rollover_actions"></a><div class="element clickable method private _build_rollover_actions" data-toggle="collapse" data-target="._build_rollover_actions .collapse">
523
+ <h2>Add rollover actions to a table column</h2>
524
+ <pre>_build_rollover_actions(object $item, string $column) : array</pre>
525
+ <div class="labels"></div>
526
+ <div class="row collapse"><div class="detail-description">
527
+ <p class="long_description"></p>
528
+ <table class="table table-bordered"><tr>
529
+ <th>since</th>
530
+ <td>1.40</td>
531
+ </tr></table>
532
+ <h3>Parameters</h3>
533
+ <div class="subelement argument">
534
+ <h4>$item</h4>
535
+ <code>object</code><p>An MLA post_mime_type object</p></div>
536
+ <div class="subelement argument">
537
+ <h4>$column</h4>
538
+ <code>string</code><p>Current column name</p></div>
539
+ <h3>Returns</h3>
540
+ <div class="subelement response">
541
+ <code>array</code>Names and URLs of row-level actions</div>
542
+ </div></div>
543
+ </div>
544
+ <a name="_default_hidden_columns" id="_default_hidden_columns"></a><div class="element clickable method private _default_hidden_columns" data-toggle="collapse" data-target="._default_hidden_columns .collapse">
545
+ <h2>Access the default list of hidden columns</h2>
546
+ <pre>_default_hidden_columns() : array</pre>
547
+ <div class="labels"></div>
548
+ <div class="row collapse"><div class="detail-description">
549
+ <p class="long_description"></p>
550
+ <table class="table table-bordered"><tr>
551
+ <th>since</th>
552
+ <td>1.40</td>
553
+ </tr></table>
554
+ <h3>Returns</h3>
555
+ <div class="subelement response">
556
+ <code>array</code>default list of hidden columns</div>
557
+ </div></div>
558
+ </div>
559
+ <h3>
560
+ <i class="icon-custom icon-property"></i> Properties</h3>
561
+ <a name="%24default_columns" id="$default_columns"> </a><div class="element clickable property private $default_columns" data-toggle="collapse" data-target=".$default_columns .collapse">
562
+ <h2>Table column definitions</h2>
563
+ <pre>$default_columns : array</pre>
564
+ <div class="labels"></div>
565
+ <div class="row collapse"><div class="detail-description">
566
+ <p class="long_description"><p>This array defines table columns and titles where the key is the column slug (and class)
567
+ and the value is the column's title text.</p></p>
568
+ <table class="table table-bordered"><tr>
569
+ <th>since</th>
570
+ <td>1.40</td>
571
+ </tr></table>
572
+ </div></div>
573
+ </div>
574
+ <a name="%24default_hidden_columns" id="$default_hidden_columns"> </a><div class="element clickable property private $default_hidden_columns" data-toggle="collapse" data-target=".$default_hidden_columns .collapse">
575
+ <h2>Default values for hidden columns</h2>
576
+ <pre>$default_hidden_columns : array</pre>
577
+ <div class="labels"></div>
578
+ <div class="row collapse"><div class="detail-description">
579
+ <p class="long_description"><p>This array is used when the user-level option is not set, i.e.,
580
+ the user has not altered the selection of hidden columns.</p>
581
+
582
+ <p>The value on the right-hand side must match the column slug, e.g.,
583
+ array(0 => 'ID_parent, 1 => 'title_name').</p></p>
584
+ <table class="table table-bordered"><tr>
585
+ <th>since</th>
586
+ <td>1.40</td>
587
+ </tr></table>
588
+ </div></div>
589
+ </div>
590
+ <a name="%24default_sortable_columns" id="$default_sortable_columns"> </a><div class="element clickable property private $default_sortable_columns" data-toggle="collapse" data-target=".$default_sortable_columns .collapse">
591
+ <h2>Sortable column definitions</h2>
592
+ <pre>$default_sortable_columns : array</pre>
593
+ <div class="labels"></div>
594
+ <div class="row collapse"><div class="detail-description">
595
+ <p class="long_description"><p>This array defines the table columns that can be sorted. The array key
596
+ is the column slug that needs to be sortable, and the value is database column
597
+ to sort by. Often, the key and value will be the same, but this is not always
598
+ the case (as the value is a column name from the database, not the list table).</p>
599
+
600
+ <p>The array value also contains a boolean which is 'true' if the data is currently
601
+ sorted by that column. This is computed each time the table is displayed.</p></p>
602
+ <table class="table table-bordered"><tr>
603
+ <th>since</th>
604
+ <td>1.40</td>
605
+ </tr></table>
606
+ </div></div>
607
+ </div>
608
+ </div>
609
+ </div>
610
+ </div>
611
+ </div>
612
+ <div class="row"><footer class="span12">
613
+ Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
614
+ Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
615
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
616
+ </div>
617
+ </body>
618
+ </html>
phpDocs/deprecated.html CHANGED
@@ -62,7 +62,7 @@
62
  <div class="row"><footer class="span12">
63
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
64
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
65
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
66
  </div>
67
  </body>
68
  </html>
62
  <div class="row"><footer class="span12">
63
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
64
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
65
+ generated on 2013-06-18T20:20:00-07:00.<br></footer></div>
66
  </div>
67
  </body>
68
  </html>
phpDocs/errors.html CHANGED
@@ -72,12 +72,16 @@
72
  <div class="package-contents"></div>
73
  <div class="package-contents"></div>
74
  <div class="package-contents"></div>
 
 
 
 
75
  </div>
76
  </div>
77
  <div class="row"><footer class="span12">
78
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
79
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
80
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
81
  </div>
82
  </body>
83
  </html>
72
  <div class="package-contents"></div>
73
  <div class="package-contents"></div>
74
  <div class="package-contents"></div>
75
+ <div class="package-contents"></div>
76
+ <div class="package-contents"></div>
77
+ <div class="package-contents"></div>
78
+ <div class="package-contents"></div>
79
  </div>
80
  </div>
81
  <div class="row"><footer class="span12">
82
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
83
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
84
+ generated on 2013-06-18T20:20:00-07:00.<br></footer></div>
85
  </div>
86
  </body>
87
  </html>
phpDocs/graph_class.html CHANGED
@@ -59,7 +59,7 @@
59
  </script><div class="row"><footer class="span12">
60
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
61
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
62
- generated on 2013-04-22T17:09:55-07:00.<br></footer></div>
63
  </div>
64
  </body>
65
  </html>
59
  </script><div class="row"><footer class="span12">
60
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
61
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
62
+ generated on 2013-06-18T20:20:00-07:00.<br></footer></div>
63
  </div>
64
  </body>
65
  </html>
phpDocs/index.html CHANGED
@@ -79,7 +79,7 @@
79
  <div class="row"><footer class="span12">
80
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
81
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
82
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
83
  </div>
84
  </body>
85
  </html>
79
  <div class="row"><footer class="span12">
80
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
81
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
82
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
83
  </div>
84
  </body>
85
  </html>
phpDocs/markers.html CHANGED
@@ -64,7 +64,7 @@
64
  <div class="row"><footer class="span12">
65
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
66
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
67
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
68
  </div>
69
  </body>
70
  </html>
64
  <div class="row"><footer class="span12">
65
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
66
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
67
+ generated on 2013-06-18T20:20:00-07:00.<br></footer></div>
68
  </div>
69
  </body>
70
  </html>
phpDocs/namespaces/global.html CHANGED
@@ -115,6 +115,14 @@ of images and files held in the WordPress Media Library.</p>
115
  <div class="details collapse"></div>
116
  <a href="../classes/MLAEdit.html" class="more">« More »</a>
117
  </div>
 
 
 
 
 
 
 
 
118
  <a name="MLAModal" id="MLAModal"></a><div class="element ajax clickable class" href="../classes/MLAModal.html">
119
  <h1>MLAModal<a href="../classes/MLAModal.html">¶</a>
120
  </h1>
@@ -166,6 +174,28 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
166
  <div class="details collapse"></div>
167
  <a href="../classes/MLA_List_Table.html" class="more">« More »</a>
168
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  <h3>
170
  <i class="icon-custom icon-constant"></i> Constants</h3>
171
  <a name="MLA_OPTION_PREFIX" id="MLA_OPTION_PREFIX"> </a><div class="element clickable constant MLA_OPTION_PREFIX" data-toggle="collapse" data-target=".MLA_OPTION_PREFIX .collapse">
@@ -192,7 +222,7 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
192
  <div class="row"><footer class="span12">
193
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
194
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
195
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
196
  </div>
197
  </body>
198
  </html>
115
  <div class="details collapse"></div>
116
  <a href="../classes/MLAEdit.html" class="more">« More »</a>
117
  </div>
118
+ <a name="MLAMime" id="MLAMime"></a><div class="element ajax clickable class" href="../classes/MLAMime.html">
119
+ <h1>MLAMime<a href="../classes/MLAMime.html">¶</a>
120
+ </h1>
121
+ <p class="short_description">Class MLA (Media Library Assistant) MIME filters WordPress MIME Type functions and supports
122
+ the Views and Uploads Settings tabs</p>
123
+ <div class="details collapse"></div>
124
+ <a href="../classes/MLAMime.html" class="more">« More »</a>
125
+ </div>
126
  <a name="MLAModal" id="MLAModal"></a><div class="element ajax clickable class" href="../classes/MLAModal.html">
127
  <h1>MLAModal<a href="../classes/MLAModal.html">¶</a>
128
  </h1>
174
  <div class="details collapse"></div>
175
  <a href="../classes/MLA_List_Table.html" class="more">« More »</a>
176
  </div>
177
+ <a name="MLA_Upload_List_Table" id="MLA_Upload_List_Table"></a><div class="element ajax clickable class" href="../classes/MLA_Upload_List_Table.html">
178
+ <h1>MLA_Upload_List_Table<a href="../classes/MLA_Upload_List_Table.html">¶</a>
179
+ </h1>
180
+ <p class="short_description">Class MLA (Media Library Assistant) Upload List Table implements the "Upload" admin settings tab</p>
181
+ <div class="details collapse"></div>
182
+ <a href="../classes/MLA_Upload_List_Table.html" class="more">« More »</a>
183
+ </div>
184
+ <a name="MLA_Upload_Optional_List_Table" id="MLA_Upload_Optional_List_Table"></a><div class="element ajax clickable class" href="../classes/MLA_Upload_Optional_List_Table.html">
185
+ <h1>MLA_Upload_Optional_List_Table<a href="../classes/MLA_Upload_Optional_List_Table.html">¶</a>
186
+ </h1>
187
+ <p class="short_description">Class MLA (Media Library Assistant) Upload Optional List Table implements the
188
+ searchable database of exension/type associations for the "Uploads" admin settings tab</p>
189
+ <div class="details collapse"></div>
190
+ <a href="../classes/MLA_Upload_Optional_List_Table.html" class="more">« More »</a>
191
+ </div>
192
+ <a name="MLA_View_List_Table" id="MLA_View_List_Table"></a><div class="element ajax clickable class" href="../classes/MLA_View_List_Table.html">
193
+ <h1>MLA_View_List_Table<a href="../classes/MLA_View_List_Table.html">¶</a>
194
+ </h1>
195
+ <p class="short_description">Class MLA (Media Library Assistant) View List Table implements the "Views" admin settings tab</p>
196
+ <div class="details collapse"></div>
197
+ <a href="../classes/MLA_View_List_Table.html" class="more">« More »</a>
198
+ </div>
199
  <h3>
200
  <i class="icon-custom icon-constant"></i> Constants</h3>
201
  <a name="MLA_OPTION_PREFIX" id="MLA_OPTION_PREFIX"> </a><div class="element clickable constant MLA_OPTION_PREFIX" data-toggle="collapse" data-target=".MLA_OPTION_PREFIX .collapse">
222
  <div class="row"><footer class="span12">
223
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
224
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
225
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
226
  </div>
227
  </body>
228
  </html>
phpDocs/packages/Media Library Assistant.html CHANGED
@@ -67,11 +67,17 @@
67
  <li><a href="#MLA" title="Class MLA (Media Library Assistant) provides several enhancements to the handling
68
  of images and files held in the WordPress Media Library.">MLA</a></li>
69
  <li><a href="#MLAModal" title="Class MLA (Media Library Assistant) Modal contains enhancements for the WordPress 3.5+ Media Manager">MLAModal</a></li>
 
 
70
  <li><a href="#MLAObjects" title="Class MLA (Media Library Assistant) Objects defines and manages custom taxonomies for Attachment Categories and Tags">MLAObjects</a></li>
71
  <li><a href="#MLAOptions" title="Class MLA (Media Library Assistant) Options manages the plugin option settings
72
  and provides functions to get and put them from/to WordPress option variables">MLAOptions</a></li>
73
  <li><a href="#MLASettings" title="Class MLA (Media Library Assistant) Settings provides the settings page to edit the plugin option settings">MLASettings</a></li>
74
  <li><a href="#MLAShortcodes" title="Class MLA (Media Library Assistant) Shortcodes defines the shortcodes available to MLA users">MLAShortcodes</a></li>
 
 
 
 
75
  <li><a href="#MLATest" title="Class MLA (Media Library Assistant) Test provides basic run-time tests
76
  to ensure the plugin can run in the current WordPress envrionment.">MLATest</a></li>
77
  <li class="nav-header">
@@ -139,6 +145,14 @@ of images and files held in the WordPress Media Library.</p>
139
  <div class="details collapse"></div>
140
  <a href="../classes/MLAEdit.html" class="more">« More »</a>
141
  </div>
 
 
 
 
 
 
 
 
142
  <a name="MLAModal" id="MLAModal"></a><div class="element ajax clickable class" href="../classes/MLAModal.html">
143
  <h1>MLAModal<a href="../classes/MLAModal.html">¶</a>
144
  </h1>
@@ -190,6 +204,28 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
190
  <div class="details collapse"></div>
191
  <a href="../classes/MLA_List_Table.html" class="more">« More »</a>
192
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  <h3>
194
  <i class="icon-custom icon-constant"></i> Constants</h3>
195
  <a name="MLA_OPTION_PREFIX" id="MLA_OPTION_PREFIX"> </a><div class="element clickable constant MLA_OPTION_PREFIX" data-toggle="collapse" data-target=".MLA_OPTION_PREFIX .collapse">
@@ -216,7 +252,7 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
216
  <div class="row"><footer class="span12">
217
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
218
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
219
- generated on 2013-04-22T17:09:54-07:00.<br></footer></div>
220
  </div>
221
  </body>
222
  </html>
67
  <li><a href="#MLA" title="Class MLA (Media Library Assistant) provides several enhancements to the handling
68
  of images and files held in the WordPress Media Library.">MLA</a></li>
69
  <li><a href="#MLAModal" title="Class MLA (Media Library Assistant) Modal contains enhancements for the WordPress 3.5+ Media Manager">MLAModal</a></li>
70
+ <li><a href="#MLAMime" title="Class MLA (Media Library Assistant) MIME filters WordPress MIME Type functions and supports
71
+ the Views and Uploads Settings tabs">MLAMime</a></li>
72
  <li><a href="#MLAObjects" title="Class MLA (Media Library Assistant) Objects defines and manages custom taxonomies for Attachment Categories and Tags">MLAObjects</a></li>
73
  <li><a href="#MLAOptions" title="Class MLA (Media Library Assistant) Options manages the plugin option settings
74
  and provides functions to get and put them from/to WordPress option variables">MLAOptions</a></li>
75
  <li><a href="#MLASettings" title="Class MLA (Media Library Assistant) Settings provides the settings page to edit the plugin option settings">MLASettings</a></li>
76
  <li><a href="#MLAShortcodes" title="Class MLA (Media Library Assistant) Shortcodes defines the shortcodes available to MLA users">MLAShortcodes</a></li>
77
+ <li><a href="#MLA_Upload_List_Table" title='Class MLA (Media Library Assistant) Upload List Table implements the "Upload" admin settings tab'>MLA_Upload_List_Table</a></li>
78
+ <li><a href="#MLA_Upload_Optional_List_Table" title='Class MLA (Media Library Assistant) Upload Optional List Table implements the
79
+ searchable database of exension/type associations for the "Uploads" admin settings tab'>MLA_Upload_Optional_List_Table</a></li>
80
+ <li><a href="#MLA_View_List_Table" title='Class MLA (Media Library Assistant) View List Table implements the "Views" admin settings tab'>MLA_View_List_Table</a></li>
81
  <li><a href="#MLATest" title="Class MLA (Media Library Assistant) Test provides basic run-time tests
82
  to ensure the plugin can run in the current WordPress envrionment.">MLATest</a></li>
83
  <li class="nav-header">
145
  <div class="details collapse"></div>
146
  <a href="../classes/MLAEdit.html" class="more">« More »</a>
147
  </div>
148
+ <a name="MLAMime" id="MLAMime"></a><div class="element ajax clickable class" href="../classes/MLAMime.html">
149
+ <h1>MLAMime<a href="../classes/MLAMime.html">¶</a>
150
+ </h1>
151
+ <p class="short_description">Class MLA (Media Library Assistant) MIME filters WordPress MIME Type functions and supports
152
+ the Views and Uploads Settings tabs</p>
153
+ <div class="details collapse"></div>
154
+ <a href="../classes/MLAMime.html" class="more">« More »</a>
155
+ </div>
156
  <a name="MLAModal" id="MLAModal"></a><div class="element ajax clickable class" href="../classes/MLAModal.html">
157
  <h1>MLAModal<a href="../classes/MLAModal.html">¶</a>
158
  </h1>
204
  <div class="details collapse"></div>
205
  <a href="../classes/MLA_List_Table.html" class="more">« More »</a>
206
  </div>
207
+ <a name="MLA_Upload_List_Table" id="MLA_Upload_List_Table"></a><div class="element ajax clickable class" href="../classes/MLA_Upload_List_Table.html">
208
+ <h1>MLA_Upload_List_Table<a href="../classes/MLA_Upload_List_Table.html">¶</a>
209
+ </h1>
210
+ <p class="short_description">Class MLA (Media Library Assistant) Upload List Table implements the "Upload" admin settings tab</p>
211
+ <div class="details collapse"></div>
212
+ <a href="../classes/MLA_Upload_List_Table.html" class="more">« More »</a>
213
+ </div>
214
+ <a name="MLA_Upload_Optional_List_Table" id="MLA_Upload_Optional_List_Table"></a><div class="element ajax clickable class" href="../classes/MLA_Upload_Optional_List_Table.html">
215
+ <h1>MLA_Upload_Optional_List_Table<a href="../classes/MLA_Upload_Optional_List_Table.html">¶</a>
216
+ </h1>
217
+ <p class="short_description">Class MLA (Media Library Assistant) Upload Optional List Table implements the
218
+ searchable database of exension/type associations for the "Uploads" admin settings tab</p>
219
+ <div class="details collapse"></div>
220
+ <a href="../classes/MLA_Upload_Optional_List_Table.html" class="more">« More »</a>
221
+ </div>
222
+ <a name="MLA_View_List_Table" id="MLA_View_List_Table"></a><div class="element ajax clickable class" href="../classes/MLA_View_List_Table.html">
223
+ <h1>MLA_View_List_Table<a href="../classes/MLA_View_List_Table.html">¶</a>
224
+ </h1>
225
+ <p class="short_description">Class MLA (Media Library Assistant) View List Table implements the "Views" admin settings tab</p>
226
+ <div class="details collapse"></div>
227
+ <a href="../classes/MLA_View_List_Table.html" class="more">« More »</a>
228
+ </div>
229
  <h3>
230
  <i class="icon-custom icon-constant"></i> Constants</h3>
231
  <a name="MLA_OPTION_PREFIX" id="MLA_OPTION_PREFIX"> </a><div class="element clickable constant MLA_OPTION_PREFIX" data-toggle="collapse" data-target=".MLA_OPTION_PREFIX .collapse">
252
  <div class="row"><footer class="span12">
253
  Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
254
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
255
+ generated on 2013-06-18T20:19:59-07:00.<br></footer></div>
256
  </div>
257
  </body>
258
  </html>
phpDocs/structure.xml CHANGED
@@ -1,6 +1,6 @@
1
  <?xml version="1.0" encoding="utf-8"?>
2
  <project version="2.0.0a8" title="Media Library Assistant">
3
- <file path="includes\class-mla-data.php" hash="a0c27e5d40f15a0937efa9ad59473a0a" package="Media Library Assistant">
4
  <docblock line="2">
5
  <description><![CDATA[Database and template file access for MLA needs]]></description>
6
  <long-description><![CDATA[]]></long-description>
@@ -40,53 +40,66 @@ Templates separate HTML markup from PHP code for easier maintenance and localiza
40
  </tag>
41
  </docblock>
42
  </property>
43
- <property final="false" static="true" visibility="private" line="307" namespace="global" package="Media Library Assistant">
 
 
 
 
 
 
 
 
 
 
 
 
44
  <name>$query_parameters</name>
45
  <default><![CDATA[array()]]></default>
46
- <docblock line="294">
47
  <description><![CDATA[WP_Query filter "parameters"]]></description>
48
  <long-description><![CDATA[<p>This array defines parameters for the query's join, where and orderby filters.
49
  The parameters are set up in the _prepare_list_table_query function, and
50
  any further logic required to translate those values is contained in the filters.</p>
51
 
52
- <p>Array index values are: use_postmeta_view, postmeta_key, detached, orderby, order, s, mla_search_connector, mla_search_fields, sentence, exact</p>]]></long-description>
53
- <tag line="294" name="since" description="0.30"/>
54
- <tag line="294" name="var" description="" type="array">
55
  <type by_reference="false">array</type>
56
  </tag>
57
  </docblock>
58
  </property>
59
- <property final="false" static="true" visibility="private" line="1258" namespace="global" package="Media Library Assistant">
60
  <name>$galleries</name>
61
  <default><![CDATA[null]]></default>
62
- <docblock line="1240">
63
  <description><![CDATA[Objects containing [gallery] shortcodes]]></description>
64
  <long-description><![CDATA[<p>This array contains all of the objects containing one or more [gallery] shortcodes
65
  and array(s) of which attachments each [gallery] contains. The arrays are built once
66
  each page load and cached for subsequent calls.</p>
67
 
68
- <p>The outer array is keyed by post_id. It contains an array of [gallery] entries numbered from one (1).
69
- Each inner array has these elements:
70
  ['parent_title'] post_title of the gallery parent,
71
  ['parent_type'] 'post' or 'page' or the custom post_type of the gallery parent,
72
- ['query'] contains a string with the arguments of the [gallery],
73
- ['results'] contains an array of post_ids for the objects in the gallery.</p>]]></long-description>
74
- <tag line="1240" name="since" description="0.70"/>
75
- <tag line="1240" name="var" description="" type="array">
 
 
76
  <type by_reference="false">array</type>
77
  </tag>
78
  </docblock>
79
  </property>
80
- <property final="false" static="true" visibility="private" line="1271" namespace="global" package="Media Library Assistant">
81
  <name>$mla_galleries</name>
82
  <default><![CDATA[null]]></default>
83
- <docblock line="1260">
84
  <description><![CDATA[Objects containing [mla_gallery] shortcodes]]></description>
85
  <long-description><![CDATA[<p>This array contains all of the objects containing one or more [mla_gallery] shortcodes
86
  and array(s) of which attachments each [mla_gallery] contains. The arrays are built once
87
  each page load and cached for subsequent calls.</p>]]></long-description>
88
- <tag line="1260" name="since" description="0.70"/>
89
- <tag line="1260" name="var" description="" type="array">
90
  <type by_reference="false">array</type>
91
  </tag>
92
  </docblock>
@@ -171,7 +184,7 @@ where "key" becomes the key part of the array.</p>]]></long-description>
171
  <tag line="171" name="param" description="A formatting string containing [+placeholders+]" type="string" variable="$tpl">
172
  <type by_reference="false">string</type>
173
  </tag>
174
- <tag line="171" name="return" description="Placeholder information: each entry is an array with ['prefix'] =&gt; string, ['value'] =&gt; string, ['single'] =&gt; boolean" type="array">
175
  <type by_reference="false">array</type>
176
  </tag>
177
  </docblock>
@@ -181,666 +194,710 @@ where "key" becomes the key part of the array.</p>]]></long-description>
181
  <type/>
182
  </argument>
183
  </method>
184
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="224" package="Media Library Assistant">
185
  <name>mla_count_list_table_items</name>
186
  <full_name>mla_count_list_table_items</full_name>
187
- <docblock line="215">
188
  <description><![CDATA[Get the total number of attachment posts]]></description>
189
  <long-description><![CDATA[]]></long-description>
190
- <tag line="215" name="since" description="0.30"/>
191
- <tag line="215" name="param" description="Query variables, e.g., from $_REQUEST" type="array" variable="$request">
192
  <type by_reference="false">array</type>
193
  </tag>
194
- <tag line="215" name="return" description="Number of attachment posts" type="integer">
 
 
 
 
 
 
195
  <type by_reference="false">integer</type>
196
  </tag>
197
  </docblock>
198
- <argument line="224">
199
  <name>$request</name>
200
  <default><![CDATA[]]></default>
201
  <type/>
202
  </argument>
 
 
 
 
 
 
 
 
 
 
203
  </method>
204
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="245" package="Media Library Assistant">
205
  <name>mla_query_list_table_items</name>
206
  <full_name>mla_query_list_table_items</full_name>
207
- <docblock line="231">
208
  <description><![CDATA[Retrieve attachment objects for list table display]]></description>
209
  <long-description><![CDATA[<p>Supports prepare_items in class-mla-list-table.php.
210
  Modeled after wp_edit_attachments_query in wp-admin/post.php</p>]]></long-description>
211
- <tag line="231" name="since" description="0.1"/>
212
- <tag line="231" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
213
  <type by_reference="false">array</type>
214
  </tag>
215
- <tag line="231" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
216
  <type by_reference="false">int</type>
217
  </tag>
218
- <tag line="231" name="param" description="number of rows on each page" type="int" variable="$count">
219
  <type by_reference="false">int</type>
220
  </tag>
221
- <tag line="231" name="return" description="attachment objects (posts) including parent data, meta data and references" type="array">
222
  <type by_reference="false">array</type>
223
  </tag>
224
  </docblock>
225
- <argument line="245">
226
  <name>$request</name>
227
  <default><![CDATA[]]></default>
228
  <type/>
229
  </argument>
230
- <argument line="245">
231
  <name>$offset</name>
232
  <default><![CDATA[]]></default>
233
  <type/>
234
  </argument>
235
- <argument line="245">
236
  <name>$count</name>
237
  <default><![CDATA[]]></default>
238
  <type/>
239
  </argument>
240
  </method>
241
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="289" package="Media Library Assistant">
242
  <name>mla_query_media_modal_items</name>
243
  <full_name>mla_query_media_modal_items</full_name>
244
- <docblock line="276">
245
  <description><![CDATA[Retrieve attachment objects for the WordPress Media Manager]]></description>
246
  <long-description><![CDATA[<p>Supports month-year and taxonomy-term filters as well as the enhanced search box</p>]]></long-description>
247
- <tag line="276" name="since" description="1.20"/>
248
- <tag line="276" name="param" description="query parameters from Media Manager" type="array" variable="$request">
249
  <type by_reference="false">array</type>
250
  </tag>
251
- <tag line="276" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
252
  <type by_reference="false">int</type>
253
  </tag>
254
- <tag line="276" name="param" description="number of rows on each page" type="int" variable="$count">
255
  <type by_reference="false">int</type>
256
  </tag>
257
- <tag line="276" name="return" description="attachment objects (posts)" type="array">
258
  <type by_reference="false">array</type>
259
  </tag>
260
  </docblock>
261
- <argument line="289">
262
  <name>$request</name>
263
  <default><![CDATA[]]></default>
264
  <type/>
265
  </argument>
266
- <argument line="289">
267
  <name>$offset</name>
268
  <default><![CDATA[]]></default>
269
  <type/>
270
  </argument>
271
- <argument line="289">
272
  <name>$count</name>
273
  <default><![CDATA[]]></default>
274
  <type/>
275
  </argument>
276
  </method>
277
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="323" package="Media Library Assistant">
278
  <name>_prepare_list_table_query</name>
279
  <full_name>_prepare_list_table_query</full_name>
280
- <docblock line="309">
281
  <description><![CDATA[Sanitize and expand query arguments from request variables]]></description>
282
  <long-description><![CDATA[<p>Prepare the arguments for WP_Query.
283
  Modeled after wp_edit_attachments_query in wp-admin/post.php</p>]]></long-description>
284
- <tag line="309" name="since" description="0.1"/>
285
- <tag line="309" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$raw_request">
286
  <type by_reference="false">array</type>
287
  </tag>
288
- <tag line="309" name="param" description="Optional number of rows (default 0) to skip over to reach desired page" type="int" variable="$offset">
289
  <type by_reference="false">int</type>
290
  </tag>
291
- <tag line="309" name="param" description="Optional number of rows on each page (0 = all rows, default)" type="int" variable="$count">
292
  <type by_reference="false">int</type>
293
  </tag>
294
- <tag line="309" name="return" description="revised arguments suitable for WP_Query" type="array">
295
  <type by_reference="false">array</type>
296
  </tag>
297
  </docblock>
298
- <argument line="323">
299
  <name>$raw_request</name>
300
  <default><![CDATA[]]></default>
301
  <type/>
302
  </argument>
303
- <argument line="323">
304
  <name>$offset</name>
305
  <default><![CDATA[0]]></default>
306
  <type/>
307
  </argument>
308
- <argument line="323">
309
  <name>$count</name>
310
  <default><![CDATA[0]]></default>
311
  <type/>
312
  </argument>
313
  </method>
314
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="582" package="Media Library Assistant">
315
  <name>_execute_list_table_query</name>
316
  <full_name>_execute_list_table_query</full_name>
317
- <docblock line="573">
318
  <description><![CDATA[Add filters, run query, remove filters]]></description>
319
  <long-description><![CDATA[]]></long-description>
320
- <tag line="573" name="since" description="0.30"/>
321
- <tag line="573" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
322
  <type by_reference="false">array</type>
323
  </tag>
324
- <tag line="573" name="return" description="WP_Query object with query results" type="object">
325
  <type by_reference="false">object</type>
326
  </tag>
327
  </docblock>
328
- <argument line="582">
329
  <name>$request</name>
330
  <default><![CDATA[]]></default>
331
  <type/>
332
  </argument>
333
  </method>
334
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="636" package="Media Library Assistant">
335
  <name>mla_query_posts_search_filter</name>
336
  <full_name>mla_query_posts_search_filter</full_name>
337
- <docblock line="624">
338
  <description><![CDATA[Adds a keyword search to the WHERE clause, if required]]></description>
339
  <long-description><![CDATA[<p>Defined as public because it's a filter.</p>]]></long-description>
340
- <tag line="624" name="since" description="0.60"/>
341
- <tag line="624" name="param" description="query clause before modification" type="string" variable="$search_string">
342
  <type by_reference="false">string</type>
343
  </tag>
344
- <tag line="624" name="param" description="WP_Query object" type="object" variable="$query_object">
345
  <type by_reference="false">object</type>
346
  </tag>
347
- <tag line="624" name="return" description="query clause after keyword search addition" type="string">
348
  <type by_reference="false">string</type>
349
  </tag>
350
  </docblock>
351
- <argument line="636">
352
  <name>$search_string</name>
353
  <default><![CDATA[]]></default>
354
  <type/>
355
  </argument>
356
- <argument line="636">
357
  <name>$query_object</name>
358
  <default><![CDATA[]]></default>
359
  <type/>
360
  </argument>
361
  </method>
362
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="717" package="Media Library Assistant">
363
  <name>mla_query_posts_join_filter</name>
364
  <full_name>mla_query_posts_join_filter</full_name>
365
- <docblock line="706">
366
- <description><![CDATA[Adds a JOIN clause, if required, to handle sorting/searching on ALT Text]]></description>
367
  <long-description><![CDATA[<p>Defined as public because it's a filter.</p>]]></long-description>
368
- <tag line="706" name="since" description="0.30"/>
369
- <tag line="706" name="param" description="query clause before modification" type="string" variable="$join_clause">
370
  <type by_reference="false">string</type>
371
  </tag>
372
- <tag line="706" name="return" description="query clause after &quot;LEFT JOIN view ON post_id&quot; item modification" type="string">
373
  <type by_reference="false">string</type>
374
  </tag>
375
  </docblock>
376
- <argument line="717">
377
  <name>$join_clause</name>
378
  <default><![CDATA[]]></default>
379
  <type/>
380
  </argument>
381
  </method>
382
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="744" package="Media Library Assistant">
383
  <name>mla_query_posts_where_filter</name>
384
  <full_name>mla_query_posts_where_filter</full_name>
385
- <docblock line="732">
386
  <description><![CDATA[Adds a WHERE clause for detached items]]></description>
387
  <long-description><![CDATA[<p>Modeled after _edit_attachments_query_helper in wp-admin/post.php.
388
  Defined as public because it's a filter.</p>]]></long-description>
389
- <tag line="732" name="since" description="0.1"/>
390
- <tag line="732" name="param" description="query clause before modification" type="string" variable="$where_clause">
391
  <type by_reference="false">string</type>
392
  </tag>
393
- <tag line="732" name="return" description="query clause after &quot;detached&quot; item modification" type="string">
394
  <type by_reference="false">string</type>
395
  </tag>
396
  </docblock>
397
- <argument line="744">
398
  <name>$where_clause</name>
399
  <default><![CDATA[]]></default>
400
  <type/>
401
  </argument>
402
  </method>
403
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="772" package="Media Library Assistant">
404
  <name>mla_query_posts_orderby_filter</name>
405
  <full_name>mla_query_posts_orderby_filter</full_name>
406
- <docblock line="760">
407
  <description><![CDATA[Adds a ORDERBY clause, if required]]></description>
408
  <long-description><![CDATA[<p>Expands the range of sort options because the logic in WP_Query is limited.
409
  Defined as public because it's a filter.</p>]]></long-description>
410
- <tag line="760" name="since" description="0.30"/>
411
- <tag line="760" name="param" description="query clause before modification" type="string" variable="$orderby_clause">
412
  <type by_reference="false">string</type>
413
  </tag>
414
- <tag line="760" name="return" description="updated query clause" type="string">
415
  <type by_reference="false">string</type>
416
  </tag>
417
  </docblock>
418
- <argument line="772">
419
  <name>$orderby_clause</name>
420
  <default><![CDATA[]]></default>
421
  <type/>
422
  </argument>
423
  </method>
424
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="830" package="Media Library Assistant">
425
  <name>mla_get_attachment_by_id</name>
426
  <full_name>mla_get_attachment_by_id</full_name>
427
- <docblock line="818">
428
  <description><![CDATA[Retrieve an Attachment array given a $post_id]]></description>
429
  <long-description><![CDATA[<p>The (associative) array will contain every field that can be found in
430
  the posts and postmeta tables, and all references to the attachment.</p>]]></long-description>
431
- <tag line="818" name="since" description="0.1"/>
432
- <tag line="818" name="uses" description="\global\$post" refers="\global\$post"/>
433
- <tag line="818" name="param" description="The ID of the attachment post" type="int" variable="$post_id">
434
  <type by_reference="false">int</type>
435
  </tag>
436
- <tag line="818" name="return" description="NULL on failure else associative array" type="NULL|array">
437
  <type by_reference="false">NULL</type>
438
  <type by_reference="false">array</type>
439
  </tag>
440
  </docblock>
441
- <argument line="830">
442
  <name>$post_id</name>
443
  <default><![CDATA[]]></default>
444
  <type/>
445
  </argument>
446
  </method>
447
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="875" package="Media Library Assistant">
448
  <name>mla_fetch_attachment_parent_data</name>
449
  <full_name>mla_fetch_attachment_parent_data</full_name>
450
- <docblock line="866">
451
  <description><![CDATA[Returns information about an attachment's parent, if found]]></description>
452
  <long-description><![CDATA[]]></long-description>
453
- <tag line="866" name="since" description="0.1"/>
454
- <tag line="866" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent_id">
455
  <type by_reference="false">int</type>
456
  </tag>
457
- <tag line="866" name="return" description="Parent information; post_date, post_title and post_type" type="array">
458
  <type by_reference="false">array</type>
459
  </tag>
460
  </docblock>
461
- <argument line="875">
462
  <name>$parent_id</name>
463
  <default><![CDATA[]]></default>
464
  <type/>
465
  </argument>
466
  </method>
467
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="905" package="Media Library Assistant">
468
  <name>mla_find_array_element</name>
469
  <full_name>mla_find_array_element</full_name>
470
- <docblock line="890">
471
  <description><![CDATA[Finds the value of a key in a possibily nested array structure]]></description>
472
  <long-description><![CDATA[<p>Used primarily to extract fields from the _wp_attachment_metadata custom field.
473
  Could also be used with the ID3 metadata exposed in WordPress 3.6 and later.</p>]]></long-description>
474
- <tag line="890" name="since" description="1.30"/>
475
- <tag line="890" name="param" description="key value, e.g. array1.array2.element" type="string" variable="$needle">
476
  <type by_reference="false">string</type>
477
  </tag>
478
- <tag line="890" name="param" description="PHP nested arrays" type="array" variable="$haystack">
479
  <type by_reference="false">array</type>
480
  </tag>
481
- <tag line="890" name="param" description="return first element of an array result" type="boolean" variable="$single">
482
- <type by_reference="false">boolean</type>
483
  </tag>
484
- <tag line="890" name="param" description="return results in var_export() format" type="boolean" variable="$export">
485
  <type by_reference="false">boolean</type>
486
  </tag>
487
- <tag line="890" name="return" description="value matching key(.key ...) or ''" type="string">
488
  <type by_reference="false">string</type>
489
  </tag>
490
  </docblock>
491
- <argument line="905">
492
  <name>$needle</name>
493
  <default><![CDATA[]]></default>
494
  <type/>
495
  </argument>
496
- <argument line="905">
497
  <name>$haystack</name>
498
  <default><![CDATA[]]></default>
499
  <type/>
500
  </argument>
501
- <argument line="905">
502
- <name>$single</name>
503
- <default><![CDATA[false]]></default>
504
  <type/>
505
  </argument>
506
- <argument line="905">
507
- <name>$export</name>
508
  <default><![CDATA[false]]></default>
509
  <type/>
510
  </argument>
511
  </method>
512
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="947" package="Media Library Assistant">
513
  <name>mla_fetch_attachment_metadata</name>
514
  <full_name>mla_fetch_attachment_metadata</full_name>
515
- <docblock line="934">
516
  <description><![CDATA[Fetch and filter meta data for an attachment]]></description>
517
  <long-description><![CDATA[<p>Returns a filtered array of a post's meta data. Internal values beginning with '<em>'
518
  are stripped out or converted to an 'mla</em>' equivalent. Array data is replaced with
519
  a string containing the first array element.</p>]]></long-description>
520
- <tag line="934" name="since" description="0.1"/>
521
- <tag line="934" name="param" description="post ID of attachment" type="int" variable="$post_id">
522
  <type by_reference="false">int</type>
523
  </tag>
524
- <tag line="934" name="return" description="Meta data variables" type="array">
525
  <type by_reference="false">array</type>
526
  </tag>
527
  </docblock>
528
- <argument line="947">
529
  <name>$post_id</name>
530
  <default><![CDATA[]]></default>
531
  <type/>
532
  </argument>
533
  </method>
534
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1013" package="Media Library Assistant">
535
  <name>mla_fetch_attachment_references</name>
536
  <full_name>mla_fetch_attachment_references</full_name>
537
- <docblock line="1000">
538
  <description><![CDATA[Find Featured Image and inserted image/link references to an attachment]]></description>
539
  <long-description><![CDATA[<p>Searches all post and page content to see if the attachment is used
540
  as a Featured Image or inserted in the post as an image or link.</p>]]></long-description>
541
- <tag line="1000" name="since" description="0.1"/>
542
- <tag line="1000" name="param" description="post ID of attachment" type="int" variable="$ID">
543
  <type by_reference="false">int</type>
544
  </tag>
545
- <tag line="1000" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent">
546
  <type by_reference="false">int</type>
547
  </tag>
548
- <tag line="1000" name="return" description="Reference information; see $references array comments" type="array">
549
  <type by_reference="false">array</type>
550
  </tag>
551
  </docblock>
552
- <argument line="1013">
553
  <name>$ID</name>
554
  <default><![CDATA[]]></default>
555
  <type/>
556
  </argument>
557
- <argument line="1013">
558
  <name>$parent</name>
559
  <default><![CDATA[]]></default>
560
  <type/>
561
  </argument>
562
  </method>
563
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1282" package="Media Library Assistant">
564
  <name>mla_flush_mla_galleries</name>
565
  <full_name>mla_flush_mla_galleries</full_name>
566
- <docblock line="1273">
567
  <description><![CDATA[Invalidates the $mla_galleries or $galleries array and cached values]]></description>
568
  <long-description><![CDATA[]]></long-description>
569
- <tag line="1273" name="since" description="1.00"/>
570
- <tag line="1273" name="param" description="name of the gallery's cache/option variable" type="string" variable="$option_name">
571
  <type by_reference="false">string</type>
572
  </tag>
573
- <tag line="1273" name="return" description="" type="void">
574
  <type by_reference="false">void</type>
575
  </tag>
576
  </docblock>
577
- <argument line="1282">
578
  <name>$option_name</name>
579
  <default><![CDATA[]]></default>
580
  <type/>
581
  </argument>
582
  </method>
583
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1306" package="Media Library Assistant">
584
  <name>mla_save_post_action</name>
585
  <full_name>mla_save_post_action</full_name>
586
- <docblock line="1297">
587
  <description><![CDATA[Invalidates $mla_galleries and $galleries arrays and cached values after post, page or attachment updates]]></description>
588
  <long-description><![CDATA[]]></long-description>
589
- <tag line="1297" name="since" description="1.00"/>
590
- <tag line="1297" name="param" description="ID of post/page/attachment; not used at this time" type="integer" variable="$post_id">
591
  <type by_reference="false">integer</type>
592
  </tag>
593
- <tag line="1297" name="return" description="" type="void">
594
  <type by_reference="false">void</type>
595
  </tag>
596
  </docblock>
597
- <argument line="1306">
598
  <name>$post_id</name>
599
  <default><![CDATA[]]></default>
600
  <type/>
601
  </argument>
602
  </method>
603
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1323" package="Media Library Assistant">
604
  <name>_build_mla_galleries</name>
605
  <full_name>_build_mla_galleries</full_name>
606
- <docblock line="1311">
607
  <description><![CDATA[Builds the $mla_galleries or $galleries array]]></description>
608
  <long-description><![CDATA[]]></long-description>
609
- <tag line="1311" name="since" description="0.70"/>
610
- <tag line="1311" name="param" description="name of the gallery's cache/option variable" type="string" variable="$option_name">
611
  <type by_reference="false">string</type>
612
  </tag>
613
- <tag line="1311" name="param" description="by reference to the private static galleries array variable" type="array" variable="$galleries_array">
614
  <type by_reference="false">array</type>
615
  </tag>
616
- <tag line="1311" name="param" description="the shortcode to be searched for and processed" type="string" variable="$shortcode">
617
  <type by_reference="false">string</type>
618
  </tag>
619
- <tag line="1311" name="param" description="true to exclude revisions from the search" type="boolean" variable="$exclude_revisions">
620
  <type by_reference="false">boolean</type>
621
  </tag>
622
- <tag line="1311" name="return" description="true if the galleries array is not empty" type="boolean">
623
  <type by_reference="false">boolean</type>
624
  </tag>
625
  </docblock>
626
- <argument line="1323">
627
  <name>$option_name</name>
628
  <default><![CDATA[]]></default>
629
  <type/>
630
  </argument>
631
- <argument line="1323">
632
  <name>$galleries_array</name>
633
  <default><![CDATA[]]></default>
634
  <type/>
635
  </argument>
636
- <argument line="1323">
637
  <name>$shortcode</name>
638
  <default><![CDATA[]]></default>
639
  <type/>
640
  </argument>
641
- <argument line="1323">
642
  <name>$exclude_revisions</name>
643
  <default><![CDATA[]]></default>
644
  <type/>
645
  </argument>
646
  </method>
647
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1428" package="Media Library Assistant">
648
  <name>_search_mla_galleries</name>
649
  <full_name>_search_mla_galleries</full_name>
650
- <docblock line="1417">
651
  <description><![CDATA[Search the $mla_galleries or $galleries array]]></description>
652
  <long-description><![CDATA[]]></long-description>
653
- <tag line="1417" name="since" description="0.70"/>
654
- <tag line="1417" name="param" description="by reference to the private static galleries array variable" type="array" variable="$galleries_array">
655
  <type by_reference="false">array</type>
656
  </tag>
657
- <tag line="1417" name="param" description="the attachment ID to be searched for and processed" type="int" variable="$attachment_id">
658
  <type by_reference="false">int</type>
659
  </tag>
660
- <tag line="1417" name="return" description="All posts/pages with one or more galleries that include the attachment. The array key is the parent_post ID; each entry contains post_title and post_type." type="array">
661
  <type by_reference="false">array</type>
662
  </tag>
663
  </docblock>
664
- <argument line="1428">
665
  <name>$galleries_array</name>
666
  <default><![CDATA[]]></default>
667
  <type/>
668
  </argument>
669
- <argument line="1428">
670
  <name>$attachment_id</name>
671
  <default><![CDATA[]]></default>
672
  <type/>
673
  </argument>
674
  </method>
675
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1454" package="Media Library Assistant">
676
  <name>mla_exif_metadata_value</name>
677
  <full_name>mla_exif_metadata_value</full_name>
678
- <docblock line="1441">
679
  <description><![CDATA[Parse one EXIF metadata field]]></description>
680
  <long-description><![CDATA[<p>Returns a string value, converting array data to a string as necessary.
681
  Also handles the special pseudo-values 'ALL_EXIF' and 'ALL_IPTC'.</p>]]></long-description>
682
- <tag line="1441" name="since" description="1.13"/>
683
- <tag line="1441" name="param" description="field name" type="string" variable="$key">
684
  <type by_reference="false">string</type>
685
  </tag>
686
- <tag line="1441" name="param" description="metadata array containing 'mla_exif_metadata' and 'mla_iptc_metadata' arrays" type="string" variable="$image_metadata">
687
  <type by_reference="false">string</type>
688
  </tag>
689
- <tag line="1441" name="return" description="string representation of metadata value or an empty string" type="string">
690
  <type by_reference="false">string</type>
691
  </tag>
692
  </docblock>
693
- <argument line="1454">
694
  <name>$key</name>
695
  <default><![CDATA[]]></default>
696
  <type/>
697
  </argument>
698
- <argument line="1454">
699
  <name>$image_metadata</name>
700
  <default><![CDATA[]]></default>
701
  <type/>
702
  </argument>
703
  </method>
704
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1484" package="Media Library Assistant">
705
  <name>mla_fetch_attachment_image_metadata</name>
706
  <full_name>mla_fetch_attachment_image_metadata</full_name>
707
- <docblock line="1472">
708
  <description><![CDATA[Fetch and filter IPTC and EXIF meta data for an image attachment]]></description>
709
  <long-description><![CDATA[<p>Returns</p>]]></long-description>
710
- <tag line="1472" name="since" description="0.90"/>
711
- <tag line="1472" name="param" description="post ID of attachment" type="int" variable="$post_id">
712
  <type by_reference="false">int</type>
713
  </tag>
714
- <tag line="1472" name="param" description="optional; if $post_id is zero, path to the image file." type="string" variable="$path">
715
  <type by_reference="false">string</type>
716
  </tag>
717
- <tag line="1472" name="return" description="Meta data variables" type="array">
718
  <type by_reference="false">array</type>
719
  </tag>
720
  </docblock>
721
- <argument line="1484">
722
  <name>$post_id</name>
723
  <default><![CDATA[]]></default>
724
  <type/>
725
  </argument>
726
- <argument line="1484">
727
  <name>$path</name>
728
  <default><![CDATA['']]></default>
729
  <type/>
730
  </argument>
731
  </method>
732
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1550" package="Media Library Assistant">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
733
  <name>mla_update_single_item</name>
734
  <full_name>mla_update_single_item</full_name>
735
- <docblock line="1537">
736
  <description><![CDATA[Update a single item; change the meta data
737
  for a single attachment.]]></description>
738
  <long-description><![CDATA[]]></long-description>
739
- <tag line="1537" name="since" description="0.1"/>
740
- <tag line="1537" name="param" description="The ID of the attachment to be updated" type="int" variable="$post_id">
741
  <type by_reference="false">int</type>
742
  </tag>
743
- <tag line="1537" name="param" description="Field name =&gt; value pairs" type="array" variable="$new_data">
744
  <type by_reference="false">array</type>
745
  </tag>
746
- <tag line="1537" name="param" description="Optional taxonomy term values, default null" type="array" variable="$tax_input">
747
  <type by_reference="false">array</type>
748
  </tag>
749
- <tag line="1537" name="param" description="Optional taxonomy actions (add, remove, replace), default null" type="array" variable="$tax_actions">
750
  <type by_reference="false">array</type>
751
  </tag>
752
- <tag line="1537" name="return" description="success/failure message and NULL content" type="array">
753
  <type by_reference="false">array</type>
754
  </tag>
755
  </docblock>
756
- <argument line="1550">
757
  <name>$post_id</name>
758
  <default><![CDATA[]]></default>
759
  <type/>
760
  </argument>
761
- <argument line="1550">
762
  <name>$new_data</name>
763
  <default><![CDATA[]]></default>
764
  <type/>
765
  </argument>
766
- <argument line="1550">
767
  <name>$tax_input</name>
768
  <default><![CDATA[NULL]]></default>
769
  <type/>
770
  </argument>
771
- <argument line="1550">
772
  <name>$tax_actions</name>
773
  <default><![CDATA[NULL]]></default>
774
  <type/>
775
  </argument>
776
  </method>
777
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1787" package="Media Library Assistant">
778
  <name>_remove_tags</name>
779
  <full_name>_remove_tags</full_name>
780
- <docblock line="1776">
781
  <description><![CDATA[Remove tags from a term ids list]]></description>
782
  <long-description><![CDATA[]]></long-description>
783
- <tag line="1776" name="since" description="0.40"/>
784
- <tag line="1776" name="param" description="The term ids currently assigned" type="array" variable="$terms_before">
785
  <type by_reference="false">array</type>
786
  </tag>
787
- <tag line="1776" name="param" description="| string The term ids (array) or names (string) to remove" type="array" variable="$tags">
788
  <type by_reference="false">array</type>
789
  </tag>
790
- <tag line="1776" name="param" description="The taxonomy object" type="object" variable="$taxonomy_obj">
791
  <type by_reference="false">object</type>
792
  </tag>
793
- <tag line="1776" name="return" description="Term ids of the surviving tags" type="array">
794
  <type by_reference="false">array</type>
795
  </tag>
796
  </docblock>
797
- <argument line="1787">
798
  <name>$terms_before</name>
799
  <default><![CDATA[]]></default>
800
  <type/>
801
  </argument>
802
- <argument line="1787">
803
  <name>$tags</name>
804
  <default><![CDATA[]]></default>
805
  <type/>
806
  </argument>
807
- <argument line="1787">
808
  <name>$taxonomy_obj</name>
809
  <default><![CDATA[]]></default>
810
  <type/>
811
  </argument>
812
  </method>
813
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1830" package="Media Library Assistant">
814
  <name>_hex_dump</name>
815
  <full_name>_hex_dump</full_name>
816
- <docblock line="1819">
817
  <description><![CDATA[Format printable version of binary data]]></description>
818
  <long-description><![CDATA[]]></long-description>
819
- <tag line="1819" name="since" description="0.90"/>
820
- <tag line="1819" name="param" description="Binary data" type="string" variable="$data">
821
  <type by_reference="false">string</type>
822
  </tag>
823
- <tag line="1819" name="param" description="Bytes to format, default = 0 (all bytes)" type="integer" variable="$limit">
824
  <type by_reference="false">integer</type>
825
  </tag>
826
- <tag line="1819" name="param" description="Bytes to format on each line" type="\intger" variable="$bytes_per_row">
827
  <type by_reference="false">\intger</type>
828
  </tag>
829
- <tag line="1819" name="return" description="Printable representation of $data" type="string">
830
  <type by_reference="false">string</type>
831
  </tag>
832
  </docblock>
833
- <argument line="1830">
834
  <name>$data</name>
835
  <default><![CDATA[]]></default>
836
  <type/>
837
  </argument>
838
- <argument line="1830">
839
  <name>$limit</name>
840
  <default><![CDATA[0]]></default>
841
  <type/>
842
  </argument>
843
- <argument line="1830">
844
  <name>$bytes_per_row</name>
845
  <default><![CDATA[16]]></default>
846
  <type/>
@@ -848,7 +905,7 @@ for a single attachment.]]></description>
848
  </method>
849
  </class>
850
  </file>
851
- <file path="includes\class-mla-edit-media.php" hash="d7a9cb06ea8902203032c6f880e205ff" package="Media Library Assistant">
852
  <docblock line="2">
853
  <description><![CDATA[Media Library Assistant Edit Media screen enhancements]]></description>
854
  <long-description><![CDATA[]]></long-description>
@@ -865,15 +922,15 @@ for a single attachment.]]></description>
865
  <tag line="9" name="package" description="Media Library Assistant"/>
866
  <tag line="9" name="since" description="0.80"/>
867
  </docblock>
868
- <property final="false" static="true" visibility="private" line="197" namespace="global" package="Media Library Assistant">
869
  <name>$mla_references</name>
870
  <default><![CDATA[null]]></default>
871
- <docblock line="187">
872
  <description><![CDATA[Where-used values for the current item]]></description>
873
  <long-description><![CDATA[<p>This array contains the Featured/Inserted/Gallery/MLA Gallery references for the item.
874
  The array is built once each page load and cached for subsequent calls.</p>]]></long-description>
875
- <tag line="187" name="since" description="0.80"/>
876
- <tag line="187" name="var" description="" type="array">
877
  <type by_reference="false">array</type>
878
  </tag>
879
  </docblock>
@@ -941,10 +998,10 @@ The array is built once each page load and cached for subsequent calls.</p>]]></
941
  <description><![CDATA[Registers meta boxes for the Edit Media screen.]]></description>
942
  <long-description><![CDATA[<p>Declared public because it is an action.</p>]]></long-description>
943
  <tag line="108" name="since" description="0.80"/>
944
- <tag line="108" name="param" description="type of the current post, e.g., 'attachment'" type="string" variable="$post_type">
945
  <type by_reference="false">string</type>
946
  </tag>
947
- <tag line="108" name="param" description="current post" type="object" variable="$post">
948
  <type by_reference="false">object</type>
949
  </tag>
950
  <tag line="108" name="return" description="" type="void">
@@ -953,198 +1010,198 @@ The array is built once each page load and cached for subsequent calls.</p>]]></
953
  </docblock>
954
  <argument line="119">
955
  <name>$post_type</name>
956
- <default><![CDATA[]]></default>
957
  <type/>
958
  </argument>
959
  <argument line="119">
960
  <name>$post</name>
961
- <default><![CDATA[]]></default>
962
  <type/>
963
  </argument>
964
  </method>
965
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="149" package="Media Library Assistant">
966
  <name>mla_edit_add_help_tab</name>
967
  <full_name>mla_edit_add_help_tab</full_name>
968
- <docblock line="139">
969
  <description><![CDATA[Add contextual help tabs to the WordPress Edit Media page]]></description>
970
  <long-description><![CDATA[]]></long-description>
971
- <tag line="139" name="since" description="0.90"/>
972
- <tag line="139" name="param" description="title as shown on the screen" type="string" variable="$admin_title">
973
  <type by_reference="false">string</type>
974
  </tag>
975
- <tag line="139" name="param" description="title as shown in the HTML header" type="string" variable="$title">
976
  <type by_reference="false">string</type>
977
  </tag>
978
- <tag line="139" name="return" description="" type="void">
979
  <type by_reference="false">void</type>
980
  </tag>
981
  </docblock>
982
- <argument line="149">
983
  <name>$admin_title</name>
984
  <default><![CDATA[]]></default>
985
  <type/>
986
  </argument>
987
- <argument line="149">
988
  <name>$title</name>
989
  <default><![CDATA[]]></default>
990
  <type/>
991
  </argument>
992
  </method>
993
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="209" package="Media Library Assistant">
994
  <name>mla_parent_info_handler</name>
995
  <full_name>mla_parent_info_handler</full_name>
996
- <docblock line="199">
997
  <description><![CDATA[Renders the Parent Info meta box on the Edit Media page.]]></description>
998
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
999
- <tag line="199" name="since" description="0.80"/>
1000
- <tag line="199" name="param" description="current post" type="object" variable="$post">
1001
  <type by_reference="false">object</type>
1002
  </tag>
1003
- <tag line="199" name="return" description="echoes the HTML markup for the meta box content" type="void">
1004
  <type by_reference="false">void</type>
1005
  </tag>
1006
  </docblock>
1007
- <argument line="209">
1008
  <name>$post</name>
1009
  <default><![CDATA[]]></default>
1010
  <type/>
1011
  </argument>
1012
  </method>
1013
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="234" package="Media Library Assistant">
1014
  <name>mla_menu_order_handler</name>
1015
  <full_name>mla_menu_order_handler</full_name>
1016
- <docblock line="224">
1017
  <description><![CDATA[Renders the Menu Order meta box on the Edit Media page.]]></description>
1018
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1019
- <tag line="224" name="since" description="0.80"/>
1020
- <tag line="224" name="param" description="current post" type="object" variable="$post">
1021
  <type by_reference="false">object</type>
1022
  </tag>
1023
- <tag line="224" name="return" description="echoes the HTML markup for the meta box content" type="void">
1024
  <type by_reference="false">void</type>
1025
  </tag>
1026
  </docblock>
1027
- <argument line="234">
1028
  <name>$post</name>
1029
  <default><![CDATA[]]></default>
1030
  <type/>
1031
  </argument>
1032
  </method>
1033
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="249" package="Media Library Assistant">
1034
  <name>mla_image_metadata_handler</name>
1035
  <full_name>mla_image_metadata_handler</full_name>
1036
- <docblock line="239">
1037
  <description><![CDATA[Renders the Image Metadata meta box on the Edit Media page.]]></description>
1038
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1039
- <tag line="239" name="since" description="0.80"/>
1040
- <tag line="239" name="param" description="current post" type="object" variable="$post">
1041
  <type by_reference="false">object</type>
1042
  </tag>
1043
- <tag line="239" name="return" description="echoes the HTML markup for the meta box content" type="void">
1044
  <type by_reference="false">void</type>
1045
  </tag>
1046
  </docblock>
1047
- <argument line="249">
1048
  <name>$post</name>
1049
  <default><![CDATA[]]></default>
1050
  <type/>
1051
  </argument>
1052
  </method>
1053
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="270" package="Media Library Assistant">
1054
  <name>mla_featured_in_handler</name>
1055
  <full_name>mla_featured_in_handler</full_name>
1056
- <docblock line="260">
1057
  <description><![CDATA[Renders the Featured in meta box on the Edit Media page.]]></description>
1058
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1059
- <tag line="260" name="since" description="0.80"/>
1060
- <tag line="260" name="param" description="current post" type="object" variable="$post">
1061
  <type by_reference="false">object</type>
1062
  </tag>
1063
- <tag line="260" name="return" description="echoes the HTML markup for the meta box content" type="void">
1064
  <type by_reference="false">void</type>
1065
  </tag>
1066
  </docblock>
1067
- <argument line="270">
1068
  <name>$post</name>
1069
  <default><![CDATA[]]></default>
1070
  <type/>
1071
  </argument>
1072
  </method>
1073
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="300" package="Media Library Assistant">
1074
  <name>mla_inserted_in_handler</name>
1075
  <full_name>mla_inserted_in_handler</full_name>
1076
- <docblock line="290">
1077
  <description><![CDATA[Renders the Inserted in meta box on the Edit Media page.]]></description>
1078
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1079
- <tag line="290" name="since" description="0.80"/>
1080
- <tag line="290" name="param" description="current post" type="object" variable="$post">
1081
  <type by_reference="false">object</type>
1082
  </tag>
1083
- <tag line="290" name="return" description="echoes the HTML markup for the meta box content" type="void">
1084
  <type by_reference="false">void</type>
1085
  </tag>
1086
  </docblock>
1087
- <argument line="300">
1088
  <name>$post</name>
1089
  <default><![CDATA[]]></default>
1090
  <type/>
1091
  </argument>
1092
  </method>
1093
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="334" package="Media Library Assistant">
1094
  <name>mla_gallery_in_handler</name>
1095
  <full_name>mla_gallery_in_handler</full_name>
1096
- <docblock line="324">
1097
  <description><![CDATA[Renders the Gallery in meta box on the Edit Media page.]]></description>
1098
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1099
- <tag line="324" name="since" description="0.80"/>
1100
- <tag line="324" name="param" description="current post" type="object" variable="$post">
1101
  <type by_reference="false">object</type>
1102
  </tag>
1103
- <tag line="324" name="return" description="echoes the HTML markup for the meta box content" type="void">
1104
  <type by_reference="false">void</type>
1105
  </tag>
1106
  </docblock>
1107
- <argument line="334">
1108
  <name>$post</name>
1109
  <default><![CDATA[]]></default>
1110
  <type/>
1111
  </argument>
1112
  </method>
1113
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="364" package="Media Library Assistant">
1114
  <name>mla_mla_gallery_in_handler</name>
1115
  <full_name>mla_mla_gallery_in_handler</full_name>
1116
- <docblock line="354">
1117
  <description><![CDATA[Renders the Gallery in meta box on the Edit Media page.]]></description>
1118
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1119
- <tag line="354" name="since" description="0.80"/>
1120
- <tag line="354" name="param" description="current post" type="object" variable="$post">
1121
  <type by_reference="false">object</type>
1122
  </tag>
1123
- <tag line="354" name="return" description="echoes the HTML markup for the meta box content" type="void">
1124
  <type by_reference="false">void</type>
1125
  </tag>
1126
  </docblock>
1127
- <argument line="364">
1128
  <name>$post</name>
1129
  <default><![CDATA[]]></default>
1130
  <type/>
1131
  </argument>
1132
  </method>
1133
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="394" package="Media Library Assistant">
1134
  <name>mla_edit_attachment_action</name>
1135
  <full_name>mla_edit_attachment_action</full_name>
1136
- <docblock line="384">
1137
  <description><![CDATA[Saves updates from the Edit Media screen.]]></description>
1138
  <long-description><![CDATA[<p>Declared public because it is an action.</p>]]></long-description>
1139
- <tag line="384" name="since" description="0.80"/>
1140
- <tag line="384" name="param" description="ID of the current post" type="integer" variable="$post_ID">
1141
  <type by_reference="false">integer</type>
1142
  </tag>
1143
- <tag line="384" name="return" description="" type="void">
1144
  <type by_reference="false">void</type>
1145
  </tag>
1146
  </docblock>
1147
- <argument line="394">
1148
  <name>$post_ID</name>
1149
  <default><![CDATA[]]></default>
1150
  <type/>
@@ -1152,7 +1209,7 @@ The array is built once each page load and cached for subsequent calls.</p>]]></
1152
  </method>
1153
  </class>
1154
  </file>
1155
- <file path="includes\class-mla-list-table.php" hash="79dfb6eeb0c51367132190791c53462e" package="Media Library Assistant">
1156
  <docblock line="2">
1157
  <description><![CDATA[Media Library Assistant extended List Table class]]></description>
1158
  <long-description><![CDATA[]]></long-description>
@@ -1236,10 +1293,10 @@ Custom field columns are added to this array by mla_admin_init_action.</p>]]></l
1236
  </tag>
1237
  </docblock>
1238
  </property>
1239
- <property final="false" static="true" visibility="private" line="156" namespace="global" package="Media Library Assistant">
1240
  <name>$default_sortable_columns</name>
1241
  <default><![CDATA[array('ID_parent' => array('ID', false), 'title_name' => array('title_name', false), 'post_title' => array('post_title', false), 'post_name' => array('post_name', false), 'parent' => array('post_parent', false), 'menu_order' => array('menu_order', false), 'alt_text' => array('_wp_attachment_image_alt', false), 'caption' => array('post_excerpt', false), 'description' => array('post_content', false), 'post_mime_type' => array('post_mime_type', false), 'base_file' => array('_wp_attached_file', false), 'date' => array('post_date', false), 'modified' => array('post_modified', false), 'author' => array('post_author', false), 'attached_to' => array('post_parent', false))]]></default>
1242
- <docblock line="138">
1243
  <description><![CDATA[Sortable column definitions]]></description>
1244
  <long-description><![CDATA[<p>This array defines the table columns that can be sorted. The array key
1245
  is the column slug that needs to be sortable, and the value is database column
@@ -1251,782 +1308,797 @@ sorted by that column. This is computed each time the table is displayed.</p>
1251
 
1252
  <p>Taxonomy columns, if any, are added to this array by mla_admin_init_action.
1253
  Custom field columns are added to this array by mla_admin_init_action.</p>]]></long-description>
1254
- <tag line="138" name="since" description="0.1"/>
1255
- <tag line="138" name="var" description="" type="array">
1256
  <type by_reference="false">array</type>
1257
  </tag>
1258
  </docblock>
1259
  </property>
1260
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="187" package="Media Library Assistant">
1261
  <name>_default_hidden_columns</name>
1262
  <full_name>_default_hidden_columns</full_name>
1263
- <docblock line="180">
1264
  <description><![CDATA[Access the default list of hidden columns]]></description>
1265
  <long-description><![CDATA[]]></long-description>
1266
- <tag line="180" name="since" description="0.1"/>
1267
- <tag line="180" name="return" description="default list of hidden columns" type="array">
1268
  <type by_reference="false">array</type>
1269
  </tag>
1270
  </docblock>
1271
  </method>
1272
- <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="203" package="Media Library Assistant">
1273
  <name>_avail_mime_types</name>
1274
  <full_name>_avail_mime_types</full_name>
1275
- <docblock line="191">
1276
- <description><![CDATA[Get mime types with one or more attachments for view preparation]]></description>
1277
  <long-description><![CDATA[<p>Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
1278
- with additional entries.</p>]]></long-description>
1279
- <tag line="191" name="since" description="0.1"/>
1280
- <tag line="191" name="param" description="Number of posts for each mime type" type="array" variable="$num_posts">
1281
  <type by_reference="false">array</type>
1282
  </tag>
1283
- <tag line="191" name="return" description="Mime type names" type="array">
1284
  <type by_reference="false">array</type>
1285
  </tag>
1286
  </docblock>
1287
- <argument line="203">
1288
  <name>$num_posts</name>
1289
  <default><![CDATA[]]></default>
1290
  <type/>
1291
  </argument>
1292
  </method>
1293
  <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="224" package="Media Library Assistant">
1294
- <name>mla_get_attachment_mime_types</name>
1295
- <full_name>mla_get_attachment_mime_types</full_name>
1296
- <docblock line="214">
1297
- <description><![CDATA[Get possible mime types for view preparation]]></description>
1298
- <long-description><![CDATA[<p>Modeled after get_post_mime_types in wp-includes/post.php,
1299
- with additional entries.</p>]]></long-description>
1300
- <tag line="214" name="since" description="0.1"/>
1301
- <tag line="214" name="return" description="Mime type names and HTML markup for views" type="array">
1302
- <type by_reference="false">array</type>
1303
- </tag>
1304
- </docblock>
1305
- </method>
1306
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="298" package="Media Library Assistant">
1307
  <name>mla_get_taxonomy_filter_dropdown</name>
1308
  <full_name>mla_get_taxonomy_filter_dropdown</full_name>
1309
- <docblock line="289">
1310
  <description><![CDATA[Get dropdown box of terms to filter by, if available]]></description>
1311
  <long-description><![CDATA[]]></long-description>
1312
- <tag line="289" name="since" description="1.20"/>
1313
- <tag line="289" name="param" description="currently selected term_id || zero (default)" type="integer" variable="$selected">
1314
  <type by_reference="false">integer</type>
1315
  </tag>
1316
- <tag line="289" name="return" description="HTML markup for dropdown box" type="string">
1317
  <type by_reference="false">string</type>
1318
  </tag>
1319
  </docblock>
1320
- <argument line="298">
1321
  <name>$selected</name>
1322
  <default><![CDATA[0]]></default>
1323
  <type/>
1324
  </argument>
1325
  </method>
1326
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="343" package="Media Library Assistant">
1327
  <name>mla_get_sortable_columns</name>
1328
  <full_name>mla_get_sortable_columns</full_name>
1329
- <docblock line="336">
1330
  <description><![CDATA[Return the names and display values of the sortable columns]]></description>
1331
  <long-description><![CDATA[]]></long-description>
1332
- <tag line="336" name="since" description="0.30"/>
1333
- <tag line="336" name="return" description="name =&gt; array( orderby value, heading ) for sortable columns" type="array">
1334
  <type by_reference="false">array</type>
1335
  </tag>
1336
  </docblock>
1337
  </method>
1338
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="370" package="Media Library Assistant">
1339
  <name>mla_manage_hidden_columns_filter</name>
1340
  <full_name>mla_manage_hidden_columns_filter</full_name>
1341
- <docblock line="355">
1342
  <description><![CDATA[Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden']]></description>
1343
  <long-description><![CDATA[<p>Required because the screen.php get_hidden_columns function only uses
1344
  the get_user_option result. Set when the file is loaded because the object
1345
  is not created in time for the call from screen.php.</p>]]></long-description>
1346
- <tag line="355" name="since" description="0.1"/>
1347
- <tag line="355" name="param" description="current list of hidden columns, if any" type="string" variable="$result">
1348
  <type by_reference="false">string</type>
1349
  </tag>
1350
- <tag line="355" name="param" description="'managemedia_page_mla-menucolumnshidden'" type="string" variable="$option">
1351
  <type by_reference="false">string</type>
1352
  </tag>
1353
- <tag line="355" name="param" description="WP_User object, if logged in" type="object" variable="$user_data">
1354
  <type by_reference="false">object</type>
1355
  </tag>
1356
- <tag line="355" name="return" description="updated list of hidden columns" type="array">
1357
  <type by_reference="false">array</type>
1358
  </tag>
1359
  </docblock>
1360
- <argument line="370">
1361
  <name>$result</name>
1362
  <default><![CDATA[]]></default>
1363
  <type/>
1364
  </argument>
1365
- <argument line="370">
1366
  <name>$option</name>
1367
  <default><![CDATA[]]></default>
1368
  <type/>
1369
  </argument>
1370
- <argument line="370">
1371
  <name>$user_data</name>
1372
  <default><![CDATA[]]></default>
1373
  <type/>
1374
  </argument>
1375
  </method>
1376
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="388" package="Media Library Assistant">
1377
  <name>mla_manage_columns_filter</name>
1378
  <full_name>mla_manage_columns_filter</full_name>
1379
- <docblock line="377">
1380
  <description><![CDATA[Handler for filter 'manage_media_page_mla-menu_columns']]></description>
1381
  <long-description><![CDATA[<p>This required filter dictates the table's columns and titles. Set when the
1382
  file is loaded because the list_table object isn't created in time
1383
  to affect the "screen options" setup.</p>]]></long-description>
1384
- <tag line="377" name="since" description="0.1"/>
1385
- <tag line="377" name="return" description="list of table columns" type="array">
1386
  <type by_reference="false">array</type>
1387
  </tag>
1388
  </docblock>
1389
  </method>
1390
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="403" package="Media Library Assistant">
1391
  <name>mla_admin_init_action</name>
1392
  <full_name>mla_admin_init_action</full_name>
1393
- <docblock line="393">
1394
- <description><![CDATA[Adds support for taxonomy columns]]></description>
1395
  <long-description><![CDATA[<p>Called in the admin_init action because the list_table object isn't
1396
  created in time to affect the "screen options" setup.</p>]]></long-description>
1397
- <tag line="393" name="since" description="0.30"/>
1398
- <tag line="393" name="return" description="" type="void">
1399
  <type by_reference="false">void</type>
1400
  </tag>
1401
  </docblock>
1402
  </method>
1403
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="429" package="Media Library Assistant">
1404
  <name>__construct</name>
1405
  <full_name>__construct</full_name>
1406
- <docblock line="421">
1407
  <description><![CDATA[Initializes some properties from $_REQUEST vairables, then
1408
  calls the parent constructor to set some default configs.]]></description>
1409
  <long-description><![CDATA[]]></long-description>
1410
- <tag line="421" name="since" description="0.1"/>
1411
- <tag line="421" name="return" description="" type="void">
1412
  <type by_reference="false">void</type>
1413
  </tag>
1414
  </docblock>
1415
  </method>
1416
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="462" package="Media Library Assistant">
1417
  <name>column_default</name>
1418
  <full_name>column_default</full_name>
1419
- <docblock line="449">
1420
  <description><![CDATA[Supply a column value if no column-specific function has been defined]]></description>
1421
- <long-description><![CDATA[<p>Called when the parent class can't find a method specifically built for a
1422
- given column. The taxonomy columns are handled here. All other columns should
1423
- have a specific method, so this function returns a troubleshooting message.</p>]]></long-description>
1424
- <tag line="449" name="since" description="0.1"/>
1425
- <tag line="449" name="param" description="A singular item (one full row's worth of data)" type="array" variable="$item">
1426
  <type by_reference="false">array</type>
1427
  </tag>
1428
- <tag line="449" name="param" description="The name/slug of the column to be processed" type="array" variable="$column_name">
1429
  <type by_reference="false">array</type>
1430
  </tag>
1431
- <tag line="449" name="return" description="Text or HTML to be placed inside the column" type="string">
1432
  <type by_reference="false">string</type>
1433
  </tag>
1434
  </docblock>
1435
- <argument line="462">
1436
  <name>$item</name>
1437
  <default><![CDATA[]]></default>
1438
  <type/>
1439
  </argument>
1440
- <argument line="462">
1441
  <name>$column_name</name>
1442
  <default><![CDATA[]]></default>
1443
  <type/>
1444
  </argument>
1445
  </method>
1446
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="523" package="Media Library Assistant">
1447
  <name>column_cb</name>
1448
  <full_name>column_cb</full_name>
1449
- <docblock line="514">
1450
  <description><![CDATA[Displays checkboxes for using bulk actions.]]></description>
1451
  <long-description><![CDATA[<p>The 'cb' column
1452
  is given special treatment when columns are processed.</p>]]></long-description>
1453
- <tag line="514" name="since" description="0.1"/>
1454
- <tag line="514" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1455
  <type by_reference="false">array</type>
1456
  </tag>
1457
- <tag line="514" name="return" description="HTML markup to be placed inside the column" type="string">
1458
  <type by_reference="false">string</type>
1459
  </tag>
1460
  </docblock>
1461
- <argument line="523">
1462
  <name>$item</name>
1463
  <default><![CDATA[]]></default>
1464
  <type/>
1465
  </argument>
1466
  </method>
1467
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="539" package="Media Library Assistant">
1468
  <name>column_icon</name>
1469
  <full_name>column_icon</full_name>
1470
- <docblock line="531">
1471
  <description><![CDATA[Supply the content for a custom column]]></description>
1472
  <long-description><![CDATA[]]></long-description>
1473
- <tag line="531" name="since" description="0.1"/>
1474
- <tag line="531" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1475
  <type by_reference="false">array</type>
1476
  </tag>
1477
- <tag line="531" name="return" description="HTML markup to be placed inside the column" type="string">
1478
  <type by_reference="false">string</type>
1479
  </tag>
1480
  </docblock>
1481
- <argument line="539">
1482
  <name>$item</name>
1483
  <default><![CDATA[]]></default>
1484
  <type/>
1485
  </argument>
1486
  </method>
1487
- <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="555" package="Media Library Assistant">
1488
  <name>_build_rollover_actions</name>
1489
  <full_name>_build_rollover_actions</full_name>
1490
- <docblock line="544">
1491
  <description><![CDATA[Add rollover actions to exactly one of the following displayed columns:
1492
  'ID_parent', 'title_name', 'post_title', 'post_name']]></description>
1493
  <long-description><![CDATA[]]></long-description>
1494
- <tag line="544" name="since" description="0.1"/>
1495
- <tag line="544" name="param" description="A singular attachment (post) object" type="object" variable="$item">
1496
  <type by_reference="false">object</type>
1497
  </tag>
1498
- <tag line="544" name="param" description="Current column name" type="string" variable="$column">
1499
  <type by_reference="false">string</type>
1500
  </tag>
1501
- <tag line="544" name="return" description="Names and URLs of row-level actions" type="array">
1502
  <type by_reference="false">array</type>
1503
  </tag>
1504
  </docblock>
1505
- <argument line="555">
1506
  <name>$item</name>
1507
  <default><![CDATA[]]></default>
1508
  <type/>
1509
  </argument>
1510
- <argument line="555">
1511
  <name>$column</name>
1512
  <default><![CDATA[]]></default>
1513
  <type/>
1514
  </argument>
1515
  </method>
1516
- <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="633" package="Media Library Assistant">
1517
  <name>_build_inline_data</name>
1518
  <full_name>_build_inline_data</full_name>
1519
- <docblock line="624">
1520
  <description><![CDATA[Add hidden fields with the data for use in the inline editor]]></description>
1521
  <long-description><![CDATA[]]></long-description>
1522
- <tag line="624" name="since" description="0.20"/>
1523
- <tag line="624" name="param" description="A singular attachment (post) object" type="object" variable="$item">
1524
  <type by_reference="false">object</type>
1525
  </tag>
1526
- <tag line="624" name="return" description="HTML &lt;div&gt; with row data" type="string">
1527
  <type by_reference="false">string</type>
1528
  </tag>
1529
  </docblock>
1530
- <argument line="633">
1531
  <name>$item</name>
1532
  <default><![CDATA[]]></default>
1533
  <type/>
1534
  </argument>
1535
  </method>
1536
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="681" package="Media Library Assistant">
1537
  <name>column_ID_parent</name>
1538
  <full_name>column_ID_parent</full_name>
1539
- <docblock line="673">
1540
  <description><![CDATA[Supply the content for a custom column]]></description>
1541
  <long-description><![CDATA[]]></long-description>
1542
- <tag line="673" name="since" description="0.1"/>
1543
- <tag line="673" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1544
  <type by_reference="false">array</type>
1545
  </tag>
1546
- <tag line="673" name="return" description="HTML markup to be placed inside the column" type="string">
1547
  <type by_reference="false">string</type>
1548
  </tag>
1549
  </docblock>
1550
- <argument line="681">
1551
  <name>$item</name>
1552
  <default><![CDATA[]]></default>
1553
  <type/>
1554
  </argument>
1555
  </method>
1556
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="713" package="Media Library Assistant">
1557
  <name>column_title_name</name>
1558
  <full_name>column_title_name</full_name>
1559
- <docblock line="705">
1560
  <description><![CDATA[Supply the content for a custom column]]></description>
1561
  <long-description><![CDATA[]]></long-description>
1562
- <tag line="705" name="since" description="0.1"/>
1563
- <tag line="705" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1564
  <type by_reference="false">array</type>
1565
  </tag>
1566
- <tag line="705" name="return" description="HTML markup to be placed inside the column" type="string">
1567
  <type by_reference="false">string</type>
1568
  </tag>
1569
  </docblock>
1570
- <argument line="713">
1571
  <name>$item</name>
1572
  <default><![CDATA[]]></default>
1573
  <type/>
1574
  </argument>
1575
  </method>
1576
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="736" package="Media Library Assistant">
1577
  <name>column_post_title</name>
1578
  <full_name>column_post_title</full_name>
1579
- <docblock line="728">
1580
  <description><![CDATA[Supply the content for a custom column]]></description>
1581
  <long-description><![CDATA[]]></long-description>
1582
- <tag line="728" name="since" description="0.1"/>
1583
- <tag line="728" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1584
  <type by_reference="false">array</type>
1585
  </tag>
1586
- <tag line="728" name="return" description="HTML markup to be placed inside the column" type="string">
1587
  <type by_reference="false">string</type>
1588
  </tag>
1589
  </docblock>
1590
- <argument line="736">
1591
  <name>$item</name>
1592
  <default><![CDATA[]]></default>
1593
  <type/>
1594
  </argument>
1595
  </method>
1596
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="754" package="Media Library Assistant">
1597
  <name>column_post_name</name>
1598
  <full_name>column_post_name</full_name>
1599
- <docblock line="746">
1600
  <description><![CDATA[Supply the content for a custom column]]></description>
1601
  <long-description><![CDATA[]]></long-description>
1602
- <tag line="746" name="since" description="0.1"/>
1603
- <tag line="746" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1604
  <type by_reference="false">array</type>
1605
  </tag>
1606
- <tag line="746" name="return" description="HTML markup to be placed inside the column" type="string">
1607
  <type by_reference="false">string</type>
1608
  </tag>
1609
  </docblock>
1610
- <argument line="754">
1611
  <name>$item</name>
1612
  <default><![CDATA[]]></default>
1613
  <type/>
1614
  </argument>
1615
  </method>
1616
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="772" package="Media Library Assistant">
1617
  <name>column_parent</name>
1618
  <full_name>column_parent</full_name>
1619
- <docblock line="764">
1620
  <description><![CDATA[Supply the content for a custom column]]></description>
1621
  <long-description><![CDATA[]]></long-description>
1622
- <tag line="764" name="since" description="0.1"/>
1623
- <tag line="764" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1624
  <type by_reference="false">array</type>
1625
  </tag>
1626
- <tag line="764" name="return" description="HTML markup to be placed inside the column" type="string">
1627
  <type by_reference="false">string</type>
1628
  </tag>
1629
  </docblock>
1630
- <argument line="772">
1631
  <name>$item</name>
1632
  <default><![CDATA[]]></default>
1633
  <type/>
1634
  </argument>
1635
  </method>
1636
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="797" package="Media Library Assistant">
1637
  <name>column_menu_order</name>
1638
  <full_name>column_menu_order</full_name>
1639
- <docblock line="789">
1640
  <description><![CDATA[Supply the content for a custom column]]></description>
1641
  <long-description><![CDATA[]]></long-description>
1642
- <tag line="789" name="since" description="0.60"/>
1643
- <tag line="789" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1644
  <type by_reference="false">array</type>
1645
  </tag>
1646
- <tag line="789" name="return" description="HTML markup to be placed inside the column" type="string">
1647
  <type by_reference="false">string</type>
1648
  </tag>
1649
  </docblock>
1650
- <argument line="797">
1651
  <name>$item</name>
1652
  <default><![CDATA[]]></default>
1653
  <type/>
1654
  </argument>
1655
  </method>
1656
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="809" package="Media Library Assistant">
1657
  <name>column_featured</name>
1658
  <full_name>column_featured</full_name>
1659
- <docblock line="801">
1660
  <description><![CDATA[Supply the content for a custom column]]></description>
1661
  <long-description><![CDATA[]]></long-description>
1662
- <tag line="801" name="since" description="0.1"/>
1663
- <tag line="801" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1664
  <type by_reference="false">array</type>
1665
  </tag>
1666
- <tag line="801" name="return" description="HTML markup to be placed inside the column" type="string">
1667
  <type by_reference="false">string</type>
1668
  </tag>
1669
  </docblock>
1670
- <argument line="809">
1671
  <name>$item</name>
1672
  <default><![CDATA[]]></default>
1673
  <type/>
1674
  </argument>
1675
  </method>
1676
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="840" package="Media Library Assistant">
1677
  <name>column_inserted</name>
1678
  <full_name>column_inserted</full_name>
1679
- <docblock line="832">
1680
  <description><![CDATA[Supply the content for a custom column]]></description>
1681
  <long-description><![CDATA[]]></long-description>
1682
- <tag line="832" name="since" description="0.1"/>
1683
- <tag line="832" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1684
  <type by_reference="false">array</type>
1685
  </tag>
1686
- <tag line="832" name="return" description="HTML markup to be placed inside the column" type="string">
1687
  <type by_reference="false">string</type>
1688
  </tag>
1689
  </docblock>
1690
- <argument line="840">
1691
  <name>$item</name>
1692
  <default><![CDATA[]]></default>
1693
  <type/>
1694
  </argument>
1695
  </method>
1696
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="875" package="Media Library Assistant">
1697
  <name>column_galleries</name>
1698
  <full_name>column_galleries</full_name>
1699
- <docblock line="867">
1700
  <description><![CDATA[Supply the content for a custom column]]></description>
1701
  <long-description><![CDATA[]]></long-description>
1702
- <tag line="867" name="since" description="0.70"/>
1703
- <tag line="867" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1704
  <type by_reference="false">array</type>
1705
  </tag>
1706
- <tag line="867" name="return" description="HTML markup to be placed inside the column" type="string">
1707
  <type by_reference="false">string</type>
1708
  </tag>
1709
  </docblock>
1710
- <argument line="875">
1711
  <name>$item</name>
1712
  <default><![CDATA[]]></default>
1713
  <type/>
1714
  </argument>
1715
  </method>
1716
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="906" package="Media Library Assistant">
1717
  <name>column_mla_galleries</name>
1718
  <full_name>column_mla_galleries</full_name>
1719
- <docblock line="898">
1720
  <description><![CDATA[Supply the content for a custom column]]></description>
1721
  <long-description><![CDATA[]]></long-description>
1722
- <tag line="898" name="since" description="0.70"/>
1723
- <tag line="898" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1724
  <type by_reference="false">array</type>
1725
  </tag>
1726
- <tag line="898" name="return" description="HTML markup to be placed inside the column" type="string">
1727
  <type by_reference="false">string</type>
1728
  </tag>
1729
  </docblock>
1730
- <argument line="906">
1731
  <name>$item</name>
1732
  <default><![CDATA[]]></default>
1733
  <type/>
1734
  </argument>
1735
  </method>
1736
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="937" package="Media Library Assistant">
1737
  <name>column_alt_text</name>
1738
  <full_name>column_alt_text</full_name>
1739
- <docblock line="929">
1740
  <description><![CDATA[Supply the content for a custom column]]></description>
1741
  <long-description><![CDATA[]]></long-description>
1742
- <tag line="929" name="since" description="0.1"/>
1743
- <tag line="929" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1744
  <type by_reference="false">array</type>
1745
  </tag>
1746
- <tag line="929" name="return" description="HTML markup to be placed inside the column" type="string">
1747
  <type by_reference="false">string</type>
1748
  </tag>
1749
  </docblock>
1750
- <argument line="937">
1751
  <name>$item</name>
1752
  <default><![CDATA[]]></default>
1753
  <type/>
1754
  </argument>
1755
  </method>
1756
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="957" package="Media Library Assistant">
1757
  <name>column_caption</name>
1758
  <full_name>column_caption</full_name>
1759
- <docblock line="949">
1760
  <description><![CDATA[Supply the content for a custom column]]></description>
1761
  <long-description><![CDATA[]]></long-description>
1762
- <tag line="949" name="since" description="0.1"/>
1763
- <tag line="949" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1764
  <type by_reference="false">array</type>
1765
  </tag>
1766
- <tag line="949" name="return" description="HTML markup to be placed inside the column" type="string">
1767
  <type by_reference="false">string</type>
1768
  </tag>
1769
  </docblock>
1770
- <argument line="957">
1771
  <name>$item</name>
1772
  <default><![CDATA[]]></default>
1773
  <type/>
1774
  </argument>
1775
  </method>
1776
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="969" package="Media Library Assistant">
1777
  <name>column_description</name>
1778
  <full_name>column_description</full_name>
1779
- <docblock line="961">
1780
  <description><![CDATA[Supply the content for a custom column]]></description>
1781
  <long-description><![CDATA[]]></long-description>
1782
- <tag line="961" name="since" description="0.1"/>
1783
- <tag line="961" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1784
  <type by_reference="false">array</type>
1785
  </tag>
1786
- <tag line="961" name="return" description="HTML markup to be placed inside the column" type="string">
1787
  <type by_reference="false">string</type>
1788
  </tag>
1789
  </docblock>
1790
- <argument line="969">
1791
  <name>$item</name>
1792
  <default><![CDATA[]]></default>
1793
  <type/>
1794
  </argument>
1795
  </method>
1796
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="981" package="Media Library Assistant">
1797
  <name>column_post_mime_type</name>
1798
  <full_name>column_post_mime_type</full_name>
1799
- <docblock line="973">
1800
  <description><![CDATA[Supply the content for a custom column]]></description>
1801
  <long-description><![CDATA[]]></long-description>
1802
- <tag line="973" name="since" description="0.30"/>
1803
- <tag line="973" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1804
  <type by_reference="false">array</type>
1805
  </tag>
1806
- <tag line="973" name="return" description="HTML markup to be placed inside the column" type="string">
1807
  <type by_reference="false">string</type>
1808
  </tag>
1809
  </docblock>
1810
- <argument line="981">
1811
  <name>$item</name>
1812
  <default><![CDATA[]]></default>
1813
  <type/>
1814
  </argument>
1815
  </method>
1816
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="993" package="Media Library Assistant">
1817
  <name>column_base_file</name>
1818
  <full_name>column_base_file</full_name>
1819
- <docblock line="985">
1820
  <description><![CDATA[Supply the content for a custom column]]></description>
1821
  <long-description><![CDATA[]]></long-description>
1822
- <tag line="985" name="since" description="0.1"/>
1823
- <tag line="985" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1824
  <type by_reference="false">array</type>
1825
  </tag>
1826
- <tag line="985" name="return" description="HTML markup to be placed inside the column" type="string">
1827
  <type by_reference="false">string</type>
1828
  </tag>
1829
  </docblock>
1830
- <argument line="993">
1831
  <name>$item</name>
1832
  <default><![CDATA[]]></default>
1833
  <type/>
1834
  </argument>
1835
  </method>
1836
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1005" package="Media Library Assistant">
1837
  <name>column_date</name>
1838
  <full_name>column_date</full_name>
1839
- <docblock line="997">
1840
  <description><![CDATA[Supply the content for a custom column]]></description>
1841
  <long-description><![CDATA[]]></long-description>
1842
- <tag line="997" name="since" description="0.1"/>
1843
- <tag line="997" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1844
  <type by_reference="false">array</type>
1845
  </tag>
1846
- <tag line="997" name="return" description="HTML markup to be placed inside the column" type="string">
1847
  <type by_reference="false">string</type>
1848
  </tag>
1849
  </docblock>
1850
- <argument line="1005">
1851
  <name>$item</name>
1852
  <default><![CDATA[]]></default>
1853
  <type/>
1854
  </argument>
1855
  </method>
1856
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1034" package="Media Library Assistant">
1857
  <name>column_modified</name>
1858
  <full_name>column_modified</full_name>
1859
- <docblock line="1026">
1860
  <description><![CDATA[Supply the content for a custom column]]></description>
1861
  <long-description><![CDATA[]]></long-description>
1862
- <tag line="1026" name="since" description="0.30"/>
1863
- <tag line="1026" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1864
  <type by_reference="false">array</type>
1865
  </tag>
1866
- <tag line="1026" name="return" description="HTML markup to be placed inside the column" type="string">
1867
  <type by_reference="false">string</type>
1868
  </tag>
1869
  </docblock>
1870
- <argument line="1034">
1871
  <name>$item</name>
1872
  <default><![CDATA[]]></default>
1873
  <type/>
1874
  </argument>
1875
  </method>
1876
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1063" package="Media Library Assistant">
1877
  <name>column_author</name>
1878
  <full_name>column_author</full_name>
1879
- <docblock line="1055">
1880
  <description><![CDATA[Supply the content for a custom column]]></description>
1881
  <long-description><![CDATA[]]></long-description>
1882
- <tag line="1055" name="since" description="0.30"/>
1883
- <tag line="1055" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1884
  <type by_reference="false">array</type>
1885
  </tag>
1886
- <tag line="1055" name="return" description="HTML markup to be placed inside the column" type="string">
1887
  <type by_reference="false">string</type>
1888
  </tag>
1889
  </docblock>
1890
- <argument line="1063">
1891
  <name>$item</name>
1892
  <default><![CDATA[]]></default>
1893
  <type/>
1894
  </argument>
1895
  </method>
1896
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1084" package="Media Library Assistant">
1897
  <name>column_attached_to</name>
1898
  <full_name>column_attached_to</full_name>
1899
- <docblock line="1076">
1900
  <description><![CDATA[Supply the content for a custom column]]></description>
1901
  <long-description><![CDATA[]]></long-description>
1902
- <tag line="1076" name="since" description="0.1"/>
1903
- <tag line="1076" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1904
  <type by_reference="false">array</type>
1905
  </tag>
1906
- <tag line="1076" name="return" description="HTML markup to be placed inside the column" type="string">
1907
  <type by_reference="false">string</type>
1908
  </tag>
1909
  </docblock>
1910
- <argument line="1084">
1911
  <name>$item</name>
1912
  <default><![CDATA[]]></default>
1913
  <type/>
1914
  </argument>
1915
  </method>
1916
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1113" package="Media Library Assistant">
1917
  <name>get_columns</name>
1918
  <full_name>get_columns</full_name>
1919
- <docblock line="1106">
1920
  <description><![CDATA[This method dictates the table's columns and titles]]></description>
1921
  <long-description><![CDATA[]]></long-description>
1922
- <tag line="1106" name="since" description="0.1"/>
1923
- <tag line="1106" name="return" description="Column information: 'slugs'=&gt;'Visible Titles'" type="array">
1924
  <type by_reference="false">array</type>
1925
  </tag>
1926
  </docblock>
1927
  </method>
1928
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1125" package="Media Library Assistant">
1929
  <name>get_hidden_columns</name>
1930
  <full_name>get_hidden_columns</full_name>
1931
- <docblock line="1117">
1932
  <description><![CDATA[Returns the list of currently hidden columns from a user option or
1933
  from default values if the option is not set]]></description>
1934
  <long-description><![CDATA[]]></long-description>
1935
- <tag line="1117" name="since" description="0.1"/>
1936
- <tag line="1117" name="return" description="Column information,e.g., array(0 =&gt; 'ID_parent, 1 =&gt; 'title_name')" type="array">
1937
  <type by_reference="false">array</type>
1938
  </tag>
1939
  </docblock>
1940
  </method>
1941
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1145" package="Media Library Assistant">
1942
  <name>get_sortable_columns</name>
1943
  <full_name>get_sortable_columns</full_name>
1944
- <docblock line="1135">
1945
  <description><![CDATA[Returns an array where the key is the column that needs to be sortable
1946
  and the value is db column to sort by.]]></description>
1947
  <long-description><![CDATA[<p>Also notes the current sort column,
1948
  if set.</p>]]></long-description>
1949
- <tag line="1135" name="since" description="0.1"/>
1950
- <tag line="1135" name="return" description="Sortable column information,e.g., 'slugs'=&gt;array('data_values',boolean)" type="array">
1951
  <type by_reference="false">array</type>
1952
  </tag>
1953
  </docblock>
1954
  </method>
1955
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1172" package="Media Library Assistant">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1956
  <name>get_views</name>
1957
  <full_name>get_views</full_name>
1958
- <docblock line="1164">
1959
  <description><![CDATA[Returns an associative array listing all the views that can be used with this table.]]></description>
1960
  <long-description><![CDATA[<p>These are listed across the top of the page and managed by WordPress.</p>]]></long-description>
1961
- <tag line="1164" name="since" description="0.1"/>
1962
- <tag line="1164" name="return" description="View information,e.g., array ( id =&gt; link )" type="array">
1963
  <type by_reference="false">array</type>
1964
  </tag>
1965
  </docblock>
1966
  </method>
1967
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1247" package="Media Library Assistant">
1968
  <name>get_bulk_actions</name>
1969
  <full_name>get_bulk_actions</full_name>
1970
- <docblock line="1239">
1971
  <description><![CDATA[Get an associative array ( option_name => option_title ) with the list
1972
  of bulk actions available on this table.]]></description>
1973
  <long-description><![CDATA[]]></long-description>
1974
- <tag line="1239" name="since" description="0.1"/>
1975
- <tag line="1239" name="return" description="Contains all the bulk actions: 'slugs'=&gt;'Visible Titles'" type="array">
1976
  <type by_reference="false">array</type>
1977
  </tag>
1978
  </docblock>
1979
  </method>
1980
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1278" package="Media Library Assistant">
1981
  <name>extra_tablenav</name>
1982
  <full_name>extra_tablenav</full_name>
1983
- <docblock line="1267">
1984
  <description><![CDATA[Extra controls to be displayed between bulk actions and pagination]]></description>
1985
  <long-description><![CDATA[<p>Modeled after class-wp-posts-list-table.php in wp-admin/includes.</p>]]></long-description>
1986
- <tag line="1267" name="since" description="0.1"/>
1987
- <tag line="1267" name="param" description="'top' or 'bottom', i.e., above or below the table rows" type="string" variable="$which">
1988
  <type by_reference="false">string</type>
1989
  </tag>
1990
- <tag line="1267" name="return" description="Contains all the bulk actions: 'slugs'=&gt;'Visible Titles'" type="array">
1991
  <type by_reference="false">array</type>
1992
  </tag>
1993
  </docblock>
1994
- <argument line="1278">
1995
  <name>$which</name>
1996
  <default><![CDATA[]]></default>
1997
  <type/>
1998
  </argument>
1999
  </method>
2000
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1311" package="Media Library Assistant">
2001
  <name>prepare_items</name>
2002
  <full_name>prepare_items</full_name>
2003
- <docblock line="1299">
2004
  <description><![CDATA[Prepares the list of items for displaying]]></description>
2005
  <long-description><![CDATA[<p>This is where you prepare your data for display. This method will usually
2006
  be used to query the database, sort and filter the data, and generally
2007
  get it ready to be displayed. At a minimum, we should set $this->items and
2008
  $this->set_pagination_args().</p>]]></long-description>
2009
- <tag line="1299" name="since" description="0.1"/>
2010
- <tag line="1299" name="return" description="" type="void">
2011
  <type by_reference="false">void</type>
2012
  </tag>
2013
  </docblock>
2014
  </method>
2015
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1357" package="Media Library Assistant">
2016
  <name>single_row</name>
2017
  <full_name>single_row</full_name>
2018
- <docblock line="1348">
2019
  <description><![CDATA[Generates (echoes) content for a single row of the table]]></description>
2020
  <long-description><![CDATA[]]></long-description>
2021
- <tag line="1348" name="since" description=".20"/>
2022
- <tag line="1348" name="param" description="the current item" type="object" variable="$item">
2023
  <type by_reference="false">object</type>
2024
  </tag>
2025
- <tag line="1348" name="return" description="Echoes the row HTML" type="void">
2026
  <type by_reference="false">void</type>
2027
  </tag>
2028
  </docblock>
2029
- <argument line="1357">
2030
  <name>$item</name>
2031
  <default><![CDATA[]]></default>
2032
  <type/>
@@ -2034,7 +2106,7 @@ $this->set_pagination_args().</p>]]></long-description>
2034
  </method>
2035
  </class>
2036
  </file>
2037
- <file path="includes\class-mla-main.php" hash="6241c686a8c3e5cdad70d861c20d578f" package="Media Library Assistant">
2038
  <docblock line="2">
2039
  <description><![CDATA[Top-level functions for the Media Library Assistant]]></description>
2040
  <long-description><![CDATA[]]></long-description>
@@ -2071,7 +2143,7 @@ of images and files held in the WordPress Media Library.]]></description>
2071
  <constant namespace="global" line="41" package="Media Library Assistant">
2072
  <name>CURRENT_MLA_VERSION</name>
2073
  <full_name>CURRENT_MLA_VERSION</full_name>
2074
- <value><![CDATA['1.30']]></value>
2075
  <docblock line="34">
2076
  <description><![CDATA[Current version number]]></description>
2077
  <long-description><![CDATA[]]></long-description>
@@ -2339,113 +2411,113 @@ add filter to clean up taxonomy submenu labels.</p>]]></long-description>
2339
  </tag>
2340
  </docblock>
2341
  </method>
2342
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="347" package="Media Library Assistant">
2343
  <name>mla_add_menu_options</name>
2344
  <full_name>mla_add_menu_options</full_name>
2345
- <docblock line="340">
2346
  <description><![CDATA[Add the "XX Entries per page" filter to the Screen Options tab]]></description>
2347
  <long-description><![CDATA[]]></long-description>
2348
- <tag line="340" name="since" description="0.1"/>
2349
- <tag line="340" name="return" description="" type="void">
2350
  <type by_reference="false">void</type>
2351
  </tag>
2352
  </docblock>
2353
  </method>
2354
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="366" package="Media Library Assistant">
2355
  <name>mla_add_help_tab</name>
2356
  <full_name>mla_add_help_tab</full_name>
2357
- <docblock line="359">
2358
  <description><![CDATA[Add contextual help tabs to all the MLA pages]]></description>
2359
  <long-description><![CDATA[]]></long-description>
2360
- <tag line="359" name="since" description="0.1"/>
2361
- <tag line="359" name="return" description="" type="void">
2362
  <type by_reference="false">void</type>
2363
  </tag>
2364
  </docblock>
2365
  </method>
2366
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="455" package="Media Library Assistant">
2367
  <name>mla_screen_options_show_screen_filter</name>
2368
  <full_name>mla_screen_options_show_screen_filter</full_name>
2369
- <docblock line="445">
2370
  <description><![CDATA[Only show screen options on the table-list screen]]></description>
2371
  <long-description><![CDATA[]]></long-description>
2372
- <tag line="445" name="since" description="0.1"/>
2373
- <tag line="445" name="param" description="True to display &quot;Screen Options&quot;, false to suppress them" type="boolean" variable="$show_screen">
2374
  <type by_reference="false">boolean</type>
2375
  </tag>
2376
- <tag line="445" name="param" description="Name of the page being loaded" type="string" variable="$this_screen">
2377
  <type by_reference="false">string</type>
2378
  </tag>
2379
- <tag line="445" name="return" description="True to display &quot;Screen Options&quot;, false to suppress them" type="boolean">
2380
  <type by_reference="false">boolean</type>
2381
  </tag>
2382
  </docblock>
2383
- <argument line="455">
2384
  <name>$show_screen</name>
2385
  <default><![CDATA[]]></default>
2386
  <type/>
2387
  </argument>
2388
- <argument line="455">
2389
  <name>$this_screen</name>
2390
  <default><![CDATA[]]></default>
2391
  <type/>
2392
  </argument>
2393
  </method>
2394
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="473" package="Media Library Assistant">
2395
  <name>mla_set_screen_option_filter</name>
2396
  <full_name>mla_set_screen_option_filter</full_name>
2397
- <docblock line="462">
2398
  <description><![CDATA[Save the "Entries per page" option set by this user]]></description>
2399
  <long-description><![CDATA[]]></long-description>
2400
- <tag line="462" name="since" description="0.1"/>
2401
- <tag line="462" name="param" description="Unknown - always false?" type="boolean" variable="$status">
2402
- <type by_reference="false">boolean</type>
2403
  </tag>
2404
- <tag line="462" name="param" description="Name of the option being changed" type="string" variable="$option">
2405
  <type by_reference="false">string</type>
2406
  </tag>
2407
- <tag line="462" name="param" description="New value of the option" type="string" variable="$value">
2408
  <type by_reference="false">string</type>
2409
  </tag>
2410
- <tag line="462" name="return" description="New value if this is our option, otherwise nothing" type="string|void">
2411
  <type by_reference="false">string</type>
2412
  <type by_reference="false">void</type>
2413
  </tag>
2414
  </docblock>
2415
- <argument line="473">
2416
  <name>$status</name>
2417
  <default><![CDATA[]]></default>
2418
  <type/>
2419
  </argument>
2420
- <argument line="473">
2421
  <name>$option</name>
2422
  <default><![CDATA[]]></default>
2423
  <type/>
2424
  </argument>
2425
- <argument line="473">
2426
  <name>$value</name>
2427
  <default><![CDATA[]]></default>
2428
  <type/>
2429
  </argument>
2430
  </method>
2431
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="490" package="Media Library Assistant">
2432
  <name>mla_edit_tax_redirect</name>
2433
  <full_name>mla_edit_tax_redirect</full_name>
2434
- <docblock line="479">
2435
  <description><![CDATA[Redirect to the Edit Tags/Categories page]]></description>
2436
  <long-description><![CDATA[<p>The custom taxonomy add/edit submenu entries go to "upload.php" by default.
2437
  This filter is the only way to redirect them to the correct WordPress page.
2438
  The filter is not required for WordPress 3.5 and later.</p>]]></long-description>
2439
- <tag line="479" name="since" description="0.1"/>
2440
- <tag line="479" name="return" description="" type="void">
2441
  <type by_reference="false">void</type>
2442
  </tag>
2443
  </docblock>
2444
  </method>
2445
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="523" package="Media Library Assistant">
2446
  <name>mla_parent_file_filter</name>
2447
  <full_name>mla_parent_file_filter</full_name>
2448
- <docblock line="507">
2449
  <description><![CDATA[Cleanup menus for Edit Tags/Categories page]]></description>
2450
  <long-description><![CDATA[<p>For WordPress before 3.5, the submenu entries for custom taxonomies
2451
  under the "Media" menu are not set up correctly by WordPress, so this
@@ -2453,190 +2525,190 @@ function cleans them up, redirecting the request to the right WordPress
2453
  page for editing/adding taxonomy terms.
2454
  For WordPress 3.5 and later, the function fixes the submenu bolding when
2455
  going to the Edit Media screen.</p>]]></long-description>
2456
- <tag line="507" name="since" description="0.1"/>
2457
- <tag line="507" name="param" description="The top-level menu page" type="array" variable="$parent_file">
2458
  <type by_reference="false">array</type>
2459
  </tag>
2460
- <tag line="507" name="return" description="The updated top-level menu page" type="string">
2461
  <type by_reference="false">string</type>
2462
  </tag>
2463
  </docblock>
2464
- <argument line="523">
2465
  <name>$parent_file</name>
2466
  <default><![CDATA[]]></default>
2467
  <type/>
2468
  </argument>
2469
  </method>
2470
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="566" package="Media Library Assistant">
2471
  <name>mla_render_admin_page</name>
2472
  <full_name>mla_render_admin_page</full_name>
2473
- <docblock line="559">
2474
  <description><![CDATA[Render the "Assistant" subpage in the Media section, using the list_table package]]></description>
2475
  <long-description><![CDATA[]]></long-description>
2476
- <tag line="559" name="since" description="0.1"/>
2477
- <tag line="559" name="return" description="" type="void">
2478
  <type by_reference="false">void</type>
2479
  </tag>
2480
  </docblock>
2481
  </method>
2482
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="850" package="Media Library Assistant">
2483
  <name>mla_inline_edit_action</name>
2484
  <full_name>mla_inline_edit_action</full_name>
2485
- <docblock line="841">
2486
  <description><![CDATA[Ajax handler for inline editing (quick and bulk edit)]]></description>
2487
  <long-description><![CDATA[<p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p>]]></long-description>
2488
- <tag line="841" name="since" description="0.20"/>
2489
- <tag line="841" name="return" description="echo HTML &lt;tr&gt; markup for updated row or error message, then die()" type="void">
2490
  <type by_reference="false">void</type>
2491
  </tag>
2492
  </docblock>
2493
  </method>
2494
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="945" package="Media Library Assistant">
2495
  <name>_build_inline_edit_form</name>
2496
  <full_name>_build_inline_edit_form</full_name>
2497
- <docblock line="934">
2498
  <description><![CDATA[Build the hidden row templates for inline editing (quick and bulk edit)]]></description>
2499
  <long-description><![CDATA[<p>inspired by inline_edit() in wp-admin\includes\class-wp-posts-list-table.php.</p>]]></long-description>
2500
- <tag line="934" name="since" description="0.20"/>
2501
- <tag line="934" name="param" description="MLA List Table object" type="object" variable="$MLAListTable">
2502
  <type by_reference="false">object</type>
2503
  </tag>
2504
- <tag line="934" name="return" description="HTML &lt;form&gt; markup for hidden rows" type="string">
2505
  <type by_reference="false">string</type>
2506
  </tag>
2507
  </docblock>
2508
- <argument line="945">
2509
  <name>$MLAListTable</name>
2510
  <default><![CDATA[]]></default>
2511
  <type/>
2512
  </argument>
2513
  </method>
2514
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1102" package="Media Library Assistant">
2515
  <name>_authors_dropdown</name>
2516
  <full_name>_authors_dropdown</full_name>
2517
- <docblock line="1091">
2518
  <description><![CDATA[Get the edit Authors dropdown box, if user has suitable permissions]]></description>
2519
  <long-description><![CDATA[]]></long-description>
2520
- <tag line="1091" name="since" description="0.20"/>
2521
- <tag line="1091" name="param" description="Optional User ID of the current author, default 0" type="integer" variable="$author">
2522
  <type by_reference="false">integer</type>
2523
  </tag>
2524
- <tag line="1091" name="param" description="Optional HTML name attribute, default 'post_author'" type="string" variable="$name">
2525
  <type by_reference="false">string</type>
2526
  </tag>
2527
- <tag line="1091" name="param" description="Optional HTML class attribute, default 'authors'" type="string" variable="$class">
2528
  <type by_reference="false">string</type>
2529
  </tag>
2530
- <tag line="1091" name="return" description="HTML markup for the dropdown field or False" type="string|false">
2531
  <type by_reference="false">string</type>
2532
  <type by_reference="false">false</type>
2533
  </tag>
2534
  </docblock>
2535
- <argument line="1102">
2536
  <name>$author</name>
2537
  <default><![CDATA[0]]></default>
2538
  <type/>
2539
  </argument>
2540
- <argument line="1102">
2541
  <name>$name</name>
2542
  <default><![CDATA['post_author']]></default>
2543
  <type/>
2544
  </argument>
2545
- <argument line="1102">
2546
  <name>$class</name>
2547
  <default><![CDATA['authors']]></default>
2548
  <type/>
2549
  </argument>
2550
  </method>
2551
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1136" package="Media Library Assistant">
2552
  <name>_current_bulk_action</name>
2553
  <full_name>_current_bulk_action</full_name>
2554
- <docblock line="1129">
2555
  <description><![CDATA[Get the current action selected from the bulk actions dropdown]]></description>
2556
  <long-description><![CDATA[]]></long-description>
2557
- <tag line="1129" name="since" description="0.1"/>
2558
- <tag line="1129" name="return" description="The action name or False if no action was selected" type="string|false">
2559
  <type by_reference="false">string</type>
2560
  <type by_reference="false">false</type>
2561
  </tag>
2562
  </docblock>
2563
  </method>
2564
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1165" package="Media Library Assistant">
2565
  <name>_delete_single_item</name>
2566
  <full_name>_delete_single_item</full_name>
2567
- <docblock line="1156">
2568
  <description><![CDATA[Delete a single item permanently]]></description>
2569
  <long-description><![CDATA[]]></long-description>
2570
- <tag line="1156" name="since" description="0.1"/>
2571
- <tag line="1156" name="param" description="The form POST data" type="array" variable="$post_id">
2572
  <type by_reference="false">array</type>
2573
  </tag>
2574
- <tag line="1156" name="return" description="success/failure message and NULL content" type="array">
2575
  <type by_reference="false">array</type>
2576
  </tag>
2577
  </docblock>
2578
- <argument line="1165">
2579
  <name>$post_id</name>
2580
  <default><![CDATA[]]></default>
2581
  <type/>
2582
  </argument>
2583
  </method>
2584
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1196" package="Media Library Assistant">
2585
  <name>_display_single_item</name>
2586
  <full_name>_display_single_item</full_name>
2587
- <docblock line="1184">
2588
  <description><![CDATA[Display a single item sub page; prepare the form to
2589
  change the meta data for a single attachment.]]></description>
2590
  <long-description><![CDATA[<p>This function is not used in WordPress 3.5 and later.</p>]]></long-description>
2591
- <tag line="1184" name="since" description="0.1"/>
2592
- <tag line="1184" name="param" description="The WordPress Post ID of the attachment item" type="int" variable="$post_id">
2593
  <type by_reference="false">int</type>
2594
  </tag>
2595
- <tag line="1184" name="return" description="message and/or HTML content" type="array">
2596
  <type by_reference="false">array</type>
2597
  </tag>
2598
  </docblock>
2599
- <argument line="1196">
2600
  <name>$post_id</name>
2601
  <default><![CDATA[]]></default>
2602
  <type/>
2603
  </argument>
2604
  </method>
2605
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1436" package="Media Library Assistant">
2606
  <name>_restore_single_item</name>
2607
  <full_name>_restore_single_item</full_name>
2608
- <docblock line="1427">
2609
  <description><![CDATA[Restore a single item from the Trash]]></description>
2610
  <long-description><![CDATA[]]></long-description>
2611
- <tag line="1427" name="since" description="0.1"/>
2612
- <tag line="1427" name="param" description="The form POST data" type="array" variable="$post_id">
2613
  <type by_reference="false">array</type>
2614
  </tag>
2615
- <tag line="1427" name="return" description="success/failure message and NULL content" type="array">
2616
  <type by_reference="false">array</type>
2617
  </tag>
2618
  </docblock>
2619
- <argument line="1436">
2620
  <name>$post_id</name>
2621
  <default><![CDATA[]]></default>
2622
  <type/>
2623
  </argument>
2624
  </method>
2625
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1472" package="Media Library Assistant">
2626
  <name>_trash_single_item</name>
2627
  <full_name>_trash_single_item</full_name>
2628
- <docblock line="1463">
2629
  <description><![CDATA[Move a single item to Trash]]></description>
2630
  <long-description><![CDATA[]]></long-description>
2631
- <tag line="1463" name="since" description="0.1"/>
2632
- <tag line="1463" name="param" description="The form POST data" type="array" variable="$post_id">
2633
  <type by_reference="false">array</type>
2634
  </tag>
2635
- <tag line="1463" name="return" description="success/failure message and NULL content" type="array">
2636
  <type by_reference="false">array</type>
2637
  </tag>
2638
  </docblock>
2639
- <argument line="1472">
2640
  <name>$post_id</name>
2641
  <default><![CDATA[]]></default>
2642
  <type/>
@@ -2644,7 +2716,7 @@ change the meta data for a single attachment.]]></description>
2644
  </method>
2645
  </class>
2646
  </file>
2647
- <file path="includes\class-mla-media-modal.php" hash="244586f6e6d0d92297de5a75ddbd04b8" package="Media Library Assistant">
2648
  <docblock line="2">
2649
  <description><![CDATA[Media Library Assistant Media Manager enhancements]]></description>
2650
  <long-description><![CDATA[]]></long-description>
@@ -2871,1996 +2943,5360 @@ and mla_print_media_templates_action]]></description>
2871
  </method>
2872
  </class>
2873
  </file>
2874
- <file path="includes\class-mla-objects.php" hash="67d003379547ffd329a3236834ad6bf3" package="Media Library Assistant">
2875
  <docblock line="2">
2876
- <description><![CDATA[Media Library Assistant Custom Taxonomy and Post Type objects]]></description>
2877
  <long-description><![CDATA[]]></long-description>
2878
  <tag line="2" name="package" description="Media Library Assistant"/>
2879
- <tag line="2" name="since" description="0.1"/>
2880
  </docblock>
2881
- <class final="false" abstract="false" namespace="global" line="15" package="Media Library Assistant">
2882
  <extends/>
2883
- <name>MLAObjects</name>
2884
- <full_name>\MLAObjects</full_name>
2885
  <docblock line="9">
2886
- <description><![CDATA[Class MLA (Media Library Assistant) Objects defines and manages custom taxonomies for Attachment Categories and Tags]]></description>
 
2887
  <long-description><![CDATA[]]></long-description>
2888
  <tag line="9" name="package" description="Media Library Assistant"/>
2889
- <tag line="9" name="since" description="0.20"/>
2890
  </docblock>
2891
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="23" package="Media Library Assistant">
2892
- <name>initialize</name>
2893
- <full_name>initialize</full_name>
2894
- <docblock line="16">
2895
- <description><![CDATA[Initialization function, similar to __construct()]]></description>
2896
  <long-description><![CDATA[]]></long-description>
2897
- <tag line="16" name="since" description="0.20"/>
2898
- <tag line="16" name="return" description="" type="void">
2899
- <type by_reference="false">void</type>
2900
  </tag>
2901
  </docblock>
2902
- </method>
2903
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="34" package="Media Library Assistant">
2904
- <name>_build_taxonomies</name>
2905
- <full_name>_build_taxonomies</full_name>
2906
- <docblock line="27">
2907
- <description><![CDATA[Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters]]></description>
2908
  <long-description><![CDATA[]]></long-description>
2909
- <tag line="27" name="since" description="0.1"/>
2910
- <tag line="27" name="return" description="" type="void">
2911
- <type by_reference="false">void</type>
2912
  </tag>
2913
  </docblock>
2914
- </method>
2915
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="116" package="Media Library Assistant">
2916
- <name>mla_taxonomy_get_columns_filter</name>
2917
- <full_name>mla_taxonomy_get_columns_filter</full_name>
2918
- <docblock line="106">
2919
- <description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
2920
- which replaces the "Posts" column with an equivalent "Attachments" column.]]></description>
2921
  <long-description><![CDATA[]]></long-description>
2922
- <tag line="106" name="since" description="0.30"/>
2923
- <tag line="106" name="param" description="column definitions for the edit taxonomy list table" type="array" variable="$columns">
2924
  <type by_reference="false">array</type>
2925
  </tag>
2926
- <tag line="106" name="return" description="updated column definitions for the edit taxonomy list table" type="array">
2927
- <type by_reference="false">array</type>
 
 
 
 
 
 
 
 
 
2928
  </tag>
2929
  </docblock>
2930
- <argument line="116">
2931
- <name>$columns</name>
2932
- <default><![CDATA[]]></default>
2933
- <type/>
2934
- </argument>
2935
- </method>
2936
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="151" package="Media Library Assistant">
2937
- <name>mla_taxonomy_column_filter</name>
2938
- <full_name>mla_taxonomy_column_filter</full_name>
2939
- <docblock line="138">
2940
- <description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
2941
- which returns a count of the attachments assigned a given term]]></description>
2942
  <long-description><![CDATA[]]></long-description>
2943
- <tag line="138" name="since" description="0.30"/>
2944
- <tag line="138" name="param" description="current column value; always ''" type="string" variable="$place_holder">
2945
- <type by_reference="false">string</type>
2946
  </tag>
2947
- <tag line="138" name="param" description="name of the column" type="array" variable="$column_name">
 
 
 
 
 
 
 
 
 
2948
  <type by_reference="false">array</type>
2949
  </tag>
2950
- <tag line="138" name="param" description="ID of the term for which the count is desired" type="array" variable="$term_id">
 
 
 
 
 
 
 
 
 
2951
  <type by_reference="false">array</type>
2952
  </tag>
2953
- <tag line="138" name="return" description="HTML markup for the column content; number of attachments in the category and alink to retrieve a list of them" type="array">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2954
  <type by_reference="false">array</type>
2955
  </tag>
2956
  </docblock>
2957
- <argument line="151">
2958
- <name>$place_holder</name>
2959
- <default><![CDATA[]]></default>
2960
- <type/>
2961
- </argument>
2962
- <argument line="151">
2963
- <name>$column_name</name>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2964
  <default><![CDATA[]]></default>
2965
  <type/>
2966
  </argument>
2967
- <argument line="151">
2968
- <name>$term_id</name>
2969
  <default><![CDATA[]]></default>
2970
  <type/>
2971
  </argument>
2972
  </method>
2973
- </class>
2974
- </file>
2975
- <file path="includes\class-mla-options.php" hash="b86b031f3deb4fd1a0fb09fca05c6765" package="Media Library Assistant">
2976
- <docblock line="2">
2977
- <description><![CDATA[Manages the plugin option settings]]></description>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2978
  <long-description><![CDATA[]]></long-description>
2979
  <tag line="2" name="package" description="Media Library Assistant"/>
2980
- <tag line="2" name="since" description="1.00"/>
2981
  </docblock>
2982
- <class final="false" abstract="false" namespace="global" line="18" package="Media Library Assistant">
2983
  <extends/>
2984
- <name>MLAOptions</name>
2985
- <full_name>\MLAOptions</full_name>
2986
  <docblock line="9">
2987
- <description><![CDATA[Class MLA (Media Library Assistant) Options manages the plugin option settings
2988
- and provides functions to get and put them from/to WordPress option variables]]></description>
2989
- <long-description><![CDATA[<p>Separated from class MLASettings in version 1.00</p>]]></long-description>
2990
  <tag line="9" name="package" description="Media Library Assistant"/>
2991
- <tag line="9" name="since" description="1.00"/>
2992
  </docblock>
2993
- <constant namespace="global" line="22" package="Media Library Assistant">
2994
- <name>MLA_VERSION_OPTION</name>
2995
- <full_name>MLA_VERSION_OPTION</full_name>
2996
- <value><![CDATA['current_version']]></value>
2997
- <docblock line="19">
2998
- <description><![CDATA[Provides a unique name for the current version option]]></description>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2999
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
3000
  </docblock>
3001
- </constant>
3002
- <constant namespace="global" line="27" package="Media Library Assistant">
3003
- <name>MLA_FEATURED_IN_TUNING</name>
3004
- <full_name>MLA_FEATURED_IN_TUNING</full_name>
3005
- <value><![CDATA['featured_in_tuning']]></value>
3006
- <docblock line="24">
3007
- <description><![CDATA[Provides a unique name for a database tuning option]]></description>
3008
  <long-description><![CDATA[]]></long-description>
 
 
 
 
3009
  </docblock>
3010
- </constant>
3011
- <constant namespace="global" line="32" package="Media Library Assistant">
3012
- <name>MLA_INSERTED_IN_TUNING</name>
3013
- <full_name>MLA_INSERTED_IN_TUNING</full_name>
3014
- <value><![CDATA['inserted_in_tuning']]></value>
3015
- <docblock line="29">
3016
- <description><![CDATA[Provides a unique name for a database tuning option]]></description>
3017
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
3018
  </docblock>
3019
- </constant>
3020
- <constant namespace="global" line="37" package="Media Library Assistant">
3021
- <name>MLA_GALLERY_IN_TUNING</name>
3022
- <full_name>MLA_GALLERY_IN_TUNING</full_name>
3023
- <value><![CDATA['gallery_in_tuning']]></value>
3024
- <docblock line="34">
3025
- <description><![CDATA[Provides a unique name for a database tuning option]]></description>
3026
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
3027
  </docblock>
3028
- </constant>
3029
- <constant namespace="global" line="42" package="Media Library Assistant">
3030
- <name>MLA_MLA_GALLERY_IN_TUNING</name>
3031
- <full_name>MLA_MLA_GALLERY_IN_TUNING</full_name>
3032
- <value><![CDATA['mla_gallery_in_tuning']]></value>
3033
- <docblock line="39">
3034
- <description><![CDATA[Provides a unique name for a database tuning option]]></description>
3035
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
3036
  </docblock>
3037
- </constant>
3038
- <constant namespace="global" line="47" package="Media Library Assistant">
3039
- <name>MLA_NEW_CUSTOM_RULE</name>
3040
- <full_name>MLA_NEW_CUSTOM_RULE</full_name>
3041
- <value><![CDATA['__NEW RULE__']]></value>
3042
- <docblock line="44">
3043
- <description><![CDATA[Provides a unique name for the Custom Field "new rule" key]]></description>
3044
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
 
 
 
3045
  </docblock>
3046
- </constant>
3047
- <constant namespace="global" line="52" package="Media Library Assistant">
3048
- <name>MLA_NEW_CUSTOM_FIELD</name>
3049
- <full_name>MLA_NEW_CUSTOM_FIELD</full_name>
3050
- <value><![CDATA['__NEW FIELD__']]></value>
3051
- <docblock line="49">
3052
- <description><![CDATA[Provides a unique name for the Custom Field "new field" key]]></description>
 
 
 
 
3053
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
 
 
3054
  </docblock>
3055
- </constant>
3056
- <constant namespace="global" line="57" package="Media Library Assistant">
3057
- <name>MLA_MEDIA_MODAL_TOOLBAR</name>
3058
- <full_name>MLA_MEDIA_MODAL_TOOLBAR</full_name>
3059
- <value><![CDATA['media_modal_toolbar']]></value>
3060
- <docblock line="54">
3061
- <description><![CDATA[Provides a unique name for the Media Manager toolbar option]]></description>
 
 
 
 
3062
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
 
 
 
3063
  </docblock>
3064
- </constant>
3065
- <constant namespace="global" line="62" package="Media Library Assistant">
3066
- <name>MLA_MEDIA_MODAL_MIMETYPES</name>
3067
- <full_name>MLA_MEDIA_MODAL_MIMETYPES</full_name>
3068
- <value><![CDATA['media_modal_mimetypes']]></value>
3069
- <docblock line="59">
3070
- <description><![CDATA[Provides a unique name for the Media Manager toolbar MIME Types option]]></description>
 
 
 
 
 
3071
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
3072
  </docblock>
3073
- </constant>
3074
- <constant namespace="global" line="67" package="Media Library Assistant">
3075
- <name>MLA_MEDIA_MODAL_MONTHS</name>
3076
- <full_name>MLA_MEDIA_MODAL_MONTHS</full_name>
3077
- <value><![CDATA['media_modal_months']]></value>
3078
- <docblock line="64">
3079
- <description><![CDATA[Provides a unique name for the Media Manager toolbar Month and Year option]]></description>
3080
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
3081
  </docblock>
3082
- </constant>
3083
- <constant namespace="global" line="72" package="Media Library Assistant">
3084
- <name>MLA_MEDIA_MODAL_TERMS</name>
3085
- <full_name>MLA_MEDIA_MODAL_TERMS</full_name>
3086
- <value><![CDATA['media_modal_terms']]></value>
3087
- <docblock line="69">
3088
- <description><![CDATA[Provides a unique name for the Media Manager toolbar Taxonomy Terms option]]></description>
3089
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
 
 
 
3090
  </docblock>
3091
- </constant>
3092
- <constant namespace="global" line="77" package="Media Library Assistant">
3093
- <name>MLA_MEDIA_MODAL_SEARCHBOX</name>
3094
- <full_name>MLA_MEDIA_MODAL_SEARCHBOX</full_name>
3095
- <value><![CDATA['media_modal_searchbox']]></value>
3096
- <docblock line="74">
3097
- <description><![CDATA[Provides a unique name for the Media Manager toolbar Search Box option]]></description>
 
 
 
 
3098
  <long-description><![CDATA[]]></long-description>
 
 
 
 
 
 
 
3099
  </docblock>
3100
- </constant>
3101
- <property final="false" static="true" visibility="public" line="88" namespace="global" package="Media Library Assistant">
3102
- <name>$process_featured_in</name>
3103
- <default><![CDATA[true]]></default>
3104
- <docblock line="79">
3105
- <description><![CDATA[Option setting for "Featured in" reporting]]></description>
3106
- <long-description><![CDATA[<p>This setting is false if the "Featured in" database access setting is "disabled", else true.</p>]]></long-description>
3107
- <tag line="79" name="since" description="1.00"/>
3108
- <tag line="79" name="var" description="" type="boolean">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3109
  <type by_reference="false">boolean</type>
3110
  </tag>
3111
  </docblock>
3112
  </property>
3113
- <property final="false" static="true" visibility="public" line="99" namespace="global" package="Media Library Assistant">
3114
- <name>$process_inserted_in</name>
3115
- <default><![CDATA[true]]></default>
3116
- <docblock line="90">
3117
- <description><![CDATA[Option setting for "Inserted in" reporting]]></description>
3118
- <long-description><![CDATA[<p>This setting is false if the "Inserted in" database access setting is "disabled", else true.</p>]]></long-description>
3119
- <tag line="90" name="since" description="1.00"/>
3120
- <tag line="90" name="var" description="" type="boolean">
3121
- <type by_reference="false">boolean</type>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3122
  </tag>
3123
  </docblock>
3124
  </property>
3125
- <property final="false" static="true" visibility="public" line="110" namespace="global" package="Media Library Assistant">
3126
- <name>$process_gallery_in</name>
3127
- <default><![CDATA[true]]></default>
3128
- <docblock line="101">
3129
- <description><![CDATA[Option setting for "Gallery in" reporting]]></description>
3130
- <long-description><![CDATA[<p>This setting is false if the "Gallery in" database access setting is "disabled", else true.</p>]]></long-description>
3131
- <tag line="101" name="since" description="1.00"/>
3132
- <tag line="101" name="var" description="" type="boolean">
3133
- <type by_reference="false">boolean</type>
 
3134
  </tag>
3135
  </docblock>
3136
  </property>
3137
- <property final="false" static="true" visibility="public" line="121" namespace="global" package="Media Library Assistant">
3138
- <name>$process_mla_gallery_in</name>
3139
- <default><![CDATA[true]]></default>
3140
- <docblock line="112">
3141
- <description><![CDATA[Option setting for "MLA Gallery in" reporting]]></description>
3142
- <long-description><![CDATA[<p>This setting is false if the "MLA Gallery in" database access setting is "disabled", else true.</p>]]></long-description>
3143
- <tag line="112" name="since" description="1.00"/>
3144
- <tag line="112" name="var" description="" type="boolean">
3145
- <type by_reference="false">boolean</type>
 
3146
  </tag>
3147
  </docblock>
3148
  </property>
3149
- <property final="false" static="true" visibility="public" line="148" namespace="global" package="Media Library Assistant">
3150
- <name>$mla_option_definitions</name>
3151
- <default><![CDATA[array(self::MLA_VERSION_OPTION => array('tab' => '', 'type' => 'hidden', 'std' => '0'), 'attachment_category' => array('tab' => '', 'name' => 'Attachment Categories', 'type' => 'hidden', 'std' => 'checked', 'help' => 'Check this option to add support for Attachment Categories.'), 'attachment_tag' => array('tab' => '', 'name' => 'Attachment Tags', 'type' => 'hidden', 'std' => 'checked', 'help' => 'Check this option to add support for Attachment Tags.'), 'where_used_heading' => array('tab' => 'general', 'name' => 'Where-used Reporting', 'type' => 'header'), 'exclude_revisions' => array('tab' => 'general', 'name' => 'Exclude Revisions', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to exclude revisions from where-used reporting.'), 'where_used_subheading' => array('tab' => 'general', 'name' => 'Where-used database access tuning', 'type' => 'subheader'), self::MLA_FEATURED_IN_TUNING => array('tab' => 'general', 'name' => 'Featured in', 'type' => 'select', 'std' => 'enabled', 'options' => array('enabled', 'disabled'), 'texts' => array('Enabled', 'Disabled'), 'help' => 'Search database posts and pages for Featured Image attachments.'), self::MLA_INSERTED_IN_TUNING => array('tab' => 'general', 'name' => 'Inserted in', 'type' => 'select', 'std' => 'enabled', 'options' => array('enabled', 'disabled'), 'texts' => array('Enabled', 'Disabled'), 'help' => 'Search database posts and pages for attachments embedded in content.'), self::MLA_GALLERY_IN_TUNING => array('tab' => 'general', 'name' => 'Gallery in', 'type' => 'select', 'std' => 'cached', 'options' => array('dynamic', 'refresh', 'cached', 'disabled'), 'texts' => array('Dynamic', 'Refresh', 'Cached', 'Disabled'), 'help' => 'Search database posts and pages for [gallery] shortcode results.<br>&nbsp;&nbsp;Dynamic = once every page load, Cached = once every login, Disabled = never.<br>&nbsp;&nbsp;Refresh = update references, then set to Cached.'), self::MLA_MLA_GALLERY_IN_TUNING => array('tab' => 'general', 'name' => 'MLA Gallery in', 'type' => 'select', 'std' => 'cached', 'options' => array('dynamic', 'refresh', 'cached', 'disabled'), 'texts' => array('Dynamic', 'Refresh', 'Cached', 'Disabled'), 'help' => 'Search database posts and pages for [mla_gallery] shortcode results.<br>&nbsp;&nbsp;Dynamic = once every page load, Cached = once every login, Disabled = never.<br>&nbsp;&nbsp;Refresh = update references, then set to Cached.'), 'taxonomy_heading' => array('tab' => 'general', 'name' => 'Taxonomy Support', 'type' => 'header'), 'taxonomy_support' => array('tab' => 'general', 'help' => 'Check the "Support" box to add the taxonomy to the Assistant and the Edit Media screen.<br>Check the "Inline Edit" box to display the taxonomy in the Quick Edit and Bulk Edit areas.<br>Use the "List Filter" option to select the taxonomy on which to filter the Assistant table listing.', 'std' => array('tax_support' => array('attachment_category' => 'checked', 'attachment_tag' => 'checked'), 'tax_quick_edit' => array('attachment_category' => 'checked', 'attachment_tag' => 'checked'), 'tax_filter' => 'attachment_category'), 'type' => 'custom', 'render' => 'mla_taxonomy_option_handler', 'update' => 'mla_taxonomy_option_handler', 'delete' => 'mla_taxonomy_option_handler', 'reset' => 'mla_taxonomy_option_handler'), 'attachments_column' => array('tab' => '', 'name' => 'Attachments Column', 'type' => 'hidden', 'std' => 'checked', 'help' => 'Check this option to replace the Posts column with the Attachments Column.'), 'orderby_heading' => array('tab' => 'general', 'name' => 'Default Table Listing Sort Order', 'type' => 'header'), 'default_orderby' => array('tab' => 'general', 'name' => 'Order By', 'type' => 'select', 'std' => 'title_name', 'options' => array('none', 'title_name'), 'texts' => array('None', 'Title/Name'), 'help' => 'Select the column for the sort order of the Assistant table listing.'), 'default_order' => array('tab' => 'general', 'name' => 'Order', 'type' => 'radio', 'std' => 'ASC', 'options' => array('ASC', 'DESC'), 'texts' => array('Ascending', 'Descending'), 'help' => 'Choose the sort order.'), 'media_modal_heading' => array('tab' => 'general', 'name' => 'Media Manager Enhancements', 'type' => 'header'), self::MLA_MEDIA_MODAL_TOOLBAR => array('tab' => 'general', 'name' => 'Enable Media Manager Enhancements', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check/uncheck this option to enable/disable Media Manager Enhancements.'), self::MLA_MEDIA_MODAL_MIMETYPES => array('tab' => 'general', 'name' => 'Media Manager Enhanced MIME Type filter', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to filter by more MIME Types, e.g., text, applications.'), self::MLA_MEDIA_MODAL_MONTHS => array('tab' => 'general', 'name' => 'Media Manager Month and Year filter', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to filter by month and year uploaded.'), self::MLA_MEDIA_MODAL_TERMS => array('tab' => 'general', 'name' => 'Media Manager Category/Tag filter', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to filter by taxonomy terms.'), self::MLA_MEDIA_MODAL_SEARCHBOX => array('tab' => 'general', 'name' => 'Media Manager Enhanced Search Media box', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to enable search box enhancements.'), 'template_heading' => array('tab' => 'mla-gallery', 'name' => 'Default [mla_gallery] Templates', 'type' => 'header'), 'default_style' => array('tab' => 'mla-gallery', 'name' => 'Style Template', 'type' => 'select', 'std' => 'default', 'options' => array(), 'texts' => array(), 'help' => 'Select the default style template for your [mla_gallery] shortcodes.'), 'default_markup' => array('tab' => 'mla-gallery', 'name' => 'Markup Template', 'type' => 'select', 'std' => 'default', 'options' => array(), 'texts' => array(), 'help' => 'Select the default markup template for your [mla_gallery] shortcodes.'), 'style_templates' => array('tab' => '', 'type' => 'hidden', 'std' => array()), 'markup_templates' => array('tab' => '', 'type' => 'hidden', 'std' => array()), 'enable_custom_field_mapping' => array('tab' => 'custom-field', 'name' => 'Enable custom field mapping when adding new media', 'type' => 'checkbox', 'std' => '', 'help' => 'Check this option to enable mapping when uploading new media (attachments).<br>&nbsp;&nbsp;Click Save Changes at the bottom of the screen if you change this option.<br>&nbsp;&nbsp;Does NOT affect the operation of the "Map" buttons on the bulk edit, single edit and settings screens.'), 'custom_field_mapping' => array('tab' => '', 'help' => '&nbsp;<br>Update the custom field mapping values above, then click Save Changes to make the updates permanent.<br>You can also make temporary updates and click a Map All Attachments button to apply the rule(s) to all attachments without saving any rule changes.', 'std' => array(), 'type' => 'custom', 'render' => 'mla_custom_field_option_handler', 'update' => 'mla_custom_field_option_handler', 'delete' => 'mla_custom_field_option_handler', 'reset' => 'mla_custom_field_option_handler'), 'enable_iptc_exif_mapping' => array('tab' => 'iptc-exif', 'name' => 'Enable IPTC/EXIF Mapping when adding new media', 'type' => 'checkbox', 'std' => '', 'help' => 'Check this option to enable mapping when uploading new media (attachments).<br>&nbsp;&nbsp;Does NOT affect the operation of the "Map" buttons on the bulk edit, single edit and settings screens.'), 'iptc_exif_standard_mapping' => array('tab' => '', 'help' => 'Update the standard field mapping values above, then click <strong>Save Changes</strong> to make the updates permanent.<br>You can also make temporary updates and click <strong>Map All Attachments, Standard Fields Now</strong> to apply the updates to all attachments without saving the rule changes.', 'std' => NULL, 'type' => 'custom', 'render' => 'mla_iptc_exif_option_handler', 'update' => 'mla_iptc_exif_option_handler', 'delete' => 'mla_iptc_exif_option_handler', 'reset' => 'mla_iptc_exif_option_handler'), 'iptc_exif_taxonomy_mapping' => array('tab' => '', 'help' => 'Update the taxonomy term mapping values above, then click <strong>Save Changes</strong> or <strong>Map All Attachments, Taxonomy Terms Now</strong>.', 'std' => NULL, 'type' => 'custom', 'render' => 'mla_iptc_exif_option_handler', 'update' => 'mla_iptc_exif_option_handler', 'delete' => 'mla_iptc_exif_option_handler', 'reset' => 'mla_iptc_exif_option_handler'), 'iptc_exif_custom_mapping' => array('tab' => '', 'help' => '<strong>Update</strong> individual custom field mapping values above, or make several updates and click <strong>Save Changes</strong> below to apply them all at once.<br>You can also <strong>add a new rule</strong> for an existing field or <strong>add a new field</strong> and rule.<br>You can make temporary updates and click <strong>Map All Attachments, Custom Fields Now</strong> to apply the updates to all attachments without saving the rule changes.', 'std' => NULL, 'type' => 'custom', 'render' => 'mla_iptc_exif_option_handler', 'update' => 'mla_iptc_exif_option_handler', 'delete' => 'mla_iptc_exif_option_handler', 'reset' => 'mla_iptc_exif_option_handler'), 'iptc_exif_mapping' => array('tab' => '', 'help' => 'IPTC/EXIF Mapping help', 'std' => array('standard' => array('post_title' => array('name' => 'Title', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true), 'post_name' => array('name' => 'Name/Slug', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true), 'image_alt' => array('name' => 'Alternate Text', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true), 'post_excerpt' => array('name' => 'Caption', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true), 'post_content' => array('name' => 'Description', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true)), 'taxonomy' => array(), 'custom' => array()), 'type' => 'custom', 'render' => 'mla_iptc_exif_option_handler', 'update' => 'mla_iptc_exif_option_handler', 'delete' => 'mla_iptc_exif_option_handler', 'reset' => 'mla_iptc_exif_option_handler'))]]></default>
3152
- <docblock line="123">
3153
- <description><![CDATA[$mla_option_definitions defines the database options and admin page areas for setting/updating them.]]></description>
3154
- <long-description><![CDATA[<p>Each option is defined by an array with the following elements:</p>
3155
-
3156
- <p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
3157
-
3158
- <p>tab => Settings page tab id for the option
3159
- name => admin page label or heading text
3160
- type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
3161
- std => default value
3162
- help => help text
3163
- size => text size, default 40
3164
- cols => textbox columns, default 90
3165
- rows => textbox rows, default 5
3166
- options => array of radio or select option values
3167
- texts => array of radio or select option display texts
3168
- render => rendering function for 'custom' options. Usage:
3169
- $options_list .= ['render']( 'render', $key, $value );
3170
- update => update function for 'custom' options; returns nothing. Usage:
3171
- $message = ['update']( 'update', $key, $value, $_REQUEST );
3172
- delete => delete function for 'custom' options; returns nothing. Usage:
3173
- $message = ['delete']( 'delete', $key, $value, $_REQUEST );
3174
- reset => reset function for 'custom' options; returns nothing. Usage:
3175
- $message = ['reset']( 'reset', $key, $value, $_REQUEST );</p>]]></long-description>
3176
  </docblock>
3177
  </property>
3178
- <property final="false" static="true" visibility="private" line="519" namespace="global" package="Media Library Assistant">
3179
- <name>$mla_option_templates</name>
3180
- <default><![CDATA[null]]></default>
3181
- <docblock line="512">
3182
- <description><![CDATA[Style and Markup templates]]></description>
3183
- <long-description><![CDATA[]]></long-description>
3184
- <tag line="512" name="since" description="0.80"/>
3185
- <tag line="512" name="var" description="" type="array">
 
3186
  <type by_reference="false">array</type>
3187
  </tag>
3188
  </docblock>
3189
  </property>
3190
- <property final="false" static="true" visibility="private" line="1452" namespace="global" package="Media Library Assistant">
3191
- <name>$custom_field_data_sources</name>
3192
- <default><![CDATA[array('path', 'file_name', 'extension', 'file_size', 'dimensions', 'pixels', 'width', 'height', 'hwstring_small', 'size_keys', 'size_names', 'size_bytes', 'size_pixels', 'size_dimensions', 'size_name[size]', 'size_bytes[size]', 'size_pixels[size]', 'size_dimensions[size]', 'parent_type', 'parent_title', 'parent_issues', 'reference_issues', 'aperture', 'credit', 'camera', 'caption', 'created_timestamp', 'copyright', 'focal_length', 'iso', 'shutter_speed', 'title')]]></default>
3193
- <docblock line="1445">
3194
- <description><![CDATA[Array of Data Source names for custom field mapping]]></description>
3195
- <long-description><![CDATA[]]></long-description>
3196
- <tag line="1445" name="since" description="1.10"/>
3197
- <tag line="1445" name="var" description="" type="array">
 
3198
  <type by_reference="false">array</type>
3199
  </tag>
3200
  </docblock>
3201
  </property>
3202
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="493" package="Media Library Assistant">
3203
  <name>initialize</name>
3204
  <full_name>initialize</full_name>
3205
- <docblock line="486">
3206
  <description><![CDATA[Initialization function, similar to __construct()]]></description>
3207
  <long-description><![CDATA[]]></long-description>
3208
- <tag line="486" name="since" description="1.00"/>
3209
- <tag line="486" name="return" description="" type="void">
3210
  <type by_reference="false">void</type>
3211
  </tag>
3212
  </docblock>
3213
  </method>
3214
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="528" package="Media Library Assistant">
3215
- <name>_load_option_templates</name>
3216
- <full_name>_load_option_templates</full_name>
3217
- <docblock line="521">
3218
- <description><![CDATA[Load style and markup templates to $mla_templates]]></description>
3219
  <long-description><![CDATA[]]></long-description>
3220
- <tag line="521" name="since" description="0.80"/>
3221
- <tag line="521" name="return" description="" type="void">
3222
  <type by_reference="false">void</type>
3223
  </tag>
3224
  </docblock>
3225
  </method>
3226
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="576" package="Media Library Assistant">
3227
- <name>mla_fetch_gallery_template</name>
3228
- <full_name>mla_fetch_gallery_template</full_name>
3229
- <docblock line="566">
3230
- <description><![CDATA[Fetch style or markup template from $mla_templates]]></description>
3231
- <long-description><![CDATA[]]></long-description>
3232
- <tag line="566" name="since" description="0.80"/>
3233
- <tag line="566" name="param" description="Template name" type="string" variable="$key">
3234
- <type by_reference="false">string</type>
3235
- </tag>
3236
- <tag line="566" name="param" description="Template type; 'style' (default) or 'markup'" type="string" variable="$type">
3237
- <type by_reference="false">string</type>
3238
- </tag>
3239
- <tag line="566" name="return" description="requested template, false if not found or null if no templates" type="string|boolean|null">
3240
- <type by_reference="false">string</type>
3241
- <type by_reference="false">boolean</type>
3242
- <type by_reference="false">null</type>
3243
- </tag>
3244
- </docblock>
3245
- <argument line="576">
3246
- <name>$key</name>
3247
- <default><![CDATA[]]></default>
3248
- <type/>
3249
- </argument>
3250
- <argument line="576">
3251
- <name>$type</name>
3252
- <default><![CDATA['style']]></default>
3253
- <type/>
3254
- </argument>
3255
- </method>
3256
- <method fina
1
  <?xml version="1.0" encoding="utf-8"?>
2
  <project version="2.0.0a8" title="Media Library Assistant">
3
+ <file path="includes\class-mla-data.php" hash="21e54174f3e874840d71e7fb231c8f18" package="Media Library Assistant">
4
  <docblock line="2">
5
  <description><![CDATA[Database and template file access for MLA needs]]></description>
6
  <long-description><![CDATA[]]></long-description>
40
  </tag>
41
  </docblock>
42
  </property>
43
+ <property final="false" static="true" visibility="private" line="221" namespace="global" package="Media Library Assistant">
44
+ <name>$mla_list_table_items</name>
45
+ <default><![CDATA[NULL]]></default>
46
+ <docblock line="214">
47
+ <description><![CDATA[Cache the results of mla_count_list_table_items for reuse in mla_query_list_table_items]]></description>
48
+ <long-description><![CDATA[]]></long-description>
49
+ <tag line="214" name="since" description="1.40"/>
50
+ <tag line="214" name="var" description="" type="array">
51
+ <type by_reference="false">array</type>
52
+ </tag>
53
+ </docblock>
54
+ </property>
55
+ <property final="false" static="true" visibility="private" line="327" namespace="global" package="Media Library Assistant">
56
  <name>$query_parameters</name>
57
  <default><![CDATA[array()]]></default>
58
+ <docblock line="314">
59
  <description><![CDATA[WP_Query filter "parameters"]]></description>
60
  <long-description><![CDATA[<p>This array defines parameters for the query's join, where and orderby filters.
61
  The parameters are set up in the _prepare_list_table_query function, and
62
  any further logic required to translate those values is contained in the filters.</p>
63
 
64
+ <p>Array index values are: use_postmeta_view, postmeta_key, postmeta_value, patterns, detached, orderby, order, mla-metavalue, debug, s, mla_search_connector, mla_search_fields, sentence, exact</p>]]></long-description>
65
+ <tag line="314" name="since" description="0.30"/>
66
+ <tag line="314" name="var" description="" type="array">
67
  <type by_reference="false">array</type>
68
  </tag>
69
  </docblock>
70
  </property>
71
+ <property final="false" static="true" visibility="private" line="1439" namespace="global" package="Media Library Assistant">
72
  <name>$galleries</name>
73
  <default><![CDATA[null]]></default>
74
+ <docblock line="1420">
75
  <description><![CDATA[Objects containing [gallery] shortcodes]]></description>
76
  <long-description><![CDATA[<p>This array contains all of the objects containing one or more [gallery] shortcodes
77
  and array(s) of which attachments each [gallery] contains. The arrays are built once
78
  each page load and cached for subsequent calls.</p>
79
 
80
+ <p>The outer array is keyed by post_id. It contains an associative array with:
 
81
  ['parent_title'] post_title of the gallery parent,
82
  ['parent_type'] 'post' or 'page' or the custom post_type of the gallery parent,
83
+ ['results'] array ( ID => ID ) of attachments appearing in ANY of the parent's galleries.
84
+ ['galleries'] array of [gallery] entries numbered from one (1), containing:
85
+ galleries[X]['query'] contains a string with the arguments of the [gallery],
86
+ galleries[X]['results'] contains an array ( ID ) of post_ids for the objects in the gallery.</p>]]></long-description>
87
+ <tag line="1420" name="since" description="0.70"/>
88
+ <tag line="1420" name="var" description="" type="array">
89
  <type by_reference="false">array</type>
90
  </tag>
91
  </docblock>
92
  </property>
93
+ <property final="false" static="true" visibility="private" line="1452" namespace="global" package="Media Library Assistant">
94
  <name>$mla_galleries</name>
95
  <default><![CDATA[null]]></default>
96
+ <docblock line="1441">
97
  <description><![CDATA[Objects containing [mla_gallery] shortcodes]]></description>
98
  <long-description><![CDATA[<p>This array contains all of the objects containing one or more [mla_gallery] shortcodes
99
  and array(s) of which attachments each [mla_gallery] contains. The arrays are built once
100
  each page load and cached for subsequent calls.</p>]]></long-description>
101
+ <tag line="1441" name="since" description="0.70"/>
102
+ <tag line="1441" name="var" description="" type="array">
103
  <type by_reference="false">array</type>
104
  </tag>
105
  </docblock>
184
  <tag line="171" name="param" description="A formatting string containing [+placeholders+]" type="string" variable="$tpl">
185
  <type by_reference="false">string</type>
186
  </tag>
187
+ <tag line="171" name="return" description="Placeholder information: each entry is an array with ['prefix'] =&gt; string, ['value'] =&gt; string, ['option'] =&gt; string 'single'|'export'" type="array">
188
  <type by_reference="false">array</type>
189
  </tag>
190
  </docblock>
194
  <type/>
195
  </argument>
196
  </method>
197
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="234" package="Media Library Assistant">
198
  <name>mla_count_list_table_items</name>
199
  <full_name>mla_count_list_table_items</full_name>
200
+ <docblock line="223">
201
  <description><![CDATA[Get the total number of attachment posts]]></description>
202
  <long-description><![CDATA[]]></long-description>
203
+ <tag line="223" name="since" description="0.30"/>
204
+ <tag line="223" name="param" description="Query variables, e.g., from $_REQUEST" type="array" variable="$request">
205
  <type by_reference="false">array</type>
206
  </tag>
207
+ <tag line="223" name="param" description="(optional) number of rows to skip over to reach desired page" type="int" variable="$offset">
208
+ <type by_reference="false">int</type>
209
+ </tag>
210
+ <tag line="223" name="param" description="(optional) number of rows on each page" type="int" variable="$count">
211
+ <type by_reference="false">int</type>
212
+ </tag>
213
+ <tag line="223" name="return" description="Number of attachment posts" type="integer">
214
  <type by_reference="false">integer</type>
215
  </tag>
216
  </docblock>
217
+ <argument line="234">
218
  <name>$request</name>
219
  <default><![CDATA[]]></default>
220
  <type/>
221
  </argument>
222
+ <argument line="234">
223
+ <name>$offset</name>
224
+ <default><![CDATA[NULL]]></default>
225
+ <type/>
226
+ </argument>
227
+ <argument line="234">
228
+ <name>$count</name>
229
+ <default><![CDATA[NULL]]></default>
230
+ <type/>
231
+ </argument>
232
  </method>
233
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="263" package="Media Library Assistant">
234
  <name>mla_query_list_table_items</name>
235
  <full_name>mla_query_list_table_items</full_name>
236
+ <docblock line="249">
237
  <description><![CDATA[Retrieve attachment objects for list table display]]></description>
238
  <long-description><![CDATA[<p>Supports prepare_items in class-mla-list-table.php.
239
  Modeled after wp_edit_attachments_query in wp-admin/post.php</p>]]></long-description>
240
+ <tag line="249" name="since" description="0.1"/>
241
+ <tag line="249" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
242
  <type by_reference="false">array</type>
243
  </tag>
244
+ <tag line="249" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
245
  <type by_reference="false">int</type>
246
  </tag>
247
+ <tag line="249" name="param" description="number of rows on each page" type="int" variable="$count">
248
  <type by_reference="false">int</type>
249
  </tag>
250
+ <tag line="249" name="return" description="attachment objects (posts) including parent data, meta data and references" type="array">
251
  <type by_reference="false">array</type>
252
  </tag>
253
  </docblock>
254
+ <argument line="263">
255
  <name>$request</name>
256
  <default><![CDATA[]]></default>
257
  <type/>
258
  </argument>
259
+ <argument line="263">
260
  <name>$offset</name>
261
  <default><![CDATA[]]></default>
262
  <type/>
263
  </argument>
264
+ <argument line="263">
265
  <name>$count</name>
266
  <default><![CDATA[]]></default>
267
  <type/>
268
  </argument>
269
  </method>
270
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="309" package="Media Library Assistant">
271
  <name>mla_query_media_modal_items</name>
272
  <full_name>mla_query_media_modal_items</full_name>
273
+ <docblock line="296">
274
  <description><![CDATA[Retrieve attachment objects for the WordPress Media Manager]]></description>
275
  <long-description><![CDATA[<p>Supports month-year and taxonomy-term filters as well as the enhanced search box</p>]]></long-description>
276
+ <tag line="296" name="since" description="1.20"/>
277
+ <tag line="296" name="param" description="query parameters from Media Manager" type="array" variable="$request">
278
  <type by_reference="false">array</type>
279
  </tag>
280
+ <tag line="296" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
281
  <type by_reference="false">int</type>
282
  </tag>
283
+ <tag line="296" name="param" description="number of rows on each page" type="int" variable="$count">
284
  <type by_reference="false">int</type>
285
  </tag>
286
+ <tag line="296" name="return" description="attachment objects (posts)" type="array">
287
  <type by_reference="false">array</type>
288
  </tag>
289
  </docblock>
290
+ <argument line="309">
291
  <name>$request</name>
292
  <default><![CDATA[]]></default>
293
  <type/>
294
  </argument>
295
+ <argument line="309">
296
  <name>$offset</name>
297
  <default><![CDATA[]]></default>
298
  <type/>
299
  </argument>
300
+ <argument line="309">
301
  <name>$count</name>
302
  <default><![CDATA[]]></default>
303
  <type/>
304
  </argument>
305
  </method>
306
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="343" package="Media Library Assistant">
307
  <name>_prepare_list_table_query</name>
308
  <full_name>_prepare_list_table_query</full_name>
309
+ <docblock line="329">
310
  <description><![CDATA[Sanitize and expand query arguments from request variables]]></description>
311
  <long-description><![CDATA[<p>Prepare the arguments for WP_Query.
312
  Modeled after wp_edit_attachments_query in wp-admin/post.php</p>]]></long-description>
313
+ <tag line="329" name="since" description="0.1"/>
314
+ <tag line="329" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$raw_request">
315
  <type by_reference="false">array</type>
316
  </tag>
317
+ <tag line="329" name="param" description="Optional number of rows (default 0) to skip over to reach desired page" type="int" variable="$offset">
318
  <type by_reference="false">int</type>
319
  </tag>
320
+ <tag line="329" name="param" description="Optional number of rows on each page (0 = all rows, default)" type="int" variable="$count">
321
  <type by_reference="false">int</type>
322
  </tag>
323
+ <tag line="329" name="return" description="revised arguments suitable for WP_Query" type="array">
324
  <type by_reference="false">array</type>
325
  </tag>
326
  </docblock>
327
+ <argument line="343">
328
  <name>$raw_request</name>
329
  <default><![CDATA[]]></default>
330
  <type/>
331
  </argument>
332
+ <argument line="343">
333
  <name>$offset</name>
334
  <default><![CDATA[0]]></default>
335
  <type/>
336
  </argument>
337
+ <argument line="343">
338
  <name>$count</name>
339
  <default><![CDATA[0]]></default>
340
  <type/>
341
  </argument>
342
  </method>
343
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="643" package="Media Library Assistant">
344
  <name>_execute_list_table_query</name>
345
  <full_name>_execute_list_table_query</full_name>
346
+ <docblock line="634">
347
  <description><![CDATA[Add filters, run query, remove filters]]></description>
348
  <long-description><![CDATA[]]></long-description>
349
+ <tag line="634" name="since" description="0.30"/>
350
+ <tag line="634" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
351
  <type by_reference="false">array</type>
352
  </tag>
353
+ <tag line="634" name="return" description="WP_Query object with query results" type="object">
354
  <type by_reference="false">object</type>
355
  </tag>
356
  </docblock>
357
+ <argument line="643">
358
  <name>$request</name>
359
  <default><![CDATA[]]></default>
360
  <type/>
361
  </argument>
362
  </method>
363
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="714" package="Media Library Assistant">
364
  <name>mla_query_posts_search_filter</name>
365
  <full_name>mla_query_posts_search_filter</full_name>
366
+ <docblock line="702">
367
  <description><![CDATA[Adds a keyword search to the WHERE clause, if required]]></description>
368
  <long-description><![CDATA[<p>Defined as public because it's a filter.</p>]]></long-description>
369
+ <tag line="702" name="since" description="0.60"/>
370
+ <tag line="702" name="param" description="query clause before modification" type="string" variable="$search_string">
371
  <type by_reference="false">string</type>
372
  </tag>
373
+ <tag line="702" name="param" description="WP_Query object" type="object" variable="$query_object">
374
  <type by_reference="false">object</type>
375
  </tag>
376
+ <tag line="702" name="return" description="query clause after keyword search addition" type="string">
377
  <type by_reference="false">string</type>
378
  </tag>
379
  </docblock>
380
+ <argument line="714">
381
  <name>$search_string</name>
382
  <default><![CDATA[]]></default>
383
  <type/>
384
  </argument>
385
+ <argument line="714">
386
  <name>$query_object</name>
387
  <default><![CDATA[]]></default>
388
  <type/>
389
  </argument>
390
  </method>
391
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="815" package="Media Library Assistant">
392
  <name>mla_query_posts_join_filter</name>
393
  <full_name>mla_query_posts_join_filter</full_name>
394
+ <docblock line="804">
395
+ <description><![CDATA[Adds a JOIN clause, if required, to handle sorting/searching on custom fields or ALT Text]]></description>
396
  <long-description><![CDATA[<p>Defined as public because it's a filter.</p>]]></long-description>
397
+ <tag line="804" name="since" description="0.30"/>
398
+ <tag line="804" name="param" description="query clause before modification" type="string" variable="$join_clause">
399
  <type by_reference="false">string</type>
400
  </tag>
401
+ <tag line="804" name="return" description="query clause after &quot;LEFT JOIN view ON post_id&quot; item modification" type="string">
402
  <type by_reference="false">string</type>
403
  </tag>
404
  </docblock>
405
+ <argument line="815">
406
  <name>$join_clause</name>
407
  <default><![CDATA[]]></default>
408
  <type/>
409
  </argument>
410
  </method>
411
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="842" package="Media Library Assistant">
412
  <name>mla_query_posts_where_filter</name>
413
  <full_name>mla_query_posts_where_filter</full_name>
414
+ <docblock line="830">
415
  <description><![CDATA[Adds a WHERE clause for detached items]]></description>
416
  <long-description><![CDATA[<p>Modeled after _edit_attachments_query_helper in wp-admin/post.php.
417
  Defined as public because it's a filter.</p>]]></long-description>
418
+ <tag line="830" name="since" description="0.1"/>
419
+ <tag line="830" name="param" description="query clause before modification" type="string" variable="$where_clause">
420
  <type by_reference="false">string</type>
421
  </tag>
422
+ <tag line="830" name="return" description="query clause after &quot;detached&quot; item modification" type="string">
423
  <type by_reference="false">string</type>
424
  </tag>
425
  </docblock>
426
+ <argument line="842">
427
  <name>$where_clause</name>
428
  <default><![CDATA[]]></default>
429
  <type/>
430
  </argument>
431
  </method>
432
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="890" package="Media Library Assistant">
433
  <name>mla_query_posts_orderby_filter</name>
434
  <full_name>mla_query_posts_orderby_filter</full_name>
435
+ <docblock line="878">
436
  <description><![CDATA[Adds a ORDERBY clause, if required]]></description>
437
  <long-description><![CDATA[<p>Expands the range of sort options because the logic in WP_Query is limited.
438
  Defined as public because it's a filter.</p>]]></long-description>
439
+ <tag line="878" name="since" description="0.30"/>
440
+ <tag line="878" name="param" description="query clause before modification" type="string" variable="$orderby_clause">
441
  <type by_reference="false">string</type>
442
  </tag>
443
+ <tag line="878" name="return" description="updated query clause" type="string">
444
  <type by_reference="false">string</type>
445
  </tag>
446
  </docblock>
447
+ <argument line="890">
448
  <name>$orderby_clause</name>
449
  <default><![CDATA[]]></default>
450
  <type/>
451
  </argument>
452
  </method>
453
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="949" package="Media Library Assistant">
454
  <name>mla_get_attachment_by_id</name>
455
  <full_name>mla_get_attachment_by_id</full_name>
456
+ <docblock line="937">
457
  <description><![CDATA[Retrieve an Attachment array given a $post_id]]></description>
458
  <long-description><![CDATA[<p>The (associative) array will contain every field that can be found in
459
  the posts and postmeta tables, and all references to the attachment.</p>]]></long-description>
460
+ <tag line="937" name="since" description="0.1"/>
461
+ <tag line="937" name="uses" description="\global\$post" refers="\global\$post"/>
462
+ <tag line="937" name="param" description="The ID of the attachment post" type="int" variable="$post_id">
463
  <type by_reference="false">int</type>
464
  </tag>
465
+ <tag line="937" name="return" description="NULL on failure else associative array" type="NULL|array">
466
  <type by_reference="false">NULL</type>
467
  <type by_reference="false">array</type>
468
  </tag>
469
  </docblock>
470
+ <argument line="949">
471
  <name>$post_id</name>
472
  <default><![CDATA[]]></default>
473
  <type/>
474
  </argument>
475
  </method>
476
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="999" package="Media Library Assistant">
477
  <name>mla_fetch_attachment_parent_data</name>
478
  <full_name>mla_fetch_attachment_parent_data</full_name>
479
+ <docblock line="990">
480
  <description><![CDATA[Returns information about an attachment's parent, if found]]></description>
481
  <long-description><![CDATA[]]></long-description>
482
+ <tag line="990" name="since" description="0.1"/>
483
+ <tag line="990" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent_id">
484
  <type by_reference="false">int</type>
485
  </tag>
486
+ <tag line="990" name="return" description="Parent information; post_date, post_title and post_type" type="array">
487
  <type by_reference="false">array</type>
488
  </tag>
489
  </docblock>
490
+ <argument line="999">
491
  <name>$parent_id</name>
492
  <default><![CDATA[]]></default>
493
  <type/>
494
  </argument>
495
  </method>
496
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1035" package="Media Library Assistant">
497
  <name>mla_find_array_element</name>
498
  <full_name>mla_find_array_element</full_name>
499
+ <docblock line="1020">
500
  <description><![CDATA[Finds the value of a key in a possibily nested array structure]]></description>
501
  <long-description><![CDATA[<p>Used primarily to extract fields from the _wp_attachment_metadata custom field.
502
  Could also be used with the ID3 metadata exposed in WordPress 3.6 and later.</p>]]></long-description>
503
+ <tag line="1020" name="since" description="1.30"/>
504
+ <tag line="1020" name="param" description="key value, e.g. array1.array2.element" type="string" variable="$needle">
505
  <type by_reference="false">string</type>
506
  </tag>
507
+ <tag line="1020" name="param" description="PHP nested arrays" type="array" variable="$haystack">
508
  <type by_reference="false">array</type>
509
  </tag>
510
+ <tag line="1020" name="param" description="format option 'text'|'single'|'export'|'array'|'multi'" type="string" variable="$option">
511
+ <type by_reference="false">string</type>
512
  </tag>
513
+ <tag line="1020" name="param" description="keep existing values - for 'multi' option" type="boolean" variable="$keep_existing">
514
  <type by_reference="false">boolean</type>
515
  </tag>
516
+ <tag line="1020" name="return" description="value matching key(.key ...) or ''" type="string">
517
  <type by_reference="false">string</type>
518
  </tag>
519
  </docblock>
520
+ <argument line="1035">
521
  <name>$needle</name>
522
  <default><![CDATA[]]></default>
523
  <type/>
524
  </argument>
525
+ <argument line="1035">
526
  <name>$haystack</name>
527
  <default><![CDATA[]]></default>
528
  <type/>
529
  </argument>
530
+ <argument line="1035">
531
+ <name>$option</name>
532
+ <default><![CDATA[]]></default>
533
  <type/>
534
  </argument>
535
+ <argument line="1035">
536
+ <name>$keep_existing</name>
537
  <default><![CDATA[false]]></default>
538
  <type/>
539
  </argument>
540
  </method>
541
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1087" package="Media Library Assistant">
542
  <name>mla_fetch_attachment_metadata</name>
543
  <full_name>mla_fetch_attachment_metadata</full_name>
544
+ <docblock line="1074">
545
  <description><![CDATA[Fetch and filter meta data for an attachment]]></description>
546
  <long-description><![CDATA[<p>Returns a filtered array of a post's meta data. Internal values beginning with '<em>'
547
  are stripped out or converted to an 'mla</em>' equivalent. Array data is replaced with
548
  a string containing the first array element.</p>]]></long-description>
549
+ <tag line="1074" name="since" description="0.1"/>
550
+ <tag line="1074" name="param" description="post ID of attachment" type="int" variable="$post_id">
551
  <type by_reference="false">int</type>
552
  </tag>
553
+ <tag line="1074" name="return" description="Meta data variables" type="array">
554
  <type by_reference="false">array</type>
555
  </tag>
556
  </docblock>
557
+ <argument line="1087">
558
  <name>$post_id</name>
559
  <default><![CDATA[]]></default>
560
  <type/>
561
  </argument>
562
  </method>
563
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1159" package="Media Library Assistant">
564
  <name>mla_fetch_attachment_references</name>
565
  <full_name>mla_fetch_attachment_references</full_name>
566
+ <docblock line="1146">
567
  <description><![CDATA[Find Featured Image and inserted image/link references to an attachment]]></description>
568
  <long-description><![CDATA[<p>Searches all post and page content to see if the attachment is used
569
  as a Featured Image or inserted in the post as an image or link.</p>]]></long-description>
570
+ <tag line="1146" name="since" description="0.1"/>
571
+ <tag line="1146" name="param" description="post ID of attachment" type="int" variable="$ID">
572
  <type by_reference="false">int</type>
573
  </tag>
574
+ <tag line="1146" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent">
575
  <type by_reference="false">int</type>
576
  </tag>
577
+ <tag line="1146" name="return" description="Reference information; see $references array comments" type="array">
578
  <type by_reference="false">array</type>
579
  </tag>
580
  </docblock>
581
+ <argument line="1159">
582
  <name>$ID</name>
583
  <default><![CDATA[]]></default>
584
  <type/>
585
  </argument>
586
+ <argument line="1159">
587
  <name>$parent</name>
588
  <default><![CDATA[]]></default>
589
  <type/>
590
  </argument>
591
  </method>
592
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1463" package="Media Library Assistant">
593
  <name>mla_flush_mla_galleries</name>
594
  <full_name>mla_flush_mla_galleries</full_name>
595
+ <docblock line="1454">
596
  <description><![CDATA[Invalidates the $mla_galleries or $galleries array and cached values]]></description>
597
  <long-description><![CDATA[]]></long-description>
598
+ <tag line="1454" name="since" description="1.00"/>
599
+ <tag line="1454" name="param" description="name of the gallery's cache/option variable" type="string" variable="$option_name">
600
  <type by_reference="false">string</type>
601
  </tag>
602
+ <tag line="1454" name="return" description="" type="void">
603
  <type by_reference="false">void</type>
604
  </tag>
605
  </docblock>
606
+ <argument line="1463">
607
  <name>$option_name</name>
608
  <default><![CDATA[]]></default>
609
  <type/>
610
  </argument>
611
  </method>
612
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1487" package="Media Library Assistant">
613
  <name>mla_save_post_action</name>
614
  <full_name>mla_save_post_action</full_name>
615
+ <docblock line="1478">
616
  <description><![CDATA[Invalidates $mla_galleries and $galleries arrays and cached values after post, page or attachment updates]]></description>
617
  <long-description><![CDATA[]]></long-description>
618
+ <tag line="1478" name="since" description="1.00"/>
619
+ <tag line="1478" name="param" description="ID of post/page/attachment; not used at this time" type="integer" variable="$post_id">
620
  <type by_reference="false">integer</type>
621
  </tag>
622
+ <tag line="1478" name="return" description="" type="void">
623
  <type by_reference="false">void</type>
624
  </tag>
625
  </docblock>
626
+ <argument line="1487">
627
  <name>$post_id</name>
628
  <default><![CDATA[]]></default>
629
  <type/>
630
  </argument>
631
  </method>
632
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1504" package="Media Library Assistant">
633
  <name>_build_mla_galleries</name>
634
  <full_name>_build_mla_galleries</full_name>
635
+ <docblock line="1492">
636
  <description><![CDATA[Builds the $mla_galleries or $galleries array]]></description>
637
  <long-description><![CDATA[]]></long-description>
638
+ <tag line="1492" name="since" description="0.70"/>
639
+ <tag line="1492" name="param" description="name of the gallery's cache/option variable" type="string" variable="$option_name">
640
  <type by_reference="false">string</type>
641
  </tag>
642
+ <tag line="1492" name="param" description="by reference to the private static galleries array variable" type="array" variable="$galleries_array">
643
  <type by_reference="false">array</type>
644
  </tag>
645
+ <tag line="1492" name="param" description="the shortcode to be searched for and processed" type="string" variable="$shortcode">
646
  <type by_reference="false">string</type>
647
  </tag>
648
+ <tag line="1492" name="param" description="true to exclude revisions from the search" type="boolean" variable="$exclude_revisions">
649
  <type by_reference="false">boolean</type>
650
  </tag>
651
+ <tag line="1492" name="return" description="true if the galleries array is not empty" type="boolean">
652
  <type by_reference="false">boolean</type>
653
  </tag>
654
  </docblock>
655
+ <argument line="1504">
656
  <name>$option_name</name>
657
  <default><![CDATA[]]></default>
658
  <type/>
659
  </argument>
660
+ <argument line="1504">
661
  <name>$galleries_array</name>
662
  <default><![CDATA[]]></default>
663
  <type/>
664
  </argument>
665
+ <argument line="1504">
666
  <name>$shortcode</name>
667
  <default><![CDATA[]]></default>
668
  <type/>
669
  </argument>
670
+ <argument line="1504">
671
  <name>$exclude_revisions</name>
672
  <default><![CDATA[]]></default>
673
  <type/>
674
  </argument>
675
  </method>
676
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1613" package="Media Library Assistant">
677
  <name>_search_mla_galleries</name>
678
  <full_name>_search_mla_galleries</full_name>
679
+ <docblock line="1602">
680
  <description><![CDATA[Search the $mla_galleries or $galleries array]]></description>
681
  <long-description><![CDATA[]]></long-description>
682
+ <tag line="1602" name="since" description="0.70"/>
683
+ <tag line="1602" name="param" description="by reference to the private static galleries array variable" type="array" variable="$galleries_array">
684
  <type by_reference="false">array</type>
685
  </tag>
686
+ <tag line="1602" name="param" description="the attachment ID to be searched for and processed" type="int" variable="$attachment_id">
687
  <type by_reference="false">int</type>
688
  </tag>
689
+ <tag line="1602" name="return" description="All posts/pages with one or more galleries that include the attachment. The array key is the parent_post ID; each entry contains post_title and post_type." type="array">
690
  <type by_reference="false">array</type>
691
  </tag>
692
  </docblock>
693
+ <argument line="1613">
694
  <name>$galleries_array</name>
695
  <default><![CDATA[]]></default>
696
  <type/>
697
  </argument>
698
+ <argument line="1613">
699
  <name>$attachment_id</name>
700
  <default><![CDATA[]]></default>
701
  <type/>
702
  </argument>
703
  </method>
704
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1639" package="Media Library Assistant">
705
  <name>mla_exif_metadata_value</name>
706
  <full_name>mla_exif_metadata_value</full_name>
707
+ <docblock line="1626">
708
  <description><![CDATA[Parse one EXIF metadata field]]></description>
709
  <long-description><![CDATA[<p>Returns a string value, converting array data to a string as necessary.
710
  Also handles the special pseudo-values 'ALL_EXIF' and 'ALL_IPTC'.</p>]]></long-description>
711
+ <tag line="1626" name="since" description="1.13"/>
712
+ <tag line="1626" name="param" description="field name" type="string" variable="$key">
713
  <type by_reference="false">string</type>
714
  </tag>
715
+ <tag line="1626" name="param" description="metadata array containing 'mla_exif_metadata' and 'mla_iptc_metadata' arrays" type="string" variable="$image_metadata">
716
  <type by_reference="false">string</type>
717
  </tag>
718
+ <tag line="1626" name="return" description="string representation of metadata value or an empty string" type="string">
719
  <type by_reference="false">string</type>
720
  </tag>
721
  </docblock>
722
+ <argument line="1639">
723
  <name>$key</name>
724
  <default><![CDATA[]]></default>
725
  <type/>
726
  </argument>
727
+ <argument line="1639">
728
  <name>$image_metadata</name>
729
  <default><![CDATA[]]></default>
730
  <type/>
731
  </argument>
732
  </method>
733
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1669" package="Media Library Assistant">
734
  <name>mla_fetch_attachment_image_metadata</name>
735
  <full_name>mla_fetch_attachment_image_metadata</full_name>
736
+ <docblock line="1657">
737
  <description><![CDATA[Fetch and filter IPTC and EXIF meta data for an image attachment]]></description>
738
  <long-description><![CDATA[<p>Returns</p>]]></long-description>
739
+ <tag line="1657" name="since" description="0.90"/>
740
+ <tag line="1657" name="param" description="post ID of attachment" type="int" variable="$post_id">
741
  <type by_reference="false">int</type>
742
  </tag>
743
+ <tag line="1657" name="param" description="optional; if $post_id is zero, path to the image file." type="string" variable="$path">
744
  <type by_reference="false">string</type>
745
  </tag>
746
+ <tag line="1657" name="return" description="Meta data variables" type="array">
747
  <type by_reference="false">array</type>
748
  </tag>
749
  </docblock>
750
+ <argument line="1669">
751
  <name>$post_id</name>
752
  <default><![CDATA[]]></default>
753
  <type/>
754
  </argument>
755
+ <argument line="1669">
756
  <name>$path</name>
757
  <default><![CDATA['']]></default>
758
  <type/>
759
  </argument>
760
  </method>
761
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1732" package="Media Library Assistant">
762
+ <name>mla_update_item_postmeta</name>
763
+ <full_name>mla_update_item_postmeta</full_name>
764
+ <docblock line="1722">
765
+ <description><![CDATA[Update custom field data for a single attachment.]]></description>
766
+ <long-description><![CDATA[]]></long-description>
767
+ <tag line="1722" name="since" description="1.40"/>
768
+ <tag line="1722" name="param" description="The ID of the attachment to be updated" type="int" variable="$post_id">
769
+ <type by_reference="false">int</type>
770
+ </tag>
771
+ <tag line="1722" name="param" description="Field name =&gt; value pairs" type="array" variable="$new_meta">
772
+ <type by_reference="false">array</type>
773
+ </tag>
774
+ <tag line="1722" name="return" description="success/failure message(s)" type="string">
775
+ <type by_reference="false">string</type>
776
+ </tag>
777
+ </docblock>
778
+ <argument line="1732">
779
+ <name>$post_id</name>
780
+ <default><![CDATA[]]></default>
781
+ <type/>
782
+ </argument>
783
+ <argument line="1732">
784
+ <name>$new_meta</name>
785
+ <default><![CDATA[]]></default>
786
+ <type/>
787
+ </argument>
788
+ </method>
789
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1860" package="Media Library Assistant">
790
  <name>mla_update_single_item</name>
791
  <full_name>mla_update_single_item</full_name>
792
+ <docblock line="1847">
793
  <description><![CDATA[Update a single item; change the meta data
794
  for a single attachment.]]></description>
795
  <long-description><![CDATA[]]></long-description>
796
+ <tag line="1847" name="since" description="0.1"/>
797
+ <tag line="1847" name="param" description="The ID of the attachment to be updated" type="int" variable="$post_id">
798
  <type by_reference="false">int</type>
799
  </tag>
800
+ <tag line="1847" name="param" description="Field name =&gt; value pairs" type="array" variable="$new_data">
801
  <type by_reference="false">array</type>
802
  </tag>
803
+ <tag line="1847" name="param" description="Optional taxonomy term values, default null" type="array" variable="$tax_input">
804
  <type by_reference="false">array</type>
805
  </tag>
806
+ <tag line="1847" name="param" description="Optional taxonomy actions (add, remove, replace), default null" type="array" variable="$tax_actions">
807
  <type by_reference="false">array</type>
808
  </tag>
809
+ <tag line="1847" name="return" description="success/failure message and NULL content" type="array">
810
  <type by_reference="false">array</type>
811
  </tag>
812
  </docblock>
813
+ <argument line="1860">
814
  <name>$post_id</name>
815
  <default><![CDATA[]]></default>
816
  <type/>
817
  </argument>
818
+ <argument line="1860">
819
  <name>$new_data</name>
820
  <default><![CDATA[]]></default>
821
  <type/>
822
  </argument>
823
+ <argument line="1860">
824
  <name>$tax_input</name>
825
  <default><![CDATA[NULL]]></default>
826
  <type/>
827
  </argument>
828
+ <argument line="1860">
829
  <name>$tax_actions</name>
830
  <default><![CDATA[NULL]]></default>
831
  <type/>
832
  </argument>
833
  </method>
834
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2072" package="Media Library Assistant">
835
  <name>_remove_tags</name>
836
  <full_name>_remove_tags</full_name>
837
+ <docblock line="2061">
838
  <description><![CDATA[Remove tags from a term ids list]]></description>
839
  <long-description><![CDATA[]]></long-description>
840
+ <tag line="2061" name="since" description="0.40"/>
841
+ <tag line="2061" name="param" description="The term ids currently assigned" type="array" variable="$terms_before">
842
  <type by_reference="false">array</type>
843
  </tag>
844
+ <tag line="2061" name="param" description="| string The term ids (array) or names (string) to remove" type="array" variable="$tags">
845
  <type by_reference="false">array</type>
846
  </tag>
847
+ <tag line="2061" name="param" description="The taxonomy object" type="object" variable="$taxonomy_obj">
848
  <type by_reference="false">object</type>
849
  </tag>
850
+ <tag line="2061" name="return" description="Term ids of the surviving tags" type="array">
851
  <type by_reference="false">array</type>
852
  </tag>
853
  </docblock>
854
+ <argument line="2072">
855
  <name>$terms_before</name>
856
  <default><![CDATA[]]></default>
857
  <type/>
858
  </argument>
859
+ <argument line="2072">
860
  <name>$tags</name>
861
  <default><![CDATA[]]></default>
862
  <type/>
863
  </argument>
864
+ <argument line="2072">
865
  <name>$taxonomy_obj</name>
866
  <default><![CDATA[]]></default>
867
  <type/>
868
  </argument>
869
  </method>
870
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2115" package="Media Library Assistant">
871
  <name>_hex_dump</name>
872
  <full_name>_hex_dump</full_name>
873
+ <docblock line="2104">
874
  <description><![CDATA[Format printable version of binary data]]></description>
875
  <long-description><![CDATA[]]></long-description>
876
+ <tag line="2104" name="since" description="0.90"/>
877
+ <tag line="2104" name="param" description="Binary data" type="string" variable="$data">
878
  <type by_reference="false">string</type>
879
  </tag>
880
+ <tag line="2104" name="param" description="Bytes to format, default = 0 (all bytes)" type="integer" variable="$limit">
881
  <type by_reference="false">integer</type>
882
  </tag>
883
+ <tag line="2104" name="param" description="Bytes to format on each line" type="\intger" variable="$bytes_per_row">
884
  <type by_reference="false">\intger</type>
885
  </tag>
886
+ <tag line="2104" name="return" description="Printable representation of $data" type="string">
887
  <type by_reference="false">string</type>
888
  </tag>
889
  </docblock>
890
+ <argument line="2115">
891
  <name>$data</name>
892
  <default><![CDATA[]]></default>
893
  <type/>
894
  </argument>
895
+ <argument line="2115">
896
  <name>$limit</name>
897
  <default><![CDATA[0]]></default>
898
  <type/>
899
  </argument>
900
+ <argument line="2115">
901
  <name>$bytes_per_row</name>
902
  <default><![CDATA[16]]></default>
903
  <type/>
905
  </method>
906
  </class>
907
  </file>
908
+ <file path="includes\class-mla-edit-media.php" hash="ffa4ba62a4969d2e50e12b044ce0cace" package="Media Library Assistant">
909
  <docblock line="2">
910
  <description><![CDATA[Media Library Assistant Edit Media screen enhancements]]></description>
911
  <long-description><![CDATA[]]></long-description>
922
  <tag line="9" name="package" description="Media Library Assistant"/>
923
  <tag line="9" name="since" description="0.80"/>
924
  </docblock>
925
+ <property final="false" static="true" visibility="private" line="203" namespace="global" package="Media Library Assistant">
926
  <name>$mla_references</name>
927
  <default><![CDATA[null]]></default>
928
+ <docblock line="193">
929
  <description><![CDATA[Where-used values for the current item]]></description>
930
  <long-description><![CDATA[<p>This array contains the Featured/Inserted/Gallery/MLA Gallery references for the item.
931
  The array is built once each page load and cached for subsequent calls.</p>]]></long-description>
932
+ <tag line="193" name="since" description="0.80"/>
933
+ <tag line="193" name="var" description="" type="array">
934
  <type by_reference="false">array</type>
935
  </tag>
936
  </docblock>
998
  <description><![CDATA[Registers meta boxes for the Edit Media screen.]]></description>
999
  <long-description><![CDATA[<p>Declared public because it is an action.</p>]]></long-description>
1000
  <tag line="108" name="since" description="0.80"/>
1001
+ <tag line="108" name="param" description="type of the current post, e.g., 'attachment' (optional, default 'unknown')" type="string" variable="$post_type">
1002
  <type by_reference="false">string</type>
1003
  </tag>
1004
+ <tag line="108" name="param" description="current post (optional, default (object) array ( 'ID' =&gt; 0 ))" type="object" variable="$post">
1005
  <type by_reference="false">object</type>
1006
  </tag>
1007
  <tag line="108" name="return" description="" type="void">
1010
  </docblock>
1011
  <argument line="119">
1012
  <name>$post_type</name>
1013
+ <default><![CDATA['unknown']]></default>
1014
  <type/>
1015
  </argument>
1016
  <argument line="119">
1017
  <name>$post</name>
1018
+ <default><![CDATA[NULL]]></default>
1019
  <type/>
1020
  </argument>
1021
  </method>
1022
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="155" package="Media Library Assistant">
1023
  <name>mla_edit_add_help_tab</name>
1024
  <full_name>mla_edit_add_help_tab</full_name>
1025
+ <docblock line="145">
1026
  <description><![CDATA[Add contextual help tabs to the WordPress Edit Media page]]></description>
1027
  <long-description><![CDATA[]]></long-description>
1028
+ <tag line="145" name="since" description="0.90"/>
1029
+ <tag line="145" name="param" description="title as shown on the screen" type="string" variable="$admin_title">
1030
  <type by_reference="false">string</type>
1031
  </tag>
1032
+ <tag line="145" name="param" description="title as shown in the HTML header" type="string" variable="$title">
1033
  <type by_reference="false">string</type>
1034
  </tag>
1035
+ <tag line="145" name="return" description="" type="void">
1036
  <type by_reference="false">void</type>
1037
  </tag>
1038
  </docblock>
1039
+ <argument line="155">
1040
  <name>$admin_title</name>
1041
  <default><![CDATA[]]></default>
1042
  <type/>
1043
  </argument>
1044
+ <argument line="155">
1045
  <name>$title</name>
1046
  <default><![CDATA[]]></default>
1047
  <type/>
1048
  </argument>
1049
  </method>
1050
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="215" package="Media Library Assistant">
1051
  <name>mla_parent_info_handler</name>
1052
  <full_name>mla_parent_info_handler</full_name>
1053
+ <docblock line="205">
1054
  <description><![CDATA[Renders the Parent Info meta box on the Edit Media page.]]></description>
1055
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1056
+ <tag line="205" name="since" description="0.80"/>
1057
+ <tag line="205" name="param" description="current post" type="object" variable="$post">
1058
  <type by_reference="false">object</type>
1059
  </tag>
1060
+ <tag line="205" name="return" description="echoes the HTML markup for the meta box content" type="void">
1061
  <type by_reference="false">void</type>
1062
  </tag>
1063
  </docblock>
1064
+ <argument line="215">
1065
  <name>$post</name>
1066
  <default><![CDATA[]]></default>
1067
  <type/>
1068
  </argument>
1069
  </method>
1070
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="240" package="Media Library Assistant">
1071
  <name>mla_menu_order_handler</name>
1072
  <full_name>mla_menu_order_handler</full_name>
1073
+ <docblock line="230">
1074
  <description><![CDATA[Renders the Menu Order meta box on the Edit Media page.]]></description>
1075
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1076
+ <tag line="230" name="since" description="0.80"/>
1077
+ <tag line="230" name="param" description="current post" type="object" variable="$post">
1078
  <type by_reference="false">object</type>
1079
  </tag>
1080
+ <tag line="230" name="return" description="echoes the HTML markup for the meta box content" type="void">
1081
  <type by_reference="false">void</type>
1082
  </tag>
1083
  </docblock>
1084
+ <argument line="240">
1085
  <name>$post</name>
1086
  <default><![CDATA[]]></default>
1087
  <type/>
1088
  </argument>
1089
  </method>
1090
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="255" package="Media Library Assistant">
1091
  <name>mla_image_metadata_handler</name>
1092
  <full_name>mla_image_metadata_handler</full_name>
1093
+ <docblock line="245">
1094
  <description><![CDATA[Renders the Image Metadata meta box on the Edit Media page.]]></description>
1095
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1096
+ <tag line="245" name="since" description="0.80"/>
1097
+ <tag line="245" name="param" description="current post" type="object" variable="$post">
1098
  <type by_reference="false">object</type>
1099
  </tag>
1100
+ <tag line="245" name="return" description="echoes the HTML markup for the meta box content" type="void">
1101
  <type by_reference="false">void</type>
1102
  </tag>
1103
  </docblock>
1104
+ <argument line="255">
1105
  <name>$post</name>
1106
  <default><![CDATA[]]></default>
1107
  <type/>
1108
  </argument>
1109
  </method>
1110
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="276" package="Media Library Assistant">
1111
  <name>mla_featured_in_handler</name>
1112
  <full_name>mla_featured_in_handler</full_name>
1113
+ <docblock line="266">
1114
  <description><![CDATA[Renders the Featured in meta box on the Edit Media page.]]></description>
1115
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1116
+ <tag line="266" name="since" description="0.80"/>
1117
+ <tag line="266" name="param" description="current post" type="object" variable="$post">
1118
  <type by_reference="false">object</type>
1119
  </tag>
1120
+ <tag line="266" name="return" description="echoes the HTML markup for the meta box content" type="void">
1121
  <type by_reference="false">void</type>
1122
  </tag>
1123
  </docblock>
1124
+ <argument line="276">
1125
  <name>$post</name>
1126
  <default><![CDATA[]]></default>
1127
  <type/>
1128
  </argument>
1129
  </method>
1130
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="306" package="Media Library Assistant">
1131
  <name>mla_inserted_in_handler</name>
1132
  <full_name>mla_inserted_in_handler</full_name>
1133
+ <docblock line="296">
1134
  <description><![CDATA[Renders the Inserted in meta box on the Edit Media page.]]></description>
1135
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1136
+ <tag line="296" name="since" description="0.80"/>
1137
+ <tag line="296" name="param" description="current post" type="object" variable="$post">
1138
  <type by_reference="false">object</type>
1139
  </tag>
1140
+ <tag line="296" name="return" description="echoes the HTML markup for the meta box content" type="void">
1141
  <type by_reference="false">void</type>
1142
  </tag>
1143
  </docblock>
1144
+ <argument line="306">
1145
  <name>$post</name>
1146
  <default><![CDATA[]]></default>
1147
  <type/>
1148
  </argument>
1149
  </method>
1150
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="340" package="Media Library Assistant">
1151
  <name>mla_gallery_in_handler</name>
1152
  <full_name>mla_gallery_in_handler</full_name>
1153
+ <docblock line="330">
1154
  <description><![CDATA[Renders the Gallery in meta box on the Edit Media page.]]></description>
1155
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1156
+ <tag line="330" name="since" description="0.80"/>
1157
+ <tag line="330" name="param" description="current post" type="object" variable="$post">
1158
  <type by_reference="false">object</type>
1159
  </tag>
1160
+ <tag line="330" name="return" description="echoes the HTML markup for the meta box content" type="void">
1161
  <type by_reference="false">void</type>
1162
  </tag>
1163
  </docblock>
1164
+ <argument line="340">
1165
  <name>$post</name>
1166
  <default><![CDATA[]]></default>
1167
  <type/>
1168
  </argument>
1169
  </method>
1170
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="370" package="Media Library Assistant">
1171
  <name>mla_mla_gallery_in_handler</name>
1172
  <full_name>mla_mla_gallery_in_handler</full_name>
1173
+ <docblock line="360">
1174
  <description><![CDATA[Renders the Gallery in meta box on the Edit Media page.]]></description>
1175
  <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
1176
+ <tag line="360" name="since" description="0.80"/>
1177
+ <tag line="360" name="param" description="current post" type="object" variable="$post">
1178
  <type by_reference="false">object</type>
1179
  </tag>
1180
+ <tag line="360" name="return" description="echoes the HTML markup for the meta box content" type="void">
1181
  <type by_reference="false">void</type>
1182
  </tag>
1183
  </docblock>
1184
+ <argument line="370">
1185
  <name>$post</name>
1186
  <default><![CDATA[]]></default>
1187
  <type/>
1188
  </argument>
1189
  </method>
1190
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="400" package="Media Library Assistant">
1191
  <name>mla_edit_attachment_action</name>
1192
  <full_name>mla_edit_attachment_action</full_name>
1193
+ <docblock line="390">
1194
  <description><![CDATA[Saves updates from the Edit Media screen.]]></description>
1195
  <long-description><![CDATA[<p>Declared public because it is an action.</p>]]></long-description>
1196
+ <tag line="390" name="since" description="0.80"/>
1197
+ <tag line="390" name="param" description="ID of the current post" type="integer" variable="$post_ID">
1198
  <type by_reference="false">integer</type>
1199
  </tag>
1200
+ <tag line="390" name="return" description="" type="void">
1201
  <type by_reference="false">void</type>
1202
  </tag>
1203
  </docblock>
1204
+ <argument line="400">
1205
  <name>$post_ID</name>
1206
  <default><![CDATA[]]></default>
1207
  <type/>
1209
  </method>
1210
  </class>
1211
  </file>
1212
+ <file path="includes\class-mla-list-table.php" hash="3da5a64259a4e9c58a5e52fd3dcac7e2" package="Media Library Assistant">
1213
  <docblock line="2">
1214
  <description><![CDATA[Media Library Assistant extended List Table class]]></description>
1215
  <long-description><![CDATA[]]></long-description>
1293
  </tag>
1294
  </docblock>
1295
  </property>
1296
+ <property final="false" static="true" visibility="private" line="157" namespace="global" package="Media Library Assistant">
1297
  <name>$default_sortable_columns</name>
1298
  <default><![CDATA[array('ID_parent' => array('ID', false), 'title_name' => array('title_name', false), 'post_title' => array('post_title', false), 'post_name' => array('post_name', false), 'parent' => array('post_parent', false), 'menu_order' => array('menu_order', false), 'alt_text' => array('_wp_attachment_image_alt', false), 'caption' => array('post_excerpt', false), 'description' => array('post_content', false), 'post_mime_type' => array('post_mime_type', false), 'base_file' => array('_wp_attached_file', false), 'date' => array('post_date', false), 'modified' => array('post_modified', false), 'author' => array('post_author', false), 'attached_to' => array('post_parent', false))]]></default>
1299
+ <docblock line="139">
1300
  <description><![CDATA[Sortable column definitions]]></description>
1301
  <long-description><![CDATA[<p>This array defines the table columns that can be sorted. The array key
1302
  is the column slug that needs to be sortable, and the value is database column
1308
 
1309
  <p>Taxonomy columns, if any, are added to this array by mla_admin_init_action.
1310
  Custom field columns are added to this array by mla_admin_init_action.</p>]]></long-description>
1311
+ <tag line="139" name="since" description="0.1"/>
1312
+ <tag line="139" name="var" description="" type="array">
1313
  <type by_reference="false">array</type>
1314
  </tag>
1315
  </docblock>
1316
  </property>
1317
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="188" package="Media Library Assistant">
1318
  <name>_default_hidden_columns</name>
1319
  <full_name>_default_hidden_columns</full_name>
1320
+ <docblock line="181">
1321
  <description><![CDATA[Access the default list of hidden columns]]></description>
1322
  <long-description><![CDATA[]]></long-description>
1323
+ <tag line="181" name="since" description="0.1"/>
1324
+ <tag line="181" name="return" description="default list of hidden columns" type="array">
1325
  <type by_reference="false">array</type>
1326
  </tag>
1327
  </docblock>
1328
  </method>
1329
+ <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="204" package="Media Library Assistant">
1330
  <name>_avail_mime_types</name>
1331
  <full_name>_avail_mime_types</full_name>
1332
+ <docblock line="192">
1333
+ <description><![CDATA[Get MIME types with one or more attachments for view preparation]]></description>
1334
  <long-description><![CDATA[<p>Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
1335
+ but uses the output of wp_count_attachments() as input.</p>]]></long-description>
1336
+ <tag line="192" name="since" description="0.1"/>
1337
+ <tag line="192" name="param" description="Number of posts for each MIME type" type="array" variable="$num_posts">
1338
  <type by_reference="false">array</type>
1339
  </tag>
1340
+ <tag line="192" name="return" description="Mime type names" type="array">
1341
  <type by_reference="false">array</type>
1342
  </tag>
1343
  </docblock>
1344
+ <argument line="204">
1345
  <name>$num_posts</name>
1346
  <default><![CDATA[]]></default>
1347
  <type/>
1348
  </argument>
1349
  </method>
1350
  <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="224" package="Media Library Assistant">
 
 
 
 
 
 
 
 
 
 
 
 
 
1351
  <name>mla_get_taxonomy_filter_dropdown</name>
1352
  <full_name>mla_get_taxonomy_filter_dropdown</full_name>
1353
+ <docblock line="215">
1354
  <description><![CDATA[Get dropdown box of terms to filter by, if available]]></description>
1355
  <long-description><![CDATA[]]></long-description>
1356
+ <tag line="215" name="since" description="1.20"/>
1357
+ <tag line="215" name="param" description="currently selected term_id || zero (default)" type="integer" variable="$selected">
1358
  <type by_reference="false">integer</type>
1359
  </tag>
1360
+ <tag line="215" name="return" description="HTML markup for dropdown box" type="string">
1361
  <type by_reference="false">string</type>
1362
  </tag>
1363
  </docblock>
1364
+ <argument line="224">
1365
  <name>$selected</name>
1366
  <default><![CDATA[0]]></default>
1367
  <type/>
1368
  </argument>
1369
  </method>
1370
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="269" package="Media Library Assistant">
1371
  <name>mla_get_sortable_columns</name>
1372
  <full_name>mla_get_sortable_columns</full_name>
1373
+ <docblock line="262">
1374
  <description><![CDATA[Return the names and display values of the sortable columns]]></description>
1375
  <long-description><![CDATA[]]></long-description>
1376
+ <tag line="262" name="since" description="0.30"/>
1377
+ <tag line="262" name="return" description="name =&gt; array( orderby value, heading ) for sortable columns" type="array">
1378
  <type by_reference="false">array</type>
1379
  </tag>
1380
  </docblock>
1381
  </method>
1382
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="296" package="Media Library Assistant">
1383
  <name>mla_manage_hidden_columns_filter</name>
1384
  <full_name>mla_manage_hidden_columns_filter</full_name>
1385
+ <docblock line="281">
1386
  <description><![CDATA[Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden']]></description>
1387
  <long-description><![CDATA[<p>Required because the screen.php get_hidden_columns function only uses
1388
  the get_user_option result. Set when the file is loaded because the object
1389
  is not created in time for the call from screen.php.</p>]]></long-description>
1390
+ <tag line="281" name="since" description="0.1"/>
1391
+ <tag line="281" name="param" description="current list of hidden columns, if any" type="string" variable="$result">
1392
  <type by_reference="false">string</type>
1393
  </tag>
1394
+ <tag line="281" name="param" description="'managemedia_page_mla-menucolumnshidden'" type="string" variable="$option">
1395
  <type by_reference="false">string</type>
1396
  </tag>
1397
+ <tag line="281" name="param" description="WP_User object, if logged in" type="object" variable="$user_data">
1398
  <type by_reference="false">object</type>
1399
  </tag>
1400
+ <tag line="281" name="return" description="updated list of hidden columns" type="array">
1401
  <type by_reference="false">array</type>
1402
  </tag>
1403
  </docblock>
1404
+ <argument line="296">
1405
  <name>$result</name>
1406
  <default><![CDATA[]]></default>
1407
  <type/>
1408
  </argument>
1409
+ <argument line="296">
1410
  <name>$option</name>
1411
  <default><![CDATA[]]></default>
1412
  <type/>
1413
  </argument>
1414
+ <argument line="296">
1415
  <name>$user_data</name>
1416
  <default><![CDATA[]]></default>
1417
  <type/>
1418
  </argument>
1419
  </method>
1420
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="314" package="Media Library Assistant">
1421
  <name>mla_manage_columns_filter</name>
1422
  <full_name>mla_manage_columns_filter</full_name>
1423
+ <docblock line="303">
1424
  <description><![CDATA[Handler for filter 'manage_media_page_mla-menu_columns']]></description>
1425
  <long-description><![CDATA[<p>This required filter dictates the table's columns and titles. Set when the
1426
  file is loaded because the list_table object isn't created in time
1427
  to affect the "screen options" setup.</p>]]></long-description>
1428
+ <tag line="303" name="since" description="0.1"/>
1429
+ <tag line="303" name="return" description="list of table columns" type="array">
1430
  <type by_reference="false">array</type>
1431
  </tag>
1432
  </docblock>
1433
  </method>
1434
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="329" package="Media Library Assistant">
1435
  <name>mla_admin_init_action</name>
1436
  <full_name>mla_admin_init_action</full_name>
1437
+ <docblock line="319">
1438
+ <description><![CDATA[Adds support for taxonomy and custom field columns]]></description>
1439
  <long-description><![CDATA[<p>Called in the admin_init action because the list_table object isn't
1440
  created in time to affect the "screen options" setup.</p>]]></long-description>
1441
+ <tag line="319" name="since" description="0.30"/>
1442
+ <tag line="319" name="return" description="" type="void">
1443
  <type by_reference="false">void</type>
1444
  </tag>
1445
  </docblock>
1446
  </method>
1447
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="355" package="Media Library Assistant">
1448
  <name>__construct</name>
1449
  <full_name>__construct</full_name>
1450
+ <docblock line="347">
1451
  <description><![CDATA[Initializes some properties from $_REQUEST vairables, then
1452
  calls the parent constructor to set some default configs.]]></description>
1453
  <long-description><![CDATA[]]></long-description>
1454
+ <tag line="347" name="since" description="0.1"/>
1455
+ <tag line="347" name="return" description="" type="void">
1456
  <type by_reference="false">void</type>
1457
  </tag>
1458
  </docblock>
1459
  </method>
1460
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="388" package="Media Library Assistant">
1461
  <name>column_default</name>
1462
  <full_name>column_default</full_name>
1463
+ <docblock line="375">
1464
  <description><![CDATA[Supply a column value if no column-specific function has been defined]]></description>
1465
+ <long-description><![CDATA[<p>Called when the parent class can't find a method specifically built for a given column.
1466
+ The taxonomy and custom field columns are handled here. All other columns should have
1467
+ a specific method, so this function returns a troubleshooting message.</p>]]></long-description>
1468
+ <tag line="375" name="since" description="0.1"/>
1469
+ <tag line="375" name="param" description="A singular item (one full row's worth of data)" type="array" variable="$item">
1470
  <type by_reference="false">array</type>
1471
  </tag>
1472
+ <tag line="375" name="param" description="The name/slug of the column to be processed" type="array" variable="$column_name">
1473
  <type by_reference="false">array</type>
1474
  </tag>
1475
+ <tag line="375" name="return" description="Text or HTML to be placed inside the column" type="string">
1476
  <type by_reference="false">string</type>
1477
  </tag>
1478
  </docblock>
1479
+ <argument line="388">
1480
  <name>$item</name>
1481
  <default><![CDATA[]]></default>
1482
  <type/>
1483
  </argument>
1484
+ <argument line="388">
1485
  <name>$column_name</name>
1486
  <default><![CDATA[]]></default>
1487
  <type/>
1488
  </argument>
1489
  </method>
1490
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="456" package="Media Library Assistant">
1491
  <name>column_cb</name>
1492
  <full_name>column_cb</full_name>
1493
+ <docblock line="447">
1494
  <description><![CDATA[Displays checkboxes for using bulk actions.]]></description>
1495
  <long-description><![CDATA[<p>The 'cb' column
1496
  is given special treatment when columns are processed.</p>]]></long-description>
1497
+ <tag line="447" name="since" description="0.1"/>
1498
+ <tag line="447" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1499
  <type by_reference="false">array</type>
1500
  </tag>
1501
+ <tag line="447" name="return" description="HTML markup to be placed inside the column" type="string">
1502
  <type by_reference="false">string</type>
1503
  </tag>
1504
  </docblock>
1505
+ <argument line="456">
1506
  <name>$item</name>
1507
  <default><![CDATA[]]></default>
1508
  <type/>
1509
  </argument>
1510
  </method>
1511
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="472" package="Media Library Assistant">
1512
  <name>column_icon</name>
1513
  <full_name>column_icon</full_name>
1514
+ <docblock line="464">
1515
  <description><![CDATA[Supply the content for a custom column]]></description>
1516
  <long-description><![CDATA[]]></long-description>
1517
+ <tag line="464" name="since" description="0.1"/>
1518
+ <tag line="464" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1519
  <type by_reference="false">array</type>
1520
  </tag>
1521
+ <tag line="464" name="return" description="HTML markup to be placed inside the column" type="string">
1522
  <type by_reference="false">string</type>
1523
  </tag>
1524
  </docblock>
1525
+ <argument line="472">
1526
  <name>$item</name>
1527
  <default><![CDATA[]]></default>
1528
  <type/>
1529
  </argument>
1530
  </method>
1531
+ <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="491" package="Media Library Assistant">
1532
  <name>_build_rollover_actions</name>
1533
  <full_name>_build_rollover_actions</full_name>
1534
+ <docblock line="480">
1535
  <description><![CDATA[Add rollover actions to exactly one of the following displayed columns:
1536
  'ID_parent', 'title_name', 'post_title', 'post_name']]></description>
1537
  <long-description><![CDATA[]]></long-description>
1538
+ <tag line="480" name="since" description="0.1"/>
1539
+ <tag line="480" name="param" description="A singular attachment (post) object" type="object" variable="$item">
1540
  <type by_reference="false">object</type>
1541
  </tag>
1542
+ <tag line="480" name="param" description="Current column name" type="string" variable="$column">
1543
  <type by_reference="false">string</type>
1544
  </tag>
1545
+ <tag line="480" name="return" description="Names and URLs of row-level actions" type="array">
1546
  <type by_reference="false">array</type>
1547
  </tag>
1548
  </docblock>
1549
+ <argument line="491">
1550
  <name>$item</name>
1551
  <default><![CDATA[]]></default>
1552
  <type/>
1553
  </argument>
1554
+ <argument line="491">
1555
  <name>$column</name>
1556
  <default><![CDATA[]]></default>
1557
  <type/>
1558
  </argument>
1559
  </method>
1560
+ <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="569" package="Media Library Assistant">
1561
  <name>_build_inline_data</name>
1562
  <full_name>_build_inline_data</full_name>
1563
+ <docblock line="560">
1564
  <description><![CDATA[Add hidden fields with the data for use in the inline editor]]></description>
1565
  <long-description><![CDATA[]]></long-description>
1566
+ <tag line="560" name="since" description="0.20"/>
1567
+ <tag line="560" name="param" description="A singular attachment (post) object" type="object" variable="$item">
1568
  <type by_reference="false">object</type>
1569
  </tag>
1570
+ <tag line="560" name="return" description="HTML &lt;div&gt; with row data" type="string">
1571
  <type by_reference="false">string</type>
1572
  </tag>
1573
  </docblock>
1574
+ <argument line="569">
1575
  <name>$item</name>
1576
  <default><![CDATA[]]></default>
1577
  <type/>
1578
  </argument>
1579
  </method>
1580
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="617" package="Media Library Assistant">
1581
  <name>column_ID_parent</name>
1582
  <full_name>column_ID_parent</full_name>
1583
+ <docblock line="609">
1584
  <description><![CDATA[Supply the content for a custom column]]></description>
1585
  <long-description><![CDATA[]]></long-description>
1586
+ <tag line="609" name="since" description="0.1"/>
1587
+ <tag line="609" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1588
  <type by_reference="false">array</type>
1589
  </tag>
1590
+ <tag line="609" name="return" description="HTML markup to be placed inside the column" type="string">
1591
  <type by_reference="false">string</type>
1592
  </tag>
1593
  </docblock>
1594
+ <argument line="617">
1595
  <name>$item</name>
1596
  <default><![CDATA[]]></default>
1597
  <type/>
1598
  </argument>
1599
  </method>
1600
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="649" package="Media Library Assistant">
1601
  <name>column_title_name</name>
1602
  <full_name>column_title_name</full_name>
1603
+ <docblock line="641">
1604
  <description><![CDATA[Supply the content for a custom column]]></description>
1605
  <long-description><![CDATA[]]></long-description>
1606
+ <tag line="641" name="since" description="0.1"/>
1607
+ <tag line="641" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1608
  <type by_reference="false">array</type>
1609
  </tag>
1610
+ <tag line="641" name="return" description="HTML markup to be placed inside the column" type="string">
1611
  <type by_reference="false">string</type>
1612
  </tag>
1613
  </docblock>
1614
+ <argument line="649">
1615
  <name>$item</name>
1616
  <default><![CDATA[]]></default>
1617
  <type/>
1618
  </argument>
1619
  </method>
1620
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="672" package="Media Library Assistant">
1621
  <name>column_post_title</name>
1622
  <full_name>column_post_title</full_name>
1623
+ <docblock line="664">
1624
  <description><![CDATA[Supply the content for a custom column]]></description>
1625
  <long-description><![CDATA[]]></long-description>
1626
+ <tag line="664" name="since" description="0.1"/>
1627
+ <tag line="664" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1628
  <type by_reference="false">array</type>
1629
  </tag>
1630
+ <tag line="664" name="return" description="HTML markup to be placed inside the column" type="string">
1631
  <type by_reference="false">string</type>
1632
  </tag>
1633
  </docblock>
1634
+ <argument line="672">
1635
  <name>$item</name>
1636
  <default><![CDATA[]]></default>
1637
  <type/>
1638
  </argument>
1639
  </method>
1640
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="690" package="Media Library Assistant">
1641
  <name>column_post_name</name>
1642
  <full_name>column_post_name</full_name>
1643
+ <docblock line="682">
1644
  <description><![CDATA[Supply the content for a custom column]]></description>
1645
  <long-description><![CDATA[]]></long-description>
1646
+ <tag line="682" name="since" description="0.1"/>
1647
+ <tag line="682" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1648
  <type by_reference="false">array</type>
1649
  </tag>
1650
+ <tag line="682" name="return" description="HTML markup to be placed inside the column" type="string">
1651
  <type by_reference="false">string</type>
1652
  </tag>
1653
  </docblock>
1654
+ <argument line="690">
1655
  <name>$item</name>
1656
  <default><![CDATA[]]></default>
1657
  <type/>
1658
  </argument>
1659
  </method>
1660
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="708" package="Media Library Assistant">
1661
  <name>column_parent</name>
1662
  <full_name>column_parent</full_name>
1663
+ <docblock line="700">
1664
  <description><![CDATA[Supply the content for a custom column]]></description>
1665
  <long-description><![CDATA[]]></long-description>
1666
+ <tag line="700" name="since" description="0.1"/>
1667
+ <tag line="700" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1668
  <type by_reference="false">array</type>
1669
  </tag>
1670
+ <tag line="700" name="return" description="HTML markup to be placed inside the column" type="string">
1671
  <type by_reference="false">string</type>
1672
  </tag>
1673
  </docblock>
1674
+ <argument line="708">
1675
  <name>$item</name>
1676
  <default><![CDATA[]]></default>
1677
  <type/>
1678
  </argument>
1679
  </method>
1680
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="733" package="Media Library Assistant">
1681
  <name>column_menu_order</name>
1682
  <full_name>column_menu_order</full_name>
1683
+ <docblock line="725">
1684
  <description><![CDATA[Supply the content for a custom column]]></description>
1685
  <long-description><![CDATA[]]></long-description>
1686
+ <tag line="725" name="since" description="0.60"/>
1687
+ <tag line="725" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1688
  <type by_reference="false">array</type>
1689
  </tag>
1690
+ <tag line="725" name="return" description="HTML markup to be placed inside the column" type="string">
1691
  <type by_reference="false">string</type>
1692
  </tag>
1693
  </docblock>
1694
+ <argument line="733">
1695
  <name>$item</name>
1696
  <default><![CDATA[]]></default>
1697
  <type/>
1698
  </argument>
1699
  </method>
1700
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="745" package="Media Library Assistant">
1701
  <name>column_featured</name>
1702
  <full_name>column_featured</full_name>
1703
+ <docblock line="737">
1704
  <description><![CDATA[Supply the content for a custom column]]></description>
1705
  <long-description><![CDATA[]]></long-description>
1706
+ <tag line="737" name="since" description="0.1"/>
1707
+ <tag line="737" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1708
  <type by_reference="false">array</type>
1709
  </tag>
1710
+ <tag line="737" name="return" description="HTML markup to be placed inside the column" type="string">
1711
  <type by_reference="false">string</type>
1712
  </tag>
1713
  </docblock>
1714
+ <argument line="745">
1715
  <name>$item</name>
1716
  <default><![CDATA[]]></default>
1717
  <type/>
1718
  </argument>
1719
  </method>
1720
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="776" package="Media Library Assistant">
1721
  <name>column_inserted</name>
1722
  <full_name>column_inserted</full_name>
1723
+ <docblock line="768">
1724
  <description><![CDATA[Supply the content for a custom column]]></description>
1725
  <long-description><![CDATA[]]></long-description>
1726
+ <tag line="768" name="since" description="0.1"/>
1727
+ <tag line="768" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1728
  <type by_reference="false">array</type>
1729
  </tag>
1730
+ <tag line="768" name="return" description="HTML markup to be placed inside the column" type="string">
1731
  <type by_reference="false">string</type>
1732
  </tag>
1733
  </docblock>
1734
+ <argument line="776">
1735
  <name>$item</name>
1736
  <default><![CDATA[]]></default>
1737
  <type/>
1738
  </argument>
1739
  </method>
1740
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="811" package="Media Library Assistant">
1741
  <name>column_galleries</name>
1742
  <full_name>column_galleries</full_name>
1743
+ <docblock line="803">
1744
  <description><![CDATA[Supply the content for a custom column]]></description>
1745
  <long-description><![CDATA[]]></long-description>
1746
+ <tag line="803" name="since" description="0.70"/>
1747
+ <tag line="803" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1748
  <type by_reference="false">array</type>
1749
  </tag>
1750
+ <tag line="803" name="return" description="HTML markup to be placed inside the column" type="string">
1751
  <type by_reference="false">string</type>
1752
  </tag>
1753
  </docblock>
1754
+ <argument line="811">
1755
  <name>$item</name>
1756
  <default><![CDATA[]]></default>
1757
  <type/>
1758
  </argument>
1759
  </method>
1760
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="842" package="Media Library Assistant">
1761
  <name>column_mla_galleries</name>
1762
  <full_name>column_mla_galleries</full_name>
1763
+ <docblock line="834">
1764
  <description><![CDATA[Supply the content for a custom column]]></description>
1765
  <long-description><![CDATA[]]></long-description>
1766
+ <tag line="834" name="since" description="0.70"/>
1767
+ <tag line="834" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1768
  <type by_reference="false">array</type>
1769
  </tag>
1770
+ <tag line="834" name="return" description="HTML markup to be placed inside the column" type="string">
1771
  <type by_reference="false">string</type>
1772
  </tag>
1773
  </docblock>
1774
+ <argument line="842">
1775
  <name>$item</name>
1776
  <default><![CDATA[]]></default>
1777
  <type/>
1778
  </argument>
1779
  </method>
1780
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="873" package="Media Library Assistant">
1781
  <name>column_alt_text</name>
1782
  <full_name>column_alt_text</full_name>
1783
+ <docblock line="865">
1784
  <description><![CDATA[Supply the content for a custom column]]></description>
1785
  <long-description><![CDATA[]]></long-description>
1786
+ <tag line="865" name="since" description="0.1"/>
1787
+ <tag line="865" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1788
  <type by_reference="false">array</type>
1789
  </tag>
1790
+ <tag line="865" name="return" description="HTML markup to be placed inside the column" type="string">
1791
  <type by_reference="false">string</type>
1792
  </tag>
1793
  </docblock>
1794
+ <argument line="873">
1795
  <name>$item</name>
1796
  <default><![CDATA[]]></default>
1797
  <type/>
1798
  </argument>
1799
  </method>
1800
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="893" package="Media Library Assistant">
1801
  <name>column_caption</name>
1802
  <full_name>column_caption</full_name>
1803
+ <docblock line="885">
1804
  <description><![CDATA[Supply the content for a custom column]]></description>
1805
  <long-description><![CDATA[]]></long-description>
1806
+ <tag line="885" name="since" description="0.1"/>
1807
+ <tag line="885" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1808
  <type by_reference="false">array</type>
1809
  </tag>
1810
+ <tag line="885" name="return" description="HTML markup to be placed inside the column" type="string">
1811
  <type by_reference="false">string</type>
1812
  </tag>
1813
  </docblock>
1814
+ <argument line="893">
1815
  <name>$item</name>
1816
  <default><![CDATA[]]></default>
1817
  <type/>
1818
  </argument>
1819
  </method>
1820
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="905" package="Media Library Assistant">
1821
  <name>column_description</name>
1822
  <full_name>column_description</full_name>
1823
+ <docblock line="897">
1824
  <description><![CDATA[Supply the content for a custom column]]></description>
1825
  <long-description><![CDATA[]]></long-description>
1826
+ <tag line="897" name="since" description="0.1"/>
1827
+ <tag line="897" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1828
  <type by_reference="false">array</type>
1829
  </tag>
1830
+ <tag line="897" name="return" description="HTML markup to be placed inside the column" type="string">
1831
  <type by_reference="false">string</type>
1832
  </tag>
1833
  </docblock>
1834
+ <argument line="905">
1835
  <name>$item</name>
1836
  <default><![CDATA[]]></default>
1837
  <type/>
1838
  </argument>
1839
  </method>
1840
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="917" package="Media Library Assistant">
1841
  <name>column_post_mime_type</name>
1842
  <full_name>column_post_mime_type</full_name>
1843
+ <docblock line="909">
1844
  <description><![CDATA[Supply the content for a custom column]]></description>
1845
  <long-description><![CDATA[]]></long-description>
1846
+ <tag line="909" name="since" description="0.30"/>
1847
+ <tag line="909" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1848
  <type by_reference="false">array</type>
1849
  </tag>
1850
+ <tag line="909" name="return" description="HTML markup to be placed inside the column" type="string">
1851
  <type by_reference="false">string</type>
1852
  </tag>
1853
  </docblock>
1854
+ <argument line="917">
1855
  <name>$item</name>
1856
  <default><![CDATA[]]></default>
1857
  <type/>
1858
  </argument>
1859
  </method>
1860
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="933" package="Media Library Assistant">
1861
  <name>column_base_file</name>
1862
  <full_name>column_base_file</full_name>
1863
+ <docblock line="925">
1864
  <description><![CDATA[Supply the content for a custom column]]></description>
1865
  <long-description><![CDATA[]]></long-description>
1866
+ <tag line="925" name="since" description="0.1"/>
1867
+ <tag line="925" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1868
  <type by_reference="false">array</type>
1869
  </tag>
1870
+ <tag line="925" name="return" description="HTML markup to be placed inside the column" type="string">
1871
  <type by_reference="false">string</type>
1872
  </tag>
1873
  </docblock>
1874
+ <argument line="933">
1875
  <name>$item</name>
1876
  <default><![CDATA[]]></default>
1877
  <type/>
1878
  </argument>
1879
  </method>
1880
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="945" package="Media Library Assistant">
1881
  <name>column_date</name>
1882
  <full_name>column_date</full_name>
1883
+ <docblock line="937">
1884
  <description><![CDATA[Supply the content for a custom column]]></description>
1885
  <long-description><![CDATA[]]></long-description>
1886
+ <tag line="937" name="since" description="0.1"/>
1887
+ <tag line="937" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1888
  <type by_reference="false">array</type>
1889
  </tag>
1890
+ <tag line="937" name="return" description="HTML markup to be placed inside the column" type="string">
1891
  <type by_reference="false">string</type>
1892
  </tag>
1893
  </docblock>
1894
+ <argument line="945">
1895
  <name>$item</name>
1896
  <default><![CDATA[]]></default>
1897
  <type/>
1898
  </argument>
1899
  </method>
1900
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="974" package="Media Library Assistant">
1901
  <name>column_modified</name>
1902
  <full_name>column_modified</full_name>
1903
+ <docblock line="966">
1904
  <description><![CDATA[Supply the content for a custom column]]></description>
1905
  <long-description><![CDATA[]]></long-description>
1906
+ <tag line="966" name="since" description="0.30"/>
1907
+ <tag line="966" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1908
  <type by_reference="false">array</type>
1909
  </tag>
1910
+ <tag line="966" name="return" description="HTML markup to be placed inside the column" type="string">
1911
  <type by_reference="false">string</type>
1912
  </tag>
1913
  </docblock>
1914
+ <argument line="974">
1915
  <name>$item</name>
1916
  <default><![CDATA[]]></default>
1917
  <type/>
1918
  </argument>
1919
  </method>
1920
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1003" package="Media Library Assistant">
1921
  <name>column_author</name>
1922
  <full_name>column_author</full_name>
1923
+ <docblock line="995">
1924
  <description><![CDATA[Supply the content for a custom column]]></description>
1925
  <long-description><![CDATA[]]></long-description>
1926
+ <tag line="995" name="since" description="0.30"/>
1927
+ <tag line="995" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1928
  <type by_reference="false">array</type>
1929
  </tag>
1930
+ <tag line="995" name="return" description="HTML markup to be placed inside the column" type="string">
1931
  <type by_reference="false">string</type>
1932
  </tag>
1933
  </docblock>
1934
+ <argument line="1003">
1935
  <name>$item</name>
1936
  <default><![CDATA[]]></default>
1937
  <type/>
1938
  </argument>
1939
  </method>
1940
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1024" package="Media Library Assistant">
1941
  <name>column_attached_to</name>
1942
  <full_name>column_attached_to</full_name>
1943
+ <docblock line="1016">
1944
  <description><![CDATA[Supply the content for a custom column]]></description>
1945
  <long-description><![CDATA[]]></long-description>
1946
+ <tag line="1016" name="since" description="0.1"/>
1947
+ <tag line="1016" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1948
  <type by_reference="false">array</type>
1949
  </tag>
1950
+ <tag line="1016" name="return" description="HTML markup to be placed inside the column" type="string">
1951
  <type by_reference="false">string</type>
1952
  </tag>
1953
  </docblock>
1954
+ <argument line="1024">
1955
  <name>$item</name>
1956
  <default><![CDATA[]]></default>
1957
  <type/>
1958
  </argument>
1959
  </method>
1960
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1053" package="Media Library Assistant">
1961
  <name>get_columns</name>
1962
  <full_name>get_columns</full_name>
1963
+ <docblock line="1046">
1964
  <description><![CDATA[This method dictates the table's columns and titles]]></description>
1965
  <long-description><![CDATA[]]></long-description>
1966
+ <tag line="1046" name="since" description="0.1"/>
1967
+ <tag line="1046" name="return" description="Column information: 'slugs'=&gt;'Visible Titles'" type="array">
1968
  <type by_reference="false">array</type>
1969
  </tag>
1970
  </docblock>
1971
  </method>
1972
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1065" package="Media Library Assistant">
1973
  <name>get_hidden_columns</name>
1974
  <full_name>get_hidden_columns</full_name>
1975
+ <docblock line="1057">
1976
  <description><![CDATA[Returns the list of currently hidden columns from a user option or
1977
  from default values if the option is not set]]></description>
1978
  <long-description><![CDATA[]]></long-description>
1979
+ <tag line="1057" name="since" description="0.1"/>
1980
+ <tag line="1057" name="return" description="Column information,e.g., array(0 =&gt; 'ID_parent, 1 =&gt; 'title_name')" type="array">
1981
  <type by_reference="false">array</type>
1982
  </tag>
1983
  </docblock>
1984
  </method>
1985
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1085" package="Media Library Assistant">
1986
  <name>get_sortable_columns</name>
1987
  <full_name>get_sortable_columns</full_name>
1988
+ <docblock line="1075">
1989
  <description><![CDATA[Returns an array where the key is the column that needs to be sortable
1990
  and the value is db column to sort by.]]></description>
1991
  <long-description><![CDATA[<p>Also notes the current sort column,
1992
  if set.</p>]]></long-description>
1993
+ <tag line="1075" name="since" description="0.1"/>
1994
+ <tag line="1075" name="return" description="Sortable column information,e.g., 'slugs'=&gt;array('data_values',boolean)" type="array">
1995
  <type by_reference="false">array</type>
1996
  </tag>
1997
  </docblock>
1998
  </method>
1999
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1114" package="Media Library Assistant">
2000
+ <name>_get_view</name>
2001
+ <full_name>_get_view</full_name>
2002
+ <docblock line="1104">
2003
+ <description><![CDATA[Returns HTML markup for one view that can be used with this table]]></description>
2004
+ <long-description><![CDATA[]]></long-description>
2005
+ <tag line="1104" name="since" description="1.40"/>
2006
+ <tag line="1104" name="param" description="View slug, key to MLA_POST_MIME_TYPES array" type="string" variable="$view_slug">
2007
+ <type by_reference="false">string</type>
2008
+ </tag>
2009
+ <tag line="1104" name="param" description="Slug for current view" type="string" variable="$current_view">
2010
+ <type by_reference="false">string</type>
2011
+ </tag>
2012
+ <tag line="1104" name="return" description="| false HTML for link to display the view, false if count = zero" type="string">
2013
+ <type by_reference="false">string</type>
2014
+ </tag>
2015
+ </docblock>
2016
+ <argument line="1114">
2017
+ <name>$view_slug</name>
2018
+ <default><![CDATA[]]></default>
2019
+ <type/>
2020
+ </argument>
2021
+ <argument line="1114">
2022
+ <name>$current_view</name>
2023
+ <default><![CDATA[]]></default>
2024
+ <type/>
2025
+ </argument>
2026
+ </method>
2027
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1238" package="Media Library Assistant">
2028
  <name>get_views</name>
2029
  <full_name>get_views</full_name>
2030
+ <docblock line="1230">
2031
  <description><![CDATA[Returns an associative array listing all the views that can be used with this table.]]></description>
2032
  <long-description><![CDATA[<p>These are listed across the top of the page and managed by WordPress.</p>]]></long-description>
2033
+ <tag line="1230" name="since" description="0.1"/>
2034
+ <tag line="1230" name="return" description="View information,e.g., array ( id =&gt; link )" type="array">
2035
  <type by_reference="false">array</type>
2036
  </tag>
2037
  </docblock>
2038
  </method>
2039
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1275" package="Media Library Assistant">
2040
  <name>get_bulk_actions</name>
2041
  <full_name>get_bulk_actions</full_name>
2042
+ <docblock line="1267">
2043
  <description><![CDATA[Get an associative array ( option_name => option_title ) with the list
2044
  of bulk actions available on this table.]]></description>
2045
  <long-description><![CDATA[]]></long-description>
2046
+ <tag line="1267" name="since" description="0.1"/>
2047
+ <tag line="1267" name="return" description="Contains all the bulk actions: 'slugs'=&gt;'Visible Titles'" type="array">
2048
  <type by_reference="false">array</type>
2049
  </tag>
2050
  </docblock>
2051
  </method>
2052
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1306" package="Media Library Assistant">
2053
  <name>extra_tablenav</name>
2054
  <full_name>extra_tablenav</full_name>
2055
+ <docblock line="1295">
2056
  <description><![CDATA[Extra controls to be displayed between bulk actions and pagination]]></description>
2057
  <long-description><![CDATA[<p>Modeled after class-wp-posts-list-table.php in wp-admin/includes.</p>]]></long-description>
2058
+ <tag line="1295" name="since" description="0.1"/>
2059
+ <tag line="1295" name="param" description="'top' or 'bottom', i.e., above or below the table rows" type="string" variable="$which">
2060
  <type by_reference="false">string</type>
2061
  </tag>
2062
+ <tag line="1295" name="return" description="Contains all the bulk actions: 'slugs'=&gt;'Visible Titles'" type="array">
2063
  <type by_reference="false">array</type>
2064
  </tag>
2065
  </docblock>
2066
+ <argument line="1306">
2067
  <name>$which</name>
2068
  <default><![CDATA[]]></default>
2069
  <type/>
2070
  </argument>
2071
  </method>
2072
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1339" package="Media Library Assistant">
2073
  <name>prepare_items</name>
2074
  <full_name>prepare_items</full_name>
2075
+ <docblock line="1327">
2076
  <description><![CDATA[Prepares the list of items for displaying]]></description>
2077
  <long-description><![CDATA[<p>This is where you prepare your data for display. This method will usually
2078
  be used to query the database, sort and filter the data, and generally
2079
  get it ready to be displayed. At a minimum, we should set $this->items and
2080
  $this->set_pagination_args().</p>]]></long-description>
2081
+ <tag line="1327" name="since" description="0.1"/>
2082
+ <tag line="1327" name="return" description="" type="void">
2083
  <type by_reference="false">void</type>
2084
  </tag>
2085
  </docblock>
2086
  </method>
2087
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1386" package="Media Library Assistant">
2088
  <name>single_row</name>
2089
  <full_name>single_row</full_name>
2090
+ <docblock line="1377">
2091
  <description><![CDATA[Generates (echoes) content for a single row of the table]]></description>
2092
  <long-description><![CDATA[]]></long-description>
2093
+ <tag line="1377" name="since" description=".20"/>
2094
+ <tag line="1377" name="param" description="the current item" type="object" variable="$item">
2095
  <type by_reference="false">object</type>
2096
  </tag>
2097
+ <tag line="1377" name="return" description="Echoes the row HTML" type="void">
2098
  <type by_reference="false">void</type>
2099
  </tag>
2100
  </docblock>
2101
+ <argument line="1386">
2102
  <name>$item</name>
2103
  <default><![CDATA[]]></default>
2104
  <type/>
2106
  </method>
2107
  </class>
2108
  </file>
2109
+ <file path="includes\class-mla-main.php" hash="6583aa87c2aacec45e4251d52bcfaa4c" package="Media Library Assistant">
2110
  <docblock line="2">
2111
  <description><![CDATA[Top-level functions for the Media Library Assistant]]></description>
2112
  <long-description><![CDATA[]]></long-description>
2143
  <constant namespace="global" line="41" package="Media Library Assistant">
2144
  <name>CURRENT_MLA_VERSION</name>
2145
  <full_name>CURRENT_MLA_VERSION</full_name>
2146
+ <value><![CDATA['1.40']]></value>
2147
  <docblock line="34">
2148
  <description><![CDATA[Current version number]]></description>
2149
  <long-description><![CDATA[]]></long-description>
2411
  </tag>
2412
  </docblock>
2413
  </method>
2414
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="350" package="Media Library Assistant">
2415
  <name>mla_add_menu_options</name>
2416
  <full_name>mla_add_menu_options</full_name>
2417
+ <docblock line="343">
2418
  <description><![CDATA[Add the "XX Entries per page" filter to the Screen Options tab]]></description>
2419
  <long-description><![CDATA[]]></long-description>
2420
+ <tag line="343" name="since" description="0.1"/>
2421
+ <tag line="343" name="return" description="" type="void">
2422
  <type by_reference="false">void</type>
2423
  </tag>
2424
  </docblock>
2425
  </method>
2426
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="369" package="Media Library Assistant">
2427
  <name>mla_add_help_tab</name>
2428
  <full_name>mla_add_help_tab</full_name>
2429
+ <docblock line="362">
2430
  <description><![CDATA[Add contextual help tabs to all the MLA pages]]></description>
2431
  <long-description><![CDATA[]]></long-description>
2432
+ <tag line="362" name="since" description="0.1"/>
2433
+ <tag line="362" name="return" description="" type="void">
2434
  <type by_reference="false">void</type>
2435
  </tag>
2436
  </docblock>
2437
  </method>
2438
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="470" package="Media Library Assistant">
2439
  <name>mla_screen_options_show_screen_filter</name>
2440
  <full_name>mla_screen_options_show_screen_filter</full_name>
2441
+ <docblock line="460">
2442
  <description><![CDATA[Only show screen options on the table-list screen]]></description>
2443
  <long-description><![CDATA[]]></long-description>
2444
+ <tag line="460" name="since" description="0.1"/>
2445
+ <tag line="460" name="param" description="True to display &quot;Screen Options&quot;, false to suppress them" type="boolean" variable="$show_screen">
2446
  <type by_reference="false">boolean</type>
2447
  </tag>
2448
+ <tag line="460" name="param" description="Name of the page being loaded" type="string" variable="$this_screen">
2449
  <type by_reference="false">string</type>
2450
  </tag>
2451
+ <tag line="460" name="return" description="True to display &quot;Screen Options&quot;, false to suppress them" type="boolean">
2452
  <type by_reference="false">boolean</type>
2453
  </tag>
2454
  </docblock>
2455
+ <argument line="470">
2456
  <name>$show_screen</name>
2457
  <default><![CDATA[]]></default>
2458
  <type/>
2459
  </argument>
2460
+ <argument line="470">
2461
  <name>$this_screen</name>
2462
  <default><![CDATA[]]></default>
2463
  <type/>
2464
  </argument>
2465
  </method>
2466
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="488" package="Media Library Assistant">
2467
  <name>mla_set_screen_option_filter</name>
2468
  <full_name>mla_set_screen_option_filter</full_name>
2469
+ <docblock line="477">
2470
  <description><![CDATA[Save the "Entries per page" option set by this user]]></description>
2471
  <long-description><![CDATA[]]></long-description>
2472
+ <tag line="477" name="since" description="0.1"/>
2473
+ <tag line="477" name="param" description="false or value returned by previous filter" type="mixed" variable="$status">
2474
+ <type by_reference="false">mixed</type>
2475
  </tag>
2476
+ <tag line="477" name="param" description="Name of the option being changed" type="string" variable="$option">
2477
  <type by_reference="false">string</type>
2478
  </tag>
2479
+ <tag line="477" name="param" description="New value of the option" type="string" variable="$value">
2480
  <type by_reference="false">string</type>
2481
  </tag>
2482
+ <tag line="477" name="return" description="New value if this is our option, otherwise nothing" type="string|void">
2483
  <type by_reference="false">string</type>
2484
  <type by_reference="false">void</type>
2485
  </tag>
2486
  </docblock>
2487
+ <argument line="488">
2488
  <name>$status</name>
2489
  <default><![CDATA[]]></default>
2490
  <type/>
2491
  </argument>
2492
+ <argument line="488">
2493
  <name>$option</name>
2494
  <default><![CDATA[]]></default>
2495
  <type/>
2496
  </argument>
2497
+ <argument line="488">
2498
  <name>$value</name>
2499
  <default><![CDATA[]]></default>
2500
  <type/>
2501
  </argument>
2502
  </method>
2503
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="507" package="Media Library Assistant">
2504
  <name>mla_edit_tax_redirect</name>
2505
  <full_name>mla_edit_tax_redirect</full_name>
2506
+ <docblock line="496">
2507
  <description><![CDATA[Redirect to the Edit Tags/Categories page]]></description>
2508
  <long-description><![CDATA[<p>The custom taxonomy add/edit submenu entries go to "upload.php" by default.
2509
  This filter is the only way to redirect them to the correct WordPress page.
2510
  The filter is not required for WordPress 3.5 and later.</p>]]></long-description>
2511
+ <tag line="496" name="since" description="0.1"/>
2512
+ <tag line="496" name="return" description="" type="void">
2513
  <type by_reference="false">void</type>
2514
  </tag>
2515
  </docblock>
2516
  </method>
2517
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="540" package="Media Library Assistant">
2518
  <name>mla_parent_file_filter</name>
2519
  <full_name>mla_parent_file_filter</full_name>
2520
+ <docblock line="524">
2521
  <description><![CDATA[Cleanup menus for Edit Tags/Categories page]]></description>
2522
  <long-description><![CDATA[<p>For WordPress before 3.5, the submenu entries for custom taxonomies
2523
  under the "Media" menu are not set up correctly by WordPress, so this
2525
  page for editing/adding taxonomy terms.
2526
  For WordPress 3.5 and later, the function fixes the submenu bolding when
2527
  going to the Edit Media screen.</p>]]></long-description>
2528
+ <tag line="524" name="since" description="0.1"/>
2529
+ <tag line="524" name="param" description="The top-level menu page" type="array" variable="$parent_file">
2530
  <type by_reference="false">array</type>
2531
  </tag>
2532
+ <tag line="524" name="return" description="The updated top-level menu page" type="string">
2533
  <type by_reference="false">string</type>
2534
  </tag>
2535
  </docblock>
2536
+ <argument line="540">
2537
  <name>$parent_file</name>
2538
  <default><![CDATA[]]></default>
2539
  <type/>
2540
  </argument>
2541
  </method>
2542
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="583" package="Media Library Assistant">
2543
  <name>mla_render_admin_page</name>
2544
  <full_name>mla_render_admin_page</full_name>
2545
+ <docblock line="576">
2546
  <description><![CDATA[Render the "Assistant" subpage in the Media section, using the list_table package]]></description>
2547
  <long-description><![CDATA[]]></long-description>
2548
+ <tag line="576" name="since" description="0.1"/>
2549
+ <tag line="576" name="return" description="" type="void">
2550
  <type by_reference="false">void</type>
2551
  </tag>
2552
  </docblock>
2553
  </method>
2554
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="893" package="Media Library Assistant">
2555
  <name>mla_inline_edit_action</name>
2556
  <full_name>mla_inline_edit_action</full_name>
2557
+ <docblock line="884">
2558
  <description><![CDATA[Ajax handler for inline editing (quick and bulk edit)]]></description>
2559
  <long-description><![CDATA[<p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p>]]></long-description>
2560
+ <tag line="884" name="since" description="0.20"/>
2561
+ <tag line="884" name="return" description="echo HTML &lt;tr&gt; markup for updated row or error message, then die()" type="void">
2562
  <type by_reference="false">void</type>
2563
  </tag>
2564
  </docblock>
2565
  </method>
2566
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="988" package="Media Library Assistant">
2567
  <name>_build_inline_edit_form</name>
2568
  <full_name>_build_inline_edit_form</full_name>
2569
+ <docblock line="977">
2570
  <description><![CDATA[Build the hidden row templates for inline editing (quick and bulk edit)]]></description>
2571
  <long-description><![CDATA[<p>inspired by inline_edit() in wp-admin\includes\class-wp-posts-list-table.php.</p>]]></long-description>
2572
+ <tag line="977" name="since" description="0.20"/>
2573
+ <tag line="977" name="param" description="MLA List Table object" type="object" variable="$MLAListTable">
2574
  <type by_reference="false">object</type>
2575
  </tag>
2576
+ <tag line="977" name="return" description="HTML &lt;form&gt; markup for hidden rows" type="string">
2577
  <type by_reference="false">string</type>
2578
  </tag>
2579
  </docblock>
2580
+ <argument line="988">
2581
  <name>$MLAListTable</name>
2582
  <default><![CDATA[]]></default>
2583
  <type/>
2584
  </argument>
2585
  </method>
2586
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1145" package="Media Library Assistant">
2587
  <name>_authors_dropdown</name>
2588
  <full_name>_authors_dropdown</full_name>
2589
+ <docblock line="1134">
2590
  <description><![CDATA[Get the edit Authors dropdown box, if user has suitable permissions]]></description>
2591
  <long-description><![CDATA[]]></long-description>
2592
+ <tag line="1134" name="since" description="0.20"/>
2593
+ <tag line="1134" name="param" description="Optional User ID of the current author, default 0" type="integer" variable="$author">
2594
  <type by_reference="false">integer</type>
2595
  </tag>
2596
+ <tag line="1134" name="param" description="Optional HTML name attribute, default 'post_author'" type="string" variable="$name">
2597
  <type by_reference="false">string</type>
2598
  </tag>
2599
+ <tag line="1134" name="param" description="Optional HTML class attribute, default 'authors'" type="string" variable="$class">
2600
  <type by_reference="false">string</type>
2601
  </tag>
2602
+ <tag line="1134" name="return" description="HTML markup for the dropdown field or False" type="string|false">
2603
  <type by_reference="false">string</type>
2604
  <type by_reference="false">false</type>
2605
  </tag>
2606
  </docblock>
2607
+ <argument line="1145">
2608
  <name>$author</name>
2609
  <default><![CDATA[0]]></default>
2610
  <type/>
2611
  </argument>
2612
+ <argument line="1145">
2613
  <name>$name</name>
2614
  <default><![CDATA['post_author']]></default>
2615
  <type/>
2616
  </argument>
2617
+ <argument line="1145">
2618
  <name>$class</name>
2619
  <default><![CDATA['authors']]></default>
2620
  <type/>
2621
  </argument>
2622
  </method>
2623
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1179" package="Media Library Assistant">
2624
  <name>_current_bulk_action</name>
2625
  <full_name>_current_bulk_action</full_name>
2626
+ <docblock line="1172">
2627
  <description><![CDATA[Get the current action selected from the bulk actions dropdown]]></description>
2628
  <long-description><![CDATA[]]></long-description>
2629
+ <tag line="1172" name="since" description="0.1"/>
2630
+ <tag line="1172" name="return" description="The action name or False if no action was selected" type="string|false">
2631
  <type by_reference="false">string</type>
2632
  <type by_reference="false">false</type>
2633
  </tag>
2634
  </docblock>
2635
  </method>
2636
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1208" package="Media Library Assistant">
2637
  <name>_delete_single_item</name>
2638
  <full_name>_delete_single_item</full_name>
2639
+ <docblock line="1199">
2640
  <description><![CDATA[Delete a single item permanently]]></description>
2641
  <long-description><![CDATA[]]></long-description>
2642
+ <tag line="1199" name="since" description="0.1"/>
2643
+ <tag line="1199" name="param" description="The form POST data" type="array" variable="$post_id">
2644
  <type by_reference="false">array</type>
2645
  </tag>
2646
+ <tag line="1199" name="return" description="success/failure message and NULL content" type="array">
2647
  <type by_reference="false">array</type>
2648
  </tag>
2649
  </docblock>
2650
+ <argument line="1208">
2651
  <name>$post_id</name>
2652
  <default><![CDATA[]]></default>
2653
  <type/>
2654
  </argument>
2655
  </method>
2656
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1239" package="Media Library Assistant">
2657
  <name>_display_single_item</name>
2658
  <full_name>_display_single_item</full_name>
2659
+ <docblock line="1227">
2660
  <description><![CDATA[Display a single item sub page; prepare the form to
2661
  change the meta data for a single attachment.]]></description>
2662
  <long-description><![CDATA[<p>This function is not used in WordPress 3.5 and later.</p>]]></long-description>
2663
+ <tag line="1227" name="since" description="0.1"/>
2664
+ <tag line="1227" name="param" description="The WordPress Post ID of the attachment item" type="int" variable="$post_id">
2665
  <type by_reference="false">int</type>
2666
  </tag>
2667
+ <tag line="1227" name="return" description="message and/or HTML content" type="array">
2668
  <type by_reference="false">array</type>
2669
  </tag>
2670
  </docblock>
2671
+ <argument line="1239">
2672
  <name>$post_id</name>
2673
  <default><![CDATA[]]></default>
2674
  <type/>
2675
  </argument>
2676
  </method>
2677
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1479" package="Media Library Assistant">
2678
  <name>_restore_single_item</name>
2679
  <full_name>_restore_single_item</full_name>
2680
+ <docblock line="1470">
2681
  <description><![CDATA[Restore a single item from the Trash]]></description>
2682
  <long-description><![CDATA[]]></long-description>
2683
+ <tag line="1470" name="since" description="0.1"/>
2684
+ <tag line="1470" name="param" description="The form POST data" type="array" variable="$post_id">
2685
  <type by_reference="false">array</type>
2686
  </tag>
2687
+ <tag line="1470" name="return" description="success/failure message and NULL content" type="array">
2688
  <type by_reference="false">array</type>
2689
  </tag>
2690
  </docblock>
2691
+ <argument line="1479">
2692
  <name>$post_id</name>
2693
  <default><![CDATA[]]></default>
2694
  <type/>
2695
  </argument>
2696
  </method>
2697
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1515" package="Media Library Assistant">
2698
  <name>_trash_single_item</name>
2699
  <full_name>_trash_single_item</full_name>
2700
+ <docblock line="1506">
2701
  <description><![CDATA[Move a single item to Trash]]></description>
2702
  <long-description><![CDATA[]]></long-description>
2703
+ <tag line="1506" name="since" description="0.1"/>
2704
+ <tag line="1506" name="param" description="The form POST data" type="array" variable="$post_id">
2705
  <type by_reference="false">array</type>
2706
  </tag>
2707
+ <tag line="1506" name="return" description="success/failure message and NULL content" type="array">
2708
  <type by_reference="false">array</type>
2709
  </tag>
2710
  </docblock>
2711
+ <argument line="1515">
2712
  <name>$post_id</name>
2713
  <default><![CDATA[]]></default>
2714
  <type/>
2716
  </method>
2717
  </class>
2718
  </file>
2719
+ <file path="includes\class-mla-media-modal.php" hash="03f8ccf2977381a07297c81d2053bf28" package="Media Library Assistant">
2720
  <docblock line="2">
2721
  <description><![CDATA[Media Library Assistant Media Manager enhancements]]></description>
2722
  <long-description><![CDATA[]]></long-description>
2943
  </method>
2944
  </class>
2945
  </file>
2946
+ <file path="includes\class-mla-mime-types.php" hash="52f673229b272019c9633c7118d92140" package="Media Library Assistant">
2947
  <docblock line="2">
2948
+ <description><![CDATA[Media Library Assistant MIME Type Support]]></description>
2949
  <long-description><![CDATA[]]></long-description>
2950
  <tag line="2" name="package" description="Media Library Assistant"/>
2951
+ <tag line="2" name="since" description="1.40"/>
2952
  </docblock>
2953
+ <class final="false" abstract="false" namespace="global" line="16" package="Media Library Assistant">
2954
  <extends/>
2955
+ <name>MLAMime</name>
2956
+ <full_name>\MLAMime</full_name>
2957
  <docblock line="9">
2958
+ <description><![CDATA[Class MLA (Media Library Assistant) MIME filters WordPress MIME Type functions and supports
2959
+ the Views and Uploads Settings tabs]]></description>
2960
  <long-description><![CDATA[]]></long-description>
2961
  <tag line="9" name="package" description="Media Library Assistant"/>
2962
+ <tag line="9" name="since" description="1.40"/>
2963
  </docblock>
2964
+ <property final="false" static="true" visibility="private" line="52" namespace="global" package="Media Library Assistant">
2965
+ <name>$disable_mla_filtering</name>
2966
+ <default><![CDATA[false]]></default>
2967
+ <docblock line="45">
2968
+ <description><![CDATA[Disable MIME filtering during option initialization]]></description>
2969
  <long-description><![CDATA[]]></long-description>
2970
+ <tag line="45" name="since" description="1.40"/>
2971
+ <tag line="45" name="var" description="" type="boolean">
2972
+ <type by_reference="false">boolean</type>
2973
  </tag>
2974
  </docblock>
2975
+ </property>
2976
+ <property final="false" static="true" visibility="private" line="82" namespace="global" package="Media Library Assistant">
2977
+ <name>$mla_icon_type_associations</name>
2978
+ <default><![CDATA[NULL]]></default>
2979
+ <docblock line="75">
2980
+ <description><![CDATA[In-memory representation of the Icon Type => file extension(s) associations]]></description>
2981
  <long-description><![CDATA[]]></long-description>
2982
+ <tag line="75" name="since" description="1.40"/>
2983
+ <tag line="75" name="var" description="slug =&gt; ( singular, plural, specification, post_mime_type, table_view, menu_order, description )" type="array">
2984
+ <type by_reference="false">array</type>
2985
  </tag>
2986
  </docblock>
2987
+ </property>
2988
+ <property final="false" static="true" visibility="private" line="664" namespace="global" package="Media Library Assistant">
2989
+ <name>$mla_post_mime_templates</name>
2990
+ <default><![CDATA[NULL]]></default>
2991
+ <docblock line="657">
2992
+ <description><![CDATA[In-memory representation of the Post MIME Types]]></description>
 
2993
  <long-description><![CDATA[]]></long-description>
2994
+ <tag line="657" name="since" description="1.40"/>
2995
+ <tag line="657" name="var" description="slug =&gt; ( singular, plural, specification, post_mime_type, table_view, menu_order, description )" type="array">
2996
  <type by_reference="false">array</type>
2997
  </tag>
2998
+ </docblock>
2999
+ </property>
3000
+ <property final="false" static="true" visibility="private" line="673" namespace="global" package="Media Library Assistant">
3001
+ <name>$mla_post_mime_highest_ID</name>
3002
+ <default><![CDATA[0]]></default>
3003
+ <docblock line="666">
3004
+ <description><![CDATA[Highest existing Post MIME Type ID value]]></description>
3005
+ <long-description><![CDATA[]]></long-description>
3006
+ <tag line="666" name="since" description="1.40"/>
3007
+ <tag line="666" name="var" description="" type="integer">
3008
+ <type by_reference="false">integer</type>
3009
  </tag>
3010
  </docblock>
3011
+ </property>
3012
+ <property final="false" static="true" visibility="private" line="1394" namespace="global" package="Media Library Assistant">
3013
+ <name>$mla_core_icon_types</name>
3014
+ <default><![CDATA[NULL]]></default>
3015
+ <docblock line="1387">
3016
+ <description><![CDATA[Icon types without MLA filtering]]></description>
 
 
 
 
 
 
3017
  <long-description><![CDATA[]]></long-description>
3018
+ <tag line="1387" name="since" description="1.40"/>
3019
+ <tag line="1387" name="var" description="extension =&gt; ( core_icon_type )" type="array">
3020
+ <type by_reference="false">array</type>
3021
  </tag>
3022
+ </docblock>
3023
+ </property>
3024
+ <property final="false" static="true" visibility="private" line="1403" namespace="global" package="Media Library Assistant">
3025
+ <name>$mla_current_icon_types</name>
3026
+ <default><![CDATA[NULL]]></default>
3027
+ <docblock line="1396">
3028
+ <description><![CDATA[Icon types with MLA filtering - basenames of files in the current icon directory]]></description>
3029
+ <long-description><![CDATA[]]></long-description>
3030
+ <tag line="1396" name="since" description="1.40"/>
3031
+ <tag line="1396" name="var" description="( icon_type =&gt; icon_image_uri )" type="array">
3032
  <type by_reference="false">array</type>
3033
  </tag>
3034
+ </docblock>
3035
+ </property>
3036
+ <property final="false" static="true" visibility="private" line="1412" namespace="global" package="Media Library Assistant">
3037
+ <name>$mla_upload_mime_templates</name>
3038
+ <default><![CDATA[NULL]]></default>
3039
+ <docblock line="1405">
3040
+ <description><![CDATA[In-memory representation of the Upload MIME Types]]></description>
3041
+ <long-description><![CDATA[]]></long-description>
3042
+ <tag line="1405" name="since" description="1.40"/>
3043
+ <tag line="1405" name="var" description="extension =&gt; ( post_ID, mime_type, core_type, mla_type, source, standard_source, disabled, description, icon_type, wp_icon_type, mla_icon_type, core_icon_type )" type="array">
3044
  <type by_reference="false">array</type>
3045
  </tag>
3046
+ </docblock>
3047
+ </property>
3048
+ <property final="false" static="true" visibility="private" line="1421" namespace="global" package="Media Library Assistant">
3049
+ <name>$mla_upload_mime_highest_ID</name>
3050
+ <default><![CDATA[0]]></default>
3051
+ <docblock line="1414">
3052
+ <description><![CDATA[Highest existing Upload MIME Type ID value]]></description>
3053
+ <long-description><![CDATA[]]></long-description>
3054
+ <tag line="1414" name="since" description="1.40"/>
3055
+ <tag line="1414" name="var" description="" type="integer">
3056
+ <type by_reference="false">integer</type>
3057
+ </tag>
3058
+ </docblock>
3059
+ </property>
3060
+ <property final="false" static="true" visibility="private" line="2153" namespace="global" package="Media Library Assistant">
3061
+ <name>$mla_optional_upload_mime_templates</name>
3062
+ <default><![CDATA[NULL]]></default>
3063
+ <docblock line="2146">
3064
+ <description><![CDATA[In-memory representation of the (read-only) Optional Upload MIME Types]]></description>
3065
+ <long-description><![CDATA[]]></long-description>
3066
+ <tag line="2146" name="since" description="1.40"/>
3067
+ <tag line="2146" name="var" description="( ID, slug, mime_type, core_type, mla_type, description )" type="array">
3068
  <type by_reference="false">array</type>
3069
  </tag>
3070
  </docblock>
3071
+ </property>
3072
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="24" package="Media Library Assistant">
3073
+ <name>initialize</name>
3074
+ <full_name>initialize</full_name>
3075
+ <docblock line="17">
3076
+ <description><![CDATA[Initialization function, similar to __construct()]]></description>
3077
+ <long-description><![CDATA[]]></long-description>
3078
+ <tag line="17" name="since" description="1.40"/>
3079
+ <tag line="17" name="return" description="" type="void">
3080
+ <type by_reference="false">void</type>
3081
+ </tag>
3082
+ </docblock>
3083
+ </method>
3084
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="67" package="Media Library Assistant">
3085
+ <name>mla_sanitize_mime_type_filter</name>
3086
+ <full_name>mla_sanitize_mime_type_filter</full_name>
3087
+ <docblock line="54">
3088
+ <description><![CDATA[Sanitize a MIME type]]></description>
3089
+ <long-description><![CDATA[<p>Called from /wp-includes/formatting.php, function sanitize_mime_type().
3090
+ Defined as public because it's a filter.</p>]]></long-description>
3091
+ <tag line="54" name="since" description="1.40"/>
3092
+ <tag line="54" name="param" description="Sanitized MIME type" type="string" variable="$sanitized_mime_type">
3093
+ <type by_reference="false">string</type>
3094
+ </tag>
3095
+ <tag line="54" name="param" description="Raw MIME type" type="string" variable="$raw_mime_type">
3096
+ <type by_reference="false">string</type>
3097
+ </tag>
3098
+ <tag line="54" name="return" description="Updated sanitized MIME type" type="string">
3099
+ <type by_reference="false">string</type>
3100
+ </tag>
3101
+ </docblock>
3102
+ <argument line="67">
3103
+ <name>$sanitized_mime_type</name>
3104
  <default><![CDATA[]]></default>
3105
  <type/>
3106
  </argument>
3107
+ <argument line="67">
3108
+ <name>$raw_mime_type</name>
3109
  <default><![CDATA[]]></default>
3110
  <type/>
3111
  </argument>
3112
  </method>
3113
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="105" package="Media Library Assistant">
3114
+ <name>mla_ext2type_filter</name>
3115
+ <full_name>mla_ext2type_filter</full_name>
3116
+ <docblock line="84">
3117
+ <description><![CDATA[Update the file extension to icon type (e.g., xls => spreadsheet, doc => document) array]]></description>
3118
+ <long-description><![CDATA[<p>Note that the calling function, wp_ext2type, takes an extension and returns an icon type.
3119
+ This filter updates the array of possible matches to support the calling function.</p>
3120
+
3121
+ <p>Called from /wp-includes/functions.php, function wp_ext2type(). That function is called from
3122
+ /wp-admin/includes/ajax-actions.php, function wp_ajax_send_link_to_editor(),
3123
+ /wp-admin/includes/media.php, function wp_media_upload_handler(), and
3124
+ /wp-includes/post.php, function wp_mime_type_icon(). The first two calls look for "audio"
3125
+ and "video" files to call the appropriate filter. The third call assigns the appropriate icon
3126
+ to the file for display purposes.</p>
3127
+
3128
+ <p>Defined as public because it's a filter.</p>]]></long-description>
3129
+ <tag line="84" name="since" description="1.40"/>
3130
+ <tag line="84" name="param" description="The type =&gt; ( extensions ) associations." type="array" variable="$standard_types">
3131
+ <type by_reference="false">array</type>
3132
+ </tag>
3133
+ <tag line="84" name="return" description="The updated associations array." type="array">
3134
+ <type by_reference="false">array</type>
3135
+ </tag>
3136
+ </docblock>
3137
+ <argument line="105">
3138
+ <name>$standard_types</name>
3139
+ <default><![CDATA[]]></default>
3140
+ <type/>
3141
+ </argument>
3142
+ </method>
3143
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="169" package="Media Library Assistant">
3144
+ <name>mla_wp_check_filetype_and_ext_filter</name>
3145
+ <full_name>mla_wp_check_filetype_and_ext_filter</full_name>
3146
+ <docblock line="154">
3147
+ <description><![CDATA[Attempts to determine the real file type of a file]]></description>
3148
+ <long-description><![CDATA[<p>Called from /wp-includes/functions.php, function wp_check_filetype_and_ext().
3149
+ Defined as public because it's a filter.</p>]]></long-description>
3150
+ <tag line="154" name="since" description="1.40"/>
3151
+ <tag line="154" name="param" description="array( ext, type, proper_filename (string or false) )" type="array" variable="$validate">
3152
+ <type by_reference="false">array</type>
3153
+ </tag>
3154
+ <tag line="154" name="param" description="Full path to the image" type="string" variable="$file">
3155
+ <type by_reference="false">string</type>
3156
+ </tag>
3157
+ <tag line="154" name="param" description="The filename of the image" type="string" variable="$filename">
3158
+ <type by_reference="false">string</type>
3159
+ </tag>
3160
+ <tag line="154" name="param" description="Optional array of MIME types" type="array" variable="$mimes">
3161
+ <type by_reference="false">array</type>
3162
+ </tag>
3163
+ <tag line="154" name="return" description="Updated array( ext, type, proper_filename (string or false) )" type="array">
3164
+ <type by_reference="false">array</type>
3165
+ </tag>
3166
+ </docblock>
3167
+ <argument line="169">
3168
+ <name>$validate</name>
3169
+ <default><![CDATA[]]></default>
3170
+ <type/>
3171
+ </argument>
3172
+ <argument line="169">
3173
+ <name>$file</name>
3174
+ <default><![CDATA[]]></default>
3175
+ <type/>
3176
+ </argument>
3177
+ <argument line="169">
3178
+ <name>$filename</name>
3179
+ <default><![CDATA[]]></default>
3180
+ <type/>
3181
+ </argument>
3182
+ <argument line="169">
3183
+ <name>$mimes</name>
3184
+ <default><![CDATA[]]></default>
3185
+ <type/>
3186
+ </argument>
3187
+ </method>
3188
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="195" package="Media Library Assistant">
3189
+ <name>mla_mime_types_filter</name>
3190
+ <full_name>mla_mime_types_filter</full_name>
3191
+ <docblock line="179">
3192
+ <description><![CDATA[Retrieve list of MIME types and file extensions; use this filter to add types]]></description>
3193
+ <long-description><![CDATA[<p>Called from /wp-includes/functions.php, function wp_get_mime_types(). That function
3194
+ is called from /wp-includes/class-wp-image-editor.php functions get_mime_type()
3195
+ and get_extension(), and from /wp-includes/functions.php, functions do_enclose()
3196
+ and get_allowed_mime_types().</p>
3197
+
3198
+ <p>Defined as public because it's a filter.</p>]]></long-description>
3199
+ <tag line="179" name="since" description="1.40"/>
3200
+ <tag line="179" name="param" description="Mime types keyed by the file extension regex corresponding to those types" type="array" variable="$mime_types">
3201
+ <type by_reference="false">array</type>
3202
+ </tag>
3203
+ <tag line="179" name="return" description="Updated MIME types" type="array">
3204
+ <type by_reference="false">array</type>
3205
+ </tag>
3206
+ </docblock>
3207
+ <argument line="195">
3208
+ <name>$mime_types</name>
3209
+ <default><![CDATA[]]></default>
3210
+ <type/>
3211
+ </argument>
3212
+ </method>
3213
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="254" package="Media Library Assistant">
3214
+ <name>mla_upload_mimes_filter</name>
3215
+ <full_name>mla_upload_mimes_filter</full_name>
3216
+ <docblock line="233">
3217
+ <description><![CDATA[Retrieve list of allowed MIME types and file extensions; use this filter to remove types]]></description>
3218
+ <long-description><![CDATA[<p>Called from /wp-includes/functions.php, function get_allowed_mime_types(). That function
3219
+ is called from /wp-includes/formatting.php function sanitize_file_name() and from
3220
+ /wp-includes/functions.php, function wp_check_filetype(). wp_check_filetype returns only one
3221
+ MIME type for a given file extension, so the file extension should/must be a unique key.</p>
3222
+
3223
+ <p>This filter is also hooked by /wp-includes/ms-functions.php and processed in function
3224
+ check_upload_mimes(), which "is used to filter that list against the filetype whitelist
3225
+ provided by Multisite Super Admins at wp-admin/network/settings.php." Multisite installs must
3226
+ respect this restriction, so any list we produce will be passed thru that function if it exists.</p>
3227
+
3228
+ <p>This function is defined as public because it's a filter.</p>]]></long-description>
3229
+ <tag line="233" name="since" description="1.40"/>
3230
+ <tag line="233" name="param" description="Mime types keyed by the file extension regex corresponding to those types" type="array" variable="$mime_types">
3231
+ <type by_reference="false">array</type>
3232
+ </tag>
3233
+ <tag line="233" name="return" description="Updated allowed MIME types" type="array">
3234
+ <type by_reference="false">array</type>
3235
+ </tag>
3236
+ </docblock>
3237
+ <argument line="254">
3238
+ <name>$mime_types</name>
3239
+ <default><![CDATA[]]></default>
3240
+ <type/>
3241
+ </argument>
3242
+ </method>
3243
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="314" package="Media Library Assistant">
3244
+ <name>mla_post_mime_types_filter</name>
3245
+ <full_name>mla_post_mime_types_filter</full_name>
3246
+ <docblock line="292">
3247
+ <description><![CDATA[Get default Post MIME Types]]></description>
3248
+ <long-description><![CDATA[<p>Called from /wp-includes/post.php, function get_post_mime_types(). That function
3249
+ is called from:
3250
+ /wp-admin/includes/media.php function get_media_item(), to validate the type of an
3251
+ attachment when it is edited,
3252
+ /wp-admin/includes/post.php, function wp_edit_attachments_query() to count the number
3253
+ of attachments of each type, and
3254
+ /wp-includes/media.php function wp_enqueue_media(), to populate the the Media Manager/Add Media
3255
+ "media items" drop down list.</p>
3256
+
3257
+ <p>Defined as public because it's a filter.</p>]]></long-description>
3258
+ <tag line="292" name="since" description="1.40"/>
3259
+ <tag line="292" name="param" description="Content types (image, audio, video) and presentation strings, e.g. 'image' =&gt; array(__('Images'), __('Manage Images'), _n_noop('Image &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Images &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;'))," type="array" variable="$post_mime_types">
3260
+ <type by_reference="false">array</type>
3261
+ </tag>
3262
+ <tag line="292" name="return" description="Updated allowed MIME types" type="array">
3263
+ <type by_reference="false">array</type>
3264
+ </tag>
3265
+ </docblock>
3266
+ <argument line="314">
3267
+ <name>$post_mime_types</name>
3268
+ <default><![CDATA[]]></default>
3269
+ <type/>
3270
+ </argument>
3271
+ </method>
3272
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="363" package="Media Library Assistant">
3273
+ <name>mla_icon_dir_filter</name>
3274
+ <full_name>mla_icon_dir_filter</full_name>
3275
+ <docblock line="349">
3276
+ <description><![CDATA[Retrieve the icon directory for a MIME type]]></description>
3277
+ <long-description><![CDATA[<p>Called from /wp-includes/deprecated.php, function get_attachment_icon_src().
3278
+ Called from /wp-includes/media.php, function wp_get_attachment_image_src().
3279
+ Called from /wp-includes/post.php, function wp_mime_type_icon().
3280
+ Defined as public because it's a filter.</p>]]></long-description>
3281
+ <tag line="349" name="since" description="1.40"/>
3282
+ <tag line="349" name="param" description="Path to the icon directory" type="string" variable="$path">
3283
+ <type by_reference="false">string</type>
3284
+ </tag>
3285
+ <tag line="349" name="return" description="Updated path to the icon directory, no trailing slash" type="string">
3286
+ <type by_reference="false">string</type>
3287
+ </tag>
3288
+ </docblock>
3289
+ <argument line="363">
3290
+ <name>$path</name>
3291
+ <default><![CDATA[]]></default>
3292
+ <type/>
3293
+ </argument>
3294
+ </method>
3295
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="384" package="Media Library Assistant">
3296
+ <name>mla_icon_dir_uri_filter</name>
3297
+ <full_name>mla_icon_dir_uri_filter</full_name>
3298
+ <docblock line="372">
3299
+ <description><![CDATA[Retrieve the icon directory URL for a MIME type]]></description>
3300
+ <long-description><![CDATA[<p>Called from /wp-includes/post.php, function wp_mime_type_icon().
3301
+ Defined as public because it's a filter.</p>]]></long-description>
3302
+ <tag line="372" name="since" description="1.40"/>
3303
+ <tag line="372" name="param" description="Path to the icon directory URL" type="string" variable="$uri">
3304
+ <type by_reference="false">string</type>
3305
+ </tag>
3306
+ <tag line="372" name="return" description="Updated path to the icon directory URL, no trailing slash" type="string">
3307
+ <type by_reference="false">string</type>
3308
+ </tag>
3309
+ </docblock>
3310
+ <argument line="384">
3311
+ <name>$uri</name>
3312
+ <default><![CDATA[]]></default>
3313
+ <type/>
3314
+ </argument>
3315
+ </method>
3316
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="405" package="Media Library Assistant">
3317
+ <name>mla_icon_dirs_filter</name>
3318
+ <full_name>mla_icon_dirs_filter</full_name>
3319
+ <docblock line="393">
3320
+ <description><![CDATA[Retrieve the icon (directory => URI) array for a MIME type]]></description>
3321
+ <long-description><![CDATA[<p>Called from /wp-includes/post.php, function wp_mime_type_icon().
3322
+ Defined as public because it's a filter.</p>]]></long-description>
3323
+ <tag line="393" name="since" description="1.40"/>
3324
+ <tag line="393" name="param" description="Path(s) and URI(s) to the icon directories" type="array" variable="$path_uri_array">
3325
+ <type by_reference="false">array</type>
3326
+ </tag>
3327
+ <tag line="393" name="return" description="Updated (path =&gt; URI) array" type="array">
3328
+ <type by_reference="false">array</type>
3329
+ </tag>
3330
+ </docblock>
3331
+ <argument line="405">
3332
+ <name>$path_uri_array</name>
3333
+ <default><![CDATA[]]></default>
3334
+ <type/>
3335
+ </argument>
3336
+ </method>
3337
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="428" package="Media Library Assistant">
3338
+ <name>mla_wp_mime_type_icon_filter</name>
3339
+ <full_name>mla_wp_mime_type_icon_filter</full_name>
3340
+ <docblock line="414">
3341
+ <description><![CDATA[Retrieve the icon for a MIME type]]></description>
3342
+ <long-description><![CDATA[<p>Called from /wp-includes/post.php, function wp_mime_type_icon().
3343
+ Defined as public because it's a filter.</p>]]></long-description>
3344
+ <tag line="414" name="since" description="1.40"/>
3345
+ <tag line="414" name="param" description="URI to the MIME type icon" type="string" variable="$icon">
3346
+ <type by_reference="false">string</type>
3347
+ </tag>
3348
+ <tag line="414" name="param" description="MIME type represented by the icon" type="string" variable="$mime">
3349
+ <type by_reference="false">string</type>
3350
+ </tag>
3351
+ <tag line="414" name="param" description="Attachment ID or zero (0) if MIME type passed in" type="integer" variable="$post_id">
3352
+ <type by_reference="false">integer</type>
3353
+ </tag>
3354
+ <tag line="414" name="return" description="Updated (path =&gt; URI) array" type="array">
3355
+ <type by_reference="false">array</type>
3356
+ </tag>
3357
+ </docblock>
3358
+ <argument line="428">
3359
+ <name>$icon</name>
3360
+ <default><![CDATA[]]></default>
3361
+ <type/>
3362
+ </argument>
3363
+ <argument line="428">
3364
+ <name>$mime</name>
3365
+ <default><![CDATA[]]></default>
3366
+ <type/>
3367
+ </argument>
3368
+ <argument line="428">
3369
+ <name>$post_id</name>
3370
+ <default><![CDATA[]]></default>
3371
+ <type/>
3372
+ </argument>
3373
+ </method>
3374
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="443" package="Media Library Assistant">
3375
+ <name>_prepare_view_items_query</name>
3376
+ <full_name>_prepare_view_items_query</full_name>
3377
+ <docblock line="432">
3378
+ <description><![CDATA[Sanitize and expand query arguments from request variables]]></description>
3379
+ <long-description><![CDATA[]]></long-description>
3380
+ <tag line="432" name="since" description="1.40"/>
3381
+ <tag line="432" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$raw_request">
3382
+ <type by_reference="false">array</type>
3383
+ </tag>
3384
+ <tag line="432" name="param" description="Optional number of rows (default 0) to skip over to reach desired page" type="int" variable="$offset">
3385
+ <type by_reference="false">int</type>
3386
+ </tag>
3387
+ <tag line="432" name="param" description="Optional number of rows on each page (0 = all rows, default)" type="int" variable="$count">
3388
+ <type by_reference="false">int</type>
3389
+ </tag>
3390
+ <tag line="432" name="return" description="revised arguments suitable for query" type="array">
3391
+ <type by_reference="false">array</type>
3392
+ </tag>
3393
+ </docblock>
3394
+ <argument line="443">
3395
+ <name>$raw_request</name>
3396
+ <default><![CDATA[]]></default>
3397
+ <type/>
3398
+ </argument>
3399
+ <argument line="443">
3400
+ <name>$offset</name>
3401
+ <default><![CDATA[0]]></default>
3402
+ <type/>
3403
+ </argument>
3404
+ <argument line="443">
3405
+ <name>$count</name>
3406
+ <default><![CDATA[0]]></default>
3407
+ <type/>
3408
+ </argument>
3409
+ </method>
3410
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="515" package="Media Library Assistant">
3411
+ <name>_execute_view_items_query</name>
3412
+ <full_name>_execute_view_items_query</full_name>
3413
+ <docblock line="506">
3414
+ <description><![CDATA[Add filters, run query, remove filters]]></description>
3415
+ <long-description><![CDATA[]]></long-description>
3416
+ <tag line="506" name="since" description="1.40"/>
3417
+ <tag line="506" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
3418
+ <type by_reference="false">array</type>
3419
+ </tag>
3420
+ <tag line="506" name="return" description="query results; array of MLA post_mime_type objects" type="array">
3421
+ <type by_reference="false">array</type>
3422
+ </tag>
3423
+ </docblock>
3424
+ <argument line="515">
3425
+ <name>$request</name>
3426
+ <default><![CDATA[]]></default>
3427
+ <type/>
3428
+ </argument>
3429
+ </method>
3430
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="603" package="Media Library Assistant">
3431
+ <name>mla_count_view_items</name>
3432
+ <full_name>mla_count_view_items</full_name>
3433
+ <docblock line="594">
3434
+ <description><![CDATA[Get the total number of MLA post_mime_type objects]]></description>
3435
+ <long-description><![CDATA[]]></long-description>
3436
+ <tag line="594" name="since" description="1.40"/>
3437
+ <tag line="594" name="param" description="Query variables, e.g., from $_REQUEST" type="array" variable="$request">
3438
+ <type by_reference="false">array</type>
3439
+ </tag>
3440
+ <tag line="594" name="return" description="Number of MLA post_mime_type objects" type="integer">
3441
+ <type by_reference="false">integer</type>
3442
+ </tag>
3443
+ </docblock>
3444
+ <argument line="603">
3445
+ <name>$request</name>
3446
+ <default><![CDATA[]]></default>
3447
+ <type/>
3448
+ </argument>
3449
+ </method>
3450
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="620" package="Media Library Assistant">
3451
+ <name>mla_query_view_items</name>
3452
+ <full_name>mla_query_view_items</full_name>
3453
+ <docblock line="609">
3454
+ <description><![CDATA[Retrieve MLA post_mime_type objects for list table display]]></description>
3455
+ <long-description><![CDATA[]]></long-description>
3456
+ <tag line="609" name="since" description="1.40"/>
3457
+ <tag line="609" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
3458
+ <type by_reference="false">array</type>
3459
+ </tag>
3460
+ <tag line="609" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
3461
+ <type by_reference="false">int</type>
3462
+ </tag>
3463
+ <tag line="609" name="param" description="number of rows on each page" type="int" variable="$count">
3464
+ <type by_reference="false">int</type>
3465
+ </tag>
3466
+ <tag line="609" name="return" description="MLA post_mime_type objects" type="array">
3467
+ <type by_reference="false">array</type>
3468
+ </tag>
3469
+ </docblock>
3470
+ <argument line="620">
3471
+ <name>$request</name>
3472
+ <default><![CDATA[]]></default>
3473
+ <type/>
3474
+ </argument>
3475
+ <argument line="620">
3476
+ <name>$offset</name>
3477
+ <default><![CDATA[]]></default>
3478
+ <type/>
3479
+ </argument>
3480
+ <argument line="620">
3481
+ <name>$count</name>
3482
+ <default><![CDATA[]]></default>
3483
+ <type/>
3484
+ </argument>
3485
+ </method>
3486
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="633" package="Media Library Assistant">
3487
+ <name>mla_pluck_table_views</name>
3488
+ <full_name>mla_pluck_table_views</full_name>
3489
+ <docblock line="626">
3490
+ <description><![CDATA[Retrieve views eligible for Media/Assistant table display]]></description>
3491
+ <long-description><![CDATA[]]></long-description>
3492
+ <tag line="626" name="since" description="1.40"/>
3493
+ <tag line="626" name="return" description="table views array ( specification =&gt; Plural Label )" type="array">
3494
+ <type by_reference="false">array</type>
3495
+ </tag>
3496
+ </docblock>
3497
+ </method>
3498
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="684" package="Media Library Assistant">
3499
+ <name>_get_post_mime_templates</name>
3500
+ <full_name>_get_post_mime_templates</full_name>
3501
+ <docblock line="675">
3502
+ <description><![CDATA[Assemble the in-memory representation of the Post MIME Types]]></description>
3503
+ <long-description><![CDATA[]]></long-description>
3504
+ <tag line="675" name="since" description="1.40"/>
3505
+ <tag line="675" name="param" description="Force a reload/recalculation of types" type="boolean" variable="$force_refresh">
3506
+ <type by_reference="false">boolean</type>
3507
+ </tag>
3508
+ <tag line="675" name="return" description="Success (true) or failure (false) of the operation" type="boolean">
3509
+ <type by_reference="false">boolean</type>
3510
+ </tag>
3511
+ </docblock>
3512
+ <argument line="684">
3513
+ <name>$force_refresh</name>
3514
+ <default><![CDATA[false]]></default>
3515
+ <type/>
3516
+ </argument>
3517
+ </method>
3518
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="749" package="Media Library Assistant">
3519
+ <name>_put_post_mime_templates</name>
3520
+ <full_name>_put_post_mime_templates</full_name>
3521
+ <docblock line="742">
3522
+ <description><![CDATA[Store the custom entries of the Post MIME Types]]></description>
3523
+ <long-description><![CDATA[]]></long-description>
3524
+ <tag line="742" name="since" description="1.40"/>
3525
+ <tag line="742" name="return" description="Success (true) or failure (false) of the operation" type="boolean">
3526
+ <type by_reference="false">boolean</type>
3527
+ </tag>
3528
+ </docblock>
3529
+ </method>
3530
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="775" package="Media Library Assistant">
3531
+ <name>mla_prepare_view_query</name>
3532
+ <full_name>mla_prepare_view_query</full_name>
3533
+ <docblock line="766">
3534
+ <description><![CDATA[Convert a Library View/Post MIME Type specification to WP_Query parameters]]></description>
3535
+ <long-description><![CDATA[]]></long-description>
3536
+ <tag line="766" name="since" description="1.40"/>
3537
+ <tag line="766" name="param" description="A specification, e.g., &quot;custom:Field,null&quot; or &quot;audio,application/vnd.*ms*&quot;" type="string" variable="$specification">
3538
+ <type by_reference="false">string</type>
3539
+ </tag>
3540
+ <tag line="766" name="return" description="post_mime_type specification or custom field query" type="array">
3541
+ <type by_reference="false">array</type>
3542
+ </tag>
3543
+ </docblock>
3544
+ <argument line="775">
3545
+ <name>$specification</name>
3546
+ <default><![CDATA[]]></default>
3547
+ <type/>
3548
+ </argument>
3549
+ </method>
3550
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="825" package="Media Library Assistant">
3551
+ <name>mla_parse_view_specification</name>
3552
+ <full_name>mla_parse_view_specification</full_name>
3553
+ <docblock line="816">
3554
+ <description><![CDATA[Analyze a Library View/Post MIME Type specification, returning an array of the place holders it contains]]></description>
3555
+ <long-description><![CDATA[]]></long-description>
3556
+ <tag line="816" name="since" description="1.40"/>
3557
+ <tag line="816" name="param" description="A specification, e.g., &quot;custom:Field,null&quot; or &quot;audio,application/vnd.*ms*&quot;" type="string" variable="$specification">
3558
+ <type by_reference="false">string</type>
3559
+ </tag>
3560
+ <tag line="816" name="return" description="( ['prefix'] =&gt; string, ['name'] =&gt; string, ['value'] =&gt; string, ['option'] =&gt; string, optional ['error'] =&gt; string )" type="array">
3561
+ <type by_reference="false">array</type>
3562
+ </tag>
3563
+ </docblock>
3564
+ <argument line="825">
3565
+ <name>$specification</name>
3566
+ <default><![CDATA[]]></default>
3567
+ <type/>
3568
+ </argument>
3569
+ </method>
3570
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="884" package="Media Library Assistant">
3571
+ <name>mla_add_post_mime_type</name>
3572
+ <full_name>mla_add_post_mime_type</full_name>
3573
+ <docblock line="875">
3574
+ <description><![CDATA[Add an MLA post_mime_type object]]></description>
3575
+ <long-description><![CDATA[]]></long-description>
3576
+ <tag line="875" name="since" description="1.40"/>
3577
+ <tag line="875" name="param" description="Query variables for a single object, including slug" type="array" variable="$request">
3578
+ <type by_reference="false">array</type>
3579
+ </tag>
3580
+ <tag line="875" name="return" description="Message(s) reflecting the results of the operation" type="array">
3581
+ <type by_reference="false">array</type>
3582
+ </tag>
3583
+ </docblock>
3584
+ <argument line="884">
3585
+ <name>$request</name>
3586
+ <default><![CDATA[]]></default>
3587
+ <type/>
3588
+ </argument>
3589
+ </method>
3590
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="955" package="Media Library Assistant">
3591
+ <name>mla_update_post_mime_type</name>
3592
+ <full_name>mla_update_post_mime_type</full_name>
3593
+ <docblock line="946">
3594
+ <description><![CDATA[Update an MLA post_mime_type object]]></description>
3595
+ <long-description><![CDATA[]]></long-description>
3596
+ <tag line="946" name="since" description="1.40"/>
3597
+ <tag line="946" name="param" description="Query variables for new object values, including optional original_slug" type="array" variable="$request">
3598
+ <type by_reference="false">array</type>
3599
+ </tag>
3600
+ <tag line="946" name="return" description="Message(s) reflecting the results of the operation" type="array">
3601
+ <type by_reference="false">array</type>
3602
+ </tag>
3603
+ </docblock>
3604
+ <argument line="955">
3605
+ <name>$request</name>
3606
+ <default><![CDATA[]]></default>
3607
+ <type/>
3608
+ </argument>
3609
+ </method>
3610
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1054" package="Media Library Assistant">
3611
+ <name>mla_get_post_mime_type_slug</name>
3612
+ <full_name>mla_get_post_mime_type_slug</full_name>
3613
+ <docblock line="1045">
3614
+ <description><![CDATA[Retrieve an MLA post_mime_type slug given a post_ID]]></description>
3615
+ <long-description><![CDATA[]]></long-description>
3616
+ <tag line="1045" name="since" description="1.40"/>
3617
+ <tag line="1045" name="param" description="MLA post_mime_type post_ID" type="integer" variable="$post_ID">
3618
+ <type by_reference="false">integer</type>
3619
+ </tag>
3620
+ <tag line="1045" name="return" description="string with slug of the requested object; false if object not found" type="mixed">
3621
+ <type by_reference="false">mixed</type>
3622
+ </tag>
3623
+ </docblock>
3624
+ <argument line="1054">
3625
+ <name>$post_ID</name>
3626
+ <default><![CDATA[]]></default>
3627
+ <type/>
3628
+ </argument>
3629
+ </method>
3630
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1075" package="Media Library Assistant">
3631
+ <name>mla_get_post_mime_type</name>
3632
+ <full_name>mla_get_post_mime_type</full_name>
3633
+ <docblock line="1066">
3634
+ <description><![CDATA[Retrieve an MLA post_mime_type object]]></description>
3635
+ <long-description><![CDATA[]]></long-description>
3636
+ <tag line="1066" name="since" description="1.40"/>
3637
+ <tag line="1066" name="param" description="MLA post_mime_type slug" type="string" variable="$slug">
3638
+ <type by_reference="false">string</type>
3639
+ </tag>
3640
+ <tag line="1066" name="return" description="Array of elements, including slug, for the requested object; false if object not found" type="mixed">
3641
+ <type by_reference="false">mixed</type>
3642
+ </tag>
3643
+ </docblock>
3644
+ <argument line="1075">
3645
+ <name>$slug</name>
3646
+ <default><![CDATA[]]></default>
3647
+ <type/>
3648
+ </argument>
3649
+ </method>
3650
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1097" package="Media Library Assistant">
3651
+ <name>mla_delete_post_mime_type</name>
3652
+ <full_name>mla_delete_post_mime_type</full_name>
3653
+ <docblock line="1088">
3654
+ <description><![CDATA[Delete an MLA post_mime_type object]]></description>
3655
+ <long-description><![CDATA[]]></long-description>
3656
+ <tag line="1088" name="since" description="1.40"/>
3657
+ <tag line="1088" name="param" description="MLA post_mime_type slug" type="string" variable="$slug">
3658
+ <type by_reference="false">string</type>
3659
+ </tag>
3660
+ <tag line="1088" name="return" description="Message(s) reflecting the results of the operation" type="array">
3661
+ <type by_reference="false">array</type>
3662
+ </tag>
3663
+ </docblock>
3664
+ <argument line="1097">
3665
+ <name>$slug</name>
3666
+ <default><![CDATA[]]></default>
3667
+ <type/>
3668
+ </argument>
3669
+ </method>
3670
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1135" package="Media Library Assistant">
3671
+ <name>_prepare_upload_items_query</name>
3672
+ <full_name>_prepare_upload_items_query</full_name>
3673
+ <docblock line="1124">
3674
+ <description><![CDATA[Sanitize and expand Upload MIME Type query arguments from request variables]]></description>
3675
+ <long-description><![CDATA[]]></long-description>
3676
+ <tag line="1124" name="since" description="1.40"/>
3677
+ <tag line="1124" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$raw_request">
3678
+ <type by_reference="false">array</type>
3679
+ </tag>
3680
+ <tag line="1124" name="param" description="Optional number of rows (default 0) to skip over to reach desired page" type="int" variable="$offset">
3681
+ <type by_reference="false">int</type>
3682
+ </tag>
3683
+ <tag line="1124" name="param" description="Optional number of rows on each page (0 = all rows, default)" type="int" variable="$count">
3684
+ <type by_reference="false">int</type>
3685
+ </tag>
3686
+ <tag line="1124" name="return" description="revised arguments suitable for query" type="array">
3687
+ <type by_reference="false">array</type>
3688
+ </tag>
3689
+ </docblock>
3690
+ <argument line="1135">
3691
+ <name>$raw_request</name>
3692
+ <default><![CDATA[]]></default>
3693
+ <type/>
3694
+ </argument>
3695
+ <argument line="1135">
3696
+ <name>$offset</name>
3697
+ <default><![CDATA[0]]></default>
3698
+ <type/>
3699
+ </argument>
3700
+ <argument line="1135">
3701
+ <name>$count</name>
3702
+ <default><![CDATA[0]]></default>
3703
+ <type/>
3704
+ </argument>
3705
+ </method>
3706
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1211" package="Media Library Assistant">
3707
+ <name>_execute_upload_items_query</name>
3708
+ <full_name>_execute_upload_items_query</full_name>
3709
+ <docblock line="1202">
3710
+ <description><![CDATA[Execute an Upload MIME Types query]]></description>
3711
+ <long-description><![CDATA[]]></long-description>
3712
+ <tag line="1202" name="since" description="1.40"/>
3713
+ <tag line="1202" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
3714
+ <type by_reference="false">array</type>
3715
+ </tag>
3716
+ <tag line="1202" name="return" description="query results; array of MLA Upload MIME Type objects" type="array">
3717
+ <type by_reference="false">array</type>
3718
+ </tag>
3719
+ </docblock>
3720
+ <argument line="1211">
3721
+ <name>$request</name>
3722
+ <default><![CDATA[]]></default>
3723
+ <type/>
3724
+ </argument>
3725
+ </method>
3726
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1329" package="Media Library Assistant">
3727
+ <name>mla_count_upload_items</name>
3728
+ <full_name>mla_count_upload_items</full_name>
3729
+ <docblock line="1320">
3730
+ <description><![CDATA[Get the total number of MLA Upload MIME Type objects]]></description>
3731
+ <long-description><![CDATA[]]></long-description>
3732
+ <tag line="1320" name="since" description="1.40"/>
3733
+ <tag line="1320" name="param" description="Query variables, e.g., from $_REQUEST" type="array" variable="$request">
3734
+ <type by_reference="false">array</type>
3735
+ </tag>
3736
+ <tag line="1320" name="return" description="Number of MLA Upload MIME Type objects" type="integer">
3737
+ <type by_reference="false">integer</type>
3738
+ </tag>
3739
+ </docblock>
3740
+ <argument line="1329">
3741
+ <name>$request</name>
3742
+ <default><![CDATA[]]></default>
3743
+ <type/>
3744
+ </argument>
3745
+ </method>
3746
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1346" package="Media Library Assistant">
3747
+ <name>mla_query_upload_items</name>
3748
+ <full_name>mla_query_upload_items</full_name>
3749
+ <docblock line="1335">
3750
+ <description><![CDATA[Retrieve MLA Upload MIME Type objects for list table display]]></description>
3751
+ <long-description><![CDATA[]]></long-description>
3752
+ <tag line="1335" name="since" description="1.40"/>
3753
+ <tag line="1335" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
3754
+ <type by_reference="false">array</type>
3755
+ </tag>
3756
+ <tag line="1335" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
3757
+ <type by_reference="false">int</type>
3758
+ </tag>
3759
+ <tag line="1335" name="param" description="number of rows on each page" type="int" variable="$count">
3760
+ <type by_reference="false">int</type>
3761
+ </tag>
3762
+ <tag line="1335" name="return" description="MLA Upload MIME Type objects" type="array">
3763
+ <type by_reference="false">array</type>
3764
+ </tag>
3765
+ </docblock>
3766
+ <argument line="1346">
3767
+ <name>$request</name>
3768
+ <default><![CDATA[]]></default>
3769
+ <type/>
3770
+ </argument>
3771
+ <argument line="1346">
3772
+ <name>$offset</name>
3773
+ <default><![CDATA[]]></default>
3774
+ <type/>
3775
+ </argument>
3776
+ <argument line="1346">
3777
+ <name>$count</name>
3778
+ <default><![CDATA[]]></default>
3779
+ <type/>
3780
+ </argument>
3781
+ </method>
3782
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1361" package="Media Library Assistant">
3783
+ <name>mla_tabulate_upload_items</name>
3784
+ <full_name>mla_tabulate_upload_items</full_name>
3785
+ <docblock line="1352">
3786
+ <description><![CDATA[Tabulate MLA Upload MIME Type objects by view for list table display]]></description>
3787
+ <long-description><![CDATA[]]></long-description>
3788
+ <tag line="1352" name="since" description="1.40"/>
3789
+ <tag line="1352" name="param" description="keyword search criterion, optional" type="string" variable="$s">
3790
+ <type by_reference="false">string</type>
3791
+ </tag>
3792
+ <tag line="1352" name="return" description="( 'singular' label, 'plural' label, 'count' of items )" type="array">
3793
+ <type by_reference="false">array</type>
3794
+ </tag>
3795
+ </docblock>
3796
+ <argument line="1361">
3797
+ <name>$s</name>
3798
+ <default><![CDATA['']]></default>
3799
+ <type/>
3800
+ </argument>
3801
+ </method>
3802
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1430" package="Media Library Assistant">
3803
+ <name>_get_core_icon_types</name>
3804
+ <full_name>_get_core_icon_types</full_name>
3805
+ <docblock line="1423">
3806
+ <description><![CDATA[Assemble the list of icon types without MLA filtering]]></description>
3807
+ <long-description><![CDATA[]]></long-description>
3808
+ <tag line="1423" name="since" description="1.40"/>
3809
+ <tag line="1423" name="return" description="Success (true) or failure (false) of the operation" type="boolean">
3810
+ <type by_reference="false">boolean</type>
3811
+ </tag>
3812
+ </docblock>
3813
+ </method>
3814
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1467" package="Media Library Assistant">
3815
+ <name>_get_current_icon_types</name>
3816
+ <full_name>_get_current_icon_types</full_name>
3817
+ <docblock line="1460">
3818
+ <description><![CDATA[Assemble the list of icon types with MLA filtering]]></description>
3819
+ <long-description><![CDATA[]]></long-description>
3820
+ <tag line="1460" name="since" description="1.40"/>
3821
+ <tag line="1460" name="return" description="Success (true) or failure (false) of the operation" type="boolean">
3822
+ <type by_reference="false">boolean</type>
3823
+ </tag>
3824
+ </docblock>
3825
+ </method>
3826
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1512" package="Media Library Assistant">
3827
+ <name>mla_get_core_icon_type</name>
3828
+ <full_name>mla_get_core_icon_type</full_name>
3829
+ <docblock line="1503">
3830
+ <description><![CDATA[Retrieve a standard icon type, i.e., without MLA filtering]]></description>
3831
+ <long-description><![CDATA[]]></long-description>
3832
+ <tag line="1503" name="since" description="1.40"/>
3833
+ <tag line="1503" name="param" description="file extension" type="string" variable="$extension">
3834
+ <type by_reference="false">string</type>
3835
+ </tag>
3836
+ <tag line="1503" name="return" description="icon type for the requested extension; 'default' if extension not found" type="string">
3837
+ <type by_reference="false">string</type>
3838
+ </tag>
3839
+ </docblock>
3840
+ <argument line="1512">
3841
+ <name>$extension</name>
3842
+ <default><![CDATA[]]></default>
3843
+ <type/>
3844
+ </argument>
3845
+ </method>
3846
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1530" package="Media Library Assistant">
3847
+ <name>mla_get_icon_type_image</name>
3848
+ <full_name>mla_get_icon_type_image</full_name>
3849
+ <docblock line="1520">
3850
+ <description><![CDATA[Get an HTML img element representing an attachment icon]]></description>
3851
+ <long-description><![CDATA[]]></long-description>
3852
+ <tag line="1520" name="since" description="1.40"/>
3853
+ <tag line="1520" name="param" description="Icon Type, e.g., audio, video, spreadsheet" type="string" variable="$icon_type">
3854
+ <type by_reference="false">string</type>
3855
+ </tag>
3856
+ <tag line="1520" name="param" description="( width, height ) optional image size, default (64, 64)." type="array" variable="$size">
3857
+ <type by_reference="false">array</type>
3858
+ </tag>
3859
+ <tag line="1520" name="return" description="HTML img element or empty string on failure." type="string">
3860
+ <type by_reference="false">string</type>
3861
+ </tag>
3862
+ </docblock>
3863
+ <argument line="1530">
3864
+ <name>$icon_type</name>
3865
+ <default><![CDATA[]]></default>
3866
+ <type/>
3867
+ </argument>
3868
+ <argument line="1530">
3869
+ <name>$size</name>
3870
+ <default><![CDATA[NULL]]></default>
3871
+ <type/>
3872
+ </argument>
3873
+ </method>
3874
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1565" package="Media Library Assistant">
3875
+ <name>mla_get_current_icon_types</name>
3876
+ <full_name>mla_get_current_icon_types</full_name>
3877
+ <docblock line="1558">
3878
+ <description><![CDATA[Get an array of current Icon Type names]]></description>
3879
+ <long-description><![CDATA[]]></long-description>
3880
+ <tag line="1558" name="since" description="1.40"/>
3881
+ <tag line="1558" name="return" description="( icon_type ) or false on failure." type="array">
3882
+ <type by_reference="false">array</type>
3883
+ </tag>
3884
+ </docblock>
3885
+ </method>
3886
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1580" package="Media Library Assistant">
3887
+ <name>_get_upload_mime_templates</name>
3888
+ <full_name>_get_upload_mime_templates</full_name>
3889
+ <docblock line="1572">
3890
+ <description><![CDATA[Assemble the in-memory representation of the Upload MIME Types]]></description>
3891
+ <long-description><![CDATA[]]></long-description>
3892
+ <tag line="1572" name="since" description="1.40"/>
3893
+ <tag line="1572" name="param" description="Force a reload/recalculation of types" type="boolean" variable="$force_refresh">
3894
+ <type by_reference="false">boolean</type>
3895
+ </tag>
3896
+ <tag line="1572" name="return" description="Success (true) or failure (false) of the operation" type="boolean">
3897
+ <type by_reference="false">boolean</type>
3898
+ </tag>
3899
+ </docblock>
3900
+ <argument line="1580">
3901
+ <name>$force_refresh</name>
3902
+ <default><![CDATA[false]]></default>
3903
+ <type/>
3904
+ </argument>
3905
+ </method>
3906
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1795" package="Media Library Assistant">
3907
+ <name>_put_upload_mime_templates</name>
3908
+ <full_name>_put_upload_mime_templates</full_name>
3909
+ <docblock line="1788">
3910
+ <description><![CDATA[Store the options portion of the Upload MIME Types]]></description>
3911
+ <long-description><![CDATA[]]></long-description>
3912
+ <tag line="1788" name="since" description="1.40"/>
3913
+ <tag line="1788" name="return" description="Success (true) or failure (false) of the operation" type="boolean">
3914
+ <type by_reference="false">boolean</type>
3915
+ </tag>
3916
+ </docblock>
3917
+ </method>
3918
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1826" package="Media Library Assistant">
3919
+ <name>mla_add_upload_mime</name>
3920
+ <full_name>mla_add_upload_mime</full_name>
3921
+ <docblock line="1817">
3922
+ <description><![CDATA[Add an MLA Upload MIME Type object]]></description>
3923
+ <long-description><![CDATA[]]></long-description>
3924
+ <tag line="1817" name="since" description="1.40"/>
3925
+ <tag line="1817" name="param" description="Query variables for a single object, including slug" type="array" variable="$request">
3926
+ <type by_reference="false">array</type>
3927
+ </tag>
3928
+ <tag line="1817" name="return" description="Message(s) reflecting the results of the operation" type="array">
3929
+ <type by_reference="false">array</type>
3930
+ </tag>
3931
+ </docblock>
3932
+ <argument line="1826">
3933
+ <name>$request</name>
3934
+ <default><![CDATA[]]></default>
3935
+ <type/>
3936
+ </argument>
3937
+ </method>
3938
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1914" package="Media Library Assistant">
3939
+ <name>mla_update_upload_mime</name>
3940
+ <full_name>mla_update_upload_mime</full_name>
3941
+ <docblock line="1905">
3942
+ <description><![CDATA[Update an MLA Upload MIME Type object]]></description>
3943
+ <long-description><![CDATA[]]></long-description>
3944
+ <tag line="1905" name="since" description="1.40"/>
3945
+ <tag line="1905" name="param" description="Query variables for new object values, including optional original_slug" type="array" variable="$request">
3946
+ <type by_reference="false">array</type>
3947
+ </tag>
3948
+ <tag line="1905" name="return" description="Message(s) reflecting the results of the operation" type="array">
3949
+ <type by_reference="false">array</type>
3950
+ </tag>
3951
+ </docblock>
3952
+ <argument line="1914">
3953
+ <name>$request</name>
3954
+ <default><![CDATA[]]></default>
3955
+ <type/>
3956
+ </argument>
3957
+ </method>
3958
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2076" package="Media Library Assistant">
3959
+ <name>mla_get_upload_mime_slug</name>
3960
+ <full_name>mla_get_upload_mime_slug</full_name>
3961
+ <docblock line="2067">
3962
+ <description><![CDATA[Retrieve an MLA Upload MIME Type slug given a post_ID]]></description>
3963
+ <long-description><![CDATA[]]></long-description>
3964
+ <tag line="2067" name="since" description="1.40"/>
3965
+ <tag line="2067" name="param" description="MLA Upload MIME Type post_ID" type="integer" variable="$post_ID">
3966
+ <type by_reference="false">integer</type>
3967
+ </tag>
3968
+ <tag line="2067" name="return" description="string with slug of the requested object; false if object not found" type="mixed">
3969
+ <type by_reference="false">mixed</type>
3970
+ </tag>
3971
+ </docblock>
3972
+ <argument line="2076">
3973
+ <name>$post_ID</name>
3974
+ <default><![CDATA[]]></default>
3975
+ <type/>
3976
+ </argument>
3977
+ </method>
3978
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2094" package="Media Library Assistant">
3979
+ <name>mla_get_upload_mime</name>
3980
+ <full_name>mla_get_upload_mime</full_name>
3981
+ <docblock line="2085">
3982
+ <description><![CDATA[Retrieve an MLA Upload MIME Type object]]></description>
3983
+ <long-description><![CDATA[]]></long-description>
3984
+ <tag line="2085" name="since" description="1.40"/>
3985
+ <tag line="2085" name="param" description="MLA Upload MIME Type slug" type="string" variable="$slug">
3986
+ <type by_reference="false">string</type>
3987
+ </tag>
3988
+ <tag line="2085" name="return" description="Array of elements, including slug, for the requested object; false if object not found" type="mixed">
3989
+ <type by_reference="false">mixed</type>
3990
+ </tag>
3991
+ </docblock>
3992
+ <argument line="2094">
3993
+ <name>$slug</name>
3994
+ <default><![CDATA[]]></default>
3995
+ <type/>
3996
+ </argument>
3997
+ </method>
3998
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2114" package="Media Library Assistant">
3999
+ <name>mla_delete_upload_mime</name>
4000
+ <full_name>mla_delete_upload_mime</full_name>
4001
+ <docblock line="2105">
4002
+ <description><![CDATA[Delete an MLA Upload MIME Type object]]></description>
4003
+ <long-description><![CDATA[]]></long-description>
4004
+ <tag line="2105" name="since" description="1.40"/>
4005
+ <tag line="2105" name="param" description="MLA Upload MIME Type slug" type="string" variable="$slug">
4006
+ <type by_reference="false">string</type>
4007
+ </tag>
4008
+ <tag line="2105" name="return" description="Message(s) reflecting the results of the operation" type="array">
4009
+ <type by_reference="false">array</type>
4010
+ </tag>
4011
+ </docblock>
4012
+ <argument line="2114">
4013
+ <name>$slug</name>
4014
+ <default><![CDATA[]]></default>
4015
+ <type/>
4016
+ </argument>
4017
+ </method>
4018
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2166" package="Media Library Assistant">
4019
+ <name>_prepare_optional_upload_items_query</name>
4020
+ <full_name>_prepare_optional_upload_items_query</full_name>
4021
+ <docblock line="2155">
4022
+ <description><![CDATA[Sanitize and expand Optional Upload MIME Type query arguments from request variables]]></description>
4023
+ <long-description><![CDATA[]]></long-description>
4024
+ <tag line="2155" name="since" description="1.40"/>
4025
+ <tag line="2155" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$raw_request">
4026
+ <type by_reference="false">array</type>
4027
+ </tag>
4028
+ <tag line="2155" name="param" description="Optional number of rows (default 0) to skip over to reach desired page" type="int" variable="$offset">
4029
+ <type by_reference="false">int</type>
4030
+ </tag>
4031
+ <tag line="2155" name="param" description="Optional number of rows on each page (0 = all rows, default)" type="int" variable="$count">
4032
+ <type by_reference="false">int</type>
4033
+ </tag>
4034
+ <tag line="2155" name="return" description="revised arguments suitable for query" type="array">
4035
+ <type by_reference="false">array</type>
4036
+ </tag>
4037
+ </docblock>
4038
+ <argument line="2166">
4039
+ <name>$raw_request</name>
4040
+ <default><![CDATA[]]></default>
4041
+ <type/>
4042
+ </argument>
4043
+ <argument line="2166">
4044
+ <name>$offset</name>
4045
+ <default><![CDATA[0]]></default>
4046
+ <type/>
4047
+ </argument>
4048
+ <argument line="2166">
4049
+ <name>$count</name>
4050
+ <default><![CDATA[0]]></default>
4051
+ <type/>
4052
+ </argument>
4053
+ </method>
4054
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2238" package="Media Library Assistant">
4055
+ <name>_execute_optional_upload_items_query</name>
4056
+ <full_name>_execute_optional_upload_items_query</full_name>
4057
+ <docblock line="2229">
4058
+ <description><![CDATA[Execute an Optional Upload MIME Types query]]></description>
4059
+ <long-description><![CDATA[]]></long-description>
4060
+ <tag line="2229" name="since" description="1.40"/>
4061
+ <tag line="2229" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
4062
+ <type by_reference="false">array</type>
4063
+ </tag>
4064
+ <tag line="2229" name="return" description="query results; array of MLA Optional Upload MIME Type objects" type="array">
4065
+ <type by_reference="false">array</type>
4066
+ </tag>
4067
+ </docblock>
4068
+ <argument line="2238">
4069
+ <name>$request</name>
4070
+ <default><![CDATA[]]></default>
4071
+ <type/>
4072
+ </argument>
4073
+ </method>
4074
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2316" package="Media Library Assistant">
4075
+ <name>mla_count_optional_upload_items</name>
4076
+ <full_name>mla_count_optional_upload_items</full_name>
4077
+ <docblock line="2307">
4078
+ <description><![CDATA[Get the total number of MLA Upload MIME Type objects]]></description>
4079
+ <long-description><![CDATA[]]></long-description>
4080
+ <tag line="2307" name="since" description="1.40"/>
4081
+ <tag line="2307" name="param" description="Query variables, e.g., from $_REQUEST" type="array" variable="$request">
4082
+ <type by_reference="false">array</type>
4083
+ </tag>
4084
+ <tag line="2307" name="return" description="Number of MLA Upload MIME Type objects" type="integer">
4085
+ <type by_reference="false">integer</type>
4086
+ </tag>
4087
+ </docblock>
4088
+ <argument line="2316">
4089
+ <name>$request</name>
4090
+ <default><![CDATA[]]></default>
4091
+ <type/>
4092
+ </argument>
4093
+ </method>
4094
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2333" package="Media Library Assistant">
4095
+ <name>mla_query_optional_upload_items</name>
4096
+ <full_name>mla_query_optional_upload_items</full_name>
4097
+ <docblock line="2322">
4098
+ <description><![CDATA[Retrieve MLA Upload MIME Type objects for list table display]]></description>
4099
+ <long-description><![CDATA[]]></long-description>
4100
+ <tag line="2322" name="since" description="1.40"/>
4101
+ <tag line="2322" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
4102
+ <type by_reference="false">array</type>
4103
+ </tag>
4104
+ <tag line="2322" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
4105
+ <type by_reference="false">int</type>
4106
+ </tag>
4107
+ <tag line="2322" name="param" description="number of rows on each page" type="int" variable="$count">
4108
+ <type by_reference="false">int</type>
4109
+ </tag>
4110
+ <tag line="2322" name="return" description="MLA Upload MIME Type objects" type="array">
4111
+ <type by_reference="false">array</type>
4112
+ </tag>
4113
+ </docblock>
4114
+ <argument line="2333">
4115
+ <name>$request</name>
4116
+ <default><![CDATA[]]></default>
4117
+ <type/>
4118
+ </argument>
4119
+ <argument line="2333">
4120
+ <name>$offset</name>
4121
+ <default><![CDATA[]]></default>
4122
+ <type/>
4123
+ </argument>
4124
+ <argument line="2333">
4125
+ <name>$count</name>
4126
+ <default><![CDATA[]]></default>
4127
+ <type/>
4128
+ </argument>
4129
+ </method>
4130
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2346" package="Media Library Assistant">
4131
+ <name>_get_optional_upload_mime_templates</name>
4132
+ <full_name>_get_optional_upload_mime_templates</full_name>
4133
+ <docblock line="2339">
4134
+ <description><![CDATA[Assemble the in-memory representation of the (read-only) Optional Upload MIME Types]]></description>
4135
+ <long-description><![CDATA[]]></long-description>
4136
+ <tag line="2339" name="since" description="1.40"/>
4137
+ <tag line="2339" name="return" description="Success (true) or failure (false) of the operation" type="boolean">
4138
+ <type by_reference="false">boolean</type>
4139
+ </tag>
4140
+ </docblock>
4141
+ </method>
4142
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2391" package="Media Library Assistant">
4143
+ <name>mla_get_optional_upload_mime</name>
4144
+ <full_name>mla_get_optional_upload_mime</full_name>
4145
+ <docblock line="2382">
4146
+ <description><![CDATA[Retrieve an MLA Optional Upload MIME Type given an ID]]></description>
4147
+ <long-description><![CDATA[]]></long-description>
4148
+ <tag line="2382" name="since" description="1.40"/>
4149
+ <tag line="2382" name="param" description="MLA Optional Upload MIME Type ID" type="integer" variable="$ID">
4150
+ <type by_reference="false">integer</type>
4151
+ </tag>
4152
+ <tag line="2382" name="return" description="the requested object; false if object not found" type="mixed">
4153
+ <type by_reference="false">mixed</type>
4154
+ </tag>
4155
+ </docblock>
4156
+ <argument line="2391">
4157
+ <name>$ID</name>
4158
+ <default><![CDATA[]]></default>
4159
+ <type/>
4160
+ </argument>
4161
+ </method>
4162
+ </class>
4163
+ </file>
4164
+ <file path="includes\class-mla-objects.php" hash="52dfafc17c60fb76b734ba9792acff57" package="Media Library Assistant">
4165
+ <docblock line="2">
4166
+ <description><![CDATA[Media Library Assistant Custom Taxonomy objects]]></description>
4167
+ <long-description><![CDATA[]]></long-description>
4168
+ <tag line="2" name="package" description="Media Library Assistant"/>
4169
+ <tag line="2" name="since" description="0.1"/>
4170
+ </docblock>
4171
+ <class final="false" abstract="false" namespace="global" line="15" package="Media Library Assistant">
4172
+ <extends/>
4173
+ <name>MLAObjects</name>
4174
+ <full_name>\MLAObjects</full_name>
4175
+ <docblock line="9">
4176
+ <description><![CDATA[Class MLA (Media Library Assistant) Objects defines and manages custom taxonomies for Attachment Categories and Tags]]></description>
4177
+ <long-description><![CDATA[]]></long-description>
4178
+ <tag line="9" name="package" description="Media Library Assistant"/>
4179
+ <tag line="9" name="since" description="0.20"/>
4180
+ </docblock>
4181
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="23" package="Media Library Assistant">
4182
+ <name>initialize</name>
4183
+ <full_name>initialize</full_name>
4184
+ <docblock line="16">
4185
+ <description><![CDATA[Initialization function, similar to __construct()]]></description>
4186
+ <long-description><![CDATA[]]></long-description>
4187
+ <tag line="16" name="since" description="0.20"/>
4188
+ <tag line="16" name="return" description="" type="void">
4189
+ <type by_reference="false">void</type>
4190
+ </tag>
4191
+ </docblock>
4192
+ </method>
4193
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="34" package="Media Library Assistant">
4194
+ <name>_build_taxonomies</name>
4195
+ <full_name>_build_taxonomies</full_name>
4196
+ <docblock line="27">
4197
+ <description><![CDATA[Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters]]></description>
4198
+ <long-description><![CDATA[]]></long-description>
4199
+ <tag line="27" name="since" description="0.1"/>
4200
+ <tag line="27" name="return" description="" type="void">
4201
+ <type by_reference="false">void</type>
4202
+ </tag>
4203
+ </docblock>
4204
+ </method>
4205
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="116" package="Media Library Assistant">
4206
+ <name>mla_taxonomy_get_columns_filter</name>
4207
+ <full_name>mla_taxonomy_get_columns_filter</full_name>
4208
+ <docblock line="106">
4209
+ <description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
4210
+ which replaces the "Posts" column with an equivalent "Attachments" column.]]></description>
4211
+ <long-description><![CDATA[]]></long-description>
4212
+ <tag line="106" name="since" description="0.30"/>
4213
+ <tag line="106" name="param" description="column definitions for the edit taxonomy list table" type="array" variable="$columns">
4214
+ <type by_reference="false">array</type>
4215
+ </tag>
4216
+ <tag line="106" name="return" description="updated column definitions for the edit taxonomy list table" type="array">
4217
+ <type by_reference="false">array</type>
4218
+ </tag>
4219
+ </docblock>
4220
+ <argument line="116">
4221
+ <name>$columns</name>
4222
+ <default><![CDATA[]]></default>
4223
+ <type/>
4224
+ </argument>
4225
+ </method>
4226
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="151" package="Media Library Assistant">
4227
+ <name>mla_taxonomy_column_filter</name>
4228
+ <full_name>mla_taxonomy_column_filter</full_name>
4229
+ <docblock line="138">
4230
+ <description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
4231
+ which returns a count of the attachments assigned a given term]]></description>
4232
+ <long-description><![CDATA[]]></long-description>
4233
+ <tag line="138" name="since" description="0.30"/>
4234
+ <tag line="138" name="param" description="current column value; always ''" type="string" variable="$place_holder">
4235
+ <type by_reference="false">string</type>
4236
+ </tag>
4237
+ <tag line="138" name="param" description="name of the column" type="array" variable="$column_name">
4238
+ <type by_reference="false">array</type>
4239
+ </tag>
4240
+ <tag line="138" name="param" description="ID of the term for which the count is desired" type="array" variable="$term_id">
4241
+ <type by_reference="false">array</type>
4242
+ </tag>
4243
+ <tag line="138" name="return" description="HTML markup for the column content; number of attachments in the category and alink to retrieve a list of them" type="array">
4244
+ <type by_reference="false">array</type>
4245
+ </tag>
4246
+ </docblock>
4247
+ <argument line="151">
4248
+ <name>$place_holder</name>
4249
+ <default><![CDATA[]]></default>
4250
+ <type/>
4251
+ </argument>
4252
+ <argument line="151">
4253
+ <name>$column_name</name>
4254
+ <default><![CDATA[]]></default>
4255
+ <type/>
4256
+ </argument>
4257
+ <argument line="151">
4258
+ <name>$term_id</name>
4259
+ <default><![CDATA[]]></default>
4260
+ <type/>
4261
+ </argument>
4262
+ </method>
4263
+ </class>
4264
+ </file>
4265
+ <file path="includes\class-mla-options.php" hash="66c58efc9f53a443835cf98dd7d2bb19" package="Media Library Assistant">
4266
+ <docblock line="2">
4267
+ <description><![CDATA[Manages the plugin option settings]]></description>
4268
+ <long-description><![CDATA[]]></long-description>
4269
+ <tag line="2" name="package" description="Media Library Assistant"/>
4270
+ <tag line="2" name="since" description="1.00"/>
4271
+ </docblock>
4272
+ <class final="false" abstract="false" namespace="global" line="18" package="Media Library Assistant">
4273
+ <extends/>
4274
+ <name>MLAOptions</name>
4275
+ <full_name>\MLAOptions</full_name>
4276
+ <docblock line="9">
4277
+ <description><![CDATA[Class MLA (Media Library Assistant) Options manages the plugin option settings
4278
+ and provides functions to get and put them from/to WordPress option variables]]></description>
4279
+ <long-description><![CDATA[<p>Separated from class MLASettings in version 1.00</p>]]></long-description>
4280
+ <tag line="9" name="package" description="Media Library Assistant"/>
4281
+ <tag line="9" name="since" description="1.00"/>
4282
+ </docblock>
4283
+ <constant namespace="global" line="22" package="Media Library Assistant">
4284
+ <name>MLA_VERSION_OPTION</name>
4285
+ <full_name>MLA_VERSION_OPTION</full_name>
4286
+ <value><![CDATA['current_version']]></value>
4287
+ <docblock line="19">
4288
+ <description><![CDATA[Provides a unique name for the current version option]]></description>
4289
+ <long-description><![CDATA[]]></long-description>
4290
+ </docblock>
4291
+ </constant>
4292
+ <constant namespace="global" line="27" package="Media Library Assistant">
4293
+ <name>MLA_FEATURED_IN_TUNING</name>
4294
+ <full_name>MLA_FEATURED_IN_TUNING</full_name>
4295
+ <value><![CDATA['featured_in_tuning']]></value>
4296
+ <docblock line="24">
4297
+ <description><![CDATA[Provides a unique name for a database tuning option]]></description>
4298
+ <long-description><![CDATA[]]></long-description>
4299
+ </docblock>
4300
+ </constant>
4301
+ <constant namespace="global" line="32" package="Media Library Assistant">
4302
+ <name>MLA_INSERTED_IN_TUNING</name>
4303
+ <full_name>MLA_INSERTED_IN_TUNING</full_name>
4304
+ <value><![CDATA['inserted_in_tuning']]></value>
4305
+ <docblock line="29">
4306
+ <description><![CDATA[Provides a unique name for a database tuning option]]></description>
4307
+ <long-description><![CDATA[]]></long-description>
4308
+ </docblock>
4309
+ </constant>
4310
+ <constant namespace="global" line="37" package="Media Library Assistant">
4311
+ <name>MLA_GALLERY_IN_TUNING</name>
4312
+ <full_name>MLA_GALLERY_IN_TUNING</full_name>
4313
+ <value><![CDATA['gallery_in_tuning']]></value>
4314
+ <docblock line="34">
4315
+ <description><![CDATA[Provides a unique name for a database tuning option]]></description>
4316
+ <long-description><![CDATA[]]></long-description>
4317
+ </docblock>
4318
+ </constant>
4319
+ <constant namespace="global" line="42" package="Media Library Assistant">
4320
+ <name>MLA_MLA_GALLERY_IN_TUNING</name>
4321
+ <full_name>MLA_MLA_GALLERY_IN_TUNING</full_name>
4322
+ <value><![CDATA['mla_gallery_in_tuning']]></value>
4323
+ <docblock line="39">
4324
+ <description><![CDATA[Provides a unique name for a database tuning option]]></description>
4325
+ <long-description><![CDATA[]]></long-description>
4326
+ </docblock>
4327
+ </constant>
4328
+ <constant namespace="global" line="47" package="Media Library Assistant">
4329
+ <name>MLA_NEW_CUSTOM_RULE</name>
4330
+ <full_name>MLA_NEW_CUSTOM_RULE</full_name>
4331
+ <value><![CDATA['__NEW RULE__']]></value>
4332
+ <docblock line="44">
4333
+ <description><![CDATA[Provides a unique name for the Custom Field "new rule" key]]></description>
4334
+ <long-description><![CDATA[]]></long-description>
4335
+ </docblock>
4336
+ </constant>
4337
+ <constant namespace="global" line="52" package="Media Library Assistant">
4338
+ <name>MLA_NEW_CUSTOM_FIELD</name>
4339
+ <full_name>MLA_NEW_CUSTOM_FIELD</full_name>
4340
+ <value><![CDATA['__NEW FIELD__']]></value>
4341
+ <docblock line="49">
4342
+ <description><![CDATA[Provides a unique name for the Custom Field "new field" key]]></description>
4343
+ <long-description><![CDATA[]]></long-description>
4344
+ </docblock>
4345
+ </constant>
4346
+ <constant namespace="global" line="57" package="Media Library Assistant">
4347
+ <name>MLA_MEDIA_MODAL_TOOLBAR</name>
4348
+ <full_name>MLA_MEDIA_MODAL_TOOLBAR</full_name>
4349
+ <value><![CDATA['media_modal_toolbar']]></value>
4350
+ <docblock line="54">
4351
+ <description><![CDATA[Provides a unique name for the Media Manager toolbar option]]></description>
4352
+ <long-description><![CDATA[]]></long-description>
4353
+ </docblock>
4354
+ </constant>
4355
+ <constant namespace="global" line="62" package="Media Library Assistant">
4356
+ <name>MLA_MEDIA_MODAL_MIMETYPES</name>
4357
+ <full_name>MLA_MEDIA_MODAL_MIMETYPES</full_name>
4358
+ <value><![CDATA['media_modal_mimetypes']]></value>
4359
+ <docblock line="59">
4360
+ <description><![CDATA[Provides a unique name for the Media Manager toolbar MIME Types option]]></description>
4361
+ <long-description><![CDATA[]]></long-description>
4362
+ </docblock>
4363
+ </constant>
4364
+ <constant namespace="global" line="67" package="Media Library Assistant">
4365
+ <name>MLA_MEDIA_MODAL_MONTHS</name>
4366
+ <full_name>MLA_MEDIA_MODAL_MONTHS</full_name>
4367
+ <value><![CDATA['media_modal_months']]></value>
4368
+ <docblock line="64">
4369
+ <description><![CDATA[Provides a unique name for the Media Manager toolbar Month and Year option]]></description>
4370
+ <long-description><![CDATA[]]></long-description>
4371
+ </docblock>
4372
+ </constant>
4373
+ <constant namespace="global" line="72" package="Media Library Assistant">
4374
+ <name>MLA_MEDIA_MODAL_TERMS</name>
4375
+ <full_name>MLA_MEDIA_MODAL_TERMS</full_name>
4376
+ <value><![CDATA['media_modal_terms']]></value>
4377
+ <docblock line="69">
4378
+ <description><![CDATA[Provides a unique name for the Media Manager toolbar Taxonomy Terms option]]></description>
4379
+ <long-description><![CDATA[]]></long-description>
4380
+ </docblock>
4381
+ </constant>
4382
+ <constant namespace="global" line="77" package="Media Library Assistant">
4383
+ <name>MLA_MEDIA_MODAL_SEARCHBOX</name>
4384
+ <full_name>MLA_MEDIA_MODAL_SEARCHBOX</full_name>
4385
+ <value><![CDATA['media_modal_searchbox']]></value>
4386
+ <docblock line="74">
4387
+ <description><![CDATA[Provides a unique name for the Media Manager toolbar Search Box option]]></description>
4388
+ <long-description><![CDATA[]]></long-description>
4389
+ </docblock>
4390
+ </constant>
4391
+ <constant namespace="global" line="82" package="Media Library Assistant">
4392
+ <name>MLA_POST_MIME_TYPES</name>
4393
+ <full_name>MLA_POST_MIME_TYPES</full_name>
4394
+ <value><![CDATA['post_mime_types']]></value>
4395
+ <docblock line="79">
4396
+ <description><![CDATA[Provides a unique name for the Post MIME Types option]]></description>
4397
+ <long-description><![CDATA[]]></long-description>
4398
+ </docblock>
4399
+ </constant>
4400
+ <constant namespace="global" line="87" package="Media Library Assistant">
4401
+ <name>MLA_ENABLE_POST_MIME_TYPES</name>
4402
+ <full_name>MLA_ENABLE_POST_MIME_TYPES</full_name>
4403
+ <value><![CDATA['enable_post_mime_types']]></value>
4404
+ <docblock line="84">
4405
+ <description><![CDATA[Provides a unique name for the Enable Post MIME Types option]]></description>
4406
+ <long-description><![CDATA[]]></long-description>
4407
+ </docblock>
4408
+ </constant>
4409
+ <constant namespace="global" line="92" package="Media Library Assistant">
4410
+ <name>MLA_UPLOAD_MIMES</name>
4411
+ <full_name>MLA_UPLOAD_MIMES</full_name>
4412
+ <value><![CDATA['upload_mimes']]></value>
4413
+ <docblock line="89">
4414
+ <description><![CDATA[Provides a unique name for the Upload MIME Types option]]></description>
4415
+ <long-description><![CDATA[]]></long-description>
4416
+ </docblock>
4417
+ </constant>
4418
+ <constant namespace="global" line="97" package="Media Library Assistant">
4419
+ <name>MLA_ENABLE_UPLOAD_MIMES</name>
4420
+ <full_name>MLA_ENABLE_UPLOAD_MIMES</full_name>
4421
+ <value><![CDATA['enable_upload_mimes']]></value>
4422
+ <docblock line="94">
4423
+ <description><![CDATA[Provides a unique name for the Enable Upload MIME Types option]]></description>
4424
+ <long-description><![CDATA[]]></long-description>
4425
+ </docblock>
4426
+ </constant>
4427
+ <constant namespace="global" line="102" package="Media Library Assistant">
4428
+ <name>MLA_ENABLE_MLA_ICONS</name>
4429
+ <full_name>MLA_ENABLE_MLA_ICONS</full_name>
4430
+ <value><![CDATA['enable_mla_icons']]></value>
4431
+ <docblock line="99">
4432
+ <description><![CDATA[Provides a unique name for the Enable MLA Icons option]]></description>
4433
+ <long-description><![CDATA[]]></long-description>
4434
+ </docblock>
4435
+ </constant>
4436
+ <property final="false" static="true" visibility="public" line="113" namespace="global" package="Media Library Assistant">
4437
+ <name>$process_featured_in</name>
4438
+ <default><![CDATA[true]]></default>
4439
+ <docblock line="104">
4440
+ <description><![CDATA[Option setting for "Featured in" reporting]]></description>
4441
+ <long-description><![CDATA[<p>This setting is false if the "Featured in" database access setting is "disabled", else true.</p>]]></long-description>
4442
+ <tag line="104" name="since" description="1.00"/>
4443
+ <tag line="104" name="var" description="" type="boolean">
4444
+ <type by_reference="false">boolean</type>
4445
+ </tag>
4446
+ </docblock>
4447
+ </property>
4448
+ <property final="false" static="true" visibility="public" line="124" namespace="global" package="Media Library Assistant">
4449
+ <name>$process_inserted_in</name>
4450
+ <default><![CDATA[true]]></default>
4451
+ <docblock line="115">
4452
+ <description><![CDATA[Option setting for "Inserted in" reporting]]></description>
4453
+ <long-description><![CDATA[<p>This setting is false if the "Inserted in" database access setting is "disabled", else true.</p>]]></long-description>
4454
+ <tag line="115" name="since" description="1.00"/>
4455
+ <tag line="115" name="var" description="" type="boolean">
4456
+ <type by_reference="false">boolean</type>
4457
+ </tag>
4458
+ </docblock>
4459
+ </property>
4460
+ <property final="false" static="true" visibility="public" line="135" namespace="global" package="Media Library Assistant">
4461
+ <name>$process_gallery_in</name>
4462
+ <default><![CDATA[true]]></default>
4463
+ <docblock line="126">
4464
+ <description><![CDATA[Option setting for "Gallery in" reporting]]></description>
4465
+ <long-description><![CDATA[<p>This setting is false if the "Gallery in" database access setting is "disabled", else true.</p>]]></long-description>
4466
+ <tag line="126" name="since" description="1.00"/>
4467
+ <tag line="126" name="var" description="" type="boolean">
4468
+ <type by_reference="false">boolean</type>
4469
+ </tag>
4470
+ </docblock>
4471
+ </property>
4472
+ <property final="false" static="true" visibility="public" line="146" namespace="global" package="Media Library Assistant">
4473
+ <name>$process_mla_gallery_in</name>
4474
+ <default><![CDATA[true]]></default>
4475
+ <docblock line="137">
4476
+ <description><![CDATA[Option setting for "MLA Gallery in" reporting]]></description>
4477
+ <long-description><![CDATA[<p>This setting is false if the "MLA Gallery in" database access setting is "disabled", else true.</p>]]></long-description>
4478
+ <tag line="137" name="since" description="1.00"/>
4479
+ <tag line="137" name="var" description="" type="boolean">
4480
+ <type by_reference="false">boolean</type>
4481
+ </tag>
4482
+ </docblock>
4483
+ </property>
4484
+ <property final="false" static="true" visibility="public" line="173" namespace="global" package="Media Library Assistant">
4485
+ <name>$mla_option_definitions</name>
4486
+ <default><![CDATA[array(self::MLA_VERSION_OPTION => array('tab' => '', 'type' => 'hidden', 'std' => '0'), 'attachment_category' => array('tab' => '', 'name' => 'Attachment Categories', 'type' => 'hidden', 'std' => 'checked', 'help' => 'Check this option to add support for Attachment Categories.'), 'attachment_tag' => array('tab' => '', 'name' => 'Attachment Tags', 'type' => 'hidden', 'std' => 'checked', 'help' => 'Check this option to add support for Attachment Tags.'), 'where_used_heading' => array('tab' => 'general', 'name' => 'Where-used Reporting', 'type' => 'header'), 'exclude_revisions' => array('tab' => 'general', 'name' => 'Exclude Revisions', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to exclude revisions from where-used reporting.'), 'where_used_subheading' => array('tab' => 'general', 'name' => 'Where-used database access tuning', 'type' => 'subheader'), self::MLA_FEATURED_IN_TUNING => array('tab' => 'general', 'name' => 'Featured in', 'type' => 'select', 'std' => 'enabled', 'options' => array('enabled', 'disabled'), 'texts' => array('Enabled', 'Disabled'), 'help' => 'Search database posts and pages for Featured Image attachments.'), self::MLA_INSERTED_IN_TUNING => array('tab' => 'general', 'name' => 'Inserted in', 'type' => 'select', 'std' => 'base', 'options' => array('enabled', 'base', 'disabled'), 'texts' => array('Enabled', 'Base', 'Disabled'), 'help' => 'Search database posts and pages for attachments embedded in content.<br>&nbsp;&nbsp;Base = ignore intermediate size suffixes; use path, base name and extension only.'), self::MLA_GALLERY_IN_TUNING => array('tab' => 'general', 'name' => 'Gallery in', 'type' => 'select', 'std' => 'cached', 'options' => array('dynamic', 'refresh', 'cached', 'disabled'), 'texts' => array('Dynamic', 'Refresh', 'Cached', 'Disabled'), 'help' => 'Search database posts and pages for [gallery] shortcode results.<br>&nbsp;&nbsp;Dynamic = once every page load, Cached = once every login, Disabled = never.<br>&nbsp;&nbsp;Refresh = update references, then set to Cached.'), self::MLA_MLA_GALLERY_IN_TUNING => array('tab' => 'general', 'name' => 'MLA Gallery in', 'type' => 'select', 'std' => 'cached', 'options' => array('dynamic', 'refresh', 'cached', 'disabled'), 'texts' => array('Dynamic', 'Refresh', 'Cached', 'Disabled'), 'help' => 'Search database posts and pages for [mla_gallery] shortcode results.<br>&nbsp;&nbsp;Dynamic = once every page load, Cached = once every login, Disabled = never.<br>&nbsp;&nbsp;Refresh = update references, then set to Cached.'), 'taxonomy_heading' => array('tab' => 'general', 'name' => 'Taxonomy Support', 'type' => 'header'), 'taxonomy_support' => array('tab' => 'general', 'help' => 'Check the "Support" box to add the taxonomy to the Assistant and the Edit Media screen.<br>Check the "Inline Edit" box to display the taxonomy in the Quick Edit and Bulk Edit areas.<br>Use the "List Filter" option to select the taxonomy on which to filter the Assistant table listing.', 'std' => array('tax_support' => array('attachment_category' => 'checked', 'attachment_tag' => 'checked'), 'tax_quick_edit' => array('attachment_category' => 'checked', 'attachment_tag' => 'checked'), 'tax_filter' => 'attachment_category'), 'type' => 'custom', 'render' => 'mla_taxonomy_option_handler', 'update' => 'mla_taxonomy_option_handler', 'delete' => 'mla_taxonomy_option_handler', 'reset' => 'mla_taxonomy_option_handler'), 'attachments_column' => array('tab' => '', 'name' => 'Attachments Column', 'type' => 'hidden', 'std' => 'checked', 'help' => 'Check this option to replace the Posts column with the Attachments Column.'), 'orderby_heading' => array('tab' => 'general', 'name' => 'Media/Assistant Table Defaults', 'type' => 'header'), 'default_orderby' => array('tab' => 'general', 'name' => 'Order By', 'type' => 'select', 'std' => 'title_name', 'options' => array('none', 'title_name'), 'texts' => array('None', 'Title/Name'), 'help' => 'Select the column for the sort order of the Assistant table listing.'), 'default_order' => array('tab' => 'general', 'name' => 'Order', 'type' => 'radio', 'std' => 'ASC', 'options' => array('ASC', 'DESC'), 'texts' => array('Ascending', 'Descending'), 'help' => 'Choose the sort order.'), 'table_views_width' => array('tab' => 'general', 'name' => 'Views Width', 'type' => 'text', 'std' => '', 'size' => 10, 'help' => 'Enter the width for the views list, in pixels (px) or percent (%)'), 'media_modal_heading' => array('tab' => 'general', 'name' => 'Media Manager Enhancements', 'type' => 'header'), self::MLA_MEDIA_MODAL_TOOLBAR => array('tab' => 'general', 'name' => 'Enable Media Manager Enhancements', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check/uncheck this option to enable/disable Media Manager Enhancements.'), self::MLA_MEDIA_MODAL_MIMETYPES => array('tab' => 'general', 'name' => 'Media Manager Enhanced MIME Type filter', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to filter by more MIME Types, e.g., text, applications.'), self::MLA_MEDIA_MODAL_MONTHS => array('tab' => 'general', 'name' => 'Media Manager Month and Year filter', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to filter by month and year uploaded.'), self::MLA_MEDIA_MODAL_TERMS => array('tab' => 'general', 'name' => 'Media Manager Category/Tag filter', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to filter by taxonomy terms.'), self::MLA_MEDIA_MODAL_SEARCHBOX => array('tab' => 'general', 'name' => 'Media Manager Enhanced Search Media box', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to enable search box enhancements.'), 'template_heading' => array('tab' => 'mla_gallery', 'name' => 'Default [mla_gallery] Templates', 'type' => 'header'), 'default_style' => array('tab' => 'mla_gallery', 'name' => 'Style Template', 'type' => 'select', 'std' => 'default', 'options' => array(), 'texts' => array(), 'help' => 'Select the default style template for your [mla_gallery] shortcodes.'), 'default_markup' => array('tab' => 'mla_gallery', 'name' => 'Markup Template', 'type' => 'select', 'std' => 'default', 'options' => array(), 'texts' => array(), 'help' => 'Select the default markup template for your [mla_gallery] shortcodes.'), 'style_templates' => array('tab' => '', 'type' => 'hidden', 'std' => array()), 'markup_templates' => array('tab' => '', 'type' => 'hidden', 'std' => array()), 'enable_custom_field_mapping' => array('tab' => 'custom_field', 'name' => 'Enable custom field mapping when adding new media', 'type' => 'checkbox', 'std' => '', 'help' => 'Check this option to enable mapping when uploading new media (attachments).<br>&nbsp;&nbsp;Click Save Changes at the bottom of the screen if you change this option.<br>&nbsp;&nbsp;Does NOT affect the operation of the "Map" buttons on the bulk edit, single edit and settings screens.'), 'custom_field_mapping' => array('tab' => '', 'help' => '&nbsp;<br>Update the custom field mapping values above, then click Save Changes to make the updates permanent.<br>You can also make temporary updates and click a Map All Attachments button to apply the rule(s) to all attachments without saving any rule changes.', 'std' => array(), 'type' => 'custom', 'render' => 'mla_custom_field_option_handler', 'update' => 'mla_custom_field_option_handler', 'delete' => 'mla_custom_field_option_handler', 'reset' => 'mla_custom_field_option_handler'), 'enable_iptc_exif_mapping' => array('tab' => 'iptc_exif', 'name' => 'Enable IPTC/EXIF Mapping when adding new media', 'type' => 'checkbox', 'std' => '', 'help' => 'Check this option to enable mapping when uploading new media (attachments).<br>&nbsp;&nbsp;Does NOT affect the operation of the "Map" buttons on the bulk edit, single edit and settings screens.'), 'iptc_exif_standard_mapping' => array('tab' => '', 'help' => 'Update the standard field mapping values above, then click <strong>Save Changes</strong> to make the updates permanent.<br>You can also make temporary updates and click <strong>Map All Attachments, Standard Fields Now</strong> to apply the updates to all attachments without saving the rule changes.', 'std' => NULL, 'type' => 'custom', 'render' => 'mla_iptc_exif_option_handler', 'update' => 'mla_iptc_exif_option_handler', 'delete' => 'mla_iptc_exif_option_handler', 'reset' => 'mla_iptc_exif_option_handler'), 'iptc_exif_taxonomy_mapping' => array('tab' => '', 'help' => 'Update the taxonomy term mapping values above, then click <strong>Save Changes</strong> or <strong>Map All Attachments, Taxonomy Terms Now</strong>.', 'std' => NULL, 'type' => 'custom', 'render' => 'mla_iptc_exif_option_handler', 'update' => 'mla_iptc_exif_option_handler', 'delete' => 'mla_iptc_exif_option_handler', 'reset' => 'mla_iptc_exif_option_handler'), 'iptc_exif_custom_mapping' => array('tab' => '', 'help' => '<strong>Update</strong> individual custom field mapping values above, or make several updates and click <strong>Save Changes</strong> below to apply them all at once.<br>You can also <strong>add a new rule</strong> for an existing field or <strong>add a new field</strong> and rule.<br>You can make temporary updates and click <strong>Map All Attachments, Custom Fields Now</strong> to apply the updates to all attachments without saving the rule changes.', 'std' => NULL, 'type' => 'custom', 'render' => 'mla_iptc_exif_option_handler', 'update' => 'mla_iptc_exif_option_handler', 'delete' => 'mla_iptc_exif_option_handler', 'reset' => 'mla_iptc_exif_option_handler'), 'iptc_exif_mapping' => array('tab' => '', 'help' => 'IPTC/EXIF Mapping help', 'std' => array('standard' => array('post_title' => array('name' => 'Title', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true), 'post_name' => array('name' => 'Name/Slug', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true), 'image_alt' => array('name' => 'Alternate Text', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true), 'post_excerpt' => array('name' => 'Caption', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true), 'post_content' => array('name' => 'Description', 'iptc_value' => 'none', 'exif_value' => '', 'iptc_first' => true, 'keep_existing' => true)), 'taxonomy' => array(), 'custom' => array()), 'type' => 'custom', 'render' => 'mla_iptc_exif_option_handler', 'update' => 'mla_iptc_exif_option_handler', 'delete' => 'mla_iptc_exif_option_handler', 'reset' => 'mla_iptc_exif_option_handler'), self::MLA_ENABLE_POST_MIME_TYPES => array('tab' => 'view', 'name' => 'Enable View and Post MIME Type Support', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check/uncheck this option to enable/disable Post MIME Type Support, then click <strong>Save Changes</strong> to record the new setting.'), self::MLA_POST_MIME_TYPES => array('tab' => '', 'type' => 'custom', 'render' => 'mla_post_mime_types_option_handler', 'update' => 'mla_post_mime_types_option_handler', 'delete' => 'mla_post_mime_types_option_handler', 'reset' => 'mla_post_mime_types_option_handler', 'help' => 'Post MIME Types help.', 'std' => array('all' => array('singular' => 'All', 'plural' => 'All', 'specification' => '', 'post_mime_type' => false, 'table_view' => true, 'menu_order' => 0, 'description' => 'Built-in view'), 'image' => array('singular' => 'Image', 'plural' => 'Images', 'specification' => '', 'post_mime_type' => true, 'table_view' => true, 'menu_order' => 0, 'description' => 'All image subtypes'), 'audio' => array('singular' => 'Audio', 'plural' => 'Audio', 'specification' => '', 'post_mime_type' => true, 'table_view' => true, 'menu_order' => 0, 'description' => 'All audio subtypes'), 'video' => array('singular' => 'Video', 'plural' => 'Video', 'specification' => '', 'post_mime_type' => true, 'table_view' => true, 'menu_order' => 0, 'description' => 'All video subtypes'), 'text' => array('singular' => 'Text', 'plural' => 'Text', 'specification' => '', 'post_mime_type' => true, 'table_view' => true, 'menu_order' => 0, 'description' => 'All text subtypes'), 'application' => array('singular' => 'Application', 'plural' => 'Applications', 'specification' => '', 'post_mime_type' => true, 'table_view' => true, 'menu_order' => 0, 'description' => 'All application subtypes'), 'unattached' => array('singular' => 'Unattached', 'plural' => 'Unattached', 'specification' => '', 'post_mime_type' => false, 'table_view' => true, 'menu_order' => 0, 'description' => 'Built-in view'), 'trash' => array('singular' => 'Trash', 'plural' => 'Trash', 'specification' => '', 'post_mime_type' => false, 'table_view' => true, 'menu_order' => 0, 'description' => 'Built-in view'))), self::MLA_ENABLE_UPLOAD_MIMES => array('tab' => 'upload', 'name' => 'Enable Upload MIME Type Support', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check/uncheck this option to enable/disable Upload MIME Type Support, then click <strong>Save Changes</strong> to record the new setting.'), self::MLA_UPLOAD_MIMES => array('tab' => '', 'type' => 'custom', 'render' => 'mla_upload_mimes_option_handler', 'update' => 'mla_upload_mimes_option_handler', 'delete' => 'mla_upload_mimes_option_handler', 'reset' => 'mla_upload_mimes_option_handler', 'help' => 'Upload MIME Types help.', 'std' => false), self::MLA_ENABLE_MLA_ICONS => array('tab' => 'upload', 'name' => 'Enable MLA File Type Icons Support', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check/uncheck this option to enable/disable MLA File Type Icons Support, then click <strong>Save Changes</strong> to record the new setting.'))]]></default>
4487
+ <docblock line="148">
4488
+ <description><![CDATA[$mla_option_definitions defines the database options and admin page areas for setting/updating them.]]></description>
4489
+ <long-description><![CDATA[<p>Each option is defined by an array with the following elements:</p>
4490
+
4491
+ <p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
4492
+
4493
+ <p>tab => Settings page tab id for the option
4494
+ name => admin page label or heading text
4495
+ type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
4496
+ std => default value
4497
+ help => help text
4498
+ size => text size, default 40
4499
+ cols => textbox columns, default 90
4500
+ rows => textbox rows, default 5
4501
+ options => array of radio or select option values
4502
+ texts => array of radio or select option display texts
4503
+ render => rendering function for 'custom' options. Usage:
4504
+ $options_list .= ['render']( 'render', $key, $value );
4505
+ update => update function for 'custom' options; returns nothing. Usage:
4506
+ $message = ['update']( 'update', $key, $value, $_REQUEST );
4507
+ delete => delete function for 'custom' options; returns nothing. Usage:
4508
+ $message = ['delete']( 'delete', $key, $value, $_REQUEST );
4509
+ reset => reset function for 'custom' options; returns nothing. Usage:
4510
+ $message = ['reset']( 'reset', $key, $value, $_REQUEST );</p>]]></long-description>
4511
+ </docblock>
4512
+ </property>
4513
+ <property final="false" static="true" visibility="private" line="660" namespace="global" package="Media Library Assistant">
4514
+ <name>$mla_option_templates</name>
4515
+ <default><![CDATA[null]]></default>
4516
+ <docblock line="653">
4517
+ <description><![CDATA[Style and Markup templates]]></description>
4518
+ <long-description><![CDATA[]]></long-description>
4519
+ <tag line="653" name="since" description="0.80"/>
4520
+ <tag line="653" name="var" description="" type="array">
4521
+ <type by_reference="false">array</type>
4522
+ </tag>
4523
+ </docblock>
4524
+ </property>
4525
+ <property final="false" static="true" visibility="private" line="1785" namespace="global" package="Media Library Assistant">
4526
+ <name>$custom_field_data_sources</name>
4527
+ <default><![CDATA[array('path', 'file_name', 'extension', 'file_size', 'upload_date', 'dimensions', 'pixels', 'width', 'height', 'hwstring_small', 'size_keys', 'size_names', 'size_bytes', 'size_pixels', 'size_dimensions', 'size_name[size]', 'size_bytes[size]', 'size_pixels[size]', 'size_dimensions[size]', 'parent', 'parent_date', 'parent_type', 'parent_title', 'parent_issues', 'reference_issues', 'featured_in', 'featured_in_title', 'inserted_in', 'inserted_in_title', 'gallery_in', 'gallery_in_title', 'mla_gallery_in', 'mla_gallery_in_title', 'aperture', 'credit', 'camera', 'caption', 'created_timestamp', 'copyright', 'focal_length', 'iso', 'shutter_speed', 'title')]]></default>
4528
+ <docblock line="1778">
4529
+ <description><![CDATA[Array of Data Source names for custom field mapping]]></description>
4530
+ <long-description><![CDATA[]]></long-description>
4531
+ <tag line="1778" name="since" description="1.10"/>
4532
+ <tag line="1778" name="var" description="" type="array">
4533
+ <type by_reference="false">array</type>
4534
+ </tag>
4535
+ </docblock>
4536
+ </property>
4537
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="634" package="Media Library Assistant">
4538
+ <name>initialize</name>
4539
+ <full_name>initialize</full_name>
4540
+ <docblock line="627">
4541
+ <description><![CDATA[Initialization function, similar to __construct()]]></description>
4542
+ <long-description><![CDATA[]]></long-description>
4543
+ <tag line="627" name="since" description="1.00"/>
4544
+ <tag line="627" name="return" description="" type="void">
4545
+ <type by_reference="false">void</type>
4546
+ </tag>
4547
+ </docblock>
4548
+ </method>
4549
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="669" package="Media Library Assistant">
4550
+ <name>_load_option_templates</name>
4551
+ <full_name>_load_option_templates</full_name>
4552
+ <docblock line="662">
4553
+ <description><![CDATA[Load style and markup templates to $mla_templates]]></description>
4554
+ <long-description><![CDATA[]]></long-description>
4555
+ <tag line="662" name="since" description="0.80"/>
4556
+ <tag line="662" name="return" description="" type="void">
4557
+ <type by_reference="false">void</type>
4558
+ </tag>
4559
+ </docblock>
4560
+ </method>
4561
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="717" package="Media Library Assistant">
4562
+ <name>mla_fetch_gallery_template</name>
4563
+ <full_name>mla_fetch_gallery_template</full_name>
4564
+ <docblock line="707">
4565
+ <description><![CDATA[Fetch style or markup template from $mla_templates]]></description>
4566
+ <long-description><![CDATA[]]></long-description>
4567
+ <tag line="707" name="since" description="0.80"/>
4568
+ <tag line="707" name="param" description="Template name" type="string" variable="$key">
4569
+ <type by_reference="false">string</type>
4570
+ </tag>
4571
+ <tag line="707" name="param" description="Template type; 'style' (default) or 'markup'" type="string" variable="$type">
4572
+ <type by_reference="false">string</type>
4573
+ </tag>
4574
+ <tag line="707" name="return" description="requested template, false if not found or null if no templates" type="string|boolean|null">
4575
+ <type by_reference="false">string</type>
4576
+ <type by_reference="false">boolean</type>
4577
+ <type by_reference="false">null</type>
4578
+ </tag>
4579
+ </docblock>
4580
+ <argument line="717">
4581
+ <name>$key</name>
4582
+ <default><![CDATA[]]></default>
4583
+ <type/>
4584
+ </argument>
4585
+ <argument line="717">
4586
+ <name>$type</name>
4587
+ <default><![CDATA['style']]></default>
4588
+ <type/>
4589
+ </argument>
4590
+ </method>
4591
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="740" package="Media Library Assistant">
4592
+ <name>mla_get_style_templates</name>
4593
+ <full_name>mla_get_style_templates</full_name>
4594
+ <docblock line="733">
4595
+ <description><![CDATA[Get ALL style templates from $mla_templates, including 'default']]></description>
4596
+ <long-description><![CDATA[]]></long-description>
4597
+ <tag line="733" name="since" description="0.80"/>
4598
+ <tag line="733" name="return" description="name =&gt; value for all style templates or null if no templates" type="array|null">
4599
+ <type by_reference="false">array</type>
4600
+ <type by_reference="false">null</type>
4601
+ </tag>
4602
+ </docblock>
4603
+ </method>
4604
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="766" package="Media Library Assistant">
4605
+ <name>mla_put_style_templates</name>
4606
+ <full_name>mla_put_style_templates</full_name>
4607
+ <docblock line="758">
4608
+ <description><![CDATA[Put user-defined style templates to $mla_templates and database]]></description>
4609
+ <long-description><![CDATA[]]></long-description>
4610
+ <tag line="758" name="since" description="0.80"/>
4611
+ <tag line="758" name="param" description="name =&gt; value for all user-defined style templates" type="array" variable="$templates">
4612
+ <type by_reference="false">array</type>
4613
+ </tag>
4614
+ <tag line="758" name="return" description="true if success, false if failure" type="boolean">
4615
+ <type by_reference="false">boolean</type>
4616
+ </tag>
4617
+ </docblock>
4618
+ <argument line="766">
4619
+ <name>$templates</name>
4620
+ <default><![CDATA[]]></default>
4621
+ <type/>
4622
+ </argument>
4623
+ </method>
4624
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="782" package="Media Library Assistant">
4625
+ <name>mla_get_markup_templates</name>
4626
+ <full_name>mla_get_markup_templates</full_name>
4627
+ <docblock line="775">
4628
+ <description><![CDATA[Get ALL markup templates from $mla_templates, including 'default']]></description>
4629
+ <long-description><![CDATA[]]></long-description>
4630
+ <tag line="775" name="since" description="0.80"/>
4631
+ <tag line="775" name="return" description="name =&gt; value for all markup templates or null if no templates" type="array|null">
4632
+ <type by_reference="false">array</type>
4633
+ <type by_reference="false">null</type>
4634
+ </tag>
4635
+ </docblock>
4636
+ </method>
4637
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="837" package="Media Library Assistant">
4638
+ <name>mla_put_markup_templates</name>
4639
+ <full_name>mla_put_markup_templates</full_name>
4640
+ <docblock line="829">
4641
+ <description><![CDATA[Put user-defined markup templates to $mla_templates and database]]></description>
4642
+ <long-description><![CDATA[]]></long-description>
4643
+ <tag line="829" name="since" description="0.80"/>
4644
+ <tag line="829" name="param" description="name =&gt; value for all user-defined markup templates" type="array" variable="$templates">
4645
+ <type by_reference="false">array</type>
4646
+ </tag>
4647
+ <tag line="829" name="return" description="true if success, false if failure" type="boolean">
4648
+ <type by_reference="false">boolean</type>
4649
+ </tag>
4650
+ </docblock>
4651
+ <argument line="837">
4652
+ <name>$templates</name>
4653
+ <default><![CDATA[]]></default>
4654
+ <type/>
4655
+ </argument>
4656
+ </method>
4657
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="857" package="Media Library Assistant">
4658
+ <name>mla_get_option</name>
4659
+ <full_name>mla_get_option</full_name>
4660
+ <docblock line="846">
4661
+ <description><![CDATA[Return the stored value or default value of a defined MLA option]]></description>
4662
+ <long-description><![CDATA[]]></long-description>
4663
+ <tag line="846" name="since" description="0.1"/>
4664
+ <tag line="846" name="param" description="Name of the desired option" type="string" variable="$option">
4665
+ <type by_reference="false">string</type>
4666
+ </tag>
4667
+ <tag line="846" name="param" description="True to ignore current setting and return default values" type="boolean" variable="$get_default">
4668
+ <type by_reference="false">boolean</type>
4669
+ </tag>
4670
+ <tag line="846" name="param" description="True to ignore default values and return only stored values" type="boolean" variable="$get_stored">
4671
+ <type by_reference="false">boolean</type>
4672
+ </tag>
4673
+ <tag line="846" name="return" description="Value(s) for the option or false if the option is not a defined MLA option" type="mixed">
4674
+ <type by_reference="false">mixed</type>
4675
+ </tag>
4676
+ </docblock>
4677
+ <argument line="857">
4678
+ <name>$option</name>
4679
+ <default><![CDATA[]]></default>
4680
+ <type/>
4681
+ </argument>
4682
+ <argument line="857">
4683
+ <name>$get_default</name>
4684
+ <default><![CDATA[false]]></default>
4685
+ <type/>
4686
+ </argument>
4687
+ <argument line="857">
4688
+ <name>$get_stored</name>
4689
+ <default><![CDATA[false]]></default>
4690
+ <type/>
4691
+ </argument>
4692
+ </method>
4693
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="884" package="Media Library Assistant">
4694
+ <name>mla_update_option</name>
4695
+ <full_name>mla_update_option</full_name>
4696
+ <docblock line="874">
4697
+ <description><![CDATA[Add or update the stored value of a defined MLA option]]></description>
4698
+ <long-description><![CDATA[]]></long-description>
4699
+ <tag line="874" name="since" description="0.1"/>
4700
+ <tag line="874" name="param" description="Name of the desired option" type="string" variable="$option">
4701
+ <type by_reference="false">string</type>
4702
+ </tag>
4703
+ <tag line="874" name="param" description="New value for the desired option" type="mixed" variable="$newvalue">
4704
+ <type by_reference="false">mixed</type>
4705
+ </tag>
4706
+ <tag line="874" name="return" description="True if the value was changed or false if the update failed" type="boolean">
4707
+ <type by_reference="false">boolean</type>
4708
+ </tag>
4709
+ </docblock>
4710
+ <argument line="884">
4711
+ <name>$option</name>
4712
+ <default><![CDATA[]]></default>
4713
+ <type/>
4714
+ </argument>
4715
+ <argument line="884">
4716
+ <name>$newvalue</name>
4717
+ <default><![CDATA[]]></default>
4718
+ <type/>
4719
+ </argument>
4720
+ </method>
4721
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="900" package="Media Library Assistant">
4722
+ <name>mla_delete_option</name>
4723
+ <full_name>mla_delete_option</full_name>
4724
+ <docblock line="891">
4725
+ <description><![CDATA[Delete the stored value of a defined MLA option]]></description>
4726
+ <long-description><![CDATA[]]></long-description>
4727
+ <tag line="891" name="since" description="0.1"/>
4728
+ <tag line="891" name="param" description="Name of the desired option" type="string" variable="$option">
4729
+ <type by_reference="false">string</type>
4730
+ </tag>
4731
+ <tag line="891" name="return" description="True if the option was deleted, otherwise false" type="boolean">
4732
+ <type by_reference="false">boolean</type>
4733
+ </tag>
4734
+ </docblock>
4735
+ <argument line="900">
4736
+ <name>$option</name>
4737
+ <default><![CDATA[]]></default>
4738
+ <type/>
4739
+ </argument>
4740
+ </method>
4741
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="921" package="Media Library Assistant">
4742
+ <name>mla_taxonomy_support</name>
4743
+ <full_name>mla_taxonomy_support</full_name>
4744
+ <docblock line="908">
4745
+ <description><![CDATA[Determine MLA support for a taxonomy, handling the special case where the
4746
+ settings are being updated or reset.]]></description>
4747
+ <long-description><![CDATA[]]></long-description>
4748
+ <tag line="908" name="since" description="0.30"/>
4749
+ <tag line="908" name="param" description="Taxonomy name, e.g., attachment_category" type="string" variable="$tax_name">
4750
+ <type by_reference="false">string</type>
4751
+ </tag>
4752
+ <tag line="908" name="param" description="Optional. 'support' (default), 'quick-edit' or 'filter'" type="string" variable="$support_type">
4753
+ <type by_reference="false">string</type>
4754
+ </tag>
4755
+ <tag line="908" name="return" description="true if the taxonomy is supported in this way else false string if $tax_name is '' and $support_type is 'filter', returns the taxonomy to filter by" type="boolean|string">
4756
+ <type by_reference="false">boolean</type>
4757
+ <type by_reference="false">string</type>
4758
+ </tag>
4759
+ </docblock>
4760
+ <argument line="921">
4761
+ <name>$tax_name</name>
4762
+ <default><![CDATA[]]></default>
4763
+ <type/>
4764
+ </argument>
4765
+ <argument line="921">
4766
+ <name>$support_type</name>
4767
+ <default><![CDATA['support']]></default>
4768
+ <type/>
4769
+ </argument>
4770
+ </method>
4771
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="997" package="Media Library Assistant">
4772
+ <name>mla_taxonomy_option_handler</name>
4773
+ <full_name>mla_taxonomy_option_handler</full_name>
4774
+ <docblock line="984">
4775
+ <description><![CDATA[Render and manage taxonomy support options, e.g., Categories and Post Tags]]></description>
4776
+ <long-description><![CDATA[]]></long-description>
4777
+ <tag line="984" name="since" description="0.30"/>
4778
+ <tag line="984" name="uses" description="\global\$mla_option_templates" refers="\global\$mla_option_templates"/>
4779
+ <tag line="984" name="param" description="'render', 'update', 'delete', or 'reset'" type="string" variable="$action">
4780
+ <type by_reference="false">string</type>
4781
+ </tag>
4782
+ <tag line="984" name="param" description="option name, e.g., 'taxonomy_support'" type="string" variable="$key">
4783
+ <type by_reference="false">string</type>
4784
+ </tag>
4785
+ <tag line="984" name="param" description="option parameters" type="array" variable="$value">
4786
+ <type by_reference="false">array</type>
4787
+ </tag>
4788
+ <tag line="984" name="param" description="Optional. null (default) for 'render' else option data, e.g., $_REQUEST" type="array" variable="$args">
4789
+ <type by_reference="false">array</type>
4790
+ </tag>
4791
+ <tag line="984" name="return" description="HTML table row markup for 'render' else message(s) reflecting the results of the operation." type="string">
4792
+ <type by_reference="false">string</type>
4793
+ </tag>
4794
+ </docblock>
4795
+ <argument line="997">
4796
+ <name>$action</name>
4797
+ <default><![CDATA[]]></default>
4798
+ <type/>
4799
+ </argument>
4800
+ <argument line="997">
4801
+ <name>$key</name>
4802
+ <default><![CDATA[]]></default>
4803
+ <type/>
4804
+ </argument>
4805
+ <argument line="997">
4806
+ <name>$value</name>
4807
+ <default><![CDATA[]]></default>
4808
+ <type/>
4809
+ </argument>
4810
+ <argument line="997">
4811
+ <name>$args</name>
4812
+ <default><![CDATA[null]]></default>
4813
+ <type/>
4814
+ </argument>
4815
+ </method>
4816
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1105" package="Media Library Assistant">
4817
+ <name>mla_add_attachment_action</name>
4818
+ <full_name>mla_add_attachment_action</full_name>
4819
+ <docblock line="1096">
4820
+ <description><![CDATA[Perform ITC/EXIF mapping on just-inserted attachment]]></description>
4821
+ <long-description><![CDATA[]]></long-description>
4822
+ <tag line="1096" name="since" description="1.00"/>
4823
+ <tag line="1096" name="param" description="ID of just-inserted attachment" type="integer" variable="$post_id">
4824
+ <type by_reference="false">integer</type>
4825
+ </tag>
4826
+ <tag line="1096" name="return" description="" type="void">
4827
+ <type by_reference="false">void</type>
4828
+ </tag>
4829
+ </docblock>
4830
+ <argument line="1105">
4831
+ <name>$post_id</name>
4832
+ <default><![CDATA[]]></default>
4833
+ <type/>
4834
+ </argument>
4835
+ </method>
4836
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1125" package="Media Library Assistant">
4837
+ <name>mla_update_attachment_metadata_filter</name>
4838
+ <full_name>mla_update_attachment_metadata_filter</full_name>
4839
+ <docblock line="1115">
4840
+ <description><![CDATA[Perform Custom Field mapping on just-inserted or updated attachment]]></description>
4841
+ <long-description><![CDATA[]]></long-description>
4842
+ <tag line="1115" name="since" description="1.10"/>
4843
+ <tag line="1115" name="param" description="Attachment metadata for just-inserted attachment" type="array" variable="$data">
4844
+ <type by_reference="false">array</type>
4845
+ </tag>
4846
+ <tag line="1115" name="param" description="ID of just-inserted attachment" type="integer" variable="$post_id">
4847
+ <type by_reference="false">integer</type>
4848
+ </tag>
4849
+ <tag line="1115" name="return" description="" type="void">
4850
+ <type by_reference="false">void</type>
4851
+ </tag>
4852
+ </docblock>
4853
+ <argument line="1125">
4854
+ <name>$data</name>
4855
+ <default><![CDATA[]]></default>
4856
+ <type/>
4857
+ </argument>
4858
+ <argument line="1125">
4859
+ <name>$post_id</name>
4860
+ <default><![CDATA[]]></default>
4861
+ <type/>
4862
+ </argument>
4863
+ </method>
4864
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1145" package="Media Library Assistant">
4865
+ <name>mla_custom_field_option_value</name>
4866
+ <full_name>mla_custom_field_option_value</full_name>
4867
+ <docblock line="1136">
4868
+ <description><![CDATA[Fetch custom field option value given a slug]]></description>
4869
+ <long-description><![CDATA[]]></long-description>
4870
+ <tag line="1136" name="since" description="1.10"/>
4871
+ <tag line="1136" name="param" description="slug, e.g., 'c_file-size' for the 'File Size' field" type="string" variable="$slug">
4872
+ <type by_reference="false">string</type>
4873
+ </tag>
4874
+ <tag line="1136" name="return" description="option value, e.g., array( 'name' =&gt; 'File Size', ... )" type="array">
4875
+ <type by_reference="false">array</type>
4876
+ </tag>
4877
+ </docblock>
4878
+ <argument line="1145">
4879
+ <name>$slug</name>
4880
+ <default><![CDATA[]]></default>
4881
+ <type/>
4882
+ </argument>
4883
+ </method>
4884
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1165" package="Media Library Assistant">
4885
+ <name>mla_custom_field_support</name>
4886
+ <full_name>mla_custom_field_support</full_name>
4887
+ <docblock line="1156">
4888
+ <description><![CDATA[Evaluate file information for custom field mapping]]></description>
4889
+ <long-description><![CDATA[]]></long-description>
4890
+ <tag line="1156" name="since" description="1.10"/>
4891
+ <tag line="1156" name="param" description="array format; 'default_columns' (default), 'default_hidden_columns', 'default_sortable_columns', 'quick_edit' or 'bulk_edit'" type="string" variable="$support_type">
4892
+ <type by_reference="false">string</type>
4893
+ </tag>
4894
+ <tag line="1156" name="return" description="default, hidden, sortable quick_edit or bulk_edit colums in appropriate format" type="array">
4895
+ <type by_reference="false">array</type>
4896
+ </tag>
4897
+ </docblock>
4898
+ <argument line="1165">
4899
+ <name>$support_type</name>
4900
+ <default><![CDATA['default_columns']]></default>
4901
+ <type/>
4902
+ </argument>
4903
+ </method>
4904
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1211" package="Media Library Assistant">
4905
+ <name>_evaluate_file_information</name>
4906
+ <full_name>_evaluate_file_information</full_name>
4907
+ <docblock line="1199">
4908
+ <description><![CDATA[Evaluate file information for custom field mapping]]></description>
4909
+ <long-description><![CDATA[]]></long-description>
4910
+ <tag line="1199" name="since" description="1.10"/>
4911
+ <tag line="1199" name="param" description="absolute path the the uploads base directory" type="string" variable="$upload_dir">
4912
+ <type by_reference="false">string</type>
4913
+ </tag>
4914
+ <tag line="1199" name="param" description="_wp_attached_file meta_value array, indexed by post_id" type="array" variable="$wp_attached_files">
4915
+ <type by_reference="false">array</type>
4916
+ </tag>
4917
+ <tag line="1199" name="param" description="_wp_attachment_metadata meta_value array, indexed by post_id" type="array" variable="$wp_attachment_metadata">
4918
+ <type by_reference="false">array</type>
4919
+ </tag>
4920
+ <tag line="1199" name="param" description="post-&gt;ID of attachment" type="integer" variable="$post_id">
4921
+ <type by_reference="false">integer</type>
4922
+ </tag>
4923
+ <tag line="1199" name="return" description="absolute_path, base_file, path, file_name, extension, dimensions, width, height, hwstring_small, array of intermediate sizes" type="array">
4924
+ <type by_reference="false">array</type>
4925
+ </tag>
4926
+ </docblock>
4927
+ <argument line="1211">
4928
+ <name>$upload_dir</name>
4929
+ <default><![CDATA[]]></default>
4930
+ <type/>
4931
+ </argument>
4932
+ <argument line="1211">
4933
+ <name>$wp_attached_files</name>
4934
+ <default><![CDATA[]]></default>
4935
+ <type/>
4936
+ </argument>
4937
+ <argument line="1211">
4938
+ <name>$wp_attachment_metadata</name>
4939
+ <default><![CDATA[]]></default>
4940
+ <type/>
4941
+ </argument>
4942
+ <argument line="1211">
4943
+ <name>$post_id</name>
4944
+ <default><![CDATA[]]></default>
4945
+ <type/>
4946
+ </argument>
4947
+ </method>
4948
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1280" package="Media Library Assistant">
4949
+ <name>_evaluate_post_information</name>
4950
+ <full_name>_evaluate_post_information</full_name>
4951
+ <docblock line="1269">
4952
+ <description><![CDATA[Evaluate post information for custom field mapping]]></description>
4953
+ <long-description><![CDATA[]]></long-description>
4954
+ <tag line="1269" name="since" description="1.40"/>
4955
+ <tag line="1269" name="param" description="post-&gt;ID of attachment" type="integer" variable="$post_id">
4956
+ <type by_reference="false">integer</type>
4957
+ </tag>
4958
+ <tag line="1269" name="param" description="category/scope to evaluate against: custom_field_mapping or single_attachment_mapping" type="string" variable="$category">
4959
+ <type by_reference="false">string</type>
4960
+ </tag>
4961
+ <tag line="1269" name="param" description="data source name ( post_date or post_parent )" type="string" variable="$data_source">
4962
+ <type by_reference="false">string</type>
4963
+ </tag>
4964
+ <tag line="1269" name="return" description="'post_date' =&gt; (string) upload date, 'post_parent' =&gt; (integer) ID of parent or zero )" type="mixed">
4965
+ <type by_reference="false">mixed</type>
4966
+ </tag>
4967
+ </docblock>
4968
+ <argument line="1280">
4969
+ <name>$post_id</name>
4970
+ <default><![CDATA[]]></default>
4971
+ <type/>
4972
+ </argument>
4973
+ <argument line="1280">
4974
+ <name>$category</name>
4975
+ <default><![CDATA[]]></default>
4976
+ <type/>
4977
+ </argument>
4978
+ <argument line="1280">
4979
+ <name>$data_source</name>
4980
+ <default><![CDATA[]]></default>
4981
+ <type/>
4982
+ </argument>
4983
+ </method>
4984
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1314" package="Media Library Assistant">
4985
+ <name>_evaluate_array_result</name>
4986
+ <full_name>_evaluate_array_result</full_name>
4987
+ <docblock line="1303">
4988
+ <description><![CDATA[Evaluate post information for custom field mapping]]></description>
4989
+ <long-description><![CDATA[]]></long-description>
4990
+ <tag line="1303" name="since" description="1.40"/>
4991
+ <tag line="1303" name="param" description="field value(s)" type="array" variable="$value">
4992
+ <type by_reference="false">array</type>
4993
+ </tag>
4994
+ <tag line="1303" name="param" description="format option text|single|export|array|multi" type="string" variable="$option">
4995
+ <type by_reference="false">string</type>
4996
+ </tag>
4997
+ <tag line="1303" name="param" description="keep existing value(s) - for 'multi' option" type="boolean" variable="$keep_existing">
4998
+ <type by_reference="false">boolean</type>
4999
+ </tag>
5000
+ <tag line="1303" name="return" description="array for option = array|multi else string" type="mixed">
5001
+ <type by_reference="false">mixed</type>
5002
+ </tag>
5003
+ </docblock>
5004
+ <argument line="1314">
5005
+ <name>$value</name>
5006
+ <default><![CDATA[]]></default>
5007
+ <type/>
5008
+ </argument>
5009
+ <argument line="1314">
5010
+ <name>$option</name>
5011
+ <default><![CDATA[]]></default>
5012
+ <type/>
5013
+ </argument>
5014
+ <argument line="1314">
5015
+ <name>$keep_existing</name>
5016
+ <default><![CDATA[]]></default>
5017
+ <type/>
5018
+ </argument>
5019
+ </method>
5020
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1350" package="Media Library Assistant">
5021
+ <name>_evaluate_data_source</name>
5022
+ <full_name>_evaluate_data_source</full_name>
5023
+ <docblock line="1338">
5024
+ <description><![CDATA[Evaluate custom field mapping data source]]></description>
5025
+ <long-description><![CDATA[]]></long-description>
5026
+ <tag line="1338" name="since" description="1.10"/>
5027
+ <tag line="1338" name="param" description="post-&gt;ID of attachment" type="integer" variable="$post_id">
5028
+ <type by_reference="false">integer</type>
5029
+ </tag>
5030
+ <tag line="1338" name="param" description="category/scope to evaluate against: custom_field_mapping or single_attachment_mapping" type="string" variable="$category">
5031
+ <type by_reference="false">string</type>
5032
+ </tag>
5033
+ <tag line="1338" name="param" description="data source specification ( name, data_source, keep_existing, format, mla_column, quick_edit, bulk_edit, meta_name, no_null, option )" type="array" variable="$data_value">
5034
+ <type by_reference="false">array</type>
5035
+ </tag>
5036
+ <tag line="1338" name="param" description="(optional) attachment_metadata, default NULL (use current postmeta database value)" type="array" variable="$attachment_metadata">
5037
+ <type by_reference="false">array</type>
5038
+ </tag>
5039
+ <tag line="1338" name="return" description="data source value" type="string">
5040
+ <type by_reference="false">string</type>
5041
+ </tag>
5042
+ </docblock>
5043
+ <argument line="1350">
5044
+ <name>$post_id</name>
5045
+ <default><![CDATA[]]></default>
5046
+ <type/>
5047
+ </argument>
5048
+ <argument line="1350">
5049
+ <name>$category</name>
5050
+ <default><![CDATA[]]></default>
5051
+ <type/>
5052
+ </argument>
5053
+ <argument line="1350">
5054
+ <name>$data_value</name>
5055
+ <default><![CDATA[]]></default>
5056
+ <type/>
5057
+ </argument>
5058
+ <argument line="1350">
5059
+ <name>$attachment_metadata</name>
5060
+ <default><![CDATA[NULL]]></default>
5061
+ <type/>
5062
+ </argument>
5063
+ </method>
5064
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1683" package="Media Library Assistant">
5065
+ <name>mla_evaluate_custom_field_mapping</name>
5066
+ <full_name>mla_evaluate_custom_field_mapping</full_name>
5067
+ <docblock line="1671">
5068
+ <description><![CDATA[Evaluate custom field mapping updates for a post]]></description>
5069
+ <long-description><![CDATA[]]></long-description>
5070
+ <tag line="1671" name="since" description="1.10"/>
5071
+ <tag line="1671" name="param" description="post ID to be evaluated" type="integer" variable="$post_id">
5072
+ <type by_reference="false">integer</type>
5073
+ </tag>
5074
+ <tag line="1671" name="param" description="category/scope to evaluate against: custom_field_mapping or single_attachment_mapping" type="string" variable="$category">
5075
+ <type by_reference="false">string</type>
5076
+ </tag>
5077
+ <tag line="1671" name="param" description="(optional) custom_field_mapping values, default NULL (use current option value)" type="array" variable="$settings">
5078
+ <type by_reference="false">array</type>
5079
+ </tag>
5080
+ <tag line="1671" name="param" description="(optional) attachment_metadata, default NULL (use current postmeta database value)" type="array" variable="$attachment_metadata">
5081
+ <type by_reference="false">array</type>
5082
+ </tag>
5083
+ <tag line="1671" name="return" description="Updates suitable for MLAData::mla_update_single_item, if any" type="array">
5084
+ <type by_reference="false">array</type>
5085
+ </tag>
5086
+ </docblock>
5087
+ <argument line="1683">
5088
+ <name>$post_id</name>
5089
+ <default><![CDATA[]]></default>
5090
+ <type/>
5091
+ </argument>
5092
+ <argument line="1683">
5093
+ <name>$category</name>
5094
+ <default><![CDATA[]]></default>
5095
+ <type/>
5096
+ </argument>
5097
+ <argument line="1683">
5098
+ <name>$settings</name>
5099
+ <default><![CDATA[NULL]]></default>
5100
+ <type/>
5101
+ </argument>
5102
+ <argument line="1683">
5103
+ <name>$attachment_metadata</name>
5104
+ <default><![CDATA[NULL]]></default>
5105
+ <type/>
5106
+ </argument>
5107
+ </method>
5108
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1752" package="Media Library Assistant">
5109
+ <name>_compose_custom_field_option_list</name>
5110
+ <full_name>_compose_custom_field_option_list</full_name>
5111
+ <docblock line="1741">
5112
+ <description><![CDATA[Compose a Custom Field Options list with current selection]]></description>
5113
+ <long-description><![CDATA[]]></long-description>
5114
+ <tag line="1741" name="since" description="1.10"/>
5115
+ <tag line="1741" name="uses" description="\global\$mla_option_templates" refers="\global\$mla_option_templates"/>
5116
+ <tag line="1741" name="param" description="current selection or 'none' (default)" type="string" variable="$selection">
5117
+ <type by_reference="false">string</type>
5118
+ </tag>
5119
+ <tag line="1741" name="param" description="optional list of terms to exclude from the list" type="array" variable="$blacklist">
5120
+ <type by_reference="false">array</type>
5121
+ </tag>
5122
+ <tag line="1741" name="return" description="HTML markup with select field options" type="string">
5123
+ <type by_reference="false">string</type>
5124
+ </tag>
5125
+ </docblock>
5126
+ <argument line="1752">
5127
+ <name>$selection</name>
5128
+ <default><![CDATA['none']]></default>
5129
+ <type/>
5130
+ </argument>
5131
+ <argument line="1752">
5132
+ <name>$blacklist</name>
5133
+ <default><![CDATA[array()]]></default>
5134
+ <type/>
5135
+ </argument>
5136
+ </method>
5137
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1841" package="Media Library Assistant">
5138
+ <name>_compose_data_source_option_list</name>
5139
+ <full_name>_compose_data_source_option_list</full_name>
5140
+ <docblock line="1831">
5141
+ <description><![CDATA[Compose a (Custom Field) Data Source Options list with current selection]]></description>
5142
+ <long-description><![CDATA[]]></long-description>
5143
+ <tag line="1831" name="since" description="1.10"/>
5144
+ <tag line="1831" name="uses" description="\global\$mla_option_templates" refers="\global\$mla_option_templates"/>
5145
+ <tag line="1831" name="param" description="current selection or 'none' (default)" type="string" variable="$selection">
5146
+ <type by_reference="false">string</type>
5147
+ </tag>
5148
+ <tag line="1831" name="return" description="HTML markup with select field options" type="string">
5149
+ <type by_reference="false">string</type>
5150
+ </tag>
5151
+ </docblock>
5152
+ <argument line="1841">
5153
+ <name>$selection</name>
5154
+ <default><![CDATA['none']]></default>
5155
+ <type/>
5156
+ </argument>
5157
+ </method>
5158
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1899" package="Media Library Assistant">
5159
+ <name>_update_custom_field_mapping</name>
5160
+ <full_name>_update_custom_field_mapping</full_name>
5161
+ <docblock line="1889">
5162
+ <description><![CDATA[Update custom field mappings]]></description>
5163
+ <long-description><![CDATA[]]></long-description>
5164
+ <tag line="1889" name="since" description="1.10"/>
5165
+ <tag line="1889" name="param" description="current custom_field_mapping values" type="array" variable="$current_values">
5166
+ <type by_reference="false">array</type>
5167
+ </tag>
5168
+ <tag line="1889" name="param" description="new values" type="array" variable="$new_values">
5169
+ <type by_reference="false">array</type>
5170
+ </tag>
5171
+ <tag line="1889" name="return" description="( 'message' =&gt; HTML message(s) reflecting results, 'values' =&gt; updated iptc_exif_mapping values, 'changed' =&gt; true if any changes detected else false )" type="array">
5172
+ <type by_reference="false">array</type>
5173
+ </tag>
5174
+ </docblock>
5175
+ <argument line="1899">
5176
+ <name>$current_values</name>
5177
+ <default><![CDATA[]]></default>
5178
+ <type/>
5179
+ </argument>
5180
+ <argument line="1899">
5181
+ <name>$new_values</name>
5182
+ <default><![CDATA[]]></default>
5183
+ <type/>
5184
+ </argument>
5185
+ </method>
5186
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2090" package="Media Library Assistant">
5187
+ <name>mla_custom_field_option_handler</name>
5188
+ <full_name>mla_custom_field_option_handler</full_name>
5189
+ <docblock line="2077">
5190
+ <description><![CDATA[Render and manage custom field mapping options]]></description>
5191
+ <long-description><![CDATA[]]></long-description>
5192
+ <tag line="2077" name="since" description="1.10"/>
5193
+ <tag line="2077" name="uses" description="\global\$mla_option_templates" refers="\global\$mla_option_templates"/>
5194
+ <tag line="2077" name="param" description="'render', 'update', 'delete', or 'reset'" type="string" variable="$action">
5195
+ <type by_reference="false">string</type>
5196
+ </tag>
5197
+ <tag line="2077" name="param" description="option name, e.g., 'custom_field_mapping'" type="string" variable="$key">
5198
+ <type by_reference="false">string</type>
5199
+ </tag>
5200
+ <tag line="2077" name="param" description="option parameters" type="array" variable="$value">
5201
+ <type by_reference="false">array</type>
5202
+ </tag>
5203
+ <tag line="2077" name="param" description="Optional. null (default) for 'render' else option data, e.g., $_REQUEST" type="array" variable="$args">
5204
+ <type by_reference="false">array</type>
5205
+ </tag>
5206
+ <tag line="2077" name="return" description="HTML table row markup for 'render' else message(s) reflecting the results of the operation." type="string">
5207
+ <type by_reference="false">string</type>
5208
+ </tag>
5209
+ </docblock>
5210
+ <argument line="2090">
5211
+ <name>$action</name>
5212
+ <default><![CDATA[]]></default>
5213
+ <type/>
5214
+ </argument>
5215
+ <argument line="2090">
5216
+ <name>$key</name>
5217
+ <default><![CDATA[]]></default>
5218
+ <type/>
5219
+ </argument>
5220
+ <argument line="2090">
5221
+ <name>$value</name>
5222
+ <default><![CDATA[]]></default>
5223
+ <type/>
5224
+ </argument>
5225
+ <argument line="2090">
5226
+ <name>$args</name>
5227
+ <default><![CDATA[null]]></default>
5228
+ <type/>
5229
+ </argument>
5230
+ </method>
5231
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2282" package="Media Library Assistant">
5232
+ <name>mla_evaluate_iptc_exif_mapping</name>
5233
+ <full_name>mla_evaluate_iptc_exif_mapping</full_name>
5234
+ <docblock line="2271">
5235
+ <description><![CDATA[Evaluate IPTC/EXIF mapping updates for a post]]></description>
5236
+ <long-description><![CDATA[]]></long-description>
5237
+ <tag line="2271" name="since" description="1.00"/>
5238
+ <tag line="2271" name="param" description="post object with current values" type="object" variable="$post">
5239
+ <type by_reference="false">object</type>
5240
+ </tag>
5241
+ <tag line="2271" name="param" description="category to evaluate against, e.g., iptc_exif_standard_mapping or iptc_exif_mapping" type="string" variable="$category">
5242
+ <type by_reference="false">string</type>
5243
+ </tag>
5244
+ <tag line="2271" name="param" description="(optional) iptc_exif_mapping values, default - current option value" type="array" variable="$settings">
5245
+ <type by_reference="false">array</type>
5246
+ </tag>
5247
+ <tag line="2271" name="return" description="Updates suitable for MLAData::mla_update_single_item, if any" type="array">
5248
+ <type by_reference="false">array</type>
5249
+ </tag>
5250
+ </docblock>
5251
+ <argument line="2282">
5252
+ <name>$post</name>
5253
+ <default><![CDATA[]]></default>
5254
+ <type/>
5255
+ </argument>
5256
+ <argument line="2282">
5257
+ <name>$category</name>
5258
+ <default><![CDATA[]]></default>
5259
+ <type/>
5260
+ </argument>
5261
+ <argument line="2282">
5262
+ <name>$settings</name>
5263
+ <default><![CDATA[NULL]]></default>
5264
+ <type/>
5265
+ </argument>
5266
+ </method>
5267
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2444" package="Media Library Assistant">
5268
+ <name>_compose_iptc_option_list</name>
5269
+ <full_name>_compose_iptc_option_list</full_name>
5270
+ <docblock line="2434">
5271
+ <description><![CDATA[Compose an IPTC Options list with current selection]]></description>
5272
+ <long-description><![CDATA[]]></long-description>
5273
+ <tag line="2434" name="since" description="1.00"/>
5274
+ <tag line="2434" name="uses" description="\global\$mla_option_templates" refers="\global\$mla_option_templates"/>
5275
+ <tag line="2434" name="param" description="current selection or 'none' (default)" type="string" variable="$selection">
5276
+ <type by_reference="false">string</type>
5277
+ </tag>
5278
+ <tag line="2434" name="return" description="HTML markup with select field options" type="string">
5279
+ <type by_reference="false">string</type>
5280
+ </tag>
5281
+ </docblock>
5282
+ <argument line="2444">
5283
+ <name>$selection</name>
5284
+ <default><![CDATA['none']]></default>
5285
+ <type/>
5286
+ </argument>
5287
+ </method>
5288
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2477" package="Media Library Assistant">
5289
+ <name>_compose_parent_option_list</name>
5290
+ <full_name>_compose_parent_option_list</full_name>
5291
+ <docblock line="2466">
5292
+ <description><![CDATA[Compose an hierarchical taxonomy Parent options list with current selection]]></description>
5293
+ <long-description><![CDATA[]]></long-description>
5294
+ <tag line="2466" name="since" description="1.00"/>
5295
+ <tag line="2466" name="uses" description="\global\$mla_option_templates" refers="\global\$mla_option_templates"/>
5296
+ <tag line="2466" name="param" description="taxonomy slug" type="string" variable="$taxonomy">
5297
+ <type by_reference="false">string</type>
5298
+ </tag>
5299
+ <tag line="2466" name="param" description="current selection or 0 (zero, default)" type="integer" variable="$selection">
5300
+ <type by_reference="false">integer</type>
5301
+ </tag>
5302
+ <tag line="2466" name="return" description="HTML markup with select field options" type="string">
5303
+ <type by_reference="false">string</type>
5304
+ </tag>
5305
+ </docblock>
5306
+ <argument line="2477">
5307
+ <name>$taxonomy</name>
5308
+ <default><![CDATA[]]></default>
5309
+ <type/>
5310
+ </argument>
5311
+ <argument line="2477">
5312
+ <name>$selection</name>
5313
+ <default><![CDATA[0]]></default>
5314
+ <type/>
5315
+ </argument>
5316
+ </method>
5317
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2511" package="Media Library Assistant">
5318
+ <name>_update_iptc_exif_standard_mapping</name>
5319
+ <full_name>_update_iptc_exif_standard_mapping</full_name>
5320
+ <docblock line="2501">
5321
+ <description><![CDATA[Update Standard field portion of IPTC/EXIF mappings]]></description>
5322
+ <long-description><![CDATA[]]></long-description>
5323
+ <tag line="2501" name="since" description="1.00"/>
5324
+ <tag line="2501" name="param" description="current iptc_exif_mapping values" type="array" variable="$current_values">
5325
+ <type by_reference="false">array</type>
5326
+ </tag>
5327
+ <tag line="2501" name="param" description="new values" type="array" variable="$new_values">
5328
+ <type by_reference="false">array</type>
5329
+ </tag>
5330
+ <tag line="2501" name="return" description="( 'message' =&gt; HTML message(s) reflecting results, 'values' =&gt; updated iptc_exif_mapping values, 'changed' =&gt; true if any changes detected else false )" type="array">
5331
+ <type by_reference="false">array</type>
5332
+ </tag>
5333
+ </docblock>
5334
+ <argument line="2511">
5335
+ <name>$current_values</name>
5336
+ <default><![CDATA[]]></default>
5337
+ <type/>
5338
+ </argument>
5339
+ <argument line="2511">
5340
+ <name>$new_values</name>
5341
+ <default><![CDATA[]]></default>
5342
+ <type/>
5343
+ </argument>
5344
+ </method>
5345
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2590" package="Media Library Assistant">
5346
+ <name>_update_iptc_exif_taxonomy_mapping</name>
5347
+ <full_name>_update_iptc_exif_taxonomy_mapping</full_name>
5348
+ <docblock line="2580">
5349
+ <description><![CDATA[Update Taxonomy term portion of IPTC/EXIF mappings]]></description>
5350
+ <long-description><![CDATA[]]></long-description>
5351
+ <tag line="2580" name="since" description="1.00"/>
5352
+ <tag line="2580" name="param" description="current iptc_exif_mapping values" type="array" variable="$current_values">
5353
+ <type by_reference="false">array</type>
5354
+ </tag>
5355
+ <tag line="2580" name="param" description="new values" type="array" variable="$new_values">
5356
+ <type by_reference="false">array</type>
5357
+ </tag>
5358
+ <tag line="2580" name="return" description="( 'message' =&gt; HTML message(s) reflecting results, 'values' =&gt; updated iptc_exif_mapping values, 'changed' =&gt; true if any changes detected else false )" type="array">
5359
+ <type by_reference="false">array</type>
5360
+ </tag>
5361
+ </docblock>
5362
+ <argument line="2590">
5363
+ <name>$current_values</name>
5364
+ <default><![CDATA[]]></default>
5365
+ <type/>
5366
+ </argument>
5367
+ <argument line="2590">
5368
+ <name>$new_values</name>
5369
+ <default><![CDATA[]]></default>
5370
+ <type/>
5371
+ </argument>
5372
+ </method>
5373
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2682" package="Media Library Assistant">
5374
+ <name>_update_iptc_exif_custom_mapping</name>
5375
+ <full_name>_update_iptc_exif_custom_mapping</full_name>
5376
+ <docblock line="2672">
5377
+ <description><![CDATA[Update Custom field portion of IPTC/EXIF mappings]]></description>
5378
+ <long-description><![CDATA[]]></long-description>
5379
+ <tag line="2672" name="since" description="1.00"/>
5380
+ <tag line="2672" name="param" description="current iptc_exif_mapping values" type="array" variable="$current_values">
5381
+ <type by_reference="false">array</type>
5382
+ </tag>
5383
+ <tag line="2672" name="param" description="new values" type="array" variable="$new_values">
5384
+ <type by_reference="false">array</type>
5385
+ </tag>
5386
+ <tag line="2672" name="return" description="( 'message' =&gt; HTML message(s) reflecting results, 'values' =&gt; updated iptc_exif_mapping values, 'changed' =&gt; true if any changes detected else false )" type="array">
5387
+ <type by_reference="false">array</type>
5388
+ </tag>
5389
+ </docblock>
5390
+ <argument line="2682">
5391
+ <name>$current_values</name>
5392
+ <default><![CDATA[]]></default>
5393
+ <type/>
5394
+ </argument>
5395
+ <argument line="2682">
5396
+ <name>$new_values</name>
5397
+ <default><![CDATA[]]></default>
5398
+ <type/>
5399
+ </argument>
5400
+ </method>
5401
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2803" package="Media Library Assistant">
5402
+ <name>_get_custom_field_names</name>
5403
+ <full_name>_get_custom_field_names</full_name>
5404
+ <docblock line="2796">
5405
+ <description><![CDATA[Generate a list of all (post) Custom Field names]]></description>
5406
+ <long-description><![CDATA[]]></long-description>
5407
+ <tag line="2796" name="since" description="1.00"/>
5408
+ <tag line="2796" name="return" description="Custom field names from the postmeta table" type="array">
5409
+ <type by_reference="false">array</type>
5410
+ </tag>
5411
+ </docblock>
5412
+ </method>
5413
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2832" package="Media Library Assistant">
5414
+ <name>mla_iptc_exif_option_handler</name>
5415
+ <full_name>mla_iptc_exif_option_handler</full_name>
5416
+ <docblock line="2819">
5417
+ <description><![CDATA[Render and manage iptc/exif support options]]></description>
5418
+ <long-description><![CDATA[]]></long-description>
5419
+ <tag line="2819" name="since" description="1.00"/>
5420
+ <tag line="2819" name="uses" description="\global\$mla_option_templates" refers="\global\$mla_option_templates"/>
5421
+ <tag line="2819" name="param" description="'render', 'update', 'delete', or 'reset'" type="string" variable="$action">
5422
+ <type by_reference="false">string</type>
5423
+ </tag>
5424
+ <tag line="2819" name="param" description="option name, e.g., 'iptc_exif_mapping'" type="string" variable="$key">
5425
+ <type by_reference="false">string</type>
5426
+ </tag>
5427
+ <tag line="2819" name="param" description="option parameters" type="array" variable="$value">
5428
+ <type by_reference="false">array</type>
5429
+ </tag>
5430
+ <tag line="2819" name="param" description="Optional. null (default) for 'render' else option data, e.g., $_REQUEST" type="array" variable="$args">
5431
+ <type by_reference="false">array</type>
5432
+ </tag>
5433
+ <tag line="2819" name="return" description="HTML table row markup for 'render' else message(s) reflecting the results of the operation." type="string">
5434
+ <type by_reference="false">string</type>
5435
+ </tag>
5436
+ </docblock>
5437
+ <argument line="2832">
5438
+ <name>$action</name>
5439
+ <default><![CDATA[]]></default>
5440
+ <type/>
5441
+ </argument>
5442
+ <argument line="2832">
5443
+ <name>$key</name>
5444
+ <default><![CDATA[]]></default>
5445
+ <type/>
5446
+ </argument>
5447
+ <argument line="2832">
5448
+ <name>$value</name>
5449
+ <default><![CDATA[]]></default>
5450
+ <type/>
5451
+ </argument>
5452
+ <argument line="2832">
5453
+ <name>$args</name>
5454
+ <default><![CDATA[null]]></default>
5455
+ <type/>
5456
+ </argument>
5457
+ </method>
5458
+ </class>
5459
+ </file>
5460
+ <file path="includes\class-mla-settings.php" hash="f2463931f3f569d283cc45ea7c6f6817" package="Media Library Assistant">
5461
+ <docblock line="2">
5462
+ <description><![CDATA[Manages the settings page to edit the plugin option settings]]></description>
5463
  <long-description><![CDATA[]]></long-description>
5464
  <tag line="2" name="package" description="Media Library Assistant"/>
5465
+ <tag line="2" name="since" description="0.1"/>
5466
  </docblock>
5467
+ <class final="false" abstract="false" namespace="global" line="15" package="Media Library Assistant">
5468
  <extends/>
5469
+ <name>MLASettings</name>
5470
+ <full_name>\MLASettings</full_name>
5471
  <docblock line="9">
5472
+ <description><![CDATA[Class MLA (Media Library Assistant) Settings provides the settings page to edit the plugin option settings]]></description>
5473
+ <long-description><![CDATA[]]></long-description>
 
5474
  <tag line="9" name="package" description="Media Library Assistant"/>
5475
+ <tag line="9" name="since" description="0.1"/>
5476
  </docblock>
5477
+ <constant namespace="global" line="23" package="Media Library Assistant">
5478
+ <name>JAVASCRIPT_INLINE_EDIT_VIEW_SLUG</name>
5479
+ <full_name>JAVASCRIPT_INLINE_EDIT_VIEW_SLUG</full_name>
5480
+ <value><![CDATA['mla-inline-edit-view-scripts']]></value>
5481
+ <docblock line="16">
5482
+ <description><![CDATA[Slug for localizing and enqueueing JavaScript - MLA View List Table]]></description>
5483
+ <long-description><![CDATA[]]></long-description>
5484
+ <tag line="16" name="since" description="1.40"/>
5485
+ <tag line="16" name="var" description="" type="string">
5486
+ <type by_reference="false">string</type>
5487
+ </tag>
5488
+ </docblock>
5489
+ </constant>
5490
+ <constant namespace="global" line="32" package="Media Library Assistant">
5491
+ <name>JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT</name>
5492
+ <full_name>JAVASCRIPT_INLINE_EDIT_VIEW_OBJECT</full_name>
5493
+ <value><![CDATA['mla_inline_edit_view_vars']]></value>
5494
+ <docblock line="25">
5495
+ <description><![CDATA[Object name for localizing JavaScript - MLA View List Table]]></description>
5496
+ <long-description><![CDATA[]]></long-description>
5497
+ <tag line="25" name="since" description="1.40"/>
5498
+ <tag line="25" name="var" description="" type="string">
5499
+ <type by_reference="false">string</type>
5500
+ </tag>
5501
+ </docblock>
5502
+ </constant>
5503
+ <constant namespace="global" line="41" package="Media Library Assistant">
5504
+ <name>JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG</name>
5505
+ <full_name>JAVASCRIPT_INLINE_EDIT_UPLOAD_SLUG</full_name>
5506
+ <value><![CDATA['mla-inline-edit-upload-scripts']]></value>
5507
+ <docblock line="34">
5508
+ <description><![CDATA[Slug for localizing and enqueueing JavaScript - MLA View List Table]]></description>
5509
+ <long-description><![CDATA[]]></long-description>
5510
+ <tag line="34" name="since" description="1.40"/>
5511
+ <tag line="34" name="var" description="" type="string">
5512
+ <type by_reference="false">string</type>
5513
+ </tag>
5514
+ </docblock>
5515
+ </constant>
5516
+ <constant namespace="global" line="50" package="Media Library Assistant">
5517
+ <name>JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT</name>
5518
+ <full_name>JAVASCRIPT_INLINE_EDIT_UPLOAD_OBJECT</full_name>
5519
+ <value><![CDATA['mla_inline_edit_upload_vars']]></value>
5520
+ <docblock line="43">
5521
+ <description><![CDATA[Object name for localizing JavaScript - MLA View List Table]]></description>
5522
+ <long-description><![CDATA[]]></long-description>
5523
+ <tag line="43" name="since" description="1.40"/>
5524
+ <tag line="43" name="var" description="" type="string">
5525
+ <type by_reference="false">string</type>
5526
+ </tag>
5527
+ </docblock>
5528
+ </constant>
5529
+ <constant namespace="global" line="55" package="Media Library Assistant">
5530
+ <name>MLA_SETTINGS_SLUG</name>
5531
+ <full_name>MLA_SETTINGS_SLUG</full_name>
5532
+ <value><![CDATA['mla-settings-menu']]></value>
5533
+ <docblock line="52">
5534
+ <description><![CDATA[Provides a unique name for the settings page]]></description>
5535
+ <long-description><![CDATA[]]></long-description>
5536
+ </docblock>
5537
+ </constant>
5538
+ <property final="false" static="true" visibility="private" line="64" namespace="global" package="Media Library Assistant">
5539
+ <name>$current_page_hook</name>
5540
+ <default><![CDATA['']]></default>
5541
+ <docblock line="57">
5542
+ <description><![CDATA[Holds screen id to match help text to corresponding screen]]></description>
5543
+ <long-description><![CDATA[]]></long-description>
5544
+ <tag line="57" name="since" description="1.40"/>
5545
+ <tag line="57" name="var" description="" type="array">
5546
+ <type by_reference="false">array</type>
5547
+ </tag>
5548
+ </docblock>
5549
+ </property>
5550
+ <property final="false" static="true" visibility="private" line="795" namespace="global" package="Media Library Assistant">
5551
+ <name>$page_template_array</name>
5552
+ <default><![CDATA[null]]></default>
5553
+ <docblock line="785">
5554
+ <description><![CDATA[Template file for the Settings page(s) and parts]]></description>
5555
+ <long-description><![CDATA[<p>This array contains all of the template parts for the Settings page(s). The array is built once
5556
+ each page load and cached for subsequent use.</p>]]></long-description>
5557
+ <tag line="785" name="since" description="0.80"/>
5558
+ <tag line="785" name="var" description="" type="array">
5559
+ <type by_reference="false">array</type>
5560
+ </tag>
5561
+ </docblock>
5562
+ </property>
5563
+ <property final="false" static="true" visibility="private" line="811" namespace="global" package="Media Library Assistant">
5564
+ <name>$mla_tablist</name>
5565
+ <default><![CDATA[array('general' => array('title' => 'General', 'render' => '_compose_general_tab'), 'view' => array('title' => 'Views', 'render' => '_compose_view_tab'), 'upload' => array('title' => 'Uploads', 'render' => '_compose_upload_tab'), 'mla_gallery' => array('title' => 'MLA Gallery', 'render' => '_compose_mla_gallery_tab'), 'custom_field' => array('title' => 'Custom Fields', 'render' => '_compose_custom_field_tab'), 'iptc_exif' => array('title' => 'IPTC/EXIF', 'render' => '_compose_iptc_exif_tab'), 'documentation' => array('title' => 'Documentation', 'render' => '_compose_documentation_tab'))]]></default>
5566
+ <docblock line="797">
5567
+ <description><![CDATA[Definitions for Settings page tab ids, titles and handlers
5568
+ Each tab is defined by an array with the following elements:]]></description>
5569
+ <long-description><![CDATA[<p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
5570
+
5571
+ <p>title => tab label / heading text
5572
+ render => rendering function for tab messages and content. Usage:
5573
+ $tab_content = <a href="">'render'</a>;</p>]]></long-description>
5574
+ <tag line="797" name="since" description="0.80"/>
5575
+ <tag line="797" name="var" description="" type="array">
5576
+ <type by_reference="false">array</type>
5577
+ </tag>
5578
+ </docblock>
5579
+ </property>
5580
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="73" package="Media Library Assistant">
5581
+ <name>initialize</name>
5582
+ <full_name>initialize</full_name>
5583
+ <docblock line="66">
5584
+ <description><![CDATA[Initialization function, similar to __construct()]]></description>
5585
+ <long-description><![CDATA[]]></long-description>
5586
+ <tag line="66" name="since" description="0.1"/>
5587
+ <tag line="66" name="return" description="" type="void">
5588
+ <type by_reference="false">void</type>
5589
+ </tag>
5590
+ </docblock>
5591
+ </method>
5592
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="90" package="Media Library Assistant">
5593
+ <name>_version_upgrade</name>
5594
+ <full_name>_version_upgrade</full_name>
5595
+ <docblock line="83">
5596
+ <description><![CDATA[Database and option update check, for installing new versions]]></description>
5597
+ <long-description><![CDATA[]]></long-description>
5598
+ <tag line="83" name="since" description="0.30"/>
5599
+ <tag line="83" name="return" description="" type="void">
5600
+ <type by_reference="false">void</type>
5601
+ </tag>
5602
+ </docblock>
5603
+ </method>
5604
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="187" package="Media Library Assistant">
5605
+ <name>mla_activation_hook</name>
5606
+ <full_name>mla_activation_hook</full_name>
5607
+ <docblock line="178">
5608
+ <description><![CDATA[Perform one-time actions on plugin activation]]></description>
5609
+ <long-description><![CDATA[<p>Adds a view to the database to support sorting the listing on 'ALT Text'.</p>]]></long-description>
5610
+ <tag line="178" name="since" description="0.40"/>
5611
+ <tag line="178" name="return" description="" type="void">
5612
+ <type by_reference="false">void</type>
5613
+ </tag>
5614
+ </docblock>
5615
+ </method>
5616
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="200" package="Media Library Assistant">
5617
+ <name>mla_deactivation_hook</name>
5618
+ <full_name>mla_deactivation_hook</full_name>
5619
+ <docblock line="191">
5620
+ <description><![CDATA[Perform one-time actions on plugin deactivation]]></description>
5621
+ <long-description><![CDATA[<p>Removes (if present) a view from the database that supports sorting the listing on 'ALT Text'.</p>]]></long-description>
5622
+ <tag line="191" name="since" description="0.40"/>
5623
+ <tag line="191" name="return" description="" type="void">
5624
+ <type by_reference="false">void</type>
5625
+ </tag>
5626
+ </docblock>
5627
+ </method>
5628
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="247" package="Media Library Assistant">
5629
+ <name>mla_admin_init_action</name>
5630
+ <full_name>mla_admin_init_action</full_name>
5631
+ <docblock line="240">
5632
+ <description><![CDATA[Load the plugin's Ajax handler]]></description>
5633
+ <long-description><![CDATA[]]></long-description>
5634
+ <tag line="240" name="since" description="1.40"/>
5635
+ <tag line="240" name="return" description="" type="void">
5636
+ <type by_reference="false">void</type>
5637
+ </tag>
5638
+ </docblock>
5639
+ </method>
5640
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="261" package="Media Library Assistant">
5641
+ <name>mla_admin_enqueue_scripts_action</name>
5642
+ <full_name>mla_admin_enqueue_scripts_action</full_name>
5643
+ <docblock line="252">
5644
+ <description><![CDATA[Load the plugin's Style Sheet and Javascript files]]></description>
5645
+ <long-description><![CDATA[]]></long-description>
5646
+ <tag line="252" name="since" description="1.40"/>
5647
+ <tag line="252" name="param" description="Name of the page being loaded" type="string" variable="$page_hook">
5648
+ <type by_reference="false">string</type>
5649
+ </tag>
5650
+ <tag line="252" name="return" description="" type="void">
5651
+ <type by_reference="false">void</type>
5652
+ </tag>
5653
+ </docblock>
5654
+ <argument line="261">
5655
+ <name>$page_hook</name>
5656
+ <default><![CDATA[]]></default>
5657
+ <type/>
5658
+ </argument>
5659
+ </method>
5660
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="316" package="Media Library Assistant">
5661
+ <name>mla_admin_menu_action</name>
5662
+ <full_name>mla_admin_menu_action</full_name>
5663
+ <docblock line="307">
5664
+ <description><![CDATA[Add settings page in the "Settings" section,
5665
+ add screen options and help tabs,
5666
+ add settings link in the Plugins section entry for MLA.]]></description>
5667
+ <long-description><![CDATA[]]></long-description>
5668
+ <tag line="307" name="since" description="0.1"/>
5669
+ <tag line="307" name="return" description="" type="void">
5670
+ <type by_reference="false">void</type>
5671
+ </tag>
5672
+ </docblock>
5673
+ </method>
5674
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="337" package="Media Library Assistant">
5675
+ <name>mla_add_menu_options_action</name>
5676
+ <full_name>mla_add_menu_options_action</full_name>
5677
+ <docblock line="330">
5678
+ <description><![CDATA[Add the "XX Entries per page" filter to the Screen Options tab]]></description>
5679
+ <long-description><![CDATA[]]></long-description>
5680
+ <tag line="330" name="since" description="1.40"/>
5681
+ <tag line="330" name="return" description="" type="void">
5682
+ <type by_reference="false">void</type>
5683
+ </tag>
5684
+ </docblock>
5685
+ </method>
5686
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="382" package="Media Library Assistant">
5687
+ <name>mla_add_help_tab_action</name>
5688
+ <full_name>mla_add_help_tab_action</full_name>
5689
+ <docblock line="375">
5690
+ <description><![CDATA[Add contextual help tabs to all the MLA pages]]></description>
5691
+ <long-description><![CDATA[]]></long-description>
5692
+ <tag line="375" name="since" description="1.40"/>
5693
+ <tag line="375" name="return" description="" type="void">
5694
+ <type by_reference="false">void</type>
5695
+ </tag>
5696
+ </docblock>
5697
+ </method>
5698
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="453" package="Media Library Assistant">
5699
+ <name>mla_screen_options_show_screen_filter</name>
5700
+ <full_name>mla_screen_options_show_screen_filter</full_name>
5701
+ <docblock line="443">
5702
+ <description><![CDATA[Only show screen options on the View and Upload tabs]]></description>
5703
+ <long-description><![CDATA[]]></long-description>
5704
+ <tag line="443" name="since" description="1.40"/>
5705
+ <tag line="443" name="param" description="True to display &quot;Screen Options&quot;, false to suppress them" type="boolean" variable="$show_screen">
5706
+ <type by_reference="false">boolean</type>
5707
+ </tag>
5708
+ <tag line="443" name="param" description="Name of the page being loaded" type="string" variable="$this_screen">
5709
+ <type by_reference="false">string</type>
5710
+ </tag>
5711
+ <tag line="443" name="return" description="True to display &quot;Screen Options&quot;, false to suppress them" type="boolean">
5712
+ <type by_reference="false">boolean</type>
5713
+ </tag>
5714
+ </docblock>
5715
+ <argument line="453">
5716
+ <name>$show_screen</name>
5717
+ <default><![CDATA[]]></default>
5718
+ <type/>
5719
+ </argument>
5720
+ <argument line="453">
5721
+ <name>$this_screen</name>
5722
+ <default><![CDATA[]]></default>
5723
+ <type/>
5724
+ </argument>
5725
+ </method>
5726
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="473" package="Media Library Assistant">
5727
+ <name>mla_set_screen_option_filter</name>
5728
+ <full_name>mla_set_screen_option_filter</full_name>
5729
+ <docblock line="462">
5730
+ <description><![CDATA[Save the "Views/Uploads per page" option set by this user]]></description>
5731
+ <long-description><![CDATA[]]></long-description>
5732
+ <tag line="462" name="since" description="1.40"/>
5733
+ <tag line="462" name="param" description="false or value returned by previous filter" type="mixed" variable="$status">
5734
+ <type by_reference="false">mixed</type>
5735
+ </tag>
5736
+ <tag line="462" name="param" description="Name of the option being changed" type="string" variable="$option">
5737
+ <type by_reference="false">string</type>
5738
+ </tag>
5739
+ <tag line="462" name="param" description="New value of the option" type="string" variable="$value">
5740
+ <type by_reference="false">string</type>
5741
+ </tag>
5742
+ <tag line="462" name="return" description="New value if this is our option, otherwise nothing" type="string|void">
5743
+ <type by_reference="false">string</type>
5744
+ <type by_reference="false">void</type>
5745
+ </tag>
5746
+ </docblock>
5747
+ <argument line="473">
5748
+ <name>$status</name>
5749
+ <default><![CDATA[]]></default>
5750
+ <type/>
5751
+ </argument>
5752
+ <argument line="473">
5753
+ <name>$option</name>
5754
+ <default><![CDATA[]]></default>
5755
+ <type/>
5756
+ </argument>
5757
+ <argument line="473">
5758
+ <name>$value</name>
5759
+ <default><![CDATA[]]></default>
5760
+ <type/>
5761
+ </argument>
5762
+ </method>
5763
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="489" package="Media Library Assistant">
5764
+ <name>mla_inline_edit_view_action</name>
5765
+ <full_name>mla_inline_edit_view_action</full_name>
5766
+ <docblock line="480">
5767
+ <description><![CDATA[Ajax handler for Post MIME Types inline editing (quick and bulk edit)]]></description>
5768
+ <long-description><![CDATA[<p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p>]]></long-description>
5769
+ <tag line="480" name="since" description="1.40"/>
5770
+ <tag line="480" name="return" description="echo HTML &lt;tr&gt; markup for updated row or error message, then die()" type="void">
5771
+ <type by_reference="false">void</type>
5772
+ </tag>
5773
+ </docblock>
5774
+ </method>
5775
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="531" package="Media Library Assistant">
5776
+ <name>mla_inline_edit_upload_action</name>
5777
+ <full_name>mla_inline_edit_upload_action</full_name>
5778
+ <docblock line="522">
5779
+ <description><![CDATA[Ajax handler for Upload MIME Types inline editing (quick and bulk edit)]]></description>
5780
+ <long-description><![CDATA[<p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p>]]></long-description>
5781
+ <tag line="522" name="since" description="1.40"/>
5782
+ <tag line="522" name="return" description="echo HTML &lt;tr&gt; markup for updated row or error message, then die()" type="void">
5783
+ <type by_reference="false">void</type>
5784
+ </tag>
5785
+ </docblock>
5786
+ </method>
5787
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="570" package="Media Library Assistant">
5788
+ <name>mla_add_plugin_settings_link_filter</name>
5789
+ <full_name>mla_add_plugin_settings_link_filter</full_name>
5790
+ <docblock line="560">
5791
+ <description><![CDATA[Add the "Settings" link to the MLA entry in the Plugins section]]></description>
5792
+ <long-description><![CDATA[]]></long-description>
5793
+ <tag line="560" name="since" description="0.1"/>
5794
+ <tag line="560" name="param" description="array of links for the Plugin, e.g., &quot;Activate&quot;" type="array" variable="$links">
5795
+ <type by_reference="false">array</type>
5796
+ </tag>
5797
+ <tag line="560" name="param" description="Directory and name of the plugin Index file" type="string" variable="$file">
5798
+ <type by_reference="false">string</type>
5799
+ </tag>
5800
+ <tag line="560" name="return" description="Updated array of links for the Plugin" type="array">
5801
+ <type by_reference="false">array</type>
5802
+ </tag>
5803
+ </docblock>
5804
+ <argument line="570">
5805
+ <name>$links</name>
5806
+ <default><![CDATA[]]></default>
5807
+ <type/>
5808
+ </argument>
5809
+ <argument line="570">
5810
+ <name>$file</name>
5811
+ <default><![CDATA[]]></default>
5812
+ <type/>
5813
+ </argument>
5814
+ </method>
5815
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="590" package="Media Library Assistant">
5816
+ <name>_update_option_row</name>
5817
+ <full_name>_update_option_row</full_name>
5818
+ <docblock line="579">
5819
+ <description><![CDATA[Update or delete a single MLA option value]]></description>
5820
+ <long-description><![CDATA[]]></long-description>
5821
+ <tag line="579" name="since" description="0.80"/>
5822
+ <tag line="579" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
5823
+ <tag line="579" name="param" description="HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)" type="string" variable="$key">
5824
+ <type by_reference="false">string</type>
5825
+ </tag>
5826
+ <tag line="579" name="param" description="Option parameters, e.g., 'type', 'std'" type="array" variable="$value">
5827
+ <type by_reference="false">array</type>
5828
+ </tag>
5829
+ <tag line="579" name="return" description="HTML markup for the option's table row" type="string">
5830
+ <type by_reference="false">string</type>
5831
+ </tag>
5832
+ </docblock>
5833
+ <argument line="590">
5834
+ <name>$key</name>
5835
+ <default><![CDATA[]]></default>
5836
+ <type/>
5837
+ </argument>
5838
+ <argument line="590">
5839
+ <name>$value</name>
5840
+ <default><![CDATA[]]></default>
5841
+ <type/>
5842
+ </argument>
5843
+ </method>
5844
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="668" package="Media Library Assistant">
5845
+ <name>_compose_option_row</name>
5846
+ <full_name>_compose_option_row</full_name>
5847
+ <docblock line="657">
5848
+ <description><![CDATA[Compose the table row for a single MLA option]]></description>
5849
+ <long-description><![CDATA[]]></long-description>
5850
+ <tag line="657" name="since" description="0.80"/>
5851
+ <tag line="657" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
5852
+ <tag line="657" name="param" description="HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)" type="string" variable="$key">
5853
+ <type by_reference="false">string</type>
5854
+ </tag>
5855
+ <tag line="657" name="param" description="Option parameters, e.g., 'type', 'std'" type="array" variable="$value">
5856
+ <type by_reference="false">array</type>
5857
+ </tag>
5858
+ <tag line="657" name="return" description="HTML markup for the option's table row" type="string">
5859
+ <type by_reference="false">string</type>
5860
+ </tag>
5861
+ </docblock>
5862
+ <argument line="668">
5863
+ <name>$key</name>
5864
+ <default><![CDATA[]]></default>
5865
+ <type/>
5866
+ </argument>
5867
+ <argument line="668">
5868
+ <name>$value</name>
5869
+ <default><![CDATA[]]></default>
5870
+ <type/>
5871
+ </argument>
5872
+ </method>
5873
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="831" package="Media Library Assistant">
5874
+ <name>_compose_settings_tabs</name>
5875
+ <full_name>_compose_settings_tabs</full_name>
5876
+ <docblock line="821">
5877
+ <description><![CDATA[Compose the navigation tabs for the Settings subpage]]></description>
5878
+ <long-description><![CDATA[]]></long-description>
5879
+ <tag line="821" name="since" description="0.80"/>
5880
+ <tag line="821" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
5881
+ <tag line="821" name="param" description="Optional data-tab-id value for the active tab, default 'general'" type="string" variable="$active_tab">
5882
+ <type by_reference="false">string</type>
5883
+ </tag>
5884
+ <tag line="821" name="return" description="HTML markup for the Settings subpage navigation tabs" type="string">
5885
+ <type by_reference="false">string</type>
5886
+ </tag>
5887
+ </docblock>
5888
+ <argument line="831">
5889
+ <name>$active_tab</name>
5890
+ <default><![CDATA['general']]></default>
5891
+ <type/>
5892
+ </argument>
5893
+ </method>
5894
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="857" package="Media Library Assistant">
5895
+ <name>_compose_general_tab</name>
5896
+ <full_name>_compose_general_tab</full_name>
5897
+ <docblock line="849">
5898
+ <description><![CDATA[Compose the General tab content for the Settings subpage]]></description>
5899
+ <long-description><![CDATA[]]></long-description>
5900
+ <tag line="849" name="since" description="0.80"/>
5901
+ <tag line="849" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
5902
+ <tag line="849" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
5903
+ <type by_reference="false">array</type>
5904
+ </tag>
5905
+ </docblock>
5906
+ </method>
5907
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="942" package="Media Library Assistant">
5908
+ <name>_current_bulk_action</name>
5909
+ <full_name>_current_bulk_action</full_name>
5910
+ <docblock line="935">
5911
+ <description><![CDATA[Get the current action selected from the bulk actions dropdown]]></description>
5912
+ <long-description><![CDATA[]]></long-description>
5913
+ <tag line="935" name="since" description="1.40"/>
5914
+ <tag line="935" name="return" description="The action name or False if no action was selected" type="string|false">
5915
+ <type by_reference="false">string</type>
5916
+ <type by_reference="false">false</type>
5917
+ </tag>
5918
+ </docblock>
5919
+ </method>
5920
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="972" package="Media Library Assistant">
5921
+ <name>_compose_edit_view_tab</name>
5922
+ <full_name>_compose_edit_view_tab</full_name>
5923
+ <docblock line="962">
5924
+ <description><![CDATA[Compose the Edit View tab content for the Settings subpage]]></description>
5925
+ <long-description><![CDATA[]]></long-description>
5926
+ <tag line="962" name="since" description="1.40"/>
5927
+ <tag line="962" name="param" description="data values for the item" type="array" variable="$view">
5928
+ <type by_reference="false">array</type>
5929
+ </tag>
5930
+ <tag line="962" name="param" description="Display template" type="string" variable="$template">
5931
+ <type by_reference="false">string</type>
5932
+ </tag>
5933
+ <tag line="962" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
5934
+ <type by_reference="false">array</type>
5935
+ </tag>
5936
+ </docblock>
5937
+ <argument line="972">
5938
+ <name>$view</name>
5939
+ <default><![CDATA[]]></default>
5940
+ <type/>
5941
+ </argument>
5942
+ <argument line="972">
5943
+ <name>$template</name>
5944
+ <default><![CDATA[]]></default>
5945
+ <type/>
5946
+ </argument>
5947
+ </method>
5948
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1004" package="Media Library Assistant">
5949
+ <name>_compose_view_tab</name>
5950
+ <full_name>_compose_view_tab</full_name>
5951
+ <docblock line="997">
5952
+ <description><![CDATA[Compose the Post MIME Type Views tab content for the Settings subpage]]></description>
5953
+ <long-description><![CDATA[]]></long-description>
5954
+ <tag line="997" name="since" description="1.40"/>
5955
+ <tag line="997" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
5956
+ <type by_reference="false">array</type>
5957
+ </tag>
5958
+ </docblock>
5959
+ </method>
5960
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1228" package="Media Library Assistant">
5961
+ <name>mla_get_icon_type_dropdown</name>
5962
+ <full_name>mla_get_icon_type_dropdown</full_name>
5963
+ <docblock line="1217">
5964
+ <description><![CDATA[Get an HTML select element representing a list of icon types]]></description>
5965
+ <long-description><![CDATA[]]></long-description>
5966
+ <tag line="1217" name="since" description="1.40"/>
5967
+ <tag line="1217" name="param" description="Display template array" type="array" variable="$templates">
5968
+ <type by_reference="false">array</type>
5969
+ </tag>
5970
+ <tag line="1217" name="param" description="HTML name attribute value" type="string" variable="$name">
5971
+ <type by_reference="false">string</type>
5972
+ </tag>
5973
+ <tag line="1217" name="param" description="currently selected Icon Type" type="string" variable="$selection">
5974
+ <type by_reference="false">string</type>
5975
+ </tag>
5976
+ <tag line="1217" name="return" description="HTML select element or empty string on failure." type="string">
5977
+ <type by_reference="false">string</type>
5978
+ </tag>
5979
+ </docblock>
5980
+ <argument line="1228">
5981
+ <name>$templates</name>
5982
+ <default><![CDATA[]]></default>
5983
+ <type/>
5984
+ </argument>
5985
+ <argument line="1228">
5986
+ <name>$name</name>
5987
+ <default><![CDATA[]]></default>
5988
+ <type/>
5989
+ </argument>
5990
+ <argument line="1228">
5991
+ <name>$selection</name>
5992
+ <default><![CDATA['.none.']]></default>
5993
+ <type/>
5994
+ </argument>
5995
+ </method>
5996
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1269" package="Media Library Assistant">
5997
+ <name>_compose_edit_upload_tab</name>
5998
+ <full_name>_compose_edit_upload_tab</full_name>
5999
+ <docblock line="1259">
6000
+ <description><![CDATA[Compose the Edit Upload type tab content for the Settings subpage]]></description>
6001
+ <long-description><![CDATA[]]></long-description>
6002
+ <tag line="1259" name="since" description="1.40"/>
6003
+ <tag line="1259" name="param" description="data values for the item" type="array" variable="$item">
6004
+ <type by_reference="false">array</type>
6005
+ </tag>
6006
+ <tag line="1259" name="param" description="Display template array" type="string" variable="$templates">
6007
+ <type by_reference="false">string</type>
6008
+ </tag>
6009
+ <tag line="1259" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
6010
+ <type by_reference="false">array</type>
6011
+ </tag>
6012
+ </docblock>
6013
+ <argument line="1269">
6014
+ <name>$item</name>
6015
+ <default><![CDATA[]]></default>
6016
+ <type/>
6017
+ </argument>
6018
+ <argument line="1269">
6019
+ <name>$templates</name>
6020
+ <default><![CDATA[]]></default>
6021
+ <type/>
6022
+ </argument>
6023
+ </method>
6024
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1303" package="Media Library Assistant">
6025
+ <name>_compose_optional_upload_tab</name>
6026
+ <full_name>_compose_optional_upload_tab</full_name>
6027
+ <docblock line="1294">
6028
+ <description><![CDATA[Compose the Optional File Upload MIME Types tab content for the Settings subpage]]></description>
6029
+ <long-description><![CDATA[]]></long-description>
6030
+ <tag line="1294" name="since" description="1.40"/>
6031
+ <tag line="1294" name="param" description="Display templates" type="string" variable="$page_template_array">
6032
+ <type by_reference="false">string</type>
6033
+ </tag>
6034
+ <tag line="1294" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
6035
+ <type by_reference="false">array</type>
6036
+ </tag>
6037
+ </docblock>
6038
+ <argument line="1303">
6039
+ <name>$page_template_array</name>
6040
+ <default><![CDATA[]]></default>
6041
+ <type/>
6042
+ </argument>
6043
+ </method>
6044
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1369" package="Media Library Assistant">
6045
+ <name>_process_optional_upload_mime</name>
6046
+ <full_name>_process_optional_upload_mime</full_name>
6047
+ <docblock line="1360">
6048
+ <description><![CDATA[Process an Optional Upload MIME Type selection]]></description>
6049
+ <long-description><![CDATA[]]></long-description>
6050
+ <tag line="1360" name="since" description="1.40"/>
6051
+ <tag line="1360" name="param" description="MLA Optional Upload MIME Type ID" type="\intger" variable="$ID">
6052
+ <type by_reference="false">\intger</type>
6053
+ </tag>
6054
+ <tag line="1360" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
6055
+ <type by_reference="false">array</type>
6056
+ </tag>
6057
+ </docblock>
6058
+ <argument line="1369">
6059
+ <name>$ID</name>
6060
+ <default><![CDATA[]]></default>
6061
+ <type/>
6062
+ </argument>
6063
+ </method>
6064
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1389" package="Media Library Assistant">
6065
+ <name>_compose_upload_tab</name>
6066
+ <full_name>_compose_upload_tab</full_name>
6067
+ <docblock line="1382">
6068
+ <description><![CDATA[Compose the File Upload MIME Types tab content for the Settings subpage]]></description>
6069
+ <long-description><![CDATA[]]></long-description>
6070
+ <tag line="1382" name="since" description="1.40"/>
6071
+ <tag line="1382" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
6072
+ <type by_reference="false">array</type>
6073
+ </tag>
6074
+ </docblock>
6075
+ </method>
6076
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1642" package="Media Library Assistant">
6077
+ <name>_compose_mla_gallery_tab</name>
6078
+ <full_name>_compose_mla_gallery_tab</full_name>
6079
+ <docblock line="1634">
6080
+ <description><![CDATA[Compose the MLA Gallery tab content for the Settings subpage]]></description>
6081
+ <long-description><![CDATA[]]></long-description>
6082
+ <tag line="1634" name="since" description="0.80"/>
6083
+ <tag line="1634" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
6084
+ <tag line="1634" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
6085
+ <type by_reference="false">array</type>
6086
+ </tag>
6087
+ </docblock>
6088
+ </method>
6089
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1945" package="Media Library Assistant">
6090
+ <name>_compose_custom_field_tab</name>
6091
+ <full_name>_compose_custom_field_tab</full_name>
6092
+ <docblock line="1937">
6093
+ <description><![CDATA[Compose the Custom Field tab content for the Settings subpage]]></description>
6094
+ <long-description><![CDATA[]]></long-description>
6095
+ <tag line="1937" name="since" description="1.10"/>
6096
+ <tag line="1937" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
6097
+ <tag line="1937" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
6098
+ <type by_reference="false">array</type>
6099
+ </tag>
6100
+ </docblock>
6101
+ </method>
6102
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2051" package="Media Library Assistant">
6103
+ <name>_compose_iptc_exif_tab</name>
6104
+ <full_name>_compose_iptc_exif_tab</full_name>
6105
+ <docblock line="2043">
6106
+ <description><![CDATA[Compose the IPTC/EXIF tab content for the Settings subpage]]></description>
6107
+ <long-description><![CDATA[]]></long-description>
6108
+ <tag line="2043" name="since" description="1.00"/>
6109
+ <tag line="2043" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
6110
+ <tag line="2043" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
6111
+ <type by_reference="false">array</type>
6112
+ </tag>
6113
+ </docblock>
6114
+ </method>
6115
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2159" package="Media Library Assistant">
6116
+ <name>_compose_documentation_tab</name>
6117
+ <full_name>_compose_documentation_tab</full_name>
6118
+ <docblock line="2151">
6119
+ <description><![CDATA[Compose the Documentation tab content for the Settings subpage]]></description>
6120
  <long-description><![CDATA[]]></long-description>
6121
+ <tag line="2151" name="since" description="0.80"/>
6122
+ <tag line="2151" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
6123
+ <tag line="2151" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
6124
+ <type by_reference="false">array</type>
6125
+ </tag>
6126
  </docblock>
6127
+ </method>
6128
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="2178" package="Media Library Assistant">
6129
+ <name>mla_render_settings_page</name>
6130
+ <full_name>mla_render_settings_page</full_name>
6131
+ <docblock line="2171">
6132
+ <description><![CDATA[Render (echo) the "Media Library Assistant" subpage in the Settings section]]></description>
 
6133
  <long-description><![CDATA[]]></long-description>
6134
+ <tag line="2171" name="since" description="0.1"/>
6135
+ <tag line="2171" name="return" description="Echoes HTML markup for the Settings subpage" type="void">
6136
+ <type by_reference="false">void</type>
6137
+ </tag>
6138
  </docblock>
6139
+ </method>
6140
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2236" package="Media Library Assistant">
6141
+ <name>_save_gallery_settings</name>
6142
+ <full_name>_save_gallery_settings</full_name>
6143
+ <docblock line="2227">
6144
+ <description><![CDATA[Save MLA Gallery settings to the options table]]></description>
 
6145
  <long-description><![CDATA[]]></long-description>
6146
+ <tag line="2227" name="since" description="0.80"/>
6147
+ <tag line="2227" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6148
+ <tag line="2227" name="return" description="Message(s) reflecting the results of the operation" type="array">
6149
+ <type by_reference="false">array</type>
6150
+ </tag>
6151
  </docblock>
6152
+ </method>
6153
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2467" package="Media Library Assistant">
6154
+ <name>_save_view_settings</name>
6155
+ <full_name>_save_view_settings</full_name>
6156
+ <docblock line="2458">
6157
+ <description><![CDATA[Save View settings to the options table]]></description>
 
6158
  <long-description><![CDATA[]]></long-description>
6159
+ <tag line="2458" name="since" description="1.40"/>
6160
+ <tag line="2458" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6161
+ <tag line="2458" name="return" description="Message(s) reflecting the results of the operation" type="array">
6162
+ <type by_reference="false">array</type>
6163
+ </tag>
6164
  </docblock>
6165
+ </method>
6166
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2498" package="Media Library Assistant">
6167
+ <name>_save_upload_settings</name>
6168
+ <full_name>_save_upload_settings</full_name>
6169
+ <docblock line="2489">
6170
+ <description><![CDATA[Save Upload settings to the options table]]></description>
 
6171
  <long-description><![CDATA[]]></long-description>
6172
+ <tag line="2489" name="since" description="1.40"/>
6173
+ <tag line="2489" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6174
+ <tag line="2489" name="return" description="Message(s) reflecting the results of the operation" type="array">
6175
+ <type by_reference="false">array</type>
6176
+ </tag>
6177
  </docblock>
6178
+ </method>
6179
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2534" package="Media Library Assistant">
6180
+ <name>_process_custom_field_mapping</name>
6181
+ <full_name>_process_custom_field_mapping</full_name>
6182
+ <docblock line="2523">
6183
+ <description><![CDATA[Process custom field settings against all image attachments
6184
+ without saving the settings to the mla_option]]></description>
6185
  <long-description><![CDATA[]]></long-description>
6186
+ <tag line="2523" name="since" description="1.10"/>
6187
+ <tag line="2523" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6188
+ <tag line="2523" name="param" description="| NULL specific custom_field_mapping values" type="array" variable="$settings">
6189
+ <type by_reference="false">array</type>
6190
+ </tag>
6191
+ <tag line="2523" name="return" description="Message(s) reflecting the results of the operation" type="array">
6192
+ <type by_reference="false">array</type>
6193
+ </tag>
6194
  </docblock>
6195
+ <argument line="2534">
6196
+ <name>$settings</name>
6197
+ <default><![CDATA[NULL]]></default>
6198
+ <type/>
6199
+ </argument>
6200
+ </method>
6201
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2586" package="Media Library Assistant">
6202
+ <name>_delete_custom_field</name>
6203
+ <full_name>_delete_custom_field</full_name>
6204
+ <docblock line="2577">
6205
+ <description><![CDATA[Delete a custom field from the wp_postmeta table]]></description>
6206
  <long-description><![CDATA[]]></long-description>
6207
+ <tag line="2577" name="since" description="1.10"/>
6208
+ <tag line="2577" name="param" description="specific custom_field_mapping rule" type="array" variable="$value">
6209
+ <type by_reference="false">array</type>
6210
+ </tag>
6211
+ <tag line="2577" name="return" description="Message(s) reflecting the results of the operation" type="array">
6212
+ <type by_reference="false">array</type>
6213
+ </tag>
6214
  </docblock>
6215
+ <argument line="2586">
6216
+ <name>$value</name>
6217
+ <default><![CDATA[]]></default>
6218
+ <type/>
6219
+ </argument>
6220
+ </method>
6221
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2610" package="Media Library Assistant">
6222
+ <name>_save_custom_field_settings</name>
6223
+ <full_name>_save_custom_field_settings</full_name>
6224
+ <docblock line="2600">
6225
+ <description><![CDATA[Save custom field settings to the options table]]></description>
6226
  <long-description><![CDATA[]]></long-description>
6227
+ <tag line="2600" name="since" description="1.10"/>
6228
+ <tag line="2600" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6229
+ <tag line="2600" name="param" description="| NULL specific custom_field_mapping values" type="array" variable="$new_values">
6230
+ <type by_reference="false">array</type>
6231
+ </tag>
6232
+ <tag line="2600" name="return" description="Message(s) reflecting the results of the operation" type="array">
6233
+ <type by_reference="false">array</type>
6234
+ </tag>
6235
  </docblock>
6236
+ <argument line="2610">
6237
+ <name>$new_values</name>
6238
+ <default><![CDATA[NULL]]></default>
6239
+ <type/>
6240
+ </argument>
6241
+ </method>
6242
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2650" package="Media Library Assistant">
6243
+ <name>_process_iptc_exif_standard</name>
6244
+ <full_name>_process_iptc_exif_standard</full_name>
6245
+ <docblock line="2640">
6246
+ <description><![CDATA[Process IPTC/EXIF standard field settings against all image attachments
6247
+ without saving the settings to the mla_option]]></description>
6248
  <long-description><![CDATA[]]></long-description>
6249
+ <tag line="2640" name="since" description="1.00"/>
6250
+ <tag line="2640" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6251
+ <tag line="2640" name="return" description="Message(s) reflecting the results of the operation" type="array">
6252
+ <type by_reference="false">array</type>
6253
+ </tag>
6254
  </docblock>
6255
+ </method>
6256
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2700" package="Media Library Assistant">
6257
+ <name>_process_iptc_exif_taxonomy</name>
6258
+ <full_name>_process_iptc_exif_taxonomy</full_name>
6259
+ <docblock line="2690">
6260
+ <description><![CDATA[Process IPTC/EXIF taxonomy term settings against all image attachments
6261
+ without saving the settings to the mla_option]]></description>
6262
  <long-description><![CDATA[]]></long-description>
6263
+ <tag line="2690" name="since" description="1.00"/>
6264
+ <tag line="2690" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6265
+ <tag line="2690" name="return" description="Message(s) reflecting the results of the operation" type="array">
6266
+ <type by_reference="false">array</type>
6267
+ </tag>
6268
  </docblock>
6269
+ </method>
6270
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2753" package="Media Library Assistant">
6271
+ <name>_process_iptc_exif_custom</name>
6272
+ <full_name>_process_iptc_exif_custom</full_name>
6273
+ <docblock line="2741">
6274
+ <description><![CDATA[Process IPTC/EXIF custom field settings against all image attachments
6275
+ without saving the settings to the mla_option]]></description>
6276
  <long-description><![CDATA[]]></long-description>
6277
+ <tag line="2741" name="since" description="1.00"/>
6278
+ <tag line="2741" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6279
+ <tag line="2741" name="param" description="| NULL specific iptc_exif_custom_mapping values" type="array" variable="$settings">
6280
+ <type by_reference="false">array</type>
6281
+ </tag>
6282
+ <tag line="2741" name="return" description="Message(s) reflecting the results of the operation" type="array">
6283
+ <type by_reference="false">array</type>
6284
+ </tag>
6285
  </docblock>
6286
+ <argument line="2753">
6287
+ <name>$settings</name>
6288
+ <default><![CDATA[NULL]]></default>
6289
+ <type/>
6290
+ </argument>
6291
+ </method>
6292
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2811" package="Media Library Assistant">
6293
+ <name>_save_iptc_exif_custom_settings</name>
6294
+ <full_name>_save_iptc_exif_custom_settings</full_name>
6295
+ <docblock line="2802">
6296
+ <description><![CDATA[Save IPTC/EXIF custom field settings to the options table]]></description>
6297
  <long-description><![CDATA[]]></long-description>
6298
+ <tag line="2802" name="since" description="1.30"/>
6299
+ <tag line="2802" name="param" description="specific iptc_exif_custom_mapping values" type="array" variable="$new_values">
6300
+ <type by_reference="false">array</type>
6301
+ </tag>
6302
+ <tag line="2802" name="return" description="Message(s) reflecting the results of the operation" type="array">
6303
+ <type by_reference="false">array</type>
6304
+ </tag>
6305
  </docblock>
6306
+ <argument line="2811">
6307
+ <name>$new_values</name>
6308
+ <default><![CDATA[]]></default>
6309
+ <type/>
6310
+ </argument>
6311
+ </method>
6312
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2827" package="Media Library Assistant">
6313
+ <name>_save_iptc_exif_settings</name>
6314
+ <full_name>_save_iptc_exif_settings</full_name>
6315
+ <docblock line="2818">
6316
+ <description><![CDATA[Save IPTC/EXIF settings to the options table]]></description>
6317
+ <long-description><![CDATA[]]></long-description>
6318
+ <tag line="2818" name="since" description="1.00"/>
6319
+ <tag line="2818" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6320
+ <tag line="2818" name="return" description="Message(s) reflecting the results of the operation" type="array">
6321
+ <type by_reference="false">array</type>
6322
+ </tag>
6323
+ </docblock>
6324
+ </method>
6325
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2864" package="Media Library Assistant">
6326
+ <name>_save_general_settings</name>
6327
+ <full_name>_save_general_settings</full_name>
6328
+ <docblock line="2855">
6329
+ <description><![CDATA[Save General settings to the options table]]></description>
6330
+ <long-description><![CDATA[]]></long-description>
6331
+ <tag line="2855" name="since" description="0.1"/>
6332
+ <tag line="2855" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
6333
+ <tag line="2855" name="return" description="Message(s) reflecting the results of the operation" type="array">
6334
+ <type by_reference="false">array</type>
6335
+ </tag>
6336
+ </docblock>
6337
+ </method>
6338
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="2922" package="Media Library Assistant">
6339
+ <name>_reset_general_settings</name>
6340
+ <full_name>_reset_general_settings</full_name>
6341
+ <docblock line="2915">
6342
+ <description><![CDATA[Delete saved settings, restoring default values]]></description>
6343
+ <long-description><![CDATA[]]></long-description>
6344
+ <tag line="2915" name="since" description="0.1"/>
6345
+ <tag line="2915" name="return" description="Message(s) reflecting the results of the operation" type="array">
6346
+ <type by_reference="false">array</type>
6347
+ </tag>
6348
+ </docblock>
6349
+ </method>
6350
+ </class>
6351
+ </file>
6352
+ <file path="includes\class-mla-shortcodes.php" hash="24af3b206f1da9617a99a3a9c2e42e69" package="Media Library Assistant">
6353
+ <docblock line="2">
6354
+ <description><![CDATA[Media Library Assistant Shortcode handler(s)]]></description>
6355
+ <long-description><![CDATA[]]></long-description>
6356
+ <tag line="2" name="package" description="Media Library Assistant"/>
6357
+ <tag line="2" name="since" description="0.1"/>
6358
+ </docblock>
6359
+ <class final="false" abstract="false" namespace="global" line="15" package="Media Library Assistant">
6360
+ <extends/>
6361
+ <name>MLAShortcodes</name>
6362
+ <full_name>\MLAShortcodes</full_name>
6363
+ <docblock line="9">
6364
+ <description><![CDATA[Class MLA (Media Library Assistant) Shortcodes defines the shortcodes available to MLA users]]></description>
6365
+ <long-description><![CDATA[]]></long-description>
6366
+ <tag line="9" name="package" description="Media Library Assistant"/>
6367
+ <tag line="9" name="since" description="0.20"/>
6368
+ </docblock>
6369
+ <property final="false" static="true" visibility="public" line="134" namespace="global" package="Media Library Assistant">
6370
+ <name>$mla_debug_messages</name>
6371
+ <default><![CDATA['']]></default>
6372
+ <docblock line="127">
6373
+ <description><![CDATA[Accumulates debug messages]]></description>
6374
+ <long-description><![CDATA[]]></long-description>
6375
+ <tag line="127" name="since" description="0.60"/>
6376
+ <tag line="127" name="var" description="" type="string">
6377
+ <type by_reference="false">string</type>
6378
+ </tag>
6379
+ </docblock>
6380
+ </property>
6381
+ <property final="false" static="true" visibility="private" line="143" namespace="global" package="Media Library Assistant">
6382
+ <name>$mla_debug</name>
6383
+ <default><![CDATA[false]]></default>
6384
+ <docblock line="136">
6385
+ <description><![CDATA[Turn debug collection and display on or off]]></description>
6386
+ <long-description><![CDATA[]]></long-description>
6387
+ <tag line="136" name="since" description="0.70"/>
6388
+ <tag line="136" name="var" description="" type="boolean">
6389
  <type by_reference="false">boolean</type>
6390
  </tag>
6391
  </docblock>
6392
  </property>
6393
+ <property final="false" static="true" visibility="private" line="913" namespace="global" package="Media Library Assistant">
6394
+ <name>$query_parameters</name>
6395
+ <default><![CDATA[array()]]></default>
6396
+ <docblock line="899">
6397
+ <description><![CDATA[WP_Query filter "parameters"]]></description>
6398
+ <long-description><![CDATA[<p>This array defines parameters for the query's where and orderby filters,
6399
+ mla_shortcode_query_posts_where_filter and mla_shortcode_query_posts_orderby_filter.
6400
+ The parameters are set up in the mla_get_shortcode_attachments function, and
6401
+ any further logic required to translate those values is contained in the filter.</p>
6402
+
6403
+ <p>Array index values are: orderby, post_parent</p>]]></long-description>
6404
+ <tag line="899" name="since" description="1.13"/>
6405
+ <tag line="899" name="var" description="" type="array">
6406
+ <type by_reference="false">array</type>
6407
+ </tag>
6408
+ </docblock>
6409
+ </property>
6410
+ <property final="false" static="true" visibility="private" line="1022" namespace="global" package="Media Library Assistant">
6411
+ <name>$data_selection_parameters</name>
6412
+ <default><![CDATA[array('order' => 'ASC', 'orderby' => 'menu_order,ID', 'id' => NULL, 'ids' => array(), 'include' => array(), 'exclude' => array(), 'post_parent' => NULL, 'author' => NULL, 'author_name' => '', 'cat' => 0, 'category_name' => '', 'category__and' => array(), 'category__in' => array(), 'category__not_in' => array(), 'tag' => '', 'tag_id' => 0, 'tag__and' => array(), 'tag__in' => array(), 'tag__not_in' => array(), 'tag_slug__and' => array(), 'tag_slug__in' => array(), 'tax_operator' => '', 'post_type' => 'attachment', 'post_status' => 'inherit', 'post_mime_type' => 'image', 'nopaging' => true, 'numberposts' => 0, 'posts_per_page' => 0, 'posts_per_archive_page' => 0, 'paged' => NULL, 'offset' => NULL, 'meta_key' => '', 'meta_value' => '', 'meta_value_num' => NULL, 'meta_compare' => '', 'meta_query' => '', 's' => '')]]></default>
6413
+ <docblock line="1015">
6414
+ <description><![CDATA[Data selection parameters for the WP_Query in [mla_gallery]]]></description>
6415
+ <long-description><![CDATA[]]></long-description>
6416
+ <tag line="1015" name="since" description="1.30"/>
6417
+ <tag line="1015" name="var" description="" type="array">
6418
+ <type by_reference="false">array</type>
6419
  </tag>
6420
  </docblock>
6421
  </property>
6422
+ <property final="false" static="true" visibility="private" line="1516" namespace="global" package="Media Library Assistant">
6423
+ <name>$mla_iptc_records</name>
6424
+ <default><![CDATA[array("1#000" => "Model Version", "1#005" => "Destination", "1#020" => "File Format", "1#022" => "File Format Version", "1#030" => "Service Identifier", "1#040" => "Envelope Number", "1#050" => "Product ID", "1#060" => "Envelope Priority", "1#070" => "Date Sent", "1#080" => "Time Sent", "1#090" => "Coded Character Set", "1#100" => "UNO", "1#120" => "ARM Identifier", "1#122" => "ARM Version", "2#000" => "Record Version", "2#003" => "Object Type Reference", "2#004" => "Object Attribute Reference", "2#005" => "Object Name", "2#007" => "Edit Status", "2#008" => "Editorial Update", "2#010" => "Urgency", "2#012" => "Subject Reference", "2#015" => "Category", "2#020" => "Supplemental Category", "2#022" => "Fixture Identifier", "2#025" => "Keywords", "2#026" => "Content Location Code", "2#027" => "Content Location Name", "2#030" => "Release Date", "2#035" => "Release Time", "2#037" => "Expiration Date", "2#038" => "Expiration Time", "2#040" => "Special Instructions", "2#042" => "Action Advised", "2#045" => "Reference Service", "2#047" => "Reference Date", "2#050" => "Reference Number", "2#055" => "Date Created", "2#060" => "Time Created", "2#062" => "Digital Creation Date", "2#063" => "Digital Creation Time", "2#065" => "Originating Program", "2#070" => "Program Version", "2#075" => "Object Cycle", "2#080" => "By-line", "2#085" => "By-line Title", "2#090" => "City", "2#092" => "Sub-location", "2#095" => "Province or State", "2#100" => "Country or Primary Location Code", "2#101" => "Country or Primary Location Name", "2#103" => "Original Transmission Reference", "2#105" => "Headline", "2#110" => "Credit", "2#115" => "Source", "2#116" => "Copyright Notice", "2#118" => "Contact", "2#120" => "Caption or Abstract", "2#122" => "Caption Writer or Editor", "2#125" => "Rasterized Caption", "2#130" => "Image Type", "2#131" => "Image Orientation", "2#135" => "Language Identifier", "2#150" => "Audio Type", "2#151" => "Audio Sampling Rate", "2#152" => "Audio Sampling Resolution", "2#153" => "Audio Duration", "2#154" => "Audio Outcue", "2#200" => "ObjectData Preview File Format", "2#201" => "ObjectData Preview File Format Version", "2#202" => "ObjectData Preview Data", "7#010" => "Size Mode", "7#020" => "Max Subfile Size", "7#090" => "ObjectData Size Announced", "7#095" => "Maximum ObjectData Size", "8#010" => "Subfile", "9#010" => "Confirmed ObjectData Size")]]></default>
6425
+ <docblock line="1506">
6426
+ <description><![CDATA[IPTC Dataset identifiers and names]]></description>
6427
+ <long-description><![CDATA[<p>This array contains the identifiers and names of Datasets defined in
6428
+ the "IPTC-NAA Information Interchange Model Version No. 4.1".</p>]]></long-description>
6429
+ <tag line="1506" name="since" description="0.90"/>
6430
+ <tag line="1506" name="var" description="" type="array">
6431
+ <type by_reference="false">array</type>
6432
  </tag>
6433
  </docblock>
6434
  </property>
6435
+ <property final="false" static="true" visibility="public" line="1615" namespace="global" package="Media Library Assistant">
6436
+ <name>$mla_iptc_keys</name>
6437
+ <default><![CDATA[array('model-version' => '1#000', 'destination' => '1#005', 'file-format' => '1#020', 'file-format-version' => '1#022', 'service-identifier' => '1#030', 'envelope-number' => '1#040', 'product-id' => '1#050', 'envelope-priority' => '1#060', 'date-sent' => '1#070', 'time-sent' => '1#080', 'coded-character-set' => '1#090', 'uno' => '1#100', 'arm-identifier' => '1#120', 'arm-version' => '1#122', 'record-version' => '2#000', 'object-type-reference' => '2#003', 'object-attribute-reference' => '2#004', 'object-name' => '2#005', 'edit-status' => '2#007', 'editorial-update' => '2#008', 'urgency' => '2#010', 'subject-reference' => '2#012', 'category' => '2#015', 'supplemental-category' => '2#020', 'fixture-identifier' => '2#022', 'keywords' => '2#025', 'content-location-code' => '2#026', 'content-location-name' => '2#027', 'release-date' => '2#030', 'release-time' => '2#035', 'expiration-date' => '2#037', 'expiration-time' => '2#038', 'special-instructions' => '2#040', 'action-advised' => '2#042', 'reference-service' => '2#045', 'reference-date' => '2#047', 'reference-number' => '2#050', 'date-created' => '2#055', 'time-created' => '2#060', 'digital-creation-date' => '2#062', 'digital-creation-time' => '2#063', 'originating-program' => '2#065', 'program-version' => '2#070', 'object-cycle' => '2#075', 'by-line' => '2#080', 'by-line-title' => '2#085', 'city' => '2#090', 'sub-location' => '2#092', 'province-or-state' => '2#095', 'country-or-primary-location-code' => '2#100', 'country-or-primary-location-name' => '2#101', 'original-transmission-reference' => '2#103', 'headline' => '2#105', 'credit' => '2#110', 'source' => '2#115', 'copyright-notice' => '2#116', 'contact' => '2#118', 'caption-or-abstract' => '2#120', 'caption-writer-or-editor' => '2#122', 'rasterized-caption' => '2#125', 'image-type' => '2#130', 'image-orientation' => '2#131', 'language-identifier' => '2#135', 'audio-type' => '2#150', 'audio-sampling-rate' => '2#151', 'audio-sampling-resolution' => '2#152', 'audio-duration' => '2#153', 'audio-outcue' => '2#154', 'objectdata-preview-file-format' => '2#200', 'objectdata-preview-file-format-version' => '2#201', 'objectdata-preview-data' => '2#202', 'size-mode' => '7#010', 'max-subfile-size' => '7#020', 'objectdata-size-announced' => '7#090', 'maximum-objectdata-size' => '7#095', 'subfile' => '8#010', 'confirmed-objectdata-size' => '9#010')]]></default>
6438
+ <docblock line="1605">
6439
+ <description><![CDATA[IPTC Dataset friendly name/slug and identifiers]]></description>
6440
+ <long-description><![CDATA[<p>This array contains the sanitized names and identifiers of Datasets defined in
6441
+ the "IPTC-NAA Information Interchange Model Version No. 4.1".</p>]]></long-description>
6442
+ <tag line="1605" name="since" description="0.90"/>
6443
+ <tag line="1605" name="var" description="" type="array">
6444
+ <type by_reference="false">array</type>
6445
  </tag>
6446
  </docblock>
6447
  </property>
6448
+ <property final="false" static="true" visibility="private" line="1714" namespace="global" package="Media Library Assistant">
6449
+ <name>$mla_iptc_descriptions</name>
6450
+ <default><![CDATA[array("1#000" => "2 octet binary IIM version number", "1#005" => "Max 1024 characters of Destination (ISO routing information); repeatable", "1#020" => "2 octet binary file format number, see IPTC-NAA V4 Appendix A", "1#022" => "2 octet binary file format version number", "1#030" => "Max 10 characters of Service Identifier and product", "1#040" => "8 Character Envelope Number", "1#050" => "Max 32 characters subset of provider's overall service; repeatable", "1#060" => "1 numeric character of envelope handling priority (not urgency)", "1#070" => "8 numeric characters of Date Sent by service - CCYYMMDD", "1#080" => "11 characters of Time Sent by service - HHMMSS±HHMM", "1#090" => "Max 32 characters of control functions, etc.", "1#100" => "14 to 80 characters of eternal, globally unique identification for objects", "1#120" => "2 octet binary Abstract Relationship Model Identifier", "1#122" => "2 octet binary Abstract Relationship Model Version", "2#000" => "2 octet binary Information Interchange Model, Part II version number", "2#003" => "3 to 67 Characters of Object Type Reference number and optional text", "2#004" => "3 to 67 Characters of Object Attribute Reference number and optional text; repeatable", "2#005" => "Max 64 characters of the object name or shorthand reference", "2#007" => "Max 64 characters of the status of the objectdata", "2#008" => "2 numeric characters of the type of update this object provides", "2#010" => "1 numeric character of the editorial urgency of content", "2#012" => "13 to 236 characters of a structured definition of the subject matter; repeatable", "2#015" => "Max 3 characters of the subject of the objectdata, DEPRECATED", "2#020" => "Max 32 characters (each) of further refinement of subject, DEPRECATED; repeatable", "2#022" => "Max 32 characters identifying recurring, predictable content", "2#025" => "Max 64 characters (each) of tags; repeatable", "2#026" => "3 characters of ISO3166 country code or IPTC-assigned code; repeatable", "2#027" => "Max 64 characters of publishable country/geographical location name; repeatable", "2#030" => "8 numeric characters of Release Date - CCYYMMDD", "2#035" => "11 characters of Release Time (earliest use) - HHMMSS±HHMM", "2#037" => "8 numeric characters of Expiration Date (latest use) - CCYYMDD", "2#038" => "11 characters of Expiration Time (latest use) - HHMMSS±HHMM", "2#040" => "Max 256 Characters of editorial instructions, e.g., embargoes and warnings", "2#042" => "2 numeric characters of type of action this object provides to a previous object", "2#045" => "Max 10 characters of the Service ID (1#030) of a prior envelope; repeatable", "2#047" => "8 numeric characters of prior envelope Reference Date (1#070) - CCYYMMDD; repeatable", "2#050" => "8 characters of prior envelope Reference Number (1#040); repeatable", "2#055" => "8 numeric characters of intellectual content Date Created - CCYYMMDD", "2#060" => "11 characters of intellectual content Time Created - HHMMSS±HHMM", "2#062" => "8 numeric characters of digital representation creation date - CCYYMMDD", "2#063" => "11 characters of digital representation creation time - HHMMSS±HHMM", "2#065" => "Max 32 characters of the program used to create the objectdata", "2#070" => "Program Version - Max 10 characters of the version of the program used to create the objectdata", "2#075" => "1 character where a=morning, p=evening, b=both", "2#080" => "Max 32 Characters of the name of the objectdata creator, e.g., the writer, photographer; repeatable", "2#085" => "Max 32 characters of the title of the objectdata creator; repeatable", "2#090" => "Max 32 Characters of the city of objectdata origin", "2#092" => "Max 32 Characters of the location within the city of objectdata origin", "2#095" => "Max 32 Characters of the objectdata origin Province or State", "2#100" => "3 characters of ISO3166 or IPTC-assigned code for Country of objectdata origin", "2#101" => "Max 64 characters of publishable country/geographical location name of objectdata origin", "2#103" => "Max 32 characters of a code representing the location of original transmission", "2#105" => "Max 256 Characters of a publishable entry providing a synopsis of the contents of the objectdata", "2#110" => "Max 32 Characters that identifies the provider of the objectdata (Vs the owner/creator)", "2#115" => "Max 32 Characters that identifies the original owner of the intellectual content", "2#116" => "Max 128 Characters that contains any necessary copyright notice", "2#118" => "Max 128 characters that identifies the person or organisation which can provide further background information; repeatable", "2#120" => "Max 2000 Characters of a textual description of the objectdata", "2#122" => "Max 32 Characters that the identifies the person involved in the writing, editing or correcting the objectdata or caption/abstract; repeatable", "2#125" => "7360 binary octets of the rasterized caption - 1 bit per pixel, 460x128-pixel image", "2#130" => "2 characters of color composition type and information", "2#131" => "1 alphabetic character indicating the image area layout - P=portrait, L=landscape, S=square", "2#135" => "2 or 3 aphabetic characters containing the major national language of the object, according to the ISO 639:1988 codes", "2#150" => "2 characters identifying monaural/stereo and exact type of audio content", "2#151" => "6 numeric characters representing the audio sampling rate in hertz (Hz)", "2#152" => "2 numeric characters representing the number of bits in each audio sample", "2#153" => "6 numeric characters of the Audio Duration - HHMMSS", "2#154" => "Max 64 characters of the content of the end of an audio objectdata", "2#200" => "2 octet binary file format of the ObjectData Preview", "2#201" => "2 octet binary particular version of the ObjectData Preview File Format", "2#202" => "Max 256000 binary octets containing the ObjectData Preview data", "7#010" => "1 numeric character - 0=objectdata size not known, 1=objectdata size known at beginning of transfer", "7#020" => "4 octet binary maximum subfile dataset(s) size", "7#090" => "4 octet binary objectdata size if known at beginning of transfer", "7#095" => "4 octet binary largest possible objectdata size", "8#010" => "Subfile DataSet containing the objectdata itself; repeatable", "9#010" => "4 octet binary total objectdata size")]]></default>
6451
+ <docblock line="1704">
6452
+ <description><![CDATA[IPTC Dataset descriptions]]></description>
6453
+ <long-description><![CDATA[<p>This array contains the descriptions of Datasets defined in
6454
+ the "IPTC-NAA Information Interchange Model Version No. 4.1".</p>]]></long-description>
6455
+ <tag line="1704" name="since" description="0.90"/>
6456
+ <tag line="1704" name="var" description="" type="array">
6457
+ <type by_reference="false">array</type>
6458
+ </tag>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6459
  </docblock>
6460
  </property>
6461
+ <property final="false" static="true" visibility="private" line="1813" namespace="global" package="Media Library Assistant">
6462
+ <name>$mla_iptc_formats</name>
6463
+ <default><![CDATA[array(0 => "No ObjectData", 1 => "IPTC-NAA Digital Newsphoto Parameter Record", 2 => "IPTC7901 Recommended Message Format", 3 => "Tagged Image File Format (Adobe/Aldus Image data)", 4 => "Illustrator (Adobe Graphics data)", 5 => "AppleSingle (Apple Computer Inc)", 6 => "NAA 89-3 (ANPA 1312)", 7 => "MacBinary II", 0 => "IPTC Unstructured Character Oriented File Format (UCOFF)", 0 => "United Press International ANPA 1312 variant", 10 => "United Press International Down-Load Message", 11 => "JPEG File Interchange (JFIF)", 12 => "Photo-CD Image-Pac (Eastman Kodak)", 13 => "Microsoft Bit Mapped Graphics File [*.BMP]", 14 => "Digital Audio File [*.WAV] (Microsoft & Creative Labs)", 15 => "Audio plus Moving Video [*.AVI] (Microsoft)", 16 => "PC DOS/Windows Executable Files [*.COM][*.EXE]", 17 => "Compressed Binary File [*.ZIP] (PKWare Inc)", 18 => "Audio Interchange File Format AIFF (Apple Computer Inc)", 19 => "RIFF Wave (Microsoft Corporation)", 20 => "Freehand (Macromedia/Aldus)", 21 => "Hypertext Markup Language - HTML (The Internet Society)", 22 => "MPEG 2 Audio Layer 2 (Musicom), ISO/IEC", 23 => "MPEG 2 Audio Layer 3, ISO/IEC", 24 => "Portable Document File (*.PDF) Adobe", 25 => "News Industry Text Format (NITF)", 26 => "Tape Archive (*.TAR)", 27 => "Tidningarnas Telegrambyrå NITF version (TTNITF DTD)", 28 => "Ritzaus Bureau NITF version (RBNITF DTD)", 29 => "Corel Draw [*.CDR]")]]></default>
6464
+ <docblock line="1803">
6465
+ <description><![CDATA[IPTC file format identifiers and descriptions]]></description>
6466
+ <long-description><![CDATA[<p>This array contains the file format identifiers and descriptions defined in
6467
+ the "IPTC-NAA Information Interchange Model Version No. 4.1" for dataset 1#020.</p>]]></long-description>
6468
+ <tag line="1803" name="since" description="0.90"/>
6469
+ <tag line="1803" name="var" description="" type="array">
6470
  <type by_reference="false">array</type>
6471
  </tag>
6472
  </docblock>
6473
  </property>
6474
+ <property final="false" static="true" visibility="private" line="1856" namespace="global" package="Media Library Assistant">
6475
+ <name>$mla_iptc_image_types</name>
6476
+ <default><![CDATA[array("M" => "Monochrome", "Y" => "Yellow Component", "M" => "Magenta Component", "C" => "Cyan Component", "K" => "Black Component", "R" => "Red Component", "G" => "Green Component", "B" => "Blue Component", "T" => "Text Only", "F" => "Full colour composite, frame sequential", "L" => "Full colour composite, line sequential", "P" => "Full colour composite, pixel sequential", "S" => "Full colour composite, special interleaving")]]></default>
6477
+ <docblock line="1846">
6478
+ <description><![CDATA[IPTC image type identifiers and descriptions]]></description>
6479
+ <long-description><![CDATA[<p>This array contains the image type identifiers and descriptions defined in
6480
+ the "IPTC-NAA Information Interchange Model Version No. 4.1" for dataset 2#130, octet 2.</p>]]></long-description>
6481
+ <tag line="1846" name="since" description="0.90"/>
6482
+ <tag line="1846" name="var" description="" type="array">
6483
  <type by_reference="false">array</type>
6484
  </tag>
6485
  </docblock>
6486
  </property>
6487
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="23" package="Media Library Assistant">
6488
  <name>initialize</name>
6489
  <full_name>initialize</full_name>
6490
+ <docblock line="16">
6491
  <description><![CDATA[Initialization function, similar to __construct()]]></description>
6492
  <long-description><![CDATA[]]></long-description>
6493
+ <tag line="16" name="since" description="0.20"/>
6494
+ <tag line="16" name="return" description="" type="void">
6495
  <type by_reference="false">void</type>
6496
  </tag>
6497
  </docblock>
6498
  </method>
6499
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="35" package="Media Library Assistant">
6500
+ <name>mla_attachment_list_shortcode</name>
6501
+ <full_name>mla_attachment_list_shortcode</full_name>
6502
+ <docblock line="28">
6503
+ <description><![CDATA[WordPress Shortcode; renders a complete list of all attachments and references to them]]></description>
6504
  <long-description><![CDATA[]]></long-description>
6505
+ <tag line="28" name="since" description="0.1"/>
6506
+ <tag line="28" name="return" description="echoes HTML markup for the attachment list" type="void">
6507
  <type by_reference="false">void</type>
6508
  </tag>
6509
  </docblock>
6510
  </method>