Media Library Assistant - Version 0.80

Version Description

  • New: MLA Gllery Style and Markup Templates, for control over CSS styles, HTML markup and data content of [mla_gallery] shortcode output.
  • New: The [mla_gallery] "mla_link_text", "mla_rollover_text" and "mla_caption", parameters allow easy customization of gallery display.
  • New: The [mla_gallery] "link" parameter now accepts size values, e.g., "medium", to generate a link to image sizes other than "full".
  • New: The [mla_gallery] "mla_debug" parameter provides debugging information for query parameters.
  • New: Quick Edit area now includes caption field.
  • New: Settings page now divided into three tabbed subpages for easier access to settings and documentation.
  • New: For WordPress 3.5, Custom Field support added to attachments and to the WordPress standard Edit Media Screen.
  • New: For WordPress version 3.5, the WordPress standard Edit Media screen now includes Last Modified date, Parent Info, Menu Order, Image Metadata and all "where-used" information.
  • New: For WordPress versions before 3.5, the MLA Edit single item screen now includes "Gallery in" and "MLA Gallery in" information.
  • Fix: Bulk edit now supports "No Change" option for Author.
  • Fix: Bulk edit now supports changing Parent ID to "0" (unattached).
  • Fix: Where-used reporting corrected for sites without month- and year-based folders.
  • Fix: "No Categories" filtering fixed; used to return items with categories in some cases.
Download this release

Release Info

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

Code changes from version 0.71 to 0.80

includes/class-mla-data.php CHANGED
@@ -35,7 +35,7 @@ class MLAData {
35
  * @since 0.1
36
  *
37
  * @param string Complete path and name of the template file, option name or the raw template
38
- * @param string Type of template source; 'file', 'option', 'string'
39
  *
40
  * @return string|array|false|NULL
41
  * string for files that do not contain template divider comments,
@@ -186,7 +186,7 @@ class MLAData {
186
  /*
187
  * Add parent data
188
  */
189
- $parent_data = self::_fetch_attachment_parent_data( $attachment->post_parent );
190
  foreach ( $parent_data as $parent_key => $parent_value ) {
191
  $attachments[ $index ]->$parent_key = $parent_value;
192
  }
@@ -194,7 +194,7 @@ class MLAData {
194
  /*
195
  * Add meta data
196
  */
197
- $meta_data = self::_fetch_attachment_metadata( $attachment->ID );
198
  foreach ( $meta_data as $meta_key => $meta_value ) {
199
  $attachments[ $index ]->$meta_key = $meta_value;
200
  }
@@ -230,8 +230,8 @@ class MLAData {
230
  * @since 0.1
231
  *
232
  * @param array query parameters from web page, usually found in $_REQUEST
233
- * @param int number of rows to skip over to reach desired page
234
- * @param int number of rows on each page (0 = all rows)
235
  *
236
  * @return array revised arguments suitable for WP_Query
237
  */
@@ -280,10 +280,12 @@ class MLAData {
280
  if ( array_key_exists( $value, MLA_List_Table::mla_get_attachment_mime_types( ) ) )
281
  $clean_request[ $key ] = $value;
282
  break;
 
 
 
283
  /*
284
  * ['m'] - filter by year and month of post, e.g., 201204
285
  */
286
- case 'post_parent':
287
  case 'author':
288
  case 'm':
289
  $clean_request[ $key ] = absint( $value );
@@ -388,16 +390,16 @@ class MLAData {
388
  /*
389
  * ['mla_filter_term'] - filter by taxonomy
390
  *
391
- * cat = '0' is "All Categories", i.e., no filtering
392
- * cat = '-1' is "No Categories"
393
  */
394
  if ( isset( $clean_request['mla_filter_term'] ) ) {
395
- if ( $clean_request['mla_filter_term'] != '0' ) {
396
  $tax_filter = MLASettings::mla_taxonomy_support('', 'filter');
397
- if ( $clean_request['mla_filter_term'] == '-1' ) {
398
  $term_list = get_terms( $tax_filter, array(
399
  'fields' => 'ids',
400
- 'hide_empty' => true
401
  ) );
402
  $clean_request['tax_query'] = array(
403
  array(
@@ -671,12 +673,12 @@ class MLAData {
671
  /*
672
  * Add parent data
673
  */
674
- $post_data = array_merge( $post_data, self::_fetch_attachment_parent_data( $post_data['post_parent'] ) );
675
 
676
  /*
677
  * Add meta data
678
  */
679
- $post_data = array_merge( $post_data, self::_fetch_attachment_metadata( $post_id ) );
680
 
681
  /*
682
  * Add references
@@ -739,16 +741,9 @@ class MLAData {
739
  $attachment_metadata = get_post_meta( $ID, '_wp_attachment_metadata', true );
740
  if ( empty( $attachment_metadata ) ) {
741
  $references['base_file'] = get_post_meta( $ID, '_wp_attached_file', true );
742
- $references['files'][ $references['base_file'] ] = $references['base_file'];
743
- $last_slash = strrpos( $references['base_file'], '/' );
744
- $references['path'] = substr( $references['base_file'], 0, $last_slash + 1 );
745
- $references['file'] = substr( $references['base_file'], $last_slash + 1 );
746
- } else {
747
  $references['base_file'] = $attachment_metadata['file'];
748
- $references['files'][ $references['base_file'] ] = $references['base_file'];
749
- $last_slash = strrpos( $references['base_file'], '/' );
750
- $references['path'] = substr( $references['base_file'], 0, $last_slash + 1 );
751
- $references['file'] = substr( $references['base_file'], $last_slash + 1 );
752
  $sizes = $attachment_metadata['sizes'];
753
  if ( !empty( $sizes ) ) {
754
  /* Using the name as the array key ensures each name is added only once */
@@ -757,8 +752,19 @@ class MLAData {
757
  }
758
 
759
  }
760
- }
761
 
 
 
 
 
 
 
 
 
 
 
 
762
  /*
763
  * Process the where-used settings option
764
  */
@@ -771,25 +777,21 @@ class MLAData {
771
  * Look for the "Featured Image(s)"
772
  */
773
  $features = $wpdb->get_results(
774
- $wpdb->prepare(
775
  "
776
  SELECT post_id
777
  FROM {$wpdb->postmeta}
778
  WHERE meta_key = '_thumbnail_id' AND meta_value = {$ID}
779
  "
780
- )
781
  );
782
 
783
  if ( !empty( $features ) ) {
784
  foreach ( $features as $feature ) {
785
  $feature_results = $wpdb->get_results(
786
- $wpdb->prepare(
787
  "
788
  SELECT post_type, post_title
789
  FROM {$wpdb->posts}
790
  WHERE {$exclude_revisions}(ID = {$feature->post_id})
791
  "
792
- )
793
  );
794
 
795
  if ( !empty( $feature_results ) ) {
@@ -1029,7 +1031,7 @@ class MLAData {
1029
  *
1030
  * @return array Parent information; post_date, post_title and post_type
1031
  */
1032
- private static function _fetch_attachment_parent_data( $parent_id ) {
1033
  $parent_data = array();
1034
  if ( $parent_id ) {
1035
  $parent = get_post( $parent_id );
@@ -1057,7 +1059,7 @@ class MLAData {
1057
  *
1058
  * @return array Meta data variables
1059
  */
1060
- private static function _fetch_attachment_metadata( $post_id ) {
1061
  $results = array();
1062
  $post_meta = get_metadata( 'post', $post_id );
1063
 
@@ -1094,5 +1096,243 @@ class MLAData {
1094
 
1095
  return $results;
1096
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1097
  } // class MLAData
1098
  ?>
35
  * @since 0.1
36
  *
37
  * @param string Complete path and name of the template file, option name or the raw template
38
+ * @param string Optional type of template source; 'file' (default), 'option', 'string'
39
  *
40
  * @return string|array|false|NULL
41
  * string for files that do not contain template divider comments,
186
  /*
187
  * Add parent data
188
  */
189
+ $parent_data = self::mla_fetch_attachment_parent_data( $attachment->post_parent );
190
  foreach ( $parent_data as $parent_key => $parent_value ) {
191
  $attachments[ $index ]->$parent_key = $parent_value;
192
  }
194
  /*
195
  * Add meta data
196
  */
197
+ $meta_data = self::mla_fetch_attachment_metadata( $attachment->ID );
198
  foreach ( $meta_data as $meta_key => $meta_value ) {
199
  $attachments[ $index ]->$meta_key = $meta_value;
200
  }
230
  * @since 0.1
231
  *
232
  * @param array query parameters from web page, usually found in $_REQUEST
233
+ * @param int Optional number of rows (default 0) to skip over to reach desired page
234
+ * @param int Optional number of rows on each page (0 = all rows, default)
235
  *
236
  * @return array revised arguments suitable for WP_Query
237
  */
280
  if ( array_key_exists( $value, MLA_List_Table::mla_get_attachment_mime_types( ) ) )
281
  $clean_request[ $key ] = $value;
282
  break;
283
+ case 'parent':
284
+ $clean_request[ 'post_parent' ] = absint( $value );
285
+ break;
286
  /*
287
  * ['m'] - filter by year and month of post, e.g., 201204
288
  */
 
289
  case 'author':
290
  case 'm':
291
  $clean_request[ $key ] = absint( $value );
390
  /*
391
  * ['mla_filter_term'] - filter by taxonomy
392
  *
393
+ * cat = 0 is "All Categories", i.e., no filtering
394
+ * cat = -1 is "No Categories"
395
  */
396
  if ( isset( $clean_request['mla_filter_term'] ) ) {
397
+ if ( $clean_request['mla_filter_term'] != 0 ) {
398
  $tax_filter = MLASettings::mla_taxonomy_support('', 'filter');
399
+ if ( $clean_request['mla_filter_term'] == -1 ) {
400
  $term_list = get_terms( $tax_filter, array(
401
  'fields' => 'ids',
402
+ 'hide_empty' => false
403
  ) );
404
  $clean_request['tax_query'] = array(
405
  array(
673
  /*
674
  * Add parent data
675
  */
676
+ $post_data = array_merge( $post_data, self::mla_fetch_attachment_parent_data( $post_data['post_parent'] ) );
677
 
678
  /*
679
  * Add meta data
680
  */
681
+ $post_data = array_merge( $post_data, self::mla_fetch_attachment_metadata( $post_id ) );
682
 
683
  /*
684
  * Add references
741
  $attachment_metadata = get_post_meta( $ID, '_wp_attachment_metadata', true );
742
  if ( empty( $attachment_metadata ) ) {
743
  $references['base_file'] = get_post_meta( $ID, '_wp_attached_file', true );
744
+ } // empty( $attachment_metadata )
745
+ else {
 
 
 
746
  $references['base_file'] = $attachment_metadata['file'];
 
 
 
 
747
  $sizes = $attachment_metadata['sizes'];
748
  if ( !empty( $sizes ) ) {
749
  /* Using the name as the array key ensures each name is added only once */
752
  }
753
 
754
  }
755
+ } // ! empty( $attachment_metadata )
756
 
757
+ $references['files'][ $references['base_file'] ] = $references['base_file'];
758
+ $last_slash = strrpos( $references['base_file'], '/' );
759
+ if ( false === $last_slash ) {
760
+ $references['path'] = '';
761
+ $references['file'] = $references['base_file'];
762
+ }
763
+ else {
764
+ $references['path'] = substr( $references['base_file'], 0, $last_slash + 1 );
765
+ $references['file'] = substr( $references['base_file'], $last_slash + 1 );
766
+ }
767
+
768
  /*
769
  * Process the where-used settings option
770
  */
777
  * Look for the "Featured Image(s)"
778
  */
779
  $features = $wpdb->get_results(
 
780
  "
781
  SELECT post_id
782
  FROM {$wpdb->postmeta}
783
  WHERE meta_key = '_thumbnail_id' AND meta_value = {$ID}
784
  "
 
785
  );
786
 
787
  if ( !empty( $features ) ) {
788
  foreach ( $features as $feature ) {
789
  $feature_results = $wpdb->get_results(
 
790
  "
791
  SELECT post_type, post_title
792
  FROM {$wpdb->posts}
793
  WHERE {$exclude_revisions}(ID = {$feature->post_id})
794
  "
 
795
  );
796
 
797
  if ( !empty( $feature_results ) ) {
1031
  *
1032
  * @return array Parent information; post_date, post_title and post_type
1033
  */
1034
+ public static function mla_fetch_attachment_parent_data( $parent_id ) {
1035
  $parent_data = array();
1036
  if ( $parent_id ) {
1037
  $parent = get_post( $parent_id );
1059
  *
1060
  * @return array Meta data variables
1061
  */
1062
+ public static function mla_fetch_attachment_metadata( $post_id ) {
1063
  $results = array();
1064
  $post_meta = get_metadata( 'post', $post_id );
1065
 
1096
 
1097
  return $results;
1098
  }
1099
+
1100
+ /**
1101
+ * Update a single item; change the meta data
1102
+ * for a single attachment.
1103
+ *
1104
+ * @since 0.1
1105
+ *
1106
+ * @param int The ID of the attachment to be updated
1107
+ * @param array Field name => value pairs
1108
+ * @param array Optional taxonomy term values, default null
1109
+ * @param array Optional taxonomy actions (add, remove, replace), default null
1110
+ *
1111
+ * @return array success/failure message and NULL content
1112
+ */
1113
+ public static function mla_update_single_item( $post_id, $new_data, $tax_input = NULL, $tax_actions = NULL ) {
1114
+ $post_data = MLAData::mla_get_attachment_by_id( $post_id );
1115
+
1116
+ if ( !isset( $post_data ) )
1117
+ return array(
1118
+ 'message' => 'ERROR: Could not retrieve Attachment.',
1119
+ 'body' => ''
1120
+ );
1121
+
1122
+ $message = '';
1123
+ $updates = array( 'ID' => $post_id );
1124
+ $new_data = stripslashes_deep( $new_data );
1125
+
1126
+ foreach ( $new_data as $key => $value ) {
1127
+ switch ( $key ) {
1128
+ case 'post_title':
1129
+ if ( $value == $post_data[ $key ] )
1130
+ break;
1131
+
1132
+ $message .= sprintf( 'Changing Title from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), esc_attr( $value ) );
1133
+ $updates[ $key ] = $value;
1134
+ break;
1135
+ case 'post_name':
1136
+ if ( $value == $post_data[ $key ] )
1137
+ break;
1138
+
1139
+ $value = sanitize_title( $value );
1140
+
1141
+ /*
1142
+ * Make sure new slug is unique
1143
+ */
1144
+ $args = array(
1145
+ 'name' => $value,
1146
+ 'post_type' => 'attachment',
1147
+ 'post_status' => 'inherit',
1148
+ 'showposts' => 1
1149
+ );
1150
+ $my_posts = get_posts( $args );
1151
+
1152
+ if ( $my_posts ) {
1153
+ $message .= sprintf( 'ERROR: Could not change Name/Slug "%1$s"; name already exists<br>', $value );
1154
+ } else {
1155
+ $message .= sprintf( 'Changing Name/Slug from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), $value );
1156
+ $updates[ $key ] = $value;
1157
+ }
1158
+ break;
1159
+ case 'image_alt':
1160
+ $key = 'mla_wp_attachment_image_alt';
1161
+ if ( !isset( $post_data[ $key ] ) )
1162
+ $post_data[ $key ] = '';
1163
+
1164
+ if ( $value == $post_data[ $key ] )
1165
+ break;
1166
+
1167
+ if ( empty( $value ) ) {
1168
+ if ( delete_post_meta( $post_id, '_wp_attachment_image_alt', $value ) )
1169
+ $message .= sprintf( 'Deleting Alternate Text, was "%1$s"<br>', esc_attr( $post_data[ $key ] ) );
1170
+ else
1171
+ $message .= sprintf( 'ERROR: Could not delete Alternate Text, remains "%1$s"<br>', esc_attr( $post_data[ $key ] ) );
1172
+ } else {
1173
+ if ( update_post_meta( $post_id, '_wp_attachment_image_alt', $value ) )
1174
+ $message .= sprintf( 'Changing Alternate Text from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), esc_attr( $value ) );
1175
+ else
1176
+ $message .= sprintf( 'ERROR: Could not change Alternate Text from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), esc_attr( $value ) );
1177
+ }
1178
+ break;
1179
+ case 'post_excerpt':
1180
+ if ( $value == $post_data[ $key ] )
1181
+ break;
1182
+
1183
+ $message .= sprintf( 'Changing Caption from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), esc_attr( $value ) );
1184
+ $updates[ $key ] = $value;
1185
+ break;
1186
+ case 'post_content':
1187
+ if ( $value == $post_data[ $key ] )
1188
+ break;
1189
+
1190
+ $message .= sprintf( 'Changing Description from "%1$s" to "%2$s"<br>', esc_textarea( $post_data[ $key ] ), esc_textarea( $value ) );
1191
+ $updates[ $key ] = $value;
1192
+ break;
1193
+ case 'post_parent':
1194
+ if ( $value == $post_data[ $key ] )
1195
+ break;
1196
+
1197
+ $value = absint( $value );
1198
+
1199
+ $message .= sprintf( 'Changing Parent from "%1$s" to "%2$s"<br>', $post_data[ $key ], $value );
1200
+ $updates[ $key ] = $value;
1201
+ break;
1202
+ case 'menu_order':
1203
+ if ( $value == $post_data[ $key ] )
1204
+ break;
1205
+
1206
+ $value = absint( $value );
1207
+
1208
+ $message .= sprintf( 'Changing Menu Order from "%1$s" to "%2$s"<br>', $post_data[ $key ], $value );
1209
+ $updates[ $key ] = $value;
1210
+ break;
1211
+ case 'post_author':
1212
+ if ( $value == $post_data[ $key ] )
1213
+ break;
1214
+
1215
+ $value = absint( $value );
1216
+
1217
+ $from_user = get_userdata( $post_data[ $key ] );
1218
+ $to_user = get_userdata( $value );
1219
+ $message .= sprintf( 'Changing Author from "%1$s" to "%2$s"<br>', $from_user->display_name, $to_user->display_name );
1220
+ $updates[ $key ] = $value;
1221
+ break;
1222
+ default:
1223
+ // Ignore anything else
1224
+ } // switch $key
1225
+ } // foreach $new_data
1226
+
1227
+ if ( !empty( $tax_input ) ) {
1228
+ foreach ( $tax_input as $taxonomy => $tags ) {
1229
+ if ( !empty( $tax_actions ) )
1230
+ $tax_action = $tax_actions[ $taxonomy ];
1231
+ else
1232
+ $tax_action = 'replace';
1233
+
1234
+ $taxonomy_obj = get_taxonomy( $taxonomy );
1235
+
1236
+ if ( current_user_can( $taxonomy_obj->cap->assign_terms ) ) {
1237
+ $terms_before = wp_get_post_terms( $post_id, $taxonomy, array(
1238
+ 'fields' => 'ids' // all'
1239
+ ) );
1240
+ if ( is_array( $tags ) ) // array = hierarchical, string = non-hierarchical.
1241
+ $tags = array_filter( $tags );
1242
+
1243
+ switch ( $tax_action ) {
1244
+ case 'add':
1245
+ $action_name = 'Adding';
1246
+ $result = wp_set_post_terms( $post_id, $tags, $taxonomy, true );
1247
+ break;
1248
+ case 'remove':
1249
+ $action_name = 'Removing';
1250
+ $tags = self::_remove_tags( $terms_before, $tags, $taxonomy_obj );
1251
+ $result = wp_set_post_terms( $post_id, $tags, $taxonomy );
1252
+ break;
1253
+ case 'replace':
1254
+ $action_name = 'Replacing';
1255
+ $result = wp_set_post_terms( $post_id, $tags, $taxonomy );
1256
+ break;
1257
+ default:
1258
+ $action_name = 'Ignoring';
1259
+ // ignore anything else
1260
+ }
1261
+
1262
+ $terms_after = wp_get_post_terms( $post_id, $taxonomy, array(
1263
+ 'fields' => 'ids' // all'
1264
+ ) );
1265
+
1266
+ if ( $terms_before != $terms_after )
1267
+ $message .= sprintf( '%1$s "%2$s" terms<br>', $action_name, $taxonomy );
1268
+ } // current_user_can
1269
+ else {
1270
+ $message .= sprintf( 'You cannot assign "%1$s" terms<br>', $action_name, $taxonomy );
1271
+ }
1272
+ } // foreach $tax_input
1273
+ } // !empty $tax_input
1274
+
1275
+ if ( empty( $message ) )
1276
+ return array(
1277
+ 'message' => 'Item: ' . $post_id . ', no changes detected.',
1278
+ 'body' => ''
1279
+ );
1280
+ else {
1281
+ if ( wp_update_post( $updates ) )
1282
+ return array(
1283
+ 'message' => 'Item: ' . $post_id . ' updated.<br>' . $message,
1284
+ 'body' => ''
1285
+ );
1286
+ else
1287
+ return array(
1288
+ 'message' => 'ERROR: Item ' . $post_id . ' update failed.',
1289
+ 'body' => ''
1290
+ );
1291
+ }
1292
+ }
1293
+
1294
+ /**
1295
+ * Remove tags from a term ids list
1296
+ *
1297
+ * @since 0.40
1298
+ *
1299
+ * @param array The term ids currently assigned
1300
+ * @param array | string The term ids (array) or names (string) to remove
1301
+ * @param object The taxonomy object
1302
+ *
1303
+ * @return array Term ids of the surviving tags
1304
+ */
1305
+ private static function _remove_tags( $terms_before, $tags, $taxonomy_obj ) {
1306
+ if ( ! is_array( $tags ) ) {
1307
+ /*
1308
+ * Convert names to term ids
1309
+ */
1310
+ $comma = _x( ',', 'tag delimiter' );
1311
+ if ( ',' !== $comma )
1312
+ $tags = str_replace( $comma, ',', $tags );
1313
+ $terms = explode( ',', trim( $tags, " \n\t\r\0\x0B," ) );
1314
+
1315
+ $tags = array ( );
1316
+ foreach ( (array) $terms as $term) {
1317
+ if ( !strlen(trim($term)) )
1318
+ continue;
1319
+
1320
+ // Skip if a non-existent term name is passed.
1321
+ if ( ! $term_info = term_exists($term, $taxonomy_obj->name ) )
1322
+ continue;
1323
+
1324
+ if ( is_wp_error($term_info) )
1325
+ continue;
1326
+
1327
+ $tags[] = $term_info['term_id'];
1328
+ } // foreach term
1329
+ } // not an array
1330
+
1331
+ $tags = array_map( 'intval', $tags );
1332
+ $tags = array_unique( $tags );
1333
+ $terms_after = array_diff( array_map( 'intval', $terms_before ), $tags );
1334
+
1335
+ return $terms_after;
1336
+ }
1337
  } // class MLAData
1338
  ?>
includes/class-mla-edit-media.php ADDED
@@ -0,0 +1,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Media Library Assistant Edit Media screen enhancements
4
+ *
5
+ * @package Media Library Assistant
6
+ * @since 0.80
7
+ */
8
+
9
+ /**
10
+ * Class MLA (Media Library Assistant) Edit contains meta boxes for the Edit Media (advanced-form-edit.php) screen
11
+ *
12
+ * @package Media Library Assistant
13
+ * @since 0.80
14
+ */
15
+ class MLAEdit {
16
+ /**
17
+ * Initialization function, similar to __construct()
18
+ *
19
+ * @since 0.80
20
+ *
21
+ * @return void
22
+ */
23
+ public static function initialize() {
24
+ /*
25
+ * WordPress 3.5 uses the advanced-form-edit.php function for the Edit Media
26
+ * page. This supports all the standard meta-boxes for post types.
27
+ */
28
+ if ( MLATest::$wordpress_3point5_plus ) {
29
+ add_post_type_support( 'attachment', 'custom-fields' );
30
+ add_action( 'add_meta_boxes', 'MLAEdit::mla_add_meta_boxes_action', 10, 2 );
31
+
32
+ // do_action in wp-admin/includes/meta-boxes.php function attachment_submit_meta_box
33
+ add_action( 'attachment_submitbox_misc_actions', 'MLAEdit::mla_last_modified_action' );
34
+
35
+ // do_action in wp-includes/post.php function wp_insert_post
36
+ add_action( 'edit_attachment', 'MLAEdit::mla_edit_attachment_action', 10, 1 );
37
+ } // $wordpress_3point5_plus
38
+ }
39
+
40
+ /**
41
+ * Adds Last Modified date to the Submit box on the Edit Media screen.
42
+ * Declared public because it is an action.
43
+ *
44
+ * @since 0.80
45
+ *
46
+ * @return void echoes the HTML markup for the label and value
47
+ */
48
+ public static function mla_last_modified_action( ) {
49
+ global $post;
50
+
51
+ $datef = __( 'M j, Y @ G:i' );
52
+ $stamp = __('Last modified: <b>%1$s</b>');
53
+ $date = date_i18n( $datef, strtotime( $post->post_modified ) );
54
+ echo '<div class="misc-pub-section curtime">' . "\r\n";
55
+ echo '<span id="timestamp">' . sprintf($stamp, $date) . "</span>\r\n";
56
+ echo "</div><!-- .misc-pub-section -->\r\n";
57
+ } // mla_last_modified_action
58
+
59
+ /**
60
+ * Registers meta boxes for the Edit Media screen.
61
+ * Declared public because it is an action.
62
+ *
63
+ * @since 0.80
64
+ *
65
+ * @param string type of the current post, e.g., 'attachment'
66
+ * @param object current post
67
+ *
68
+ * @return void
69
+ */
70
+ public static function mla_add_meta_boxes_action( $post_type, $post ) {
71
+ if ( 'attachment' == $post_type ) {
72
+ add_meta_box( 'mla-parent-info', 'Parent Info', 'MLAEdit::mla_parent_info_handler', 'attachment', 'normal', 'core' );
73
+ add_meta_box( 'mla-menu-order', 'Menu Order', 'MLAEdit::mla_menu_order_handler', 'attachment', 'normal', 'core' );
74
+
75
+ $image_metadata = get_metadata( 'post', $post->ID, '_wp_attachment_metadata', true );
76
+ if ( !empty( $image_metadata ) )
77
+ add_meta_box( 'mla-image-metadata', 'Image Metadata', 'MLAEdit::mla_image_metadata_handler', 'attachment', 'normal', 'core' );
78
+
79
+ add_meta_box( 'mla-featured-in', 'Featured in', 'MLAEdit::mla_featured_in_handler', 'attachment', 'normal', 'core' );
80
+ add_meta_box( 'mla-inserted-in', 'Inserted in', 'MLAEdit::mla_inserted_in_handler', 'attachment', 'normal', 'core' );
81
+ add_meta_box( 'mla-gallery-in', 'Gallery in', 'MLAEdit::mla_gallery_in_handler', 'attachment', 'normal', 'core' );
82
+ add_meta_box( 'mla-mla-gallery-in', 'MLA Gallery in', 'MLAEdit::mla_mla_gallery_in_handler', 'attachment', 'normal', 'core' );
83
+ } // 'attachment'
84
+ } // mla_add_meta_boxes_action
85
+
86
+ /**
87
+ * Where-used values for the current item
88
+ *
89
+ * This array contains the Featured/Inserted/Gallery/MLA Gallery references for the item.
90
+ * The array is built once each page load and cached for subsequent calls.
91
+ *
92
+ * @since 0.80
93
+ *
94
+ * @var array
95
+ */
96
+ private static $mla_references = null;
97
+
98
+ /**
99
+ * Renders the Parent Info meta box on the Edit Media page.
100
+ * Declared public because it is a callback function.
101
+ *
102
+ * @since 0.80
103
+ *
104
+ * @param object current post
105
+ *
106
+ * @return void echoes the HTML markup for the meta box content
107
+ */
108
+ public static function mla_parent_info_handler( $post ) {
109
+ if ( is_null( self::$mla_references ) )
110
+ self::$mla_references = MLAData::mla_fetch_attachment_references( $post->ID, $post->post_parent );
111
+
112
+ if ( is_array( self::$mla_references ) ) {
113
+ if ( self::$mla_references['found_parent'] ) {
114
+ $parent_info = sprintf( '(%1$s) %2$s', self::$mla_references['parent_type'], self::$mla_references['parent_title'] );
115
+ } else {
116
+ $parent_info = '';
117
+ if ( !self::$mla_references['found_reference'] )
118
+ $parent_info .= '(ORPHAN) ';
119
+
120
+ if ( self::$mla_references['is_unattached'] )
121
+ $parent_info .= '(UNATTACHED) ';
122
+ else {
123
+ if ( !self::$mla_references['found_parent'] ) {
124
+ if ( isset( self::$mla_references['parent_title'] ) )
125
+ $parent_info .= '(BAD PARENT) ';
126
+ else
127
+ $parent_info .= '(INVALID PARENT) ';
128
+ }
129
+ }
130
+ } // no parent
131
+ } // is_array
132
+
133
+ echo '<label class="screen-reader-text" for="mla_post_parent">Post Parent</label><input name="mla_post_parent" type="text" size="4" id="mla_post_parent" value="' . $post->post_parent . "\" />\r\n";
134
+ echo '<label class="screen-reader-text" for="mla_parent_info">Parent Info</label><input name="mla_parent_info" type="text" readonly="readonly" size="60" id="mla_parent_info" value="' . esc_attr( $parent_info ) . "\" />\r\n";
135
+ }
136
+
137
+ /**
138
+ * Renders the Menu Order meta box on the Edit Media page.
139
+ * Declared public because it is a callback function.
140
+ *
141
+ * @since 0.80
142
+ *
143
+ * @param object current post
144
+ *
145
+ * @return void echoes the HTML markup for the meta box content
146
+ */
147
+ public static function mla_menu_order_handler( $post ) {
148
+
149
+ echo '<label class="screen-reader-text" for="mla_menu_order">Menu Order</label><input name="mla_menu_order" type="text" size="4" id="mla_menu_order" value="' . $post->menu_order . "\" />\r\n";
150
+ }
151
+
152
+ /**
153
+ * Renders the Image Metadata meta box on the Edit Media page.
154
+ * Declared public because it is a callback function.
155
+ *
156
+ * @since 0.80
157
+ *
158
+ * @param object current post
159
+ *
160
+ * @return void echoes the HTML markup for the meta box content
161
+ */
162
+ public static function mla_image_metadata_handler( $post ) {
163
+ $metadata = MLAData::mla_fetch_attachment_metadata( $post->ID );
164
+
165
+ if ( isset( $metadata['mla_wp_attachment_metadata'] ) )
166
+ $value = var_export( $metadata['mla_wp_attachment_metadata'], true );
167
+ else
168
+ $value = '';
169
+
170
+ echo '<label class="screen-reader-text" for="mla_image_metadata">Image Metadata</label><textarea id="mla_image_metadata" rows="5" cols="80" readonly="readonly" name="mla_image_metadata" >' . esc_textarea( $value ) . "</textarea>\r\n";
171
+ }
172
+
173
+ /**
174
+ * Renders the Featured in meta box on the Edit Media page.
175
+ * Declared public because it is a callback function.
176
+ *
177
+ * @since 0.80
178
+ *
179
+ * @param object current post
180
+ *
181
+ * @return void echoes the HTML markup for the meta box content
182
+ */
183
+ public static function mla_featured_in_handler( $post ) {
184
+ if ( is_null( self::$mla_references ) )
185
+ self::$mla_references = MLAData::mla_fetch_attachment_references( $post->ID, $post->post_parent );
186
+
187
+ if ( is_array( self::$mla_references ) ) {
188
+ $features = '';
189
+
190
+ foreach ( self::$mla_references['features'] as $feature_id => $feature ) {
191
+ if ( $feature_id == $post->post_parent )
192
+ $parent = 'PARENT ';
193
+ else
194
+ $parent = '';
195
+
196
+ $features .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $feature->post_type, /*$3%s*/ $feature_id, /*$4%s*/ $feature->post_title ) . "\r\n";
197
+ } // foreach $feature
198
+ }
199
+
200
+ echo '<label class="screen-reader-text" for="mla_featured_in">Featured in</label><textarea id="mla_featured_in" rows="5" cols="80" readonly="readonly" name="mla_featured_in" >' . esc_textarea( $features ) . "</textarea>\r\n";
201
+ }
202
+
203
+ /**
204
+ * Renders the Inserted in meta box on the Edit Media page.
205
+ * Declared public because it is a callback function.
206
+ *
207
+ * @since 0.80
208
+ *
209
+ * @param object current post
210
+ *
211
+ * @return void echoes the HTML markup for the meta box content
212
+ */
213
+ public static function mla_inserted_in_handler( $post ) {
214
+ if ( is_null( self::$mla_references ) )
215
+ self::$mla_references = MLAData::mla_fetch_attachment_references( $post->ID, $post->post_parent );
216
+
217
+ if ( is_array( self::$mla_references ) ) {
218
+ $inserts = '';
219
+
220
+ foreach ( self::$mla_references['inserts'] as $file => $insert_array ) {
221
+ $inserts .= $file . "\r\n";
222
+
223
+ foreach ( $insert_array as $insert ) {
224
+ if ( $insert->ID == $post->post_parent )
225
+ $parent = ' PARENT ';
226
+ else
227
+ $parent = ' ';
228
+
229
+ $inserts .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $insert->post_type, /*$3%s*/ $insert->ID, /*$4%s*/ $insert->post_title ) . "\r\n";
230
+ } // foreach $insert
231
+ } // foreach $file
232
+ } // is_array
233
+
234
+ echo '<label class="screen-reader-text" for="mla_inserted_in">Inserted in</label><textarea id="mla_inserted_in" rows="5" cols="80" readonly="readonly" name="mla_inserted_in" >' . esc_textarea( $inserts ) . "</textarea>\r\n";
235
+ }
236
+
237
+ /**
238
+ * Renders the Gallery in meta box on the Edit Media page.
239
+ * Declared public because it is a callback function.
240
+ *
241
+ * @since 0.80
242
+ *
243
+ * @param object current post
244
+ *
245
+ * @return void echoes the HTML markup for the meta box content
246
+ */
247
+ public static function mla_gallery_in_handler( $post ) {
248
+ if ( is_null( self::$mla_references ) )
249
+ self::$mla_references = MLAData::mla_fetch_attachment_references( $post->ID, $post->post_parent );
250
+
251
+ $galleries = '';
252
+
253
+ if ( is_array( self::$mla_references ) ) {
254
+ foreach ( self::$mla_references['galleries'] as $gallery_id => $gallery ) {
255
+ if ( $gallery_id == $post->post_parent )
256
+ $parent = 'PARENT ';
257
+ else
258
+ $parent = '';
259
+
260
+ $galleries .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $gallery['post_type'], /*$3%s*/ $gallery_id, /*$4%s*/ $gallery['post_title'] ) . "\r\n";
261
+ } // foreach $feature
262
+ }
263
+
264
+ echo '<label class="screen-reader-text" for="mla_gallery_in">Gallery in</label><textarea id="mla_gallery_in" rows="5" cols="80" readonly="readonly" name="mla_gallery_in" >' . esc_textarea( $galleries ) . "</textarea>\r\n";
265
+ }
266
+
267
+ /**
268
+ * Renders the Gallery in meta box on the Edit Media page.
269
+ * Declared public because it is a callback function.
270
+ *
271
+ * @since 0.80
272
+ *
273
+ * @param object current post
274
+ *
275
+ * @return void echoes the HTML markup for the meta box content
276
+ */
277
+ public static function mla_mla_gallery_in_handler( $post ) {
278
+ if ( is_null( self::$mla_references ) )
279
+ self::$mla_references = MLAData::mla_fetch_attachment_references( $post->ID, $post->post_parent );
280
+
281
+ $galleries = '';
282
+
283
+ if ( is_array( self::$mla_references ) ) {
284
+ foreach ( self::$mla_references['mla_galleries'] as $gallery_id => $gallery ) {
285
+ if ( $gallery_id == $post->post_parent )
286
+ $parent = 'PARENT ';
287
+ else
288
+ $parent = '';
289
+
290
+ $galleries .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $gallery['post_type'], /*$3%s*/ $gallery_id, /*$4%s*/ $gallery['post_title'] ) . "\r\n";
291
+ } // foreach $feature
292
+ }
293
+
294
+ echo '<label class="screen-reader-text" for="mla_mla_gallery_in">MLA Gallery in</label><textarea id="mla_mla_gallery_in" rows="5" cols="80" readonly="readonly" name="mla_mla_gallery_in" >' . esc_textarea( $galleries ) . "</textarea>\r\n";
295
+ }
296
+
297
+ /**
298
+ * Saves updates from the Edit Media screen.
299
+ * Declared public because it is an action.
300
+ *
301
+ * @since 0.80
302
+ *
303
+ * @param integer ID of the current post
304
+ *
305
+ * @return void
306
+ */
307
+ public static function mla_edit_attachment_action( $post_ID ) {
308
+ $new_data = array();
309
+ if ( isset( $_REQUEST['mla_post_parent'] ) )
310
+ $new_data['post_parent'] = $_REQUEST['mla_post_parent'];
311
+
312
+ if ( isset( $_REQUEST['mla_menu_order'] ) )
313
+ $new_data['menu_order'] = $_REQUEST['mla_menu_order'];
314
+
315
+ if ( !empty( $new_data ) ) {
316
+ MLAData::mla_update_single_item( $post_ID, $new_data );
317
+ }
318
+ } // mla_edit_attachment_action
319
+ } //Class MLAEdit
320
+ ?>
includes/class-mla-list-table.php CHANGED
@@ -378,7 +378,8 @@ class MLA_List_Table extends WP_List_Table {
378
  parent::__construct( array(
379
  'singular' => 'attachment', //singular name of the listed records
380
  'plural' => 'attachments', //plural name of the listed records
381
- 'ajax' => true //does this table support ajax?
 
382
  ) );
383
 
384
  $this->currently_hidden = self::get_hidden_columns();
@@ -558,6 +559,7 @@ class MLA_List_Table extends WP_List_Table {
558
  $inline_data = "\r\n" . '<div class="hidden" id="inline_' . $item->ID . "\">\r\n";
559
  $inline_data .= ' <div class="post_title">' . esc_attr( $item->post_title ) . "</div>\r\n";
560
  $inline_data .= ' <div class="post_name">' . esc_attr( $item->post_name ) . "</div>\r\n";
 
561
 
562
  if ( !empty( $item->mla_wp_attachment_metadata ) ) {
563
  if ( isset( $item->mla_wp_attachment_image_alt ) )
@@ -603,8 +605,8 @@ class MLA_List_Table extends WP_List_Table {
603
  $parent_title = '(no title: bad ID)';
604
 
605
  $parent = sprintf( '<a href="%1$s">(parent:%2$s)</a>', esc_url( add_query_arg( array(
606
- 'page' => 'mla-menu',
607
- 'post_parent' => $item->post_parent,
608
  'heading_suffix' => urlencode( 'Parent: ' . $parent_title )
609
  ), 'upload.php' ) ), (string) $item->post_parent );
610
  } // $item->post_parent
@@ -705,8 +707,8 @@ class MLA_List_Table extends WP_List_Table {
705
  $parent_title = '(no title: bad ID)';
706
 
707
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
708
- 'page' => 'mla-menu',
709
- 'post_parent' => $item->post_parent,
710
  'heading_suffix' => urlencode( 'Parent: ' . $parent_title )
711
  ), 'upload.php' ) ), (string) $item->post_parent );
712
  }
@@ -978,7 +980,7 @@ class MLA_List_Table extends WP_List_Table {
978
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
979
  'page' => 'mla-menu',
980
  'author' => $item->post_author,
981
- 'heading_suffix' => urlencode( $user->data->display_name )
982
  ), 'upload.php' ) ), esc_html( $user->data->display_name ) );
983
  else
984
  return 'unknown';
@@ -1087,12 +1089,10 @@ class MLA_List_Table extends WP_List_Table {
1087
  $_num_posts = (array) wp_count_attachments();
1088
  $_total_posts = array_sum( $_num_posts ) - $_num_posts['trash'];
1089
  $total_orphans = $wpdb->get_var(
1090
- $wpdb->prepare(
1091
  "
1092
  SELECT COUNT( * ) FROM {$wpdb->posts}
1093
  WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1
1094
  "
1095
- )
1096
  );
1097
 
1098
  $post_mime_types = self::mla_get_attachment_mime_types();
378
  parent::__construct( array(
379
  'singular' => 'attachment', //singular name of the listed records
380
  'plural' => 'attachments', //plural name of the listed records
381
+ 'ajax' => true, //does this table support ajax?
382
+ 'screen' => 'media_page_mla-menu'
383
  ) );
384
 
385
  $this->currently_hidden = self::get_hidden_columns();
559
  $inline_data = "\r\n" . '<div class="hidden" id="inline_' . $item->ID . "\">\r\n";
560
  $inline_data .= ' <div class="post_title">' . esc_attr( $item->post_title ) . "</div>\r\n";
561
  $inline_data .= ' <div class="post_name">' . esc_attr( $item->post_name ) . "</div>\r\n";
562
+ $inline_data .= ' <div class="post_excerpt">' . esc_attr( $item->post_excerpt ) . "</div>\r\n";
563
 
564
  if ( !empty( $item->mla_wp_attachment_metadata ) ) {
565
  if ( isset( $item->mla_wp_attachment_image_alt ) )
605
  $parent_title = '(no title: bad ID)';
606
 
607
  $parent = sprintf( '<a href="%1$s">(parent:%2$s)</a>', esc_url( add_query_arg( array(
608
+ 'page' => 'mla-menu',
609
+ 'parent' => $item->post_parent,
610
  'heading_suffix' => urlencode( 'Parent: ' . $parent_title )
611
  ), 'upload.php' ) ), (string) $item->post_parent );
612
  } // $item->post_parent
707
  $parent_title = '(no title: bad ID)';
708
 
709
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
710
+ 'page' => 'mla-menu',
711
+ 'parent' => $item->post_parent,
712
  'heading_suffix' => urlencode( 'Parent: ' . $parent_title )
713
  ), 'upload.php' ) ), (string) $item->post_parent );
714
  }
980
  return sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
981
  'page' => 'mla-menu',
982
  'author' => $item->post_author,
983
+ 'heading_suffix' => urlencode( 'Author: ' . $user->data->display_name )
984
  ), 'upload.php' ) ), esc_html( $user->data->display_name ) );
985
  else
986
  return 'unknown';
1089
  $_num_posts = (array) wp_count_attachments();
1090
  $_total_posts = array_sum( $_num_posts ) - $_num_posts['trash'];
1091
  $total_orphans = $wpdb->get_var(
 
1092
  "
1093
  SELECT COUNT( * ) FROM {$wpdb->posts}
1094
  WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1
1095
  "
 
1096
  );
1097
 
1098
  $post_mime_types = self::mla_get_attachment_mime_types();
includes/class-mla-main.php CHANGED
@@ -38,7 +38,7 @@ class MLA {
38
  *
39
  * @var string
40
  */
41
- const CURRENT_MLA_VERSION = '0.71';
42
 
43
  /**
44
  * Minimum version of PHP required for this plugin
@@ -601,13 +601,13 @@ class MLA {
601
  break;
602
  case 'edit':
603
  $new_data = array ( ) ;
604
- if ( ! empty( $_REQUEST['post_parent'] ) )
605
  $new_data['post_parent'] = $_REQUEST['post_parent'];
606
 
607
- if ( ! empty( $_REQUEST['post_author'] ) )
608
  $new_data['post_author'] = $_REQUEST['post_author'];
609
 
610
- $item_content = self::_update_single_item( $post_id, $new_data, $_REQUEST['tax_input'], $_REQUEST['tax_action'] );
611
  break;
612
  case 'restore':
613
  $item_content = self::_restore_single_item( $post_id );
@@ -647,7 +647,7 @@ class MLA {
647
  break;
648
  case self::MLA_ADMIN_SINGLE_EDIT_UPDATE:
649
  if ( !empty( $_REQUEST['update'] ) ) {
650
- $page_content = self::_update_single_item( $_REQUEST['mla_item_ID'], $_REQUEST['attachments'][ $_REQUEST['mla_item_ID'] ], $_REQUEST['tax_input'] );
651
  } else {
652
  $page_content = array(
653
  'message' => 'Item: ' . $_REQUEST['mla_item_ID'] . ' cancelled.',
@@ -857,7 +857,7 @@ class MLA {
857
  else
858
  $tax_output = NULL;
859
 
860
- $results = self::_update_single_item( $post_id, $_REQUEST, $tax_output );
861
  $new_item = (object) MLAData::mla_get_attachment_by_id( $post_id );
862
 
863
  // Create an instance of our package class and echo the new HTML
@@ -981,6 +981,15 @@ class MLA {
981
  $bulk_right_column = MLAData::mla_parse_template( $page_template_array['tag_fieldset'], $page_values );
982
  } // count( $flat_taxonomies )
983
 
 
 
 
 
 
 
 
 
 
984
  $page_values = array(
985
  'colspan' => count( $MLAListTable->get_columns() ),
986
  'authors' => $authors_dropdown,
@@ -988,6 +997,7 @@ class MLA {
988
  'quick_right_column' => $quick_right_column,
989
  'bulk_middle_column' => $bulk_middle_column,
990
  'bulk_right_column' => $bulk_right_column,
 
991
  );
992
  $page_template = MLAData::mla_parse_template( $page_template_array['page'], $page_values );
993
  return $page_template;
@@ -998,9 +1008,9 @@ class MLA {
998
  *
999
  * @since 0.20
1000
  *
1001
- * @param integer User ID of the current author
1002
- * @param string HTML name attribute
1003
- * @param string HTML class attribute
1004
  *
1005
  * @return string|false HTML markup for the dropdown field or False
1006
  */
@@ -1020,6 +1030,8 @@ class MLA {
1020
  $users_opt['selected'] = $author;
1021
  $users_opt['include_selected'] = true;
1022
  }
 
 
1023
 
1024
  if ( $authors = wp_dropdown_users( $users_opt ) ) {
1025
  return $authors;
@@ -1151,8 +1163,12 @@ class MLA {
1151
  if ( $post_data['mla_references']['is_unattached'] )
1152
  $parent_info .= '(UNATTACHED) ';
1153
  else {
1154
- if ( !$post_data['mla_references']['found_parent'] )
1155
- $parent_info .= '(BAD PARENT) ';
 
 
 
 
1156
  }
1157
  }
1158
 
@@ -1192,6 +1208,28 @@ class MLA {
1192
  } // foreach $insert
1193
  } // foreach $file
1194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1195
  /*
1196
  * WordPress doesn't look in hidden fields to set the month filter dropdown or pagination filter
1197
  */
@@ -1280,6 +1318,8 @@ class MLA {
1280
  'authors' => $authors,
1281
  'features' => esc_textarea( $features ),
1282
  'inserts' => esc_textarea( $inserts ),
 
 
1283
  'mla_admin_action' => self::MLA_ADMIN_SINGLE_EDIT_UPDATE,
1284
  'form_url' => admin_url( 'upload.php' ) . '?page=' . self::ADMIN_PAGE_SLUG . $url_args,
1285
  'view_args' => $view_args,
@@ -1297,244 +1337,6 @@ class MLA {
1297
  );
1298
  }
1299
 
1300
- /**
1301
- * Update a single item; change the meta data
1302
- * for a single attachment.
1303
- *
1304
- * @since 0.1
1305
- *
1306
- * @param int The ID of the attachment to be updated
1307
- * @param array Field name => value pairs
1308
- * @param array Taxonomy term values
1309
- * @param array Taxonomy actions (add, remove, replace)
1310
- *
1311
- * @return array success/failure message and NULL content
1312
- */
1313
- private static function _update_single_item( $post_id, $new_data, $tax_input = NULL, $tax_actions = NULL ) {
1314
- $post_data = MLAData::mla_get_attachment_by_id( $post_id );
1315
-
1316
- if ( !isset( $post_data ) )
1317
- return array(
1318
- 'message' => 'ERROR: Could not retrieve Attachment.',
1319
- 'body' => ''
1320
- );
1321
-
1322
- $message = '';
1323
- $updates = array( 'ID' => $post_id );
1324
- $new_data = stripslashes_deep( $new_data );
1325
-
1326
- foreach ( $new_data as $key => $value ) {
1327
- switch ( $key ) {
1328
- case 'post_title':
1329
- if ( $value == $post_data[ $key ] )
1330
- break;
1331
-
1332
- $message .= sprintf( 'Changing Title from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), esc_attr( $value ) );
1333
- $updates[ $key ] = $value;
1334
- break;
1335
- case 'post_name':
1336
- if ( $value == $post_data[ $key ] )
1337
- break;
1338
-
1339
- $value = sanitize_title( $value );
1340
-
1341
- /*
1342
- * Make sure new slug is unique
1343
- */
1344
- $args = array(
1345
- 'name' => $value,
1346
- 'post_type' => 'attachment',
1347
- 'post_status' => 'inherit',
1348
- 'showposts' => 1
1349
- );
1350
- $my_posts = get_posts( $args );
1351
-
1352
- if ( $my_posts ) {
1353
- $message .= sprintf( 'ERROR: Could not change Name/Slug "%1$s"; name already exists<br>', $value );
1354
- } else {
1355
- $message .= sprintf( 'Changing Name/Slug from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), $value );
1356
- $updates[ $key ] = $value;
1357
- }
1358
- break;
1359
- case 'image_alt':
1360
- $key = 'mla_wp_attachment_image_alt';
1361
- if ( !isset( $post_data[ $key ] ) )
1362
- $post_data[ $key ] = '';
1363
-
1364
- if ( $value == $post_data[ $key ] )
1365
- break;
1366
-
1367
- if ( empty( $value ) ) {
1368
- if ( delete_post_meta( $post_id, '_wp_attachment_image_alt', $value ) )
1369
- $message .= sprintf( 'Deleting Alternate Text, was "%1$s"<br>', esc_attr( $post_data[ $key ] ) );
1370
- else
1371
- $message .= sprintf( 'ERROR: Could not delete Alternate Text, remains "%1$s"<br>', esc_attr( $post_data[ $key ] ) );
1372
- } else {
1373
- if ( update_post_meta( $post_id, '_wp_attachment_image_alt', $value ) )
1374
- $message .= sprintf( 'Changing Alternate Text from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), esc_attr( $value ) );
1375
- else
1376
- $message .= sprintf( 'ERROR: Could not change Alternate Text from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), esc_attr( $value ) );
1377
- }
1378
- break;
1379
- case 'post_excerpt':
1380
- if ( $value == $post_data[ $key ] )
1381
- break;
1382
-
1383
- $message .= sprintf( 'Changing Caption from "%1$s" to "%2$s"<br>', esc_attr( $post_data[ $key ] ), esc_attr( $value ) );
1384
- $updates[ $key ] = $value;
1385
- break;
1386
- case 'post_content':
1387
- if ( $value == $post_data[ $key ] )
1388
- break;
1389
-
1390
- $message .= sprintf( 'Changing Description from "%1$s" to "%2$s"<br>', esc_textarea( $post_data[ $key ] ), esc_textarea( $value ) );
1391
- $updates[ $key ] = $value;
1392
- break;
1393
- case 'post_parent':
1394
- if ( $value == $post_data[ $key ] )
1395
- break;
1396
-
1397
- $value = absint( $value );
1398
-
1399
- $message .= sprintf( 'Changing Parent from "%1$s" to "%2$s"<br>', $post_data[ $key ], $value );
1400
- $updates[ $key ] = $value;
1401
- break;
1402
- case 'menu_order':
1403
- if ( $value == $post_data[ $key ] )
1404
- break;
1405
-
1406
- $value = absint( $value );
1407
-
1408
- $message .= sprintf( 'Changing Menu Order from "%1$s" to "%2$s"<br>', $post_data[ $key ], $value );
1409
- $updates[ $key ] = $value;
1410
- break;
1411
- case 'post_author':
1412
- if ( $value == $post_data[ $key ] )
1413
- break;
1414
-
1415
- $value = absint( $value );
1416
-
1417
- $from_user = get_userdata( $post_data[ $key ] );
1418
- $to_user = get_userdata( $value );
1419
- $message .= sprintf( 'Changing Author from "%1$s" to "%2$s"<br>', $from_user->display_name, $to_user->display_name );
1420
- $updates[ $key ] = $value;
1421
- break;
1422
- default:
1423
- // Ignore anything else
1424
- } // switch $key
1425
- } // foreach $new_data
1426
-
1427
- if ( !empty( $tax_input ) ) {
1428
- foreach ( $tax_input as $taxonomy => $tags ) {
1429
- if ( !empty( $tax_actions ) )
1430
- $tax_action = $tax_actions[ $taxonomy ];
1431
- else
1432
- $tax_action = 'replace';
1433
-
1434
- $taxonomy_obj = get_taxonomy( $taxonomy );
1435
-
1436
- if ( current_user_can( $taxonomy_obj->cap->assign_terms ) ) {
1437
- $terms_before = wp_get_post_terms( $post_id, $taxonomy, array(
1438
- 'fields' => 'ids' // all'
1439
- ) );
1440
- if ( is_array( $tags ) ) // array = hierarchical, string = non-hierarchical.
1441
- $tags = array_filter( $tags );
1442
-
1443
- switch ( $tax_action ) {
1444
- case 'add':
1445
- $action_name = 'Adding';
1446
- $result = wp_set_post_terms( $post_id, $tags, $taxonomy, true );
1447
- break;
1448
- case 'remove':
1449
- $action_name = 'Removing';
1450
- $tags = self::_remove_tags( $terms_before, $tags, $taxonomy_obj );
1451
- $result = wp_set_post_terms( $post_id, $tags, $taxonomy );
1452
- break;
1453
- case 'replace':
1454
- $action_name = 'Replacing';
1455
- $result = wp_set_post_terms( $post_id, $tags, $taxonomy );
1456
- break;
1457
- default:
1458
- $action_name = 'Ignoring';
1459
- // ignore anything else
1460
- }
1461
-
1462
- $terms_after = wp_get_post_terms( $post_id, $taxonomy, array(
1463
- 'fields' => 'ids' // all'
1464
- ) );
1465
-
1466
- if ( $terms_before != $terms_after )
1467
- $message .= sprintf( '%1$s "%2$s" terms<br>', $action_name, $taxonomy );
1468
- } // current_user_can
1469
- else {
1470
- $message .= sprintf( 'You cannot assign "%1$s" terms<br>', $action_name, $taxonomy );
1471
- }
1472
- } // foreach $tax_input
1473
- } // !empty $tax_input
1474
-
1475
- if ( empty( $message ) )
1476
- return array(
1477
- 'message' => 'Item: ' . $post_id . ', no changes detected.',
1478
- 'body' => ''
1479
- );
1480
- else {
1481
- if ( wp_update_post( $updates ) )
1482
- return array(
1483
- 'message' => 'Item: ' . $post_id . ' updated.<br>' . $message,
1484
- 'body' => ''
1485
- );
1486
- else
1487
- return array(
1488
- 'message' => 'ERROR: Item ' . $post_id . ' update failed.',
1489
- 'body' => ''
1490
- );
1491
- }
1492
- }
1493
-
1494
- /**
1495
- * Remove tags from a term ids list
1496
- *
1497
- * @since 0.40
1498
- *
1499
- * @param array The term ids currently assigned
1500
- * @param array | string The term ids (array) or names (string) to remove
1501
- * @param object The taxonomy object
1502
- *
1503
- * @return array Term ids of the surviving tags
1504
- */
1505
- private static function _remove_tags( $terms_before, $tags, $taxonomy_obj ) {
1506
- if ( ! is_array( $tags ) ) {
1507
- /*
1508
- * Convert names to term ids
1509
- */
1510
- $comma = _x( ',', 'tag delimiter' );
1511
- if ( ',' !== $comma )
1512
- $tags = str_replace( $comma, ',', $tags );
1513
- $terms = explode( ',', trim( $tags, " \n\t\r\0\x0B," ) );
1514
-
1515
- $tags = array ( );
1516
- foreach ( (array) $terms as $term) {
1517
- if ( !strlen(trim($term)) )
1518
- continue;
1519
-
1520
- // Skip if a non-existent term name is passed.
1521
- if ( ! $term_info = term_exists($term, $taxonomy_obj->name ) )
1522
- continue;
1523
-
1524
- if ( is_wp_error($term_info) )
1525
- continue;
1526
-
1527
- $tags[] = $term_info['term_id'];
1528
- } // foreach term
1529
- } // not an array
1530
-
1531
- $tags = array_map( 'intval', $tags );
1532
- $tags = array_unique( $tags );
1533
- $terms_after = array_diff( array_map( 'intval', $terms_before ), $tags );
1534
-
1535
- return $terms_after;
1536
- }
1537
-
1538
  /**
1539
  * Restore a single item from the Trash
1540
  *
38
  *
39
  * @var string
40
  */
41
+ const CURRENT_MLA_VERSION = '0.80';
42
 
43
  /**
44
  * Minimum version of PHP required for this plugin
601
  break;
602
  case 'edit':
603
  $new_data = array ( ) ;
604
+ if ( isset( $_REQUEST['post_parent'] ) && is_numeric( $_REQUEST['post_parent'] ) )
605
  $new_data['post_parent'] = $_REQUEST['post_parent'];
606
 
607
+ if ( isset( $_REQUEST['post_author'] ) && ( -1 != $_REQUEST['post_author'] ) )
608
  $new_data['post_author'] = $_REQUEST['post_author'];
609
 
610
+ $item_content = MLAData::mla_update_single_item( $post_id, $new_data, $_REQUEST['tax_input'], $_REQUEST['tax_action'] );
611
  break;
612
  case 'restore':
613
  $item_content = self::_restore_single_item( $post_id );
647
  break;
648
  case self::MLA_ADMIN_SINGLE_EDIT_UPDATE:
649
  if ( !empty( $_REQUEST['update'] ) ) {
650
+ $page_content = MLAData::mla_update_single_item( $_REQUEST['mla_item_ID'], $_REQUEST['attachments'][ $_REQUEST['mla_item_ID'] ], $_REQUEST['tax_input'] );
651
  } else {
652
  $page_content = array(
653
  'message' => 'Item: ' . $_REQUEST['mla_item_ID'] . ' cancelled.',
857
  else
858
  $tax_output = NULL;
859
 
860
+ $results = MLAData::mla_update_single_item( $post_id, $_REQUEST, $tax_output );
861
  $new_item = (object) MLAData::mla_get_attachment_by_id( $post_id );
862
 
863
  // Create an instance of our package class and echo the new HTML
981
  $bulk_right_column = MLAData::mla_parse_template( $page_template_array['tag_fieldset'], $page_values );
982
  } // count( $flat_taxonomies )
983
 
984
+ if ( $authors = self::_authors_dropdown( -1 ) ) {
985
+ $bulk_authors_dropdown = ' <label class="inline-edit-author">' . "\r\n";
986
+ $bulk_authors_dropdown .= ' <span class="title">' . __( 'Author' ) . '</span>' . "\r\n";
987
+ $bulk_authors_dropdown .= $authors . "\r\n";
988
+ $bulk_authors_dropdown .= ' </label>' . "\r\n";
989
+ }
990
+ else
991
+ $bulk_authors_dropdown = '';
992
+
993
  $page_values = array(
994
  'colspan' => count( $MLAListTable->get_columns() ),
995
  'authors' => $authors_dropdown,
997
  'quick_right_column' => $quick_right_column,
998
  'bulk_middle_column' => $bulk_middle_column,
999
  'bulk_right_column' => $bulk_right_column,
1000
+ 'bulk_authors' => $bulk_authors_dropdown
1001
  );
1002
  $page_template = MLAData::mla_parse_template( $page_template_array['page'], $page_values );
1003
  return $page_template;
1008
  *
1009
  * @since 0.20
1010
  *
1011
+ * @param integer Optional User ID of the current author, default 0
1012
+ * @param string Optional HTML name attribute, default 'post_author'
1013
+ * @param string Optional HTML class attribute, default 'authors'
1014
  *
1015
  * @return string|false HTML markup for the dropdown field or False
1016
  */
1030
  $users_opt['selected'] = $author;
1031
  $users_opt['include_selected'] = true;
1032
  }
1033
+ elseif ( -1 == $author )
1034
+ $users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
1035
 
1036
  if ( $authors = wp_dropdown_users( $users_opt ) ) {
1037
  return $authors;
1163
  if ( $post_data['mla_references']['is_unattached'] )
1164
  $parent_info .= '(UNATTACHED) ';
1165
  else {
1166
+ if ( !$post_data['mla_references']['found_parent'] ) {
1167
+ if ( isset( $post_data['mla_references']['parent_title'] ) )
1168
+ $parent_info .= '(BAD PARENT) ';
1169
+ else
1170
+ $parent_info .= '(INVALID PARENT) ';
1171
+ }
1172
  }
1173
  }
1174
 
1208
  } // foreach $insert
1209
  } // foreach $file
1210
 
1211
+ $galleries = '';
1212
+
1213
+ foreach ( $post_data['mla_references']['galleries'] as $gallery_id => $gallery ) {
1214
+ if ( $gallery_id == $post_data['post_parent'] )
1215
+ $parent = 'PARENT ';
1216
+ else
1217
+ $parent = '';
1218
+
1219
+ $galleries .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $gallery['post_type'], /*$3%s*/ $gallery_id, /*$4%s*/ $gallery['post_title'] ) . "\r\n";
1220
+ } // foreach $gallery
1221
+
1222
+ $mla_galleries = '';
1223
+
1224
+ foreach ( $post_data['mla_references']['mla_galleries'] as $gallery_id => $gallery ) {
1225
+ if ( $gallery_id == $post_data['post_parent'] )
1226
+ $parent = 'PARENT ';
1227
+ else
1228
+ $parent = '';
1229
+
1230
+ $mla_galleries .= sprintf( '%1$s (%2$s %3$s), %4$s', /*$1%s*/ $parent, /*$2%s*/ $gallery['post_type'], /*$3%s*/ $gallery_id, /*$4%s*/ $gallery['post_title'] ) . "\r\n";
1231
+ } // foreach $feature
1232
+
1233
  /*
1234
  * WordPress doesn't look in hidden fields to set the month filter dropdown or pagination filter
1235
  */
1318
  'authors' => $authors,
1319
  'features' => esc_textarea( $features ),
1320
  'inserts' => esc_textarea( $inserts ),
1321
+ 'galleries' => esc_textarea( $galleries ),
1322
+ 'mla_galleries' => esc_textarea( $mla_galleries ),
1323
  'mla_admin_action' => self::MLA_ADMIN_SINGLE_EDIT_UPDATE,
1324
  'form_url' => admin_url( 'upload.php' ) . '?page=' . self::ADMIN_PAGE_SLUG . $url_args,
1325
  'view_args' => $view_args,
1337
  );
1338
  }
1339
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1340
  /**
1341
  * Restore a single item from the Trash
1342
  *
includes/class-mla-objects.php CHANGED
@@ -22,13 +22,6 @@ class MLAObjects {
22
  */
23
  public static function initialize() {
24
  self::_build_taxonomies();
25
-
26
- /*
27
- * WordPress 3.5 uses the advanced-form-edit.php function for the Edit Media
28
- * page. This supports all the standard meta-boxes for post types.
29
- */
30
- if ( MLATest::$wordpress_3point5_plus )
31
- add_post_type_support( 'attachment', 'custom-fields' );
32
  }
33
 
34
  /**
@@ -96,16 +89,14 @@ class MLAObjects {
96
  );
97
  }
98
 
99
- $taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'names' );
100
- foreach ( $taxonomies as $tax_name ) {
101
- if ( MLASettings::mla_taxonomy_support( $tax_name ) ) {
102
- register_taxonomy_for_object_type( $tax_name, 'attachment');
103
- add_filter( "manage_edit-{$tax_name}_columns", 'MLAObjects::mla_taxonomy_get_columns_filter', 10, 1 ); // $columns
104
- add_filter( "manage_{$tax_name}_custom_column", 'MLAObjects::mla_taxonomy_column_filter', 10, 3 ); // $place_holder, $column_name, $tag->term_id
105
- }
106
- } // foreach
107
-
108
- // add_post_type_support( 'attachment', 'custom-fields' ); WP 3.5 experiment - MOVE THIS!
109
  } // _build_taxonomies
110
 
111
  /**
22
  */
23
  public static function initialize() {
24
  self::_build_taxonomies();
 
 
 
 
 
 
 
25
  }
26
 
27
  /**
89
  );
90
  }
91
 
92
+ $taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'names' );
93
+ foreach ( $taxonomies as $tax_name ) {
94
+ if ( MLASettings::mla_taxonomy_support( $tax_name ) ) {
95
+ register_taxonomy_for_object_type( $tax_name, 'attachment');
96
+ add_filter( "manage_edit-{$tax_name}_columns", 'MLAObjects::mla_taxonomy_get_columns_filter', 10, 1 ); // $columns
97
+ add_filter( "manage_{$tax_name}_custom_column", 'MLAObjects::mla_taxonomy_column_filter', 10, 3 ); // $place_holder, $column_name, $tag->term_id
98
+ }
99
+ } // foreach
 
 
100
  } // _build_taxonomies
101
 
102
  /**
includes/class-mla-settings.php CHANGED
@@ -44,6 +44,7 @@ class MLASettings {
44
  *
45
  * array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
46
  *
 
47
  * name => admin page label or heading text
48
  * type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
49
  * std => default value
@@ -54,7 +55,7 @@ class MLASettings {
54
  * options => array of radio or select option values
55
  * texts => array of radio or select option display texts
56
  * render => rendering function for 'custom' options. Usage:
57
- * $options_list .= ['render']( 'render', $key, $value, $page_template_array );
58
  * update => update function for 'custom' options; returns nothing. Usage:
59
  * $message = ['update']( 'update', $key, $value, $_REQUEST );
60
  * delete => delete function for 'custom' options; returns nothing. Usage:
@@ -67,7 +68,8 @@ class MLASettings {
67
  * This option records the highest MLA version so-far installed
68
  */
69
  self::MLA_VERSION_OPTION =>
70
- array('type' => 'hidden',
 
71
  'std' => '0'),
72
 
73
  /*
@@ -75,33 +77,39 @@ class MLASettings {
75
  * they are retained for the database version/update check
76
  */
77
  'attachment_category' =>
78
- array('name' => 'Attachment Categories',
 
79
  'type' => 'hidden', // checkbox',
80
  'std' => 'checked',
81
  'help' => 'Check this option to add support for Attachment Categories.'),
82
 
83
  'attachment_tag' =>
84
- array('name' => 'Attachment Tags',
 
85
  'type' => 'hidden', // checkbox',
86
  'std' => 'checked',
87
  'help' => 'Check this option to add support for Attachment Tags.'),
88
 
89
  'where_used_heading' =>
90
- array('name' => 'Where-used Reporting',
 
91
  'type' => 'header'),
92
 
93
  'exclude_revisions' =>
94
- array('name' => 'Exclude Revisions',
 
95
  'type' => 'checkbox',
96
  'std' => 'checked',
97
  'help' => 'Check this option to exclude revisions from where-used reporting.'),
98
 
99
  'taxonomy_heading' =>
100
- array('name' => 'Taxonomy Support',
 
101
  'type' => 'header'),
102
 
103
  'taxonomy_support' =>
104
- array('help' => 'Check the "Support" box to add the taxonomy to the Assistant.<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.',
 
105
  'std' => array (
106
  'tax_support' => array (
107
  'attachment_category' => 'checked',
@@ -120,11 +128,13 @@ class MLASettings {
120
  'reset' => '_taxonomy_handler'),
121
 
122
  'orderby_heading' =>
123
- array('name' => 'Default Table Listing Sort Order',
 
124
  'type' => 'header'),
125
 
126
  'default_orderby' =>
127
- array('name' => 'Order By',
 
128
  'type' => 'select',
129
  'std' => 'title_name',
130
  'options' => array('title_name'),
@@ -132,12 +142,29 @@ class MLASettings {
132
  'help' => 'Select the column for the sort order of the Assistant table listing.'),
133
 
134
  'default_order' =>
135
- array('name' => 'Order',
 
136
  'type' => 'radio',
137
  'std' => 'ASC',
138
  'options' => array('ASC', 'DESC'),
139
  'texts' => array('Ascending', 'Descending'),
140
  'help' => 'Choose the sort order.'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
 
142
  /* Here are examples of the other option types
143
  'testvalues' =>
@@ -175,6 +202,7 @@ class MLASettings {
175
  add_action( 'admin_menu', 'MLASettings::mla_admin_menu_action' );
176
  self::_version_upgrade();
177
  self::_create_alt_text_view();
 
178
  }
179
 
180
  /**
@@ -232,23 +260,19 @@ class MLASettings {
232
  $view_name = $table_prefix . MLA_OPTION_PREFIX . self::MLA_ALT_TEXT_VIEW_SUFFIX;
233
  $table_name = $table_prefix . 'postmeta';
234
  $result = $wpdb->query(
235
- $wpdb->prepare(
236
  "
237
  SHOW TABLES LIKE '{$view_name}'
238
  "
239
- )
240
  );
241
 
242
  if ( 0 == $result ) {
243
  $result = $wpdb->query(
244
- $wpdb->prepare(
245
  "
246
  CREATE OR REPLACE VIEW {$view_name} AS
247
  SELECT post_id, meta_value
248
  FROM {$table_name}
249
  WHERE {$table_name}.meta_key = '_wp_attachment_image_alt'
250
  "
251
- )
252
  );
253
  }
254
  }
@@ -280,20 +304,16 @@ class MLASettings {
280
 
281
  $view_name = $table_prefix . MLA_OPTION_PREFIX . self::MLA_ALT_TEXT_VIEW_SUFFIX;
282
  $result = $wpdb->query(
283
- $wpdb->prepare(
284
  "
285
  SHOW TABLES LIKE '{$view_name}'
286
  "
287
- )
288
  );
289
 
290
  if ( $result) {
291
  $result = $wpdb->query(
292
- $wpdb->prepare(
293
  "
294
  DROP VIEW {$view_name}
295
  "
296
- )
297
  );
298
  }
299
  }
@@ -333,6 +353,197 @@ class MLASettings {
333
  return $links;
334
  }
335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
  /**
337
  * Return the stored value or default value of a defined MLA option
338
  *
@@ -388,43 +599,288 @@ class MLASettings {
388
  }
389
 
390
  /**
391
- * Render (echo) the "Media Library Assistant" subpage in the Settings section
392
  *
393
- * @since 0.1
 
 
 
 
394
  *
395
- * @return void Echoes HTML markup for the settings subpage
396
  */
397
- public static function mla_render_settings_page( ) {
398
- if ( !current_user_can( 'manage_options' ) ) {
399
- echo "Media Library Assistant - Error</h2>\r\n";
400
- wp_die( __( 'You do not have permission to manage plugin settings.' ) );
401
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
402
 
403
- /*
404
- * Load template array and initialize page-level values.
405
- */
406
- $page_template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/admin-display-settings-page.tpl' );
407
- $page_values = array(
408
- 'version' => 'v' . MLA::CURRENT_MLA_VERSION,
409
- 'messages' => '',
410
- 'shortcode_list' => '',
411
- 'options_list' => '',
412
- 'mla_admin_action' => MLA::MLA_ADMIN_SINGLE_EDIT_UPDATE,
413
- 'page' => self::MLA_SETTINGS_SLUG,
414
- '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
415
- '_wp_http_referer' => wp_referer_field( false ),
416
- 'phpDocs_url' => MLA_PLUGIN_URL . 'phpDocs/index.html'
417
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
 
 
 
 
 
 
 
 
 
 
 
 
 
 
419
  /*
420
  * Check for submit buttons to change or reset settings.
 
421
  */
422
- if ( !empty( $_REQUEST['mla-options-save'] ) ) {
423
  check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
424
- $page_content = self::_save_settings( $page_template_array );
425
- } elseif ( !empty( $_REQUEST['mla-options-reset'] ) ) {
426
  check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
427
- $page_content = self::_reset_settings( $page_template_array );
428
  } else {
429
  $page_content = array(
430
  'message' => '',
@@ -433,10 +889,16 @@ class MLASettings {
433
  }
434
 
435
  if ( !empty( $page_content['body'] ) ) {
436
- echo $page_content['body'];
437
- return;
438
  }
439
 
 
 
 
 
 
 
 
440
  /*
441
  * $custom_fields documents the name and description of custom fields
442
  */
@@ -450,18 +912,18 @@ class MLASettings {
450
  $shortcodes = array(
451
  // array("name" => "shortcode", "description" => "This shortcode...")
452
  array( 'name' => 'mla_attachment_list', 'description' => 'renders a complete list of all attachments and references to them.' ),
453
- array( 'name' => 'mla_gallery', 'description' => 'enhanced version of the WordPress [gallery] shortcode. For complete documentation <a href="#mla_gallery">click here</a>.' )
454
  );
455
 
456
  $shortcode_list = '';
457
  foreach ( $shortcodes as $shortcode ) {
458
  $shortcode_values = array ( 'name' => $shortcode['name'], 'description' => $shortcode['description'] );
459
- $shortcode_list .= MLAData::mla_parse_template( $page_template_array['shortcodeitem'], $shortcode_values );
460
  }
461
 
462
  if ( ! empty( $shortcode_list ) ) {
463
  $shortcode_values = array ( 'shortcode_list' => $shortcode_list );
464
- $page_values['shortcode_list'] = MLAData::mla_parse_template( $page_template_array['shortcodelist'], $shortcode_values );
465
  }
466
 
467
  /*
@@ -475,132 +937,362 @@ class MLASettings {
475
 
476
  $options_list = '';
477
  foreach ( self::$mla_options as $key => $value ) {
478
- switch ( $value['type'] ) {
479
- case 'checkbox':
480
- $option_values = array(
481
- 'key' => MLA_OPTION_PREFIX . $key,
482
- 'checked' => '',
483
- 'value' => $value['name'],
484
- 'help' => $value['help']
485
- );
486
-
487
- if ( 'checked' == self::mla_get_option( $key ) )
488
- $option_values['checked'] = 'checked="checked"';
489
-
490
- $options_list .= MLAData::mla_parse_template( $page_template_array['checkbox'], $option_values );
491
- break;
492
- case 'header':
493
- $option_values = array(
494
- 'key' => MLA_OPTION_PREFIX . $key,
495
- 'value' => $value['name']
496
- );
497
-
498
- $options_list .= MLAData::mla_parse_template( $page_template_array['header'], $option_values );
499
- break;
500
- case 'radio':
501
- $radio_options = '';
502
- foreach ( $value['options'] as $optid => $option ) {
503
- $option_values = array(
504
- 'key' => MLA_OPTION_PREFIX . $key,
505
- 'option' => $option,
506
- 'checked' => '',
507
- 'value' => $value['texts'][$optid]
508
- );
509
-
510
- if ( $option == self::mla_get_option( $key ) )
511
- $option_values['checked'] = 'checked="checked"';
512
-
513
- $radio_options .= MLAData::mla_parse_template( $page_template_array['radio-option'], $option_values );
514
- }
515
-
516
- $option_values = array(
517
- 'value' => $value['name'],
518
- 'options' => $radio_options,
519
- 'help' => $value['help']
520
- );
521
-
522
- $options_list .= MLAData::mla_parse_template( $page_template_array['radio'], $option_values );
523
- break;
524
- case 'select':
525
- $select_options = '';
526
- foreach ( $value['options'] as $optid => $option ) {
527
- $option_values = array(
528
- 'selected' => '',
529
- 'value' => $option,
530
- 'text' => $value['texts'][$optid]
531
- );
532
-
533
- if ( $option == self::mla_get_option( $key ) )
534
- $option_values['selected'] = 'selected="selected"';
535
-
536
- $select_options .= MLAData::mla_parse_template( $page_template_array['select-option'], $option_values );
537
- }
538
-
539
- $option_values = array(
540
- 'key' => MLA_OPTION_PREFIX . $key,
541
- 'value' => $value['name'],
542
- 'options' => $select_options,
543
- 'help' => $value['help']
544
- );
545
-
546
- $options_list .= MLAData::mla_parse_template( $page_template_array['select'], $option_values );
547
- break;
548
- case 'text':
549
- $option_values = array(
550
- 'key' => MLA_OPTION_PREFIX . $key,
551
- 'value' => $value['name'],
552
- 'options' => $select_options,
553
- 'help' => $value['help'],
554
- 'size' => '40',
555
- 'text' => ''
556
- );
557
-
558
- if ( !empty( $value['size'] ) )
559
- $option_values['size'] = $value['size'];
560
-
561
- $option_values['text'] = self::mla_get_option( $key );
562
-
563
- $options_list .= MLAData::mla_parse_template( $page_template_array['text'], $option_values );
564
- break;
565
- case 'textarea':
566
- $option_values = array(
567
- 'key' => MLA_OPTION_PREFIX . $key,
568
- 'value' => $value['name'],
569
- 'options' => $select_options,
570
- 'help' => $value['help'],
571
- 'cols' => '90',
572
- 'rows' => '5',
573
- 'text' => ''
574
- );
575
-
576
- if ( !empty( $value['cols'] ) )
577
- $option_values['cols'] = $value['cols'];
578
-
579
- if ( !empty( $value['rows'] ) )
580
- $option_values['rows'] = $value['rows'];
581
-
582
- $option_values['text'] = stripslashes( self::mla_get_option( $key ) );
583
-
584
- $options_list .= MLAData::mla_parse_template( $page_template_array['textarea'], $option_values );
585
- break;
586
- case 'custom':
587
- if ( isset( $value['render'] ) )
588
- $options_list .= self::$value['render']( 'render', $key, $value, $page_template_array );
589
- break;
590
- case 'hidden':
591
- break;
592
- default:
593
- error_log( 'ERROR: mla_render_settings_page unknown type: ' . var_export( $value, true ), 0 );
594
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
595
  }
596
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
597
  if ( ! empty( $page_content['message'] ) )
598
- $page_values['messages'] = MLAData::mla_parse_template( $page_template_array['messages'], array(
599
  'messages' => $page_content['message']
600
  ) );
601
-
602
- $page_values['options_list'] = $options_list;
603
- echo MLAData::mla_parse_template( $page_template_array['page'], $page_values );
604
  } // mla_render_settings_page
605
 
606
  /**
@@ -610,7 +1302,7 @@ class MLASettings {
610
  * @since 0.30
611
  *
612
  * @param string Taxonomy name, e.g., attachment_category
613
- * @param string 'support' (the default), 'quick-edit' or 'filter'
614
  *
615
  * @return boolean|string
616
  * true if the taxonomy is supported in this way else false
@@ -624,9 +1316,9 @@ class MLASettings {
624
  $tax_support = isset( $tax_options['tax_support'] ) ? $tax_options['tax_support'] : array ();
625
  $is_supported = array_key_exists( $tax_name, $tax_support );
626
 
627
- if ( !empty( $_REQUEST['mla-options-save'] ) ) {
628
  $is_supported = isset( $_REQUEST['tax_support'][ $tax_name ] );
629
- } elseif ( !empty( $_REQUEST['mla-options-reset'] ) ) {
630
  switch ( $tax_name ) {
631
  case 'attachment_category':
632
  case 'attachment_tag':
@@ -642,9 +1334,9 @@ class MLASettings {
642
  $tax_quick_edit = isset( $tax_options['tax_quick_edit'] ) ? $tax_options['tax_quick_edit'] : array ();
643
  $is_supported = array_key_exists( $tax_name, $tax_quick_edit );
644
 
645
- if ( !empty( $_REQUEST['mla-options-save'] ) ) {
646
  $is_supported = isset( $_REQUEST['tax_quick_edit'][ $tax_name ] );
647
- } elseif ( !empty( $_REQUEST['mla-options-reset'] ) ) {
648
  switch ( $tax_name ) {
649
  case 'attachment_category':
650
  case 'attachment_tag':
@@ -663,10 +1355,10 @@ class MLASettings {
663
  else
664
  $is_supported = ( $tax_name == $tax_filter );
665
 
666
- if ( !empty( $_REQUEST['mla-options-save'] ) ) {
667
  $tax_filter = isset( $_REQUEST['tax_filter'] ) ? $_REQUEST['tax_filter'] : '';
668
  $is_supported = ( $tax_name == $tax_filter );
669
- } elseif ( !empty( $_REQUEST['mla-options-reset'] ) ) {
670
  if ( 'attachment_category' == $tax_name )
671
  $is_supported = true;
672
  else
@@ -680,85 +1372,220 @@ class MLASettings {
680
  } // mla_taxonomy_support
681
 
682
  /**
683
- * Save settings to the options table
684
  *
685
- * @since 0.1
686
  *
687
- * @param array HTML template(s) for the settings page
688
  *
689
  * @return array Message(s) reflecting the results of the operation
690
  */
691
- private static function _save_settings( $template_array ) {
 
692
  $message_list = '';
 
693
 
 
 
 
694
  foreach ( self::$mla_options as $key => $value ) {
695
- if ( isset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) {
696
- $message = '<br>update_option(' . $key . ")\r\n";
697
- switch ( $value['type'] ) {
698
- case 'checkbox':
699
- self::mla_update_option( $key, 'checked' );
700
- break;
701
- case 'header':
702
- $message = '';
703
- break;
704
- case 'radio':
705
- self::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
706
- break;
707
- case 'select':
708
- self::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
709
- break;
710
- case 'text':
711
- self::mla_update_option( $key, trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) );
712
- break;
713
- case 'textarea':
714
- self::mla_update_option( $key, trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) );
715
- break;
716
- case 'custom':
717
- $message = self::$value['update']( 'update', $key, $value, $_REQUEST );
718
- break;
719
- case 'hidden':
720
- break;
721
- default:
722
- error_log( 'ERROR: _save_settings unknown type(1): ' . var_export( $value, true ), 0 );
723
- }
724
-
725
- $message_list .= $message;
726
- } else {
727
- $message = '<br>delete_option(' . $key . ')';
728
- switch ( $value['type'] ) {
729
- case 'checkbox':
730
- self::mla_update_option( $key, 'unchecked' );
731
- break;
732
- case 'header':
733
- $message = '';
734
- break;
735
- case 'radio':
736
- self::mla_delete_option( $key );
737
- break;
738
- case 'select':
739
- self::mla_delete_option( $key );
740
- break;
741
- case 'text':
742
- self::mla_delete_option( $key );
743
- break;
744
- case 'textarea':
745
- self::mla_delete_option( $key );
746
- break;
747
- case 'custom':
748
- $message = self::$value['delete']( 'delete', $key, $value, $_REQUEST );
749
- break;
750
- case 'hidden':
751
- break;
752
- default:
753
- error_log( 'ERROR: _save_settings unknown type(2): ' . var_export( $value, true ), 0 );
754
- }
755
-
756
- $message_list .= $message;
757
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
758
  }
759
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
760
  $page_content = array(
761
- 'message' => "Settings saved.\r\n",
762
  'body' => ''
763
  );
764
 
@@ -768,18 +1595,46 @@ class MLASettings {
768
  // $page_content['message'] .= $message_list;
769
 
770
  return $page_content;
771
- } // _save_settings
772
 
773
  /**
774
- * Delete saved settings, restoring default values
775
  *
776
  * @since 0.1
777
  *
778
- * @param array HTML template(s) for the settings page
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
779
  *
780
  * @return array Message(s) reflecting the results of the operation
781
  */
782
- private static function _reset_settings( $template_array ) {
783
  $message_list = '';
784
 
785
  foreach ( self::$mla_options as $key => $value ) {
@@ -808,21 +1663,22 @@ class MLASettings {
808
  // $page_content['message'] .= $message_list;
809
 
810
  return $page_content;
811
- } // _reset_settings
812
 
813
  /**
814
  * Render and manage other taxonomy support options, e.g., Categories and Post Tags
815
  *
816
  * @since 0.30
 
817
  *
818
  * @param string 'render', 'update', 'delete', or 'reset'
819
  * @param string option name, e.g., 'taxonomy_support'
820
  * @param array option parameters
821
- * @param array The $page_template_array for 'render' else $_REQUEST
822
  *
823
  * @return string HTML table row markup for 'render' else message(s) reflecting the results of the operation.
824
  */
825
- private static function _taxonomy_handler( $action, $key, $value, $args ) {
826
  switch ( $action ) {
827
  case 'render':
828
  $taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'objects' );
@@ -860,7 +1716,7 @@ class MLASettings {
860
  $tax_filter = '';
861
  }
862
 
863
- $taxonomy_row = $args['taxonomyrow'];
864
  $row = '';
865
 
866
  foreach ($taxonomies as $tax_name => $tax_object) {
@@ -880,7 +1736,7 @@ class MLASettings {
880
  'help' => $value['help']
881
  );
882
 
883
- return MLAData::mla_parse_template( $args['taxonomytable'], $option_values );
884
  case 'update':
885
  case 'delete':
886
  $tax_support = isset( $args['tax_support'] ) ? $args['tax_support'] : array ();
44
  *
45
  * array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
46
  *
47
+ * tab => Settings page tab id for the option
48
  * name => admin page label or heading text
49
  * type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
50
  * std => default value
55
  * options => array of radio or select option values
56
  * texts => array of radio or select option display texts
57
  * render => rendering function for 'custom' options. Usage:
58
+ * $options_list .= ['render']( 'render', $key, $value );
59
  * update => update function for 'custom' options; returns nothing. Usage:
60
  * $message = ['update']( 'update', $key, $value, $_REQUEST );
61
  * delete => delete function for 'custom' options; returns nothing. Usage:
68
  * This option records the highest MLA version so-far installed
69
  */
70
  self::MLA_VERSION_OPTION =>
71
+ array('tab' => '',
72
+ 'type' => 'hidden',
73
  'std' => '0'),
74
 
75
  /*
77
  * they are retained for the database version/update check
78
  */
79
  'attachment_category' =>
80
+ array('tab' => '',
81
+ 'name' => 'Attachment Categories',
82
  'type' => 'hidden', // checkbox',
83
  'std' => 'checked',
84
  'help' => 'Check this option to add support for Attachment Categories.'),
85
 
86
  'attachment_tag' =>
87
+ array('tab' => '',
88
+ 'name' => 'Attachment Tags',
89
  'type' => 'hidden', // checkbox',
90
  'std' => 'checked',
91
  'help' => 'Check this option to add support for Attachment Tags.'),
92
 
93
  'where_used_heading' =>
94
+ array('tab' => 'general',
95
+ 'name' => 'Where-used Reporting',
96
  'type' => 'header'),
97
 
98
  'exclude_revisions' =>
99
+ array('tab' => 'general',
100
+ 'name' => 'Exclude Revisions',
101
  'type' => 'checkbox',
102
  'std' => 'checked',
103
  'help' => 'Check this option to exclude revisions from where-used reporting.'),
104
 
105
  'taxonomy_heading' =>
106
+ array('tab' => 'general',
107
+ 'name' => 'Taxonomy Support',
108
  'type' => 'header'),
109
 
110
  'taxonomy_support' =>
111
+ array('tab' => 'general',
112
+ 'help' => 'Check the "Support" box to add the taxonomy to the Assistant.<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.',
113
  'std' => array (
114
  'tax_support' => array (
115
  'attachment_category' => 'checked',
128
  'reset' => '_taxonomy_handler'),
129
 
130
  'orderby_heading' =>
131
+ array('tab' => 'general',
132
+ 'name' => 'Default Table Listing Sort Order',
133
  'type' => 'header'),
134
 
135
  'default_orderby' =>
136
+ array('tab' => 'general',
137
+ 'name' => 'Order By',
138
  'type' => 'select',
139
  'std' => 'title_name',
140
  'options' => array('title_name'),
142
  'help' => 'Select the column for the sort order of the Assistant table listing.'),
143
 
144
  'default_order' =>
145
+ array('tab' => 'general',
146
+ 'name' => 'Order',
147
  'type' => 'radio',
148
  'std' => 'ASC',
149
  'options' => array('ASC', 'DESC'),
150
  'texts' => array('Ascending', 'Descending'),
151
  'help' => 'Choose the sort order.'),
152
+
153
+ /*
154
+ * Managed by _get_style_templates and _put_style_templates
155
+ */
156
+ 'style_templates' =>
157
+ array('tab' => '',
158
+ 'type' => 'hidden',
159
+ 'std' => array( )),
160
+
161
+ /*
162
+ * Managed by _get_markup_templates and _put_markup_templates
163
+ */
164
+ 'markup_templates' =>
165
+ array('tab' => '',
166
+ 'type' => 'hidden',
167
+ 'std' => array( )),
168
 
169
  /* Here are examples of the other option types
170
  'testvalues' =>
202
  add_action( 'admin_menu', 'MLASettings::mla_admin_menu_action' );
203
  self::_version_upgrade();
204
  self::_create_alt_text_view();
205
+ self::_load_templates();
206
  }
207
 
208
  /**
260
  $view_name = $table_prefix . MLA_OPTION_PREFIX . self::MLA_ALT_TEXT_VIEW_SUFFIX;
261
  $table_name = $table_prefix . 'postmeta';
262
  $result = $wpdb->query(
 
263
  "
264
  SHOW TABLES LIKE '{$view_name}'
265
  "
 
266
  );
267
 
268
  if ( 0 == $result ) {
269
  $result = $wpdb->query(
 
270
  "
271
  CREATE OR REPLACE VIEW {$view_name} AS
272
  SELECT post_id, meta_value
273
  FROM {$table_name}
274
  WHERE {$table_name}.meta_key = '_wp_attachment_image_alt'
275
  "
 
276
  );
277
  }
278
  }
304
 
305
  $view_name = $table_prefix . MLA_OPTION_PREFIX . self::MLA_ALT_TEXT_VIEW_SUFFIX;
306
  $result = $wpdb->query(
 
307
  "
308
  SHOW TABLES LIKE '{$view_name}'
309
  "
 
310
  );
311
 
312
  if ( $result) {
313
  $result = $wpdb->query(
 
314
  "
315
  DROP VIEW {$view_name}
316
  "
 
317
  );
318
  }
319
  }
353
  return $links;
354
  }
355
 
356
+ /**
357
+ * Style and Markup templates
358
+ *
359
+ * @since 0.80
360
+ *
361
+ * @var array
362
+ */
363
+ private static $mla_template_array = null;
364
+
365
+ /**
366
+ * Load style and markup templates to $mla_templates
367
+ *
368
+ * @since 0.80
369
+ *
370
+ * @return void
371
+ */
372
+ private static function _load_templates() {
373
+ self::$mla_template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/mla-gallery-templates.tpl' );
374
+
375
+ /*
376
+ * Load the default templates
377
+ */
378
+ if( is_null( self::$mla_template_array ) ) {
379
+ self::$mla_debug_messages .= '<p><strong>_load_templates()</strong> error loading tpls/mla-gallery-templates.tpl';
380
+ return;
381
+ }
382
+ elseif( !self::$mla_template_array ) {
383
+ self::$mla_debug_messages .= '<p><strong>_load_templates()</strong>tpls/mla-gallery-templates.tpl not found';
384
+ $mla_template_array = null;
385
+ return;
386
+ }
387
+
388
+ /*
389
+ * Add user-defined Style and Markup templates
390
+ */
391
+ $templates = self::mla_get_option( 'style_templates' );
392
+ if ( is_array( $templates ) ) {
393
+ foreach ( $templates as $name => $value ) {
394
+ self::$mla_template_array[ $name . '-style' ] = $value;
395
+ } // foreach $templates
396
+ } // is_array
397
+
398
+ $templates = self::mla_get_option( 'markup_templates' );
399
+ if ( is_array( $templates ) ) {
400
+ foreach ( $templates as $name => $value ) {
401
+ self::$mla_template_array[ $name . '-open-markup' ] = $value['open'];
402
+ self::$mla_template_array[ $name . '-row-open-markup' ] = $value['row-open'];
403
+ self::$mla_template_array[ $name . '-item-markup' ] = $value['item'];
404
+ self::$mla_template_array[ $name . '-row-close-markup' ] = $value['row-close'];
405
+ self::$mla_template_array[ $name . '-close-markup' ] = $value['close'];
406
+ } // foreach $templates
407
+ } // is_array
408
+ }
409
+
410
+ /**
411
+ * Fetch style or markup template from $mla_templates
412
+ *
413
+ * @since 0.80
414
+ *
415
+ * @param string Template name
416
+ * @param string Template type; 'style' (default) or 'markup'
417
+ *
418
+ * @return string|boolean|null requested template, false if not found or null if no templates
419
+ */
420
+ public static function mla_fetch_gallery_template( $key, $type = 'style' ) {
421
+ if ( ! is_array( self::$mla_template_array ) ) {
422
+ self::$mla_debug_messages .= '<p><strong>_fetch_template()</strong> no templates exist';
423
+ return null;
424
+ }
425
+
426
+ $array_key = $key . '-' . $type;
427
+ if ( array_key_exists( $array_key, self::$mla_template_array ) )
428
+ return self::$mla_template_array[ $array_key ];
429
+ else {
430
+ self::$mla_debug_messages .= "<p><strong>_fetch_template( {$key}, {$type} )</strong> not found";
431
+ return false;
432
+ }
433
+ }
434
+
435
+ /**
436
+ * Get ALL style templates from $mla_templates, including 'default'
437
+ *
438
+ * @since 0.80
439
+ *
440
+ * @return array|null name => value for all style templates or null if no templates
441
+ */
442
+ public static function _get_style_templates() {
443
+ if ( ! is_array( self::$mla_template_array ) ) {
444
+ self::$mla_debug_messages .= '<p><strong>_fetch_template()</strong> no templates exist';
445
+ return null;
446
+ }
447
+
448
+ $templates = array( );
449
+ foreach( self::$mla_template_array as $key => $value ) {
450
+ $tail = strrpos( $key, '-style' );
451
+ if ( ! ( false === $tail ) ) {
452
+ $name = substr( $key, 0, $tail );
453
+ $templates[ $name ] = $value;
454
+ }
455
+ } // foreach
456
+
457
+ return $templates;
458
+ }
459
+
460
+ /**
461
+ * Put user-defined style templates to $mla_templates and database
462
+ *
463
+ * @since 0.80
464
+ *
465
+ * @param array name => value for all user-defined style templates
466
+ * @return boolean true if success, false if failure
467
+ */
468
+ public static function _put_style_templates( $templates ) {
469
+ if ( self::mla_update_option( 'style_templates', $templates ) ) {
470
+ self::_load_templates();
471
+ return true;
472
+ }
473
+
474
+ return false;
475
+ }
476
+
477
+ /**
478
+ * Get ALL markup templates from $mla_templates, including 'default'
479
+ *
480
+ * @since 0.80
481
+ *
482
+ * @return array|null name => value for all markup templates or null if no templates
483
+ */
484
+ public static function _get_markup_templates() {
485
+ if ( ! is_array( self::$mla_template_array ) ) {
486
+ self::$mla_debug_messages .= '<p><strong>_fetch_template()</strong> no templates exist';
487
+ return null;
488
+ }
489
+
490
+ $templates = array( );
491
+ foreach( self::$mla_template_array as $key => $value ) {
492
+ $tail = strrpos( $key, '-row-open-markup' );
493
+ if ( ! ( false === $tail ) ) {
494
+ $name = substr( $key, 0, $tail );
495
+ $templates[ $name ]['row-open'] = $value;
496
+ continue;
497
+ }
498
+
499
+ $tail = strrpos( $key, '-open-markup' );
500
+ if ( ! ( false === $tail ) ) {
501
+ $name = substr( $key, 0, $tail );
502
+ $templates[ $name ]['open'] = $value;
503
+ continue;
504
+ }
505
+
506
+ $tail = strrpos( $key, '-item-markup' );
507
+ if ( ! ( false === $tail ) ) {
508
+ $name = substr( $key, 0, $tail );
509
+ $templates[ $name ]['item'] = $value;
510
+ continue;
511
+ }
512
+
513
+ $tail = strrpos( $key, '-row-close-markup' );
514
+ if ( ! ( false === $tail ) ) {
515
+ $name = substr( $key, 0, $tail );
516
+ $templates[ $name ]['row-close'] = $value;
517
+ continue;
518
+ }
519
+
520
+ $tail = strrpos( $key, '-close-markup' );
521
+ if ( ! ( false === $tail ) ) {
522
+ $name = substr( $key, 0, $tail );
523
+ $templates[ $name ]['close'] = $value;
524
+ }
525
+ } // foreach
526
+
527
+ return $templates;
528
+ }
529
+
530
+ /**
531
+ * Put user-defined markup templates to $mla_templates and database
532
+ *
533
+ * @since 0.80
534
+ *
535
+ * @param array name => value for all user-defined markup templates
536
+ * @return boolean true if success, false if failure
537
+ */
538
+ public static function _put_markup_templates( $templates ) {
539
+ if ( self::mla_update_option( 'markup_templates', $templates ) ) {
540
+ self::_load_templates();
541
+ return true;
542
+ }
543
+
544
+ return false;
545
+ }
546
+
547
  /**
548
  * Return the stored value or default value of a defined MLA option
549
  *
599
  }
600
 
601
  /**
602
+ * Update or delete a single MLA option value
603
  *
604
+ * @since 0.80
605
+ * @uses $_REQUEST
606
+ *
607
+ * @param string HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
608
+ * @param array Option parameters, e.g., 'type', 'std'
609
  *
610
+ * @return string HTML markup for the option's table row
611
  */
612
+ private static function _update_option_row( $key, $value ) {
613
+ if ( isset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) {
614
+ $message = '<br>update_option(' . $key . ")\r\n";
615
+ switch ( $value['type'] ) {
616
+ case 'checkbox':
617
+ self::mla_update_option( $key, 'checked' );
618
+ break;
619
+ case 'header':
620
+ $message = '';
621
+ break;
622
+ case 'radio':
623
+ self::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
624
+ break;
625
+ case 'select':
626
+ self::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
627
+ break;
628
+ case 'text':
629
+ self::mla_update_option( $key, trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) );
630
+ break;
631
+ case 'textarea':
632
+ self::mla_update_option( $key, trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) );
633
+ break;
634
+ case 'custom':
635
+ $message = self::$value['update']( 'update', $key, $value, $_REQUEST );
636
+ break;
637
+ case 'hidden':
638
+ break;
639
+ default:
640
+ error_log( 'ERROR: _save_settings unknown type(1): ' . var_export( $value, true ), 0 );
641
+ } // $value['type']
642
+ } // isset $key
643
+ else {
644
+ $message = '<br>delete_option(' . $key . ')';
645
+ switch ( $value['type'] ) {
646
+ case 'checkbox':
647
+ self::mla_update_option( $key, 'unchecked' );
648
+ break;
649
+ case 'header':
650
+ $message = '';
651
+ break;
652
+ case 'radio':
653
+ self::mla_delete_option( $key );
654
+ break;
655
+ case 'select':
656
+ self::mla_delete_option( $key );
657
+ break;
658
+ case 'text':
659
+ self::mla_delete_option( $key );
660
+ break;
661
+ case 'textarea':
662
+ self::mla_delete_option( $key );
663
+ break;
664
+ case 'custom':
665
+ $message = self::$value['delete']( 'delete', $key, $value, $_REQUEST );
666
+ break;
667
+ case 'hidden':
668
+ break;
669
+ default:
670
+ error_log( 'ERROR: _save_settings unknown type(2): ' . var_export( $value, true ), 0 );
671
+ } // $value['type']
672
+ } // ! isset $key
673
+
674
+ return $message;
675
+ }
676
+
677
+ /**
678
+ * Compose the table row for a single MLA option
679
+ *
680
+ * @since 0.80
681
+ * @uses $page_template_array contains option and option-item templates
682
+ *
683
+ * @param string HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
684
+ * @param array Option parameters, e.g., 'type', 'std'
685
+ *
686
+ * @return string HTML markup for the option's table row
687
+ */
688
+ private static function _compose_option_row( $key, $value ) {
689
+ switch ( $value['type'] ) {
690
+ case 'checkbox':
691
+ $option_values = array(
692
+ 'key' => MLA_OPTION_PREFIX . $key,
693
+ 'checked' => '',
694
+ 'value' => $value['name'],
695
+ 'help' => $value['help']
696
+ );
697
+
698
+ if ( 'checked' == self::mla_get_option( $key ) )
699
+ $option_values['checked'] = 'checked="checked"';
700
+
701
+ return MLAData::mla_parse_template( self::$page_template_array['checkbox'], $option_values );
702
+ case 'header':
703
+ $option_values = array(
704
+ 'key' => MLA_OPTION_PREFIX . $key,
705
+ 'value' => $value['name']
706
+ );
707
+
708
+ return MLAData::mla_parse_template( self::$page_template_array['header'], $option_values );
709
+ case 'radio':
710
+ $radio_options = '';
711
+ foreach ( $value['options'] as $optid => $option ) {
712
+ $option_values = array(
713
+ 'key' => MLA_OPTION_PREFIX . $key,
714
+ 'option' => $option,
715
+ 'checked' => '',
716
+ 'value' => $value['texts'][$optid]
717
+ );
718
+
719
+ if ( $option == self::mla_get_option( $key ) )
720
+ $option_values['checked'] = 'checked="checked"';
721
+
722
+ $radio_options .= MLAData::mla_parse_template( self::$page_template_array['radio-option'], $option_values );
723
+ }
724
+
725
+ $option_values = array(
726
+ 'value' => $value['name'],
727
+ 'options' => $radio_options,
728
+ 'help' => $value['help']
729
+ );
730
+
731
+ return MLAData::mla_parse_template( self::$page_template_array['radio'], $option_values );
732
+ case 'select':
733
+ $select_options = '';
734
+ foreach ( $value['options'] as $optid => $option ) {
735
+ $option_values = array(
736
+ 'selected' => '',
737
+ 'value' => $option,
738
+ 'text' => $value['texts'][$optid]
739
+ );
740
+
741
+ if ( $option == self::mla_get_option( $key ) )
742
+ $option_values['selected'] = 'selected="selected"';
743
+
744
+ $select_options .= MLAData::mla_parse_template( self::$page_template_array['select-option'], $option_values );
745
+ }
746
+
747
+ $option_values = array(
748
+ 'key' => MLA_OPTION_PREFIX . $key,
749
+ 'value' => $value['name'],
750
+ 'options' => $select_options,
751
+ 'help' => $value['help']
752
+ );
753
+
754
+ return MLAData::mla_parse_template( self::$page_template_array['select'], $option_values );
755
+ case 'text':
756
+ $option_values = array(
757
+ 'key' => MLA_OPTION_PREFIX . $key,
758
+ 'value' => $value['name'],
759
+ 'options' => $select_options,
760
+ 'help' => $value['help'],
761
+ 'size' => '40',
762
+ 'text' => ''
763
+ );
764
+
765
+ if ( !empty( $value['size'] ) )
766
+ $option_values['size'] = $value['size'];
767
+
768
+ $option_values['text'] = self::mla_get_option( $key );
769
+
770
+ return MLAData::mla_parse_template( self::$page_template_array['text'], $option_values );
771
+ case 'textarea':
772
+ $option_values = array(
773
+ 'key' => MLA_OPTION_PREFIX . $key,
774
+ 'value' => $value['name'],
775
+ 'options' => $select_options,
776
+ 'help' => $value['help'],
777
+ 'cols' => '90',
778
+ 'rows' => '5',
779
+ 'text' => ''
780
+ );
781
+
782
+ if ( !empty( $value['cols'] ) )
783
+ $option_values['cols'] = $value['cols'];
784
+
785
+ if ( !empty( $value['rows'] ) )
786
+ $option_values['rows'] = $value['rows'];
787
+
788
+ $option_values['text'] = stripslashes( self::mla_get_option( $key ) );
789
+
790
+ return MLAData::mla_parse_template( self::$page_template_array['textarea'], $option_values );
791
+ case 'custom':
792
+ if ( isset( $value['render'] ) )
793
+ return self::$value['render']( 'render', $key, $value );
794
+
795
+ break;
796
+ case 'hidden':
797
+ break;
798
+ default:
799
+ error_log( 'ERROR: mla_render_settings_page unknown type: ' . var_export( $value, true ), 0 );
800
+ } //switch
801
 
802
+ return '';
803
+ }
804
+
805
+ /**
806
+ * Template file for the Settings page(s) and parts
807
+ *
808
+ * This array contains all of the template parts for the Settings page(s). The array is built once
809
+ * each page load and cached for subsequent use.
810
+ *
811
+ * @since 0.80
812
+ *
813
+ * @var array
814
+ */
815
+ private static $page_template_array = null;
816
+
817
+ /**
818
+ * Definitions for Settings page tab ids, titles and handlers
819
+ * Each tab is defined by an array with the following elements:
820
+ *
821
+ * array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
822
+ *
823
+ * title => tab label / heading text
824
+ * render => rendering function for tab messages and content. Usage:
825
+ * $tab_content = ['render']( );
826
+ *
827
+ * @since 0.80
828
+ *
829
+ * @var array
830
+ */
831
+ private static $mla_tablist = array(
832
+ 'general' => array( 'title' => 'General', 'render' => '_compose_general_tab' ),
833
+ 'mla-gallery' => array( 'title' => 'MLA Gallery', 'render' => '_compose_mla_gallery_tab' ),
834
+ 'documentation' => array( 'title' => 'Documentation', 'render' => '_compose_documentation_tab' )
835
+ );
836
+
837
+ /**
838
+ * Compose the navigation tabs for the Settings subpage
839
+ *
840
+ * @since 0.80
841
+ * @uses $page_template_array contains tablist and tablist-item templates
842
+ *
843
+ * @param string Optional data-tab-id value for the active tab, default 'general'
844
+ *
845
+ * @return string HTML markup for the Settings subpage navigation tabs
846
+ */
847
+ private static function _compose_settings_tabs( $active_tab = 'general' ) {
848
+ $tablist_item = self::$page_template_array['tablist-item'];
849
+ $tabs = '';
850
+ foreach ( self::$mla_tablist as $key => $item ) {
851
+ $item_values = array(
852
+ 'data-tab-id' => $key,
853
+ 'nav-tab-active' => ( $active_tab == $key ) ? 'nav-tab-active' : '',
854
+ 'settings-page' => self::MLA_SETTINGS_SLUG,
855
+ 'title' => $item['title']
856
+ );
857
+
858
+ $tabs .= MLAData::mla_parse_template( $tablist_item, $item_values );
859
+ } // foreach $item
860
 
861
+ $tablist_values = array( 'tablist' => $tabs );
862
+ return MLAData::mla_parse_template( self::$page_template_array['tablist'], $tablist_values );
863
+ }
864
+
865
+ /**
866
+ * Compose the General tab content for the Settings subpage
867
+ *
868
+ * @since 0.80
869
+ * @uses $page_template_array contains tab content template(s)
870
+ *
871
+ * @return array 'message' => status/error messages, 'body' => tab content
872
+ */
873
+ private static function _compose_general_tab( ) {
874
  /*
875
  * Check for submit buttons to change or reset settings.
876
+ * Initialize page messages and content.
877
  */
878
+ if ( !empty( $_REQUEST['mla-general-options-save'] ) ) {
879
  check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
880
+ $page_content = self::_save_general_settings( );
881
+ } elseif ( !empty( $_REQUEST['mla-general-options-reset'] ) ) {
882
  check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
883
+ $page_content = self::_reset_general_settings( );
884
  } else {
885
  $page_content = array(
886
  'message' => '',
889
  }
890
 
891
  if ( !empty( $page_content['body'] ) ) {
892
+ return $page_content;
 
893
  }
894
 
895
+ $page_values = array(
896
+ 'shortcode_list' => '',
897
+ 'options_list' => '',
898
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
899
+ '_wp_http_referer' => wp_referer_field( false )
900
+ );
901
+
902
  /*
903
  * $custom_fields documents the name and description of custom fields
904
  */
912
  $shortcodes = array(
913
  // array("name" => "shortcode", "description" => "This shortcode...")
914
  array( 'name' => 'mla_attachment_list', 'description' => 'renders a complete list of all attachments and references to them.' ),
915
+ 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>.' )
916
  );
917
 
918
  $shortcode_list = '';
919
  foreach ( $shortcodes as $shortcode ) {
920
  $shortcode_values = array ( 'name' => $shortcode['name'], 'description' => $shortcode['description'] );
921
+ $shortcode_list .= MLAData::mla_parse_template( self::$page_template_array['shortcode-item'], $shortcode_values );
922
  }
923
 
924
  if ( ! empty( $shortcode_list ) ) {
925
  $shortcode_values = array ( 'shortcode_list' => $shortcode_list );
926
+ $page_values['shortcode_list'] = MLAData::mla_parse_template( self::$page_template_array['shortcode-list'], $shortcode_values );
927
  }
928
 
929
  /*
937
 
938
  $options_list = '';
939
  foreach ( self::$mla_options as $key => $value ) {
940
+ if ( 'general' == $value['tab'] )
941
+ $options_list .= self::_compose_option_row( $key, $value );
942
+ }
943
+
944
+ $page_values['options_list'] = $options_list;
945
+ $page_content['body'] = MLAData::mla_parse_template( self::$page_template_array['general-tab'], $page_values );
946
+ return $page_content;
947
+ }
948
+
949
+ /**
950
+ * Compose the MLA Gallery tab content for the Settings subpage
951
+ *
952
+ * @since 0.80
953
+ * @uses $page_template_array contains tab content template(s)
954
+ *
955
+ * @return array 'message' => status/error messages, 'body' => tab content
956
+ */
957
+ private static function _compose_mla_gallery_tab( ) {
958
+ /*
959
+ * Check for submit buttons to change or reset settings.
960
+ * Initialize page messages and content.
961
+ */
962
+ if ( !empty( $_REQUEST['mla-gallery-options-save'] ) ) {
963
+ check_admin_referer( MLA::MLA_ADMIN_NONCE, '_wpnonce' );
964
+ $page_content = self::_save_gallery_settings( );
965
+ } else {
966
+ $page_content = array(
967
+ 'message' => '',
968
+ 'body' => ''
969
+ );
970
+ }
971
+
972
+ if ( !empty( $page_content['body'] ) ) {
973
+ return $page_content;
974
+ }
975
+
976
+ $page_values = array(
977
+ 'options_list' => '',
978
+ 'style_options_list' => '',
979
+ 'markup_options_list' => '',
980
+ '_wpnonce' => wp_nonce_field( MLA::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
981
+ '_wp_http_referer' => wp_referer_field( false )
982
+ );
983
+
984
+ /*
985
+ * Start with any page-level options
986
+ */
987
+ $options_list = '';
988
+ foreach ( self::$mla_options as $key => $value ) {
989
+ if ( 'mla-gallery' == $value['tab'] )
990
+ $options_list .= self::_compose_option_row( $key, $value );
991
+ }
992
+
993
+ $page_values['options_list'] = $options_list;
994
+
995
+ /*
996
+ * Add style templates; default goes first
997
+ */
998
+ $style_options_list = '';
999
+ $templates = self::_get_style_templates();
1000
+
1001
+ $name = 'default';
1002
+ $value =$templates['default'];
1003
+ if ( ! empty( $value ) ) {
1004
+ $template_values = array (
1005
+ 'help' => 'The default template cannot be altered or deleted, but you can copy the styles.'
1006
+ );
1007
+ $control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
1008
+
1009
+ $template_values = array (
1010
+ 'readonly' => 'readonly="readonly"',
1011
+ 'name_name' => 'mla_style_templates_name[default]',
1012
+ 'name_id' => 'mla_style_templates_name_default',
1013
+ 'name_text' => 'default',
1014
+ 'control_cells' => $control_cells,
1015
+ 'value_name' => 'mla_style_templates_value[default]',
1016
+ 'value_id' => 'mla_style_templates_value_default',
1017
+ 'value_text' => esc_textarea( $value ),
1018
+ 'value_help' => 'List of substitution parameters, e.g., [+selector+], on Documentation tab.'
1019
+ );
1020
+
1021
+ $style_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-style'], $template_values );
1022
+ } // $value
1023
+
1024
+ foreach ( $templates as $name => $value ) {
1025
+ $slug = sanitize_title( $name );
1026
+
1027
+ if ( 'default' == $name )
1028
+ continue; // already handled above
1029
+
1030
+ $template_values = array (
1031
+ 'name' => 'mla_style_templates_delete[' . $slug . ']',
1032
+ 'id' => 'mla_style_templates_delete_' . $slug,
1033
+ 'value' => 'Delete this template',
1034
+ 'help' => 'Check the box to delete this template when you press Update at the bottom of the page.'
1035
+ );
1036
+ $control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-delete'], $template_values );
1037
+
1038
+ $template_values = array (
1039
+ 'readonly' => '',
1040
+ 'name_name' => 'mla_style_templates_name[' . $slug . ']',
1041
+ 'name_id' => 'mla_style_templates_name_' . $slug,
1042
+ 'name_text' => $slug,
1043
+ 'control_cells' => $control_cells,
1044
+ 'value_name' => 'mla_style_templates_value[' . $slug . ']',
1045
+ 'value_id' => 'mla_style_templates_value_' . $slug,
1046
+ 'value_text' => esc_textarea( $value ),
1047
+ 'value_help' => 'List of substitution parameters, e.g., [+selector+], on Documentation tab.'
1048
+ );
1049
+
1050
+ $style_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-style'], $template_values );
1051
+ } // foreach $templates
1052
+
1053
+ /*
1054
+ * Add blank style template for additions
1055
+ */
1056
+ if ( ! empty( $value ) ) {
1057
+ $template_values = array (
1058
+ 'help' => 'Fill in a name and styles to add a new template.'
1059
+ );
1060
+ $control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
1061
+
1062
+ $template_values = array (
1063
+ 'readonly' => '',
1064
+ 'name_name' => 'mla_style_templates_name[blank]',
1065
+ 'name_id' => 'mla_style_templates_name_blank',
1066
+ 'name_text' => '',
1067
+ 'control_cells' => $control_cells,
1068
+ 'value_name' => 'mla_style_templates_value[blank]',
1069
+ 'value_id' => 'mla_style_templates_value_blank',
1070
+ 'value_text' => '',
1071
+ 'value_help' => 'List of substitution parameters, e.g., [+selector+], on Documentation tab.'
1072
+ );
1073
+
1074
+ $style_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-style'], $template_values );
1075
+ } // $value
1076
+
1077
+ $page_values['style_options_list'] = $style_options_list;
1078
+
1079
+ /*
1080
+ * Add markup templates; default goes first
1081
+ */
1082
+ $markup_options_list = '';
1083
+ $templates = self::_get_markup_templates();
1084
+
1085
+ $name = 'default';
1086
+ $value =$templates['default'];
1087
+ if ( ! empty( $value ) ) {
1088
+ $template_values = array (
1089
+ 'help' => 'The default template cannot be altered or deleted, but you can copy the markup.'
1090
+ );
1091
+ $control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
1092
+
1093
+ $template_values = array (
1094
+ 'readonly' => 'readonly="readonly"',
1095
+ 'name_name' => 'mla_markup_templates_name[default]',
1096
+ 'name_id' => 'mla_markup_templates_name_default',
1097
+ 'name_text' => 'default',
1098
+ 'control_cells' => $control_cells,
1099
+
1100
+ 'open_name' => 'mla_markup_templates_open[default]',
1101
+ 'open_id' => 'mla_markup_templates_open_default',
1102
+ 'open_text' => esc_textarea( $value['open'] ),
1103
+ 'open_help' => 'Markup for the beginning of the gallery. List of parameters, e.g., [+selector+], on Documentation tab.',
1104
+
1105
+ 'row_open_name' => 'mla_markup_templates_row_open[default]',
1106
+ 'row_open_id' => 'mla_markup_templates_row_open_default',
1107
+ 'row_open_text' => esc_textarea( $value['row-open'] ),
1108
+ 'row_open_help' => 'Markup for the beginning of each row in the gallery.',
1109
+
1110
+ 'item_name' => 'mla_markup_templates_item[default]',
1111
+ 'item_id' => 'mla_markup_templates_item_default',
1112
+ 'item_text' => esc_textarea( $value['item'] ),
1113
+ 'item_help' => 'Markup for each item/cell of the gallery.',
1114
+
1115
+ 'row_close_name' => 'mla_markup_templates_row_close[default]',
1116
+ 'row_close_id' => 'mla_markup_templates_row_close_default',
1117
+ 'row_close_text' => esc_textarea( $value['row-close'] ),
1118
+ 'row_close_help' => 'Markup for the end of each row in the gallery.',
1119
+
1120
+ 'close_name' => 'mla_markup_templates_close[default]',
1121
+ 'close_id' => 'mla_markup_templates_close_default',
1122
+ 'close_text' => esc_textarea( $value['close'] ),
1123
+ 'close_help' => 'Markup for the end of the gallery.'
1124
+ );
1125
+
1126
+ $markup_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-markup'], $template_values );
1127
+ } // $value
1128
+
1129
+ foreach ( $templates as $name => $value ) {
1130
+ $slug = sanitize_title( $name );
1131
+
1132
+ if ( 'default' == $name )
1133
+ continue; // already handled above
1134
+
1135
+ $template_values = array (
1136
+ 'name' => 'mla_markup_templates_delete[' . $slug . ']',
1137
+ 'id' => 'mla_markup_templates_delete_' . $slug,
1138
+ 'value' => 'Delete this template',
1139
+ 'help' => 'Check the box to delete this template when you press Update at the bottom of the page.'
1140
+ );
1141
+ $control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-delete'], $template_values );
1142
+
1143
+ $template_values = array (
1144
+ 'readonly' => '',
1145
+ 'name_name' => 'mla_markup_templates_name[' . $slug . ']',
1146
+ 'name_id' => 'mla_markup_templates_name_' . $slug,
1147
+ 'name_text' => $slug,
1148
+ 'control_cells' => $control_cells,
1149
+
1150
+ 'open_name' => 'mla_markup_templates_open[' . $slug . ']',
1151
+ 'open_id' => 'mla_markup_templates_open_' . $slug,
1152
+ 'open_text' => esc_textarea( $value['open'] ),
1153
+ 'open_help' => 'Markup for the beginning of the gallery. List of parameters, e.g., [+selector+], on Documentation tab.',
1154
+
1155
+ 'row_open_name' => 'mla_markup_templates_row_open[' . $slug . ']',
1156
+ 'row_open_id' => 'mla_markup_templates_row_open_' . $slug,
1157
+ 'row_open_text' => esc_textarea( $value['row-open'] ),
1158
+ 'row_open_help' => 'Markup for the beginning of each row.',
1159
+
1160
+ 'item_name' => 'mla_markup_templates_item[' . $slug . ']',
1161
+ 'item_id' => 'mla_markup_templates_item_' . $slug,
1162
+ 'item_text' => esc_textarea( $value['item'] ),
1163
+ 'item_help' => 'Markup for each item/cell.',
1164
+
1165
+ 'row_close_name' => 'mla_markup_templates_row_close[' . $slug . ']',
1166
+ 'row_close_id' => 'mla_markup_templates_row_close_' . $slug,
1167
+ 'row_close_text' => esc_textarea( $value['row-close'] ),
1168
+ 'row_close_help' => 'Markup for the end of each row.',
1169
+
1170
+ 'close_name' => 'mla_markup_templates_close[' . $slug . ']',
1171
+ 'close_id' => 'mla_markup_templates_close_' . $slug,
1172
+ 'close_text' => esc_textarea( $value['close'] ),
1173
+ 'close_help' => 'Markup for the end of the gallery.'
1174
+ );
1175
+
1176
+ $markup_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-markup'], $template_values );
1177
+ } // foreach $templates
1178
+
1179
+ /*
1180
+ * Add blank markup template for additions
1181
+ */
1182
+ if ( ! empty( $value ) ) {
1183
+ $template_values = array (
1184
+ 'help' => 'Fill in a name and markup to add a new template.'
1185
+ );
1186
+ $control_cells = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-default'], $template_values );
1187
+
1188
+ $template_values = array (
1189
+ 'readonly' => '',
1190
+ 'name_name' => 'mla_markup_templates_name[blank]',
1191
+ 'name_id' => 'mla_markup_templates_name_blank',
1192
+ 'name_text' => '',
1193
+ 'control_cells' => $control_cells,
1194
+
1195
+ 'open_name' => 'mla_markup_templates_open[blank]',
1196
+ 'open_id' => 'mla_markup_templates_open_blank',
1197
+ 'open_text' => '',
1198
+ 'open_help' => 'Markup for the beginning of the gallery. List of parameters, e.g., [+selector+], on Documentation tab.',
1199
+
1200
+ 'row_open_name' => 'mla_markup_templates_row_open[blank]',
1201
+ 'row_open_id' => 'mla_markup_templates_row_open_blank',
1202
+ 'row_open_text' => '',
1203
+ 'row_open_help' => 'Markup for the beginning of each row in the gallery.',
1204
+
1205
+ 'item_name' => 'mla_markup_templates_item[blank]',
1206
+ 'item_id' => 'mla_markup_templates_item_blank',
1207
+ 'item_text' => '',
1208
+ 'item_help' => 'Markup for each item/cell of the gallery.',
1209
+
1210
+ 'row_close_name' => 'mla_markup_templates_row_close[blank]',
1211
+ 'row_close_id' => 'mla_markup_templates_row_close_blank',
1212
+ 'row_close_text' => '',
1213
+ 'row_close_help' => 'Markup for the end of each row in the gallery.',
1214
+
1215
+ 'close_name' => 'mla_markup_templates_close[blank]',
1216
+ 'close_id' => 'mla_markup_templates_close_blank',
1217
+ 'close_text' => '',
1218
+ 'close_help' => 'Markup for the end of the gallery.'
1219
+
1220
+ );
1221
+
1222
+ $markup_options_list .= MLAData::mla_parse_template( self::$page_template_array['mla-gallery-markup'], $template_values );
1223
+ } // $value
1224
+
1225
+ $page_values['markup_options_list'] = $markup_options_list;
1226
+
1227
+ $page_content['body'] = MLAData::mla_parse_template( self::$page_template_array['mla-gallery-tab'], $page_values );
1228
+ return $page_content;
1229
+ }
1230
+
1231
+ /**
1232
+ * Compose the Documentation tab content for the Settings subpage
1233
+ *
1234
+ * @since 0.80
1235
+ * @uses $page_template_array contains tab content template(s)
1236
+ *
1237
+ * @return array 'message' => status/error messages, 'body' => tab content
1238
+ */
1239
+ private static function _compose_documentation_tab( ) {
1240
+ $page_values = array(
1241
+ 'phpDocs_url' => MLA_PLUGIN_URL . 'phpDocs/index.html'
1242
+ );
1243
+
1244
+ return array(
1245
+ 'message' => '',
1246
+ 'body' => MLAData::mla_parse_template( self::$page_template_array['documentation-tab'], $page_values )
1247
+ );
1248
+ }
1249
+
1250
+ /**
1251
+ * Render (echo) the "Media Library Assistant" subpage in the Settings section
1252
+ *
1253
+ * @since 0.1
1254
+ *
1255
+ * @return void Echoes HTML markup for the Settings subpage
1256
+ */
1257
+ public static function mla_render_settings_page( ) {
1258
+ if ( !current_user_can( 'manage_options' ) ) {
1259
+ echo "Media Library Assistant - Error</h2>\r\n";
1260
+ wp_die( __( 'You do not have permission to manage plugin settings.' ) );
1261
  }
1262
 
1263
+ /*
1264
+ * Load template array and initialize page-level values.
1265
+ */
1266
+ self::$page_template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/admin-display-settings-page.tpl' );
1267
+ $current_tab = isset( $_REQUEST['mla_tab'] ) ? $_REQUEST['mla_tab']: 'general';
1268
+ $page_values = array(
1269
+ 'version' => 'v' . MLA::CURRENT_MLA_VERSION,
1270
+ 'messages' => '',
1271
+ 'tablist' => self::_compose_settings_tabs( $current_tab ),
1272
+ 'tab_content' => ''
1273
+ );
1274
+
1275
+ /*
1276
+ * Compose tab content
1277
+ */
1278
+ if ( array_key_exists( $current_tab, self::$mla_tablist ) ) {
1279
+ if ( isset( self::$mla_tablist[ $current_tab ]['render'] ) ) {
1280
+ $handler = self::$mla_tablist[ $current_tab ]['render'];
1281
+ $page_content = self::$handler( );
1282
+ } else {
1283
+ $page_content = array( 'message' => 'ERROR: cannot render content tab', 'body' => '' );
1284
+ }
1285
+ } else {
1286
+ $page_content = array( 'message' => 'ERROR: unknown content tab', 'body' => '' );
1287
+ }
1288
+
1289
  if ( ! empty( $page_content['message'] ) )
1290
+ $page_values['messages'] = MLAData::mla_parse_template( self::$page_template_array['messages'], array(
1291
  'messages' => $page_content['message']
1292
  ) );
1293
+
1294
+ $page_values['tab_content'] = $page_content['body'];
1295
+ echo MLAData::mla_parse_template( self::$page_template_array['page'], $page_values );
1296
  } // mla_render_settings_page
1297
 
1298
  /**
1302
  * @since 0.30
1303
  *
1304
  * @param string Taxonomy name, e.g., attachment_category
1305
+ * @param string Optional. 'support' (default), 'quick-edit' or 'filter'
1306
  *
1307
  * @return boolean|string
1308
  * true if the taxonomy is supported in this way else false
1316
  $tax_support = isset( $tax_options['tax_support'] ) ? $tax_options['tax_support'] : array ();
1317
  $is_supported = array_key_exists( $tax_name, $tax_support );
1318
 
1319
+ if ( !empty( $_REQUEST['mla-general-options-save'] ) ) {
1320
  $is_supported = isset( $_REQUEST['tax_support'][ $tax_name ] );
1321
+ } elseif ( !empty( $_REQUEST['mla-general-options-reset'] ) ) {
1322
  switch ( $tax_name ) {
1323
  case 'attachment_category':
1324
  case 'attachment_tag':
1334
  $tax_quick_edit = isset( $tax_options['tax_quick_edit'] ) ? $tax_options['tax_quick_edit'] : array ();
1335
  $is_supported = array_key_exists( $tax_name, $tax_quick_edit );
1336
 
1337
+ if ( !empty( $_REQUEST['mla-general-options-save'] ) ) {
1338
  $is_supported = isset( $_REQUEST['tax_quick_edit'][ $tax_name ] );
1339
+ } elseif ( !empty( $_REQUEST['mla-general-options-reset'] ) ) {
1340
  switch ( $tax_name ) {
1341
  case 'attachment_category':
1342
  case 'attachment_tag':
1355
  else
1356
  $is_supported = ( $tax_name == $tax_filter );
1357
 
1358
+ if ( !empty( $_REQUEST['mla-general-options-save'] ) ) {
1359
  $tax_filter = isset( $_REQUEST['tax_filter'] ) ? $_REQUEST['tax_filter'] : '';
1360
  $is_supported = ( $tax_name == $tax_filter );
1361
+ } elseif ( !empty( $_REQUEST['mla-general-options-reset'] ) ) {
1362
  if ( 'attachment_category' == $tax_name )
1363
  $is_supported = true;
1364
  else
1372
  } // mla_taxonomy_support
1373
 
1374
  /**
1375
+ * Save MLA Gallery settings to the options table
1376
  *
1377
+ * @since 0.80
1378
  *
1379
+ * @uses $_REQUEST
1380
  *
1381
  * @return array Message(s) reflecting the results of the operation
1382
  */
1383
+ private static function _save_gallery_settings( ) {
1384
+ $settings_changed = false;
1385
  $message_list = '';
1386
+ $error_list = '';
1387
 
1388
+ /*
1389
+ * Start with any page-level options
1390
+ */
1391
  foreach ( self::$mla_options as $key => $value ) {
1392
+ if ( 'mla-gallery' == $value['tab'] )
1393
+ $message_list .= self::_update_option_row( $key, $value );
1394
+ } // foreach mla_options
1395
+
1396
+ /*
1397
+ * Get the current style contents for comparison
1398
+ */
1399
+ $old_templates = self::_get_style_templates();
1400
+ $new_templates = array( );
1401
+ $new_names = $_REQUEST['mla_style_templates_name'];
1402
+ $new_values = stripslashes_deep( $_REQUEST['mla_style_templates_value'] );
1403
+ $new_deletes = isset( $_REQUEST['mla_style_templates_delete'] ) ? $_REQUEST['mla_style_templates_delete']: array( );
1404
+
1405
+ /*
1406
+ * Build new style template array, noting changes
1407
+ */
1408
+ $templates_changed = false;
1409
+ foreach ( $new_names as $name => $new_name ) {
1410
+ if ( 'default' == $name )
1411
+ continue;
1412
+
1413
+ if( array_key_exists( $name, $new_deletes ) ) {
1414
+ $message_list .= "<br>Deleting style template '{$name}'.";
1415
+ $templates_changed = true;
1416
+ continue;
1417
+ }
1418
+
1419
+ $new_slug = sanitize_title( $new_name );
1420
+ if ( 'blank' == $name ) {
1421
+ if ( '' == $new_slug )
1422
+ continue;
1423
+ elseif ( 'blank' == $new_slug ) {
1424
+ $error_list .= "<br>Error: reserved name '{$new_slug}', new style template discarded.";
1425
+ continue;
1426
+ }
1427
+
1428
+ if( array_key_exists( $new_slug, $old_templates ) ) {
1429
+ $error_list .= "<br>Error: duplicate name '{$new_slug}', new style template discarded.";
1430
+ continue;
1431
+ }
1432
+ else {
1433
+ $message_list .= "<br>Adding new style template '{$new_slug}'.";
1434
+ $templates_changed = true;
1435
+ }
1436
+ } // 'blank' - reserved name
1437
+
1438
+ /*
1439
+ * Handle name changes, check for duplicates
1440
+ */
1441
+ if ( '' == $new_slug ) {
1442
+ $error_list .= "<br>Error: blank style template name value, reverting to '{$name}'.";
1443
+ $new_slug = $name;
 
 
 
 
 
 
 
 
 
 
1444
  }
1445
+
1446
+ if ( $new_slug != $name ) {
1447
+ if( array_key_exists( $new_slug, $old_templates ) ) {
1448
+ $error_list .= "<br>Error: duplicate new style template name '{$new_slug}', reverting to '{$name}'.";
1449
+ $new_slug = $name;
1450
+ }
1451
+ elseif ( 'blank' != $name ) {
1452
+ $message_list .= "<br>Changing style template name from '{$name}' to '{$new_slug}'.";
1453
+ $templates_changed = true;
1454
+ }
1455
+ } // name changed
1456
+
1457
+ if ( ( 'blank' != $name ) && ( $new_values[ $name ] != $old_templates[ $name ] ) ) {
1458
+ $message_list .= "<br>Updating contents of style template '{$new_slug}'.";
1459
+ $templates_changed = true;
1460
+ }
1461
+
1462
+ $new_templates[ $new_slug ] = $new_values[ $name ];
1463
+ } // foreach $name
1464
+
1465
+ if ( $templates_changed ) {
1466
+ $settings_changed = true;
1467
+ if ( false == self::_put_style_templates( $new_templates ) )
1468
+ $error_list .= "<br>Error: update of style templates failed.";
1469
  }
1470
 
1471
+ /*
1472
+ * Get the current markup contents for comparison
1473
+ */
1474
+ $old_templates = self::_get_markup_templates();
1475
+ $new_templates = array( );
1476
+ $new_names = $_REQUEST['mla_markup_templates_name'];
1477
+ $new_values['open'] = stripslashes_deep( $_REQUEST['mla_markup_templates_open'] );
1478
+ $new_values['row-open'] = stripslashes_deep( $_REQUEST['mla_markup_templates_row_open'] );
1479
+ $new_values['item'] = stripslashes_deep( $_REQUEST['mla_markup_templates_item'] );
1480
+ $new_values['row-close'] = stripslashes_deep( $_REQUEST['mla_markup_templates_row_close'] );
1481
+ $new_values['close'] = stripslashes_deep( $_REQUEST['mla_markup_templates_close'] );
1482
+ $new_deletes = isset( $_REQUEST['mla_markup_templates_delete'] ) ? $_REQUEST['mla_markup_templates_delete']: array( );
1483
+
1484
+ /*
1485
+ * Build new markup template array, noting changes
1486
+ */
1487
+ $templates_changed = false;
1488
+ foreach ( $new_names as $name => $new_name ) {
1489
+ if ( 'default' == $name )
1490
+ continue;
1491
+
1492
+ if( array_key_exists( $name, $new_deletes ) ) {
1493
+ $message_list .= "<br>Deleting markup template '{$name}'.";
1494
+ $templates_changed = true;
1495
+ continue;
1496
+ }
1497
+
1498
+ $new_slug = sanitize_title( $new_name );
1499
+ if ( 'blank' == $name ) {
1500
+ if ( '' == $new_slug )
1501
+ continue;
1502
+
1503
+ if ( 'blank' == $new_slug ) {
1504
+ $error_list .= "<br>Error: reserved name '{$new_slug}', new markup template discarded.";
1505
+ continue;
1506
+ }
1507
+
1508
+ if( array_key_exists( $new_slug, $old_templates ) ) {
1509
+ $error_list .= "<br>Error: duplicate name '{$new_slug}', new markup template discarded.";
1510
+ continue;
1511
+ }
1512
+ else {
1513
+ $message_list .= "<br>Adding new markup template '{$new_slug}'.";
1514
+ $templates_changed = true;
1515
+ }
1516
+ } // 'blank' - reserved name
1517
+
1518
+ /*
1519
+ * Handle name changes, check for duplicates
1520
+ */
1521
+ if ( '' == $new_slug ) {
1522
+ $error_list .= "<br>Error: blank markup template name value, reverting to '{$name}'.";
1523
+ $new_slug = $name;
1524
+ }
1525
+
1526
+ if ( $new_slug != $name ) {
1527
+ if( array_key_exists( $new_slug, $old_templates ) ) {
1528
+ $error_list .= "<br>Error: duplicate new markup template name '{$new_slug}', reverting to '{$name}'.";
1529
+ $new_slug = $name;
1530
+ }
1531
+
1532
+ if( array_key_exists( $new_slug, $old_templates ) ) {
1533
+ $error_list .= "<br>Error: duplicate new markup template name '{$new_slug}', reverting to '{$name}'.";
1534
+ $new_slug = $name;
1535
+ }
1536
+ elseif ( 'blank' != $name ) {
1537
+ $message_list .= "<br>Changing markup template name from '{$name}' to '{$new_slug}'.";
1538
+ $templates_changed = true;
1539
+ }
1540
+ } // name changed
1541
+
1542
+ if ( 'blank' != $name ) {
1543
+ if ( $new_values['open'][ $name ] != $old_templates[ $name ]['open'] ) {
1544
+ $message_list .= "<br>Updating open markup for '{$new_slug}'.";
1545
+ $templates_changed = true;
1546
+ }
1547
+
1548
+ if ( $new_values['row-open'][ $name ] != $old_templates[ $name ]['row-open'] ) {
1549
+ $message_list .= "<br>Updating row open markup for '{$new_slug}'.";
1550
+ $templates_changed = true;
1551
+ }
1552
+
1553
+ if ( $new_values['item'][ $name ] != $old_templates[ $name ]['item'] ) {
1554
+ $message_list .= "<br>Updating item markup for '{$new_slug}'.";
1555
+ $templates_changed = true;
1556
+ }
1557
+
1558
+ if ( $new_values['row-close'][ $name ] != $old_templates[ $name ]['row-close'] ) {
1559
+ $message_list .= "<br>Updating row close markup for '{$new_slug}'.";
1560
+ $templates_changed = true;
1561
+ }
1562
+
1563
+ if ( $new_values['close'][ $name ] != $old_templates[ $name ]['close'] ) {
1564
+ $message_list .= "<br>Updating close markup for '{$new_slug}'.";
1565
+ $templates_changed = true;
1566
+ }
1567
+ } // ! 'blank'
1568
+
1569
+ $new_templates[ $new_slug ]['open'] = $new_values['open'][ $name ];
1570
+ $new_templates[ $new_slug ]['row-open'] = $new_values['row-open'][ $name ];
1571
+ $new_templates[ $new_slug ]['item'] = $new_values['item'][ $name ];
1572
+ $new_templates[ $new_slug ]['row-close'] = $new_values['row-close'][ $name ];
1573
+ $new_templates[ $new_slug ]['close'] = $new_values['close'][ $name ];
1574
+ } // foreach $name
1575
+
1576
+ if ( $templates_changed ) {
1577
+ $settings_changed = true;
1578
+ if ( false == self::_put_markup_templates( $new_templates ) )
1579
+ $error_list .= "<br>Error: update of markup templates failed.";
1580
+ }
1581
+
1582
+ if ( $settings_changed )
1583
+ $message = "MLA Gallery settings saved.\r\n";
1584
+ else
1585
+ $message = "MLA Gallery no changes detected.\r\n";
1586
+
1587
  $page_content = array(
1588
+ 'message' => $message . $error_list,
1589
  'body' => ''
1590
  );
1591
 
1595
  // $page_content['message'] .= $message_list;
1596
 
1597
  return $page_content;
1598
+ } // _save_gallery_settings
1599
 
1600
  /**
1601
+ * Save General settings to the options table
1602
  *
1603
  * @since 0.1
1604
  *
1605
+ * @uses $_REQUEST
1606
+ *
1607
+ * @return array Message(s) reflecting the results of the operation
1608
+ */
1609
+ private static function _save_general_settings( ) {
1610
+ $message_list = '';
1611
+
1612
+ foreach ( self::$mla_options as $key => $value ) {
1613
+ if ( 'general' == $value['tab'] )
1614
+ $message_list .= self::_update_option_row( $key, $value );
1615
+ } // foreach mla_options
1616
+
1617
+ $page_content = array(
1618
+ 'message' => "General settings saved.\r\n",
1619
+ 'body' => ''
1620
+ );
1621
+
1622
+ /*
1623
+ * Uncomment this for debugging.
1624
+ */
1625
+ // $page_content['message'] .= $message_list;
1626
+
1627
+ return $page_content;
1628
+ } // _save_general_settings
1629
+
1630
+ /**
1631
+ * Delete saved settings, restoring default values
1632
+ *
1633
+ * @since 0.1
1634
  *
1635
  * @return array Message(s) reflecting the results of the operation
1636
  */
1637
+ private static function _reset_general_settings( ) {
1638
  $message_list = '';
1639
 
1640
  foreach ( self::$mla_options as $key => $value ) {
1663
  // $page_content['message'] .= $message_list;
1664
 
1665
  return $page_content;
1666
+ } // _reset_general_settings
1667
 
1668
  /**
1669
  * Render and manage other taxonomy support options, e.g., Categories and Post Tags
1670
  *
1671
  * @since 0.30
1672
+ * @uses $page_template_array contains taxonomy-row and taxonomy-table templates
1673
  *
1674
  * @param string 'render', 'update', 'delete', or 'reset'
1675
  * @param string option name, e.g., 'taxonomy_support'
1676
  * @param array option parameters
1677
+ * @param array Optional. null (default) for 'render' else $_REQUEST
1678
  *
1679
  * @return string HTML table row markup for 'render' else message(s) reflecting the results of the operation.
1680
  */
1681
+ private static function _taxonomy_handler( $action, $key, $value, $args = null ) {
1682
  switch ( $action ) {
1683
  case 'render':
1684
  $taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'objects' );
1716
  $tax_filter = '';
1717
  }
1718
 
1719
+ $taxonomy_row = self::$page_template_array['taxonomy-row'];
1720
  $row = '';
1721
 
1722
  foreach ($taxonomies as $tax_name => $tax_object) {
1736
  'help' => $value['help']
1737
  );
1738
 
1739
+ return MLAData::mla_parse_template( self::$page_template_array['taxonomy-table'], $option_values );
1740
  case 'update':
1741
  case 'delete':
1742
  $tax_support = isset( $args['tax_support'] ) ? $args['tax_support'] : array ();
includes/class-mla-shortcodes.php CHANGED
@@ -49,13 +49,11 @@ class MLAShortcodes {
49
  $exclude_revisions = '';
50
 
51
  $attachments = $wpdb->get_results(
52
- $wpdb->prepare(
53
  "
54
  SELECT ID, post_title, post_name, post_parent
55
  FROM {$wpdb->posts}
56
  WHERE {$exclude_revisions}post_type = 'attachment'
57
  "
58
- )
59
  );
60
 
61
  foreach ( $attachments as $attachment ) {
@@ -111,8 +109,12 @@ class MLAShortcodes {
111
  if ( $references['is_unattached'] )
112
  $errors .= '(UNATTACHED) ';
113
  else {
114
- if ( !$references['found_parent'] )
115
- $errors .= '(BAD PARENT) ';
 
 
 
 
116
  }
117
 
118
  if ( !empty( $errors ) )
@@ -156,20 +158,22 @@ class MLAShortcodes {
156
  public static function mla_gallery_shortcode($attr) {
157
  global $post;
158
 
159
- static $instance = 0;
160
- $instance++;
161
-
162
  /*
163
  * These are the parameters for gallery display
164
  */
165
  $default_arguments = array(
166
- 'size' => 'thumbnail',
167
  'itemtag' => 'dl',
168
  'icontag' => 'dt',
169
  'captiontag' => 'dd',
170
  'columns' => 3,
171
- 'link' => 'permalink', // or 'file'
172
  // MLA-specific
 
 
 
 
 
173
  'mla_debug' => false
174
  );
175
 
@@ -178,8 +182,7 @@ class MLAShortcodes {
178
  */
179
 
180
  $arguments = shortcode_atts( $default_arguments, $attr );
181
-
182
- self::$mla_debug = !empty( $default_arguments['mla_debug'] ) && ( 'true' == strtolower( $default_arguments['mla_debug'] ) );
183
 
184
  $attachments = self::mla_get_shortcode_attachments( $post->ID, $attr );
185
  if ( empty($attachments) ) {
@@ -194,7 +197,7 @@ class MLAShortcodes {
194
  }
195
  } // empty $attachments
196
 
197
- $size = $arguments['size'];
198
  if ( 'icon' == strtolower( $size) ) {
199
  $size = array( 60, 60 );
200
  $show_icon = true;
@@ -208,70 +211,305 @@ class MLAShortcodes {
208
  $output .= wp_get_attachment_link($att_id, $size, true) . "\n";
209
  return $output;
210
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
- $id = $post->ID;
213
- $itemtag = tag_escape( $arguments['itemtag'] );
214
- $icontag = tag_escape( $arguments['icontag'] );
215
- $captiontag = tag_escape( $arguments['captiontag'] );
216
- $columns = intval( $arguments['columns']);
217
- $itemwidth = $columns > 0 ? floor(100/$columns) : 100;
218
- $float = is_rtl() ? 'right' : 'left';
219
-
220
- $selector = "gallery-{$instance}";
221
-
222
- $gallery_style = $gallery_div = '';
223
- if ( apply_filters( 'use_default_gallery_style', true ) )
224
- $gallery_style = "
225
- <style type='text/css'>
226
- #{$selector} {
227
- margin: auto;
228
- }
229
- #{$selector} .gallery-item {
230
- float: {$float};
231
- margin-top: 10px;
232
- text-align: center;
233
- width: {$itemwidth}%;
234
- }
235
- #{$selector} img {
236
- border: 2px solid #cfcfcf;
237
- }
238
- #{$selector} .gallery-caption {
239
- margin-left: 0;
240
- }
241
- </style>
242
- <!-- see gallery_shortcode() in wp-includes/media.php -->";
243
- $size_class = sanitize_html_class( $size );
244
- $gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
245
- $output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
246
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  if ( self::$mla_debug ) {
248
- $output .= self::$mla_debug_messages;
249
  self::$mla_debug_messages = '';
250
  }
 
 
251
 
 
 
252
  $i = 0;
253
  foreach ( $attachments as $id => $attachment ) {
254
- $link = isset($arguments['link']) && 'file' == $arguments['link'] ? wp_get_attachment_link($attachment->ID, $size, false, $show_icon) : wp_get_attachment_link($attachment->ID, $size, true, $show_icon);
255
-
256
- $output .= "<{$itemtag} class='gallery-item'>";
257
- $output .= "
258
- <{$icontag} class='gallery-icon'>
259
- $link
260
- </{$icontag}>";
261
- if ( $captiontag && trim( $attachment->post_excerpt ) ) {
262
- $output .= "
263
- <{$captiontag} class='wp-caption-text gallery-caption'>
264
- " . wptexturize( $attachment->post_excerpt ) . "
265
- </{$captiontag}>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  }
267
- $output .= "</{$itemtag}>";
268
- if ( $columns > 0 && ++$i % $columns == 0 )
269
- $output .= '<br style="clear: both" />';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  }
271
 
272
- $output .= "
273
- <br style='clear: both;' />
274
- </div>\n";
 
 
 
 
275
 
276
  return $output;
277
  }
@@ -396,7 +634,6 @@ class MLAShortcodes {
396
  * $query_arguments has been initialized in the taxonomy code above.
397
  */
398
  $use_children = empty( $query_arguments );
399
- self::$mla_debug = false;
400
  foreach ($arguments as $key => $value ) {
401
  /*
402
  * There are several "fallthru" cases in this switch statement that decide
@@ -538,11 +775,6 @@ class MLAShortcodes {
538
  }
539
  unset( $arguments[ $key ] );
540
  break;
541
- case 'mla_debug': // boolean
542
- if ( ! empty( $value ) && ( 'true' == strtolower( $value ) ) )
543
- self::$mla_debug = true;
544
- unset( $arguments[ $key ] );
545
- break;
546
  default:
547
  // ignore anything else
548
  } // switch $key
49
  $exclude_revisions = '';
50
 
51
  $attachments = $wpdb->get_results(
 
52
  "
53
  SELECT ID, post_title, post_name, post_parent
54
  FROM {$wpdb->posts}
55
  WHERE {$exclude_revisions}post_type = 'attachment'
56
  "
 
57
  );
58
 
59
  foreach ( $attachments as $attachment ) {
109
  if ( $references['is_unattached'] )
110
  $errors .= '(UNATTACHED) ';
111
  else {
112
+ if ( !$references['found_parent'] ) {
113
+ if ( isset( $references['parent_title'] ) )
114
+ $errors .= '(BAD PARENT) ';
115
+ else
116
+ $errors .= '(INVALID PARENT) ';
117
+ }
118
  }
119
 
120
  if ( !empty( $errors ) )
158
  public static function mla_gallery_shortcode($attr) {
159
  global $post;
160
 
 
 
 
161
  /*
162
  * These are the parameters for gallery display
163
  */
164
  $default_arguments = array(
165
+ 'size' => 'thumbnail', // or 'medium', 'large', 'full' or registered size
166
  'itemtag' => 'dl',
167
  'icontag' => 'dt',
168
  'captiontag' => 'dd',
169
  'columns' => 3,
170
+ 'link' => 'permalink', // or 'file' or a registered size
171
  // MLA-specific
172
+ 'mla_style' => 'default',
173
+ 'mla_markup' => 'default',
174
+ 'mla_link_text' => NULL,
175
+ 'mla_rollover_text' => NULL,
176
+ 'mla_caption' => NULL,
177
  'mla_debug' => false
178
  );
179
 
182
  */
183
 
184
  $arguments = shortcode_atts( $default_arguments, $attr );
185
+ self::$mla_debug = !empty( $arguments['mla_debug'] ) && ( 'true' == strtolower( $arguments['mla_debug'] ) );
 
186
 
187
  $attachments = self::mla_get_shortcode_attachments( $post->ID, $attr );
188
  if ( empty($attachments) ) {
197
  }
198
  } // empty $attachments
199
 
200
+ $size = $size_class = $arguments['size'];
201
  if ( 'icon' == strtolower( $size) ) {
202
  $size = array( 60, 60 );
203
  $show_icon = true;
211
  $output .= wp_get_attachment_link($att_id, $size, true) . "\n";
212
  return $output;
213
  }
214
+
215
+ // $instance supports multiple galleries in one page/post
216
+ static $instance = 0;
217
+ $instance++;
218
+
219
+ $style_values = array(
220
+ 'mla_style' => $arguments['mla_style'],
221
+ 'instance' => $instance,
222
+ 'id' => $post->ID,
223
+ 'itemtag' => tag_escape( $arguments['itemtag'] ),
224
+ 'icontag' => tag_escape( $arguments['icontag'] ),
225
+ 'captiontag' => tag_escape( $arguments['captiontag'] ),
226
+ 'columns' => intval( $arguments['columns']),
227
+ 'itemwidth' => $arguments['columns'] > 0 ? floor(100/$arguments['columns']) : 100,
228
+ 'float' => is_rtl() ? 'right' : 'left',
229
+ 'selector' => "mla_gallery-{$instance}",
230
+ 'size_class' => sanitize_html_class( $size_class )
231
+ );
232
 
233
+ $style_template = $gallery_style = '';
234
+ if ( apply_filters( 'use_mla_gallery_style', true ) ) {
235
+ $style_template = MLASettings::mla_fetch_gallery_template( $style_values['mla_style'], 'style' );
236
+ if ( empty( $style_template ) ) {
237
+ $style_values['mla_style'] = 'default';
238
+ $style_template = MLASettings::mla_fetch_gallery_template( 'default', 'style' );
239
+ }
240
+
241
+ if ( ! empty ( $style_template ) ) {
242
+ $gallery_style = MLAData::mla_parse_template( $style_template, $style_values );
243
+ } // !empty template
244
+ } // use_mla_gallery_style
245
+
246
+ $upload_dir = wp_upload_dir();
247
+ $markup_values = array(
248
+ 'mla_markup' => $arguments['mla_markup'],
249
+ 'instance' => $instance,
250
+ 'id' => $post->ID,
251
+ 'itemtag' => tag_escape( $arguments['itemtag'] ),
252
+ 'icontag' => tag_escape( $arguments['icontag'] ),
253
+ 'captiontag' => tag_escape( $arguments['captiontag'] ),
254
+ 'columns' => intval( $arguments['columns']),
255
+ 'itemwidth' => $arguments['columns'] > 0 ? floor(100/$arguments['columns']) : 100,
256
+ 'float' => is_rtl() ? 'right' : 'left',
257
+ 'selector' => "mla_gallery-{$instance}",
258
+ 'size_class' => sanitize_html_class( $size_class ),
259
+ 'base_url' => $upload_dir['baseurl'],
260
+ 'base_dir' => $upload_dir['basedir']
261
+ );
262
+
263
+ $markup_template = MLASettings::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-open', 'markup' );
264
+ if ( empty( $markup_template ) ) {
265
+ $markup_values['mla_markup'] = 'default';
266
+ $markup_template = MLASettings::mla_fetch_gallery_template( 'default-open', 'markup' );
267
+ }
268
+
269
+ if ( ! empty( $markup_template ) ) {
270
+ $gallery_div = MLAData::mla_parse_template( $markup_template, $markup_values );
271
+
272
+ $row_open_template = MLASettings::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-row-open', 'markup' );
273
+ if ( empty( $row_open_template ) )
274
+ $row_open_template = '';
275
+
276
+ $item_template = MLASettings::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-item', 'markup' );
277
+ if ( empty( $item_template ) )
278
+ $item_template = '';
279
+
280
+ $row_close_template = MLASettings::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-row-close', 'markup' );
281
+ if ( empty( $row_close_template ) )
282
+ $row_close_template = '';
283
+
284
+ $close_template = MLASettings::mla_fetch_gallery_template( $markup_values['mla_markup'] . '-close', 'markup' );
285
+ if ( empty( $close_template ) )
286
+ $close_template = '';
287
+ }
288
+
289
  if ( self::$mla_debug ) {
290
+ $output = self::$mla_debug_messages;
291
  self::$mla_debug_messages = '';
292
  }
293
+ else
294
+ $output = '';
295
 
296
+ $output .= apply_filters( 'mla_gallery_style', $gallery_style . $gallery_div, $style_values, $markup_values, $style_template, $markup_template );
297
+
298
  $i = 0;
299
  foreach ( $attachments as $id => $attachment ) {
300
+ /*
301
+ * fill in item-specific elements
302
+ */
303
+ $markup_values['index'] = (string) 1 + $i;
304
+
305
+ $markup_values['excerpt'] = wptexturize( $attachment->post_excerpt );
306
+ $markup_values['attachment_ID'] = $attachment->ID;
307
+ $markup_values['mime_type'] = $attachment->post_mime_type;
308
+ $markup_values['menu_order'] = $attachment->menu_order;
309
+ $markup_values['date'] = $attachment->post_date;
310
+ $markup_values['modified'] = $attachment->post_modified;
311
+ $markup_values['parent'] = $attachment->post_parent;
312
+ $markup_values['parent_title'] = '(unattached)';
313
+ $markup_values['parent_type'] = '';
314
+ $markup_values['parent_date'] = '';
315
+ $markup_values['title'] = wptexturize( $attachment->post_title );
316
+ $markup_values['slug'] = wptexturize( $attachment->post_name );
317
+ $markup_values['width'] = '';
318
+ $markup_values['height'] = '';
319
+ $markup_values['image_meta'] = '';
320
+ $markup_values['image_alt'] = '';
321
+ $markup_values['base_file'] = '';
322
+ $markup_values['path'] = '';
323
+ $markup_values['file'] = '';
324
+ $markup_values['description'] = wptexturize( $attachment->post_content );
325
+ $markup_values['file_url'] = wptexturize( $attachment->guid );
326
+ $markup_values['author_id'] = $attachment->post_author;
327
+
328
+ $user = get_user_by( 'id', $attachment->post_author );
329
+ if ( isset( $user->data->display_name ) )
330
+ $markup_values['author'] = wptexturize( $user->data->display_name );
331
+ else
332
+ $markup_values['author'] = 'unknown';
333
+
334
+ $post_meta = MLAData::mla_fetch_attachment_metadata( $attachment->ID );
335
+ if ( !empty( $post_meta['mla_wp_attachment_metadata'] ) ) {
336
+ $base_file = $post_meta['mla_wp_attachment_metadata']['file'];
337
+ $sizes = $post_meta['mla_wp_attachment_metadata']['sizes'];
338
+ $markup_values['width'] = $post_meta['mla_wp_attachment_metadata']['width'];
339
+ $markup_values['height'] = $post_meta['mla_wp_attachment_metadata']['height'];
340
+ $markup_values['image_meta'] = wptexturize( var_export( $post_meta['mla_wp_attachment_metadata']['image_meta'], true ) );
341
+ }
342
+ else {
343
+ $base_file = $post_meta['mla_wp_attached_file'];
344
+ $sizes = array( );
345
+ }
346
+
347
+ if ( isset( $post_meta['mla_wp_attachment_image_alt'] ) )
348
+ $markup_values['image_alt'] = wptexturize( $post_meta['mla_wp_attachment_image_alt'] );
349
+
350
+ if ( ! empty( $base_file ) ) {
351
+ $last_slash = strrpos( $base_file, '/' );
352
+ if ( false === $last_slash ) {
353
+ $file_name = $base_file;
354
+ $markup_values['base_file'] = wptexturize( $base_file );
355
+ $markup_values['file'] = wptexturize( $base_file );
356
+ }
357
+ else {
358
+ $file_name = substr( $base_file, $last_slash + 1 );
359
+ $markup_values['base_file'] = wptexturize( $base_file );
360
+ $markup_values['path'] = wptexturize( substr( $base_file, 0, $last_slash + 1 ) );
361
+ $markup_values['file'] = wptexturize( $file_name );
362
+ }
363
  }
364
+ else
365
+ $file_name = '';
366
+
367
+ $parent_info = MLAData::mla_fetch_attachment_parent_data( $attachment->post_parent );
368
+ if ( isset( $parent_info['parent_title'] ) )
369
+ $markup_values['parent_title'] = wptexturize( $parent_info['parent_title'] );
370
+
371
+ if ( isset( $parent_info['parent_date'] ) )
372
+ $markup_values['parent_date'] = wptexturize( $parent_info['parent_date'] );
373
+
374
+ if ( isset( $parent_info['parent_type'] ) )
375
+ $markup_values['parent_type'] = wptexturize( $parent_info['parent_type'] );
376
+
377
+ unset(
378
+ $markup_values['caption'],
379
+ $markup_values['pagelink'],
380
+ $markup_values['filelink'],
381
+ $markup_values['link'],
382
+ $markup_values['pagelink_url'],
383
+ $markup_values['filelink_url'],
384
+ $markup_values['link_url'],
385
+ $markup_values['thumbnail_content'],
386
+ $markup_values['thumbnail_width'],
387
+ $markup_values['thumbnail_height'],
388
+ $markup_values['thumbnail_url']
389
+ );
390
+
391
+ if ( $markup_values['captiontag'] ) {
392
+ if ( ! empty( $arguments['mla_caption'] ) ) {
393
+ $new_text = str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_caption'] ) );
394
+ $markup_values['caption'] = wptexturize( MLAData::mla_parse_template( $new_text, $markup_values ) );
395
+ }
396
+ else
397
+ $markup_values['caption'] = wptexturize( $attachment->post_excerpt );
398
+ }
399
+ else
400
+ $markup_values['caption'] = '';
401
+
402
+ if ( ! empty( $arguments['mla_link_text'] ) ) {
403
+ $link_text = str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_link_text'] ) );
404
+ $link_text = MLAData::mla_parse_template( $link_text, $markup_values );
405
+ }
406
+ else
407
+ $link_text = false;
408
+
409
+ $markup_values['pagelink'] = wp_get_attachment_link($attachment->ID, $size, true, $show_icon, $link_text);
410
+ $markup_values['filelink'] = wp_get_attachment_link($attachment->ID, $size, false, $show_icon, $link_text);
411
+
412
+ if ( ! empty( $arguments['mla_rollover_text'] ) ) {
413
+ $new_text = str_replace( '{+', '[+', str_replace( '+}', '+]', $arguments['mla_rollover_text'] ) );
414
+ $new_text = MLAData::mla_parse_template( $new_text, $markup_values );
415
+
416
+ /*
417
+ * Replace single- and double-quote delimited values
418
+ */
419
+ $markup_values['pagelink'] = preg_replace('# title=\'([^\']*)\'#', " title='{$new_text}'", $markup_values['pagelink'] );
420
+ $markup_values['pagelink'] = preg_replace('# title=\"([^\"]*)\"#', " title=\"{$new_text}\"", $markup_values['pagelink'] );
421
+ $markup_values['filelink'] = preg_replace('# title=\'([^\']*)\'#', " title='{$new_text}'", $markup_values['filelink'] );
422
+ $markup_values['filelink'] = preg_replace('# title=\"([^\"]*)\"#', " title=\"{$new_text}\"", $markup_values['filelink'] );
423
+ }
424
+
425
+ switch ( $arguments['link'] ) {
426
+ case 'permalink':
427
+ $markup_values['link'] = $markup_values['pagelink'];
428
+ break;
429
+ case 'file':
430
+ case 'full':
431
+ $markup_values['link'] = $markup_values['filelink'];
432
+ break;
433
+ default:
434
+ $markup_values['link'] = $markup_values['filelink'];
435
+
436
+ /*
437
+ * Check for link to specific (registered) file size
438
+ */
439
+ if ( array_key_exists( $arguments['link'], $sizes ) ) {
440
+ $target_file = $sizes[ $arguments['link'] ]['file'];
441
+ $markup_values['link'] = str_replace( $file_name, $target_file, $markup_values['filelink'] );
442
+ }
443
+ } // switch 'link'
444
+
445
+ /*
446
+ * Extract target and thumbnail fields
447
+ */
448
+ $match_count = preg_match_all( '#href=\'([^\']+)\' title=\'([^\']*)\'#', $markup_values['pagelink'], $matches, PREG_OFFSET_CAPTURE );
449
+ if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
450
+ $markup_values['pagelink_url'] = $matches[1][0][0];
451
+ }
452
+ else
453
+ $markup_values['pagelink_url'] = '';
454
+
455
+ $match_count = preg_match_all( '#href=\'([^\']+)\'#', $markup_values['filelink'], $matches, PREG_OFFSET_CAPTURE );
456
+ if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
457
+ $markup_values['filelink_url'] = $matches[1][0][0];
458
+ }
459
+ else
460
+ $markup_values['filelink_url'] = '';
461
+
462
+ $match_count = preg_match_all( '#href=\'([^\']+)\'#', $markup_values['link'], $matches, PREG_OFFSET_CAPTURE );
463
+ if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
464
+ $markup_values['link_url'] = $matches[1][0][0];
465
+ }
466
+ else
467
+ $markup_values['link_url'] = '';
468
+
469
+ $match_count = preg_match_all( '#\<a [^\>]+\>(.*)\</a\>#', $markup_values['link'], $matches, PREG_OFFSET_CAPTURE );
470
+ if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
471
+ $markup_values['thumbnail_content'] = $matches[1][0][0];
472
+ }
473
+ else
474
+ $markup_values['thumbnail_content'] = '';
475
+
476
+ $match_count = preg_match_all( '#img width=\"([^\"]+)\" height=\"([^\"]+)\" src=\"([^\"]+)\"#', $markup_values['link'], $matches, PREG_OFFSET_CAPTURE );
477
+ if ( ! ( ( $match_count == false ) || ( $match_count == 0 ) ) ) {
478
+ $markup_values['thumbnail_width'] = $matches[1][0][0];
479
+ $markup_values['thumbnail_height'] = $matches[2][0][0];
480
+ $markup_values['thumbnail_url'] = $matches[3][0][0];
481
+ }
482
+ else {
483
+ $markup_values['thumbnail_width'] = '';
484
+ $markup_values['thumbnail_height'] = '';
485
+ $markup_values['thumbnail_url'] = '';
486
+ }
487
+
488
+ /*
489
+ * Start of row markup
490
+ */
491
+ if ( $markup_values['columns'] > 0 && $i % $markup_values['columns'] == 0 )
492
+ $output .= MLAData::mla_parse_template( $row_open_template, $markup_values );
493
+
494
+ /*
495
+ * item markup
496
+ */
497
+ $output .= MLAData::mla_parse_template( $item_template, $markup_values );
498
+
499
+ /*
500
+ * End of row markup
501
+ */
502
+ if ( $markup_values['columns'] > 0 && ++$i % $markup_values['columns'] == 0 )
503
+ $output .= MLAData::mla_parse_template( $row_close_template, $markup_values );
504
  }
505
 
506
+ /*
507
+ * Close out partial row
508
+ */
509
+ if ( ! ($markup_values['columns'] > 0 && $i % $markup_values['columns'] == 0 ) )
510
+ $output .= MLAData::mla_parse_template( $row_close_template, $markup_values );
511
+
512
+ $output .= MLAData::mla_parse_template( $close_template, $markup_values );
513
 
514
  return $output;
515
  }
634
  * $query_arguments has been initialized in the taxonomy code above.
635
  */
636
  $use_children = empty( $query_arguments );
 
637
  foreach ($arguments as $key => $value ) {
638
  /*
639
  * There are several "fallthru" cases in this switch statement that decide
775
  }
776
  unset( $arguments[ $key ] );
777
  break;
 
 
 
 
 
778
  default:
779
  // ignore anything else
780
  } // switch $key
includes/mla-plugin-loader.php CHANGED
@@ -43,6 +43,15 @@ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-shortcodes.php');
43
 
44
  add_action('init', 'MLAShortcodes::initialize');
45
 
 
 
 
 
 
 
 
 
 
46
  /*
47
  * Plugin settings and management page
48
  */
43
 
44
  add_action('init', 'MLAShortcodes::initialize');
45
 
46
+ /*
47
+ * WordPress 3.5 and later Edit Media screen additions, e.g., meta boxes
48
+ */
49
+ if ( version_compare( get_bloginfo( 'version' ), '3.5', '>=' ) ) {
50
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-edit-media.php');
51
+
52
+ add_action('init', 'MLAEdit::initialize');
53
+ }
54
+
55
  /*
56
  * Plugin settings and management page
57
  */
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 0.71
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: Provides several enhancements to the handling of images and files held in the WordPress Media Library.
16
  Author: David Lingren
17
- Version: 0.71
18
  Author URI: http://fairtradejudaica.org/our-story/staff/
19
  */
20
 
6
  * will the rest of the plugin be loaded and run.
7
  *
8
  * @package Media Library Assistant
9
+ * @version 0.80
10
  */
11
 
12
  /*
14
  Plugin URI: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
15
  Description: Provides several enhancements to the handling of images and files held in the WordPress Media Library.
16
  Author: David Lingren
17
+ Version: 0.80
18
  Author URI: http://fairtradejudaica.org/our-story/staff/
19
  */
20
 
js/mla-inline-edit-scripts.dev.js CHANGED
@@ -122,7 +122,7 @@ inlineEditAttachment = {
122
  if ( typeof(id) == 'object' )
123
  id = t.getId(id);
124
 
125
- fields = ['post_title', 'post_name', 'image_alt', 'post_parent', 'menu_order', 'post_author'];
126
 
127
  // add the new blank row
128
  editRow = $('#inline-edit').clone(true);
122
  if ( typeof(id) == 'object' )
123
  id = t.getId(id);
124
 
125
+ fields = ['post_title', 'post_name', 'post_excerpt', 'image_alt', 'post_parent', 'menu_order', 'post_author'];
126
 
127
  // add the new blank row
128
  editRow = $('#inline-edit').clone(true);
js/mla-inline-edit-scripts.js CHANGED
@@ -1 +1 @@
1
- (function(a){inlineEditAttachment={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="attachment";c.what="#attachment-";d.keyup(function(f){if(f.which==27){return inlineEditAttachment.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditAttachment.revert()}});a("a.cancel",d).click(function(){return inlineEditAttachment.revert()});a("a.save",d).click(function(){return inlineEditAttachment.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditAttachment.save(this)}});a("a.cancel",b).click(function(){return inlineEditAttachment.revert()});a("a.editinline").live("click",function(){inlineEditAttachment.edit(this);return false});a("span.catshow").click(function(){a(this).hide().next().show().parent().next().addClass("cat-hover")});a("span.cathide").click(function(){a(this).hide().prev().show().parent().next().removeClass("cat-hover")});a('select[name="_status"] option[value="future"]',b).remove();a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}});a("#post-query-submit").mousedown(function(f){c.revert();a('select[name^="action"]').val("-1")})},toggle:function(c){var b=this;a(b.what+b.getId(c)).css("display")=="none"?b.revert():b.edit(c)},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(e){if(a(this).prop("checked")){d=false;var f=a(this).val(),c;c=a("#inline_"+f+" .post_title").text()||mla_inline_edit_vars.notitle;b+='<div id="ttle'+f+'"><a id="_'+f+'" class="ntdelbutton" title="'+mla_inline_edit_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("textarea.mla_tags").each(function(){var c=a(this).attr("name").replace("]","").replace("tax_input[","");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+c,{delay:500,minchars:2,multiple:true,multipleSep:mla_inline_edit_vars.comma+" "})});a("html, body").animate({scrollTop:0},"fast")},edit:function(g){var d=this,b,c,e,f;d.revert();if(typeof(g)=="object"){g=d.getId(g)}b=["post_title","post_name","image_alt","post_parent","menu_order","post_author"];c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+g).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+g).hide().after(c);e=a("#inline_"+g);if(!a(':input[name="post_author"] option[value="'+a(".post_author",e).text()+'"]',c).val()){a(':input[name="post_author"]',c).prepend('<option value="'+a(".post_author",e).text()+'">'+a("#"+d.type+"-"+g+" .author").text()+"</option>")}if(a(':input[name="post_author"] option',c).length==1){a("label.inline-edit-author",c).hide()}for(f=0;f<b.length;f++){a(':input[name="'+b[f]+'"]',c).val(a("."+b[f],e).text())}if(a(".image_alt",e).length==0){a("label.inline-edit-image-alt",c).hide()}a(".mla_category",e).each(function(){var h=a(this).text();if(h){taxname=a(this).attr("id").replace("_"+g,"");a("ul."+taxname+"-checklist :checkbox",c).val(h.split(","))}});a(".mla_tags",e).each(function(){var j=a(this).text(),k=a(this).attr("id").replace("_"+g,""),i=a("textarea.tax_input_"+k,c),h=mla_inline_edit_vars.comma;if(j){if(","!==h){j=j.replace(/,/g,h)}i.val(j)}i.suggest(ajaxurl+"?action=ajax-tag-search&tax="+k,{delay:500,minchars:2,multiple:true,multipleSep:mla_inline_edit_vars.comma+" "})});a(c).attr("id","edit-"+g).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=this.getId(e)}a("table.widefat .inline-edit-save .waiting").show();d={action:mla_inline_edit_vars.ajax_action,nonce:mla_inline_edit_vars.ajax_nonce,post_type:typenow,post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post(ajaxurl,d,function(f){a("table.widefat .inline-edit-save .waiting").hide();if(f){if(-1!=f.indexOf("<tr")){a(inlineEditAttachment.what+e).remove();a("#edit-"+e).before(f).remove();a(inlineEditAttachment.what+e).hide().fadeIn()}else{f=f.replace(/<.[^<>]*?>/g,"");a("#edit-"+e+" .inline-edit-save .error").html(f).show()}}else{a("#edit-"+e+" .inline-edit-save .error").html(mla_inline_edit_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("#"+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(){inlineEditAttachment.init()})})(jQuery);
1
+ (function(a){inlineEditAttachment={init:function(){var c=this,d=a("#inline-edit"),b=a("#bulk-edit");c.type="attachment";c.what="#attachment-";d.keyup(function(f){if(f.which==27){return inlineEditAttachment.revert()}});b.keyup(function(f){if(f.which==27){return inlineEditAttachment.revert()}});a("a.cancel",d).click(function(){return inlineEditAttachment.revert()});a("a.save",d).click(function(){return inlineEditAttachment.save(this)});a("td",d).keydown(function(f){if(f.which==13){return inlineEditAttachment.save(this)}});a("a.cancel",b).click(function(){return inlineEditAttachment.revert()});a("a.editinline").live("click",function(){inlineEditAttachment.edit(this);return false});a("span.catshow").click(function(){a(this).hide().next().show().parent().next().addClass("cat-hover")});a("span.cathide").click(function(){a(this).hide().prev().show().parent().next().removeClass("cat-hover")});a('select[name="_status"] option[value="future"]',b).remove();a("#doaction, #doaction2").click(function(f){var g=a(this).attr("id").substr(2);if(a('select[name="'+g+'"]').val()=="edit"){f.preventDefault();c.setBulk()}else{if(a("form#posts-filter tr.inline-editor").length>0){c.revert()}}});a("#post-query-submit").mousedown(function(f){c.revert();a('select[name^="action"]').val("-1")})},toggle:function(c){var b=this;a(b.what+b.getId(c)).css("display")=="none"?b.revert():b.edit(c)},setBulk:function(){var b="",d=true;this.revert();a("#bulk-edit td").attr("colspan",a(".widefat:first thead th:visible").length);a("table.widefat tbody").prepend(a("#bulk-edit"));a("#bulk-edit").addClass("inline-editor").show();a('tbody th.check-column input[type="checkbox"]').each(function(e){if(a(this).prop("checked")){d=false;var f=a(this).val(),c;c=a("#inline_"+f+" .post_title").text()||mla_inline_edit_vars.notitle;b+='<div id="ttle'+f+'"><a id="_'+f+'" class="ntdelbutton" title="'+mla_inline_edit_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("textarea.mla_tags").each(function(){var c=a(this).attr("name").replace("]","").replace("tax_input[","");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+c,{delay:500,minchars:2,multiple:true,multipleSep:mla_inline_edit_vars.comma+" "})});a("html, body").animate({scrollTop:0},"fast")},edit:function(g){var d=this,b,c,e,f;d.revert();if(typeof(g)=="object"){g=d.getId(g)}b=["post_title","post_name","post_excerpt","image_alt","post_parent","menu_order","post_author"];c=a("#inline-edit").clone(true);a("td",c).attr("colspan",a(".widefat:first thead th:visible").length);if(a(d.what+g).hasClass("alternate")){a(c).addClass("alternate")}a(d.what+g).hide().after(c);e=a("#inline_"+g);if(!a(':input[name="post_author"] option[value="'+a(".post_author",e).text()+'"]',c).val()){a(':input[name="post_author"]',c).prepend('<option value="'+a(".post_author",e).text()+'">'+a("#"+d.type+"-"+g+" .author").text()+"</option>")}if(a(':input[name="post_author"] option',c).length==1){a("label.inline-edit-author",c).hide()}for(f=0;f<b.length;f++){a(':input[name="'+b[f]+'"]',c).val(a("."+b[f],e).text())}if(a(".image_alt",e).length==0){a("label.inline-edit-image-alt",c).hide()}a(".mla_category",e).each(function(){var h=a(this).text();if(h){taxname=a(this).attr("id").replace("_"+g,"");a("ul."+taxname+"-checklist :checkbox",c).val(h.split(","))}});a(".mla_tags",e).each(function(){var j=a(this).text(),k=a(this).attr("id").replace("_"+g,""),i=a("textarea.tax_input_"+k,c),h=mla_inline_edit_vars.comma;if(j){if(","!==h){j=j.replace(/,/g,h)}i.val(j)}i.suggest(ajaxurl+"?action=ajax-tag-search&tax="+k,{delay:500,minchars:2,multiple:true,multipleSep:mla_inline_edit_vars.comma+" "})});a(c).attr("id","edit-"+g).addClass("inline-editor").show();a(".ptitle",c).focus();return false},save:function(e){var d,b,c=a(".post_status_page").val()||"";if(typeof(e)=="object"){e=this.getId(e)}a("table.widefat .inline-edit-save .waiting").show();d={action:mla_inline_edit_vars.ajax_action,nonce:mla_inline_edit_vars.ajax_nonce,post_type:typenow,post_ID:e,edit_date:"true",post_status:c};b=a("#edit-"+e+" :input").serialize();d=b+"&"+a.param(d);a.post(ajaxurl,d,function(f){a("table.widefat .inline-edit-save .waiting").hide();if(f){if(-1!=f.indexOf("<tr")){a(inlineEditAttachment.what+e).remove();a("#edit-"+e).before(f).remove();a(inlineEditAttachment.what+e).hide().fadeIn()}else{f=f.replace(/<.[^<>]*?>/g,"");a("#edit-"+e+" .inline-edit-save .error").html(f).show()}}else{a("#edit-"+e+" .inline-edit-save .error").html(mla_inline_edit_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("#"+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(){inlineEditAttachment.init()})})(jQuery);
phpDocs/classes.svg CHANGED
@@ -4,38 +4,45 @@
4
  <!-- Generated by graphviz version 2.28.0 (20110507.0327)
5
  -->
6
  <!-- Title: G Pages: 1 -->
7
- <svg width="352pt" height="420pt"
8
- viewBox="0.00 0.00 352.00 420.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 416)">
10
  <title>G</title>
11
- <polygon fill="white" stroke="white" points="-4,5 -4,-416 349,-416 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,-392 "/>
16
- <path fill="none" stroke="gray" d="M336,-392C336,-398 330,-404 324,-404"/>
17
- <polyline fill="none" stroke="gray" points="324,-404 220,-404 "/>
18
- <path fill="none" stroke="gray" d="M220,-404C214,-404 208,-398 208,-392"/>
19
- <polyline fill="none" stroke="gray" points="208,-392 208,-20 "/>
20
  <path fill="none" stroke="gray" d="M208,-20C208,-14 214,-8 220,-8"/>
21
- <text text-anchor="middle" x="272" y="-391.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,-376 240,-376 240,-340 304,-340 304,-376"/>
27
- <text text-anchor="middle" x="272" y="-355.2" font-family="Courier,monospace" font-size="11.00">MLAData</text>
28
  </a>
29
  </g>
30
  <!-- \\MLA_List_Table -->
31
- <g id="node3" class="node"><title>\\MLA_List_Table</title>
32
  <a xlink:href="includes.class-mla-list-table.html" xlink:title="MLA_List_Table" target="_parent">
33
  <polygon fill="none" stroke="black" points="327.5,-322 216.5,-322 216.5,-286 327.5,-286 327.5,-322"/>
34
  <text text-anchor="middle" x="272" y="-301.2" font-family="Courier,monospace" font-size="11.00">MLA_List_Table</text>
35
  </a>
36
  </g>
37
  <!-- \\WP_List_Table -->
38
- <g id="node10" class="node"><title>\\WP_List_Table</title>
39
  <ellipse fill="none" stroke="black" cx="72" cy="-304" rx="71.4873" ry="18"/>
40
  <text text-anchor="middle" x="72" y="-300.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_List_Table</text>
41
  </g>
@@ -45,35 +52,35 @@
45
  <polygon fill="none" stroke="black" points="153.788,-300.5 143.788,-304 153.788,-307.5 153.788,-300.5"/>
46
  </g>
47
  <!-- \\MLA -->
48
- <g id="node4" class="node"><title>\\MLA</title>
49
  <a xlink:href="includes.class-mla-main.html" xlink:title="MLA" target="_parent">
50
  <polygon fill="none" stroke="black" points="299,-268 245,-268 245,-232 299,-232 299,-268"/>
51
  <text text-anchor="middle" x="272" y="-247.2" font-family="Courier,monospace" font-size="11.00">MLA</text>
52
  </a>
53
  </g>
54
  <!-- \\MLAObjects -->
55
- <g id="node5" class="node"><title>\\MLAObjects</title>
56
  <a xlink:href="includes.class-mla-objects.html" xlink:title="MLAObjects" target="_parent">
57
  <polygon fill="none" stroke="black" points="314,-214 230,-214 230,-178 314,-178 314,-214"/>
58
  <text text-anchor="middle" x="272" y="-193.2" font-family="Courier,monospace" font-size="11.00">MLAObjects</text>
59
  </a>
60
  </g>
61
  <!-- \\MLASettings -->
62
- <g id="node6" class="node"><title>\\MLASettings</title>
63
  <a xlink:href="includes.class-mla-settings.html" xlink:title="MLASettings" target="_parent">
64
  <polygon fill="none" stroke="black" points="317.5,-160 226.5,-160 226.5,-124 317.5,-124 317.5,-160"/>
65
  <text text-anchor="middle" x="272" y="-139.2" font-family="Courier,monospace" font-size="11.00">MLASettings</text>
66
  </a>
67
  </g>
68
  <!-- \\MLAShortcodes -->
69
- <g id="node7" class="node"><title>\\MLAShortcodes</title>
70
  <a xlink:href="includes.class-mla-shortcodes.html" xlink:title="MLAShortcodes" target="_parent">
71
  <polygon fill="none" stroke="black" points="324,-106 220,-106 220,-70 324,-70 324,-106"/>
72
  <text text-anchor="middle" x="272" y="-85.2" font-family="Courier,monospace" font-size="11.00">MLAShortcodes</text>
73
  </a>
74
  </g>
75
  <!-- \\MLATest -->
76
- <g id="node8" class="node"><title>\\MLATest</title>
77
  <a xlink:href="tests.class-mla-tests.html" xlink:title="MLATest" target="_parent">
78
  <polygon fill="none" stroke="black" points="304,-52 240,-52 240,-16 304,-16 304,-52"/>
79
  <text text-anchor="middle" x="272" y="-31.2" font-family="Courier,monospace" font-size="11.00">MLATest</text>
4
  <!-- Generated by graphviz version 2.28.0 (20110507.0327)
5
  -->
6
  <!-- Title: G Pages: 1 -->
7
+ <svg width="352pt" height="474pt"
8
+ viewBox="0.00 0.00 352.00 474.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 470)">
10
  <title>G</title>
11
+ <polygon fill="white" stroke="white" points="-4,5 -4,-470 349,-470 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,-446 "/>
16
+ <path fill="none" stroke="gray" d="M336,-446C336,-452 330,-458 324,-458"/>
17
+ <polyline fill="none" stroke="gray" points="324,-458 220,-458 "/>
18
+ <path fill="none" stroke="gray" d="M220,-458C214,-458 208,-452 208,-446"/>
19
+ <polyline fill="none" stroke="gray" points="208,-446 208,-20 "/>
20
  <path fill="none" stroke="gray" d="M208,-20C208,-14 214,-8 220,-8"/>
21
+ <text text-anchor="middle" x="272" y="-445.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,-430 240,-430 240,-394 304,-394 304,-430"/>
27
+ <text text-anchor="middle" x="272" y="-409.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,-376 240,-376 240,-340 304,-340 304,-376"/>
34
+ <text text-anchor="middle" x="272" y="-355.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,-322 216.5,-322 216.5,-286 327.5,-286 327.5,-322"/>
41
  <text text-anchor="middle" x="272" y="-301.2" font-family="Courier,monospace" font-size="11.00">MLA_List_Table</text>
42
  </a>
43
  </g>
44
  <!-- \\WP_List_Table -->
45
+ <g id="node11" class="node"><title>\\WP_List_Table</title>
46
  <ellipse fill="none" stroke="black" cx="72" cy="-304" rx="71.4873" ry="18"/>
47
  <text text-anchor="middle" x="72" y="-300.3" font-family="Times New Roman,serif" font-size="14.00" fill="gray">\WP_List_Table</text>
48
  </g>
52
  <polygon fill="none" stroke="black" points="153.788,-300.5 143.788,-304 153.788,-307.5 153.788,-300.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,-268 245,-268 245,-232 299,-232 299,-268"/>
58
  <text text-anchor="middle" x="272" y="-247.2" font-family="Courier,monospace" font-size="11.00">MLA</text>
59
  </a>
60
  </g>
61
  <!-- \\MLAObjects -->
62
+ <g id="node6" class="node"><title>\\MLAObjects</title>
63
  <a xlink:href="includes.class-mla-objects.html" xlink:title="MLAObjects" target="_parent">
64
  <polygon fill="none" stroke="black" points="314,-214 230,-214 230,-178 314,-178 314,-214"/>
65
  <text text-anchor="middle" x="272" y="-193.2" font-family="Courier,monospace" font-size="11.00">MLAObjects</text>
66
  </a>
67
  </g>
68
  <!-- \\MLASettings -->
69
+ <g id="node7" class="node"><title>\\MLASettings</title>
70
  <a xlink:href="includes.class-mla-settings.html" xlink:title="MLASettings" target="_parent">
71
  <polygon fill="none" stroke="black" points="317.5,-160 226.5,-160 226.5,-124 317.5,-124 317.5,-160"/>
72
  <text text-anchor="middle" x="272" y="-139.2" font-family="Courier,monospace" font-size="11.00">MLASettings</text>
73
  </a>
74
  </g>
75
  <!-- \\MLAShortcodes -->
76
+ <g id="node8" class="node"><title>\\MLAShortcodes</title>
77
  <a xlink:href="includes.class-mla-shortcodes.html" xlink:title="MLAShortcodes" target="_parent">
78
  <polygon fill="none" stroke="black" points="324,-106 220,-106 220,-70 324,-70 324,-106"/>
79
  <text text-anchor="middle" x="272" y="-85.2" font-family="Courier,monospace" font-size="11.00">MLAShortcodes</text>
80
  </a>
81
  </g>
82
  <!-- \\MLATest -->
83
+ <g id="node9" class="node"><title>\\MLATest</title>
84
  <a xlink:href="tests.class-mla-tests.html" xlink:title="MLATest" target="_parent">
85
  <polygon fill="none" stroke="black" points="304,-52 240,-52 240,-16 304,-16 304,-52"/>
86
  <text text-anchor="middle" x="272" y="-31.2" font-family="Courier,monospace" font-size="11.00">MLATest</text>
phpDocs/classes/MLA.html CHANGED
@@ -77,9 +77,6 @@ change the meta data for a single attachment.</span><pre>_display_single_item()<
77
  <li class="method private "><a href="#_remove_tags" title="_remove_tags :: Remove tags from a term ids list"><span class="description">Remove tags from a term ids list</span><pre>_remove_tags()</pre></a></li>
78
  <li class="method private "><a href="#_restore_single_item" title="_restore_single_item :: Restore a single item from the Trash"><span class="description">Restore a single item from the Trash</span><pre>_restore_single_item()</pre></a></li>
79
  <li class="method private "><a href="#_trash_single_item" title="_trash_single_item :: Move a single item to Trash"><span class="description">Move a single item to Trash</span><pre>_trash_single_item()</pre></a></li>
80
- <li class="method private "><a href="#_update_single_item" title="_update_single_item :: Update a single item; change the meta data
81
- for a single attachment."><span class="description">Update a single item; change the meta data
82
- for a single attachment.</span><pre>_update_single_item()</pre></a></li>
83
  <li class="nav-header">
84
  <i class="icon-custom icon-property"></i> Properties</li>
85
  <li class="nav-header private">» Private</li>
@@ -364,13 +361,15 @@ going to the Edit Media screen.</p></p>
364
  <h3>Parameters</h3>
365
  <div class="subelement argument">
366
  <h4>$author</h4>
367
- <code>integer</code><p>User ID of the current author</p></div>
368
  <div class="subelement argument">
369
  <h4>$name</h4>
370
- <code>string</code><p>HTML name attribute</p></div>
 
371
  <div class="subelement argument">
372
  <h4>$class</h4>
373
- <code>string</code><p>HTML class attribute</p></div>
 
374
  <h3>Returns</h3>
375
  <div class="subelement response">
376
  <code>string</code><code>false</code>HTML markup for the dropdown field or False</div>
@@ -513,37 +512,6 @@ change the meta data for a single attachment.</h2>
513
  <code>array</code>success/failure message and NULL content</div>
514
  </div></div>
515
  </div>
516
- <a name="_update_single_item" id="_update_single_item"></a><div class="element clickable method private _update_single_item" data-toggle="collapse" data-target="._update_single_item .collapse">
517
- <h2>Update a single item; change the meta data
518
- for a single attachment.</h2>
519
- <pre>_update_single_item(int $post_id, array $new_data, array $tax_input, array $tax_actions) : array</pre>
520
- <div class="labels"></div>
521
- <div class="row collapse"><div class="detail-description">
522
- <p class="long_description"></p>
523
- <table class="table table-bordered"><tr>
524
- <th>since</th>
525
- <td>0.1</td>
526
- </tr></table>
527
- <h3>Parameters</h3>
528
- <div class="subelement argument">
529
- <h4>$post_id</h4>
530
- <code>int</code><p>The ID of the attachment to be updated</p></div>
531
- <div class="subelement argument">
532
- <h4>$new_data</h4>
533
- <code>array</code><p>Field name => value pairs</p>
534
- </div>
535
- <div class="subelement argument">
536
- <h4>$tax_input</h4>
537
- <code>array</code><p>Taxonomy term values</p></div>
538
- <div class="subelement argument">
539
- <h4>$tax_actions</h4>
540
- <code>array</code><p>Taxonomy actions (add, remove, replace)</p>
541
- </div>
542
- <h3>Returns</h3>
543
- <div class="subelement response">
544
- <code>array</code>success/failure message and NULL content</div>
545
- </div></div>
546
- </div>
547
  <h3>
548
  <i class="icon-custom icon-property"></i> Properties</h3>
549
  <a name="%24page_hooks" id="$page_hooks"> </a><div class="element clickable property private $page_hooks" data-toggle="collapse" data-target=".$page_hooks .collapse">
@@ -759,7 +727,7 @@ for a single attachment.</h2>
759
  <div class="row"><footer class="span12">
760
  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>
761
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
762
- generated on 2012-11-06T11:50:00-08:00.<br></footer></div>
763
  </div>
764
  </body>
765
  </html>
77
  <li class="method private "><a href="#_remove_tags" title="_remove_tags :: Remove tags from a term ids list"><span class="description">Remove tags from a term ids list</span><pre>_remove_tags()</pre></a></li>
78
  <li class="method private "><a href="#_restore_single_item" title="_restore_single_item :: Restore a single item from the Trash"><span class="description">Restore a single item from the Trash</span><pre>_restore_single_item()</pre></a></li>
79
  <li class="method private "><a href="#_trash_single_item" title="_trash_single_item :: Move a single item to Trash"><span class="description">Move a single item to Trash</span><pre>_trash_single_item()</pre></a></li>
 
 
 
80
  <li class="nav-header">
81
  <i class="icon-custom icon-property"></i> Properties</li>
82
  <li class="nav-header private">» Private</li>
361
  <h3>Parameters</h3>
362
  <div class="subelement argument">
363
  <h4>$author</h4>
364
+ <code>integer</code><p>Optional User ID of the current author, default 0</p></div>
365
  <div class="subelement argument">
366
  <h4>$name</h4>
367
+ <code>string</code><p>Optional HTML name attribute, default 'post_author'</p>
368
+ </div>
369
  <div class="subelement argument">
370
  <h4>$class</h4>
371
+ <code>string</code><p>Optional HTML class attribute, default 'authors'</p>
372
+ </div>
373
  <h3>Returns</h3>
374
  <div class="subelement response">
375
  <code>string</code><code>false</code>HTML markup for the dropdown field or False</div>
512
  <code>array</code>success/failure message and NULL content</div>
513
  </div></div>
514
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
515
  <h3>
516
  <i class="icon-custom icon-property"></i> Properties</h3>
517
  <a name="%24page_hooks" id="$page_hooks"> </a><div class="element clickable property private $page_hooks" data-toggle="collapse" data-target=".$page_hooks .collapse">
727
  <div class="row"><footer class="span12">
728
  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>
729
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
730
+ generated on 2012-11-18T13:00:09-08:00.<br></footer></div>
731
  </div>
732
  </body>
733
  </html>
phpDocs/classes/MLAData.html CHANGED
@@ -54,6 +54,8 @@
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_count_list_table_items" title="mla_count_list_table_items :: Get the total number of attachment posts"><span class="description">Get the total number of attachment posts</span><pre>mla_count_list_table_items()</pre></a></li>
 
 
57
  <li class="method public "><a href="#mla_fetch_attachment_references" title="mla_fetch_attachment_references :: Find Featured Image and inserted image/link references to an attachment"><span class="description">Find Featured Image and inserted image/link references to an attachment</span><pre>mla_fetch_attachment_references()</pre></a></li>
58
  <li class="method public "><a href="#mla_get_attachment_by_id" title="mla_get_attachment_by_id :: Retrieve an Attachment array given a $post_id"><span class="description">Retrieve an Attachment array given a $post_id</span><pre>mla_get_attachment_by_id()</pre></a></li>
59
  <li class="method public "><a href="#mla_load_template" title="mla_load_template :: Load an HTML template from a file"><span class="description">Load an HTML template from a file</span><pre>mla_load_template()</pre></a></li>
@@ -63,11 +65,12 @@
63
  <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>
64
  <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>
65
  <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>
 
 
 
66
  <li class="nav-header private">» Private</li>
67
  <li class="method private "><a href="#_build_mla_galleries" title="_build_mla_galleries :: Builds the $mla_galleries or $galleries array"><span class="description">Builds the $mla_galleries or $galleries array</span><pre>_build_mla_galleries()</pre></a></li>
68
  <li class="method private "><a href="#_execute_list_table_query" title="_execute_list_table_query :: Add filters, run query, remove filters"><span class="description">Add filters, run query, remove filters</span><pre>_execute_list_table_query()</pre></a></li>
69
- <li class="method private "><a href="#_fetch_attachment_metadata" title="_fetch_attachment_metadata :: Fetch and filter meta data for an attachment"><span class="description">Fetch and filter meta data for an attachment</span><pre>_fetch_attachment_metadata()</pre></a></li>
70
- <li class="method private "><a href="#_fetch_attachment_parent_data" title="_fetch_attachment_parent_data :: Returns information about an attachment's parent, if found"><span class="description">Returns information about an attachment's parent, if found</span><pre>_fetch_attachment_parent_data()</pre></a></li>
71
  <li class="method private "><a href="#_prepare_list_table_query" title="_prepare_list_table_query :: Sanitize and expand query arguments from request variables"><span class="description">Sanitize and expand query arguments from request variables</span><pre>_prepare_list_table_query()</pre></a></li>
72
  <li class="method private "><a href="#_search_mla_galleries" title="_search_mla_galleries :: Search the $mla_galleries or $galleries array"><span class="description">Search the $mla_galleries or $galleries array</span><pre>_search_mla_galleries()</pre></a></li>
73
  <li class="nav-header">
@@ -137,6 +140,47 @@ Templates separate HTML markup from PHP code for easier maintenance and localiza
137
  <code>integer</code>Number of attachment posts</div>
138
  </div></div>
139
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  <a name="mla_fetch_attachment_references" id="mla_fetch_attachment_references"></a><div class="element clickable method public mla_fetch_attachment_references" data-toggle="collapse" data-target=".mla_fetch_attachment_references .collapse">
141
  <h2>Find Featured Image and inserted image/link references to an attachment</h2>
142
  <pre>mla_fetch_attachment_references(int $ID, int $parent) : array</pre>
@@ -199,7 +243,7 @@ where "key" becomes the key part of the array.</p></p>
199
  <code>string</code><p>Complete path and name of the template file, option name or the raw template</p></div>
200
  <div class="subelement argument">
201
  <h4>$type</h4>
202
- <code>string</code><p>Type of template source; 'file', 'option', 'string'</p>
203
  </div>
204
  <h3>Returns</h3>
205
  <div class="subelement response">
@@ -338,6 +382,37 @@ Defined as public because it's a filter.</p></p>
338
  <code>string</code>query clause after "detached" item modification</div>
339
  </div></div>
340
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  <a name="_build_mla_galleries" id="_build_mla_galleries"></a><div class="element clickable method private _build_mla_galleries" data-toggle="collapse" data-target="._build_mla_galleries .collapse">
342
  <h2>Builds the $mla_galleries or $galleries array</h2>
343
  <pre>_build_mla_galleries(array $galleries_array, string $shortcode, boolean $exclude_revisions) : boolean</pre>
@@ -383,47 +458,6 @@ Defined as public because it's a filter.</p></p>
383
  <code>object</code>WP_Query object with query results</div>
384
  </div></div>
385
  </div>
386
- <a name="_fetch_attachment_metadata" id="_fetch_attachment_metadata"></a><div class="element clickable method private _fetch_attachment_metadata" data-toggle="collapse" data-target="._fetch_attachment_metadata .collapse">
387
- <h2>Fetch and filter meta data for an attachment</h2>
388
- <pre>_fetch_attachment_metadata(int $post_id) : array</pre>
389
- <div class="labels"></div>
390
- <div class="row collapse"><div class="detail-description">
391
- <p class="long_description"><p>Returns a filtered array of a post's meta data. Internal values beginning with '<em>'
392
- are stripped out or converted to an 'mla</em>' equivalent. Array data is replaced with
393
- a string containing the first array element.</p></p>
394
- <table class="table table-bordered"><tr>
395
- <th>since</th>
396
- <td>0.1</td>
397
- </tr></table>
398
- <h3>Parameters</h3>
399
- <div class="subelement argument">
400
- <h4>$post_id</h4>
401
- <code>int</code><p>post ID of attachment</p></div>
402
- <h3>Returns</h3>
403
- <div class="subelement response">
404
- <code>array</code>Meta data variables</div>
405
- </div></div>
406
- </div>
407
- <a name="_fetch_attachment_parent_data" id="_fetch_attachment_parent_data"></a><div class="element clickable method private _fetch_attachment_parent_data" data-toggle="collapse" data-target="._fetch_attachment_parent_data .collapse">
408
- <h2>Returns information about an attachment's parent, if found</h2>
409
- <pre>_fetch_attachment_parent_data(int $parent_id) : array</pre>
410
- <div class="labels"></div>
411
- <div class="row collapse"><div class="detail-description">
412
- <p class="long_description"></p>
413
- <table class="table table-bordered"><tr>
414
- <th>since</th>
415
- <td>0.1</td>
416
- </tr></table>
417
- <h3>Parameters</h3>
418
- <div class="subelement argument">
419
- <h4>$parent_id</h4>
420
- <code>int</code><p>post ID of attachment's parent, if any</p>
421
- </div>
422
- <h3>Returns</h3>
423
- <div class="subelement response">
424
- <code>array</code>Parent information; post_date, post_title and post_type</div>
425
- </div></div>
426
- </div>
427
  <a name="_prepare_list_table_query" id="_prepare_list_table_query"></a><div class="element clickable method private _prepare_list_table_query" data-toggle="collapse" data-target="._prepare_list_table_query .collapse">
428
  <h2>Sanitize and expand query arguments from request variables</h2>
429
  <pre>_prepare_list_table_query(array $raw_request, int $offset, int $count) : array</pre>
@@ -442,10 +476,11 @@ Modeled after wp_edit_attachments_query in wp-admin/post.php</p></p>
442
  </div>
443
  <div class="subelement argument">
444
  <h4>$offset</h4>
445
- <code>int</code><p>number of rows to skip over to reach desired page</p></div>
 
446
  <div class="subelement argument">
447
  <h4>$count</h4>
448
- <code>int</code><p>number of rows on each page (0 = all rows)</p>
449
  </div>
450
  <h3>Returns</h3>
451
  <div class="subelement response">
@@ -532,7 +567,7 @@ any further logic required to translate those values is contained in the filters
532
  <div class="row"><footer class="span12">
533
  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>
534
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
535
- generated on 2012-11-06T11:50:00-08:00.<br></footer></div>
536
  </div>
537
  </body>
538
  </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_count_list_table_items" title="mla_count_list_table_items :: Get the total number of attachment posts"><span class="description">Get the total number of attachment posts</span><pre>mla_count_list_table_items()</pre></a></li>
57
+ <li class="method public "><a href="#mla_fetch_attachment_metadata" title="mla_fetch_attachment_metadata :: Fetch and filter meta data for an attachment"><span class="description">Fetch and filter meta data for an attachment</span><pre>mla_fetch_attachment_metadata()</pre></a></li>
58
+ <li class="method public "><a href="#mla_fetch_attachment_parent_data" title="mla_fetch_attachment_parent_data :: Returns information about an attachment's parent, if found"><span class="description">Returns information about an attachment's parent, if found</span><pre>mla_fetch_attachment_parent_data()</pre></a></li>
59
  <li class="method public "><a href="#mla_fetch_attachment_references" title="mla_fetch_attachment_references :: Find Featured Image and inserted image/link references to an attachment"><span class="description">Find Featured Image and inserted image/link references to an attachment</span><pre>mla_fetch_attachment_references()</pre></a></li>
60
  <li class="method public "><a href="#mla_get_attachment_by_id" title="mla_get_attachment_by_id :: Retrieve an Attachment array given a $post_id"><span class="description">Retrieve an Attachment array given a $post_id</span><pre>mla_get_attachment_by_id()</pre></a></li>
61
  <li class="method public "><a href="#mla_load_template" title="mla_load_template :: Load an HTML template from a file"><span class="description">Load an HTML template from a file</span><pre>mla_load_template()</pre></a></li>
65
  <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>
66
  <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>
67
  <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>
68
+ <li class="method public "><a href="#mla_update_single_item" title="mla_update_single_item :: Update a single item; change the meta data
69
+ for a single attachment."><span class="description">Update a single item; change the meta data
70
+ for a single attachment.</span><pre>mla_update_single_item()</pre></a></li>
71
  <li class="nav-header private">» Private</li>
72
  <li class="method private "><a href="#_build_mla_galleries" title="_build_mla_galleries :: Builds the $mla_galleries or $galleries array"><span class="description">Builds the $mla_galleries or $galleries array</span><pre>_build_mla_galleries()</pre></a></li>
73
  <li class="method private "><a href="#_execute_list_table_query" title="_execute_list_table_query :: Add filters, run query, remove filters"><span class="description">Add filters, run query, remove filters</span><pre>_execute_list_table_query()</pre></a></li>
 
 
74
  <li class="method private "><a href="#_prepare_list_table_query" title="_prepare_list_table_query :: Sanitize and expand query arguments from request variables"><span class="description">Sanitize and expand query arguments from request variables</span><pre>_prepare_list_table_query()</pre></a></li>
75
  <li class="method private "><a href="#_search_mla_galleries" title="_search_mla_galleries :: Search the $mla_galleries or $galleries array"><span class="description">Search the $mla_galleries or $galleries array</span><pre>_search_mla_galleries()</pre></a></li>
76
  <li class="nav-header">
140
  <code>integer</code>Number of attachment posts</div>
141
  </div></div>
142
  </div>
143
+ <a name="mla_fetch_attachment_metadata" id="mla_fetch_attachment_metadata"></a><div class="element clickable method public mla_fetch_attachment_metadata" data-toggle="collapse" data-target=".mla_fetch_attachment_metadata .collapse">
144
+ <h2>Fetch and filter meta data for an attachment</h2>
145
+ <pre>mla_fetch_attachment_metadata(int $post_id) : array</pre>
146
+ <div class="labels"></div>
147
+ <div class="row collapse"><div class="detail-description">
148
+ <p class="long_description"><p>Returns a filtered array of a post's meta data. Internal values beginning with '<em>'
149
+ are stripped out or converted to an 'mla</em>' equivalent. Array data is replaced with
150
+ a string containing the first array element.</p></p>
151
+ <table class="table table-bordered"><tr>
152
+ <th>since</th>
153
+ <td>0.1</td>
154
+ </tr></table>
155
+ <h3>Parameters</h3>
156
+ <div class="subelement argument">
157
+ <h4>$post_id</h4>
158
+ <code>int</code><p>post ID of attachment</p></div>
159
+ <h3>Returns</h3>
160
+ <div class="subelement response">
161
+ <code>array</code>Meta data variables</div>
162
+ </div></div>
163
+ </div>
164
+ <a name="mla_fetch_attachment_parent_data" id="mla_fetch_attachment_parent_data"></a><div class="element clickable method public mla_fetch_attachment_parent_data" data-toggle="collapse" data-target=".mla_fetch_attachment_parent_data .collapse">
165
+ <h2>Returns information about an attachment's parent, if found</h2>
166
+ <pre>mla_fetch_attachment_parent_data(int $parent_id) : array</pre>
167
+ <div class="labels"></div>
168
+ <div class="row collapse"><div class="detail-description">
169
+ <p class="long_description"></p>
170
+ <table class="table table-bordered"><tr>
171
+ <th>since</th>
172
+ <td>0.1</td>
173
+ </tr></table>
174
+ <h3>Parameters</h3>
175
+ <div class="subelement argument">
176
+ <h4>$parent_id</h4>
177
+ <code>int</code><p>post ID of attachment's parent, if any</p>
178
+ </div>
179
+ <h3>Returns</h3>
180
+ <div class="subelement response">
181
+ <code>array</code>Parent information; post_date, post_title and post_type</div>
182
+ </div></div>
183
+ </div>
184
  <a name="mla_fetch_attachment_references" id="mla_fetch_attachment_references"></a><div class="element clickable method public mla_fetch_attachment_references" data-toggle="collapse" data-target=".mla_fetch_attachment_references .collapse">
185
  <h2>Find Featured Image and inserted image/link references to an attachment</h2>
186
  <pre>mla_fetch_attachment_references(int $ID, int $parent) : array</pre>
243
  <code>string</code><p>Complete path and name of the template file, option name or the raw template</p></div>
244
  <div class="subelement argument">
245
  <h4>$type</h4>
246
+ <code>string</code><p>Optional type of template source; 'file' (default), 'option', 'string'</p>
247
  </div>
248
  <h3>Returns</h3>
249
  <div class="subelement response">
382
  <code>string</code>query clause after "detached" item modification</div>
383
  </div></div>
384
  </div>
385
+ <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">
386
+ <h2>Update a single item; change the meta data
387
+ for a single attachment.</h2>
388
+ <pre>mla_update_single_item(int $post_id, array $new_data, array $tax_input, array $tax_actions) : array</pre>
389
+ <div class="labels"></div>
390
+ <div class="row collapse"><div class="detail-description">
391
+ <p class="long_description"></p>
392
+ <table class="table table-bordered"><tr>
393
+ <th>since</th>
394
+ <td>0.1</td>
395
+ </tr></table>
396
+ <h3>Parameters</h3>
397
+ <div class="subelement argument">
398
+ <h4>$post_id</h4>
399
+ <code>int</code><p>The ID of the attachment to be updated</p></div>
400
+ <div class="subelement argument">
401
+ <h4>$new_data</h4>
402
+ <code>array</code><p>Field name => value pairs</p>
403
+ </div>
404
+ <div class="subelement argument">
405
+ <h4>$tax_input</h4>
406
+ <code>array</code><p>Optional taxonomy term values, default null</p></div>
407
+ <div class="subelement argument">
408
+ <h4>$tax_actions</h4>
409
+ <code>array</code><p>Optional taxonomy actions (add, remove, replace), default null</p>
410
+ </div>
411
+ <h3>Returns</h3>
412
+ <div class="subelement response">
413
+ <code>array</code>success/failure message and NULL content</div>
414
+ </div></div>
415
+ </div>
416
  <a name="_build_mla_galleries" id="_build_mla_galleries"></a><div class="element clickable method private _build_mla_galleries" data-toggle="collapse" data-target="._build_mla_galleries .collapse">
417
  <h2>Builds the $mla_galleries or $galleries array</h2>
418
  <pre>_build_mla_galleries(array $galleries_array, string $shortcode, boolean $exclude_revisions) : boolean</pre>
458
  <code>object</code>WP_Query object with query results</div>
459
  </div></div>
460
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
461
  <a name="_prepare_list_table_query" id="_prepare_list_table_query"></a><div class="element clickable method private _prepare_list_table_query" data-toggle="collapse" data-target="._prepare_list_table_query .collapse">
462
  <h2>Sanitize and expand query arguments from request variables</h2>
463
  <pre>_prepare_list_table_query(array $raw_request, int $offset, int $count) : array</pre>
476
  </div>
477
  <div class="subelement argument">
478
  <h4>$offset</h4>
479
+ <code>int</code><p>Optional number of rows (default 0) to skip over to reach desired page</p>
480
+ </div>
481
  <div class="subelement argument">
482
  <h4>$count</h4>
483
+ <code>int</code><p>Optional number of rows on each page (0 = all rows, default)</p>
484
  </div>
485
  <h3>Returns</h3>
486
  <div class="subelement response">
567
  <div class="row"><footer class="span12">
568
  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>
569
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
570
+ generated on 2012-11-18T13:00:09-08:00.<br></footer></div>
571
  </div>
572
  </body>
573
  </html>
phpDocs/classes/MLAEdit.html ADDED
@@ -0,0 +1,295 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 » \MLAEdit</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_meta_boxes_action" title="mla_add_meta_boxes_action :: Registers meta boxes for the Edit Media screen."><span class="description">Registers meta boxes for the Edit Media screen.</span><pre>mla_add_meta_boxes_action()</pre></a></li>
57
+ <li class="method public "><a href="#mla_edit_attachment_action" title="mla_edit_attachment_action :: Saves updates from the Edit Media screen."><span class="description">Saves updates from the Edit Media screen.</span><pre>mla_edit_attachment_action()</pre></a></li>
58
+ <li class="method public "><a href="#mla_featured_in_handler" title="mla_featured_in_handler :: Renders the Featured in meta box on the Edit Media page."><span class="description">Renders the Featured in meta box on the Edit Media page.</span><pre>mla_featured_in_handler()</pre></a></li>
59
+ <li class="method public "><a href="#mla_gallery_in_handler" title="mla_gallery_in_handler :: Renders the Gallery in meta box on the Edit Media page."><span class="description">Renders the Gallery in meta box on the Edit Media page.</span><pre>mla_gallery_in_handler()</pre></a></li>
60
+ <li class="method public "><a href="#mla_image_metadata_handler" title="mla_image_metadata_handler :: Renders the Image Metadata meta box on the Edit Media page."><span class="description">Renders the Image Metadata meta box on the Edit Media page.</span><pre>mla_image_metadata_handler()</pre></a></li>
61
+ <li class="method public "><a href="#mla_inserted_in_handler" title="mla_inserted_in_handler :: Renders the Inserted in meta box on the Edit Media page."><span class="description">Renders the Inserted in meta box on the Edit Media page.</span><pre>mla_inserted_in_handler()</pre></a></li>
62
+ <li class="method public "><a href="#mla_last_modified_action" title="mla_last_modified_action :: Adds Last Modified date to the Submit box on the Edit Media screen."><span class="description">Adds Last Modified date to the Submit box on the Edit Media screen.</span><pre>mla_last_modified_action()</pre></a></li>
63
+ <li class="method public "><a href="#mla_menu_order_handler" title="mla_menu_order_handler :: Renders the Menu Order meta box on the Edit Media page."><span class="description">Renders the Menu Order meta box on the Edit Media page.</span><pre>mla_menu_order_handler()</pre></a></li>
64
+ <li class="method public "><a href="#mla_mla_gallery_in_handler" title="mla_mla_gallery_in_handler :: Renders the Gallery in meta box on the Edit Media page."><span class="description">Renders the Gallery in meta box on the Edit Media page.</span><pre>mla_mla_gallery_in_handler()</pre></a></li>
65
+ <li class="method public "><a href="#mla_parent_info_handler" title="mla_parent_info_handler :: Renders the Parent Info meta box on the Edit Media page."><span class="description">Renders the Parent Info meta box on the Edit Media page.</span><pre>mla_parent_info_handler()</pre></a></li>
66
+ <li class="nav-header">
67
+ <i class="icon-custom icon-property"></i> Properties</li>
68
+ <li class="nav-header private">» Private</li>
69
+ <li class="property private "><a href="#%24mla_references" title="$mla_references :: Where-used values for the current item"><span class="description">Where-used values for the current item</span><pre>$mla_references</pre></a></li>
70
+ </ul>
71
+ </div>
72
+ <div class="span8">
73
+ <a name="%5CMLAEdit" id="\MLAEdit"></a><ul class="breadcrumb">
74
+ <li>
75
+ <a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
76
+ </li>
77
+ <li><a href="../namespaces/global.html">global</a></li>
78
+ <li class="active">
79
+ <span class="divider">\</span><a href="../classes/MLAEdit.html">MLAEdit</a>
80
+ </li>
81
+ </ul>
82
+ <div href="../classes/MLAEdit.html" class="element class">
83
+ <p class="short_description">Class MLA (Media Library Assistant) Edit contains meta boxes for the Edit Media (advanced-form-edit.php) screen</p>
84
+ <div class="details">
85
+ <p class="long_description"></p>
86
+ <table class="table table-bordered">
87
+ <tr>
88
+ <th>package</th>
89
+ <td><a href="../packages/Media%20Library%20Assistant.html">Media Library Assistant</a></td>
90
+ </tr>
91
+ <tr>
92
+ <th>since</th>
93
+ <td>0.80</td>
94
+ </tr>
95
+ </table>
96
+ <h3>
97
+ <i class="icon-custom icon-method"></i> Methods</h3>
98
+ <a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
99
+ <h2>Initialization function, similar to __construct()</h2>
100
+ <pre>initialize() : void</pre>
101
+ <div class="labels"></div>
102
+ <div class="row collapse"><div class="detail-description">
103
+ <p class="long_description"></p>
104
+ <table class="table table-bordered"><tr>
105
+ <th>since</th>
106
+ <td>0.80</td>
107
+ </tr></table>
108
+ </div></div>
109
+ </div>
110
+ <a name="mla_add_meta_boxes_action" id="mla_add_meta_boxes_action"></a><div class="element clickable method public mla_add_meta_boxes_action" data-toggle="collapse" data-target=".mla_add_meta_boxes_action .collapse">
111
+ <h2>Registers meta boxes for the Edit Media screen.</h2>
112
+ <pre>mla_add_meta_boxes_action(string $post_type, object $post) : void</pre>
113
+ <div class="labels"></div>
114
+ <div class="row collapse"><div class="detail-description">
115
+ <p class="long_description"><p>Declared public because it is an action.</p></p>
116
+ <table class="table table-bordered"><tr>
117
+ <th>since</th>
118
+ <td>0.80</td>
119
+ </tr></table>
120
+ <h3>Parameters</h3>
121
+ <div class="subelement argument">
122
+ <h4>$post_type</h4>
123
+ <code>string</code><p>type of the current post, e.g., 'attachment'</p>
124
+ </div>
125
+ <div class="subelement argument">
126
+ <h4>$post</h4>
127
+ <code>object</code><p>current post</p></div>
128
+ </div></div>
129
+ </div>
130
+ <a name="mla_edit_attachment_action" id="mla_edit_attachment_action"></a><div class="element clickable method public mla_edit_attachment_action" data-toggle="collapse" data-target=".mla_edit_attachment_action .collapse">
131
+ <h2>Saves updates from the Edit Media screen.</h2>
132
+ <pre>mla_edit_attachment_action(integer $post_ID) : void</pre>
133
+ <div class="labels"></div>
134
+ <div class="row collapse"><div class="detail-description">
135
+ <p class="long_description"><p>Declared public because it is an action.</p></p>
136
+ <table class="table table-bordered"><tr>
137
+ <th>since</th>
138
+ <td>0.80</td>
139
+ </tr></table>
140
+ <h3>Parameters</h3>
141
+ <div class="subelement argument">
142
+ <h4>$post_ID</h4>
143
+ <code>integer</code><p>ID of the current post</p></div>
144
+ </div></div>
145
+ </div>
146
+ <a name="mla_featured_in_handler" id="mla_featured_in_handler"></a><div class="element clickable method public mla_featured_in_handler" data-toggle="collapse" data-target=".mla_featured_in_handler .collapse">
147
+ <h2>Renders the Featured in meta box on the Edit Media page.</h2>
148
+ <pre>mla_featured_in_handler(object $post) : void</pre>
149
+ <div class="labels"></div>
150
+ <div class="row collapse"><div class="detail-description">
151
+ <p class="long_description"><p>Declared public because it is a callback function.</p></p>
152
+ <table class="table table-bordered"><tr>
153
+ <th>since</th>
154
+ <td>0.80</td>
155
+ </tr></table>
156
+ <h3>Parameters</h3>
157
+ <div class="subelement argument">
158
+ <h4>$post</h4>
159
+ <code>object</code><p>current post</p></div>
160
+ </div></div>
161
+ </div>
162
+ <a name="mla_gallery_in_handler" id="mla_gallery_in_handler"></a><div class="element clickable method public mla_gallery_in_handler" data-toggle="collapse" data-target=".mla_gallery_in_handler .collapse">
163
+ <h2>Renders the Gallery in meta box on the Edit Media page.</h2>
164
+ <pre>mla_gallery_in_handler(object $post) : void</pre>
165
+ <div class="labels"></div>
166
+ <div class="row collapse"><div class="detail-description">
167
+ <p class="long_description"><p>Declared public because it is a callback function.</p></p>
168
+ <table class="table table-bordered"><tr>
169
+ <th>since</th>
170
+ <td>0.80</td>
171
+ </tr></table>
172
+ <h3>Parameters</h3>
173
+ <div class="subelement argument">
174
+ <h4>$post</h4>
175
+ <code>object</code><p>current post</p></div>
176
+ </div></div>
177
+ </div>
178
+ <a name="mla_image_metadata_handler" id="mla_image_metadata_handler"></a><div class="element clickable method public mla_image_metadata_handler" data-toggle="collapse" data-target=".mla_image_metadata_handler .collapse">
179
+ <h2>Renders the Image Metadata meta box on the Edit Media page.</h2>
180
+ <pre>mla_image_metadata_handler(object $post) : void</pre>
181
+ <div class="labels"></div>
182
+ <div class="row collapse"><div class="detail-description">
183
+ <p class="long_description"><p>Declared public because it is a callback function.</p></p>
184
+ <table class="table table-bordered"><tr>
185
+ <th>since</th>
186
+ <td>0.80</td>
187
+ </tr></table>
188
+ <h3>Parameters</h3>
189
+ <div class="subelement argument">
190
+ <h4>$post</h4>
191
+ <code>object</code><p>current post</p></div>
192
+ </div></div>
193
+ </div>
194
+ <a name="mla_inserted_in_handler" id="mla_inserted_in_handler"></a><div class="element clickable method public mla_inserted_in_handler" data-toggle="collapse" data-target=".mla_inserted_in_handler .collapse">
195
+ <h2>Renders the Inserted in meta box on the Edit Media page.</h2>
196
+ <pre>mla_inserted_in_handler(object $post) : void</pre>
197
+ <div class="labels"></div>
198
+ <div class="row collapse"><div class="detail-description">
199
+ <p class="long_description"><p>Declared public because it is a callback function.</p></p>
200
+ <table class="table table-bordered"><tr>
201
+ <th>since</th>
202
+ <td>0.80</td>
203
+ </tr></table>
204
+ <h3>Parameters</h3>
205
+ <div class="subelement argument">
206
+ <h4>$post</h4>
207
+ <code>object</code><p>current post</p></div>
208
+ </div></div>
209
+ </div>
210
+ <a name="mla_last_modified_action" id="mla_last_modified_action"></a><div class="element clickable method public mla_last_modified_action" data-toggle="collapse" data-target=".mla_last_modified_action .collapse">
211
+ <h2>Adds Last Modified date to the Submit box on the Edit Media screen.</h2>
212
+ <pre>mla_last_modified_action() : void</pre>
213
+ <div class="labels"></div>
214
+ <div class="row collapse"><div class="detail-description">
215
+ <p class="long_description"><p>Declared public because it is an action.</p></p>
216
+ <table class="table table-bordered"><tr>
217
+ <th>since</th>
218
+ <td>0.80</td>
219
+ </tr></table>
220
+ </div></div>
221
+ </div>
222
+ <a name="mla_menu_order_handler" id="mla_menu_order_handler"></a><div class="element clickable method public mla_menu_order_handler" data-toggle="collapse" data-target=".mla_menu_order_handler .collapse">
223
+ <h2>Renders the Menu Order meta box on the Edit Media page.</h2>
224
+ <pre>mla_menu_order_handler(object $post) : void</pre>
225
+ <div class="labels"></div>
226
+ <div class="row collapse"><div class="detail-description">
227
+ <p class="long_description"><p>Declared public because it is a callback function.</p></p>
228
+ <table class="table table-bordered"><tr>
229
+ <th>since</th>
230
+ <td>0.80</td>
231
+ </tr></table>
232
+ <h3>Parameters</h3>
233
+ <div class="subelement argument">
234
+ <h4>$post</h4>
235
+ <code>object</code><p>current post</p></div>
236
+ </div></div>
237
+ </div>
238
+ <a name="mla_mla_gallery_in_handler" id="mla_mla_gallery_in_handler"></a><div class="element clickable method public mla_mla_gallery_in_handler" data-toggle="collapse" data-target=".mla_mla_gallery_in_handler .collapse">
239
+ <h2>Renders the Gallery in meta box on the Edit Media page.</h2>
240
+ <pre>mla_mla_gallery_in_handler(object $post) : void</pre>
241
+ <div class="labels"></div>
242
+ <div class="row collapse"><div class="detail-description">
243
+ <p class="long_description"><p>Declared public because it is a callback function.</p></p>
244
+ <table class="table table-bordered"><tr>
245
+ <th>since</th>
246
+ <td>0.80</td>
247
+ </tr></table>
248
+ <h3>Parameters</h3>
249
+ <div class="subelement argument">
250
+ <h4>$post</h4>
251
+ <code>object</code><p>current post</p></div>
252
+ </div></div>
253
+ </div>
254
+ <a name="mla_parent_info_handler" id="mla_parent_info_handler"></a><div class="element clickable method public mla_parent_info_handler" data-toggle="collapse" data-target=".mla_parent_info_handler .collapse">
255
+ <h2>Renders the Parent Info meta box on the Edit Media page.</h2>
256
+ <pre>mla_parent_info_handler(object $post) : void</pre>
257
+ <div class="labels"></div>
258
+ <div class="row collapse"><div class="detail-description">
259
+ <p class="long_description"><p>Declared public because it is a callback function.</p></p>
260
+ <table class="table table-bordered"><tr>
261
+ <th>since</th>
262
+ <td>0.80</td>
263
+ </tr></table>
264
+ <h3>Parameters</h3>
265
+ <div class="subelement argument">
266
+ <h4>$post</h4>
267
+ <code>object</code><p>current post</p></div>
268
+ </div></div>
269
+ </div>
270
+ <h3>
271
+ <i class="icon-custom icon-property"></i> Properties</h3>
272
+ <a name="%24mla_references" id="$mla_references"> </a><div class="element clickable property private $mla_references" data-toggle="collapse" data-target=".$mla_references .collapse">
273
+ <h2>Where-used values for the current item</h2>
274
+ <pre>$mla_references : array</pre>
275
+ <div class="labels"></div>
276
+ <div class="row collapse"><div class="detail-description">
277
+ <p class="long_description"><p>This array contains the Featured/Inserted/Gallery/MLA Gallery references for the item.
278
+ The array is built once each page load and cached for subsequent calls.</p></p>
279
+ <table class="table table-bordered"><tr>
280
+ <th>since</th>
281
+ <td>0.80</td>
282
+ </tr></table>
283
+ </div></div>
284
+ </div>
285
+ </div>
286
+ </div>
287
+ </div>
288
+ </div>
289
+ <div class="row"><footer class="span12">
290
+ 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>
291
+ Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
292
+ generated on 2012-11-18T13:00:09-08:00.<br></footer></div>
293
+ </div>
294
+ </body>
295
+ </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 2012-11-06T11:50:00-08: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 2012-11-18T13:00:09-08:00.<br></footer></div>
171
  </div>
172
  </body>
173
  </html>
phpDocs/classes/MLASettings.html CHANGED
@@ -52,6 +52,10 @@
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_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>
@@ -60,6 +64,7 @@ add settings link in the Plugins section entry for MLA.'><span class="descriptio
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_delete_option" title="mla_delete_option :: Delete the stored value of a defined MLA option"><span class="description">Delete the stored value of a defined MLA option</span><pre>mla_delete_option()</pre></a></li>
 
63
  <li class="method public "><a href="#mla_get_option" title="mla_get_option :: Return the stored value or default value of a defined MLA option"><span class="description">Return the stored value or default value of a defined MLA option</span><pre>mla_get_option()</pre></a></li>
64
  <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>
65
  <li class="method public "><a href="#mla_taxonomy_support" title="mla_taxonomy_support :: Determine MLA support for a taxonomy, handling the special case where the
@@ -67,16 +72,29 @@ settings are being updated or reset."><span class="description">Determine MLA su
67
  settings are being updated or reset.</span><pre>mla_taxonomy_support()</pre></a></li>
68
  <li class="method public "><a href="#mla_update_option" title="mla_update_option :: Add or update the stored value of a defined MLA option"><span class="description">Add or update the stored value of a defined MLA option</span><pre>mla_update_option()</pre></a></li>
69
  <li class="nav-header private">» Private</li>
 
 
 
 
 
70
  <li class="method private "><a href="#_create_alt_text_view" title="_create_alt_text_view :: Add a view to the database to support sorting the listing on 'ALT Text'"><span class="description">Add a view to the database to support sorting the listing on 'ALT Text'</span><pre>_create_alt_text_view()</pre></a></li>
71
- <li class="method private "><a href="#_reset_settings" title="_reset_settings :: Delete saved settings, restoring default values"><span class="description">Delete saved settings, restoring default values</span><pre>_reset_settings()</pre></a></li>
72
- <li class="method private "><a href="#_save_settings" title="_save_settings :: Save settings to the options table"><span class="description">Save settings to the options table</span><pre>_save_settings()</pre></a></li>
 
 
73
  <li class="method private "><a href="#_taxonomy_handler" title="_taxonomy_handler :: Render and manage other taxonomy support options, e.g., Categories and Post Tags"><span class="description">Render and manage other taxonomy support options, e.g., Categories and Post Tags</span><pre>_taxonomy_handler()</pre></a></li>
 
74
  <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>
75
  <li class="nav-header">
76
  <i class="icon-custom icon-property"></i> Properties</li>
77
  <li class="property public "><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>
78
  <li class="nav-header private">» Private</li>
79
  <li class="property private "><a href="#%24mla_options" title="$mla_options :: $mla_options defines the database options and admin page areas for setting/updating them."><span class="description">$mla_options defines the database options and admin page areas for setting/updating them.</span><pre>$mla_options</pre></a></li>
 
 
 
 
 
80
  <li class="nav-header">
81
  <i class="icon-custom icon-constant"></i> Constants</li>
82
  <li class="constant "><a href="#MLA_ALT_TEXT_VIEW_SUFFIX" title="MLA_ALT_TEXT_VIEW_SUFFIX :: Provides a unique suffix for the ALT Text SQL VIEW"><span class="description">Provides a unique suffix for the ALT Text SQL VIEW</span><pre>MLA_ALT_TEXT_VIEW_SUFFIX</pre></a></li>
@@ -111,6 +129,76 @@ and provides the settings page to edit them.</p>
111
  </table>
112
  <h3>
113
  <i class="icon-custom icon-method"></i> Methods</h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  <a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
115
  <h2>Initialization function, similar to __construct()</h2>
116
  <pre>initialize() : void</pre>
@@ -202,6 +290,29 @@ add settings link in the Plugins section entry for MLA.</h2>
202
  <code>boolean</code>True if the option was deleted, otherwise false</div>
203
  </div></div>
204
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  <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">
206
  <h2>Return the stored value or default value of a defined MLA option</h2>
207
  <pre>mla_get_option(string $option) : mixed</pre>
@@ -250,7 +361,7 @@ settings are being updated or reset.</h2>
250
  <code>string</code><p>Taxonomy name, e.g., attachment_category</p></div>
251
  <div class="subelement argument">
252
  <h4>$support_type</h4>
253
- <code>string</code><p>'support' (the default), 'quick-edit' or 'filter'</p>
254
  </div>
255
  <h3>Returns</h3>
256
  <div class="subelement response">
@@ -279,6 +390,125 @@ settings are being updated or reset.</h2>
279
  <code>boolean</code>True if the value was changed or false if the update failed</div>
280
  </div></div>
281
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
  <a name="_create_alt_text_view" id="_create_alt_text_view"></a><div class="element clickable method private _create_alt_text_view" data-toggle="collapse" data-target="._create_alt_text_view .collapse">
283
  <h2>Add a view to the database to support sorting the listing on 'ALT Text'</h2>
284
  <pre>_create_alt_text_view() : void</pre>
@@ -292,9 +522,21 @@ does not call the activation hook.</p></p>
292
  </tr></table>
293
  </div></div>
294
  </div>
295
- <a name="_reset_settings" id="_reset_settings"></a><div class="element clickable method private _reset_settings" data-toggle="collapse" data-target="._reset_settings .collapse">
 
 
 
 
 
 
 
 
 
 
 
 
296
  <h2>Delete saved settings, restoring default values</h2>
297
- <pre>_reset_settings(array $template_array) : array</pre>
298
  <div class="labels"></div>
299
  <div class="row collapse"><div class="detail-description">
300
  <p class="long_description"></p>
@@ -302,31 +544,48 @@ does not call the activation hook.</p></p>
302
  <th>since</th>
303
  <td>0.1</td>
304
  </tr></table>
305
- <h3>Parameters</h3>
306
- <div class="subelement argument">
307
- <h4>$template_array</h4>
308
- <code>array</code><p>HTML template(s) for the settings page</p>
309
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  <h3>Returns</h3>
311
  <div class="subelement response">
312
  <code>array</code>Message(s) reflecting the results of the operation</div>
313
  </div></div>
314
  </div>
315
- <a name="_save_settings" id="_save_settings"></a><div class="element clickable method private _save_settings" data-toggle="collapse" data-target="._save_settings .collapse">
316
- <h2>Save settings to the options table</h2>
317
- <pre>_save_settings(array $template_array) : array</pre>
318
  <div class="labels"></div>
319
  <div class="row collapse"><div class="detail-description">
320
  <p class="long_description"></p>
321
- <table class="table table-bordered"><tr>
 
322
  <th>since</th>
323
  <td>0.1</td>
324
- </tr></table>
325
- <h3>Parameters</h3>
326
- <div class="subelement argument">
327
- <h4>$template_array</h4>
328
- <code>array</code><p>HTML template(s) for the settings page</p>
329
- </div>
330
  <h3>Returns</h3>
331
  <div class="subelement response">
332
  <code>array</code>Message(s) reflecting the results of the operation</div>
@@ -338,10 +597,16 @@ does not call the activation hook.</p></p>
338
  <div class="labels"></div>
339
  <div class="row collapse"><div class="detail-description">
340
  <p class="long_description"></p>
341
- <table class="table table-bordered"><tr>
 
342
  <th>since</th>
343
  <td>0.30</td>
344
- </tr></table>
 
 
 
 
 
345
  <h3>Parameters</h3>
346
  <div class="subelement argument">
347
  <h4>$action</h4>
@@ -356,13 +621,43 @@ does not call the activation hook.</p></p>
356
  <code>array</code><p>option parameters</p></div>
357
  <div class="subelement argument">
358
  <h4>$args</h4>
359
- <code>array</code><p>The $page_template_array for 'render' else $_REQUEST</p>
360
  </div>
361
  <h3>Returns</h3>
362
  <div class="subelement response">
363
  <code>string</code>HTML table row markup for 'render' else message(s) reflecting the results of the operation.</div>
364
  </div></div>
365
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  <a name="_version_upgrade" id="_version_upgrade"></a><div class="element clickable method private _version_upgrade" data-toggle="collapse" data-target="._version_upgrade .collapse">
367
  <h2>Database and option update check, for installing new versions</h2>
368
  <pre>_version_upgrade() : void</pre>
@@ -397,7 +692,8 @@ does not call the activation hook.</p></p>
397
 
398
  <p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
399
 
400
- <p>name => admin page label or heading text
 
401
  type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
402
  std => default value
403
  help => help text
@@ -407,7 +703,7 @@ rows => textbox rows, default 5
407
  options => array of radio or select option values
408
  texts => array of radio or select option display texts
409
  render => rendering function for 'custom' options. Usage:
410
- $options_list .= ['render']( 'render', $key, $value, $page_template_array );
411
  update => update function for 'custom' options; returns nothing. Usage:
412
  $message = ['update']( 'update', $key, $value, $_REQUEST );
413
  delete => delete function for 'custom' options; returns nothing. Usage:
@@ -415,6 +711,48 @@ delete => delete function for 'custom' options; returns nothing. Usage:
415
  reset => reset function for 'custom' options; returns nothing. Usage:
416
  $message = ['reset']( 'reset', $key, $value, $_REQUEST );</p></p></div></div>
417
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
  <h3>
419
  <i class="icon-custom icon-constant"></i> Constants</h3>
420
  <a name="MLA_ALT_TEXT_VIEW_SUFFIX" id="MLA_ALT_TEXT_VIEW_SUFFIX"> </a><div class="element clickable constant MLA_ALT_TEXT_VIEW_SUFFIX" data-toggle="collapse" data-target=".MLA_ALT_TEXT_VIEW_SUFFIX .collapse">
@@ -442,7 +780,7 @@ reset => reset function for 'custom' options; returns nothing. Usage:
442
  <div class="row"><footer class="span12">
443
  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>
444
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
445
- generated on 2012-11-06T11:50:00-08:00.<br></footer></div>
446
  </div>
447
  </body>
448
  </html>
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="#_get_markup_templates" title="_get_markup_templates :: Get ALL markup templates from $mla_templates, including 'default'"><span class="description">Get ALL markup templates from $mla_templates, including 'default'</span><pre>_get_markup_templates()</pre></a></li>
56
+ <li class="method public "><a href="#_get_style_templates" title="_get_style_templates :: Get ALL style templates from $mla_templates, including 'default'"><span class="description">Get ALL style templates from $mla_templates, including 'default'</span><pre>_get_style_templates()</pre></a></li>
57
+ <li class="method public "><a href="#_put_markup_templates" title="_put_markup_templates :: Put user-defined markup templates to $mla_templates and database"><span class="description">Put user-defined markup templates to $mla_templates and database</span><pre>_put_markup_templates()</pre></a></li>
58
+ <li class="method public "><a href="#_put_style_templates" title="_put_style_templates :: Put user-defined style templates to $mla_templates and database"><span class="description">Put user-defined style templates to $mla_templates and database</span><pre>_put_style_templates()</pre></a></li>
59
  <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>
60
  <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>
61
  <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>
64
  add settings link in the Plugins section entry for MLA.</span><pre>mla_admin_menu_action()</pre></a></li>
65
  <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>
66
  <li class="method public "><a href="#mla_delete_option" title="mla_delete_option :: Delete the stored value of a defined MLA option"><span class="description">Delete the stored value of a defined MLA option</span><pre>mla_delete_option()</pre></a></li>
67
+ <li class="method public "><a href="#mla_fetch_gallery_template" title="mla_fetch_gallery_template :: Fetch style or markup template from $mla_templates"><span class="description">Fetch style or markup template from $mla_templates</span><pre>mla_fetch_gallery_template()</pre></a></li>
68
  <li class="method public "><a href="#mla_get_option" title="mla_get_option :: Return the stored value or default value of a defined MLA option"><span class="description">Return the stored value or default value of a defined MLA option</span><pre>mla_get_option()</pre></a></li>
69
  <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>
70
  <li class="method public "><a href="#mla_taxonomy_support" title="mla_taxonomy_support :: Determine MLA support for a taxonomy, handling the special case where the
72
  settings are being updated or reset.</span><pre>mla_taxonomy_support()</pre></a></li>
73
  <li class="method public "><a href="#mla_update_option" title="mla_update_option :: Add or update the stored value of a defined MLA option"><span class="description">Add or update the stored value of a defined MLA option</span><pre>mla_update_option()</pre></a></li>
74
  <li class="nav-header private">» Private</li>
75
+ <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>
76
+ <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>
77
+ <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>
78
+ <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>
79
+ <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>
80
  <li class="method private "><a href="#_create_alt_text_view" title="_create_alt_text_view :: Add a view to the database to support sorting the listing on 'ALT Text'"><span class="description">Add a view to the database to support sorting the listing on 'ALT Text'</span><pre>_create_alt_text_view()</pre></a></li>
81
+ <li class="method private "><a href="#_load_templates" title="_load_templates :: Load style and markup templates to $mla_templates"><span class="description">Load style and markup templates to $mla_templates</span><pre>_load_templates()</pre></a></li>
82
+ <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>
83
+ <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>
84
+ <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>
85
  <li class="method private "><a href="#_taxonomy_handler" title="_taxonomy_handler :: Render and manage other taxonomy support options, e.g., Categories and Post Tags"><span class="description">Render and manage other taxonomy support options, e.g., Categories and Post Tags</span><pre>_taxonomy_handler()</pre></a></li>
86
+ <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>
87
  <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>
88
  <li class="nav-header">
89
  <i class="icon-custom icon-property"></i> Properties</li>
90
  <li class="property public "><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="nav-header private">» Private</li>
92
  <li class="property private "><a href="#%24mla_options" title="$mla_options :: $mla_options defines the database options and admin page areas for setting/updating them."><span class="description">$mla_options defines the database options and admin page areas for setting/updating them.</span><pre>$mla_options</pre></a></li>
93
+ <li class="property private "><a href="#%24mla_tablist" title="$mla_tablist :: Definitions for Settings page tab ids, titles and handlers
94
+ Each tab is defined by an array with the following elements:"><span class="description">Definitions for Settings page tab ids, titles and handlers
95
+ Each tab is defined by an array with the following elements:</span><pre>$mla_tablist</pre></a></li>
96
+ <li class="property private "><a href="#%24mla_template_array" title="$mla_template_array :: Style and Markup templates"><span class="description">Style and Markup templates</span><pre>$mla_template_array</pre></a></li>
97
+ <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>
98
  <li class="nav-header">
99
  <i class="icon-custom icon-constant"></i> Constants</li>
100
  <li class="constant "><a href="#MLA_ALT_TEXT_VIEW_SUFFIX" title="MLA_ALT_TEXT_VIEW_SUFFIX :: Provides a unique suffix for the ALT Text SQL VIEW"><span class="description">Provides a unique suffix for the ALT Text SQL VIEW</span><pre>MLA_ALT_TEXT_VIEW_SUFFIX</pre></a></li>
129
  </table>
130
  <h3>
131
  <i class="icon-custom icon-method"></i> Methods</h3>
132
+ <a name="_get_markup_templates" id="_get_markup_templates"></a><div class="element clickable method public _get_markup_templates" data-toggle="collapse" data-target="._get_markup_templates .collapse">
133
+ <h2>Get ALL markup templates from $mla_templates, including 'default'</h2>
134
+ <pre>_get_markup_templates() : array | null</pre>
135
+ <div class="labels"></div>
136
+ <div class="row collapse"><div class="detail-description">
137
+ <p class="long_description"></p>
138
+ <table class="table table-bordered"><tr>
139
+ <th>since</th>
140
+ <td>0.80</td>
141
+ </tr></table>
142
+ <h3>Returns</h3>
143
+ <div class="subelement response">
144
+ <code>array</code><code>null</code>name => value for all markup templates or null if no templates</div>
145
+ </div></div>
146
+ </div>
147
+ <a name="_get_style_templates" id="_get_style_templates"></a><div class="element clickable method public _get_style_templates" data-toggle="collapse" data-target="._get_style_templates .collapse">
148
+ <h2>Get ALL style templates from $mla_templates, including 'default'</h2>
149
+ <pre>_get_style_templates() : array | null</pre>
150
+ <div class="labels"></div>
151
+ <div class="row collapse"><div class="detail-description">
152
+ <p class="long_description"></p>
153
+ <table class="table table-bordered"><tr>
154
+ <th>since</th>
155
+ <td>0.80</td>
156
+ </tr></table>
157
+ <h3>Returns</h3>
158
+ <div class="subelement response">
159
+ <code>array</code><code>null</code>name => value for all style templates or null if no templates</div>
160
+ </div></div>
161
+ </div>
162
+ <a name="_put_markup_templates" id="_put_markup_templates"></a><div class="element clickable method public _put_markup_templates" data-toggle="collapse" data-target="._put_markup_templates .collapse">
163
+ <h2>Put user-defined markup templates to $mla_templates and database</h2>
164
+ <pre>_put_markup_templates(array $templates) : boolean</pre>
165
+ <div class="labels"></div>
166
+ <div class="row collapse"><div class="detail-description">
167
+ <p class="long_description"></p>
168
+ <table class="table table-bordered"><tr>
169
+ <th>since</th>
170
+ <td>0.80</td>
171
+ </tr></table>
172
+ <h3>Parameters</h3>
173
+ <div class="subelement argument">
174
+ <h4>$templates</h4>
175
+ <code>array</code><p>name => value for all user-defined markup templates</p>
176
+ </div>
177
+ <h3>Returns</h3>
178
+ <div class="subelement response">
179
+ <code>boolean</code>true if success, false if failure</div>
180
+ </div></div>
181
+ </div>
182
+ <a name="_put_style_templates" id="_put_style_templates"></a><div class="element clickable method public _put_style_templates" data-toggle="collapse" data-target="._put_style_templates .collapse">
183
+ <h2>Put user-defined style templates to $mla_templates and database</h2>
184
+ <pre>_put_style_templates(array $templates) : boolean</pre>
185
+ <div class="labels"></div>
186
+ <div class="row collapse"><div class="detail-description">
187
+ <p class="long_description"></p>
188
+ <table class="table table-bordered"><tr>
189
+ <th>since</th>
190
+ <td>0.80</td>
191
+ </tr></table>
192
+ <h3>Parameters</h3>
193
+ <div class="subelement argument">
194
+ <h4>$templates</h4>
195
+ <code>array</code><p>name => value for all user-defined style templates</p>
196
+ </div>
197
+ <h3>Returns</h3>
198
+ <div class="subelement response">
199
+ <code>boolean</code>true if success, false if failure</div>
200
+ </div></div>
201
+ </div>
202
  <a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
203
  <h2>Initialization function, similar to __construct()</h2>
204
  <pre>initialize() : void</pre>
290
  <code>boolean</code>True if the option was deleted, otherwise false</div>
291
  </div></div>
292
  </div>
293
+ <a name="mla_fetch_gallery_template" id="mla_fetch_gallery_template"></a><div class="element clickable method public mla_fetch_gallery_template" data-toggle="collapse" data-target=".mla_fetch_gallery_template .collapse">
294
+ <h2>Fetch style or markup template from $mla_templates</h2>
295
+ <pre>mla_fetch_gallery_template(string $key, string $type) : string | boolean | null</pre>
296
+ <div class="labels"></div>
297
+ <div class="row collapse"><div class="detail-description">
298
+ <p class="long_description"></p>
299
+ <table class="table table-bordered"><tr>
300
+ <th>since</th>
301
+ <td>0.80</td>
302
+ </tr></table>
303
+ <h3>Parameters</h3>
304
+ <div class="subelement argument">
305
+ <h4>$key</h4>
306
+ <code>string</code><p>Template name</p></div>
307
+ <div class="subelement argument">
308
+ <h4>$type</h4>
309
+ <code>string</code><p>Template type; 'style' (default) or 'markup'</p>
310
+ </div>
311
+ <h3>Returns</h3>
312
+ <div class="subelement response">
313
+ <code>string</code><code>boolean</code><code>null</code>requested template, false if not found or null if no templates</div>
314
+ </div></div>
315
+ </div>
316
  <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">
317
  <h2>Return the stored value or default value of a defined MLA option</h2>
318
  <pre>mla_get_option(string $option) : mixed</pre>
361
  <code>string</code><p>Taxonomy name, e.g., attachment_category</p></div>
362
  <div class="subelement argument">
363
  <h4>$support_type</h4>
364
+ <code>string</code><p>Optional. 'support' (default), 'quick-edit' or 'filter'</p>
365
  </div>
366
  <h3>Returns</h3>
367
  <div class="subelement response">
390
  <code>boolean</code>True if the value was changed or false if the update failed</div>
391
  </div></div>
392
  </div>
393
+ <a name="_compose_documentation_tab" id="_compose_documentation_tab"></a><div class="element clickable method private _compose_documentation_tab" data-toggle="collapse" data-target="._compose_documentation_tab .collapse">
394
+ <h2>Compose the Documentation tab content for the Settings subpage</h2>
395
+ <pre>_compose_documentation_tab() : array</pre>
396
+ <div class="labels"></div>
397
+ <div class="row collapse"><div class="detail-description">
398
+ <p class="long_description"></p>
399
+ <table class="table table-bordered">
400
+ <tr>
401
+ <th>since</th>
402
+ <td>0.80</td>
403
+ </tr>
404
+ <tr>
405
+ <th>uses</th>
406
+ <td>\global\$page_template_array</td>
407
+ </tr>
408
+ </table>
409
+ <h3>Returns</h3>
410
+ <div class="subelement response">
411
+ <code>array</code>'message' => status/error messages, 'body' => tab content</div>
412
+ </div></div>
413
+ </div>
414
+ <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">
415
+ <h2>Compose the General tab content for the Settings subpage</h2>
416
+ <pre>_compose_general_tab() : array</pre>
417
+ <div class="labels"></div>
418
+ <div class="row collapse"><div class="detail-description">
419
+ <p class="long_description"></p>
420
+ <table class="table table-bordered">
421
+ <tr>
422
+ <th>since</th>
423
+ <td>0.80</td>
424
+ </tr>
425
+ <tr>
426
+ <th>uses</th>
427
+ <td>\global\$page_template_array</td>
428
+ </tr>
429
+ </table>
430
+ <h3>Returns</h3>
431
+ <div class="subelement response">
432
+ <code>array</code>'message' => status/error messages, 'body' => tab content</div>
433
+ </div></div>
434
+ </div>
435
+ <a name="_compose_mla_gallery_tab" id="_compose_mla_gallery_tab"></a><div class="element clickable method private _compose_mla_gallery_tab" data-toggle="collapse" data-target="._compose_mla_gallery_tab .collapse">
436
+ <h2>Compose the MLA Gallery tab content for the Settings subpage</h2>
437
+ <pre>_compose_mla_gallery_tab() : array</pre>
438
+ <div class="labels"></div>
439
+ <div class="row collapse"><div class="detail-description">
440
+ <p class="long_description"></p>
441
+ <table class="table table-bordered">
442
+ <tr>
443
+ <th>since</th>
444
+ <td>0.80</td>
445
+ </tr>
446
+ <tr>
447
+ <th>uses</th>
448
+ <td>\global\$page_template_array</td>
449
+ </tr>
450
+ </table>
451
+ <h3>Returns</h3>
452
+ <div class="subelement response">
453
+ <code>array</code>'message' => status/error messages, 'body' => tab content</div>
454
+ </div></div>
455
+ </div>
456
+ <a name="_compose_option_row" id="_compose_option_row"></a><div class="element clickable method private _compose_option_row" data-toggle="collapse" data-target="._compose_option_row .collapse">
457
+ <h2>Compose the table row for a single MLA option</h2>
458
+ <pre>_compose_option_row(string $key, array $value) : string</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">
463
+ <tr>
464
+ <th>since</th>
465
+ <td>0.80</td>
466
+ </tr>
467
+ <tr>
468
+ <th>uses</th>
469
+ <td>\global\$page_template_array</td>
470
+ </tr>
471
+ </table>
472
+ <h3>Parameters</h3>
473
+ <div class="subelement argument">
474
+ <h4>$key</h4>
475
+ <code>string</code><p>HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
476
+ </div>
477
+ <div class="subelement argument">
478
+ <h4>$value</h4>
479
+ <code>array</code><p>Option parameters, e.g., 'type', 'std'</p>
480
+ </div>
481
+ <h3>Returns</h3>
482
+ <div class="subelement response">
483
+ <code>string</code>HTML markup for the option's table row</div>
484
+ </div></div>
485
+ </div>
486
+ <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">
487
+ <h2>Compose the navigation tabs for the Settings subpage</h2>
488
+ <pre>_compose_settings_tabs(string $active_tab) : string</pre>
489
+ <div class="labels"></div>
490
+ <div class="row collapse"><div class="detail-description">
491
+ <p class="long_description"></p>
492
+ <table class="table table-bordered">
493
+ <tr>
494
+ <th>since</th>
495
+ <td>0.80</td>
496
+ </tr>
497
+ <tr>
498
+ <th>uses</th>
499
+ <td>\global\$page_template_array</td>
500
+ </tr>
501
+ </table>
502
+ <h3>Parameters</h3>
503
+ <div class="subelement argument">
504
+ <h4>$active_tab</h4>
505
+ <code>string</code><p>Optional data-tab-id value for the active tab, default 'general'</p>
506
+ </div>
507
+ <h3>Returns</h3>
508
+ <div class="subelement response">
509
+ <code>string</code>HTML markup for the Settings subpage navigation tabs</div>
510
+ </div></div>
511
+ </div>
512
  <a name="_create_alt_text_view" id="_create_alt_text_view"></a><div class="element clickable method private _create_alt_text_view" data-toggle="collapse" data-target="._create_alt_text_view .collapse">
513
  <h2>Add a view to the database to support sorting the listing on 'ALT Text'</h2>
514
  <pre>_create_alt_text_view() : void</pre>
522
  </tr></table>
523
  </div></div>
524
  </div>
525
+ <a name="_load_templates" id="_load_templates"></a><div class="element clickable method private _load_templates" data-toggle="collapse" data-target="._load_templates .collapse">
526
+ <h2>Load style and markup templates to $mla_templates</h2>
527
+ <pre>_load_templates() : void</pre>
528
+ <div class="labels"></div>
529
+ <div class="row collapse"><div class="detail-description">
530
+ <p class="long_description"></p>
531
+ <table class="table table-bordered"><tr>
532
+ <th>since</th>
533
+ <td>0.80</td>
534
+ </tr></table>
535
+ </div></div>
536
+ </div>
537
+ <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">
538
  <h2>Delete saved settings, restoring default values</h2>
539
+ <pre>_reset_general_settings() : array</pre>
540
  <div class="labels"></div>
541
  <div class="row collapse"><div class="detail-description">
542
  <p class="long_description"></p>
544
  <th>since</th>
545
  <td>0.1</td>
546
  </tr></table>
547
+ <h3>Returns</h3>
548
+ <div class="subelement response">
549
+ <code>array</code>Message(s) reflecting the results of the operation</div>
550
+ </div></div>
551
  </div>
552
+ <a name="_save_gallery_settings" id="_save_gallery_settings"></a><div class="element clickable method private _save_gallery_settings" data-toggle="collapse" data-target="._save_gallery_settings .collapse">
553
+ <h2>Save MLA Gallery settings to the options table</h2>
554
+ <pre>_save_gallery_settings() : array</pre>
555
+ <div class="labels"></div>
556
+ <div class="row collapse"><div class="detail-description">
557
+ <p class="long_description"></p>
558
+ <table class="table table-bordered">
559
+ <tr>
560
+ <th>since</th>
561
+ <td>0.80</td>
562
+ </tr>
563
+ <tr>
564
+ <th>uses</th>
565
+ <td>\global\$_REQUEST</td>
566
+ </tr>
567
+ </table>
568
  <h3>Returns</h3>
569
  <div class="subelement response">
570
  <code>array</code>Message(s) reflecting the results of the operation</div>
571
  </div></div>
572
  </div>
573
+ <a name="_save_general_settings" id="_save_general_settings"></a><div class="element clickable method private _save_general_settings" data-toggle="collapse" data-target="._save_general_settings .collapse">
574
+ <h2>Save General settings to the options table</h2>
575
+ <pre>_save_general_settings() : array</pre>
576
  <div class="labels"></div>
577
  <div class="row collapse"><div class="detail-description">
578
  <p class="long_description"></p>
579
+ <table class="table table-bordered">
580
+ <tr>
581
  <th>since</th>
582
  <td>0.1</td>
583
+ </tr>
584
+ <tr>
585
+ <th>uses</th>
586
+ <td>\global\$_REQUEST</td>
587
+ </tr>
588
+ </table>
589
  <h3>Returns</h3>
590
  <div class="subelement response">
591
  <code>array</code>Message(s) reflecting the results of the operation</div>
597
  <div class="labels"></div>
598
  <div class="row collapse"><div class="detail-description">
599
  <p class="long_description"></p>
600
+ <table class="table table-bordered">
601
+ <tr>
602
  <th>since</th>
603
  <td>0.30</td>
604
+ </tr>
605
+ <tr>
606
+ <th>uses</th>
607
+ <td>\global\$page_template_array</td>
608
+ </tr>
609
+ </table>
610
  <h3>Parameters</h3>
611
  <div class="subelement argument">
612
  <h4>$action</h4>
621
  <code>array</code><p>option parameters</p></div>
622
  <div class="subelement argument">
623
  <h4>$args</h4>
624
+ <code>array</code><p>Optional. null (default) for 'render' else $_REQUEST</p>
625
  </div>
626
  <h3>Returns</h3>
627
  <div class="subelement response">
628
  <code>string</code>HTML table row markup for 'render' else message(s) reflecting the results of the operation.</div>
629
  </div></div>
630
  </div>
631
+ <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">
632
+ <h2>Update or delete a single MLA option value</h2>
633
+ <pre>_update_option_row(string $key, array $value) : string</pre>
634
+ <div class="labels"></div>
635
+ <div class="row collapse"><div class="detail-description">
636
+ <p class="long_description"></p>
637
+ <table class="table table-bordered">
638
+ <tr>
639
+ <th>since</th>
640
+ <td>0.80</td>
641
+ </tr>
642
+ <tr>
643
+ <th>uses</th>
644
+ <td>\global\$_REQUEST</td>
645
+ </tr>
646
+ </table>
647
+ <h3>Parameters</h3>
648
+ <div class="subelement argument">
649
+ <h4>$key</h4>
650
+ <code>string</code><p>HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
651
+ </div>
652
+ <div class="subelement argument">
653
+ <h4>$value</h4>
654
+ <code>array</code><p>Option parameters, e.g., 'type', 'std'</p>
655
+ </div>
656
+ <h3>Returns</h3>
657
+ <div class="subelement response">
658
+ <code>string</code>HTML markup for the option's table row</div>
659
+ </div></div>
660
+ </div>
661
  <a name="_version_upgrade" id="_version_upgrade"></a><div class="element clickable method private _version_upgrade" data-toggle="collapse" data-target="._version_upgrade .collapse">
662
  <h2>Database and option update check, for installing new versions</h2>
663
  <pre>_version_upgrade() : void</pre>
692
 
693
  <p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
694
 
695
+ <p>tab => Settings page tab id for the option
696
+ name => admin page label or heading text
697
  type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
698
  std => default value
699
  help => help text
703
  options => array of radio or select option values
704
  texts => array of radio or select option display texts
705
  render => rendering function for 'custom' options. Usage:
706
+ $options_list .= ['render']( 'render', $key, $value );
707
  update => update function for 'custom' options; returns nothing. Usage:
708
  $message = ['update']( 'update', $key, $value, $_REQUEST );
709
  delete => delete function for 'custom' options; returns nothing. Usage:
711
  reset => reset function for 'custom' options; returns nothing. Usage:
712
  $message = ['reset']( 'reset', $key, $value, $_REQUEST );</p></p></div></div>
713
  </div>
714
+ <a name="%24mla_tablist" id="$mla_tablist"> </a><div class="element clickable property private $mla_tablist" data-toggle="collapse" data-target=".$mla_tablist .collapse">
715
+ <h2>Definitions for Settings page tab ids, titles and handlers
716
+ Each tab is defined by an array with the following elements:</h2>
717
+ <pre>$mla_tablist : array</pre>
718
+ <div class="labels"></div>
719
+ <div class="row collapse"><div class="detail-description">
720
+ <p class="long_description"><p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
721
+
722
+ <p>title => tab label / heading text
723
+ render => rendering function for tab messages and content. Usage:
724
+ $tab_content = <a href="">'render'</a>;</p></p>
725
+ <table class="table table-bordered"><tr>
726
+ <th>since</th>
727
+ <td>0.80</td>
728
+ </tr></table>
729
+ </div></div>
730
+ </div>
731
+ <a name="%24mla_template_array" id="$mla_template_array"> </a><div class="element clickable property private $mla_template_array" data-toggle="collapse" data-target=".$mla_template_array .collapse">
732
+ <h2>Style and Markup templates</h2>
733
+ <pre>$mla_template_array : array</pre>
734
+ <div class="labels"></div>
735
+ <div class="row collapse"><div class="detail-description">
736
+ <p class="long_description"></p>
737
+ <table class="table table-bordered"><tr>
738
+ <th>since</th>
739
+ <td>0.80</td>
740
+ </tr></table>
741
+ </div></div>
742
+ </div>
743
+ <a name="%24page_template_array" id="$page_template_array"> </a><div class="element clickable property private $page_template_array" data-toggle="collapse" data-target=".$page_template_array .collapse">
744
+ <h2>Template file for the Settings page(s) and parts</h2>
745
+ <pre>$page_template_array : array</pre>
746
+ <div class="labels"></div>
747
+ <div class="row collapse"><div class="detail-description">
748
+ <p class="long_description"><p>This array contains all of the template parts for the Settings page(s). The array is built once
749
+ each page load and cached for subsequent use.</p></p>
750
+ <table class="table table-bordered"><tr>
751
+ <th>since</th>
752
+ <td>0.80</td>
753
+ </tr></table>
754
+ </div></div>
755
+ </div>
756
  <h3>
757
  <i class="icon-custom icon-constant"></i> Constants</h3>
758
  <a name="MLA_ALT_TEXT_VIEW_SUFFIX" id="MLA_ALT_TEXT_VIEW_SUFFIX"> </a><div class="element clickable constant MLA_ALT_TEXT_VIEW_SUFFIX" data-toggle="collapse" data-target=".MLA_ALT_TEXT_VIEW_SUFFIX .collapse">
780
  <div class="row"><footer class="span12">
781
  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>
782
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
783
+ generated on 2012-11-18T13:00:09-08:00.<br></footer></div>
784
  </div>
785
  </body>
786
  </html>
phpDocs/classes/MLAShortcodes.html CHANGED
@@ -211,7 +211,7 @@ Defined as public because it's a filter.</p></p>
211
  <div class="row"><footer class="span12">
212
  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>
213
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
214
- generated on 2012-11-06T11:50:00-08:00.<br></footer></div>
215
  </div>
216
  </body>
217
  </html>
211
  <div class="row"><footer class="span12">
212
  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>
213
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
214
+ generated on 2012-11-18T13:00:09-08:00.<br></footer></div>
215
  </div>
216
  </body>
217
  </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 2012-11-06T11:50:00-08: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 2012-11-18T13:00:09-08:00.<br></footer></div>
164
  </div>
165
  </body>
166
  </html>
phpDocs/classes/MLA_List_Table.html CHANGED
@@ -986,7 +986,7 @@ sorted by that column. This is computed each time the table is displayed.</p></p
986
  <div class="row"><footer class="span12">
987
  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>
988
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
989
- generated on 2012-11-06T11:50:00-08:00.<br></footer></div>
990
  </div>
991
  </body>
992
  </html>
986
  <div class="row"><footer class="span12">
987
  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>
988
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
989
+ generated on 2012-11-18T13:00:09-08:00.<br></footer></div>
990
  </div>
991
  </body>
992
  </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 2012-11-06T11:50:00-08: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 2012-11-18T13:00:09-08:00.<br></footer></div>
66
  </div>
67
  </body>
68
  </html>
phpDocs/errors.html CHANGED
@@ -69,12 +69,13 @@
69
  <div class="package-contents"></div>
70
  <div class="package-contents"></div>
71
  <div class="package-contents"></div>
 
72
  </div>
73
  </div>
74
  <div class="row"><footer class="span12">
75
  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>
76
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
77
- generated on 2012-11-06T11:50:00-08:00.<br></footer></div>
78
  </div>
79
  </body>
80
  </html>
69
  <div class="package-contents"></div>
70
  <div class="package-contents"></div>
71
  <div class="package-contents"></div>
72
+ <div class="package-contents"></div>
73
  </div>
74
  </div>
75
  <div class="row"><footer class="span12">
76
  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>
77
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
78
+ generated on 2012-11-18T13:00:09-08:00.<br></footer></div>
79
  </div>
80
  </body>
81
  </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 2012-11-06T11:50:00-08: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 2012-11-18T13:00:09-08: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 2012-11-06T11:50:00-08: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 2012-11-18T13:00:09-08: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 2012-11-06T11:50:00-08: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 2012-11-18T13:00:09-08:00.<br></footer></div>
68
  </div>
69
  </body>
70
  </html>
phpDocs/namespaces/global.html CHANGED
@@ -96,6 +96,13 @@ of images and files held in the WordPress Media Library.</p>
96
  <div class="details collapse"></div>
97
  <a href="../classes/MLAData.html" class="more">« More »</a>
98
  </div>
 
 
 
 
 
 
 
99
  <a name="MLAObjects" id="MLAObjects"></a><div class="element ajax clickable class" href="../classes/MLAObjects.html">
100
  <h1>MLAObjects<a href="../classes/MLAObjects.html">¶</a>
101
  </h1>
@@ -159,7 +166,7 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
159
  <div class="row"><footer class="span12">
160
  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>
161
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
162
- generated on 2012-11-06T11:50:00-08:00.<br></footer></div>
163
  </div>
164
  </body>
165
  </html>
96
  <div class="details collapse"></div>
97
  <a href="../classes/MLAData.html" class="more">« More »</a>
98
  </div>
99
+ <a name="MLAEdit" id="MLAEdit"></a><div class="element ajax clickable class" href="../classes/MLAEdit.html">
100
+ <h1>MLAEdit<a href="../classes/MLAEdit.html">¶</a>
101
+ </h1>
102
+ <p class="short_description">Class MLA (Media Library Assistant) Edit contains meta boxes for the Edit Media (advanced-form-edit.php) screen</p>
103
+ <div class="details collapse"></div>
104
+ <a href="../classes/MLAEdit.html" class="more">« More »</a>
105
+ </div>
106
  <a name="MLAObjects" id="MLAObjects"></a><div class="element ajax clickable class" href="../classes/MLAObjects.html">
107
  <h1>MLAObjects<a href="../classes/MLAObjects.html">¶</a>
108
  </h1>
166
  <div class="row"><footer class="span12">
167
  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>
168
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
169
+ generated on 2012-11-18T13:00:09-08:00.<br></footer></div>
170
  </div>
171
  </body>
172
  </html>
phpDocs/packages/Media Library Assistant.html CHANGED
@@ -61,6 +61,7 @@
61
  <li class="nav-header">
62
  <i class="icon-custom icon-class"></i> Classes</li>
63
  <li><a href="#MLAData" title="Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs">MLAData</a></li>
 
64
  <li><a href="#MLA_List_Table" title='Class MLA (Media Library Assistant) List Table implements the "Assistant" admin submenu'>MLA_List_Table</a></li>
65
  <li><a href="#MLA" title="Class MLA (Media Library Assistant) provides several enhancements to the handling
66
  of images and files held in the WordPress Media Library.">MLA</a></li>
@@ -116,6 +117,13 @@ of images and files held in the WordPress Media Library.</p>
116
  <div class="details collapse"></div>
117
  <a href="../classes/MLAData.html" class="more">« More »</a>
118
  </div>
 
 
 
 
 
 
 
119
  <a name="MLAObjects" id="MLAObjects"></a><div class="element ajax clickable class" href="../classes/MLAObjects.html">
120
  <h1>MLAObjects<a href="../classes/MLAObjects.html">¶</a>
121
  </h1>
@@ -179,7 +187,7 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
179
  <div class="row"><footer class="span12">
180
  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>
181
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
182
- generated on 2012-11-06T11:50:00-08:00.<br></footer></div>
183
  </div>
184
  </body>
185
  </html>
61
  <li class="nav-header">
62
  <i class="icon-custom icon-class"></i> Classes</li>
63
  <li><a href="#MLAData" title="Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs">MLAData</a></li>
64
+ <li><a href="#MLAEdit" title="Class MLA (Media Library Assistant) Edit contains meta boxes for the Edit Media (advanced-form-edit.php) screen">MLAEdit</a></li>
65
  <li><a href="#MLA_List_Table" title='Class MLA (Media Library Assistant) List Table implements the "Assistant" admin submenu'>MLA_List_Table</a></li>
66
  <li><a href="#MLA" title="Class MLA (Media Library Assistant) provides several enhancements to the handling
67
  of images and files held in the WordPress Media Library.">MLA</a></li>
117
  <div class="details collapse"></div>
118
  <a href="../classes/MLAData.html" class="more">« More »</a>
119
  </div>
120
+ <a name="MLAEdit" id="MLAEdit"></a><div class="element ajax clickable class" href="../classes/MLAEdit.html">
121
+ <h1>MLAEdit<a href="../classes/MLAEdit.html">¶</a>
122
+ </h1>
123
+ <p class="short_description">Class MLA (Media Library Assistant) Edit contains meta boxes for the Edit Media (advanced-form-edit.php) screen</p>
124
+ <div class="details collapse"></div>
125
+ <a href="../classes/MLAEdit.html" class="more">« More »</a>
126
+ </div>
127
  <a name="MLAObjects" id="MLAObjects"></a><div class="element ajax clickable class" href="../classes/MLAObjects.html">
128
  <h1>MLAObjects<a href="../classes/MLAObjects.html">¶</a>
129
  </h1>
187
  <div class="row"><footer class="span12">
188
  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>
189
  Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
190
+ generated on 2012-11-18T13:00:09-08:00.<br></footer></div>
191
  </div>
192
  </body>
193
  </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="3e6a9d2a19b4154e620579eb5476670c" 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>
@@ -32,10 +32,10 @@ any further logic required to translate those values is contained in the filters
32
  </tag>
33
  </docblock>
34
  </property>
35
- <property final="false" static="true" visibility="private" line="902" namespace="global" package="Media Library Assistant">
36
  <name>$galleries</name>
37
  <default><![CDATA[null]]></default>
38
- <docblock line="884">
39
  <description><![CDATA[Objects containing [gallery] shortcodes]]></description>
40
  <long-description><![CDATA[<p>This array contains all of the objects containing one or more [gallery] shortcodes
41
  and array(s) of which attachments each [gallery] contains. The arrays are built once
@@ -47,22 +47,22 @@ Each inner array has these elements:
47
  ['parent_type'] 'post' or 'page' or the custom post_type of the gallery parent,
48
  ['query'] contains a string with the arguments of the [gallery],
49
  ['results'] contains an array of post_ids for the objects in the gallery.</p>]]></long-description>
50
- <tag line="884" name="since" description="0.70"/>
51
- <tag line="884" name="var" description="" type="array">
52
  <type by_reference="false">array</type>
53
  </tag>
54
  </docblock>
55
  </property>
56
- <property final="false" static="true" visibility="private" line="915" namespace="global" package="Media Library Assistant">
57
  <name>$mla_galleries</name>
58
  <default><![CDATA[null]]></default>
59
- <docblock line="904">
60
  <description><![CDATA[Objects containing [mla_gallery] shortcodes]]></description>
61
  <long-description><![CDATA[<p>This array contains all of the objects containing one or more [mla_gallery] shortcodes
62
  and array(s) of which attachments each [mla_gallery] contains. The arrays are built once
63
  each page load and cached for subsequent calls.</p>]]></long-description>
64
- <tag line="904" name="since" description="0.70"/>
65
- <tag line="904" name="var" description="" type="array">
66
  <type by_reference="false">array</type>
67
  </tag>
68
  </docblock>
@@ -88,7 +88,7 @@ where "key" becomes the key part of the array.</p>]]></long-description>
88
  <tag line="28" name="param" description="Complete path and name of the template file, option name or the raw template" type="string" variable="$source">
89
  <type by_reference="false">string</type>
90
  </tag>
91
- <tag line="28" name="param" description="Type of template source; 'file', 'option', 'string'" type="string" variable="$type">
92
  <type by_reference="false">string</type>
93
  </tag>
94
  <tag line="28" name="return" description="string for files that do not contain template divider comments, array for files containing template divider comments, false if file or option does not exist, NULL if file could not be loaded." type="string|array|false|NULL">
@@ -205,10 +205,10 @@ Modeled after wp_edit_attachments_query in wp-admin/post.php</p>]]></long-descri
205
  <tag line="224" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$raw_request">
206
  <type by_reference="false">array</type>
207
  </tag>
208
- <tag line="224" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
209
  <type by_reference="false">int</type>
210
  </tag>
211
- <tag line="224" name="param" description="number of rows on each page (0 = all rows)" type="int" variable="$count">
212
  <type by_reference="false">int</type>
213
  </tag>
214
  <tag line="224" name="return" description="revised arguments suitable for WP_Query" type="array">
@@ -231,276 +231,565 @@ Modeled after wp_edit_attachments_query in wp-admin/post.php</p>]]></long-descri
231
  <type/>
232
  </argument>
233
  </method>
234
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="453" package="Media Library Assistant">
235
  <name>_execute_list_table_query</name>
236
  <full_name>_execute_list_table_query</full_name>
237
- <docblock line="444">
238
  <description><![CDATA[Add filters, run query, remove filters]]></description>
239
  <long-description><![CDATA[]]></long-description>
240
- <tag line="444" name="since" description="0.30"/>
241
- <tag line="444" 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="444" name="return" description="WP_Query object with query results" type="object">
245
  <type by_reference="false">object</type>
246
  </tag>
247
  </docblock>
248
- <argument line="453">
249
  <name>$request</name>
250
  <default><![CDATA[]]></default>
251
  <type/>
252
  </argument>
253
  </method>
254
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="481" package="Media Library Assistant">
255
  <name>mla_query_posts_search_filter</name>
256
  <full_name>mla_query_posts_search_filter</full_name>
257
- <docblock line="469">
258
  <description><![CDATA[Adds a keyword search to the WHERE clause, if required]]></description>
259
  <long-description><![CDATA[<p>Defined as public because it's a filter.</p>]]></long-description>
260
- <tag line="469" name="since" description="0.60"/>
261
- <tag line="469" name="param" description="query clause before modification" type="string" variable="$search_string">
262
  <type by_reference="false">string</type>
263
  </tag>
264
- <tag line="469" name="param" description="WP_Query object" type="object" variable="$query_object">
265
  <type by_reference="false">object</type>
266
  </tag>
267
- <tag line="469" name="return" description="query clause after keyword search addition" type="string">
268
  <type by_reference="false">string</type>
269
  </tag>
270
  </docblock>
271
- <argument line="481">
272
  <name>$search_string</name>
273
  <default><![CDATA[]]></default>
274
  <type/>
275
  </argument>
276
- <argument line="481">
277
  <name>$query_object</name>
278
  <default><![CDATA[]]></default>
279
  <type/>
280
  </argument>
281
  </method>
282
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="554" package="Media Library Assistant">
283
  <name>mla_query_posts_join_filter</name>
284
  <full_name>mla_query_posts_join_filter</full_name>
285
- <docblock line="543">
286
  <description><![CDATA[Adds a JOIN clause, if required]]></description>
287
  <long-description><![CDATA[<p>Defined as public because it's a filter.</p>]]></long-description>
288
- <tag line="543" name="since" description="0.30"/>
289
- <tag line="543" name="param" description="query clause before modification" type="string" variable="$join_clause">
290
  <type by_reference="false">string</type>
291
  </tag>
292
- <tag line="543" name="return" description="query clause after &quot;detached&quot; item modification" type="string">
293
  <type by_reference="false">string</type>
294
  </tag>
295
  </docblock>
296
- <argument line="554">
297
  <name>$join_clause</name>
298
  <default><![CDATA[]]></default>
299
  <type/>
300
  </argument>
301
  </method>
302
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="583" package="Media Library Assistant">
303
  <name>mla_query_posts_where_filter</name>
304
  <full_name>mla_query_posts_where_filter</full_name>
305
- <docblock line="571">
306
  <description><![CDATA[Adds a WHERE clause for detached items]]></description>
307
  <long-description><![CDATA[<p>Modeled after _edit_attachments_query_helper in wp-admin/post.php.
308
  Defined as public because it's a filter.</p>]]></long-description>
309
- <tag line="571" name="since" description="0.1"/>
310
- <tag line="571" name="param" description="query clause before modification" type="string" variable="$where_clause">
311
  <type by_reference="false">string</type>
312
  </tag>
313
- <tag line="571" name="return" description="query clause after &quot;detached&quot; item modification" type="string">
314
  <type by_reference="false">string</type>
315
  </tag>
316
  </docblock>
317
- <argument line="583">
318
  <name>$where_clause</name>
319
  <default><![CDATA[]]></default>
320
  <type/>
321
  </argument>
322
  </method>
323
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="604" package="Media Library Assistant">
324
  <name>mla_query_posts_orderby_filter</name>
325
  <full_name>mla_query_posts_orderby_filter</full_name>
326
- <docblock line="592">
327
  <description><![CDATA[Adds a ORDERBY clause, if required]]></description>
328
  <long-description><![CDATA[<p>Expands the range of sort options because the logic in WP_Query is limited.
329
  Defined as public because it's a filter.</p>]]></long-description>
330
- <tag line="592" name="since" description="0.30"/>
331
- <tag line="592" name="param" description="query clause before modification" type="string" variable="$orderby_clause">
332
  <type by_reference="false">string</type>
333
  </tag>
334
- <tag line="592" name="return" description="updated query clause" type="string">
335
  <type by_reference="false">string</type>
336
  </tag>
337
  </docblock>
338
- <argument line="604">
339
  <name>$orderby_clause</name>
340
  <default><![CDATA[]]></default>
341
  <type/>
342
  </argument>
343
  </method>
344
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="653" package="Media Library Assistant">
345
  <name>mla_get_attachment_by_id</name>
346
  <full_name>mla_get_attachment_by_id</full_name>
347
- <docblock line="642">
348
  <description><![CDATA[Retrieve an Attachment array given a $post_id]]></description>
349
  <long-description><![CDATA[<p>The (associative) array will contain every field that can be found in
350
  the posts and postmeta tables, and all references to the attachment.</p>]]></long-description>
351
- <tag line="642" name="since" description="0.1"/>
352
- <tag line="642" name="param" description="The ID of the attachment post" type="int" variable="$post_id">
353
  <type by_reference="false">int</type>
354
  </tag>
355
- <tag line="642" name="return" description="NULL on failure else associative array" type="NULL|array">
356
  <type by_reference="false">NULL</type>
357
  <type by_reference="false">array</type>
358
  </tag>
359
  </docblock>
360
- <argument line="653">
361
  <name>$post_id</name>
362
  <default><![CDATA[]]></default>
363
  <type/>
364
  </argument>
365
  </method>
366
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="702" package="Media Library Assistant">
367
  <name>mla_fetch_attachment_references</name>
368
  <full_name>mla_fetch_attachment_references</full_name>
369
- <docblock line="689">
370
  <description><![CDATA[Find Featured Image and inserted image/link references to an attachment]]></description>
371
  <long-description><![CDATA[<p>Searches all post and page content to see if the attachment is used
372
  as a Featured Image or inserted in the post as an image or link.</p>]]></long-description>
373
- <tag line="689" name="since" description="0.1"/>
374
- <tag line="689" name="param" description="post ID of attachment" type="int" variable="$ID">
375
  <type by_reference="false">int</type>
376
  </tag>
377
- <tag line="689" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent">
378
  <type by_reference="false">int</type>
379
  </tag>
380
- <tag line="689" name="return" description="Reference information; see $references array comments" type="array">
381
  <type by_reference="false">array</type>
382
  </tag>
383
  </docblock>
384
- <argument line="702">
385
  <name>$ID</name>
386
  <default><![CDATA[]]></default>
387
  <type/>
388
  </argument>
389
- <argument line="702">
390
  <name>$parent</name>
391
  <default><![CDATA[]]></default>
392
  <type/>
393
  </argument>
394
  </method>
395
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="928" package="Media Library Assistant">
396
  <name>_build_mla_galleries</name>
397
  <full_name>_build_mla_galleries</full_name>
398
- <docblock line="917">
399
  <description><![CDATA[Builds the $mla_galleries or $galleries array]]></description>
400
  <long-description><![CDATA[]]></long-description>
401
- <tag line="917" name="since" description="0.70"/>
402
- <tag line="917" name="param" description="by reference to the private static galleries array variable" type="array" variable="$galleries_array">
403
  <type by_reference="false">array</type>
404
  </tag>
405
- <tag line="917" name="param" description="the shortcode to be searched for and processed" type="string" variable="$shortcode">
406
  <type by_reference="false">string</type>
407
  </tag>
408
- <tag line="917" name="param" description="true to exclude revisions from the search" type="boolean" variable="$exclude_revisions">
409
  <type by_reference="false">boolean</type>
410
  </tag>
411
- <tag line="917" name="return" description="true if the galleries array is not empty" type="boolean">
412
  <type by_reference="false">boolean</type>
413
  </tag>
414
  </docblock>
415
- <argument line="928">
416
  <name>$galleries_array</name>
417
  <default><![CDATA[]]></default>
418
  <type/>
419
  </argument>
420
- <argument line="928">
421
  <name>$shortcode</name>
422
  <default><![CDATA[]]></default>
423
  <type/>
424
  </argument>
425
- <argument line="928">
426
  <name>$exclude_revisions</name>
427
  <default><![CDATA[]]></default>
428
  <type/>
429
  </argument>
430
  </method>
431
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1010" package="Media Library Assistant">
432
  <name>_search_mla_galleries</name>
433
  <full_name>_search_mla_galleries</full_name>
434
- <docblock line="999">
435
  <description><![CDATA[Search the $mla_galleries or $galleries array]]></description>
436
  <long-description><![CDATA[]]></long-description>
437
- <tag line="999" name="since" description="0.70"/>
438
- <tag line="999" name="param" description="by reference to the private static galleries array variable" type="array" variable="$galleries_array">
439
  <type by_reference="false">array</type>
440
  </tag>
441
- <tag line="999" name="param" description="the attachment ID to be searched for and processed" type="int" variable="$attachment_id">
442
  <type by_reference="false">int</type>
443
  </tag>
444
- <tag line="999" 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">
445
  <type by_reference="false">array</type>
446
  </tag>
447
  </docblock>
448
- <argument line="1010">
449
  <name>$galleries_array</name>
450
  <default><![CDATA[]]></default>
451
  <type/>
452
  </argument>
453
- <argument line="1010">
454
  <name>$attachment_id</name>
455
  <default><![CDATA[]]></default>
456
  <type/>
457
  </argument>
458
  </method>
459
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1032" package="Media Library Assistant">
460
- <name>_fetch_attachment_parent_data</name>
461
- <full_name>_fetch_attachment_parent_data</full_name>
462
- <docblock line="1023">
463
  <description><![CDATA[Returns information about an attachment's parent, if found]]></description>
464
  <long-description><![CDATA[]]></long-description>
465
- <tag line="1023" name="since" description="0.1"/>
466
- <tag line="1023" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent_id">
467
  <type by_reference="false">int</type>
468
  </tag>
469
- <tag line="1023" name="return" description="Parent information; post_date, post_title and post_type" type="array">
470
  <type by_reference="false">array</type>
471
  </tag>
472
  </docblock>
473
- <argument line="1032">
474
  <name>$parent_id</name>
475
  <default><![CDATA[]]></default>
476
  <type/>
477
  </argument>
478
  </method>
479
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1060" package="Media Library Assistant">
480
- <name>_fetch_attachment_metadata</name>
481
- <full_name>_fetch_attachment_metadata</full_name>
482
- <docblock line="1047">
483
  <description><![CDATA[Fetch and filter meta data for an attachment]]></description>
484
  <long-description><![CDATA[<p>Returns a filtered array of a post's meta data. Internal values beginning with '<em>'
485
  are stripped out or converted to an 'mla</em>' equivalent. Array data is replaced with
486
  a string containing the first array element.</p>]]></long-description>
487
- <tag line="1047" name="since" description="0.1"/>
488
- <tag line="1047" name="param" description="post ID of attachment" type="int" variable="$post_id">
489
  <type by_reference="false">int</type>
490
  </tag>
491
- <tag line="1047" name="return" description="Meta data variables" type="array">
492
  <type by_reference="false">array</type>
493
  </tag>
494
  </docblock>
495
- <argument line="1060">
496
  <name>$post_id</name>
497
  <default><![CDATA[]]></default>
498
  <type/>
499
  </argument>
500
  </method>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
501
  </class>
502
  </file>
503
- <file path="includes\class-mla-list-table.php" hash="7076e77a8b63290ad9cf9bbd949cf7e4" package="Media Library Assistant">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  <docblock line="2">
505
  <description><![CDATA[Media Library Assistant extended List Table class]]></description>
506
  <long-description><![CDATA[]]></long-description>
@@ -736,553 +1025,553 @@ calls the parent constructor to set some default configs.]]></description>
736
  </tag>
737
  </docblock>
738
  </method>
739
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="405" package="Media Library Assistant">
740
  <name>column_default</name>
741
  <full_name>column_default</full_name>
742
- <docblock line="392">
743
  <description><![CDATA[Supply a column value if no column-specific function has been defined]]></description>
744
  <long-description><![CDATA[<p>Called when the parent class can't find a method specifically built for a
745
  given column. The taxonomy columns are handled here. All other columns should
746
  have a specific method, so this function returns a troubleshooting message.</p>]]></long-description>
747
- <tag line="392" name="since" description="0.1"/>
748
- <tag line="392" name="param" description="A singular item (one full row's worth of data)" type="array" variable="$item">
749
  <type by_reference="false">array</type>
750
  </tag>
751
- <tag line="392" name="param" description="The name/slug of the column to be processed" type="array" variable="$column_name">
752
  <type by_reference="false">array</type>
753
  </tag>
754
- <tag line="392" name="return" description="Text or HTML to be placed inside the column" type="string">
755
  <type by_reference="false">string</type>
756
  </tag>
757
  </docblock>
758
- <argument line="405">
759
  <name>$item</name>
760
  <default><![CDATA[]]></default>
761
  <type/>
762
  </argument>
763
- <argument line="405">
764
  <name>$column_name</name>
765
  <default><![CDATA[]]></default>
766
  <type/>
767
  </argument>
768
  </method>
769
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="447" package="Media Library Assistant">
770
  <name>column_cb</name>
771
  <full_name>column_cb</full_name>
772
- <docblock line="438">
773
  <description><![CDATA[Displays checkboxes for using bulk actions.]]></description>
774
  <long-description><![CDATA[<p>The 'cb' column
775
  is given special treatment when columns are processed.</p>]]></long-description>
776
- <tag line="438" name="since" description="0.1"/>
777
- <tag line="438" name="param" description="A singular attachment (post) object" type="array" variable="$item">
778
  <type by_reference="false">array</type>
779
  </tag>
780
- <tag line="438" name="return" description="HTML markup to be placed inside the column" type="string">
781
  <type by_reference="false">string</type>
782
  </tag>
783
  </docblock>
784
- <argument line="447">
785
  <name>$item</name>
786
  <default><![CDATA[]]></default>
787
  <type/>
788
  </argument>
789
  </method>
790
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="463" package="Media Library Assistant">
791
  <name>column_icon</name>
792
  <full_name>column_icon</full_name>
793
- <docblock line="455">
794
  <description><![CDATA[Supply the content for a custom column]]></description>
795
  <long-description><![CDATA[]]></long-description>
796
- <tag line="455" name="since" description="0.1"/>
797
- <tag line="455" name="param" description="A singular attachment (post) object" type="array" variable="$item">
798
  <type by_reference="false">array</type>
799
  </tag>
800
- <tag line="455" name="return" description="HTML markup to be placed inside the column" type="string">
801
  <type by_reference="false">string</type>
802
  </tag>
803
  </docblock>
804
- <argument line="463">
805
  <name>$item</name>
806
  <default><![CDATA[]]></default>
807
  <type/>
808
  </argument>
809
  </method>
810
- <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="479" package="Media Library Assistant">
811
  <name>_build_rollover_actions</name>
812
  <full_name>_build_rollover_actions</full_name>
813
- <docblock line="468">
814
  <description><![CDATA[Add rollover actions to exactly one of the following displayed columns:
815
  'ID_parent', 'title_name', 'post_title', 'post_name']]></description>
816
  <long-description><![CDATA[]]></long-description>
817
- <tag line="468" name="since" description="0.1"/>
818
- <tag line="468" name="param" description="A singular attachment (post) object" type="object" variable="$item">
819
  <type by_reference="false">object</type>
820
  </tag>
821
- <tag line="468" name="param" description="Current column name" type="string" variable="$column">
822
  <type by_reference="false">string</type>
823
  </tag>
824
- <tag line="468" name="return" description="Names and URLs of row-level actions" type="array">
825
  <type by_reference="false">array</type>
826
  </tag>
827
  </docblock>
828
- <argument line="479">
829
  <name>$item</name>
830
  <default><![CDATA[]]></default>
831
  <type/>
832
  </argument>
833
- <argument line="479">
834
  <name>$column</name>
835
  <default><![CDATA[]]></default>
836
  <type/>
837
  </argument>
838
  </method>
839
- <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="557" package="Media Library Assistant">
840
  <name>_build_inline_data</name>
841
  <full_name>_build_inline_data</full_name>
842
- <docblock line="548">
843
  <description><![CDATA[Add hidden fields with the data for use in the inline editor]]></description>
844
  <long-description><![CDATA[]]></long-description>
845
- <tag line="548" name="since" description="0.20"/>
846
- <tag line="548" name="param" description="A singular attachment (post) object" type="object" variable="$item">
847
  <type by_reference="false">object</type>
848
  </tag>
849
- <tag line="548" name="return" description="HTML &lt;div&gt; with row data" type="string">
850
  <type by_reference="false">string</type>
851
  </tag>
852
  </docblock>
853
- <argument line="557">
854
  <name>$item</name>
855
  <default><![CDATA[]]></default>
856
  <type/>
857
  </argument>
858
  </method>
859
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="597" package="Media Library Assistant">
860
  <name>column_ID_parent</name>
861
  <full_name>column_ID_parent</full_name>
862
- <docblock line="589">
863
  <description><![CDATA[Supply the content for a custom column]]></description>
864
  <long-description><![CDATA[]]></long-description>
865
- <tag line="589" name="since" description="0.1"/>
866
- <tag line="589" name="param" description="A singular attachment (post) object" type="array" variable="$item">
867
  <type by_reference="false">array</type>
868
  </tag>
869
- <tag line="589" name="return" description="HTML markup to be placed inside the column" type="string">
870
  <type by_reference="false">string</type>
871
  </tag>
872
  </docblock>
873
- <argument line="597">
874
  <name>$item</name>
875
  <default><![CDATA[]]></default>
876
  <type/>
877
  </argument>
878
  </method>
879
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="629" package="Media Library Assistant">
880
  <name>column_title_name</name>
881
  <full_name>column_title_name</full_name>
882
- <docblock line="621">
883
  <description><![CDATA[Supply the content for a custom column]]></description>
884
  <long-description><![CDATA[]]></long-description>
885
- <tag line="621" name="since" description="0.1"/>
886
- <tag line="621" name="param" description="A singular attachment (post) object" type="array" variable="$item">
887
  <type by_reference="false">array</type>
888
  </tag>
889
- <tag line="621" name="return" description="HTML markup to be placed inside the column" type="string">
890
  <type by_reference="false">string</type>
891
  </tag>
892
  </docblock>
893
- <argument line="629">
894
  <name>$item</name>
895
  <default><![CDATA[]]></default>
896
  <type/>
897
  </argument>
898
  </method>
899
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="664" package="Media Library Assistant">
900
  <name>column_post_title</name>
901
  <full_name>column_post_title</full_name>
902
- <docblock line="656">
903
  <description><![CDATA[Supply the content for a custom column]]></description>
904
  <long-description><![CDATA[]]></long-description>
905
- <tag line="656" name="since" description="0.1"/>
906
- <tag line="656" name="param" description="A singular attachment (post) object" type="array" variable="$item">
907
  <type by_reference="false">array</type>
908
  </tag>
909
- <tag line="656" name="return" description="HTML markup to be placed inside the column" type="string">
910
  <type by_reference="false">string</type>
911
  </tag>
912
  </docblock>
913
- <argument line="664">
914
  <name>$item</name>
915
  <default><![CDATA[]]></default>
916
  <type/>
917
  </argument>
918
  </method>
919
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="682" package="Media Library Assistant">
920
  <name>column_post_name</name>
921
  <full_name>column_post_name</full_name>
922
- <docblock line="674">
923
  <description><![CDATA[Supply the content for a custom column]]></description>
924
  <long-description><![CDATA[]]></long-description>
925
- <tag line="674" name="since" description="0.1"/>
926
- <tag line="674" name="param" description="A singular attachment (post) object" type="array" variable="$item">
927
  <type by_reference="false">array</type>
928
  </tag>
929
- <tag line="674" name="return" description="HTML markup to be placed inside the column" type="string">
930
  <type by_reference="false">string</type>
931
  </tag>
932
  </docblock>
933
- <argument line="682">
934
  <name>$item</name>
935
  <default><![CDATA[]]></default>
936
  <type/>
937
  </argument>
938
  </method>
939
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="700" package="Media Library Assistant">
940
  <name>column_parent</name>
941
  <full_name>column_parent</full_name>
942
- <docblock line="692">
943
  <description><![CDATA[Supply the content for a custom column]]></description>
944
  <long-description><![CDATA[]]></long-description>
945
- <tag line="692" name="since" description="0.1"/>
946
- <tag line="692" name="param" description="A singular attachment (post) object" type="array" variable="$item">
947
  <type by_reference="false">array</type>
948
  </tag>
949
- <tag line="692" name="return" description="HTML markup to be placed inside the column" type="string">
950
  <type by_reference="false">string</type>
951
  </tag>
952
  </docblock>
953
- <argument line="700">
954
  <name>$item</name>
955
  <default><![CDATA[]]></default>
956
  <type/>
957
  </argument>
958
  </method>
959
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="725" package="Media Library Assistant">
960
  <name>column_menu_order</name>
961
  <full_name>column_menu_order</full_name>
962
- <docblock line="717">
963
  <description><![CDATA[Supply the content for a custom column]]></description>
964
  <long-description><![CDATA[]]></long-description>
965
- <tag line="717" name="since" description="0.60"/>
966
- <tag line="717" name="param" description="A singular attachment (post) object" type="array" variable="$item">
967
  <type by_reference="false">array</type>
968
  </tag>
969
- <tag line="717" name="return" description="HTML markup to be placed inside the column" type="string">
970
  <type by_reference="false">string</type>
971
  </tag>
972
  </docblock>
973
- <argument line="725">
974
  <name>$item</name>
975
  <default><![CDATA[]]></default>
976
  <type/>
977
  </argument>
978
  </method>
979
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="737" package="Media Library Assistant">
980
  <name>column_featured</name>
981
  <full_name>column_featured</full_name>
982
- <docblock line="729">
983
  <description><![CDATA[Supply the content for a custom column]]></description>
984
  <long-description><![CDATA[]]></long-description>
985
- <tag line="729" name="since" description="0.1"/>
986
- <tag line="729" name="param" description="A singular attachment (post) object" type="array" variable="$item">
987
  <type by_reference="false">array</type>
988
  </tag>
989
- <tag line="729" name="return" description="HTML markup to be placed inside the column" type="string">
990
  <type by_reference="false">string</type>
991
  </tag>
992
  </docblock>
993
- <argument line="737">
994
  <name>$item</name>
995
  <default><![CDATA[]]></default>
996
  <type/>
997
  </argument>
998
  </method>
999
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="765" package="Media Library Assistant">
1000
  <name>column_inserted</name>
1001
  <full_name>column_inserted</full_name>
1002
- <docblock line="757">
1003
  <description><![CDATA[Supply the content for a custom column]]></description>
1004
  <long-description><![CDATA[]]></long-description>
1005
- <tag line="757" name="since" description="0.1"/>
1006
- <tag line="757" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1007
  <type by_reference="false">array</type>
1008
  </tag>
1009
- <tag line="757" name="return" description="HTML markup to be placed inside the column" type="string">
1010
  <type by_reference="false">string</type>
1011
  </tag>
1012
  </docblock>
1013
- <argument line="765">
1014
  <name>$item</name>
1015
  <default><![CDATA[]]></default>
1016
  <type/>
1017
  </argument>
1018
  </method>
1019
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="797" package="Media Library Assistant">
1020
  <name>column_galleries</name>
1021
  <full_name>column_galleries</full_name>
1022
- <docblock line="789">
1023
  <description><![CDATA[Supply the content for a custom column]]></description>
1024
  <long-description><![CDATA[]]></long-description>
1025
- <tag line="789" name="since" description="0.70"/>
1026
- <tag line="789" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1027
  <type by_reference="false">array</type>
1028
  </tag>
1029
- <tag line="789" name="return" description="HTML markup to be placed inside the column" type="string">
1030
  <type by_reference="false">string</type>
1031
  </tag>
1032
  </docblock>
1033
- <argument line="797">
1034
  <name>$item</name>
1035
  <default><![CDATA[]]></default>
1036
  <type/>
1037
  </argument>
1038
  </method>
1039
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="825" package="Media Library Assistant">
1040
  <name>column_mla_galleries</name>
1041
  <full_name>column_mla_galleries</full_name>
1042
- <docblock line="817">
1043
  <description><![CDATA[Supply the content for a custom column]]></description>
1044
  <long-description><![CDATA[]]></long-description>
1045
- <tag line="817" name="since" description="0.70"/>
1046
- <tag line="817" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1047
  <type by_reference="false">array</type>
1048
  </tag>
1049
- <tag line="817" name="return" description="HTML markup to be placed inside the column" type="string">
1050
  <type by_reference="false">string</type>
1051
  </tag>
1052
  </docblock>
1053
- <argument line="825">
1054
  <name>$item</name>
1055
  <default><![CDATA[]]></default>
1056
  <type/>
1057
  </argument>
1058
  </method>
1059
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="853" package="Media Library Assistant">
1060
  <name>column_alt_text</name>
1061
  <full_name>column_alt_text</full_name>
1062
- <docblock line="845">
1063
  <description><![CDATA[Supply the content for a custom column]]></description>
1064
  <long-description><![CDATA[]]></long-description>
1065
- <tag line="845" name="since" description="0.1"/>
1066
- <tag line="845" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1067
  <type by_reference="false">array</type>
1068
  </tag>
1069
- <tag line="845" name="return" description="HTML markup to be placed inside the column" type="string">
1070
  <type by_reference="false">string</type>
1071
  </tag>
1072
  </docblock>
1073
- <argument line="853">
1074
  <name>$item</name>
1075
  <default><![CDATA[]]></default>
1076
  <type/>
1077
  </argument>
1078
  </method>
1079
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="868" package="Media Library Assistant">
1080
  <name>column_caption</name>
1081
  <full_name>column_caption</full_name>
1082
- <docblock line="860">
1083
  <description><![CDATA[Supply the content for a custom column]]></description>
1084
  <long-description><![CDATA[]]></long-description>
1085
- <tag line="860" name="since" description="0.1"/>
1086
- <tag line="860" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1087
  <type by_reference="false">array</type>
1088
  </tag>
1089
- <tag line="860" name="return" description="HTML markup to be placed inside the column" type="string">
1090
  <type by_reference="false">string</type>
1091
  </tag>
1092
  </docblock>
1093
- <argument line="868">
1094
  <name>$item</name>
1095
  <default><![CDATA[]]></default>
1096
  <type/>
1097
  </argument>
1098
  </method>
1099
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="880" package="Media Library Assistant">
1100
  <name>column_description</name>
1101
  <full_name>column_description</full_name>
1102
- <docblock line="872">
1103
  <description><![CDATA[Supply the content for a custom column]]></description>
1104
  <long-description><![CDATA[]]></long-description>
1105
- <tag line="872" name="since" description="0.1"/>
1106
- <tag line="872" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1107
  <type by_reference="false">array</type>
1108
  </tag>
1109
- <tag line="872" name="return" description="HTML markup to be placed inside the column" type="string">
1110
  <type by_reference="false">string</type>
1111
  </tag>
1112
  </docblock>
1113
- <argument line="880">
1114
  <name>$item</name>
1115
  <default><![CDATA[]]></default>
1116
  <type/>
1117
  </argument>
1118
  </method>
1119
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="892" package="Media Library Assistant">
1120
  <name>column_post_mime_type</name>
1121
  <full_name>column_post_mime_type</full_name>
1122
- <docblock line="884">
1123
  <description><![CDATA[Supply the content for a custom column]]></description>
1124
  <long-description><![CDATA[]]></long-description>
1125
- <tag line="884" name="since" description="0.30"/>
1126
- <tag line="884" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1127
  <type by_reference="false">array</type>
1128
  </tag>
1129
- <tag line="884" name="return" description="HTML markup to be placed inside the column" type="string">
1130
  <type by_reference="false">string</type>
1131
  </tag>
1132
  </docblock>
1133
- <argument line="892">
1134
  <name>$item</name>
1135
  <default><![CDATA[]]></default>
1136
  <type/>
1137
  </argument>
1138
  </method>
1139
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="904" package="Media Library Assistant">
1140
  <name>column_base_file</name>
1141
  <full_name>column_base_file</full_name>
1142
- <docblock line="896">
1143
  <description><![CDATA[Supply the content for a custom column]]></description>
1144
  <long-description><![CDATA[]]></long-description>
1145
- <tag line="896" name="since" description="0.1"/>
1146
- <tag line="896" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1147
  <type by_reference="false">array</type>
1148
  </tag>
1149
- <tag line="896" name="return" description="HTML markup to be placed inside the column" type="string">
1150
  <type by_reference="false">string</type>
1151
  </tag>
1152
  </docblock>
1153
- <argument line="904">
1154
  <name>$item</name>
1155
  <default><![CDATA[]]></default>
1156
  <type/>
1157
  </argument>
1158
  </method>
1159
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="916" package="Media Library Assistant">
1160
  <name>column_date</name>
1161
  <full_name>column_date</full_name>
1162
- <docblock line="908">
1163
  <description><![CDATA[Supply the content for a custom column]]></description>
1164
  <long-description><![CDATA[]]></long-description>
1165
- <tag line="908" name="since" description="0.1"/>
1166
- <tag line="908" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1167
  <type by_reference="false">array</type>
1168
  </tag>
1169
- <tag line="908" name="return" description="HTML markup to be placed inside the column" type="string">
1170
  <type by_reference="false">string</type>
1171
  </tag>
1172
  </docblock>
1173
- <argument line="916">
1174
  <name>$item</name>
1175
  <default><![CDATA[]]></default>
1176
  <type/>
1177
  </argument>
1178
  </method>
1179
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="945" package="Media Library Assistant">
1180
  <name>column_modified</name>
1181
  <full_name>column_modified</full_name>
1182
- <docblock line="937">
1183
  <description><![CDATA[Supply the content for a custom column]]></description>
1184
  <long-description><![CDATA[]]></long-description>
1185
- <tag line="937" name="since" description="0.30"/>
1186
- <tag line="937" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1187
  <type by_reference="false">array</type>
1188
  </tag>
1189
- <tag line="937" name="return" description="HTML markup to be placed inside the column" type="string">
1190
  <type by_reference="false">string</type>
1191
  </tag>
1192
  </docblock>
1193
- <argument line="945">
1194
  <name>$item</name>
1195
  <default><![CDATA[]]></default>
1196
  <type/>
1197
  </argument>
1198
  </method>
1199
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="974" package="Media Library Assistant">
1200
  <name>column_author</name>
1201
  <full_name>column_author</full_name>
1202
- <docblock line="966">
1203
  <description><![CDATA[Supply the content for a custom column]]></description>
1204
  <long-description><![CDATA[]]></long-description>
1205
- <tag line="966" name="since" description="0.30"/>
1206
- <tag line="966" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1207
  <type by_reference="false">array</type>
1208
  </tag>
1209
- <tag line="966" name="return" description="HTML markup to be placed inside the column" type="string">
1210
  <type by_reference="false">string</type>
1211
  </tag>
1212
  </docblock>
1213
- <argument line="974">
1214
  <name>$item</name>
1215
  <default><![CDATA[]]></default>
1216
  <type/>
1217
  </argument>
1218
  </method>
1219
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="995" package="Media Library Assistant">
1220
  <name>column_attached_to</name>
1221
  <full_name>column_attached_to</full_name>
1222
- <docblock line="987">
1223
  <description><![CDATA[Supply the content for a custom column]]></description>
1224
  <long-description><![CDATA[]]></long-description>
1225
- <tag line="987" name="since" description="0.1"/>
1226
- <tag line="987" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1227
  <type by_reference="false">array</type>
1228
  </tag>
1229
- <tag line="987" name="return" description="HTML markup to be placed inside the column" type="string">
1230
  <type by_reference="false">string</type>
1231
  </tag>
1232
  </docblock>
1233
- <argument line="995">
1234
  <name>$item</name>
1235
  <default><![CDATA[]]></default>
1236
  <type/>
1237
  </argument>
1238
  </method>
1239
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1024" package="Media Library Assistant">
1240
  <name>get_columns</name>
1241
  <full_name>get_columns</full_name>
1242
- <docblock line="1017">
1243
  <description><![CDATA[This method dictates the table's columns and titles]]></description>
1244
  <long-description><![CDATA[]]></long-description>
1245
- <tag line="1017" name="since" description="0.1"/>
1246
- <tag line="1017" name="return" description="Column information: 'slugs'=&gt;'Visible Titles'" type="array">
1247
  <type by_reference="false">array</type>
1248
  </tag>
1249
  </docblock>
1250
  </method>
1251
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1036" package="Media Library Assistant">
1252
  <name>get_hidden_columns</name>
1253
  <full_name>get_hidden_columns</full_name>
1254
- <docblock line="1028">
1255
  <description><![CDATA[Returns the list of currently hidden columns from a user option or
1256
  from default values if the option is not set]]></description>
1257
  <long-description><![CDATA[]]></long-description>
1258
- <tag line="1028" name="since" description="0.1"/>
1259
- <tag line="1028" name="return" description="Column information,e.g., array(0 =&gt; 'ID_parent, 1 =&gt; 'title_name')" type="array">
1260
  <type by_reference="false">array</type>
1261
  </tag>
1262
  </docblock>
1263
  </method>
1264
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1056" package="Media Library Assistant">
1265
  <name>get_sortable_columns</name>
1266
  <full_name>get_sortable_columns</full_name>
1267
- <docblock line="1046">
1268
  <description><![CDATA[Returns an array where the key is the column that needs to be sortable
1269
  and the value is db column to sort by.]]></description>
1270
  <long-description><![CDATA[<p>Also notes the current sort column,
1271
  if set.</p>]]></long-description>
1272
- <tag line="1046" name="since" description="0.1"/>
1273
- <tag line="1046" name="return" description="Sortable column information,e.g., 'slugs'=&gt;array('data_values',boolean)" type="array">
1274
  <type by_reference="false">array</type>
1275
  </tag>
1276
  </docblock>
1277
  </method>
1278
- <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1083" package="Media Library Assistant">
1279
  <name>get_views</name>
1280
  <full_name>get_views</full_name>
1281
- <docblock line="1075">
1282
  <description><![CDATA[Returns an associative array listing all the views that can be used with this table.]]></description>
1283
  <long-description><![CDATA[<p>These are listed across the top of the page and managed by WordPress.</p>]]></long-description>
1284
- <tag line="1075" name="since" description="0.1"/>
1285
- <tag line="1075" name="return" description="View information,e.g., array ( id =&gt; link )" type="array">
1286
  <type by_reference="false">array</type>
1287
  </tag>
1288
  </docblock>
@@ -1357,7 +1646,7 @@ $this->set_pagination_args().</p>]]></long-description>
1357
  </method>
1358
  </class>
1359
  </file>
1360
- <file path="includes\class-mla-main.php" hash="ffcfbcfec7553e6632a9b98e2589a676" package="Media Library Assistant">
1361
  <docblock line="2">
1362
  <description><![CDATA[Top-level functions for the Media Library Assistant]]></description>
1363
  <long-description><![CDATA[]]></long-description>
@@ -1394,7 +1683,7 @@ of images and files held in the WordPress Media Library.]]></description>
1394
  <constant namespace="global" line="41" package="Media Library Assistant">
1395
  <name>CURRENT_MLA_VERSION</name>
1396
  <full_name>CURRENT_MLA_VERSION</full_name>
1397
- <value><![CDATA['0.71']]></value>
1398
  <docblock line="34">
1399
  <description><![CDATA[Current version number]]></description>
1400
  <long-description><![CDATA[]]></long-description>
@@ -1858,213 +2147,168 @@ going to the Edit Media screen.</p>]]></long-description>
1858
  <type/>
1859
  </argument>
1860
  </method>
1861
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1007" package="Media Library Assistant">
1862
  <name>_authors_dropdown</name>
1863
  <full_name>_authors_dropdown</full_name>
1864
- <docblock line="996">
1865
  <description><![CDATA[Get the edit Authors dropdown box, if user has suitable permissions]]></description>
1866
  <long-description><![CDATA[]]></long-description>
1867
- <tag line="996" name="since" description="0.20"/>
1868
- <tag line="996" name="param" description="User ID of the current author" type="integer" variable="$author">
1869
  <type by_reference="false">integer</type>
1870
  </tag>
1871
- <tag line="996" name="param" description="HTML name attribute" type="string" variable="$name">
1872
  <type by_reference="false">string</type>
1873
  </tag>
1874
- <tag line="996" name="param" description="HTML class attribute" type="string" variable="$class">
1875
  <type by_reference="false">string</type>
1876
  </tag>
1877
- <tag line="996" name="return" description="HTML markup for the dropdown field or False" type="string|false">
1878
  <type by_reference="false">string</type>
1879
  <type by_reference="false">false</type>
1880
  </tag>
1881
  </docblock>
1882
- <argument line="1007">
1883
  <name>$author</name>
1884
  <default><![CDATA[0]]></default>
1885
  <type/>
1886
  </argument>
1887
- <argument line="1007">
1888
  <name>$name</name>
1889
  <default><![CDATA['post_author']]></default>
1890
  <type/>
1891
  </argument>
1892
- <argument line="1007">
1893
  <name>$class</name>
1894
  <default><![CDATA['authors']]></default>
1895
  <type/>
1896
  </argument>
1897
  </method>
1898
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1039" package="Media Library Assistant">
1899
  <name>_current_bulk_action</name>
1900
  <full_name>_current_bulk_action</full_name>
1901
- <docblock line="1032">
1902
  <description><![CDATA[Get the current action selected from the bulk actions dropdown]]></description>
1903
  <long-description><![CDATA[]]></long-description>
1904
- <tag line="1032" name="since" description="0.1"/>
1905
- <tag line="1032" name="return" description="The action name or False if no action was selected" type="string|false">
1906
  <type by_reference="false">string</type>
1907
  <type by_reference="false">false</type>
1908
  </tag>
1909
  </docblock>
1910
  </method>
1911
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1069" package="Media Library Assistant">
1912
  <name>_delete_single_item</name>
1913
  <full_name>_delete_single_item</full_name>
1914
- <docblock line="1060">
1915
  <description><![CDATA[Delete a single item permanently]]></description>
1916
  <long-description><![CDATA[]]></long-description>
1917
- <tag line="1060" name="since" description="0.1"/>
1918
- <tag line="1060" name="param" description="The form POST data" type="array" variable="$post_id">
1919
  <type by_reference="false">array</type>
1920
  </tag>
1921
- <tag line="1060" name="return" description="success/failure message and NULL content" type="array">
1922
  <type by_reference="false">array</type>
1923
  </tag>
1924
  </docblock>
1925
- <argument line="1069">
1926
  <name>$post_id</name>
1927
  <default><![CDATA[]]></default>
1928
  <type/>
1929
  </argument>
1930
  </method>
1931
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1098" package="Media Library Assistant">
1932
  <name>_display_single_item</name>
1933
  <full_name>_display_single_item</full_name>
1934
- <docblock line="1088">
1935
  <description><![CDATA[Display a single item sub page; prepare the form to
1936
  change the meta data for a single attachment.]]></description>
1937
  <long-description><![CDATA[]]></long-description>
1938
- <tag line="1088" name="since" description="0.1"/>
1939
- <tag line="1088" name="param" description="The WordPress Post ID of the attachment item" type="int" variable="$post_id">
1940
- <type by_reference="false">int</type>
1941
- </tag>
1942
- <tag line="1088" name="return" description="message and/or HTML content" type="array">
1943
- <type by_reference="false">array</type>
1944
- </tag>
1945
- </docblock>
1946
- <argument line="1098">
1947
- <name>$post_id</name>
1948
- <default><![CDATA[]]></default>
1949
- <type/>
1950
- </argument>
1951
- </method>
1952
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1313" package="Media Library Assistant">
1953
- <name>_update_single_item</name>
1954
- <full_name>_update_single_item</full_name>
1955
- <docblock line="1300">
1956
- <description><![CDATA[Update a single item; change the meta data
1957
- for a single attachment.]]></description>
1958
- <long-description><![CDATA[]]></long-description>
1959
- <tag line="1300" name="since" description="0.1"/>
1960
- <tag line="1300" name="param" description="The ID of the attachment to be updated" type="int" variable="$post_id">
1961
  <type by_reference="false">int</type>
1962
  </tag>
1963
- <tag line="1300" name="param" description="Field name =&gt; value pairs" type="array" variable="$new_data">
1964
- <type by_reference="false">array</type>
1965
- </tag>
1966
- <tag line="1300" name="param" description="Taxonomy term values" type="array" variable="$tax_input">
1967
- <type by_reference="false">array</type>
1968
- </tag>
1969
- <tag line="1300" name="param" description="Taxonomy actions (add, remove, replace)" type="array" variable="$tax_actions">
1970
- <type by_reference="false">array</type>
1971
- </tag>
1972
- <tag line="1300" name="return" description="success/failure message and NULL content" type="array">
1973
  <type by_reference="false">array</type>
1974
  </tag>
1975
  </docblock>
1976
- <argument line="1313">
1977
  <name>$post_id</name>
1978
  <default><![CDATA[]]></default>
1979
  <type/>
1980
  </argument>
1981
- <argument line="1313">
1982
- <name>$new_data</name>
1983
- <default><![CDATA[]]></default>
1984
- <type/>
1985
- </argument>
1986
- <argument line="1313">
1987
- <name>$tax_input</name>
1988
- <default><![CDATA[NULL]]></default>
1989
- <type/>
1990
- </argument>
1991
- <argument line="1313">
1992
- <name>$tax_actions</name>
1993
- <default><![CDATA[NULL]]></default>
1994
- <type/>
1995
- </argument>
1996
  </method>
1997
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1505" package="Media Library Assistant">
1998
  <name>_remove_tags</name>
1999
  <full_name>_remove_tags</full_name>
2000
- <docblock line="1494">
2001
  <description><![CDATA[Remove tags from a term ids list]]></description>
2002
  <long-description><![CDATA[]]></long-description>
2003
- <tag line="1494" name="since" description="0.40"/>
2004
- <tag line="1494" name="param" description="The term ids currently assigned" type="array" variable="$terms_before">
2005
  <type by_reference="false">array</type>
2006
  </tag>
2007
- <tag line="1494" name="param" description="| string The term ids (array) or names (string) to remove" type="array" variable="$tags">
2008
  <type by_reference="false">array</type>
2009
  </tag>
2010
- <tag line="1494" name="param" description="The taxonomy object" type="object" variable="$taxonomy_obj">
2011
  <type by_reference="false">object</type>
2012
  </tag>
2013
- <tag line="1494" name="return" description="Term ids of the surviving tags" type="array">
2014
  <type by_reference="false">array</type>
2015
  </tag>
2016
  </docblock>
2017
- <argument line="1505">
2018
  <name>$terms_before</name>
2019
  <default><![CDATA[]]></default>
2020
  <type/>
2021
  </argument>
2022
- <argument line="1505">
2023
  <name>$tags</name>
2024
  <default><![CDATA[]]></default>
2025
  <type/>
2026
  </argument>
2027
- <argument line="1505">
2028
  <name>$taxonomy_obj</name>
2029
  <default><![CDATA[]]></default>
2030
  <type/>
2031
  </argument>
2032
  </method>
2033
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1547" package="Media Library Assistant">
2034
  <name>_restore_single_item</name>
2035
  <full_name>_restore_single_item</full_name>
2036
- <docblock line="1538">
2037
  <description><![CDATA[Restore a single item from the Trash]]></description>
2038
  <long-description><![CDATA[]]></long-description>
2039
- <tag line="1538" name="since" description="0.1"/>
2040
- <tag line="1538" name="param" description="The form POST data" type="array" variable="$post_id">
2041
  <type by_reference="false">array</type>
2042
  </tag>
2043
- <tag line="1538" name="return" description="success/failure message and NULL content" type="array">
2044
  <type by_reference="false">array</type>
2045
  </tag>
2046
  </docblock>
2047
- <argument line="1547">
2048
  <name>$post_id</name>
2049
  <default><![CDATA[]]></default>
2050
  <type/>
2051
  </argument>
2052
  </method>
2053
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1583" package="Media Library Assistant">
2054
  <name>_trash_single_item</name>
2055
  <full_name>_trash_single_item</full_name>
2056
- <docblock line="1574">
2057
  <description><![CDATA[Move a single item to Trash]]></description>
2058
  <long-description><![CDATA[]]></long-description>
2059
- <tag line="1574" name="since" description="0.1"/>
2060
- <tag line="1574" name="param" description="The form POST data" type="array" variable="$post_id">
2061
  <type by_reference="false">array</type>
2062
  </tag>
2063
- <tag line="1574" name="return" description="success/failure message and NULL content" type="array">
2064
  <type by_reference="false">array</type>
2065
  </tag>
2066
  </docblock>
2067
- <argument line="1583">
2068
  <name>$post_id</name>
2069
  <default><![CDATA[]]></default>
2070
  <type/>
@@ -2072,7 +2316,7 @@ for a single attachment.]]></description>
2072
  </method>
2073
  </class>
2074
  </file>
2075
- <file path="includes\class-mla-objects.php" hash="e829b63334fcd4617993caf68d75e16a" package="Media Library Assistant">
2076
  <docblock line="2">
2077
  <description><![CDATA[Media Library Assistant Custom Taxonomy and Post Type objects]]></description>
2078
  <long-description><![CDATA[]]></long-description>
@@ -2101,71 +2345,71 @@ for a single attachment.]]></description>
2101
  </tag>
2102
  </docblock>
2103
  </method>
2104
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="41" package="Media Library Assistant">
2105
  <name>_build_taxonomies</name>
2106
  <full_name>_build_taxonomies</full_name>
2107
- <docblock line="34">
2108
  <description><![CDATA[Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters]]></description>
2109
  <long-description><![CDATA[]]></long-description>
2110
- <tag line="34" name="since" description="0.1"/>
2111
- <tag line="34" name="return" description="" type="void">
2112
  <type by_reference="false">void</type>
2113
  </tag>
2114
  </docblock>
2115
  </method>
2116
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="121" package="Media Library Assistant">
2117
  <name>mla_taxonomy_get_columns_filter</name>
2118
  <full_name>mla_taxonomy_get_columns_filter</full_name>
2119
- <docblock line="111">
2120
  <description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
2121
  which replaces the "Posts" column with an equivalent "Attachments" column.]]></description>
2122
  <long-description><![CDATA[]]></long-description>
2123
- <tag line="111" name="since" description="0.30"/>
2124
- <tag line="111" name="param" description="column definitions for the edit taxonomy list table" type="array" variable="$columns">
2125
  <type by_reference="false">array</type>
2126
  </tag>
2127
- <tag line="111" name="return" description="updated column definitions for the edit taxonomy list table" type="array">
2128
  <type by_reference="false">array</type>
2129
  </tag>
2130
  </docblock>
2131
- <argument line="121">
2132
  <name>$columns</name>
2133
  <default><![CDATA[]]></default>
2134
  <type/>
2135
  </argument>
2136
  </method>
2137
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="147" package="Media Library Assistant">
2138
  <name>mla_taxonomy_column_filter</name>
2139
  <full_name>mla_taxonomy_column_filter</full_name>
2140
- <docblock line="134">
2141
  <description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
2142
  which returns a count of the attachments assigned a given term]]></description>
2143
  <long-description><![CDATA[]]></long-description>
2144
- <tag line="134" name="since" description="0.30"/>
2145
- <tag line="134" name="param" description="current column value; always ''" type="string" variable="$place_holder">
2146
  <type by_reference="false">string</type>
2147
  </tag>
2148
- <tag line="134" name="param" description="name of the column" type="array" variable="$column_name">
2149
  <type by_reference="false">array</type>
2150
  </tag>
2151
- <tag line="134" name="param" description="ID of the term for which the count is desired" type="array" variable="$term_id">
2152
  <type by_reference="false">array</type>
2153
  </tag>
2154
- <tag line="134" 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">
2155
  <type by_reference="false">array</type>
2156
  </tag>
2157
  </docblock>
2158
- <argument line="147">
2159
  <name>$place_holder</name>
2160
  <default><![CDATA[]]></default>
2161
  <type/>
2162
  </argument>
2163
- <argument line="147">
2164
  <name>$column_name</name>
2165
  <default><![CDATA[]]></default>
2166
  <type/>
2167
  </argument>
2168
- <argument line="147">
2169
  <name>$term_id</name>
2170
  <default><![CDATA[]]></default>
2171
  <type/>
@@ -2173,7 +2417,7 @@ which returns a count of the attachments assigned a given term]]></description>
2173
  </method>
2174
  </class>
2175
  </file>
2176
- <file path="includes\class-mla-settings.php" hash="1680e112c3fa28e997da057f3a7d3951" package="Media Library Assistant">
2177
  <docblock line="2">
2178
  <description><![CDATA[Manages the plugin option settings and provides the settings page to edit them]]></description>
2179
  <long-description><![CDATA[]]></long-description>
@@ -2230,16 +2474,17 @@ and provides the settings page to edit them.]]></description>
2230
  </tag>
2231
  </docblock>
2232
  </property>
2233
- <property final="false" static="true" visibility="private" line="65" namespace="global" package="Media Library Assistant">
2234
  <name>$mla_options</name>
2235
- <default><![CDATA[array(self::MLA_VERSION_OPTION => array('type' => 'hidden', 'std' => '0'), 'attachment_category' => array('name' => 'Attachment Categories', 'type' => 'hidden', 'std' => 'checked', 'help' => 'Check this option to add support for Attachment Categories.'), 'attachment_tag' => array('name' => 'Attachment Tags', 'type' => 'hidden', 'std' => 'checked', 'help' => 'Check this option to add support for Attachment Tags.'), 'where_used_heading' => array('name' => 'Where-used Reporting', 'type' => 'header'), 'exclude_revisions' => array('name' => 'Exclude Revisions', 'type' => 'checkbox', 'std' => 'checked', 'help' => 'Check this option to exclude revisions from where-used reporting.'), 'taxonomy_heading' => array('name' => 'Taxonomy Support', 'type' => 'header'), 'taxonomy_support' => array('help' => 'Check the "Support" box to add the taxonomy to the Assistant.<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' => '_taxonomy_handler', 'update' => '_taxonomy_handler', 'delete' => '_taxonomy_handler', 'reset' => '_taxonomy_handler'), 'orderby_heading' => array('name' => 'Default Table Listing Sort Order', 'type' => 'header'), 'default_orderby' => array('name' => 'Order By', 'type' => 'select', 'std' => 'title_name', 'options' => array('title_name'), 'texts' => array('Title/Name'), 'help' => 'Select the column for the sort order of the Assistant table listing.'), 'default_order' => array('name' => 'Order', 'type' => 'radio', 'std' => 'ASC', 'options' => array('ASC', 'DESC'), 'texts' => array('Ascending', 'Descending'), 'help' => 'Choose the sort order.'))]]></default>
2236
  <docblock line="41">
2237
  <description><![CDATA[$mla_options defines the database options and admin page areas for setting/updating them.]]></description>
2238
  <long-description><![CDATA[<p>Each option is defined by an array with the following elements:</p>
2239
 
2240
  <p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
2241
 
2242
- <p>name => admin page label or heading text
 
2243
  type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
2244
  std => default value
2245
  help => help text
@@ -2249,7 +2494,7 @@ rows => textbox rows, default 5
2249
  options => array of radio or select option values
2250
  texts => array of radio or select option display texts
2251
  render => rendering function for 'custom' options. Usage:
2252
- $options_list .= ['render']( 'render', $key, $value, $page_template_array );
2253
  update => update function for 'custom' options; returns nothing. Usage:
2254
  $message = ['update']( 'update', $key, $value, $_REQUEST );
2255
  delete => delete function for 'custom' options; returns nothing. Usage:
@@ -2258,305 +2503,572 @@ reset => reset function for 'custom' options; returns nothing. Usage:
2258
  $message = ['reset']( 'reset', $key, $value, $_REQUEST );</p>]]></long-description>
2259
  </docblock>
2260
  </property>
2261
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="171" package="Media Library Assistant">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2262
  <name>initialize</name>
2263
  <full_name>initialize</full_name>
2264
- <docblock line="164">
2265
  <description><![CDATA[Initialization function, similar to __construct()]]></description>
2266
  <long-description><![CDATA[]]></long-description>
2267
- <tag line="164" name="since" description="0.1"/>
2268
- <tag line="164" name="return" description="" type="void">
2269
  <type by_reference="false">void</type>
2270
  </tag>
2271
  </docblock>
2272
  </method>
2273
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="187" package="Media Library Assistant">
2274
  <name>_version_upgrade</name>
2275
  <full_name>_version_upgrade</full_name>
2276
- <docblock line="180">
2277
  <description><![CDATA[Database and option update check, for installing new versions]]></description>
2278
  <long-description><![CDATA[]]></long-description>
2279
- <tag line="180" name="since" description="0.30"/>
2280
- <tag line="180" name="return" description="" type="void">
2281
  <type by_reference="false">void</type>
2282
  </tag>
2283
  </docblock>
2284
  </method>
2285
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="229" package="Media Library Assistant">
2286
  <name>_create_alt_text_view</name>
2287
  <full_name>_create_alt_text_view</full_name>
2288
- <docblock line="219">
2289
  <description><![CDATA[Add a view to the database to support sorting the listing on 'ALT Text']]></description>
2290
  <long-description><![CDATA[<p>This function is called on each plugin invocation because the plugin upgrade process
2291
  does not call the activation hook.</p>]]></long-description>
2292
- <tag line="219" name="since" description="0.50"/>
2293
- <tag line="219" name="return" description="" type="void">
2294
  <type by_reference="false">void</type>
2295
  </tag>
2296
  </docblock>
2297
  </method>
2298
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="265" package="Media Library Assistant">
2299
  <name>mla_activation_hook</name>
2300
  <full_name>mla_activation_hook</full_name>
2301
- <docblock line="256">
2302
  <description><![CDATA[Perform one-time actions on plugin activation]]></description>
2303
  <long-description><![CDATA[<p>Adds a view to the database to support sorting the listing on 'ALT Text'.</p>]]></long-description>
2304
- <tag line="256" name="since" description="0.40"/>
2305
- <tag line="256" name="return" description="" type="void">
2306
  <type by_reference="false">void</type>
2307
  </tag>
2308
  </docblock>
2309
  </method>
2310
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="278" package="Media Library Assistant">
2311
  <name>mla_deactivation_hook</name>
2312
  <full_name>mla_deactivation_hook</full_name>
2313
- <docblock line="269">
2314
  <description><![CDATA[Perform one-time actions on plugin deactivation]]></description>
2315
  <long-description><![CDATA[<p>Removes a view from the database that supports sorting the listing on 'ALT Text'.</p>]]></long-description>
2316
- <tag line="269" name="since" description="0.40"/>
2317
- <tag line="269" name="return" description="" type="void">
2318
  <type by_reference="false">void</type>
2319
  </tag>
2320
  </docblock>
2321
  </method>
2322
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="309" package="Media Library Assistant">
2323
  <name>mla_admin_menu_action</name>
2324
  <full_name>mla_admin_menu_action</full_name>
2325
- <docblock line="301">
2326
  <description><![CDATA[Add settings page in the "Settings" section,
2327
  add settings link in the Plugins section entry for MLA.]]></description>
2328
  <long-description><![CDATA[]]></long-description>
2329
- <tag line="301" name="since" description="0.1"/>
2330
- <tag line="301" name="return" description="" type="void">
2331
  <type by_reference="false">void</type>
2332
  </tag>
2333
  </docblock>
2334
  </method>
2335
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="327" package="Media Library Assistant">
2336
  <name>mla_add_plugin_settings_link</name>
2337
  <full_name>mla_add_plugin_settings_link</full_name>
2338
- <docblock line="317">
2339
  <description><![CDATA[Add the "Settings" link to the MLA entry in the Plugins section]]></description>
2340
  <long-description><![CDATA[]]></long-description>
2341
- <tag line="317" name="since" description="0.1"/>
2342
- <tag line="317" name="param" description="array of links for the Plugin, e.g., &quot;Activate&quot;" type="array" variable="$links">
2343
  <type by_reference="false">array</type>
2344
  </tag>
2345
- <tag line="317" name="param" description="Directory and name of the plugin Index file" type="string" variable="$file">
2346
  <type by_reference="false">string</type>
2347
  </tag>
2348
- <tag line="317" name="return" description="Updated array of links for the Plugin" type="array">
2349
  <type by_reference="false">array</type>
2350
  </tag>
2351
  </docblock>
2352
- <argument line="327">
2353
  <name>$links</name>
2354
  <default><![CDATA[]]></default>
2355
  <type/>
2356
  </argument>
2357
- <argument line="327">
2358
  <name>$file</name>
2359
  <default><![CDATA[]]></default>
2360
  <type/>
2361
  </argument>
2362
  </method>
2363
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="345" package="Media Library Assistant">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2364
  <name>mla_get_option</name>
2365
  <full_name>mla_get_option</full_name>
2366
- <docblock line="336">
2367
  <description><![CDATA[Return the stored value or default value of a defined MLA option]]></description>
2368
  <long-description><![CDATA[]]></long-description>
2369
- <tag line="336" name="since" description="0.1"/>
2370
- <tag line="336" name="param" description="Name of the desired option" type="string" variable="$option">
2371
  <type by_reference="false">string</type>
2372
  </tag>
2373
- <tag line="336" name="return" description="Value(s) for the option or false if the option is not a defined MLA option" type="mixed">
2374
  <type by_reference="false">mixed</type>
2375
  </tag>
2376
  </docblock>
2377
- <argument line="345">
2378
  <name>$option</name>
2379
  <default><![CDATA[]]></default>
2380
  <type/>
2381
  </argument>
2382
  </method>
2383
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="366" package="Media Library Assistant">
2384
  <name>mla_update_option</name>
2385
  <full_name>mla_update_option</full_name>
2386
- <docblock line="356">
2387
  <description><![CDATA[Add or update the stored value of a defined MLA option]]></description>
2388
  <long-description><![CDATA[]]></long-description>
2389
- <tag line="356" name="since" description="0.1"/>
2390
- <tag line="356" name="param" description="Name of the desired option" type="string" variable="$option">
2391
  <type by_reference="false">string</type>
2392
  </tag>
2393
- <tag line="356" name="param" description="New value for the desired option" type="mixed" variable="$newvalue">
2394
  <type by_reference="false">mixed</type>
2395
  </tag>
2396
- <tag line="356" name="return" description="True if the value was changed or false if the update failed" type="boolean">
2397
  <type by_reference="false">boolean</type>
2398
  </tag>
2399
  </docblock>
2400
- <argument line="366">
2401
  <name>$option</name>
2402
  <default><![CDATA[]]></default>
2403
  <type/>
2404
  </argument>
2405
- <argument line="366">
2406
  <name>$newvalue</name>
2407
  <default><![CDATA[]]></default>
2408
  <type/>
2409
  </argument>
2410
  </method>
2411
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="382" package="Media Library Assistant">
2412
  <name>mla_delete_option</name>
2413
  <full_name>mla_delete_option</full_name>
2414
- <docblock line="373">
2415
  <description><![CDATA[Delete the stored value of a defined MLA option]]></description>
2416
  <long-description><![CDATA[]]></long-description>
2417
- <tag line="373" name="since" description="0.1"/>
2418
- <tag line="373" name="param" description="Name of the desired option" type="string" variable="$option">
2419
  <type by_reference="false">string</type>
2420
  </tag>
2421
- <tag line="373" name="return" description="True if the option was deleted, otherwise false" type="boolean">
2422
  <type by_reference="false">boolean</type>
2423
  </tag>
2424
  </docblock>
2425
- <argument line="382">
2426
  <name>$option</name>
2427
  <default><![CDATA[]]></default>
2428
  <type/>
2429
  </argument>
2430
  </method>
2431
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="397" package="Media Library Assistant">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2432
  <name>mla_render_settings_page</name>
2433
  <full_name>mla_render_settings_page</full_name>
2434
- <docblock line="390">
2435
  <description><![CDATA[Render (echo) the "Media Library Assistant" subpage in the Settings section]]></description>
2436
  <long-description><![CDATA[]]></long-description>
2437
- <tag line="390" name="since" description="0.1"/>
2438
- <tag line="390" name="return" description="Echoes HTML markup for the settings subpage" type="void">
2439
  <type by_reference="false">void</type>
2440
  </tag>
2441
  </docblock>
2442
  </method>
2443
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="619" package="Media Library Assistant">
2444
  <name>mla_taxonomy_support</name>
2445
  <full_name>mla_taxonomy_support</full_name>
2446
- <docblock line="606">
2447
  <description><![CDATA[Determine MLA support for a taxonomy, handling the special case where the
2448
  settings are being updated or reset.]]></description>
2449
  <long-description><![CDATA[]]></long-description>
2450
- <tag line="606" name="since" description="0.30"/>
2451
- <tag line="606" name="param" description="Taxonomy name, e.g., attachment_category" type="string" variable="$tax_name">
2452
  <type by_reference="false">string</type>
2453
  </tag>
2454
- <tag line="606" name="param" description="'support' (the default), 'quick-edit' or 'filter'" type="string" variable="$support_type">
2455
  <type by_reference="false">string</type>
2456
  </tag>
2457
- <tag line="606" 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">
2458
  <type by_reference="false">boolean</type>
2459
  <type by_reference="false">string</type>
2460
  </tag>
2461
  </docblock>
2462
- <argument line="619">
2463
  <name>$tax_name</name>
2464
  <default><![CDATA[]]></default>
2465
  <type/>
2466
  </argument>
2467
- <argument line="619">
2468
  <name>$support_type</name>
2469
  <default><![CDATA['support']]></default>
2470
  <type/>
2471
  </argument>
2472
  </method>
2473
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="691" package="Media Library Assistant">
2474
- <name>_save_settings</name>
2475
- <full_name>_save_settings</full_name>
2476
- <docblock line="682">
2477
- <description><![CDATA[Save settings to the options table]]></description>
2478
  <long-description><![CDATA[]]></long-description>
2479
- <tag line="682" name="since" description="0.1"/>
2480
- <tag line="682" name="param" description="HTML template(s) for the settings page" type="array" variable="$template_array">
 
2481
  <type by_reference="false">array</type>
2482
  </tag>
2483
- <tag line="682" name="return" description="Message(s) reflecting the results of the operation" type="array">
 
 
 
 
 
 
 
 
 
 
2484
  <type by_reference="false">array</type>
2485
  </tag>
2486
  </docblock>
2487
- <argument line="691">
2488
- <name>$template_array</name>
2489
- <default><![CDATA[]]></default>
2490
- <type/>
2491
- </argument>
2492
  </method>
2493
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="782" package="Media Library Assistant">
2494
- <name>_reset_settings</name>
2495
- <full_name>_reset_settings</full_name>
2496
- <docblock line="773">
2497
  <description><![CDATA[Delete saved settings, restoring default values]]></description>
2498
  <long-description><![CDATA[]]></long-description>
2499
- <tag line="773" name="since" description="0.1"/>
2500
- <tag line="773" name="param" description="HTML template(s) for the settings page" type="array" variable="$template_array">
2501
- <type by_reference="false">array</type>
2502
- </tag>
2503
- <tag line="773" name="return" description="Message(s) reflecting the results of the operation" type="array">
2504
  <type by_reference="false">array</type>
2505
  </tag>
2506
  </docblock>
2507
- <argument line="782">
2508
- <name>$template_array</name>
2509
- <default><![CDATA[]]></default>
2510
- <type/>
2511
- </argument>
2512
  </method>
2513
- <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="825" package="Media Library Assistant">
2514
  <name>_taxonomy_handler</name>
2515
  <full_name>_taxonomy_handler</full_name>
2516
- <docblock line="813">
2517
  <description><![CDATA[Render and manage other taxonomy support options, e.g., Categories and Post Tags]]></description>
2518
  <long-description><![CDATA[]]></long-description>
2519
- <tag line="813" name="since" description="0.30"/>
2520
- <tag line="813" name="param" description="'render', 'update', 'delete', or 'reset'" type="string" variable="$action">
 
2521
  <type by_reference="false">string</type>
2522
  </tag>
2523
- <tag line="813" name="param" description="option name, e.g., 'taxonomy_support'" type="string" variable="$key">
2524
  <type by_reference="false">string</type>
2525
  </tag>
2526
- <tag line="813" name="param" description="option parameters" type="array" variable="$value">
2527
  <type by_reference="false">array</type>
2528
  </tag>
2529
- <tag line="813" name="param" description="The $page_template_array for 'render' else $_REQUEST" type="array" variable="$args">
2530
  <type by_reference="false">array</type>
2531
  </tag>
2532
- <tag line="813" name="return" description="HTML table row markup for 'render' else message(s) reflecting the results of the operation." type="string">
2533
  <type by_reference="false">string</type>
2534
  </tag>
2535
  </docblock>
2536
- <argument line="825">
2537
  <name>$action</name>
2538
  <default><![CDATA[]]></default>
2539
  <type/>
2540
  </argument>
2541
- <argument line="825">
2542
  <name>$key</name>
2543
  <default><![CDATA[]]></default>
2544
  <type/>
2545
  </argument>
2546
- <argument line="825">
2547
  <name>$value</name>
2548
  <default><![CDATA[]]></default>
2549
  <type/>
2550
  </argument>
2551
- <argument line="825">
2552
  <name>$args</name>
2553
- <default><![CDATA[]]></default>
2554
  <type/>
2555
  </argument>
2556
  </method>
2557
  </class>
2558
  </file>
2559
- <file path="includes\class-mla-shortcodes.php" hash="d77b8e63a9ec2dc65324584b34313d52" package="Media Library Assistant">
2560
  <docblock line="2">
2561
  <description><![CDATA[Media Library Assistant Shortcode handler(s)]]></description>
2562
  <long-description><![CDATA[]]></long-description>
@@ -2573,26 +3085,26 @@ settings are being updated or reset.]]></description>
2573
  <tag line="9" name="package" description="Media Library Assistant"/>
2574
  <tag line="9" name="since" description="0.20"/>
2575
  </docblock>
2576
- <property final="false" static="true" visibility="private" line="132" namespace="global" package="Media Library Assistant">
2577
  <name>$mla_debug_messages</name>
2578
  <default><![CDATA['']]></default>
2579
- <docblock line="125">
2580
  <description><![CDATA[Accumulates debug messages]]></description>
2581
  <long-description><![CDATA[]]></long-description>
2582
- <tag line="125" name="since" description="0.60"/>
2583
- <tag line="125" name="var" description="" type="string">
2584
  <type by_reference="false">string</type>
2585
  </tag>
2586
  </docblock>
2587
  </property>
2588
- <property final="false" static="true" visibility="private" line="141" namespace="global" package="Media Library Assistant">
2589
  <name>$mla_debug</name>
2590
  <default><![CDATA[false]]></default>
2591
- <docblock line="134">
2592
  <description><![CDATA[Turn debug collection and display on or off]]></description>
2593
  <long-description><![CDATA[]]></long-description>
2594
- <tag line="134" name="since" description="0.70"/>
2595
- <tag line="134" name="var" description="" type="boolean">
2596
  <type by_reference="false">boolean</type>
2597
  </tag>
2598
  </docblock>
@@ -2621,73 +3133,73 @@ settings are being updated or reset.]]></description>
2621
  </tag>
2622
  </docblock>
2623
  </method>
2624
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="156" package="Media Library Assistant">
2625
  <name>mla_gallery_shortcode</name>
2626
  <full_name>mla_gallery_shortcode</full_name>
2627
- <docblock line="143">
2628
  <description><![CDATA[The MLA Gallery shortcode.]]></description>
2629
  <long-description><![CDATA[<p>This is a superset of the WordPress Gallery shortcode for displaying images on a post,
2630
  page or custom post type. It is adapted from /wp-includes/media.php gallery_shortcode.
2631
  Enhancements include many additional selection parameters and full taxonomy support.</p>]]></long-description>
2632
- <tag line="143" name="since" description=".50"/>
2633
- <tag line="143" name="param" description="Attributes of the shortcode." type="array" variable="$attr">
2634
  <type by_reference="false">array</type>
2635
  </tag>
2636
- <tag line="143" name="return" description="HTML content to display gallery." type="string">
2637
  <type by_reference="false">string</type>
2638
  </tag>
2639
  </docblock>
2640
- <argument line="156">
2641
  <name>$attr</name>
2642
  <default><![CDATA[]]></default>
2643
  <type/>
2644
  </argument>
2645
  </method>
2646
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="289" package="Media Library Assistant">
2647
  <name>mla_get_shortcode_attachments</name>
2648
  <full_name>mla_get_shortcode_attachments</full_name>
2649
- <docblock line="279">
2650
  <description><![CDATA[Parses shortcode parameters and returns the gallery objects]]></description>
2651
  <long-description><![CDATA[]]></long-description>
2652
- <tag line="279" name="since" description=".50"/>
2653
- <tag line="279" name="param" description="Post ID of the parent" type="int" variable="$post_parent">
2654
  <type by_reference="false">int</type>
2655
  </tag>
2656
- <tag line="279" name="param" description="Attributes of the shortcode" type="array" variable="$attr">
2657
  <type by_reference="false">array</type>
2658
  </tag>
2659
- <tag line="279" name="return" description="List of attachments returned from WP_Query" type="array">
2660
  <type by_reference="false">array</type>
2661
  </tag>
2662
  </docblock>
2663
- <argument line="289">
2664
  <name>$post_parent</name>
2665
  <default><![CDATA[]]></default>
2666
  <type/>
2667
  </argument>
2668
- <argument line="289">
2669
  <name>$attr</name>
2670
  <default><![CDATA[]]></default>
2671
  <type/>
2672
  </argument>
2673
  </method>
2674
- <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="615" package="Media Library Assistant">
2675
  <name>mla_shortcode_query_posts_where_filter</name>
2676
  <full_name>mla_shortcode_query_posts_where_filter</full_name>
2677
- <docblock line="602">
2678
  <description><![CDATA[Filters the WHERE clause for shortcode queries]]></description>
2679
  <long-description><![CDATA[<p>Captures debug information. Adds whitespace to the post_type = 'attachment'
2680
  phrase to circumvent subsequent Role Scoper modification of the clause.
2681
  Defined as public because it's a filter.</p>]]></long-description>
2682
- <tag line="602" name="since" description="0.70"/>
2683
- <tag line="602" name="param" description="query clause before modification" type="string" variable="$where_clause">
2684
  <type by_reference="false">string</type>
2685
  </tag>
2686
- <tag line="602" name="return" description="query clause after modification" type="string">
2687
  <type by_reference="false">string</type>
2688
  </tag>
2689
  </docblock>
2690
- <argument line="615">
2691
  <name>$where_clause</name>
2692
  <default><![CDATA[]]></default>
2693
  <type/>
@@ -2695,7 +3207,7 @@ Defined as public because it's a filter.</p>]]></long-description>
2695
  </method>
2696
  </class>
2697
  </file>
2698
- <file path="includes\mla-plugin-loader.php" hash="a9524964c779b4fd40d40dad431cf4d1" package="Media Library Assistant">
2699
  <docblock line="2">
2700
  <description><![CDATA[Media Library Assistant Plugin Loader]]></description>
2701
  <long-description><![CDATA[<p>Defines constants and loads all of the classes and functions required to run the plugin.
@@ -2715,13 +3227,16 @@ This file is only loaded if the naming conflict tests in index.php are passed.</
2715
  <include line="42" type="Require Once" package="Media Library Assistant">
2716
  <name/>
2717
  </include>
2718
- <include line="49" type="Require Once" package="Media Library Assistant">
 
 
 
2719
  <name/>
2720
  </include>
2721
- <include line="56" type="Require Once" package="Media Library Assistant">
2722
  <name/>
2723
  </include>
2724
- <include line="61" type="Require Once" package="Media Library Assistant">
2725
  <name/>
2726
  </include>
2727
  <constant namespace="global" line="16" package="Media Library Assistant">
@@ -2734,13 +3249,13 @@ This file is only loaded if the naming conflict tests in index.php are passed.</
2734
  </docblock>
2735
  </constant>
2736
  </file>
2737
- <file path="index.php" hash="2dfe672594252372fc565786939779b5" package="Media Library Assistant">
2738
  <docblock line="2">
2739
  <description><![CDATA[Provides several enhancements to the handling of images and files held in the WordPress Media Library]]></description>
2740
  <long-description><![CDATA[<p>This file contains several tests for name conflicts with other plugins. Only if the tests are passed
2741
  will the rest of the plugin be loaded and run.</p>]]></long-description>
2742
  <tag line="2" name="package" description="Media Library Assistant"/>
2743
- <tag line="2" name="version" description="0.71"/>
2744
  </docblock>
2745
  <include line="103" type="Require Once" package="Media Library Assistant">
2746
  <name>includes/mla-plugin-loader.php</name>
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="3e2e35de11b00451187f449376db1faa" 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>
32
  </tag>
33
  </docblock>
34
  </property>
35
+ <property final="false" static="true" visibility="private" line="904" namespace="global" package="Media Library Assistant">
36
  <name>$galleries</name>
37
  <default><![CDATA[null]]></default>
38
+ <docblock line="886">
39
  <description><![CDATA[Objects containing [gallery] shortcodes]]></description>
40
  <long-description><![CDATA[<p>This array contains all of the objects containing one or more [gallery] shortcodes
41
  and array(s) of which attachments each [gallery] contains. The arrays are built once
47
  ['parent_type'] 'post' or 'page' or the custom post_type of the gallery parent,
48
  ['query'] contains a string with the arguments of the [gallery],
49
  ['results'] contains an array of post_ids for the objects in the gallery.</p>]]></long-description>
50
+ <tag line="886" name="since" description="0.70"/>
51
+ <tag line="886" name="var" description="" type="array">
52
  <type by_reference="false">array</type>
53
  </tag>
54
  </docblock>
55
  </property>
56
+ <property final="false" static="true" visibility="private" line="917" namespace="global" package="Media Library Assistant">
57
  <name>$mla_galleries</name>
58
  <default><![CDATA[null]]></default>
59
+ <docblock line="906">
60
  <description><![CDATA[Objects containing [mla_gallery] shortcodes]]></description>
61
  <long-description><![CDATA[<p>This array contains all of the objects containing one or more [mla_gallery] shortcodes
62
  and array(s) of which attachments each [mla_gallery] contains. The arrays are built once
63
  each page load and cached for subsequent calls.</p>]]></long-description>
64
+ <tag line="906" name="since" description="0.70"/>
65
+ <tag line="906" name="var" description="" type="array">
66
  <type by_reference="false">array</type>
67
  </tag>
68
  </docblock>
88
  <tag line="28" name="param" description="Complete path and name of the template file, option name or the raw template" type="string" variable="$source">
89
  <type by_reference="false">string</type>
90
  </tag>
91
+ <tag line="28" name="param" description="Optional type of template source; 'file' (default), 'option', 'string'" type="string" variable="$type">
92
  <type by_reference="false">string</type>
93
  </tag>
94
  <tag line="28" name="return" description="string for files that do not contain template divider comments, array for files containing template divider comments, false if file or option does not exist, NULL if file could not be loaded." type="string|array|false|NULL">
205
  <tag line="224" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$raw_request">
206
  <type by_reference="false">array</type>
207
  </tag>
208
+ <tag line="224" name="param" description="Optional number of rows (default 0) to skip over to reach desired page" type="int" variable="$offset">
209
  <type by_reference="false">int</type>
210
  </tag>
211
+ <tag line="224" name="param" description="Optional number of rows on each page (0 = all rows, default)" type="int" variable="$count">
212
  <type by_reference="false">int</type>
213
  </tag>
214
  <tag line="224" name="return" description="revised arguments suitable for WP_Query" type="array">
231
  <type/>
232
  </argument>
233
  </method>
234
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="455" package="Media Library Assistant">
235
  <name>_execute_list_table_query</name>
236
  <full_name>_execute_list_table_query</full_name>
237
+ <docblock line="446">
238
  <description><![CDATA[Add filters, run query, remove filters]]></description>
239
  <long-description><![CDATA[]]></long-description>
240
+ <tag line="446" name="since" description="0.30"/>
241
+ <tag line="446" 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="446" name="return" description="WP_Query object with query results" type="object">
245
  <type by_reference="false">object</type>
246
  </tag>
247
  </docblock>
248
+ <argument line="455">
249
  <name>$request</name>
250
  <default><![CDATA[]]></default>
251
  <type/>
252
  </argument>
253
  </method>
254
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="483" package="Media Library Assistant">
255
  <name>mla_query_posts_search_filter</name>
256
  <full_name>mla_query_posts_search_filter</full_name>
257
+ <docblock line="471">
258
  <description><![CDATA[Adds a keyword search to the WHERE clause, if required]]></description>
259
  <long-description><![CDATA[<p>Defined as public because it's a filter.</p>]]></long-description>
260
+ <tag line="471" name="since" description="0.60"/>
261
+ <tag line="471" name="param" description="query clause before modification" type="string" variable="$search_string">
262
  <type by_reference="false">string</type>
263
  </tag>
264
+ <tag line="471" name="param" description="WP_Query object" type="object" variable="$query_object">
265
  <type by_reference="false">object</type>
266
  </tag>
267
+ <tag line="471" name="return" description="query clause after keyword search addition" type="string">
268
  <type by_reference="false">string</type>
269
  </tag>
270
  </docblock>
271
+ <argument line="483">
272
  <name>$search_string</name>
273
  <default><![CDATA[]]></default>
274
  <type/>
275
  </argument>
276
+ <argument line="483">
277
  <name>$query_object</name>
278
  <default><![CDATA[]]></default>
279
  <type/>
280
  </argument>
281
  </method>
282
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="556" package="Media Library Assistant">
283
  <name>mla_query_posts_join_filter</name>
284
  <full_name>mla_query_posts_join_filter</full_name>
285
+ <docblock line="545">
286
  <description><![CDATA[Adds a JOIN clause, if required]]></description>
287
  <long-description><![CDATA[<p>Defined as public because it's a filter.</p>]]></long-description>
288
+ <tag line="545" name="since" description="0.30"/>
289
+ <tag line="545" name="param" description="query clause before modification" type="string" variable="$join_clause">
290
  <type by_reference="false">string</type>
291
  </tag>
292
+ <tag line="545" name="return" description="query clause after &quot;detached&quot; item modification" type="string">
293
  <type by_reference="false">string</type>
294
  </tag>
295
  </docblock>
296
+ <argument line="556">
297
  <name>$join_clause</name>
298
  <default><![CDATA[]]></default>
299
  <type/>
300
  </argument>
301
  </method>
302
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="585" package="Media Library Assistant">
303
  <name>mla_query_posts_where_filter</name>
304
  <full_name>mla_query_posts_where_filter</full_name>
305
+ <docblock line="573">
306
  <description><![CDATA[Adds a WHERE clause for detached items]]></description>
307
  <long-description><![CDATA[<p>Modeled after _edit_attachments_query_helper in wp-admin/post.php.
308
  Defined as public because it's a filter.</p>]]></long-description>
309
+ <tag line="573" name="since" description="0.1"/>
310
+ <tag line="573" name="param" description="query clause before modification" type="string" variable="$where_clause">
311
  <type by_reference="false">string</type>
312
  </tag>
313
+ <tag line="573" name="return" description="query clause after &quot;detached&quot; item modification" type="string">
314
  <type by_reference="false">string</type>
315
  </tag>
316
  </docblock>
317
+ <argument line="585">
318
  <name>$where_clause</name>
319
  <default><![CDATA[]]></default>
320
  <type/>
321
  </argument>
322
  </method>
323
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="606" package="Media Library Assistant">
324
  <name>mla_query_posts_orderby_filter</name>
325
  <full_name>mla_query_posts_orderby_filter</full_name>
326
+ <docblock line="594">
327
  <description><![CDATA[Adds a ORDERBY clause, if required]]></description>
328
  <long-description><![CDATA[<p>Expands the range of sort options because the logic in WP_Query is limited.
329
  Defined as public because it's a filter.</p>]]></long-description>
330
+ <tag line="594" name="since" description="0.30"/>
331
+ <tag line="594" name="param" description="query clause before modification" type="string" variable="$orderby_clause">
332
  <type by_reference="false">string</type>
333
  </tag>
334
+ <tag line="594" name="return" description="updated query clause" type="string">
335
  <type by_reference="false">string</type>
336
  </tag>
337
  </docblock>
338
+ <argument line="606">
339
  <name>$orderby_clause</name>
340
  <default><![CDATA[]]></default>
341
  <type/>
342
  </argument>
343
  </method>
344
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="655" package="Media Library Assistant">
345
  <name>mla_get_attachment_by_id</name>
346
  <full_name>mla_get_attachment_by_id</full_name>
347
+ <docblock line="644">
348
  <description><![CDATA[Retrieve an Attachment array given a $post_id]]></description>
349
  <long-description><![CDATA[<p>The (associative) array will contain every field that can be found in
350
  the posts and postmeta tables, and all references to the attachment.</p>]]></long-description>
351
+ <tag line="644" name="since" description="0.1"/>
352
+ <tag line="644" name="param" description="The ID of the attachment post" type="int" variable="$post_id">
353
  <type by_reference="false">int</type>
354
  </tag>
355
+ <tag line="644" name="return" description="NULL on failure else associative array" type="NULL|array">
356
  <type by_reference="false">NULL</type>
357
  <type by_reference="false">array</type>
358
  </tag>
359
  </docblock>
360
+ <argument line="655">
361
  <name>$post_id</name>
362
  <default><![CDATA[]]></default>
363
  <type/>
364
  </argument>
365
  </method>
366
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="704" package="Media Library Assistant">
367
  <name>mla_fetch_attachment_references</name>
368
  <full_name>mla_fetch_attachment_references</full_name>
369
+ <docblock line="691">
370
  <description><![CDATA[Find Featured Image and inserted image/link references to an attachment]]></description>
371
  <long-description><![CDATA[<p>Searches all post and page content to see if the attachment is used
372
  as a Featured Image or inserted in the post as an image or link.</p>]]></long-description>
373
+ <tag line="691" name="since" description="0.1"/>
374
+ <tag line="691" name="param" description="post ID of attachment" type="int" variable="$ID">
375
  <type by_reference="false">int</type>
376
  </tag>
377
+ <tag line="691" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent">
378
  <type by_reference="false">int</type>
379
  </tag>
380
+ <tag line="691" name="return" description="Reference information; see $references array comments" type="array">
381
  <type by_reference="false">array</type>
382
  </tag>
383
  </docblock>
384
+ <argument line="704">
385
  <name>$ID</name>
386
  <default><![CDATA[]]></default>
387
  <type/>
388
  </argument>
389
+ <argument line="704">
390
  <name>$parent</name>
391
  <default><![CDATA[]]></default>
392
  <type/>
393
  </argument>
394
  </method>
395
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="930" package="Media Library Assistant">
396
  <name>_build_mla_galleries</name>
397
  <full_name>_build_mla_galleries</full_name>
398
+ <docblock line="919">
399
  <description><![CDATA[Builds the $mla_galleries or $galleries array]]></description>
400
  <long-description><![CDATA[]]></long-description>
401
+ <tag line="919" name="since" description="0.70"/>
402
+ <tag line="919" name="param" description="by reference to the private static galleries array variable" type="array" variable="$galleries_array">
403
  <type by_reference="false">array</type>
404
  </tag>
405
+ <tag line="919" name="param" description="the shortcode to be searched for and processed" type="string" variable="$shortcode">
406
  <type by_reference="false">string</type>
407
  </tag>
408
+ <tag line="919" name="param" description="true to exclude revisions from the search" type="boolean" variable="$exclude_revisions">
409
  <type by_reference="false">boolean</type>
410
  </tag>
411
+ <tag line="919" name="return" description="true if the galleries array is not empty" type="boolean">
412
  <type by_reference="false">boolean</type>
413
  </tag>
414
  </docblock>
415
+ <argument line="930">
416
  <name>$galleries_array</name>
417
  <default><![CDATA[]]></default>
418
  <type/>
419
  </argument>
420
+ <argument line="930">
421
  <name>$shortcode</name>
422
  <default><![CDATA[]]></default>
423
  <type/>
424
  </argument>
425
+ <argument line="930">
426
  <name>$exclude_revisions</name>
427
  <default><![CDATA[]]></default>
428
  <type/>
429
  </argument>
430
  </method>
431
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1012" package="Media Library Assistant">
432
  <name>_search_mla_galleries</name>
433
  <full_name>_search_mla_galleries</full_name>
434
+ <docblock line="1001">
435
  <description><![CDATA[Search the $mla_galleries or $galleries array]]></description>
436
  <long-description><![CDATA[]]></long-description>
437
+ <tag line="1001" name="since" description="0.70"/>
438
+ <tag line="1001" name="param" description="by reference to the private static galleries array variable" type="array" variable="$galleries_array">
439
  <type by_reference="false">array</type>
440
  </tag>
441
+ <tag line="1001" name="param" description="the attachment ID to be searched for and processed" type="int" variable="$attachment_id">
442
  <type by_reference="false">int</type>
443
  </tag>
444
+ <tag line="1001" 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">
445
  <type by_reference="false">array</type>
446
  </tag>
447
  </docblock>
448
+ <argument line="1012">
449
  <name>$galleries_array</name>
450
  <default><![CDATA[]]></default>
451
  <type/>
452
  </argument>
453
+ <argument line="1012">
454
  <name>$attachment_id</name>
455
  <default><![CDATA[]]></default>
456
  <type/>
457
  </argument>
458
  </method>
459
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1034" package="Media Library Assistant">
460
+ <name>mla_fetch_attachment_parent_data</name>
461
+ <full_name>mla_fetch_attachment_parent_data</full_name>
462
+ <docblock line="1025">
463
  <description><![CDATA[Returns information about an attachment's parent, if found]]></description>
464
  <long-description><![CDATA[]]></long-description>
465
+ <tag line="1025" name="since" description="0.1"/>
466
+ <tag line="1025" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent_id">
467
  <type by_reference="false">int</type>
468
  </tag>
469
+ <tag line="1025" name="return" description="Parent information; post_date, post_title and post_type" type="array">
470
  <type by_reference="false">array</type>
471
  </tag>
472
  </docblock>
473
+ <argument line="1034">
474
  <name>$parent_id</name>
475
  <default><![CDATA[]]></default>
476
  <type/>
477
  </argument>
478
  </method>
479
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1062" package="Media Library Assistant">
480
+ <name>mla_fetch_attachment_metadata</name>
481
+ <full_name>mla_fetch_attachment_metadata</full_name>
482
+ <docblock line="1049">
483
  <description><![CDATA[Fetch and filter meta data for an attachment]]></description>
484
  <long-description><![CDATA[<p>Returns a filtered array of a post's meta data. Internal values beginning with '<em>'
485
  are stripped out or converted to an 'mla</em>' equivalent. Array data is replaced with
486
  a string containing the first array element.</p>]]></long-description>
487
+ <tag line="1049" name="since" description="0.1"/>
488
+ <tag line="1049" name="param" description="post ID of attachment" type="int" variable="$post_id">
489
  <type by_reference="false">int</type>
490
  </tag>
491
+ <tag line="1049" name="return" description="Meta data variables" type="array">
492
  <type by_reference="false">array</type>
493
  </tag>
494
  </docblock>
495
+ <argument line="1062">
496
  <name>$post_id</name>
497
  <default><![CDATA[]]></default>
498
  <type/>
499
  </argument>
500
  </method>
501
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1113" package="Media Library Assistant">
502
+ <name>mla_update_single_item</name>
503
+ <full_name>mla_update_single_item</full_name>
504
+ <docblock line="1100">
505
+ <description><![CDATA[Update a single item; change the meta data
506
+ for a single attachment.]]></description>
507
+ <long-description><![CDATA[]]></long-description>
508
+ <tag line="1100" name="since" description="0.1"/>
509
+ <tag line="1100" name="param" description="The ID of the attachment to be updated" type="int" variable="$post_id">
510
+ <type by_reference="false">int</type>
511
+ </tag>
512
+ <tag line="1100" name="param" description="Field name =&gt; value pairs" type="array" variable="$new_data">
513
+ <type by_reference="false">array</type>
514
+ </tag>
515
+ <tag line="1100" name="param" description="Optional taxonomy term values, default null" type="array" variable="$tax_input">
516
+ <type by_reference="false">array</type>
517
+ </tag>
518
+ <tag line="1100" name="param" description="Optional taxonomy actions (add, remove, replace), default null" type="array" variable="$tax_actions">
519
+ <type by_reference="false">array</type>
520
+ </tag>
521
+ <tag line="1100" name="return" description="success/failure message and NULL content" type="array">
522
+ <type by_reference="false">array</type>
523
+ </tag>
524
+ </docblock>
525
+ <argument line="1113">
526
+ <name>$post_id</name>
527
+ <default><![CDATA[]]></default>
528
+ <type/>
529
+ </argument>
530
+ <argument line="1113">
531
+ <name>$new_data</name>
532
+ <default><![CDATA[]]></default>
533
+ <type/>
534
+ </argument>
535
+ <argument line="1113">
536
+ <name>$tax_input</name>
537
+ <default><![CDATA[NULL]]></default>
538
+ <type/>
539
+ </argument>
540
+ <argument line="1113">
541
+ <name>$tax_actions</name>
542
+ <default><![CDATA[NULL]]></default>
543
+ <type/>
544
+ </argument>
545
+ </method>
546
  </class>
547
  </file>
548
+ <file path="includes\class-mla-edit-media.php" hash="b54afde032b42b5d2fbfdc62e3e592c1" package="Media Library Assistant">
549
+ <docblock line="2">
550
+ <description><![CDATA[Media Library Assistant Edit Media screen enhancements]]></description>
551
+ <long-description><![CDATA[]]></long-description>
552
+ <tag line="2" name="package" description="Media Library Assistant"/>
553
+ <tag line="2" name="since" description="0.80"/>
554
+ </docblock>
555
+ <class final="false" abstract="false" namespace="global" line="15" package="Media Library Assistant">
556
+ <extends/>
557
+ <name>MLAEdit</name>
558
+ <full_name>\MLAEdit</full_name>
559
+ <docblock line="9">
560
+ <description><![CDATA[Class MLA (Media Library Assistant) Edit contains meta boxes for the Edit Media (advanced-form-edit.php) screen]]></description>
561
+ <long-description><![CDATA[]]></long-description>
562
+ <tag line="9" name="package" description="Media Library Assistant"/>
563
+ <tag line="9" name="since" description="0.80"/>
564
+ </docblock>
565
+ <property final="false" static="true" visibility="private" line="96" namespace="global" package="Media Library Assistant">
566
+ <name>$mla_references</name>
567
+ <default><![CDATA[null]]></default>
568
+ <docblock line="86">
569
+ <description><![CDATA[Where-used values for the current item]]></description>
570
+ <long-description><![CDATA[<p>This array contains the Featured/Inserted/Gallery/MLA Gallery references for the item.
571
+ The array is built once each page load and cached for subsequent calls.</p>]]></long-description>
572
+ <tag line="86" name="since" description="0.80"/>
573
+ <tag line="86" name="var" description="" type="array">
574
+ <type by_reference="false">array</type>
575
+ </tag>
576
+ </docblock>
577
+ </property>
578
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="23" package="Media Library Assistant">
579
+ <name>initialize</name>
580
+ <full_name>initialize</full_name>
581
+ <docblock line="16">
582
+ <description><![CDATA[Initialization function, similar to __construct()]]></description>
583
+ <long-description><![CDATA[]]></long-description>
584
+ <tag line="16" name="since" description="0.80"/>
585
+ <tag line="16" name="return" description="" type="void">
586
+ <type by_reference="false">void</type>
587
+ </tag>
588
+ </docblock>
589
+ </method>
590
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="48" package="Media Library Assistant">
591
+ <name>mla_last_modified_action</name>
592
+ <full_name>mla_last_modified_action</full_name>
593
+ <docblock line="40">
594
+ <description><![CDATA[Adds Last Modified date to the Submit box on the Edit Media screen.]]></description>
595
+ <long-description><![CDATA[<p>Declared public because it is an action.</p>]]></long-description>
596
+ <tag line="40" name="since" description="0.80"/>
597
+ <tag line="40" name="return" description="echoes the HTML markup for the label and value" type="void">
598
+ <type by_reference="false">void</type>
599
+ </tag>
600
+ </docblock>
601
+ </method>
602
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="70" package="Media Library Assistant">
603
+ <name>mla_add_meta_boxes_action</name>
604
+ <full_name>mla_add_meta_boxes_action</full_name>
605
+ <docblock line="59">
606
+ <description><![CDATA[Registers meta boxes for the Edit Media screen.]]></description>
607
+ <long-description><![CDATA[<p>Declared public because it is an action.</p>]]></long-description>
608
+ <tag line="59" name="since" description="0.80"/>
609
+ <tag line="59" name="param" description="type of the current post, e.g., 'attachment'" type="string" variable="$post_type">
610
+ <type by_reference="false">string</type>
611
+ </tag>
612
+ <tag line="59" name="param" description="current post" type="object" variable="$post">
613
+ <type by_reference="false">object</type>
614
+ </tag>
615
+ <tag line="59" name="return" description="" type="void">
616
+ <type by_reference="false">void</type>
617
+ </tag>
618
+ </docblock>
619
+ <argument line="70">
620
+ <name>$post_type</name>
621
+ <default><![CDATA[]]></default>
622
+ <type/>
623
+ </argument>
624
+ <argument line="70">
625
+ <name>$post</name>
626
+ <default><![CDATA[]]></default>
627
+ <type/>
628
+ </argument>
629
+ </method>
630
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="108" package="Media Library Assistant">
631
+ <name>mla_parent_info_handler</name>
632
+ <full_name>mla_parent_info_handler</full_name>
633
+ <docblock line="98">
634
+ <description><![CDATA[Renders the Parent Info meta box on the Edit Media page.]]></description>
635
+ <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
636
+ <tag line="98" name="since" description="0.80"/>
637
+ <tag line="98" name="param" description="current post" type="object" variable="$post">
638
+ <type by_reference="false">object</type>
639
+ </tag>
640
+ <tag line="98" name="return" description="echoes the HTML markup for the meta box content" type="void">
641
+ <type by_reference="false">void</type>
642
+ </tag>
643
+ </docblock>
644
+ <argument line="108">
645
+ <name>$post</name>
646
+ <default><![CDATA[]]></default>
647
+ <type/>
648
+ </argument>
649
+ </method>
650
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="147" package="Media Library Assistant">
651
+ <name>mla_menu_order_handler</name>
652
+ <full_name>mla_menu_order_handler</full_name>
653
+ <docblock line="137">
654
+ <description><![CDATA[Renders the Menu Order meta box on the Edit Media page.]]></description>
655
+ <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
656
+ <tag line="137" name="since" description="0.80"/>
657
+ <tag line="137" name="param" description="current post" type="object" variable="$post">
658
+ <type by_reference="false">object</type>
659
+ </tag>
660
+ <tag line="137" name="return" description="echoes the HTML markup for the meta box content" type="void">
661
+ <type by_reference="false">void</type>
662
+ </tag>
663
+ </docblock>
664
+ <argument line="147">
665
+ <name>$post</name>
666
+ <default><![CDATA[]]></default>
667
+ <type/>
668
+ </argument>
669
+ </method>
670
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="162" package="Media Library Assistant">
671
+ <name>mla_image_metadata_handler</name>
672
+ <full_name>mla_image_metadata_handler</full_name>
673
+ <docblock line="152">
674
+ <description><![CDATA[Renders the Image Metadata meta box on the Edit Media page.]]></description>
675
+ <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
676
+ <tag line="152" name="since" description="0.80"/>
677
+ <tag line="152" name="param" description="current post" type="object" variable="$post">
678
+ <type by_reference="false">object</type>
679
+ </tag>
680
+ <tag line="152" name="return" description="echoes the HTML markup for the meta box content" type="void">
681
+ <type by_reference="false">void</type>
682
+ </tag>
683
+ </docblock>
684
+ <argument line="162">
685
+ <name>$post</name>
686
+ <default><![CDATA[]]></default>
687
+ <type/>
688
+ </argument>
689
+ </method>
690
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="183" package="Media Library Assistant">
691
+ <name>mla_featured_in_handler</name>
692
+ <full_name>mla_featured_in_handler</full_name>
693
+ <docblock line="173">
694
+ <description><![CDATA[Renders the Featured in meta box on the Edit Media page.]]></description>
695
+ <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
696
+ <tag line="173" name="since" description="0.80"/>
697
+ <tag line="173" name="param" description="current post" type="object" variable="$post">
698
+ <type by_reference="false">object</type>
699
+ </tag>
700
+ <tag line="173" name="return" description="echoes the HTML markup for the meta box content" type="void">
701
+ <type by_reference="false">void</type>
702
+ </tag>
703
+ </docblock>
704
+ <argument line="183">
705
+ <name>$post</name>
706
+ <default><![CDATA[]]></default>
707
+ <type/>
708
+ </argument>
709
+ </method>
710
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="213" package="Media Library Assistant">
711
+ <name>mla_inserted_in_handler</name>
712
+ <full_name>mla_inserted_in_handler</full_name>
713
+ <docblock line="203">
714
+ <description><![CDATA[Renders the Inserted in meta box on the Edit Media page.]]></description>
715
+ <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
716
+ <tag line="203" name="since" description="0.80"/>
717
+ <tag line="203" name="param" description="current post" type="object" variable="$post">
718
+ <type by_reference="false">object</type>
719
+ </tag>
720
+ <tag line="203" name="return" description="echoes the HTML markup for the meta box content" type="void">
721
+ <type by_reference="false">void</type>
722
+ </tag>
723
+ </docblock>
724
+ <argument line="213">
725
+ <name>$post</name>
726
+ <default><![CDATA[]]></default>
727
+ <type/>
728
+ </argument>
729
+ </method>
730
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="247" package="Media Library Assistant">
731
+ <name>mla_gallery_in_handler</name>
732
+ <full_name>mla_gallery_in_handler</full_name>
733
+ <docblock line="237">
734
+ <description><![CDATA[Renders the Gallery in meta box on the Edit Media page.]]></description>
735
+ <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
736
+ <tag line="237" name="since" description="0.80"/>
737
+ <tag line="237" name="param" description="current post" type="object" variable="$post">
738
+ <type by_reference="false">object</type>
739
+ </tag>
740
+ <tag line="237" name="return" description="echoes the HTML markup for the meta box content" type="void">
741
+ <type by_reference="false">void</type>
742
+ </tag>
743
+ </docblock>
744
+ <argument line="247">
745
+ <name>$post</name>
746
+ <default><![CDATA[]]></default>
747
+ <type/>
748
+ </argument>
749
+ </method>
750
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="277" package="Media Library Assistant">
751
+ <name>mla_mla_gallery_in_handler</name>
752
+ <full_name>mla_mla_gallery_in_handler</full_name>
753
+ <docblock line="267">
754
+ <description><![CDATA[Renders the Gallery in meta box on the Edit Media page.]]></description>
755
+ <long-description><![CDATA[<p>Declared public because it is a callback function.</p>]]></long-description>
756
+ <tag line="267" name="since" description="0.80"/>
757
+ <tag line="267" name="param" description="current post" type="object" variable="$post">
758
+ <type by_reference="false">object</type>
759
+ </tag>
760
+ <tag line="267" name="return" description="echoes the HTML markup for the meta box content" type="void">
761
+ <type by_reference="false">void</type>
762
+ </tag>
763
+ </docblock>
764
+ <argument line="277">
765
+ <name>$post</name>
766
+ <default><![CDATA[]]></default>
767
+ <type/>
768
+ </argument>
769
+ </method>
770
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="307" package="Media Library Assistant">
771
+ <name>mla_edit_attachment_action</name>
772
+ <full_name>mla_edit_attachment_action</full_name>
773
+ <docblock line="297">
774
+ <description><![CDATA[Saves updates from the Edit Media screen.]]></description>
775
+ <long-description><![CDATA[<p>Declared public because it is an action.</p>]]></long-description>
776
+ <tag line="297" name="since" description="0.80"/>
777
+ <tag line="297" name="param" description="ID of the current post" type="integer" variable="$post_ID">
778
+ <type by_reference="false">integer</type>
779
+ </tag>
780
+ <tag line="297" name="return" description="" type="void">
781
+ <type by_reference="false">void</type>
782
+ </tag>
783
+ </docblock>
784
+ <argument line="307">
785
+ <name>$post_ID</name>
786
+ <default><![CDATA[]]></default>
787
+ <type/>
788
+ </argument>
789
+ </method>
790
+ </class>
791
+ </file>
792
+ <file path="includes\class-mla-list-table.php" hash="56c374cfa428af7c5e8cf054e9c4ed43" package="Media Library Assistant">
793
  <docblock line="2">
794
  <description><![CDATA[Media Library Assistant extended List Table class]]></description>
795
  <long-description><![CDATA[]]></long-description>
1025
  </tag>
1026
  </docblock>
1027
  </method>
1028
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="406" package="Media Library Assistant">
1029
  <name>column_default</name>
1030
  <full_name>column_default</full_name>
1031
+ <docblock line="393">
1032
  <description><![CDATA[Supply a column value if no column-specific function has been defined]]></description>
1033
  <long-description><![CDATA[<p>Called when the parent class can't find a method specifically built for a
1034
  given column. The taxonomy columns are handled here. All other columns should
1035
  have a specific method, so this function returns a troubleshooting message.</p>]]></long-description>
1036
+ <tag line="393" name="since" description="0.1"/>
1037
+ <tag line="393" name="param" description="A singular item (one full row's worth of data)" type="array" variable="$item">
1038
  <type by_reference="false">array</type>
1039
  </tag>
1040
+ <tag line="393" name="param" description="The name/slug of the column to be processed" type="array" variable="$column_name">
1041
  <type by_reference="false">array</type>
1042
  </tag>
1043
+ <tag line="393" name="return" description="Text or HTML to be placed inside the column" type="string">
1044
  <type by_reference="false">string</type>
1045
  </tag>
1046
  </docblock>
1047
+ <argument line="406">
1048
  <name>$item</name>
1049
  <default><![CDATA[]]></default>
1050
  <type/>
1051
  </argument>
1052
+ <argument line="406">
1053
  <name>$column_name</name>
1054
  <default><![CDATA[]]></default>
1055
  <type/>
1056
  </argument>
1057
  </method>
1058
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="448" package="Media Library Assistant">
1059
  <name>column_cb</name>
1060
  <full_name>column_cb</full_name>
1061
+ <docblock line="439">
1062
  <description><![CDATA[Displays checkboxes for using bulk actions.]]></description>
1063
  <long-description><![CDATA[<p>The 'cb' column
1064
  is given special treatment when columns are processed.</p>]]></long-description>
1065
+ <tag line="439" name="since" description="0.1"/>
1066
+ <tag line="439" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1067
  <type by_reference="false">array</type>
1068
  </tag>
1069
+ <tag line="439" name="return" description="HTML markup to be placed inside the column" type="string">
1070
  <type by_reference="false">string</type>
1071
  </tag>
1072
  </docblock>
1073
+ <argument line="448">
1074
  <name>$item</name>
1075
  <default><![CDATA[]]></default>
1076
  <type/>
1077
  </argument>
1078
  </method>
1079
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="464" package="Media Library Assistant">
1080
  <name>column_icon</name>
1081
  <full_name>column_icon</full_name>
1082
+ <docblock line="456">
1083
  <description><![CDATA[Supply the content for a custom column]]></description>
1084
  <long-description><![CDATA[]]></long-description>
1085
+ <tag line="456" name="since" description="0.1"/>
1086
+ <tag line="456" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1087
  <type by_reference="false">array</type>
1088
  </tag>
1089
+ <tag line="456" name="return" description="HTML markup to be placed inside the column" type="string">
1090
  <type by_reference="false">string</type>
1091
  </tag>
1092
  </docblock>
1093
+ <argument line="464">
1094
  <name>$item</name>
1095
  <default><![CDATA[]]></default>
1096
  <type/>
1097
  </argument>
1098
  </method>
1099
+ <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="480" package="Media Library Assistant">
1100
  <name>_build_rollover_actions</name>
1101
  <full_name>_build_rollover_actions</full_name>
1102
+ <docblock line="469">
1103
  <description><![CDATA[Add rollover actions to exactly one of the following displayed columns:
1104
  'ID_parent', 'title_name', 'post_title', 'post_name']]></description>
1105
  <long-description><![CDATA[]]></long-description>
1106
+ <tag line="469" name="since" description="0.1"/>
1107
+ <tag line="469" name="param" description="A singular attachment (post) object" type="object" variable="$item">
1108
  <type by_reference="false">object</type>
1109
  </tag>
1110
+ <tag line="469" name="param" description="Current column name" type="string" variable="$column">
1111
  <type by_reference="false">string</type>
1112
  </tag>
1113
+ <tag line="469" name="return" description="Names and URLs of row-level actions" type="array">
1114
  <type by_reference="false">array</type>
1115
  </tag>
1116
  </docblock>
1117
+ <argument line="480">
1118
  <name>$item</name>
1119
  <default><![CDATA[]]></default>
1120
  <type/>
1121
  </argument>
1122
+ <argument line="480">
1123
  <name>$column</name>
1124
  <default><![CDATA[]]></default>
1125
  <type/>
1126
  </argument>
1127
  </method>
1128
+ <method final="false" abstract="false" static="false" visibility="private" namespace="global" line="558" package="Media Library Assistant">
1129
  <name>_build_inline_data</name>
1130
  <full_name>_build_inline_data</full_name>
1131
+ <docblock line="549">
1132
  <description><![CDATA[Add hidden fields with the data for use in the inline editor]]></description>
1133
  <long-description><![CDATA[]]></long-description>
1134
+ <tag line="549" name="since" description="0.20"/>
1135
+ <tag line="549" name="param" description="A singular attachment (post) object" type="object" variable="$item">
1136
  <type by_reference="false">object</type>
1137
  </tag>
1138
+ <tag line="549" name="return" description="HTML &lt;div&gt; with row data" type="string">
1139
  <type by_reference="false">string</type>
1140
  </tag>
1141
  </docblock>
1142
+ <argument line="558">
1143
  <name>$item</name>
1144
  <default><![CDATA[]]></default>
1145
  <type/>
1146
  </argument>
1147
  </method>
1148
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="599" package="Media Library Assistant">
1149
  <name>column_ID_parent</name>
1150
  <full_name>column_ID_parent</full_name>
1151
+ <docblock line="591">
1152
  <description><![CDATA[Supply the content for a custom column]]></description>
1153
  <long-description><![CDATA[]]></long-description>
1154
+ <tag line="591" name="since" description="0.1"/>
1155
+ <tag line="591" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1156
  <type by_reference="false">array</type>
1157
  </tag>
1158
+ <tag line="591" name="return" description="HTML markup to be placed inside the column" type="string">
1159
  <type by_reference="false">string</type>
1160
  </tag>
1161
  </docblock>
1162
+ <argument line="599">
1163
  <name>$item</name>
1164
  <default><![CDATA[]]></default>
1165
  <type/>
1166
  </argument>
1167
  </method>
1168
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="631" package="Media Library Assistant">
1169
  <name>column_title_name</name>
1170
  <full_name>column_title_name</full_name>
1171
+ <docblock line="623">
1172
  <description><![CDATA[Supply the content for a custom column]]></description>
1173
  <long-description><![CDATA[]]></long-description>
1174
+ <tag line="623" name="since" description="0.1"/>
1175
+ <tag line="623" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1176
  <type by_reference="false">array</type>
1177
  </tag>
1178
+ <tag line="623" name="return" description="HTML markup to be placed inside the column" type="string">
1179
  <type by_reference="false">string</type>
1180
  </tag>
1181
  </docblock>
1182
+ <argument line="631">
1183
  <name>$item</name>
1184
  <default><![CDATA[]]></default>
1185
  <type/>
1186
  </argument>
1187
  </method>
1188
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="666" package="Media Library Assistant">
1189
  <name>column_post_title</name>
1190
  <full_name>column_post_title</full_name>
1191
+ <docblock line="658">
1192
  <description><![CDATA[Supply the content for a custom column]]></description>
1193
  <long-description><![CDATA[]]></long-description>
1194
+ <tag line="658" name="since" description="0.1"/>
1195
+ <tag line="658" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1196
  <type by_reference="false">array</type>
1197
  </tag>
1198
+ <tag line="658" name="return" description="HTML markup to be placed inside the column" type="string">
1199
  <type by_reference="false">string</type>
1200
  </tag>
1201
  </docblock>
1202
+ <argument line="666">
1203
  <name>$item</name>
1204
  <default><![CDATA[]]></default>
1205
  <type/>
1206
  </argument>
1207
  </method>
1208
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="684" package="Media Library Assistant">
1209
  <name>column_post_name</name>
1210
  <full_name>column_post_name</full_name>
1211
+ <docblock line="676">
1212
  <description><![CDATA[Supply the content for a custom column]]></description>
1213
  <long-description><![CDATA[]]></long-description>
1214
+ <tag line="676" name="since" description="0.1"/>
1215
+ <tag line="676" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1216
  <type by_reference="false">array</type>
1217
  </tag>
1218
+ <tag line="676" name="return" description="HTML markup to be placed inside the column" type="string">
1219
  <type by_reference="false">string</type>
1220
  </tag>
1221
  </docblock>
1222
+ <argument line="684">
1223
  <name>$item</name>
1224
  <default><![CDATA[]]></default>
1225
  <type/>
1226
  </argument>
1227
  </method>
1228
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="702" package="Media Library Assistant">
1229
  <name>column_parent</name>
1230
  <full_name>column_parent</full_name>
1231
+ <docblock line="694">
1232
  <description><![CDATA[Supply the content for a custom column]]></description>
1233
  <long-description><![CDATA[]]></long-description>
1234
+ <tag line="694" name="since" description="0.1"/>
1235
+ <tag line="694" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1236
  <type by_reference="false">array</type>
1237
  </tag>
1238
+ <tag line="694" name="return" description="HTML markup to be placed inside the column" type="string">
1239
  <type by_reference="false">string</type>
1240
  </tag>
1241
  </docblock>
1242
+ <argument line="702">
1243
  <name>$item</name>
1244
  <default><![CDATA[]]></default>
1245
  <type/>
1246
  </argument>
1247
  </method>
1248
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="727" package="Media Library Assistant">
1249
  <name>column_menu_order</name>
1250
  <full_name>column_menu_order</full_name>
1251
+ <docblock line="719">
1252
  <description><![CDATA[Supply the content for a custom column]]></description>
1253
  <long-description><![CDATA[]]></long-description>
1254
+ <tag line="719" name="since" description="0.60"/>
1255
+ <tag line="719" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1256
  <type by_reference="false">array</type>
1257
  </tag>
1258
+ <tag line="719" name="return" description="HTML markup to be placed inside the column" type="string">
1259
  <type by_reference="false">string</type>
1260
  </tag>
1261
  </docblock>
1262
+ <argument line="727">
1263
  <name>$item</name>
1264
  <default><![CDATA[]]></default>
1265
  <type/>
1266
  </argument>
1267
  </method>
1268
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="739" package="Media Library Assistant">
1269
  <name>column_featured</name>
1270
  <full_name>column_featured</full_name>
1271
+ <docblock line="731">
1272
  <description><![CDATA[Supply the content for a custom column]]></description>
1273
  <long-description><![CDATA[]]></long-description>
1274
+ <tag line="731" name="since" description="0.1"/>
1275
+ <tag line="731" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1276
  <type by_reference="false">array</type>
1277
  </tag>
1278
+ <tag line="731" name="return" description="HTML markup to be placed inside the column" type="string">
1279
  <type by_reference="false">string</type>
1280
  </tag>
1281
  </docblock>
1282
+ <argument line="739">
1283
  <name>$item</name>
1284
  <default><![CDATA[]]></default>
1285
  <type/>
1286
  </argument>
1287
  </method>
1288
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="767" package="Media Library Assistant">
1289
  <name>column_inserted</name>
1290
  <full_name>column_inserted</full_name>
1291
+ <docblock line="759">
1292
  <description><![CDATA[Supply the content for a custom column]]></description>
1293
  <long-description><![CDATA[]]></long-description>
1294
+ <tag line="759" name="since" description="0.1"/>
1295
+ <tag line="759" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1296
  <type by_reference="false">array</type>
1297
  </tag>
1298
+ <tag line="759" name="return" description="HTML markup to be placed inside the column" type="string">
1299
  <type by_reference="false">string</type>
1300
  </tag>
1301
  </docblock>
1302
+ <argument line="767">
1303
  <name>$item</name>
1304
  <default><![CDATA[]]></default>
1305
  <type/>
1306
  </argument>
1307
  </method>
1308
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="799" package="Media Library Assistant">
1309
  <name>column_galleries</name>
1310
  <full_name>column_galleries</full_name>
1311
+ <docblock line="791">
1312
  <description><![CDATA[Supply the content for a custom column]]></description>
1313
  <long-description><![CDATA[]]></long-description>
1314
+ <tag line="791" name="since" description="0.70"/>
1315
+ <tag line="791" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1316
  <type by_reference="false">array</type>
1317
  </tag>
1318
+ <tag line="791" name="return" description="HTML markup to be placed inside the column" type="string">
1319
  <type by_reference="false">string</type>
1320
  </tag>
1321
  </docblock>
1322
+ <argument line="799">
1323
  <name>$item</name>
1324
  <default><![CDATA[]]></default>
1325
  <type/>
1326
  </argument>
1327
  </method>
1328
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="827" package="Media Library Assistant">
1329
  <name>column_mla_galleries</name>
1330
  <full_name>column_mla_galleries</full_name>
1331
+ <docblock line="819">
1332
  <description><![CDATA[Supply the content for a custom column]]></description>
1333
  <long-description><![CDATA[]]></long-description>
1334
+ <tag line="819" name="since" description="0.70"/>
1335
+ <tag line="819" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1336
  <type by_reference="false">array</type>
1337
  </tag>
1338
+ <tag line="819" name="return" description="HTML markup to be placed inside the column" type="string">
1339
  <type by_reference="false">string</type>
1340
  </tag>
1341
  </docblock>
1342
+ <argument line="827">
1343
  <name>$item</name>
1344
  <default><![CDATA[]]></default>
1345
  <type/>
1346
  </argument>
1347
  </method>
1348
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="855" package="Media Library Assistant">
1349
  <name>column_alt_text</name>
1350
  <full_name>column_alt_text</full_name>
1351
+ <docblock line="847">
1352
  <description><![CDATA[Supply the content for a custom column]]></description>
1353
  <long-description><![CDATA[]]></long-description>
1354
+ <tag line="847" name="since" description="0.1"/>
1355
+ <tag line="847" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1356
  <type by_reference="false">array</type>
1357
  </tag>
1358
+ <tag line="847" name="return" description="HTML markup to be placed inside the column" type="string">
1359
  <type by_reference="false">string</type>
1360
  </tag>
1361
  </docblock>
1362
+ <argument line="855">
1363
  <name>$item</name>
1364
  <default><![CDATA[]]></default>
1365
  <type/>
1366
  </argument>
1367
  </method>
1368
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="870" package="Media Library Assistant">
1369
  <name>column_caption</name>
1370
  <full_name>column_caption</full_name>
1371
+ <docblock line="862">
1372
  <description><![CDATA[Supply the content for a custom column]]></description>
1373
  <long-description><![CDATA[]]></long-description>
1374
+ <tag line="862" name="since" description="0.1"/>
1375
+ <tag line="862" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1376
  <type by_reference="false">array</type>
1377
  </tag>
1378
+ <tag line="862" name="return" description="HTML markup to be placed inside the column" type="string">
1379
  <type by_reference="false">string</type>
1380
  </tag>
1381
  </docblock>
1382
+ <argument line="870">
1383
  <name>$item</name>
1384
  <default><![CDATA[]]></default>
1385
  <type/>
1386
  </argument>
1387
  </method>
1388
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="882" package="Media Library Assistant">
1389
  <name>column_description</name>
1390
  <full_name>column_description</full_name>
1391
+ <docblock line="874">
1392
  <description><![CDATA[Supply the content for a custom column]]></description>
1393
  <long-description><![CDATA[]]></long-description>
1394
+ <tag line="874" name="since" description="0.1"/>
1395
+ <tag line="874" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1396
  <type by_reference="false">array</type>
1397
  </tag>
1398
+ <tag line="874" name="return" description="HTML markup to be placed inside the column" type="string">
1399
  <type by_reference="false">string</type>
1400
  </tag>
1401
  </docblock>
1402
+ <argument line="882">
1403
  <name>$item</name>
1404
  <default><![CDATA[]]></default>
1405
  <type/>
1406
  </argument>
1407
  </method>
1408
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="894" package="Media Library Assistant">
1409
  <name>column_post_mime_type</name>
1410
  <full_name>column_post_mime_type</full_name>
1411
+ <docblock line="886">
1412
  <description><![CDATA[Supply the content for a custom column]]></description>
1413
  <long-description><![CDATA[]]></long-description>
1414
+ <tag line="886" name="since" description="0.30"/>
1415
+ <tag line="886" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1416
  <type by_reference="false">array</type>
1417
  </tag>
1418
+ <tag line="886" name="return" description="HTML markup to be placed inside the column" type="string">
1419
  <type by_reference="false">string</type>
1420
  </tag>
1421
  </docblock>
1422
+ <argument line="894">
1423
  <name>$item</name>
1424
  <default><![CDATA[]]></default>
1425
  <type/>
1426
  </argument>
1427
  </method>
1428
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="906" package="Media Library Assistant">
1429
  <name>column_base_file</name>
1430
  <full_name>column_base_file</full_name>
1431
+ <docblock line="898">
1432
  <description><![CDATA[Supply the content for a custom column]]></description>
1433
  <long-description><![CDATA[]]></long-description>
1434
+ <tag line="898" name="since" description="0.1"/>
1435
+ <tag line="898" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1436
  <type by_reference="false">array</type>
1437
  </tag>
1438
+ <tag line="898" name="return" description="HTML markup to be placed inside the column" type="string">
1439
  <type by_reference="false">string</type>
1440
  </tag>
1441
  </docblock>
1442
+ <argument line="906">
1443
  <name>$item</name>
1444
  <default><![CDATA[]]></default>
1445
  <type/>
1446
  </argument>
1447
  </method>
1448
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="918" package="Media Library Assistant">
1449
  <name>column_date</name>
1450
  <full_name>column_date</full_name>
1451
+ <docblock line="910">
1452
  <description><![CDATA[Supply the content for a custom column]]></description>
1453
  <long-description><![CDATA[]]></long-description>
1454
+ <tag line="910" name="since" description="0.1"/>
1455
+ <tag line="910" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1456
  <type by_reference="false">array</type>
1457
  </tag>
1458
+ <tag line="910" name="return" description="HTML markup to be placed inside the column" type="string">
1459
  <type by_reference="false">string</type>
1460
  </tag>
1461
  </docblock>
1462
+ <argument line="918">
1463
  <name>$item</name>
1464
  <default><![CDATA[]]></default>
1465
  <type/>
1466
  </argument>
1467
  </method>
1468
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="947" package="Media Library Assistant">
1469
  <name>column_modified</name>
1470
  <full_name>column_modified</full_name>
1471
+ <docblock line="939">
1472
  <description><![CDATA[Supply the content for a custom column]]></description>
1473
  <long-description><![CDATA[]]></long-description>
1474
+ <tag line="939" name="since" description="0.30"/>
1475
+ <tag line="939" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1476
  <type by_reference="false">array</type>
1477
  </tag>
1478
+ <tag line="939" name="return" description="HTML markup to be placed inside the column" type="string">
1479
  <type by_reference="false">string</type>
1480
  </tag>
1481
  </docblock>
1482
+ <argument line="947">
1483
  <name>$item</name>
1484
  <default><![CDATA[]]></default>
1485
  <type/>
1486
  </argument>
1487
  </method>
1488
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="976" package="Media Library Assistant">
1489
  <name>column_author</name>
1490
  <full_name>column_author</full_name>
1491
+ <docblock line="968">
1492
  <description><![CDATA[Supply the content for a custom column]]></description>
1493
  <long-description><![CDATA[]]></long-description>
1494
+ <tag line="968" name="since" description="0.30"/>
1495
+ <tag line="968" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1496
  <type by_reference="false">array</type>
1497
  </tag>
1498
+ <tag line="968" name="return" description="HTML markup to be placed inside the column" type="string">
1499
  <type by_reference="false">string</type>
1500
  </tag>
1501
  </docblock>
1502
+ <argument line="976">
1503
  <name>$item</name>
1504
  <default><![CDATA[]]></default>
1505
  <type/>
1506
  </argument>
1507
  </method>
1508
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="997" package="Media Library Assistant">
1509
  <name>column_attached_to</name>
1510
  <full_name>column_attached_to</full_name>
1511
+ <docblock line="989">
1512
  <description><![CDATA[Supply the content for a custom column]]></description>
1513
  <long-description><![CDATA[]]></long-description>
1514
+ <tag line="989" name="since" description="0.1"/>
1515
+ <tag line="989" name="param" description="A singular attachment (post) object" type="array" variable="$item">
1516
  <type by_reference="false">array</type>
1517
  </tag>
1518
+ <tag line="989" name="return" description="HTML markup to be placed inside the column" type="string">
1519
  <type by_reference="false">string</type>
1520
  </tag>
1521
  </docblock>
1522
+ <argument line="997">
1523
  <name>$item</name>
1524
  <default><![CDATA[]]></default>
1525
  <type/>
1526
  </argument>
1527
  </method>
1528
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1026" package="Media Library Assistant">
1529
  <name>get_columns</name>
1530
  <full_name>get_columns</full_name>
1531
+ <docblock line="1019">
1532
  <description><![CDATA[This method dictates the table's columns and titles]]></description>
1533
  <long-description><![CDATA[]]></long-description>
1534
+ <tag line="1019" name="since" description="0.1"/>
1535
+ <tag line="1019" name="return" description="Column information: 'slugs'=&gt;'Visible Titles'" type="array">
1536
  <type by_reference="false">array</type>
1537
  </tag>
1538
  </docblock>
1539
  </method>
1540
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1038" package="Media Library Assistant">
1541
  <name>get_hidden_columns</name>
1542
  <full_name>get_hidden_columns</full_name>
1543
+ <docblock line="1030">
1544
  <description><![CDATA[Returns the list of currently hidden columns from a user option or
1545
  from default values if the option is not set]]></description>
1546
  <long-description><![CDATA[]]></long-description>
1547
+ <tag line="1030" name="since" description="0.1"/>
1548
+ <tag line="1030" name="return" description="Column information,e.g., array(0 =&gt; 'ID_parent, 1 =&gt; 'title_name')" type="array">
1549
  <type by_reference="false">array</type>
1550
  </tag>
1551
  </docblock>
1552
  </method>
1553
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1058" package="Media Library Assistant">
1554
  <name>get_sortable_columns</name>
1555
  <full_name>get_sortable_columns</full_name>
1556
+ <docblock line="1048">
1557
  <description><![CDATA[Returns an array where the key is the column that needs to be sortable
1558
  and the value is db column to sort by.]]></description>
1559
  <long-description><![CDATA[<p>Also notes the current sort column,
1560
  if set.</p>]]></long-description>
1561
+ <tag line="1048" name="since" description="0.1"/>
1562
+ <tag line="1048" name="return" description="Sortable column information,e.g., 'slugs'=&gt;array('data_values',boolean)" type="array">
1563
  <type by_reference="false">array</type>
1564
  </tag>
1565
  </docblock>
1566
  </method>
1567
+ <method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1085" package="Media Library Assistant">
1568
  <name>get_views</name>
1569
  <full_name>get_views</full_name>
1570
+ <docblock line="1077">
1571
  <description><![CDATA[Returns an associative array listing all the views that can be used with this table.]]></description>
1572
  <long-description><![CDATA[<p>These are listed across the top of the page and managed by WordPress.</p>]]></long-description>
1573
+ <tag line="1077" name="since" description="0.1"/>
1574
+ <tag line="1077" name="return" description="View information,e.g., array ( id =&gt; link )" type="array">
1575
  <type by_reference="false">array</type>
1576
  </tag>
1577
  </docblock>
1646
  </method>
1647
  </class>
1648
  </file>
1649
+ <file path="includes\class-mla-main.php" hash="67d1a10d670c324dff54fed0153155bb" package="Media Library Assistant">
1650
  <docblock line="2">
1651
  <description><![CDATA[Top-level functions for the Media Library Assistant]]></description>
1652
  <long-description><![CDATA[]]></long-description>
1683
  <constant namespace="global" line="41" package="Media Library Assistant">
1684
  <name>CURRENT_MLA_VERSION</name>
1685
  <full_name>CURRENT_MLA_VERSION</full_name>
1686
+ <value><![CDATA['0.80']]></value>
1687
  <docblock line="34">
1688
  <description><![CDATA[Current version number]]></description>
1689
  <long-description><![CDATA[]]></long-description>
2147
  <type/>
2148
  </argument>
2149
  </method>
2150
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1017" package="Media Library Assistant">
2151
  <name>_authors_dropdown</name>
2152
  <full_name>_authors_dropdown</full_name>
2153
+ <docblock line="1006">
2154
  <description><![CDATA[Get the edit Authors dropdown box, if user has suitable permissions]]></description>
2155
  <long-description><![CDATA[]]></long-description>
2156
+ <tag line="1006" name="since" description="0.20"/>
2157
+ <tag line="1006" name="param" description="Optional User ID of the current author, default 0" type="integer" variable="$author">
2158
  <type by_reference="false">integer</type>
2159
  </tag>
2160
+ <tag line="1006" name="param" description="Optional HTML name attribute, default 'post_author'" type="string" variable="$name">
2161
  <type by_reference="false">string</type>
2162
  </tag>
2163
+ <tag line="1006" name="param" description="Optional HTML class attribute, default 'authors'" type="string" variable="$class">
2164
  <type by_reference="false">string</type>
2165
  </tag>
2166
+ <tag line="1006" name="return" description="HTML markup for the dropdown field or False" type="string|false">
2167
  <type by_reference="false">string</type>
2168
  <type by_reference="false">false</type>
2169
  </tag>
2170
  </docblock>
2171
+ <argument line="1017">
2172
  <name>$author</name>
2173
  <default><![CDATA[0]]></default>
2174
  <type/>
2175
  </argument>
2176
+ <argument line="1017">
2177
  <name>$name</name>
2178
  <default><![CDATA['post_author']]></default>
2179
  <type/>
2180
  </argument>
2181
+ <argument line="1017">
2182
  <name>$class</name>
2183
  <default><![CDATA['authors']]></default>
2184
  <type/>
2185
  </argument>
2186
  </method>
2187
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1051" package="Media Library Assistant">
2188
  <name>_current_bulk_action</name>
2189
  <full_name>_current_bulk_action</full_name>
2190
+ <docblock line="1044">
2191
  <description><![CDATA[Get the current action selected from the bulk actions dropdown]]></description>
2192
  <long-description><![CDATA[]]></long-description>
2193
+ <tag line="1044" name="since" description="0.1"/>
2194
+ <tag line="1044" name="return" description="The action name or False if no action was selected" type="string|false">
2195
  <type by_reference="false">string</type>
2196
  <type by_reference="false">false</type>
2197
  </tag>
2198
  </docblock>
2199
  </method>
2200
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1081" package="Media Library Assistant">
2201
  <name>_delete_single_item</name>
2202
  <full_name>_delete_single_item</full_name>
2203
+ <docblock line="1072">
2204
  <description><![CDATA[Delete a single item permanently]]></description>
2205
  <long-description><![CDATA[]]></long-description>
2206
+ <tag line="1072" name="since" description="0.1"/>
2207
+ <tag line="1072" name="param" description="The form POST data" type="array" variable="$post_id">
2208
  <type by_reference="false">array</type>
2209
  </tag>
2210
+ <tag line="1072" name="return" description="success/failure message and NULL content" type="array">
2211
  <type by_reference="false">array</type>
2212
  </tag>
2213
  </docblock>
2214
+ <argument line="1081">
2215
  <name>$post_id</name>
2216
  <default><![CDATA[]]></default>
2217
  <type/>
2218
  </argument>
2219
  </method>
2220
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1110" package="Media Library Assistant">
2221
  <name>_display_single_item</name>
2222
  <full_name>_display_single_item</full_name>
2223
+ <docblock line="1100">
2224
  <description><![CDATA[Display a single item sub page; prepare the form to
2225
  change the meta data for a single attachment.]]></description>
2226
  <long-description><![CDATA[]]></long-description>
2227
+ <tag line="1100" name="since" description="0.1"/>
2228
+ <tag line="1100" name="param" description="The WordPress Post ID of the attachment item" type="int" variable="$post_id">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2229
  <type by_reference="false">int</type>
2230
  </tag>
2231
+ <tag line="1100" name="return" description="message and/or HTML content" type="array">
 
 
 
 
 
 
 
 
 
2232
  <type by_reference="false">array</type>
2233
  </tag>
2234
  </docblock>
2235
+ <argument line="1110">
2236
  <name>$post_id</name>
2237
  <default><![CDATA[]]></default>
2238
  <type/>
2239
  </argument>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2240
  </method>
2241
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1351" package="Media Library Assistant">
2242
  <name>_remove_tags</name>
2243
  <full_name>_remove_tags</full_name>
2244
+ <docblock line="1340">
2245
  <description><![CDATA[Remove tags from a term ids list]]></description>
2246
  <long-description><![CDATA[]]></long-description>
2247
+ <tag line="1340" name="since" description="0.40"/>
2248
+ <tag line="1340" name="param" description="The term ids currently assigned" type="array" variable="$terms_before">
2249
  <type by_reference="false">array</type>
2250
  </tag>
2251
+ <tag line="1340" name="param" description="| string The term ids (array) or names (string) to remove" type="array" variable="$tags">
2252
  <type by_reference="false">array</type>
2253
  </tag>
2254
+ <tag line="1340" name="param" description="The taxonomy object" type="object" variable="$taxonomy_obj">
2255
  <type by_reference="false">object</type>
2256
  </tag>
2257
+ <tag line="1340" name="return" description="Term ids of the surviving tags" type="array">
2258
  <type by_reference="false">array</type>
2259
  </tag>
2260
  </docblock>
2261
+ <argument line="1351">
2262
  <name>$terms_before</name>
2263
  <default><![CDATA[]]></default>
2264
  <type/>
2265
  </argument>
2266
+ <argument line="1351">
2267
  <name>$tags</name>
2268
  <default><![CDATA[]]></default>
2269
  <type/>
2270
  </argument>
2271
+ <argument line="1351">
2272
  <name>$taxonomy_obj</name>
2273
  <default><![CDATA[]]></default>
2274
  <type/>
2275
  </argument>
2276
  </method>
2277
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1393" package="Media Library Assistant">
2278
  <name>_restore_single_item</name>
2279
  <full_name>_restore_single_item</full_name>
2280
+ <docblock line="1384">
2281
  <description><![CDATA[Restore a single item from the Trash]]></description>
2282
  <long-description><![CDATA[]]></long-description>
2283
+ <tag line="1384" name="since" description="0.1"/>
2284
+ <tag line="1384" name="param" description="The form POST data" type="array" variable="$post_id">
2285
  <type by_reference="false">array</type>
2286
  </tag>
2287
+ <tag line="1384" name="return" description="success/failure message and NULL content" type="array">
2288
  <type by_reference="false">array</type>
2289
  </tag>
2290
  </docblock>
2291
+ <argument line="1393">
2292
  <name>$post_id</name>
2293
  <default><![CDATA[]]></default>
2294
  <type/>
2295
  </argument>
2296
  </method>
2297
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1429" package="Media Library Assistant">
2298
  <name>_trash_single_item</name>
2299
  <full_name>_trash_single_item</full_name>
2300
+ <docblock line="1420">
2301
  <description><![CDATA[Move a single item to Trash]]></description>
2302
  <long-description><![CDATA[]]></long-description>
2303
+ <tag line="1420" name="since" description="0.1"/>
2304
+ <tag line="1420" name="param" description="The form POST data" type="array" variable="$post_id">
2305
  <type by_reference="false">array</type>
2306
  </tag>
2307
+ <tag line="1420" name="return" description="success/failure message and NULL content" type="array">
2308
  <type by_reference="false">array</type>
2309
  </tag>
2310
  </docblock>
2311
+ <argument line="1429">
2312
  <name>$post_id</name>
2313
  <default><![CDATA[]]></default>
2314
  <type/>
2316
  </method>
2317
  </class>
2318
  </file>
2319
+ <file path="includes\class-mla-objects.php" hash="c571d4b2d34bcbb60ee67b25ab36534d" package="Media Library Assistant">
2320
  <docblock line="2">
2321
  <description><![CDATA[Media Library Assistant Custom Taxonomy and Post Type objects]]></description>
2322
  <long-description><![CDATA[]]></long-description>
2345
  </tag>
2346
  </docblock>
2347
  </method>
2348
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="34" package="Media Library Assistant">
2349
  <name>_build_taxonomies</name>
2350
  <full_name>_build_taxonomies</full_name>
2351
+ <docblock line="27">
2352
  <description><![CDATA[Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters]]></description>
2353
  <long-description><![CDATA[]]></long-description>
2354
+ <tag line="27" name="since" description="0.1"/>
2355
+ <tag line="27" name="return" description="" type="void">
2356
  <type by_reference="false">void</type>
2357
  </tag>
2358
  </docblock>
2359
  </method>
2360
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="112" package="Media Library Assistant">
2361
  <name>mla_taxonomy_get_columns_filter</name>
2362
  <full_name>mla_taxonomy_get_columns_filter</full_name>
2363
+ <docblock line="102">
2364
  <description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
2365
  which replaces the "Posts" column with an equivalent "Attachments" column.]]></description>
2366
  <long-description><![CDATA[]]></long-description>
2367
+ <tag line="102" name="since" description="0.30"/>
2368
+ <tag line="102" name="param" description="column definitions for the edit taxonomy list table" type="array" variable="$columns">
2369
  <type by_reference="false">array</type>
2370
  </tag>
2371
+ <tag line="102" name="return" description="updated column definitions for the edit taxonomy list table" type="array">
2372
  <type by_reference="false">array</type>
2373
  </tag>
2374
  </docblock>
2375
+ <argument line="112">
2376
  <name>$columns</name>
2377
  <default><![CDATA[]]></default>
2378
  <type/>
2379
  </argument>
2380
  </method>
2381
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="138" package="Media Library Assistant">
2382
  <name>mla_taxonomy_column_filter</name>
2383
  <full_name>mla_taxonomy_column_filter</full_name>
2384
+ <docblock line="125">
2385
  <description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
2386
  which returns a count of the attachments assigned a given term]]></description>
2387
  <long-description><![CDATA[]]></long-description>
2388
+ <tag line="125" name="since" description="0.30"/>
2389
+ <tag line="125" name="param" description="current column value; always ''" type="string" variable="$place_holder">
2390
  <type by_reference="false">string</type>
2391
  </tag>
2392
+ <tag line="125" name="param" description="name of the column" type="array" variable="$column_name">
2393
  <type by_reference="false">array</type>
2394
  </tag>
2395
+ <tag line="125" name="param" description="ID of the term for which the count is desired" type="array" variable="$term_id">
2396
  <type by_reference="false">array</type>
2397
  </tag>
2398
+ <tag line="125" 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">
2399
  <type by_reference="false">array</type>
2400
  </tag>
2401
  </docblock>
2402
+ <argument line="138">
2403
  <name>$place_holder</name>
2404
  <default><![CDATA[]]></default>
2405
  <type/>
2406
  </argument>
2407
+ <argument line="138">
2408
  <name>$column_name</name>
2409
  <default><![CDATA[]]></default>
2410
  <type/>
2411
  </argument>
2412
+ <argument line="138">
2413
  <name>$term_id</name>
2414
  <default><![CDATA[]]></default>
2415
  <type/>
2417
  </method>
2418
  </class>
2419
  </file>
2420
+ <file path="includes\class-mla-settings.php" hash="8a10e64bb55bb4db8049d532fe9b8d39" package="Media Library Assistant">
2421
  <docblock line="2">
2422
  <description><![CDATA[Manages the plugin option settings and provides the settings page to edit them]]></description>
2423
  <long-description><![CDATA[]]></long-description>
2474
  </tag>
2475
  </docblock>
2476
  </property>
2477
+ <property final="false" static="true" visibility="private" line="66" namespace="global" package="Media Library Assistant">
2478
  <name>$mla_options</name>
2479
+ <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.'), '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.<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' => '_taxonomy_handler', 'update' => '_taxonomy_handler', 'delete' => '_taxonomy_handler', 'reset' => '_taxonomy_handler'), '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('title_name'), 'texts' => array('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.'), 'style_templates' => array('tab' => '', 'type' => 'hidden', 'std' => array()), 'markup_templates' => array('tab' => '', 'type' => 'hidden', 'std' => array()))]]></default>
2480
  <docblock line="41">
2481
  <description><![CDATA[$mla_options defines the database options and admin page areas for setting/updating them.]]></description>
2482
  <long-description><![CDATA[<p>Each option is defined by an array with the following elements:</p>
2483
 
2484
  <p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
2485
 
2486
+ <p>tab => Settings page tab id for the option
2487
+ name => admin page label or heading text
2488
  type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
2489
  std => default value
2490
  help => help text
2494
  options => array of radio or select option values
2495
  texts => array of radio or select option display texts
2496
  render => rendering function for 'custom' options. Usage:
2497
+ $options_list .= ['render']( 'render', $key, $value );
2498
  update => update function for 'custom' options; returns nothing. Usage:
2499
  $message = ['update']( 'update', $key, $value, $_REQUEST );
2500
  delete => delete function for 'custom' options; returns nothing. Usage:
2503
  $message = ['reset']( 'reset', $key, $value, $_REQUEST );</p>]]></long-description>
2504
  </docblock>
2505
  </property>
2506
+ <property final="false" static="true" visibility="private" line="363" namespace="global" package="Media Library Assistant">
2507
+ <name>$mla_template_array</name>
2508
+ <default><![CDATA[null]]></default>
2509
+ <docblock line="356">
2510
+ <description><![CDATA[Style and Markup templates]]></description>
2511
+ <long-description><![CDATA[]]></long-description>
2512
+ <tag line="356" name="since" description="0.80"/>
2513
+ <tag line="356" name="var" description="" type="array">
2514
+ <type by_reference="false">array</type>
2515
+ </tag>
2516
+ </docblock>
2517
+ </property>
2518
+ <property final="false" static="true" visibility="private" line="815" namespace="global" package="Media Library Assistant">
2519
+ <name>$page_template_array</name>
2520
+ <default><![CDATA[null]]></default>
2521
+ <docblock line="805">
2522
+ <description><![CDATA[Template file for the Settings page(s) and parts]]></description>
2523
+ <long-description><![CDATA[<p>This array contains all of the template parts for the Settings page(s). The array is built once
2524
+ each page load and cached for subsequent use.</p>]]></long-description>
2525
+ <tag line="805" name="since" description="0.80"/>
2526
+ <tag line="805" name="var" description="" type="array">
2527
+ <type by_reference="false">array</type>
2528
+ </tag>
2529
+ </docblock>
2530
+ </property>
2531
+ <property final="false" static="true" visibility="private" line="831" namespace="global" package="Media Library Assistant">
2532
+ <name>$mla_tablist</name>
2533
+ <default><![CDATA[array('general' => array('title' => 'General', 'render' => '_compose_general_tab'), 'mla-gallery' => array('title' => 'MLA Gallery', 'render' => '_compose_mla_gallery_tab'), 'documentation' => array('title' => 'Documentation', 'render' => '_compose_documentation_tab'))]]></default>
2534
+ <docblock line="817">
2535
+ <description><![CDATA[Definitions for Settings page tab ids, titles and handlers
2536
+ Each tab is defined by an array with the following elements:]]></description>
2537
+ <long-description><![CDATA[<p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
2538
+
2539
+ <p>title => tab label / heading text
2540
+ render => rendering function for tab messages and content. Usage:
2541
+ $tab_content = <a href="">'render'</a>;</p>]]></long-description>
2542
+ <tag line="817" name="since" description="0.80"/>
2543
+ <tag line="817" name="var" description="" type="array">
2544
+ <type by_reference="false">array</type>
2545
+ </tag>
2546
+ </docblock>
2547
+ </property>
2548
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="198" package="Media Library Assistant">
2549
  <name>initialize</name>
2550
  <full_name>initialize</full_name>
2551
+ <docblock line="191">
2552
  <description><![CDATA[Initialization function, similar to __construct()]]></description>
2553
  <long-description><![CDATA[]]></long-description>
2554
+ <tag line="191" name="since" description="0.1"/>
2555
+ <tag line="191" name="return" description="" type="void">
2556
  <type by_reference="false">void</type>
2557
  </tag>
2558
  </docblock>
2559
  </method>
2560
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="215" package="Media Library Assistant">
2561
  <name>_version_upgrade</name>
2562
  <full_name>_version_upgrade</full_name>
2563
+ <docblock line="208">
2564
  <description><![CDATA[Database and option update check, for installing new versions]]></description>
2565
  <long-description><![CDATA[]]></long-description>
2566
+ <tag line="208" name="since" description="0.30"/>
2567
+ <tag line="208" name="return" description="" type="void">
2568
  <type by_reference="false">void</type>
2569
  </tag>
2570
  </docblock>
2571
  </method>
2572
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="257" package="Media Library Assistant">
2573
  <name>_create_alt_text_view</name>
2574
  <full_name>_create_alt_text_view</full_name>
2575
+ <docblock line="247">
2576
  <description><![CDATA[Add a view to the database to support sorting the listing on 'ALT Text']]></description>
2577
  <long-description><![CDATA[<p>This function is called on each plugin invocation because the plugin upgrade process
2578
  does not call the activation hook.</p>]]></long-description>
2579
+ <tag line="247" name="since" description="0.50"/>
2580
+ <tag line="247" name="return" description="" type="void">
2581
  <type by_reference="false">void</type>
2582
  </tag>
2583
  </docblock>
2584
  </method>
2585
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="289" package="Media Library Assistant">
2586
  <name>mla_activation_hook</name>
2587
  <full_name>mla_activation_hook</full_name>
2588
+ <docblock line="280">
2589
  <description><![CDATA[Perform one-time actions on plugin activation]]></description>
2590
  <long-description><![CDATA[<p>Adds a view to the database to support sorting the listing on 'ALT Text'.</p>]]></long-description>
2591
+ <tag line="280" name="since" description="0.40"/>
2592
+ <tag line="280" name="return" description="" type="void">
2593
  <type by_reference="false">void</type>
2594
  </tag>
2595
  </docblock>
2596
  </method>
2597
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="302" package="Media Library Assistant">
2598
  <name>mla_deactivation_hook</name>
2599
  <full_name>mla_deactivation_hook</full_name>
2600
+ <docblock line="293">
2601
  <description><![CDATA[Perform one-time actions on plugin deactivation]]></description>
2602
  <long-description><![CDATA[<p>Removes a view from the database that supports sorting the listing on 'ALT Text'.</p>]]></long-description>
2603
+ <tag line="293" name="since" description="0.40"/>
2604
+ <tag line="293" name="return" description="" type="void">
2605
  <type by_reference="false">void</type>
2606
  </tag>
2607
  </docblock>
2608
  </method>
2609
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="329" package="Media Library Assistant">
2610
  <name>mla_admin_menu_action</name>
2611
  <full_name>mla_admin_menu_action</full_name>
2612
+ <docblock line="321">
2613
  <description><![CDATA[Add settings page in the "Settings" section,
2614
  add settings link in the Plugins section entry for MLA.]]></description>
2615
  <long-description><![CDATA[]]></long-description>
2616
+ <tag line="321" name="since" description="0.1"/>
2617
+ <tag line="321" name="return" description="" type="void">
2618
  <type by_reference="false">void</type>
2619
  </tag>
2620
  </docblock>
2621
  </method>
2622
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="347" package="Media Library Assistant">
2623
  <name>mla_add_plugin_settings_link</name>
2624
  <full_name>mla_add_plugin_settings_link</full_name>
2625
+ <docblock line="337">
2626
  <description><![CDATA[Add the "Settings" link to the MLA entry in the Plugins section]]></description>
2627
  <long-description><![CDATA[]]></long-description>
2628
+ <tag line="337" name="since" description="0.1"/>
2629
+ <tag line="337" name="param" description="array of links for the Plugin, e.g., &quot;Activate&quot;" type="array" variable="$links">
2630
  <type by_reference="false">array</type>
2631
  </tag>
2632
+ <tag line="337" name="param" description="Directory and name of the plugin Index file" type="string" variable="$file">
2633
  <type by_reference="false">string</type>
2634
  </tag>
2635
+ <tag line="337" name="return" description="Updated array of links for the Plugin" type="array">
2636
  <type by_reference="false">array</type>
2637
  </tag>
2638
  </docblock>
2639
+ <argument line="347">
2640
  <name>$links</name>
2641
  <default><![CDATA[]]></default>
2642
  <type/>
2643
  </argument>
2644
+ <argument line="347">
2645
  <name>$file</name>
2646
  <default><![CDATA[]]></default>
2647
  <type/>
2648
  </argument>
2649
  </method>
2650
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="372" package="Media Library Assistant">
2651
+ <name>_load_templates</name>
2652
+ <full_name>_load_templates</full_name>
2653
+ <docblock line="365">
2654
+ <description><![CDATA[Load style and markup templates to $mla_templates]]></description>
2655
+ <long-description><![CDATA[]]></long-description>
2656
+ <tag line="365" name="since" description="0.80"/>
2657
+ <tag line="365" name="return" description="" type="void">
2658
+ <type by_reference="false">void</type>
2659
+ </tag>
2660
+ </docblock>
2661
+ </method>
2662
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="420" package="Media Library Assistant">
2663
+ <name>mla_fetch_gallery_template</name>
2664
+ <full_name>mla_fetch_gallery_template</full_name>
2665
+ <docblock line="410">
2666
+ <description><![CDATA[Fetch style or markup template from $mla_templates]]></description>
2667
+ <long-description><![CDATA[]]></long-description>
2668
+ <tag line="410" name="since" description="0.80"/>
2669
+ <tag line="410" name="param" description="Template name" type="string" variable="$key">
2670
+ <type by_reference="false">string</type>
2671
+ </tag>
2672
+ <tag line="410" name="param" description="Template type; 'style' (default) or 'markup'" type="string" variable="$type">
2673
+ <type by_reference="false">string</type>
2674
+ </tag>
2675
+ <tag line="410" name="return" description="requested template, false if not found or null if no templates" type="string|boolean|null">
2676
+ <type by_reference="false">string</type>
2677
+ <type by_reference="false">boolean</type>
2678
+ <type by_reference="false">null</type>
2679
+ </tag>
2680
+ </docblock>
2681
+ <argument line="420">
2682
+ <name>$key</name>
2683
+ <default><![CDATA[]]></default>
2684
+ <type/>
2685
+ </argument>
2686
+ <argument line="420">
2687
+ <name>$type</name>
2688
+ <default><![CDATA['style']]></default>
2689
+ <type/>
2690
+ </argument>
2691
+ </method>
2692
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="442" package="Media Library Assistant">
2693
+ <name>_get_style_templates</name>
2694
+ <full_name>_get_style_templates</full_name>
2695
+ <docblock line="435">
2696
+ <description><![CDATA[Get ALL style templates from $mla_templates, including 'default']]></description>
2697
+ <long-description><![CDATA[]]></long-description>
2698
+ <tag line="435" name="since" description="0.80"/>
2699
+ <tag line="435" name="return" description="name =&gt; value for all style templates or null if no templates" type="array|null">
2700
+ <type by_reference="false">array</type>
2701
+ <type by_reference="false">null</type>
2702
+ </tag>
2703
+ </docblock>
2704
+ </method>
2705
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="468" package="Media Library Assistant">
2706
+ <name>_put_style_templates</name>
2707
+ <full_name>_put_style_templates</full_name>
2708
+ <docblock line="460">
2709
+ <description><![CDATA[Put user-defined style templates to $mla_templates and database]]></description>
2710
+ <long-description><![CDATA[]]></long-description>
2711
+ <tag line="460" name="since" description="0.80"/>
2712
+ <tag line="460" name="param" description="name =&gt; value for all user-defined style templates" type="array" variable="$templates">
2713
+ <type by_reference="false">array</type>
2714
+ </tag>
2715
+ <tag line="460" name="return" description="true if success, false if failure" type="boolean">
2716
+ <type by_reference="false">boolean</type>
2717
+ </tag>
2718
+ </docblock>
2719
+ <argument line="468">
2720
+ <name>$templates</name>
2721
+ <default><![CDATA[]]></default>
2722
+ <type/>
2723
+ </argument>
2724
+ </method>
2725
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="484" package="Media Library Assistant">
2726
+ <name>_get_markup_templates</name>
2727
+ <full_name>_get_markup_templates</full_name>
2728
+ <docblock line="477">
2729
+ <description><![CDATA[Get ALL markup templates from $mla_templates, including 'default']]></description>
2730
+ <long-description><![CDATA[]]></long-description>
2731
+ <tag line="477" name="since" description="0.80"/>
2732
+ <tag line="477" name="return" description="name =&gt; value for all markup templates or null if no templates" type="array|null">
2733
+ <type by_reference="false">array</type>
2734
+ <type by_reference="false">null</type>
2735
+ </tag>
2736
+ </docblock>
2737
+ </method>
2738
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="538" package="Media Library Assistant">
2739
+ <name>_put_markup_templates</name>
2740
+ <full_name>_put_markup_templates</full_name>
2741
+ <docblock line="530">
2742
+ <description><![CDATA[Put user-defined markup templates to $mla_templates and database]]></description>
2743
+ <long-description><![CDATA[]]></long-description>
2744
+ <tag line="530" name="since" description="0.80"/>
2745
+ <tag line="530" name="param" description="name =&gt; value for all user-defined markup templates" type="array" variable="$templates">
2746
+ <type by_reference="false">array</type>
2747
+ </tag>
2748
+ <tag line="530" name="return" description="true if success, false if failure" type="boolean">
2749
+ <type by_reference="false">boolean</type>
2750
+ </tag>
2751
+ </docblock>
2752
+ <argument line="538">
2753
+ <name>$templates</name>
2754
+ <default><![CDATA[]]></default>
2755
+ <type/>
2756
+ </argument>
2757
+ </method>
2758
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="556" package="Media Library Assistant">
2759
  <name>mla_get_option</name>
2760
  <full_name>mla_get_option</full_name>
2761
+ <docblock line="547">
2762
  <description><![CDATA[Return the stored value or default value of a defined MLA option]]></description>
2763
  <long-description><![CDATA[]]></long-description>
2764
+ <tag line="547" name="since" description="0.1"/>
2765
+ <tag line="547" name="param" description="Name of the desired option" type="string" variable="$option">
2766
  <type by_reference="false">string</type>
2767
  </tag>
2768
+ <tag line="547" name="return" description="Value(s) for the option or false if the option is not a defined MLA option" type="mixed">
2769
  <type by_reference="false">mixed</type>
2770
  </tag>
2771
  </docblock>
2772
+ <argument line="556">
2773
  <name>$option</name>
2774
  <default><![CDATA[]]></default>
2775
  <type/>
2776
  </argument>
2777
  </method>
2778
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="577" package="Media Library Assistant">
2779
  <name>mla_update_option</name>
2780
  <full_name>mla_update_option</full_name>
2781
+ <docblock line="567">
2782
  <description><![CDATA[Add or update the stored value of a defined MLA option]]></description>
2783
  <long-description><![CDATA[]]></long-description>
2784
+ <tag line="567" name="since" description="0.1"/>
2785
+ <tag line="567" name="param" description="Name of the desired option" type="string" variable="$option">
2786
  <type by_reference="false">string</type>
2787
  </tag>
2788
+ <tag line="567" name="param" description="New value for the desired option" type="mixed" variable="$newvalue">
2789
  <type by_reference="false">mixed</type>
2790
  </tag>
2791
+ <tag line="567" name="return" description="True if the value was changed or false if the update failed" type="boolean">
2792
  <type by_reference="false">boolean</type>
2793
  </tag>
2794
  </docblock>
2795
+ <argument line="577">
2796
  <name>$option</name>
2797
  <default><![CDATA[]]></default>
2798
  <type/>
2799
  </argument>
2800
+ <argument line="577">
2801
  <name>$newvalue</name>
2802
  <default><![CDATA[]]></default>
2803
  <type/>
2804
  </argument>
2805
  </method>
2806
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="593" package="Media Library Assistant">
2807
  <name>mla_delete_option</name>
2808
  <full_name>mla_delete_option</full_name>
2809
+ <docblock line="584">
2810
  <description><![CDATA[Delete the stored value of a defined MLA option]]></description>
2811
  <long-description><![CDATA[]]></long-description>
2812
+ <tag line="584" name="since" description="0.1"/>
2813
+ <tag line="584" name="param" description="Name of the desired option" type="string" variable="$option">
2814
  <type by_reference="false">string</type>
2815
  </tag>
2816
+ <tag line="584" name="return" description="True if the option was deleted, otherwise false" type="boolean">
2817
  <type by_reference="false">boolean</type>
2818
  </tag>
2819
  </docblock>
2820
+ <argument line="593">
2821
  <name>$option</name>
2822
  <default><![CDATA[]]></default>
2823
  <type/>
2824
  </argument>
2825
  </method>
2826
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="612" package="Media Library Assistant">
2827
+ <name>_update_option_row</name>
2828
+ <full_name>_update_option_row</full_name>
2829
+ <docblock line="601">
2830
+ <description><![CDATA[Update or delete a single MLA option value]]></description>
2831
+ <long-description><![CDATA[]]></long-description>
2832
+ <tag line="601" name="since" description="0.80"/>
2833
+ <tag line="601" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
2834
+ <tag line="601" name="param" description="HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)" type="string" variable="$key">
2835
+ <type by_reference="false">string</type>
2836
+ </tag>
2837
+ <tag line="601" name="param" description="Option parameters, e.g., 'type', 'std'" type="array" variable="$value">
2838
+ <type by_reference="false">array</type>
2839
+ </tag>
2840
+ <tag line="601" name="return" description="HTML markup for the option's table row" type="string">
2841
+ <type by_reference="false">string</type>
2842
+ </tag>
2843
+ </docblock>
2844
+ <argument line="612">
2845
+ <name>$key</name>
2846
+ <default><![CDATA[]]></default>
2847
+ <type/>
2848
+ </argument>
2849
+ <argument line="612">
2850
+ <name>$value</name>
2851
+ <default><![CDATA[]]></default>
2852
+ <type/>
2853
+ </argument>
2854
+ </method>
2855
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="688" package="Media Library Assistant">
2856
+ <name>_compose_option_row</name>
2857
+ <full_name>_compose_option_row</full_name>
2858
+ <docblock line="677">
2859
+ <description><![CDATA[Compose the table row for a single MLA option]]></description>
2860
+ <long-description><![CDATA[]]></long-description>
2861
+ <tag line="677" name="since" description="0.80"/>
2862
+ <tag line="677" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
2863
+ <tag line="677" name="param" description="HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)" type="string" variable="$key">
2864
+ <type by_reference="false">string</type>
2865
+ </tag>
2866
+ <tag line="677" name="param" description="Option parameters, e.g., 'type', 'std'" type="array" variable="$value">
2867
+ <type by_reference="false">array</type>
2868
+ </tag>
2869
+ <tag line="677" name="return" description="HTML markup for the option's table row" type="string">
2870
+ <type by_reference="false">string</type>
2871
+ </tag>
2872
+ </docblock>
2873
+ <argument line="688">
2874
+ <name>$key</name>
2875
+ <default><![CDATA[]]></default>
2876
+ <type/>
2877
+ </argument>
2878
+ <argument line="688">
2879
+ <name>$value</name>
2880
+ <default><![CDATA[]]></default>
2881
+ <type/>
2882
+ </argument>
2883
+ </method>
2884
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="847" package="Media Library Assistant">
2885
+ <name>_compose_settings_tabs</name>
2886
+ <full_name>_compose_settings_tabs</full_name>
2887
+ <docblock line="837">
2888
+ <description><![CDATA[Compose the navigation tabs for the Settings subpage]]></description>
2889
+ <long-description><![CDATA[]]></long-description>
2890
+ <tag line="837" name="since" description="0.80"/>
2891
+ <tag line="837" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
2892
+ <tag line="837" name="param" description="Optional data-tab-id value for the active tab, default 'general'" type="string" variable="$active_tab">
2893
+ <type by_reference="false">string</type>
2894
+ </tag>
2895
+ <tag line="837" name="return" description="HTML markup for the Settings subpage navigation tabs" type="string">
2896
+ <type by_reference="false">string</type>
2897
+ </tag>
2898
+ </docblock>
2899
+ <argument line="847">
2900
+ <name>$active_tab</name>
2901
+ <default><![CDATA['general']]></default>
2902
+ <type/>
2903
+ </argument>
2904
+ </method>
2905
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="873" package="Media Library Assistant">
2906
+ <name>_compose_general_tab</name>
2907
+ <full_name>_compose_general_tab</full_name>
2908
+ <docblock line="865">
2909
+ <description><![CDATA[Compose the General tab content for the Settings subpage]]></description>
2910
+ <long-description><![CDATA[]]></long-description>
2911
+ <tag line="865" name="since" description="0.80"/>
2912
+ <tag line="865" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
2913
+ <tag line="865" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
2914
+ <type by_reference="false">array</type>
2915
+ </tag>
2916
+ </docblock>
2917
+ </method>
2918
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="957" package="Media Library Assistant">
2919
+ <name>_compose_mla_gallery_tab</name>
2920
+ <full_name>_compose_mla_gallery_tab</full_name>
2921
+ <docblock line="949">
2922
+ <description><![CDATA[Compose the MLA Gallery tab content for the Settings subpage]]></description>
2923
+ <long-description><![CDATA[]]></long-description>
2924
+ <tag line="949" name="since" description="0.80"/>
2925
+ <tag line="949" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
2926
+ <tag line="949" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
2927
+ <type by_reference="false">array</type>
2928
+ </tag>
2929
+ </docblock>
2930
+ </method>
2931
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1239" package="Media Library Assistant">
2932
+ <name>_compose_documentation_tab</name>
2933
+ <full_name>_compose_documentation_tab</full_name>
2934
+ <docblock line="1231">
2935
+ <description><![CDATA[Compose the Documentation tab content for the Settings subpage]]></description>
2936
+ <long-description><![CDATA[]]></long-description>
2937
+ <tag line="1231" name="since" description="0.80"/>
2938
+ <tag line="1231" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
2939
+ <tag line="1231" name="return" description="'message' =&gt; status/error messages, 'body' =&gt; tab content" type="array">
2940
+ <type by_reference="false">array</type>
2941
+ </tag>
2942
+ </docblock>
2943
+ </method>
2944
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1257" package="Media Library Assistant">
2945
  <name>mla_render_settings_page</name>
2946
  <full_name>mla_render_settings_page</full_name>
2947
+ <docblock line="1250">
2948
  <description><![CDATA[Render (echo) the "Media Library Assistant" subpage in the Settings section]]></description>
2949
  <long-description><![CDATA[]]></long-description>
2950
+ <tag line="1250" name="since" description="0.1"/>
2951
+ <tag line="1250" name="return" description="Echoes HTML markup for the Settings subpage" type="void">
2952
  <type by_reference="false">void</type>
2953
  </tag>
2954
  </docblock>
2955
  </method>
2956
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="1311" package="Media Library Assistant">
2957
  <name>mla_taxonomy_support</name>
2958
  <full_name>mla_taxonomy_support</full_name>
2959
+ <docblock line="1298">
2960
  <description><![CDATA[Determine MLA support for a taxonomy, handling the special case where the
2961
  settings are being updated or reset.]]></description>
2962
  <long-description><![CDATA[]]></long-description>
2963
+ <tag line="1298" name="since" description="0.30"/>
2964
+ <tag line="1298" name="param" description="Taxonomy name, e.g., attachment_category" type="string" variable="$tax_name">
2965
  <type by_reference="false">string</type>
2966
  </tag>
2967
+ <tag line="1298" name="param" description="Optional. 'support' (default), 'quick-edit' or 'filter'" type="string" variable="$support_type">
2968
  <type by_reference="false">string</type>
2969
  </tag>
2970
+ <tag line="1298" 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">
2971
  <type by_reference="false">boolean</type>
2972
  <type by_reference="false">string</type>
2973
  </tag>
2974
  </docblock>
2975
+ <argument line="1311">
2976
  <name>$tax_name</name>
2977
  <default><![CDATA[]]></default>
2978
  <type/>
2979
  </argument>
2980
+ <argument line="1311">
2981
  <name>$support_type</name>
2982
  <default><![CDATA['support']]></default>
2983
  <type/>
2984
  </argument>
2985
  </method>
2986
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1383" package="Media Library Assistant">
2987
+ <name>_save_gallery_settings</name>
2988
+ <full_name>_save_gallery_settings</full_name>
2989
+ <docblock line="1374">
2990
+ <description><![CDATA[Save MLA Gallery settings to the options table]]></description>
2991
  <long-description><![CDATA[]]></long-description>
2992
+ <tag line="1374" name="since" description="0.80"/>
2993
+ <tag line="1374" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
2994
+ <tag line="1374" name="return" description="Message(s) reflecting the results of the operation" type="array">
2995
  <type by_reference="false">array</type>
2996
  </tag>
2997
+ </docblock>
2998
+ </method>
2999
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1609" package="Media Library Assistant">
3000
+ <name>_save_general_settings</name>
3001
+ <full_name>_save_general_settings</full_name>
3002
+ <docblock line="1600">
3003
+ <description><![CDATA[Save General settings to the options table]]></description>
3004
+ <long-description><![CDATA[]]></long-description>
3005
+ <tag line="1600" name="since" description="0.1"/>
3006
+ <tag line="1600" name="uses" description="\global\$_REQUEST" refers="\global\$_REQUEST"/>
3007
+ <tag line="1600" name="return" description="Message(s) reflecting the results of the operation" type="array">
3008
  <type by_reference="false">array</type>
3009
  </tag>
3010
  </docblock>
 
 
 
 
 
3011
  </method>
3012
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1637" package="Media Library Assistant">
3013
+ <name>_reset_general_settings</name>
3014
+ <full_name>_reset_general_settings</full_name>
3015
+ <docblock line="1630">
3016
  <description><![CDATA[Delete saved settings, restoring default values]]></description>
3017
  <long-description><![CDATA[]]></long-description>
3018
+ <tag line="1630" name="since" description="0.1"/>
3019
+ <tag line="1630" name="return" description="Message(s) reflecting the results of the operation" type="array">
 
 
 
3020
  <type by_reference="false">array</type>
3021
  </tag>
3022
  </docblock>
 
 
 
 
 
3023
  </method>
3024
+ <method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1681" package="Media Library Assistant">
3025
  <name>_taxonomy_handler</name>
3026
  <full_name>_taxonomy_handler</full_name>
3027
+ <docblock line="1668">
3028
  <description><![CDATA[Render and manage other taxonomy support options, e.g., Categories and Post Tags]]></description>
3029
  <long-description><![CDATA[]]></long-description>
3030
+ <tag line="1668" name="since" description="0.30"/>
3031
+ <tag line="1668" name="uses" description="\global\$page_template_array" refers="\global\$page_template_array"/>
3032
+ <tag line="1668" name="param" description="'render', 'update', 'delete', or 'reset'" type="string" variable="$action">
3033
  <type by_reference="false">string</type>
3034
  </tag>
3035
+ <tag line="1668" name="param" description="option name, e.g., 'taxonomy_support'" type="string" variable="$key">
3036
  <type by_reference="false">string</type>
3037
  </tag>
3038
+ <tag line="1668" name="param" description="option parameters" type="array" variable="$value">
3039
  <type by_reference="false">array</type>
3040
  </tag>
3041
+ <tag line="1668" name="param" description="Optional. null (default) for 'render' else $_REQUEST" type="array" variable="$args">
3042
  <type by_reference="false">array</type>
3043
  </tag>
3044
+ <tag line="1668" name="return" description="HTML table row markup for 'render' else message(s) reflecting the results of the operation." type="string">
3045
  <type by_reference="false">string</type>
3046
  </tag>
3047
  </docblock>
3048
+ <argument line="1681">
3049
  <name>$action</name>
3050
  <default><![CDATA[]]></default>
3051
  <type/>
3052
  </argument>
3053
+ <argument line="1681">
3054
  <name>$key</name>
3055
  <default><![CDATA[]]></default>
3056
  <type/>
3057
  </argument>
3058
+ <argument line="1681">
3059
  <name>$value</name>
3060
  <default><![CDATA[]]></default>
3061
  <type/>
3062
  </argument>
3063
+ <argument line="1681">
3064
  <name>$args</name>
3065
+ <default><![CDATA[null]]></default>
3066
  <type/>
3067
  </argument>
3068
  </method>
3069
  </class>
3070
  </file>
3071
+ <file path="includes\class-mla-shortcodes.php" hash="7bb613203da59ba600ff1cd17f74ecb5" package="Media Library Assistant">
3072
  <docblock line="2">
3073
  <description><![CDATA[Media Library Assistant Shortcode handler(s)]]></description>
3074
  <long-description><![CDATA[]]></long-description>
3085
  <tag line="9" name="package" description="Media Library Assistant"/>
3086
  <tag line="9" name="since" description="0.20"/>
3087
  </docblock>
3088
+ <property final="false" static="true" visibility="private" line="134" namespace="global" package="Media Library Assistant">
3089
  <name>$mla_debug_messages</name>
3090
  <default><![CDATA['']]></default>
3091
+ <docblock line="127">
3092
  <description><![CDATA[Accumulates debug messages]]></description>
3093
  <long-description><![CDATA[]]></long-description>
3094
+ <tag line="127" name="since" description="0.60"/>
3095
+ <tag line="127" name="var" description="" type="string">
3096
  <type by_reference="false">string</type>
3097
  </tag>
3098
  </docblock>
3099
  </property>
3100
+ <property final="false" static="true" visibility="private" line="143" namespace="global" package="Media Library Assistant">
3101
  <name>$mla_debug</name>
3102
  <default><![CDATA[false]]></default>
3103
+ <docblock line="136">
3104
  <description><![CDATA[Turn debug collection and display on or off]]></description>
3105
  <long-description><![CDATA[]]></long-description>
3106
+ <tag line="136" name="since" description="0.70"/>
3107
+ <tag line="136" name="var" description="" type="boolean">
3108
  <type by_reference="false">boolean</type>
3109
  </tag>
3110
  </docblock>
3133
  </tag>
3134
  </docblock>
3135
  </method>
3136
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="158" package="Media Library Assistant">
3137
  <name>mla_gallery_shortcode</name>
3138
  <full_name>mla_gallery_shortcode</full_name>
3139
+ <docblock line="145">
3140
  <description><![CDATA[The MLA Gallery shortcode.]]></description>
3141
  <long-description><![CDATA[<p>This is a superset of the WordPress Gallery shortcode for displaying images on a post,
3142
  page or custom post type. It is adapted from /wp-includes/media.php gallery_shortcode.
3143
  Enhancements include many additional selection parameters and full taxonomy support.</p>]]></long-description>
3144
+ <tag line="145" name="since" description=".50"/>
3145
+ <tag line="145" name="param" description="Attributes of the shortcode." type="array" variable="$attr">
3146
  <type by_reference="false">array</type>
3147
  </tag>
3148
+ <tag line="145" name="return" description="HTML content to display gallery." type="string">
3149
  <type by_reference="false">string</type>
3150
  </tag>
3151
  </docblock>
3152
+ <argument line="158">
3153
  <name>$attr</name>
3154
  <default><![CDATA[]]></default>
3155
  <type/>
3156
  </argument>
3157
  </method>
3158
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="527" package="Media Library Assistant">
3159
  <name>mla_get_shortcode_attachments</name>
3160
  <full_name>mla_get_shortcode_attachments</full_name>
3161
+ <docblock line="517">
3162
  <description><![CDATA[Parses shortcode parameters and returns the gallery objects]]></description>
3163
  <long-description><![CDATA[]]></long-description>
3164
+ <tag line="517" name="since" description=".50"/>
3165
+ <tag line="517" name="param" description="Post ID of the parent" type="int" variable="$post_parent">
3166
  <type by_reference="false">int</type>
3167
  </tag>
3168
+ <tag line="517" name="param" description="Attributes of the shortcode" type="array" variable="$attr">
3169
  <type by_reference="false">array</type>
3170
  </tag>
3171
+ <tag line="517" name="return" description="List of attachments returned from WP_Query" type="array">
3172
  <type by_reference="false">array</type>
3173
  </tag>
3174
  </docblock>
3175
+ <argument line="527">
3176
  <name>$post_parent</name>
3177
  <default><![CDATA[]]></default>
3178
  <type/>
3179
  </argument>
3180
+ <argument line="527">
3181
  <name>$attr</name>
3182
  <default><![CDATA[]]></default>
3183
  <type/>
3184
  </argument>
3185
  </method>
3186
+ <method final="false" abstract="false" static="true" visibility="public" namespace="global" line="847" package="Media Library Assistant">
3187
  <name>mla_shortcode_query_posts_where_filter</name>
3188
  <full_name>mla_shortcode_query_posts_where_filter</full_name>
3189
+ <docblock line="834">
3190
  <description><![CDATA[Filters the WHERE clause for shortcode queries]]></description>
3191
  <long-description><![CDATA[<p>Captures debug information. Adds whitespace to the post_type = 'attachment'
3192
  phrase to circumvent subsequent Role Scoper modification of the clause.
3193
  Defined as public because it's a filter.</p>]]></long-description>
3194
+ <tag line="834" name="since" description="0.70"/>
3195
+ <tag line="834" name="param" description="query clause before modification" type="string" variable="$where_clause">
3196
  <type by_reference="false">string</type>
3197
  </tag>
3198
+ <tag line="834" name="return" description="query clause after modification" type="string">
3199
  <type by_reference="false">string</type>
3200
  </tag>
3201
  </docblock>
3202
+ <argument line="847">
3203
  <name>$where_clause</name>
3204
  <default><![CDATA[]]></default>
3205
  <type/>
3207
  </method>
3208
  </class>
3209
  </file>
3210
+ <file path="includes\mla-plugin-loader.php" hash="f4bad52265d28d345e66c72c1aecce07" package="Media Library Assistant">
3211
  <docblock line="2">
3212
  <description><![CDATA[Media Library Assistant Plugin Loader]]></description>
3213
  <long-description><![CDATA[<p>Defines constants and loads all of the classes and functions required to run the plugin.
3227
  <include line="42" type="Require Once" package="Media Library Assistant">
3228
  <name/>
3229
  </include>
3230
+ <include line="50" type="Require Once" package="Media Library Assistant">
3231
+ <name/>
3232
+ </include>
3233
+ <include line="58" type="Require Once" package="Media Library Assistant">
3234
  <name/>
3235
  </include>
3236
+ <include line="65" type="Require Once" package="Media Library Assistant">
3237
  <name/>
3238
  </include>
3239
+ <include line="70" type="Require Once" package="Media Library Assistant">
3240
  <name/>
3241
  </include>
3242
  <constant namespace="global" line="16" package="Media Library Assistant">
3249
  </docblock>
3250
  </constant>
3251
  </file>
3252
+ <file path="index.php" hash="60d52453e39e48b06b84813ec8f2b13a" package="Media Library Assistant">
3253
  <docblock line="2">
3254
  <description><![CDATA[Provides several enhancements to the handling of images and files held in the WordPress Media Library]]></description>
3255
  <long-description><![CDATA[<p>This file contains several tests for name conflicts with other plugins. Only if the tests are passed
3256
  will the rest of the plugin be loaded and run.</p>]]></long-description>
3257
  <tag line="2" name="package" description="Media Library Assistant"/>
3258
+ <tag line="2" name="version" description="0.80"/>
3259
  </docblock>
3260
  <include line="103" type="Require Once" package="Media Library Assistant">
3261
  <name>includes/mla-plugin-loader.php</name>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://fairtradejudaica.org/make-a-difference/donate/
4
  Tags: attachments, documents, gallery, image, images, media, library, media library, media-tags, media tags, tags, media categories, categories
5
  Requires at least: 3.3
6
  Tested up to: 3.4.2
7
- Stable tag: 0.71
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,7 +14,7 @@ Provides enhancements to the Media Library; powerful[mla_gallery], full taxonomy
14
 
15
  The Media Library Assistant provides several enhancements for managing the Media Library, including:
16
 
17
- * The **[mla_gallery] shortcode**, used in a post, page or custom post type to add a gallery of images and/or other Media Library items (such as PDF documents). [MLA Gallery](http://wordpress.org/extend/plugins/media-library-assistant/other_notes/ "Complete Documentation") is a superset of the [gallery] shortcode in the WordPress core; it is compatible with [gallery] and provides many enhancements. These include: 1) full support for WordPress categories, tags and custom taxonomies, 2) support for all post_mime_type values, not just images 3) media Library items need not be "attached" to the post.
18
 
19
  * **Enhanced Search Media box**. Search can be extended to the name/slug, ALT text and caption fields. The connector between search terms can be "and" or "or".
20
 
@@ -24,7 +24,7 @@ The Media Library Assistant provides several enhancements for managing the Media
24
  * An inline "Bulk Edit" area; update author or parent, add, remove or replace taxonomy terms for several attachments at once
25
  * An inline "Quick Edit" action for many common fields
26
  * Displays more attachment information such as parent information, file URL and image metadata
27
- * Allows you to edit the attachment author, the name/slug and to "unattach" items
28
  * Provides additional view filters for mime types and taxonomies
29
  * Provides many more listing columns (more than 20) to choose from
30
 
@@ -96,13 +96,29 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
96
  == Screenshots ==
97
 
98
  1. The Media Library Assistant submenu showing the available columns, including "Featured in", "Inserted in", "Att. Categories" and "Att. Tags"; also shows the Quick Edit area.
99
- 2. The enhanced Edit page showing additional fields, categories and tags
100
- 3. A typical edit taxonomy page, showing the "Attachments" column
101
- 4. The Settings page, to customize support of Att. Categories, Att. Tags and other taxonomies and the default sort order
102
- 5. The Media Library Assistant submenu showing the Bulk Edit area with taxonomy Add, Remove and Replace options; also shows the tags suggestion popup.
 
103
 
104
  == Changelog ==
105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  = 0.71 =
107
  * Fix: Removed (!) Warning displays for empty Gallery in and MLA Gallery in column entries.
108
 
@@ -137,7 +153,7 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
137
  * New: Activate and deactivate hooks added to create and drop an SQL View supporting ALT Text sorting
138
  * New: Revisions are excluded from the where-used columns; a settings option lets you include them if you wish
139
  * Fix: Better validation/sanitization of data fields on input and display
140
- * Fix: Database query validation/sanitization with wpdb_prepare()
141
  * Fix: check_admin_referer added to settings page
142
  * Fix: Inline CSS styles for message DIV moved to style sheet
143
 
@@ -172,6 +188,9 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
172
 
173
  == Upgrade Notice ==
174
 
 
 
 
175
  = 0.71 =
176
  Get the new "Gallery in" and "MLA Gallery in" where-used reporting to see where items are returned by the [gallery] and [mla_gallery] shortcodes. Two other enhancements and two fixes.
177
 
@@ -202,6 +221,14 @@ You should upgrade to this version if you are getting "404 Not Found" errors whe
202
  = 0.1 =
203
  Initial release.
204
 
 
 
 
 
 
 
 
 
205
 
206
  == Acknowledgements ==
207
 
@@ -212,25 +239,28 @@ I have used and learned much from the following books (among many):
212
  * WordPress 3 Plugin Development Essentials, by Brian Bondari and Everett Griffiths (Mar 24, 2011) ISBN-13: 978-1849513524
213
  * WordPress and Ajax, by Ronald Huereca (Jan 13, 2011) ISBN-13: 978-1451598650
214
 
215
- ==MLA Gallery Shortcode==
216
 
217
- The [mla_gallery] shortcode is used in a post, page or custom post type to add a gallery of images and/or other Media Library items (such as PDF documents). MLA Gallery is a superset of the [gallery] shortcode in the WordPress core; it is compatible with [gallery] and provides many enhancements. These include:
218
 
219
  * Full support for WordPress categories, tags and custom taxonomies. You can select items with any of the taxonomy parameters documented in the WP_Query class.
220
  * Support for all post_mime_type values, not just images.
221
  * Media Library items need not be "attached" to the post. You can build a gallery with any combination of items in the Library using taxonomy terms, custom fields and more.
 
222
 
223
- All of the options/parameters documented for the [gallery] shortcode are supported by the [mla_gallery] shortcode; you can find them in the WordPress Codex. Most of the parameters documented for the WP_Query class are also supported; see the WordPress Codex. Because the [mla_gallery] shortcode is designed to work with Media Library items, there are some parameter differences and extensions; these are documented below.
224
 
225
- <h4>Include, Exclude</h4>
226
 
227
- You can use "post_parent=all" to include or exclude attachments regardless of which post or page they are attached to. You can use "post_mime_type=all" to include or exclude attachments of all MIME types, not just images.
228
 
229
- <h4>Size</h4>
230
 
231
- The Size parameter specifies the image size to use for the thumbnail display. Valid values include "thumbnail", "medium", "large", "full" and any other additional image size that was registered with add_image_size(). The default value is "thumbnail". You can use "none" to suppress thumbnail display and substitute the item title string for the image.
232
 
233
- The [mla_gallery] shortcode supports an additional Size value, "icon", which shows a 60x60 pixel thumbnail for image items and an appropriate icon for non-image items such as PDF or text files.
 
 
234
 
235
  <h4>Order, Orderby</h4>
236
 
@@ -238,10 +268,28 @@ To order the gallery randomly, use "orderby=rand". To suppress gallery ordering
238
 
239
  The Orderby parameter specifies which database field is used to sort the gallery. You can order the gallery by any of the values documented for the WP_Query class reference in the Codex; you are NOT restricted to the values documented for the [gallery] shortcode.
240
 
241
- <h4>Post ID, Post Parent</h4>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
 
243
  The "id" parameter lets you specify a post ID for your query. If the "id" parameter is not specified, the [mla_gallery] behavior differs from the [gallery] behavior. If your query uses taxonomy or custom field parameters, "author", "author_name" or "s" (search term), then the query will NOT be restricted to items attached to the current post. This lets you build a gallery with any combination of Media Library items that match the parameters.
244
 
 
 
245
  You can use the "post_parent" to override the default behavior. If you set "post_parent" to a specific post ID, only the items attached to that post are displayed. If you set "post_parent" to "current", only the items attached to the current post are displayed. If you set "post_parent" to "all", the query will not have a post ID or post_parent parameter.
246
 
247
  For example, `[mla_gallery tag="artisan"]` will display all images having the specified tag value, regardless of which post (if any) they are attached to. If you use `[mla_gallery tag="artisan" post_parent="current"]` it will display images having the specified tag value only if they are attached to the current post.
@@ -305,56 +353,194 @@ Remember to use "post_parent=current" if you want to restrict your query to item
305
 
306
  The search parameter ("s=keyword") will perform a keyword search. A cursory inspection of the code in /wp-includes/query.php reveals that the search includes the "post_title" and "post_content" (Description) fields but not the "post_excerpt" (Caption) field. An SQL "LIKE" clause is composed and added to the search criteria. I haven't done much testing of this parameter.
307
 
308
- == Help Summary ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
 
310
  <p><strong><em>Assistant Submenu - Attachment List Table</em></strong></p>
311
- <p><strong>Overview</strong></p>
312
  <p>All the files you&#8217;ve uploaded are listed in the Media Library Assistant table, ordered by the Title field. You can change the sort order by clicking on one of the blue column names. You can change the default sort order on the Settings screen.</p>
313
  <p>You can use the Screen Options tab to customize the display of this screen. You can choose any combination of the sixteen (16) columns available for display. You can also choose how many items appear on each page of the display.</p>
314
  <p>You can narrow the list by file type/status using the text link filters at the top of the screen. You also can refine the list by month using the dropdown menu above the media table.</p>
315
  <p>If you have selected &#8220;Attachment Categories&#8221; support, you can filter the list by selecting &#8220;All Categories&#8221;, &#8220;No Categories&#8221; or a specific category from the drop down list. If you select a category that has child categories beneath it, attachments in any of the child categories will also appear in the filtered list.</p>
316
  <p><strong>NOTE:</strong> Month and category filters are &#8220;sticky&#8221;, i.e., they will persist as you resort the display or change the file type/status view.</p>
317
- <p><strong>Featured/Inserted</strong></p>
318
  <p>The &#8220;Featured in&#8221; and &#8220;Inserted in&#8221; columns are a powerful tool for managing your attachments. They show you where each attachment is used in a post or page as a &#8220;Featured Image&#8221; or as an embedded image or link.</p>
319
  <p>You can also use the information in the &#8220;Title/Name&#8221; column to identify &#8220;Orphan&#8221; items that are not used in any post or page and items with a &#8220;Bad Parent&#8221; (a parent that does contain any reference to the item) or an &#8220;Invalid Parent&#8221; (a parent that does not exist).</p>
320
- <p><strong>Gallery/MLA Gallery</strong></p>
321
  <p>The &#8220;Gallery in&#8221; and &#8220;MLA Gallery in&#8221; columns are a powerful tool for managing your attachments. They show you where each attachment is returned by a <code>[gallery]</code> or <code>[mla_gallery]</code> shortcode in a post or page. These columns do <strong>not</strong> use the post_parent (attached to) status of the item; they actually execute each shortcode and tabulate the attachments they return.</p>
322
  <p>You can also use the information in the &#8220;Title/Name&#8221; column to identify &#8220;Orphan&#8221; items that are not used in any post or page and items with a &#8220;Bad Parent&#8221; (a parent that does contain any reference to the item) or an &#8220;Invalid Parent&#8221; (a parent that does not exist).</p>
323
- <p><strong>Taxonomy Support</strong></p>
324
  <p>The &#8220;taxonomy&#8221; columns help you to group attachments by subject and keyword values. The columns list any categories and tags associated with the item. You can click on one of the displayed values to get a list of all items associated with that value.</p>
325
  <p>The Media Library Assistant provides two pre-defined taxonomies, &#8220;Att. Categories&#8221; and &#8220;Att. Tags&#8221; which are enabled by default. You can add or remove support for any registered taxonomy on the Settings screen. The standard WordPress Categories and Tags as well as any custom taxonomies can be supported.</p>
326
  <p>When you add support for a taxonomy it is visible on the main screen. If you want to hide the column simply use the Screen Options to uncheck the Show on screen box.</p>
327
  <p>Supported taxonomies also appear as submenus below the Media menu at the left of the screen. You can edit the taxonomy terms by clicking these submenus. The taxonomy edit screens include an &#8220;Attachments&#8221; column which displays the number of attachment objects for each term. You can display a filtered list of the attachments by clicking on the number in this column.</p>
328
- <p><strong>Search Media</strong></p>
329
  <p>The &#8220;Search Media&#8221; box supports a keyword search of several attachment fields; enter words and/or phrases in the box, separated by spaces. Click the Search Media button for a case-insensitive "SQL LIKE" search. Each keyword in the search phrase is matched independently, so the order of search words does not have to match the order in the text. For example, searching on "friend" and "best" will match "Best Friend". If you put quotes around a search phrase then word order is required for a match (and spaces between words must match as well). You can also match on partial words, e.g., "rien" will match "friend".</p>
330
  <p>Once you&#8217;ve entered the terms you want, use the options below the box to tailor your search. You can pick the connector used between search terms; "or" means any of the terms will match, "and" means all of the terms must match. Use the checkboxes to extend your search to more fields in the database.</p>
331
- <p><strong>Bulk Actions</strong></p>
332
  <p>The &#8220;Bulk Actions&#8221; dropdown list works with the check box column to let you make changes to many items at once. Click the check box in the column title row to select all items on the page, or click the check box in a row to select items individually.</p>
333
  <p>Once you&#8217;ve selected the items you want, pick an action from the dropdown list and click Apply to perform the action on the selected items. The available actions will vary depending on the file type/status view you have picked.</p>
334
  <p>If you have enabled Trash support (define MEDIA_TRASH in wp-config.php) you can use bulk actions to move items to and from the Trash or delete them permamently.</p>
335
  <p>When using Bulk Edit, you can change the metadata (author, parent, taxonomy terms) for all selected attachments at once. To remove an attachment from the grouping, just click the x next to its name in the left column of the Bulk Edit area.</p>
336
  <p>Bulk Edit support for taxonomy terms allows you to <strong>add, remove or completely replace</strong> terms for the selected attachments. Below each taxonomy edit box are three radio buttons that let you select the action you&#8217;d like to perform.</p>
337
  <p>The taxonomies that appear in the Bulk Edit area can be a subset of the taxonomies supported on the single item edit screen. You can select which taxonomies appear by entering your choice(s) on the Media Libray Assistant Settings screen.</p>
338
- <p><strong>Available Actions</strong></p>
339
  <p>Hovering over a row reveals action links such as Edit, Quick Edit, Move to Trash and Delete Permanently. Clicking Edit displays a simple screen to edit that individual file&#8217;s metadata. Clicking Move to Trash will assign the file to the Trash pile but will not affect pages or posts to which it is attached. Clicking Delete Permanently will delete the file from the media library (as well as from any posts to which it is currently attached). Clicking Quick Edit displays an inline form to edit the file's metadata without leaving the menu screen.</p>
340
  <p>The taxonomies that appear in the Quick Edit area can be a subset of the taxonomies supported on the single item edit screen. You can select which taxonomies appear by entering your choice(s) on the Media Libray Assistant Settings screen.</p>
341
- <p><strong>Attaching Files</strong></p>
342
  <p>If a media file has not been attached to any post, you will see (unattached) in the Attached To column. You can click on the Edit or Quick Edit action to attach the file by assigning a value to the Parent ID field.</p>
343
  <p><strong><em>Single Item Edit Screen</em></strong></p>
344
- <p><strong>Overview</strong></p>
345
  <p>This screen allows you to view many of the fields associated with an attachment and to edit several of them. Fields that are read-only have a light gray background; fields that may be changes have a white background. Hints and helpful information appear below some fields.</p>
346
  <p>Remember to click the &#8220;Update&#8221; button to save your work. You may instead click the &#8220;Cancel&#8221; button to discard any changes.</p>
347
- <p><strong>Taxonomies</strong></p>
348
  <p>If there are custom taxonomies, such as &#8220;Attachment Categories&#8221; or &#8220;Attachment Tags&#8221;, registered for attachments they will apppear in the right-hand column on this screen. You can add or remove terms from any of the taxonomies displayed. Changes will not be saved until you click the &#8220;Update&#8221; button for the attachment.</p>
349
- <p><strong>Parent Info</strong></p>
350
  <p>The &#8220;Parent Info&#8221; field displays the Post ID, type and title of the post or page to which the item is attached. It will display &#8220;0 (unattached)&#8221; if there is no parent post or page.</p>
351
  <p>You can change the post or page to which the item is attached by changing the Post ID value and clicking the &#8220;Update&#8221; button. Changing the Post ID value to zero (0) will &#8220;unattach&#8221; the item.</p>
352
  <p><strong><em>Edit Hierarchical Taxonomies (Categories)</em></strong></p>
353
- <p><strong>Overview</strong></p>
354
  <p>You can use <strong>categories</strong> to define sections of your site and group related attachments. The default is &#8220;none&#8221;, i.e., the attachment is not associated with any category.</p>
355
  <p>What&#8217;s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information about your attachment (names, subjects, etc) that may or may not apply to other attachments, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.</p>
356
  <p>You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.</p>
357
- <p><strong>Adding Categories</strong></p>
358
  <p>When adding a new category on this screen, you&#8217;ll fill in the following fields:</p>
359
  <ul>
360
  <li><strong>Name</strong> - The name is how it appears on your site.</li>
@@ -362,19 +548,19 @@ The search parameter ("s=keyword") will perform a keyword search. A cursory insp
362
  <li><strong>Parent</strong> - Categories, unlike tags, can have a hierarchy. You might have a Landscape category, and under that have children categories for Mountains and Seashore. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.</li>
363
  <li><strong>Description</strong> - The description is not prominent by default; however, some themes may display it.</li>
364
  </ul>
365
- <p><strong>Attachments Column</strong></p>
366
  <p>The &#8220;Attachments&#8221; colunm at the right of the table gives you the number of attachments associated with each category. You can click on the number to get a list of all the attachments with that category. The heading on the list page(s) will display the category value you&#8217;ve selected.</p>
367
  <p><strong><em>Edit Flat Taxonomies (Tags)</em></strong></p>
368
- <p><strong>Overview</strong></p>
369
  <p>You can assign keywords to your attachments using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.</p>
370
  <p>What&#8217;s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information about your attachment (names, subjects, etc.) that may or may not apply to other attachments, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.</p>
371
  <p>You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.</p>
372
- <p><strong>Adding Tags</strong></p>
373
  <p>When adding a new tag on this screen, you&#8217;ll fill in the following fields:</p>
374
  <ul>
375
  <li><strong>Name</strong> - The name is how it appears on your site.</li>
376
  <li><strong>Slug</strong> - The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.</li>
377
  <li><strong>Description</strong> - The description is not prominent by default; however, some themes may display it.</li>
378
  </ul>
379
- <p><strong>Attachments Column</strong></p>
380
  <p>The &#8220;Attachments&#8221; colunm at the right of the table gives you the number of attachments associated with each tag. You can click on the number to get a list of all the attachments with that tag. The heading on the list page(s) will display the tag value you&#8217;ve selected.</p>
4
  Tags: attachments, documents, gallery, image, images, media, library, media library, media-tags, media tags, tags, media categories, categories
5
  Requires at least: 3.3
6
  Tested up to: 3.4.2
7
+ Stable tag: 0.80
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  The Media Library Assistant provides several enhancements for managing the Media Library, including:
16
 
17
+ * The **[mla_gallery] shortcode**, used in a post, page or custom post type to add a gallery of images and/or other Media Library items (such as PDF documents). [MLA Gallery](http://wordpress.org/extend/plugins/media-library-assistant/other_notes/ "Complete Documentation") is a superset of the [gallery] shortcode in the WordPress core; it is compatible with [gallery] and provides many enhancements. These include: 1) full support for WordPress categories, tags and custom taxonomies, 2) support for all post_mime_type values, not just images 3) media Library items need not be "attached" to the post, and 4) control over the styles, markup and content of each gallery using Style and Markup Templates.
18
 
19
  * **Enhanced Search Media box**. Search can be extended to the name/slug, ALT text and caption fields. The connector between search terms can be "and" or "or".
20
 
24
  * An inline "Bulk Edit" area; update author or parent, add, remove or replace taxonomy terms for several attachments at once
25
  * An inline "Quick Edit" action for many common fields
26
  * Displays more attachment information such as parent information, file URL and image metadata
27
+ * Allows you to edit the post_parent, the menu_order and to "unattach" items
28
  * Provides additional view filters for mime types and taxonomies
29
  * Provides many more listing columns (more than 20) to choose from
30
 
96
  == Screenshots ==
97
 
98
  1. The Media Library Assistant submenu showing the available columns, including "Featured in", "Inserted in", "Att. Categories" and "Att. Tags"; also shows the Quick Edit area.
99
+ 2. The Media Library Assistant submenu showing the Bulk Edit area with taxonomy Add, Remove and Replace options; also shows the tags suggestion popup.
100
+ 3. A typical edit taxonomy page, showing the "Attachments" column.
101
+ 4. The enhanced Edit page showing additional fields, categories and tags.
102
+ 5. The Settings page General tab, where you can customize support of Att. Categories, Att. Tags and other taxonomies, where-used reporting and the default sort order.
103
+ 6. The Settings page MLA Gallery tab, where you can add custom style and markup templates for `[mla_gallery]` shortcode output.
104
 
105
  == Changelog ==
106
 
107
+ = 0.80 =
108
+ * New: MLA Gllery Style and Markup Templates, for control over CSS styles, HTML markup and data content of `[mla_gallery]` shortcode output.
109
+ * New: The `[mla_gallery]` "mla_link_text", "mla_rollover_text" and "mla_caption", parameters allow easy customization of gallery display.
110
+ * New: The `[mla_gallery]` "link" parameter now accepts size values, e.g., "medium", to generate a link to image sizes other than "full".
111
+ * New: The `[mla_gallery]` "mla_debug" parameter provides debugging information for query parameters.
112
+ * New: Quick Edit area now includes caption field.
113
+ * New: Settings page now divided into three tabbed subpages for easier access to settings and documentation.
114
+ * New: For WordPress 3.5, Custom Field support added to attachments and to the WordPress standard Edit Media Screen.
115
+ * New: For WordPress version 3.5, the WordPress standard Edit Media screen now includes Last Modified date, Parent Info, Menu Order, Image Metadata and all "where-used" information.
116
+ * New: For WordPress versions before 3.5, the MLA Edit single item screen now includes "Gallery in" and "MLA Gallery in" information.
117
+ * Fix: Bulk edit now supports "No Change" option for Author.
118
+ * Fix: Bulk edit now supports changing Parent ID to "0" (unattached).
119
+ * Fix: Where-used reporting corrected for sites without month- and year-based folders.
120
+ * Fix: "No Categories" filtering fixed; used to return items with categories in some cases.
121
+
122
  = 0.71 =
123
  * Fix: Removed (!) Warning displays for empty Gallery in and MLA Gallery in column entries.
124
 
153
  * New: Activate and deactivate hooks added to create and drop an SQL View supporting ALT Text sorting
154
  * New: Revisions are excluded from the where-used columns; a settings option lets you include them if you wish
155
  * Fix: Better validation/sanitization of data fields on input and display
156
+ * Fix: Database query validation/sanitization with wpdb->prepare()
157
  * Fix: check_admin_referer added to settings page
158
  * Fix: Inline CSS styles for message DIV moved to style sheet
159
 
188
 
189
  == Upgrade Notice ==
190
 
191
+ = 0.80 =
192
+ Get the MLA Gallery Style and Markup Templates for control over CSS styles, HTML markup and data content of `[mla_gallery]` shortcode output. Eight other enhancements and four fixes.
193
+
194
  = 0.71 =
195
  Get the new "Gallery in" and "MLA Gallery in" where-used reporting to see where items are returned by the [gallery] and [mla_gallery] shortcodes. Two other enhancements and two fixes.
196
 
221
  = 0.1 =
222
  Initial release.
223
 
224
+ == Other Notes ==
225
+
226
+ In this section:
227
+
228
+ * Acknowledgements
229
+ * MLA Gallery Shortcode Documentation
230
+ * MLA Gallery Style and Markup Template Documentation
231
+ * Online Help Summary (Assistant Submenu - Attachment List Table)
232
 
233
  == Acknowledgements ==
234
 
239
  * WordPress 3 Plugin Development Essentials, by Brian Bondari and Everett Griffiths (Mar 24, 2011) ISBN-13: 978-1849513524
240
  * WordPress and Ajax, by Ronald Huereca (Jan 13, 2011) ISBN-13: 978-1451598650
241
 
242
+ == MLA Gallery Shortcode ==
243
 
244
+ The `[mla_gallery]` shortcode is used in a post, page or custom post type to add a gallery of images and/or other Media Library items (such as PDF documents). MLA Gallery is a superset of the `[gallery]` shortcode in the WordPress core; it is compatible with `[gallery]` and provides many enhancements. These include:
245
 
246
  * Full support for WordPress categories, tags and custom taxonomies. You can select items with any of the taxonomy parameters documented in the WP_Query class.
247
  * Support for all post_mime_type values, not just images.
248
  * Media Library items need not be "attached" to the post. You can build a gallery with any combination of items in the Library using taxonomy terms, custom fields and more.
249
+ * Control over the styles, markup and content of each gallery using the Style and Markup Templates documented below.
250
 
251
+ All of the options/parameters documented for the `[gallery]` shortcode are supported by the `[mla_gallery]` shortcode; you can find them in the WordPress Codex. Most of the parameters documented for the WP_Query class are also supported; see the WordPress Codex. Because the `[mla_gallery]` shortcode is designed to work with Media Library items, there are some parameter differences and extensions; these are documented below.
252
 
253
+ <h4>Gallery Display Content</h4>
254
 
255
+ Three `[mla_gallery]` parameters provide an easy way to control the contents of gallery items without requiring the use of custom Markup templates.
256
 
257
+ * `mla_link_text`: replaces the thumbnail image or attachment title text displayed for each gallery item.
258
 
259
+ * `mla_rollover_text`: replaces the attachment title text displayed when the mouse rolls or hovers over the gallery thumbnail.
260
 
261
+ * `mla_caption`: replaces the attachment caption text displayed beneath the thumbnail of each gallery item.
262
+
263
+ All three of these parameters support the Markup and Attachment-specific substitution arguments defined for Markup Templates. For example, if you code `mla_rollover_text="{+date+} : {+description+}"`, the rollover text will contain the upload date, a colon, and the full description of each gallery item. Simply add "{+" before the substitution parameter name and add "+}" after the name. Note that the enclosing delimiters are different than those used in the templates, since the shortcode parser reserves square brackets ("[" and "]") for its own use.
264
 
265
  <h4>Order, Orderby</h4>
266
 
268
 
269
  The Orderby parameter specifies which database field is used to sort the gallery. You can order the gallery by any of the values documented for the WP_Query class reference in the Codex; you are NOT restricted to the values documented for the [gallery] shortcode.
270
 
271
+ <h4>Size</h4>
272
+
273
+ The Size parameter specifies the image size to use for the thumbnail display. Valid values include "thumbnail", "medium", "large", "full" and any additional image size that was registered with add_image_size(). The default value is "thumbnail". You can use "none" or "" to suppress thumbnail display and substitute the item title string for the image/icon.
274
+
275
+ The [mla_gallery] shortcode supports an additional Size value, "icon", which shows a 60x60 pixel thumbnail for image items and an appropriate icon for non-image items such as PDF or text files.
276
+
277
+ <h4>Link</h4>
278
+
279
+ The Link parameter specifies the target for the link from the gallery to the attachment. The default value, "permalink", links to the attachment's media page. The "file" and "full" values link directly to the attachment file.
280
+
281
+ For image attachments you can also specify the size of the image file you want to link to. Valid values include "thumbnail", "medium", "large" and any additional image size that was registered with add_image_size(). If the specified size is not available or if the attachment is not an image, the link will go directly to the attachment file.
282
+
283
+ <h4>Include, Exclude</h4>
284
+
285
+ You can use "post_parent=all" to include or exclude attachments regardless of which post or page they are attached to. You can use "post_mime_type=all" to include or exclude attachments of all MIME types, not just images.
286
+
287
+ <h4>Post ID, "ids", Post Parent</h4>
288
 
289
  The "id" parameter lets you specify a post ID for your query. If the "id" parameter is not specified, the [mla_gallery] behavior differs from the [gallery] behavior. If your query uses taxonomy or custom field parameters, "author", "author_name" or "s" (search term), then the query will NOT be restricted to items attached to the current post. This lets you build a gallery with any combination of Media Library items that match the parameters.
290
 
291
+ For WordPress 3.5 and later, the "ids" parameter lets you specify a list of Post IDs. The attachment(s) matching the "ids" values will be displayed in the order specified by the list.
292
+
293
  You can use the "post_parent" to override the default behavior. If you set "post_parent" to a specific post ID, only the items attached to that post are displayed. If you set "post_parent" to "current", only the items attached to the current post are displayed. If you set "post_parent" to "all", the query will not have a post ID or post_parent parameter.
294
 
295
  For example, `[mla_gallery tag="artisan"]` will display all images having the specified tag value, regardless of which post (if any) they are attached to. If you use `[mla_gallery tag="artisan" post_parent="current"]` it will display images having the specified tag value only if they are attached to the current post.
353
 
354
  The search parameter ("s=keyword") will perform a keyword search. A cursory inspection of the code in /wp-includes/query.php reveals that the search includes the "post_title" and "post_content" (Description) fields but not the "post_excerpt" (Caption) field. An SQL "LIKE" clause is composed and added to the search criteria. I haven't done much testing of this parameter.
355
 
356
+ <h4>Debugging Output</h4>
357
+
358
+ The "mla_debug" parameter controls the display of information about the query parameters and SQL statements used to retrieve gallery items. If you code `mla_debug=true` you will see a lot of information added to the post or page containing the gallery. Of course, this parameter should <strong>only</strong> be used in a development/debugging environment; it's quite ugly.
359
+
360
+ == MLA Gallery Style and Markup Templates ==
361
+
362
+ <p>
363
+ The Style and Markup templates give you great flexibility for the content and format of each <code>[mla_gallery]</code>. You can define as many templates as you need.
364
+ </p>
365
+ Style templates provide gallery-specific CSS inline styles. Markup templates provide the HTML markup for 1) the beginning of the gallery, 2) the beginning of each row, 3) each gallery item, 4) the end of each row and 5) the end of the gallery. The attachment-specific markup parameters let you choose among most of the attachment fields, not just the caption.
366
+ <p>
367
+ The MLA Gallery tab on the Settings page lets you add, change and delete custom templates. The default tempates are also displayed on this tab for easy reference.
368
+ </p>
369
+ <p>
370
+ In a template, substitution parameters are surrounded by opening ('[+') and closing ('+]') tags to separate them from the template text; see the default templates for many examples.
371
+ </p>
372
+ <h4>Substitution parameters for style templates</h4>
373
+ * `mla_style`: shortcode parameter, default = 'default'
374
+ * `instance`: starts at '1', incremented for each additional shortcode in the post/page
375
+ * `id`: post_ID of the post/page in which the gallery appears
376
+ * `itemtag`: shortcode parameter, default = 'dl'
377
+ * `icontag`: shortcode parameter, default = 'dt'
378
+ * `captiontag`: shortcode parameter, default = 'dd'
379
+ * `columns`: shortcode parameter, default = '3'
380
+ * `itemwidth`: '100' if 'columns' is zero, or 100/columns, e.g., '33' if columns is '3'
381
+ * `float`: 'right' if current locale is RTL, 'left' if not
382
+ * `selector`: "mla_gallery-{$instance}", e.g., mla_gallery-1
383
+ * `size_class`: shortcode 'size' parameter, default = 'thumbnail'</td>
384
+ <h4>Substitution parameters for markup templates</h4>
385
+ * `mla_markup`: shortcode parameter, default = 'default'
386
+ * `instance`: starts at '1', incremented for each additional shortcode in the post/page
387
+ * `id`: post_ID of the post/page in which the gallery appears
388
+ * `itemtag`: shortcode parameter, default = 'dl'
389
+ * `icontag`: shortcode parameter, default = 'dt'
390
+ * `captiontag`: shortcode parameter, default = 'dd'
391
+ * `columns`: shortcode parameter, default = '3'
392
+ * `itemwidth`: '100' if 'columns' is zero, or 100/columns, e.g., '33' if columns is '3'
393
+ * `float`: 'right' if current locale is RTL, 'left' if not
394
+ * `selector`: "mla_gallery-{$instance}", e.g., mla_gallery-1
395
+ * `size_class`: shortcode 'size' parameter, default = 'thumbnail'. If this parameter contains "none" or an empty string (size="") the attachment title will be displayed instead of the image/icon.
396
+ * `base_url`: absolute URL to the upload directory, without trailing slash
397
+ * `base_dir`: full path to the upload directory, without trailing slash
398
+
399
+ <h4>Attachment-specific substitution parameters for markup templates</h4>
400
+ * `index`: starts at '1', incremented for each attachment in the gallery
401
+ * `caption`: if captiontag is not empty, contains caption/post_excerpt
402
+ * `excerpt`: always contains post_excerpt
403
+ * `attachment_ID`: attachment post_ID
404
+ * `mime_type`: attachment post_mime_type
405
+ * `menu_order`: attachment menu_order
406
+ * `date`: attachment post_date
407
+ * `modified`: attachment post_modified
408
+ * `parent`: attachment post_parent (ID)
409
+ * `parent_title`: post_title of the parent, or '(unattached)'
410
+ * `parent_type`: 'post', 'page' or custom post type of the parent
411
+ * `parent_date`: upload date of the parent
412
+ * `title`: attachment post_title
413
+ * `slug`: attachment post_name
414
+ * `width`: width in pixels, for image types
415
+ * `height`: height in pixels, for image types
416
+ * `image_meta`: image metadata, for image types
417
+ * `image_alt`: ALT text, for image types
418
+ * `base_file`: path and file name relative to uploads directory
419
+ * `path`: path portion of base_file
420
+ * `file`: file name portion of base_file
421
+ * `description`: attachment post_content
422
+ * `file_url`: attachment guid
423
+ * `author_id`: attachment post_author
424
+ * `author`: author display_name, or 'unknown'
425
+ * `link`: hyperlink to the attachment page (default) or file (shortcode 'link' parameter = "file")
426
+ * `pagelink`: always contains a hyperlink to the attachment page
427
+ * `filelink`: always contains a hyperlink to the attachment file
428
+ * `link_url`: the URL portion of `link`
429
+ * `pagelink_url`: the URL portion of `pagelink`
430
+ * `filelink_url`: the URL portion of `filelink`
431
+ * `thumbnail_content`: complete content of the gallery item link. This will either be an image (img) tag or a text string for non-image items.
432
+ * `thumbnail_width`: for image/icon items, width of the gallery image/icon
433
+ * `thumbnail_height`: for image/icon items, height of the gallery image/icon
434
+ * `thumbnail_url`: for image/icon items, URL of the gallery image/icon
435
+ <h3>A Table-based Template Example</h3>
436
+ <p>
437
+ Here's a small example that shows a gallery using table markup.
438
+ </p>
439
+ <h4>Style Template</h4>
440
+
441
+ <style type='text/css'>
442
+ #[+selector+] {
443
+ margin: auto;
444
+ }
445
+ #[+selector+] .gallery-row {
446
+ float: [+float+];
447
+ margin-top: 10px;
448
+ border-top: 1px solid #ddd;
449
+ text-align: center;
450
+ width: [+itemwidth+]%;
451
+ }
452
+ #[+selector+] .gallery-row td.gallery-icon {
453
+ width: 60;
454
+ height: 60;
455
+ vertical-align: top;
456
+ }
457
+ #[+selector+] .gallery-row .gallery-icon img {
458
+ border: 2px solid #cfcfcf;
459
+ }
460
+ #[+selector+] .gallery-caption {
461
+ margin-left: 0;
462
+ vertical-align: top;
463
+ }
464
+ </style>
465
+
466
+ <h4>Markup Template</h4>
467
+ <h5>Open</h5>
468
+
469
+ <table id='[+selector+]' class='gallery galleryid-[+id+]<br />gallery-columns-[+columns+] gallery-size-[+size_class+]'>
470
+
471
+ <h5>Row Open</h5>
472
+
473
+ <tr class='gallery-row'>
474
+
475
+ <h5>Item</h5>
476
+
477
+ <td class='gallery-icon'>
478
+ [+link+]
479
+ </td>
480
+ <td class='wp-caption-text gallery-caption'>
481
+ <strong>[+title+]</strong><br />
482
+ [+description+]<br />
483
+ [+date+]
484
+ </td>
485
+
486
+ <h5>Row Close</h5>
487
+
488
+ </tr>
489
+
490
+ <h5>Close</h5>
491
+
492
+ </table>
493
+
494
+ == Online Help Summary ==
495
 
496
  <p><strong><em>Assistant Submenu - Attachment List Table</em></strong></p>
497
+ <h4>Overview</h4>
498
  <p>All the files you&#8217;ve uploaded are listed in the Media Library Assistant table, ordered by the Title field. You can change the sort order by clicking on one of the blue column names. You can change the default sort order on the Settings screen.</p>
499
  <p>You can use the Screen Options tab to customize the display of this screen. You can choose any combination of the sixteen (16) columns available for display. You can also choose how many items appear on each page of the display.</p>
500
  <p>You can narrow the list by file type/status using the text link filters at the top of the screen. You also can refine the list by month using the dropdown menu above the media table.</p>
501
  <p>If you have selected &#8220;Attachment Categories&#8221; support, you can filter the list by selecting &#8220;All Categories&#8221;, &#8220;No Categories&#8221; or a specific category from the drop down list. If you select a category that has child categories beneath it, attachments in any of the child categories will also appear in the filtered list.</p>
502
  <p><strong>NOTE:</strong> Month and category filters are &#8220;sticky&#8221;, i.e., they will persist as you resort the display or change the file type/status view.</p>
503
+ <h4>Featured/Inserted</h4>
504
  <p>The &#8220;Featured in&#8221; and &#8220;Inserted in&#8221; columns are a powerful tool for managing your attachments. They show you where each attachment is used in a post or page as a &#8220;Featured Image&#8221; or as an embedded image or link.</p>
505
  <p>You can also use the information in the &#8220;Title/Name&#8221; column to identify &#8220;Orphan&#8221; items that are not used in any post or page and items with a &#8220;Bad Parent&#8221; (a parent that does contain any reference to the item) or an &#8220;Invalid Parent&#8221; (a parent that does not exist).</p>
506
+ <h4>Gallery/MLA Gallery</h4>
507
  <p>The &#8220;Gallery in&#8221; and &#8220;MLA Gallery in&#8221; columns are a powerful tool for managing your attachments. They show you where each attachment is returned by a <code>[gallery]</code> or <code>[mla_gallery]</code> shortcode in a post or page. These columns do <strong>not</strong> use the post_parent (attached to) status of the item; they actually execute each shortcode and tabulate the attachments they return.</p>
508
  <p>You can also use the information in the &#8220;Title/Name&#8221; column to identify &#8220;Orphan&#8221; items that are not used in any post or page and items with a &#8220;Bad Parent&#8221; (a parent that does contain any reference to the item) or an &#8220;Invalid Parent&#8221; (a parent that does not exist).</p>
509
+ <h4>Taxonomy Support</h4>
510
  <p>The &#8220;taxonomy&#8221; columns help you to group attachments by subject and keyword values. The columns list any categories and tags associated with the item. You can click on one of the displayed values to get a list of all items associated with that value.</p>
511
  <p>The Media Library Assistant provides two pre-defined taxonomies, &#8220;Att. Categories&#8221; and &#8220;Att. Tags&#8221; which are enabled by default. You can add or remove support for any registered taxonomy on the Settings screen. The standard WordPress Categories and Tags as well as any custom taxonomies can be supported.</p>
512
  <p>When you add support for a taxonomy it is visible on the main screen. If you want to hide the column simply use the Screen Options to uncheck the Show on screen box.</p>
513
  <p>Supported taxonomies also appear as submenus below the Media menu at the left of the screen. You can edit the taxonomy terms by clicking these submenus. The taxonomy edit screens include an &#8220;Attachments&#8221; column which displays the number of attachment objects for each term. You can display a filtered list of the attachments by clicking on the number in this column.</p>
514
+ <h4>Search Media</h4>
515
  <p>The &#8220;Search Media&#8221; box supports a keyword search of several attachment fields; enter words and/or phrases in the box, separated by spaces. Click the Search Media button for a case-insensitive "SQL LIKE" search. Each keyword in the search phrase is matched independently, so the order of search words does not have to match the order in the text. For example, searching on "friend" and "best" will match "Best Friend". If you put quotes around a search phrase then word order is required for a match (and spaces between words must match as well). You can also match on partial words, e.g., "rien" will match "friend".</p>
516
  <p>Once you&#8217;ve entered the terms you want, use the options below the box to tailor your search. You can pick the connector used between search terms; "or" means any of the terms will match, "and" means all of the terms must match. Use the checkboxes to extend your search to more fields in the database.</p>
517
+ <h4>Bulk Actions</h4>
518
  <p>The &#8220;Bulk Actions&#8221; dropdown list works with the check box column to let you make changes to many items at once. Click the check box in the column title row to select all items on the page, or click the check box in a row to select items individually.</p>
519
  <p>Once you&#8217;ve selected the items you want, pick an action from the dropdown list and click Apply to perform the action on the selected items. The available actions will vary depending on the file type/status view you have picked.</p>
520
  <p>If you have enabled Trash support (define MEDIA_TRASH in wp-config.php) you can use bulk actions to move items to and from the Trash or delete them permamently.</p>
521
  <p>When using Bulk Edit, you can change the metadata (author, parent, taxonomy terms) for all selected attachments at once. To remove an attachment from the grouping, just click the x next to its name in the left column of the Bulk Edit area.</p>
522
  <p>Bulk Edit support for taxonomy terms allows you to <strong>add, remove or completely replace</strong> terms for the selected attachments. Below each taxonomy edit box are three radio buttons that let you select the action you&#8217;d like to perform.</p>
523
  <p>The taxonomies that appear in the Bulk Edit area can be a subset of the taxonomies supported on the single item edit screen. You can select which taxonomies appear by entering your choice(s) on the Media Libray Assistant Settings screen.</p>
524
+ <h4>Available Actions</h4>
525
  <p>Hovering over a row reveals action links such as Edit, Quick Edit, Move to Trash and Delete Permanently. Clicking Edit displays a simple screen to edit that individual file&#8217;s metadata. Clicking Move to Trash will assign the file to the Trash pile but will not affect pages or posts to which it is attached. Clicking Delete Permanently will delete the file from the media library (as well as from any posts to which it is currently attached). Clicking Quick Edit displays an inline form to edit the file's metadata without leaving the menu screen.</p>
526
  <p>The taxonomies that appear in the Quick Edit area can be a subset of the taxonomies supported on the single item edit screen. You can select which taxonomies appear by entering your choice(s) on the Media Libray Assistant Settings screen.</p>
527
+ <h4>Attaching Files</h4>
528
  <p>If a media file has not been attached to any post, you will see (unattached) in the Attached To column. You can click on the Edit or Quick Edit action to attach the file by assigning a value to the Parent ID field.</p>
529
  <p><strong><em>Single Item Edit Screen</em></strong></p>
530
+ <h4>Overview</h4>
531
  <p>This screen allows you to view many of the fields associated with an attachment and to edit several of them. Fields that are read-only have a light gray background; fields that may be changes have a white background. Hints and helpful information appear below some fields.</p>
532
  <p>Remember to click the &#8220;Update&#8221; button to save your work. You may instead click the &#8220;Cancel&#8221; button to discard any changes.</p>
533
+ <h4>Taxonomies</h4>
534
  <p>If there are custom taxonomies, such as &#8220;Attachment Categories&#8221; or &#8220;Attachment Tags&#8221;, registered for attachments they will apppear in the right-hand column on this screen. You can add or remove terms from any of the taxonomies displayed. Changes will not be saved until you click the &#8220;Update&#8221; button for the attachment.</p>
535
+ <h4>Parent Info</h4>
536
  <p>The &#8220;Parent Info&#8221; field displays the Post ID, type and title of the post or page to which the item is attached. It will display &#8220;0 (unattached)&#8221; if there is no parent post or page.</p>
537
  <p>You can change the post or page to which the item is attached by changing the Post ID value and clicking the &#8220;Update&#8221; button. Changing the Post ID value to zero (0) will &#8220;unattach&#8221; the item.</p>
538
  <p><strong><em>Edit Hierarchical Taxonomies (Categories)</em></strong></p>
539
+ <h4>Overview</h4>
540
  <p>You can use <strong>categories</strong> to define sections of your site and group related attachments. The default is &#8220;none&#8221;, i.e., the attachment is not associated with any category.</p>
541
  <p>What&#8217;s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information about your attachment (names, subjects, etc) that may or may not apply to other attachments, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.</p>
542
  <p>You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.</p>
543
+ <h4>Adding Categories</h4>
544
  <p>When adding a new category on this screen, you&#8217;ll fill in the following fields:</p>
545
  <ul>
546
  <li><strong>Name</strong> - The name is how it appears on your site.</li>
548
  <li><strong>Parent</strong> - Categories, unlike tags, can have a hierarchy. You might have a Landscape category, and under that have children categories for Mountains and Seashore. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.</li>
549
  <li><strong>Description</strong> - The description is not prominent by default; however, some themes may display it.</li>
550
  </ul>
551
+ <h4>Attachments Column</h4>
552
  <p>The &#8220;Attachments&#8221; colunm at the right of the table gives you the number of attachments associated with each category. You can click on the number to get a list of all the attachments with that category. The heading on the list page(s) will display the category value you&#8217;ve selected.</p>
553
  <p><strong><em>Edit Flat Taxonomies (Tags)</em></strong></p>
554
+ <h4>Overview</h4>
555
  <p>You can assign keywords to your attachments using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.</p>
556
  <p>What&#8217;s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information about your attachment (names, subjects, etc.) that may or may not apply to other attachments, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.</p>
557
  <p>You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.</p>
558
+ <h4>Adding Tags</h4>
559
  <p>When adding a new tag on this screen, you&#8217;ll fill in the following fields:</p>
560
  <ul>
561
  <li><strong>Name</strong> - The name is how it appears on your site.</li>
562
  <li><strong>Slug</strong> - The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.</li>
563
  <li><strong>Description</strong> - The description is not prominent by default; however, some themes may display it.</li>
564
  </ul>
565
+ <h4>Attachments Column</h4>
566
  <p>The &#8220;Attachments&#8221; colunm at the right of the table gives you the number of attachments associated with each tag. You can click on the number to get a list of all the attachments with that tag. The heading on the list page(s) will display the tag value you&#8217;ve selected.</p>
tpls/admin-display-settings-page.tpl CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  <!-- template="checkbox" -->
2
  <tr valign="top"><td style="text-align:right;">
3
  <input type="checkbox" name="[+key+]" id="[+key+]" [+checked+] value="[+value+]" />
@@ -10,7 +19,7 @@
10
  <a href="#backtotop">Go to Top</a>
11
  </td></tr>
12
  <tr><td colspan="2">
13
- <h3 id="[+key+]" style="text-align:left;padding-bottom:5px;border-bottom:1px solid #ccc;font-family:georgia,times,serif;margin-bottom:10px;font-size:16pt;color:#666;font-weight:normal;">[+value+]</h3>
14
  </td></tr>
15
  <!-- template="radio" -->
16
  <tr valign="top"><th scope="row" style="text-align:right;">
@@ -58,16 +67,16 @@
58
  <p>
59
  [+messages+]
60
  </p></div>
61
- <!-- template="shortcodelist" -->
62
  <div id="mla-shortcode-list" style="width: 90%; padding-left: 5%; ">
63
  <p>Shortcodes made available by this plugin:</p>
64
  <ol>
65
  [+shortcode_list+]
66
  </ol>
67
  </div>
68
- <!-- template="shortcodeitem" -->
69
  <li><code>[[+name+]]</code> - [+description+]</li>
70
- <!-- template="taxonomytable" -->
71
  <tr valign="top">
72
  <td colspan="2" style="text-align:left;">
73
  <table class="taxonomytable">
@@ -93,7 +102,7 @@
93
  </table>
94
  <div style="font-size:8pt;padding-bottom:10px;">[+help+]</div>
95
  </td></tr>
96
- <!-- template="taxonomyrow" -->
97
  <tr valign="top">
98
  <td style="text-align:center;">
99
  <input type="checkbox" name="tax_support[[+key+]]" id="tax_support_[+key+]" [+support_checked+] value="checked" />
@@ -108,19 +117,21 @@
108
  &nbsp;[+name+]
109
  </td>
110
  </tr>
111
- <!-- template="page" -->
112
- <a name="backtotop"></a><div class="wrap">
113
- <div id="icon-options-general" class="icon32"><br/></div>
114
- <h2>Media Library Assistant [+version+] Settings</h2>
115
- [+messages+]
 
 
116
  [+shortcode_list+]
117
- <form method="post" class="mla-display-settings-page" id="mla-display-settings-page-id">
118
  <table class="optiontable">
119
  [+options_list+]
120
  </table>
121
  <p class="submit" style="padding-bottom: 0;">
122
- <input name="mla-options-save" type="submit" class="button-primary" value="Save Changes" />
123
- <input name="mla-options-reset" type="submit" class="button-primary" value="Delete all options and restore default settings" style="float:right;"/>
124
  </p>
125
  [+_wpnonce+]
126
  [+_wp_http_referer+]
@@ -135,7 +146,99 @@
135
  <td>This plugin was inspired by my work on the WordPress web site for our nonprofit, Fair Trade Judaica. If you find the Media Library Assistant plugin useful and would like to support a great cause, consider a <a href="http://fairtradejudaica.org/make-a-difference/donate/" title="Donate to FTJ" target="_blank" style="font-weight:bold">tax-deductible donation</a> to our work. Thank you!</td>
136
  </tr>
137
  </table>
138
- <h3>Plugin Documentation</h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  <p>
140
  If you are a developer interested in how this plugin is put together, you should
141
  have a look at the <a title="Consult the phpDocs documentation" href="[+phpDocs_url+]" target="_blank" style="font-size:14px; font-weight:bold">phpDocs documentation</a>.
@@ -153,32 +256,64 @@ The [mla_gallery] shortcode is used in a post, page or custom post type to add a
153
  <li>Full support for WordPress categories, tags and custom taxonomies. You can select items with any of the taxonomy parameters documented in the WP_Query class.</li>
154
  <li>Support for all post_mime_type values, not just images.</li>
155
  <li>Media Library items need not be "attached" to the post. You can build a gallery with any combination of items in the Library using taxonomy terms, custom fields and more.</li>
 
156
  </ul>
157
  <p>
158
  All of the options/parameters documented for the [gallery] shortcode are supported by the [mla_gallery] shortcode; you can find them in the WordPress Codex. Most of the parameters documented for the WP_Query class are also supported; see the WordPress Codex. Because the [mla_gallery] shortcode is designed to work with Media Library items, there are some parameter differences and extensions; these are documented below.
159
  </p>
160
- <h4>Include, Exclude</h4>
161
  <p>
162
- You can use "post_parent=all" to include or exclude attachments regardless of which post or page they are attached to. You can use "post_mime_type=all" to include or exclude attachments of all MIME types, not just images.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  </p>
164
  <h4>Size</h4>
165
  <p>
166
- The Size parameter specifies the image size to use for the thumbnail display. Valid values include "thumbnail", "medium", "large", "full" and any other additional image size that was registered with add_image_size(). The default value is "thumbnail". You can use "none" to suppress thumbnail display and substitute the item title string for the image.
167
  </p>
168
  <p>
169
  The [mla_gallery] shortcode supports an additional Size value, "icon", which shows a 60x60 pixel thumbnail for image items and an appropriate icon for non-image items such as PDF or text files.
170
  </p>
171
- <h4>Order, Orderby</h4>
172
  <p>
173
- To order the gallery randomly, use "orderby=rand". To suppress gallery ordering you can use "orderby=none" or "order=rand".
174
  </p>
175
- <p>The Orderby parameter specifies which database field is used to sort the gallery. You can order the gallery by any of the values documented for the WP_Query class reference in the Codex; you are NOT restricted to the values documented for the [gallery] shortcode.
 
176
  </p>
177
- <h4>Post ID, Post Parent</h4>
 
 
 
 
178
  <p>
179
  The "id" parameter lets you specify a post ID for your query. If the "id" parameter is not specified, the [mla_gallery] behavior differs from the [gallery] behavior. If your query uses taxonomy or custom field parameters, "author", "author_name" or "s" (search term), then the query will NOT be restricted to items attached to the current post. This lets you build a gallery with any combination of Media Library items that match the parameters.
180
  </p>
181
  <p>
 
 
 
182
  You can use the "post_parent" to override the default behavior. If you set "post_parent" to a specific post ID, only the items attached to that post are displayed. If you set "post_parent" to "current", only the items attached to the current post are displayed. If you set "post_parent" to "all", the query will not have a post ID or post_parent parameter.
183
  </p>
184
  <p>
@@ -254,5 +389,333 @@ Remember to use "post_parent=current" if you want to restrict your query to item
254
  <p>
255
  The search parameter ("s=keyword") will perform a keyword search. A cursory inspection of the code in /wp-includes/query.php reveals that the search includes the "post_title" and "post_content" (Description) fields but not the "post_excerpt" (Caption) field. An SQL "LIKE" clause is composed and added to the search criteria. I haven't done much testing of this parameter.
256
  </p>
257
- </div>
258
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- template="page" -->
2
+ <a name="backtotop"></a><div class="wrap">
3
+ <div id="icon-options-general" class="icon32"><br/></div>
4
+ <h2>Media Library Assistant [+version+] Settings</h2>
5
+ [+messages+]
6
+ [+tablist+]
7
+ [+tab_content+]
8
+ </div><!-- wrap -->
9
+
10
  <!-- template="checkbox" -->
11
  <tr valign="top"><td style="text-align:right;">
12
  <input type="checkbox" name="[+key+]" id="[+key+]" [+checked+] value="[+value+]" />
19
  <a href="#backtotop">Go to Top</a>
20
  </td></tr>
21
  <tr><td colspan="2">
22
+ <h3 id="[+key+]">[+value+]</h3>
23
  </td></tr>
24
  <!-- template="radio" -->
25
  <tr valign="top"><th scope="row" style="text-align:right;">
67
  <p>
68
  [+messages+]
69
  </p></div>
70
+ <!-- template="shortcode-list" -->
71
  <div id="mla-shortcode-list" style="width: 90%; padding-left: 5%; ">
72
  <p>Shortcodes made available by this plugin:</p>
73
  <ol>
74
  [+shortcode_list+]
75
  </ol>
76
  </div>
77
+ <!-- template="shortcode-item" -->
78
  <li><code>[[+name+]]</code> - [+description+]</li>
79
+ <!-- template="taxonomy-table" -->
80
  <tr valign="top">
81
  <td colspan="2" style="text-align:left;">
82
  <table class="taxonomytable">
102
  </table>
103
  <div style="font-size:8pt;padding-bottom:10px;">[+help+]</div>
104
  </td></tr>
105
+ <!-- template="taxonomy-row" -->
106
  <tr valign="top">
107
  <td style="text-align:center;">
108
  <input type="checkbox" name="tax_support[[+key+]]" id="tax_support_[+key+]" [+support_checked+] value="checked" />
117
  &nbsp;[+name+]
118
  </td>
119
  </tr>
120
+ <!-- template="tablist" -->
121
+ <h2 class="nav-tab-wrapper">
122
+ [+tablist+]
123
+ </h2>
124
+ <!-- template="tablist-item" -->
125
+ <a data-tab-id="[+data-tab-id+]" class="nav-tab [+nav-tab-active+]" href="?page=[+settings-page+]&amp;mla_tab=[+data-tab-id+]">[+title+]</a>
126
+ <!-- template="general-tab" -->
127
  [+shortcode_list+]
128
+ <form method="post" class="mla-display-settings-page" id="mla-display-settings-general-tab">
129
  <table class="optiontable">
130
  [+options_list+]
131
  </table>
132
  <p class="submit" style="padding-bottom: 0;">
133
+ <input name="mla-general-options-save" type="submit" class="button-primary" value="Save Changes" />
134
+ <input name="mla-general-options-reset" type="submit" class="button-primary" value="Delete General options and restore default settings" style="float:right;"/>
135
  </p>
136
  [+_wpnonce+]
137
  [+_wp_http_referer+]
146
  <td>This plugin was inspired by my work on the WordPress web site for our nonprofit, Fair Trade Judaica. If you find the Media Library Assistant plugin useful and would like to support a great cause, consider a <a href="http://fairtradejudaica.org/make-a-difference/donate/" title="Donate to FTJ" target="_blank" style="font-weight:bold">tax-deductible donation</a> to our work. Thank you!</td>
147
  </tr>
148
  </table>
149
+ <!-- template="mla-gallery-default" -->
150
+ <td colspan="2" width="500">
151
+ <div style="font-size:8pt;padding-bottom:10px;">[+help+]</div>
152
+ </td>
153
+ <!-- template="mla-gallery-delete" -->
154
+ <td width="1%" style="text-align:right;">
155
+ <input type="checkbox" name="[+name+]" id="[+id+]" value="[+value+]" />
156
+ </td><td width="500">
157
+ &nbsp;<strong>[+value+]</strong>
158
+ <div style="font-size:8pt;padding-bottom:10px;">&nbsp;[+help+]</div>
159
+ </td>
160
+ <!-- template="mla-gallery-style" -->
161
+ <table width="700">
162
+ <tr valign="top"><th width="1%" scope="row" style="text-align:right;">
163
+ Name:
164
+ </th><td width="1%" style="text-align:left;">
165
+ <input name="[+name_name+]" id="[+name_id+]" type="text" size="15" [+readonly+] value="[+name_text+]" />
166
+ </td>
167
+ [+control_cells+]
168
+ </tr>
169
+ <tr valign="top"><th scope="row" style="text-align:right;">
170
+ Styles:
171
+ </th><td colspan="3" style="text-align:left;">
172
+ <textarea name="[+value_name+]" id="[+value_id+]" rows="11" cols="100" [+readonly+]>[+value_text+]</textarea>
173
+ <div style="font-size:8pt;padding-bottom:5px;">&nbsp;&nbsp;[+value_help+]</div>
174
+ </td></tr>
175
+ </table>
176
+ <!-- template="mla-gallery-markup" -->
177
+ <table width="700">
178
+ <tr valign="top"><th width="1%" scope="row" style="text-align:right;">
179
+ Name:
180
+ </th><td width="1%" style="text-align:left;">
181
+ <input name="[+name_name+]" id="[+name_id+]" type="text" size="15" [+readonly+] value="[+name_text+]" />
182
+ </td>
183
+ [+control_cells+]
184
+ </tr>
185
+ <tr valign="top"><th scope="row" style="text-align:right;">
186
+ Open:
187
+ </th><td colspan="3" style="text-align:left;">
188
+ <textarea name="[+open_name+]" id="[+open_id+]" rows="3" cols="100" [+readonly+]>[+open_text+]</textarea>
189
+ <div style="font-size:8pt;padding-bottom:5px;">&nbsp;&nbsp;[+open_help+]</div>
190
+ </td></tr>
191
+ <tr valign="top"><th scope="row" style="text-align:right;">
192
+ Row&nbsp;Open:
193
+ </th><td colspan="3" style="text-align:left;">
194
+ <textarea name="[+row_open_name+]" id="[+row_open_id+]" rows="3" cols="100" [+readonly+]>[+row_open_text+]</textarea>
195
+ <div style="font-size:8pt;padding-bottom:5px;">&nbsp;&nbsp;[+row_open_help+]</div>
196
+ </td></tr>
197
+ <tr valign="top"><th scope="row" style="text-align:right;">
198
+ Item:
199
+ </th><td colspan="3" style="text-align:left;">
200
+ <textarea name="[+item_name+]" id="[+item_id+]" rows="6" cols="100" [+readonly+]>[+item_text+]</textarea>
201
+ <div style="font-size:8pt;padding-bottom:5px;">&nbsp;&nbsp;[+item_help+]</div>
202
+ </td></tr>
203
+ <tr valign="top"><th scope="row" style="text-align:right;">
204
+ Row&nbsp;Close:
205
+ </th><td colspan="3" style="text-align:left;">
206
+ <textarea name="[+row_close_name+]" id="[+row_close_id+]" rows="3" cols="100" [+readonly+]>[+row_close_text+]</textarea>
207
+ <div style="font-size:8pt;padding-bottom:5px;">&nbsp;&nbsp;[+row_close_help+]</div>
208
+ </td></tr>
209
+ <tr valign="top"><th scope="row" style="text-align:right;">
210
+ Close:
211
+ </th><td colspan="3" style="text-align:left;">
212
+ <textarea name="[+close_name+]" id="[+close_id+]" rows="3" cols="100" [+readonly+]>[+close_text+]</textarea>
213
+ <div style="font-size:8pt;padding-bottom:5px;">&nbsp;&nbsp;[+close_help+]</div>
214
+ </td></tr>
215
+ </table>
216
+ <hr width="650" align="left" />
217
+ <!-- template="mla-gallery-tab" -->
218
+ <h3>MLA Gallery Options</h3>
219
+ <p><a href="#markup">Go to Markup Templates</a></p>
220
+ <form method="post" class="mla-display-settings-page" id="mla-display-settings-mla-gallery-tab">
221
+ [+options_list+]
222
+ <h4>Style Templates</h4>
223
+ <table class="optiontable">
224
+ [+style_options_list+]
225
+ </table>
226
+ <a name="markup">&nbsp;<br /></a><h4>Markup Templates</h4>
227
+ <table class="optiontable">
228
+ [+markup_options_list+]
229
+ </table>
230
+ <p class="submit" style="padding-bottom: 0;">
231
+ <input name="mla-gallery-options-save" type="submit" class="button-primary" value="Save Changes" />
232
+ </p>
233
+ [+_wpnonce+]
234
+ [+_wp_http_referer+]
235
+ </form>
236
+ <!-- template="documentation-tab" -->
237
+ <div class="mla-display-settings-page" id="mla-display-settings-documentation-tab">
238
+ <p>
239
+ <a href="#mla_gallery_templates">Go to <strong>Style and Markup Templates</strong></a>
240
+ </p>
241
+ <h3>Plugin Code Documentation</h3>
242
  <p>
243
  If you are a developer interested in how this plugin is put together, you should
244
  have a look at the <a title="Consult the phpDocs documentation" href="[+phpDocs_url+]" target="_blank" style="font-size:14px; font-weight:bold">phpDocs documentation</a>.
256
  <li>Full support for WordPress categories, tags and custom taxonomies. You can select items with any of the taxonomy parameters documented in the WP_Query class.</li>
257
  <li>Support for all post_mime_type values, not just images.</li>
258
  <li>Media Library items need not be "attached" to the post. You can build a gallery with any combination of items in the Library using taxonomy terms, custom fields and more.</li>
259
+ <li>Control over the styles, markup and content of each gallery using the Style and Markup Templates documented below.</li>
260
  </ul>
261
  <p>
262
  All of the options/parameters documented for the [gallery] shortcode are supported by the [mla_gallery] shortcode; you can find them in the WordPress Codex. Most of the parameters documented for the WP_Query class are also supported; see the WordPress Codex. Because the [mla_gallery] shortcode is designed to work with Media Library items, there are some parameter differences and extensions; these are documented below.
263
  </p>
264
+ <h4>Gallery Display Content</h4>
265
  <p>
266
+ Three `[mla_gallery]` parameters provide an easy way to control the contents of gallery items without requiring the use of custom Markup templates.
267
+ </p>
268
+ <table>
269
+ <tr>
270
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">mla_link_text</td>
271
+ <td>replaces the thumbnail image or attachment title text displayed for each gallery item</td>
272
+ </tr>
273
+ <tr>
274
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">mla_rollover_text</td>
275
+ <td>replaces the attachment title text displayed when the mouse rolls or hovers over the gallery thumbnai</td>
276
+ </tr>
277
+ <tr>
278
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">mla_caption</td>
279
+ <td>replaces the attachment caption text displayed beneath the thumbnail of each gallery item</td>
280
+ </tr>
281
+ </table>
282
+ <p>
283
+ All three of these parameters support the Markup and Attachment-specific substitution arguments defined for Markup Templates. For example, if you code `mla_rollover_text="{+date+} : {+description+}"`, the rollover text will contain the upload date, a colon, and the full description of each gallery item. Simply add "{+" before the substitution parameter name and add "+}" after the name. Note that the enclosing delimiters are different than those used in the templates, since the shortcode parser reserves square brackets ("[" and "]") for its own use.
284
+ </p>
285
+ <h4>Order, Orderby</h4>
286
+ <p>
287
+ To order the gallery randomly, use "orderby=rand". To suppress gallery ordering you can use "orderby=none" or "order=rand".
288
+ </p>
289
+ <p>The Orderby parameter specifies which database field is used to sort the gallery. You can order the gallery by any of the values documented for the WP_Query class reference in the Codex; you are NOT restricted to the values documented for the [gallery] shortcode.
290
  </p>
291
  <h4>Size</h4>
292
  <p>
293
+ The Size parameter specifies the image size to use for the thumbnail display. Valid values include "thumbnail", "medium", "large", "full" and any additional image size that was registered with add_image_size(). The default value is "thumbnail". You can use "none" or "" to suppress thumbnail display and substitute the item title string for the image/icon.
294
  </p>
295
  <p>
296
  The [mla_gallery] shortcode supports an additional Size value, "icon", which shows a 60x60 pixel thumbnail for image items and an appropriate icon for non-image items such as PDF or text files.
297
  </p>
298
+ <h4>Link</h4>
299
  <p>
300
+ The Link parameter specifies the target for the link from the gallery to the attachment. The default value, "permalink", links to the attachment's media page. The "file" and "full" values link directly to the attachment file.
301
  </p>
302
+ <p>
303
+ For image attachments you can also specify the size of the image file you want to link to. Valid values include "thumbnail", "medium", "large" and any additional image size that was registered with add_image_size(). If the specified size is not available or if the attachment is not an image, the link will go directly to the attachment file.
304
  </p>
305
+ <h4>Include, Exclude</h4>
306
+ <p>
307
+ You can use "post_parent=all" to include or exclude attachments regardless of which post or page they are attached to. You can use "post_mime_type=all" to include or exclude attachments of all MIME types, not just images.
308
+ </p>
309
+ <h4>Post ID, "ids", Post Parent</h4>
310
  <p>
311
  The "id" parameter lets you specify a post ID for your query. If the "id" parameter is not specified, the [mla_gallery] behavior differs from the [gallery] behavior. If your query uses taxonomy or custom field parameters, "author", "author_name" or "s" (search term), then the query will NOT be restricted to items attached to the current post. This lets you build a gallery with any combination of Media Library items that match the parameters.
312
  </p>
313
  <p>
314
+ For WordPress 3.5 and later, the "ids" parameter lets you specify a list of Post IDs. The attachment(s) matching the "ids" values will be displayed in the order specified by the list.
315
+ </p>
316
+ <p>
317
  You can use the "post_parent" to override the default behavior. If you set "post_parent" to a specific post ID, only the items attached to that post are displayed. If you set "post_parent" to "current", only the items attached to the current post are displayed. If you set "post_parent" to "all", the query will not have a post ID or post_parent parameter.
318
  </p>
319
  <p>
389
  <p>
390
  The search parameter ("s=keyword") will perform a keyword search. A cursory inspection of the code in /wp-includes/query.php reveals that the search includes the "post_title" and "post_content" (Description) fields but not the "post_excerpt" (Caption) field. An SQL "LIKE" clause is composed and added to the search criteria. I haven't done much testing of this parameter.
391
  </p>
392
+ <h4>Debugging Output</h4>
393
+ <p>
394
+ The "mla_debug" parameter controls the display of information about the query parameters and SQL statements used to retrieve gallery items. If you code `mla_debug=true` you will see a lot of information added to the post or page containing the gallery. Of course, this parameter should <strong>only</strong> be used in a development/debugging environment; it's quite ugly.
395
+ </p>
396
+ <a name="mla_gallery_templates"></a>
397
+ &nbsp;
398
+ <p>
399
+ <a href="#backtotop">Go to Top</a>
400
+ </p>
401
+ <div class="mla_gallery_help" style="width:700px">
402
+ <h3>MLA Gallery Style and Markup Templates</h3>
403
+ <p>
404
+ The Style and Markup templates give you great flexibility for the content and format of each <code>[mla_gallery]</code>. You can define as many templates as you need.
405
+ </p>
406
+ Style templates provide gallery-specific CSS inline styles. Markup templates provide the HTML markup for 1) the beginning of the gallery, 2) the beginning of each row, 3) each gallery item, 4) the end of each row and 5) the end of the gallery. The attachment-specific markup parameters let you choose among most of the attachment fields, not just the caption.
407
+ <p>
408
+ The MLA Gallery tab on the Settings page lets you add, change and delete custom templates. The default tempates are also displayed on this tab for easy reference.
409
+ </p>
410
+ <p>
411
+ In a template, substitution parameters are surrounded by opening ('[+') and closing ('+]') tags to separate them from the template text; see the default templates for many examples.
412
+ </p>
413
+ <h4>Substitution parameters for style templates</h4>
414
+ <table>
415
+ <tr>
416
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">mla_style</td>
417
+ <td>shortcode parameter, default = 'default'</td>
418
+ </tr>
419
+ <tr>
420
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">instance</td>
421
+ <td>starts at '1', incremented for each additional shortcode in the post/page</td>
422
+ </tr>
423
+ <tr>
424
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">id</td>
425
+ <td>post_ID of the post/page in which the gallery appears</td>
426
+ </tr>
427
+ <tr>
428
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">itemtag</td>
429
+ <td>shortcode parameter, default = 'dl'</td>
430
+ </tr>
431
+ <tr>
432
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">icontag</td>
433
+ <td>shortcode parameter, default = 'dt'</td>
434
+ </tr>
435
+ <tr>
436
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">captiontag</td>
437
+ <td>shortcode parameter, default = 'dd'</td>
438
+ </tr>
439
+ <tr>
440
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">columns</td>
441
+ <td>shortcode parameter, default = '3'</td>
442
+ </tr>
443
+ <tr>
444
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">itemwidth</td>
445
+ <td>'100' if 'columns' is zero, or 100/columns, e.g., '33' if columns is '3'</td>
446
+ </tr>
447
+ <tr>
448
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">float</td>
449
+ <td>'right' if current locale is RTL, 'left' if not</td>
450
+ </tr>
451
+ <tr>
452
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">selector</td>
453
+ <td>"mla_gallery-{$instance}", e.g., mla_gallery-1</td>
454
+ </tr>
455
+ <tr>
456
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">size_class</td>
457
+ <td>shortcode 'size' parameter, default = 'thumbnail'</td>
458
+ </tr>
459
+ </table>
460
+ <h4>Substitution parameters for markup templates</h4>
461
+ <table>
462
+ <tr>
463
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">mla_markup</td>
464
+ <td>shortcode parameter, default = 'default'</td>
465
+ </tr>
466
+ <tr>
467
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">instance</td>
468
+ <td>starts at '1', incremented for each additional shortcode in the post/page</td>
469
+ </tr>
470
+ <tr>
471
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">id</td>
472
+ <td>post_ID of the post/page in which the gallery appears</td>
473
+ </tr>
474
+ <tr>
475
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">itemtag</td>
476
+ <td>shortcode parameter, default = 'dl'</td>
477
+ </tr>
478
+ <tr>
479
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">icontag</td>
480
+ <td>shortcode parameter, default = 'dt'</td>
481
+ </tr>
482
+ <tr>
483
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">captiontag</td>
484
+ <td>shortcode parameter, default = 'dd'</td>
485
+ </tr>
486
+ <tr>
487
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">columns</td>
488
+ <td>shortcode parameter, default = '3'</td>
489
+ </tr>
490
+ <tr>
491
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">itemwidth</td>
492
+ <td>'100' if 'columns' is zero, or 100/columns, e.g., '33' if columns is '3'</td>
493
+ </tr>
494
+ <tr>
495
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">float</td>
496
+ <td>'right' if current locale is RTL, 'left' if not</td>
497
+ </tr>
498
+ <tr>
499
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">selector</td>
500
+ <td>"mla_gallery-{$instance}", e.g., mla_gallery-1</td>
501
+ </tr>
502
+ <tr>
503
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">size_class</td>
504
+ <td>shortcode 'size' parameter, default = "thumbnail". If this parameter contains "none" or an empty string (size="") the attachment title will be displayed instead of the image/icon.</td>
505
+ </tr>
506
+ <tr>
507
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">base_url</td>
508
+ <td>absolute URL to the upload directory, without trailing slash</td>
509
+ </tr>
510
+ <tr>
511
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">base_dir</td>
512
+ <td>full path to the upload directory, without trailing slash</td>
513
+ </tr>
514
+ </table>
515
+ <h4>Attachment-specific substitution parameters for markup templates</h4>
516
+ <table>
517
+ <tr>
518
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">index</td>
519
+ <td>starts at '1', incremented for each attachment in the gallery</td>
520
+ </tr>
521
+ <tr>
522
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">caption</td>
523
+ <td>if captiontag is not empty, contains caption/post_excerpt</td>
524
+ </tr>
525
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">excerpt</td>
526
+ <td>always contains post_excerpt</td>
527
+ </tr>
528
+ <tr>
529
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">attachment_ID</td>
530
+ <td>attachment post_ID</td>
531
+ </tr>
532
+ <tr>
533
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">mime_type</td>
534
+ <td>attachment post_mime_type</td>
535
+ </tr>
536
+ <tr>
537
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">menu_order</td>
538
+ <td>attachment menu_order</td>
539
+ </tr>
540
+ <tr>
541
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">date</td>
542
+ <td>attachment post_date</td>
543
+ </tr>
544
+ <tr>
545
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">modified</td>
546
+ <td>attachment post_modified</td>
547
+ </tr>
548
+ <tr>
549
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">parent</td>
550
+ <td>attachment post_parent (ID)</td>
551
+ </tr>
552
+ <tr>
553
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">parent_title</td>
554
+ <td>post_title of the parent, or '(unattached)'</td>
555
+ </tr>
556
+ <tr>
557
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">parent_type</td>
558
+ <td>'post', 'page' or custom post type of the parent</td>
559
+ </tr>
560
+ <tr>
561
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">parent_date</td>
562
+ <td>upload date of the parent</td>
563
+ </tr>
564
+ <tr>
565
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">title</td>
566
+ <td>attachment post_title</td>
567
+ </tr>
568
+ <tr>
569
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">slug</td>
570
+ <td>attachment post_name</td>
571
+ </tr>
572
+ <tr>
573
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">width</td>
574
+ <td>width in pixels, for image types</td>
575
+ </tr>
576
+ <tr>
577
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">height</td>
578
+ <td>height in pixels, for image types</td>
579
+ </tr>
580
+ <tr>
581
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">image_meta</td>
582
+ <td>image metadata, for image types</td>
583
+ </tr>
584
+ <tr>
585
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">image_alt</td>
586
+ <td>ALT text, for image types</td>
587
+ </tr>
588
+ <tr>
589
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">base_file</td>
590
+ <td>path and file name relative to uploads directory</td>
591
+ </tr>
592
+ <tr>
593
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">path</td>
594
+ <td>path portion of base_file</td>
595
+ </tr>
596
+ <tr>
597
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">file</td>
598
+ <td>file name portion of base_file</td>
599
+ </tr>
600
+ <tr>
601
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">description</td>
602
+ <td>attachment post_content</td>
603
+ </tr>
604
+ <tr>
605
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">file_url</td>
606
+ <td>attachment guid</td>
607
+ </tr>
608
+ <tr>
609
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">author_id</td>
610
+ <td>attachment post_author</td>
611
+ </tr>
612
+ <tr>
613
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">author</td>
614
+ <td>author display_name, or 'unknown'</td>
615
+ </tr>
616
+ <tr>
617
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">link</td>
618
+ <td>hyperlink to the attachment page (default) or file (shortcode 'link' parameter = "file")</td>
619
+ </tr>
620
+ <tr>
621
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">pagelink</td>
622
+ <td>always contains a hyperlink to the attachment page</td>
623
+ </tr>
624
+ <tr>
625
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">filelink</td>
626
+ <td>always contains a hyperlink to the attachment file</td>
627
+ </tr>
628
+ <tr>
629
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">link_url</td>
630
+ <td>the URL portion of <em>link</em></td>
631
+ </tr>
632
+ <tr>
633
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">pagelink_url</td>
634
+ <td>the URL portion of <em>pagelink</em></td>
635
+ </tr>
636
+ <tr>
637
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">filelink_url</td>
638
+ <td>the URL portion of <em>filelink</em></td>
639
+ </tr>
640
+ <tr>
641
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">thumbnail_content</td>
642
+ <td>complete content of the gallery item link. This will either be an "&lt;img ... &gt;" tag<br />or a text string for non-image items</td>
643
+ </tr>
644
+ <tr>
645
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">thumbnail_width</td>
646
+ <td>for image/icon items, width of the gallery image/icon</td>
647
+ </tr>
648
+ <tr>
649
+ <tr>
650
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">thumbnail_height</td>
651
+ <td>for image/icon items, height of the gallery image/icon</td>
652
+ </tr>
653
+ <tr>
654
+ <td style="padding-right: 10px; vertical-align: top; font-weight:bold">thumbnail_url</td>
655
+ <td>for image/icon items, URL of the gallery image/icon</td>
656
+ </tr>
657
+ </table>
658
+ <h3>A Table-based Template Example</h3>
659
+ <p>
660
+ Here's a small example that shows a gallery using <code>&lt;table&gt;</code> markup.
661
+ </p>
662
+ <h4>Style Template</h4>
663
+ <code>
664
+ &lt;style type='text/css'&gt;<br />
665
+ &nbsp;&nbsp;#[+selector+] {<br />
666
+ &nbsp;&nbsp;&nbsp;&nbsp;margin: auto;<br />
667
+ &nbsp;&nbsp;}<br />
668
+ &nbsp;&nbsp;#[+selector+] .gallery-row {<br />
669
+ &nbsp;&nbsp;&nbsp;&nbsp;float: [+float+];<br />
670
+ &nbsp;&nbsp;&nbsp;&nbsp;margin-top: 10px;<br />
671
+ &nbsp;&nbsp;&nbsp;&nbsp;border-top: 1px solid #ddd;<br />
672
+ &nbsp;&nbsp;&nbsp;&nbsp;text-align: center;<br />
673
+ &nbsp;&nbsp;&nbsp;&nbsp;width: [+itemwidth+]%;<br />
674
+ &nbsp;&nbsp;}<br />
675
+ &nbsp;&nbsp;#[+selector+] .gallery-row td.gallery-icon {<br />
676
+ &nbsp;&nbsp;&nbsp;&nbsp;width: 60;<br />
677
+ &nbsp;&nbsp;&nbsp;&nbsp;height: 60;<br />
678
+ &nbsp;&nbsp;&nbsp;&nbsp;vertical-align: top;<br />
679
+ &nbsp;&nbsp;}<br />
680
+ &nbsp;&nbsp;#[+selector+] .gallery-row .gallery-icon img {<br />
681
+ &nbsp;&nbsp;&nbsp;&nbsp;border: 2px solid #cfcfcf;<br />
682
+ &nbsp;&nbsp;}<br />
683
+ &nbsp;&nbsp;#[+selector+] .gallery-caption {<br />
684
+ &nbsp;&nbsp;&nbsp;&nbsp;margin-left: 0;<br />
685
+ &nbsp;&nbsp;&nbsp;&nbsp;vertical-align: top;<br />
686
+ &nbsp;&nbsp;}<br />
687
+ &lt;/style&gt;
688
+ </code>
689
+ <h4>Markup Template</h4>
690
+ <table width="700" border="0" cellpadding="5">
691
+ <tr>
692
+ <td style="vertical-align: top; font-weight:bold">Open</td>
693
+ <td><code>&lt;table id='[+selector+]' class='gallery galleryid-[+id+]<br />gallery-columns-[+columns+] gallery-size-[+size_class+]'&gt;</code></td>
694
+ </tr>
695
+ <tr>
696
+ <td style="vertical-align: top; font-weight:bold">Row Open</td>
697
+ <td><code>&lt;tr class='gallery-row'&gt;</code></td>
698
+ </tr>
699
+ <tr>
700
+ <td style="vertical-align: top; font-weight:bold">Item</td>
701
+ <td><code>&lt;td class='gallery-icon'&gt;<br />
702
+ &nbsp;&nbsp;&nbsp;&nbsp;[+link+]<br />
703
+ &lt;/td&gt;<br />
704
+ &lt;td class='wp-caption-text gallery-caption'&gt;<br />
705
+ &nbsp;&nbsp;&nbsp;&nbsp;&lt;strong&gt;[+title+]&lt;/strong&gt;&lt;br /&gt;<br />
706
+ &nbsp;&nbsp;&nbsp;&nbsp;[+description+]&lt;br /&gt;<br />
707
+ &nbsp;&nbsp;&nbsp;&nbsp;[+date+]<br />
708
+ &lt;/td&gt;</code>
709
+ </td>
710
+ </tr>
711
+ <tr>
712
+ <td style="vertical-align: top; font-weight:bold">Row Close</td>
713
+ <td><code>&lt;/tr&gt;</code></td>
714
+ </tr>
715
+ <tr>
716
+ <td style="vertical-align: top; font-weight:bold">Close</td>
717
+ <td><code>&lt;/table&gt;</code></td>
718
+ </tr>
719
+ </table>
720
+
721
+ </div>
tpls/admin-display-single-document.tpl CHANGED
@@ -77,6 +77,14 @@
77
  <th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][inserts]'><span class='alignleft'>Inserted in</span><br class='clear' /></label></th>
78
  <td class='field'><textarea id='attachments[[+ID+]][inserts]' rows='5' readonly="readonly" name='attachments[[+ID+]][inserts]' >[+inserts+]</textarea></td>
79
  </tr>
 
 
 
 
 
 
 
 
80
  </tbody>
81
  </table> <!-- class="slidetoggle describe" -->
82
  </div> <!-- class="media-item" -->
77
  <th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][inserts]'><span class='alignleft'>Inserted in</span><br class='clear' /></label></th>
78
  <td class='field'><textarea id='attachments[[+ID+]][inserts]' rows='5' readonly="readonly" name='attachments[[+ID+]][inserts]' >[+inserts+]</textarea></td>
79
  </tr>
80
+ <tr class='galleries'>
81
+ <th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][galleries]'><span class='alignleft'>Gallery in</span><br class='clear' /></label></th>
82
+ <td class='field'><textarea id='attachments[[+ID+]][galleries]' rows='5' readonly="readonly" name='attachments[[+ID+]][galleries]' >[+galleries+]</textarea></td>
83
+ </tr>
84
+ <tr class='mla_galleries'>
85
+ <th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][mla_galleries]'><span class='alignleft'>MLA Gallery in</span><br class='clear' /></label></th>
86
+ <td class='field'><textarea id='attachments[[+ID+]][mla_galleries]' rows='5' readonly="readonly" name='attachments[[+ID+]][mla_galleries]' >[+mla_galleries+]</textarea></td>
87
+ </tr>
88
  </tbody>
89
  </table> <!-- class="slidetoggle describe" -->
90
  </div> <!-- class="media-item" -->
tpls/admin-display-single-image.tpl CHANGED
@@ -86,6 +86,14 @@
86
  <th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][inserts]'><span class='alignleft'>Inserted in</span><br class='clear' /></label></th>
87
  <td class='field'><textarea id='attachments[[+ID+]][inserts]' rows='5' readonly="readonly" name='attachments[[+ID+]][inserts]' >[+inserts+]</textarea></td>
88
  </tr>
 
 
 
 
 
 
 
 
89
  </tbody>
90
  </table> <!-- class="slidetoggle describe" -->
91
  </div> <!-- class="media-item" -->
86
  <th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][inserts]'><span class='alignleft'>Inserted in</span><br class='clear' /></label></th>
87
  <td class='field'><textarea id='attachments[[+ID+]][inserts]' rows='5' readonly="readonly" name='attachments[[+ID+]][inserts]' >[+inserts+]</textarea></td>
88
  </tr>
89
+ <tr class='galleries'>
90
+ <th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][galleries]'><span class='alignleft'>Gallery in</span><br class='clear' /></label></th>
91
+ <td class='field'><textarea id='attachments[[+ID+]][galleries]' rows='5' readonly="readonly" name='attachments[[+ID+]][galleries]' >[+galleries+]</textarea></td>
92
+ </tr>
93
+ <tr class='mla_galleries'>
94
+ <th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][mla_galleries]'><span class='alignleft'>MLA Gallery in</span><br class='clear' /></label></th>
95
+ <td class='field'><textarea id='attachments[[+ID+]][mla_galleries]' rows='5' readonly="readonly" name='attachments[[+ID+]][mla_galleries]' >[+mla_galleries+]</textarea></td>
96
+ </tr>
97
  </tbody>
98
  </table> <!-- class="slidetoggle describe" -->
99
  </div> <!-- class="media-item" -->
tpls/admin-inline-edit-form.tpl CHANGED
@@ -41,6 +41,9 @@
41
  <label> <span class="title">Name/Slug</span> <span class="input-text-wrap">
42
  <input type="text" name="post_name" value="" />
43
  </span> </label>
 
 
 
44
  <label class="inline-edit-image-alt"> <span class="title">Alt Text</span> <span class="input-text-wrap">
45
  <input type="text" name="image_alt" value="" />
46
  </span> </label>
@@ -82,7 +85,7 @@
82
  <label class="inline-edit-post-parent"> <span class="title">Parent ID</span> <span class="input-text-wrap">
83
  <input type="text" name="post_parent" value="" />
84
  </span> </label>
85
- [+authors+]
86
  </div>
87
  </fieldset>
88
  <p class="submit inline-edit-save">
41
  <label> <span class="title">Name/Slug</span> <span class="input-text-wrap">
42
  <input type="text" name="post_name" value="" />
43
  </span> </label>
44
+ <label> <span class="title">Caption</span> <span class="input-text-wrap">
45
+ <input type="text" name="post_excerpt" value="" />
46
+ </span> </label>
47
  <label class="inline-edit-image-alt"> <span class="title">Alt Text</span> <span class="input-text-wrap">
48
  <input type="text" name="image_alt" value="" />
49
  </span> </label>
85
  <label class="inline-edit-post-parent"> <span class="title">Parent ID</span> <span class="input-text-wrap">
86
  <input type="text" name="post_parent" value="" />
87
  </span> </label>
88
+ [+bulk_authors+]
89
  </div>
90
  </fieldset>
91
  <p class="submit inline-edit-save">
tpls/mla-gallery-templates.tpl ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- template="default-style" -->
2
+ <style type='text/css'>
3
+ #[+selector+] {
4
+ margin: auto;
5
+ }
6
+ #[+selector+] .gallery-item {
7
+ float: [+float+];
8
+ margin-top: 10px;
9
+ text-align: center;
10
+ width: [+itemwidth+]%;
11
+ }
12
+ #[+selector+] .gallery-item .gallery-icon img {
13
+ border: 2px solid #cfcfcf;
14
+ }
15
+ #[+selector+] .gallery-caption { vertical-align:
16
+ margin-left: 0;
17
+ }
18
+ </style>
19
+ <!-- see mla_gallery_shortcode() in media-library-assistant/includes/class-mla-shortcodes.php -->
20
+
21
+ <!-- template="default-open-markup" -->
22
+ <div id='[+selector+]' class='gallery galleryid-[+id+] gallery-columns-[+columns+] gallery-size-[+size_class+]'>
23
+
24
+ <!-- template="default-row-open-markup" -->
25
+ <!-- row-open -->
26
+
27
+ <!-- template="default-item-markup" -->
28
+ <[+itemtag+] class='gallery-item'>
29
+ <[+icontag+] class='gallery-icon'>
30
+ [+link+]
31
+ </[+icontag+]>
32
+ <[+captiontag+] class='wp-caption-text gallery-caption'>
33
+ [+caption+]
34
+ </[+captiontag+]>
35
+ </[+itemtag+]>
36
+
37
+ <!-- template="default-row-close-markup" -->
38
+ <br style="clear: both" />
39
+
40
+ <!-- template="default-close-markup" -->
41
+ </div>