You are here

function mediafront_get_settings in MediaFront 7

Same name and namespace in other branches
  1. 6.2 mediafront.module \mediafront_get_settings()
  2. 6 mediafront.module \mediafront_get_settings()
  3. 7.2 mediafront.module \mediafront_get_settings()

Returns ALL the player settings for the given player provided settings to override.

5 calls to mediafront_get_settings()
mediafront_preset_form in includes/mediafront.preset.inc
mediafront_preset_save in includes/mediafront.preset.inc
Saves a new preset.
mediafront_preset_submit in includes/mediafront.preset.inc
Submit handler for the preset form.
mediafront_template_preprocess in ./mediafront.module
The template preprocess function that should be used for all media players.
minplayer_get_player in players/minplayer/minplayer.module
Implements hook_get_player()

File

./mediafront.module, line 190

Code

function mediafront_get_settings($player, $overrides = array()) {
  static $defaults = array();

  // Get the default settings.
  $settings = isset($defaults[$player]) ? $defaults[$player] : array();
  if (!$settings) {
    $settings = array_merge(mediafront_get_player_params($player), mediafront_get_player_settings($player));
    $defaults[$player] = $settings;
  }

  // Return the settings.
  return $overrides ? array_merge($settings, $overrides) : $settings;
}