function media_youtube_variable_default in Media: YouTube 6
Same name and namespace in other branches
- 7 includes/media_youtube.variables.inc \media_youtube_variable_default()
The default variables within the Media: YouTube namespace.
Parameters
string $name: Optional variable name to retrieve the default. Note that it has not yet been pre-pended with the MEDIA_YOUTUBE_NAMESPACE namespace at this time.
Return value
unknown The default value of this variable, if it's been set, or NULL, unless $name is NULL, in which case we return an array of all default values.
See also
3 calls to media_youtube_variable_default()
- media_youtube_uninstall in ./
media_youtube.install - Implementation of hook_uninstall().
- media_youtube_variable_get in includes/
media_youtube.variables.inc - Wrapper for variable_get() that uses the Media: YouTube variable registry.
- _media_youtube_convert_old_variables in ./
media_youtube.install - Convert pre-existing variables to the Media: YouTube variable namespace.
File
- includes/
media_youtube.variables.inc, line 134 - Contains the variables and defaults used by Media: YouTube.
Code
function media_youtube_variable_default($name = NULL) {
static $defaults;
if (!isset($defaults)) {
$defaults = array(
// The YouTube API developer key.
'api_key' => '',
// Default YouTube user & password.
'youtube_username' => '',
'youtube_password' => '',
// Player display options.
'show_related_videos' => 0,
'autoplay' => 0,
'show_colors' => FALSE,
'show_border' => FALSE,
'colors_color1' => MEDIA_YOUTUBE_COLOR1_DEFAULT,
'colors_color2' => MEDIA_YOUTUBE_COLOR2_DEFAULT,
'full_screen' => 1,
'high_quality' => FALSE,
'display_info' => FALSE,
'enablejsapi' => TRUE,
// Use Longtail/JW FLV Media Player to display videos?
'use_jw_flv' => FALSE,
// Zend path.
'zend_path' => '',
// Status message to display when a video is unavailable.
'status_display_' . EMFIELD_STATUS_UNAVAILABLE => '',
// Whether to update the status on the fly.
'status_update_frequency' => MEDIA_YOUTUBE_STATUS_UPDATE_NONE,
// Status message to display for unavailable duplicate videos.
'status_display_duplicates' => '',
'check_for_duplicates' => FALSE,
// Status message to display for rejected videos.
'status_display_rejected' => '',
'check_for_rejected' => FALSE,
// Status message to display for failed video uploads.
'status_display_upload_failed' => '',
'check_for_failed' => FALSE,
'cron_time' => 10,
'cron_limit' => 50,
// If TRUE, then store the entire metadata fetched from YouTube.
'store_raw_metadata' => FALSE,
// HTML5 Iframe variables.
'iframe_title' => 'YouTube video player',
'html5_player' => TRUE,
// If TRUE, all urls will use https by default
'force_https' => FALSE,
// We accidentally destroyed all thumbnails in a bad update.
// If that's been run improperly, then this will stay FALSE, and
// we need to self-correct.
'media_youtube_update_6012' => FALSE,
);
}
if (!isset($name)) {
return $defaults;
}
if (isset($defaults[$name])) {
return $defaults[$name];
}
}