function nodequeue_filter_qids in Nodequeue 6.2
Same name and namespace in other branches
- 5.2 nodequeue.module \nodequeue_filter_qids()
- 7.2 nodequeue.module \nodequeue_filter_qids()
Filter a list of qids returned by nodequeue_get_qids to a location.
Parameters
$qids: An array of $qids from @see nodequeue_get_qids()
$location: One of:
- 'links': Only check for queues that have node links.
- 'tab': Only check for queues that appear on the node tab.
- 'ui': Only check for queues that appear in the UI.
2 calls to nodequeue_filter_qids()
- nodequeue_load_queues_by_type in ./
nodequeue.module - Fetch a list of available queues for a given location. These queues will be fully loaded and ready to go.
- nodequeue_node_access in ./
nodequeue.module - Return TRUE if $user can queue(s) for this node.
File
- ./
nodequeue.module, line 562 - Maintains queues of nodes in arbitrary order.
Code
function nodequeue_filter_qids(&$qids, $location) {
$var = "show_in_{$location}";
foreach ($qids as $qid => $info) {
if (empty($info->{$var})) {
unset($qids[$qid]);
}
}
}