This patch contains the API additions from #475366: Flag queue. It adds the following API functions:
- flag_get_flag_counts(): Get a count of flagged items within a flag.
- flag_get_flagged_content(): Get a list of all flagged content within a flag.
- flag_get_content_id(): Get a content ID (such as a NID) given a flag content ID.
- Additions to flag_get_content_flags(): Add a $flag_name parameter to limit results to a specific flag.
Note that I've modified these functions since the last patch in #533424: Add hook_flag_options_alter() (create a 2.x branch). with a few changes:
- We should use $flag_name instead of $fid in all public API functions.
- I merged flag_get_fcid_from_content_id() with flag_get_content_flags() since they retrieve similar data.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 576388-flag_additional_api_functions-2.patch | 3.83 KB | amitaibu |
| flag_additional_api_functions.patch | 3.53 KB | quicksketch |
Comments
Comment #1
quicksketchComment #2
amitaibuI've added 2 comments in flag_get_content_flags() to clarify a bit what's going on there. If they are ok then RTBC.
Comment #3
quicksketchGreat, committed.
Comment #5
mooffie commentedTagging.