userIsAllowed = $this->checkUserPrivileges(); } protected function checkUserPrivileges() { if ((current_user_can( 'manage_options' ) || current_user_can( 'upload_files' ) || current_user_can( 'edit_posts' ))) return true; return false; } // helper for a helper. protected function formatNumber($number, $precision = 2) { return UIHelper::formatNumber($number, $precision); } } // class