function _featured_content_load_node in Featured Content 7.2
Same name and namespace in other branches
- 6.2 featured_content.module \_featured_content_load_node()
- 6 featured_content.module \_featured_content_load_node()
- 7 featured_content.module \_featured_content_load_node()
Try and build the node from either the system url or the query string. Return FALSE if unable to build the node.
5 calls to _featured_content_load_node()
- featured_content_do_search in ./
featured_content.module - Based on the hook_search_execute function.
- featured_content_get_cck_nids in ./
featured_content.module - Get CCK node nids.
- featured_content_get_filtered_nids in ./
featured_content.module - Get filtered node nids. Filter base on content types, users (authors) and taxonomy terms.
- featured_content_get_search_nids in ./
featured_content.module - Get search result node nids. Uses the title of the current node page to get the search results.
- featured_content_sort_nodes_by_vocab in ./
featured_content.module - Sort nodes based on vocabularies. The order is based on the weight of the vocabularies as well as the term of terms the node has within that vocabulary.
File
- ./
featured_content.module, line 2286 - Featured Content module for created related & featured content blocks.
Code
function _featured_content_load_node() {
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
}
else {
if (isset($_GET['nid']) && is_numeric($_GET['nid'])) {
// For RSS feed.
$node = node_load($_GET['nid']);
}
}
return empty($node) ? FALSE : $node;
}