You are here

function metatag_context_load_default_context in Metatag 7

Create a default Metatag-focused context.

Return value

object A context structure in the form of a StdClass object.

1 call to metatag_context_load_default_context()
metatag_context_config_add_form_submit in metatag_context/metatag_context.admin.inc
FormAPI callback to save the 'edit_name' form.

File

metatag_context/metatag_context.admin.inc, line 240
Admin settings page for Metatag Context.

Code

function metatag_context_load_default_context() {
  $context = new stdClass();
  $context->disabled = FALSE;

  /* Edit this to true to make a default context disabled initially */
  $context->api_version = 3;
  $context->name = 'default_metatag_context';
  $context->description = '';
  $context->tag = 'Metatag';
  $context->metatag = TRUE;
  $context->conditions = array(
    'path' => array(
      'values' => array(),
    ),
  );
  $context->reactions = array(
    'metatag_context_reaction' => array(
      'metatags' => array(),
      'metatag_admin' => 1,
    ),
  );
  $context->condition_mode = 0;
  $context->weight = 0;

  // Translatables
  // Included for use with string extractors like potx.
  t('Metatag');
  return $context;
}