You are here

function mediafront_get_settings in MediaFront 6.2

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

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

4 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.

File

./mediafront.module, line 192

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;
}