Media Library Assistant - Version 2.75

Version Description

  • Fix: Accomodate Admin Columns (and Pro) update to PHP namespaces; eliminate "deprecated" warnings.
  • Fix: For IPIC/EXIF mapping rules, numeric values can now be mapped into the Title standard field.
  • Fix: When Admin Columns Pro 4.0.x is active, a PHP Warning/Uncaught Error regarding argument count mismatch has been eliminated. The error occurs in ACP 4.0.3 and earlier, but not in ACP 4.0.14 and later.
  • Fix: For Settings/Media Library Assistant Uploads tab, a PHP Fatal error when bulk-selecting items from the "Search Known Types" list has been corrected.
  • Fix: For Settings/Media Library Assistant Uploads tab, a PHP Notice when adding an custom item with a non-empty Description has been corrected.
Download this release

Release Info

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

Code changes from version 2.74 to 2.75

examples/plugins/mla-a-z-cloud-example.php CHANGED
@@ -20,7 +20,7 @@
20
  * opened on 5/16/2015 by "kevincowart111".
21
  * https://wordpress.org/support/topic/alphabetical-pagination-2
22
  *
23
- * @package MLA Child Term Hooks Example
24
  * @version 1.02
25
  */
26
 
20
  * opened on 5/16/2015 by "kevincowart111".
21
  * https://wordpress.org/support/topic/alphabetical-pagination-2
22
  *
23
+ * @package MLA A-Z Cloud and Collapse-o-Matic Example
24
  * @version 1.02
25
  */
26
 
includes/class-mla-admin-columns-pro-support-40.php CHANGED
@@ -26,7 +26,8 @@ class ACP_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen {
26
 
27
  add_action( 'acp/column_types', 'ACP_Addon_MLA_ListScreen::inline_column_types', 10, 1 );
28
  add_action( 'ac/column_types', 'ACP_Addon_MLA_ListScreen::inline_column_types', 10, 1 );
29
- add_filter( 'acp/editing/model', 'ACP_Addon_MLA_ListScreen::add_editing_strategy', 10, 2 );
 
30
  }
31
 
32
  /**
@@ -54,9 +55,9 @@ class ACP_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen {
54
  * @since 2.50
55
  *
56
  * @param ACP_Editing_Model $model
57
- * @param AC_Column $column
58
  */
59
- public static function add_editing_strategy( $model, $column ) {
 
60
  $model->set_strategy( new ACP_Addon_MLA_Editing_Strategy( $model ) );
61
  return $model;
62
  }
26
 
27
  add_action( 'acp/column_types', 'ACP_Addon_MLA_ListScreen::inline_column_types', 10, 1 );
28
  add_action( 'ac/column_types', 'ACP_Addon_MLA_ListScreen::inline_column_types', 10, 1 );
29
+ // add_filter( 'acp/editing/model', 'ACP_Addon_MLA_ListScreen::add_editing_strategy', 10, 2 );
30
+ add_filter( 'acp/editing/model', 'ACP_Addon_MLA_ListScreen::add_editing_strategy', 10, 1 );
31
  }
32
 
33
  /**
55
  * @since 2.50
56
  *
57
  * @param ACP_Editing_Model $model
 
58
  */
59
+ public static function add_editing_strategy( $model /*, $column */ ) {
60
+ // @ param AC_Column $column added after 4.0.3 and before 4.0.14 - not used by MLA
61
  $model->set_strategy( new ACP_Addon_MLA_Editing_Strategy( $model ) );
62
  return $model;
63
  }
