diff --git a/CHANGES.md b/CHANGES.md index f034279..20c74e2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Rolling release +* 2024-10-22 - Adopt Boost Union class name changes from Boost Union 4.5, raise the dependency to Boost Union 4.5 likewise. * 2024-10-22 - Change Moodle-Plugin-CI to run on Moodle Core 4.5 * 2024-08-11 - Updated Moodle Plugin CI to latest upstream recommendations * 2024-07-25 - Development: Rename master branch to main, please update your clones. diff --git a/lib.php b/lib.php index 513a62f..6324687 100644 --- a/lib.php +++ b/lib.php @@ -29,7 +29,7 @@ /** * Returns the main SCSS content. * - * @param theme_config $theme The theme config object. + * @param \core\output\theme_config $theme The theme config object. * @return string */ function theme_boost_union_child_get_main_scss_content($theme) { @@ -40,7 +40,7 @@ function theme_boost_union_child_get_main_scss_content($theme) { // As a start, get the compiled main SCSS from Boost Union. // This way, Boost Union Child will ship the same SCSS code as Boost Union itself. - $scss = theme_boost_union_get_main_scss_content(theme_config::load('boost_union')); + $scss = theme_boost_union_get_main_scss_content(\core\output\theme_config::load('boost_union')); // And add Boost Union Child's main SCSS file to the stack. $scss .= file_get_contents($CFG->dirroot . '/theme/boost_union_child/scss/post.scss'); @@ -51,7 +51,7 @@ function theme_boost_union_child_get_main_scss_content($theme) { /** * Get SCSS to prepend. * - * @param theme_config $theme The theme config object. + * @param \core\output\theme_config $theme The theme config object. * @return string */ function theme_boost_union_child_get_pre_scss($theme) { @@ -71,7 +71,7 @@ function theme_boost_union_child_get_pre_scss($theme) { // This way, we will add the pre SCSS code with the explicit use of the Boost Union configuration to the stack. $inheritanceconfig = get_config('theme_boost_union_child', 'prescssinheritance'); if ($inheritanceconfig == THEME_BOOST_UNION_CHILD_SETTING_INHERITANCE_DUPLICATE) { - $scss .= theme_boost_union_get_pre_scss(theme_config::load('boost_union')); + $scss .= theme_boost_union_get_pre_scss(\core\output\theme_config::load('boost_union')); } // And add Boost Union Child's pre SCSS file to the stack. @@ -89,7 +89,7 @@ function theme_boost_union_child_get_pre_scss($theme) { /** * Inject additional SCSS. * - * @param theme_config $theme The theme config object. + * @param \core\output\theme_config $theme The theme config object. * @return string */ function theme_boost_union_child_get_extra_scss($theme) { @@ -109,7 +109,7 @@ function theme_boost_union_child_get_extra_scss($theme) { // This way, we will add the extra SCSS code with the explicit use of the Boost Union configuration to the stack. $inheritanceconfig = get_config('theme_boost_union_child', 'extrascssinheritance'); if ($inheritanceconfig == THEME_BOOST_UNION_CHILD_SETTING_INHERITANCE_DUPLICATE) { - $scss .= theme_boost_union_get_extra_scss(theme_config::load('boost_union')); + $scss .= theme_boost_union_get_extra_scss(\core\output\theme_config::load('boost_union')); } /********************************************************** @@ -133,7 +133,7 @@ function theme_boost_union_child_extend_busettingsoverview() { 'label' => get_string('pluginname', 'theme_boost_union_child'), 'desc' => get_string('settingsoverview_buc_desc', 'theme_boost_union_child'), 'btn' => 'primary', - 'url' => new \moodle_url('/admin/settings.php', ['section' => 'theme_boost_union_child']), + 'url' => new \core\url('/admin/settings.php', ['section' => 'theme_boost_union_child']), ]; return $cards; diff --git a/settings.php b/settings.php index 8c46040..976f76d 100644 --- a/settings.php +++ b/settings.php @@ -36,9 +36,9 @@ // settings and which is automatically linked from the theme selector page. // To avoid that there appears a broken "Boost Union Child" settings page, we redirect the user to a settings // overview page if he opens this page. - $mainsettingspageurl = new moodle_url('/admin/settings.php', ['section' => 'themesettingboost_union_child']); + $mainsettingspageurl = new \core\url('/admin/settings.php', ['section' => 'themesettingboost_union_child']); if ($ADMIN->fulltree && $PAGE->has_set_url() && $PAGE->url->compare($mainsettingspageurl)) { - redirect(new moodle_url('/admin/settings.php', ['section' => 'theme_boost_union_child'])); + redirect(new \core\url('/admin/settings.php', ['section' => 'theme_boost_union_child'])); } // Create empty settings page structure to make the site administration work on non-admin pages. diff --git a/version.php b/version.php index 194765b..196eb80 100644 --- a/version.php +++ b/version.php @@ -27,4 +27,4 @@ $plugin->component = 'theme_boost_union_child'; $plugin->version = 2024010100; $plugin->maturity = MATURITY_STABLE; -$plugin->dependencies = ['theme_boost_union' => 2023010548]; +$plugin->dependencies = ['theme_boost_union' => 2024100700];