metatag_context_tests.context.inc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * @file
  4. * Context reaction for Metatag:Context tests.
  5. */
  6. /**
  7. * Implements hook_context_default_contexts().
  8. */
  9. function metatag_context_tests_context_default_contexts() {
  10. $defaults = array();
  11. $context = new stdClass();
  12. $context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
  13. $context->api_version = 3;
  14. $context->name = 'metatag_context_test';
  15. $context->description = 'A default Metatag:Context definition for a test page.';
  16. $context->tag = 'Metatag';
  17. $context->conditions = array(
  18. 'path' => array(
  19. 'values' => array(
  20. 'metatag-context-test' => 'metatag-context-test',
  21. ),
  22. ),
  23. );
  24. $context->reactions = array(
  25. 'metatag_context_reaction' => array(
  26. 'metatags' => array(
  27. 'und' => array(
  28. 'title' => array(
  29. 'value' => 'Metatag:Context test page title tag',
  30. ),
  31. 'description' => array(
  32. 'value' => 'Metatag:Context test description tag.',
  33. ),
  34. 'abstract' => array(
  35. 'value' => '',
  36. ),
  37. 'keywords' => array(
  38. 'value' => 'Test, page, keywords',
  39. ),
  40. ),
  41. ),
  42. 'metatag_admin' => 1,
  43. ),
  44. );
  45. $context->condition_mode = 1;
  46. $defaults[$context->name] = $context;
  47. // Translatables
  48. // Included for use with string extractors like potx.
  49. t('A default Metatag:Context definition for a test page.');
  50. t('Metatag');
  51. return $defaults;
  52. }