function social_swiftmail_get_logo in Open Social 8.5
Same name and namespace in other branches
- 8.9 modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 8 modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 8.2 modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 8.3 modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 8.4 modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 8.6 modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 8.7 modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 8.8 modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 10.3.x modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 10.0.x modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 10.1.x modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
- 10.2.x modules/social_features/social_swiftmail/social_swiftmail.module \social_swiftmail_get_logo()
Function the fetches the logo.
1 call to social_swiftmail_get_logo()
- social_swiftmail_preprocess_swiftmailer in modules/
social_features/ social_swiftmail/ social_swiftmail.module - Preprocess swift template.
File
- modules/
social_features/ social_swiftmail/ social_swiftmail.module, line 99 - Module file for Social Swiftmailer.
Code
function social_swiftmail_get_logo($theme_id) {
global $base_url;
// Default we use the logo image.
$logo = $base_url . theme_get_setting('logo.url', $theme_id);
// It could be overridden here.
$email_logo = theme_get_setting('email_logo', $theme_id);
// Must be a non-empty array.
if (is_array($email_logo) && !empty($email_logo)) {
$file = File::load($email_logo[0]);
if ($file instanceof File) {
$logo = file_create_url($file
->getFileUri());
}
}
return $logo;
}