Add team gallery shortcode to editor button with sorting option

This commit is contained in:
Brian Miyaji
2017-06-06 16:28:24 +10:00
parent a13263ec22
commit c20f8c64a8
3 changed files with 77 additions and 12 deletions

View File

@@ -96,6 +96,17 @@ function sp_sort_random() {
return mt_rand( 0, 1 );
}
/**
* Sort array by name field.
*
* @access public
* @param array $array
* @return bool
*/
function sp_sort_by_name( $a, $b ) {
return strcmp( $a['name'], $b['name'] );
}
/**
* let_to_num function.
*