Skip to content
Snippets Groups Projects
Commit 7992ebee authored by Carina Antunes's avatar Carina Antunes
Browse files

add banner to admin pages

parent a49d943d
No related tags found
1 merge request!12Disable extra plugins
Pipeline #6959351 passed with stage
in 1 minute and 22 seconds
......@@ -62,6 +62,9 @@ if [ $wp_install_status -eq 1 ]; then
# Remove ping_sites like pingomatic (settings - writing - update services)
wp option delete ping_sites
# Enable CERN plugin
wp plugin activate cern
# Update plugins
wp plugin update --all
......@@ -85,10 +88,14 @@ elif [ $wp_install_status -eq 0 ]; then
# Verify Checksums
wp core verify-checksums
fi
# BC: Enable CERN plugin
wp plugin activate cern
# Update plugins
wp plugin update --all
# Disable extra plugins by default
# BC: Disable extra plugins by default
wp config set DISALLOW_FILE_MODS true --raw
else
echo "Wordpress installation appears to be broken or corrupted ('wp core is-installed' returned status ${wp_install_status})."
......
<?php
/*
Plugin Name: CERN
Author: CERN Infrastructure
Description: This plugin adds necessary CERN Infrastructure dependencies.
Version: 1.0
*/
/**
*Adding the Admin Notice
*/
function wpb_admin_notice_warn() {
echo '<div class="notice notice-error ">
<p><b>CERN WordPress is coming!</b></p>
<p><b>As a preventive measure and in preparation for the upcoming offering of a centrally managed WordPress Service at CERN, installing additional plugins as been disabled.</b></p>
<p>This measure allows to facilitate the future migration from WordPress in app-catalogue to the future centrally managed WordPress.
<br>Re-enabling plugin installation is heavily frowned upon and will lead to disqualifying from an assisted migration to the future WordPress offering at CERN.
<br>Websites with new plugins installed after March 1, 2024 will not be offered an assisted migration.</p>
</div>';
}
add_action( 'admin_notices', 'wpb_admin_notice_warn' );
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment