You are here

function better_formats_text_format_sort in Better Formats 8

Same name and namespace in other branches
  1. 7 better_formats.module \better_formats_text_format_sort()

Sort text formats by weight.

Parameters

array $a: Array containing weight value to compare.

array $b: Array containing weight value to compare.

Return value

bool TRUE if the weight of $a is greater than $b, FALSE if weight of $b is greater than $a or equal to $a.

1 string reference to 'better_formats_text_format_sort'
better_formats_filter_process_format in ./better_formats.module
Process callback for form elements that have a text format selector attached.

File

./better_formats.module, line 282
Enhances the core input format system by managing input format defaults and settings.

Code

function better_formats_text_format_sort($a, $b) {
  return $a['weight'] > $b['weight'];
}