Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-42043-24' of git://github.com/FMCorz/moodle into MO…

…ODLE_24_STABLE
  • Loading branch information...
commit 42d72f3297d4370e440380e713795e44456e4bad 2 parents 65930a0 + 2f5768b
@marinaglancy marinaglancy authored
View
11 theme/afterburner/lib.php
@@ -8,7 +8,7 @@ function afterburner_process_css($css, $theme) {
} else {
$logo = null;
}
- $css = afterburner_set_logo($css, $logo);
+ $css = afterburner_set_logo($css, $logo, $theme);
// Set custom CSS
if (!empty($theme->settings->customcss)) {
@@ -21,12 +21,15 @@ function afterburner_process_css($css, $theme) {
return $css;
}
-function afterburner_set_logo($css, $logo) {
+function afterburner_set_logo($css, $logo, $theme = null) {
global $OUTPUT;
+ if ($theme === null) {
+ $theme = $OUTPUT;
+ }
$tag = '[[setting:logo]]';
$replacement = $logo;
if (is_null($replacement)) {
- $replacement = $OUTPUT->pix_url('images/logo','theme');
+ $replacement = $theme->pix_url('images/logo','theme');
}
$css = str_replace($tag, $replacement, $css);
@@ -44,4 +47,4 @@ function afterburner_set_customcss($css, $customcss) {
$css = str_replace($tag, $replacement, $css);
return $css;
-}
+}
View
9 theme/brick/lib.php
@@ -49,12 +49,15 @@ function brick_set_headingcolor($css, $headingcolor) {
return $css;
}
-function brick_set_logo($css, $logo) {
+function brick_set_logo($css, $logo, $theme = null) {
global $OUTPUT;
+ if ($theme === null) {
+ $theme = $OUTPUT;
+ }
$tag = '[[setting:logo]]';
$replacement = $logo;
if (is_null($replacement)) {
- $replacement = $OUTPUT->pix_url('logo', 'theme');
+ $replacement = $theme->pix_url('logo', 'theme');
}
$css = str_replace($tag, $replacement, $css);
return $css;
@@ -112,7 +115,7 @@ function brick_process_css($css, $theme) {
} else {
$logo = null;
}
- $css = brick_set_logo($css, $logo);
+ $css = brick_set_logo($css, $logo, $theme);
View
20 theme/magazine/lib.php
@@ -71,7 +71,7 @@ function magazine_process_css($css, $theme) {
} else {
$background = null;
}
- $css = magazine_set_background($css, $background);
+ $css = magazine_set_background($css, $background, $theme);
// Set the logo image
if (!empty($theme->settings->logo)) {
@@ -79,7 +79,7 @@ function magazine_process_css($css, $theme) {
} else {
$logo = null;
}
- $css = magazine_set_logo($css, $logo);
+ $css = magazine_set_logo($css, $logo, $theme);
// Return the CSS
@@ -162,23 +162,29 @@ function magazine_set_forumback($css, $forumback) {
return $css;
}
-function magazine_set_background($css, $background) {
- global $OUTPUT;
+function magazine_set_background($css, $background, $theme = null) {
+ global $OUTPUT;
+ if ($theme === null) {
+ $theme = $OUTPUT;
+ }
$tag = '[[setting:background]]';
$replacement = $background;
if (is_null($replacement)) {
- $replacement = $OUTPUT->pix_url('bg4', 'theme');
+ $replacement = $theme->pix_url('bg4', 'theme');
}
$css = str_replace($tag, $replacement, $css);
return $css;
}
-function magazine_set_logo($css, $logo) {
+function magazine_set_logo($css, $logo, $theme = null) {
global $OUTPUT;
+ if ($theme === null) {
+ $theme = $OUTPUT;
+ }
$tag = '[[setting:logo]]';
$replacement = $logo;
if (is_null($replacement)) {
- $replacement = $OUTPUT->pix_url('logo', 'theme');
+ $replacement = $theme->pix_url('logo', 'theme');
}
$css = str_replace($tag, $replacement, $css);
return $css;
Please sign in to comment.
Something went wrong with that request. Please try again.