function mediafront_get_preset in MediaFront 6
Same name and namespace in other branches
- 6.2 includes/mediafront.preset.inc \mediafront_get_preset()
- 7.2 includes/mediafront.preset.inc \mediafront_get_preset()
- 7 includes/mediafront.preset.inc \mediafront_get_preset()
Get's the preset.
3 calls to mediafront_get_preset()
- mediafront_features_export_render in includes/
mediafront.features.inc - Implementation of hook_features_export_render().
- mediafront_get_player in ./
mediafront.module - Returns a media player.
- mediafront_preset_load in includes/
mediafront.preset.inc - Used for the menu item to load a preset.
File
- includes/
mediafront.preset.inc, line 603
Code
function mediafront_get_preset($preset_name) {
$preset = db_fetch_array(db_query("SELECT * FROM {mediafront_preset} WHERE name='%s'", $preset_name));
if ($preset) {
$preset['settings'] = $preset['settings'] ? unserialize($preset['settings']) : array();
$preset['connect'] = $preset['connect'] ? unserialize($preset['connect']) : array();
}
else {
// Get all of the default presets.
$default_presets = mediafront_preset_get_default_presets();
// Check to see if this preset exists.
if (isset($default_presets[$preset_name])) {
// Make this our preset
$preset = $default_presets[$preset_name];
}
}
// Return the preset.
return $preset;
}