You are here

function dynamic_background_default_content_types in Dynamic Background 7.2

Ensure that all content types are enabled by default.

Parameters

@settings:

4 calls to dynamic_background_default_content_types()
dynamic_background_node_form_alter in modules/dynamic_background_node/dynamic_background_node.module
Implements hook_form_alter().
dynamic_background_node_node_delete in modules/dynamic_background_node/dynamic_background_node.module
Implements hook_node_delete().
dynamic_background_node_settings_form in modules/dynamic_background_node/dynamic_background_node.module
Build the administration interface for dynamic background nodes.
dynamic_background_set_active_node_image in modules/dynamic_background_node/dynamic_background_node.module
Set the active image for the node given, base on the image selected on the node.

File

modules/dynamic_background_node/dynamic_background_node.module, line 63
This module provides the node administrations with the option to use different dynamic background images for each node.

Code

function dynamic_background_default_content_types(&$settings) {
  if (!isset($settings['settings']['content_types'])) {
    if (!isset($settings['settings'])) {
      $settings['settings'] = array();
    }
    $settings['settings']['content_types'] = array();
    foreach (node_type_get_types() as $key => $type) {
      $settings['settings']['content_types'][$key] = $key;
    }
    ksort($settings['settings']['content_types']);
  }
}