Correct me if I'm wrong, but it looks like flag.module is currently returning the wrong data structure from flag_field_extra_fields(). It should be:
$extra['node'][$type->type]['display']['flag'] = array();
// or
$extra['node'][$type->type]['form']['flag'] = array();
Also, each individual flag could be separated out here to allow each to be ordered/placed in the 'manage display' tab for nodes.
On top of this, I don't see any place where this would take effect since flag_node_view() ends up burying the set of flag links in content['links'].
If this is done on purpose and I'm just not getting it, no worries. If this is not the intended setup, then let me know and I'll write a patch for it.
Comments
Comment #1
quicksketchYeah, RC3 API change. :P
Needs to be updated for sure.
Comment #2
quicksketchThe implementation of hook_field_extra_fields() is for the form-side of things (while editing a node for example), not for the display side (since Flag links are displayed in the $links array, as you stated).
This patch fixes the implementation of hook_field_extra_fields() in several ways. First it only shows the Flag options if there are some checkboxes exposed on the node form for that node type (previously it just always showed it) and it tells you what those checkboxes are now for each type. It also removes some ancient legacy code referring to "content.module".
Comment #3
quicksketch