You are here

function joyride_context_default_contexts in Joyride JQuery for Drupal Site Tours 7

Implements hook_context_default_contexts(). Provide default module's contexts.

Return value

array

File

./joyride.module, line 232

Code

function joyride_context_default_contexts() {
  $export = array();
  $context = new stdClass();
  $context->disabled = FALSE;

  /* Edit this to true to make a default context disabled initially */
  $context->api_version = 3;
  $context->name = 'joyride_demo_default';
  $context->description = '';
  $context->tag = 'joyride';
  $context->conditions = array(
    'path' => array(
      'values' => array(
        'admin/config/user-interface/joyride' => 'admin/config/user-interface/joyride',
        'admin/config/user-interface/joyride/auto-start' => 'admin/config/user-interface/joyride/auto-start',
      ),
    ),
  );
  $context->reactions = array(
    'joyride_add' => array(
      'joyride_auto_start' => 1,
      'joyride_play_once' => 0,
      'joyride_tour_content' => '<li data-class="so-awesome" data-text="Next" class="custom">
  <h2>Stop #1</h2>
  <p>You can control all the details for you tour stop. Any valid HTML will work inside of Joyride.</p>
</li>
<li data-id="numero2" data-button="Next" data-options="tipLocation:top;tipAnimation:fade">
  <h2>Stop #2</h2>
  <p>Get the details right by styling Joyride with a custom stylesheet!</p>
</li>
<li data-id="numero3" data-button="Next" data-options="tipLocation:right">
  <h2>Stop #3</h2>
  <p>It works right aligned.</p>
</li>
<li data-button="Next">
  <h2>Stop #4</h2>
  <p>It works as a modal too!</p>
</li>
<li data-id="numero5" data-button="Close">
  <h2>Stop #5</h2>
  <p>Now what are you waiting for? Add this to your projects and get the most out of your apps!</p>
</li>',
    ),
  );
  $context->condition_mode = 0;

  // Translatables
  // Included for use with string extractors like potx.
  t('joyride');
  $export[$context->name] = $context;
  $context = new stdClass();
  $context->disabled = FALSE;

  /* Edit this to true to make a default context disabled initially */
  $context->api_version = 3;
  $context->name = 'joyride_demo_manual_trigger';
  $context->description = '';
  $context->tag = 'joyride';
  $context->conditions = array(
    'path' => array(
      'values' => array(
        'admin/config/user-interface/joyride/manual-trigger' => 'admin/config/user-interface/joyride/manual-trigger',
      ),
    ),
  );
  $context->reactions = array(
    'joyride_add' => array(
      'joyride_auto_start' => 0,
      'joyride_play_once' => FALSE,
      'joyride_tour_content' => '<li data-class="so-awesome" data-text="Next" class="custom">
  <h2>Stop #1</h2>
  <p>You can control all the details for you tour stop. Any valid HTML will work inside of Joyride.</p>
</li>
<li data-id="numero2" data-button="Next" data-options="tipLocation:top;tipAnimation:fade">
  <h2>Stop #2</h2>
  <p>Get the details right by styling Joyride with a custom stylesheet!</p>
</li>
<li data-id="numero3" data-button="Next" data-options="tipLocation:right">
  <h2>Stop #3</h2>
  <p>It works right aligned.</p>
</li>
<li data-button="Next">
  <h2>Stop #4</h2>
  <p>It works as a modal too!</p>
</li>
<li data-id="numero5" data-button="Close">
  <h2>Stop #5</h2>
  <p>Now what are you waiting for? Add this to your projects and get the most out of your apps!</p>
</li>',
    ),
  );
  $context->condition_mode = 0;

  // Translatables
  // Included for use with string extractors like potx.
  t('joyride');
  $export[$context->name] = $context;
  $context = new stdClass();
  $context->disabled = FALSE;

  /* Edit this to true to make a default context disabled initially */
  $context->api_version = 3;
  $context->name = 'joyride_demo_play_once';
  $context->description = '';
  $context->tag = 'joyride';
  $context->conditions = array(
    'path' => array(
      'values' => array(
        'admin/config/user-interface/joyride/play-once' => 'admin/config/user-interface/joyride/play-once',
      ),
    ),
  );
  $context->reactions = array(
    'joyride_add' => array(
      'joyride_auto_start' => 1,
      'joyride_play_once' => 1,
      'joyride_tour_content' => '<li data-class="so-awesome" data-text="Next" class="custom">
  <h2>Stop #1</h2>
  <p>You can control all the details for you tour stop. Any valid HTML will work inside of Joyride.</p>
</li>
<li data-id="numero2" data-button="Next" data-options="tipLocation:top;tipAnimation:fade">
  <h2>Stop #2</h2>
  <p>Get the details right by styling Joyride with a custom stylesheet!</p>
</li>
<li data-id="numero3" data-button="Next" data-options="tipLocation:right">
  <h2>Stop #3</h2>
  <p>It works right aligned.</p>
</li>
<li data-button="Next">
  <h2>Stop #4</h2>
  <p>It works as a modal too!</p>
</li>
<li data-id="numero5" data-button="Close">
  <h2>Stop #5</h2>
  <p>Now what are you waiting for? Add this to your projects and get the most out of your apps!</p>
</li>',
    ),
  );
  $context->condition_mode = 0;

  // Translatables
  // Included for use with string extractors like potx.
  t('joyride');
  $export[$context->name] = $context;
  return $export;
}