You are here

function protected_submissions_requirements in Protected Submissions 7

Same name and namespace in other branches
  1. 8 protected_submissions.install \protected_submissions_requirements()

Implements hook_requirements(). Provides stats for rejected submissions on the status page.

File

./protected_submissions.module, line 907
Blocks submissions from anonymous users that contain pre-defined strings.

Code

function protected_submissions_requirements($phase) {
  $requirements = array();
  $rejected = protected_submissions_variable_get('protected_submissions_rejected');
  $requirements['protected_submissions'] = array(
    'title' => t('Protected submissions'),
    'value' => t('Total of @count submissions containing <a href="@patterns">spam patterns</a> have been rejected.', array(
      '@count' => $rejected,
      '@patterns' => '/admin/config/content/protected_submissions',
    )),
    'severity' => REQUIREMENT_INFO,
  );
  return $requirements;
}