includes/class-mla-admin-columns-pro-support-423.php ADDED
@@ -0,0 +1,1411 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Media Library Assistant Admin Columns Pro (plugin) Support
4
+ *
5
+ * @package Media Library Assistant
6
+ * @since 2.71
7
+ */
8
+ defined( 'ABSPATH' ) or die();
9
+
10
+ /**
11
+ * Class Admin Columns Addon MLA (Media Library Assistant) List Screen supports the Admin Columns plugin
12
+ *
13
+ * @package Media Library Assistant
14
+ * @since 2.71
15
+ */
16
+ class ACP_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen
17
+ implements ACP_Editing_ListScreen, ACP_Export_ListScreen {
18
+
19
+ /**
20
+ * Initializes some properties, installs filters and then
21
+ * calls the parent constructor to set some default configs.
22
+ *
23
+ * @since 2.71
24
+ */
25
+ public function __construct() {
26
+ parent::__construct();
27
+
28
+ add_action( 'ac/table/list_screen', array( $this, 'export_table_global' ) );
29
+ }
30
+
31
+ /**
32
+ * Set MLA-specific inline editing strategy for Admin Columns Pro
33
+ *
34
+ * @since 2.71
35
+ *
36
+ * @param ACP_Editing_Model $model
37
+ */
38
+ public function editing( $model ) {
39
+ return new ACP_Addon_MLA_Editing_Strategy( $model );
40
+ }
41
+
42
+ /**
43
+ * Create and populate an MLA_List_Table object in the $wp_list_table global variable
44
+ *
45
+ * When exporting the same page is being requested by an ajax request and triggers the filter 'the_posts'.
46
+ * The callback for this filter will print a json string. This needs to be done before any rendering of the page.
47
+ *
48
+ * Also, export needs the $GLOBALS['wp_list_table'] to be populated for displaying the export button.
49
+ *
50
+ * @since 2.71
51
+ *
52
+ * @param AC_ListScreen $list_screen
53
+ */
54
+ public function export_table_global( AC_ListScreen $list_screen ) {
55
+ global $wp_list_table;
56
+
57
+ if ( ! $list_screen instanceof ACP_Addon_MLA_ListScreen ) {
58
+ return;
59
+ }
60
+
61
+ if ( ! class_exists( 'MLA_List_Table' ) ) {
62
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
63
+ MLA_List_Table::mla_admin_init_action();
64
+ }
65
+
66
+ if ( $wp_list_table instanceof MLA_List_Table ) {
67
+ return;
68
+ }
69
+
70
+ $wp_list_table = new MLA_List_Table();
71
+ $wp_list_table->prepare_items();
72
+ }
73
+
74
+ /**
75
+ * Set MLA-specific export strategy for Admin Columns Pro
76
+ *
77
+ * @since 2.71
78
+ */
79
+ public function export() {
80
+ return new ACP_Addon_MLA_Export_Strategy( $this );
81
+ }
82
+
83
+ /**
84
+ * Register MLA-specific column definitions for Admin Columns Pro
85
+ *
86
+ * @since 2.71
87
+ */
88
+ public function register_column_types() {
89
+ parent::register_column_types();
90
+
91
+ // $this->register_column_type( new ACP_Column_CustomField ); Tobias 3/1/18 message
92
+ // $this->register_column_type( new ACP_Colmn_Menu ); Tobias 3/1/18 message
93
+
94
+ // Autoload the CustomField class if necessary
95
+ if ( class_exists( 'ACP_Column_CustomField' ) ) {
96
+ $this->register_column_type( new ACP_Column_CustomField );
97
+ }
98
+
99
+ $this->register_column_type( new ACP_Addon_MLA_Column_ID_Parent );
100
+ $this->register_column_type( new ACP_Addon_MLA_Column_Title_Name() );
101
+ $this->register_column_type( new ACP_Addon_MLA_Column_Title() );
102
+ $this->register_column_type( new ACP_Addon_MLA_Column_Name() );
103
+ $this->register_column_type( new ACP_Addon_MLA_Column_Parent() );
104
+ $this->register_column_type( new ACP_Addon_MLA_Column_MenuOrder() );
105
+ $this->register_column_type( new ACP_Addon_MLA_Column_Features() );
106
+ $this->register_column_type( new ACP_Addon_MLA_Column_Inserts() );
107
+ $this->register_column_type( new ACP_Addon_MLA_Column_Galleries() );
108
+ $this->register_column_type( new ACP_Addon_MLA_Column_MLA_Galleries() );
109
+ $this->register_column_type( new ACP_Addon_MLA_Column_AltText() );
110
+ $this->register_column_type( new ACP_Addon_MLA_Column_Caption() );
111
+ $this->register_column_type( new ACP_Addon_MLA_Column_Description() );
112
+ $this->register_column_type( new ACP_Addon_MLA_Column_MimeType() );
113
+ $this->register_column_type( new ACP_Addon_MLA_Column_FileURL() );
114
+ $this->register_column_type( new ACP_Addon_MLA_Column_Base_File() );
115
+ $this->register_column_type( new ACP_Addon_MLA_Column_Date() );
116
+ $this->register_column_type( new ACP_Addon_MLA_Column_Modified() );
117
+ $this->register_column_type( new ACP_Addon_MLA_Column_Author() );
118
+ $this->register_column_type( new ACP_Addon_MLA_Column_Attached() );
119
+
120
+ // Set up the taxonomy column definitions
121
+ $taxonomies = get_taxonomies( array ( 'show_ui' => true ), 'names' );
122
+ foreach ( $taxonomies as $tax_name ) {
123
+ if ( MLACore::mla_taxonomy_support( $tax_name ) ) {
124
+ $tax_object = get_taxonomy( $tax_name );
125
+ $column = new ACP_Addon_MLA_Column_Taxonomy();
126
+ $column->set_type( 't_' . $tax_object->name );
127
+
128
+ $this->register_column_type( $column );
129
+ } // supported taxonomy
130
+ } // foreach $tax_name
131
+
132
+ // Set up the custom field definitions
133
+ $custom_columns = MLACore::mla_custom_field_support( 'custom_columns' );
134
+ foreach ( $custom_columns as $type => $label ) {
135
+ $column = new ACP_Addon_MLA_Column_CustomField();
136
+ $column->set_type( $type );
137
+ $column->set_name( $type );
138
+ $column->set_label( $label );
139
+
140
+ $this->register_column_type( $column );
141
+ } // foreach custom column
142
+ }
143
+
144
+ /**
145
+ * Return list table item object given ID
146
+ *
147
+ * @param integer $id List table item ID
148
+ *
149
+ * @since 2.71
150
+ */
151
+ public static function get_item( $id ) {
152
+ global $wp_list_table;
153
+
154
+ if ( $wp_list_table instanceof MLA_List_Table ) {
155
+ foreach ( $wp_list_table->items as $index => $item ) {
156
+ if ( $id == $item->ID ) {
157
+ return $item;
158
+ }
159
+ }
160
+ }
161
+
162
+ return get_post( $id );
163
+ }
164
+
165
+ /**
166
+ * Translate post_status 'future', 'pending', 'draft' and 'trash' to label
167
+ *
168
+ * @since 2.01
169
+ *
170
+ * @param string post_status
171
+ *
172
+ * @return string Status label or empty string
173
+ */
174
+ public static function format_post_status( $post_status ) {
175
+ $flag = ', ';
176
+ switch ( $post_status ) {
177
+ case 'draft' :
178
+ $flag .= __('Draft');
179
+ break;
180
+ case 'future' :
181
+ $flag .= __('Scheduled');
182
+ break;
183
+ case 'pending' :
184
+ $flag .= _x('Pending', 'post state');
185
+ break;
186
+ case 'trash' :
187
+ $flag .= __('Trash');
188
+ break;
189
+ default:
190
+ $flag = '';
191
+ }
192
+
193
+ return $flag;
194
+ }
195
+
196
+ } // class ACP_Addon_MLA_ListScreen
197
+
198
+ /**
199
+ * Exportability class for posts list screen
200
+ *
201
+ * @since 2.71
202
+ */
203
+ class ACP_Addon_MLA_Export_Strategy extends ACP_Export_Strategy {
204
+
205
+ /**
206
+ * Call parent constructor
207
+ *
208
+ * @param AC_ListScreen $list_screen
209
+ */
210
+ public function __construct( $list_screen ) {
211
+ parent::__construct( $list_screen );
212
+ }
213
+
214
+ /**
215
+ * Retrieve the headers for the columns
216
+ *
217
+ * @param AC_Column[] $columns
218
+ *
219
+ * @since 1.0
220
+ * @return string[] Associative array of header labels for the columns.
221
+ */
222
+ public function get_headers( array $columns ) {
223
+ $headers = parent::get_headers( $columns );
224
+
225
+ // Fix the first header to avoid MS Excel SYLK file format error
226
+ foreach ( $headers as $name => $label ) {
227
+ if ( 'ID' === substr( $label, 0, 2) ) {
228
+ $headers[ $name ] = '.' . $label;
229
+ }
230
+
231
+ break; // Only the first label matters
232
+ }
233
+
234
+ return $headers;
235
+ }
236
+
237
+ /**
238
+ * Add hooks for MLA_List_table to support AJAX export operation
239
+ *
240
+ * @since 2.71
241
+ * @see ACP_Export_ExportableListScreen::ajax_export()
242
+ */
243
+ protected function ajax_export() {
244
+ // Hooks
245
+ add_filter( 'mla_list_table_query_final_terms', array( $this, 'mla_list_table_query_final_terms' ), 10, 1 );
246
+ add_action( 'mla_list_table_prepare_items', array( $this, 'mla_list_table_prepare_items' ), 10, 1 );
247
+ }
248
+
249
+ /**
250
+ * Modify the main posts query to use the correct pagination arguments. This should be attached
251
+ * to the pre_get_posts hook when an AJAX request is sent
252
+ *
253
+ * @param WP_Query $request
254
+ *
255
+ * @since 2.71
256
+ * @see action:pre_get_posts
257
+ */
258
+ public function mla_list_table_query_final_terms( $request ) {
259
+ $per_page = $this->get_num_items_per_iteration();
260
+ $request['offset'] = $this->get_export_counter() * $per_page;
261
+ $request['posts_per_page'] = $per_page;
262
+ $request['posts_per_archive_page'] = $per_page;
263
+
264
+ return $request;
265
+ }
266
+
267
+ /**
268
+ * Run the actual export when the posts query is finalized. This should be attached to the
269
+ * the_posts filter when an AJAX request is run
270
+ *
271
+ * @param WP_Query $query
272
+ *
273
+ * @since 2.71
274
+ * @see action:the_posts
275
+ */
276
+ public function mla_list_table_prepare_items( $query ) {
277
+ $this->export( wp_list_pluck( $query->items, 'ID' ) );
278
+ }
279
+ } // class ACP_Addon_MLA_Export_Strategy
280
+
281
+ /**
282
+ * Class Admin Columns Addon MLA (Media Library Assistant) Editing Strategy supports the Admin Columns plugin
283
+ *
284
+ * @package Media Library Assistant
285
+ * @since 2.71
286
+ */
287
+ class ACP_Addon_MLA_Editing_Strategy extends ACP_Editing_Strategy_Post {
288
+
289
+ /**
290
+ * Get the available items on the current page for passing them to JS
291
+ *
292
+ * @since 2.71
293
+ *
294
+ * @return array Items on the current page ([entry_id] => (array) [entry_data])
295
+ */
296
+ public function get_rows() {
297
+ global $wp_list_table;
298
+
299
+ // Re-execute the query because the table object can be shared with custom plugins using the MLA filters/actions
300
+ $wp_list_table->prepare_items();
301
+
302
+ return $this->get_editable_rows( $wp_list_table->items );
303
+ }
304
+ } // class ACP_Addon_MLA_Editing_Strategy
305
+
306
+ /**
307
+ * Provides view_settings for MLA's post_title
308
+ *
309
+ * @package Media Library Assistant
310
+ * @since 2.52
311
+ */
312
+ class ACP_Addon_MLA_Editing_Model_Media_Title extends ACP_Editing_Model_Media_Title {
313
+
314
+ /**
315
+ * Remove JavaScript selector settings
316
+ */
317
+ public function get_view_settings() {
318
+ return array(
319
+ 'type' => 'text',
320
+ 'display_ajax' => false,
321
+ );
322
+ }
323
+ }
324
+
325
+ /**
326
+ * Provides export for ID portion of ID/Parent
327
+ *
328
+ * @package Media Library Assistant
329
+ * @since 2.71
330
+ */
331
+ class ACP_Addon_MLA_Column_ID_Parent extends AC_Column
332
+ implements ACP_Export_Column {
333
+
334
+ /**
335
+ * Define column properties
336
+ */
337
+ public function __construct() {
338
+ // Mark as an existing column
339
+ $this->set_original( true );
340
+
341
+ // Type of column
342
+ $this->set_type( 'ID_parent' );
343
+ }
344
+
345
+ /**
346
+ * Support export
347
+ */
348
+ public function export() {
349
+ return new ACP_Export_Model_StrippedValue( $this );
350
+ }
351
+
352
+ /**
353
+ * Supply value for export
354
+ *
355
+ * @param integer $id MLA_List_table item ID
356
+ */
357
+ public function get_raw_value( $id ) {
358
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
359
+ return $item->ID;
360
+ }
361
+ }
362
+
363
+ /**
364
+ * Provides export for Name (slug)
365
+ *
366
+ * @package Media Library Assistant
367
+ * @since 2.71
368
+ */
369
+ class ACP_Addon_MLA_Column_Title_Name extends AC_Column
370
+ implements ACP_Export_Column {
371
+
372
+ /**
373
+ * Define column properties
374
+ */
375
+ public function __construct() {
376
+ $this->set_original( true );
377
+ $this->set_type( 'title_name' );
378
+ }
379
+
380
+ /**
381
+ * Support export
382
+ */
383
+ public function export() {
384
+ return new ACP_Export_Model_StrippedValue( $this );
385
+ }
386
+
387
+ /**
388
+ * Supply value for export
389
+ *
390
+ * @param integer $id MLA_List_table item ID
391
+ */
392
+ public function get_raw_value( $id ) {
393
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
394
+ $errors = $item->mla_references['parent_errors'];
395
+ if ( '(' . __( 'NO REFERENCE TESTS', 'media-library-assistant' ) . ')' == $errors ) {
396
+ $errors = '';
397
+ }
398
+ $format = "%1\$s\n%2\$s\n%3\$s";
399
+ return sprintf( $format, _draft_or_post_title( $item ), esc_attr( $item->post_name ), $errors );
400
+ }
401
+ }
402
+
403
+ /**
404
+ * Provides inline-editing, export for post_title
405
+ *
406
+ * @package Media Library Assistant
407
+ * @since 2.52
408
+ * @since 2.71 Added export
409
+ */
410
+ class ACP_Addon_MLA_Column_Title extends AC_Column_Media_Title
411
+ implements ACP_Column_EditingInterface, ACP_Export_Column {
412
+
413
+ /**
414
+ * Define column properties
415
+ */
416
+ public function __construct() {
417
+ $this->set_original( true );
418
+ $this->set_type( 'post_title' );
419
+ }
420
+
421
+ /**
422
+ * Add inline editing support
423
+ *
424
+ * @return ACP_Editing_Model_Media_Title
425
+ */
426
+ public function editing() {
427
+ return new ACP_Addon_MLA_Editing_Model_Media_Title( $this );
428
+ }
429
+
430
+ /**
431
+ * Support export
432
+ */
433
+ public function export() {
434
+ return new ACP_Export_Model_StrippedValue( $this );
435
+ }
436
+
437
+ /**
438
+ * Supply value for export
439
+ *
440
+ * @param integer $id MLA_List_table item ID
441
+ */
442
+ public function get_raw_value( $id ) {
443
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
444
+ return (string) $item->post_title;
445
+ }
446
+ }
447
+
448
+ /**
449
+ * Provides export for Name (slug)
450
+ *
451
+ * @package Media Library Assistant
452
+ * @since 2.71
453
+ */
454
+ class ACP_Addon_MLA_Column_Name extends AC_Column
455
+ implements ACP_Export_Column {
456
+
457
+ /**
458
+ * Define column properties
459
+ */
460
+ public function __construct() {
461
+ $this->set_original( true );
462
+ $this->set_type( 'post_name' );
463
+ }
464
+
465
+ /**
466
+ * Support export
467
+ */
468
+ public function export() {
469
+ return new ACP_Export_Model_StrippedValue( $this );
470
+ }
471
+
472
+ /**
473
+ * Supply value for export
474
+ *
475
+ * @param integer $id MLA_List_table item ID
476
+ */
477
+ public function get_raw_value( $id ) {
478
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
479
+ return (string) $item->post_name;
480
+ }
481
+ }
482
+
483
+ /**
484
+ * Removes ACP defaults, provides export for post_parent
485
+ *
486
+ * @package Media Library Assistant
487
+ * @since 2.52
488
+ * @since 2.71 Added export
489
+ */
490
+ class ACP_Addon_MLA_Column_Parent extends AC_Column_Media_Parent
491
+ implements ACP_Export_Column {
492
+ /**
493
+ * Remove default column width
494
+ */
495
+ public function register_settings() {
496
+ }
497
+
498
+ /**
499
+ * Support export
500
+ */
501
+ public function export() {
502
+ return new ACP_Export_Model_StrippedValue( $this );
503
+ }
504
+
505
+ /**
506
+ * Supply value for export
507
+ *
508
+ * @param integer $id MLA_List_table item ID
509
+ */
510
+ public function get_raw_value( $id ) {
511
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
512
+ return (string) $item->post_parent;
513
+ }
514
+ }
515
+
516
+ /**
517
+ * Provides inline-editing, export for menu_order
518
+ *
519
+ * @package Media Library Assistant
520
+ * @since 2.52
521
+ * @since 2.71 Added export
522
+ */
523
+ class ACP_Addon_MLA_Column_MenuOrder extends AC_Column
524
+ implements ACP_Column_EditingInterface, ACP_Export_Column {
525
+
526
+ /**
527
+ * Define column properties
528
+ */
529
+ public function __construct() {
530
+ $this->set_original( true );
531
+ $this->set_type( 'menu_order' );
532
+ }
533
+
534
+ /**
535
+ * Add inline editing support
536
+ *
537
+ * @return ACP_Editing_Model_Post_Order
538
+ */
539
+ public function editing() {
540
+ return new ACP_Editing_Model_Post_Order( $this );
541
+ }
542
+
543
+ /**
544
+ * Support export
545
+ */
546
+ public function export() {
547
+ return new ACP_Export_Model_StrippedValue( $this );
548
+ }
549
+
550
+ /**
551
+ * Supply value for export
552
+ *
553
+ * @param integer $id MLA_List_table item ID
554
+ */
555
+ public function get_raw_value( $id ) {
556
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
557
+ return (string) $item->menu_order;
558
+ }
559
+ }
560
+
561
+ /**
562
+ * Provides export for Featured in
563
+ *
564
+ * @package Media Library Assistant
565
+ * @since 2.71
566
+ */
567
+ class ACP_Addon_MLA_Column_Features extends AC_Column
568
+ implements ACP_Export_Column {
569
+
570
+ /**
571
+ * Define column properties
572
+ */
573
+ public function __construct() {
574
+ $this->set_original( true );
575
+ $this->set_type( 'featured' );
576
+ }
577
+
578
+ /**
579
+ * Support export
580
+ */
581
+ public function export() {
582
+ return new ACP_Export_Model_StrippedValue( $this );
583
+ }
584
+
585
+ /**
586
+ * Supply value for export
587
+ *
588
+ * @param integer $id MLA_List_table item ID
589
+ */
590
+ public function get_raw_value( $id ) {
591
+ if ( !MLACore::$process_featured_in ) {
592
+ return __( 'Disabled', 'media-library-assistant' );
593
+ }
594
+
595
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
596
+
597
+ // Move parent to the top of the list
598
+ $features = $item->mla_references['features'];
599
+ if ( isset( $features[ $item->post_parent ] ) ) {
600
+ $parent = $features[ $item->post_parent ];
601
+ unset( $features[ $item->post_parent ] );
602
+ array_unshift( $features, $parent );
603
+ }
604
+
605
+ $format = "%1\$s (%2\$s %3\$s%4\$s%5\$s),\n";
606
+ $value = '';
607
+ foreach ( $features as $feature ) {
608
+ $status = ACP_Addon_MLA_ListScreen::format_post_status( $feature->post_status );
609
+
610
+ if ( $feature->ID == $item->post_parent ) {
611
+ $parent = ", " . __( 'PARENT', 'media-library-assistant' );
612
+ } else {
613
+ $parent = '';
614
+ }
615
+
616
+ $value .= sprintf( $format, esc_attr( $feature->post_title ), esc_attr( $feature->post_type ), $feature->ID, $status, $parent );
617
+ } // foreach $feature
618
+
619
+ return $value;
620
+ }
621
+ }
622
+
623
+ /**
624
+ * Provides export for Inserted in
625
+ *
626
+ * @package Media Library Assistant
627
+ * @since 2.71
628
+ */
629
+ class ACP_Addon_MLA_Column_Inserts extends AC_Column
630
+ implements ACP_Export_Column {
631
+
632
+ /**
633
+ * Define column properties
634
+ */
635
+ public function __construct() {
636
+ $this->set_original( true );
637
+ $this->set_type( 'inserted' );
638
+ }
639
+
640
+ /**
641
+ * Support export
642
+ */
643
+ public function export() {
644
+ return new ACP_Export_Model_StrippedValue( $this );
645
+ }
646
+
647
+ /**
648
+ * Supply value for export
649
+ *
650
+ * @param integer $id MLA_List_table item ID
651
+ */
652
+ public function get_raw_value( $id ) {
653
+ if ( !MLACore::$process_inserted_in ) {
654
+ return __( 'Disabled', 'media-library-assistant' );
655
+ }
656
+
657
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
658
+
659
+ $format = "%1\$s (%2\$s %3\$s%4\$s%5\$s),\n";
660
+ $value = '';
661
+ foreach ( $item->mla_references['inserts'] as $file => $inserts ) {
662
+ if ( 'base' != $item->mla_references['inserted_option'] ) {
663
+ $value .= $file . "\n";
664
+ }
665
+
666
+ // Move parent to the top of the list
667
+ if ( isset( $inserts[ $item->post_parent ] ) ) {
668
+ $parent = $inserts[ $item->post_parent ];
669
+ unset( $inserts[ $item->post_parent ] );
670
+ array_unshift( $inserts, $parent );
671
+ }
672
+
673
+ foreach ( $inserts as $insert ) {
674
+ $status = ACP_Addon_MLA_ListScreen::format_post_status( $insert->post_status );
675
+
676
+ if ( $insert->ID == $item->post_parent ) {
677
+ $parent = ", " . __( 'PARENT', 'media-library-assistant' );
678
+ } else {
679
+ $parent = '';
680
+ }
681
+
682
+ $value .= sprintf( $format, esc_attr( $insert->post_title ), esc_attr( $insert->post_type ), $insert->ID, $status, $parent );
683
+ } // foreach $insert
684
+ } // foreach $file
685
+
686
+ return $value;
687
+ }
688
+ }
689
+
690
+ /**
691
+ * Provides export for Gallery in
692
+ *
693
+ * @package Media Library Assistant
694
+ * @since 2.71
695
+ */
696
+ class ACP_Addon_MLA_Column_Galleries extends AC_Column
697
+ implements ACP_Export_Column {
698
+
699
+ /**
700
+ * Define column properties
701
+ */
702
+ public function __construct() {
703
+ $this->set_original( true );
704
+ $this->set_type( 'galleries' );
705
+ }
706
+
707
+ /**
708
+ * Support export
709
+ */
710
+ public function export() {
711
+ return new ACP_Export_Model_StrippedValue( $this );
712
+ }
713
+
714
+ /**
715
+ * Supply value for export
716
+ *
717
+ * @param integer $id MLA_List_table item ID
718
+ */
719
+ public function get_raw_value( $id ) {
720
+ if ( !MLACore::$process_gallery_in ) {
721
+ return __( 'Disabled', 'media-library-assistant' );
722
+ }
723
+
724
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
725
+
726
+ // Move parent to the top of the list
727
+ $galleries = $item->mla_references['galleries'];
728
+ if ( isset( $galleries[ $item->post_parent ] ) ) {
729
+ $parent = $galleries[ $item->post_parent ];
730
+ unset( $galleries[ $item->post_parent ] );
731
+ array_unshift( $galleries, $parent );
732
+ }
733
+
734
+ $format = "%1\$s (%2\$s %3\$s%4\$s%5\$s),\n";
735
+ $value = '';
736
+ foreach ( $galleries as $ID => $gallery ) {
737
+ $status = ACP_Addon_MLA_ListScreen::format_post_status( $gallery['post_status'] );
738
+
739
+ if ( $gallery['ID'] == $item->post_parent ) {
740
+ $parent = ", " . __( 'PARENT', 'media-library-assistant' );
741
+ } else {
742
+ $parent = '';
743
+ }
744
+
745
+ $value .= sprintf( $format, esc_attr( $gallery['post_title'] ), esc_attr( $gallery['post_type'] ), $gallery['ID'], $status, $parent );
746
+ } // foreach $gallery
747
+
748
+ return $value;
749
+ }
750
+ }
751
+
752
+ /**
753
+ * Provides export for Gallery in
754
+ *
755
+ * @package Media Library Assistant
756
+ * @since 2.71
757
+ */
758
+ class ACP_Addon_MLA_Column_MLA_Galleries extends AC_Column
759
+ implements ACP_Export_Column {
760
+
761
+ /**
762
+ * Define column properties
763
+ */
764
+ public function __construct() {
765
+ $this->set_original( true );
766
+ $this->set_type( 'mla_galleries' );
767
+ }
768
+
769
+ /**
770
+ * Support export
771
+ */
772
+ public function export() {
773
+ return new ACP_Export_Model_StrippedValue( $this );
774
+ }
775
+
776
+ /**
777
+ * Supply value for export
778
+ *
779
+ * @param integer $id MLA_List_table item ID
780
+ */
781
+ public function get_raw_value( $id ) {
782
+ if ( !MLACore::$process_mla_gallery_in ) {
783
+ return __( 'Disabled', 'media-library-assistant' );
784
+ }
785
+
786
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
787
+
788
+ // Move parent to the top of the list
789
+ $mla_galleries = $item->mla_references['mla_galleries'];
790
+ if ( isset( $mla_galleries[ $item->post_parent ] ) ) {
791
+ $parent = $mla_galleries[ $item->post_parent ];
792
+ unset( $mla_galleries[ $item->post_parent ] );
793
+ array_unshift( $mla_galleries, $parent );
794
+ }
795
+
796
+ $format = "%1\$s (%2\$s %3\$s%4\$s%5\$s),\n";
797
+ $value = '';
798
+ foreach ( $mla_galleries as $gallery ) {
799
+ $status = ACP_Addon_MLA_ListScreen::format_post_status( $gallery['post_status'] );
800
+
801
+ if ( $gallery['ID'] == $item->post_parent ) {
802
+ $parent = ", " . __( 'PARENT', 'media-library-assistant' );
803
+ } else {
804
+ $parent = '';
805
+ }
806
+
807
+ $value .= sprintf( $format, esc_attr( $gallery['post_title'] ), esc_attr( $gallery['post_type'] ), $gallery['ID'], $status, $parent );
808
+ } // foreach $gallery
809
+
810
+ return $value;
811
+ }
812
+ }
813
+
814
+ /**
815
+ * Provides inline-editing, export for alt_text
816
+ *
817
+ * @package Media Library Assistant
818
+ * @since 2.52
819
+ * @since 2.71 Added export
820
+ */
821
+ class ACP_Addon_MLA_Column_AltText extends ACP_Column_Media_AlternateText
822
+ implements ACP_Column_EditingInterface, ACP_Export_Column {
823
+
824
+ /**
825
+ * Define column properties
826
+ */
827
+ public function __construct() {
828
+ $this->set_original( true );
829
+ $this->set_type( 'alt_text' );
830
+ }
831
+
832
+ /**
833
+ * Add inline editing support
834
+ *
835
+ * @return ACP_Editing_Model_Media_AlternateText
836
+ */
837
+ public function editing() {
838
+ return new ACP_Editing_Model_Media_AlternateText( $this );
839
+ }
840
+
841
+ /**
842
+ * Support export
843
+ */
844
+ public function export() {
845
+ return new ACP_Export_Model_StrippedValue( $this );
846
+ }
847
+
848
+ /**
849
+ * Supply value for export
850
+ *
851
+ * @param integer $id MLA_List_table item ID
852
+ */
853
+ public function get_raw_value( $id ) {
854
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
855
+
856
+ if ( isset( $item->mla_wp_attachment_image_alt ) ) {
857
+ if ( is_array( $item->mla_wp_attachment_image_alt ) ) {
858
+ $alt_text = $item->mla_wp_attachment_image_alt[0];
859
+ } else {
860
+ $alt_text = $item->mla_wp_attachment_image_alt;
861
+ }
862
+
863
+ return $alt_text;
864
+ }
865
+
866
+ return '';
867
+ }
868
+ }
869
+
870
+ /**
871
+ * Provides inline-editing, export for Caption/Excerpt
872
+ *
873
+ * @package Media Library Assistant
874
+ * @since 2.52
875
+ * @since 2.71 Added export
876
+ */
877
+ class ACP_Addon_MLA_Column_Caption extends ACP_Column_Media_Caption
878
+ implements ACP_Column_EditingInterface, ACP_Export_Column {
879
+
880
+ /**
881
+ * Define column properties
882
+ */
883
+ public function __construct() {
884
+ $this->set_original( true );
885
+ $this->set_type( 'caption' );
886
+ }
887
+
888
+ /**
889
+ * Support export
890
+ */
891
+ public function export() {
892
+ return new ACP_Export_Model_StrippedValue( $this );
893
+ }
894
+
895
+ /**
896
+ * Supply value for export
897
+ *
898
+ * @param integer $id MLA_List_table item ID
899
+ */
900
+ public function get_raw_value( $id ) {
901
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
902
+ return (string) $item->post_excerpt;
903
+ }
904
+ }
905
+
906
+ /**
907
+ * Provides inline-editing, export for Description
908
+ *
909
+ * @package Media Library Assistant
910
+ * @since 2.52
911
+ * @since 2.71 Added export
912
+ */
913
+ class ACP_Addon_MLA_Column_Description extends AC_Column_Media_Description
914
+ implements ACP_Column_EditingInterface, ACP_Export_Column {
915
+
916
+ /**
917
+ * Define column properties
918
+ */
919
+ public function __construct() {
920
+ $this->set_original( true );
921
+ $this->set_type( 'description' );
922
+ }
923
+
924
+ /**
925
+ * Add inline editing and provides export for Description
926
+ *
927
+ * @return ACP_Editing_Model_Post_Content
928
+ */
929
+ public function editing() {
930
+ return new ACP_Editing_Model_Post_Content( $this );
931
+ }
932
+
933
+ /**
934
+ * Support export
935
+ */
936
+ public function export() {
937
+ return new ACP_Export_Model_StrippedValue( $this );
938
+ }
939
+
940
+ /**
941
+ * Supply value for export
942
+ *
943
+ * @param integer $id MLA_List_table item ID
944
+ */
945
+ public function get_raw_value( $id ) {
946
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
947
+ return (string) $item->post_content;
948
+ }
949
+ }
950
+
951
+ /**
952
+ * Provides inline-editing, export for MIME Type
953
+ *
954
+ * @package Media Library Assistant
955
+ * @since 2.52
956
+ * @since 2.71 Added export
957
+ */
958
+ class ACP_Addon_MLA_Column_MimeType extends AC_Column_Media_MimeType
959
+ implements ACP_Column_EditingInterface, ACP_Export_Column {
960
+
961
+ /**
962
+ * Define column properties
963
+ */
964
+ public function __construct() {
965
+ $this->set_original( true );
966
+ $this->set_type( 'post_mime_type' );
967
+ }
968
+
969
+ /**
970
+ * Add inline editing support
971
+ *
972
+ * @return ACP_Editing_Model_Media_MimeType
973
+ */
974
+ public function editing() {
975
+ return new ACP_Editing_Model_Media_MimeType( $this );
976
+ }
977
+
978
+ /**
979
+ * Support export
980
+ */
981
+ public function export() {
982
+ return new ACP_Export_Model_StrippedValue( $this );
983
+ }
984
+
985
+ /**
986
+ * Supply value for export
987
+ *
988
+ * @param integer $id MLA_List_table item ID
989
+ */
990
+ public function get_raw_value( $id ) {
991
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
992
+ return (string) $item->post_mime_type;
993
+ }
994
+ }
995
+
996
+ /**
997
+ * Provides export for File URL
998
+ *
999
+ * @package Media Library Assistant
1000
+ * @since 2.71
1001
+ */
1002
+ class ACP_Addon_MLA_Column_FileURL extends AC_Column
1003
+ implements ACP_Export_Column {
1004
+
1005
+ /**
1006
+ * Define column properties
1007
+ */
1008
+ public function __construct() {
1009
+ $this->set_original( true );
1010
+ $this->set_type( 'file_url' );
1011
+ }
1012
+
1013
+ /**
1014
+ * Support export
1015
+ */
1016
+ public function export() {
1017
+ return new ACP_Export_Model_StrippedValue( $this );
1018
+ }
1019
+
1020
+ /**
1021
+ * Supply value for export
1022
+ *
1023
+ * @param integer $id MLA_List_table item ID
1024
+ */
1025
+ public function get_raw_value( $id ) {
1026
+ $attachment_url = wp_get_attachment_url( $id );
1027
+ return $attachment_url ? $attachment_url : __( 'None', 'media-library-assistant' );
1028
+ }
1029
+ }
1030
+
1031
+ /**
1032
+ * Provides export for Base File
1033
+ *
1034
+ * @package Media Library Assistant
1035
+ * @since 2.71
1036
+ */
1037
+ class ACP_Addon_MLA_Column_Base_File extends AC_Column
1038
+ implements ACP_Export_Column {
1039
+
1040
+ /**
1041
+ * Define column properties
1042
+ */
1043
+ public function __construct() {
1044
+ $this->set_original( true );
1045
+ $this->set_type( 'base_file' );
1046
+ }
1047
+
1048
+ /**
1049
+ * Support export
1050
+ */
1051
+ public function export() {
1052
+ return new ACP_Export_Model_StrippedValue( $this );
1053
+ }
1054
+
1055
+ /**
1056
+ * Supply value for export
1057
+ *
1058
+ * @param integer $id MLA_List_table item ID
1059
+ */
1060
+ public function get_raw_value( $id ) {
1061
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
1062
+ if ( isset( $item->mla_wp_attached_file ) ) {
1063
+ return (string) $item->mla_wp_attached_file;
1064
+ }
1065
+
1066
+ return 'ERROR';
1067
+ }
1068
+ }
1069
+
1070
+ /**
1071
+ * Provides export for Attached to
1072
+ *
1073
+ * @package Media Library Assistant
1074
+ * @since 2.71
1075
+ */
1076
+ class ACP_Addon_MLA_Column_Attached extends AC_Column
1077
+ implements ACP_Export_Column {
1078
+
1079
+ /**
1080
+ * Define column properties
1081
+ */
1082
+ public function __construct() {
1083
+ $this->set_original( true );
1084
+ $this->set_type( 'attached_to' );
1085
+ }
1086
+
1087
+ /**
1088
+ * Support export
1089
+ */
1090
+ public function export() {
1091
+ return new ACP_Export_Model_StrippedValue( $this );
1092
+ }
1093
+
1094
+ /**
1095
+ * Supply value for export
1096
+ *
1097
+ * @param integer $id MLA_List_table item ID
1098
+ */
1099
+ public function get_raw_value( $id ) {
1100
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
1101
+
1102
+ if ( isset( $item->parent_title ) ) {
1103
+ $parent_type = get_post_type_object( $item->parent_type );
1104
+ if ( $parent_type ) {
1105
+ if ( $parent_type->show_ui ) {
1106
+ $user_can_read_parent = current_user_can( 'read_post', $item->post_parent );
1107
+ } else {
1108
+ $user_can_read_parent = true;
1109
+ }
1110
+ } else {
1111
+ $user_can_read_parent = false;
1112
+ }
1113
+
1114
+ if ( $user_can_read_parent ) {
1115
+ $parent_title = esc_attr( $item->parent_title );
1116
+ } else {
1117
+ $parent_title = __( '(Private post)' );
1118
+ }
1119
+
1120
+ if ( isset( $item->parent_date ) && $user_can_read_parent ) {
1121
+ $parent_date = "\n" . mysql2date( __( 'Y/m/d', 'media-library-assistant' ), $item->parent_date );
1122
+ } else {
1123
+ $parent_date = '';
1124
+ }
1125
+
1126
+ if ( isset( $item->parent_type ) && $user_can_read_parent ) {
1127
+ $parent_type = "\n" . '(' . $item->parent_type . ' ' . (string) $item->post_parent . ACP_Addon_MLA_ListScreen::format_post_status( $item->parent_status ) . ')';
1128
+ } else {
1129
+ $parent_type = '';
1130
+ }
1131
+
1132
+ $parent = sprintf( '%1$s%2$s%3$s', /*%1$s*/ $parent_title, /*%2$s*/ $parent_date, /*%3$s*/ $parent_type );
1133
+ } else {
1134
+ $parent = '(' . _x( 'Unattached', 'table_view_singular', 'media-library-assistant' ) . ')';
1135
+ }
1136
+
1137
+ return $parent;
1138
+ }
1139
+ }
1140
+
1141
+ /**
1142
+ * Removes ACP defaults and provides export for date
1143
+ *
1144
+ * @package Media Library Assistant
1145
+ * @since 2.52
1146
+ * @since 2.71 Added export
1147
+ */
1148
+ class ACP_Addon_MLA_Column_Date extends ACP_Column_Media_Date
1149
+ implements ACP_Export_Column {
1150
+
1151
+ /**
1152
+ * Remove default column width
1153
+ */
1154
+ public function register_settings() {
1155
+ }
1156
+
1157
+ /**
1158
+ * Support export
1159
+ */
1160
+ public function export() {
1161
+ return new ACP_Export_Model_StrippedValue( $this );
1162
+ }
1163
+
1164
+ /**
1165
+ * Supply value for export
1166
+ *
1167
+ * @param integer $id MLA_List_table item ID
1168
+ */
1169
+ public function get_raw_value( $id ) {
1170
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
1171
+ return (string) $item->post_date;
1172
+ }
1173
+ }
1174
+
1175
+ /**
1176
+ * Provides export for Last Modified date
1177
+ *
1178
+ * @package Media Library Assistant
1179
+ * @since 2.71
1180
+ */
1181
+ class ACP_Addon_MLA_Column_Modified extends AC_Column
1182
+ implements ACP_Export_Column {
1183
+
1184
+ /**
1185
+ * Define column properties
1186
+ */
1187
+ public function __construct() {
1188
+ $this->set_original( true );
1189
+ $this->set_type( 'modified' );
1190
+ }
1191
+
1192
+ /**
1193
+ * Support export
1194
+ */
1195
+ public function export() {
1196
+ return new ACP_Export_Model_StrippedValue( $this );
1197
+ }
1198
+
1199
+ /**
1200
+ * Supply value for export
1201
+ *
1202
+ * @param integer $id MLA_List_table item ID
1203
+ */
1204
+ public function get_raw_value( $id ) {
1205
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
1206
+ return (string) $item->post_modified;
1207
+ }
1208
+ }
1209
+
1210
+ /**
1211
+ * Removes ACP defaults & provides inline-editing, export for Author name
1212
+ *
1213
+ * @package Media Library Assistant
1214
+ * @since 2.52
1215
+ * @since 2.71 Added export
1216
+ */
1217
+ class ACP_Addon_MLA_Column_Author extends AC_Column_Media_Author
1218
+ implements ACP_Column_EditingInterface, ACP_Export_Column {
1219
+
1220
+ /**
1221
+ * Remove default column width
1222
+ */
1223
+ public function register_settings() {
1224
+ }
1225
+
1226
+ /**
1227
+ * Add inline editing support
1228
+ *
1229
+ * @return ACP_Editing_Model_Post_Author
1230
+ */
1231
+ public function editing() {
1232
+ return new ACP_Editing_Model_Post_Author( $this );
1233
+ }
1234
+
1235
+ /**
1236
+ * Support export
1237
+ */
1238
+ public function export() {
1239
+ return new ACP_Export_Model_StrippedValue( $this );
1240
+ }
1241
+
1242
+ /**
1243
+ * Supply value for export
1244
+ *
1245
+ * @param integer $id MLA_List_table item ID
1246
+ */
1247
+ public function get_raw_value( $id ) {
1248
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
1249
+ $user = get_user_by( 'id', $item->post_author );
1250
+
1251
+ if ( isset( $user->data->display_name ) ) {
1252
+ return $user->data->display_name;
1253
+ }
1254
+
1255
+ return 'unknown';
1256
+ }
1257
+ }
1258
+
1259
+ /**
1260
+ * Provides export for supported taxonomies
1261
+ *
1262
+ * @package Media Library Assistant
1263
+ * @since 2.71
1264
+ */
1265
+ class ACP_Addon_MLA_Column_Taxonomy extends AC_Column
1266
+ implements ACP_Export_Column {
1267
+
1268
+ /**
1269
+ * Define column properties
1270
+ *
1271
+ * set_type( 't_' . taxonomy ) is done by the calling function.
1272
+ */
1273
+ public function __construct() {
1274
+ $this->set_original( true );
1275
+ }
1276
+
1277
+ /**
1278
+ * Extract taxonomy slug from type name
1279
+ *
1280
+ * @return string Taxonomy name/slug
1281
+ */
1282
+ public function get_taxonomy() {
1283
+ return substr( $this->get_type(), 2 );
1284
+ }
1285
+
1286
+ /**
1287
+ * Does this post type have registered taxonomies
1288
+ *
1289
+ * @return bool True when post type has associated taxonomies
1290
+ */
1291
+ public function is_valid() {
1292
+ return true;
1293
+ }
1294
+
1295
+ /**
1296
+ * Support export
1297
+ */
1298
+ public function export() {
1299
+ return new ACP_Export_Model_StrippedValue( $this );
1300
+ }
1301
+
1302
+ /**
1303
+ * Supply value for export
1304
+ *
1305
+ * @param integer $id MLA_List_table item ID
1306
+ */
1307
+ public function get_raw_value( $id ) {
1308
+ $terms = wp_get_post_terms( $id, $this->get_taxonomy(), array( 'fields' => 'names' ) );
1309
+
1310
+ if ( ! $terms || is_wp_error( $terms ) ) {
1311
+ return '';
1312
+ }
1313
+
1314
+ return implode( ', ', $terms );
1315
+ }
1316
+ }
1317
+
1318
+ /**
1319
+ * Provides export for supported custom fields
1320
+ *
1321
+ * @package Media Library Assistant
1322
+ * @since 2.71
1323
+ */
1324
+ class ACP_Addon_MLA_Column_CustomField extends AC_Column
1325
+ implements ACP_Export_Column {
1326
+
1327
+ /**
1328
+ * Define column properties
1329
+ *
1330
+ * set_type( 'c_' . field number ) is done by the calling function.
1331
+ */
1332
+ public function __construct() {
1333
+ $this->set_original( true );
1334
+ }
1335
+
1336
+ /**
1337
+ * Does this post type support custom fields
1338
+ *
1339
+ * @return bool True when post type has custom fields
1340
+ */
1341
+ public function is_valid() {
1342
+ return true;
1343
+ }
1344
+
1345
+ /**
1346
+ * Support export
1347
+ */
1348
+ public function export() {
1349
+ return new ACP_Export_Model_StrippedValue( $this );
1350
+ }
1351
+
1352
+ /**
1353
+ * Supply value for export
1354
+ *
1355
+ * @param integer $id MLA_List_table item ID
1356
+ */
1357
+ public function get_raw_value( $id ) {
1358
+ static $custom_columns = NULL;
1359
+
1360
+ if ( NULL === $custom_columns ) {
1361
+ $custom_columns = MLACore::mla_custom_field_support( 'custom_columns' );
1362
+ }
1363
+
1364
+ $column_name = $this->get_name();
1365
+ $item = ACP_Addon_MLA_ListScreen::get_item( $id );
1366
+
1367
+ if ( 'meta:' == substr( $custom_columns[ $column_name ], 0, 5 ) ) {
1368
+ $is_meta = true;
1369
+ $meta_key = substr( $custom_columns[ $column_name ], 5 );
1370
+
1371
+ if ( !empty( $item->mla_wp_attachment_metadata ) ) {
1372
+ $values = MLAData::mla_find_array_element( $meta_key, $item->mla_wp_attachment_metadata, 'array' );
1373
+
1374
+ if ( is_scalar( $values ) ) {
1375
+ $values = array( $values );
1376
+ }
1377
+ } else {
1378
+ $values = NULL;
1379
+ }
1380
+ } else {
1381
+ $is_meta = false;
1382
+ $values = get_post_meta( $item->ID, $custom_columns[ $column_name ], false );
1383
+ }
1384
+
1385
+ if ( empty( $values ) ) {
1386
+ return '';
1387
+ }
1388
+
1389
+ $list = array();
1390
+ foreach ( $values as $index => $value ) {
1391
+ /*
1392
+ * For display purposes, convert array values.
1393
+ * Use "@" because embedded arrays throw PHP Warnings from implode.
1394
+ */
1395
+ if ( is_array( $value ) ) {
1396
+ $list[] = 'array( ' . @implode( ', ', $value ) . ' )'; // TODO PHP 7 error handling
1397
+ } elseif ( $is_meta ) {
1398
+ $list[] = $value;
1399
+ } else {
1400
+ $list[] = esc_html( $value );
1401
+ }
1402
+ }
1403
+
1404
+ if ( count( $list ) > 1 ) {
1405
+ return '[' . join( '], [', $list ) . ']';
1406
+ } else {
1407
+ return $list[0];
1408
+ }
1409
+ }
1410
+ }
1411
+ ?>
includes/class-mla-admin-columns-pro-support.php CHANGED
@@ -14,7 +14,7 @@ defined( 'ABSPATH' ) or die();
14
  * @since 2.71
