10000 Fix coding standards. by finnlewis · Pull Request #292 · localgovdrupal/localgov_core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix coding standards. #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions localgov_core.module
7F00
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ function localgov_core_theme($existing, $type, $theme, $path) {
/**
* Implements hook_library_info_alter().
*/
function localgov_core_library_info_alter(&$libraries, $extension) {
function localgov_core_library_info_alter(&$libraries, $extension): void {

if ($extension === 'core') {
$remove_css = (bool) theme_get_setting('localgov_base_remove_css');
$remove_js = (bool) theme_get_setting('localgov_base_remove_js');

foreach($libraries as $name => $library) {
foreach ($libraries as $name => $library) {
if (str_starts_with($name, 'components.localgov_base--')) {
if ($remove_css) {
$libraries[$name]['css'] = [];
Expand All @@ -46,6 +46,8 @@ function localgov_core_library_info_alter(&$libraries, $extension) {
}
}

}

/**
* Implements hook_theme_suggestions_HOOK().
*/
Expand All @@ -68,7 +70,7 @@ function localgov_core_theme_suggestions_localgov_page_header_block(array $varia
/**
* Implements hook_template_preprocess_default_variables_alter().
*/
function localgov_core_template_preprocess_default_variables_alter(&$variables) {
function localgov_core_template_preprocess_default_variables_alter(&$variables): void {
$remove_css = (bool) theme_get_setting('localgov_base_remove_css');
$remove_js = (bool) theme_get_setting('localgov_base_remove_js');

Expand Down
0