function coder_review_reviews in Coder 7
Same name and namespace in other branches
- 7.2 coder_review/coder_review.common.inc \coder_review_reviews()
Implements hook_reviews().
File
- coder_review/
coder_review.module, line 71
Code
function coder_review_reviews() {
global $_coder_reviews;
if (!isset($_coder_reviews)) {
$_coder_reviews = array();
$path = drupal_get_path('module', 'coder_review') . '/includes';
$files = drupal_system_listing('/coder_review_.*\\.inc$/', $path, 'filepath', 0);
foreach ($files as $file) {
require_once DRUPAL_ROOT . '/' . $file->uri;
$function = $file->name . '_reviews';
if (function_exists($function)) {
if ($review = call_user_func($function)) {
$_coder_reviews = array_merge($_coder_reviews, $review);
}
}
}
}
return $_coder_reviews;
}