You are here

function opigno_quiz_app_is_node_add_question in Opigno Quiz App 7

Helper function to determine if we're adding a Question node.

Return value

bool

2 calls to opigno_quiz_app_is_node_add_question()
opigno_quiz_app_og_context_handler in ./opigno_quiz_app.module
OG Context provider.
opigno_quiz_app_opigno_breadcrumbs in ./opigno_quiz_app.module
Implements hook_opigno_breadcrumbs().

File

./opigno_quiz_app.module, line 1523
Module file. Defines module hooks.

Code

function opigno_quiz_app_is_node_add_question() {
  static $result;
  if (!isset($result)) {
    $question_types = opigno_quiz_app_get_quiz_question_types();
    $result = preg_match('/^node\\/add\\/(' . str_replace('_', '-', implode('|', $question_types)) . ')$/', current_path());
  }
  return $result;
}