function nodequeue_filter_queues in Nodequeue 7.3
Filter a list of queues returned by nodequeue_get_queues to a location.
Parameters
$queues: An array of queues from @see nodequeue_get_queues()
$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_queues()
- 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_nodequeue_access in ./
nodequeue.module - Return TRUE if $user can queue(s) for this node.
File
- ./
nodequeue.module, line 495 - Maintains queues of nodes in arbitrary order.
Code
function nodequeue_filter_queues(&$queues, $location) {
$var = "show_in_{$location}";
foreach ($queues as $name => $info) {
if (empty($info->{$var})) {
unset($queues[$name]);
}
}
}