You are here

public static function CleantalkFuncs::_cleantalk_check_form_submit_handlers in Anti Spam by CleanTalk 8.3

Same name and namespace in other branches
  1. 8.4 src/CleantalkFuncs.php \Drupal\cleantalk\CleantalkFuncs::_cleantalk_check_form_submit_handlers()
  2. 9.1.x src/CleantalkFuncs.php \Drupal\cleantalk\CleantalkFuncs::_cleantalk_check_form_submit_handlers()

Cleantalk inner function - check form handlers for save to prevent checking drafts/preview.

5 calls to CleantalkFuncs::_cleantalk_check_form_submit_handlers()
cleantalk_validate_comment in ./cleantalk.module
Cleantalk inner function - comment validation function.
cleantalk_validate_contact_message in ./cleantalk.module
Cleantalk inner function - contact message validation function.
cleantalk_validate_forum_topic in ./cleantalk.module
Cleantalk inner function - forum topic validation function.
cleantalk_validate_register in ./cleantalk.module
Cleantalk inner function - registration validation function.
cleantalk_validate_webform in ./cleantalk.module
Cleantalk inner function - webform validation function.

File

src/CleantalkFuncs.php, line 598

Class

CleantalkFuncs
Cleantalk class create request

Namespace

Drupal\cleantalk

Code

public static function _cleantalk_check_form_submit_handlers($submitHandlers) {
  if ($submitHandlers && is_array($submitHandlers)) {
    foreach ($submitHandlers as $handler) {
      if ($handler === '::save') {
        return true;
      }
    }
  }
  return false;
}