The original code, when enabled, actually prevents all counting of pages because it does not consider if the user is actually logged in and is an admin.
Replaced:
IF (!$excludeAdmins) {
with
global $RoleName;
IF (!( $excludeAdmins AND in_array($RoleName, array("editor","admin") )) ) {
$login = new Login(); added to public function beforeSiteLoad() along with:
if ( $login->isLogged()) { $GLOBALS['RoleName'] = $login->Role(); } else { $GLOBALS['RoleName'] = 'No Role Identified'; }
The original code, when enabled, actually prevents all counting of pages because it does not consider if the user is actually logged in and is an admin. Replaced:
IF (!$excludeAdmins) {
with$login = new Login();
added topublic function beforeSiteLoad()
along with:if ( $login->isLogged()) { $GLOBALS['RoleName'] = $login->Role(); } else { $GLOBALS['RoleName'] = 'No Role Identified'; }