approved_attach_sort

Description

A function for sorting out attachments and putting unapproved attachments before approved ones in an array.

Syntax

int approved_attach_sort (array $$a, array $$b)



Parameter $$a

Expected type: Array
Description: An array in the $attachmentData array



Parameter $$b

Expected type: Array
Description: Another item in the $attachmentData array



Return value

Expected type: Enumerated Integer
Description: See http://www.php.net/usort for more info

Possible integer values
Allowed values Description
-1 $a is approved but $b isn't
0 Both are either approved or unapproved
1 $b is approved but $a isn't


Notes

  • Callback function for usort()
Advertisement: