function sharerich_reorder_buttons in Sharerich 7
Helper to reorder buttons.
This is temporary until we build drag and drop of services in the admin UI.
1 call to sharerich_reorder_buttons()
- sharerich_get_buttons in ./
sharerich.module - Returns markup with list of share buttons.
File
- ./
sharerich.module, line 373
Code
function sharerich_reorder_buttons($buttons, $order = array(
'facebook',
'twitter',
'linkedin',
'email',
)) {
$tmp = array();
foreach ($order as $service_name) {
$tmp[$service_name] = $buttons[$service_name];
unset($buttons[$service_name]);
}
return array_merge($tmp, $buttons);
}