15
  */
16
  class ACP_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen
17
- implements ACP_Editing_ListScreen, ACP_Export_ListScreen {
18
 
19
  /**
20
  * Initializes some properties, installs filters and then
@@ -33,7 +33,7 @@ class ACP_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen
33
  *
34
  * @since 2.71
35
  *
36
- * @param ACP_Editing_Model $model
37
  */
38
  public function editing( $model ) {
39
  return new ACP_Addon_MLA_Editing_Strategy( $model );
@@ -88,12 +88,9 @@ class ACP_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen
88
  public function register_column_types() {
89
  parent::register_column_types();
90
 
91
- // $this->register_column_type( new ACP_Column_CustomField ); Tobias 3/1/18 message
92
- // $this->register_column_type( new ACP_Colmn_Menu ); Tobias 3/1/18 message
93
-
94
  // Autoload the CustomField class if necessary
95
- if ( class_exists( 'ACP_Column_CustomField' ) ) {
96
- $this->register_column_type( new ACP_Column_CustomField );
97
  }
98
 
99
  $this->register_column_type( new ACP_Addon_MLA_Column_ID_Parent );
@@ -159,7 +156,7 @@ class ACP_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen
159
  }
160
  }
161
 
162
- return AC_Addon_MLA_ListScreen::get_object( $id );
163
  }
