Version Description
- New: Complete support for all taxonomies registered with WordPress, including the standard Categories and Tags, your custom taxonomies and the Assistant's pre-defined Att. Categories and Att. Tags. You can add taxonomy columns to the Assistant admin screen, filter the listing on any taxonomy, assign terms to attachments and list the attachments for a taxonomy term.
- New: MIME Type and Last Modified Date added to columns listing
- New: Last Modified Date added to single item edit screen
- New: Default column and sort order added to Settings page
- New: Plugin version number added to Settings page header
- Fix: Text fields such as Title, Alternate Text and Caption containing single quotes are no longer truncated on the Edit single item screen
- Fix: Sortable columns and sort order updated.
Download this release
Release Info
Developer | dglingren |
Plugin | Media Library Assistant |
Version | 0.30 |
Comparing to | |
See all releases |
Code changes from version 0.20 to 0.30
- includes/class-mla-data.php +226 -108
- includes/class-mla-list-table.php +188 -153
- includes/class-mla-main.php +90 -25
- includes/class-mla-objects.php +86 -101
- includes/class-mla-settings.php +364 -44
- includes/class-mla-shortcodes.php +3 -1
- includes/mla-plugin-loader.php +5 -5
- index.php +4 -4
- js/mla-single-edit-scripts.dev.js +2 -2
- js/mla-single-edit-scripts.js +1 -1
- phpDocs/classes/MLA.html +20 -27
- phpDocs/classes/MLAData.html +136 -40
- phpDocs/classes/MLAObjects.html +22 -73
- phpDocs/classes/MLASettings.html +96 -11
- phpDocs/classes/MLAShortcodes.html +3 -6
- phpDocs/classes/MLATest.html +3 -9
- phpDocs/classes/MLA_List_Table.html +95 -87
- phpDocs/deprecated.html +1 -1
- phpDocs/errors.html +1 -1
- phpDocs/graph_class.html +1 -1
- phpDocs/index.html +1 -1
- phpDocs/markers.html +1 -1
- phpDocs/namespaces/global.html +2 -2
- phpDocs/packages/Media Library Assistant.html +3 -3
- phpDocs/structure.xml +810 -637
- readme.txt +44 -15
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- tests/class-mla-tests.php +2 -2
- tpls/admin-display-settings-page.tpl +49 -8
- tpls/admin-display-single-document.tpl +5 -4
- tpls/admin-display-single-image.tpl +6 -5
- tpls/help-for-edit-flat-taxonomy.tpl +20 -0
- tpls/help-for-edit-hierarchical-taxonomy.tpl +21 -0
- tpls/help-for-media_page_mla-menu.tpl +5 -2
includes/class-mla-data.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Database and template file access for MLA needs
|
4 |
*
|
5 |
* @package Media Library Assistant
|
6 |
* @since 0.1
|
7 |
*/
|
8 |
|
9 |
/**
|
10 |
-
* Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs
|
11 |
*
|
12 |
* The _template functions are inspired by the book "WordPress 3 Plugin Development Essentials."
|
13 |
* Templates separate HTML markup from PHP code for easier maintenance and localization.
|
@@ -34,7 +34,7 @@ class MLAData {
|
|
34 |
*
|
35 |
* @since 0.1
|
36 |
*
|
37 |
-
* @param string
|
38 |
*
|
39 |
* @return string|array|false|NULL
|
40 |
* string for files that do not contain template divider comments,
|
@@ -113,10 +113,10 @@ class MLAData {
|
|
113 |
*
|
114 |
* @since 0.1
|
115 |
*
|
116 |
-
* @param string
|
117 |
-
* @param array
|
118 |
*
|
119 |
-
* @return string Placeholders corresponding to the keys of the hash will be replaced with their values
|
120 |
*/
|
121 |
public static function mla_parse_template( $tpl, $hash ) {
|
122 |
foreach ( $hash as $key => $value ) {
|
@@ -127,40 +127,150 @@ class MLAData {
|
|
127 |
return $tpl;
|
128 |
}
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
/**
|
131 |
* Sanitize and expand query arguments from request variables
|
132 |
*
|
133 |
* Prepare the arguments for WP_Query.
|
134 |
* Modeled after wp_edit_attachments_query in wp-admin/post.php
|
135 |
-
* NOTE: The caller must remove the 'posts_where' filter, if required.
|
136 |
*
|
137 |
* @since 0.1
|
138 |
*
|
139 |
-
* @param array
|
140 |
*
|
141 |
* @return array revised arguments suitable for WP_Query
|
142 |
*/
|
143 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
/*
|
145 |
* ['m'] - filter by year and month of post, e.g., 201204
|
146 |
*/
|
147 |
$request['m'] = isset( $request['m'] ) ? (int) $request['m'] : 0;
|
148 |
|
149 |
/*
|
150 |
-
* ['
|
151 |
*
|
152 |
* cat = '0' is "All Categories", i.e., no filtering
|
153 |
* cat = '-1' is "No Categories"
|
154 |
*/
|
155 |
-
if ( isset( $request['
|
156 |
-
|
157 |
-
|
|
|
158 |
'fields' => 'ids',
|
159 |
'hide_empty' => true
|
160 |
) );
|
161 |
$request['tax_query'] = array(
|
162 |
array(
|
163 |
-
'taxonomy' =>
|
164 |
'field' => 'id',
|
165 |
'terms' => $term_list,
|
166 |
'operator' => 'NOT IN'
|
@@ -169,27 +279,25 @@ class MLAData {
|
|
169 |
} else {
|
170 |
$request['tax_query'] = array(
|
171 |
array(
|
172 |
-
'taxonomy' =>
|
173 |
'field' => 'id',
|
174 |
'terms' => array(
|
175 |
-
(int) $request['
|
176 |
)
|
177 |
)
|
178 |
);
|
179 |
}
|
180 |
}
|
181 |
|
182 |
-
if ( isset( $request['
|
183 |
$request['tax_query'] = array(
|
184 |
array(
|
185 |
-
'taxonomy' => '
|
186 |
'field' => 'slug',
|
187 |
-
'terms' => $request['
|
188 |
'include_children' => false
|
189 |
)
|
190 |
);
|
191 |
-
|
192 |
-
unset( $request['attachment_category'] );
|
193 |
}
|
194 |
|
195 |
$request['post_type'] = 'attachment';
|
@@ -198,106 +306,114 @@ class MLAData {
|
|
198 |
$states .= ',private';
|
199 |
|
200 |
$request['post_status'] = isset( $request['status'] ) && 'trash' == $request['status'] ? 'trash' : $states;
|
201 |
-
|
202 |
-
/*
|
203 |
-
* The caller must remove this filter if it is added.
|
204 |
-
*/
|
205 |
-
if ( isset( $request['detached'] ) )
|
206 |
-
add_filter( 'posts_where', 'MLAData::mla_query_list_table_items_helper' );
|
207 |
-
|
208 |
return $request;
|
209 |
}
|
210 |
-
|
211 |
/**
|
212 |
-
*
|
213 |
-
*
|
214 |
-
* Supports prepare_items in class-mla-list-table.php.
|
215 |
-
* Modeled after wp_edit_attachments_query in wp-admin/post.php
|
216 |
*
|
217 |
-
* @since 0.
|
218 |
*
|
219 |
-
* @param array
|
220 |
-
* @param string $orderby database column to sort by
|
221 |
-
* @param string $order ASC or DESC
|
222 |
-
* @param int $offset number of rows to skip over to reach desired page
|
223 |
-
* @param int $count number of rows on each page
|
224 |
*
|
225 |
-
* @return
|
226 |
*/
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
* There are two columns defined that end up sorting on post_title,
|
232 |
-
* so we can't use the database column to identify the column but
|
233 |
-
* we actually sort on the database column.
|
234 |
-
*/
|
235 |
-
if ( $orderby == 'title_name' )
|
236 |
-
$orderby = 'post_title';
|
237 |
-
|
238 |
-
$request['orderby'] = $orderby;
|
239 |
-
$request['order'] = strtoupper( $order );
|
240 |
-
|
241 |
-
if ( ( (int) $count ) > 0 ) {
|
242 |
-
$request['offset'] = $offset;
|
243 |
-
$request['posts_per_page'] = $count;
|
244 |
-
}
|
245 |
-
|
246 |
-
/*
|
247 |
-
* Ignore old paged value; use offset
|
248 |
-
*/
|
249 |
-
if (isset($request['paged']))
|
250 |
-
unset($request['paged']);
|
251 |
-
|
252 |
$results = new WP_Query( $request );
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
/*
|
261 |
-
* Add parent data
|
262 |
-
*/
|
263 |
-
$parent_data = self::_fetch_attachment_parent_data( $attachment->post_parent );
|
264 |
-
foreach ( $parent_data as $parent_key => $parent_value ) {
|
265 |
-
$attachments[ $index ]->$parent_key = $parent_value;
|
266 |
-
}
|
267 |
-
|
268 |
-
/*
|
269 |
-
* Add meta data
|
270 |
-
*/
|
271 |
-
$meta_data = self::_fetch_attachment_metadata( $attachment->ID );
|
272 |
-
foreach ( $meta_data as $meta_key => $meta_value ) {
|
273 |
-
$attachments[ $index ]->$meta_key = $meta_value;
|
274 |
-
}
|
275 |
-
/*
|
276 |
-
* Add references
|
277 |
-
*/
|
278 |
-
$references = self::mla_fetch_attachment_references( $attachment->ID, $attachment->post_parent );
|
279 |
-
$attachments[ $index ]->mla_references = $references;
|
280 |
-
}
|
281 |
-
|
282 |
-
return $attachments;
|
283 |
}
|
284 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
/**
|
286 |
* Adds a WHERE clause for detached items
|
287 |
*
|
288 |
-
* Modeled after _edit_attachments_query_helper in wp-admin/post.php
|
289 |
-
* Defined as public
|
290 |
*
|
291 |
* @since 0.1
|
292 |
*
|
293 |
-
* @param string
|
294 |
*
|
295 |
* @return string query clause after "detached" item modification
|
296 |
*/
|
297 |
-
public static function
|
298 |
global $table_prefix;
|
299 |
-
|
300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
}
|
302 |
|
303 |
/**
|
@@ -308,8 +424,8 @@ class MLAData {
|
|
308 |
*
|
309 |
* @since 0.1
|
310 |
*
|
311 |
-
* @param int
|
312 |
-
* @return NULL|array NULL on failure else associative array
|
313 |
*/
|
314 |
function mla_get_attachment_by_id( $post_id ) {
|
315 |
global $wpdb, $post;
|
@@ -325,6 +441,7 @@ class MLAData {
|
|
325 |
return NULL;
|
326 |
}
|
327 |
|
|
|
328 |
$post_data = (array) $item;
|
329 |
$post = $item;
|
330 |
setup_postdata( $item );
|
@@ -344,6 +461,7 @@ class MLAData {
|
|
344 |
*/
|
345 |
$post_data['mla_references'] = self::mla_fetch_attachment_references( $post_id, $post_data['post_parent'] );
|
346 |
|
|
|
347 |
return $post_data;
|
348 |
}
|
349 |
|
@@ -355,8 +473,8 @@ class MLAData {
|
|
355 |
*
|
356 |
* @since 0.1
|
357 |
*
|
358 |
-
* @param int
|
359 |
-
* @param int
|
360 |
*
|
361 |
* @return array Reference information; see $references array comments
|
362 |
*/
|
@@ -481,7 +599,7 @@ class MLAData {
|
|
481 |
*
|
482 |
* @since 0.1
|
483 |
*
|
484 |
-
* @param int
|
485 |
*
|
486 |
* @return array Parent information; post_date, post_title and post_type
|
487 |
*/
|
@@ -509,14 +627,14 @@ class MLAData {
|
|
509 |
*
|
510 |
* @since 0.1
|
511 |
*
|
512 |
-
* @param int
|
513 |
*
|
514 |
* @return array Meta data variables
|
515 |
*/
|
516 |
private static function _fetch_attachment_metadata( $post_id ) {
|
517 |
$results = array();
|
518 |
$post_meta = get_metadata( 'post', $post_id );
|
519 |
-
|
520 |
if ( is_array( $post_meta ) ) {
|
521 |
foreach ( $post_meta as $post_meta_key => $post_meta_value ) {
|
522 |
if ( '_' == $post_meta_key{0} ) {
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Database and template file access for MLA needs
|
4 |
*
|
5 |
* @package Media Library Assistant
|
6 |
* @since 0.1
|
7 |
*/
|
8 |
|
9 |
/**
|
10 |
+
* Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs
|
11 |
*
|
12 |
* The _template functions are inspired by the book "WordPress 3 Plugin Development Essentials."
|
13 |
* Templates separate HTML markup from PHP code for easier maintenance and localization.
|
34 |
*
|
35 |
* @since 0.1
|
36 |
*
|
37 |
+
* @param string Complete path and name of the template file
|
38 |
*
|
39 |
* @return string|array|false|NULL
|
40 |
* string for files that do not contain template divider comments,
|
113 |
*
|
114 |
* @since 0.1
|
115 |
*
|
116 |
+
* @param string A formatting string containing [+placeholders+]
|
117 |
+
* @param array An associative array containing keys and values e.g. array('key' => 'value')
|
118 |
*
|
119 |
+
* @return string Placeholders corresponding to the keys of the hash will be replaced with their values
|
120 |
*/
|
121 |
public static function mla_parse_template( $tpl, $hash ) {
|
122 |
foreach ( $hash as $key => $value ) {
|
127 |
return $tpl;
|
128 |
}
|
129 |
|
130 |
+
/**
|
131 |
+
* Get the total number of attachment posts
|
132 |
+
*
|
133 |
+
* @since 0.30
|
134 |
+
*
|
135 |
+
* @param array Query variables, e.g., from $_REQUEST
|
136 |
+
*
|
137 |
+
* @return integer Number of attachment posts
|
138 |
+
*/
|
139 |
+
public static function mla_count_list_table_items( $request )
|
140 |
+
{
|
141 |
+
$request = self::_prepare_list_table_query( $request );
|
142 |
+
$results = self::_execute_list_table_query( $request );
|
143 |
+
return $results->found_posts;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Retrieve attachment objects for list table display
|
148 |
+
*
|
149 |
+
* Supports prepare_items in class-mla-list-table.php.
|
150 |
+
* Modeled after wp_edit_attachments_query in wp-admin/post.php
|
151 |
+
*
|
152 |
+
* @since 0.1
|
153 |
+
*
|
154 |
+
* @param array query parameters from web page, usually found in $_REQUEST
|
155 |
+
* @param int number of rows to skip over to reach desired page
|
156 |
+
* @param int number of rows on each page
|
157 |
+
*
|
158 |
+
* @return array attachment objects (posts) including parent data, meta data and references
|
159 |
+
*/
|
160 |
+
public static function mla_query_list_table_items( $request, $offset, $count ) {
|
161 |
+
$request = self::_prepare_list_table_query( $request );
|
162 |
+
|
163 |
+
/*
|
164 |
+
* We have to handle custom field/post_meta values here
|
165 |
+
* because they need a JOIN clause supplied by WP_Query
|
166 |
+
*/
|
167 |
+
switch ( self::$query_parameters['orderby'] ) {
|
168 |
+
case '_wp_attachment_image_alt':
|
169 |
+
$request['meta_key'] = '_wp_attachment_image_alt';
|
170 |
+
$request['orderby'] = 'meta_value';
|
171 |
+
$request['order'] = self::$query_parameters['order'];
|
172 |
+
break;
|
173 |
+
case '_wp_attached_file':
|
174 |
+
$request['meta_key'] = '_wp_attached_file';
|
175 |
+
$request['orderby'] = 'meta_value';
|
176 |
+
$request['order'] = self::$query_parameters['order'];
|
177 |
+
break;
|
178 |
+
} // $orderby
|
179 |
+
|
180 |
+
if ( ( (int) $count ) > 0 ) {
|
181 |
+
$request['offset'] = $offset;
|
182 |
+
$request['posts_per_page'] = $count;
|
183 |
+
}
|
184 |
+
|
185 |
+
$results = self::_execute_list_table_query( $request );
|
186 |
+
$attachments = $results->posts;
|
187 |
+
|
188 |
+
foreach ( $attachments as $index => $attachment ) {
|
189 |
+
/*
|
190 |
+
* Add parent data
|
191 |
+
*/
|
192 |
+
$parent_data = self::_fetch_attachment_parent_data( $attachment->post_parent );
|
193 |
+
foreach ( $parent_data as $parent_key => $parent_value ) {
|
194 |
+
$attachments[ $index ]->$parent_key = $parent_value;
|
195 |
+
}
|
196 |
+
|
197 |
+
/*
|
198 |
+
* Add meta data
|
199 |
+
*/
|
200 |
+
$meta_data = self::_fetch_attachment_metadata( $attachment->ID );
|
201 |
+
foreach ( $meta_data as $meta_key => $meta_value ) {
|
202 |
+
$attachments[ $index ]->$meta_key = $meta_value;
|
203 |
+
}
|
204 |
+
/*
|
205 |
+
* Add references
|
206 |
+
*/
|
207 |
+
$references = self::mla_fetch_attachment_references( $attachment->ID, $attachment->post_parent );
|
208 |
+
$attachments[ $index ]->mla_references = $references;
|
209 |
+
}
|
210 |
+
|
211 |
+
return $attachments;
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* WP_Query filter "parameters"
|
216 |
+
*
|
217 |
+
* This array defines parameters for the query's join, where and orderby filters.
|
218 |
+
* The parameters are set up in the _prepare_list_table_query function, and
|
219 |
+
* any further logic required to translate those values is contained in the filters.
|
220 |
+
*
|
221 |
+
* @since 0.30
|
222 |
+
*
|
223 |
+
* @var array
|
224 |
+
*/
|
225 |
+
private static $query_parameters = array( );
|
226 |
+
|
227 |
/**
|
228 |
* Sanitize and expand query arguments from request variables
|
229 |
*
|
230 |
* Prepare the arguments for WP_Query.
|
231 |
* Modeled after wp_edit_attachments_query in wp-admin/post.php
|
|
|
232 |
*
|
233 |
* @since 0.1
|
234 |
*
|
235 |
+
* @param array query parameters from web page, usually found in $_REQUEST
|
236 |
*
|
237 |
* @return array revised arguments suitable for WP_Query
|
238 |
*/
|
239 |
+
private static function _prepare_list_table_query( $request ) {
|
240 |
+
// error_log('_prepare_list_table_query $request = ' . var_export($request, true), 0);
|
241 |
+
|
242 |
+
self::$query_parameters = array( );
|
243 |
+
self::$query_parameters['detached'] = isset( $_REQUEST['detached'] );
|
244 |
+
self::$query_parameters['orderby'] = ( !empty( $request['orderby'] ) ) ? $request['orderby'] : MLASettings::mla_get_option( 'default_orderby' ); //If no sort, default from settings option
|
245 |
+
self::$query_parameters['order'] = ( !empty( $request['order'] ) ) ? strtoupper( $request['order'] ) : MLASettings::mla_get_option( 'default_order' ); //If no order, default from settings option
|
246 |
+
|
247 |
+
/*
|
248 |
+
* Ignore incoming paged value; use offset and count instead
|
249 |
+
*/
|
250 |
+
if (isset($request['paged']))
|
251 |
+
unset($request['paged']);
|
252 |
+
|
253 |
/*
|
254 |
* ['m'] - filter by year and month of post, e.g., 201204
|
255 |
*/
|
256 |
$request['m'] = isset( $request['m'] ) ? (int) $request['m'] : 0;
|
257 |
|
258 |
/*
|
259 |
+
* ['mla_filter_term'] - filter by taxonomy
|
260 |
*
|
261 |
* cat = '0' is "All Categories", i.e., no filtering
|
262 |
* cat = '-1' is "No Categories"
|
263 |
*/
|
264 |
+
if ( isset( $request['mla_filter_term'] ) && ( $request['mla_filter_term'] != '0' ) ) {
|
265 |
+
$tax_filter = MLASettings::mla_taxonomy_support('', 'filter');
|
266 |
+
if ( $request['mla_filter_term'] == '-1' ) {
|
267 |
+
$term_list = get_terms( $tax_filter, array(
|
268 |
'fields' => 'ids',
|
269 |
'hide_empty' => true
|
270 |
) );
|
271 |
$request['tax_query'] = array(
|
272 |
array(
|
273 |
+
'taxonomy' => $tax_filter,
|
274 |
'field' => 'id',
|
275 |
'terms' => $term_list,
|
276 |
'operator' => 'NOT IN'
|
279 |
} else {
|
280 |
$request['tax_query'] = array(
|
281 |
array(
|
282 |
+
'taxonomy' => $tax_filter,
|
283 |
'field' => 'id',
|
284 |
'terms' => array(
|
285 |
+
(int) $request['mla_filter_term']
|
286 |
)
|
287 |
)
|
288 |
);
|
289 |
}
|
290 |
}
|
291 |
|
292 |
+
if ( isset( $request['mla-tax'] ) ) {
|
293 |
$request['tax_query'] = array(
|
294 |
array(
|
295 |
+
'taxonomy' => $request['mla-tax'],
|
296 |
'field' => 'slug',
|
297 |
+
'terms' => $request['mla-term'],
|
298 |
'include_children' => false
|
299 |
)
|
300 |
);
|
|
|
|
|
301 |
}
|
302 |
|
303 |
$request['post_type'] = 'attachment';
|
306 |
$states .= ',private';
|
307 |
|
308 |
$request['post_status'] = isset( $request['status'] ) && 'trash' == $request['status'] ? 'trash' : $states;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
return $request;
|
310 |
}
|
311 |
+
|
312 |
/**
|
313 |
+
* Add filters, run query, remove filters
|
|
|
|
|
|
|
314 |
*
|
315 |
+
* @since 0.30
|
316 |
*
|
317 |
+
* @param array query parameters from web page, usually found in $_REQUEST
|
|
|
|
|
|
|
|
|
318 |
*
|
319 |
+
* @return object WP_Query object with query results
|
320 |
*/
|
321 |
+
private static function _execute_list_table_query( $request ) {
|
322 |
+
add_filter( 'posts_join', 'MLAData::mla_query_posts_join_filter' );
|
323 |
+
add_filter( 'posts_where', 'MLAData::mla_query_posts_where_filter' );
|
324 |
+
add_filter( 'posts_orderby', 'MLAData::mla_query_posts_orderby_filter' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
$results = new WP_Query( $request );
|
326 |
+
remove_filter( 'posts_orderby', 'MLAData::mla_query_posts_orderby_filter' );
|
327 |
+
remove_filter( 'posts_where', 'MLAData::mla_query_posts_where_filter' );
|
328 |
+
remove_filter( 'posts_join', 'MLAData::mla_query_posts_join_filter' );
|
329 |
+
|
330 |
+
// error_log( '_execute_list_table_query SQL ' . var_export( $results->request, true ), 0 );
|
331 |
+
// error_log( '_execute_list_table_query results ' . var_export( $results, true ), 0 );
|
332 |
+
return $results;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
}
|
334 |
|
335 |
+
/**
|
336 |
+
* Adds a JOIN clause, if required
|
337 |
+
*
|
338 |
+
* Defined as public because it's a filter.
|
339 |
+
*
|
340 |
+
* @since 0.30
|
341 |
+
*
|
342 |
+
* @param string query clause before modification
|
343 |
+
*
|
344 |
+
* @return string query clause after "detached" item modification
|
345 |
+
*/
|
346 |
+
public static function mla_query_posts_join_filter( $join_clause ) {
|
347 |
+
global $table_prefix;
|
348 |
+
// error_log( 'mla_query_posts_join_filter original ' . var_export( $join_clause, true ), 0 );
|
349 |
+
|
350 |
+
// return ' LEFT JOIN mladev_postmeta ON (mladev_posts.ID = mladev_postmeta.post_id)';
|
351 |
+
return $join_clause;
|
352 |
+
}
|
353 |
+
|
354 |
/**
|
355 |
* Adds a WHERE clause for detached items
|
356 |
*
|
357 |
+
* Modeled after _edit_attachments_query_helper in wp-admin/post.php.
|
358 |
+
* Defined as public because it's a filter.
|
359 |
*
|
360 |
* @since 0.1
|
361 |
*
|
362 |
+
* @param string query clause before modification
|
363 |
*
|
364 |
* @return string query clause after "detached" item modification
|
365 |
*/
|
366 |
+
public static function mla_query_posts_where_filter( $where_clause ) {
|
367 |
global $table_prefix;
|
368 |
+
// error_log( 'mla_query_posts_where_filter original ' . var_export( $where_clause, true ), 0 );
|
369 |
+
|
370 |
+
if ( self::$query_parameters['detached'] )
|
371 |
+
$where_clause .= " AND {$table_prefix}posts.post_parent < 1";
|
372 |
+
|
373 |
+
// error_log( 'mla_query_posts_where_filter UPDATED ' . var_export( $where_clause, true ), 0 );
|
374 |
+
return $where_clause;
|
375 |
+
}
|
376 |
+
|
377 |
+
/**
|
378 |
+
* Adds a ORDERBY clause, if required
|
379 |
+
*
|
380 |
+
* Expands the range of sort options because the logic in WP_Query is limited.
|
381 |
+
* Defined as public because it's a filter.
|
382 |
+
*
|
383 |
+
* @since 0.30
|
384 |
+
*
|
385 |
+
* @param string query clause before modification
|
386 |
+
*
|
387 |
+
* @return string updated query clause
|
388 |
+
*/
|
389 |
+
public static function mla_query_posts_orderby_filter( $orderby_clause ) {
|
390 |
+
global $table_prefix;
|
391 |
+
// error_log( 'mla_query_posts_orderby_filter original ' . var_export( $orderby_clause, true ), 0 );
|
392 |
+
|
393 |
+
if ( isset( self::$query_parameters['orderby'] ) ) {
|
394 |
+
switch ( self::$query_parameters['orderby'] ) {
|
395 |
+
/*
|
396 |
+
* There are two columns defined that end up sorting on post_title,
|
397 |
+
* so we can't use the database column to identify the column but
|
398 |
+
* we actually sort on the database column.
|
399 |
+
*/
|
400 |
+
case 'title_name':
|
401 |
+
$orderby = "{$table_prefix}posts.post_title";
|
402 |
+
break;
|
403 |
+
case '_wp_attached_file':
|
404 |
+
case '_wp_attachment_image_alt':
|
405 |
+
$orderby = '';
|
406 |
+
break;
|
407 |
+
default:
|
408 |
+
$orderby = "{$table_prefix}posts." . self::$query_parameters['orderby'];
|
409 |
+
} // $query_parameters['orderby']
|
410 |
+
|
411 |
+
if ( ! empty( $orderby ) )
|
412 |
+
$orderby_clause = $orderby . ' ' . self::$query_parameters['order'];
|
413 |
+
} // isset
|
414 |
+
|
415 |
+
// error_log( 'mla_query_posts_orderby_filter UPDATED ' . var_export( $orderby_clause, true ), 0 );
|
416 |
+
return $orderby_clause;
|
417 |
}
|
418 |
|
419 |
/**
|
424 |
*
|
425 |
* @since 0.1
|
426 |
*
|
427 |
+
* @param int The ID of the attachment post
|
428 |
+
* @return NULL|array NULL on failure else associative array
|
429 |
*/
|
430 |
function mla_get_attachment_by_id( $post_id ) {
|
431 |
global $wpdb, $post;
|
441 |
return NULL;
|
442 |
}
|
443 |
|
444 |
+
// error_log('mla_get_attachment_by_id item ' . var_export($item, true), 0);
|
445 |
$post_data = (array) $item;
|
446 |
$post = $item;
|
447 |
setup_postdata( $item );
|
461 |
*/
|
462 |
$post_data['mla_references'] = self::mla_fetch_attachment_references( $post_id, $post_data['post_parent'] );
|
463 |
|
464 |
+
// error_log('post data ' . var_export($post_data, true), 0);
|
465 |
return $post_data;
|
466 |
}
|
467 |
|
473 |
*
|
474 |
* @since 0.1
|
475 |
*
|
476 |
+
* @param int post ID of attachment
|
477 |
+
* @param int post ID of attachment's parent, if any
|
478 |
*
|
479 |
* @return array Reference information; see $references array comments
|
480 |
*/
|
599 |
*
|
600 |
* @since 0.1
|
601 |
*
|
602 |
+
* @param int post ID of attachment's parent, if any
|
603 |
*
|
604 |
* @return array Parent information; post_date, post_title and post_type
|
605 |
*/
|
627 |
*
|
628 |
* @since 0.1
|
629 |
*
|
630 |
+
* @param int post ID of attachment
|
631 |
*
|
632 |
* @return array Meta data variables
|
633 |
*/
|
634 |
private static function _fetch_attachment_metadata( $post_id ) {
|
635 |
$results = array();
|
636 |
$post_meta = get_metadata( 'post', $post_id );
|
637 |
+
|
638 |
if ( is_array( $post_meta ) ) {
|
639 |
foreach ( $post_meta as $post_meta_key => $post_meta_value ) {
|
640 |
if ( '_' == $post_meta_key{0} ) {
|
includes/class-mla-list-table.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
*/
|
8 |
|
9 |
/*
|
10 |
-
* The WP_List_Table class isn't automatically available to plugins
|
11 |
*/
|
12 |
if ( !class_exists( 'WP_List_Table' ) ) {
|
13 |
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
@@ -49,7 +49,7 @@ class MLA_List_Table extends WP_List_Table {
|
|
49 |
private $currently_hidden = array( );
|
50 |
|
51 |
/*
|
52 |
-
* These arrays
|
53 |
*/
|
54 |
|
55 |
/**
|
@@ -63,6 +63,8 @@ class MLA_List_Table extends WP_List_Table {
|
|
63 |
* column in your table you must create a column_cb() method. If you don't need
|
64 |
* bulk actions or checkboxes, simply leave the 'cb' entry out of your array.
|
65 |
*
|
|
|
|
|
66 |
* @since 0.1
|
67 |
*
|
68 |
* @var array
|
@@ -80,16 +82,17 @@ class MLA_List_Table extends WP_List_Table {
|
|
80 |
'alt_text' => 'ALT Text',
|
81 |
'caption' => 'Caption',
|
82 |
'description' => 'Description',
|
|
|
83 |
'base_file' => 'Base File',
|
84 |
'date' => 'Date',
|
|
|
85 |
'author' => 'Author',
|
86 |
-
'attached_to' => 'Attached to'
|
87 |
-
|
88 |
-
'tags' => 'Att. Tags'
|
89 |
);
|
90 |
|
91 |
/**
|
92 |
-
* Default values for
|
93 |
*
|
94 |
* This array is used when the user-level option is not set, i.e.,
|
95 |
* the user has not altered the selection of hidden columns.
|
@@ -97,6 +100,8 @@ class MLA_List_Table extends WP_List_Table {
|
|
97 |
* The value on the right-hand side must match the column slug, e.g.,
|
98 |
* array(0 => 'ID_parent, 1 => 'title_name').
|
99 |
*
|
|
|
|
|
100 |
* @since 0.1
|
101 |
*
|
102 |
* @var array
|
@@ -112,12 +117,13 @@ class MLA_List_Table extends WP_List_Table {
|
|
112 |
3 => 'alt_text',
|
113 |
4 => 'caption',
|
114 |
5 => 'description',
|
115 |
-
6 => '
|
116 |
-
7 => '
|
117 |
-
8 => '
|
118 |
-
9 => '
|
119 |
-
10 => '
|
120 |
-
11 => '
|
|
|
121 |
);
|
122 |
|
123 |
/**
|
@@ -136,22 +142,23 @@ class MLA_List_Table extends WP_List_Table {
|
|
136 |
* @var array
|
137 |
*/
|
138 |
private static $default_sortable_columns = array(
|
139 |
-
'ID_parent'
|
140 |
-
'title_name'
|
141 |
-
'post_title'
|
142 |
-
'post_name'
|
143 |
-
'parent'
|
144 |
// 'featured' => array('featured',false),
|
145 |
// 'inserted' => array('inserted',false),
|
146 |
-
// 'alt_text' => array('
|
147 |
'caption' => array('post_excerpt',false),
|
148 |
'description' => array('post_content',false),
|
149 |
-
|
|
|
150 |
'date' => array('post_date',false),
|
|
|
151 |
'author' => array('post_author',false),
|
152 |
'attached_to' => array('post_parent',false),
|
153 |
-
//
|
154 |
-
// 'tags' => array('tags',false),
|
155 |
);
|
156 |
|
157 |
/**
|
@@ -166,6 +173,25 @@ class MLA_List_Table extends WP_List_Table {
|
|
166 |
return MLA_List_Table::$default_hidden_columns;
|
167 |
}
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
/**
|
170 |
* Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'
|
171 |
*
|
@@ -181,7 +207,7 @@ class MLA_List_Table extends WP_List_Table {
|
|
181 |
*
|
182 |
* @return array updated list of hidden columns
|
183 |
*/
|
184 |
-
public static function
|
185 |
if ( $result )
|
186 |
return $result;
|
187 |
else
|
@@ -199,24 +225,48 @@ class MLA_List_Table extends WP_List_Table {
|
|
199 |
*
|
200 |
* @return array list of table columns
|
201 |
*/
|
202 |
-
public static function
|
203 |
{
|
204 |
return MLA_List_Table::$default_columns;
|
205 |
}
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
/**
|
208 |
* Initializes some properties from $_REQUEST vairables, then
|
209 |
* calls the parent constructor to set some default configs.
|
210 |
*
|
211 |
* @since 0.1
|
|
|
|
|
212 |
*/
|
213 |
function __construct( ) {
|
214 |
-
$this->detached = isset( $_REQUEST['detached'] ) || isset( $_REQUEST['find_detached'] );
|
215 |
$this->is_trash = isset( $_REQUEST['status'] ) && $_REQUEST['status'] == 'trash';
|
216 |
|
217 |
//Set parent defaults
|
218 |
parent::__construct( array(
|
219 |
-
|
220 |
'plural' => 'attachments', //plural name of the listed records
|
221 |
'ajax' => true //does this table support ajax?
|
222 |
) );
|
@@ -224,14 +274,17 @@ class MLA_List_Table extends WP_List_Table {
|
|
224 |
$this->currently_hidden = self::get_hidden_columns();
|
225 |
|
226 |
/*
|
|
|
227 |
* NOTE: There are two add_filter calls at the end of this source file.
|
228 |
*/
|
229 |
}
|
230 |
|
231 |
/**
|
232 |
-
*
|
233 |
-
*
|
234 |
-
*
|
|
|
|
|
235 |
*
|
236 |
* @since 0.1
|
237 |
*
|
@@ -240,8 +293,36 @@ class MLA_List_Table extends WP_List_Table {
|
|
240 |
* @return string Text or HTML to be placed inside the column
|
241 |
*/
|
242 |
function column_default( $item, $column_name ) {
|
243 |
-
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
246 |
|
247 |
/**
|
@@ -317,8 +398,8 @@ class MLA_List_Table extends WP_List_Table {
|
|
317 |
if ( isset( $_REQUEST['m'] ) )
|
318 |
$view_args['m'] = $_REQUEST['m'];
|
319 |
|
320 |
-
if ( isset( $_REQUEST['
|
321 |
-
$view_args['
|
322 |
|
323 |
if ( current_user_can( 'edit_post', $item->ID ) ) {
|
324 |
if ( $this->is_trash )
|
@@ -373,10 +454,10 @@ class MLA_List_Table extends WP_List_Table {
|
|
373 |
$taxonomies = get_object_taxonomies( 'attachment', 'objects' );
|
374 |
|
375 |
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
376 |
-
if ( $tax_object->hierarchical && $tax_object->show_ui ) {
|
377 |
$inline_data .= ' <div class="mla_category" id="' . $tax_name . '_' . $item->ID . '">'
|
378 |
. implode( ',', wp_get_object_terms( $item->ID, $tax_name, array( 'fields' => 'ids' ) ) ) . "</div>\r\n";
|
379 |
-
} elseif ( $tax_object->show_ui ) {
|
380 |
$inline_data .= ' <div class="mla_tags" id="'.$tax_name.'_'.$item->ID. '">'
|
381 |
. esc_html( str_replace( ',', ', ', get_terms_to_edit( $item->ID, $tax_name ) ) ) . "</div>\r\n";
|
382 |
}
|
@@ -570,6 +651,18 @@ class MLA_List_Table extends WP_List_Table {
|
|
570 |
return $item->post_content;
|
571 |
}
|
572 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
/**
|
574 |
* Supply the content for a custom column
|
575 |
*
|
@@ -614,7 +707,36 @@ class MLA_List_Table extends WP_List_Table {
|
|
614 |
/**
|
615 |
* Supply the content for a custom column
|
616 |
*
|
617 |
-
* @since 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
618 |
*
|
619 |
* @param array A singular attachment (post) object
|
620 |
* @return string HTML markup to be placed inside the column
|
@@ -656,80 +778,14 @@ class MLA_List_Table extends WP_List_Table {
|
|
656 |
}
|
657 |
|
658 |
/**
|
659 |
-
*
|
660 |
-
*
|
661 |
-
* @since 0.1
|
662 |
-
*
|
663 |
-
* @param array A singular attachment (post) object
|
664 |
-
* @return string HTML markup to be placed inside the column
|
665 |
-
*/
|
666 |
-
function column_categories( $item ) {
|
667 |
-
if ( ( 'checked' == MLASettings::mla_get_option( 'attachment_category' ) ) && ( is_object_in_taxonomy( 'attachment', 'attachment_category' ) ) ) {
|
668 |
-
$terms = wp_get_object_terms( $item->ID, 'attachment_category' );
|
669 |
-
if ( !is_wp_error( $terms ) ) {
|
670 |
-
if ( empty( $terms ) )
|
671 |
-
return 'none';
|
672 |
-
else {
|
673 |
-
$list = array( );
|
674 |
-
foreach ( $terms as $term ) {
|
675 |
-
$list[ ] = sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
|
676 |
-
'page' => 'mla-menu',
|
677 |
-
'att_cat' => $term->term_id,
|
678 |
-
'heading_suffix' => urlencode( $term->name )
|
679 |
-
), 'upload.php' ) ), esc_html( sanitize_term_field( 'name', $term->name, $term->term_id, 'category', 'display' ) ) );
|
680 |
-
} // foreach $term
|
681 |
-
|
682 |
-
return join( ', ', $list );
|
683 |
-
} // !empty $terms
|
684 |
-
} // if !is_wp_error
|
685 |
-
} // 'checked'
|
686 |
-
else {
|
687 |
-
return 'not supported';
|
688 |
-
}
|
689 |
-
}
|
690 |
-
|
691 |
-
/**
|
692 |
-
* Supply the content for a custom column
|
693 |
-
*
|
694 |
-
* @since 0.1
|
695 |
-
*
|
696 |
-
* @param array A singular attachment (post) object
|
697 |
-
* @return string HTML markup to be placed inside the column
|
698 |
-
*/
|
699 |
-
function column_tags( $item ) {
|
700 |
-
if ( ( 'checked' == MLASettings::mla_get_option( 'attachment_tag' ) ) && ( is_object_in_taxonomy( 'attachment', 'attachment_tag' ) ) ) {
|
701 |
-
$terms = wp_get_object_terms( $item->ID, 'attachment_tag' );
|
702 |
-
if ( !is_wp_error( $terms ) ) {
|
703 |
-
if ( empty( $terms ) )
|
704 |
-
return 'none';
|
705 |
-
else {
|
706 |
-
$list = array( );
|
707 |
-
foreach ( $terms as $term ) {
|
708 |
-
$list[ ] = sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
|
709 |
-
'page' => 'mla-menu',
|
710 |
-
'attachment_tag' => $term->slug,
|
711 |
-
'heading_suffix' => urlencode( $term->name )
|
712 |
-
), 'upload.php' ) ), esc_html( sanitize_term_field( 'name', $term->name, $term->term_id, 'category', 'display' ) ) );
|
713 |
-
} // foreach $term
|
714 |
-
|
715 |
-
return join( ', ', $list );
|
716 |
-
} // !empty $terms
|
717 |
-
} // if !is_wp_error
|
718 |
-
} // 'checked'
|
719 |
-
else {
|
720 |
-
return 'not supported';
|
721 |
-
}
|
722 |
-
}
|
723 |
-
|
724 |
-
/**
|
725 |
-
* This method dictates the table's columns and titles.
|
726 |
*
|
727 |
* @since 0.1
|
728 |
*
|
729 |
* @return array Column information: 'slugs'=>'Visible Titles'
|
730 |
*/
|
731 |
function get_columns( ) {
|
732 |
-
return $columns = MLA_List_Table::
|
733 |
}
|
734 |
|
735 |
/**
|
@@ -775,7 +831,7 @@ class MLA_List_Table extends WP_List_Table {
|
|
775 |
} else {
|
776 |
$columns['title_name'][ 1 ] = true;
|
777 |
}
|
778 |
-
|
779 |
return $columns;
|
780 |
}
|
781 |
|
@@ -809,9 +865,9 @@ class MLA_List_Table extends WP_List_Table {
|
|
809 |
'm' => $_REQUEST['m']
|
810 |
), $base_url );
|
811 |
|
812 |
-
if ( isset( $_REQUEST['
|
813 |
$base_url = add_query_arg( array(
|
814 |
-
'
|
815 |
), $base_url );
|
816 |
|
817 |
foreach ( $matches as $type => $reals )
|
@@ -867,8 +923,6 @@ class MLA_List_Table extends WP_List_Table {
|
|
867 |
} else {
|
868 |
// $actions['edit'] = 'Edit';
|
869 |
// $actions['attach'] = 'Attach';
|
870 |
-
// $actions['catagorize'] = 'Catagorize';
|
871 |
-
// $actions['tag'] = 'Tag';
|
872 |
|
873 |
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH )
|
874 |
$actions['trash'] = 'Move to Trash';
|
@@ -880,8 +934,9 @@ class MLA_List_Table extends WP_List_Table {
|
|
880 |
}
|
881 |
|
882 |
/**
|
883 |
-
* Extra controls to be displayed between bulk actions and pagination
|
884 |
-
*
|
|
|
885 |
*
|
886 |
* @since 0.1
|
887 |
*
|
@@ -896,10 +951,12 @@ class MLA_List_Table extends WP_List_Table {
|
|
896 |
if ( 'top' == $which ) {
|
897 |
$this->months_dropdown( 'attachment' );
|
898 |
|
899 |
-
|
|
|
|
|
900 |
$dropdown_options = array(
|
901 |
-
'show_option_all' => 'All
|
902 |
-
'show_option_none' => 'No
|
903 |
'orderby' => 'ID',
|
904 |
'order' => 'ASC',
|
905 |
'show_count' => false,
|
@@ -910,13 +967,13 @@ class MLA_List_Table extends WP_List_Table {
|
|
910 |
'echo' => true,
|
911 |
'depth' => 3,
|
912 |
'tab_index' => 0,
|
913 |
-
'name' => '
|
914 |
'id' => 'name',
|
915 |
'class' => 'postform',
|
916 |
-
'selected' => isset( $_REQUEST['
|
917 |
'hierarchical' => true,
|
918 |
'pad_counts' => false,
|
919 |
-
'taxonomy' =>
|
920 |
'hide_if_empty' => false
|
921 |
);
|
922 |
|
@@ -936,7 +993,7 @@ class MLA_List_Table extends WP_List_Table {
|
|
936 |
}
|
937 |
|
938 |
/**
|
939 |
-
* Prepares the list of items for displaying
|
940 |
*
|
941 |
* This is where you prepare your data for display. This method will usually
|
942 |
* be used to query the database, sort and filter the data, and generally
|
@@ -944,6 +1001,8 @@ class MLA_List_Table extends WP_List_Table {
|
|
944 |
* $this->set_pagination_args().
|
945 |
*
|
946 |
* @since 0.1
|
|
|
|
|
947 |
*/
|
948 |
function prepare_items( ) {
|
949 |
$this->_column_headers = array(
|
@@ -952,17 +1011,10 @@ class MLA_List_Table extends WP_List_Table {
|
|
952 |
$this->get_sortable_columns()
|
953 |
);
|
954 |
|
955 |
-
/*
|
956 |
-
* Use sort and pagination data to build a custom query.
|
957 |
-
*/
|
958 |
-
|
959 |
-
$orderby = ( !empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'post_title'; //If no sort, default to title
|
960 |
-
$order = ( !empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc
|
961 |
-
|
962 |
/*
|
963 |
* REQUIRED for pagination.
|
964 |
*/
|
965 |
-
$total_items =
|
966 |
$user = get_current_user_id();
|
967 |
$screen = get_current_screen();
|
968 |
$option = $screen->get_option( 'per_page', 'option' );
|
@@ -986,7 +1038,7 @@ class MLA_List_Table extends WP_List_Table {
|
|
986 |
* REQUIRED. Assign sorted and paginated data to the items property, where
|
987 |
* it can be used by the rest of the class.
|
988 |
*/
|
989 |
-
$this->items = MLAData::mla_query_list_table_items( $_REQUEST,
|
990 |
}
|
991 |
|
992 |
/**
|
@@ -994,9 +1046,9 @@ class MLA_List_Table extends WP_List_Table {
|
|
994 |
*
|
995 |
* @since .20
|
996 |
*
|
997 |
-
* @param object
|
998 |
*
|
999 |
-
* @return
|
1000 |
*/
|
1001 |
function single_row( $item ) {
|
1002 |
static $row_class = '';
|
@@ -1008,7 +1060,8 @@ class MLA_List_Table extends WP_List_Table {
|
|
1008 |
}
|
1009 |
|
1010 |
/**
|
1011 |
-
* Get possible mime types for view preparation
|
|
|
1012 |
* Modeled after get_post_mime_types in wp-admin/includes/post.php,
|
1013 |
* with additional entries.
|
1014 |
*
|
@@ -1083,7 +1136,8 @@ class MLA_List_Table extends WP_List_Table {
|
|
1083 |
}
|
1084 |
|
1085 |
/**
|
1086 |
-
* Get mime types with one or more attachments for view preparation
|
|
|
1087 |
* Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
|
1088 |
* with additional entries.
|
1089 |
*
|
@@ -1103,33 +1157,14 @@ class MLA_List_Table extends WP_List_Table {
|
|
1103 |
|
1104 |
return $available;
|
1105 |
}
|
1106 |
-
|
1107 |
-
/**
|
1108 |
-
* Get the total number of attachment posts
|
1109 |
-
*
|
1110 |
-
* @since 0.1
|
1111 |
-
*
|
1112 |
-
* @param array Query variables, e.g., from $_REQUEST
|
1113 |
-
*
|
1114 |
-
* @return integer Number of attachment posts
|
1115 |
-
*/
|
1116 |
-
private function _count_list_table_items( $request )
|
1117 |
-
{
|
1118 |
-
$request = MLAData::mla_prepare_list_table_query( $request );
|
1119 |
-
unset( $request['paged'] ); // ignore pagination here - we need the total count
|
1120 |
-
$results = new WP_Query( $request );
|
1121 |
-
|
1122 |
-
if ( isset( $request['detached'] ) )
|
1123 |
-
remove_filter( 'posts_where', 'MLAData::mla_query_list_table_items_helper' );
|
1124 |
-
|
1125 |
-
return $results->found_posts;
|
1126 |
-
}
|
1127 |
} // class MLA_List_Table
|
1128 |
|
1129 |
/*
|
1130 |
* Filters are added here, when the source file is loaded, because the MLA_List_Table
|
1131 |
* object is created too late to be useful.
|
1132 |
*/
|
1133 |
-
|
1134 |
-
|
|
|
|
|
1135 |
?>
|
7 |
*/
|
8 |
|
9 |
/*
|
10 |
+
* The WP_List_Table class isn't automatically available to plugins
|
11 |
*/
|
12 |
if ( !class_exists( 'WP_List_Table' ) ) {
|
13 |
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
49 |
private $currently_hidden = array( );
|
50 |
|
51 |
/*
|
52 |
+
* These arrays define the table columns.
|
53 |
*/
|
54 |
|
55 |
/**
|
63 |
* column in your table you must create a column_cb() method. If you don't need
|
64 |
* bulk actions or checkboxes, simply leave the 'cb' entry out of your array.
|
65 |
*
|
66 |
+
* Taxonomy columns are added to this array by mla_admin_init_action.
|
67 |
+
*
|
68 |
* @since 0.1
|
69 |
*
|
70 |
* @var array
|
82 |
'alt_text' => 'ALT Text',
|
83 |
'caption' => 'Caption',
|
84 |
'description' => 'Description',
|
85 |
+
'post_mime_type' => 'MIME Type',
|
86 |
'base_file' => 'Base File',
|
87 |
'date' => 'Date',
|
88 |
+
'modified' => 'Last Modified',
|
89 |
'author' => 'Author',
|
90 |
+
'attached_to' => 'Attached to'
|
91 |
+
// taxonomy columns added by mla_admin_init_action
|
|
|
92 |
);
|
93 |
|
94 |
/**
|
95 |
+
* Default values for hidden columns
|
96 |
*
|
97 |
* This array is used when the user-level option is not set, i.e.,
|
98 |
* the user has not altered the selection of hidden columns.
|
100 |
* The value on the right-hand side must match the column slug, e.g.,
|
101 |
* array(0 => 'ID_parent, 1 => 'title_name').
|
102 |
*
|
103 |
+
* Taxonomy columns are added to this array by mla_admin_init_action.
|
104 |
+
*
|
105 |
* @since 0.1
|
106 |
*
|
107 |
* @var array
|
117 |
3 => 'alt_text',
|
118 |
4 => 'caption',
|
119 |
5 => 'description',
|
120 |
+
6 => 'post_mime_type',
|
121 |
+
7 => 'base_file',
|
122 |
+
8 => 'date',
|
123 |
+
9 => 'modified',
|
124 |
+
10 => 'author',
|
125 |
+
11 => 'attached_to',
|
126 |
+
// taxonomy columns added by mla_admin_init_action
|
127 |
);
|
128 |
|
129 |
/**
|
142 |
* @var array
|
143 |
*/
|
144 |
private static $default_sortable_columns = array(
|
145 |
+
'ID_parent' => array('ID',false),
|
146 |
+
'title_name' => array('title_name',false),
|
147 |
+
'post_title' => array('post_title',false),
|
148 |
+
'post_name' => array('post_name',false),
|
149 |
+
'parent' => array('post_parent',false),
|
150 |
// 'featured' => array('featured',false),
|
151 |
// 'inserted' => array('inserted',false),
|
152 |
+
// 'alt_text' => array('_wp_attachment_image_alt',false),
|
153 |
'caption' => array('post_excerpt',false),
|
154 |
'description' => array('post_content',false),
|
155 |
+
'post_mime_type' => array('post_mime_type',false),
|
156 |
+
'base_file' => array('_wp_attached_file',false),
|
157 |
'date' => array('post_date',false),
|
158 |
+
'modified' => array('post_modified',false),
|
159 |
'author' => array('post_author',false),
|
160 |
'attached_to' => array('post_parent',false),
|
161 |
+
// sortable taxonomy columns, if any, added by mla_admin_init_action
|
|
|
162 |
);
|
163 |
|
164 |
/**
|
173 |
return MLA_List_Table::$default_hidden_columns;
|
174 |
}
|
175 |
|
176 |
+
/**
|
177 |
+
* Return the names and display values of the sortable columns
|
178 |
+
*
|
179 |
+
* @since 0.30
|
180 |
+
*
|
181 |
+
* @return array name => array( orderby value, heading ) for sortable columns
|
182 |
+
*/
|
183 |
+
public static function mla_get_sortable_columns( )
|
184 |
+
{
|
185 |
+
$results = array ( ) ;
|
186 |
+
|
187 |
+
foreach ( MLA_List_Table::$default_sortable_columns as $key => $value ) {
|
188 |
+
$value[1] = MLA_List_Table::$default_columns[ $key ];
|
189 |
+
$results[ $key ] = $value;
|
190 |
+
}
|
191 |
+
|
192 |
+
return $results;
|
193 |
+
}
|
194 |
+
|
195 |
/**
|
196 |
* Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'
|
197 |
*
|
207 |
*
|
208 |
* @return array updated list of hidden columns
|
209 |
*/
|
210 |
+
public static function mla_manage_hidden_columns_filter( $result, $option, $user_data ) {
|
211 |
if ( $result )
|
212 |
return $result;
|
213 |
else
|
225 |
*
|
226 |
* @return array list of table columns
|
227 |
*/
|
228 |
+
public static function mla_manage_columns_filter( )
|
229 |
{
|
230 |
return MLA_List_Table::$default_columns;
|
231 |
}
|
232 |
|
233 |
+
/**
|
234 |
+
* Adds support for taxonomy columns
|
235 |
+
*
|
236 |
+
* Called in the admin_init action because the list_table object isn't
|
237 |
+
* created in time to affect the "screen options" setup.
|
238 |
+
*
|
239 |
+
* @since 0.30
|
240 |
+
*
|
241 |
+
* @return void
|
242 |
+
*/
|
243 |
+
public static function mla_admin_init_action( )
|
244 |
+
{
|
245 |
+
$tax_options = MLASettings::mla_get_option( 'taxonomy_support' );
|
246 |
+
|
247 |
+
foreach ($tax_options['tax_support'] as $tax_name => $value ) {
|
248 |
+
$tax_object = get_taxonomy( $tax_name );
|
249 |
+
MLA_List_Table::$default_columns[ 't_' . $tax_name ] = $tax_object->labels->name;
|
250 |
+
MLA_List_Table::$default_hidden_columns [] = $tax_name;
|
251 |
+
// MLA_List_Table::$default_sortable_columns [] = none at this time
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
/**
|
256 |
* Initializes some properties from $_REQUEST vairables, then
|
257 |
* calls the parent constructor to set some default configs.
|
258 |
*
|
259 |
* @since 0.1
|
260 |
+
*
|
261 |
+
* @return void
|
262 |
*/
|
263 |
function __construct( ) {
|
264 |
+
$this->detached = isset( $_REQUEST['detached'] ); // || isset( $_REQUEST['find_detached'] );
|
265 |
$this->is_trash = isset( $_REQUEST['status'] ) && $_REQUEST['status'] == 'trash';
|
266 |
|
267 |
//Set parent defaults
|
268 |
parent::__construct( array(
|
269 |
+
'singular' => 'attachment', //singular name of the listed records
|
270 |
'plural' => 'attachments', //plural name of the listed records
|
271 |
'ajax' => true //does this table support ajax?
|
272 |
) );
|
274 |
$this->currently_hidden = self::get_hidden_columns();
|
275 |
|
276 |
/*
|
277 |
+
* NOTE: There is one add_action call at the end of this source file.
|
278 |
* NOTE: There are two add_filter calls at the end of this source file.
|
279 |
*/
|
280 |
}
|
281 |
|
282 |
/**
|
283 |
+
* Supply a column value if no column-specific function has been defined
|
284 |
+
*
|
285 |
+
* Called when the parent class can't find a method specifically built for a
|
286 |
+
* given column. The taxonomy columns are handled here. All other columns should
|
287 |
+
* have a specific method, so this function returns a troubleshooting message.
|
288 |
*
|
289 |
* @since 0.1
|
290 |
*
|
293 |
* @return string Text or HTML to be placed inside the column
|
294 |
*/
|
295 |
function column_default( $item, $column_name ) {
|
296 |
+
if ( 't_' == substr( $column_name, 0, 2 ) ) {
|
297 |
+
$taxonomy = substr( $column_name, 2 );
|
298 |
+
$tax_object = get_taxonomy( $taxonomy );
|
299 |
+
$terms = wp_get_object_terms( $item->ID, $taxonomy );
|
300 |
+
|
301 |
+
if ( !is_wp_error( $terms ) ) {
|
302 |
+
if ( empty( $terms ) )
|
303 |
+
return 'none';
|
304 |
+
else {
|
305 |
+
$list = array( );
|
306 |
+
foreach ( $terms as $term ) {
|
307 |
+
$list[ ] = sprintf( '<a href="%s">%s</a>', esc_url( add_query_arg( array(
|
308 |
+
'page' => 'mla-menu',
|
309 |
+
'mla-tax' => $taxonomy,
|
310 |
+
'mla-term' => $term->slug,
|
311 |
+
'heading_suffix' => urlencode( $tax_object->label . ':' . $term->name )
|
312 |
+
), 'upload.php' ) ), esc_html( sanitize_term_field( 'name', $term->name, $term->term_id, 'category', 'display' ) ) );
|
313 |
+
} // foreach $term
|
314 |
+
|
315 |
+
return join( ', ', $list );
|
316 |
+
} // !empty $terms
|
317 |
+
} // if !is_wp_error
|
318 |
+
else {
|
319 |
+
return 'not supported';
|
320 |
+
}
|
321 |
+
}
|
322 |
+
else {
|
323 |
+
//Show the whole array for troubleshooting purposes
|
324 |
+
return 'column_default: ' . $column_name . ', ' . print_r( $item, true );
|
325 |
+
}
|
326 |
}
|
327 |
|
328 |
/**
|
398 |
if ( isset( $_REQUEST['m'] ) )
|
399 |
$view_args['m'] = $_REQUEST['m'];
|
400 |
|
401 |
+
if ( isset( $_REQUEST['mla_filter_term'] ) )
|
402 |
+
$view_args['mla_filter_term'] = $_REQUEST['mla_filter_term'];
|
403 |
|
404 |
if ( current_user_can( 'edit_post', $item->ID ) ) {
|
405 |
if ( $this->is_trash )
|
454 |
$taxonomies = get_object_taxonomies( 'attachment', 'objects' );
|
455 |
|
456 |
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
457 |
+
if ( $tax_object->hierarchical && $tax_object->show_ui && MLASettings::mla_taxonomy_support($tax_name, 'quick-edit') ) {
|
458 |
$inline_data .= ' <div class="mla_category" id="' . $tax_name . '_' . $item->ID . '">'
|
459 |
. implode( ',', wp_get_object_terms( $item->ID, $tax_name, array( 'fields' => 'ids' ) ) ) . "</div>\r\n";
|
460 |
+
} elseif ( $tax_object->show_ui && MLASettings::mla_taxonomy_support($tax_name, 'quick-edit') ) {
|
461 |
$inline_data .= ' <div class="mla_tags" id="'.$tax_name.'_'.$item->ID. '">'
|
462 |
. esc_html( str_replace( ',', ', ', get_terms_to_edit( $item->ID, $tax_name ) ) ) . "</div>\r\n";
|
463 |
}
|
651 |
return $item->post_content;
|
652 |
}
|
653 |
|
654 |
+
/**
|
655 |
+
* Supply the content for a custom column
|
656 |
+
*
|
657 |
+
* @since 0.30
|
658 |
+
*
|
659 |
+
* @param array A singular attachment (post) object
|
660 |
+
* @return string HTML markup to be placed inside the column
|
661 |
+
*/
|
662 |
+
function column_post_mime_type( $item ) {
|
663 |
+
return $item->post_mime_type;
|
664 |
+
}
|
665 |
+
|
666 |
/**
|
667 |
* Supply the content for a custom column
|
668 |
*
|
707 |
/**
|
708 |
* Supply the content for a custom column
|
709 |
*
|
710 |
+
* @since 0.30
|
711 |
+
*
|
712 |
+
* @param array A singular attachment (post) object
|
713 |
+
* @return string HTML markup to be placed inside the column
|
714 |
+
*/
|
715 |
+
function column_modified( $item ) {
|
716 |
+
if ( '0000-00-00 00:00:00' == $item->post_modified ) {
|
717 |
+
$t_time = $h_time = __( 'Unpublished' );
|
718 |
+
} else {
|
719 |
+
$t_time = get_the_time( __( 'Y/m/d g:i:s A' ), $item );
|
720 |
+
$m_time = $item->post_modified;
|
721 |
+
$time = get_post_time( 'G', true, $item, false );
|
722 |
+
|
723 |
+
if ( ( abs( $t_diff = time() - $time ) ) < 86400 ) {
|
724 |
+
if ( $t_diff < 0 )
|
725 |
+
$h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) );
|
726 |
+
else
|
727 |
+
$h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
|
728 |
+
} else {
|
729 |
+
$h_time = mysql2date( __( 'Y/m/d' ), $m_time );
|
730 |
+
}
|
731 |
+
}
|
732 |
+
|
733 |
+
return $h_time;
|
734 |
+
}
|
735 |
+
|
736 |
+
/**
|
737 |
+
* Supply the content for a custom column
|
738 |
+
*
|
739 |
+
* @since 0.30
|
740 |
*
|
741 |
* @param array A singular attachment (post) object
|
742 |
* @return string HTML markup to be placed inside the column
|
778 |
}
|
779 |
|
780 |
/**
|
781 |
+
* This method dictates the table's columns and titles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
*
|
783 |
* @since 0.1
|
784 |
*
|
785 |
* @return array Column information: 'slugs'=>'Visible Titles'
|
786 |
*/
|
787 |
function get_columns( ) {
|
788 |
+
return $columns = MLA_List_Table::mla_manage_columns_filter();
|
789 |
}
|
790 |
|
791 |
/**
|
831 |
} else {
|
832 |
$columns['title_name'][ 1 ] = true;
|
833 |
}
|
834 |
+
|
835 |
return $columns;
|
836 |
}
|
837 |
|
865 |
'm' => $_REQUEST['m']
|
866 |
), $base_url );
|
867 |
|
868 |
+
if ( isset( $_REQUEST['mla_filter_term'] ) )
|
869 |
$base_url = add_query_arg( array(
|
870 |
+
'mla_filter_term' => $_REQUEST['mla_filter_term']
|
871 |
), $base_url );
|
872 |
|
873 |
foreach ( $matches as $type => $reals )
|
923 |
} else {
|
924 |
// $actions['edit'] = 'Edit';
|
925 |
// $actions['attach'] = 'Attach';
|
|
|
|
|
926 |
|
927 |
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH )
|
928 |
$actions['trash'] = 'Move to Trash';
|
934 |
}
|
935 |
|
936 |
/**
|
937 |
+
* Extra controls to be displayed between bulk actions and pagination
|
938 |
+
*
|
939 |
+
* Modeled after class-wp-posts-list-table.php in wp-admin/includes.
|
940 |
*
|
941 |
* @since 0.1
|
942 |
*
|
951 |
if ( 'top' == $which ) {
|
952 |
$this->months_dropdown( 'attachment' );
|
953 |
|
954 |
+
$tax_filter = MLASettings::mla_taxonomy_support('', 'filter');
|
955 |
+
if ( ( '' != $tax_filter ) && ( is_object_in_taxonomy( 'attachment', $tax_filter ) ) ) {
|
956 |
+
$tax_object = get_taxonomy( $tax_filter );
|
957 |
$dropdown_options = array(
|
958 |
+
'show_option_all' => 'All ' . $tax_object->labels->name,
|
959 |
+
'show_option_none' => 'No ' . $tax_object->labels->name,
|
960 |
'orderby' => 'ID',
|
961 |
'order' => 'ASC',
|
962 |
'show_count' => false,
|
967 |
'echo' => true,
|
968 |
'depth' => 3,
|
969 |
'tab_index' => 0,
|
970 |
+
'name' => 'mla_filter_term',
|
971 |
'id' => 'name',
|
972 |
'class' => 'postform',
|
973 |
+
'selected' => isset( $_REQUEST['mla_filter_term'] ) ? $_REQUEST['mla_filter_term'] : 0,
|
974 |
'hierarchical' => true,
|
975 |
'pad_counts' => false,
|
976 |
+
'taxonomy' => $tax_filter,
|
977 |
'hide_if_empty' => false
|
978 |
);
|
979 |
|
993 |
}
|
994 |
|
995 |
/**
|
996 |
+
* Prepares the list of items for displaying
|
997 |
*
|
998 |
* This is where you prepare your data for display. This method will usually
|
999 |
* be used to query the database, sort and filter the data, and generally
|
1001 |
* $this->set_pagination_args().
|
1002 |
*
|
1003 |
* @since 0.1
|
1004 |
+
*
|
1005 |
+
* @return void
|
1006 |
*/
|
1007 |
function prepare_items( ) {
|
1008 |
$this->_column_headers = array(
|
1011 |
$this->get_sortable_columns()
|
1012 |
);
|
1013 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1014 |
/*
|
1015 |
* REQUIRED for pagination.
|
1016 |
*/
|
1017 |
+
$total_items = MLAData::mla_count_list_table_items( $_REQUEST );
|
1018 |
$user = get_current_user_id();
|
1019 |
$screen = get_current_screen();
|
1020 |
$option = $screen->get_option( 'per_page', 'option' );
|
1038 |
* REQUIRED. Assign sorted and paginated data to the items property, where
|
1039 |
* it can be used by the rest of the class.
|
1040 |
*/
|
1041 |
+
$this->items = MLAData::mla_query_list_table_items( $_REQUEST, ( ( $current_page - 1 ) * $per_page ), $per_page );
|
1042 |
}
|
1043 |
|
1044 |
/**
|
1046 |
*
|
1047 |
* @since .20
|
1048 |
*
|
1049 |
+
* @param object the current item
|
1050 |
*
|
1051 |
+
* @return void Echoes the row HTML
|
1052 |
*/
|
1053 |
function single_row( $item ) {
|
1054 |
static $row_class = '';
|
1060 |
}
|
1061 |
|
1062 |
/**
|
1063 |
+
* Get possible mime types for view preparation
|
1064 |
+
*
|
1065 |
* Modeled after get_post_mime_types in wp-admin/includes/post.php,
|
1066 |
* with additional entries.
|
1067 |
*
|
1136 |
}
|
1137 |
|
1138 |
/**
|
1139 |
+
* Get mime types with one or more attachments for view preparation
|
1140 |
+
*
|
1141 |
* Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
|
1142 |
* with additional entries.
|
1143 |
*
|
1157 |
|
1158 |
return $available;
|
1159 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1160 |
} // class MLA_List_Table
|
1161 |
|
1162 |
/*
|
1163 |
* Filters are added here, when the source file is loaded, because the MLA_List_Table
|
1164 |
* object is created too late to be useful.
|
1165 |
*/
|
1166 |
+
add_action( 'admin_init', 'MLA_List_Table::mla_admin_init_action' );
|
1167 |
+
|
1168 |
+
add_filter( 'get_user_option_managemedia_page_mla-menucolumnshidden', 'MLA_List_Table::mla_manage_hidden_columns_filter', 10, 3 );
|
1169 |
+
add_filter( 'manage_media_page_mla-menu_columns', 'MLA_List_Table::mla_manage_columns_filter', 10, 0 );
|
1170 |
?>
|
includes/class-mla-main.php
CHANGED
@@ -38,7 +38,7 @@ class MLA {
|
|
38 |
*
|
39 |
* @var string
|
40 |
*/
|
41 |
-
const CURRENT_MLA_VERSION = '0.
|
42 |
|
43 |
/**
|
44 |
* Minimum version of PHP required for this plugin
|
@@ -125,6 +125,8 @@ class MLA {
|
|
125 |
* Initialization function, similar to __construct()
|
126 |
*
|
127 |
* @since 0.1
|
|
|
|
|
128 |
*/
|
129 |
public static function initialize( )
|
130 |
{
|
@@ -143,7 +145,7 @@ class MLA {
|
|
143 |
*
|
144 |
* @since 0.20
|
145 |
*
|
146 |
-
* @return
|
147 |
*/
|
148 |
public static function mla_admin_init_action() {
|
149 |
add_action( 'wp_ajax_' . self::JAVASCRIPT_INLINE_EDIT_SLUG, 'MLA::mla_inline_edit_action' );
|
@@ -156,7 +158,7 @@ class MLA {
|
|
156 |
*
|
157 |
* @param string Name of the page being loaded
|
158 |
*
|
159 |
-
* @return
|
160 |
*/
|
161 |
public static function mla_admin_enqueue_scripts_action( $page_hook ) {
|
162 |
if ( 'media_page_mla-menu' != $page_hook )
|
@@ -198,6 +200,8 @@ class MLA {
|
|
198 |
* add settings link in the Plugins section entry for MLA.
|
199 |
*
|
200 |
* @since 0.1
|
|
|
|
|
201 |
*/
|
202 |
public static function mla_admin_menu_action( ) {
|
203 |
$hook = add_submenu_page( 'upload.php', 'Media Library Assistant', 'Assistant', 'upload_files', self::ADMIN_PAGE_SLUG, 'MLA::mla_render_admin_page' );
|
@@ -208,13 +212,13 @@ class MLA {
|
|
208 |
$taxonomies = get_object_taxonomies( 'attachment', 'objects' );
|
209 |
if ( !empty( $taxonomies ) ) {
|
210 |
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
211 |
-
$hook = add_submenu_page( 'upload.php', $tax_object->label, $tax_object->label, 'manage_categories', 'mla-edit-
|
212 |
-
add_action( 'load-' . $hook, 'MLA::
|
213 |
/*
|
214 |
-
* The
|
215 |
*/
|
216 |
$hook = 'edit-' . $tax_name;
|
217 |
-
self::$page_hooks[ $hook ] = $
|
218 |
}
|
219 |
|
220 |
add_action( 'load-edit-tags.php', 'MLA::mla_add_help_tab' );
|
@@ -227,6 +231,8 @@ class MLA {
|
|
227 |
* Add the "XX Entries per page" filter to the Screen Options tab
|
228 |
*
|
229 |
* @since 0.1
|
|
|
|
|
230 |
*/
|
231 |
public static function mla_add_menu_options( ) {
|
232 |
$option = 'per_page';
|
@@ -266,7 +272,7 @@ class MLA {
|
|
266 |
* @param string Name of the option being changed
|
267 |
* @param string New value of the option
|
268 |
*
|
269 |
-
* @return string New value if this is our option, otherwise nothing
|
270 |
*/
|
271 |
public static function mla_set_screen_option_filter( $status, $option, $value )
|
272 |
{
|
@@ -335,11 +341,15 @@ class MLA {
|
|
335 |
* This filter is the only way to redirect them to the correct WordPress page.
|
336 |
*
|
337 |
* @since 0.1
|
|
|
|
|
338 |
*/
|
339 |
-
public static function
|
340 |
{
|
341 |
-
|
342 |
-
|
|
|
|
|
343 |
wp_redirect( admin_url( 'edit-tags.php?taxonomy=' . $taxonomy . '&post_type=attachment' ), 302 );
|
344 |
exit;
|
345 |
}
|
@@ -349,11 +359,13 @@ class MLA {
|
|
349 |
* Add contextual help tabs to all the MLA pages
|
350 |
*
|
351 |
* @since 0.1
|
|
|
|
|
352 |
*/
|
353 |
public static function mla_add_help_tab( )
|
354 |
{
|
355 |
$screen = get_current_screen();
|
356 |
-
|
357 |
/*
|
358 |
* Is this one of our pages?
|
359 |
*/
|
@@ -372,6 +384,26 @@ class MLA {
|
|
372 |
$file_suffix = self::MLA_ADMIN_SINGLE_EDIT_DISPLAY;
|
373 |
break;
|
374 |
} // switch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
}
|
376 |
|
377 |
$template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/help-for-' . $file_suffix . '.tpl' );
|
@@ -430,7 +462,7 @@ class MLA {
|
|
430 |
|
431 |
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
432 |
if ( $_REQUEST['taxonomy'] == $tax_name ) {
|
433 |
-
$mla_page = 'mla-edit-
|
434 |
$real_page = 'edit-tags.php?taxonomy=' . $tax_name . '&post_type=attachment';
|
435 |
|
436 |
foreach ( $submenu['upload.php'] as $submenu_index => $submenu_entry ) {
|
@@ -450,8 +482,12 @@ class MLA {
|
|
450 |
* Render the "Assistant" subpage in the Media section, using the list_table package
|
451 |
*
|
452 |
* @since 0.1
|
|
|
|
|
453 |
*/
|
454 |
public static function mla_render_admin_page( ) {
|
|
|
|
|
455 |
$bulk_action = self::_current_bulk_action();
|
456 |
|
457 |
echo "<div class=\"wrap\">\r\n";
|
@@ -468,6 +504,17 @@ class MLA {
|
|
468 |
'body' => ''
|
469 |
);
|
470 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
/*
|
472 |
* Process bulk actions that affect an array of items
|
473 |
*/
|
@@ -605,8 +652,8 @@ class MLA {
|
|
605 |
if ( isset( $_REQUEST['m'] ) ) // filter by date
|
606 |
echo sprintf( '<input type="hidden" name="m" value="%1$s" />', $_REQUEST['m'] ) . "\r\n";
|
607 |
|
608 |
-
if ( isset( $_REQUEST['
|
609 |
-
echo sprintf( '<input type="hidden" name="att_cat" value="%1$s" />', $_REQUEST['
|
610 |
|
611 |
// Now we can render the completed list table
|
612 |
$MLAListTable->display();
|
@@ -630,7 +677,7 @@ class MLA {
|
|
630 |
*
|
631 |
* @since 0.20
|
632 |
*
|
633 |
-
* @return
|
634 |
*/
|
635 |
public static function mla_inline_edit_action() {
|
636 |
set_current_screen( $_REQUEST['screen'] );
|
@@ -691,7 +738,7 @@ class MLA {
|
|
691 |
}
|
692 |
|
693 |
/**
|
694 |
-
* Build the hidden row templates for inline editing (quick and bulk edit)
|
695 |
*
|
696 |
* inspired by inline_edit() in wp-admin\includes\class-wp-posts-list-table.php.
|
697 |
*
|
@@ -707,9 +754,9 @@ class MLA {
|
|
707 |
$hierarchical_taxonomies = array();
|
708 |
$flat_taxonomies = array();
|
709 |
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
710 |
-
if ( $tax_object->hierarchical && $tax_object->show_ui ) {
|
711 |
$hierarchical_taxonomies[$tax_name] = $tax_object;
|
712 |
-
} elseif ( $tax_object->show_ui ) {
|
713 |
$flat_taxonomies[$tax_name] = $tax_object;
|
714 |
}
|
715 |
}
|
@@ -856,11 +903,12 @@ class MLA {
|
|
856 |
}
|
857 |
|
858 |
/**
|
859 |
-
* Delete a single item permanently
|
860 |
*
|
861 |
* @since 0.1
|
862 |
*
|
863 |
-
* @param array The form POST data
|
|
|
864 |
* @return array success/failure message and NULL content
|
865 |
*/
|
866 |
private static function _delete_single_item( $post_id ) {
|
@@ -889,7 +937,8 @@ class MLA {
|
|
889 |
* @since 0.1
|
890 |
*
|
891 |
* @param int The WordPress Post ID of the attachment item
|
892 |
-
*
|
|
|
893 |
*/
|
894 |
private static function _display_single_item( $post_id ) {
|
895 |
global $post;
|
@@ -1017,8 +1066,8 @@ class MLA {
|
|
1017 |
else
|
1018 |
$view_args = '';
|
1019 |
|
1020 |
-
if ( isset( $_REQUEST['
|
1021 |
-
$view_args .= sprintf( '<input type="hidden" name="att_cat" value="%1$s" />', $_REQUEST['
|
1022 |
|
1023 |
if ( isset( $_REQUEST['paged'] ) )
|
1024 |
$view_args .= sprintf( '<input type="hidden" name="paged" value="%1$s" />', $_REQUEST['paged'] ) . "\r\n";
|
@@ -1063,8 +1112,12 @@ class MLA {
|
|
1063 |
'file_name' => $post_data['mla_references']['file'],
|
1064 |
'width' => $width,
|
1065 |
'height' => $height,
|
|
|
|
|
|
|
1066 |
'image_meta' => $image_meta,
|
1067 |
-
'parent_info' => $parent_info,
|
|
|
1068 |
'authors' => $authors,
|
1069 |
'features' => $features,
|
1070 |
'inserts' => $inserts,
|
@@ -1074,6 +1127,11 @@ class MLA {
|
|
1074 |
'wpnonce' => wp_nonce_field( self::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
|
1075 |
'side_info_column' => $side_info_column
|
1076 |
);
|
|
|
|
|
|
|
|
|
|
|
1077 |
$page_template = MLAData::mla_parse_template( $page_template, $post_data );
|
1078 |
return array(
|
1079 |
'message' => '',
|
@@ -1090,9 +1148,12 @@ class MLA {
|
|
1090 |
* @param int The ID of the attachment to be updated
|
1091 |
* @param array Field name => value pairs
|
1092 |
* @param array Attachment Category and Tag values
|
|
|
1093 |
* @return array success/failure message and NULL content
|
1094 |
*/
|
1095 |
private static function _update_single_item( $post_id, $new_data, $tax_input = NULL ) {
|
|
|
|
|
1096 |
$post_data = MLAData::mla_get_attachment_by_id( $post_id );
|
1097 |
|
1098 |
if ( !isset( $post_data ) )
|
@@ -1104,6 +1165,9 @@ class MLA {
|
|
1104 |
$message = '';
|
1105 |
$updates = array( 'ID' => $post_id );
|
1106 |
|
|
|
|
|
|
|
1107 |
foreach ( $new_data as $key => $value ) {
|
1108 |
switch ( $key ) {
|
1109 |
case 'post_title':
|
@@ -1268,6 +1332,7 @@ class MLA {
|
|
1268 |
* @since 0.1
|
1269 |
*
|
1270 |
* @param array The form POST data
|
|
|
1271 |
* @return array success/failure message and NULL content
|
1272 |
*/
|
1273 |
private static function _trash_single_item( $post_id ) {
|
38 |
*
|
39 |
* @var string
|
40 |
*/
|
41 |
+
const CURRENT_MLA_VERSION = '0.30';
|
42 |
|
43 |
/**
|
44 |
* Minimum version of PHP required for this plugin
|
125 |
* Initialization function, similar to __construct()
|
126 |
*
|
127 |
* @since 0.1
|
128 |
+
*
|
129 |
+
* @return void
|
130 |
*/
|
131 |
public static function initialize( )
|
132 |
{
|
145 |
*
|
146 |
* @since 0.20
|
147 |
*
|
148 |
+
* @return void
|
149 |
*/
|
150 |
public static function mla_admin_init_action() {
|
151 |
add_action( 'wp_ajax_' . self::JAVASCRIPT_INLINE_EDIT_SLUG, 'MLA::mla_inline_edit_action' );
|
158 |
*
|
159 |
* @param string Name of the page being loaded
|
160 |
*
|
161 |
+
* @return void
|
162 |
*/
|
163 |
public static function mla_admin_enqueue_scripts_action( $page_hook ) {
|
164 |
if ( 'media_page_mla-menu' != $page_hook )
|
200 |
* add settings link in the Plugins section entry for MLA.
|
201 |
*
|
202 |
* @since 0.1
|
203 |
+
*
|
204 |
+
* @return void
|
205 |
*/
|
206 |
public static function mla_admin_menu_action( ) {
|
207 |
$hook = add_submenu_page( 'upload.php', 'Media Library Assistant', 'Assistant', 'upload_files', self::ADMIN_PAGE_SLUG, 'MLA::mla_render_admin_page' );
|
212 |
$taxonomies = get_object_taxonomies( 'attachment', 'objects' );
|
213 |
if ( !empty( $taxonomies ) ) {
|
214 |
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
215 |
+
$hook = add_submenu_page( 'upload.php', $tax_object->label, $tax_object->label, 'manage_categories', 'mla-edit-tax-' . $tax_name, 'MLA::mla_edit_tax_redirect' );
|
216 |
+
add_action( 'load-' . $hook, 'MLA::mla_edit_tax_redirect' );
|
217 |
/*
|
218 |
+
* The page_hook we need for taxonomy edits is slightly different
|
219 |
*/
|
220 |
$hook = 'edit-' . $tax_name;
|
221 |
+
self::$page_hooks[ $hook ] = 't_' . $tax_name;
|
222 |
}
|
223 |
|
224 |
add_action( 'load-edit-tags.php', 'MLA::mla_add_help_tab' );
|
231 |
* Add the "XX Entries per page" filter to the Screen Options tab
|
232 |
*
|
233 |
* @since 0.1
|
234 |
+
*
|
235 |
+
* @return void
|
236 |
*/
|
237 |
public static function mla_add_menu_options( ) {
|
238 |
$option = 'per_page';
|
272 |
* @param string Name of the option being changed
|
273 |
* @param string New value of the option
|
274 |
*
|
275 |
+
* @return string|void New value if this is our option, otherwise nothing
|
276 |
*/
|
277 |
public static function mla_set_screen_option_filter( $status, $option, $value )
|
278 |
{
|
341 |
* This filter is the only way to redirect them to the correct WordPress page.
|
342 |
*
|
343 |
* @since 0.1
|
344 |
+
*
|
345 |
+
* @return void
|
346 |
*/
|
347 |
+
public static function mla_edit_tax_redirect( )
|
348 |
{
|
349 |
+
$screen = get_current_screen();
|
350 |
+
|
351 |
+
if ( isset( $_REQUEST['page'] ) && ( substr( $_REQUEST['page'], 0, 13 ) == 'mla-edit-tax-' ) ) {
|
352 |
+
$taxonomy = substr( $_REQUEST['page'], 13 );
|
353 |
wp_redirect( admin_url( 'edit-tags.php?taxonomy=' . $taxonomy . '&post_type=attachment' ), 302 );
|
354 |
exit;
|
355 |
}
|
359 |
* Add contextual help tabs to all the MLA pages
|
360 |
*
|
361 |
* @since 0.1
|
362 |
+
*
|
363 |
+
* @return void
|
364 |
*/
|
365 |
public static function mla_add_help_tab( )
|
366 |
{
|
367 |
$screen = get_current_screen();
|
368 |
+
|
369 |
/*
|
370 |
* Is this one of our pages?
|
371 |
*/
|
384 |
$file_suffix = self::MLA_ADMIN_SINGLE_EDIT_DISPLAY;
|
385 |
break;
|
386 |
} // switch
|
387 |
+
} // isset( $_REQUEST['mla_admin_action'] )
|
388 |
+
else {
|
389 |
+
/*
|
390 |
+
* Use a generic page for edit taxonomy screens
|
391 |
+
*/
|
392 |
+
if ( 't_' == substr( self::$page_hooks[ $file_suffix ], 0, 2 ) ) {
|
393 |
+
$taxonomy = substr( self::$page_hooks[ $file_suffix ], 2 );
|
394 |
+
switch ( $taxonomy ) {
|
395 |
+
case 'attachment_category':
|
396 |
+
case 'attachment_tag':
|
397 |
+
break;
|
398 |
+
default:
|
399 |
+
$tax_object = get_taxonomy( $taxonomy );
|
400 |
+
error_log('mla_add_help_tab $tax_object = ' . var_export($tax_object, true), 0);
|
401 |
+
if ( $tax_object->hierarchical )
|
402 |
+
$file_suffix = 'edit-hierarchical-taxonomy';
|
403 |
+
else
|
404 |
+
$file_suffix = 'edit-flat-taxonomy';
|
405 |
+
} // $taxonomy switch
|
406 |
+
} // is taxonomy
|
407 |
}
|
408 |
|
409 |
$template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/help-for-' . $file_suffix . '.tpl' );
|
462 |
|
463 |
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
464 |
if ( $_REQUEST['taxonomy'] == $tax_name ) {
|
465 |
+
$mla_page = 'mla-edit-tax-' . $tax_name;
|
466 |
$real_page = 'edit-tags.php?taxonomy=' . $tax_name . '&post_type=attachment';
|
467 |
|
468 |
foreach ( $submenu['upload.php'] as $submenu_index => $submenu_entry ) {
|
482 |
* Render the "Assistant" subpage in the Media section, using the list_table package
|
483 |
*
|
484 |
* @since 0.1
|
485 |
+
*
|
486 |
+
* @return void
|
487 |
*/
|
488 |
public static function mla_render_admin_page( ) {
|
489 |
+
// error_log('mla_render_admin_page $_REQUEST = ' . var_export($_REQUEST, true), 0);
|
490 |
+
|
491 |
$bulk_action = self::_current_bulk_action();
|
492 |
|
493 |
echo "<div class=\"wrap\">\r\n";
|
504 |
'body' => ''
|
505 |
);
|
506 |
|
507 |
+
/*
|
508 |
+
* The category taxonomy is a special case because post_categories_meta_box() changes the input name
|
509 |
+
*/
|
510 |
+
if ( !isset( $_REQUEST['tax_input'] ) )
|
511 |
+
$_REQUEST['tax_input'] = array ();
|
512 |
+
|
513 |
+
if ( isset( $_REQUEST['post_category'] ) ) {
|
514 |
+
$_REQUEST['tax_input']['category'] = $_REQUEST['post_category'];
|
515 |
+
unset ( $_REQUEST['post_category'] );
|
516 |
+
}
|
517 |
+
|
518 |
/*
|
519 |
* Process bulk actions that affect an array of items
|
520 |
*/
|
652 |
if ( isset( $_REQUEST['m'] ) ) // filter by date
|
653 |
echo sprintf( '<input type="hidden" name="m" value="%1$s" />', $_REQUEST['m'] ) . "\r\n";
|
654 |
|
655 |
+
if ( isset( $_REQUEST['mla_filter_term'] ) ) // filter by taxonomy term
|
656 |
+
echo sprintf( '<input type="hidden" name="att_cat" value="%1$s" />', $_REQUEST['mla_filter_term'] ) . "\r\n";
|
657 |
|
658 |
// Now we can render the completed list table
|
659 |
$MLAListTable->display();
|
677 |
*
|
678 |
* @since 0.20
|
679 |
*
|
680 |
+
* @return void echo HTML <tr> markup for updated row or error message, then die()
|
681 |
*/
|
682 |
public static function mla_inline_edit_action() {
|
683 |
set_current_screen( $_REQUEST['screen'] );
|
738 |
}
|
739 |
|
740 |
/**
|
741 |
+
* Build the hidden row templates for inline editing (quick and bulk edit)
|
742 |
*
|
743 |
* inspired by inline_edit() in wp-admin\includes\class-wp-posts-list-table.php.
|
744 |
*
|
754 |
$hierarchical_taxonomies = array();
|
755 |
$flat_taxonomies = array();
|
756 |
foreach ( $taxonomies as $tax_name => $tax_object ) {
|
757 |
+
if ( $tax_object->hierarchical && $tax_object->show_ui && MLASettings::mla_taxonomy_support($tax_name, 'quick-edit') ) {
|
758 |
$hierarchical_taxonomies[$tax_name] = $tax_object;
|
759 |
+
} elseif ( $tax_object->show_ui && MLASettings::mla_taxonomy_support($tax_name, 'quick-edit') ) {
|
760 |
$flat_taxonomies[$tax_name] = $tax_object;
|
761 |
}
|
762 |
}
|
903 |
}
|
904 |
|
905 |
/**
|
906 |
+
* Delete a single item permanently
|
907 |
*
|
908 |
* @since 0.1
|
909 |
*
|
910 |
+
* @param array The form POST data
|
911 |
+
*
|
912 |
* @return array success/failure message and NULL content
|
913 |
*/
|
914 |
private static function _delete_single_item( $post_id ) {
|
937 |
* @since 0.1
|
938 |
*
|
939 |
* @param int The WordPress Post ID of the attachment item
|
940 |
+
*
|
941 |
+
* @return array message and/or HTML content
|
942 |
*/
|
943 |
private static function _display_single_item( $post_id ) {
|
944 |
global $post;
|
1066 |
else
|
1067 |
$view_args = '';
|
1068 |
|
1069 |
+
if ( isset( $_REQUEST['mla_filter_term'] ) )
|
1070 |
+
$view_args .= sprintf( '<input type="hidden" name="att_cat" value="%1$s" />', $_REQUEST['mla_filter_term'] ) . "\r\n";
|
1071 |
|
1072 |
if ( isset( $_REQUEST['paged'] ) )
|
1073 |
$view_args .= sprintf( '<input type="hidden" name="paged" value="%1$s" />', $_REQUEST['paged'] ) . "\r\n";
|
1112 |
'file_name' => $post_data['mla_references']['file'],
|
1113 |
'width' => $width,
|
1114 |
'height' => $height,
|
1115 |
+
'post_title_attr' => esc_attr( $post_data['post_title'] ),
|
1116 |
+
'post_name_attr' => esc_attr( $post_data['post_name'] ),
|
1117 |
+
'post_excerpt_attr' => esc_attr( $post_data['post_excerpt'] ),
|
1118 |
'image_meta' => $image_meta,
|
1119 |
+
'parent_info' => esc_attr( $parent_info ),
|
1120 |
+
'guid_attr' => esc_attr( $post_data['guid'] ),
|
1121 |
'authors' => $authors,
|
1122 |
'features' => $features,
|
1123 |
'inserts' => $inserts,
|
1127 |
'wpnonce' => wp_nonce_field( self::MLA_ADMIN_NONCE, '_wpnonce', true, false ),
|
1128 |
'side_info_column' => $side_info_column
|
1129 |
);
|
1130 |
+
|
1131 |
+
if ( !empty( $post_data['mla_wp_attachment_metadata'] ) ) {
|
1132 |
+
$page_values['image_alt_attr'] = esc_attr( $post_data['mla_wp_attachment_image_alt'] );
|
1133 |
+
}
|
1134 |
+
|
1135 |
$page_template = MLAData::mla_parse_template( $page_template, $post_data );
|
1136 |
return array(
|
1137 |
'message' => '',
|
1148 |
* @param int The ID of the attachment to be updated
|
1149 |
* @param array Field name => value pairs
|
1150 |
* @param array Attachment Category and Tag values
|
1151 |
+
*
|
1152 |
* @return array success/failure message and NULL content
|
1153 |
*/
|
1154 |
private static function _update_single_item( $post_id, $new_data, $tax_input = NULL ) {
|
1155 |
+
// error_log('_update_single_item $tax_input = ' . var_export($tax_input, true), 0);
|
1156 |
+
|
1157 |
$post_data = MLAData::mla_get_attachment_by_id( $post_id );
|
1158 |
|
1159 |
if ( !isset( $post_data ) )
|
1165 |
$message = '';
|
1166 |
$updates = array( 'ID' => $post_id );
|
1167 |
|
1168 |
+
$new_data = stripslashes_deep( $new_data );
|
1169 |
+
// error_log('after stripslashes_deep, $new_data = ' . var_export($new_data, true), 0);
|
1170 |
+
|
1171 |
foreach ( $new_data as $key => $value ) {
|
1172 |
switch ( $key ) {
|
1173 |
case 'post_title':
|
1332 |
* @since 0.1
|
1333 |
*
|
1334 |
* @param array The form POST data
|
1335 |
+
*
|
1336 |
* @return array success/failure message and NULL content
|
1337 |
*/
|
1338 |
private static function _trash_single_item( $post_id ) {
|
includes/class-mla-objects.php
CHANGED
@@ -17,6 +17,8 @@ class MLAObjects {
|
|
17 |
* Initialization function, similar to __construct()
|
18 |
*
|
19 |
* @since 0.20
|
|
|
|
|
20 |
*/
|
21 |
public static function initialize() {
|
22 |
self::_build_taxonomies();
|
@@ -26,23 +28,25 @@ class MLAObjects {
|
|
26 |
* Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters
|
27 |
*
|
28 |
* @since 0.1
|
|
|
|
|
29 |
*/
|
30 |
private static function _build_taxonomies( ) {
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
register_taxonomy(
|
47 |
'attachment_category',
|
48 |
array( 'attachment' ),
|
@@ -54,26 +58,23 @@ class MLAObjects {
|
|
54 |
'rewrite' => true
|
55 |
)
|
56 |
);
|
57 |
-
|
58 |
-
add_filter( 'manage_edit-attachment_category_columns', 'MLAObjects::mla_attachment_category_get_columns_filter', 10, 1 ); // $columns
|
59 |
-
add_filter( 'manage_attachment_category_custom_column', 'MLAObjects::mla_attachment_category_column_filter', 10, 3 ); // $place_holder, $column_name, $tag->term_id
|
60 |
}
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
register_taxonomy(
|
78 |
'attachment_tag',
|
79 |
array( 'attachment' ),
|
@@ -81,108 +82,92 @@ class MLAObjects {
|
|
81 |
'hierarchical' => false,
|
82 |
'labels' => $labels,
|
83 |
'show_ui' => true,
|
|
|
84 |
'query_var' => true,
|
85 |
'rewrite' => true
|
86 |
)
|
87 |
);
|
88 |
-
|
89 |
-
add_filter( 'manage_edit-attachment_tag_columns', 'MLAObjects::mla_attachment_tag_get_columns_filter', 10, 1 ); // $columns
|
90 |
-
add_filter( 'manage_attachment_tag_custom_column', 'MLAObjects::mla_attachment_tag_column_filter', 10, 3 ); // $place_holder, $column_name, $tag->term_id
|
91 |
}
|
92 |
-
|
93 |
-
} // mla_build_taxonomies_action
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
*
|
103 |
-
* @return array updated column definitions for the Attachment Category list table.
|
104 |
-
*/
|
105 |
-
public static function mla_attachment_category_get_columns_filter( $columns ) {
|
106 |
-
unset( $columns[ 'posts' ] );
|
107 |
-
$columns[ 'attachments' ] = 'Attachments';
|
108 |
-
return $columns;
|
109 |
}
|
|
|
110 |
|
111 |
/**
|
112 |
-
* WordPress Filter for
|
113 |
-
* which
|
114 |
*
|
115 |
-
* @since 0.
|
116 |
*
|
117 |
-
* @param
|
118 |
-
* @param array name of the column.
|
119 |
-
* @param array ID of the term for which the count is desired.
|
120 |
*
|
121 |
-
* @return array
|
122 |
-
* and alink to retrieve a list of them.
|
123 |
*/
|
124 |
-
public static function
|
125 |
-
$
|
126 |
-
$term = get_term( $term_id, 'attachment_category' );
|
127 |
-
|
128 |
-
if ( is_wp_error( $term ) ) {
|
129 |
-
error_log( 'ERROR: mla_attachment_category_column_filter - get_term ' . $objects->get_error_message(), 0 );
|
130 |
-
return 0;
|
131 |
-
}
|
132 |
|
133 |
-
if (
|
134 |
-
|
135 |
-
|
|
|
|
|
136 |
}
|
137 |
|
138 |
-
return sprintf( '<a href="%s">%d</a>', esc_url( add_query_arg(
|
139 |
-
array( 'page' => 'mla-menu', 'attachment_category' => $term->slug, 'heading_suffix' => urlencode( $term->name ) ), 'upload.php' ) ), count( $objects ) );
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* WordPress Filter for Attachment Tag "Attachments" column,
|
144 |
-
* which replaces the "Posts" column with an equivalent "Attachments" column.
|
145 |
-
*
|
146 |
-
* @since 0.1
|
147 |
-
*
|
148 |
-
* @param array column definitions for the Attachment Category list table.
|
149 |
-
*
|
150 |
-
* @return array updated column definitions for the Attachment Category list table.
|
151 |
-
*/
|
152 |
-
public static function mla_attachment_tag_get_columns_filter( $columns ) {
|
153 |
-
unset( $columns[ 'posts' ] );
|
154 |
-
$columns[ 'attachments' ] = 'Attachments';
|
155 |
return $columns;
|
156 |
}
|
157 |
|
158 |
/**
|
159 |
-
* WordPress Filter for
|
160 |
-
* which returns a count of the attachments assigned a given
|
161 |
*
|
162 |
-
* @since 0.
|
163 |
*
|
164 |
-
* @param string
|
165 |
* @param array name of the column
|
166 |
* @param array ID of the term for which the count is desired
|
167 |
*
|
168 |
-
* @return array HTML markup for the column content; number of attachments
|
169 |
-
* and alink to retrieve a list of them
|
170 |
*/
|
171 |
-
public static function
|
172 |
-
$
|
173 |
-
$
|
|
|
|
|
|
|
|
|
|
|
174 |
if ( is_wp_error( $term ) ) {
|
175 |
-
error_log(
|
176 |
return 0;
|
177 |
}
|
178 |
|
179 |
-
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
return 0;
|
182 |
}
|
183 |
|
184 |
return sprintf( '<a href="%s">%d</a>', esc_url( add_query_arg(
|
185 |
-
|
186 |
}
|
187 |
} //Class MLAObjects
|
188 |
?>
|
17 |
* Initialization function, similar to __construct()
|
18 |
*
|
19 |
* @since 0.20
|
20 |
+
*
|
21 |
+
* @return void
|
22 |
*/
|
23 |
public static function initialize() {
|
24 |
self::_build_taxonomies();
|
28 |
* Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters
|
29 |
*
|
30 |
* @since 0.1
|
31 |
+
*
|
32 |
+
* @return void
|
33 |
*/
|
34 |
private static function _build_taxonomies( ) {
|
35 |
+
if ( MLASettings::mla_taxonomy_support('attachment_category') ) {
|
36 |
+
$labels = array(
|
37 |
+
'name' => _x( 'Att. Categories', 'taxonomy general name' ),
|
38 |
+
'singular_name' => _x( 'Att. Category', 'taxonomy singular name' ),
|
39 |
+
'search_items' => __( 'Search Att. Categories' ),
|
40 |
+
'all_items' => __( 'All Att. Categories' ),
|
41 |
+
'parent_item' => __( 'Parent Att. Category' ),
|
42 |
+
'parent_item_colon' => __( 'Parent Att. Category:' ),
|
43 |
+
'edit_item' => __( 'Edit Att. Category' ),
|
44 |
+
'update_item' => __( 'Update Att. Category' ),
|
45 |
+
'add_new_item' => __( 'Add New Att. Category' ),
|
46 |
+
'new_item_name' => __( 'New Att. Category Name' ),
|
47 |
+
'menu_name' => __( 'Att. Category' )
|
48 |
+
);
|
49 |
+
|
50 |
register_taxonomy(
|
51 |
'attachment_category',
|
52 |
array( 'attachment' ),
|
58 |
'rewrite' => true
|
59 |
)
|
60 |
);
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
+
if ( MLASettings::mla_taxonomy_support('attachment_tag') ) {
|
64 |
+
$labels = array(
|
65 |
+
'name' => _x( 'Att. Tags', 'taxonomy general name' ),
|
66 |
+
'singular_name' => _x( 'Att. Tag', 'taxonomy singular name' ),
|
67 |
+
'search_items' => __( 'Search Att. Tags' ),
|
68 |
+
'all_items' => __( 'All Att. Tags' ),
|
69 |
+
'parent_item' => __( 'Parent Att. Tag' ),
|
70 |
+
'parent_item_colon' => __( 'Parent Att. Tag:' ),
|
71 |
+
'edit_item' => __( 'Edit Att. Tag' ),
|
72 |
+
'update_item' => __( 'Update Att. Tag' ),
|
73 |
+
'add_new_item' => __( 'Add New Att. Tag' ),
|
74 |
+
'new_item_name' => __( 'New Att. Tag Name' ),
|
75 |
+
'menu_name' => __( 'Att. Tag' )
|
76 |
+
);
|
77 |
+
|
78 |
register_taxonomy(
|
79 |
'attachment_tag',
|
80 |
array( 'attachment' ),
|
82 |
'hierarchical' => false,
|
83 |
'labels' => $labels,
|
84 |
'show_ui' => true,
|
85 |
+
'update_count_callback' => '_update_post_term_count',
|
86 |
'query_var' => true,
|
87 |
'rewrite' => true
|
88 |
)
|
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 |
}
|
100 |
+
} // _build_taxonomies
|
101 |
|
102 |
/**
|
103 |
+
* WordPress Filter for edit taxonomy "Attachments" column,
|
104 |
+
* which replaces the "Posts" column with an equivalent "Attachments" column.
|
105 |
*
|
106 |
+
* @since 0.30
|
107 |
*
|
108 |
+
* @param array column definitions for the edit taxonomy list table
|
|
|
|
|
109 |
*
|
110 |
+
* @return array updated column definitions for the edit taxonomy list table
|
|
|
111 |
*/
|
112 |
+
public static function mla_taxonomy_get_columns_filter( $columns ) {
|
113 |
+
$screen = get_current_screen();
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
+
if ( 'attachment' == $screen->post_type ) {
|
116 |
+
if ( isset ( $columns[ 'posts' ] ) )
|
117 |
+
unset( $columns[ 'posts' ] );
|
118 |
+
|
119 |
+
$columns[ 'attachments' ] = 'Attachments';
|
120 |
}
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
return $columns;
|
123 |
}
|
124 |
|
125 |
/**
|
126 |
+
* WordPress Filter for edit taxonomy "Attachments" column,
|
127 |
+
* which returns a count of the attachments assigned a given term
|
128 |
*
|
129 |
+
* @since 0.30
|
130 |
*
|
131 |
+
* @param string current column value; always ''
|
132 |
* @param array name of the column
|
133 |
* @param array ID of the term for which the count is desired
|
134 |
*
|
135 |
+
* @return array HTML markup for the column content; number of attachments in the category
|
136 |
+
* and alink to retrieve a list of them
|
137 |
*/
|
138 |
+
public static function mla_taxonomy_column_filter( $place_holder, $column_name, $term_id ) {
|
139 |
+
$screen = get_current_screen();
|
140 |
+
// error_log('mla_taxonomy_column_filter $screen = ' . var_export($screen, true), 0);
|
141 |
+
$tax_object = get_taxonomy( $screen->taxonomy );
|
142 |
+
// error_log('mla_taxonomy_column_filter $tax_object = ' . var_export($tax_object, true), 0);
|
143 |
+
|
144 |
+
$term = get_term( $term_id, $tax_object->name );
|
145 |
+
|
146 |
if ( is_wp_error( $term ) ) {
|
147 |
+
error_log( "ERROR: mla_taxonomy_column_filter( {$tax_object->name} ) - get_term " . $objects->get_error_message(), 0 );
|
148 |
return 0;
|
149 |
}
|
150 |
|
151 |
+
$request = array (
|
152 |
+
'post_type' => 'attachment',
|
153 |
+
'post_status' => 'inherit',
|
154 |
+
'tax_query' => array(
|
155 |
+
array(
|
156 |
+
'taxonomy' => $tax_object->name,
|
157 |
+
'field' => 'slug',
|
158 |
+
'terms' => $term->slug,
|
159 |
+
'include_children' => false
|
160 |
+
) )
|
161 |
+
);
|
162 |
+
|
163 |
+
$results = new WP_Query( $request );
|
164 |
+
if ( ! empty( $results->error ) ){
|
165 |
+
error_log( "ERROR: mla_taxonomy_column_filter( {$tax_object->name} ) - WP_Query " . $results->error, 0 );
|
166 |
return 0;
|
167 |
}
|
168 |
|
169 |
return sprintf( '<a href="%s">%d</a>', esc_url( add_query_arg(
|
170 |
+
array( 'page' => 'mla-menu', 'mla-tax' => $tax_object->name, 'mla-term' => $term->slug, 'heading_suffix' => urlencode( $tax_object->label . ':' . $term->name ) ), 'upload.php' ) ), $results->post_count );
|
171 |
}
|
172 |
} //Class MLAObjects
|
173 |
?>
|
includes/class-mla-settings.php
CHANGED
@@ -15,10 +15,15 @@
|
|
15 |
*/
|
16 |
class MLASettings {
|
17 |
/**
|
18 |
-
* Provides a unique name for the settings page
|
19 |
*/
|
20 |
const MLA_SETTINGS_SLUG = 'mla-settings-menu';
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* $mla_options defines the database options and admin page areas for setting/updating them.
|
24 |
* Each option is defined by an array with the following elements:
|
@@ -26,49 +31,94 @@ class MLASettings {
|
|
26 |
* array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
|
27 |
*
|
28 |
* name => admin page label or heading text
|
29 |
-
* type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea'
|
30 |
* std => default value
|
31 |
* help => help text
|
32 |
* size => text size, default 40
|
33 |
* cols => textbox columns, default 90
|
34 |
* rows => textbox rows, default 5
|
35 |
* options => array of radio or select option values
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
*/
|
37 |
private static $mla_options = array (
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
41 |
|
|
|
|
|
|
|
|
|
42 |
'attachment_category' =>
|
43 |
array('name' => 'Attachment Categories',
|
44 |
-
'type' => 'checkbox',
|
45 |
'std' => 'checked',
|
46 |
'help' => 'Check this option to add support for Attachment Categories.'),
|
47 |
|
48 |
'attachment_tag' =>
|
49 |
array('name' => 'Attachment Tags',
|
50 |
-
'type' => 'checkbox',
|
51 |
'std' => 'checked',
|
52 |
'help' => 'Check this option to add support for Attachment Tags.'),
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
'type' => 'header'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
-
'
|
60 |
-
array('name' => '
|
61 |
'type' => 'radio',
|
62 |
-
'std' => '
|
63 |
-
'options' => array('
|
64 |
-
'
|
|
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
'
|
70 |
-
'options' => array('Red', 'Green', 'Blue'),
|
71 |
-
'help' => 'This is your help text.'),
|
72 |
|
73 |
'text' =>
|
74 |
array('name' => 'Text Field',
|
@@ -91,9 +141,51 @@ class MLASettings {
|
|
91 |
* Initialization function, similar to __construct()
|
92 |
*
|
93 |
* @since 0.1
|
|
|
|
|
94 |
*/
|
95 |
public static function initialize( ) {
|
96 |
add_action( 'admin_menu', 'MLASettings::mla_admin_menu_action' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
|
99 |
/**
|
@@ -101,6 +193,8 @@ class MLASettings {
|
|
101 |
* add settings link in the Plugins section entry for MLA.
|
102 |
*
|
103 |
* @since 0.1
|
|
|
|
|
104 |
*/
|
105 |
public static function mla_admin_menu_action( ) {
|
106 |
$hook = add_submenu_page( 'options-general.php', 'Media Library Assistant Settings', 'Media Library Assistant', 'manage_options', self::MLA_SETTINGS_SLUG, 'MLASettings::mla_render_settings_page' );
|
@@ -186,7 +280,7 @@ class MLASettings {
|
|
186 |
*
|
187 |
* @since 0.1
|
188 |
*
|
189 |
-
* @return
|
190 |
*/
|
191 |
public static function mla_render_settings_page( ) {
|
192 |
if ( !current_user_can( 'manage_options' ) ) {
|
@@ -199,6 +293,7 @@ class MLASettings {
|
|
199 |
*/
|
200 |
$page_template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/admin-display-settings-page.tpl' );
|
201 |
$page_values = array(
|
|
|
202 |
'messages' => '',
|
203 |
'shortcode_list' => '',
|
204 |
'options_list' => '',
|
@@ -211,9 +306,9 @@ class MLASettings {
|
|
211 |
/*
|
212 |
* Check for submit buttons to change or reset settings.
|
213 |
*/
|
214 |
-
if ( !empty( $_REQUEST['save'] ) ) {
|
215 |
$page_content = self::_save_settings( $page_template_array );
|
216 |
-
} elseif ( !empty( $_REQUEST['reset'] ) ) {
|
217 |
$page_content = self::_reset_settings( $page_template_array );
|
218 |
} else {
|
219 |
$page_content = array(
|
@@ -253,6 +348,15 @@ class MLASettings {
|
|
253 |
$page_values['shortcode_list'] = MLAData::mla_parse_template( $page_template_array['shortcodelist'], $shortcode_values );
|
254 |
}
|
255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
$options_list = '';
|
257 |
foreach ( self::$mla_options as $key => $value ) {
|
258 |
switch ( $value['type'] ) {
|
@@ -282,8 +386,9 @@ class MLASettings {
|
|
282 |
foreach ( $value['options'] as $optid => $option ) {
|
283 |
$option_values = array(
|
284 |
'key' => MLA_OPTION_PREFIX . $key,
|
|
|
285 |
'checked' => '',
|
286 |
-
'value' => $
|
287 |
);
|
288 |
|
289 |
if ( $option == self::mla_get_option( $key ) )
|
@@ -301,18 +406,12 @@ class MLASettings {
|
|
301 |
$options_list .= MLAData::mla_parse_template( $page_template_array['radio'], $option_values );
|
302 |
break;
|
303 |
case 'select':
|
304 |
-
$option_values = array(
|
305 |
-
'key' => MLA_OPTION_PREFIX . $key,
|
306 |
-
'value' => $value['name'],
|
307 |
-
'options' => $radio_options,
|
308 |
-
'help' => $value['help']
|
309 |
-
);
|
310 |
-
|
311 |
$select_options = '';
|
312 |
foreach ( $value['options'] as $optid => $option ) {
|
313 |
$option_values = array(
|
314 |
'selected' => '',
|
315 |
-
'value' => $option
|
|
|
316 |
);
|
317 |
|
318 |
if ( $option == self::mla_get_option( $key ) )
|
@@ -368,6 +467,12 @@ class MLASettings {
|
|
368 |
|
369 |
$options_list .= MLAData::mla_parse_template( $page_template_array['textarea'], $option_values );
|
370 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
371 |
default:
|
372 |
error_log( 'ERROR: mla_render_settings_page unknown type: ' . var_export( $value, true ), 0 );
|
373 |
}
|
@@ -382,6 +487,82 @@ class MLASettings {
|
|
382 |
echo MLAData::mla_parse_template( $page_template_array['page'], $page_values );
|
383 |
} // mla_render_settings_page
|
384 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
/**
|
386 |
* Save settings to the options table
|
387 |
*
|
@@ -389,20 +570,23 @@ class MLASettings {
|
|
389 |
*
|
390 |
* @param array HTML template(s) for the settings page
|
391 |
*
|
392 |
-
* @return array Message(s) reflecting the results of the operation
|
393 |
*/
|
394 |
private static function _save_settings( $template_array ) {
|
395 |
-
$
|
396 |
|
397 |
foreach ( self::$mla_options as $key => $value ) {
|
398 |
if ( isset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) {
|
|
|
399 |
switch ( $value['type'] ) {
|
400 |
case 'checkbox':
|
401 |
self::mla_update_option( $key, 'checked' );
|
402 |
break;
|
403 |
case 'header':
|
|
|
404 |
break;
|
405 |
case 'radio':
|
|
|
406 |
self::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
|
407 |
break;
|
408 |
case 'select':
|
@@ -414,17 +598,24 @@ class MLASettings {
|
|
414 |
case 'textarea':
|
415 |
self::mla_update_option( $key, trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) );
|
416 |
break;
|
|
|
|
|
|
|
|
|
|
|
417 |
default:
|
418 |
error_log( 'ERROR: _save_settings unknown type(1): ' . var_export( $value, true ), 0 );
|
419 |
}
|
420 |
|
421 |
-
$
|
422 |
} else {
|
|
|
423 |
switch ( $value['type'] ) {
|
424 |
case 'checkbox':
|
425 |
self::mla_update_option( $key, 'unchecked' );
|
426 |
break;
|
427 |
case 'header':
|
|
|
428 |
break;
|
429 |
case 'radio':
|
430 |
self::mla_delete_option( $key );
|
@@ -438,11 +629,16 @@ class MLASettings {
|
|
438 |
case 'textarea':
|
439 |
self::mla_delete_option( $key );
|
440 |
break;
|
|
|
|
|
|
|
|
|
|
|
441 |
default:
|
442 |
error_log( 'ERROR: _save_settings unknown type(2): ' . var_export( $value, true ), 0 );
|
443 |
}
|
444 |
|
445 |
-
$
|
446 |
}
|
447 |
}
|
448 |
|
@@ -453,8 +649,9 @@ class MLASettings {
|
|
453 |
|
454 |
/*
|
455 |
* Uncomment this for debugging.
|
456 |
-
* $page_content['message'] .= $message;
|
457 |
*/
|
|
|
|
|
458 |
return $page_content;
|
459 |
} // _save_settings
|
460 |
|
@@ -465,26 +662,149 @@ class MLASettings {
|
|
465 |
*
|
466 |
* @param array HTML template(s) for the settings page
|
467 |
*
|
468 |
-
* @return array Message(s) reflecting the results of the operation
|
469 |
*/
|
470 |
private static function _reset_settings( $template_array ) {
|
471 |
-
$
|
472 |
|
473 |
foreach ( self::$mla_options as $key => $value ) {
|
474 |
-
|
475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
}
|
477 |
|
478 |
$page_content = array(
|
479 |
-
|
480 |
'body' => ''
|
481 |
);
|
482 |
|
483 |
/*
|
484 |
* Uncomment this for debugging.
|
485 |
-
* $page_content['message'] .= $message;
|
486 |
*/
|
|
|
|
|
487 |
return $page_content;
|
488 |
} // _reset_settings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
} // class MLASettings
|
490 |
?>
|
15 |
*/
|
16 |
class MLASettings {
|
17 |
/**
|
18 |
+
* Provides a unique name for the settings page
|
19 |
*/
|
20 |
const MLA_SETTINGS_SLUG = 'mla-settings-menu';
|
21 |
|
22 |
+
/**
|
23 |
+
* Provides a unique name for the current version option
|
24 |
+
*/
|
25 |
+
const MLA_VERSION_OPTION = 'current_version';
|
26 |
+
|
27 |
/**
|
28 |
* $mla_options defines the database options and admin page areas for setting/updating them.
|
29 |
* Each option is defined by an array with the following elements:
|
31 |
* array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)
|
32 |
*
|
33 |
* name => admin page label or heading text
|
34 |
+
* type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
|
35 |
* std => default value
|
36 |
* help => help text
|
37 |
* size => text size, default 40
|
38 |
* cols => textbox columns, default 90
|
39 |
* rows => textbox rows, default 5
|
40 |
* options => array of radio or select option values
|
41 |
+
* texts => array of radio or select option display texts
|
42 |
+
* render => rendering function for 'custom' options. Usage:
|
43 |
+
* $options_list .= ['render']( 'render', $key, $value, $page_template_array );
|
44 |
+
* update => update function for 'custom' options; returns nothing. Usage:
|
45 |
+
* $message = ['update']( 'update', $key, $value, $_REQUEST );
|
46 |
+
* delete => delete function for 'custom' options; returns nothing. Usage:
|
47 |
+
* $message = ['delete']( 'delete', $key, $value, $_REQUEST );
|
48 |
+
* reset => reset function for 'custom' options; returns nothing. Usage:
|
49 |
+
* $message = ['reset']( 'reset', $key, $value, $_REQUEST );
|
50 |
*/
|
51 |
private static $mla_options = array (
|
52 |
+
/*
|
53 |
+
* This option records the highest MLA version so-far installed
|
54 |
+
*/
|
55 |
+
self::MLA_VERSION_OPTION =>
|
56 |
+
array('type' => 'hidden',
|
57 |
+
'std' => '0'),
|
58 |
|
59 |
+
/*
|
60 |
+
* These checkboxes are no longer used;
|
61 |
+
* they are retained for the database version/update check
|
62 |
+
*/
|
63 |
'attachment_category' =>
|
64 |
array('name' => 'Attachment Categories',
|
65 |
+
'type' => 'hidden', // checkbox',
|
66 |
'std' => 'checked',
|
67 |
'help' => 'Check this option to add support for Attachment Categories.'),
|
68 |
|
69 |
'attachment_tag' =>
|
70 |
array('name' => 'Attachment Tags',
|
71 |
+
'type' => 'hidden', // checkbox',
|
72 |
'std' => 'checked',
|
73 |
'help' => 'Check this option to add support for Attachment Tags.'),
|
74 |
|
75 |
+
'taxonomy_heading' =>
|
76 |
+
array('name' => 'Taxonomy Support',
|
77 |
+
'type' => 'header'),
|
78 |
+
|
79 |
+
'taxonomy_support' =>
|
80 |
+
array('help' => 'Check the "Support" box to add the taxonomy to the Assistant.<br>Check the "Quick Edit" box to display the taxonomy in the Quick Edit panel.<br>Use the "List Filter" option to select the taxonomy on which to filter the Assistant table listing.',
|
81 |
+
'std' => array (
|
82 |
+
'tax_support' => array (
|
83 |
+
'attachment_category' => 'checked',
|
84 |
+
'attachment_tag' => 'checked',
|
85 |
+
),
|
86 |
+
'tax_quick_edit' => array (
|
87 |
+
'attachment_category' => 'checked',
|
88 |
+
'attachment_tag' => 'checked',
|
89 |
+
),
|
90 |
+
'tax_filter' => 'attachment_category'
|
91 |
+
),
|
92 |
+
'type' => 'custom',
|
93 |
+
'render' => '_taxonomy_handler',
|
94 |
+
'update' => '_taxonomy_handler',
|
95 |
+
'delete' => '_taxonomy_handler',
|
96 |
+
'reset' => '_taxonomy_handler'),
|
97 |
+
|
98 |
+
'orderby_heading' =>
|
99 |
+
array('name' => 'Default Table Listing Sort Order',
|
100 |
'type' => 'header'),
|
101 |
+
|
102 |
+
'default_orderby' =>
|
103 |
+
array('name' => 'Order By',
|
104 |
+
'type' => 'select',
|
105 |
+
'std' => 'title_name',
|
106 |
+
'options' => array('title_name'),
|
107 |
+
'texts' => array('Title/Name'),
|
108 |
+
'help' => 'Select the column for the sort order of the Assistant table listing.'),
|
109 |
|
110 |
+
'default_order' =>
|
111 |
+
array('name' => 'Order',
|
112 |
'type' => 'radio',
|
113 |
+
'std' => 'ASC',
|
114 |
+
'options' => array('ASC', 'DESC'),
|
115 |
+
'texts' => array('Ascending', 'Descending'),
|
116 |
+
'help' => 'Choose the sort order.'),
|
117 |
|
118 |
+
/* Here are examples of the other option types
|
119 |
+
'testvalues' =>
|
120 |
+
array('name' => 'Test Values',
|
121 |
+
'type' => 'header'),
|
|
|
|
|
122 |
|
123 |
'text' =>
|
124 |
array('name' => 'Text Field',
|
141 |
* Initialization function, similar to __construct()
|
142 |
*
|
143 |
* @since 0.1
|
144 |
+
*
|
145 |
+
* @return void
|
146 |
*/
|
147 |
public static function initialize( ) {
|
148 |
add_action( 'admin_menu', 'MLASettings::mla_admin_menu_action' );
|
149 |
+
self::_version_upgrade();
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Database and option update check, for installing new versions
|
154 |
+
*
|
155 |
+
* @since 0.30
|
156 |
+
*
|
157 |
+
* @return void
|
158 |
+
*/
|
159 |
+
private static function _version_upgrade( ) {
|
160 |
+
$current_version = self::mla_get_option( self::MLA_VERSION_OPTION );
|
161 |
+
|
162 |
+
if ( ((float)'.30') > ((float)$current_version) ) {
|
163 |
+
/*
|
164 |
+
* Convert attachment_category and _tag to taxonomy_support;
|
165 |
+
* change the default if either option is unchecked
|
166 |
+
*/
|
167 |
+
$category_option = self::mla_get_option( 'attachment_category' );
|
168 |
+
$tag_option = self::mla_get_option( 'attachment_tag' );
|
169 |
+
if ( ! ( ( 'checked' == $category_option ) && ( 'checked' == $tag_option ) ) ) {
|
170 |
+
$tax_option = self::mla_get_option( 'taxonomy_support' );
|
171 |
+
if ( 'checked' != $category_option ) {
|
172 |
+
if ( isset( $tax_option['tax_support']['attachment_category'] ) )
|
173 |
+
unset( $tax_option['tax_support']['attachment_category'] );
|
174 |
+
}
|
175 |
+
|
176 |
+
if ( 'checked' != $tag_option ) {
|
177 |
+
if ( isset( $tax_option['tax_support']['attachment_tag'] ) )
|
178 |
+
unset( $tax_option['tax_support']['attachment_tag'] );
|
179 |
+
}
|
180 |
+
|
181 |
+
self::_taxonomy_handler( 'update', 'taxonomy_support', self::$mla_options['taxonomy_support'], $tax_option );
|
182 |
+
} // one or both options unchecked
|
183 |
+
|
184 |
+
self::mla_delete_option( 'attachment_category' );
|
185 |
+
self::mla_delete_option( 'attachment_tag' );
|
186 |
+
} // version is less than .30
|
187 |
+
|
188 |
+
self::mla_update_option( self::MLA_VERSION_OPTION, MLA::CURRENT_MLA_VERSION );
|
189 |
}
|
190 |
|
191 |
/**
|
193 |
* add settings link in the Plugins section entry for MLA.
|
194 |
*
|
195 |
* @since 0.1
|
196 |
+
*
|
197 |
+
* @return void
|
198 |
*/
|
199 |
public static function mla_admin_menu_action( ) {
|
200 |
$hook = add_submenu_page( 'options-general.php', 'Media Library Assistant Settings', 'Media Library Assistant', 'manage_options', self::MLA_SETTINGS_SLUG, 'MLASettings::mla_render_settings_page' );
|
280 |
*
|
281 |
* @since 0.1
|
282 |
*
|
283 |
+
* @return void Echoes HTML markup for the settings subpage
|
284 |
*/
|
285 |
public static function mla_render_settings_page( ) {
|
286 |
if ( !current_user_can( 'manage_options' ) ) {
|
293 |
*/
|
294 |
$page_template_array = MLAData::mla_load_template( MLA_PLUGIN_PATH . 'tpls/admin-display-settings-page.tpl' );
|
295 |
$page_values = array(
|
296 |
+
'version' => 'v' . MLA::CURRENT_MLA_VERSION,
|
297 |
'messages' => '',
|
298 |
'shortcode_list' => '',
|
299 |
'options_list' => '',
|
306 |
/*
|
307 |
* Check for submit buttons to change or reset settings.
|
308 |
*/
|
309 |
+
if ( !empty( $_REQUEST['mla-options-save'] ) ) {
|
310 |
$page_content = self::_save_settings( $page_template_array );
|
311 |
+
} elseif ( !empty( $_REQUEST['mla-options-reset'] ) ) {
|
312 |
$page_content = self::_reset_settings( $page_template_array );
|
313 |
} else {
|
314 |
$page_content = array(
|
348 |
$page_values['shortcode_list'] = MLAData::mla_parse_template( $page_template_array['shortcodelist'], $shortcode_values );
|
349 |
}
|
350 |
|
351 |
+
/*
|
352 |
+
* Fill in the current list of sortable columns
|
353 |
+
*/
|
354 |
+
$default_orderby = MLA_List_Table::mla_get_sortable_columns( );
|
355 |
+
foreach ($default_orderby as $key => $value ) {
|
356 |
+
self::$mla_options['default_orderby']['options'][] = $value[0];
|
357 |
+
self::$mla_options['default_orderby']['texts'][] = $value[1];
|
358 |
+
}
|
359 |
+
|
360 |
$options_list = '';
|
361 |
foreach ( self::$mla_options as $key => $value ) {
|
362 |
switch ( $value['type'] ) {
|
386 |
foreach ( $value['options'] as $optid => $option ) {
|
387 |
$option_values = array(
|
388 |
'key' => MLA_OPTION_PREFIX . $key,
|
389 |
+
'option' => $option,
|
390 |
'checked' => '',
|
391 |
+
'value' => $value['texts'][$optid]
|
392 |
);
|
393 |
|
394 |
if ( $option == self::mla_get_option( $key ) )
|
406 |
$options_list .= MLAData::mla_parse_template( $page_template_array['radio'], $option_values );
|
407 |
break;
|
408 |
case 'select':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
$select_options = '';
|
410 |
foreach ( $value['options'] as $optid => $option ) {
|
411 |
$option_values = array(
|
412 |
'selected' => '',
|
413 |
+
'value' => $option,
|
414 |
+
'text' => $value['texts'][$optid]
|
415 |
);
|
416 |
|
417 |
if ( $option == self::mla_get_option( $key ) )
|
467 |
|
468 |
$options_list .= MLAData::mla_parse_template( $page_template_array['textarea'], $option_values );
|
469 |
break;
|
470 |
+
case 'custom':
|
471 |
+
if ( isset( $value['render'] ) )
|
472 |
+
$options_list .= self::$value['render']( 'render', $key, $value, $page_template_array );
|
473 |
+
break;
|
474 |
+
case 'hidden':
|
475 |
+
break;
|
476 |
default:
|
477 |
error_log( 'ERROR: mla_render_settings_page unknown type: ' . var_export( $value, true ), 0 );
|
478 |
}
|
487 |
echo MLAData::mla_parse_template( $page_template_array['page'], $page_values );
|
488 |
} // mla_render_settings_page
|
489 |
|
490 |
+
/**
|
491 |
+
* Determine MLA support for a taxonomy, handling the special case where the
|
492 |
+
* settings are being updated or reset.
|
493 |
+
*
|
494 |
+
* @since 0.30
|
495 |
+
*
|
496 |
+
* @param string Taxonomy name, e.g., attachment_category
|
497 |
+
* @param string 'support' (the default), 'quick-edit' or 'filter'
|
498 |
+
*
|
499 |
+
* @return boolean|string
|
500 |
+
* true if the taxonomy is supported in this way else false
|
501 |
+
* string if $tax_name is '' and $support_type is 'filter', returns the taxonomy to filter by
|
502 |
+
*/
|
503 |
+
public static function mla_taxonomy_support($tax_name, $support_type = 'support') {
|
504 |
+
$tax_options = MLASettings::mla_get_option( 'taxonomy_support' );
|
505 |
+
|
506 |
+
switch ( $support_type ) {
|
507 |
+
case 'support':
|
508 |
+
$tax_support = isset( $tax_options['tax_support'] ) ? $tax_options['tax_support'] : array ();
|
509 |
+
$is_supported = array_key_exists( $tax_name, $tax_support );
|
510 |
+
|
511 |
+
if ( !empty( $_REQUEST['mla-options-save'] ) ) {
|
512 |
+
$is_supported = isset( $_REQUEST['tax_support'][ $tax_name ] );
|
513 |
+
} elseif ( !empty( $_REQUEST['mla-options-reset'] ) ) {
|
514 |
+
switch ( $tax_name ) {
|
515 |
+
case 'attachment_category':
|
516 |
+
case 'attachment_tag':
|
517 |
+
$is_supported = true;
|
518 |
+
break;
|
519 |
+
default:
|
520 |
+
$is_supported = false;
|
521 |
+
}
|
522 |
+
}
|
523 |
+
|
524 |
+
return $is_supported;
|
525 |
+
case 'quick-edit':
|
526 |
+
$tax_quick_edit = isset( $tax_options['tax_quick_edit'] ) ? $tax_options['tax_quick_edit'] : array ();
|
527 |
+
$is_supported = array_key_exists( $tax_name, $tax_quick_edit );
|
528 |
+
|
529 |
+
if ( !empty( $_REQUEST['mla-options-save'] ) ) {
|
530 |
+
$is_supported = isset( $_REQUEST['tax_quick_edit'][ $tax_name ] );
|
531 |
+
} elseif ( !empty( $_REQUEST['mla-options-reset'] ) ) {
|
532 |
+
switch ( $tax_name ) {
|
533 |
+
case 'attachment_category':
|
534 |
+
case 'attachment_tag':
|
535 |
+
$is_supported = true;
|
536 |
+
break;
|
537 |
+
default:
|
538 |
+
$is_supported = false;
|
539 |
+
}
|
540 |
+
}
|
541 |
+
|
542 |
+
return $is_supported;
|
543 |
+
case 'filter':
|
544 |
+
$tax_filter = isset( $tax_options['tax_filter'] ) ? $tax_options['tax_filter'] : '';
|
545 |
+
if ( '' == $tax_name )
|
546 |
+
return $tax_filter;
|
547 |
+
else
|
548 |
+
$is_supported = ( $tax_name == $tax_filter );
|
549 |
+
|
550 |
+
if ( !empty( $_REQUEST['mla-options-save'] ) ) {
|
551 |
+
$tax_filter = isset( $_REQUEST['tax_filter'] ) ? $_REQUEST['tax_filter'] : '';
|
552 |
+
$is_supported = ( $tax_name == $tax_filter );
|
553 |
+
} elseif ( !empty( $_REQUEST['mla-options-reset'] ) ) {
|
554 |
+
if ( 'attachment_category' == $tax_name )
|
555 |
+
$is_supported = true;
|
556 |
+
else
|
557 |
+
$is_supported = false;
|
558 |
+
}
|
559 |
+
|
560 |
+
return $is_supported;
|
561 |
+
default:
|
562 |
+
return false;
|
563 |
+
} // $support_type
|
564 |
+
} // mla_taxonomy_support
|
565 |
+
|
566 |
/**
|
567 |
* Save settings to the options table
|
568 |
*
|
570 |
*
|
571 |
* @param array HTML template(s) for the settings page
|
572 |
*
|
573 |
+
* @return array Message(s) reflecting the results of the operation
|
574 |
*/
|
575 |
private static function _save_settings( $template_array ) {
|
576 |
+
$message_list = '';
|
577 |
|
578 |
foreach ( self::$mla_options as $key => $value ) {
|
579 |
if ( isset( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) ) {
|
580 |
+
$message = '<br>update_option(' . $key . ")\r\n";
|
581 |
switch ( $value['type'] ) {
|
582 |
case 'checkbox':
|
583 |
self::mla_update_option( $key, 'checked' );
|
584 |
break;
|
585 |
case 'header':
|
586 |
+
$message = '';
|
587 |
break;
|
588 |
case 'radio':
|
589 |
+
error_log('self::mla_update_option ' . var_export($_REQUEST[ MLA_OPTION_PREFIX . $key ], true), 0 );
|
590 |
self::mla_update_option( $key, $_REQUEST[ MLA_OPTION_PREFIX . $key ] );
|
591 |
break;
|
592 |
case 'select':
|
598 |
case 'textarea':
|
599 |
self::mla_update_option( $key, trim( $_REQUEST[ MLA_OPTION_PREFIX . $key ] ) );
|
600 |
break;
|
601 |
+
case 'custom':
|
602 |
+
$message = self::$value['update']( 'update', $key, $value, $_REQUEST );
|
603 |
+
break;
|
604 |
+
case 'hidden':
|
605 |
+
break;
|
606 |
default:
|
607 |
error_log( 'ERROR: _save_settings unknown type(1): ' . var_export( $value, true ), 0 );
|
608 |
}
|
609 |
|
610 |
+
$message_list .= $message;
|
611 |
} else {
|
612 |
+
$message = '<br>delete_option(' . $key . ')';
|
613 |
switch ( $value['type'] ) {
|
614 |
case 'checkbox':
|
615 |
self::mla_update_option( $key, 'unchecked' );
|
616 |
break;
|
617 |
case 'header':
|
618 |
+
$message = '';
|
619 |
break;
|
620 |
case 'radio':
|
621 |
self::mla_delete_option( $key );
|
629 |
case 'textarea':
|
630 |
self::mla_delete_option( $key );
|
631 |
break;
|
632 |
+
case 'custom':
|
633 |
+
$message = self::$value['delete']( 'delete', $key, $value, $_REQUEST );
|
634 |
+
break;
|
635 |
+
case 'hidden':
|
636 |
+
break;
|
637 |
default:
|
638 |
error_log( 'ERROR: _save_settings unknown type(2): ' . var_export( $value, true ), 0 );
|
639 |
}
|
640 |
|
641 |
+
$message_list .= $message;
|
642 |
}
|
643 |
}
|
644 |
|
649 |
|
650 |
/*
|
651 |
* Uncomment this for debugging.
|
|
|
652 |
*/
|
653 |
+
// $page_content['message'] .= $message_list;
|
654 |
+
|
655 |
return $page_content;
|
656 |
} // _save_settings
|
657 |
|
662 |
*
|
663 |
* @param array HTML template(s) for the settings page
|
664 |
*
|
665 |
+
* @return array Message(s) reflecting the results of the operation
|
666 |
*/
|
667 |
private static function _reset_settings( $template_array ) {
|
668 |
+
$message_list = '';
|
669 |
|
670 |
foreach ( self::$mla_options as $key => $value ) {
|
671 |
+
if ( 'custom' == $value['type'] ) {
|
672 |
+
$message = self::$value['reset']( 'reset', $key, $value, $_REQUEST );
|
673 |
+
}
|
674 |
+
elseif ( ('header' == $value['type']) || ('hidden' == $value['type']) ) {
|
675 |
+
$message = '';
|
676 |
+
}
|
677 |
+
else {
|
678 |
+
self::mla_delete_option( $key );
|
679 |
+
$message = '<br>delete_option(' . $key . ')';
|
680 |
+
}
|
681 |
+
|
682 |
+
$message_list .= $message;
|
683 |
}
|
684 |
|
685 |
$page_content = array(
|
686 |
+
'message' => 'Settings reset to default values.',
|
687 |
'body' => ''
|
688 |
);
|
689 |
|
690 |
/*
|
691 |
* Uncomment this for debugging.
|
|
|
692 |
*/
|
693 |
+
// $page_content['message'] .= $message_list;
|
694 |
+
|
695 |
return $page_content;
|
696 |
} // _reset_settings
|
697 |
+
|
698 |
+
/**
|
699 |
+
* Render and manage other taxonomy support options, e.g., Categories and Post Tags
|
700 |
+
*
|
701 |
+
* @since 0.30
|
702 |
+
*
|
703 |
+
* @param string 'render', 'update', 'delete', or 'reset'
|
704 |
+
* @param string option name, e.g., 'taxonomy_support'
|
705 |
+
* @param array option parameters
|
706 |
+
* @param array The $page_template_array for 'render' else $_REQUEST
|
707 |
+
*
|
708 |
+
* @return string HTML table row markup for 'render' else message(s) reflecting the results of the operation.
|
709 |
+
*/
|
710 |
+
private static function _taxonomy_handler( $action, $key, $value, $args ) {
|
711 |
+
switch ( $action ) {
|
712 |
+
case 'render':
|
713 |
+
$taxonomies = get_taxonomies( array ( 'show_ui' => 'true' ), 'objects' );
|
714 |
+
$current_values = self::mla_get_option( $key );
|
715 |
+
$tax_support = isset( $current_values['tax_support'] ) ? $current_values['tax_support'] : array ();
|
716 |
+
$tax_quick_edit = isset( $current_values['tax_quick_edit'] ) ? $current_values['tax_quick_edit'] : array ();
|
717 |
+
$tax_filter = isset( $current_values['tax_filter'] ) ? $current_values['tax_filter'] : '';
|
718 |
+
|
719 |
+
/*
|
720 |
+
* Always display our own taxonomies, even if not registered.
|
721 |
+
* Otherwise there's no way to turn them back on.
|
722 |
+
*/
|
723 |
+
if ( ! array_key_exists( 'attachment_category', $taxonomies ) ) {
|
724 |
+
$taxonomies['attachment_category'] = (object) array( 'labels' => (object) array( 'name' => 'Attachment Categories' ) );
|
725 |
+
if ( isset( $tax_support['attachment_category'] ) )
|
726 |
+
unset( $tax_support['attachment_category'] );
|
727 |
+
|
728 |
+
if ( isset( $tax_quick_edit['attachment_category'] ) )
|
729 |
+
unset( $tax_quick_edit['attachment_category'] );
|
730 |
+
|
731 |
+
if ( $tax_filter == 'attachment_category' )
|
732 |
+
$tax_filter = '';
|
733 |
+
}
|
734 |
+
|
735 |
+
if ( ! array_key_exists( 'attachment_tag', $taxonomies ) ) {
|
736 |
+
$taxonomies['attachment_tag'] = (object) array( 'labels' => (object) array( 'name' => 'Attachment Tags' ) );
|
737 |
+
|
738 |
+
if ( isset( $tax_support['attachment_tag'] ) )
|
739 |
+
unset( $tax_support['attachment_tag'] );
|
740 |
+
|
741 |
+
if ( isset( $tax_quick_edit['attachment_tag'] ) )
|
742 |
+
unset( $tax_quick_edit['attachment_tag'] );
|
743 |
+
|
744 |
+
if ( $tax_filter == 'attachment_tag' )
|
745 |
+
$tax_filter = '';
|
746 |
+
}
|
747 |
+
|
748 |
+
$taxonomy_row = $args['taxonomyrow'];
|
749 |
+
$row = '';
|
750 |
+
|
751 |
+
foreach ($taxonomies as $tax_name => $tax_object) {
|
752 |
+
$option_values = array (
|
753 |
+
'key' => $tax_name,
|
754 |
+
'name' => $tax_object->labels->name,
|
755 |
+
'support_checked' => array_key_exists( $tax_name, $tax_support ) ? 'checked=checked' : '',
|
756 |
+
'quick_edit_checked' => array_key_exists( $tax_name, $tax_quick_edit ) ? 'checked=checked' : '',
|
757 |
+
'filter_checked' => ( $tax_name == $tax_filter ) ? 'checked=checked' : ''
|
758 |
+
);
|
759 |
+
|
760 |
+
$row .= MLAData::mla_parse_template( $taxonomy_row, $option_values );
|
761 |
+
}
|
762 |
+
|
763 |
+
$option_values = array (
|
764 |
+
'taxonomy_rows' => $row,
|
765 |
+
'help' => $value['help']
|
766 |
+
);
|
767 |
+
|
768 |
+
return MLAData::mla_parse_template( $args['taxonomytable'], $option_values );
|
769 |
+
case 'update':
|
770 |
+
case 'delete':
|
771 |
+
$tax_support = isset( $args['tax_support'] ) ? $args['tax_support'] : array ();
|
772 |
+
$tax_quick_edit = isset( $args['tax_quick_edit'] ) ? $args['tax_quick_edit'] : array ();
|
773 |
+
$tax_filter = isset( $args['tax_filter'] ) ? $args['tax_filter'] : '';
|
774 |
+
|
775 |
+
$msg = '';
|
776 |
+
|
777 |
+
if ( !empty($tax_filter) && !array_key_exists( $tax_filter, $tax_support ) ) {
|
778 |
+
$msg .= "<br>List Filter ignored; {$tax_filter} not supported.\r\n";
|
779 |
+
$tax_filter = '';
|
780 |
+
}
|
781 |
+
|
782 |
+
foreach ($tax_quick_edit as $tax_name => $tax_value) {
|
783 |
+
if ( !array_key_exists( $tax_name, $tax_support ) ) {
|
784 |
+
$msg .= "<br>Quick Edit ignored; {$tax_name} not supported.\r\n";
|
785 |
+
unset( $tax_quick_edit[ $tax_name ] );
|
786 |
+
}
|
787 |
+
}
|
788 |
+
|
789 |
+
$value = array (
|
790 |
+
'tax_support' => $tax_support,
|
791 |
+
'tax_quick_edit' => $tax_quick_edit,
|
792 |
+
'tax_filter' => $tax_filter
|
793 |
+
);
|
794 |
+
|
795 |
+
self::mla_update_option( $key, $value );
|
796 |
+
|
797 |
+
if ( empty( $msg ) )
|
798 |
+
$msg = "<br>Update custom {$key}\r\n";
|
799 |
+
|
800 |
+
return $msg;
|
801 |
+
case 'reset':
|
802 |
+
self::mla_delete_option( $key );
|
803 |
+
return "<br>Reset custom {$key}\r\n";
|
804 |
+
default:
|
805 |
+
error_log( 'ERROR: _save_settings unknown type(2): ' . var_export( $value, true ), 0 );
|
806 |
+
return '';
|
807 |
+
}
|
808 |
+
} // _taxonomy_handler
|
809 |
} // class MLASettings
|
810 |
?>
|
includes/class-mla-shortcodes.php
CHANGED
@@ -17,6 +17,8 @@ class MLAShortcodes {
|
|
17 |
* Initialization function, similar to __construct()
|
18 |
*
|
19 |
* @since 0.20
|
|
|
|
|
20 |
*/
|
21 |
public static function initialize() {
|
22 |
add_shortcode( 'mla_attachment_list', 'MLAShortcodes::mla_attachment_list_shortcode' );
|
@@ -27,7 +29,7 @@ class MLAShortcodes {
|
|
27 |
*
|
28 |
* @since 0.1
|
29 |
*
|
30 |
-
* @return
|
31 |
*/
|
32 |
public static function mla_attachment_list_shortcode( /* $atts */ ) {
|
33 |
global $wpdb;
|
17 |
* Initialization function, similar to __construct()
|
18 |
*
|
19 |
* @since 0.20
|
20 |
+
*
|
21 |
+
* @return void
|
22 |
*/
|
23 |
public static function initialize() {
|
24 |
add_shortcode( 'mla_attachment_list', 'MLAShortcodes::mla_attachment_list_shortcode' );
|
29 |
*
|
30 |
* @since 0.1
|
31 |
*
|
32 |
+
* @return void echoes HTML markup for the attachment list
|
33 |
*/
|
34 |
public static function mla_attachment_list_shortcode( /* $atts */ ) {
|
35 |
global $wpdb;
|
includes/mla-plugin-loader.php
CHANGED
@@ -22,11 +22,6 @@ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-data.php' );
|
|
22 |
|
23 |
add_action( 'init', 'MLAData::initialize' );
|
24 |
|
25 |
-
/*
|
26 |
-
* Custom list table package that extends the core WP_List_Table class.
|
27 |
-
*/
|
28 |
-
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
|
29 |
-
|
30 |
/*
|
31 |
* Custom Taxonomies and WordPress objects.
|
32 |
*/
|
@@ -53,6 +48,11 @@ require_once( MLA_PLUGIN_PATH . 'includes/class-mla-settings.php' );
|
|
53 |
|
54 |
add_action( 'init', 'MLASettings::initialize' );
|
55 |
|
|
|
|
|
|
|
|
|
|
|
56 |
/*
|
57 |
* Main program
|
58 |
*/
|
22 |
|
23 |
add_action( 'init', 'MLAData::initialize' );
|
24 |
|
|
|
|
|
|
|
|
|
|
|
25 |
/*
|
26 |
* Custom Taxonomies and WordPress objects.
|
27 |
*/
|
48 |
|
49 |
add_action( 'init', 'MLASettings::initialize' );
|
50 |
|
51 |
+
/*
|
52 |
+
* Custom list table package that extends the core WP_List_Table class.
|
53 |
+
*/
|
54 |
+
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-list-table.php' );
|
55 |
+
|
56 |
/*
|
57 |
* Main program
|
58 |
*/
|
index.php
CHANGED
@@ -6,16 +6,16 @@
|
|
6 |
* will the rest of the plugin be loaded and run.
|
7 |
*
|
8 |
* @package Media Library Assistant
|
9 |
-
* @version 0.
|
10 |
*/
|
11 |
|
12 |
/*
|
13 |
Plugin Name: Media Library Assistant
|
14 |
-
Plugin URI: http://
|
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.
|
18 |
-
Author URI: http://
|
19 |
*/
|
20 |
|
21 |
/**
|
6 |
* will the rest of the plugin be loaded and run.
|
7 |
*
|
8 |
* @package Media Library Assistant
|
9 |
+
* @version 0.30
|
10 |
*/
|
11 |
|
12 |
/*
|
13 |
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.30
|
18 |
+
Author URI: http://fairtradejudaica.org/our-story/staff/
|
19 |
*/
|
20 |
|
21 |
/**
|
js/mla-single-edit-scripts.dev.js
CHANGED
@@ -199,8 +199,8 @@ jQuery(document).ready( function($) {
|
|
199 |
taxonomyParts.shift();
|
200 |
taxonomy = taxonomyParts.join('-');
|
201 |
settingName = taxonomy + '_tab';
|
202 |
-
if ( taxonomy == 'category' )
|
203 |
-
settingName = 'cats';
|
204 |
|
205 |
// TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.dev.js
|
206 |
$('a', '#' + taxonomy + '-tabs').click( function(){
|
199 |
taxonomyParts.shift();
|
200 |
taxonomy = taxonomyParts.join('-');
|
201 |
settingName = taxonomy + '_tab';
|
202 |
+
// if ( taxonomy == 'category' )
|
203 |
+
// settingName = 'cats';
|
204 |
|
205 |
// TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.dev.js
|
206 |
$('a', '#' + taxonomy + '-tabs').click( function(){
|
js/mla-single-edit-scripts.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var tagBox;function array_unique_noempty(b){var c=[];jQuery.each(b,function(a,d){d=jQuery.trim(d);if(d&&jQuery.inArray(d,c)==-1){c.push(d)}});return c}(function(a){tagBox={clean:function(c){var b=mla_single_edit_vars.comma;if(","!==b){c=c.replace(new RegExp(b,"g"),",")}c=c.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==b){c=c.replace(/,/g,b)}return c},parseTags:function(f){var i=f.id,c=i.split("-check-num-")[1],e=a(f).closest(".tagsdiv"),h=e.find(".the-tags"),b=mla_single_edit_vars.comma,d=h.val().split(b),g=[];delete d[c];a.each(d,function(j,k){k=a.trim(k);if(k){g.push(k)}});h.val(this.clean(g.join(b)));this.quickClicks(e);return false},quickClicks:function(d){var g=a(".the-tags",d),e=a(".tagchecklist",d),f=a(d).attr("id"),b,c;if(!g.length){return}c=g.prop("disabled");b=g.val().split(mla_single_edit_vars.comma);e.empty();a.each(b,function(i,k){var j,h;k=a.trim(k);if(!k){return}j=a("<span />").text(k);if(!c){h=a('<a id="'+f+"-check-num-"+i+'" class="ntdelbutton">X</a>');h.click(function(){tagBox.parseTags(this)});j.prepend(" ").prepend(h)}e.append(j)})},flushTags:function(g,c,h){c=c||false;var d=a(".the-tags",g),j=a("input.newtag",g),b=mla_single_edit_vars.comma,e,i;i=c?a(c).text():j.val();tagsval=d.val();e=tagsval?tagsval+b+i:i;e=this.clean(e);e=array_unique_noempty(e.split(b)).join(b);d.val(e);this.quickClicks(g);if(!c){j.val("")}if("undefined"==typeof(h)){j.focus()}return false},get:function(c){var b=c.substr(c.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:b},function(e,d){if(0==e||"success"!=d){e=wpAjax.broken}e=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+e+"</p>");a("a",e).click(function(){tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)});a("input.tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))});a("div.taghint",c).click(function(){a(this).css("visibility","hidden").parent().siblings(".newtag").focus()});a("input.newtag",c).blur(function(){if(this.value==""){a(this).parent().siblings(".taghint").css("visibility","")}}).focus(function(){a(this).parent().siblings(".taghint").css("visibility","hidden")}).keyup(function(d){if(13==d.which){tagBox.flushTags(a(this).closest(".tagsdiv"));return false}}).keypress(function(d){if(13==d.which){d.preventDefault();return false}}).each(function(){var d=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+d,{delay:500,minchars:2,multiple:true,multipleSep:mla_single_edit_vars.comma+" "})});a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});a("a.tagcloud-link").click(function(){tagBox.get(a(this).attr("id"));a(this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false})}}})(jQuery);jQuery(document).ready(function(a){a("#side-info-column").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}});a(".categorydiv").each(function(){var g=a(this).attr("id"),c=false,f,h,e,b,d;e=g.split("-");e.shift();b=e.join("-");d=b+"_tab";
|
1 |
+
var tagBox;function array_unique_noempty(b){var c=[];jQuery.each(b,function(a,d){d=jQuery.trim(d);if(d&&jQuery.inArray(d,c)==-1){c.push(d)}});return c}(function(a){tagBox={clean:function(c){var b=mla_single_edit_vars.comma;if(","!==b){c=c.replace(new RegExp(b,"g"),",")}c=c.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"");if(","!==b){c=c.replace(/,/g,b)}return c},parseTags:function(f){var i=f.id,c=i.split("-check-num-")[1],e=a(f).closest(".tagsdiv"),h=e.find(".the-tags"),b=mla_single_edit_vars.comma,d=h.val().split(b),g=[];delete d[c];a.each(d,function(j,k){k=a.trim(k);if(k){g.push(k)}});h.val(this.clean(g.join(b)));this.quickClicks(e);return false},quickClicks:function(d){var g=a(".the-tags",d),e=a(".tagchecklist",d),f=a(d).attr("id"),b,c;if(!g.length){return}c=g.prop("disabled");b=g.val().split(mla_single_edit_vars.comma);e.empty();a.each(b,function(i,k){var j,h;k=a.trim(k);if(!k){return}j=a("<span />").text(k);if(!c){h=a('<a id="'+f+"-check-num-"+i+'" class="ntdelbutton">X</a>');h.click(function(){tagBox.parseTags(this)});j.prepend(" ").prepend(h)}e.append(j)})},flushTags:function(g,c,h){c=c||false;var d=a(".the-tags",g),j=a("input.newtag",g),b=mla_single_edit_vars.comma,e,i;i=c?a(c).text():j.val();tagsval=d.val();e=tagsval?tagsval+b+i:i;e=this.clean(e);e=array_unique_noempty(e.split(b)).join(b);d.val(e);this.quickClicks(g);if(!c){j.val("")}if("undefined"==typeof(h)){j.focus()}return false},get:function(c){var b=c.substr(c.indexOf("-")+1);a.post(ajaxurl,{action:"get-tagcloud",tax:b},function(e,d){if(0==e||"success"!=d){e=wpAjax.broken}e=a('<p id="tagcloud-'+b+'" class="the-tagcloud">'+e+"</p>");a("a",e).click(function(){tagBox.flushTags(a(this).closest(".inside").children(".tagsdiv"),this);return false});a("#"+c).after(e)})},init:function(){var b=this,c=a("div.ajaxtag");a(".tagsdiv").each(function(){tagBox.quickClicks(this)});a("input.tagadd",c).click(function(){b.flushTags(a(this).closest(".tagsdiv"))});a("div.taghint",c).click(function(){a(this).css("visibility","hidden").parent().siblings(".newtag").focus()});a("input.newtag",c).blur(function(){if(this.value==""){a(this).parent().siblings(".taghint").css("visibility","")}}).focus(function(){a(this).parent().siblings(".taghint").css("visibility","hidden")}).keyup(function(d){if(13==d.which){tagBox.flushTags(a(this).closest(".tagsdiv"));return false}}).keypress(function(d){if(13==d.which){d.preventDefault();return false}}).each(function(){var d=a(this).closest("div.tagsdiv").attr("id");a(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+d,{delay:500,minchars:2,multiple:true,multipleSep:mla_single_edit_vars.comma+" "})});a("#post").submit(function(){a("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});a("a.tagcloud-link").click(function(){tagBox.get(a(this).attr("id"));a(this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});return false})}}})(jQuery);jQuery(document).ready(function(a){a("#side-info-column").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}});a(".categorydiv").each(function(){var g=a(this).attr("id"),c=false,f,h,e,b,d;e=g.split("-");e.shift();b=e.join("-");d=b+"_tab";a("a","#"+b+"-tabs").click(function(){var i=a(this).attr("href");a(this).parent().addClass("tabs").siblings("li").removeClass("tabs");a("#"+b+"-tabs").siblings(".tabs-panel").hide();a(i).show();if("#"+b+"-all"==i){deleteUserSetting(d)}else{setUserSetting(d,"pop")}return false});if(getUserSetting(d)){a('a[href="#'+b+'-pop"]',"#"+b+"-tabs").click()}a("#new"+b).one("focus",function(){a(this).val("").removeClass("form-input-tip")});a("#"+b+"-add-submit").click(function(){a("#new"+b).focus()});f=function(){if(c){return}c=true;var i=jQuery(this),k=i.is(":checked"),j=i.val().toString();a("#in-"+b+"-"+j+", #in-"+b+"-category-"+j).prop("checked",k);c=false};catAddBefore=function(i){if(!a("#new"+b).val()){return false}i.data+="&"+a(":checked","#"+b+"checklist").serialize();a("#"+b+"-add-submit").prop("disabled",true);return i};h=function(l,k){var j,i=a("#new"+b+"_parent");a("#"+b+"-add-submit").prop("disabled",false);if("undefined"!=k.parsed.responses[0]&&(j=k.parsed.responses[0].supplemental.newcat_parent)){i.before(j);i.remove()}};a("#"+b+"checklist").wpList({alt:"",response:b+"-ajax-response",addBefore:catAddBefore,addAfter:h});a("#"+b+"-add-toggle").click(function(){a("#"+b+"-adder").toggleClass("wp-hidden-children");a('a[href="#'+b+'-all"]',"#"+b+"-tabs").click();a("#new"+b).focus();return false});a("#"+b+"checklist li.popular-category :checkbox, #"+b+"checklist-pop :checkbox").live("click",function(){var i=a(this),k=i.is(":checked"),j=i.val();if(j&&i.parents("#taxonomy-"+b).length){a("#in-"+b+"-"+j+", #in-popular-"+b+"-"+j).prop("checked",k)}})})});
|
phpDocs/classes/MLA.html
CHANGED
@@ -58,7 +58,7 @@
|
|
58 |
<li class="method public "><a href="#mla_admin_enqueue_scripts_action" title="mla_admin_enqueue_scripts_action :: Load the plugin's Style Sheet and Javascript files"><span class="description">Load the plugin's Style Sheet and Javascript files</span><pre>mla_admin_enqueue_scripts_action()</pre></a></li>
|
59 |
<li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Load the plugin's Ajax handler"><span class="description">Load the plugin's Ajax handler</span><pre>mla_admin_init_action()</pre></a></li>
|
60 |
<li class="method public "><a href="#mla_admin_menu_action" title="mla_admin_menu_action :: Add the submenu pages"><span class="description">Add the submenu pages</span><pre>mla_admin_menu_action()</pre></a></li>
|
61 |
-
<li class="method public "><a href="#
|
62 |
<li class="method public "><a href="#mla_inline_edit_action" title="mla_inline_edit_action :: Ajax handler for inline editing (quick and bulk edit)"><span class="description">Ajax handler for inline editing (quick and bulk edit)</span><pre>mla_inline_edit_action()</pre></a></li>
|
63 |
<li class="method public "><a href="#mla_modify_parent_menu" title="mla_modify_parent_menu :: Cleanup menus for Edit Tags/Categories page"><span class="description">Cleanup menus for Edit Tags/Categories page</span><pre>mla_modify_parent_menu()</pre></a></li>
|
64 |
<li class="method public "><a href="#mla_render_admin_page" title='mla_render_admin_page :: Render the "Assistant" subpage in the Media section, using the list_table package'><span class="description">Render the "Assistant" subpage in the Media section, using the list_table package</span><pre>mla_render_admin_page()</pre></a></li>
|
@@ -66,9 +66,9 @@
|
|
66 |
<li class="method public "><a href="#mla_set_screen_option_filter" title='mla_set_screen_option_filter :: Save the "Entries per page" option set by this user'><span class="description">Save the "Entries per page" option set by this user</span><pre>mla_set_screen_option_filter()</pre></a></li>
|
67 |
<li class="nav-header private">» Private</li>
|
68 |
<li class="method private "><a href="#_authors_dropdown" title="_authors_dropdown :: Get the edit Authors dropdown box, if user has suitable permissions"><span class="description">Get the edit Authors dropdown box, if user has suitable permissions</span><pre>_authors_dropdown()</pre></a></li>
|
69 |
-
<li class="method private "><a href="#_build_inline_edit_form" title="_build_inline_edit_form :: Build the hidden row templates for inline editing (quick and bulk edit)
|
70 |
<li class="method private "><a href="#_current_bulk_action" title="_current_bulk_action :: Get the current action selected from the bulk actions dropdown"><span class="description">Get the current action selected from the bulk actions dropdown</span><pre>_current_bulk_action()</pre></a></li>
|
71 |
-
<li class="method private "><a href="#_delete_single_item" title="_delete_single_item :: Delete a single item permanently
|
72 |
<li class="method private "><a href="#_display_single_item" title="_display_single_item :: Display a single item sub page; prepare the form to
|
73 |
change the meta data for a single attachment."><span class="description">Display a single item sub page; prepare the form to
|
74 |
change the meta data for a single attachment.</span><pre>_display_single_item()</pre></a></li>
|
@@ -130,7 +130,7 @@ of images and files held in the WordPress Media Library.</p>
|
|
130 |
<i class="icon-custom icon-method"></i> Methods</h3>
|
131 |
<a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
|
132 |
<h2>Initialization function, similar to __construct()</h2>
|
133 |
-
<pre>initialize() </pre>
|
134 |
<div class="labels"></div>
|
135 |
<div class="row collapse"><div class="detail-description">
|
136 |
<p class="long_description"></p>
|
@@ -142,7 +142,7 @@ of images and files held in the WordPress Media Library.</p>
|
|
142 |
</div>
|
143 |
<a name="mla_add_help_tab" id="mla_add_help_tab"></a><div class="element clickable method public mla_add_help_tab" data-toggle="collapse" data-target=".mla_add_help_tab .collapse">
|
144 |
<h2>Add contextual help tabs to all the MLA pages</h2>
|
145 |
-
<pre>mla_add_help_tab() </pre>
|
146 |
<div class="labels"></div>
|
147 |
<div class="row collapse"><div class="detail-description">
|
148 |
<p class="long_description"></p>
|
@@ -154,7 +154,7 @@ of images and files held in the WordPress Media Library.</p>
|
|
154 |
</div>
|
155 |
<a name="mla_add_menu_options" id="mla_add_menu_options"></a><div class="element clickable method public mla_add_menu_options" data-toggle="collapse" data-target=".mla_add_menu_options .collapse">
|
156 |
<h2>Add the "XX Entries per page" filter to the Screen Options tab</h2>
|
157 |
-
<pre>mla_add_menu_options() </pre>
|
158 |
<div class="labels"></div>
|
159 |
<div class="row collapse"><div class="detail-description">
|
160 |
<p class="long_description"></p>
|
@@ -166,7 +166,7 @@ of images and files held in the WordPress Media Library.</p>
|
|
166 |
</div>
|
167 |
<a name="mla_admin_enqueue_scripts_action" id="mla_admin_enqueue_scripts_action"></a><div class="element clickable method public mla_admin_enqueue_scripts_action" data-toggle="collapse" data-target=".mla_admin_enqueue_scripts_action .collapse">
|
168 |
<h2>Load the plugin's Style Sheet and Javascript files</h2>
|
169 |
-
<pre>mla_admin_enqueue_scripts_action(string $page_hook) :
|
170 |
<div class="labels"></div>
|
171 |
<div class="row collapse"><div class="detail-description">
|
172 |
<p class="long_description"></p>
|
@@ -178,13 +178,11 @@ of images and files held in the WordPress Media Library.</p>
|
|
178 |
<div class="subelement argument">
|
179 |
<h4>$page_hook</h4>
|
180 |
<code>string</code><p>Name of the page being loaded</p></div>
|
181 |
-
<h3>Returns</h3>
|
182 |
-
<div class="subelement response"><code>\nothing</code></div>
|
183 |
</div></div>
|
184 |
</div>
|
185 |
<a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
|
186 |
<h2>Load the plugin's Ajax handler</h2>
|
187 |
-
<pre>mla_admin_init_action() :
|
188 |
<div class="labels"></div>
|
189 |
<div class="row collapse"><div class="detail-description">
|
190 |
<p class="long_description"></p>
|
@@ -192,13 +190,11 @@ of images and files held in the WordPress Media Library.</p>
|
|
192 |
<th>since</th>
|
193 |
<td>0.20</td>
|
194 |
</tr></table>
|
195 |
-
<h3>Returns</h3>
|
196 |
-
<div class="subelement response"><code>\nothing</code></div>
|
197 |
</div></div>
|
198 |
</div>
|
199 |
<a name="mla_admin_menu_action" id="mla_admin_menu_action"></a><div class="element clickable method public mla_admin_menu_action" data-toggle="collapse" data-target=".mla_admin_menu_action .collapse">
|
200 |
<h2>Add the submenu pages</h2>
|
201 |
-
<pre>mla_admin_menu_action() </pre>
|
202 |
<div class="labels"></div>
|
203 |
<div class="row collapse"><div class="detail-description">
|
204 |
<p class="long_description"><p>Add a submenu page in the "Media" section,
|
@@ -212,9 +208,9 @@ add settings link in the Plugins section entry for MLA.</p></p>
|
|
212 |
</tr></table>
|
213 |
</div></div>
|
214 |
</div>
|
215 |
-
<a name="
|
216 |
<h2>Redirect to the Edit Tags/Categories page</h2>
|
217 |
-
<pre>
|
218 |
<div class="labels"></div>
|
219 |
<div class="row collapse"><div class="detail-description">
|
220 |
<p class="long_description"><p>The custom taxonomy add/edit submenu entries go to "upload.php" by default.
|
@@ -227,7 +223,7 @@ This filter is the only way to redirect them to the correct WordPress page.</p><
|
|
227 |
</div>
|
228 |
<a name="mla_inline_edit_action" id="mla_inline_edit_action"></a><div class="element clickable method public mla_inline_edit_action" data-toggle="collapse" data-target=".mla_inline_edit_action .collapse">
|
229 |
<h2>Ajax handler for inline editing (quick and bulk edit)</h2>
|
230 |
-
<pre>mla_inline_edit_action() :
|
231 |
<div class="labels"></div>
|
232 |
<div class="row collapse"><div class="detail-description">
|
233 |
<p class="long_description"><p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p></p>
|
@@ -235,9 +231,6 @@ This filter is the only way to redirect them to the correct WordPress page.</p><
|
|
235 |
<th>since</th>
|
236 |
<td>0.20</td>
|
237 |
</tr></table>
|
238 |
-
<h3>Returns</h3>
|
239 |
-
<div class="subelement response">
|
240 |
-
<code>string</code>echo HTML <tr> markup for updated row or error message, then die()</div>
|
241 |
</div></div>
|
242 |
</div>
|
243 |
<a name="mla_modify_parent_menu" id="mla_modify_parent_menu"></a><div class="element clickable method public mla_modify_parent_menu" data-toggle="collapse" data-target=".mla_modify_parent_menu .collapse">
|
@@ -264,7 +257,7 @@ to the right WordPress page for editing/adding taxonomy terms.</p></p>
|
|
264 |
</div>
|
265 |
<a name="mla_render_admin_page" id="mla_render_admin_page"></a><div class="element clickable method public mla_render_admin_page" data-toggle="collapse" data-target=".mla_render_admin_page .collapse">
|
266 |
<h2>Render the "Assistant" subpage in the Media section, using the list_table package</h2>
|
267 |
-
<pre>mla_render_admin_page() </pre>
|
268 |
<div class="labels"></div>
|
269 |
<div class="row collapse"><div class="detail-description">
|
270 |
<p class="long_description"></p>
|
@@ -299,7 +292,7 @@ to the right WordPress page for editing/adding taxonomy terms.</p></p>
|
|
299 |
</div>
|
300 |
<a name="mla_set_screen_option_filter" id="mla_set_screen_option_filter"></a><div class="element clickable method public mla_set_screen_option_filter" data-toggle="collapse" data-target=".mla_set_screen_option_filter .collapse">
|
301 |
<h2>Save the "Entries per page" option set by this user</h2>
|
302 |
-
<pre>mla_set_screen_option_filter(boolean $status, string $option, string $value) : string</pre>
|
303 |
<div class="labels"></div>
|
304 |
<div class="row collapse"><div class="detail-description">
|
305 |
<p class="long_description"></p>
|
@@ -320,7 +313,7 @@ to the right WordPress page for editing/adding taxonomy terms.</p></p>
|
|
320 |
<code>string</code><p>New value of the option</p></div>
|
321 |
<h3>Returns</h3>
|
322 |
<div class="subelement response">
|
323 |
-
<code>string</code>New value if this is our option, otherwise nothing</div>
|
324 |
</div></div>
|
325 |
</div>
|
326 |
<a name="_authors_dropdown" id="_authors_dropdown"></a><div class="element clickable method private _authors_dropdown" data-toggle="collapse" data-target="._authors_dropdown .collapse">
|
@@ -349,7 +342,7 @@ to the right WordPress page for editing/adding taxonomy terms.</p></p>
|
|
349 |
</div></div>
|
350 |
</div>
|
351 |
<a name="_build_inline_edit_form" id="_build_inline_edit_form"></a><div class="element clickable method private _build_inline_edit_form" data-toggle="collapse" data-target="._build_inline_edit_form .collapse">
|
352 |
-
<h2>Build the hidden row templates for inline editing (quick and bulk edit)
|
353 |
<pre>_build_inline_edit_form(object $MLAListTable) : string</pre>
|
354 |
<div class="labels"></div>
|
355 |
<div class="row collapse"><div class="detail-description">
|
@@ -383,7 +376,7 @@ to the right WordPress page for editing/adding taxonomy terms.</p></p>
|
|
383 |
</div></div>
|
384 |
</div>
|
385 |
<a name="_delete_single_item" id="_delete_single_item"></a><div class="element clickable method private _delete_single_item" data-toggle="collapse" data-target="._delete_single_item .collapse">
|
386 |
-
<h2>Delete a single item permanently
|
387 |
<pre>_delete_single_item(array $post_id) : array</pre>
|
388 |
<div class="labels"></div>
|
389 |
<div class="row collapse"><div class="detail-description">
|
@@ -395,7 +388,7 @@ to the right WordPress page for editing/adding taxonomy terms.</p></p>
|
|
395 |
<h3>Parameters</h3>
|
396 |
<div class="subelement argument">
|
397 |
<h4>$post_id</h4>
|
398 |
-
<code>array</code><p>The form POST data
|
399 |
<h3>Returns</h3>
|
400 |
<div class="subelement response">
|
401 |
<code>array</code>success/failure message and NULL content</div>
|
@@ -418,7 +411,7 @@ change the meta data for a single attachment.</h2>
|
|
418 |
<code>int</code><p>The WordPress Post ID of the attachment item</p></div>
|
419 |
<h3>Returns</h3>
|
420 |
<div class="subelement response">
|
421 |
-
<code>array</code>message and/or HTML content
|
422 |
</div></div>
|
423 |
</div>
|
424 |
<a name="_restore_single_item" id="_restore_single_item"></a><div class="element clickable method private _restore_single_item" data-toggle="collapse" data-target="._restore_single_item .collapse">
|
@@ -701,7 +694,7 @@ for a single attachment.</h2>
|
|
701 |
<div class="row"><footer class="span12">
|
702 |
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>
|
703 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
704 |
-
generated on 2012-09-
|
705 |
</div>
|
706 |
</body>
|
707 |
</html>
|
58 |
<li class="method public "><a href="#mla_admin_enqueue_scripts_action" title="mla_admin_enqueue_scripts_action :: Load the plugin's Style Sheet and Javascript files"><span class="description">Load the plugin's Style Sheet and Javascript files</span><pre>mla_admin_enqueue_scripts_action()</pre></a></li>
|
59 |
<li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Load the plugin's Ajax handler"><span class="description">Load the plugin's Ajax handler</span><pre>mla_admin_init_action()</pre></a></li>
|
60 |
<li class="method public "><a href="#mla_admin_menu_action" title="mla_admin_menu_action :: Add the submenu pages"><span class="description">Add the submenu pages</span><pre>mla_admin_menu_action()</pre></a></li>
|
61 |
+
<li class="method public "><a href="#mla_edit_tax_redirect" title="mla_edit_tax_redirect :: Redirect to the Edit Tags/Categories page"><span class="description">Redirect to the Edit Tags/Categories page</span><pre>mla_edit_tax_redirect()</pre></a></li>
|
62 |
<li class="method public "><a href="#mla_inline_edit_action" title="mla_inline_edit_action :: Ajax handler for inline editing (quick and bulk edit)"><span class="description">Ajax handler for inline editing (quick and bulk edit)</span><pre>mla_inline_edit_action()</pre></a></li>
|
63 |
<li class="method public "><a href="#mla_modify_parent_menu" title="mla_modify_parent_menu :: Cleanup menus for Edit Tags/Categories page"><span class="description">Cleanup menus for Edit Tags/Categories page</span><pre>mla_modify_parent_menu()</pre></a></li>
|
64 |
<li class="method public "><a href="#mla_render_admin_page" title='mla_render_admin_page :: Render the "Assistant" subpage in the Media section, using the list_table package'><span class="description">Render the "Assistant" subpage in the Media section, using the list_table package</span><pre>mla_render_admin_page()</pre></a></li>
|
66 |
<li class="method public "><a href="#mla_set_screen_option_filter" title='mla_set_screen_option_filter :: Save the "Entries per page" option set by this user'><span class="description">Save the "Entries per page" option set by this user</span><pre>mla_set_screen_option_filter()</pre></a></li>
|
67 |
<li class="nav-header private">» Private</li>
|
68 |
<li class="method private "><a href="#_authors_dropdown" title="_authors_dropdown :: Get the edit Authors dropdown box, if user has suitable permissions"><span class="description">Get the edit Authors dropdown box, if user has suitable permissions</span><pre>_authors_dropdown()</pre></a></li>
|
69 |
+
<li class="method private "><a href="#_build_inline_edit_form" title="_build_inline_edit_form :: Build the hidden row templates for inline editing (quick and bulk edit)"><span class="description">Build the hidden row templates for inline editing (quick and bulk edit)</span><pre>_build_inline_edit_form()</pre></a></li>
|
70 |
<li class="method private "><a href="#_current_bulk_action" title="_current_bulk_action :: Get the current action selected from the bulk actions dropdown"><span class="description">Get the current action selected from the bulk actions dropdown</span><pre>_current_bulk_action()</pre></a></li>
|
71 |
+
<li class="method private "><a href="#_delete_single_item" title="_delete_single_item :: Delete a single item permanently"><span class="description">Delete a single item permanently</span><pre>_delete_single_item()</pre></a></li>
|
72 |
<li class="method private "><a href="#_display_single_item" title="_display_single_item :: Display a single item sub page; prepare the form to
|
73 |
change the meta data for a single attachment."><span class="description">Display a single item sub page; prepare the form to
|
74 |
change the meta data for a single attachment.</span><pre>_display_single_item()</pre></a></li>
|
130 |
<i class="icon-custom icon-method"></i> Methods</h3>
|
131 |
<a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
|
132 |
<h2>Initialization function, similar to __construct()</h2>
|
133 |
+
<pre>initialize() : void</pre>
|
134 |
<div class="labels"></div>
|
135 |
<div class="row collapse"><div class="detail-description">
|
136 |
<p class="long_description"></p>
|
142 |
</div>
|
143 |
<a name="mla_add_help_tab" id="mla_add_help_tab"></a><div class="element clickable method public mla_add_help_tab" data-toggle="collapse" data-target=".mla_add_help_tab .collapse">
|
144 |
<h2>Add contextual help tabs to all the MLA pages</h2>
|
145 |
+
<pre>mla_add_help_tab() : void</pre>
|
146 |
<div class="labels"></div>
|
147 |
<div class="row collapse"><div class="detail-description">
|
148 |
<p class="long_description"></p>
|
154 |
</div>
|
155 |
<a name="mla_add_menu_options" id="mla_add_menu_options"></a><div class="element clickable method public mla_add_menu_options" data-toggle="collapse" data-target=".mla_add_menu_options .collapse">
|
156 |
<h2>Add the "XX Entries per page" filter to the Screen Options tab</h2>
|
157 |
+
<pre>mla_add_menu_options() : void</pre>
|
158 |
<div class="labels"></div>
|
159 |
<div class="row collapse"><div class="detail-description">
|
160 |
<p class="long_description"></p>
|
166 |
</div>
|
167 |
<a name="mla_admin_enqueue_scripts_action" id="mla_admin_enqueue_scripts_action"></a><div class="element clickable method public mla_admin_enqueue_scripts_action" data-toggle="collapse" data-target=".mla_admin_enqueue_scripts_action .collapse">
|
168 |
<h2>Load the plugin's Style Sheet and Javascript files</h2>
|
169 |
+
<pre>mla_admin_enqueue_scripts_action(string $page_hook) : void</pre>
|
170 |
<div class="labels"></div>
|
171 |
<div class="row collapse"><div class="detail-description">
|
172 |
<p class="long_description"></p>
|
178 |
<div class="subelement argument">
|
179 |
<h4>$page_hook</h4>
|
180 |
<code>string</code><p>Name of the page being loaded</p></div>
|
|
|
|
|
181 |
</div></div>
|
182 |
</div>
|
183 |
<a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
|
184 |
<h2>Load the plugin's Ajax handler</h2>
|
185 |
+
<pre>mla_admin_init_action() : void</pre>
|
186 |
<div class="labels"></div>
|
187 |
<div class="row collapse"><div class="detail-description">
|
188 |
<p class="long_description"></p>
|
190 |
<th>since</th>
|
191 |
<td>0.20</td>
|
192 |
</tr></table>
|
|
|
|
|
193 |
</div></div>
|
194 |
</div>
|
195 |
<a name="mla_admin_menu_action" id="mla_admin_menu_action"></a><div class="element clickable method public mla_admin_menu_action" data-toggle="collapse" data-target=".mla_admin_menu_action .collapse">
|
196 |
<h2>Add the submenu pages</h2>
|
197 |
+
<pre>mla_admin_menu_action() : void</pre>
|
198 |
<div class="labels"></div>
|
199 |
<div class="row collapse"><div class="detail-description">
|
200 |
<p class="long_description"><p>Add a submenu page in the "Media" section,
|
208 |
</tr></table>
|
209 |
</div></div>
|
210 |
</div>
|
211 |
+
<a name="mla_edit_tax_redirect" id="mla_edit_tax_redirect"></a><div class="element clickable method public mla_edit_tax_redirect" data-toggle="collapse" data-target=".mla_edit_tax_redirect .collapse">
|
212 |
<h2>Redirect to the Edit Tags/Categories page</h2>
|
213 |
+
<pre>mla_edit_tax_redirect() : void</pre>
|
214 |
<div class="labels"></div>
|
215 |
<div class="row collapse"><div class="detail-description">
|
216 |
<p class="long_description"><p>The custom taxonomy add/edit submenu entries go to "upload.php" by default.
|
223 |
</div>
|
224 |
<a name="mla_inline_edit_action" id="mla_inline_edit_action"></a><div class="element clickable method public mla_inline_edit_action" data-toggle="collapse" data-target=".mla_inline_edit_action .collapse">
|
225 |
<h2>Ajax handler for inline editing (quick and bulk edit)</h2>
|
226 |
+
<pre>mla_inline_edit_action() : void</pre>
|
227 |
<div class="labels"></div>
|
228 |
<div class="row collapse"><div class="detail-description">
|
229 |
<p class="long_description"><p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p></p>
|
231 |
<th>since</th>
|
232 |
<td>0.20</td>
|
233 |
</tr></table>
|
|
|
|
|
|
|
234 |
</div></div>
|
235 |
</div>
|
236 |
<a name="mla_modify_parent_menu" id="mla_modify_parent_menu"></a><div class="element clickable method public mla_modify_parent_menu" data-toggle="collapse" data-target=".mla_modify_parent_menu .collapse">
|
257 |
</div>
|
258 |
<a name="mla_render_admin_page" id="mla_render_admin_page"></a><div class="element clickable method public mla_render_admin_page" data-toggle="collapse" data-target=".mla_render_admin_page .collapse">
|
259 |
<h2>Render the "Assistant" subpage in the Media section, using the list_table package</h2>
|
260 |
+
<pre>mla_render_admin_page() : void</pre>
|
261 |
<div class="labels"></div>
|
262 |
<div class="row collapse"><div class="detail-description">
|
263 |
<p class="long_description"></p>
|
292 |
</div>
|
293 |
<a name="mla_set_screen_option_filter" id="mla_set_screen_option_filter"></a><div class="element clickable method public mla_set_screen_option_filter" data-toggle="collapse" data-target=".mla_set_screen_option_filter .collapse">
|
294 |
<h2>Save the "Entries per page" option set by this user</h2>
|
295 |
+
<pre>mla_set_screen_option_filter(boolean $status, string $option, string $value) : string | void</pre>
|
296 |
<div class="labels"></div>
|
297 |
<div class="row collapse"><div class="detail-description">
|
298 |
<p class="long_description"></p>
|
313 |
<code>string</code><p>New value of the option</p></div>
|
314 |
<h3>Returns</h3>
|
315 |
<div class="subelement response">
|
316 |
+
<code>string</code><code>void</code>New value if this is our option, otherwise nothing</div>
|
317 |
</div></div>
|
318 |
</div>
|
319 |
<a name="_authors_dropdown" id="_authors_dropdown"></a><div class="element clickable method private _authors_dropdown" data-toggle="collapse" data-target="._authors_dropdown .collapse">
|
342 |
</div></div>
|
343 |
</div>
|
344 |
<a name="_build_inline_edit_form" id="_build_inline_edit_form"></a><div class="element clickable method private _build_inline_edit_form" data-toggle="collapse" data-target="._build_inline_edit_form .collapse">
|
345 |
+
<h2>Build the hidden row templates for inline editing (quick and bulk edit)</h2>
|
346 |
<pre>_build_inline_edit_form(object $MLAListTable) : string</pre>
|
347 |
<div class="labels"></div>
|
348 |
<div class="row collapse"><div class="detail-description">
|
376 |
</div></div>
|
377 |
</div>
|
378 |
<a name="_delete_single_item" id="_delete_single_item"></a><div class="element clickable method private _delete_single_item" data-toggle="collapse" data-target="._delete_single_item .collapse">
|
379 |
+
<h2>Delete a single item permanently</h2>
|
380 |
<pre>_delete_single_item(array $post_id) : array</pre>
|
381 |
<div class="labels"></div>
|
382 |
<div class="row collapse"><div class="detail-description">
|
388 |
<h3>Parameters</h3>
|
389 |
<div class="subelement argument">
|
390 |
<h4>$post_id</h4>
|
391 |
+
<code>array</code><p>The form POST data</p></div>
|
392 |
<h3>Returns</h3>
|
393 |
<div class="subelement response">
|
394 |
<code>array</code>success/failure message and NULL content</div>
|
411 |
<code>int</code><p>The WordPress Post ID of the attachment item</p></div>
|
412 |
<h3>Returns</h3>
|
413 |
<div class="subelement response">
|
414 |
+
<code>array</code>message and/or HTML content</div>
|
415 |
</div></div>
|
416 |
</div>
|
417 |
<a name="_restore_single_item" id="_restore_single_item"></a><div class="element clickable method private _restore_single_item" data-toggle="collapse" data-target="._restore_single_item .collapse">
|
694 |
<div class="row"><footer class="span12">
|
695 |
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>
|
696 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
697 |
+
generated on 2012-09-19T20:36:48-07:00.<br></footer></div>
|
698 |
</div>
|
699 |
</body>
|
700 |
</html>
|
phpDocs/classes/MLAData.html
CHANGED
@@ -53,16 +53,24 @@
|
|
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_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>
|
57 |
<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>
|
58 |
<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>
|
59 |
<li class="method public "><a href="#mla_parse_template" title="mla_parse_template :: Expand a template, replacing place holders with their values"><span class="description">Expand a template, replacing place holders with their values</span><pre>mla_parse_template()</pre></a></li>
|
60 |
-
<li class="method public "><a href="#mla_prepare_list_table_query" title="mla_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>mla_prepare_list_table_query()</pre></a></li>
|
61 |
<li class="method public "><a href="#mla_query_list_table_items" title="mla_query_list_table_items :: Retrieve attachment objects for list table display"><span class="description">Retrieve attachment objects for list table display</span><pre>mla_query_list_table_items()</pre></a></li>
|
62 |
-
<li class="method public "><a href="#
|
|
|
|
|
63 |
<li class="nav-header private">» Private</li>
|
|
|
64 |
<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>
|
65 |
<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>
|
|
|
|
|
|
|
|
|
|
|
66 |
</ul>
|
67 |
</div>
|
68 |
<div class="span8">
|
@@ -76,7 +84,7 @@
|
|
76 |
</li>
|
77 |
</ul>
|
78 |
<div href="../classes/MLAData.html" class="element class">
|
79 |
-
<p class="short_description">Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs
|
80 |
<div class="details">
|
81 |
<p class="long_description"><p>The _template functions are inspired by the book "WordPress 3 Plugin Development Essentials."
|
82 |
Templates separate HTML markup from PHP code for easier maintenance and localization.</p></p>
|
@@ -104,6 +112,26 @@ Templates separate HTML markup from PHP code for easier maintenance and localiza
|
|
104 |
</tr></table>
|
105 |
</div></div>
|
106 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
<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">
|
108 |
<h2>Find Featured Image and inserted image/link references to an attachment</h2>
|
109 |
<pre>mla_fetch_attachment_references(int $ID, int $parent) : array</pre>
|
@@ -142,10 +170,10 @@ the posts and postmeta tables, and all references to the attachment.</p></p>
|
|
142 |
<h3>Parameters</h3>
|
143 |
<div class="subelement argument">
|
144 |
<h4>$post_id</h4>
|
145 |
-
<code>int</code><p>The ID of the attachment post
|
146 |
<h3>Returns</h3>
|
147 |
<div class="subelement response">
|
148 |
-
<code>NULL</code><code>array</code>NULL on failure else associative array
|
149 |
</div></div>
|
150 |
</div>
|
151 |
<a name="mla_load_template" id="mla_load_template"></a><div class="element clickable method public mla_load_template" data-toggle="collapse" data-target=".mla_load_template .collapse">
|
@@ -186,21 +214,20 @@ where "key" becomes the key part of the array.</p></p>
|
|
186 |
</div>
|
187 |
<div class="subelement argument">
|
188 |
<h4>$hash</h4>
|
189 |
-
<code>array</code><p>An associative array containing keys and values e.g. array('key' => 'value')
|
190 |
</div>
|
191 |
<h3>Returns</h3>
|
192 |
<div class="subelement response">
|
193 |
-
<code>string</code>Placeholders corresponding to the keys of the hash will be replaced with their values
|
194 |
</div></div>
|
195 |
</div>
|
196 |
-
<a name="
|
197 |
-
<h2>
|
198 |
-
<pre>
|
199 |
<div class="labels"></div>
|
200 |
<div class="row collapse"><div class="detail-description">
|
201 |
-
<p class="long_description"><p>
|
202 |
-
Modeled after wp_edit_attachments_query in wp-admin/post.php
|
203 |
-
NOTE: The caller must remove the 'posts_where' filter, if required.</p></p>
|
204 |
<table class="table table-bordered"><tr>
|
205 |
<th>since</th>
|
206 |
<td>0.1</td>
|
@@ -210,64 +237,96 @@ NOTE: The caller must remove the 'posts_where' filter, if required.</p></p>
|
|
210 |
<h4>$request</h4>
|
211 |
<code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
|
212 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
<h3>Returns</h3>
|
214 |
<div class="subelement response">
|
215 |
-
<code>array</code>
|
216 |
</div></div>
|
217 |
</div>
|
218 |
-
<a name="
|
219 |
-
<h2>
|
220 |
-
<pre>
|
221 |
<div class="labels"></div>
|
222 |
<div class="row collapse"><div class="detail-description">
|
223 |
-
<p class="long_description"><p>
|
224 |
-
Modeled after wp_edit_attachments_query in wp-admin/post.php</p></p>
|
225 |
<table class="table table-bordered"><tr>
|
226 |
<th>since</th>
|
227 |
-
<td>0.
|
228 |
</tr></table>
|
229 |
<h3>Parameters</h3>
|
230 |
<div class="subelement argument">
|
231 |
-
<h4>$
|
232 |
-
<code>
|
|
|
|
|
|
|
|
|
233 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
<div class="subelement argument">
|
235 |
-
<h4>$
|
236 |
-
<code>string</code><p>
|
237 |
-
<div class="subelement argument">
|
238 |
-
<h4>$order</h4>
|
239 |
-
<code>string</code><p>ASC or DESC</p></div>
|
240 |
-
<div class="subelement argument">
|
241 |
-
<h4>$offset</h4>
|
242 |
-
<code>int</code><p>number of rows to skip over to reach desired page</p></div>
|
243 |
-
<div class="subelement argument">
|
244 |
-
<h4>$count</h4>
|
245 |
-
<code>int</code><p>number of rows on each page</p></div>
|
246 |
<h3>Returns</h3>
|
247 |
<div class="subelement response">
|
248 |
-
<code>
|
249 |
</div></div>
|
250 |
</div>
|
251 |
-
<a name="
|
252 |
<h2>Adds a WHERE clause for detached items</h2>
|
253 |
-
<pre>
|
254 |
<div class="labels"></div>
|
255 |
<div class="row collapse"><div class="detail-description">
|
256 |
-
<p class="long_description"><p>Modeled after _edit_attachments_query_helper in wp-admin/post.php
|
257 |
-
Defined as public
|
258 |
<table class="table table-bordered"><tr>
|
259 |
<th>since</th>
|
260 |
<td>0.1</td>
|
261 |
</tr></table>
|
262 |
<h3>Parameters</h3>
|
263 |
<div class="subelement argument">
|
264 |
-
<h4>$
|
265 |
<code>string</code><p>query clause before modification</p></div>
|
266 |
<h3>Returns</h3>
|
267 |
<div class="subelement response">
|
268 |
<code>string</code>query clause after "detached" item modification</div>
|
269 |
</div></div>
|
270 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
<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">
|
272 |
<h2>Fetch and filter meta data for an attachment</h2>
|
273 |
<pre>_fetch_attachment_metadata(int $post_id) : array</pre>
|
@@ -309,6 +368,43 @@ a string containing the first array element.</p></p>
|
|
309 |
<code>array</code>Parent information; post_date, post_title and post_type</div>
|
310 |
</div></div>
|
311 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
</div>
|
313 |
</div>
|
314 |
</div>
|
@@ -316,7 +412,7 @@ a string containing the first array element.</p></p>
|
|
316 |
<div class="row"><footer class="span12">
|
317 |
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>
|
318 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
319 |
-
generated on 2012-09-
|
320 |
</div>
|
321 |
</body>
|
322 |
</html>
|
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_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>
|
60 |
<li class="method public "><a href="#mla_parse_template" title="mla_parse_template :: Expand a template, replacing place holders with their values"><span class="description">Expand a template, replacing place holders with their values</span><pre>mla_parse_template()</pre></a></li>
|
|
|
61 |
<li class="method public "><a href="#mla_query_list_table_items" title="mla_query_list_table_items :: Retrieve attachment objects for list table display"><span class="description">Retrieve attachment objects for list table display</span><pre>mla_query_list_table_items()</pre></a></li>
|
62 |
+
<li class="method public "><a href="#mla_query_posts_join_filter" title="mla_query_posts_join_filter :: Adds a JOIN clause, if required"><span class="description">Adds a JOIN clause, if required</span><pre>mla_query_posts_join_filter()</pre></a></li>
|
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_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>
|
65 |
<li class="nav-header private">» Private</li>
|
66 |
+
<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>
|
67 |
<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>
|
68 |
<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>
|
69 |
+
<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>
|
70 |
+
<li class="nav-header">
|
71 |
+
<i class="icon-custom icon-property"></i> Properties</li>
|
72 |
+
<li class="nav-header private">» Private</li>
|
73 |
+
<li class="property private "><a href="#%24query_parameters" title='$query_parameters :: WP_Query filter "parameters"'><span class="description">WP_Query filter "parameters"</span><pre>$query_parameters</pre></a></li>
|
74 |
</ul>
|
75 |
</div>
|
76 |
<div class="span8">
|
84 |
</li>
|
85 |
</ul>
|
86 |
<div href="../classes/MLAData.html" class="element class">
|
87 |
+
<p class="short_description">Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs</p>
|
88 |
<div class="details">
|
89 |
<p class="long_description"><p>The _template functions are inspired by the book "WordPress 3 Plugin Development Essentials."
|
90 |
Templates separate HTML markup from PHP code for easier maintenance and localization.</p></p>
|
112 |
</tr></table>
|
113 |
</div></div>
|
114 |
</div>
|
115 |
+
<a name="mla_count_list_table_items" id="mla_count_list_table_items"></a><div class="element clickable method public mla_count_list_table_items" data-toggle="collapse" data-target=".mla_count_list_table_items .collapse">
|
116 |
+
<h2>Get the total number of attachment posts</h2>
|
117 |
+
<pre>mla_count_list_table_items(array $request) : integer</pre>
|
118 |
+
<div class="labels"></div>
|
119 |
+
<div class="row collapse"><div class="detail-description">
|
120 |
+
<p class="long_description"></p>
|
121 |
+
<table class="table table-bordered"><tr>
|
122 |
+
<th>since</th>
|
123 |
+
<td>0.30</td>
|
124 |
+
</tr></table>
|
125 |
+
<h3>Parameters</h3>
|
126 |
+
<div class="subelement argument">
|
127 |
+
<h4>$request</h4>
|
128 |
+
<code>array</code><p>Query variables, e.g., from $_REQUEST</p>
|
129 |
+
</div>
|
130 |
+
<h3>Returns</h3>
|
131 |
+
<div class="subelement response">
|
132 |
+
<code>integer</code>Number of attachment posts</div>
|
133 |
+
</div></div>
|
134 |
+
</div>
|
135 |
<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">
|
136 |
<h2>Find Featured Image and inserted image/link references to an attachment</h2>
|
137 |
<pre>mla_fetch_attachment_references(int $ID, int $parent) : array</pre>
|
170 |
<h3>Parameters</h3>
|
171 |
<div class="subelement argument">
|
172 |
<h4>$post_id</h4>
|
173 |
+
<code>int</code><p>The ID of the attachment post</p></div>
|
174 |
<h3>Returns</h3>
|
175 |
<div class="subelement response">
|
176 |
+
<code>NULL</code><code>array</code>NULL on failure else associative array</div>
|
177 |
</div></div>
|
178 |
</div>
|
179 |
<a name="mla_load_template" id="mla_load_template"></a><div class="element clickable method public mla_load_template" data-toggle="collapse" data-target=".mla_load_template .collapse">
|
214 |
</div>
|
215 |
<div class="subelement argument">
|
216 |
<h4>$hash</h4>
|
217 |
+
<code>array</code><p>An associative array containing keys and values e.g. array('key' => 'value')</p>
|
218 |
</div>
|
219 |
<h3>Returns</h3>
|
220 |
<div class="subelement response">
|
221 |
+
<code>string</code>Placeholders corresponding to the keys of the hash will be replaced with their values</div>
|
222 |
</div></div>
|
223 |
</div>
|
224 |
+
<a name="mla_query_list_table_items" id="mla_query_list_table_items"></a><div class="element clickable method public mla_query_list_table_items" data-toggle="collapse" data-target=".mla_query_list_table_items .collapse">
|
225 |
+
<h2>Retrieve attachment objects for list table display</h2>
|
226 |
+
<pre>mla_query_list_table_items(array $request, int $offset, int $count) : array</pre>
|
227 |
<div class="labels"></div>
|
228 |
<div class="row collapse"><div class="detail-description">
|
229 |
+
<p class="long_description"><p>Supports prepare_items in class-mla-list-table.php.
|
230 |
+
Modeled after wp_edit_attachments_query in wp-admin/post.php</p></p>
|
|
|
231 |
<table class="table table-bordered"><tr>
|
232 |
<th>since</th>
|
233 |
<td>0.1</td>
|
237 |
<h4>$request</h4>
|
238 |
<code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
|
239 |
</div>
|
240 |
+
<div class="subelement argument">
|
241 |
+
<h4>$offset</h4>
|
242 |
+
<code>int</code><p>number of rows to skip over to reach desired page</p></div>
|
243 |
+
<div class="subelement argument">
|
244 |
+
<h4>$count</h4>
|
245 |
+
<code>int</code><p>number of rows on each page</p></div>
|
246 |
<h3>Returns</h3>
|
247 |
<div class="subelement response">
|
248 |
+
<code>array</code>attachment objects (posts) including parent data, meta data and references</div>
|
249 |
</div></div>
|
250 |
</div>
|
251 |
+
<a name="mla_query_posts_join_filter" id="mla_query_posts_join_filter"></a><div class="element clickable method public mla_query_posts_join_filter" data-toggle="collapse" data-target=".mla_query_posts_join_filter .collapse">
|
252 |
+
<h2>Adds a JOIN clause, if required</h2>
|
253 |
+
<pre>mla_query_posts_join_filter(string $join_clause) : string</pre>
|
254 |
<div class="labels"></div>
|
255 |
<div class="row collapse"><div class="detail-description">
|
256 |
+
<p class="long_description"><p>Defined as public because it's a filter.</p></p>
|
|
|
257 |
<table class="table table-bordered"><tr>
|
258 |
<th>since</th>
|
259 |
+
<td>0.30</td>
|
260 |
</tr></table>
|
261 |
<h3>Parameters</h3>
|
262 |
<div class="subelement argument">
|
263 |
+
<h4>$join_clause</h4>
|
264 |
+
<code>string</code><p>query clause before modification</p></div>
|
265 |
+
<h3>Returns</h3>
|
266 |
+
<div class="subelement response">
|
267 |
+
<code>string</code>query clause after "detached" item modification</div>
|
268 |
+
</div></div>
|
269 |
</div>
|
270 |
+
<a name="mla_query_posts_orderby_filter" id="mla_query_posts_orderby_filter"></a><div class="element clickable method public mla_query_posts_orderby_filter" data-toggle="collapse" data-target=".mla_query_posts_orderby_filter .collapse">
|
271 |
+
<h2>Adds a ORDERBY clause, if required</h2>
|
272 |
+
<pre>mla_query_posts_orderby_filter(string $orderby_clause) : string</pre>
|
273 |
+
<div class="labels"></div>
|
274 |
+
<div class="row collapse"><div class="detail-description">
|
275 |
+
<p class="long_description"><p>Expands the range of sort options because the logic in WP_Query is limited.
|
276 |
+
Defined as public because it's a filter.</p></p>
|
277 |
+
<table class="table table-bordered"><tr>
|
278 |
+
<th>since</th>
|
279 |
+
<td>0.30</td>
|
280 |
+
</tr></table>
|
281 |
+
<h3>Parameters</h3>
|
282 |
<div class="subelement argument">
|
283 |
+
<h4>$orderby_clause</h4>
|
284 |
+
<code>string</code><p>query clause before modification</p></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
<h3>Returns</h3>
|
286 |
<div class="subelement response">
|
287 |
+
<code>string</code>updated query clause</div>
|
288 |
</div></div>
|
289 |
</div>
|
290 |
+
<a name="mla_query_posts_where_filter" id="mla_query_posts_where_filter"></a><div class="element clickable method public mla_query_posts_where_filter" data-toggle="collapse" data-target=".mla_query_posts_where_filter .collapse">
|
291 |
<h2>Adds a WHERE clause for detached items</h2>
|
292 |
+
<pre>mla_query_posts_where_filter(string $where_clause) : string</pre>
|
293 |
<div class="labels"></div>
|
294 |
<div class="row collapse"><div class="detail-description">
|
295 |
+
<p class="long_description"><p>Modeled after _edit_attachments_query_helper in wp-admin/post.php.
|
296 |
+
Defined as public because it's a filter.</p></p>
|
297 |
<table class="table table-bordered"><tr>
|
298 |
<th>since</th>
|
299 |
<td>0.1</td>
|
300 |
</tr></table>
|
301 |
<h3>Parameters</h3>
|
302 |
<div class="subelement argument">
|
303 |
+
<h4>$where_clause</h4>
|
304 |
<code>string</code><p>query clause before modification</p></div>
|
305 |
<h3>Returns</h3>
|
306 |
<div class="subelement response">
|
307 |
<code>string</code>query clause after "detached" item modification</div>
|
308 |
</div></div>
|
309 |
</div>
|
310 |
+
<a name="_execute_list_table_query" id="_execute_list_table_query"></a><div class="element clickable method private _execute_list_table_query" data-toggle="collapse" data-target="._execute_list_table_query .collapse">
|
311 |
+
<h2>Add filters, run query, remove filters</h2>
|
312 |
+
<pre>_execute_list_table_query(array $request) : object</pre>
|
313 |
+
<div class="labels"></div>
|
314 |
+
<div class="row collapse"><div class="detail-description">
|
315 |
+
<p class="long_description"></p>
|
316 |
+
<table class="table table-bordered"><tr>
|
317 |
+
<th>since</th>
|
318 |
+
<td>0.30</td>
|
319 |
+
</tr></table>
|
320 |
+
<h3>Parameters</h3>
|
321 |
+
<div class="subelement argument">
|
322 |
+
<h4>$request</h4>
|
323 |
+
<code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
|
324 |
+
</div>
|
325 |
+
<h3>Returns</h3>
|
326 |
+
<div class="subelement response">
|
327 |
+
<code>object</code>WP_Query object with query results</div>
|
328 |
+
</div></div>
|
329 |
+
</div>
|
330 |
<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">
|
331 |
<h2>Fetch and filter meta data for an attachment</h2>
|
332 |
<pre>_fetch_attachment_metadata(int $post_id) : array</pre>
|
368 |
<code>array</code>Parent information; post_date, post_title and post_type</div>
|
369 |
</div></div>
|
370 |
</div>
|
371 |
+
<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">
|
372 |
+
<h2>Sanitize and expand query arguments from request variables</h2>
|
373 |
+
<pre>_prepare_list_table_query(array $request) : array</pre>
|
374 |
+
<div class="labels"></div>
|
375 |
+
<div class="row collapse"><div class="detail-description">
|
376 |
+
<p class="long_description"><p>Prepare the arguments for WP_Query.
|
377 |
+
Modeled after wp_edit_attachments_query in wp-admin/post.php</p></p>
|
378 |
+
<table class="table table-bordered"><tr>
|
379 |
+
<th>since</th>
|
380 |
+
<td>0.1</td>
|
381 |
+
</tr></table>
|
382 |
+
<h3>Parameters</h3>
|
383 |
+
<div class="subelement argument">
|
384 |
+
<h4>$request</h4>
|
385 |
+
<code>array</code><p>query parameters from web page, usually found in $_REQUEST</p>
|
386 |
+
</div>
|
387 |
+
<h3>Returns</h3>
|
388 |
+
<div class="subelement response">
|
389 |
+
<code>array</code>revised arguments suitable for WP_Query</div>
|
390 |
+
</div></div>
|
391 |
+
</div>
|
392 |
+
<h3>
|
393 |
+
<i class="icon-custom icon-property"></i> Properties</h3>
|
394 |
+
<a name="%24query_parameters" id="$query_parameters"> </a><div class="element clickable property private $query_parameters" data-toggle="collapse" data-target=".$query_parameters .collapse">
|
395 |
+
<h2>WP_Query filter "parameters"</h2>
|
396 |
+
<pre>$query_parameters : array</pre>
|
397 |
+
<div class="labels"></div>
|
398 |
+
<div class="row collapse"><div class="detail-description">
|
399 |
+
<p class="long_description"><p>This array defines parameters for the query's join, where and orderby filters.
|
400 |
+
The parameters are set up in the _prepare_list_table_query function, and
|
401 |
+
any further logic required to translate those values is contained in the filters.</p></p>
|
402 |
+
<table class="table table-bordered"><tr>
|
403 |
+
<th>since</th>
|
404 |
+
<td>0.30</td>
|
405 |
+
</tr></table>
|
406 |
+
</div></div>
|
407 |
+
</div>
|
408 |
</div>
|
409 |
</div>
|
410 |
</div>
|
412 |
<div class="row"><footer class="span12">
|
413 |
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>
|
414 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
415 |
+
generated on 2012-09-19T20:36:48-07:00.<br></footer></div>
|
416 |
</div>
|
417 |
</body>
|
418 |
</html>
|
phpDocs/classes/MLAObjects.html
CHANGED
@@ -53,18 +53,12 @@
|
|
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="#
|
57 |
-
which returns a count of the attachments assigned a given
|
58 |
-
which returns a count of the attachments assigned a given
|
59 |
-
<li class="method public "><a href="#
|
60 |
-
which replaces the "Posts" column with an equivalent "Attachments" column.'><span class="description">WordPress Filter for
|
61 |
-
which replaces the "Posts" column with an equivalent "Attachments" column.</span><pre>
|
62 |
-
<li class="method public "><a href="#mla_attachment_tag_column_filter" title='mla_attachment_tag_column_filter :: WordPress Filter for Attachment Tag "Attachments" column,
|
63 |
-
which returns a count of the attachments assigned a given tag'><span class="description">WordPress Filter for Attachment Tag "Attachments" column,
|
64 |
-
which returns a count of the attachments assigned a given tag</span><pre>mla_attachment_tag_column_filter()</pre></a></li>
|
65 |
-
<li class="method public "><a href="#mla_attachment_tag_get_columns_filter" title='mla_attachment_tag_get_columns_filter :: WordPress Filter for Attachment Tag "Attachments" column,
|
66 |
-
which replaces the "Posts" column with an equivalent "Attachments" column.'><span class="description">WordPress Filter for Attachment Tag "Attachments" column,
|
67 |
-
which replaces the "Posts" column with an equivalent "Attachments" column.</span><pre>mla_attachment_tag_get_columns_filter()</pre></a></li>
|
68 |
<li class="nav-header private">» Private</li>
|
69 |
<li class="method private "><a href="#_build_taxonomies" title="_build_taxonomies :: Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters"><span class="description">Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters</span><pre>_build_taxonomies()</pre></a></li>
|
70 |
</ul>
|
@@ -97,7 +91,7 @@ which replaces the "Posts" column with an equivalent "Attachments" column.</span
|
|
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() </pre>
|
101 |
<div class="labels"></div>
|
102 |
<div class="row collapse"><div class="detail-description">
|
103 |
<p class="long_description"></p>
|
@@ -107,67 +101,22 @@ which replaces the "Posts" column with an equivalent "Attachments" column.</span
|
|
107 |
</tr></table>
|
108 |
</div></div>
|
109 |
</div>
|
110 |
-
<a name="
|
111 |
-
<h2>WordPress Filter for
|
112 |
-
which returns a count of the attachments assigned a given
|
113 |
-
<pre>
|
114 |
<div class="labels"></div>
|
115 |
<div class="row collapse"><div class="detail-description">
|
116 |
<p class="long_description"></p>
|
117 |
<table class="table table-bordered"><tr>
|
118 |
<th>since</th>
|
119 |
-
<td>0.
|
120 |
</tr></table>
|
121 |
<h3>Parameters</h3>
|
122 |
<div class="subelement argument">
|
123 |
<h4>$place_holder</h4>
|
124 |
-
<code>string</code><p>
|
125 |
-
<div class="subelement argument">
|
126 |
-
<h4>$column_name</h4>
|
127 |
-
<code>array</code><p>name of the column.</p></div>
|
128 |
-
<div class="subelement argument">
|
129 |
-
<h4>$term_id</h4>
|
130 |
-
<code>array</code><p>ID of the term for which the count is desired.</p></div>
|
131 |
-
<h3>Returns</h3>
|
132 |
-
<div class="subelement response">
|
133 |
-
<code>array</code>HTML markup for the column content; number of attachments in the category and alink to retrieve a list of them.</div>
|
134 |
-
</div></div>
|
135 |
-
</div>
|
136 |
-
<a name="mla_attachment_category_get_columns_filter" id="mla_attachment_category_get_columns_filter"></a><div class="element clickable method public mla_attachment_category_get_columns_filter" data-toggle="collapse" data-target=".mla_attachment_category_get_columns_filter .collapse">
|
137 |
-
<h2>WordPress Filter for Attachment Category "Attachments" column,
|
138 |
-
which replaces the "Posts" column with an equivalent "Attachments" column.</h2>
|
139 |
-
<pre>mla_attachment_category_get_columns_filter(array $columns) : array</pre>
|
140 |
-
<div class="labels"></div>
|
141 |
-
<div class="row collapse"><div class="detail-description">
|
142 |
-
<p class="long_description"></p>
|
143 |
-
<table class="table table-bordered"><tr>
|
144 |
-
<th>since</th>
|
145 |
-
<td>0.1</td>
|
146 |
-
</tr></table>
|
147 |
-
<h3>Parameters</h3>
|
148 |
-
<div class="subelement argument">
|
149 |
-
<h4>$columns</h4>
|
150 |
-
<code>array</code><p>column definitions for the Attachment Category list table.</p></div>
|
151 |
-
<h3>Returns</h3>
|
152 |
-
<div class="subelement response">
|
153 |
-
<code>array</code>updated column definitions for the Attachment Category list table.</div>
|
154 |
-
</div></div>
|
155 |
</div>
|
156 |
-
<a name="mla_attachment_tag_column_filter" id="mla_attachment_tag_column_filter"></a><div class="element clickable method public mla_attachment_tag_column_filter" data-toggle="collapse" data-target=".mla_attachment_tag_column_filter .collapse">
|
157 |
-
<h2>WordPress Filter for Attachment Tag "Attachments" column,
|
158 |
-
which returns a count of the attachments assigned a given tag</h2>
|
159 |
-
<pre>mla_attachment_tag_column_filter(string $place_holder, array $column_name, array $term_id) : array</pre>
|
160 |
-
<div class="labels"></div>
|
161 |
-
<div class="row collapse"><div class="detail-description">
|
162 |
-
<p class="long_description"></p>
|
163 |
-
<table class="table table-bordered"><tr>
|
164 |
-
<th>since</th>
|
165 |
-
<td>0.1</td>
|
166 |
-
</tr></table>
|
167 |
-
<h3>Parameters</h3>
|
168 |
-
<div class="subelement argument">
|
169 |
-
<h4>$place_holder</h4>
|
170 |
-
<code>string</code><p>unknown, undocumented parameter</p></div>
|
171 |
<div class="subelement argument">
|
172 |
<h4>$column_name</h4>
|
173 |
<code>array</code><p>name of the column</p></div>
|
@@ -176,32 +125,32 @@ which returns a count of the attachments assigned a given tag</h2>
|
|
176 |
<code>array</code><p>ID of the term for which the count is desired</p></div>
|
177 |
<h3>Returns</h3>
|
178 |
<div class="subelement response">
|
179 |
-
<code>array</code>HTML markup for the column content; number of attachments
|
180 |
</div></div>
|
181 |
</div>
|
182 |
-
<a name="
|
183 |
-
<h2>WordPress Filter for
|
184 |
which replaces the "Posts" column with an equivalent "Attachments" column.</h2>
|
185 |
-
<pre>
|
186 |
<div class="labels"></div>
|
187 |
<div class="row collapse"><div class="detail-description">
|
188 |
<p class="long_description"></p>
|
189 |
<table class="table table-bordered"><tr>
|
190 |
<th>since</th>
|
191 |
-
<td>0.
|
192 |
</tr></table>
|
193 |
<h3>Parameters</h3>
|
194 |
<div class="subelement argument">
|
195 |
<h4>$columns</h4>
|
196 |
-
<code>array</code><p>column definitions for the
|
197 |
<h3>Returns</h3>
|
198 |
<div class="subelement response">
|
199 |
-
<code>array</code>updated column definitions for the
|
200 |
</div></div>
|
201 |
</div>
|
202 |
<a name="_build_taxonomies" id="_build_taxonomies"></a><div class="element clickable method private _build_taxonomies" data-toggle="collapse" data-target="._build_taxonomies .collapse">
|
203 |
<h2>Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters</h2>
|
204 |
-
<pre>_build_taxonomies() </pre>
|
205 |
<div class="labels"></div>
|
206 |
<div class="row collapse"><div class="detail-description">
|
207 |
<p class="long_description"></p>
|
@@ -218,7 +167,7 @@ which replaces the "Posts" column with an equivalent "Attachments" column.</h2>
|
|
218 |
<div class="row"><footer class="span12">
|
219 |
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>
|
220 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
221 |
-
generated on 2012-09-
|
222 |
</div>
|
223 |
</body>
|
224 |
</html>
|
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_taxonomy_column_filter" title='mla_taxonomy_column_filter :: WordPress Filter for edit taxonomy "Attachments" column,
|
57 |
+
which returns a count of the attachments assigned a given term'><span class="description">WordPress Filter for edit taxonomy "Attachments" column,
|
58 |
+
which returns a count of the attachments assigned a given term</span><pre>mla_taxonomy_column_filter()</pre></a></li>
|
59 |
+
<li class="method public "><a href="#mla_taxonomy_get_columns_filter" title='mla_taxonomy_get_columns_filter :: WordPress Filter for edit taxonomy "Attachments" column,
|
60 |
+
which replaces the "Posts" column with an equivalent "Attachments" column.'><span class="description">WordPress Filter for edit taxonomy "Attachments" column,
|
61 |
+
which replaces the "Posts" column with an equivalent "Attachments" column.</span><pre>mla_taxonomy_get_columns_filter()</pre></a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
<li class="nav-header private">» Private</li>
|
63 |
<li class="method private "><a href="#_build_taxonomies" title="_build_taxonomies :: Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters"><span class="description">Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters</span><pre>_build_taxonomies()</pre></a></li>
|
64 |
</ul>
|
91 |
<i class="icon-custom icon-method"></i> Methods</h3>
|
92 |
<a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
|
93 |
<h2>Initialization function, similar to __construct()</h2>
|
94 |
+
<pre>initialize() : void</pre>
|
95 |
<div class="labels"></div>
|
96 |
<div class="row collapse"><div class="detail-description">
|
97 |
<p class="long_description"></p>
|
101 |
</tr></table>
|
102 |
</div></div>
|
103 |
</div>
|
104 |
+
<a name="mla_taxonomy_column_filter" id="mla_taxonomy_column_filter"></a><div class="element clickable method public mla_taxonomy_column_filter" data-toggle="collapse" data-target=".mla_taxonomy_column_filter .collapse">
|
105 |
+
<h2>WordPress Filter for edit taxonomy "Attachments" column,
|
106 |
+
which returns a count of the attachments assigned a given term</h2>
|
107 |
+
<pre>mla_taxonomy_column_filter(string $place_holder, array $column_name, array $term_id) : array</pre>
|
108 |
<div class="labels"></div>
|
109 |
<div class="row collapse"><div class="detail-description">
|
110 |
<p class="long_description"></p>
|
111 |
<table class="table table-bordered"><tr>
|
112 |
<th>since</th>
|
113 |
+
<td>0.30</td>
|
114 |
</tr></table>
|
115 |
<h3>Parameters</h3>
|
116 |
<div class="subelement argument">
|
117 |
<h4>$place_holder</h4>
|
118 |
+
<code>string</code><p>current column value; always ''</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
<div class="subelement argument">
|
121 |
<h4>$column_name</h4>
|
122 |
<code>array</code><p>name of the column</p></div>
|
125 |
<code>array</code><p>ID of the term for which the count is desired</p></div>
|
126 |
<h3>Returns</h3>
|
127 |
<div class="subelement response">
|
128 |
+
<code>array</code>HTML markup for the column content; number of attachments in the category and alink to retrieve a list of them</div>
|
129 |
</div></div>
|
130 |
</div>
|
131 |
+
<a name="mla_taxonomy_get_columns_filter" id="mla_taxonomy_get_columns_filter"></a><div class="element clickable method public mla_taxonomy_get_columns_filter" data-toggle="collapse" data-target=".mla_taxonomy_get_columns_filter .collapse">
|
132 |
+
<h2>WordPress Filter for edit taxonomy "Attachments" column,
|
133 |
which replaces the "Posts" column with an equivalent "Attachments" column.</h2>
|
134 |
+
<pre>mla_taxonomy_get_columns_filter(array $columns) : array</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.30</td>
|
141 |
</tr></table>
|
142 |
<h3>Parameters</h3>
|
143 |
<div class="subelement argument">
|
144 |
<h4>$columns</h4>
|
145 |
+
<code>array</code><p>column definitions for the edit taxonomy list table</p></div>
|
146 |
<h3>Returns</h3>
|
147 |
<div class="subelement response">
|
148 |
+
<code>array</code>updated column definitions for the edit taxonomy list table</div>
|
149 |
</div></div>
|
150 |
</div>
|
151 |
<a name="_build_taxonomies" id="_build_taxonomies"></a><div class="element clickable method private _build_taxonomies" data-toggle="collapse" data-target="._build_taxonomies .collapse">
|
152 |
<h2>Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters</h2>
|
153 |
+
<pre>_build_taxonomies() : void</pre>
|
154 |
<div class="labels"></div>
|
155 |
<div class="row collapse"><div class="detail-description">
|
156 |
<p class="long_description"></p>
|
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-09-19T20:36:48-07:00.<br></footer></div>
|
171 |
</div>
|
172 |
</body>
|
173 |
</html>
|
phpDocs/classes/MLASettings.html
CHANGED
@@ -60,17 +60,23 @@ add settings link in the Plugins section entry for MLA.</span><pre>mla_admin_men
|
|
60 |
<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>
|
61 |
<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>
|
62 |
<li class="method public "><a href="#mla_render_settings_page" title='mla_render_settings_page :: Render (echo) the "Media Library Assistant" subpage in the Settings section'><span class="description">Render (echo) the "Media Library Assistant" subpage in the Settings section</span><pre>mla_render_settings_page()</pre></a></li>
|
|
|
|
|
|
|
63 |
<li class="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>
|
64 |
<li class="nav-header private">» Private</li>
|
65 |
<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>
|
66 |
<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>
|
|
|
|
|
67 |
<li class="nav-header">
|
68 |
<i class="icon-custom icon-property"></i> Properties</li>
|
69 |
<li class="nav-header private">» Private</li>
|
70 |
<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>
|
71 |
<li class="nav-header">
|
72 |
<i class="icon-custom icon-constant"></i> Constants</li>
|
73 |
-
<li class="constant "><a href="#MLA_SETTINGS_SLUG" title="MLA_SETTINGS_SLUG :: Provides a unique name for the settings page
|
|
|
74 |
</ul>
|
75 |
</div>
|
76 |
<div class="span8">
|
@@ -102,7 +108,7 @@ and provides the settings page to edit them.</p>
|
|
102 |
<i class="icon-custom icon-method"></i> Methods</h3>
|
103 |
<a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
|
104 |
<h2>Initialization function, similar to __construct()</h2>
|
105 |
-
<pre>initialize() </pre>
|
106 |
<div class="labels"></div>
|
107 |
<div class="row collapse"><div class="detail-description">
|
108 |
<p class="long_description"></p>
|
@@ -138,7 +144,7 @@ and provides the settings page to edit them.</p>
|
|
138 |
<a name="mla_admin_menu_action" id="mla_admin_menu_action"></a><div class="element clickable method public mla_admin_menu_action" data-toggle="collapse" data-target=".mla_admin_menu_action .collapse">
|
139 |
<h2>Add settings page in the "Settings" section,
|
140 |
add settings link in the Plugins section entry for MLA.</h2>
|
141 |
-
<pre>mla_admin_menu_action() </pre>
|
142 |
<div class="labels"></div>
|
143 |
<div class="row collapse"><div class="detail-description">
|
144 |
<p class="long_description"></p>
|
@@ -188,7 +194,7 @@ add settings link in the Plugins section entry for MLA.</h2>
|
|
188 |
</div>
|
189 |
<a name="mla_render_settings_page" id="mla_render_settings_page"></a><div class="element clickable method public mla_render_settings_page" data-toggle="collapse" data-target=".mla_render_settings_page .collapse">
|
190 |
<h2>Render (echo) the "Media Library Assistant" subpage in the Settings section</h2>
|
191 |
-
<pre>mla_render_settings_page() :
|
192 |
<div class="labels"></div>
|
193 |
<div class="row collapse"><div class="detail-description">
|
194 |
<p class="long_description"></p>
|
@@ -196,9 +202,30 @@ add settings link in the Plugins section entry for MLA.</h2>
|
|
196 |
<th>since</th>
|
197 |
<td>0.1</td>
|
198 |
</tr></table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
<h3>Returns</h3>
|
200 |
<div class="subelement response">
|
201 |
-
<code
|
202 |
</div></div>
|
203 |
</div>
|
204 |
<a name="mla_update_option" id="mla_update_option"></a><div class="element clickable method public mla_update_option" data-toggle="collapse" data-target=".mla_update_option .collapse">
|
@@ -240,7 +267,7 @@ add settings link in the Plugins section entry for MLA.</h2>
|
|
240 |
</div>
|
241 |
<h3>Returns</h3>
|
242 |
<div class="subelement response">
|
243 |
-
<code>array</code>Message(s) reflecting the results of the operation
|
244 |
</div></div>
|
245 |
</div>
|
246 |
<a name="_save_settings" id="_save_settings"></a><div class="element clickable method private _save_settings" data-toggle="collapse" data-target="._save_settings .collapse">
|
@@ -260,7 +287,50 @@ add settings link in the Plugins section entry for MLA.</h2>
|
|
260 |
</div>
|
261 |
<h3>Returns</h3>
|
262 |
<div class="subelement response">
|
263 |
-
<code>array</code>Message(s) reflecting the results of the operation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
</div></div>
|
265 |
</div>
|
266 |
<h3>
|
@@ -274,22 +344,37 @@ add settings link in the Plugins section entry for MLA.</h2>
|
|
274 |
<p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
|
275 |
|
276 |
<p>name => admin page label or heading text
|
277 |
-
type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea'
|
278 |
std => default value
|
279 |
help => help text
|
280 |
size => text size, default 40
|
281 |
cols => textbox columns, default 90
|
282 |
rows => textbox rows, default 5
|
283 |
-
options => array of radio or select option values
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
</div>
|
285 |
<h3>
|
286 |
<i class="icon-custom icon-constant"></i> Constants</h3>
|
287 |
<a name="MLA_SETTINGS_SLUG" id="MLA_SETTINGS_SLUG"> </a><div class="element clickable constant MLA_SETTINGS_SLUG" data-toggle="collapse" data-target=".MLA_SETTINGS_SLUG .collapse">
|
288 |
-
<h2>Provides a unique name for the settings page
|
289 |
<pre>MLA_SETTINGS_SLUG </pre>
|
290 |
<div class="labels"></div>
|
291 |
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
292 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
</div>
|
294 |
</div>
|
295 |
</div>
|
@@ -297,7 +382,7 @@ options => array of radio or select option values</p></p></div></div>
|
|
297 |
<div class="row"><footer class="span12">
|
298 |
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>
|
299 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
300 |
-
generated on 2012-09-
|
301 |
</div>
|
302 |
</body>
|
303 |
</html>
|
60 |
<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>
|
61 |
<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>
|
62 |
<li class="method public "><a href="#mla_render_settings_page" title='mla_render_settings_page :: Render (echo) the "Media Library Assistant" subpage in the Settings section'><span class="description">Render (echo) the "Media Library Assistant" subpage in the Settings section</span><pre>mla_render_settings_page()</pre></a></li>
|
63 |
+
<li class="method public "><a href="#mla_taxonomy_support" title="mla_taxonomy_support :: Determine MLA support for a taxonomy, handling the special case where the
|
64 |
+
settings are being updated or reset."><span class="description">Determine MLA support for a taxonomy, handling the special case where the
|
65 |
+
settings are being updated or reset.</span><pre>mla_taxonomy_support()</pre></a></li>
|
66 |
<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>
|
67 |
<li class="nav-header private">» Private</li>
|
68 |
<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>
|
69 |
<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>
|
70 |
+
<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>
|
71 |
+
<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>
|
72 |
<li class="nav-header">
|
73 |
<i class="icon-custom icon-property"></i> Properties</li>
|
74 |
<li class="nav-header private">» Private</li>
|
75 |
<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>
|
76 |
<li class="nav-header">
|
77 |
<i class="icon-custom icon-constant"></i> Constants</li>
|
78 |
+
<li class="constant "><a href="#MLA_SETTINGS_SLUG" title="MLA_SETTINGS_SLUG :: Provides a unique name for the settings page"><span class="description">Provides a unique name for the settings page</span><pre>MLA_SETTINGS_SLUG</pre></a></li>
|
79 |
+
<li class="constant "><a href="#MLA_VERSION_OPTION" title="MLA_VERSION_OPTION :: Provides a unique name for the current version option"><span class="description">Provides a unique name for the current version option</span><pre>MLA_VERSION_OPTION</pre></a></li>
|
80 |
</ul>
|
81 |
</div>
|
82 |
<div class="span8">
|
108 |
<i class="icon-custom icon-method"></i> Methods</h3>
|
109 |
<a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
|
110 |
<h2>Initialization function, similar to __construct()</h2>
|
111 |
+
<pre>initialize() : void</pre>
|
112 |
<div class="labels"></div>
|
113 |
<div class="row collapse"><div class="detail-description">
|
114 |
<p class="long_description"></p>
|
144 |
<a name="mla_admin_menu_action" id="mla_admin_menu_action"></a><div class="element clickable method public mla_admin_menu_action" data-toggle="collapse" data-target=".mla_admin_menu_action .collapse">
|
145 |
<h2>Add settings page in the "Settings" section,
|
146 |
add settings link in the Plugins section entry for MLA.</h2>
|
147 |
+
<pre>mla_admin_menu_action() : void</pre>
|
148 |
<div class="labels"></div>
|
149 |
<div class="row collapse"><div class="detail-description">
|
150 |
<p class="long_description"></p>
|
194 |
</div>
|
195 |
<a name="mla_render_settings_page" id="mla_render_settings_page"></a><div class="element clickable method public mla_render_settings_page" data-toggle="collapse" data-target=".mla_render_settings_page .collapse">
|
196 |
<h2>Render (echo) the "Media Library Assistant" subpage in the Settings section</h2>
|
197 |
+
<pre>mla_render_settings_page() : void</pre>
|
198 |
<div class="labels"></div>
|
199 |
<div class="row collapse"><div class="detail-description">
|
200 |
<p class="long_description"></p>
|
202 |
<th>since</th>
|
203 |
<td>0.1</td>
|
204 |
</tr></table>
|
205 |
+
</div></div>
|
206 |
+
</div>
|
207 |
+
<a name="mla_taxonomy_support" id="mla_taxonomy_support"></a><div class="element clickable method public mla_taxonomy_support" data-toggle="collapse" data-target=".mla_taxonomy_support .collapse">
|
208 |
+
<h2>Determine MLA support for a taxonomy, handling the special case where the
|
209 |
+
settings are being updated or reset.</h2>
|
210 |
+
<pre>mla_taxonomy_support(string $tax_name, string $support_type) : boolean | string</pre>
|
211 |
+
<div class="labels"></div>
|
212 |
+
<div class="row collapse"><div class="detail-description">
|
213 |
+
<p class="long_description"></p>
|
214 |
+
<table class="table table-bordered"><tr>
|
215 |
+
<th>since</th>
|
216 |
+
<td>0.30</td>
|
217 |
+
</tr></table>
|
218 |
+
<h3>Parameters</h3>
|
219 |
+
<div class="subelement argument">
|
220 |
+
<h4>$tax_name</h4>
|
221 |
+
<code>string</code><p>Taxonomy name, e.g., attachment_category</p></div>
|
222 |
+
<div class="subelement argument">
|
223 |
+
<h4>$support_type</h4>
|
224 |
+
<code>string</code><p>'support' (the default), 'quick-edit' or 'filter'</p>
|
225 |
+
</div>
|
226 |
<h3>Returns</h3>
|
227 |
<div class="subelement response">
|
228 |
+
<code>boolean</code><code>string</code>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</div>
|
229 |
</div></div>
|
230 |
</div>
|
231 |
<a name="mla_update_option" id="mla_update_option"></a><div class="element clickable method public mla_update_option" data-toggle="collapse" data-target=".mla_update_option .collapse">
|
267 |
</div>
|
268 |
<h3>Returns</h3>
|
269 |
<div class="subelement response">
|
270 |
+
<code>array</code>Message(s) reflecting the results of the operation</div>
|
271 |
</div></div>
|
272 |
</div>
|
273 |
<a name="_save_settings" id="_save_settings"></a><div class="element clickable method private _save_settings" data-toggle="collapse" data-target="._save_settings .collapse">
|
287 |
</div>
|
288 |
<h3>Returns</h3>
|
289 |
<div class="subelement response">
|
290 |
+
<code>array</code>Message(s) reflecting the results of the operation</div>
|
291 |
+
</div></div>
|
292 |
+
</div>
|
293 |
+
<a name="_taxonomy_handler" id="_taxonomy_handler"></a><div class="element clickable method private _taxonomy_handler" data-toggle="collapse" data-target="._taxonomy_handler .collapse">
|
294 |
+
<h2>Render and manage other taxonomy support options, e.g., Categories and Post Tags</h2>
|
295 |
+
<pre>_taxonomy_handler(string $action, string $key, array $value, array $args) : string</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.30</td>
|
302 |
+
</tr></table>
|
303 |
+
<h3>Parameters</h3>
|
304 |
+
<div class="subelement argument">
|
305 |
+
<h4>$action</h4>
|
306 |
+
<code>string</code><p>'render', 'update', 'delete', or 'reset'</p>
|
307 |
+
</div>
|
308 |
+
<div class="subelement argument">
|
309 |
+
<h4>$key</h4>
|
310 |
+
<code>string</code><p>option name, e.g., 'taxonomy_support'</p>
|
311 |
+
</div>
|
312 |
+
<div class="subelement argument">
|
313 |
+
<h4>$value</h4>
|
314 |
+
<code>array</code><p>option parameters</p></div>
|
315 |
+
<div class="subelement argument">
|
316 |
+
<h4>$args</h4>
|
317 |
+
<code>array</code><p>The $page_template_array for 'render' else $_REQUEST</p>
|
318 |
+
</div>
|
319 |
+
<h3>Returns</h3>
|
320 |
+
<div class="subelement response">
|
321 |
+
<code>string</code>HTML table row markup for 'render' else message(s) reflecting the results of the operation.</div>
|
322 |
+
</div></div>
|
323 |
+
</div>
|
324 |
+
<a name="_version_upgrade" id="_version_upgrade"></a><div class="element clickable method private _version_upgrade" data-toggle="collapse" data-target="._version_upgrade .collapse">
|
325 |
+
<h2>Database and option update check, for installing new versions</h2>
|
326 |
+
<pre>_version_upgrade() : void</pre>
|
327 |
+
<div class="labels"></div>
|
328 |
+
<div class="row collapse"><div class="detail-description">
|
329 |
+
<p class="long_description"></p>
|
330 |
+
<table class="table table-bordered"><tr>
|
331 |
+
<th>since</th>
|
332 |
+
<td>0.30</td>
|
333 |
+
</tr></table>
|
334 |
</div></div>
|
335 |
</div>
|
336 |
<h3>
|
344 |
<p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
|
345 |
|
346 |
<p>name => admin page label or heading text
|
347 |
+
type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
|
348 |
std => default value
|
349 |
help => help text
|
350 |
size => text size, default 40
|
351 |
cols => textbox columns, default 90
|
352 |
rows => textbox rows, default 5
|
353 |
+
options => array of radio or select option values
|
354 |
+
texts => array of radio or select option display texts
|
355 |
+
render => rendering function for 'custom' options. Usage:
|
356 |
+
$options_list .= ['render']( 'render', $key, $value, $page_template_array );
|
357 |
+
update => update function for 'custom' options; returns nothing. Usage:
|
358 |
+
$message = ['update']( 'update', $key, $value, $_REQUEST );
|
359 |
+
delete => delete function for 'custom' options; returns nothing. Usage:
|
360 |
+
$message = ['delete']( 'delete', $key, $value, $_REQUEST );
|
361 |
+
reset => reset function for 'custom' options; returns nothing. Usage:
|
362 |
+
$message = ['reset']( 'reset', $key, $value, $_REQUEST );</p></p></div></div>
|
363 |
</div>
|
364 |
<h3>
|
365 |
<i class="icon-custom icon-constant"></i> Constants</h3>
|
366 |
<a name="MLA_SETTINGS_SLUG" id="MLA_SETTINGS_SLUG"> </a><div class="element clickable constant MLA_SETTINGS_SLUG" data-toggle="collapse" data-target=".MLA_SETTINGS_SLUG .collapse">
|
367 |
+
<h2>Provides a unique name for the settings page</h2>
|
368 |
<pre>MLA_SETTINGS_SLUG </pre>
|
369 |
<div class="labels"></div>
|
370 |
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
371 |
</div>
|
372 |
+
<a name="MLA_VERSION_OPTION" id="MLA_VERSION_OPTION"> </a><div class="element clickable constant MLA_VERSION_OPTION" data-toggle="collapse" data-target=".MLA_VERSION_OPTION .collapse">
|
373 |
+
<h2>Provides a unique name for the current version option</h2>
|
374 |
+
<pre>MLA_VERSION_OPTION </pre>
|
375 |
+
<div class="labels"></div>
|
376 |
+
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
|
377 |
+
</div>
|
378 |
</div>
|
379 |
</div>
|
380 |
</div>
|
382 |
<div class="row"><footer class="span12">
|
383 |
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>
|
384 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
385 |
+
generated on 2012-09-19T20:36:48-07:00.<br></footer></div>
|
386 |
</div>
|
387 |
</body>
|
388 |
</html>
|
phpDocs/classes/MLAShortcodes.html
CHANGED
@@ -84,7 +84,7 @@
|
|
84 |
<i class="icon-custom icon-method"></i> Methods</h3>
|
85 |
<a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
|
86 |
<h2>Initialization function, similar to __construct()</h2>
|
87 |
-
<pre>initialize() </pre>
|
88 |
<div class="labels"></div>
|
89 |
<div class="row collapse"><div class="detail-description">
|
90 |
<p class="long_description"></p>
|
@@ -96,7 +96,7 @@
|
|
96 |
</div>
|
97 |
<a name="mla_attachment_list_shortcode" id="mla_attachment_list_shortcode"></a><div class="element clickable method public mla_attachment_list_shortcode" data-toggle="collapse" data-target=".mla_attachment_list_shortcode .collapse">
|
98 |
<h2>WordPress Shortcode; renders a complete list of all attachments and references to them</h2>
|
99 |
-
<pre>mla_attachment_list_shortcode() :
|
100 |
<div class="labels"></div>
|
101 |
<div class="row collapse"><div class="detail-description">
|
102 |
<p class="long_description"></p>
|
@@ -104,9 +104,6 @@
|
|
104 |
<th>since</th>
|
105 |
<td>0.1</td>
|
106 |
</tr></table>
|
107 |
-
<h3>Returns</h3>
|
108 |
-
<div class="subelement response">
|
109 |
-
<code>string</code>HTML markup for the attachment list</div>
|
110 |
</div></div>
|
111 |
</div>
|
112 |
</div>
|
@@ -116,7 +113,7 @@
|
|
116 |
<div class="row"><footer class="span12">
|
117 |
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>
|
118 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
119 |
-
generated on 2012-09-
|
120 |
</div>
|
121 |
</body>
|
122 |
</html>
|
84 |
<i class="icon-custom icon-method"></i> Methods</h3>
|
85 |
<a name="initialize" id="initialize"></a><div class="element clickable method public initialize" data-toggle="collapse" data-target=".initialize .collapse">
|
86 |
<h2>Initialization function, similar to __construct()</h2>
|
87 |
+
<pre>initialize() : void</pre>
|
88 |
<div class="labels"></div>
|
89 |
<div class="row collapse"><div class="detail-description">
|
90 |
<p class="long_description"></p>
|
96 |
</div>
|
97 |
<a name="mla_attachment_list_shortcode" id="mla_attachment_list_shortcode"></a><div class="element clickable method public mla_attachment_list_shortcode" data-toggle="collapse" data-target=".mla_attachment_list_shortcode .collapse">
|
98 |
<h2>WordPress Shortcode; renders a complete list of all attachments and references to them</h2>
|
99 |
+
<pre>mla_attachment_list_shortcode() : void</pre>
|
100 |
<div class="labels"></div>
|
101 |
<div class="row collapse"><div class="detail-description">
|
102 |
<p class="long_description"></p>
|
104 |
<th>since</th>
|
105 |
<td>0.1</td>
|
106 |
</tr></table>
|
|
|
|
|
|
|
107 |
</div></div>
|
108 |
</div>
|
109 |
</div>
|
113 |
<div class="row"><footer class="span12">
|
114 |
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>
|
115 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
116 |
+
generated on 2012-09-19T20:36:48-07:00.<br></footer></div>
|
117 |
</div>
|
118 |
</body>
|
119 |
</html>
|
phpDocs/classes/MLATest.html
CHANGED
@@ -85,7 +85,7 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
|
|
85 |
<i class="icon-custom icon-method"></i> Methods</h3>
|
86 |
<a name="min_WordPress_version" id="min_WordPress_version"></a><div class="element clickable method public min_WordPress_version" data-toggle="collapse" data-target=".min_WordPress_version .collapse">
|
87 |
<h2>Test that your WordPress version is at least that of the $min_version</h2>
|
88 |
-
<pre>min_WordPress_version(string $min_version, string $plugin_name) :
|
89 |
<div class="labels"></div>
|
90 |
<div class="row collapse"><div class="detail-description">
|
91 |
<p class="long_description"></p>
|
@@ -101,14 +101,11 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
|
|
101 |
<div class="subelement argument">
|
102 |
<h4>$plugin_name</h4>
|
103 |
<code>string</code><p>Name of the plugin for messaging purposes</p></div>
|
104 |
-
<h3>Returns</h3>
|
105 |
-
<div class="subelement response">
|
106 |
-
<code>\none</code>Exit with messaging if version is too old</div>
|
107 |
</div></div>
|
108 |
</div>
|
109 |
<a name="min_php_version" id="min_php_version"></a><div class="element clickable method public min_php_version" data-toggle="collapse" data-target=".min_php_version .collapse">
|
110 |
<h2>Test that your PHP version is at least that of the $min_php_version</h2>
|
111 |
-
<pre>min_php_version(string $min_version, string $plugin_name) :
|
112 |
<div class="labels"></div>
|
113 |
<div class="row collapse"><div class="detail-description">
|
114 |
<p class="long_description"></p>
|
@@ -124,9 +121,6 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
|
|
124 |
<div class="subelement argument">
|
125 |
<h4>$plugin_name</h4>
|
126 |
<code>string</code><p>Name of the plugin for messaging purposes</p></div>
|
127 |
-
<h3>Returns</h3>
|
128 |
-
<div class="subelement response">
|
129 |
-
<code>\none</code>Exit with messaging if PHP version is too old</div>
|
130 |
</div></div>
|
131 |
</div>
|
132 |
</div>
|
@@ -136,7 +130,7 @@ to ensure the plugin can run in the current WordPress envrionment.</p>
|
|
136 |
<div class="row"><footer class="span12">
|
137 |
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>
|
138 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
139 |
-
generated on 2012-09-
|
140 |
</div>
|
141 |
</body>
|
142 |
</html>
|
85 |
<i class="icon-custom icon-method"></i> Methods</h3>
|
86 |
<a name="min_WordPress_version" id="min_WordPress_version"></a><div class="element clickable method public min_WordPress_version" data-toggle="collapse" data-target=".min_WordPress_version .collapse">
|
87 |
<h2>Test that your WordPress version is at least that of the $min_version</h2>
|
88 |
+
<pre>min_WordPress_version(string $min_version, string $plugin_name) : void</pre>
|
89 |
<div class="labels"></div>
|
90 |
<div class="row collapse"><div class="detail-description">
|
91 |
<p class="long_description"></p>
|
101 |
<div class="subelement argument">
|
102 |
<h4>$plugin_name</h4>
|
103 |
<code>string</code><p>Name of the plugin for messaging purposes</p></div>
|
|
|
|
|
|
|
104 |
</div></div>
|
105 |
</div>
|
106 |
<a name="min_php_version" id="min_php_version"></a><div class="element clickable method public min_php_version" data-toggle="collapse" data-target=".min_php_version .collapse">
|
107 |
<h2>Test that your PHP version is at least that of the $min_php_version</h2>
|
108 |
+
<pre>min_php_version(string $min_version, string $plugin_name) : void</pre>
|
109 |
<div class="labels"></div>
|
110 |
<div class="row collapse"><div class="detail-description">
|
111 |
<p class="long_description"></p>
|
121 |
<div class="subelement argument">
|
122 |
<h4>$plugin_name</h4>
|
123 |
<code>string</code><p>Name of the plugin for messaging purposes</p></div>
|
|
|
|
|
|
|
124 |
</div></div>
|
125 |
</div>
|
126 |
</div>
|
130 |
<div class="row"><footer class="span12">
|
131 |
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>
|
132 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
133 |
+
generated on 2012-09-19T20:36:48-07:00.<br></footer></div>
|
134 |
</div>
|
135 |
</body>
|
136 |
</html>
|
phpDocs/classes/MLA_List_Table.html
CHANGED
@@ -61,26 +61,24 @@ calls the parent constructor to set some default configs.</span><pre>__construct
|
|
61 |
<li class="method public "><a href="#column_author" title="column_author :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_author()</pre></a></li>
|
62 |
<li class="method public "><a href="#column_base_file" title="column_base_file :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_base_file()</pre></a></li>
|
63 |
<li class="method public "><a href="#column_caption" title="column_caption :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_caption()</pre></a></li>
|
64 |
-
<li class="method public "><a href="#column_categories" title="column_categories :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_categories()</pre></a></li>
|
65 |
<li class="method public "><a href="#column_cb" title="column_cb :: Displays checkboxes for using bulk actions."><span class="description">Displays checkboxes for using bulk actions.</span><pre>column_cb()</pre></a></li>
|
66 |
<li class="method public "><a href="#column_date" title="column_date :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_date()</pre></a></li>
|
67 |
-
<li class="method public "><a href="#column_default" title="column_default ::
|
68 |
-
for a given column."><span class="description">Called when the parent class can't find a method specifically built
|
69 |
-
for a given column.</span><pre>column_default()</pre></a></li>
|
70 |
<li class="method public "><a href="#column_description" title="column_description :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_description()</pre></a></li>
|
71 |
<li class="method public "><a href="#column_featured" title="column_featured :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_featured()</pre></a></li>
|
72 |
<li class="method public "><a href="#column_icon" title="column_icon :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_icon()</pre></a></li>
|
73 |
<li class="method public "><a href="#column_inserted" title="column_inserted :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_inserted()</pre></a></li>
|
|
|
74 |
<li class="method public "><a href="#column_parent" title="column_parent :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_parent()</pre></a></li>
|
|
|
75 |
<li class="method public "><a href="#column_post_name" title="column_post_name :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_post_name()</pre></a></li>
|
76 |
<li class="method public "><a href="#column_post_title" title="column_post_title :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_post_title()</pre></a></li>
|
77 |
-
<li class="method public "><a href="#column_tags" title="column_tags :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_tags()</pre></a></li>
|
78 |
<li class="method public "><a href="#column_title_name" title="column_title_name :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_title_name()</pre></a></li>
|
79 |
-
<li class="method public "><a href="#extra_tablenav" title="extra_tablenav :: Extra controls to be displayed between bulk actions and pagination
|
80 |
<li class="method public "><a href="#get_bulk_actions" title="get_bulk_actions :: Get an associative array ( option_name => option_title ) with the list
|
81 |
of bulk actions available on this table."><span class="description">Get an associative array ( option_name => option_title ) with the list
|
82 |
of bulk actions available on this table.</span><pre>get_bulk_actions()</pre></a></li>
|
83 |
-
<li class="method public "><a href="#get_columns" title="get_columns :: This method dictates the table's columns and titles
|
84 |
<li class="method public "><a href="#get_hidden_columns" title="get_hidden_columns :: Returns the list of currently hidden columns from a user option or
|
85 |
from default values if the option is not set"><span class="description">Returns the list of currently hidden columns from a user option or
|
86 |
from default values if the option is not set</span><pre>get_hidden_columns()</pre></a></li>
|
@@ -88,25 +86,26 @@ from default values if the option is not set</span><pre>get_hidden_columns()</pr
|
|
88 |
and the value is db column to sort by."><span class="description">Returns an array where the key is the column that needs to be sortable
|
89 |
and the value is db column to sort by.</span><pre>get_sortable_columns()</pre></a></li>
|
90 |
<li class="method public "><a href="#get_views" title="get_views :: Returns an associative array listing all the views that can be used with this table."><span class="description">Returns an associative array listing all the views that can be used with this table.</span><pre>get_views()</pre></a></li>
|
91 |
-
<li class="method public "><a href="#
|
92 |
-
<li class="method public "><a href="#
|
93 |
-
<li class="method public "><a href="#
|
|
|
|
|
94 |
<li class="method public "><a href="#single_row" title="single_row :: Generates (echoes) content for a single row of the table"><span class="description">Generates (echoes) content for a single row of the table</span><pre>single_row()</pre></a></li>
|
95 |
<li class="nav-header private">» Private</li>
|
96 |
-
<li class="method private "><a href="#_avail_mime_types" title="_avail_mime_types :: Get mime types with one or more attachments for view preparation
|
97 |
<li class="method private "><a href="#_build_inline_data" title="_build_inline_data :: Add hidden fields with the data for use in the inline editor"><span class="description">Add hidden fields with the data for use in the inline editor</span><pre>_build_inline_data()</pre></a></li>
|
98 |
<li class="method private "><a href="#_build_rollover_actions" title="_build_rollover_actions :: Add rollover actions to exactly one of the following displayed columns:
|
99 |
'ID_parent', 'title_name', 'post_title', 'post_name'"><span class="description">Add rollover actions to exactly one of the following displayed columns:
|
100 |
'ID_parent', 'title_name', 'post_title', 'post_name'</span><pre>_build_rollover_actions()</pre></a></li>
|
101 |
-
<li class="method private "><a href="#_count_list_table_items" title="_count_list_table_items :: Get the total number of attachment posts"><span class="description">Get the total number of attachment posts</span><pre>_count_list_table_items()</pre></a></li>
|
102 |
<li class="method private "><a href="#_default_hidden_columns" title="_default_hidden_columns :: Access the default list of hidden columns"><span class="description">Access the default list of hidden columns</span><pre>_default_hidden_columns()</pre></a></li>
|
103 |
-
<li class="method private "><a href="#_mime_types" title="_mime_types :: Get possible mime types for view preparation
|
104 |
<li class="nav-header">
|
105 |
<i class="icon-custom icon-property"></i> Properties</li>
|
106 |
<li class="nav-header private">» Private</li>
|
107 |
<li class="property private "><a href="#%24currently_hidden" title="$currently_hidden :: Currently hidden columns"><span class="description">Currently hidden columns</span><pre>$currently_hidden</pre></a></li>
|
108 |
<li class="property private "><a href="#%24default_columns" title="$default_columns :: Table column definitions"><span class="description">Table column definitions</span><pre>$default_columns</pre></a></li>
|
109 |
-
<li class="property private "><a href="#%24default_hidden_columns" title="$default_hidden_columns :: Default values for
|
110 |
<li class="property private "><a href="#%24default_sortable_columns" title="$default_sortable_columns :: Sortable column definitions"><span class="description">Sortable column definitions</span><pre>$default_sortable_columns</pre></a></li>
|
111 |
<li class="property private "><a href="#%24rollover_id" title="$rollover_id :: Records assignment of row-level actions to a table row"><span class="description">Records assignment of row-level actions to a table row</span><pre>$rollover_id</pre></a></li>
|
112 |
</ul>
|
@@ -140,7 +139,7 @@ and the value is db column to sort by.</span><pre>get_sortable_columns()</pre></
|
|
140 |
<a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
|
141 |
<h2>Initializes some properties from $_REQUEST vairables, then
|
142 |
calls the parent constructor to set some default configs.</h2>
|
143 |
-
<pre>__construct() </pre>
|
144 |
<div class="labels"></div>
|
145 |
<div class="row collapse"><div class="detail-description">
|
146 |
<p class="long_description"></p>
|
@@ -218,7 +217,7 @@ calls the parent constructor to set some default configs.</h2>
|
|
218 |
<p class="long_description"></p>
|
219 |
<table class="table table-bordered"><tr>
|
220 |
<th>since</th>
|
221 |
-
<td>0.
|
222 |
</tr></table>
|
223 |
<h3>Parameters</h3>
|
224 |
<div class="subelement argument">
|
@@ -270,26 +269,6 @@ calls the parent constructor to set some default configs.</h2>
|
|
270 |
<code>string</code>HTML markup to be placed inside the column</div>
|
271 |
</div></div>
|
272 |
</div>
|
273 |
-
<a name="column_categories" id="column_categories"></a><div class="element clickable method public column_categories" data-toggle="collapse" data-target=".column_categories .collapse">
|
274 |
-
<h2>Supply the content for a custom column</h2>
|
275 |
-
<pre>column_categories(array $item) : string</pre>
|
276 |
-
<div class="labels"></div>
|
277 |
-
<div class="row collapse"><div class="detail-description">
|
278 |
-
<p class="long_description"></p>
|
279 |
-
<table class="table table-bordered"><tr>
|
280 |
-
<th>since</th>
|
281 |
-
<td>0.1</td>
|
282 |
-
</tr></table>
|
283 |
-
<h3>Parameters</h3>
|
284 |
-
<div class="subelement argument">
|
285 |
-
<h4>$item</h4>
|
286 |
-
<code>array</code><p>A singular attachment (post) object</p>
|
287 |
-
</div>
|
288 |
-
<h3>Returns</h3>
|
289 |
-
<div class="subelement response">
|
290 |
-
<code>string</code>HTML markup to be placed inside the column</div>
|
291 |
-
</div></div>
|
292 |
-
</div>
|
293 |
<a name="column_cb" id="column_cb"></a><div class="element clickable method public column_cb" data-toggle="collapse" data-target=".column_cb .collapse">
|
294 |
<h2>Displays checkboxes for using bulk actions.</h2>
|
295 |
<pre>column_cb(array $item) : string</pre>
|
@@ -332,13 +311,13 @@ is given special treatment when columns are processed.</p></p>
|
|
332 |
</div></div>
|
333 |
</div>
|
334 |
<a name="column_default" id="column_default"></a><div class="element clickable method public column_default" data-toggle="collapse" data-target=".column_default .collapse">
|
335 |
-
<h2>
|
336 |
-
for a given column.</h2>
|
337 |
<pre>column_default(array $item, array $column_name) : string</pre>
|
338 |
<div class="labels"></div>
|
339 |
<div class="row collapse"><div class="detail-description">
|
340 |
-
<p class="long_description"><p>
|
341 |
-
|
|
|
342 |
<table class="table table-bordered"><tr>
|
343 |
<th>since</th>
|
344 |
<td>0.1</td>
|
@@ -437,6 +416,26 @@ so this function returns a troubleshooting message.</p></p>
|
|
437 |
<code>string</code>HTML markup to be placed inside the column</div>
|
438 |
</div></div>
|
439 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
<a name="column_parent" id="column_parent"></a><div class="element clickable method public column_parent" data-toggle="collapse" data-target=".column_parent .collapse">
|
441 |
<h2>Supply the content for a custom column</h2>
|
442 |
<pre>column_parent(array $item) : string</pre>
|
@@ -457,15 +456,15 @@ so this function returns a troubleshooting message.</p></p>
|
|
457 |
<code>string</code>HTML markup to be placed inside the column</div>
|
458 |
</div></div>
|
459 |
</div>
|
460 |
-
<a name="
|
461 |
<h2>Supply the content for a custom column</h2>
|
462 |
-
<pre>
|
463 |
<div class="labels"></div>
|
464 |
<div class="row collapse"><div class="detail-description">
|
465 |
<p class="long_description"></p>
|
466 |
<table class="table table-bordered"><tr>
|
467 |
<th>since</th>
|
468 |
-
<td>0.
|
469 |
</tr></table>
|
470 |
<h3>Parameters</h3>
|
471 |
<div class="subelement argument">
|
@@ -477,9 +476,9 @@ so this function returns a troubleshooting message.</p></p>
|
|
477 |
<code>string</code>HTML markup to be placed inside the column</div>
|
478 |
</div></div>
|
479 |
</div>
|
480 |
-
<a name="
|
481 |
<h2>Supply the content for a custom column</h2>
|
482 |
-
<pre>
|
483 |
<div class="labels"></div>
|
484 |
<div class="row collapse"><div class="detail-description">
|
485 |
<p class="long_description"></p>
|
@@ -497,9 +496,9 @@ so this function returns a troubleshooting message.</p></p>
|
|
497 |
<code>string</code>HTML markup to be placed inside the column</div>
|
498 |
</div></div>
|
499 |
</div>
|
500 |
-
<a name="
|
501 |
<h2>Supply the content for a custom column</h2>
|
502 |
-
<pre>
|
503 |
<div class="labels"></div>
|
504 |
<div class="row collapse"><div class="detail-description">
|
505 |
<p class="long_description"></p>
|
@@ -538,11 +537,11 @@ so this function returns a troubleshooting message.</p></p>
|
|
538 |
</div></div>
|
539 |
</div>
|
540 |
<a name="extra_tablenav" id="extra_tablenav"></a><div class="element clickable method public extra_tablenav" data-toggle="collapse" data-target=".extra_tablenav .collapse">
|
541 |
-
<h2>Extra controls to be displayed between bulk actions and pagination
|
542 |
<pre>extra_tablenav(string $which) : array</pre>
|
543 |
<div class="labels"></div>
|
544 |
<div class="row collapse"><div class="detail-description">
|
545 |
-
<p class="long_description"><p>Modeled after class-wp-posts-list-table.php in wp-admin/includes
|
546 |
<table class="table table-bordered"><tr>
|
547 |
<th>since</th>
|
548 |
<td>0.1</td>
|
@@ -574,7 +573,7 @@ of bulk actions available on this table.</h2>
|
|
574 |
</div></div>
|
575 |
</div>
|
576 |
<a name="get_columns" id="get_columns"></a><div class="element clickable method public get_columns" data-toggle="collapse" data-target=".get_columns .collapse">
|
577 |
-
<h2>This method dictates the table's columns and titles
|
578 |
<pre>get_columns() : array</pre>
|
579 |
<div class="labels"></div>
|
580 |
<div class="row collapse"><div class="detail-description">
|
@@ -636,9 +635,37 @@ if set.</p></p>
|
|
636 |
<code>array</code>View information,e.g., array ( id => link )</div>
|
637 |
</div></div>
|
638 |
</div>
|
639 |
-
<a name="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
<h2>Handler for filter 'manage_media_page_mla-menu_columns'</h2>
|
641 |
-
<pre>
|
642 |
<div class="labels"></div>
|
643 |
<div class="row collapse"><div class="detail-description">
|
644 |
<p class="long_description"><p>This required filter dictates the table's columns and titles. Set when the
|
@@ -653,9 +680,9 @@ to affect the "screen options" setup.</p></p>
|
|
653 |
<code>array</code>list of table columns</div>
|
654 |
</div></div>
|
655 |
</div>
|
656 |
-
<a name="
|
657 |
<h2>Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'</h2>
|
658 |
-
<pre>
|
659 |
<div class="labels"></div>
|
660 |
<div class="row collapse"><div class="detail-description">
|
661 |
<p class="long_description"><p>Required because the screen.php get_hidden_columns function only uses
|
@@ -682,8 +709,8 @@ is not created in time for the call from screen.php.</p></p>
|
|
682 |
</div></div>
|
683 |
</div>
|
684 |
<a name="prepare_items" id="prepare_items"></a><div class="element clickable method public prepare_items" data-toggle="collapse" data-target=".prepare_items .collapse">
|
685 |
-
<h2>Prepares the list of items for displaying
|
686 |
-
<pre>prepare_items() </pre>
|
687 |
<div class="labels"></div>
|
688 |
<div class="row collapse"><div class="detail-description">
|
689 |
<p class="long_description"><p>This is where you prepare your data for display. This method will usually
|
@@ -698,7 +725,7 @@ $this->set_pagination_args().</p></p>
|
|
698 |
</div>
|
699 |
<a name="single_row" id="single_row"></a><div class="element clickable method public single_row" data-toggle="collapse" data-target=".single_row .collapse">
|
700 |
<h2>Generates (echoes) content for a single row of the table</h2>
|
701 |
-
<pre>single_row(object $item) :
|
702 |
<div class="labels"></div>
|
703 |
<div class="row collapse"><div class="detail-description">
|
704 |
<p class="long_description"></p>
|
@@ -709,14 +736,11 @@ $this->set_pagination_args().</p></p>
|
|
709 |
<h3>Parameters</h3>
|
710 |
<div class="subelement argument">
|
711 |
<h4>$item</h4>
|
712 |
-
<code>object</code><p>
|
713 |
-
<h3>Returns</h3>
|
714 |
-
<div class="subelement response">
|
715 |
-
<code>\nothing</code>Echoes the row HTML</div>
|
716 |
</div></div>
|
717 |
</div>
|
718 |
<a name="_avail_mime_types" id="_avail_mime_types"></a><div class="element clickable method private _avail_mime_types" data-toggle="collapse" data-target="._avail_mime_types .collapse">
|
719 |
-
<h2>Get mime types with one or more attachments for view preparation
|
720 |
<pre>_avail_mime_types(array $num_posts) : array</pre>
|
721 |
<div class="labels"></div>
|
722 |
<div class="row collapse"><div class="detail-description">
|
@@ -779,26 +803,6 @@ with additional entries.</p></p>
|
|
779 |
<code>array</code>Names and URLs of row-level actions</div>
|
780 |
</div></div>
|
781 |
</div>
|
782 |
-
<a name="_count_list_table_items" id="_count_list_table_items"></a><div class="element clickable method private _count_list_table_items" data-toggle="collapse" data-target="._count_list_table_items .collapse">
|
783 |
-
<h2>Get the total number of attachment posts</h2>
|
784 |
-
<pre>_count_list_table_items(array $request) : integer</pre>
|
785 |
-
<div class="labels"></div>
|
786 |
-
<div class="row collapse"><div class="detail-description">
|
787 |
-
<p class="long_description"></p>
|
788 |
-
<table class="table table-bordered"><tr>
|
789 |
-
<th>since</th>
|
790 |
-
<td>0.1</td>
|
791 |
-
</tr></table>
|
792 |
-
<h3>Parameters</h3>
|
793 |
-
<div class="subelement argument">
|
794 |
-
<h4>$request</h4>
|
795 |
-
<code>array</code><p>Query variables, e.g., from $_REQUEST</p>
|
796 |
-
</div>
|
797 |
-
<h3>Returns</h3>
|
798 |
-
<div class="subelement response">
|
799 |
-
<code>integer</code>Number of attachment posts</div>
|
800 |
-
</div></div>
|
801 |
-
</div>
|
802 |
<a name="_default_hidden_columns" id="_default_hidden_columns"></a><div class="element clickable method private _default_hidden_columns" data-toggle="collapse" data-target="._default_hidden_columns .collapse">
|
803 |
<h2>Access the default list of hidden columns</h2>
|
804 |
<pre>_default_hidden_columns() : array</pre>
|
@@ -815,7 +819,7 @@ with additional entries.</p></p>
|
|
815 |
</div></div>
|
816 |
</div>
|
817 |
<a name="_mime_types" id="_mime_types"></a><div class="element clickable method private _mime_types" data-toggle="collapse" data-target="._mime_types .collapse">
|
818 |
-
<h2>Get possible mime types for view preparation
|
819 |
<pre>_mime_types() : array</pre>
|
820 |
<div class="labels"></div>
|
821 |
<div class="row collapse"><div class="detail-description">
|
@@ -855,7 +859,9 @@ use the special slug "cb".</p>
|
|
855 |
|
856 |
<p>The 'cb' column is treated differently than the rest. If including a checkbox
|
857 |
column in your table you must create a column_cb() method. If you don't need
|
858 |
-
bulk actions or checkboxes, simply leave the 'cb' entry out of your array.</p
|
|
|
|
|
859 |
<table class="table table-bordered"><tr>
|
860 |
<th>since</th>
|
861 |
<td>0.1</td>
|
@@ -863,7 +869,7 @@ bulk actions or checkboxes, simply leave the 'cb' entry out of your array.</p></
|
|
863 |
</div></div>
|
864 |
</div>
|
865 |
<a name="%24default_hidden_columns" id="$default_hidden_columns"> </a><div class="element clickable property private $default_hidden_columns" data-toggle="collapse" data-target=".$default_hidden_columns .collapse">
|
866 |
-
<h2>Default values for
|
867 |
<pre>$default_hidden_columns : array</pre>
|
868 |
<div class="labels"></div>
|
869 |
<div class="row collapse"><div class="detail-description">
|
@@ -871,7 +877,9 @@ bulk actions or checkboxes, simply leave the 'cb' entry out of your array.</p></
|
|
871 |
the user has not altered the selection of hidden columns.</p>
|
872 |
|
873 |
<p>The value on the right-hand side must match the column slug, e.g.,
|
874 |
-
array(0 => 'ID_parent, 1 => 'title_name').</p
|
|
|
|
|
875 |
<table class="table table-bordered"><tr>
|
876 |
<th>since</th>
|
877 |
<td>0.1</td>
|
@@ -915,7 +923,7 @@ sorted by that column. This is computed each time the table is displayed.</p></p
|
|
915 |
<div class="row"><footer class="span12">
|
916 |
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>
|
917 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
918 |
-
generated on 2012-09-
|
919 |
</div>
|
920 |
</body>
|
921 |
</html>
|
61 |
<li class="method public "><a href="#column_author" title="column_author :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_author()</pre></a></li>
|
62 |
<li class="method public "><a href="#column_base_file" title="column_base_file :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_base_file()</pre></a></li>
|
63 |
<li class="method public "><a href="#column_caption" title="column_caption :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_caption()</pre></a></li>
|
|
|
64 |
<li class="method public "><a href="#column_cb" title="column_cb :: Displays checkboxes for using bulk actions."><span class="description">Displays checkboxes for using bulk actions.</span><pre>column_cb()</pre></a></li>
|
65 |
<li class="method public "><a href="#column_date" title="column_date :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_date()</pre></a></li>
|
66 |
+
<li class="method public "><a href="#column_default" title="column_default :: Supply a column value if no column-specific function has been defined"><span class="description">Supply a column value if no column-specific function has been defined</span><pre>column_default()</pre></a></li>
|
|
|
|
|
67 |
<li class="method public "><a href="#column_description" title="column_description :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_description()</pre></a></li>
|
68 |
<li class="method public "><a href="#column_featured" title="column_featured :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_featured()</pre></a></li>
|
69 |
<li class="method public "><a href="#column_icon" title="column_icon :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_icon()</pre></a></li>
|
70 |
<li class="method public "><a href="#column_inserted" title="column_inserted :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_inserted()</pre></a></li>
|
71 |
+
<li class="method public "><a href="#column_modified" title="column_modified :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_modified()</pre></a></li>
|
72 |
<li class="method public "><a href="#column_parent" title="column_parent :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_parent()</pre></a></li>
|
73 |
+
<li class="method public "><a href="#column_post_mime_type" title="column_post_mime_type :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_post_mime_type()</pre></a></li>
|
74 |
<li class="method public "><a href="#column_post_name" title="column_post_name :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_post_name()</pre></a></li>
|
75 |
<li class="method public "><a href="#column_post_title" title="column_post_title :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_post_title()</pre></a></li>
|
|
|
76 |
<li class="method public "><a href="#column_title_name" title="column_title_name :: Supply the content for a custom column"><span class="description">Supply the content for a custom column</span><pre>column_title_name()</pre></a></li>
|
77 |
+
<li class="method public "><a href="#extra_tablenav" title="extra_tablenav :: Extra controls to be displayed between bulk actions and pagination"><span class="description">Extra controls to be displayed between bulk actions and pagination</span><pre>extra_tablenav()</pre></a></li>
|
78 |
<li class="method public "><a href="#get_bulk_actions" title="get_bulk_actions :: Get an associative array ( option_name => option_title ) with the list
|
79 |
of bulk actions available on this table."><span class="description">Get an associative array ( option_name => option_title ) with the list
|
80 |
of bulk actions available on this table.</span><pre>get_bulk_actions()</pre></a></li>
|
81 |
+
<li class="method public "><a href="#get_columns" title="get_columns :: This method dictates the table's columns and titles"><span class="description">This method dictates the table's columns and titles</span><pre>get_columns()</pre></a></li>
|
82 |
<li class="method public "><a href="#get_hidden_columns" title="get_hidden_columns :: Returns the list of currently hidden columns from a user option or
|
83 |
from default values if the option is not set"><span class="description">Returns the list of currently hidden columns from a user option or
|
84 |
from default values if the option is not set</span><pre>get_hidden_columns()</pre></a></li>
|
86 |
and the value is db column to sort by."><span class="description">Returns an array where the key is the column that needs to be sortable
|
87 |
and the value is db column to sort by.</span><pre>get_sortable_columns()</pre></a></li>
|
88 |
<li class="method public "><a href="#get_views" title="get_views :: Returns an associative array listing all the views that can be used with this table."><span class="description">Returns an associative array listing all the views that can be used with this table.</span><pre>get_views()</pre></a></li>
|
89 |
+
<li class="method public "><a href="#mla_admin_init_action" title="mla_admin_init_action :: Adds support for taxonomy columns"><span class="description">Adds support for taxonomy columns</span><pre>mla_admin_init_action()</pre></a></li>
|
90 |
+
<li class="method public "><a href="#mla_get_sortable_columns" title="mla_get_sortable_columns :: Return the names and display values of the sortable columns"><span class="description">Return the names and display values of the sortable columns</span><pre>mla_get_sortable_columns()</pre></a></li>
|
91 |
+
<li class="method public "><a href="#mla_manage_columns_filter" title="mla_manage_columns_filter :: Handler for filter 'manage_media_page_mla-menu_columns'"><span class="description">Handler for filter 'manage_media_page_mla-menu_columns'</span><pre>mla_manage_columns_filter()</pre></a></li>
|
92 |
+
<li class="method public "><a href="#mla_manage_hidden_columns_filter" title="mla_manage_hidden_columns_filter :: Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'"><span class="description">Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'</span><pre>mla_manage_hidden_columns_filter()</pre></a></li>
|
93 |
+
<li class="method public "><a href="#prepare_items" title="prepare_items :: Prepares the list of items for displaying"><span class="description">Prepares the list of items for displaying</span><pre>prepare_items()</pre></a></li>
|
94 |
<li class="method public "><a href="#single_row" title="single_row :: Generates (echoes) content for a single row of the table"><span class="description">Generates (echoes) content for a single row of the table</span><pre>single_row()</pre></a></li>
|
95 |
<li class="nav-header private">» Private</li>
|
96 |
+
<li class="method private "><a href="#_avail_mime_types" title="_avail_mime_types :: Get mime types with one or more attachments for view preparation"><span class="description">Get mime types with one or more attachments for view preparation</span><pre>_avail_mime_types()</pre></a></li>
|
97 |
<li class="method private "><a href="#_build_inline_data" title="_build_inline_data :: Add hidden fields with the data for use in the inline editor"><span class="description">Add hidden fields with the data for use in the inline editor</span><pre>_build_inline_data()</pre></a></li>
|
98 |
<li class="method private "><a href="#_build_rollover_actions" title="_build_rollover_actions :: Add rollover actions to exactly one of the following displayed columns:
|
99 |
'ID_parent', 'title_name', 'post_title', 'post_name'"><span class="description">Add rollover actions to exactly one of the following displayed columns:
|
100 |
'ID_parent', 'title_name', 'post_title', 'post_name'</span><pre>_build_rollover_actions()</pre></a></li>
|
|
|
101 |
<li class="method private "><a href="#_default_hidden_columns" title="_default_hidden_columns :: Access the default list of hidden columns"><span class="description">Access the default list of hidden columns</span><pre>_default_hidden_columns()</pre></a></li>
|
102 |
+
<li class="method private "><a href="#_mime_types" title="_mime_types :: Get possible mime types for view preparation"><span class="description">Get possible mime types for view preparation</span><pre>_mime_types()</pre></a></li>
|
103 |
<li class="nav-header">
|
104 |
<i class="icon-custom icon-property"></i> Properties</li>
|
105 |
<li class="nav-header private">» Private</li>
|
106 |
<li class="property private "><a href="#%24currently_hidden" title="$currently_hidden :: Currently hidden columns"><span class="description">Currently hidden columns</span><pre>$currently_hidden</pre></a></li>
|
107 |
<li class="property private "><a href="#%24default_columns" title="$default_columns :: Table column definitions"><span class="description">Table column definitions</span><pre>$default_columns</pre></a></li>
|
108 |
+
<li class="property private "><a href="#%24default_hidden_columns" title="$default_hidden_columns :: Default values for hidden columns"><span class="description">Default values for hidden columns</span><pre>$default_hidden_columns</pre></a></li>
|
109 |
<li class="property private "><a href="#%24default_sortable_columns" title="$default_sortable_columns :: Sortable column definitions"><span class="description">Sortable column definitions</span><pre>$default_sortable_columns</pre></a></li>
|
110 |
<li class="property private "><a href="#%24rollover_id" title="$rollover_id :: Records assignment of row-level actions to a table row"><span class="description">Records assignment of row-level actions to a table row</span><pre>$rollover_id</pre></a></li>
|
111 |
</ul>
|
139 |
<a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
|
140 |
<h2>Initializes some properties from $_REQUEST vairables, then
|
141 |
calls the parent constructor to set some default configs.</h2>
|
142 |
+
<pre>__construct() : void</pre>
|
143 |
<div class="labels"></div>
|
144 |
<div class="row collapse"><div class="detail-description">
|
145 |
<p class="long_description"></p>
|
217 |
<p class="long_description"></p>
|
218 |
<table class="table table-bordered"><tr>
|
219 |
<th>since</th>
|
220 |
+
<td>0.30</td>
|
221 |
</tr></table>
|
222 |
<h3>Parameters</h3>
|
223 |
<div class="subelement argument">
|
269 |
<code>string</code>HTML markup to be placed inside the column</div>
|
270 |
</div></div>
|
271 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
<a name="column_cb" id="column_cb"></a><div class="element clickable method public column_cb" data-toggle="collapse" data-target=".column_cb .collapse">
|
273 |
<h2>Displays checkboxes for using bulk actions.</h2>
|
274 |
<pre>column_cb(array $item) : string</pre>
|
311 |
</div></div>
|
312 |
</div>
|
313 |
<a name="column_default" id="column_default"></a><div class="element clickable method public column_default" data-toggle="collapse" data-target=".column_default .collapse">
|
314 |
+
<h2>Supply a column value if no column-specific function has been defined</h2>
|
|
|
315 |
<pre>column_default(array $item, array $column_name) : string</pre>
|
316 |
<div class="labels"></div>
|
317 |
<div class="row collapse"><div class="detail-description">
|
318 |
+
<p class="long_description"><p>Called when the parent class can't find a method specifically built for a
|
319 |
+
given column. The taxonomy columns are handled here. All other columns should
|
320 |
+
have a specific method, so this function returns a troubleshooting message.</p></p>
|
321 |
<table class="table table-bordered"><tr>
|
322 |
<th>since</th>
|
323 |
<td>0.1</td>
|
416 |
<code>string</code>HTML markup to be placed inside the column</div>
|
417 |
</div></div>
|
418 |
</div>
|
419 |
+
<a name="column_modified" id="column_modified"></a><div class="element clickable method public column_modified" data-toggle="collapse" data-target=".column_modified .collapse">
|
420 |
+
<h2>Supply the content for a custom column</h2>
|
421 |
+
<pre>column_modified(array $item) : string</pre>
|
422 |
+
<div class="labels"></div>
|
423 |
+
<div class="row collapse"><div class="detail-description">
|
424 |
+
<p class="long_description"></p>
|
425 |
+
<table class="table table-bordered"><tr>
|
426 |
+
<th>since</th>
|
427 |
+
<td>0.30</td>
|
428 |
+
</tr></table>
|
429 |
+
<h3>Parameters</h3>
|
430 |
+
<div class="subelement argument">
|
431 |
+
<h4>$item</h4>
|
432 |
+
<code>array</code><p>A singular attachment (post) object</p>
|
433 |
+
</div>
|
434 |
+
<h3>Returns</h3>
|
435 |
+
<div class="subelement response">
|
436 |
+
<code>string</code>HTML markup to be placed inside the column</div>
|
437 |
+
</div></div>
|
438 |
+
</div>
|
439 |
<a name="column_parent" id="column_parent"></a><div class="element clickable method public column_parent" data-toggle="collapse" data-target=".column_parent .collapse">
|
440 |
<h2>Supply the content for a custom column</h2>
|
441 |
<pre>column_parent(array $item) : string</pre>
|
456 |
<code>string</code>HTML markup to be placed inside the column</div>
|
457 |
</div></div>
|
458 |
</div>
|
459 |
+
<a name="column_post_mime_type" id="column_post_mime_type"></a><div class="element clickable method public column_post_mime_type" data-toggle="collapse" data-target=".column_post_mime_type .collapse">
|
460 |
<h2>Supply the content for a custom column</h2>
|
461 |
+
<pre>column_post_mime_type(array $item) : string</pre>
|
462 |
<div class="labels"></div>
|
463 |
<div class="row collapse"><div class="detail-description">
|
464 |
<p class="long_description"></p>
|
465 |
<table class="table table-bordered"><tr>
|
466 |
<th>since</th>
|
467 |
+
<td>0.30</td>
|
468 |
</tr></table>
|
469 |
<h3>Parameters</h3>
|
470 |
<div class="subelement argument">
|
476 |
<code>string</code>HTML markup to be placed inside the column</div>
|
477 |
</div></div>
|
478 |
</div>
|
479 |
+
<a name="column_post_name" id="column_post_name"></a><div class="element clickable method public column_post_name" data-toggle="collapse" data-target=".column_post_name .collapse">
|
480 |
<h2>Supply the content for a custom column</h2>
|
481 |
+
<pre>column_post_name(array $item) : string</pre>
|
482 |
<div class="labels"></div>
|
483 |
<div class="row collapse"><div class="detail-description">
|
484 |
<p class="long_description"></p>
|
496 |
<code>string</code>HTML markup to be placed inside the column</div>
|
497 |
</div></div>
|
498 |
</div>
|
499 |
+
<a name="column_post_title" id="column_post_title"></a><div class="element clickable method public column_post_title" data-toggle="collapse" data-target=".column_post_title .collapse">
|
500 |
<h2>Supply the content for a custom column</h2>
|
501 |
+
<pre>column_post_title(array $item) : string</pre>
|
502 |
<div class="labels"></div>
|
503 |
<div class="row collapse"><div class="detail-description">
|
504 |
<p class="long_description"></p>
|
537 |
</div></div>
|
538 |
</div>
|
539 |
<a name="extra_tablenav" id="extra_tablenav"></a><div class="element clickable method public extra_tablenav" data-toggle="collapse" data-target=".extra_tablenav .collapse">
|
540 |
+
<h2>Extra controls to be displayed between bulk actions and pagination</h2>
|
541 |
<pre>extra_tablenav(string $which) : array</pre>
|
542 |
<div class="labels"></div>
|
543 |
<div class="row collapse"><div class="detail-description">
|
544 |
+
<p class="long_description"><p>Modeled after class-wp-posts-list-table.php in wp-admin/includes.</p></p>
|
545 |
<table class="table table-bordered"><tr>
|
546 |
<th>since</th>
|
547 |
<td>0.1</td>
|
573 |
</div></div>
|
574 |
</div>
|
575 |
<a name="get_columns" id="get_columns"></a><div class="element clickable method public get_columns" data-toggle="collapse" data-target=".get_columns .collapse">
|
576 |
+
<h2>This method dictates the table's columns and titles</h2>
|
577 |
<pre>get_columns() : array</pre>
|
578 |
<div class="labels"></div>
|
579 |
<div class="row collapse"><div class="detail-description">
|
635 |
<code>array</code>View information,e.g., array ( id => link )</div>
|
636 |
</div></div>
|
637 |
</div>
|
638 |
+
<a name="mla_admin_init_action" id="mla_admin_init_action"></a><div class="element clickable method public mla_admin_init_action" data-toggle="collapse" data-target=".mla_admin_init_action .collapse">
|
639 |
+
<h2>Adds support for taxonomy columns</h2>
|
640 |
+
<pre>mla_admin_init_action() : void</pre>
|
641 |
+
<div class="labels"></div>
|
642 |
+
<div class="row collapse"><div class="detail-description">
|
643 |
+
<p class="long_description"><p>Called in the admin_init action because the list_table object isn't
|
644 |
+
created in time to affect the "screen options" setup.</p></p>
|
645 |
+
<table class="table table-bordered"><tr>
|
646 |
+
<th>since</th>
|
647 |
+
<td>0.30</td>
|
648 |
+
</tr></table>
|
649 |
+
</div></div>
|
650 |
+
</div>
|
651 |
+
<a name="mla_get_sortable_columns" id="mla_get_sortable_columns"></a><div class="element clickable method public mla_get_sortable_columns" data-toggle="collapse" data-target=".mla_get_sortable_columns .collapse">
|
652 |
+
<h2>Return the names and display values of the sortable columns</h2>
|
653 |
+
<pre>mla_get_sortable_columns() : array</pre>
|
654 |
+
<div class="labels"></div>
|
655 |
+
<div class="row collapse"><div class="detail-description">
|
656 |
+
<p class="long_description"></p>
|
657 |
+
<table class="table table-bordered"><tr>
|
658 |
+
<th>since</th>
|
659 |
+
<td>0.30</td>
|
660 |
+
</tr></table>
|
661 |
+
<h3>Returns</h3>
|
662 |
+
<div class="subelement response">
|
663 |
+
<code>array</code>name => array( orderby value, heading ) for sortable columns</div>
|
664 |
+
</div></div>
|
665 |
+
</div>
|
666 |
+
<a name="mla_manage_columns_filter" id="mla_manage_columns_filter"></a><div class="element clickable method public mla_manage_columns_filter" data-toggle="collapse" data-target=".mla_manage_columns_filter .collapse">
|
667 |
<h2>Handler for filter 'manage_media_page_mla-menu_columns'</h2>
|
668 |
+
<pre>mla_manage_columns_filter() : array</pre>
|
669 |
<div class="labels"></div>
|
670 |
<div class="row collapse"><div class="detail-description">
|
671 |
<p class="long_description"><p>This required filter dictates the table's columns and titles. Set when the
|
680 |
<code>array</code>list of table columns</div>
|
681 |
</div></div>
|
682 |
</div>
|
683 |
+
<a name="mla_manage_hidden_columns_filter" id="mla_manage_hidden_columns_filter"></a><div class="element clickable method public mla_manage_hidden_columns_filter" data-toggle="collapse" data-target=".mla_manage_hidden_columns_filter .collapse">
|
684 |
<h2>Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden'</h2>
|
685 |
+
<pre>mla_manage_hidden_columns_filter(string $result, string $option, object $user_data) : array</pre>
|
686 |
<div class="labels"></div>
|
687 |
<div class="row collapse"><div class="detail-description">
|
688 |
<p class="long_description"><p>Required because the screen.php get_hidden_columns function only uses
|
709 |
</div></div>
|
710 |
</div>
|
711 |
<a name="prepare_items" id="prepare_items"></a><div class="element clickable method public prepare_items" data-toggle="collapse" data-target=".prepare_items .collapse">
|
712 |
+
<h2>Prepares the list of items for displaying</h2>
|
713 |
+
<pre>prepare_items() : void</pre>
|
714 |
<div class="labels"></div>
|
715 |
<div class="row collapse"><div class="detail-description">
|
716 |
<p class="long_description"><p>This is where you prepare your data for display. This method will usually
|
725 |
</div>
|
726 |
<a name="single_row" id="single_row"></a><div class="element clickable method public single_row" data-toggle="collapse" data-target=".single_row .collapse">
|
727 |
<h2>Generates (echoes) content for a single row of the table</h2>
|
728 |
+
<pre>single_row(object $item) : void</pre>
|
729 |
<div class="labels"></div>
|
730 |
<div class="row collapse"><div class="detail-description">
|
731 |
<p class="long_description"></p>
|
736 |
<h3>Parameters</h3>
|
737 |
<div class="subelement argument">
|
738 |
<h4>$item</h4>
|
739 |
+
<code>object</code><p>the current item</p></div>
|
|
|
|
|
|
|
740 |
</div></div>
|
741 |
</div>
|
742 |
<a name="_avail_mime_types" id="_avail_mime_types"></a><div class="element clickable method private _avail_mime_types" data-toggle="collapse" data-target="._avail_mime_types .collapse">
|
743 |
+
<h2>Get mime types with one or more attachments for view preparation</h2>
|
744 |
<pre>_avail_mime_types(array $num_posts) : array</pre>
|
745 |
<div class="labels"></div>
|
746 |
<div class="row collapse"><div class="detail-description">
|
803 |
<code>array</code>Names and URLs of row-level actions</div>
|
804 |
</div></div>
|
805 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
806 |
<a name="_default_hidden_columns" id="_default_hidden_columns"></a><div class="element clickable method private _default_hidden_columns" data-toggle="collapse" data-target="._default_hidden_columns .collapse">
|
807 |
<h2>Access the default list of hidden columns</h2>
|
808 |
<pre>_default_hidden_columns() : array</pre>
|
819 |
</div></div>
|
820 |
</div>
|
821 |
<a name="_mime_types" id="_mime_types"></a><div class="element clickable method private _mime_types" data-toggle="collapse" data-target="._mime_types .collapse">
|
822 |
+
<h2>Get possible mime types for view preparation</h2>
|
823 |
<pre>_mime_types() : array</pre>
|
824 |
<div class="labels"></div>
|
825 |
<div class="row collapse"><div class="detail-description">
|
859 |
|
860 |
<p>The 'cb' column is treated differently than the rest. If including a checkbox
|
861 |
column in your table you must create a column_cb() method. If you don't need
|
862 |
+
bulk actions or checkboxes, simply leave the 'cb' entry out of your array.</p>
|
863 |
+
|
864 |
+
<p>Taxonomy columns are added to this array by mla_admin_init_action.</p></p>
|
865 |
<table class="table table-bordered"><tr>
|
866 |
<th>since</th>
|
867 |
<td>0.1</td>
|
869 |
</div></div>
|
870 |
</div>
|
871 |
<a name="%24default_hidden_columns" id="$default_hidden_columns"> </a><div class="element clickable property private $default_hidden_columns" data-toggle="collapse" data-target=".$default_hidden_columns .collapse">
|
872 |
+
<h2>Default values for hidden columns</h2>
|
873 |
<pre>$default_hidden_columns : array</pre>
|
874 |
<div class="labels"></div>
|
875 |
<div class="row collapse"><div class="detail-description">
|
877 |
the user has not altered the selection of hidden columns.</p>
|
878 |
|
879 |
<p>The value on the right-hand side must match the column slug, e.g.,
|
880 |
+
array(0 => 'ID_parent, 1 => 'title_name').</p>
|
881 |
+
|
882 |
+
<p>Taxonomy columns are added to this array by mla_admin_init_action.</p></p>
|
883 |
<table class="table table-bordered"><tr>
|
884 |
<th>since</th>
|
885 |
<td>0.1</td>
|
923 |
<div class="row"><footer class="span12">
|
924 |
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>
|
925 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
926 |
+
generated on 2012-09-19T20:36:48-07:00.<br></footer></div>
|
927 |
</div>
|
928 |
</body>
|
929 |
</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-09-
|
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-09-19T20:36:48-07:00.<br></footer></div>
|
66 |
</div>
|
67 |
</body>
|
68 |
</html>
|
phpDocs/errors.html
CHANGED
@@ -74,7 +74,7 @@
|
|
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-09-
|
78 |
</div>
|
79 |
</body>
|
80 |
</html>
|
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-09-19T20:36:48-07:00.<br></footer></div>
|
78 |
</div>
|
79 |
</body>
|
80 |
</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-09-
|
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-09-19T20:36:48-07:00.<br></footer></div>
|
63 |
</div>
|
64 |
</body>
|
65 |
</html>
|
phpDocs/index.html
CHANGED
@@ -79,7 +79,7 @@
|
|
79 |
<div class="row"><footer class="span12">
|
80 |
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
81 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
82 |
-
generated on 2012-09-
|
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-09-19T20:36:48-07:00.<br></footer></div>
|
83 |
</div>
|
84 |
</body>
|
85 |
</html>
|
phpDocs/markers.html
CHANGED
@@ -64,7 +64,7 @@
|
|
64 |
<div class="row"><footer class="span12">
|
65 |
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
66 |
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a8</a> and<br>
|
67 |
-
generated on 2012-09-
|
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-09-19T20:36:48-07:00.<br></footer></div>
|
68 |
</div>
|
69 |
</body>
|
70 |
</html>
|
phpDocs/namespaces/global.html
CHANGED
@@ -92,7 +92,7 @@ of images and files held in the WordPress Media Library.</p>
|
|
92 |
<a name="MLAData" id="MLAData"></a><div class="element ajax clickable class" href="../classes/MLAData.html">
|
93 |
<h1>MLAData<a href="../classes/MLAData.html">¶</a>
|
94 |
</h1>
|
95 |
-
<p class="short_description">Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs
|
96 |
<div class="details collapse"></div>
|
97 |
<a href="../classes/MLAData.html" class="more">« More »</a>
|
98 |
</div>
|
@@ -159,7 +159,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-09-
|
163 |
</div>
|
164 |
</body>
|
165 |
</html>
|
92 |
<a name="MLAData" id="MLAData"></a><div class="element ajax clickable class" href="../classes/MLAData.html">
|
93 |
<h1>MLAData<a href="../classes/MLAData.html">¶</a>
|
94 |
</h1>
|
95 |
+
<p class="short_description">Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs</p>
|
96 |
<div class="details collapse"></div>
|
97 |
<a href="../classes/MLAData.html" class="more">« More »</a>
|
98 |
</div>
|
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-09-19T20:36:48-07:00.<br></footer></div>
|
163 |
</div>
|
164 |
</body>
|
165 |
</html>
|
phpDocs/packages/Media Library Assistant.html
CHANGED
@@ -60,7 +60,7 @@
|
|
60 |
<li class="function "><a href="#mla_name_conflict_reporting_action" title="mla_name_conflict_reporting_action :: Displays name conflict error messages at the top of the Dashboard"><span class="description">Displays name conflict error messages at the top of the Dashboard</span><pre>mla_name_conflict_reporting_action</pre></a></li>
|
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
|
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>
|
@@ -112,7 +112,7 @@ of images and files held in the WordPress Media Library.</p>
|
|
112 |
<a name="MLAData" id="MLAData"></a><div class="element ajax clickable class" href="../classes/MLAData.html">
|
113 |
<h1>MLAData<a href="../classes/MLAData.html">¶</a>
|
114 |
</h1>
|
115 |
-
<p class="short_description">Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs
|
116 |
<div class="details collapse"></div>
|
117 |
<a href="../classes/MLAData.html" class="more">« More »</a>
|
118 |
</div>
|
@@ -179,7 +179,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-09-
|
183 |
</div>
|
184 |
</body>
|
185 |
</html>
|
60 |
<li class="function "><a href="#mla_name_conflict_reporting_action" title="mla_name_conflict_reporting_action :: Displays name conflict error messages at the top of the Dashboard"><span class="description">Displays name conflict error messages at the top of the Dashboard</span><pre>mla_name_conflict_reporting_action</pre></a></li>
|
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>
|
112 |
<a name="MLAData" id="MLAData"></a><div class="element ajax clickable class" href="../classes/MLAData.html">
|
113 |
<h1>MLAData<a href="../classes/MLAData.html">¶</a>
|
114 |
</h1>
|
115 |
+
<p class="short_description">Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs</p>
|
116 |
<div class="details collapse"></div>
|
117 |
<a href="../classes/MLAData.html" class="more">« More »</a>
|
118 |
</div>
|
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-09-19T20:36:48-07:00.<br></footer></div>
|
183 |
</div>
|
184 |
</body>
|
185 |
</html>
|
phpDocs/structure.xml
CHANGED
@@ -1,8 +1,8 @@
|
|
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="
|
4 |
<docblock line="2">
|
5 |
-
<description><![CDATA[Database and template file access for MLA needs
|
6 |
<long-description><![CDATA[]]></long-description>
|
7 |
<tag line="2" name="package" description="Media Library Assistant"/>
|
8 |
<tag line="2" name="since" description="0.1"/>
|
@@ -12,12 +12,26 @@
|
|
12 |
<name>MLAData</name>
|
13 |
<full_name>\MLAData</full_name>
|
14 |
<docblock line="9">
|
15 |
-
<description><![CDATA[Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs
|
16 |
<long-description><![CDATA[<p>The _template functions are inspired by the book "WordPress 3 Plugin Development Essentials."
|
17 |
Templates separate HTML markup from PHP code for easier maintenance and localization.</p>]]></long-description>
|
18 |
<tag line="9" name="package" description="Media Library Assistant"/>
|
19 |
<tag line="9" name="since" description="0.1"/>
|
20 |
</docblock>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="24" package="Media Library Assistant">
|
22 |
<name>initialize</name>
|
23 |
<full_name>initialize</full_name>
|
@@ -62,10 +76,10 @@ where "key" becomes the key part of the array.</p>]]></long-description>
|
|
62 |
<tag line="109" name="param" description="A formatting string containing [+placeholders+]" type="string" variable="$tpl">
|
63 |
<type by_reference="false">string</type>
|
64 |
</tag>
|
65 |
-
<tag line="109" name="param" description="An associative array containing keys and values e.g. array('key' => 'value')
|
66 |
<type by_reference="false">array</type>
|
67 |
</tag>
|
68 |
-
<tag line="109" name="return" description="Placeholders corresponding to the keys of the hash will be replaced with their values
|
69 |
<type by_reference="false">string</type>
|
70 |
</tag>
|
71 |
</docblock>
|
@@ -80,190 +94,254 @@ where "key" becomes the key part of the array.</p>]]></long-description>
|
|
80 |
<type/>
|
81 |
</argument>
|
82 |
</method>
|
83 |
-
<method final="false" abstract="false" static="
|
84 |
-
<name>
|
85 |
-
<full_name>
|
86 |
<docblock line="130">
|
87 |
-
<description><![CDATA[
|
88 |
-
<long-description><![CDATA[
|
89 |
-
|
90 |
-
|
91 |
-
<tag line="130" name="since" description="0.1"/>
|
92 |
-
<tag line="130" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
|
93 |
<type by_reference="false">array</type>
|
94 |
</tag>
|
95 |
-
<tag line="130" name="return" description="
|
96 |
-
<type by_reference="false">
|
97 |
</tag>
|
98 |
</docblock>
|
99 |
-
<argument line="
|
100 |
<name>$request</name>
|
101 |
<default><![CDATA[]]></default>
|
102 |
<type/>
|
103 |
</argument>
|
104 |
</method>
|
105 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
106 |
<name>mla_query_list_table_items</name>
|
107 |
<full_name>mla_query_list_table_items</full_name>
|
108 |
-
<docblock line="
|
109 |
<description><![CDATA[Retrieve attachment objects for list table display]]></description>
|
110 |
<long-description><![CDATA[<p>Supports prepare_items in class-mla-list-table.php.
|
111 |
Modeled after wp_edit_attachments_query in wp-admin/post.php</p>]]></long-description>
|
112 |
-
<tag line="
|
113 |
-
<tag line="
|
114 |
<type by_reference="false">array</type>
|
115 |
</tag>
|
116 |
-
<tag line="
|
117 |
-
<type by_reference="false">string</type>
|
118 |
-
</tag>
|
119 |
-
<tag line="211" name="param" description="ASC or DESC" type="string" variable="$order">
|
120 |
-
<type by_reference="false">string</type>
|
121 |
-
</tag>
|
122 |
-
<tag line="211" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
|
123 |
<type by_reference="false">int</type>
|
124 |
</tag>
|
125 |
-
<tag line="
|
126 |
<type by_reference="false">int</type>
|
127 |
</tag>
|
128 |
-
<tag line="
|
129 |
<type by_reference="false">array</type>
|
130 |
</tag>
|
131 |
</docblock>
|
132 |
-
<argument line="
|
133 |
<name>$request</name>
|
134 |
<default><![CDATA[]]></default>
|
135 |
<type/>
|
136 |
</argument>
|
137 |
-
<argument line="
|
138 |
-
<name>$
|
139 |
<default><![CDATA[]]></default>
|
140 |
<type/>
|
141 |
</argument>
|
142 |
-
<argument line="
|
143 |
-
<name>$
|
144 |
<default><![CDATA[]]></default>
|
145 |
<type/>
|
146 |
</argument>
|
147 |
-
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
<default><![CDATA[]]></default>
|
150 |
<type/>
|
151 |
</argument>
|
152 |
-
|
153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
<default><![CDATA[]]></default>
|
155 |
<type/>
|
156 |
</argument>
|
157 |
</method>
|
158 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
159 |
-
<name>
|
160 |
-
<full_name>
|
161 |
-
<docblock line="
|
162 |
<description><![CDATA[Adds a WHERE clause for detached items]]></description>
|
163 |
-
<long-description><![CDATA[<p>Modeled after _edit_attachments_query_helper in wp-admin/post.php
|
164 |
-
Defined as public
|
165 |
-
<tag line="
|
166 |
-
<tag line="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
<type by_reference="false">string</type>
|
168 |
</tag>
|
169 |
-
<tag line="
|
170 |
<type by_reference="false">string</type>
|
171 |
</tag>
|
172 |
</docblock>
|
173 |
-
<argument line="
|
174 |
-
<name>$
|
175 |
<default><![CDATA[]]></default>
|
176 |
<type/>
|
177 |
</argument>
|
178 |
</method>
|
179 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
180 |
<name>mla_get_attachment_by_id</name>
|
181 |
<full_name>mla_get_attachment_by_id</full_name>
|
182 |
-
<docblock line="
|
183 |
<description><![CDATA[Retrieve an Attachment array given a $post_id]]></description>
|
184 |
<long-description><![CDATA[<p>The (associative) array will contain every field that can be found in
|
185 |
the posts and postmeta tables, and all references to the attachment.</p>]]></long-description>
|
186 |
-
<tag line="
|
187 |
-
<tag line="
|
188 |
<type by_reference="false">int</type>
|
189 |
</tag>
|
190 |
-
<tag line="
|
191 |
<type by_reference="false">NULL</type>
|
192 |
<type by_reference="false">array</type>
|
193 |
</tag>
|
194 |
</docblock>
|
195 |
-
<argument line="
|
196 |
<name>$post_id</name>
|
197 |
<default><![CDATA[]]></default>
|
198 |
<type/>
|
199 |
</argument>
|
200 |
</method>
|
201 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
202 |
<name>mla_fetch_attachment_references</name>
|
203 |
<full_name>mla_fetch_attachment_references</full_name>
|
204 |
-
<docblock line="
|
205 |
<description><![CDATA[Find Featured Image and inserted image/link references to an attachment]]></description>
|
206 |
<long-description><![CDATA[<p>Searches all post and page content to see if the attachment is used
|
207 |
as a Featured Image or inserted in the post as an image or link.</p>]]></long-description>
|
208 |
-
<tag line="
|
209 |
-
<tag line="
|
210 |
<type by_reference="false">int</type>
|
211 |
</tag>
|
212 |
-
<tag line="
|
213 |
<type by_reference="false">int</type>
|
214 |
</tag>
|
215 |
-
<tag line="
|
216 |
<type by_reference="false">array</type>
|
217 |
</tag>
|
218 |
</docblock>
|
219 |
-
<argument line="
|
220 |
<name>$ID</name>
|
221 |
<default><![CDATA[]]></default>
|
222 |
<type/>
|
223 |
</argument>
|
224 |
-
<argument line="
|
225 |
<name>$parent</name>
|
226 |
<default><![CDATA[]]></default>
|
227 |
<type/>
|
228 |
</argument>
|
229 |
</method>
|
230 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
231 |
<name>_fetch_attachment_parent_data</name>
|
232 |
<full_name>_fetch_attachment_parent_data</full_name>
|
233 |
-
<docblock line="
|
234 |
<description><![CDATA[Returns information about an attachment's parent, if found]]></description>
|
235 |
<long-description><![CDATA[]]></long-description>
|
236 |
-
<tag line="
|
237 |
-
<tag line="
|
238 |
<type by_reference="false">int</type>
|
239 |
</tag>
|
240 |
-
<tag line="
|
241 |
<type by_reference="false">array</type>
|
242 |
</tag>
|
243 |
</docblock>
|
244 |
-
<argument line="
|
245 |
<name>$parent_id</name>
|
246 |
<default><![CDATA[]]></default>
|
247 |
<type/>
|
248 |
</argument>
|
249 |
</method>
|
250 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
251 |
<name>_fetch_attachment_metadata</name>
|
252 |
<full_name>_fetch_attachment_metadata</full_name>
|
253 |
-
<docblock line="
|
254 |
<description><![CDATA[Fetch and filter meta data for an attachment]]></description>
|
255 |
<long-description><![CDATA[<p>Returns a filtered array of a post's meta data. Internal values beginning with '<em>'
|
256 |
are stripped out or converted to an 'mla</em>' equivalent. Array data is replaced with
|
257 |
a string containing the first array element.</p>]]></long-description>
|
258 |
-
<tag line="
|
259 |
-
<tag line="
|
260 |
<type by_reference="false">int</type>
|
261 |
</tag>
|
262 |
-
<tag line="
|
263 |
<type by_reference="false">array</type>
|
264 |
</tag>
|
265 |
</docblock>
|
266 |
-
<argument line="
|
267 |
<name>$post_id</name>
|
268 |
<default><![CDATA[]]></default>
|
269 |
<type/>
|
@@ -271,7 +349,7 @@ a string containing the first array element.</p>]]></long-description>
|
|
271 |
</method>
|
272 |
</class>
|
273 |
</file>
|
274 |
-
<file path="includes\class-mla-list-table.php" hash="
|
275 |
<docblock line="2">
|
276 |
<description><![CDATA[Media Library Assistant extended List Table class]]></description>
|
277 |
<long-description><![CDATA[]]></long-description>
|
@@ -315,9 +393,9 @@ a string containing the first array element.</p>]]></long-description>
|
|
315 |
</tag>
|
316 |
</docblock>
|
317 |
</property>
|
318 |
-
<property final="false" static="true" visibility="private" line="
|
319 |
<name>$default_columns</name>
|
320 |
-
<default><![CDATA[array('cb' => '<input type="checkbox" />', 'icon' => '', 'ID_parent' => 'ID/Parent', 'title_name' => 'Title/Name', 'post_title' => 'Title', 'post_name' => 'Name', 'parent' => 'Parent ID', 'featured' => 'Featured in', 'inserted' => 'Inserted in', 'alt_text' => 'ALT Text', 'caption' => 'Caption', 'description' => 'Description', '
|
321 |
<docblock line="55">
|
322 |
<description><![CDATA[Table column definitions]]></description>
|
323 |
<long-description><![CDATA[<p>This array defines table columns and titles where the key is the column slug (and class)
|
@@ -326,33 +404,37 @@ use the special slug "cb".</p>
|
|
326 |
|
327 |
<p>The 'cb' column is treated differently than the rest. If including a checkbox
|
328 |
column in your table you must create a column_cb() method. If you don't need
|
329 |
-
bulk actions or checkboxes, simply leave the 'cb' entry out of your array.</p>
|
|
|
|
|
330 |
<tag line="55" name="since" description="0.1"/>
|
331 |
<tag line="55" name="var" description="" type="array">
|
332 |
<type by_reference="false">array</type>
|
333 |
</tag>
|
334 |
</docblock>
|
335 |
</property>
|
336 |
-
<property final="false" static="true" visibility="private" line="
|
337 |
<name>$default_hidden_columns</name>
|
338 |
-
<default><![CDATA[array(0 => 'post_title', 1 => 'post_name', 2 => 'parent', 3 => 'alt_text', 4 => 'caption', 5 => 'description', 6 => '
|
339 |
-
<docblock line="
|
340 |
-
<description><![CDATA[Default values for
|
341 |
<long-description><![CDATA[<p>This array is used when the user-level option is not set, i.e.,
|
342 |
the user has not altered the selection of hidden columns.</p>
|
343 |
|
344 |
<p>The value on the right-hand side must match the column slug, e.g.,
|
345 |
-
array(0 => 'ID_parent, 1 => 'title_name').</p>
|
346 |
-
|
347 |
-
|
|
|
|
|
348 |
<type by_reference="false">array</type>
|
349 |
</tag>
|
350 |
</docblock>
|
351 |
</property>
|
352 |
-
<property final="false" static="true" visibility="private" line="
|
353 |
<name>$default_sortable_columns</name>
|
354 |
-
<default><![CDATA[array('ID_parent' => array('ID', false), 'title_name' => array('title_name', false), 'post_title' => array('post_title', false), 'post_name' => array('
|
355 |
-
<docblock line="
|
356 |
<description><![CDATA[Sortable column definitions]]></description>
|
357 |
<long-description><![CDATA[<p>This array defines the table columns that can be sorted. The array key
|
358 |
is the column slug that needs to be sortable, and the value is database column
|
@@ -361,699 +443,710 @@ the case (as the value is a column name from the database, not the list table).<
|
|
361 |
|
362 |
<p>The array value also contains a boolean which is 'true' if the data is currently
|
363 |
sorted by that column. This is computed each time the table is displayed.</p>]]></long-description>
|
364 |
-
<tag line="
|
365 |
-
<tag line="
|
366 |
<type by_reference="false">array</type>
|
367 |
</tag>
|
368 |
</docblock>
|
369 |
</property>
|
370 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
371 |
<name>_default_hidden_columns</name>
|
372 |
<full_name>_default_hidden_columns</full_name>
|
373 |
-
<docblock line="
|
374 |
<description><![CDATA[Access the default list of hidden columns]]></description>
|
375 |
<long-description><![CDATA[]]></long-description>
|
376 |
-
<tag line="
|
377 |
-
<tag line="
|
378 |
<type by_reference="false">array</type>
|
379 |
</tag>
|
380 |
</docblock>
|
381 |
</method>
|
382 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
383 |
-
<name>
|
384 |
-
<full_name>
|
385 |
-
<docblock line="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
<description><![CDATA[Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden']]></description>
|
387 |
<long-description><![CDATA[<p>Required because the screen.php get_hidden_columns function only uses
|
388 |
the get_user_option result. Set when the file is loaded because the object
|
389 |
is not created in time for the call from screen.php.</p>]]></long-description>
|
390 |
-
<tag line="
|
391 |
-
<tag line="
|
392 |
<type by_reference="false">string</type>
|
393 |
</tag>
|
394 |
-
<tag line="
|
395 |
<type by_reference="false">string</type>
|
396 |
</tag>
|
397 |
-
<tag line="
|
398 |
<type by_reference="false">object</type>
|
399 |
</tag>
|
400 |
-
<tag line="
|
401 |
<type by_reference="false">array</type>
|
402 |
</tag>
|
403 |
</docblock>
|
404 |
-
<argument line="
|
405 |
<name>$result</name>
|
406 |
<default><![CDATA[]]></default>
|
407 |
<type/>
|
408 |
</argument>
|
409 |
-
<argument line="
|
410 |
<name>$option</name>
|
411 |
<default><![CDATA[]]></default>
|
412 |
<type/>
|
413 |
</argument>
|
414 |
-
<argument line="
|
415 |
<name>$user_data</name>
|
416 |
<default><![CDATA[]]></default>
|
417 |
<type/>
|
418 |
</argument>
|
419 |
</method>
|
420 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
421 |
-
<name>
|
422 |
-
<full_name>
|
423 |
-
<docblock line="
|
424 |
<description><![CDATA[Handler for filter 'manage_media_page_mla-menu_columns']]></description>
|
425 |
<long-description><![CDATA[<p>This required filter dictates the table's columns and titles. Set when the
|
426 |
file is loaded because the list_table object isn't created in time
|
427 |
to affect the "screen options" setup.</p>]]></long-description>
|
428 |
-
<tag line="
|
429 |
-
<tag line="
|
430 |
<type by_reference="false">array</type>
|
431 |
</tag>
|
432 |
</docblock>
|
433 |
</method>
|
434 |
-
<method final="false" abstract="false" static="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
<name>__construct</name>
|
436 |
<full_name>__construct</full_name>
|
437 |
-
<docblock line="
|
438 |
<description><![CDATA[Initializes some properties from $_REQUEST vairables, then
|
439 |
calls the parent constructor to set some default configs.]]></description>
|
440 |
<long-description><![CDATA[]]></long-description>
|
441 |
-
<tag line="
|
|
|
|
|
|
|
442 |
</docblock>
|
443 |
</method>
|
444 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
445 |
<name>column_default</name>
|
446 |
<full_name>column_default</full_name>
|
447 |
-
<docblock line="
|
448 |
-
<description><![CDATA[
|
449 |
-
|
450 |
-
|
451 |
-
so this function returns a troubleshooting message.</p>]]></long-description>
|
452 |
-
<tag line="
|
453 |
-
<tag line="
|
454 |
<type by_reference="false">array</type>
|
455 |
</tag>
|
456 |
-
<tag line="
|
457 |
<type by_reference="false">array</type>
|
458 |
</tag>
|
459 |
-
<tag line="
|
460 |
<type by_reference="false">string</type>
|
461 |
</tag>
|
462 |
</docblock>
|
463 |
-
<argument line="
|
464 |
<name>$item</name>
|
465 |
<default><![CDATA[]]></default>
|
466 |
<type/>
|
467 |
</argument>
|
468 |
-
<argument line="
|
469 |
<name>$column_name</name>
|
470 |
<default><![CDATA[]]></default>
|
471 |
<type/>
|
472 |
</argument>
|
473 |
</method>
|
474 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
475 |
<name>column_cb</name>
|
476 |
<full_name>column_cb</full_name>
|
477 |
-
<docblock line="
|
478 |
<description><![CDATA[Displays checkboxes for using bulk actions.]]></description>
|
479 |
<long-description><![CDATA[<p>The 'cb' column
|
480 |
is given special treatment when columns are processed.</p>]]></long-description>
|
481 |
-
<tag line="
|
482 |
-
<tag line="
|
483 |
<type by_reference="false">array</type>
|
484 |
</tag>
|
485 |
-
<tag line="
|
486 |
<type by_reference="false">string</type>
|
487 |
</tag>
|
488 |
</docblock>
|
489 |
-
<argument line="
|
490 |
<name>$item</name>
|
491 |
<default><![CDATA[]]></default>
|
492 |
<type/>
|
493 |
</argument>
|
494 |
</method>
|
495 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
496 |
<name>column_icon</name>
|
497 |
<full_name>column_icon</full_name>
|
498 |
-
<docblock line="
|
499 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
500 |
<long-description><![CDATA[]]></long-description>
|
501 |
-
<tag line="
|
502 |
-
<tag line="
|
503 |
<type by_reference="false">array</type>
|
504 |
</tag>
|
505 |
-
<tag line="
|
506 |
<type by_reference="false">string</type>
|
507 |
</tag>
|
508 |
</docblock>
|
509 |
-
<argument line="
|
510 |
<name>$item</name>
|
511 |
<default><![CDATA[]]></default>
|
512 |
<type/>
|
513 |
</argument>
|
514 |
</method>
|
515 |
-
<method final="false" abstract="false" static="false" visibility="private" namespace="global" line="
|
516 |
<name>_build_rollover_actions</name>
|
517 |
<full_name>_build_rollover_actions</full_name>
|
518 |
-
<docblock line="
|
519 |
<description><![CDATA[Add rollover actions to exactly one of the following displayed columns:
|
520 |
'ID_parent', 'title_name', 'post_title', 'post_name']]></description>
|
521 |
<long-description><![CDATA[]]></long-description>
|
522 |
-
<tag line="
|
523 |
-
<tag line="
|
524 |
<type by_reference="false">object</type>
|
525 |
</tag>
|
526 |
-
<tag line="
|
527 |
<type by_reference="false">string</type>
|
528 |
</tag>
|
529 |
-
<tag line="
|
530 |
<type by_reference="false">array</type>
|
531 |
</tag>
|
532 |
</docblock>
|
533 |
-
<argument line="
|
534 |
<name>$item</name>
|
535 |
<default><![CDATA[]]></default>
|
536 |
<type/>
|
537 |
</argument>
|
538 |
-
<argument line="
|
539 |
<name>$column</name>
|
540 |
<default><![CDATA[]]></default>
|
541 |
<type/>
|
542 |
</argument>
|
543 |
</method>
|
544 |
-
<method final="false" abstract="false" static="false" visibility="private" namespace="global" line="
|
545 |
<name>_build_inline_data</name>
|
546 |
<full_name>_build_inline_data</full_name>
|
547 |
-
<docblock line="
|
548 |
<description><![CDATA[Add hidden fields with the data for use in the inline editor]]></description>
|
549 |
<long-description><![CDATA[]]></long-description>
|
550 |
-
<tag line="
|
551 |
-
<tag line="
|
552 |
<type by_reference="false">object</type>
|
553 |
</tag>
|
554 |
-
<tag line="
|
555 |
<type by_reference="false">string</type>
|
556 |
</tag>
|
557 |
</docblock>
|
558 |
-
<argument line="
|
559 |
<name>$item</name>
|
560 |
<default><![CDATA[]]></default>
|
561 |
<type/>
|
562 |
</argument>
|
563 |
</method>
|
564 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
565 |
<name>column_ID_parent</name>
|
566 |
<full_name>column_ID_parent</full_name>
|
567 |
-
<docblock line="
|
568 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
569 |
<long-description><![CDATA[]]></long-description>
|
570 |
-
<tag line="
|
571 |
-
<tag line="
|
572 |
<type by_reference="false">array</type>
|
573 |
</tag>
|
574 |
-
<tag line="
|
575 |
<type by_reference="false">string</type>
|
576 |
</tag>
|
577 |
</docblock>
|
578 |
-
<argument line="
|
579 |
<name>$item</name>
|
580 |
<default><![CDATA[]]></default>
|
581 |
<type/>
|
582 |
</argument>
|
583 |
</method>
|
584 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
585 |
<name>column_title_name</name>
|
586 |
<full_name>column_title_name</full_name>
|
587 |
-
<docblock line="
|
588 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
589 |
<long-description><![CDATA[]]></long-description>
|
590 |
-
<tag line="
|
591 |
-
<tag line="
|
592 |
<type by_reference="false">array</type>
|
593 |
</tag>
|
594 |
-
<tag line="
|
595 |
<type by_reference="false">string</type>
|
596 |
</tag>
|
597 |
</docblock>
|
598 |
-
<argument line="
|
599 |
<name>$item</name>
|
600 |
<default><![CDATA[]]></default>
|
601 |
<type/>
|
602 |
</argument>
|
603 |
</method>
|
604 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
605 |
<name>column_post_title</name>
|
606 |
<full_name>column_post_title</full_name>
|
607 |
-
<docblock line="
|
608 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
609 |
<long-description><![CDATA[]]></long-description>
|
610 |
-
<tag line="
|
611 |
-
<tag line="
|
612 |
<type by_reference="false">array</type>
|
613 |
</tag>
|
614 |
-
<tag line="
|
615 |
<type by_reference="false">string</type>
|
616 |
</tag>
|
617 |
</docblock>
|
618 |
-
<argument line="
|
619 |
<name>$item</name>
|
620 |
<default><![CDATA[]]></default>
|
621 |
<type/>
|
622 |
</argument>
|
623 |
</method>
|
624 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
625 |
<name>column_post_name</name>
|
626 |
<full_name>column_post_name</full_name>
|
627 |
-
<docblock line="
|
628 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
629 |
<long-description><![CDATA[]]></long-description>
|
630 |
-
<tag line="
|
631 |
-
<tag line="
|
632 |
<type by_reference="false">array</type>
|
633 |
</tag>
|
634 |
-
<tag line="
|
635 |
<type by_reference="false">string</type>
|
636 |
</tag>
|
637 |
</docblock>
|
638 |
-
<argument line="
|
639 |
<name>$item</name>
|
640 |
<default><![CDATA[]]></default>
|
641 |
<type/>
|
642 |
</argument>
|
643 |
</method>
|
644 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
645 |
<name>column_parent</name>
|
646 |
<full_name>column_parent</full_name>
|
647 |
-
<docblock line="
|
648 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
649 |
<long-description><![CDATA[]]></long-description>
|
650 |
-
<tag line="
|
651 |
-
<tag line="
|
652 |
<type by_reference="false">array</type>
|
653 |
</tag>
|
654 |
-
<tag line="
|
655 |
<type by_reference="false">string</type>
|
656 |
</tag>
|
657 |
</docblock>
|
658 |
-
<argument line="
|
659 |
<name>$item</name>
|
660 |
<default><![CDATA[]]></default>
|
661 |
<type/>
|
662 |
</argument>
|
663 |
</method>
|
664 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
665 |
<name>column_featured</name>
|
666 |
<full_name>column_featured</full_name>
|
667 |
-
<docblock line="
|
668 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
669 |
<long-description><![CDATA[]]></long-description>
|
670 |
-
<tag line="
|
671 |
-
<tag line="
|
672 |
<type by_reference="false">array</type>
|
673 |
</tag>
|
674 |
-
<tag line="
|
675 |
<type by_reference="false">string</type>
|
676 |
</tag>
|
677 |
</docblock>
|
678 |
-
<argument line="
|
679 |
<name>$item</name>
|
680 |
<default><![CDATA[]]></default>
|
681 |
<type/>
|
682 |
</argument>
|
683 |
</method>
|
684 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
685 |
<name>column_inserted</name>
|
686 |
<full_name>column_inserted</full_name>
|
687 |
-
<docblock line="
|
688 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
689 |
<long-description><![CDATA[]]></long-description>
|
690 |
-
<tag line="
|
691 |
-
<tag line="
|
692 |
<type by_reference="false">array</type>
|
693 |
</tag>
|
694 |
-
<tag line="
|
695 |
<type by_reference="false">string</type>
|
696 |
</tag>
|
697 |
</docblock>
|
698 |
-
<argument line="
|
699 |
<name>$item</name>
|
700 |
<default><![CDATA[]]></default>
|
701 |
<type/>
|
702 |
</argument>
|
703 |
</method>
|
704 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
705 |
<name>column_alt_text</name>
|
706 |
<full_name>column_alt_text</full_name>
|
707 |
-
<docblock line="
|
708 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
709 |
<long-description><![CDATA[]]></long-description>
|
710 |
-
<tag line="
|
711 |
-
<tag line="
|
712 |
<type by_reference="false">array</type>
|
713 |
</tag>
|
714 |
-
<tag line="
|
715 |
<type by_reference="false">string</type>
|
716 |
</tag>
|
717 |
</docblock>
|
718 |
-
<argument line="
|
719 |
<name>$item</name>
|
720 |
<default><![CDATA[]]></default>
|
721 |
<type/>
|
722 |
</argument>
|
723 |
</method>
|
724 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
725 |
<name>column_caption</name>
|
726 |
<full_name>column_caption</full_name>
|
727 |
-
<docblock line="
|
728 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
729 |
<long-description><![CDATA[]]></long-description>
|
730 |
-
<tag line="
|
731 |
-
<tag line="
|
732 |
<type by_reference="false">array</type>
|
733 |
</tag>
|
734 |
-
<tag line="
|
735 |
<type by_reference="false">string</type>
|
736 |
</tag>
|
737 |
</docblock>
|
738 |
-
<argument line="
|
739 |
<name>$item</name>
|
740 |
<default><![CDATA[]]></default>
|
741 |
<type/>
|
742 |
</argument>
|
743 |
</method>
|
744 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
745 |
<name>column_description</name>
|
746 |
<full_name>column_description</full_name>
|
747 |
-
<docblock line="
|
748 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
749 |
<long-description><![CDATA[]]></long-description>
|
750 |
-
<tag line="
|
751 |
-
<tag line="
|
752 |
<type by_reference="false">array</type>
|
753 |
</tag>
|
754 |
-
<tag line="
|
755 |
<type by_reference="false">string</type>
|
756 |
</tag>
|
757 |
</docblock>
|
758 |
-
<argument line="
|
759 |
<name>$item</name>
|
760 |
<default><![CDATA[]]></default>
|
761 |
<type/>
|
762 |
</argument>
|
763 |
</method>
|
764 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
765 |
-
<name>
|
766 |
-
<full_name>
|
767 |
-
<docblock line="
|
768 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
769 |
<long-description><![CDATA[]]></long-description>
|
770 |
-
<tag line="
|
771 |
-
<tag line="
|
772 |
<type by_reference="false">array</type>
|
773 |
</tag>
|
774 |
-
<tag line="
|
775 |
<type by_reference="false">string</type>
|
776 |
</tag>
|
777 |
</docblock>
|
778 |
-
<argument line="
|
779 |
<name>$item</name>
|
780 |
<default><![CDATA[]]></default>
|
781 |
<type/>
|
782 |
</argument>
|
783 |
</method>
|
784 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
785 |
-
<name>
|
786 |
-
<full_name>
|
787 |
-
<docblock line="
|
788 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
789 |
<long-description><![CDATA[]]></long-description>
|
790 |
-
<tag line="
|
791 |
-
<tag line="
|
792 |
<type by_reference="false">array</type>
|
793 |
</tag>
|
794 |
-
<tag line="
|
795 |
<type by_reference="false">string</type>
|
796 |
</tag>
|
797 |
</docblock>
|
798 |
-
<argument line="
|
799 |
<name>$item</name>
|
800 |
<default><![CDATA[]]></default>
|
801 |
<type/>
|
802 |
</argument>
|
803 |
</method>
|
804 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
805 |
-
<name>
|
806 |
-
<full_name>
|
807 |
-
<docblock line="
|
808 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
809 |
<long-description><![CDATA[]]></long-description>
|
810 |
-
<tag line="
|
811 |
-
<tag line="
|
812 |
<type by_reference="false">array</type>
|
813 |
</tag>
|
814 |
-
<tag line="
|
815 |
<type by_reference="false">string</type>
|
816 |
</tag>
|
817 |
</docblock>
|
818 |
-
<argument line="
|
819 |
<name>$item</name>
|
820 |
<default><![CDATA[]]></default>
|
821 |
<type/>
|
822 |
</argument>
|
823 |
</method>
|
824 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
825 |
-
<name>
|
826 |
-
<full_name>
|
827 |
-
<docblock line="
|
828 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
829 |
<long-description><![CDATA[]]></long-description>
|
830 |
-
<tag line="
|
831 |
-
<tag line="
|
832 |
<type by_reference="false">array</type>
|
833 |
</tag>
|
834 |
-
<tag line="
|
835 |
<type by_reference="false">string</type>
|
836 |
</tag>
|
837 |
</docblock>
|
838 |
-
<argument line="
|
839 |
<name>$item</name>
|
840 |
<default><![CDATA[]]></default>
|
841 |
<type/>
|
842 |
</argument>
|
843 |
</method>
|
844 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
845 |
-
<name>
|
846 |
-
<full_name>
|
847 |
-
<docblock line="
|
848 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
849 |
<long-description><![CDATA[]]></long-description>
|
850 |
-
<tag line="
|
851 |
-
<tag line="
|
852 |
<type by_reference="false">array</type>
|
853 |
</tag>
|
854 |
-
<tag line="
|
855 |
<type by_reference="false">string</type>
|
856 |
</tag>
|
857 |
</docblock>
|
858 |
-
<argument line="
|
859 |
<name>$item</name>
|
860 |
<default><![CDATA[]]></default>
|
861 |
<type/>
|
862 |
</argument>
|
863 |
</method>
|
864 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
865 |
-
<name>
|
866 |
-
<full_name>
|
867 |
-
<docblock line="
|
868 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
869 |
<long-description><![CDATA[]]></long-description>
|
870 |
-
<tag line="
|
871 |
-
<tag line="
|
872 |
<type by_reference="false">array</type>
|
873 |
</tag>
|
874 |
-
<tag line="
|
875 |
<type by_reference="false">string</type>
|
876 |
</tag>
|
877 |
</docblock>
|
878 |
-
<argument line="
|
879 |
<name>$item</name>
|
880 |
<default><![CDATA[]]></default>
|
881 |
<type/>
|
882 |
</argument>
|
883 |
</method>
|
884 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
885 |
<name>get_columns</name>
|
886 |
<full_name>get_columns</full_name>
|
887 |
-
<docblock line="
|
888 |
-
<description><![CDATA[This method dictates the table's columns and titles
|
889 |
<long-description><![CDATA[]]></long-description>
|
890 |
-
<tag line="
|
891 |
-
<tag line="
|
892 |
<type by_reference="false">array</type>
|
893 |
</tag>
|
894 |
</docblock>
|
895 |
</method>
|
896 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
897 |
<name>get_hidden_columns</name>
|
898 |
<full_name>get_hidden_columns</full_name>
|
899 |
-
<docblock line="
|
900 |
<description><![CDATA[Returns the list of currently hidden columns from a user option or
|
901 |
from default values if the option is not set]]></description>
|
902 |
<long-description><![CDATA[]]></long-description>
|
903 |
-
<tag line="
|
904 |
-
<tag line="
|
905 |
<type by_reference="false">array</type>
|
906 |
</tag>
|
907 |
</docblock>
|
908 |
</method>
|
909 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
910 |
<name>get_sortable_columns</name>
|
911 |
<full_name>get_sortable_columns</full_name>
|
912 |
-
<docblock line="
|
913 |
<description><![CDATA[Returns an array where the key is the column that needs to be sortable
|
914 |
and the value is db column to sort by.]]></description>
|
915 |
<long-description><![CDATA[<p>Also notes the current sort column,
|
916 |
if set.</p>]]></long-description>
|
917 |
-
<tag line="
|
918 |
-
<tag line="
|
919 |
<type by_reference="false">array</type>
|
920 |
</tag>
|
921 |
</docblock>
|
922 |
</method>
|
923 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
924 |
<name>get_views</name>
|
925 |
<full_name>get_views</full_name>
|
926 |
-
<docblock line="
|
927 |
<description><![CDATA[Returns an associative array listing all the views that can be used with this table.]]></description>
|
928 |
<long-description><![CDATA[<p>These are listed across the top of the page and managed by WordPress.</p>]]></long-description>
|
929 |
-
<tag line="
|
930 |
-
<tag line="
|
931 |
<type by_reference="false">array</type>
|
932 |
</tag>
|
933 |
</docblock>
|
934 |
</method>
|
935 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
936 |
<name>get_bulk_actions</name>
|
937 |
<full_name>get_bulk_actions</full_name>
|
938 |
-
<docblock line="
|
939 |
<description><![CDATA[Get an associative array ( option_name => option_title ) with the list
|
940 |
of bulk actions available on this table.]]></description>
|
941 |
<long-description><![CDATA[]]></long-description>
|
942 |
-
<tag line="
|
943 |
-
<tag line="
|
944 |
<type by_reference="false">array</type>
|
945 |
</tag>
|
946 |
</docblock>
|
947 |
</method>
|
948 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
949 |
<name>extra_tablenav</name>
|
950 |
<full_name>extra_tablenav</full_name>
|
951 |
-
<docblock line="
|
952 |
-
<description><![CDATA[Extra controls to be displayed between bulk actions and pagination
|
953 |
-
<long-description><![CDATA[<p>Modeled after class-wp-posts-list-table.php in wp-admin/includes
|
954 |
-
<tag line="
|
955 |
-
<tag line="
|
956 |
<type by_reference="false">string</type>
|
957 |
</tag>
|
958 |
-
<tag line="
|
959 |
<type by_reference="false">array</type>
|
960 |
</tag>
|
961 |
</docblock>
|
962 |
-
<argument line="
|
963 |
<name>$which</name>
|
964 |
<default><![CDATA[]]></default>
|
965 |
<type/>
|
966 |
</argument>
|
967 |
</method>
|
968 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
969 |
<name>prepare_items</name>
|
970 |
<full_name>prepare_items</full_name>
|
971 |
-
<docblock line="
|
972 |
-
<description><![CDATA[Prepares the list of items for displaying
|
973 |
<long-description><![CDATA[<p>This is where you prepare your data for display. This method will usually
|
974 |
be used to query the database, sort and filter the data, and generally
|
975 |
get it ready to be displayed. At a minimum, we should set $this->items and
|
976 |
$this->set_pagination_args().</p>]]></long-description>
|
977 |
-
<tag line="
|
|
|
|
|
|
|
978 |
</docblock>
|
979 |
</method>
|
980 |
-
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="
|
981 |
<name>single_row</name>
|
982 |
<full_name>single_row</full_name>
|
983 |
-
<docblock line="
|
984 |
<description><![CDATA[Generates (echoes) content for a single row of the table]]></description>
|
985 |
<long-description><![CDATA[]]></long-description>
|
986 |
-
<tag line="
|
987 |
-
<tag line="
|
988 |
<type by_reference="false">object</type>
|
989 |
</tag>
|
990 |
-
<tag line="
|
991 |
-
<type by_reference="false"
|
992 |
</tag>
|
993 |
</docblock>
|
994 |
-
<argument line="
|
995 |
<name>$item</name>
|
996 |
<default><![CDATA[]]></default>
|
997 |
<type/>
|
998 |
</argument>
|
999 |
</method>
|
1000 |
-
<method final="false" abstract="false" static="false" visibility="private" namespace="global" line="
|
1001 |
<name>_mime_types</name>
|
1002 |
<full_name>_mime_types</full_name>
|
1003 |
-
<docblock line="
|
1004 |
-
<description><![CDATA[Get possible mime types for view preparation
|
1005 |
<long-description><![CDATA[<p>Modeled after get_post_mime_types in wp-admin/includes/post.php,
|
1006 |
with additional entries.</p>]]></long-description>
|
1007 |
-
<tag line="
|
1008 |
-
<tag line="
|
1009 |
<type by_reference="false">array</type>
|
1010 |
</tag>
|
1011 |
</docblock>
|
1012 |
</method>
|
1013 |
-
<method final="false" abstract="false" static="false" visibility="private" namespace="global" line="
|
1014 |
<name>_avail_mime_types</name>
|
1015 |
<full_name>_avail_mime_types</full_name>
|
1016 |
-
<docblock line="
|
1017 |
-
<description><![CDATA[Get mime types with one or more attachments for view preparation
|
1018 |
<long-description><![CDATA[<p>Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
|
1019 |
with additional entries.</p>]]></long-description>
|
1020 |
-
<tag line="
|
1021 |
-
<tag line="
|
1022 |
<type by_reference="false">array</type>
|
1023 |
</tag>
|
1024 |
-
<tag line="
|
1025 |
<type by_reference="false">array</type>
|
1026 |
</tag>
|
1027 |
</docblock>
|
1028 |
-
<argument line="
|
1029 |
<name>$num_posts</name>
|
1030 |
<default><![CDATA[]]></default>
|
1031 |
<type/>
|
1032 |
</argument>
|
1033 |
</method>
|
1034 |
-
<method final="false" abstract="false" static="false" visibility="private" namespace="global" line="1110" package="Media Library Assistant">
|
1035 |
-
<name>_count_list_table_items</name>
|
1036 |
-
<full_name>_count_list_table_items</full_name>
|
1037 |
-
<docblock line="1101">
|
1038 |
-
<description><![CDATA[Get the total number of attachment posts]]></description>
|
1039 |
-
<long-description><![CDATA[]]></long-description>
|
1040 |
-
<tag line="1101" name="since" description="0.1"/>
|
1041 |
-
<tag line="1101" name="param" description="Query variables, e.g., from $_REQUEST" type="array" variable="$request">
|
1042 |
-
<type by_reference="false">array</type>
|
1043 |
-
</tag>
|
1044 |
-
<tag line="1101" name="return" description="Number of attachment posts" type="integer">
|
1045 |
-
<type by_reference="false">integer</type>
|
1046 |
-
</tag>
|
1047 |
-
</docblock>
|
1048 |
-
<argument line="1110">
|
1049 |
-
<name>$request</name>
|
1050 |
-
<default><![CDATA[]]></default>
|
1051 |
-
<type/>
|
1052 |
-
</argument>
|
1053 |
-
</method>
|
1054 |
</class>
|
1055 |
</file>
|
1056 |
-
<file path="includes\class-mla-main.php" hash="
|
1057 |
<docblock line="2">
|
1058 |
<description><![CDATA[Top-level functions for the Media Library Assistant]]></description>
|
1059 |
<long-description><![CDATA[]]></long-description>
|
@@ -1090,7 +1183,7 @@ of images and files held in the WordPress Media Library.]]></description>
|
|
1090 |
<constant namespace="global" line="41" package="Media Library Assistant">
|
1091 |
<name>CURRENT_MLA_VERSION</name>
|
1092 |
<full_name>CURRENT_MLA_VERSION</full_name>
|
1093 |
-
<value><![CDATA['0.
|
1094 |
<docblock line="34">
|
1095 |
<description><![CDATA[Current version number]]></description>
|
1096 |
<long-description><![CDATA[]]></long-description>
|
@@ -1204,80 +1297,80 @@ of images and files held in the WordPress Media Library.]]></description>
|
|
1204 |
</tag>
|
1205 |
</docblock>
|
1206 |
</constant>
|
1207 |
-
<constant namespace="global" line="
|
1208 |
<name>MLA_ADMIN_NONCE</name>
|
1209 |
<full_name>MLA_ADMIN_NONCE</full_name>
|
1210 |
<value><![CDATA['mla_admin']]></value>
|
1211 |
-
<docblock line="
|
1212 |
<description><![CDATA[Action name; uniquely identifies the nonce]]></description>
|
1213 |
<long-description><![CDATA[]]></long-description>
|
1214 |
-
<tag line="
|
1215 |
-
<tag line="
|
1216 |
<type by_reference="false">string</type>
|
1217 |
</tag>
|
1218 |
</docblock>
|
1219 |
</constant>
|
1220 |
-
<constant namespace="global" line="
|
1221 |
<name>MLA_ADMIN_SINGLE_DELETE</name>
|
1222 |
<full_name>MLA_ADMIN_SINGLE_DELETE</full_name>
|
1223 |
<value><![CDATA['single_item_delete']]></value>
|
1224 |
-
<docblock line="
|
1225 |
<description><![CDATA[mla_admin_action value for permanently deleting a single item]]></description>
|
1226 |
<long-description><![CDATA[]]></long-description>
|
1227 |
-
<tag line="
|
1228 |
-
<tag line="
|
1229 |
<type by_reference="false">string</type>
|
1230 |
</tag>
|
1231 |
</docblock>
|
1232 |
</constant>
|
1233 |
-
<constant namespace="global" line="
|
1234 |
<name>MLA_ADMIN_SINGLE_EDIT_DISPLAY</name>
|
1235 |
<full_name>MLA_ADMIN_SINGLE_EDIT_DISPLAY</full_name>
|
1236 |
<value><![CDATA['single_item_edit_display']]></value>
|
1237 |
-
<docblock line="
|
1238 |
<description><![CDATA[mla_admin_action value for displaying a single item]]></description>
|
1239 |
<long-description><![CDATA[]]></long-description>
|
1240 |
-
<tag line="
|
1241 |
-
<tag line="
|
1242 |
<type by_reference="false">string</type>
|
1243 |
</tag>
|
1244 |
</docblock>
|
1245 |
</constant>
|
1246 |
-
<constant namespace="global" line="
|
1247 |
<name>MLA_ADMIN_SINGLE_EDIT_UPDATE</name>
|
1248 |
<full_name>MLA_ADMIN_SINGLE_EDIT_UPDATE</full_name>
|
1249 |
<value><![CDATA['single_item_edit_update']]></value>
|
1250 |
-
<docblock line="
|
1251 |
<description><![CDATA[mla_admin_action value for updating a single item]]></description>
|
1252 |
<long-description><![CDATA[]]></long-description>
|
1253 |
-
<tag line="
|
1254 |
-
<tag line="
|
1255 |
<type by_reference="false">string</type>
|
1256 |
</tag>
|
1257 |
</docblock>
|
1258 |
</constant>
|
1259 |
-
<constant namespace="global" line="
|
1260 |
<name>MLA_ADMIN_SINGLE_RESTORE</name>
|
1261 |
<full_name>MLA_ADMIN_SINGLE_RESTORE</full_name>
|
1262 |
<value><![CDATA['single_item_restore']]></value>
|
1263 |
-
<docblock line="
|
1264 |
<description><![CDATA[mla_admin_action value for restoring a single item from the trash]]></description>
|
1265 |
<long-description><![CDATA[]]></long-description>
|
1266 |
-
<tag line="
|
1267 |
-
<tag line="
|
1268 |
<type by_reference="false">string</type>
|
1269 |
</tag>
|
1270 |
</docblock>
|
1271 |
</constant>
|
1272 |
-
<constant namespace="global" line="
|
1273 |
<name>MLA_ADMIN_SINGLE_TRASH</name>
|
1274 |
<full_name>MLA_ADMIN_SINGLE_TRASH</full_name>
|
1275 |
<value><![CDATA['single_item_trash']]></value>
|
1276 |
-
<docblock line="
|
1277 |
<description><![CDATA[mla_admin_action value for moving a single item to the trash]]></description>
|
1278 |
<long-description><![CDATA[]]></long-description>
|
1279 |
-
<tag line="
|
1280 |
-
<tag line="
|
1281 |
<type by_reference="false">string</type>
|
1282 |
</tag>
|
1283 |
</docblock>
|
@@ -1294,378 +1387,397 @@ of images and files held in the WordPress Media Library.]]></description>
|
|
1294 |
</tag>
|
1295 |
</docblock>
|
1296 |
</property>
|
1297 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1298 |
<name>initialize</name>
|
1299 |
<full_name>initialize</full_name>
|
1300 |
<docblock line="124">
|
1301 |
<description><![CDATA[Initialization function, similar to __construct()]]></description>
|
1302 |
<long-description><![CDATA[]]></long-description>
|
1303 |
<tag line="124" name="since" description="0.1"/>
|
|
|
|
|
|
|
1304 |
</docblock>
|
1305 |
</method>
|
1306 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1307 |
<name>mla_admin_init_action</name>
|
1308 |
<full_name>mla_admin_init_action</full_name>
|
1309 |
-
<docblock line="
|
1310 |
<description><![CDATA[Load the plugin's Ajax handler]]></description>
|
1311 |
<long-description><![CDATA[]]></long-description>
|
1312 |
-
<tag line="
|
1313 |
-
<tag line="
|
1314 |
-
<type by_reference="false"
|
1315 |
</tag>
|
1316 |
</docblock>
|
1317 |
</method>
|
1318 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1319 |
<name>mla_admin_enqueue_scripts_action</name>
|
1320 |
<full_name>mla_admin_enqueue_scripts_action</full_name>
|
1321 |
-
<docblock line="
|
1322 |
<description><![CDATA[Load the plugin's Style Sheet and Javascript files]]></description>
|
1323 |
<long-description><![CDATA[]]></long-description>
|
1324 |
-
<tag line="
|
1325 |
-
<tag line="
|
1326 |
<type by_reference="false">string</type>
|
1327 |
</tag>
|
1328 |
-
<tag line="
|
1329 |
-
<type by_reference="false"
|
1330 |
</tag>
|
1331 |
</docblock>
|
1332 |
-
<argument line="
|
1333 |
<name>$page_hook</name>
|
1334 |
<default><![CDATA[]]></default>
|
1335 |
<type/>
|
1336 |
</argument>
|
1337 |
</method>
|
1338 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1339 |
<name>mla_admin_menu_action</name>
|
1340 |
<full_name>mla_admin_menu_action</full_name>
|
1341 |
-
<docblock line="
|
1342 |
<description><![CDATA[Add the submenu pages]]></description>
|
1343 |
<long-description><![CDATA[<p>Add a submenu page in the "Media" section,
|
1344 |
add submenu page(s) for attachment taxonomies,
|
1345 |
add filter to clean up taxonomy submenu labels
|
1346 |
add settings page in the "Settings" section,
|
1347 |
add settings link in the Plugins section entry for MLA.</p>]]></long-description>
|
1348 |
-
<tag line="
|
|
|
|
|
|
|
1349 |
</docblock>
|
1350 |
</method>
|
1351 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1352 |
<name>mla_add_menu_options</name>
|
1353 |
<full_name>mla_add_menu_options</full_name>
|
1354 |
-
<docblock line="
|
1355 |
<description><![CDATA[Add the "XX Entries per page" filter to the Screen Options tab]]></description>
|
1356 |
<long-description><![CDATA[]]></long-description>
|
1357 |
-
<tag line="
|
|
|
|
|
|
|
1358 |
</docblock>
|
1359 |
</method>
|
1360 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1361 |
<name>mla_screen_options_show_screen_filter</name>
|
1362 |
<full_name>mla_screen_options_show_screen_filter</full_name>
|
1363 |
-
<docblock line="
|
1364 |
<description><![CDATA[Only show screen options on the table-list screen]]></description>
|
1365 |
<long-description><![CDATA[]]></long-description>
|
1366 |
-
<tag line="
|
1367 |
-
<tag line="
|
1368 |
<type by_reference="false">boolean</type>
|
1369 |
</tag>
|
1370 |
-
<tag line="
|
1371 |
<type by_reference="false">string</type>
|
1372 |
</tag>
|
1373 |
-
<tag line="
|
1374 |
<type by_reference="false">boolean</type>
|
1375 |
</tag>
|
1376 |
</docblock>
|
1377 |
-
<argument line="
|
1378 |
<name>$show_screen</name>
|
1379 |
<default><![CDATA[]]></default>
|
1380 |
<type/>
|
1381 |
</argument>
|
1382 |
-
<argument line="
|
1383 |
<name>$this_screen</name>
|
1384 |
<default><![CDATA[]]></default>
|
1385 |
<type/>
|
1386 |
</argument>
|
1387 |
</method>
|
1388 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1389 |
<name>mla_set_screen_option_filter</name>
|
1390 |
<full_name>mla_set_screen_option_filter</full_name>
|
1391 |
-
<docblock line="
|
1392 |
<description><![CDATA[Save the "Entries per page" option set by this user]]></description>
|
1393 |
<long-description><![CDATA[]]></long-description>
|
1394 |
-
<tag line="
|
1395 |
-
<tag line="
|
1396 |
<type by_reference="false">boolean</type>
|
1397 |
</tag>
|
1398 |
-
<tag line="
|
1399 |
<type by_reference="false">string</type>
|
1400 |
</tag>
|
1401 |
-
<tag line="
|
1402 |
<type by_reference="false">string</type>
|
1403 |
</tag>
|
1404 |
-
<tag line="
|
1405 |
<type by_reference="false">string</type>
|
|
|
1406 |
</tag>
|
1407 |
</docblock>
|
1408 |
-
<argument line="
|
1409 |
<name>$status</name>
|
1410 |
<default><![CDATA[]]></default>
|
1411 |
<type/>
|
1412 |
</argument>
|
1413 |
-
<argument line="
|
1414 |
<name>$option</name>
|
1415 |
<default><![CDATA[]]></default>
|
1416 |
<type/>
|
1417 |
</argument>
|
1418 |
-
<argument line="
|
1419 |
<name>$value</name>
|
1420 |
<default><![CDATA[]]></default>
|
1421 |
<type/>
|
1422 |
</argument>
|
1423 |
</method>
|
1424 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1425 |
-
<name>
|
1426 |
-
<full_name>
|
1427 |
-
<docblock line="
|
1428 |
<description><![CDATA[Redirect to the Edit Tags/Categories page]]></description>
|
1429 |
<long-description><![CDATA[<p>The custom taxonomy add/edit submenu entries go to "upload.php" by default.
|
1430 |
This filter is the only way to redirect them to the correct WordPress page.</p>]]></long-description>
|
1431 |
-
<tag line="
|
|
|
|
|
|
|
1432 |
</docblock>
|
1433 |
</method>
|
1434 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1435 |
<name>mla_add_help_tab</name>
|
1436 |
<full_name>mla_add_help_tab</full_name>
|
1437 |
-
<docblock line="
|
1438 |
<description><![CDATA[Add contextual help tabs to all the MLA pages]]></description>
|
1439 |
<long-description><![CDATA[]]></long-description>
|
1440 |
-
<tag line="
|
|
|
|
|
|
|
1441 |
</docblock>
|
1442 |
</method>
|
1443 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1444 |
<name>mla_modify_parent_menu</name>
|
1445 |
<full_name>mla_modify_parent_menu</full_name>
|
1446 |
-
<docblock line="
|
1447 |
<description><![CDATA[Cleanup menus for Edit Tags/Categories page]]></description>
|
1448 |
<long-description><![CDATA[<p>The submenu entries for custom taxonomies under the "Media" menu are not set up
|
1449 |
correctly by WordPress, so this function cleans them up, redirecting the request
|
1450 |
to the right WordPress page for editing/adding taxonomy terms.</p>]]></long-description>
|
1451 |
-
<tag line="
|
1452 |
-
<tag line="
|
1453 |
<type by_reference="false">array</type>
|
1454 |
</tag>
|
1455 |
-
<tag line="
|
1456 |
<type by_reference="false">string</type>
|
1457 |
</tag>
|
1458 |
</docblock>
|
1459 |
-
<argument line="
|
1460 |
<name>$parent_file</name>
|
1461 |
<default><![CDATA[]]></default>
|
1462 |
<type/>
|
1463 |
</argument>
|
1464 |
</method>
|
1465 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1466 |
<name>mla_render_admin_page</name>
|
1467 |
<full_name>mla_render_admin_page</full_name>
|
1468 |
-
<docblock line="
|
1469 |
<description><![CDATA[Render the "Assistant" subpage in the Media section, using the list_table package]]></description>
|
1470 |
<long-description><![CDATA[]]></long-description>
|
1471 |
-
<tag line="
|
|
|
|
|
|
|
1472 |
</docblock>
|
1473 |
</method>
|
1474 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1475 |
<name>mla_inline_edit_action</name>
|
1476 |
<full_name>mla_inline_edit_action</full_name>
|
1477 |
-
<docblock line="
|
1478 |
<description><![CDATA[Ajax handler for inline editing (quick and bulk edit)]]></description>
|
1479 |
<long-description><![CDATA[<p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p>]]></long-description>
|
1480 |
-
<tag line="
|
1481 |
-
<tag line="
|
1482 |
-
<type by_reference="false">
|
1483 |
</tag>
|
1484 |
</docblock>
|
1485 |
</method>
|
1486 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
1487 |
<name>_build_inline_edit_form</name>
|
1488 |
<full_name>_build_inline_edit_form</full_name>
|
1489 |
-
<docblock line="
|
1490 |
-
<description><![CDATA[Build the hidden row templates for inline editing (quick and bulk edit)
|
1491 |
<long-description><![CDATA[<p>inspired by inline_edit() in wp-admin\includes\class-wp-posts-list-table.php.</p>]]></long-description>
|
1492 |
-
<tag line="
|
1493 |
-
<tag line="
|
1494 |
<type by_reference="false">object</type>
|
1495 |
</tag>
|
1496 |
-
<tag line="
|
1497 |
<type by_reference="false">string</type>
|
1498 |
</tag>
|
1499 |
</docblock>
|
1500 |
-
<argument line="
|
1501 |
<name>$MLAListTable</name>
|
1502 |
<default><![CDATA[]]></default>
|
1503 |
<type/>
|
1504 |
</argument>
|
1505 |
</method>
|
1506 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
1507 |
<name>_authors_dropdown</name>
|
1508 |
<full_name>_authors_dropdown</full_name>
|
1509 |
-
<docblock line="
|
1510 |
<description><![CDATA[Get the edit Authors dropdown box, if user has suitable permissions]]></description>
|
1511 |
<long-description><![CDATA[]]></long-description>
|
1512 |
-
<tag line="
|
1513 |
-
<tag line="
|
1514 |
<type by_reference="false">integer</type>
|
1515 |
</tag>
|
1516 |
-
<tag line="
|
1517 |
<type by_reference="false">string</type>
|
1518 |
</tag>
|
1519 |
-
<tag line="
|
1520 |
<type by_reference="false">string</type>
|
1521 |
</tag>
|
1522 |
-
<tag line="
|
1523 |
<type by_reference="false">string</type>
|
1524 |
<type by_reference="false">false</type>
|
1525 |
</tag>
|
1526 |
</docblock>
|
1527 |
-
<argument line="
|
1528 |
<name>$author</name>
|
1529 |
<default><![CDATA[0]]></default>
|
1530 |
<type/>
|
1531 |
</argument>
|
1532 |
-
<argument line="
|
1533 |
<name>$name</name>
|
1534 |
<default><![CDATA['post_author']]></default>
|
1535 |
<type/>
|
1536 |
</argument>
|
1537 |
-
<argument line="
|
1538 |
<name>$class</name>
|
1539 |
<default><![CDATA['authors']]></default>
|
1540 |
<type/>
|
1541 |
</argument>
|
1542 |
</method>
|
1543 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
1544 |
<name>_current_bulk_action</name>
|
1545 |
<full_name>_current_bulk_action</full_name>
|
1546 |
-
<docblock line="
|
1547 |
<description><![CDATA[Get the current action selected from the bulk actions dropdown]]></description>
|
1548 |
<long-description><![CDATA[]]></long-description>
|
1549 |
-
<tag line="
|
1550 |
-
<tag line="
|
1551 |
<type by_reference="false">string</type>
|
1552 |
<type by_reference="false">false</type>
|
1553 |
</tag>
|
1554 |
</docblock>
|
1555 |
</method>
|
1556 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
1557 |
<name>_delete_single_item</name>
|
1558 |
<full_name>_delete_single_item</full_name>
|
1559 |
-
<docblock line="
|
1560 |
-
<description><![CDATA[Delete a single item permanently
|
1561 |
<long-description><![CDATA[]]></long-description>
|
1562 |
-
<tag line="
|
1563 |
-
<tag line="
|
1564 |
<type by_reference="false">array</type>
|
1565 |
</tag>
|
1566 |
-
<tag line="
|
1567 |
<type by_reference="false">array</type>
|
1568 |
</tag>
|
1569 |
</docblock>
|
1570 |
-
<argument line="
|
1571 |
<name>$post_id</name>
|
1572 |
<default><![CDATA[]]></default>
|
1573 |
<type/>
|
1574 |
</argument>
|
1575 |
</method>
|
1576 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
1577 |
<name>_display_single_item</name>
|
1578 |
<full_name>_display_single_item</full_name>
|
1579 |
-
<docblock line="
|
1580 |
<description><![CDATA[Display a single item sub page; prepare the form to
|
1581 |
change the meta data for a single attachment.]]></description>
|
1582 |
<long-description><![CDATA[]]></long-description>
|
1583 |
-
<tag line="
|
1584 |
-
<tag line="
|
1585 |
<type by_reference="false">int</type>
|
1586 |
</tag>
|
1587 |
-
<tag line="
|
1588 |
<type by_reference="false">array</type>
|
1589 |
</tag>
|
1590 |
</docblock>
|
1591 |
-
<argument line="
|
1592 |
<name>$post_id</name>
|
1593 |
<default><![CDATA[]]></default>
|
1594 |
<type/>
|
1595 |
</argument>
|
1596 |
</method>
|
1597 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
1598 |
<name>_update_single_item</name>
|
1599 |
<full_name>_update_single_item</full_name>
|
1600 |
-
<docblock line="
|
1601 |
<description><![CDATA[Update a single item; change the meta data
|
1602 |
for a single attachment.]]></description>
|
1603 |
<long-description><![CDATA[]]></long-description>
|
1604 |
-
<tag line="
|
1605 |
-
<tag line="
|
1606 |
<type by_reference="false">int</type>
|
1607 |
</tag>
|
1608 |
-
<tag line="
|
1609 |
<type by_reference="false">array</type>
|
1610 |
</tag>
|
1611 |
-
<tag line="
|
1612 |
<type by_reference="false">array</type>
|
1613 |
</tag>
|
1614 |
-
<tag line="
|
1615 |
<type by_reference="false">array</type>
|
1616 |
</tag>
|
1617 |
</docblock>
|
1618 |
-
<argument line="
|
1619 |
<name>$post_id</name>
|
1620 |
<default><![CDATA[]]></default>
|
1621 |
<type/>
|
1622 |
</argument>
|
1623 |
-
<argument line="
|
1624 |
<name>$new_data</name>
|
1625 |
<default><![CDATA[]]></default>
|
1626 |
<type/>
|
1627 |
</argument>
|
1628 |
-
<argument line="
|
1629 |
<name>$tax_input</name>
|
1630 |
<default><![CDATA[NULL]]></default>
|
1631 |
<type/>
|
1632 |
</argument>
|
1633 |
</method>
|
1634 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
1635 |
<name>_restore_single_item</name>
|
1636 |
<full_name>_restore_single_item</full_name>
|
1637 |
-
<docblock line="
|
1638 |
<description><![CDATA[Restore a single item from the Trash]]></description>
|
1639 |
<long-description><![CDATA[]]></long-description>
|
1640 |
-
<tag line="
|
1641 |
-
<tag line="
|
1642 |
<type by_reference="false">array</type>
|
1643 |
</tag>
|
1644 |
-
<tag line="
|
1645 |
<type by_reference="false">array</type>
|
1646 |
</tag>
|
1647 |
</docblock>
|
1648 |
-
<argument line="
|
1649 |
<name>$post_id</name>
|
1650 |
<default><![CDATA[]]></default>
|
1651 |
<type/>
|
1652 |
</argument>
|
1653 |
</method>
|
1654 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
1655 |
<name>_trash_single_item</name>
|
1656 |
<full_name>_trash_single_item</full_name>
|
1657 |
-
<docblock line="
|
1658 |
<description><![CDATA[Move a single item to Trash]]></description>
|
1659 |
<long-description><![CDATA[]]></long-description>
|
1660 |
-
<tag line="
|
1661 |
-
<tag line="
|
1662 |
<type by_reference="false">array</type>
|
1663 |
</tag>
|
1664 |
-
<tag line="
|
1665 |
<type by_reference="false">array</type>
|
1666 |
</tag>
|
1667 |
</docblock>
|
1668 |
-
<argument line="
|
1669 |
<name>$post_id</name>
|
1670 |
<default><![CDATA[]]></default>
|
1671 |
<type/>
|
@@ -1673,7 +1785,7 @@ for a single attachment.]]></description>
|
|
1673 |
</method>
|
1674 |
</class>
|
1675 |
</file>
|
1676 |
-
<file path="includes\class-mla-objects.php" hash="
|
1677 |
<docblock line="2">
|
1678 |
<description><![CDATA[Media Library Assistant Custom Taxonomy and Post Type objects]]></description>
|
1679 |
<long-description><![CDATA[]]></long-description>
|
@@ -1690,135 +1802,83 @@ for a single attachment.]]></description>
|
|
1690 |
<tag line="9" name="package" description="Media Library Assistant"/>
|
1691 |
<tag line="9" name="since" description="0.20"/>
|
1692 |
</docblock>
|
1693 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1694 |
<name>initialize</name>
|
1695 |
<full_name>initialize</full_name>
|
1696 |
<docblock line="16">
|
1697 |
<description><![CDATA[Initialization function, similar to __construct()]]></description>
|
1698 |
<long-description><![CDATA[]]></long-description>
|
1699 |
<tag line="16" name="since" description="0.20"/>
|
|
|
|
|
|
|
1700 |
</docblock>
|
1701 |
</method>
|
1702 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
1703 |
<name>_build_taxonomies</name>
|
1704 |
<full_name>_build_taxonomies</full_name>
|
1705 |
-
<docblock line="
|
1706 |
<description><![CDATA[Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters]]></description>
|
1707 |
<long-description><![CDATA[]]></long-description>
|
1708 |
-
<tag line="
|
1709 |
-
|
1710 |
-
|
1711 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="105" package="Media Library Assistant">
|
1712 |
-
<name>mla_attachment_category_get_columns_filter</name>
|
1713 |
-
<full_name>mla_attachment_category_get_columns_filter</full_name>
|
1714 |
-
<docblock line="95">
|
1715 |
-
<description><![CDATA[WordPress Filter for Attachment Category "Attachments" column,
|
1716 |
-
which replaces the "Posts" column with an equivalent "Attachments" column.]]></description>
|
1717 |
-
<long-description><![CDATA[]]></long-description>
|
1718 |
-
<tag line="95" name="since" description="0.1"/>
|
1719 |
-
<tag line="95" name="param" description="column definitions for the Attachment Category list table." type="array" variable="$columns">
|
1720 |
-
<type by_reference="false">array</type>
|
1721 |
-
</tag>
|
1722 |
-
<tag line="95" name="return" description="updated column definitions for the Attachment Category list table." type="array">
|
1723 |
-
<type by_reference="false">array</type>
|
1724 |
-
</tag>
|
1725 |
-
</docblock>
|
1726 |
-
<argument line="105">
|
1727 |
-
<name>$columns</name>
|
1728 |
-
<default><![CDATA[]]></default>
|
1729 |
-
<type/>
|
1730 |
-
</argument>
|
1731 |
-
</method>
|
1732 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="124" package="Media Library Assistant">
|
1733 |
-
<name>mla_attachment_category_column_filter</name>
|
1734 |
-
<full_name>mla_attachment_category_column_filter</full_name>
|
1735 |
-
<docblock line="111">
|
1736 |
-
<description><![CDATA[WordPress Filter for Attachment Category "Attachments" column,
|
1737 |
-
which returns a count of the attachments assigned a given category]]></description>
|
1738 |
-
<long-description><![CDATA[]]></long-description>
|
1739 |
-
<tag line="111" name="since" description="0.1"/>
|
1740 |
-
<tag line="111" name="param" description="unknown, undocumented parameter." type="string" variable="$place_holder">
|
1741 |
-
<type by_reference="false">string</type>
|
1742 |
-
</tag>
|
1743 |
-
<tag line="111" name="param" description="name of the column." type="array" variable="$column_name">
|
1744 |
-
<type by_reference="false">array</type>
|
1745 |
-
</tag>
|
1746 |
-
<tag line="111" name="param" description="ID of the term for which the count is desired." type="array" variable="$term_id">
|
1747 |
-
<type by_reference="false">array</type>
|
1748 |
-
</tag>
|
1749 |
-
<tag line="111" 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">
|
1750 |
-
<type by_reference="false">array</type>
|
1751 |
</tag>
|
1752 |
</docblock>
|
1753 |
-
<argument line="124">
|
1754 |
-
<name>$place_holder</name>
|
1755 |
-
<default><![CDATA[]]></default>
|
1756 |
-
<type/>
|
1757 |
-
</argument>
|
1758 |
-
<argument line="124">
|
1759 |
-
<name>$column_name</name>
|
1760 |
-
<default><![CDATA[]]></default>
|
1761 |
-
<type/>
|
1762 |
-
</argument>
|
1763 |
-
<argument line="124">
|
1764 |
-
<name>$term_id</name>
|
1765 |
-
<default><![CDATA[]]></default>
|
1766 |
-
<type/>
|
1767 |
-
</argument>
|
1768 |
</method>
|
1769 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1770 |
-
<name>
|
1771 |
-
<full_name>
|
1772 |
-
<docblock line="
|
1773 |
-
<description><![CDATA[WordPress Filter for
|
1774 |
which replaces the "Posts" column with an equivalent "Attachments" column.]]></description>
|
1775 |
<long-description><![CDATA[]]></long-description>
|
1776 |
-
<tag line="
|
1777 |
-
<tag line="
|
1778 |
<type by_reference="false">array</type>
|
1779 |
</tag>
|
1780 |
-
<tag line="
|
1781 |
<type by_reference="false">array</type>
|
1782 |
</tag>
|
1783 |
</docblock>
|
1784 |
-
<argument line="
|
1785 |
<name>$columns</name>
|
1786 |
<default><![CDATA[]]></default>
|
1787 |
<type/>
|
1788 |
</argument>
|
1789 |
</method>
|
1790 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1791 |
-
<name>
|
1792 |
-
<full_name>
|
1793 |
-
<docblock line="
|
1794 |
-
<description><![CDATA[WordPress Filter for
|
1795 |
-
which returns a count of the attachments assigned a given
|
1796 |
<long-description><![CDATA[]]></long-description>
|
1797 |
-
<tag line="
|
1798 |
-
<tag line="
|
1799 |
<type by_reference="false">string</type>
|
1800 |
</tag>
|
1801 |
-
<tag line="
|
1802 |
<type by_reference="false">array</type>
|
1803 |
</tag>
|
1804 |
-
<tag line="
|
1805 |
<type by_reference="false">array</type>
|
1806 |
</tag>
|
1807 |
-
<tag line="
|
1808 |
<type by_reference="false">array</type>
|
1809 |
</tag>
|
1810 |
</docblock>
|
1811 |
-
<argument line="
|
1812 |
<name>$place_holder</name>
|
1813 |
<default><![CDATA[]]></default>
|
1814 |
<type/>
|
1815 |
</argument>
|
1816 |
-
<argument line="
|
1817 |
<name>$column_name</name>
|
1818 |
<default><![CDATA[]]></default>
|
1819 |
<type/>
|
1820 |
</argument>
|
1821 |
-
<argument line="
|
1822 |
<name>$term_id</name>
|
1823 |
<default><![CDATA[]]></default>
|
1824 |
<type/>
|
@@ -1826,7 +1886,7 @@ which returns a count of the attachments assigned a given tag]]></description>
|
|
1826 |
</method>
|
1827 |
</class>
|
1828 |
</file>
|
1829 |
-
<file path="includes\class-mla-settings.php" hash="
|
1830 |
<docblock line="2">
|
1831 |
<description><![CDATA[Manages the plugin option settings and provides the settings page to edit them]]></description>
|
1832 |
<long-description><![CDATA[]]></long-description>
|
@@ -1849,199 +1909,309 @@ and provides the settings page to edit them.]]></description>
|
|
1849 |
<full_name>MLA_SETTINGS_SLUG</full_name>
|
1850 |
<value><![CDATA['mla-settings-menu']]></value>
|
1851 |
<docblock line="17">
|
1852 |
-
<description><![CDATA[Provides a unique name for the settings page
|
1853 |
<long-description><![CDATA[]]></long-description>
|
1854 |
</docblock>
|
1855 |
</constant>
|
1856 |
-
<
|
1857 |
-
<name
|
1858 |
-
<
|
|
|
1859 |
<docblock line="22">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1860 |
<description><![CDATA[$mla_options defines the database options and admin page areas for setting/updating them.]]></description>
|
1861 |
<long-description><![CDATA[<p>Each option is defined by an array with the following elements:</p>
|
1862 |
|
1863 |
<p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
|
1864 |
|
1865 |
<p>name => admin page label or heading text
|
1866 |
-
type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea'
|
1867 |
std => default value
|
1868 |
help => help text
|
1869 |
size => text size, default 40
|
1870 |
cols => textbox columns, default 90
|
1871 |
rows => textbox rows, default 5
|
1872 |
-
options => array of radio or select option values
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1873 |
</docblock>
|
1874 |
</property>
|
1875 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1876 |
<name>initialize</name>
|
1877 |
<full_name>initialize</full_name>
|
1878 |
-
<docblock line="
|
1879 |
<description><![CDATA[Initialization function, similar to __construct()]]></description>
|
1880 |
<long-description><![CDATA[]]></long-description>
|
1881 |
-
<tag line="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1882 |
</docblock>
|
1883 |
</method>
|
1884 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1885 |
<name>mla_admin_menu_action</name>
|
1886 |
<full_name>mla_admin_menu_action</full_name>
|
1887 |
-
<docblock line="
|
1888 |
<description><![CDATA[Add settings page in the "Settings" section,
|
1889 |
add settings link in the Plugins section entry for MLA.]]></description>
|
1890 |
<long-description><![CDATA[]]></long-description>
|
1891 |
-
<tag line="
|
|
|
|
|
|
|
1892 |
</docblock>
|
1893 |
</method>
|
1894 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1895 |
<name>mla_add_plugin_settings_link</name>
|
1896 |
<full_name>mla_add_plugin_settings_link</full_name>
|
1897 |
-
<docblock line="
|
1898 |
<description><![CDATA[Add the "Settings" link to the MLA entry in the Plugins section]]></description>
|
1899 |
<long-description><![CDATA[]]></long-description>
|
1900 |
-
<tag line="
|
1901 |
-
<tag line="
|
1902 |
<type by_reference="false">array</type>
|
1903 |
</tag>
|
1904 |
-
<tag line="
|
1905 |
<type by_reference="false">string</type>
|
1906 |
</tag>
|
1907 |
-
<tag line="
|
1908 |
<type by_reference="false">array</type>
|
1909 |
</tag>
|
1910 |
</docblock>
|
1911 |
-
<argument line="
|
1912 |
<name>$links</name>
|
1913 |
<default><![CDATA[]]></default>
|
1914 |
<type/>
|
1915 |
</argument>
|
1916 |
-
<argument line="
|
1917 |
<name>$file</name>
|
1918 |
<default><![CDATA[]]></default>
|
1919 |
<type/>
|
1920 |
</argument>
|
1921 |
</method>
|
1922 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1923 |
<name>mla_get_option</name>
|
1924 |
<full_name>mla_get_option</full_name>
|
1925 |
-
<docblock line="
|
1926 |
<description><![CDATA[Return the stored value or default value of a defined MLA option]]></description>
|
1927 |
<long-description><![CDATA[]]></long-description>
|
1928 |
-
<tag line="
|
1929 |
-
<tag line="
|
1930 |
<type by_reference="false">string</type>
|
1931 |
</tag>
|
1932 |
-
<tag line="
|
1933 |
<type by_reference="false">mixed</type>
|
1934 |
</tag>
|
1935 |
</docblock>
|
1936 |
-
<argument line="
|
1937 |
<name>$option</name>
|
1938 |
<default><![CDATA[]]></default>
|
1939 |
<type/>
|
1940 |
</argument>
|
1941 |
</method>
|
1942 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1943 |
<name>mla_update_option</name>
|
1944 |
<full_name>mla_update_option</full_name>
|
1945 |
-
<docblock line="
|
1946 |
<description><![CDATA[Add or update the stored value of a defined MLA option]]></description>
|
1947 |
<long-description><![CDATA[]]></long-description>
|
1948 |
-
<tag line="
|
1949 |
-
<tag line="
|
1950 |
<type by_reference="false">string</type>
|
1951 |
</tag>
|
1952 |
-
<tag line="
|
1953 |
<type by_reference="false">mixed</type>
|
1954 |
</tag>
|
1955 |
-
<tag line="
|
1956 |
<type by_reference="false">boolean</type>
|
1957 |
</tag>
|
1958 |
</docblock>
|
1959 |
-
<argument line="
|
1960 |
<name>$option</name>
|
1961 |
<default><![CDATA[]]></default>
|
1962 |
<type/>
|
1963 |
</argument>
|
1964 |
-
<argument line="
|
1965 |
<name>$newvalue</name>
|
1966 |
<default><![CDATA[]]></default>
|
1967 |
<type/>
|
1968 |
</argument>
|
1969 |
</method>
|
1970 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1971 |
<name>mla_delete_option</name>
|
1972 |
<full_name>mla_delete_option</full_name>
|
1973 |
-
<docblock line="
|
1974 |
<description><![CDATA[Delete the stored value of a defined MLA option]]></description>
|
1975 |
<long-description><![CDATA[]]></long-description>
|
1976 |
-
<tag line="
|
1977 |
-
<tag line="
|
1978 |
<type by_reference="false">string</type>
|
1979 |
</tag>
|
1980 |
-
<tag line="
|
1981 |
<type by_reference="false">boolean</type>
|
1982 |
</tag>
|
1983 |
</docblock>
|
1984 |
-
<argument line="
|
1985 |
<name>$option</name>
|
1986 |
<default><![CDATA[]]></default>
|
1987 |
<type/>
|
1988 |
</argument>
|
1989 |
</method>
|
1990 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
1991 |
<name>mla_render_settings_page</name>
|
1992 |
<full_name>mla_render_settings_page</full_name>
|
1993 |
-
<docblock line="
|
1994 |
<description><![CDATA[Render (echo) the "Media Library Assistant" subpage in the Settings section]]></description>
|
1995 |
<long-description><![CDATA[]]></long-description>
|
1996 |
-
<tag line="
|
1997 |
-
<tag line="
|
1998 |
-
<type by_reference="false"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1999 |
</tag>
|
2000 |
</docblock>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2001 |
</method>
|
2002 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
2003 |
<name>_save_settings</name>
|
2004 |
<full_name>_save_settings</full_name>
|
2005 |
-
<docblock line="
|
2006 |
<description><![CDATA[Save settings to the options table]]></description>
|
2007 |
<long-description><![CDATA[]]></long-description>
|
2008 |
-
<tag line="
|
2009 |
-
<tag line="
|
2010 |
<type by_reference="false">array</type>
|
2011 |
</tag>
|
2012 |
-
<tag line="
|
2013 |
<type by_reference="false">array</type>
|
2014 |
</tag>
|
2015 |
</docblock>
|
2016 |
-
<argument line="
|
2017 |
<name>$template_array</name>
|
2018 |
<default><![CDATA[]]></default>
|
2019 |
<type/>
|
2020 |
</argument>
|
2021 |
</method>
|
2022 |
-
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="
|
2023 |
<name>_reset_settings</name>
|
2024 |
<full_name>_reset_settings</full_name>
|
2025 |
-
<docblock line="
|
2026 |
<description><![CDATA[Delete saved settings, restoring default values]]></description>
|
2027 |
<long-description><![CDATA[]]></long-description>
|
2028 |
-
<tag line="
|
2029 |
-
<tag line="
|
2030 |
<type by_reference="false">array</type>
|
2031 |
</tag>
|
2032 |
-
<tag line="
|
2033 |
<type by_reference="false">array</type>
|
2034 |
</tag>
|
2035 |
</docblock>
|
2036 |
-
<argument line="
|
2037 |
<name>$template_array</name>
|
2038 |
<default><![CDATA[]]></default>
|
2039 |
<type/>
|
2040 |
</argument>
|
2041 |
</method>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2042 |
</class>
|
2043 |
</file>
|
2044 |
-
<file path="includes\class-mla-shortcodes.php" hash="
|
2045 |
<docblock line="2">
|
2046 |
<description><![CDATA[Media Library Assistant Shortcode handler(s)]]></description>
|
2047 |
<long-description><![CDATA[]]></long-description>
|
@@ -2058,30 +2228,33 @@ add settings link in the Plugins section entry for MLA.]]></description>
|
|
2058 |
<tag line="9" name="package" description="Media Library Assistant"/>
|
2059 |
<tag line="9" name="since" description="0.20"/>
|
2060 |
</docblock>
|
2061 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
2062 |
<name>initialize</name>
|
2063 |
<full_name>initialize</full_name>
|
2064 |
<docblock line="16">
|
2065 |
<description><![CDATA[Initialization function, similar to __construct()]]></description>
|
2066 |
<long-description><![CDATA[]]></long-description>
|
2067 |
<tag line="16" name="since" description="0.20"/>
|
|
|
|
|
|
|
2068 |
</docblock>
|
2069 |
</method>
|
2070 |
-
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="
|
2071 |
<name>mla_attachment_list_shortcode</name>
|
2072 |
<full_name>mla_attachment_list_shortcode</full_name>
|
2073 |
-
<docblock line="
|
2074 |
<description><![CDATA[WordPress Shortcode; renders a complete list of all attachments and references to them]]></description>
|
2075 |
<long-description><![CDATA[]]></long-description>
|
2076 |
-
<tag line="
|
2077 |
-
<tag line="
|
2078 |
-
<type by_reference="false">
|
2079 |
</tag>
|
2080 |
</docblock>
|
2081 |
</method>
|
2082 |
</class>
|
2083 |
</file>
|
2084 |
-
<file path="includes\mla-plugin-loader.php" hash="
|
2085 |
<docblock line="2">
|
2086 |
<description><![CDATA[Media Library Assistant Plugin Loader]]></description>
|
2087 |
<long-description><![CDATA[<p>Defines constants and loads all of the classes and functions required to run the plugin.
|
@@ -2095,16 +2268,16 @@ This file is only loaded if the naming conflict tests in index.php are passed.</
|
|
2095 |
<include line="28" type="Require Once" package="Media Library Assistant">
|
2096 |
<name/>
|
2097 |
</include>
|
2098 |
-
<include line="
|
2099 |
<name/>
|
2100 |
</include>
|
2101 |
-
<include line="
|
2102 |
<name/>
|
2103 |
</include>
|
2104 |
<include line="47" type="Require Once" package="Media Library Assistant">
|
2105 |
<name/>
|
2106 |
</include>
|
2107 |
-
<include line="
|
2108 |
<name/>
|
2109 |
</include>
|
2110 |
<include line="59" type="Require Once" package="Media Library Assistant">
|
@@ -2120,13 +2293,13 @@ This file is only loaded if the naming conflict tests in index.php are passed.</
|
|
2120 |
</docblock>
|
2121 |
</constant>
|
2122 |
</file>
|
2123 |
-
<file path="index.php" hash="
|
2124 |
<docblock line="2">
|
2125 |
<description><![CDATA[Provides several enhancements to the handling of images and files held in the WordPress Media Library]]></description>
|
2126 |
<long-description><![CDATA[<p>This file contains several tests for name conflicts with other plugins. Only if the tests are passed
|
2127 |
will the rest of the plugin be loaded and run.</p>]]></long-description>
|
2128 |
<tag line="2" name="package" description="Media Library Assistant"/>
|
2129 |
-
<tag line="2" name="version" description="0.
|
2130 |
</docblock>
|
2131 |
<include line="103" type="Require Once" package="Media Library Assistant">
|
2132 |
<name>includes/mla-plugin-loader.php</name>
|
@@ -2159,7 +2332,7 @@ will the rest of the plugin be loaded and run.</p>]]></long-description>
|
|
2159 |
</docblock>
|
2160 |
</function>
|
2161 |
</file>
|
2162 |
-
<file path="tests\class-mla-tests.php" hash="
|
2163 |
<docblock line="2">
|
2164 |
<description><![CDATA[Provides basic run-time tests to ensure the plugin can run in the current WordPress envrionment]]></description>
|
2165 |
<long-description><![CDATA[]]></long-description>
|
@@ -2190,8 +2363,8 @@ to ensure the plugin can run in the current WordPress envrionment.]]></descripti
|
|
2190 |
<tag line="17" name="param" description="Name of the plugin for messaging purposes" type="string" variable="$plugin_name">
|
2191 |
<type by_reference="false">string</type>
|
2192 |
</tag>
|
2193 |
-
<tag line="17" name="return" description="Exit with messaging if PHP version is too old" type="
|
2194 |
-
<type by_reference="false"
|
2195 |
</tag>
|
2196 |
</docblock>
|
2197 |
<argument line="27">
|
@@ -2218,8 +2391,8 @@ to ensure the plugin can run in the current WordPress envrionment.]]></descripti
|
|
2218 |
<tag line="37" name="param" description="Name of the plugin for messaging purposes" type="string" variable="$plugin_name">
|
2219 |
<type by_reference="false">string</type>
|
2220 |
</tag>
|
2221 |
-
<tag line="37" name="return" description="Exit with messaging if version is too old" type="
|
2222 |
-
<type by_reference="false"
|
2223 |
</tag>
|
2224 |
</docblock>
|
2225 |
<argument line="47">
|
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="72dfaa80f67805942e02cec364fa67a9" 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>
|
7 |
<tag line="2" name="package" description="Media Library Assistant"/>
|
8 |
<tag line="2" name="since" description="0.1"/>
|
12 |
<name>MLAData</name>
|
13 |
<full_name>\MLAData</full_name>
|
14 |
<docblock line="9">
|
15 |
+
<description><![CDATA[Class MLA (Media Library Assistant) Data provides database and template file access for MLA needs]]></description>
|
16 |
<long-description><![CDATA[<p>The _template functions are inspired by the book "WordPress 3 Plugin Development Essentials."
|
17 |
Templates separate HTML markup from PHP code for easier maintenance and localization.</p>]]></long-description>
|
18 |
<tag line="9" name="package" description="Media Library Assistant"/>
|
19 |
<tag line="9" name="since" description="0.1"/>
|
20 |
</docblock>
|
21 |
+
<property final="false" static="true" visibility="private" line="225" namespace="global" package="Media Library Assistant">
|
22 |
+
<name>$query_parameters</name>
|
23 |
+
<default><![CDATA[array()]]></default>
|
24 |
+
<docblock line="214">
|
25 |
+
<description><![CDATA[WP_Query filter "parameters"]]></description>
|
26 |
+
<long-description><![CDATA[<p>This array defines parameters for the query's join, where and orderby filters.
|
27 |
+
The parameters are set up in the _prepare_list_table_query function, and
|
28 |
+
any further logic required to translate those values is contained in the filters.</p>]]></long-description>
|
29 |
+
<tag line="214" name="since" description="0.30"/>
|
30 |
+
<tag line="214" name="var" description="" type="array">
|
31 |
+
<type by_reference="false">array</type>
|
32 |
+
</tag>
|
33 |
+
</docblock>
|
34 |
+
</property>
|
35 |
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="24" package="Media Library Assistant">
|
36 |
<name>initialize</name>
|
37 |
<full_name>initialize</full_name>
|
76 |
<tag line="109" name="param" description="A formatting string containing [+placeholders+]" type="string" variable="$tpl">
|
77 |
<type by_reference="false">string</type>
|
78 |
</tag>
|
79 |
+
<tag line="109" name="param" description="An associative array containing keys and values e.g. array('key' => 'value')" type="array" variable="$hash">
|
80 |
<type by_reference="false">array</type>
|
81 |
</tag>
|
82 |
+
<tag line="109" name="return" description="Placeholders corresponding to the keys of the hash will be replaced with their values" type="string">
|
83 |
<type by_reference="false">string</type>
|
84 |
</tag>
|
85 |
</docblock>
|
94 |
<type/>
|
95 |
</argument>
|
96 |
</method>
|
97 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="139" package="Media Library Assistant">
|
98 |
+
<name>mla_count_list_table_items</name>
|
99 |
+
<full_name>mla_count_list_table_items</full_name>
|
100 |
<docblock line="130">
|
101 |
+
<description><![CDATA[Get the total number of attachment posts]]></description>
|
102 |
+
<long-description><![CDATA[]]></long-description>
|
103 |
+
<tag line="130" name="since" description="0.30"/>
|
104 |
+
<tag line="130" name="param" description="Query variables, e.g., from $_REQUEST" type="array" variable="$request">
|
|
|
|
|
105 |
<type by_reference="false">array</type>
|
106 |
</tag>
|
107 |
+
<tag line="130" name="return" description="Number of attachment posts" type="integer">
|
108 |
+
<type by_reference="false">integer</type>
|
109 |
</tag>
|
110 |
</docblock>
|
111 |
+
<argument line="139">
|
112 |
<name>$request</name>
|
113 |
<default><![CDATA[]]></default>
|
114 |
<type/>
|
115 |
</argument>
|
116 |
</method>
|
117 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="160" package="Media Library Assistant">
|
118 |
<name>mla_query_list_table_items</name>
|
119 |
<full_name>mla_query_list_table_items</full_name>
|
120 |
+
<docblock line="146">
|
121 |
<description><![CDATA[Retrieve attachment objects for list table display]]></description>
|
122 |
<long-description><![CDATA[<p>Supports prepare_items in class-mla-list-table.php.
|
123 |
Modeled after wp_edit_attachments_query in wp-admin/post.php</p>]]></long-description>
|
124 |
+
<tag line="146" name="since" description="0.1"/>
|
125 |
+
<tag line="146" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
|
126 |
<type by_reference="false">array</type>
|
127 |
</tag>
|
128 |
+
<tag line="146" name="param" description="number of rows to skip over to reach desired page" type="int" variable="$offset">
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
<type by_reference="false">int</type>
|
130 |
</tag>
|
131 |
+
<tag line="146" name="param" description="number of rows on each page" type="int" variable="$count">
|
132 |
<type by_reference="false">int</type>
|
133 |
</tag>
|
134 |
+
<tag line="146" name="return" description="attachment objects (posts) including parent data, meta data and references" type="array">
|
135 |
<type by_reference="false">array</type>
|
136 |
</tag>
|
137 |
</docblock>
|
138 |
+
<argument line="160">
|
139 |
<name>$request</name>
|
140 |
<default><![CDATA[]]></default>
|
141 |
<type/>
|
142 |
</argument>
|
143 |
+
<argument line="160">
|
144 |
+
<name>$offset</name>
|
145 |
<default><![CDATA[]]></default>
|
146 |
<type/>
|
147 |
</argument>
|
148 |
+
<argument line="160">
|
149 |
+
<name>$count</name>
|
150 |
<default><![CDATA[]]></default>
|
151 |
<type/>
|
152 |
</argument>
|
153 |
+
</method>
|
154 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="239" package="Media Library Assistant">
|
155 |
+
<name>_prepare_list_table_query</name>
|
156 |
+
<full_name>_prepare_list_table_query</full_name>
|
157 |
+
<docblock line="227">
|
158 |
+
<description><![CDATA[Sanitize and expand query arguments from request variables]]></description>
|
159 |
+
<long-description><![CDATA[<p>Prepare the arguments for WP_Query.
|
160 |
+
Modeled after wp_edit_attachments_query in wp-admin/post.php</p>]]></long-description>
|
161 |
+
<tag line="227" name="since" description="0.1"/>
|
162 |
+
<tag line="227" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
|
163 |
+
<type by_reference="false">array</type>
|
164 |
+
</tag>
|
165 |
+
<tag line="227" name="return" description="revised arguments suitable for WP_Query" type="array">
|
166 |
+
<type by_reference="false">array</type>
|
167 |
+
</tag>
|
168 |
+
</docblock>
|
169 |
+
<argument line="239">
|
170 |
+
<name>$request</name>
|
171 |
<default><![CDATA[]]></default>
|
172 |
<type/>
|
173 |
</argument>
|
174 |
+
</method>
|
175 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="321" package="Media Library Assistant">
|
176 |
+
<name>_execute_list_table_query</name>
|
177 |
+
<full_name>_execute_list_table_query</full_name>
|
178 |
+
<docblock line="312">
|
179 |
+
<description><![CDATA[Add filters, run query, remove filters]]></description>
|
180 |
+
<long-description><![CDATA[]]></long-description>
|
181 |
+
<tag line="312" name="since" description="0.30"/>
|
182 |
+
<tag line="312" name="param" description="query parameters from web page, usually found in $_REQUEST" type="array" variable="$request">
|
183 |
+
<type by_reference="false">array</type>
|
184 |
+
</tag>
|
185 |
+
<tag line="312" name="return" description="WP_Query object with query results" type="object">
|
186 |
+
<type by_reference="false">object</type>
|
187 |
+
</tag>
|
188 |
+
</docblock>
|
189 |
+
<argument line="321">
|
190 |
+
<name>$request</name>
|
191 |
+
<default><![CDATA[]]></default>
|
192 |
+
<type/>
|
193 |
+
</argument>
|
194 |
+
</method>
|
195 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="346" package="Media Library Assistant">
|
196 |
+
<name>mla_query_posts_join_filter</name>
|
197 |
+
<full_name>mla_query_posts_join_filter</full_name>
|
198 |
+
<docblock line="335">
|
199 |
+
<description><![CDATA[Adds a JOIN clause, if required]]></description>
|
200 |
+
<long-description><![CDATA[<p>Defined as public because it's a filter.</p>]]></long-description>
|
201 |
+
<tag line="335" name="since" description="0.30"/>
|
202 |
+
<tag line="335" name="param" description="query clause before modification" type="string" variable="$join_clause">
|
203 |
+
<type by_reference="false">string</type>
|
204 |
+
</tag>
|
205 |
+
<tag line="335" name="return" description="query clause after "detached" item modification" type="string">
|
206 |
+
<type by_reference="false">string</type>
|
207 |
+
</tag>
|
208 |
+
</docblock>
|
209 |
+
<argument line="346">
|
210 |
+
<name>$join_clause</name>
|
211 |
<default><![CDATA[]]></default>
|
212 |
<type/>
|
213 |
</argument>
|
214 |
</method>
|
215 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="366" package="Media Library Assistant">
|
216 |
+
<name>mla_query_posts_where_filter</name>
|
217 |
+
<full_name>mla_query_posts_where_filter</full_name>
|
218 |
+
<docblock line="354">
|
219 |
<description><![CDATA[Adds a WHERE clause for detached items]]></description>
|
220 |
+
<long-description><![CDATA[<p>Modeled after _edit_attachments_query_helper in wp-admin/post.php.
|
221 |
+
Defined as public because it's a filter.</p>]]></long-description>
|
222 |
+
<tag line="354" name="since" description="0.1"/>
|
223 |
+
<tag line="354" name="param" description="query clause before modification" type="string" variable="$where_clause">
|
224 |
+
<type by_reference="false">string</type>
|
225 |
+
</tag>
|
226 |
+
<tag line="354" name="return" description="query clause after "detached" item modification" type="string">
|
227 |
+
<type by_reference="false">string</type>
|
228 |
+
</tag>
|
229 |
+
</docblock>
|
230 |
+
<argument line="366">
|
231 |
+
<name>$where_clause</name>
|
232 |
+
<default><![CDATA[]]></default>
|
233 |
+
<type/>
|
234 |
+
</argument>
|
235 |
+
</method>
|
236 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="389" package="Media Library Assistant">
|
237 |
+
<name>mla_query_posts_orderby_filter</name>
|
238 |
+
<full_name>mla_query_posts_orderby_filter</full_name>
|
239 |
+
<docblock line="377">
|
240 |
+
<description><![CDATA[Adds a ORDERBY clause, if required]]></description>
|
241 |
+
<long-description><![CDATA[<p>Expands the range of sort options because the logic in WP_Query is limited.
|
242 |
+
Defined as public because it's a filter.</p>]]></long-description>
|
243 |
+
<tag line="377" name="since" description="0.30"/>
|
244 |
+
<tag line="377" name="param" description="query clause before modification" type="string" variable="$orderby_clause">
|
245 |
<type by_reference="false">string</type>
|
246 |
</tag>
|
247 |
+
<tag line="377" name="return" description="updated query clause" type="string">
|
248 |
<type by_reference="false">string</type>
|
249 |
</tag>
|
250 |
</docblock>
|
251 |
+
<argument line="389">
|
252 |
+
<name>$orderby_clause</name>
|
253 |
<default><![CDATA[]]></default>
|
254 |
<type/>
|
255 |
</argument>
|
256 |
</method>
|
257 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="430" package="Media Library Assistant">
|
258 |
<name>mla_get_attachment_by_id</name>
|
259 |
<full_name>mla_get_attachment_by_id</full_name>
|
260 |
+
<docblock line="419">
|
261 |
<description><![CDATA[Retrieve an Attachment array given a $post_id]]></description>
|
262 |
<long-description><![CDATA[<p>The (associative) array will contain every field that can be found in
|
263 |
the posts and postmeta tables, and all references to the attachment.</p>]]></long-description>
|
264 |
+
<tag line="419" name="since" description="0.1"/>
|
265 |
+
<tag line="419" name="param" description="The ID of the attachment post" type="int" variable="$post_id">
|
266 |
<type by_reference="false">int</type>
|
267 |
</tag>
|
268 |
+
<tag line="419" name="return" description="NULL on failure else associative array" type="NULL|array">
|
269 |
<type by_reference="false">NULL</type>
|
270 |
<type by_reference="false">array</type>
|
271 |
</tag>
|
272 |
</docblock>
|
273 |
+
<argument line="430">
|
274 |
<name>$post_id</name>
|
275 |
<default><![CDATA[]]></default>
|
276 |
<type/>
|
277 |
</argument>
|
278 |
</method>
|
279 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="481" package="Media Library Assistant">
|
280 |
<name>mla_fetch_attachment_references</name>
|
281 |
<full_name>mla_fetch_attachment_references</full_name>
|
282 |
+
<docblock line="468">
|
283 |
<description><![CDATA[Find Featured Image and inserted image/link references to an attachment]]></description>
|
284 |
<long-description><![CDATA[<p>Searches all post and page content to see if the attachment is used
|
285 |
as a Featured Image or inserted in the post as an image or link.</p>]]></long-description>
|
286 |
+
<tag line="468" name="since" description="0.1"/>
|
287 |
+
<tag line="468" name="param" description="post ID of attachment" type="int" variable="$ID">
|
288 |
<type by_reference="false">int</type>
|
289 |
</tag>
|
290 |
+
<tag line="468" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent">
|
291 |
<type by_reference="false">int</type>
|
292 |
</tag>
|
293 |
+
<tag line="468" name="return" description="Reference information; see $references array comments" type="array">
|
294 |
<type by_reference="false">array</type>
|
295 |
</tag>
|
296 |
</docblock>
|
297 |
+
<argument line="481">
|
298 |
<name>$ID</name>
|
299 |
<default><![CDATA[]]></default>
|
300 |
<type/>
|
301 |
</argument>
|
302 |
+
<argument line="481">
|
303 |
<name>$parent</name>
|
304 |
<default><![CDATA[]]></default>
|
305 |
<type/>
|
306 |
</argument>
|
307 |
</method>
|
308 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="606" package="Media Library Assistant">
|
309 |
<name>_fetch_attachment_parent_data</name>
|
310 |
<full_name>_fetch_attachment_parent_data</full_name>
|
311 |
+
<docblock line="597">
|
312 |
<description><![CDATA[Returns information about an attachment's parent, if found]]></description>
|
313 |
<long-description><![CDATA[]]></long-description>
|
314 |
+
<tag line="597" name="since" description="0.1"/>
|
315 |
+
<tag line="597" name="param" description="post ID of attachment's parent, if any" type="int" variable="$parent_id">
|
316 |
<type by_reference="false">int</type>
|
317 |
</tag>
|
318 |
+
<tag line="597" name="return" description="Parent information; post_date, post_title and post_type" type="array">
|
319 |
<type by_reference="false">array</type>
|
320 |
</tag>
|
321 |
</docblock>
|
322 |
+
<argument line="606">
|
323 |
<name>$parent_id</name>
|
324 |
<default><![CDATA[]]></default>
|
325 |
<type/>
|
326 |
</argument>
|
327 |
</method>
|
328 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="634" package="Media Library Assistant">
|
329 |
<name>_fetch_attachment_metadata</name>
|
330 |
<full_name>_fetch_attachment_metadata</full_name>
|
331 |
+
<docblock line="621">
|
332 |
<description><![CDATA[Fetch and filter meta data for an attachment]]></description>
|
333 |
<long-description><![CDATA[<p>Returns a filtered array of a post's meta data. Internal values beginning with '<em>'
|
334 |
are stripped out or converted to an 'mla</em>' equivalent. Array data is replaced with
|
335 |
a string containing the first array element.</p>]]></long-description>
|
336 |
+
<tag line="621" name="since" description="0.1"/>
|
337 |
+
<tag line="621" name="param" description="post ID of attachment" type="int" variable="$post_id">
|
338 |
<type by_reference="false">int</type>
|
339 |
</tag>
|
340 |
+
<tag line="621" name="return" description="Meta data variables" type="array">
|
341 |
<type by_reference="false">array</type>
|
342 |
</tag>
|
343 |
</docblock>
|
344 |
+
<argument line="634">
|
345 |
<name>$post_id</name>
|
346 |
<default><![CDATA[]]></default>
|
347 |
<type/>
|
349 |
</method>
|
350 |
</class>
|
351 |
</file>
|
352 |
+
<file path="includes\class-mla-list-table.php" hash="db661aa5a8d260904ba5ab7c01f800db" package="Media Library Assistant">
|
353 |
<docblock line="2">
|
354 |
<description><![CDATA[Media Library Assistant extended List Table class]]></description>
|
355 |
<long-description><![CDATA[]]></long-description>
|
393 |
</tag>
|
394 |
</docblock>
|
395 |
</property>
|
396 |
+
<property final="false" static="true" visibility="private" line="72" namespace="global" package="Media Library Assistant">
|
397 |
<name>$default_columns</name>
|
398 |
+
<default><![CDATA[array('cb' => '<input type="checkbox" />', 'icon' => '', 'ID_parent' => 'ID/Parent', 'title_name' => 'Title/Name', 'post_title' => 'Title', 'post_name' => 'Name', 'parent' => 'Parent ID', 'featured' => 'Featured in', 'inserted' => 'Inserted in', 'alt_text' => 'ALT Text', 'caption' => 'Caption', 'description' => 'Description', 'post_mime_type' => 'MIME Type', 'base_file' => 'Base File', 'date' => 'Date', 'modified' => 'Last Modified', 'author' => 'Author', 'attached_to' => 'Attached to')]]></default>
|
399 |
<docblock line="55">
|
400 |
<description><![CDATA[Table column definitions]]></description>
|
401 |
<long-description><![CDATA[<p>This array defines table columns and titles where the key is the column slug (and class)
|
404 |
|
405 |
<p>The 'cb' column is treated differently than the rest. If including a checkbox
|
406 |
column in your table you must create a column_cb() method. If you don't need
|
407 |
+
bulk actions or checkboxes, simply leave the 'cb' entry out of your array.</p>
|
408 |
+
|
409 |
+
<p>Taxonomy columns are added to this array by mla_admin_init_action.</p>]]></long-description>
|
410 |
<tag line="55" name="since" description="0.1"/>
|
411 |
<tag line="55" name="var" description="" type="array">
|
412 |
<type by_reference="false">array</type>
|
413 |
</tag>
|
414 |
</docblock>
|
415 |
</property>
|
416 |
+
<property final="false" static="true" visibility="private" line="109" namespace="global" package="Media Library Assistant">
|
417 |
<name>$default_hidden_columns</name>
|
418 |
+
<default><![CDATA[array(0 => 'post_title', 1 => 'post_name', 2 => 'parent', 3 => 'alt_text', 4 => 'caption', 5 => 'description', 6 => 'post_mime_type', 7 => 'base_file', 8 => 'date', 9 => 'modified', 10 => 'author', 11 => 'attached_to')]]></default>
|
419 |
+
<docblock line="94">
|
420 |
+
<description><![CDATA[Default values for hidden columns]]></description>
|
421 |
<long-description><![CDATA[<p>This array is used when the user-level option is not set, i.e.,
|
422 |
the user has not altered the selection of hidden columns.</p>
|
423 |
|
424 |
<p>The value on the right-hand side must match the column slug, e.g.,
|
425 |
+
array(0 => 'ID_parent, 1 => 'title_name').</p>
|
426 |
+
|
427 |
+
<p>Taxonomy columns are added to this array by mla_admin_init_action.</p>]]></long-description>
|
428 |
+
<tag line="94" name="since" description="0.1"/>
|
429 |
+
<tag line="94" name="var" description="" type="array">
|
430 |
<type by_reference="false">array</type>
|
431 |
</tag>
|
432 |
</docblock>
|
433 |
</property>
|
434 |
+
<property final="false" static="true" visibility="private" line="144" namespace="global" package="Media Library Assistant">
|
435 |
<name>$default_sortable_columns</name>
|
436 |
+
<default><![CDATA[array('ID_parent' => array('ID', false), 'title_name' => array('title_name', false), 'post_title' => array('post_title', false), 'post_name' => array('post_name', false), 'parent' => array('post_parent', false), 'caption' => array('post_excerpt', false), 'description' => array('post_content', false), 'post_mime_type' => array('post_mime_type', false), 'base_file' => array('_wp_attached_file', false), 'date' => array('post_date', false), 'modified' => array('post_modified', false), 'author' => array('post_author', false), 'attached_to' => array('post_parent', false))]]></default>
|
437 |
+
<docblock line="129">
|
438 |
<description><![CDATA[Sortable column definitions]]></description>
|
439 |
<long-description><![CDATA[<p>This array defines the table columns that can be sorted. The array key
|
440 |
is the column slug that needs to be sortable, and the value is database column
|
443 |
|
444 |
<p>The array value also contains a boolean which is 'true' if the data is currently
|
445 |
sorted by that column. This is computed each time the table is displayed.</p>]]></long-description>
|
446 |
+
<tag line="129" name="since" description="0.1"/>
|
447 |
+
<tag line="129" name="var" description="" type="array">
|
448 |
<type by_reference="false">array</type>
|
449 |
</tag>
|
450 |
</docblock>
|
451 |
</property>
|
452 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="171" package="Media Library Assistant">
|
453 |
<name>_default_hidden_columns</name>
|
454 |
<full_name>_default_hidden_columns</full_name>
|
455 |
+
<docblock line="164">
|
456 |
<description><![CDATA[Access the default list of hidden columns]]></description>
|
457 |
<long-description><![CDATA[]]></long-description>
|
458 |
+
<tag line="164" name="since" description="0.1"/>
|
459 |
+
<tag line="164" name="return" description="default list of hidden columns" type="array">
|
460 |
<type by_reference="false">array</type>
|
461 |
</tag>
|
462 |
</docblock>
|
463 |
</method>
|
464 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="183" package="Media Library Assistant">
|
465 |
+
<name>mla_get_sortable_columns</name>
|
466 |
+
<full_name>mla_get_sortable_columns</full_name>
|
467 |
+
<docblock line="176">
|
468 |
+
<description><![CDATA[Return the names and display values of the sortable columns]]></description>
|
469 |
+
<long-description><![CDATA[]]></long-description>
|
470 |
+
<tag line="176" name="since" description="0.30"/>
|
471 |
+
<tag line="176" name="return" description="name => array( orderby value, heading ) for sortable columns" type="array">
|
472 |
+
<type by_reference="false">array</type>
|
473 |
+
</tag>
|
474 |
+
</docblock>
|
475 |
+
</method>
|
476 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="210" package="Media Library Assistant">
|
477 |
+
<name>mla_manage_hidden_columns_filter</name>
|
478 |
+
<full_name>mla_manage_hidden_columns_filter</full_name>
|
479 |
+
<docblock line="195">
|
480 |
<description><![CDATA[Handler for filter 'get_user_option_managemedia_page_mla-menucolumnshidden']]></description>
|
481 |
<long-description><![CDATA[<p>Required because the screen.php get_hidden_columns function only uses
|
482 |
the get_user_option result. Set when the file is loaded because the object
|
483 |
is not created in time for the call from screen.php.</p>]]></long-description>
|
484 |
+
<tag line="195" name="since" description="0.1"/>
|
485 |
+
<tag line="195" name="param" description="current list of hidden columns, if any" type="string" variable="$result">
|
486 |
<type by_reference="false">string</type>
|
487 |
</tag>
|
488 |
+
<tag line="195" name="param" description="'managemedia_page_mla-menucolumnshidden'" type="string" variable="$option">
|
489 |
<type by_reference="false">string</type>
|
490 |
</tag>
|
491 |
+
<tag line="195" name="param" description="WP_User object, if logged in" type="object" variable="$user_data">
|
492 |
<type by_reference="false">object</type>
|
493 |
</tag>
|
494 |
+
<tag line="195" name="return" description="updated list of hidden columns" type="array">
|
495 |
<type by_reference="false">array</type>
|
496 |
</tag>
|
497 |
</docblock>
|
498 |
+
<argument line="210">
|
499 |
<name>$result</name>
|
500 |
<default><![CDATA[]]></default>
|
501 |
<type/>
|
502 |
</argument>
|
503 |
+
<argument line="210">
|
504 |
<name>$option</name>
|
505 |
<default><![CDATA[]]></default>
|
506 |
<type/>
|
507 |
</argument>
|
508 |
+
<argument line="210">
|
509 |
<name>$user_data</name>
|
510 |
<default><![CDATA[]]></default>
|
511 |
<type/>
|
512 |
</argument>
|
513 |
</method>
|
514 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="228" package="Media Library Assistant">
|
515 |
+
<name>mla_manage_columns_filter</name>
|
516 |
+
<full_name>mla_manage_columns_filter</full_name>
|
517 |
+
<docblock line="217">
|
518 |
<description><![CDATA[Handler for filter 'manage_media_page_mla-menu_columns']]></description>
|
519 |
<long-description><![CDATA[<p>This required filter dictates the table's columns and titles. Set when the
|
520 |
file is loaded because the list_table object isn't created in time
|
521 |
to affect the "screen options" setup.</p>]]></long-description>
|
522 |
+
<tag line="217" name="since" description="0.1"/>
|
523 |
+
<tag line="217" name="return" description="list of table columns" type="array">
|
524 |
<type by_reference="false">array</type>
|
525 |
</tag>
|
526 |
</docblock>
|
527 |
</method>
|
528 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="243" package="Media Library Assistant">
|
529 |
+
<name>mla_admin_init_action</name>
|
530 |
+
<full_name>mla_admin_init_action</full_name>
|
531 |
+
<docblock line="233">
|
532 |
+
<description><![CDATA[Adds support for taxonomy columns]]></description>
|
533 |
+
<long-description><![CDATA[<p>Called in the admin_init action because the list_table object isn't
|
534 |
+
created in time to affect the "screen options" setup.</p>]]></long-description>
|
535 |
+
<tag line="233" name="since" description="0.30"/>
|
536 |
+
<tag line="233" name="return" description="" type="void">
|
537 |
+
<type by_reference="false">void</type>
|
538 |
+
</tag>
|
539 |
+
</docblock>
|
540 |
+
</method>
|
541 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="263" package="Media Library Assistant">
|
542 |
<name>__construct</name>
|
543 |
<full_name>__construct</full_name>
|
544 |
+
<docblock line="255">
|
545 |
<description><![CDATA[Initializes some properties from $_REQUEST vairables, then
|
546 |
calls the parent constructor to set some default configs.]]></description>
|
547 |
<long-description><![CDATA[]]></long-description>
|
548 |
+
<tag line="255" name="since" description="0.1"/>
|
549 |
+
<tag line="255" name="return" description="" type="void">
|
550 |
+
<type by_reference="false">void</type>
|
551 |
+
</tag>
|
552 |
</docblock>
|
553 |
</method>
|
554 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="295" package="Media Library Assistant">
|
555 |
<name>column_default</name>
|
556 |
<full_name>column_default</full_name>
|
557 |
+
<docblock line="282">
|
558 |
+
<description><![CDATA[Supply a column value if no column-specific function has been defined]]></description>
|
559 |
+
<long-description><![CDATA[<p>Called when the parent class can't find a method specifically built for a
|
560 |
+
given column. The taxonomy columns are handled here. All other columns should
|
561 |
+
have a specific method, so this function returns a troubleshooting message.</p>]]></long-description>
|
562 |
+
<tag line="282" name="since" description="0.1"/>
|
563 |
+
<tag line="282" name="param" description="A singular item (one full row's worth of data)" type="array" variable="$item">
|
564 |
<type by_reference="false">array</type>
|
565 |
</tag>
|
566 |
+
<tag line="282" name="param" description="The name/slug of the column to be processed" type="array" variable="$column_name">
|
567 |
<type by_reference="false">array</type>
|
568 |
</tag>
|
569 |
+
<tag line="282" name="return" description="Text or HTML to be placed inside the column" type="string">
|
570 |
<type by_reference="false">string</type>
|
571 |
</tag>
|
572 |
</docblock>
|
573 |
+
<argument line="295">
|
574 |
<name>$item</name>
|
575 |
<default><![CDATA[]]></default>
|
576 |
<type/>
|
577 |
</argument>
|
578 |
+
<argument line="295">
|
579 |
<name>$column_name</name>
|
580 |
<default><![CDATA[]]></default>
|
581 |
<type/>
|
582 |
</argument>
|
583 |
</method>
|
584 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="337" package="Media Library Assistant">
|
585 |
<name>column_cb</name>
|
586 |
<full_name>column_cb</full_name>
|
587 |
+
<docblock line="328">
|
588 |
<description><![CDATA[Displays checkboxes for using bulk actions.]]></description>
|
589 |
<long-description><![CDATA[<p>The 'cb' column
|
590 |
is given special treatment when columns are processed.</p>]]></long-description>
|
591 |
+
<tag line="328" name="since" description="0.1"/>
|
592 |
+
<tag line="328" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
593 |
<type by_reference="false">array</type>
|
594 |
</tag>
|
595 |
+
<tag line="328" name="return" description="HTML markup to be placed inside the column" type="string">
|
596 |
<type by_reference="false">string</type>
|
597 |
</tag>
|
598 |
</docblock>
|
599 |
+
<argument line="337">
|
600 |
<name>$item</name>
|
601 |
<default><![CDATA[]]></default>
|
602 |
<type/>
|
603 |
</argument>
|
604 |
</method>
|
605 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="353" package="Media Library Assistant">
|
606 |
<name>column_icon</name>
|
607 |
<full_name>column_icon</full_name>
|
608 |
+
<docblock line="345">
|
609 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
610 |
<long-description><![CDATA[]]></long-description>
|
611 |
+
<tag line="345" name="since" description="0.1"/>
|
612 |
+
<tag line="345" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
613 |
<type by_reference="false">array</type>
|
614 |
</tag>
|
615 |
+
<tag line="345" name="return" description="HTML markup to be placed inside the column" type="string">
|
616 |
<type by_reference="false">string</type>
|
617 |
</tag>
|
618 |
</docblock>
|
619 |
+
<argument line="353">
|
620 |
<name>$item</name>
|
621 |
<default><![CDATA[]]></default>
|
622 |
<type/>
|
623 |
</argument>
|
624 |
</method>
|
625 |
+
<method final="false" abstract="false" static="false" visibility="private" namespace="global" line="369" package="Media Library Assistant">
|
626 |
<name>_build_rollover_actions</name>
|
627 |
<full_name>_build_rollover_actions</full_name>
|
628 |
+
<docblock line="358">
|
629 |
<description><![CDATA[Add rollover actions to exactly one of the following displayed columns:
|
630 |
'ID_parent', 'title_name', 'post_title', 'post_name']]></description>
|
631 |
<long-description><![CDATA[]]></long-description>
|
632 |
+
<tag line="358" name="since" description="0.1"/>
|
633 |
+
<tag line="358" name="param" description="A singular attachment (post) object" type="object" variable="$item">
|
634 |
<type by_reference="false">object</type>
|
635 |
</tag>
|
636 |
+
<tag line="358" name="param" description="Current column name" type="string" variable="$column">
|
637 |
<type by_reference="false">string</type>
|
638 |
</tag>
|
639 |
+
<tag line="358" name="return" description="Names and URLs of row-level actions" type="array">
|
640 |
<type by_reference="false">array</type>
|
641 |
</tag>
|
642 |
</docblock>
|
643 |
+
<argument line="369">
|
644 |
<name>$item</name>
|
645 |
<default><![CDATA[]]></default>
|
646 |
<type/>
|
647 |
</argument>
|
648 |
+
<argument line="369">
|
649 |
<name>$column</name>
|
650 |
<default><![CDATA[]]></default>
|
651 |
<type/>
|
652 |
</argument>
|
653 |
</method>
|
654 |
+
<method final="false" abstract="false" static="false" visibility="private" namespace="global" line="439" package="Media Library Assistant">
|
655 |
<name>_build_inline_data</name>
|
656 |
<full_name>_build_inline_data</full_name>
|
657 |
+
<docblock line="430">
|
658 |
<description><![CDATA[Add hidden fields with the data for use in the inline editor]]></description>
|
659 |
<long-description><![CDATA[]]></long-description>
|
660 |
+
<tag line="430" name="since" description="0.20"/>
|
661 |
+
<tag line="430" name="param" description="A singular attachment (post) object" type="object" variable="$item">
|
662 |
<type by_reference="false">object</type>
|
663 |
</tag>
|
664 |
+
<tag line="430" name="return" description="HTML <div> with row data" type="string">
|
665 |
<type by_reference="false">string</type>
|
666 |
</tag>
|
667 |
</docblock>
|
668 |
+
<argument line="439">
|
669 |
<name>$item</name>
|
670 |
<default><![CDATA[]]></default>
|
671 |
<type/>
|
672 |
</argument>
|
673 |
</method>
|
674 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="478" package="Media Library Assistant">
|
675 |
<name>column_ID_parent</name>
|
676 |
<full_name>column_ID_parent</full_name>
|
677 |
+
<docblock line="470">
|
678 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
679 |
<long-description><![CDATA[]]></long-description>
|
680 |
+
<tag line="470" name="since" description="0.1"/>
|
681 |
+
<tag line="470" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
682 |
<type by_reference="false">array</type>
|
683 |
</tag>
|
684 |
+
<tag line="470" name="return" description="HTML markup to be placed inside the column" type="string">
|
685 |
<type by_reference="false">string</type>
|
686 |
</tag>
|
687 |
</docblock>
|
688 |
+
<argument line="478">
|
689 |
<name>$item</name>
|
690 |
<default><![CDATA[]]></default>
|
691 |
<type/>
|
692 |
</argument>
|
693 |
</method>
|
694 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="496" package="Media Library Assistant">
|
695 |
<name>column_title_name</name>
|
696 |
<full_name>column_title_name</full_name>
|
697 |
+
<docblock line="488">
|
698 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
699 |
<long-description><![CDATA[]]></long-description>
|
700 |
+
<tag line="488" name="since" description="0.1"/>
|
701 |
+
<tag line="488" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
702 |
<type by_reference="false">array</type>
|
703 |
</tag>
|
704 |
+
<tag line="488" name="return" description="HTML markup to be placed inside the column" type="string">
|
705 |
<type by_reference="false">string</type>
|
706 |
</tag>
|
707 |
</docblock>
|
708 |
+
<argument line="496">
|
709 |
<name>$item</name>
|
710 |
<default><![CDATA[]]></default>
|
711 |
<type/>
|
712 |
</argument>
|
713 |
</method>
|
714 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="525" package="Media Library Assistant">
|
715 |
<name>column_post_title</name>
|
716 |
<full_name>column_post_title</full_name>
|
717 |
+
<docblock line="517">
|
718 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
719 |
<long-description><![CDATA[]]></long-description>
|
720 |
+
<tag line="517" name="since" description="0.1"/>
|
721 |
+
<tag line="517" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
722 |
<type by_reference="false">array</type>
|
723 |
</tag>
|
724 |
+
<tag line="517" name="return" description="HTML markup to be placed inside the column" type="string">
|
725 |
<type by_reference="false">string</type>
|
726 |
</tag>
|
727 |
</docblock>
|
728 |
+
<argument line="525">
|
729 |
<name>$item</name>
|
730 |
<default><![CDATA[]]></default>
|
731 |
<type/>
|
732 |
</argument>
|
733 |
</method>
|
734 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="543" package="Media Library Assistant">
|
735 |
<name>column_post_name</name>
|
736 |
<full_name>column_post_name</full_name>
|
737 |
+
<docblock line="535">
|
738 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
739 |
<long-description><![CDATA[]]></long-description>
|
740 |
+
<tag line="535" name="since" description="0.1"/>
|
741 |
+
<tag line="535" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
742 |
<type by_reference="false">array</type>
|
743 |
</tag>
|
744 |
+
<tag line="535" name="return" description="HTML markup to be placed inside the column" type="string">
|
745 |
<type by_reference="false">string</type>
|
746 |
</tag>
|
747 |
</docblock>
|
748 |
+
<argument line="543">
|
749 |
<name>$item</name>
|
750 |
<default><![CDATA[]]></default>
|
751 |
<type/>
|
752 |
</argument>
|
753 |
</method>
|
754 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="561" package="Media Library Assistant">
|
755 |
<name>column_parent</name>
|
756 |
<full_name>column_parent</full_name>
|
757 |
+
<docblock line="553">
|
758 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
759 |
<long-description><![CDATA[]]></long-description>
|
760 |
+
<tag line="553" name="since" description="0.1"/>
|
761 |
+
<tag line="553" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
762 |
<type by_reference="false">array</type>
|
763 |
</tag>
|
764 |
+
<tag line="553" name="return" description="HTML markup to be placed inside the column" type="string">
|
765 |
<type by_reference="false">string</type>
|
766 |
</tag>
|
767 |
</docblock>
|
768 |
+
<argument line="561">
|
769 |
<name>$item</name>
|
770 |
<default><![CDATA[]]></default>
|
771 |
<type/>
|
772 |
</argument>
|
773 |
</method>
|
774 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="573" package="Media Library Assistant">
|
775 |
<name>column_featured</name>
|
776 |
<full_name>column_featured</full_name>
|
777 |
+
<docblock line="565">
|
778 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
779 |
<long-description><![CDATA[]]></long-description>
|
780 |
+
<tag line="565" name="since" description="0.1"/>
|
781 |
+
<tag line="565" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
782 |
<type by_reference="false">array</type>
|
783 |
</tag>
|
784 |
+
<tag line="565" name="return" description="HTML markup to be placed inside the column" type="string">
|
785 |
<type by_reference="false">string</type>
|
786 |
</tag>
|
787 |
</docblock>
|
788 |
+
<argument line="573">
|
789 |
<name>$item</name>
|
790 |
<default><![CDATA[]]></default>
|
791 |
<type/>
|
792 |
</argument>
|
793 |
</method>
|
794 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="596" package="Media Library Assistant">
|
795 |
<name>column_inserted</name>
|
796 |
<full_name>column_inserted</full_name>
|
797 |
+
<docblock line="588">
|
798 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
799 |
<long-description><![CDATA[]]></long-description>
|
800 |
+
<tag line="588" name="since" description="0.1"/>
|
801 |
+
<tag line="588" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
802 |
<type by_reference="false">array</type>
|
803 |
</tag>
|
804 |
+
<tag line="588" name="return" description="HTML markup to be placed inside the column" type="string">
|
805 |
<type by_reference="false">string</type>
|
806 |
</tag>
|
807 |
</docblock>
|
808 |
+
<argument line="596">
|
809 |
<name>$item</name>
|
810 |
<default><![CDATA[]]></default>
|
811 |
<type/>
|
812 |
</argument>
|
813 |
</method>
|
814 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="623" package="Media Library Assistant">
|
815 |
<name>column_alt_text</name>
|
816 |
<full_name>column_alt_text</full_name>
|
817 |
+
<docblock line="615">
|
818 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
819 |
<long-description><![CDATA[]]></long-description>
|
820 |
+
<tag line="615" name="since" description="0.1"/>
|
821 |
+
<tag line="615" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
822 |
<type by_reference="false">array</type>
|
823 |
</tag>
|
824 |
+
<tag line="615" name="return" description="HTML markup to be placed inside the column" type="string">
|
825 |
<type by_reference="false">string</type>
|
826 |
</tag>
|
827 |
</docblock>
|
828 |
+
<argument line="623">
|
829 |
<name>$item</name>
|
830 |
<default><![CDATA[]]></default>
|
831 |
<type/>
|
832 |
</argument>
|
833 |
</method>
|
834 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="638" package="Media Library Assistant">
|
835 |
<name>column_caption</name>
|
836 |
<full_name>column_caption</full_name>
|
837 |
+
<docblock line="630">
|
838 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
839 |
<long-description><![CDATA[]]></long-description>
|
840 |
+
<tag line="630" name="since" description="0.1"/>
|
841 |
+
<tag line="630" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
842 |
<type by_reference="false">array</type>
|
843 |
</tag>
|
844 |
+
<tag line="630" name="return" description="HTML markup to be placed inside the column" type="string">
|
845 |
<type by_reference="false">string</type>
|
846 |
</tag>
|
847 |
</docblock>
|
848 |
+
<argument line="638">
|
849 |
<name>$item</name>
|
850 |
<default><![CDATA[]]></default>
|
851 |
<type/>
|
852 |
</argument>
|
853 |
</method>
|
854 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="650" package="Media Library Assistant">
|
855 |
<name>column_description</name>
|
856 |
<full_name>column_description</full_name>
|
857 |
+
<docblock line="642">
|
858 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
859 |
<long-description><![CDATA[]]></long-description>
|
860 |
+
<tag line="642" name="since" description="0.1"/>
|
861 |
+
<tag line="642" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
862 |
<type by_reference="false">array</type>
|
863 |
</tag>
|
864 |
+
<tag line="642" name="return" description="HTML markup to be placed inside the column" type="string">
|
865 |
<type by_reference="false">string</type>
|
866 |
</tag>
|
867 |
</docblock>
|
868 |
+
<argument line="650">
|
869 |
<name>$item</name>
|
870 |
<default><![CDATA[]]></default>
|
871 |
<type/>
|
872 |
</argument>
|
873 |
</method>
|
874 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="662" package="Media Library Assistant">
|
875 |
+
<name>column_post_mime_type</name>
|
876 |
+
<full_name>column_post_mime_type</full_name>
|
877 |
+
<docblock line="654">
|
878 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
879 |
<long-description><![CDATA[]]></long-description>
|
880 |
+
<tag line="654" name="since" description="0.30"/>
|
881 |
+
<tag line="654" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
882 |
<type by_reference="false">array</type>
|
883 |
</tag>
|
884 |
+
<tag line="654" name="return" description="HTML markup to be placed inside the column" type="string">
|
885 |
<type by_reference="false">string</type>
|
886 |
</tag>
|
887 |
</docblock>
|
888 |
+
<argument line="662">
|
889 |
<name>$item</name>
|
890 |
<default><![CDATA[]]></default>
|
891 |
<type/>
|
892 |
</argument>
|
893 |
</method>
|
894 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="674" package="Media Library Assistant">
|
895 |
+
<name>column_base_file</name>
|
896 |
+
<full_name>column_base_file</full_name>
|
897 |
+
<docblock line="666">
|
898 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
899 |
<long-description><![CDATA[]]></long-description>
|
900 |
+
<tag line="666" name="since" description="0.1"/>
|
901 |
+
<tag line="666" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
902 |
<type by_reference="false">array</type>
|
903 |
</tag>
|
904 |
+
<tag line="666" name="return" description="HTML markup to be placed inside the column" type="string">
|
905 |
<type by_reference="false">string</type>
|
906 |
</tag>
|
907 |
</docblock>
|
908 |
+
<argument line="674">
|
909 |
<name>$item</name>
|
910 |
<default><![CDATA[]]></default>
|
911 |
<type/>
|
912 |
</argument>
|
913 |
</method>
|
914 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="686" package="Media Library Assistant">
|
915 |
+
<name>column_date</name>
|
916 |
+
<full_name>column_date</full_name>
|
917 |
+
<docblock line="678">
|
918 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
919 |
<long-description><![CDATA[]]></long-description>
|
920 |
+
<tag line="678" name="since" description="0.1"/>
|
921 |
+
<tag line="678" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
922 |
<type by_reference="false">array</type>
|
923 |
</tag>
|
924 |
+
<tag line="678" name="return" description="HTML markup to be placed inside the column" type="string">
|
925 |
<type by_reference="false">string</type>
|
926 |
</tag>
|
927 |
</docblock>
|
928 |
+
<argument line="686">
|
929 |
<name>$item</name>
|
930 |
<default><![CDATA[]]></default>
|
931 |
<type/>
|
932 |
</argument>
|
933 |
</method>
|
934 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="715" package="Media Library Assistant">
|
935 |
+
<name>column_modified</name>
|
936 |
+
<full_name>column_modified</full_name>
|
937 |
+
<docblock line="707">
|
938 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
939 |
<long-description><![CDATA[]]></long-description>
|
940 |
+
<tag line="707" name="since" description="0.30"/>
|
941 |
+
<tag line="707" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
942 |
<type by_reference="false">array</type>
|
943 |
</tag>
|
944 |
+
<tag line="707" name="return" description="HTML markup to be placed inside the column" type="string">
|
945 |
<type by_reference="false">string</type>
|
946 |
</tag>
|
947 |
</docblock>
|
948 |
+
<argument line="715">
|
949 |
<name>$item</name>
|
950 |
<default><![CDATA[]]></default>
|
951 |
<type/>
|
952 |
</argument>
|
953 |
</method>
|
954 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="744" package="Media Library Assistant">
|
955 |
+
<name>column_author</name>
|
956 |
+
<full_name>column_author</full_name>
|
957 |
+
<docblock line="736">
|
958 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
959 |
<long-description><![CDATA[]]></long-description>
|
960 |
+
<tag line="736" name="since" description="0.30"/>
|
961 |
+
<tag line="736" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
962 |
<type by_reference="false">array</type>
|
963 |
</tag>
|
964 |
+
<tag line="736" name="return" description="HTML markup to be placed inside the column" type="string">
|
965 |
<type by_reference="false">string</type>
|
966 |
</tag>
|
967 |
</docblock>
|
968 |
+
<argument line="744">
|
969 |
<name>$item</name>
|
970 |
<default><![CDATA[]]></default>
|
971 |
<type/>
|
972 |
</argument>
|
973 |
</method>
|
974 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="761" package="Media Library Assistant">
|
975 |
+
<name>column_attached_to</name>
|
976 |
+
<full_name>column_attached_to</full_name>
|
977 |
+
<docblock line="753">
|
978 |
<description><![CDATA[Supply the content for a custom column]]></description>
|
979 |
<long-description><![CDATA[]]></long-description>
|
980 |
+
<tag line="753" name="since" description="0.1"/>
|
981 |
+
<tag line="753" name="param" description="A singular attachment (post) object" type="array" variable="$item">
|
982 |
<type by_reference="false">array</type>
|
983 |
</tag>
|
984 |
+
<tag line="753" name="return" description="HTML markup to be placed inside the column" type="string">
|
985 |
<type by_reference="false">string</type>
|
986 |
</tag>
|
987 |
</docblock>
|
988 |
+
<argument line="761">
|
989 |
<name>$item</name>
|
990 |
<default><![CDATA[]]></default>
|
991 |
<type/>
|
992 |
</argument>
|
993 |
</method>
|
994 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="787" package="Media Library Assistant">
|
995 |
<name>get_columns</name>
|
996 |
<full_name>get_columns</full_name>
|
997 |
+
<docblock line="780">
|
998 |
+
<description><![CDATA[This method dictates the table's columns and titles]]></description>
|
999 |
<long-description><![CDATA[]]></long-description>
|
1000 |
+
<tag line="780" name="since" description="0.1"/>
|
1001 |
+
<tag line="780" name="return" description="Column information: 'slugs'=>'Visible Titles'" type="array">
|
1002 |
<type by_reference="false">array</type>
|
1003 |
</tag>
|
1004 |
</docblock>
|
1005 |
</method>
|
1006 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="799" package="Media Library Assistant">
|
1007 |
<name>get_hidden_columns</name>
|
1008 |
<full_name>get_hidden_columns</full_name>
|
1009 |
+
<docblock line="791">
|
1010 |
<description><![CDATA[Returns the list of currently hidden columns from a user option or
|
1011 |
from default values if the option is not set]]></description>
|
1012 |
<long-description><![CDATA[]]></long-description>
|
1013 |
+
<tag line="791" name="since" description="0.1"/>
|
1014 |
+
<tag line="791" name="return" description="Column information,e.g., array(0 => 'ID_parent, 1 => 'title_name')" type="array">
|
1015 |
<type by_reference="false">array</type>
|
1016 |
</tag>
|
1017 |
</docblock>
|
1018 |
</method>
|
1019 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="819" package="Media Library Assistant">
|
1020 |
<name>get_sortable_columns</name>
|
1021 |
<full_name>get_sortable_columns</full_name>
|
1022 |
+
<docblock line="809">
|
1023 |
<description><![CDATA[Returns an array where the key is the column that needs to be sortable
|
1024 |
and the value is db column to sort by.]]></description>
|
1025 |
<long-description><![CDATA[<p>Also notes the current sort column,
|
1026 |
if set.</p>]]></long-description>
|
1027 |
+
<tag line="809" name="since" description="0.1"/>
|
1028 |
+
<tag line="809" name="return" description="Sortable column information,e.g., 'slugs'=>array('data_values',boolean)" type="array">
|
1029 |
<type by_reference="false">array</type>
|
1030 |
</tag>
|
1031 |
</docblock>
|
1032 |
</method>
|
1033 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="846" package="Media Library Assistant">
|
1034 |
<name>get_views</name>
|
1035 |
<full_name>get_views</full_name>
|
1036 |
+
<docblock line="838">
|
1037 |
<description><![CDATA[Returns an associative array listing all the views that can be used with this table.]]></description>
|
1038 |
<long-description><![CDATA[<p>These are listed across the top of the page and managed by WordPress.</p>]]></long-description>
|
1039 |
+
<tag line="838" name="since" description="0.1"/>
|
1040 |
+
<tag line="838" name="return" description="View information,e.g., array ( id => link )" type="array">
|
1041 |
<type by_reference="false">array</type>
|
1042 |
</tag>
|
1043 |
</docblock>
|
1044 |
</method>
|
1045 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="916" package="Media Library Assistant">
|
1046 |
<name>get_bulk_actions</name>
|
1047 |
<full_name>get_bulk_actions</full_name>
|
1048 |
+
<docblock line="908">
|
1049 |
<description><![CDATA[Get an associative array ( option_name => option_title ) with the list
|
1050 |
of bulk actions available on this table.]]></description>
|
1051 |
<long-description><![CDATA[]]></long-description>
|
1052 |
+
<tag line="908" name="since" description="0.1"/>
|
1053 |
+
<tag line="908" name="return" description="Contains all the bulk actions: 'slugs'=>'Visible Titles'" type="array">
|
1054 |
<type by_reference="false">array</type>
|
1055 |
</tag>
|
1056 |
</docblock>
|
1057 |
</method>
|
1058 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="947" package="Media Library Assistant">
|
1059 |
<name>extra_tablenav</name>
|
1060 |
<full_name>extra_tablenav</full_name>
|
1061 |
+
<docblock line="936">
|
1062 |
+
<description><![CDATA[Extra controls to be displayed between bulk actions and pagination]]></description>
|
1063 |
+
<long-description><![CDATA[<p>Modeled after class-wp-posts-list-table.php in wp-admin/includes.</p>]]></long-description>
|
1064 |
+
<tag line="936" name="since" description="0.1"/>
|
1065 |
+
<tag line="936" name="param" description="'top' or 'bottom', i.e., above or below the table rows" type="string" variable="$which">
|
1066 |
<type by_reference="false">string</type>
|
1067 |
</tag>
|
1068 |
+
<tag line="936" name="return" description="Contains all the bulk actions: 'slugs'=>'Visible Titles'" type="array">
|
1069 |
<type by_reference="false">array</type>
|
1070 |
</tag>
|
1071 |
</docblock>
|
1072 |
+
<argument line="947">
|
1073 |
<name>$which</name>
|
1074 |
<default><![CDATA[]]></default>
|
1075 |
<type/>
|
1076 |
</argument>
|
1077 |
</method>
|
1078 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1007" package="Media Library Assistant">
|
1079 |
<name>prepare_items</name>
|
1080 |
<full_name>prepare_items</full_name>
|
1081 |
+
<docblock line="995">
|
1082 |
+
<description><![CDATA[Prepares the list of items for displaying]]></description>
|
1083 |
<long-description><![CDATA[<p>This is where you prepare your data for display. This method will usually
|
1084 |
be used to query the database, sort and filter the data, and generally
|
1085 |
get it ready to be displayed. At a minimum, we should set $this->items and
|
1086 |
$this->set_pagination_args().</p>]]></long-description>
|
1087 |
+
<tag line="995" name="since" description="0.1"/>
|
1088 |
+
<tag line="995" name="return" description="" type="void">
|
1089 |
+
<type by_reference="false">void</type>
|
1090 |
+
</tag>
|
1091 |
</docblock>
|
1092 |
</method>
|
1093 |
+
<method final="false" abstract="false" static="false" visibility="public" namespace="global" line="1053" package="Media Library Assistant">
|
1094 |
<name>single_row</name>
|
1095 |
<full_name>single_row</full_name>
|
1096 |
+
<docblock line="1044">
|
1097 |
<description><![CDATA[Generates (echoes) content for a single row of the table]]></description>
|
1098 |
<long-description><![CDATA[]]></long-description>
|
1099 |
+
<tag line="1044" name="since" description=".20"/>
|
1100 |
+
<tag line="1044" name="param" description="the current item" type="object" variable="$item">
|
1101 |
<type by_reference="false">object</type>
|
1102 |
</tag>
|
1103 |
+
<tag line="1044" name="return" description="Echoes the row HTML" type="void">
|
1104 |
+
<type by_reference="false">void</type>
|
1105 |
</tag>
|
1106 |
</docblock>
|
1107 |
+
<argument line="1053">
|
1108 |
<name>$item</name>
|
1109 |
<default><![CDATA[]]></default>
|
1110 |
<type/>
|
1111 |
</argument>
|
1112 |
</method>
|
1113 |
+
<method final="false" abstract="false" static="false" visibility="private" namespace="global" line="1072" package="Media Library Assistant">
|
1114 |
<name>_mime_types</name>
|
1115 |
<full_name>_mime_types</full_name>
|
1116 |
+
<docblock line="1062">
|
1117 |
+
<description><![CDATA[Get possible mime types for view preparation]]></description>
|
1118 |
<long-description><![CDATA[<p>Modeled after get_post_mime_types in wp-admin/includes/post.php,
|
1119 |
with additional entries.</p>]]></long-description>
|
1120 |
+
<tag line="1062" name="since" description="0.1"/>
|
1121 |
+
<tag line="1062" name="return" description="Mime type names and HTML markup for views" type="array">
|
1122 |
<type by_reference="false">array</type>
|
1123 |
</tag>
|
1124 |
</docblock>
|
1125 |
</method>
|
1126 |
+
<method final="false" abstract="false" static="false" visibility="private" namespace="global" line="1150" package="Media Library Assistant">
|
1127 |
<name>_avail_mime_types</name>
|
1128 |
<full_name>_avail_mime_types</full_name>
|
1129 |
+
<docblock line="1138">
|
1130 |
+
<description><![CDATA[Get mime types with one or more attachments for view preparation]]></description>
|
1131 |
<long-description><![CDATA[<p>Modeled after get_available_post_mime_types in wp-admin/includes/post.php,
|
1132 |
with additional entries.</p>]]></long-description>
|
1133 |
+
<tag line="1138" name="since" description="0.1"/>
|
1134 |
+
<tag line="1138" name="param" description="Number of posts for each mime type" type="array" variable="$num_posts">
|
1135 |
<type by_reference="false">array</type>
|
1136 |
</tag>
|
1137 |
+
<tag line="1138" name="return" description="Mime type names" type="array">
|
1138 |
<type by_reference="false">array</type>
|
1139 |
</tag>
|
1140 |
</docblock>
|
1141 |
+
<argument line="1150">
|
1142 |
<name>$num_posts</name>
|
1143 |
<default><![CDATA[]]></default>
|
1144 |
<type/>
|
1145 |
</argument>
|
1146 |
</method>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1147 |
</class>
|
1148 |
</file>
|
1149 |
+
<file path="includes\class-mla-main.php" hash="a590408a5d6c95cc857e68eb402829e3" package="Media Library Assistant">
|
1150 |
<docblock line="2">
|
1151 |
<description><![CDATA[Top-level functions for the Media Library Assistant]]></description>
|
1152 |
<long-description><![CDATA[]]></long-description>
|
1183 |
<constant namespace="global" line="41" package="Media Library Assistant">
|
1184 |
<name>CURRENT_MLA_VERSION</name>
|
1185 |
<full_name>CURRENT_MLA_VERSION</full_name>
|
1186 |
+
<value><![CDATA['0.30']]></value>
|
1187 |
<docblock line="34">
|
1188 |
<description><![CDATA[Current version number]]></description>
|
1189 |
<long-description><![CDATA[]]></long-description>
|
1297 |
</tag>
|
1298 |
</docblock>
|
1299 |
</constant>
|
1300 |
+
<constant namespace="global" line="290" package="Media Library Assistant">
|
1301 |
<name>MLA_ADMIN_NONCE</name>
|
1302 |
<full_name>MLA_ADMIN_NONCE</full_name>
|
1303 |
<value><![CDATA['mla_admin']]></value>
|
1304 |
+
<docblock line="283">
|
1305 |
<description><![CDATA[Action name; uniquely identifies the nonce]]></description>
|
1306 |
<long-description><![CDATA[]]></long-description>
|
1307 |
+
<tag line="283" name="since" description="0.1"/>
|
1308 |
+
<tag line="283" name="var" description="" type="string">
|
1309 |
<type by_reference="false">string</type>
|
1310 |
</tag>
|
1311 |
</docblock>
|
1312 |
</constant>
|
1313 |
+
<constant namespace="global" line="299" package="Media Library Assistant">
|
1314 |
<name>MLA_ADMIN_SINGLE_DELETE</name>
|
1315 |
<full_name>MLA_ADMIN_SINGLE_DELETE</full_name>
|
1316 |
<value><![CDATA['single_item_delete']]></value>
|
1317 |
+
<docblock line="292">
|
1318 |
<description><![CDATA[mla_admin_action value for permanently deleting a single item]]></description>
|
1319 |
<long-description><![CDATA[]]></long-description>
|
1320 |
+
<tag line="292" name="since" description="0.1"/>
|
1321 |
+
<tag line="292" name="var" description="" type="string">
|
1322 |
<type by_reference="false">string</type>
|
1323 |
</tag>
|
1324 |
</docblock>
|
1325 |
</constant>
|
1326 |
+
<constant namespace="global" line="308" package="Media Library Assistant">
|
1327 |
<name>MLA_ADMIN_SINGLE_EDIT_DISPLAY</name>
|
1328 |
<full_name>MLA_ADMIN_SINGLE_EDIT_DISPLAY</full_name>
|
1329 |
<value><![CDATA['single_item_edit_display']]></value>
|
1330 |
+
<docblock line="301">
|
1331 |
<description><![CDATA[mla_admin_action value for displaying a single item]]></description>
|
1332 |
<long-description><![CDATA[]]></long-description>
|
1333 |
+
<tag line="301" name="since" description="0.1"/>
|
1334 |
+
<tag line="301" name="var" description="" type="string">
|
1335 |
<type by_reference="false">string</type>
|
1336 |
</tag>
|
1337 |
</docblock>
|
1338 |
</constant>
|
1339 |
+
<constant namespace="global" line="317" package="Media Library Assistant">
|
1340 |
<name>MLA_ADMIN_SINGLE_EDIT_UPDATE</name>
|
1341 |
<full_name>MLA_ADMIN_SINGLE_EDIT_UPDATE</full_name>
|
1342 |
<value><![CDATA['single_item_edit_update']]></value>
|
1343 |
+
<docblock line="310">
|
1344 |
<description><![CDATA[mla_admin_action value for updating a single item]]></description>
|
1345 |
<long-description><![CDATA[]]></long-description>
|
1346 |
+
<tag line="310" name="since" description="0.1"/>
|
1347 |
+
<tag line="310" name="var" description="" type="string">
|
1348 |
<type by_reference="false">string</type>
|
1349 |
</tag>
|
1350 |
</docblock>
|
1351 |
</constant>
|
1352 |
+
<constant namespace="global" line="326" package="Media Library Assistant">
|
1353 |
<name>MLA_ADMIN_SINGLE_RESTORE</name>
|
1354 |
<full_name>MLA_ADMIN_SINGLE_RESTORE</full_name>
|
1355 |
<value><![CDATA['single_item_restore']]></value>
|
1356 |
+
<docblock line="319">
|
1357 |
<description><![CDATA[mla_admin_action value for restoring a single item from the trash]]></description>
|
1358 |
<long-description><![CDATA[]]></long-description>
|
1359 |
+
<tag line="319" name="since" description="0.1"/>
|
1360 |
+
<tag line="319" name="var" description="" type="string">
|
1361 |
<type by_reference="false">string</type>
|
1362 |
</tag>
|
1363 |
</docblock>
|
1364 |
</constant>
|
1365 |
+
<constant namespace="global" line="335" package="Media Library Assistant">
|
1366 |
<name>MLA_ADMIN_SINGLE_TRASH</name>
|
1367 |
<full_name>MLA_ADMIN_SINGLE_TRASH</full_name>
|
1368 |
<value><![CDATA['single_item_trash']]></value>
|
1369 |
+
<docblock line="328">
|
1370 |
<description><![CDATA[mla_admin_action value for moving a single item to the trash]]></description>
|
1371 |
<long-description><![CDATA[]]></long-description>
|
1372 |
+
<tag line="328" name="since" description="0.1"/>
|
1373 |
+
<tag line="328" name="var" description="" type="string">
|
1374 |
<type by_reference="false">string</type>
|
1375 |
</tag>
|
1376 |
</docblock>
|
1387 |
</tag>
|
1388 |
</docblock>
|
1389 |
</property>
|
1390 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="131" package="Media Library Assistant">
|
1391 |
<name>initialize</name>
|
1392 |
<full_name>initialize</full_name>
|
1393 |
<docblock line="124">
|
1394 |
<description><![CDATA[Initialization function, similar to __construct()]]></description>
|
1395 |
<long-description><![CDATA[]]></long-description>
|
1396 |
<tag line="124" name="since" description="0.1"/>
|
1397 |
+
<tag line="124" name="return" description="" type="void">
|
1398 |
+
<type by_reference="false">void</type>
|
1399 |
+
</tag>
|
1400 |
</docblock>
|
1401 |
</method>
|
1402 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="150" package="Media Library Assistant">
|
1403 |
<name>mla_admin_init_action</name>
|
1404 |
<full_name>mla_admin_init_action</full_name>
|
1405 |
+
<docblock line="143">
|
1406 |
<description><![CDATA[Load the plugin's Ajax handler]]></description>
|
1407 |
<long-description><![CDATA[]]></long-description>
|
1408 |
+
<tag line="143" name="since" description="0.20"/>
|
1409 |
+
<tag line="143" name="return" description="" type="void">
|
1410 |
+
<type by_reference="false">void</type>
|
1411 |
</tag>
|
1412 |
</docblock>
|
1413 |
</method>
|
1414 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="163" package="Media Library Assistant">
|
1415 |
<name>mla_admin_enqueue_scripts_action</name>
|
1416 |
<full_name>mla_admin_enqueue_scripts_action</full_name>
|
1417 |
+
<docblock line="154">
|
1418 |
<description><![CDATA[Load the plugin's Style Sheet and Javascript files]]></description>
|
1419 |
<long-description><![CDATA[]]></long-description>
|
1420 |
+
<tag line="154" name="since" description="0.1"/>
|
1421 |
+
<tag line="154" name="param" description="Name of the page being loaded" type="string" variable="$page_hook">
|
1422 |
<type by_reference="false">string</type>
|
1423 |
</tag>
|
1424 |
+
<tag line="154" name="return" description="" type="void">
|
1425 |
+
<type by_reference="false">void</type>
|
1426 |
</tag>
|
1427 |
</docblock>
|
1428 |
+
<argument line="163">
|
1429 |
<name>$page_hook</name>
|
1430 |
<default><![CDATA[]]></default>
|
1431 |
<type/>
|
1432 |
</argument>
|
1433 |
</method>
|
1434 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="206" package="Media Library Assistant">
|
1435 |
<name>mla_admin_menu_action</name>
|
1436 |
<full_name>mla_admin_menu_action</full_name>
|
1437 |
+
<docblock line="193">
|
1438 |
<description><![CDATA[Add the submenu pages]]></description>
|
1439 |
<long-description><![CDATA[<p>Add a submenu page in the "Media" section,
|
1440 |
add submenu page(s) for attachment taxonomies,
|
1441 |
add filter to clean up taxonomy submenu labels
|
1442 |
add settings page in the "Settings" section,
|
1443 |
add settings link in the Plugins section entry for MLA.</p>]]></long-description>
|
1444 |
+
<tag line="193" name="since" description="0.1"/>
|
1445 |
+
<tag line="193" name="return" description="" type="void">
|
1446 |
+
<type by_reference="false">void</type>
|
1447 |
+
</tag>
|
1448 |
</docblock>
|
1449 |
</method>
|
1450 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="237" package="Media Library Assistant">
|
1451 |
<name>mla_add_menu_options</name>
|
1452 |
<full_name>mla_add_menu_options</full_name>
|
1453 |
+
<docblock line="230">
|
1454 |
<description><![CDATA[Add the "XX Entries per page" filter to the Screen Options tab]]></description>
|
1455 |
<long-description><![CDATA[]]></long-description>
|
1456 |
+
<tag line="230" name="since" description="0.1"/>
|
1457 |
+
<tag line="230" name="return" description="" type="void">
|
1458 |
+
<type by_reference="false">void</type>
|
1459 |
+
</tag>
|
1460 |
</docblock>
|
1461 |
</method>
|
1462 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="259" package="Media Library Assistant">
|
1463 |
<name>mla_screen_options_show_screen_filter</name>
|
1464 |
<full_name>mla_screen_options_show_screen_filter</full_name>
|
1465 |
+
<docblock line="249">
|
1466 |
<description><![CDATA[Only show screen options on the table-list screen]]></description>
|
1467 |
<long-description><![CDATA[]]></long-description>
|
1468 |
+
<tag line="249" name="since" description="0.1"/>
|
1469 |
+
<tag line="249" name="param" description="True to display "Screen Options", false to suppress them" type="boolean" variable="$show_screen">
|
1470 |
<type by_reference="false">boolean</type>
|
1471 |
</tag>
|
1472 |
+
<tag line="249" name="param" description="Name of the page being loaded" type="string" variable="$this_screen">
|
1473 |
<type by_reference="false">string</type>
|
1474 |
</tag>
|
1475 |
+
<tag line="249" name="return" description="True to display "Screen Options", false to suppress them" type="boolean">
|
1476 |
<type by_reference="false">boolean</type>
|
1477 |
</tag>
|
1478 |
</docblock>
|
1479 |
+
<argument line="259">
|
1480 |
<name>$show_screen</name>
|
1481 |
<default><![CDATA[]]></default>
|
1482 |
<type/>
|
1483 |
</argument>
|
1484 |
+
<argument line="259">
|
1485 |
<name>$this_screen</name>
|
1486 |
<default><![CDATA[]]></default>
|
1487 |
<type/>
|
1488 |
</argument>
|
1489 |
</method>
|
1490 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="277" package="Media Library Assistant">
|
1491 |
<name>mla_set_screen_option_filter</name>
|
1492 |
<full_name>mla_set_screen_option_filter</full_name>
|
1493 |
+
<docblock line="266">
|
1494 |
<description><![CDATA[Save the "Entries per page" option set by this user]]></description>
|
1495 |
<long-description><![CDATA[]]></long-description>
|
1496 |
+
<tag line="266" name="since" description="0.1"/>
|
1497 |
+
<tag line="266" name="param" description="Unknown - always false?" type="boolean" variable="$status">
|
1498 |
<type by_reference="false">boolean</type>
|
1499 |
</tag>
|
1500 |
+
<tag line="266" name="param" description="Name of the option being changed" type="string" variable="$option">
|
1501 |
<type by_reference="false">string</type>
|
1502 |
</tag>
|
1503 |
+
<tag line="266" name="param" description="New value of the option" type="string" variable="$value">
|
1504 |
<type by_reference="false">string</type>
|
1505 |
</tag>
|
1506 |
+
<tag line="266" name="return" description="New value if this is our option, otherwise nothing" type="string|void">
|
1507 |
<type by_reference="false">string</type>
|
1508 |
+
<type by_reference="false">void</type>
|
1509 |
</tag>
|
1510 |
</docblock>
|
1511 |
+
<argument line="277">
|
1512 |
<name>$status</name>
|
1513 |
<default><![CDATA[]]></default>
|
1514 |
<type/>
|
1515 |
</argument>
|
1516 |
+
<argument line="277">
|
1517 |
<name>$option</name>
|
1518 |
<default><![CDATA[]]></default>
|
1519 |
<type/>
|
1520 |
</argument>
|
1521 |
+
<argument line="277">
|
1522 |
<name>$value</name>
|
1523 |
<default><![CDATA[]]></default>
|
1524 |
<type/>
|
1525 |
</argument>
|
1526 |
</method>
|
1527 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="347" package="Media Library Assistant">
|
1528 |
+
<name>mla_edit_tax_redirect</name>
|
1529 |
+
<full_name>mla_edit_tax_redirect</full_name>
|
1530 |
+
<docblock line="337">
|
1531 |
<description><![CDATA[Redirect to the Edit Tags/Categories page]]></description>
|
1532 |
<long-description><![CDATA[<p>The custom taxonomy add/edit submenu entries go to "upload.php" by default.
|
1533 |
This filter is the only way to redirect them to the correct WordPress page.</p>]]></long-description>
|
1534 |
+
<tag line="337" name="since" description="0.1"/>
|
1535 |
+
<tag line="337" name="return" description="" type="void">
|
1536 |
+
<type by_reference="false">void</type>
|
1537 |
+
</tag>
|
1538 |
</docblock>
|
1539 |
</method>
|
1540 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="365" package="Media Library Assistant">
|
1541 |
<name>mla_add_help_tab</name>
|
1542 |
<full_name>mla_add_help_tab</full_name>
|
1543 |
+
<docblock line="358">
|
1544 |
<description><![CDATA[Add contextual help tabs to all the MLA pages]]></description>
|
1545 |
<long-description><![CDATA[]]></long-description>
|
1546 |
+
<tag line="358" name="since" description="0.1"/>
|
1547 |
+
<tag line="358" name="return" description="" type="void">
|
1548 |
+
<type by_reference="false">void</type>
|
1549 |
+
</tag>
|
1550 |
</docblock>
|
1551 |
</method>
|
1552 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="457" package="Media Library Assistant">
|
1553 |
<name>mla_modify_parent_menu</name>
|
1554 |
<full_name>mla_modify_parent_menu</full_name>
|
1555 |
+
<docblock line="444">
|
1556 |
<description><![CDATA[Cleanup menus for Edit Tags/Categories page]]></description>
|
1557 |
<long-description><![CDATA[<p>The submenu entries for custom taxonomies under the "Media" menu are not set up
|
1558 |
correctly by WordPress, so this function cleans them up, redirecting the request
|
1559 |
to the right WordPress page for editing/adding taxonomy terms.</p>]]></long-description>
|
1560 |
+
<tag line="444" name="since" description="0.1"/>
|
1561 |
+
<tag line="444" name="param" description="The top-level menu page" type="array" variable="$parent_file">
|
1562 |
<type by_reference="false">array</type>
|
1563 |
</tag>
|
1564 |
+
<tag line="444" name="return" description="The updated top-level menu page" type="string">
|
1565 |
<type by_reference="false">string</type>
|
1566 |
</tag>
|
1567 |
</docblock>
|
1568 |
+
<argument line="457">
|
1569 |
<name>$parent_file</name>
|
1570 |
<default><![CDATA[]]></default>
|
1571 |
<type/>
|
1572 |
</argument>
|
1573 |
</method>
|
1574 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="488" package="Media Library Assistant">
|
1575 |
<name>mla_render_admin_page</name>
|
1576 |
<full_name>mla_render_admin_page</full_name>
|
1577 |
+
<docblock line="481">
|
1578 |
<description><![CDATA[Render the "Assistant" subpage in the Media section, using the list_table package]]></description>
|
1579 |
<long-description><![CDATA[]]></long-description>
|
1580 |
+
<tag line="481" name="since" description="0.1"/>
|
1581 |
+
<tag line="481" name="return" description="" type="void">
|
1582 |
+
<type by_reference="false">void</type>
|
1583 |
+
</tag>
|
1584 |
</docblock>
|
1585 |
</method>
|
1586 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="682" package="Media Library Assistant">
|
1587 |
<name>mla_inline_edit_action</name>
|
1588 |
<full_name>mla_inline_edit_action</full_name>
|
1589 |
+
<docblock line="673">
|
1590 |
<description><![CDATA[Ajax handler for inline editing (quick and bulk edit)]]></description>
|
1591 |
<long-description><![CDATA[<p>Adapted from wp_ajax_inline_save in /wp-admin/includes/ajax-actions.php</p>]]></long-description>
|
1592 |
+
<tag line="673" name="since" description="0.20"/>
|
1593 |
+
<tag line="673" name="return" description="echo HTML <tr> markup for updated row or error message, then die()" type="void">
|
1594 |
+
<type by_reference="false">void</type>
|
1595 |
</tag>
|
1596 |
</docblock>
|
1597 |
</method>
|
1598 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="751" package="Media Library Assistant">
|
1599 |
<name>_build_inline_edit_form</name>
|
1600 |
<full_name>_build_inline_edit_form</full_name>
|
1601 |
+
<docblock line="740">
|
1602 |
+
<description><![CDATA[Build the hidden row templates for inline editing (quick and bulk edit)]]></description>
|
1603 |
<long-description><![CDATA[<p>inspired by inline_edit() in wp-admin\includes\class-wp-posts-list-table.php.</p>]]></long-description>
|
1604 |
+
<tag line="740" name="since" description="0.20"/>
|
1605 |
+
<tag line="740" name="param" description="MLA List Table object" type="object" variable="$MLAListTable">
|
1606 |
<type by_reference="false">object</type>
|
1607 |
</tag>
|
1608 |
+
<tag line="740" name="return" description="HTML <form> markup for hidden rows" type="string">
|
1609 |
<type by_reference="false">string</type>
|
1610 |
</tag>
|
1611 |
</docblock>
|
1612 |
+
<argument line="751">
|
1613 |
<name>$MLAListTable</name>
|
1614 |
<default><![CDATA[]]></default>
|
1615 |
<type/>
|
1616 |
</argument>
|
1617 |
</method>
|
1618 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="852" package="Media Library Assistant">
|
1619 |
<name>_authors_dropdown</name>
|
1620 |
<full_name>_authors_dropdown</full_name>
|
1621 |
+
<docblock line="841">
|
1622 |
<description><![CDATA[Get the edit Authors dropdown box, if user has suitable permissions]]></description>
|
1623 |
<long-description><![CDATA[]]></long-description>
|
1624 |
+
<tag line="841" name="since" description="0.20"/>
|
1625 |
+
<tag line="841" name="param" description="User ID of the current author" type="integer" variable="$author">
|
1626 |
<type by_reference="false">integer</type>
|
1627 |
</tag>
|
1628 |
+
<tag line="841" name="param" description="HTML name attribute" type="string" variable="$name">
|
1629 |
<type by_reference="false">string</type>
|
1630 |
</tag>
|
1631 |
+
<tag line="841" name="param" description="HTML class attribute" type="string" variable="$class">
|
1632 |
<type by_reference="false">string</type>
|
1633 |
</tag>
|
1634 |
+
<tag line="841" name="return" description="HTML markup for the dropdown field or False" type="string|false">
|
1635 |
<type by_reference="false">string</type>
|
1636 |
<type by_reference="false">false</type>
|
1637 |
</tag>
|
1638 |
</docblock>
|
1639 |
+
<argument line="852">
|
1640 |
<name>$author</name>
|
1641 |
<default><![CDATA[0]]></default>
|
1642 |
<type/>
|
1643 |
</argument>
|
1644 |
+
<argument line="852">
|
1645 |
<name>$name</name>
|
1646 |
<default><![CDATA['post_author']]></default>
|
1647 |
<type/>
|
1648 |
</argument>
|
1649 |
+
<argument line="852">
|
1650 |
<name>$class</name>
|
1651 |
<default><![CDATA['authors']]></default>
|
1652 |
<type/>
|
1653 |
</argument>
|
1654 |
</method>
|
1655 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="884" package="Media Library Assistant">
|
1656 |
<name>_current_bulk_action</name>
|
1657 |
<full_name>_current_bulk_action</full_name>
|
1658 |
+
<docblock line="877">
|
1659 |
<description><![CDATA[Get the current action selected from the bulk actions dropdown]]></description>
|
1660 |
<long-description><![CDATA[]]></long-description>
|
1661 |
+
<tag line="877" name="since" description="0.1"/>
|
1662 |
+
<tag line="877" name="return" description="The action name or False if no action was selected" type="string|false">
|
1663 |
<type by_reference="false">string</type>
|
1664 |
<type by_reference="false">false</type>
|
1665 |
</tag>
|
1666 |
</docblock>
|
1667 |
</method>
|
1668 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="914" package="Media Library Assistant">
|
1669 |
<name>_delete_single_item</name>
|
1670 |
<full_name>_delete_single_item</full_name>
|
1671 |
+
<docblock line="905">
|
1672 |
+
<description><![CDATA[Delete a single item permanently]]></description>
|
1673 |
<long-description><![CDATA[]]></long-description>
|
1674 |
+
<tag line="905" name="since" description="0.1"/>
|
1675 |
+
<tag line="905" name="param" description="The form POST data" type="array" variable="$post_id">
|
1676 |
<type by_reference="false">array</type>
|
1677 |
</tag>
|
1678 |
+
<tag line="905" name="return" description="success/failure message and NULL content" type="array">
|
1679 |
<type by_reference="false">array</type>
|
1680 |
</tag>
|
1681 |
</docblock>
|
1682 |
+
<argument line="914">
|
1683 |
<name>$post_id</name>
|
1684 |
<default><![CDATA[]]></default>
|
1685 |
<type/>
|
1686 |
</argument>
|
1687 |
</method>
|
1688 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="943" package="Media Library Assistant">
|
1689 |
<name>_display_single_item</name>
|
1690 |
<full_name>_display_single_item</full_name>
|
1691 |
+
<docblock line="933">
|
1692 |
<description><![CDATA[Display a single item sub page; prepare the form to
|
1693 |
change the meta data for a single attachment.]]></description>
|
1694 |
<long-description><![CDATA[]]></long-description>
|
1695 |
+
<tag line="933" name="since" description="0.1"/>
|
1696 |
+
<tag line="933" name="param" description="The WordPress Post ID of the attachment item" type="int" variable="$post_id">
|
1697 |
<type by_reference="false">int</type>
|
1698 |
</tag>
|
1699 |
+
<tag line="933" name="return" description="message and/or HTML content" type="array">
|
1700 |
<type by_reference="false">array</type>
|
1701 |
</tag>
|
1702 |
</docblock>
|
1703 |
+
<argument line="943">
|
1704 |
<name>$post_id</name>
|
1705 |
<default><![CDATA[]]></default>
|
1706 |
<type/>
|
1707 |
</argument>
|
1708 |
</method>
|
1709 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1154" package="Media Library Assistant">
|
1710 |
<name>_update_single_item</name>
|
1711 |
<full_name>_update_single_item</full_name>
|
1712 |
+
<docblock line="1142">
|
1713 |
<description><![CDATA[Update a single item; change the meta data
|
1714 |
for a single attachment.]]></description>
|
1715 |
<long-description><![CDATA[]]></long-description>
|
1716 |
+
<tag line="1142" name="since" description="0.1"/>
|
1717 |
+
<tag line="1142" name="param" description="The ID of the attachment to be updated" type="int" variable="$post_id">
|
1718 |
<type by_reference="false">int</type>
|
1719 |
</tag>
|
1720 |
+
<tag line="1142" name="param" description="Field name => value pairs" type="array" variable="$new_data">
|
1721 |
<type by_reference="false">array</type>
|
1722 |
</tag>
|
1723 |
+
<tag line="1142" name="param" description="Attachment Category and Tag values" type="array" variable="$tax_input">
|
1724 |
<type by_reference="false">array</type>
|
1725 |
</tag>
|
1726 |
+
<tag line="1142" name="return" description="success/failure message and NULL content" type="array">
|
1727 |
<type by_reference="false">array</type>
|
1728 |
</tag>
|
1729 |
</docblock>
|
1730 |
+
<argument line="1154">
|
1731 |
<name>$post_id</name>
|
1732 |
<default><![CDATA[]]></default>
|
1733 |
<type/>
|
1734 |
</argument>
|
1735 |
+
<argument line="1154">
|
1736 |
<name>$new_data</name>
|
1737 |
<default><![CDATA[]]></default>
|
1738 |
<type/>
|
1739 |
</argument>
|
1740 |
+
<argument line="1154">
|
1741 |
<name>$tax_input</name>
|
1742 |
<default><![CDATA[NULL]]></default>
|
1743 |
<type/>
|
1744 |
</argument>
|
1745 |
</method>
|
1746 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1302" package="Media Library Assistant">
|
1747 |
<name>_restore_single_item</name>
|
1748 |
<full_name>_restore_single_item</full_name>
|
1749 |
+
<docblock line="1293">
|
1750 |
<description><![CDATA[Restore a single item from the Trash]]></description>
|
1751 |
<long-description><![CDATA[]]></long-description>
|
1752 |
+
<tag line="1293" name="since" description="0.1"/>
|
1753 |
+
<tag line="1293" name="param" description="The form POST data" type="array" variable="$post_id">
|
1754 |
<type by_reference="false">array</type>
|
1755 |
</tag>
|
1756 |
+
<tag line="1293" name="return" description="success/failure message and NULL content" type="array">
|
1757 |
<type by_reference="false">array</type>
|
1758 |
</tag>
|
1759 |
</docblock>
|
1760 |
+
<argument line="1302">
|
1761 |
<name>$post_id</name>
|
1762 |
<default><![CDATA[]]></default>
|
1763 |
<type/>
|
1764 |
</argument>
|
1765 |
</method>
|
1766 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="1338" package="Media Library Assistant">
|
1767 |
<name>_trash_single_item</name>
|
1768 |
<full_name>_trash_single_item</full_name>
|
1769 |
+
<docblock line="1329">
|
1770 |
<description><![CDATA[Move a single item to Trash]]></description>
|
1771 |
<long-description><![CDATA[]]></long-description>
|
1772 |
+
<tag line="1329" name="since" description="0.1"/>
|
1773 |
+
<tag line="1329" name="param" description="The form POST data" type="array" variable="$post_id">
|
1774 |
<type by_reference="false">array</type>
|
1775 |
</tag>
|
1776 |
+
<tag line="1329" name="return" description="success/failure message and NULL content" type="array">
|
1777 |
<type by_reference="false">array</type>
|
1778 |
</tag>
|
1779 |
</docblock>
|
1780 |
+
<argument line="1338">
|
1781 |
<name>$post_id</name>
|
1782 |
<default><![CDATA[]]></default>
|
1783 |
<type/>
|
1785 |
</method>
|
1786 |
</class>
|
1787 |
</file>
|
1788 |
+
<file path="includes\class-mla-objects.php" hash="7d0870e15bac97ba058ac5e548e37182" package="Media Library Assistant">
|
1789 |
<docblock line="2">
|
1790 |
<description><![CDATA[Media Library Assistant Custom Taxonomy and Post Type objects]]></description>
|
1791 |
<long-description><![CDATA[]]></long-description>
|
1802 |
<tag line="9" name="package" description="Media Library Assistant"/>
|
1803 |
<tag line="9" name="since" description="0.20"/>
|
1804 |
</docblock>
|
1805 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="23" package="Media Library Assistant">
|
1806 |
<name>initialize</name>
|
1807 |
<full_name>initialize</full_name>
|
1808 |
<docblock line="16">
|
1809 |
<description><![CDATA[Initialization function, similar to __construct()]]></description>
|
1810 |
<long-description><![CDATA[]]></long-description>
|
1811 |
<tag line="16" name="since" description="0.20"/>
|
1812 |
+
<tag line="16" name="return" description="" type="void">
|
1813 |
+
<type by_reference="false">void</type>
|
1814 |
+
</tag>
|
1815 |
</docblock>
|
1816 |
</method>
|
1817 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="34" package="Media Library Assistant">
|
1818 |
<name>_build_taxonomies</name>
|
1819 |
<full_name>_build_taxonomies</full_name>
|
1820 |
+
<docblock line="27">
|
1821 |
<description><![CDATA[Registers Attachment Categories and Attachment Tags custom taxonomies, adds taxonomy-related filters]]></description>
|
1822 |
<long-description><![CDATA[]]></long-description>
|
1823 |
+
<tag line="27" name="since" description="0.1"/>
|
1824 |
+
<tag line="27" name="return" description="" type="void">
|
1825 |
+
<type by_reference="false">void</type>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1826 |
</tag>
|
1827 |
</docblock>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1828 |
</method>
|
1829 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="112" package="Media Library Assistant">
|
1830 |
+
<name>mla_taxonomy_get_columns_filter</name>
|
1831 |
+
<full_name>mla_taxonomy_get_columns_filter</full_name>
|
1832 |
+
<docblock line="102">
|
1833 |
+
<description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
|
1834 |
which replaces the "Posts" column with an equivalent "Attachments" column.]]></description>
|
1835 |
<long-description><![CDATA[]]></long-description>
|
1836 |
+
<tag line="102" name="since" description="0.30"/>
|
1837 |
+
<tag line="102" name="param" description="column definitions for the edit taxonomy list table" type="array" variable="$columns">
|
1838 |
<type by_reference="false">array</type>
|
1839 |
</tag>
|
1840 |
+
<tag line="102" name="return" description="updated column definitions for the edit taxonomy list table" type="array">
|
1841 |
<type by_reference="false">array</type>
|
1842 |
</tag>
|
1843 |
</docblock>
|
1844 |
+
<argument line="112">
|
1845 |
<name>$columns</name>
|
1846 |
<default><![CDATA[]]></default>
|
1847 |
<type/>
|
1848 |
</argument>
|
1849 |
</method>
|
1850 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="138" package="Media Library Assistant">
|
1851 |
+
<name>mla_taxonomy_column_filter</name>
|
1852 |
+
<full_name>mla_taxonomy_column_filter</full_name>
|
1853 |
+
<docblock line="125">
|
1854 |
+
<description><![CDATA[WordPress Filter for edit taxonomy "Attachments" column,
|
1855 |
+
which returns a count of the attachments assigned a given term]]></description>
|
1856 |
<long-description><![CDATA[]]></long-description>
|
1857 |
+
<tag line="125" name="since" description="0.30"/>
|
1858 |
+
<tag line="125" name="param" description="current column value; always ''" type="string" variable="$place_holder">
|
1859 |
<type by_reference="false">string</type>
|
1860 |
</tag>
|
1861 |
+
<tag line="125" name="param" description="name of the column" type="array" variable="$column_name">
|
1862 |
<type by_reference="false">array</type>
|
1863 |
</tag>
|
1864 |
+
<tag line="125" name="param" description="ID of the term for which the count is desired" type="array" variable="$term_id">
|
1865 |
<type by_reference="false">array</type>
|
1866 |
</tag>
|
1867 |
+
<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">
|
1868 |
<type by_reference="false">array</type>
|
1869 |
</tag>
|
1870 |
</docblock>
|
1871 |
+
<argument line="138">
|
1872 |
<name>$place_holder</name>
|
1873 |
<default><![CDATA[]]></default>
|
1874 |
<type/>
|
1875 |
</argument>
|
1876 |
+
<argument line="138">
|
1877 |
<name>$column_name</name>
|
1878 |
<default><![CDATA[]]></default>
|
1879 |
<type/>
|
1880 |
</argument>
|
1881 |
+
<argument line="138">
|
1882 |
<name>$term_id</name>
|
1883 |
<default><![CDATA[]]></default>
|
1884 |
<type/>
|
1886 |
</method>
|
1887 |
</class>
|
1888 |
</file>
|
1889 |
+
<file path="includes\class-mla-settings.php" hash="aed85a573fc181360077d8bcb9817ce9" package="Media Library Assistant">
|
1890 |
<docblock line="2">
|
1891 |
<description><![CDATA[Manages the plugin option settings and provides the settings page to edit them]]></description>
|
1892 |
<long-description><![CDATA[]]></long-description>
|
1909 |
<full_name>MLA_SETTINGS_SLUG</full_name>
|
1910 |
<value><![CDATA['mla-settings-menu']]></value>
|
1911 |
<docblock line="17">
|
1912 |
+
<description><![CDATA[Provides a unique name for the settings page]]></description>
|
1913 |
<long-description><![CDATA[]]></long-description>
|
1914 |
</docblock>
|
1915 |
</constant>
|
1916 |
+
<constant namespace="global" line="25" package="Media Library Assistant">
|
1917 |
+
<name>MLA_VERSION_OPTION</name>
|
1918 |
+
<full_name>MLA_VERSION_OPTION</full_name>
|
1919 |
+
<value><![CDATA['current_version']]></value>
|
1920 |
<docblock line="22">
|
1921 |
+
<description><![CDATA[Provides a unique name for the current version option]]></description>
|
1922 |
+
<long-description><![CDATA[]]></long-description>
|
1923 |
+
</docblock>
|
1924 |
+
</constant>
|
1925 |
+
<property final="false" static="true" visibility="private" line="51" namespace="global" package="Media Library Assistant">
|
1926 |
+
<name>$mla_options</name>
|
1927 |
+
<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.'), '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 "Quick Edit" box to display the taxonomy in the Quick Edit panel.<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>
|
1928 |
+
<docblock line="27">
|
1929 |
<description><![CDATA[$mla_options defines the database options and admin page areas for setting/updating them.]]></description>
|
1930 |
<long-description><![CDATA[<p>Each option is defined by an array with the following elements:</p>
|
1931 |
|
1932 |
<p>array key => HTML id/name attribute and option database key (OMIT MLA_OPTION_PREFIX)</p>
|
1933 |
|
1934 |
<p>name => admin page label or heading text
|
1935 |
+
type => 'checkbox', 'header', 'radio', 'select', 'text', 'textarea', 'custom', 'hidden'
|
1936 |
std => default value
|
1937 |
help => help text
|
1938 |
size => text size, default 40
|
1939 |
cols => textbox columns, default 90
|
1940 |
rows => textbox rows, default 5
|
1941 |
+
options => array of radio or select option values
|
1942 |
+
texts => array of radio or select option display texts
|
1943 |
+
render => rendering function for 'custom' options. Usage:
|
1944 |
+
$options_list .= ['render']( 'render', $key, $value, $page_template_array );
|
1945 |
+
update => update function for 'custom' options; returns nothing. Usage:
|
1946 |
+
$message = ['update']( 'update', $key, $value, $_REQUEST );
|
1947 |
+
delete => delete function for 'custom' options; returns nothing. Usage:
|
1948 |
+
$message = ['delete']( 'delete', $key, $value, $_REQUEST );
|
1949 |
+
reset => reset function for 'custom' options; returns nothing. Usage:
|
1950 |
+
$message = ['reset']( 'reset', $key, $value, $_REQUEST );</p>]]></long-description>
|
1951 |
</docblock>
|
1952 |
</property>
|
1953 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="147" package="Media Library Assistant">
|
1954 |
<name>initialize</name>
|
1955 |
<full_name>initialize</full_name>
|
1956 |
+
<docblock line="140">
|
1957 |
<description><![CDATA[Initialization function, similar to __construct()]]></description>
|
1958 |
<long-description><![CDATA[]]></long-description>
|
1959 |
+
<tag line="140" name="since" description="0.1"/>
|
1960 |
+
<tag line="140" name="return" description="" type="void">
|
1961 |
+
<type by_reference="false">void</type>
|
1962 |
+
</tag>
|
1963 |
+
</docblock>
|
1964 |
+
</method>
|
1965 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="159" package="Media Library Assistant">
|
1966 |
+
<name>_version_upgrade</name>
|
1967 |
+
<full_name>_version_upgrade</full_name>
|
1968 |
+
<docblock line="152">
|
1969 |
+
<description><![CDATA[Database and option update check, for installing new versions]]></description>
|
1970 |
+
<long-description><![CDATA[]]></long-description>
|
1971 |
+
<tag line="152" name="since" description="0.30"/>
|
1972 |
+
<tag line="152" name="return" description="" type="void">
|
1973 |
+
<type by_reference="false">void</type>
|
1974 |
+
</tag>
|
1975 |
</docblock>
|
1976 |
</method>
|
1977 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="199" package="Media Library Assistant">
|
1978 |
<name>mla_admin_menu_action</name>
|
1979 |
<full_name>mla_admin_menu_action</full_name>
|
1980 |
+
<docblock line="191">
|
1981 |
<description><![CDATA[Add settings page in the "Settings" section,
|
1982 |
add settings link in the Plugins section entry for MLA.]]></description>
|
1983 |
<long-description><![CDATA[]]></long-description>
|
1984 |
+
<tag line="191" name="since" description="0.1"/>
|
1985 |
+
<tag line="191" name="return" description="" type="void">
|
1986 |
+
<type by_reference="false">void</type>
|
1987 |
+
</tag>
|
1988 |
</docblock>
|
1989 |
</method>
|
1990 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="215" package="Media Library Assistant">
|
1991 |
<name>mla_add_plugin_settings_link</name>
|
1992 |
<full_name>mla_add_plugin_settings_link</full_name>
|
1993 |
+
<docblock line="205">
|
1994 |
<description><![CDATA[Add the "Settings" link to the MLA entry in the Plugins section]]></description>
|
1995 |
<long-description><![CDATA[]]></long-description>
|
1996 |
+
<tag line="205" name="since" description="0.1"/>
|
1997 |
+
<tag line="205" name="param" description="array of links for the Plugin, e.g., "Activate"" type="array" variable="$links">
|
1998 |
<type by_reference="false">array</type>
|
1999 |
</tag>
|
2000 |
+
<tag line="205" name="param" description="Directory and name of the plugin Index file" type="string" variable="$file">
|
2001 |
<type by_reference="false">string</type>
|
2002 |
</tag>
|
2003 |
+
<tag line="205" name="return" description="Updated array of links for the Plugin" type="array">
|
2004 |
<type by_reference="false">array</type>
|
2005 |
</tag>
|
2006 |
</docblock>
|
2007 |
+
<argument line="215">
|
2008 |
<name>$links</name>
|
2009 |
<default><![CDATA[]]></default>
|
2010 |
<type/>
|
2011 |
</argument>
|
2012 |
+
<argument line="215">
|
2013 |
<name>$file</name>
|
2014 |
<default><![CDATA[]]></default>
|
2015 |
<type/>
|
2016 |
</argument>
|
2017 |
</method>
|
2018 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="233" package="Media Library Assistant">
|
2019 |
<name>mla_get_option</name>
|
2020 |
<full_name>mla_get_option</full_name>
|
2021 |
+
<docblock line="224">
|
2022 |
<description><![CDATA[Return the stored value or default value of a defined MLA option]]></description>
|
2023 |
<long-description><![CDATA[]]></long-description>
|
2024 |
+
<tag line="224" name="since" description="0.1"/>
|
2025 |
+
<tag line="224" name="param" description="Name of the desired option" type="string" variable="$option">
|
2026 |
<type by_reference="false">string</type>
|
2027 |
</tag>
|
2028 |
+
<tag line="224" name="return" description="Value(s) for the option or false if the option is not a defined MLA option" type="mixed">
|
2029 |
<type by_reference="false">mixed</type>
|
2030 |
</tag>
|
2031 |
</docblock>
|
2032 |
+
<argument line="233">
|
2033 |
<name>$option</name>
|
2034 |
<default><![CDATA[]]></default>
|
2035 |
<type/>
|
2036 |
</argument>
|
2037 |
</method>
|
2038 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="254" package="Media Library Assistant">
|
2039 |
<name>mla_update_option</name>
|
2040 |
<full_name>mla_update_option</full_name>
|
2041 |
+
<docblock line="244">
|
2042 |
<description><![CDATA[Add or update the stored value of a defined MLA option]]></description>
|
2043 |
<long-description><![CDATA[]]></long-description>
|
2044 |
+
<tag line="244" name="since" description="0.1"/>
|
2045 |
+
<tag line="244" name="param" description="Name of the desired option" type="string" variable="$option">
|
2046 |
<type by_reference="false">string</type>
|
2047 |
</tag>
|
2048 |
+
<tag line="244" name="param" description="New value for the desired option" type="mixed" variable="$newvalue">
|
2049 |
<type by_reference="false">mixed</type>
|
2050 |
</tag>
|
2051 |
+
<tag line="244" name="return" description="True if the value was changed or false if the update failed" type="boolean">
|
2052 |
<type by_reference="false">boolean</type>
|
2053 |
</tag>
|
2054 |
</docblock>
|
2055 |
+
<argument line="254">
|
2056 |
<name>$option</name>
|
2057 |
<default><![CDATA[]]></default>
|
2058 |
<type/>
|
2059 |
</argument>
|
2060 |
+
<argument line="254">
|
2061 |
<name>$newvalue</name>
|
2062 |
<default><![CDATA[]]></default>
|
2063 |
<type/>
|
2064 |
</argument>
|
2065 |
</method>
|
2066 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="270" package="Media Library Assistant">
|
2067 |
<name>mla_delete_option</name>
|
2068 |
<full_name>mla_delete_option</full_name>
|
2069 |
+
<docblock line="261">
|
2070 |
<description><![CDATA[Delete the stored value of a defined MLA option]]></description>
|
2071 |
<long-description><![CDATA[]]></long-description>
|
2072 |
+
<tag line="261" name="since" description="0.1"/>
|
2073 |
+
<tag line="261" name="param" description="Name of the desired option" type="string" variable="$option">
|
2074 |
<type by_reference="false">string</type>
|
2075 |
</tag>
|
2076 |
+
<tag line="261" name="return" description="True if the option was deleted, otherwise false" type="boolean">
|
2077 |
<type by_reference="false">boolean</type>
|
2078 |
</tag>
|
2079 |
</docblock>
|
2080 |
+
<argument line="270">
|
2081 |
<name>$option</name>
|
2082 |
<default><![CDATA[]]></default>
|
2083 |
<type/>
|
2084 |
</argument>
|
2085 |
</method>
|
2086 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="285" package="Media Library Assistant">
|
2087 |
<name>mla_render_settings_page</name>
|
2088 |
<full_name>mla_render_settings_page</full_name>
|
2089 |
+
<docblock line="278">
|
2090 |
<description><![CDATA[Render (echo) the "Media Library Assistant" subpage in the Settings section]]></description>
|
2091 |
<long-description><![CDATA[]]></long-description>
|
2092 |
+
<tag line="278" name="since" description="0.1"/>
|
2093 |
+
<tag line="278" name="return" description="Echoes HTML markup for the settings subpage" type="void">
|
2094 |
+
<type by_reference="false">void</type>
|
2095 |
+
</tag>
|
2096 |
+
</docblock>
|
2097 |
+
</method>
|
2098 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="503" package="Media Library Assistant">
|
2099 |
+
<name>mla_taxonomy_support</name>
|
2100 |
+
<full_name>mla_taxonomy_support</full_name>
|
2101 |
+
<docblock line="490">
|
2102 |
+
<description><![CDATA[Determine MLA support for a taxonomy, handling the special case where the
|
2103 |
+
settings are being updated or reset.]]></description>
|
2104 |
+
<long-description><![CDATA[]]></long-description>
|
2105 |
+
<tag line="490" name="since" description="0.30"/>
|
2106 |
+
<tag line="490" name="param" description="Taxonomy name, e.g., attachment_category" type="string" variable="$tax_name">
|
2107 |
+
<type by_reference="false">string</type>
|
2108 |
+
</tag>
|
2109 |
+
<tag line="490" name="param" description="'support' (the default), 'quick-edit' or 'filter'" type="string" variable="$support_type">
|
2110 |
+
<type by_reference="false">string</type>
|
2111 |
+
</tag>
|
2112 |
+
<tag line="490" 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">
|
2113 |
+
<type by_reference="false">boolean</type>
|
2114 |
+
<type by_reference="false">string</type>
|
2115 |
</tag>
|
2116 |
</docblock>
|
2117 |
+
<argument line="503">
|
2118 |
+
<name>$tax_name</name>
|
2119 |
+
<default><![CDATA[]]></default>
|
2120 |
+
<type/>
|
2121 |
+
</argument>
|
2122 |
+
<argument line="503">
|
2123 |
+
<name>$support_type</name>
|
2124 |
+
<default><![CDATA['support']]></default>
|
2125 |
+
<type/>
|
2126 |
+
</argument>
|
2127 |
</method>
|
2128 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="575" package="Media Library Assistant">
|
2129 |
<name>_save_settings</name>
|
2130 |
<full_name>_save_settings</full_name>
|
2131 |
+
<docblock line="566">
|
2132 |
<description><![CDATA[Save settings to the options table]]></description>
|
2133 |
<long-description><![CDATA[]]></long-description>
|
2134 |
+
<tag line="566" name="since" description="0.1"/>
|
2135 |
+
<tag line="566" name="param" description="HTML template(s) for the settings page" type="array" variable="$template_array">
|
2136 |
<type by_reference="false">array</type>
|
2137 |
</tag>
|
2138 |
+
<tag line="566" name="return" description="Message(s) reflecting the results of the operation" type="array">
|
2139 |
<type by_reference="false">array</type>
|
2140 |
</tag>
|
2141 |
</docblock>
|
2142 |
+
<argument line="575">
|
2143 |
<name>$template_array</name>
|
2144 |
<default><![CDATA[]]></default>
|
2145 |
<type/>
|
2146 |
</argument>
|
2147 |
</method>
|
2148 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="667" package="Media Library Assistant">
|
2149 |
<name>_reset_settings</name>
|
2150 |
<full_name>_reset_settings</full_name>
|
2151 |
+
<docblock line="658">
|
2152 |
<description><![CDATA[Delete saved settings, restoring default values]]></description>
|
2153 |
<long-description><![CDATA[]]></long-description>
|
2154 |
+
<tag line="658" name="since" description="0.1"/>
|
2155 |
+
<tag line="658" name="param" description="HTML template(s) for the settings page" type="array" variable="$template_array">
|
2156 |
<type by_reference="false">array</type>
|
2157 |
</tag>
|
2158 |
+
<tag line="658" name="return" description="Message(s) reflecting the results of the operation" type="array">
|
2159 |
<type by_reference="false">array</type>
|
2160 |
</tag>
|
2161 |
</docblock>
|
2162 |
+
<argument line="667">
|
2163 |
<name>$template_array</name>
|
2164 |
<default><![CDATA[]]></default>
|
2165 |
<type/>
|
2166 |
</argument>
|
2167 |
</method>
|
2168 |
+
<method final="false" abstract="false" static="true" visibility="private" namespace="global" line="710" package="Media Library Assistant">
|
2169 |
+
<name>_taxonomy_handler</name>
|
2170 |
+
<full_name>_taxonomy_handler</full_name>
|
2171 |
+
<docblock line="698">
|
2172 |
+
<description><![CDATA[Render and manage other taxonomy support options, e.g., Categories and Post Tags]]></description>
|
2173 |
+
<long-description><![CDATA[]]></long-description>
|
2174 |
+
<tag line="698" name="since" description="0.30"/>
|
2175 |
+
<tag line="698" name="param" description="'render', 'update', 'delete', or 'reset'" type="string" variable="$action">
|
2176 |
+
<type by_reference="false">string</type>
|
2177 |
+
</tag>
|
2178 |
+
<tag line="698" name="param" description="option name, e.g., 'taxonomy_support'" type="string" variable="$key">
|
2179 |
+
<type by_reference="false">string</type>
|
2180 |
+
</tag>
|
2181 |
+
<tag line="698" name="param" description="option parameters" type="array" variable="$value">
|
2182 |
+
<type by_reference="false">array</type>
|
2183 |
+
</tag>
|
2184 |
+
<tag line="698" name="param" description="The $page_template_array for 'render' else $_REQUEST" type="array" variable="$args">
|
2185 |
+
<type by_reference="false">array</type>
|
2186 |
+
</tag>
|
2187 |
+
<tag line="698" name="return" description="HTML table row markup for 'render' else message(s) reflecting the results of the operation." type="string">
|
2188 |
+
<type by_reference="false">string</type>
|
2189 |
+
</tag>
|
2190 |
+
</docblock>
|
2191 |
+
<argument line="710">
|
2192 |
+
<name>$action</name>
|
2193 |
+
<default><![CDATA[]]></default>
|
2194 |
+
<type/>
|
2195 |
+
</argument>
|
2196 |
+
<argument line="710">
|
2197 |
+
<name>$key</name>
|
2198 |
+
<default><![CDATA[]]></default>
|
2199 |
+
<type/>
|
2200 |
+
</argument>
|
2201 |
+
<argument line="710">
|
2202 |
+
<name>$value</name>
|
2203 |
+
<default><![CDATA[]]></default>
|
2204 |
+
<type/>
|
2205 |
+
</argument>
|
2206 |
+
<argument line="710">
|
2207 |
+
<name>$args</name>
|
2208 |
+
<default><![CDATA[]]></default>
|
2209 |
+
<type/>
|
2210 |
+
</argument>
|
2211 |
+
</method>
|
2212 |
</class>
|
2213 |
</file>
|
2214 |
+
<file path="includes\class-mla-shortcodes.php" hash="4927020fc136de0866fa69ff2df4e88b" package="Media Library Assistant">
|
2215 |
<docblock line="2">
|
2216 |
<description><![CDATA[Media Library Assistant Shortcode handler(s)]]></description>
|
2217 |
<long-description><![CDATA[]]></long-description>
|
2228 |
<tag line="9" name="package" description="Media Library Assistant"/>
|
2229 |
<tag line="9" name="since" description="0.20"/>
|
2230 |
</docblock>
|
2231 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="23" package="Media Library Assistant">
|
2232 |
<name>initialize</name>
|
2233 |
<full_name>initialize</full_name>
|
2234 |
<docblock line="16">
|
2235 |
<description><![CDATA[Initialization function, similar to __construct()]]></description>
|
2236 |
<long-description><![CDATA[]]></long-description>
|
2237 |
<tag line="16" name="since" description="0.20"/>
|
2238 |
+
<tag line="16" name="return" description="" type="void">
|
2239 |
+
<type by_reference="false">void</type>
|
2240 |
+
</tag>
|
2241 |
</docblock>
|
2242 |
</method>
|
2243 |
+
<method final="false" abstract="false" static="true" visibility="public" namespace="global" line="34" package="Media Library Assistant">
|
2244 |
<name>mla_attachment_list_shortcode</name>
|
2245 |
<full_name>mla_attachment_list_shortcode</full_name>
|
2246 |
+
<docblock line="27">
|
2247 |
<description><![CDATA[WordPress Shortcode; renders a complete list of all attachments and references to them]]></description>
|
2248 |
<long-description><![CDATA[]]></long-description>
|
2249 |
+
<tag line="27" name="since" description="0.1"/>
|
2250 |
+
<tag line="27" name="return" description="echoes HTML markup for the attachment list" type="void">
|
2251 |
+
<type by_reference="false">void</type>
|
2252 |
</tag>
|
2253 |
</docblock>
|
2254 |
</method>
|
2255 |
</class>
|
2256 |
</file>
|
2257 |
+
<file path="includes\mla-plugin-loader.php" hash="9abec375c6f7ae5efd70d593750132ef" package="Media Library Assistant">
|
2258 |
<docblock line="2">
|
2259 |
<description><![CDATA[Media Library Assistant Plugin Loader]]></description>
|
2260 |
<long-description><![CDATA[<p>Defines constants and loads all of the classes and functions required to run the plugin.
|
2268 |
<include line="28" type="Require Once" package="Media Library Assistant">
|
2269 |
<name/>
|
2270 |
</include>
|
2271 |
+
<include line="35" type="Require Once" package="Media Library Assistant">
|
2272 |
<name/>
|
2273 |
</include>
|
2274 |
+
<include line="42" type="Require Once" package="Media Library Assistant">
|
2275 |
<name/>
|
2276 |
</include>
|
2277 |
<include line="47" type="Require Once" package="Media Library Assistant">
|
2278 |
<name/>
|
2279 |
</include>
|
2280 |
+
<include line="54" type="Require Once" package="Media Library Assistant">
|
2281 |
<name/>
|
2282 |
</include>
|
2283 |
<include line="59" type="Require Once" package="Media Library Assistant">
|
2293 |
</docblock>
|
2294 |
</constant>
|
2295 |
</file>
|
2296 |
+
<file path="index.php" hash="94bbd8a89827664f8094abf528a9aa8c" package="Media Library Assistant">
|
2297 |
<docblock line="2">
|
2298 |
<description><![CDATA[Provides several enhancements to the handling of images and files held in the WordPress Media Library]]></description>
|
2299 |
<long-description><![CDATA[<p>This file contains several tests for name conflicts with other plugins. Only if the tests are passed
|
2300 |
will the rest of the plugin be loaded and run.</p>]]></long-description>
|
2301 |
<tag line="2" name="package" description="Media Library Assistant"/>
|
2302 |
+
<tag line="2" name="version" description="0.30"/>
|
2303 |
</docblock>
|
2304 |
<include line="103" type="Require Once" package="Media Library Assistant">
|
2305 |
<name>includes/mla-plugin-loader.php</name>
|
2332 |
</docblock>
|
2333 |
</function>
|
2334 |
</file>
|
2335 |
+
<file path="tests\class-mla-tests.php" hash="629ae391dcbb21123ab0eaccc294e124" package="Media Library Assistant">
|
2336 |
<docblock line="2">
|
2337 |
<description><![CDATA[Provides basic run-time tests to ensure the plugin can run in the current WordPress envrionment]]></description>
|
2338 |
<long-description><![CDATA[]]></long-description>
|
2363 |
<tag line="17" name="param" description="Name of the plugin for messaging purposes" type="string" variable="$plugin_name">
|
2364 |
<type by_reference="false">string</type>
|
2365 |
</tag>
|
2366 |
+
<tag line="17" name="return" description="Exit with messaging if PHP version is too old" type="void">
|
2367 |
+
<type by_reference="false">void</type>
|
2368 |
</tag>
|
2369 |
</docblock>
|
2370 |
<argument line="27">
|
2391 |
<tag line="37" name="param" description="Name of the plugin for messaging purposes" type="string" variable="$plugin_name">
|
2392 |
<type by_reference="false">string</type>
|
2393 |
</tag>
|
2394 |
+
<tag line="37" name="return" description="Exit with messaging if version is too old" type="void">
|
2395 |
+
<type by_reference="false">void</type>
|
2396 |
</tag>
|
2397 |
</docblock>
|
2398 |
<argument line="47">
|
readme.txt
CHANGED
@@ -1,29 +1,33 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: dglingren
|
3 |
-
Donate link:
|
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.
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
Provides
|
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
The Media Library Assistant provides several enhancements for managing the Media Library, including:
|
16 |
|
|
|
|
|
17 |
* Shows which posts use a media item as the "featured image"
|
18 |
* Shows which posts use a media item as an inserted image or link
|
19 |
* Displays more attachment information such as parent information, file URL and image metadata
|
20 |
-
* Allows you to edit the attachment name/slug and to "unattach" items
|
21 |
-
*
|
22 |
-
* Provides
|
23 |
-
* Has an inline "Quick Edit" action for many common fields.
|
24 |
|
25 |
The Assistant is designed to work like the standard Media Library pages, so the learning curve is short and gentle. Contextual help is provided on every new screen to highlight new features.
|
26 |
|
|
|
|
|
27 |
== Installation ==
|
28 |
|
29 |
1. Upload `media-library-assistant` and its subfolders to your `/wp-content/plugins/` directory
|
@@ -35,13 +39,26 @@ The Assistant is designed to work like the standard Media Library pages, so the
|
|
35 |
|
36 |
== Frequently Asked Questions ==
|
37 |
|
38 |
-
=
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
|
41 |
|
42 |
= Can I add my own custom taxonomies to the Assistant? =
|
43 |
|
44 |
-
Yes. Any custom taxonomy you register with the Attachment post type will appear in the Assistant UI.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
= How do I "unattach" an item? =
|
47 |
|
@@ -57,13 +74,22 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
|
|
57 |
|
58 |
== Screenshots ==
|
59 |
|
60 |
-
1. The Media Library Assistant submenu showing the available columns,
|
61 |
2. The enhanced Edit page showing additional fields, categories and tags
|
62 |
-
3.
|
63 |
-
4. The Settings page, to customize support of
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
= 0.20 =
|
68 |
* New: Quick Edit action for inline editing of attachment metadata
|
69 |
* New: Post Author can be changed
|
@@ -86,6 +112,9 @@ All of the MLA source code has been annotated with "DocBlocks", a special type o
|
|
86 |
|
87 |
== Upgrade Notice ==
|
88 |
|
|
|
|
|
|
|
89 |
= 0.20 =
|
90 |
You should upgrade to this version if you need "Quick Edit" functionality.
|
91 |
|
@@ -95,7 +124,7 @@ You should upgrade to this version if you are getting "404 Not Found" errors whe
|
|
95 |
= 0.1 =
|
96 |
Initial release.
|
97 |
|
98 |
-
|
99 |
|
100 |
I have used and learned much from the following books (among many):
|
101 |
|
1 |
=== Plugin Name ===
|
2 |
Contributors: dglingren
|
3 |
+
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.30
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Provides several enhancements to the WordPress Media Library,
|
12 |
+
such as full taxonomy support, quick edit action and where-used reporting.
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
The Media Library Assistant provides several enhancements for managing the Media Library, including:
|
17 |
|
18 |
+
* Has an inline "Quick Edit" action for many common fields.
|
19 |
+
* Complete support for ALL taxonomies, including the standard Categories and Tags, your custom taxonomies and the Assistant's pre-defined Att. Categories and Att. Tags. You can add taxonomy columns to the Assistant listing, filter on any taxonomy, assign terms and list the attachments for a term.
|
20 |
* Shows which posts use a media item as the "featured image"
|
21 |
* Shows which posts use a media item as an inserted image or link
|
22 |
* Displays more attachment information such as parent information, file URL and image metadata
|
23 |
+
* Allows you to edit the attachment author, the name/slug and to "unattach" items
|
24 |
+
* Provides additional view filters for mime types and taxonomies
|
25 |
+
* Provides many more listing columns (more than 15) to choose from
|
|
|
26 |
|
27 |
The Assistant is designed to work like the standard Media Library pages, so the learning curve is short and gentle. Contextual help is provided on every new screen to highlight new features.
|
28 |
|
29 |
+
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 <strong>tax-deductible</strong> donation to our work. Thank you!
|
30 |
+
|
31 |
== Installation ==
|
32 |
|
33 |
1. Upload `media-library-assistant` and its subfolders to your `/wp-content/plugins/` directory
|
39 |
|
40 |
== Frequently Asked Questions ==
|
41 |
|
42 |
+
= Can the Assistant use the standard WordPress post Categories and Tags? =
|
43 |
+
|
44 |
+
Yes! You can activate or deactivate support for Categories and Tags at any time by visiting the Media Library Assistant Settings page.
|
45 |
+
|
46 |
+
= Do I have to use the WordPress post Categories and Tags? =
|
47 |
|
48 |
+
No! The Assistant supplies pre-defined Att. Categories and Att. Tags; these are WordPress custom taxonomies, with all of the API support that implies. You can activate or deactivate the pre-defined taxonomies at any time by visiting the Media Library Assistant Settings page.
|
49 |
|
50 |
= Can I add my own custom taxonomies to the Assistant? =
|
51 |
|
52 |
+
Yes. Any custom taxonomy you register with the Attachment post type will appear in the Assistant UI. Use the Media Library Assistant Settings page to add support for your taxonomies to the Assistant UI.
|
53 |
+
|
54 |
+
= Why don't the "Posts" counts in the taxonomy edit screens match the search results when you click on them? =
|
55 |
+
|
56 |
+
This is a known WordPress problem with multiple support tickets already in Trac, e.g.,
|
57 |
+
Ticket #20708(closed defect (bug): duplicate) Wrong posts count in taxonomy table,
|
58 |
+
Ticket #14084(assigned defect (bug)) Custom taxonomy count includes draft & trashed posts,
|
59 |
+
and Ticket #14076(closed defect (bug): duplicate) Misleading post count on taxonomy screen.
|
60 |
+
|
61 |
+
For example, if you add Tags support to the Assistant and then assign tag values to your attachments, the "Posts" column in the "Tags" edit screen under the Posts admin section includes attachments in the count. If you click on the number in that column, only posts and pages are displayed. There are similar issues with custom post types and taxonomies (whether you use the Assistant or not). The "Attachments" column in the edit screens added by the Assistant shows the correct count because it works in a different way.
|
62 |
|
63 |
= How do I "unattach" an item? =
|
64 |
|
74 |
|
75 |
== Screenshots ==
|
76 |
|
77 |
+
1. The Media Library Assistant submenu showing the available columns, including "Featured in", "Inserted in", "Att. Categories" and "Att. Tags"
|
78 |
2. The enhanced Edit page showing additional fields, categories and tags
|
79 |
+
3. A typical edit taxonomy page, showing the "Attachments" column
|
80 |
+
4. The Settings page, to customize support of Att. Categories, Att. Tags and other taxonomies and the default sort order
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 0.30 =
|
85 |
+
* New: Complete support for all taxonomies registered with WordPress, including the standard Categories and Tags, your custom taxonomies and the Assistant's pre-defined Att. Categories and Att. Tags. You can add taxonomy columns to the Assistant admin screen, filter the listing on any taxonomy, assign terms to attachments and list the attachments for a taxonomy term.
|
86 |
+
* New: MIME Type and Last Modified Date added to columns listing
|
87 |
+
* New: Last Modified Date added to single item edit screen
|
88 |
+
* New: Default column and sort order added to Settings page
|
89 |
+
* New: Plugin version number added to Settings page header
|
90 |
+
* Fix: Text fields such as Title, Alternate Text and Caption containing single quotes are no longer truncated on the Edit single item screen
|
91 |
+
* Fix: Sortable columns and sort order updated.
|
92 |
+
|
93 |
= 0.20 =
|
94 |
* New: Quick Edit action for inline editing of attachment metadata
|
95 |
* New: Post Author can be changed
|
112 |
|
113 |
== Upgrade Notice ==
|
114 |
|
115 |
+
= 0.30 =
|
116 |
+
Upgrade to support ALL taxonomies, including the standard Categories and Tags, your custom taxonomies and the Assistant's pre-defined Att. Categories and Att. Tags. Add taxonomy columns to the Assistant admin screen, filter on any taxonomy, assign terms and list the attachments for a term.
|
117 |
+
|
118 |
= 0.20 =
|
119 |
You should upgrade to this version if you need "Quick Edit" functionality.
|
120 |
|
124 |
= 0.1 =
|
125 |
Initial release.
|
126 |
|
127 |
+
== Other Notes ==
|
128 |
|
129 |
I have used and learned much from the following books (among many):
|
130 |
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
tests/class-mla-tests.php
CHANGED
@@ -22,7 +22,7 @@ class MLATest {
|
|
22 |
* @param string representing the minimum required version of PHP, e.g. '5.3.2'
|
23 |
* @param string Name of the plugin for messaging purposes
|
24 |
*
|
25 |
-
* @return
|
26 |
*/
|
27 |
public static function min_php_version( $min_version, $plugin_name )
|
28 |
{
|
@@ -42,7 +42,7 @@ class MLATest {
|
|
42 |
* @param string representing the minimum required version of WordPress, e.g. '3.3.0'
|
43 |
* @param string Name of the plugin for messaging purposes
|
44 |
*
|
45 |
-
* @return
|
46 |
*/
|
47 |
public static function min_WordPress_version( $min_version, $plugin_name )
|
48 |
{
|
22 |
* @param string representing the minimum required version of PHP, e.g. '5.3.2'
|
23 |
* @param string Name of the plugin for messaging purposes
|
24 |
*
|
25 |
+
* @return void Exit with messaging if PHP version is too old
|
26 |
*/
|
27 |
public static function min_php_version( $min_version, $plugin_name )
|
28 |
{
|
42 |
* @param string representing the minimum required version of WordPress, e.g. '3.3.0'
|
43 |
* @param string Name of the plugin for messaging purposes
|
44 |
*
|
45 |
+
* @return void Exit with messaging if version is too old
|
46 |
*/
|
47 |
public static function min_WordPress_version( $min_version, $plugin_name )
|
48 |
{
|
tpls/admin-display-settings-page.tpl
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
</td></tr>
|
24 |
<!-- template="radio-option" -->
|
25 |
<tr valign="top"><td style="text-align:right;">
|
26 |
-
<input type="radio" name="[+key+]" [+checked+] value="[+
|
27 |
</td><td>
|
28 |
[+value+]
|
29 |
</td></tr>
|
@@ -36,20 +36,20 @@
|
|
36 |
</select><div style="font-size:8pt;padding-bottom:10px;"> [+help+]</div>
|
37 |
</td></tr>
|
38 |
<!-- template="select-option" -->
|
39 |
-
<option [+selected+] value="[+value+]">[+
|
40 |
<!-- template="text" -->
|
41 |
<tr valign="top"><th scope="row" style="text-align:right;">
|
42 |
-
[+value+]
|
43 |
</th><td style="text-align:left;">
|
44 |
<input name="[+key+]" id="[+key+]" type="text" size="[+size+]" value="[+text+]" />
|
45 |
<div style="font-size:8pt;padding-bottom:10px;"> [+help+]</div>
|
46 |
</td></tr>
|
47 |
<!-- template="textarea" -->
|
48 |
<tr valign="top"><th scope="row" style="text-align:right;">
|
49 |
-
[+value+]
|
50 |
</th><td style="text-align:left;">
|
51 |
<textarea name="[+key+]" id="[+key+]" rows="[+rows+]" cols="[+cols+]">
|
52 |
-
[+text+]
|
53 |
</textarea>
|
54 |
<div style="font-size:8pt;padding-bottom:10px;"> [+help+]</div>
|
55 |
</td></tr>
|
@@ -67,10 +67,51 @@
|
|
67 |
</div>
|
68 |
<!-- template="shortcodeitem" -->
|
69 |
<li><code>[[+name+]]</code> - [+description+]</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
<!-- template="page" -->
|
71 |
<div class="wrap">
|
72 |
<div id="icon-options-general" class="icon32"><br/></div>
|
73 |
-
<h2>Media Library Assistant Settings</h2>
|
74 |
[+messages+]
|
75 |
[+shortcode_list+]
|
76 |
<form method="post" class="mla-display-settings-page" id="mla-display-settings-page-id">
|
@@ -78,8 +119,8 @@
|
|
78 |
[+options_list+]
|
79 |
</table>
|
80 |
<p class="submit" style="padding-bottom: 0;">
|
81 |
-
<input name="save" type="submit" class="button-primary" value="Save Changes" />
|
82 |
-
<input name="reset" type="submit" class="button-primary" value="Delete all options and restore default settings" style="float:right;"/>
|
83 |
</p>
|
84 |
</form>
|
85 |
<h3>Plugin Documentation</h3>
|
23 |
</td></tr>
|
24 |
<!-- template="radio-option" -->
|
25 |
<tr valign="top"><td style="text-align:right;">
|
26 |
+
<input type="radio" name="[+key+]" [+checked+] value="[+option+]" />
|
27 |
</td><td>
|
28 |
[+value+]
|
29 |
</td></tr>
|
36 |
</select><div style="font-size:8pt;padding-bottom:10px;"> [+help+]</div>
|
37 |
</td></tr>
|
38 |
<!-- template="select-option" -->
|
39 |
+
<option [+selected+] value="[+value+]">[+text+]</option>
|
40 |
<!-- template="text" -->
|
41 |
<tr valign="top"><th scope="row" style="text-align:right;">
|
42 |
+
[+value+]
|
43 |
</th><td style="text-align:left;">
|
44 |
<input name="[+key+]" id="[+key+]" type="text" size="[+size+]" value="[+text+]" />
|
45 |
<div style="font-size:8pt;padding-bottom:10px;"> [+help+]</div>
|
46 |
</td></tr>
|
47 |
<!-- template="textarea" -->
|
48 |
<tr valign="top"><th scope="row" style="text-align:right;">
|
49 |
+
[+value+]
|
50 |
</th><td style="text-align:left;">
|
51 |
<textarea name="[+key+]" id="[+key+]" rows="[+rows+]" cols="[+cols+]">
|
52 |
+
[+text+]
|
53 |
</textarea>
|
54 |
<div style="font-size:8pt;padding-bottom:10px;"> [+help+]</div>
|
55 |
</td></tr>
|
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">
|
74 |
+
<thead>
|
75 |
+
<tr>
|
76 |
+
<th scope="col" style="text-align:center">
|
77 |
+
Support
|
78 |
+
</th>
|
79 |
+
<th scope="col" style="text-align:center">
|
80 |
+
Quick Edit
|
81 |
+
</th>
|
82 |
+
<th scope="col" style="text-align:center">
|
83 |
+
List Filter
|
84 |
+
</th>
|
85 |
+
<th scope="col" style="text-align:left">
|
86 |
+
Taxonomy
|
87 |
+
</th>
|
88 |
+
</tr>
|
89 |
+
</thead>
|
90 |
+
<tbody>
|
91 |
+
[+taxonomy_rows+]
|
92 |
+
</tbody>
|
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" />
|
100 |
+
</td>
|
101 |
+
<td style="text-align:center;">
|
102 |
+
<input type="checkbox" name="tax_quick_edit[[+key+]]" id="tax_quick_edit_[+key+]" [+quick_edit_checked+] value="checked" />
|
103 |
+
</td>
|
104 |
+
<td style="text-align:center;">
|
105 |
+
<input type="radio" name="tax_filter" id="tax_filter_[+key+]" [+filter_checked+] value="[+key+]" />
|
106 |
+
</td>
|
107 |
+
<td>
|
108 |
+
[+name+]
|
109 |
+
</td>
|
110 |
+
</tr>
|
111 |
<!-- template="page" -->
|
112 |
<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">
|
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 |
</form>
|
126 |
<h3>Plugin Documentation</h3>
|
tpls/admin-display-single-document.tpl
CHANGED
@@ -34,6 +34,7 @@
|
|
34 |
<p><strong>File name:</strong> [+file_name+]</p>
|
35 |
<p><strong>File type:</strong> [+post_mime_type+]</p>
|
36 |
<p><strong>Upload date:</strong> [+post_date+]</p>
|
|
|
37 |
</td>
|
38 |
</tr>
|
39 |
</thead>
|
@@ -41,15 +42,15 @@
|
|
41 |
<tr class="post_title form-required">
|
42 |
<th valign="top" scope="row" class="label"><label for="attachments[[+ID+]][post_title]"><span class="alignleft">Title</span>
|
43 |
<span class="alignright"><abbr title="required" class="required">*required</abbr></span><br class="clear" /></label></th>
|
44 |
-
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_title]' name='attachments[[+ID+]][post_title]' value='[+
|
45 |
</tr>
|
46 |
<tr class='post_name form-required'>
|
47 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_name]'><span class='alignleft'>Name/Slug</span><span class="alignright"><abbr title="required" class="required">*required</abbr></span><br class='clear' /></label></th>
|
48 |
-
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_name]' name='attachments[[+ID+]][post_name]' value='[+
|
49 |
</tr>
|
50 |
<tr class='post_excerpt'>
|
51 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_excerpt]'><span class='alignleft'>Caption</span><br class='clear' /></label></th>
|
52 |
-
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_excerpt]' name='attachments[[+ID+]][post_excerpt]' value='[+
|
53 |
</tr>
|
54 |
<tr class='post_content'>
|
55 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_content]'><span class='alignleft'>Description</span><br class='clear' /></label></th>
|
@@ -62,7 +63,7 @@
|
|
62 |
[+authors+]
|
63 |
<tr class='image_url'>
|
64 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][image_url]'><span class='alignleft'>File URL</span><br class='clear' /></label></th>
|
65 |
-
<td class='field'><input type='text' class='text urlfield' readonly='readonly' name='attachments[[+ID+]][url]' value='[+
|
66 |
</tr>
|
67 |
<tr class='features'>
|
68 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][features]'><span class='alignleft'>Featured in</span><br class='clear' /></label></th>
|
34 |
<p><strong>File name:</strong> [+file_name+]</p>
|
35 |
<p><strong>File type:</strong> [+post_mime_type+]</p>
|
36 |
<p><strong>Upload date:</strong> [+post_date+]</p>
|
37 |
+
<p><strong>Last modified:</strong> [+post_modified+]</p>
|
38 |
</td>
|
39 |
</tr>
|
40 |
</thead>
|
42 |
<tr class="post_title form-required">
|
43 |
<th valign="top" scope="row" class="label"><label for="attachments[[+ID+]][post_title]"><span class="alignleft">Title</span>
|
44 |
<span class="alignright"><abbr title="required" class="required">*required</abbr></span><br class="clear" /></label></th>
|
45 |
+
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_title]' name='attachments[[+ID+]][post_title]' value='[+post_title_attr+]' aria-required='true' /></td>
|
46 |
</tr>
|
47 |
<tr class='post_name form-required'>
|
48 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_name]'><span class='alignleft'>Name/Slug</span><span class="alignright"><abbr title="required" class="required">*required</abbr></span><br class='clear' /></label></th>
|
49 |
+
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_name]' name='attachments[[+ID+]][post_name]' value='[+post_name_attr+]' /><p class='help'>Must be unique; will be validated.</p></td>
|
50 |
</tr>
|
51 |
<tr class='post_excerpt'>
|
52 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_excerpt]'><span class='alignleft'>Caption</span><br class='clear' /></label></th>
|
53 |
+
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_excerpt]' name='attachments[[+ID+]][post_excerpt]' value='[+post_excerpt_attr+]' /></td>
|
54 |
</tr>
|
55 |
<tr class='post_content'>
|
56 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_content]'><span class='alignleft'>Description</span><br class='clear' /></label></th>
|
63 |
[+authors+]
|
64 |
<tr class='image_url'>
|
65 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][image_url]'><span class='alignleft'>File URL</span><br class='clear' /></label></th>
|
66 |
+
<td class='field'><input type='text' class='text urlfield' readonly='readonly' name='attachments[[+ID+]][url]' value='[+guid_attr+]' /><br /><p class='help'>Location of the uploaded file.</p></td>
|
67 |
</tr>
|
68 |
<tr class='features'>
|
69 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][features]'><span class='alignleft'>Featured in</span><br class='clear' /></label></th>
|
tpls/admin-display-single-image.tpl
CHANGED
@@ -34,6 +34,7 @@
|
|
34 |
<p><strong>File name:</strong> [+file_name+]</p>
|
35 |
<p><strong>File type:</strong> [+post_mime_type+]</p>
|
36 |
<p><strong>Upload date:</strong> [+post_date+]</p>
|
|
|
37 |
<p><strong>Dimensions:</strong> <span id="media-dims-[+ID+]">[+width+] × [+height+]</span></p>
|
38 |
</td>
|
39 |
</tr>
|
@@ -42,19 +43,19 @@
|
|
42 |
<tr class="post_title form-required">
|
43 |
<th valign="top" scope="row" class="label"><label for="attachments[[+ID+]][post_title]"><span class="alignleft">Title</span>
|
44 |
<span class="alignright"><abbr title="required" class="required">*required</abbr></span><br class="clear" /></label></th>
|
45 |
-
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_title]' name='attachments[[+ID+]][post_title]' value='[+
|
46 |
</tr>
|
47 |
<tr class='post_name form-required'>
|
48 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_name]'><span class='alignleft'>Name/Slug</span><span class="alignright"><abbr title="required" class="required">*required</abbr></span><br class='clear' /></label></th>
|
49 |
-
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_name]' name='attachments[[+ID+]][post_name]' value='[+
|
50 |
</tr>
|
51 |
<tr class='image_alt'>
|
52 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][image_alt]'><span class='alignleft'>Alternate Text</span><br class='clear' /></label></th>
|
53 |
-
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][image_alt]' name='attachments[[+ID+]][image_alt]' value='[+
|
54 |
</tr>
|
55 |
<tr class='post_excerpt'>
|
56 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_excerpt]'><span class='alignleft'>Caption</span><br class='clear' /></label></th>
|
57 |
-
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_excerpt]' name='attachments[[+ID+]][post_excerpt]' value='[+
|
58 |
</tr>
|
59 |
<tr class='post_content'>
|
60 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_content]'><span class='alignleft'>Description</span><br class='clear' /></label></th>
|
@@ -67,7 +68,7 @@
|
|
67 |
[+authors+]
|
68 |
<tr class='image_url'>
|
69 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][image_url]'><span class='alignleft'>File URL</span><br class='clear' /></label></th>
|
70 |
-
<td class='field'><input type='text' class='text urlfield' readonly='readonly' name='attachments[[+ID+]][image_url]' value='[+
|
71 |
</tr>
|
72 |
<tr class='image_meta'>
|
73 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][image_meta]'><span class='alignleft'>Image Metadata</span><br class='clear' /></label></th>
|
34 |
<p><strong>File name:</strong> [+file_name+]</p>
|
35 |
<p><strong>File type:</strong> [+post_mime_type+]</p>
|
36 |
<p><strong>Upload date:</strong> [+post_date+]</p>
|
37 |
+
<p><strong>Last modified:</strong> [+post_modified+]</p>
|
38 |
<p><strong>Dimensions:</strong> <span id="media-dims-[+ID+]">[+width+] × [+height+]</span></p>
|
39 |
</td>
|
40 |
</tr>
|
43 |
<tr class="post_title form-required">
|
44 |
<th valign="top" scope="row" class="label"><label for="attachments[[+ID+]][post_title]"><span class="alignleft">Title</span>
|
45 |
<span class="alignright"><abbr title="required" class="required">*required</abbr></span><br class="clear" /></label></th>
|
46 |
+
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_title]' name='attachments[[+ID+]][post_title]' value='[+post_title_attr+]' aria-required='true' /></td>
|
47 |
</tr>
|
48 |
<tr class='post_name form-required'>
|
49 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_name]'><span class='alignleft'>Name/Slug</span><span class="alignright"><abbr title="required" class="required">*required</abbr></span><br class='clear' /></label></th>
|
50 |
+
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_name]' name='attachments[[+ID+]][post_name]' value='[+post_name_attr+]' /><p class='help'>Must be unique; will be validated.</p></td>
|
51 |
</tr>
|
52 |
<tr class='image_alt'>
|
53 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][image_alt]'><span class='alignleft'>Alternate Text</span><br class='clear' /></label></th>
|
54 |
+
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][image_alt]' name='attachments[[+ID+]][image_alt]' value='[+image_alt_attr+]' /><p class='help'>Alt text for the image, e.g. “The Mona Lisa”</p></td>
|
55 |
</tr>
|
56 |
<tr class='post_excerpt'>
|
57 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_excerpt]'><span class='alignleft'>Caption</span><br class='clear' /></label></th>
|
58 |
+
<td class='field'><input type='text' class='text' id='attachments[[+ID+]][post_excerpt]' name='attachments[[+ID+]][post_excerpt]' value='[+post_excerpt_attr+]' /></td>
|
59 |
</tr>
|
60 |
<tr class='post_content'>
|
61 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][post_content]'><span class='alignleft'>Description</span><br class='clear' /></label></th>
|
68 |
[+authors+]
|
69 |
<tr class='image_url'>
|
70 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][image_url]'><span class='alignleft'>File URL</span><br class='clear' /></label></th>
|
71 |
+
<td class='field'><input type='text' class='text urlfield' readonly='readonly' name='attachments[[+ID+]][image_url]' value='[+guid_attr+]' /><br /><p class='help'>Location of the uploaded file.</p></td>
|
72 |
</tr>
|
73 |
<tr class='image_meta'>
|
74 |
<th valign='top' scope='row' class='label'><label for='attachments[[+ID+]][image_meta]'><span class='alignleft'>Image Metadata</span><br class='clear' /></label></th>
|
tpls/help-for-edit-flat-taxonomy.tpl
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- template="mla-overview" -->
|
2 |
+
<!-- title="Overview" order="1" -->
|
3 |
+
<p>You can assign keywords to your attachments using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there’s no relationship from one tag to another.</p>
|
4 |
+
<p>What’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>
|
5 |
+
<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>
|
6 |
+
<!-- template="mla-adding-tags" -->
|
7 |
+
<!-- title="Adding Tags" order="2" -->
|
8 |
+
<p>When adding a new tag on this screen, you’ll fill in the following fields:</p>
|
9 |
+
<ul>
|
10 |
+
<li><strong>Name</strong> - The name is how it appears on your site.</li>
|
11 |
+
<li><strong>Slug</strong> - The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.</li>
|
12 |
+
<li><strong>Description</strong> - The description is not prominent by default; however, some themes may display it.</li>
|
13 |
+
</ul>
|
14 |
+
<!-- template="mla-attachments-column" -->
|
15 |
+
<!-- title="Attachments Column" order="3" -->
|
16 |
+
<p>The “Attachments” 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’ve selected.</p>
|
17 |
+
<!-- template="sidebar" -->
|
18 |
+
<p><strong>For more information:</strong></p>
|
19 |
+
<p><a href="http://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a></p>
|
20 |
+
<p><a href="http://wordpress.org/support/" target="_blank">Support Forums</a></p>
|
tpls/help-for-edit-hierarchical-taxonomy.tpl
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- template="mla-overview" -->
|
2 |
+
<!-- title="Overview" order="1" -->
|
3 |
+
<p>You can use <strong>categories</strong> to define sections of your site and group related attachments. The default is “none”, i.e., the attachment is not associated with any category.</p>
|
4 |
+
<p>What’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>
|
5 |
+
<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>
|
6 |
+
<!-- template="mla-adding-categories" -->
|
7 |
+
<!-- title="Adding Categories" order="2" -->
|
8 |
+
<p>When adding a new category on this screen, you’ll fill in the following fields:</p>
|
9 |
+
<ul>
|
10 |
+
<li><strong>Name</strong> - The name is how it appears on your site.</li>
|
11 |
+
<li><strong>Slug</strong> - The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.</li>
|
12 |
+
<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>
|
13 |
+
<li><strong>Description</strong> - The description is not prominent by default; however, some themes may display it.</li>
|
14 |
+
</ul>
|
15 |
+
<!-- template="mla-attachments-column" -->
|
16 |
+
<!-- title="Attachments Column" order="3" -->
|
17 |
+
<p>The “Attachments” 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’ve selected.</p>
|
18 |
+
<!-- template="sidebar" -->
|
19 |
+
<p><strong>For more information:</strong></p>
|
20 |
+
<p><a href="http://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a></p>
|
21 |
+
<p><a href="http://wordpress.org/support/" target="_blank">Support Forums</a></p>
|
tpls/help-for-media_page_mla-menu.tpl
CHANGED
@@ -10,8 +10,11 @@
|
|
10 |
<p>The “Featured in” and “Inserted in” columns are a powerful tool for managing your attachments. They show you where each attachment is used in a post or page as a “Featured Image” or as an embedded image or link.</p>
|
11 |
<p>You can also use the information in the “Title/Name” column to identify “Orphan” items that are not used in any post or page and items with a “Bad Parent”, i.e., a parent that does not exist.</p>
|
12 |
<!-- template="mla-categories-tags" -->
|
13 |
-
<!-- title="
|
14 |
-
<p>The “
|
|
|
|
|
|
|
15 |
<!-- template="mla-bulk-actions" -->
|
16 |
<!-- title="Bulk Actions" order="4" -->
|
17 |
<p>The “Bulk Actions” 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>
|
10 |
<p>The “Featured in” and “Inserted in” columns are a powerful tool for managing your attachments. They show you where each attachment is used in a post or page as a “Featured Image” or as an embedded image or link.</p>
|
11 |
<p>You can also use the information in the “Title/Name” column to identify “Orphan” items that are not used in any post or page and items with a “Bad Parent”, i.e., a parent that does not exist.</p>
|
12 |
<!-- template="mla-categories-tags" -->
|
13 |
+
<!-- title="Taxonomy Support" order="3" -->
|
14 |
+
<p>The “taxonomy” 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>
|
15 |
+
<p>The Media Library Assistant provides two pre-defined taxonomies, “Att. Categories” and “Att. Tags” 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>
|
16 |
+
<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>
|
17 |
+
<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 “Attachments” 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>
|
18 |
<!-- template="mla-bulk-actions" -->
|
19 |
<!-- title="Bulk Actions" order="4" -->
|
20 |
<p>The “Bulk Actions” 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>
|