Merge branch 'MDL-49891-master-2' of git://github.com/xow/moodle

This commit is contained in:
Dan Poltawski
2015-08-17 15:17:11 +01:00
2 changed files with 23 additions and 0 deletions
@@ -27,6 +27,26 @@ class theme_bootstrapbase_core_renderer extends core_renderer {
/** @var custom_menu_item language The language menu if created */
protected $language = null;
/**
* The standard tags that should be included in the <head> tag
* including a meta description for the front page
*
* @return string HTML fragment.
*/
public function standard_head_html() {
global $SITE, $PAGE;
$output = parent::standard_head_html();
if ($PAGE->pagelayout == 'frontpage') {
$summary = s(strip_tags(format_text($SITE->summary, FORMAT_HTML)));
if (!empty($summary)) {
$output .= "<meta name=\"description\" content=\"$summary\" />\n";
}
}
return $output;
}
/*
* This renders the navbar.
* Uses bootstrap compatible html.
+3
View File
@@ -6,6 +6,9 @@ information provided here is intended especially for theme designer.
* The renderer function core_availability_renderer::multiple_messages was changed to
render_core_availability_multiple_messages, requiring a parameter of the new
\core_availability\multiple_messages type.
* Meta description is now included in standard_head_html for homepage in bootstrapbase.
If your theme includes a meta description directly in a layout for the frontpage,
you will need to remove it or override the standard_head_html instead.
=== 2.9 ===