Skip to content

Commit

Permalink
removes dpm, reorders if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Conroy committed Nov 13, 2023
1 parent 089e519 commit 011e87f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions localgov_base.theme
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ function localgov_base_preprocess_page(&$variables) {
// We have a theme setting boolean for removing the pink background from
// unpublished content. If that setting is false,
// we will add the 'unpublished' library to our page.
dpm(theme_get_setting('localgov_base_add_unpublished_background_colour'));
if (theme_get_setting('localgov_base_add_unpublished_background_colour') == TRUE) {
$variables['#attached']['library'][] = 'localgov_base/unpublished-bg';
}
Expand All @@ -110,9 +109,9 @@ function localgov_base_preprocess_block(&$variables) {
if ($route_match->getRouteName() == 'entity.node.canonical') {
$node = $route_match->getParameter('node');
$node_status = $node->isPublished();
if ($node_status === FALSE) {
if (theme_get_setting('localgov_base_add_draft_note_to_unpublished_content') == TRUE) {
if ($variables['plugin_id'] === 'localgov_page_header_block') {
if ($variables['plugin_id'] === 'localgov_page_header_block') {
if ($node_status === FALSE) {
if (theme_get_setting('localgov_base_add_draft_note_to_unpublished_content') == TRUE) {
$current_title = $variables['content'][0]['#title'];
$variables['content'][0]['#title'] = t('[Draft]') . " " . $current_title;
}
Expand Down

0 comments on commit 011e87f

Please sign in to comment.