diff --git a/public/app/themes/clarity/functions.php b/public/app/themes/clarity/functions.php index f5e2bed2a..09d607081 100644 --- a/public/app/themes/clarity/functions.php +++ b/public/app/themes/clarity/functions.php @@ -125,10 +125,3 @@ $search = new MOJ\Intranet\Search(); $search->hooks(); -/// Prevent the Agency Switcher page from being overwritten -add_action('save_post', function ($post_id, $post) { - if ($post->post_name === 'agency-switcher') { - update_post_meta($post_id, '_wp_page_template', 'agency-switcher.php'); - } -}, 99, 2); - diff --git a/public/app/themes/clarity/inc/admin/page.php b/public/app/themes/clarity/inc/admin/page.php index e71d4f9e7..283fbbdb5 100644 --- a/public/app/themes/clarity/inc/admin/page.php +++ b/public/app/themes/clarity/inc/admin/page.php @@ -7,3 +7,10 @@ function add_page_excerpts() { add_post_type_support('page', 'excerpt'); } + +// Prevent the Agency Switcher page from being overwritten +add_action('save_post', function ($post_id, $post) { + if ($post->post_name === 'agency-switcher') { + update_post_meta($post_id, '_wp_page_template', 'agency-switcher.php'); + } +}, 99, 2); diff --git a/public/app/themes/clarity/inc/admin/users/add-agency-admin.php b/public/app/themes/clarity/inc/admin/users/add-agency-admin.php index fcbc1fcdd..7812df0bd 100644 --- a/public/app/themes/clarity/inc/admin/users/add-agency-admin.php +++ b/public/app/themes/clarity/inc/admin/users/add-agency-admin.php @@ -42,6 +42,7 @@ 'delete_resource_categories' => true, 'opt_in_content' => true, 'unfiltered_html' => true, + 'manage_prior_party_banners' => true, // files 'export' => true, diff --git a/public/app/themes/clarity/inc/comments.php b/public/app/themes/clarity/inc/comments.php index 666e10499..08696fee2 100644 --- a/public/app/themes/clarity/inc/comments.php +++ b/public/app/themes/clarity/inc/comments.php @@ -62,7 +62,14 @@ function is_valid_email_domain($login, $email, $errors) function format_comment($comment, $args, $depth) { $post_type = get_post_type(); - $GLOBALS['comment'] = $comment; ?> + $GLOBALS['comment'] = $comment; + $options = get_option('maintenance_options', [ + 'maintenance_mode_status' => 0, + 'maintenance_mode_message' => '', + ]); + $maintenance_mode = $options['maintenance_mode_status'] ?? false; + ?> +
= $event_title ?? '' ?>
- += $event_title ?? '' ?>
+ +