164
 
165
  /**
@@ -200,7 +197,7 @@ class ACP_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen
200
  *
201
  * @since 2.71
202
  */
203
- class ACP_Addon_MLA_Export_Strategy extends ACP_Export_Strategy {
204
 
205
  /**
206
  * Call parent constructor
@@ -214,7 +211,7 @@ class ACP_Addon_MLA_Export_Strategy extends ACP_Export_Strategy {
214
  /**
215
  * Retrieve the headers for the columns
216
  *
217
- * @param AC_Column[] $columns
218
  *
219
  * @since 1.0
220
  * @return string[] Associative array of header labels for the columns.
@@ -284,7 +281,7 @@ class ACP_Addon_MLA_Export_Strategy extends ACP_Export_Strategy {
284
  * @package Media Library Assistant
285
  * @since 2.71
286
  */
287
- class ACP_Addon_MLA_Editing_Strategy extends ACP_Editing_Strategy_Post {
288
 
289
  /**
290
  * Get the available items on the current page for passing them to JS
@@ -309,7 +306,7 @@ class ACP_Addon_MLA_Editing_Strategy extends ACP_Editing_Strategy_Post {
309
  * @package Media Library Assistant
310
  * @since 2.52
311
  */
312
- class ACP_Addon_MLA_Editing_Model_Media_Title extends ACP_Editing_Model_Media_Title {
313
 
314
  /**
315
  * Remove JavaScript selector settings
@@ -328,8 +325,8 @@ class ACP_Addon_MLA_Editing_Model_Media_Title extends ACP_Editing_Model_Media_Ti
328
  * @package Media Library Assistant
329
  * @since 2.71
330
  */
331
- class ACP_Addon_MLA_Column_ID_Parent extends AC_Column
332
- implements ACP_Export_Column {
333
 
334
  /**
335
  * Define column properties
@@ -346,7 +343,7 @@ class ACP_Addon_MLA_Column_ID_Parent extends AC_Column
346
  * Support export
347
  */
348
  public function export() {
349
- return new ACP_Export_Model_StrippedValue( $this );
350
  }
351
 
352
  /**
@@ -366,8 +363,8 @@ class ACP_Addon_MLA_Column_ID_Parent extends AC_Column
366
  * @package Media Library Assistant
367
  * @since 2.71
368
  */
369
- class ACP_Addon_MLA_Column_Title_Name extends AC_Column
370
- implements ACP_Export_Column {
371
 
372
  /**
373
  * Define column properties
@@ -381,7 +378,7 @@ class ACP_Addon_MLA_Column_Title_Name extends AC_Column
381
  * Support export
382
  */
383
  public function export() {
384
- return new ACP_Export_Model_StrippedValue( $this );
385
  }
386
 
387
  /**
@@ -407,8 +404,8 @@ class ACP_Addon_MLA_Column_Title_Name extends AC_Column
407
  * @since 2.52
408
  * @since 2.71 Added export
409
  */
410
- class ACP_Addon_MLA_Column_Title extends AC_Column_Media_Title
411
- implements ACP_Column_EditingInterface, ACP_Export_Column {
412
 
413
  /**
414
  * Define column properties
@@ -421,7 +418,7 @@ class ACP_Addon_MLA_Column_Title extends AC_Column_Media_Title
421
  /**
422
  * Add inline editing support
423
  *
424
- * @return ACP_Editing_Model_Media_Title
425
  */
426
  public function editing() {
427
  return new ACP_Addon_MLA_Editing_Model_Media_Title( $this );
@@ -431,7 +428,7 @@ class ACP_Addon_MLA_Column_Title extends AC_Column_Media_Title
431
  * Support export
432
  */
433
  public function export() {
434
- return new ACP_Export_Model_StrippedValue( $this );
435
  }
436
 
437
  /**
@@ -451,8 +448,8 @@ class ACP_Addon_MLA_Column_Title extends AC_Column_Media_Title
451
  * @package Media Library Assistant
452
  * @since 2.71
453
  */
454
- class ACP_Addon_MLA_Column_Name extends AC_Column
455
- implements ACP_Export_Column {
456
 
457
  /**
458
  * Define column properties
@@ -466,7 +463,7 @@ class ACP_Addon_MLA_Column_Name extends AC_Column
466
  * Support export
467
  */
468
  public function export() {
469
- return new ACP_Export_Model_StrippedValue( $this );
470
  }
471
 
472
  /**
@@ -487,8 +484,8 @@ class ACP_Addon_MLA_Column_Name extends AC_Column
487
  * @since 2.52
488
  * @since 2.71 Added export
489
  */
490
- class ACP_Addon_MLA_Column_Parent extends AC_Column_Media_Parent
491
- implements ACP_Export_Column {
492
  /**
493
  * Remove default column width
494
  */
@@ -499,7 +496,7 @@ class ACP_Addon_MLA_Column_Parent extends AC_Column_Media_Parent
499
  * Support export
500
  */
501
  public function export() {
502
- return new ACP_Export_Model_StrippedValue( $this );
503
  }
504
 
505
  /**
@@ -520,8 +517,8 @@ class ACP_Addon_MLA_Column_Parent extends AC_Column_Media_Parent
520
  * @since 2.52
521
  * @since 2.71 Added export
522
  */
523
- class ACP_Addon_MLA_Column_MenuOrder extends AC_Column
524
- implements ACP_Column_EditingInterface, ACP_Export_Column {
525
 
526
  /**
527
  * Define column properties
@@ -534,17 +531,17 @@ class ACP_Addon_MLA_Column_MenuOrder extends AC_Column
534
  /**
535
  * Add inline editing support
536
  *
537
- * @return ACP_Editing_Model_Post_Order
538
  */
539
  public function editing() {
540
- return new ACP_Editing_Model_Post_Order( $this );
541
  }
542
 
543
  /**
544
  * Support export
545
  */
546
  public function export() {
547
- return new ACP_Export_Model_StrippedValue( $this );
548
  }
549
 
550
  /**
@@ -564,8 +561,8 @@ class ACP_Addon_MLA_Column_MenuOrder extends AC_Column
564
  * @package Media Library Assistant
565
  * @since 2.71
566
  */
567
- class ACP_Addon_MLA_Column_Features extends AC_Column
568
- implements ACP_Export_Column {
569
 
570
  /**
571
  * Define column properties
@@ -579,7 +576,7 @@ class ACP_Addon_MLA_Column_Features extends AC_Column
579
  * Support export
580
  */
581
  public function export() {
582
- return new ACP_Export_Model_StrippedValue( $this );
583
  }
584
 
585
  /**
@@ -626,8 +623,8 @@ class ACP_Addon_MLA_Column_Features extends AC_Column
626
  * @package Media Library Assistant
627
  * @since 2.71
628
  */
629
- class ACP_Addon_MLA_Column_Inserts extends AC_Column
630
- implements ACP_Export_Column {
631
 
632
  /**
633
  * Define column properties
@@ -641,7 +638,7 @@ class ACP_Addon_MLA_Column_Inserts extends AC_Column
641
  * Support export
642
  */
643
  public function export() {
644
- return new ACP_Export_Model_StrippedValue( $this );
645
  }
646
 
647
  /**
@@ -693,8 +690,8 @@ class ACP_Addon_MLA_Column_Inserts extends AC_Column
693
  * @package Media Library Assistant
694
  * @since 2.71
695
  */
696
- class ACP_Addon_MLA_Column_Galleries extends AC_Column
697
- implements ACP_Export_Column {
698
 
699
  /**
700
  * Define column properties
@@ -708,7 +705,7 @@ class ACP_Addon_MLA_Column_Galleries extends AC_Column
708
  * Support export
709
  */
710
  public function export() {
711
- return new ACP_Export_Model_StrippedValue( $this );
712
  }
713
 
714
  /**
@@ -755,8 +752,8 @@ class ACP_Addon_MLA_Column_Galleries extends AC_Column
755
  * @package Media Library Assistant
756
  * @since 2.71
757
  */
758
- class ACP_Addon_MLA_Column_MLA_Galleries extends AC_Column
759
- implements ACP_Export_Column {
760
 
761
  /**
762
  * Define column properties
@@ -770,7 +767,7 @@ class ACP_Addon_MLA_Column_MLA_Galleries extends AC_Column
770
  * Support export
771
  */
772
  public function export() {
773
- return new ACP_Export_Model_StrippedValue( $this );
774
  }
775
 
776
  /**
@@ -818,8 +815,8 @@ class ACP_Addon_MLA_Column_MLA_Galleries extends AC_Column
818
  * @since 2.52
819
  * @since 2.71 Added export
820
  */
821
- class ACP_Addon_MLA_Column_AltText extends ACP_Column_Media_AlternateText
822
- implements ACP_Column_EditingInterface, ACP_Export_Column {
823
 
824
  /**
825
  * Define column properties
@@ -832,17 +829,17 @@ class ACP_Addon_MLA_Column_AltText extends ACP_Column_Media_AlternateText
832
  /**
833
  * Add inline editing support
834
  *
835
- * @return ACP_Editing_Model_Media_AlternateText
836
  */
837
  public function editing() {
838
- return new ACP_Editing_Model_Media_AlternateText( $this );
839
  }
840
 
841
  /**
842
  * Support export
843
  */
844
  public function export() {
845
- return new ACP_Export_Model_StrippedValue( $this );
846
  }
847
 
848
  /**
@@ -874,8 +871,8 @@ class ACP_Addon_MLA_Column_AltText extends ACP_Column_Media_AlternateText
874
  * @since 2.52
875
  * @since 2.71 Added export
876
  */
877
- class ACP_Addon_MLA_Column_Caption extends ACP_Column_Media_Caption
878
- implements ACP_Column_EditingInterface, ACP_Export_Column {
879
 
880
  /**
881
  * Define column properties
@@ -889,7 +886,7 @@ class ACP_Addon_MLA_Column_Caption extends ACP_Column_Media_Caption
889
  * Support export
890
  */
891
  public function export() {
892
- return new ACP_Export_Model_StrippedValue( $this );
893
  }
894
 
895
  /**
@@ -910,8 +907,8 @@ class ACP_Addon_MLA_Column_Caption extends ACP_Column_Media_Caption
910
  * @since 2.52
911
  * @since 2.71 Added export
912
  */
913
- class ACP_Addon_MLA_Column_Description extends AC_Column_Media_Description
914
- implements ACP_Column_EditingInterface, ACP_Export_Column {
915
 
916
  /**
917
  * Define column properties
@@ -924,17 +921,17 @@ class ACP_Addon_MLA_Column_Description extends AC_Column_Media_Description
924
  /**
925
  * Add inline editing and provides export for Description
926
  *
927
- * @return ACP_Editing_Model_Post_Content
928
  */
929
  public function editing() {
930
- return new ACP_Editing_Model_Post_Content( $this );
931
  }
932
 
933
  /**
934
  * Support export
935
  */
936
  public function export() {
937
- return new ACP_Export_Model_StrippedValue( $this );
938
  }
939
 
940
  /**
@@ -955,8 +952,8 @@ class ACP_Addon_MLA_Column_Description extends AC_Column_Media_Description
955
  * @since 2.52
956
  * @since 2.71 Added export
957
  */
958
- class ACP_Addon_MLA_Column_MimeType extends AC_Column_Media_MimeType
959
- implements ACP_Column_EditingInterface, ACP_Export_Column {
960
 
961
  /**
962
  * Define column properties
@@ -969,17 +966,17 @@ class ACP_Addon_MLA_Column_MimeType extends AC_Column_Media_MimeType
969
  /**
970
  * Add inline editing support
971
  *
972
- * @return ACP_Editing_Model_Media_MimeType
973
  */
974
  public function editing() {
975
- return new ACP_Editing_Model_Media_MimeType( $this );
976
  }
977
 
978
  /**
979
  * Support export
980
  */
981
  public function export() {
982
- return new ACP_Export_Model_StrippedValue( $this );
983
  }
984
 
985
  /**
@@ -999,8 +996,8 @@ class ACP_Addon_MLA_Column_MimeType extends AC_Column_Media_MimeType
999
  * @package Media Library Assistant
1000
  * @since 2.71
1001
  */
1002
- class ACP_Addon_MLA_Column_FileURL extends AC_Column
1003
- implements ACP_Export_Column {
1004
 
1005
  /**
1006
  * Define column properties
@@ -1014,7 +1011,7 @@ class ACP_Addon_MLA_Column_FileURL extends AC_Column
1014
  * Support export
1015
  */
1016
  public function export() {
1017
- return new ACP_Export_Model_StrippedValue( $this );
1018
  }
1019
 
1020
  /**
@@ -1034,8 +1031,8 @@ class ACP_Addon_MLA_Column_FileURL extends AC_Column
1034
  * @package Media Library Assistant
1035
  * @since 2.71
1036
  */
1037
- class ACP_Addon_MLA_Column_Base_File extends AC_Column
1038
- implements ACP_Export_Column {
1039
 
1040
  /**
1041
  * Define column properties
@@ -1049,7 +1046,7 @@ class ACP_Addon_MLA_Column_Base_File extends AC_Column
1049
  * Support export
1050
  */
1051
  public function export() {
1052
- return new ACP_Export_Model_StrippedValue( $this );
1053
  }
1054
 
1055
  /**
@@ -1073,8 +1070,8 @@ class ACP_Addon_MLA_Column_Base_File extends AC_Column
1073
  * @package Media Library Assistant
1074
  * @since 2.71
1075
  */
1076
- class ACP_Addon_MLA_Column_Attached extends AC_Column
1077
- implements ACP_Export_Column {
1078
 
1079
  /**
1080
  * Define column properties
@@ -1088,7 +1085,7 @@ class ACP_Addon_MLA_Column_Attached extends AC_Column
1088
  * Support export
1089
  */
1090
  public function export() {
1091
- return new ACP_Export_Model_StrippedValue( $this );
1092
  }
1093
 
1094
  /**
@@ -1145,8 +1142,8 @@ class ACP_Addon_MLA_Column_Attached extends AC_Column
1145
  * @since 2.52
1146
  * @since 2.71 Added export
1147
  */
1148
- class ACP_Addon_MLA_Column_Date extends ACP_Column_Media_Date
1149
- implements ACP_Export_Column {
1150
 
1151
  /**
1152
  * Remove default column width
@@ -1158,7 +1155,7 @@ class ACP_Addon_MLA_Column_Date extends ACP_Column_Media_Date
1158
  * Support export
1159
  */
1160
  public function export() {
1161
- return new ACP_Export_Model_StrippedValue( $this );
1162
  }
1163
 
1164
  /**
@@ -1178,8 +1175,8 @@ class ACP_Addon_MLA_Column_Date extends ACP_Column_Media_Date
1178
  * @package Media Library Assistant
1179
  * @since 2.71
1180
  */
1181
- class ACP_Addon_MLA_Column_Modified extends AC_Column
1182
- implements ACP_Export_Column {
1183
 
1184
  /**
1185
  * Define column properties
@@ -1193,7 +1190,7 @@ class ACP_Addon_MLA_Column_Modified extends AC_Column
1193
  * Support export
1194
  */
1195
  public function export() {
1196
- return new ACP_Export_Model_StrippedValue( $this );
1197
  }
1198
 
1199
  /**
@@ -1214,8 +1211,8 @@ class ACP_Addon_MLA_Column_Modified extends AC_Column
1214
  * @since 2.52
1215
  * @since 2.71 Added export
1216
  */
1217
- class ACP_Addon_MLA_Column_Author extends AC_Column_Media_Author
1218
- implements ACP_Column_EditingInterface, ACP_Export_Column {
1219
 
1220
  /**
1221
  * Remove default column width
@@ -1226,17 +1223,17 @@ class ACP_Addon_MLA_Column_Author extends AC_Column_Media_Author
1226
  /**
1227
  * Add inline editing support
1228
  *
1229
- * @return ACP_Editing_Model_Post_Author
1230
  */
1231
  public function editing() {
1232
- return new ACP_Editing_Model_Post_Author( $this );
1233
  }
1234
 
1235
  /**
1236
  * Support export
1237
  */
1238
  public function export() {
1239
- return new ACP_Export_Model_StrippedValue( $this );
1240
  }
1241
 
1242
  /**
@@ -1262,8 +1259,8 @@ class ACP_Addon_MLA_Column_Author extends AC_Column_Media_Author
1262
  * @package Media Library Assistant
1263
  * @since 2.71
1264
  */
1265
- class ACP_Addon_MLA_Column_Taxonomy extends AC_Column
1266
- implements ACP_Export_Column {
1267
 
1268
  /**
1269
  * Define column properties
@@ -1296,7 +1293,7 @@ class ACP_Addon_MLA_Column_Taxonomy extends AC_Column
1296
  * Support export
1297
  */
1298
  public function export() {
1299
- return new ACP_Export_Model_StrippedValue( $this );
1300
  }
1301
 
1302
  /**
@@ -1321,8 +1318,8 @@ class ACP_Addon_MLA_Column_Taxonomy extends AC_Column
1321
  * @package Media Library Assistant
1322
  * @since 2.71
1323
  */
1324
- class ACP_Addon_MLA_Column_CustomField extends AC_Column
1325
- implements ACP_Export_Column {
1326
 
1327
  /**
1328
  * Define column properties
@@ -1346,7 +1343,7 @@ class ACP_Addon_MLA_Column_CustomField extends AC_Column
1346
  * Support export
1347
  */
1348
  public function export() {
1349
- return new ACP_Export_Model_StrippedValue( $this );
1350
  }
1351
 
1352
  /**
14
  * @since 2.71
15
  */
16
  class ACP_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen
17
+ implements ACP\Editing\ListScreen, ACP\Export\ListScreen {
18
 
19
  /**
20
  * Initializes some properties, installs filters and then
33
  *
34
  * @since 2.71
35
  *
36
+ * @param ACP\Editing\Model $model
37
  */
38
  public function editing( $model ) {
39
  return new ACP_Addon_MLA_Editing_Strategy( $model );
88
  public function register_column_types() {
89
  parent::register_column_types();
90
 
 
 
 
91
  // Autoload the CustomField class if necessary
92
+ if ( class_exists( 'ACP\Column\CustomField' ) ) {
93
+ $this->register_column_type( new ACP\Column\CustomField );
94
  }
95
 
96
  $this->register_column_type( new ACP_Addon_MLA_Column_ID_Parent );
156
  }
157
  }
158
 
159
+ return get_post( $id );
160
  }
161
 
162
  /**
197
  *
198
  * @since 2.71
199
  */
200
+ class ACP_Addon_MLA_Export_Strategy extends ACP\Export\Strategy {
201
 
202
  /**
203
  * Call parent constructor
211
  /**
212
  * Retrieve the headers for the columns
213
  *
214
+ * @param AC\Column[] $columns
215
  *
216
  * @since 1.0
217
  * @return string[] Associative array of header labels for the columns.
281
  * @package Media Library Assistant
282
  * @since 2.71
283
  */
284
+ class ACP_Addon_MLA_Editing_Strategy extends ACP\Editing\Strategy\Post {
285
 
286
  /**
287
  * Get the available items on the current page for passing them to JS
306
  * @package Media Library Assistant
307
  * @since 2.52
308
  */
309
+ class ACP_Addon_MLA_Editing_Model_Media_Title extends ACP\Editing\Model\Media\Title {
310
 
311
  /**
312
  * Remove JavaScript selector settings
325
  * @package Media Library Assistant
326
  * @since 2.71
327
  */
328
+ class ACP_Addon_MLA_Column_ID_Parent extends AC\Column
329
+ implements ACP\Export\Exportable {
330
 
331
  /**
332
  * Define column properties
343
  * Support export
344
  */
345
  public function export() {
346
+ return new ACP\Export\Model\StrippedValue( $this );
347
  }
348
 
349
  /**
363
  * @package Media Library Assistant
364
  * @since 2.71
365
  */
366
+ class ACP_Addon_MLA_Column_Title_Name extends AC\Column
367
+ implements ACP\Export\Exportable {
368
 
369
  /**
370
  * Define column properties
378
  * Support export
379
  */
380
  public function export() {
381
+ return new ACP\Export\Model\StrippedValue( $this );
382
  }
383
 
384
  /**
404
  * @since 2.52
405
  * @since 2.71 Added export
406
  */
407
+ class ACP_Addon_MLA_Column_Title extends AC\Column\Media\Title
408
+ implements ACP\Editing\Editable, ACP\Export\Exportable {
409
 
410
  /**
411
  * Define column properties
418
  /**
419
  * Add inline editing support
420
  *
421
+ * @return ACP\Editing\Model\Media\Title
422
  */
423
  public function editing() {
424
  return new ACP_Addon_MLA_Editing_Model_Media_Title( $this );
428
  * Support export
429
  */
430
  public function export() {
431
+ return new ACP\Export\Model\StrippedValue( $this );
432
  }
433
 
434
  /**
448
  * @package Media Library Assistant
449
  * @since 2.71
450
  */
451
+ class ACP_Addon_MLA_Column_Name extends AC\Column
452
+ implements ACP\Export\Exportable {
453
 
454
  /**
455
  * Define column properties
463
  * Support export
464
  */
465
  public function export() {
466
+ return new ACP\Export\Model\StrippedValue( $this );
467
  }
468
 
469
  /**
484
  * @since 2.52
485
  * @since 2.71 Added export
486
  */
487
+ class ACP_Addon_MLA_Column_Parent extends AC\Column\Media\MediaParent
488
+ implements ACP\Export\Exportable {
489
  /**
490
  * Remove default column width
491
  */
496
  * Support export
497
  */
498
  public function export() {
499
+ return new ACP\Export\Model\StrippedValue( $this );
500
  }
501
 
502
  /**
517
  * @since 2.52
518
  * @since 2.71 Added export
519
  */
520
+ class ACP_Addon_MLA_Column_MenuOrder extends AC\Column
521
+ implements ACP\Editing\Editable, ACP\Export\Exportable {
522
 
523
  /**
524
  * Define column properties
531
  /**
532
  * Add inline editing support
533
  *
534
+ * @return ACP\Editing\Model\Post\Order
535
  */
536
  public function editing() {
537
+ return new ACP\Editing\Model\Post\Order( $this );
538
  }
539
 
540
  /**
541
  * Support export
542
  */
543
  public function export() {
544
+ return new ACP\Export\Model\StrippedValue( $this );
545
  }
546
 
547
  /**
561
  * @package Media Library Assistant
562
  * @since 2.71
563
  */
564
+ class ACP_Addon_MLA_Column_Features extends AC\Column
565
+ implements ACP\Export\Exportable {
566
 
567
  /**
568
  * Define column properties
576
  * Support export
577
  */
578
  public function export() {
579
+ return new ACP\Export\Model\StrippedValue( $this );
580
  }
581
 
582
  /**
623
  * @package Media Library Assistant
624
  * @since 2.71
625
  */
626
+ class ACP_Addon_MLA_Column_Inserts extends AC\Column
627
+ implements ACP\Export\Exportable {
628
 
629
  /**
630
  * Define column properties
638
  * Support export
639
  */
640
  public function export() {
641
+ return new ACP\Export\Model\StrippedValue( $this );
642
  }
643
 
644
  /**
690
  * @package Media Library Assistant
691
  * @since 2.71
692
  */
693
+ class ACP_Addon_MLA_Column_Galleries extends AC\Column
694
+ implements ACP\Export\Exportable {
695
 
696
  /**
697
  * Define column properties
705
  * Support export
706
  */
707
  public function export() {
708
+ return new ACP\Export\Model\StrippedValue( $this );
709
  }
710
 
711
  /**
752
  * @package Media Library Assistant
753
  * @since 2.71
754
  */
755
+ class ACP_Addon_MLA_Column_MLA_Galleries extends AC\Column
756
+ implements ACP\Export\Exportable {
757
 
758
  /**
759
  * Define column properties
767
  * Support export
768
  */
769
  public function export() {
770
+ return new ACP\Export\Model\StrippedValue( $this );
771
  }
772
 
773
  /**
815
  * @since 2.52
816
  * @since 2.71 Added export
817
  */
818
+ class ACP_Addon_MLA_Column_AltText extends ACP\Column\Media\AlternateText
819
+ implements ACP\Editing\Editable, ACP\Export\Exportable {
820
 
821
  /**
822
  * Define column properties
829
  /**
830
  * Add inline editing support
831
  *
832
+ * @return ACP\Editing\Model\Media\AlternateText
833
  */
834
  public function editing() {
835
+ return new ACP\Editing\Model\Media\AlternateText( $this );
836
  }
837
 
838
  /**
839
  * Support export
840
  */
841
  public function export() {
842
+ return new ACP\Export\Model\StrippedValue( $this );
843
  }
844
 
845
  /**
871
  * @since 2.52
872
  * @since 2.71 Added export
873
  */
874
+ class ACP_Addon_MLA_Column_Caption extends ACP\Column\Media\Caption
875
+ implements ACP\Editing\Editable, ACP\Export\Exportable {
876
 
877
  /**
878
  * Define column properties
886
  * Support export
887
  */
888
  public function export() {
889
+ return new ACP\Export\Model\StrippedValue( $this );
890
  }
891
 
892
  /**
907
  * @since 2.52
908
  * @since 2.71 Added export
909
  */
910
+ class ACP_Addon_MLA_Column_Description extends AC\Column\Media\Description
911
+ implements ACP\Editing\Editable, ACP\Export\Exportable {
912
 
913
  /**
914
  * Define column properties
921
  /**
922
  * Add inline editing and provides export for Description
923
  *
924
+ * @return ACP\Editing\Model\Post\Content
925
  */
926
  public function editing() {
927
+ return new ACP\Editing\Model\Post\Content( $this );
928
  }
929
 
930
  /**
931
  * Support export
932
  */
933
  public function export() {
934
+ return new ACP\Export\Model\StrippedValue( $this );
935
  }
936
 
937
  /**
952
  * @since 2.52
953
  * @since 2.71 Added export
954
  */
955
+ class ACP_Addon_MLA_Column_MimeType extends AC\Column\Media\MimeType
956
+ implements ACP\Editing\Editable, ACP\Export\Exportable {
957
 
958
  /**
959
  * Define column properties
966
  /**
967
  * Add inline editing support
968
  *
969
+ * @return ACP\Editing\Model\Media\MimeType
970
  */
971
  public function editing() {
972
+ return new ACP\Editing\Model\Media\MimeType( $this );
973
  }
974
 
975
  /**
976
  * Support export
977
  */
978
  public function export() {
979
+ return new ACP\Export\Model\StrippedValue( $this );
980
  }
981
 
982
  /**
996
  * @package Media Library Assistant
997
  * @since 2.71
998
  */
999
+ class ACP_Addon_MLA_Column_FileURL extends AC\Column
1000
+ implements ACP\Export\Exportable {
1001
 
1002
  /**
1003
  * Define column properties
1011
  * Support export
1012
  */
1013
  public function export() {
1014
+ return new ACP\Export\Model\StrippedValue( $this );
1015
  }
1016
 
1017
  /**
1031
  * @package Media Library Assistant
1032
  * @since 2.71
1033
  */
1034
+ class ACP_Addon_MLA_Column_Base_File extends AC\Column
1035
+ implements ACP\Export\Exportable {
1036
 
1037
  /**
1038
  * Define column properties
1046
  * Support export
1047
  */
1048
  public function export() {
1049
+ return new ACP\Export\Model\StrippedValue( $this );
1050
  }
1051
 
1052
  /**
1070
  * @package Media Library Assistant
1071
  * @since 2.71
1072
  */
1073
+ class ACP_Addon_MLA_Column_Attached extends AC\Column
1074
+ implements ACP\Export\Exportable {
1075
 
1076
  /**
1077
  * Define column properties
1085
  * Support export
1086
  */
1087
  public function export() {
1088
+ return new ACP\Export\Model\StrippedValue( $this );
1089
  }
1090
 
1091
  /**
1142
  * @since 2.52
1143
  * @since 2.71 Added export
1144
  */
1145
+ class ACP_Addon_MLA_Column_Date extends ACP\Column\Media\Date
1146
+ implements ACP\Export\Exportable {
1147
 
1148
  /**
1149
  * Remove default column width
1155
  * Support export
1156
  */
1157
  public function export() {
1158
+ return new ACP\Export\Model\StrippedValue( $this );
1159
  }
1160
 
1161
  /**
1175
  * @package Media Library Assistant
1176
  * @since 2.71
1177
  */
1178
+ class ACP_Addon_MLA_Column_Modified extends AC\Column
1179
+ implements ACP\Export\Exportable {
1180
 
1181
  /**
1182
  * Define column properties
1190
  * Support export
1191
  */
1192
  public function export() {
1193
+ return new ACP\Export\Model\StrippedValue( $this );
1194
  }
1195
 
1196
  /**
1211
  * @since 2.52
1212
  * @since 2.71 Added export
1213
  */
1214
+ class ACP_Addon_MLA_Column_Author extends AC\Column\Media\Author
1215
+ implements ACP\Editing\Editable, ACP\Export\Exportable {
1216
 
1217
  /**
1218
  * Remove default column width
1223
  /**
1224
  * Add inline editing support
1225
  *
1226
+ * @return ACP\Editing\Model\Post\Author
1227
  */
1228
  public function editing() {
1229
+ return new ACP\Editing\Model\Post\Author( $this );
1230
  }
1231
 
1232
  /**
1233
  * Support export
1234
  */
1235
  public function export() {
1236
+ return new ACP\Export\Model\StrippedValue( $this );
1237
  }
1238
 
1239
  /**
1259
  * @package Media Library Assistant
1260
  * @since 2.71
1261
  */
1262
+ class ACP_Addon_MLA_Column_Taxonomy extends AC\Column
1263
+ implements ACP\Export\Exportable {
1264
 
1265
  /**
1266
  * Define column properties
1293
  * Support export
1294
  */
1295
  public function export() {
1296
+ return new ACP\Export\Model\StrippedValue( $this );
1297
  }
1298
 
1299
  /**
1318
  * @package Media Library Assistant
1319
  * @since 2.71
1320
  */
1321
+ class ACP_Addon_MLA_Column_CustomField extends AC\Column
1322
+ implements ACP\Export\Exportable {
1323
 
1324
  /**
1325
  * Define column properties
1343
  * Support export
1344
  */
1345
  public function export() {
1346
+ return new ACP\Export\Model\StrippedValue( $this );
1347
  }
1348
 
1349
  /**
includes/class-mla-admin-columns-support.php CHANGED
@@ -7,13 +7,28 @@
7
  */
8
  defined( 'ABSPATH' ) or die();
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  /**
11
  * Class Admin Columns Addon MLA (Media Library Assistant) List Screen supports the Admin Columns plugin
12
  *
13
  * @package Media Library Assistant
14
  * @since 2.50
15
  */
16
- class AC_Addon_MLA_ListScreen extends AC_ListScreen_Media {
17
 
18
  /**
19
  * Initializes some properties, installs filters and then
7
  */
8
  defined( 'ABSPATH' ) or die();
9
 
10
+ // Accomodate class namespace introduction in Admin Columns 3.2.x
11
+ if ( class_exists( 'AC\ListScreen\Media' ) ) {
12
+ /**
13
+ * Class Admin Columns List Screen Stub for Admin Columns 3.2.x+
14
+ */
15
+ class AC_Addon_MLA_ListScreen_Stub extends AC\ListScreen\Media {
16
+ }
17
+ } else {
18
+ /**
19
+ * Class Admin Columns List Screen Stub for Admin Columns 3.1.x-
20
+ */
21
+ class AC_Addon_MLA_ListScreen_Stub extends AC_ListScreen_Media {
22
+ }
23
+ }
24
+
25
  /**
26
  * Class Admin Columns Addon MLA (Media Library Assistant) List Screen supports the Admin Columns plugin
27
  *
28
  * @package Media Library Assistant
29
  * @since 2.50
30
  */
31
+ class AC_Addon_MLA_ListScreen extends AC_Addon_MLA_ListScreen_Stub {
32
 
33
  /**
34
  * Initializes some properties, installs filters and then
includes/class-mla-core.php CHANGED
@@ -21,7 +21,7 @@ class MLACore {
21
  *
22
  * @var string
23
  */
24
- const CURRENT_MLA_VERSION = '2.74';
25
 
26
  /**
27
  * Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)
@@ -1759,9 +1759,12 @@ class MLACore {
1759
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-admin-columns-support.php' );
1760
 
1761
  if ( function_exists( 'ACP' ) ) {
1762
- if ( version_compare( ACP()->get_version(), '4.2.3', '>=' ) ) {
1763
- // Load the latest version, with export support
1764
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-admin-columns-pro-support.php' );
 
 
 
1765
  } elseif ( version_compare( ACP()->get_version(), '4.2.0', '>=' ) ) {
1766
  // Load the interim version, with inline editing support
1767
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-admin-columns-pro-support-42.php' );
21
  *
22
  * @var string
23
  */
24
+ const CURRENT_MLA_VERSION = '2.75';
25
 
26
  /**
27
  * Slug for registering and enqueueing plugin style sheets (moved from class-mla-main.php)
1759
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-admin-columns-support.php' );
1760
 
1761
  if ( function_exists( 'ACP' ) ) {
1762
+ if ( version_compare( ACP()->get_version(), '4.3', '>=' ) ) {
1763
+ // Load the latest version, with namespace support
1764
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-admin-columns-pro-support.php' );
1765
+ } elseif ( version_compare( ACP()->get_version(), '4.2.3', '>=' ) ) {
1766
+ // Load the interim version, with export support
1767
+ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-admin-columns-pro-support-423.php' );
1768
  } elseif ( version_compare( ACP()->get_version(), '4.2.0', '>=' ) ) {
1769
  // Load the interim version, with inline editing support
1770
  require_once( MLA_PLUGIN_PATH . 'includes/class-mla-admin-columns-pro-support-42.php' );
includes/class-mla-mime-types.php CHANGED
@@ -2219,8 +2219,10 @@ class MLAMime {
2219
  }
2220
 
2221
  $description = trim( $value['description'] );
2222
- if ( ! empty( $description ) && ( $description != self::$mla_upload_mime_descriptions[ $key ] ) ) {
2223
- $mla_upload_mimes['description'][ $key ] = $description;
 
 
2224
  }
2225
 
2226
  if ( $value['icon_type'] != $value['core_icon_type'] ) {
2219
  }
2220
 
2221
  $description = trim( $value['description'] );
2222
+ if ( ! empty( $description ) ) {
2223
+ if ( empty( self::$mla_upload_mime_descriptions[ $key ] ) || ( $description != self::$mla_upload_mime_descriptions[ $key ] ) ) {
2224
+ $mla_upload_mimes['description'][ $key ] = $description;
2225
+ }
2226
  }
2227
 
2228
  if ( $value['icon_type'] != $value['core_icon_type'] ) {
includes/class-mla-options.php CHANGED
@@ -1465,9 +1465,12 @@ return "MLAOptions::mla_custom_field_option_handler( $action, $key ) deprecated.
1465
  if ( !empty( $new_text ) ) {
1466
  switch ( $setting_key ) {
1467
  case 'post_title':
1468
- if ( ( empty( $post->post_title ) || !$keep_existing ) &&
1469
- ( trim( $new_text ) && ! is_numeric( sanitize_title( $new_text ) ) ) )
 
 
1470
  $updates[ $setting_key ] = $new_text;
 
1471
  break;
1472
  case 'post_name':
1473
  $updates[ $setting_key ] = wp_unique_post_slug( sanitize_title( $new_text ), $post->ID, $post->post_status, $post->post_type, $post->post_parent);
@@ -1475,7 +1478,8 @@ return "MLAOptions::mla_custom_field_option_handler( $action, $key ) deprecated.
1475
  case 'image_alt':
1476
  $old_text = get_metadata( 'post', $post->ID, '_wp_attachment_image_alt', true );
1477
  if ( empty( $old_text ) || !$keep_existing ) {
1478
- $updates[ $setting_key ] = $new_text; }
 
1479
  break;
1480
  case 'post_excerpt':
1481
  if ( empty( $post->post_excerpt ) || !$keep_existing ) {
1465
  if ( !empty( $new_text ) ) {
1466
  switch ( $setting_key ) {
1467
  case 'post_title':
1468
+ // wpadmin/includes/media.php function media_handle_upload() eliminates numeric values
1469
+ // if ( ( empty( $post->post_title ) || !$keep_existing ) &&
1470
+ // ( trim( $new_text ) && ! is_numeric( sanitize_title( $new_text ) ) ) )
1471
+ if ( empty( $post->post_title ) || !$keep_existing ) {
1472
  $updates[ $setting_key ] = $new_text;
1473
+ }
1474
  break;
1475
  case 'post_name':
1476
  $updates[ $setting_key ] = wp_unique_post_slug( sanitize_title( $new_text ), $post->ID, $post->post_status, $post->post_type, $post->post_parent);
1478
  case 'image_alt':
1479
  $old_text = get_metadata( 'post', $post->ID, '_wp_attachment_image_alt', true );
1480
  if ( empty( $old_text ) || !$keep_existing ) {
1481
+ $updates[ $setting_key ] = $new_text;
1482
+ }
1483
  break;
1484
  case 'post_excerpt':
1485
  if ( empty( $post->post_excerpt ) || !$keep_existing ) {
includes/class-mla-settings-upload-tab.php CHANGED
@@ -361,20 +361,16 @@ class MLASettings_Upload {
361
  );
362
  }
363
 
364
- /*
365
- * Process bulk actions that affect an array of items
366
- */
367
  if ( $bulk_action && ( $bulk_action != 'none' ) ) {
368
  if ( isset( $_REQUEST['cb_mla_item_ID'] ) ) {
369
  if ( 'select' == $bulk_action ) {
370
  foreach ( $_REQUEST['cb_mla_item_ID'] as $ID ) {
371
- $item_content = MLASettings::_process_optional_upload_mime( $ID );
372
  $page_content['message'] .= $item_content['message'] . '<br>';
373
  }
374
  } else {
375
- /*
376
- * Convert post-ID to slug; separate loop required because delete changes post_IDs
377
- */
378
  $slugs = array();
379
  foreach ( $_REQUEST['cb_mla_item_ID'] as $post_ID )
380
  $slugs[] = MLAMime::mla_get_upload_mime_slug( $post_ID );
361
  );
362
  }
363
 
364
+ // Process bulk actions that affect an array of items
 
 
365
  if ( $bulk_action && ( $bulk_action != 'none' ) ) {
366
  if ( isset( $_REQUEST['cb_mla_item_ID'] ) ) {
367
  if ( 'select' == $bulk_action ) {
368
  foreach ( $_REQUEST['cb_mla_item_ID'] as $ID ) {
369
+ $item_content = self::_process_optional_upload_mime( $ID );
370
  $page_content['message'] .= $item_content['message'] . '<br>';
371
  }
372
  } else {
373
+ // Convert post-ID to slug; separate loop required because delete changes post_IDs
 
 
374
  $slugs = array();
375
  foreach ( $_REQUEST['cb_mla_item_ID'] as $post_ID )
376
  $slugs[] = MLAMime::mla_get_upload_mime_slug( $post_ID );
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 2.74
10
  */
11
 
12
  /*
@@ -16,7 +16,7 @@ Description: Enhances the Media Library; powerful [mla_gallery] [mla_tag_cloud]
16
  Author: David Lingren, Fair Trade Judaica
17
  Text Domain: media-library-assistant
18
  Domain Path: /languages
19
- Version: 2.74
20
  Author URI: http://fairtradejudaica.org/our-story/staff/
21
 
22
  Copyright 2011-2018 David Lingren
6
  * will the rest of the plugin be loaded and run.
7
  *
8
  * @package Media Library Assistant
9
+ * @version 2.75
10
  */
11
 
12
  /*
16
  Author: David Lingren, Fair Trade Judaica
17
  Text Domain: media-library-assistant
18
  Domain Path: /languages
19
+ Version: 2.75
20
  Author URI: http://fairtradejudaica.org/our-story/staff/
21
 
22
  Copyright 2011-2018 David Lingren
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: dglingren
3
  Donate link: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
4
  Tags: attachments, gallery, images, media, media library, tags, categories, IPTC, EXIF, XMP, GPS, PDF, metadata, photos, photographs, photo albums, MIME, mime-type, icon, upload, file extensions, WPML, Polylang
5
  Requires at least: 3.5.0
6
- Tested up to: 4.9.6
7
  Requires PHP: 5.3
8
- Stable tag: 2.74
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -183,6 +183,13 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
183
 
184
  == Changelog ==
185
 
 
 
 
 
 
 
 
186
  = 2.74 =
187
  * New: The "MLA Substitution Parameter Hooks Example" plugin has been enhanced with a `current_term:` prefix that returns values from the term(s) present in the `$_REQUEST` variables.
188
  * Fix: Cross-Site Scripting vulnerabilities have been removed from the Media/Assistant and Settings/Media Library assistant admin submenu screens.
@@ -290,8 +297,8 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
290
 
291
  == Upgrade Notice ==
292
 
293
- = 2.74 =
294
- Cross-Site Scripting vulnerabilities have been removed from the Media/Assistant and Settings/Media Library assistant admin submenu screens. One enhancement, seven fixes.
295
 
296
  == Other Notes ==
297
 
3
  Donate link: http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
4
  Tags: attachments, gallery, images, media, media library, tags, categories, IPTC, EXIF, XMP, GPS, PDF, metadata, photos, photographs, photo albums, MIME, mime-type, icon, upload, file extensions, WPML, Polylang
5
  Requires at least: 3.5.0
6
+ Tested up to: 4.9.7
7
  Requires PHP: 5.3
8
+ Stable tag: 2.75
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
183
 
184
  == Changelog ==
185
 
186
+ = 2.75 =
187
+ * Fix: Accomodate Admin Columns (and Pro) update to PHP namespaces; eliminate "deprecated" warnings.
188
+ * Fix: For IPIC/EXIF mapping rules, numeric values can now be mapped into the Title standard field.
189
+ * Fix: When Admin Columns Pro 4.0.x is active, a PHP Warning/Uncaught Error regarding argument count mismatch has been eliminated. The error occurs in ACP 4.0.3 and earlier, but not in ACP 4.0.14 and later.
190
+ * Fix: For Settings/Media Library Assistant Uploads tab, a PHP Fatal error when bulk-selecting items from the "Search Known Types" list has been corrected.
191
+ * Fix: For Settings/Media Library Assistant Uploads tab, a PHP Notice when adding an custom item with a non-empty Description has been corrected.
192
+
193
  = 2.74 =
194
  * New: The "MLA Substitution Parameter Hooks Example" plugin has been enhanced with a `current_term:` prefix that returns values from the term(s) present in the `$_REQUEST` variables.
195
  * Fix: Cross-Site Scripting vulnerabilities have been removed from the Media/Assistant and Settings/Media Library assistant admin submenu screens.
297
 
298
  == Upgrade Notice ==
299
 
300
+ = 2.75 =
301
+ Admin Columns (and Pro) fixes to eliminate PHP messages. Five fixes in all.
302
 
303
  == Other Notes ==
304
 
tpls/documentation-settings-tab.tpl CHANGED
@@ -620,7 +620,7 @@ The Size parameter specifies the image size to use for the thumbnail display; "t
620
  </tr>
621
  <tr>
622
  <td class="mla-doc-table-label">icon_only</td>
623
- <td>Display an appropriate 60x60 (or 64x64) pixel thumbnail for <strong>ALL</strong> items, image and non-image.</td>
624
  </tr>
625
  <tr>
626
  <td class="mla-doc-table-label">none</td>
620
  </tr>
621
  <tr>
622
  <td class="mla-doc-table-label">icon_only</td>
623
+ <td>Display an appropriate 60x60 (or 64x64) pixel icon for <strong>ALL</strong> items, image and non-image.</td>
624
  </tr>
625
  <tr>
626
  <td class="mla-doc-table-label">none</td>