show pr of current site on status page
deekayen - June 21, 2008 - 21:57
| Project: | Google PageRank |
| Version: | 5.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Using hook_requirements(), the underlying structure is there to show the pagerank of the current site on the status report page at admin/logs/status.
<?php
/**
* Implementation of hook_requirements().
*
* Show the pagerank of the current site in the status report.
*/
function google_pr_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'runtime') {
$pr = google_pr_get(url('<front>', NULL, NULL, TRUE));
$requirements['google_pr_rank'] = array(
'title' => $t('Google Pagerank'),
'value' => $pr,
'severity' => REQUIREMENT_INFO
);
}
return $requirements;
}
?>
#1
added in CVS revision 1.1.4.3
#2
Automatically closed -- issue fixed for two weeks with no activity.