6 Commits

4 changed files with 21 additions and 18 deletions

View File

@@ -2,7 +2,7 @@
/* /*
* Plugin Name: 1984 Hosting Support * Plugin Name: 1984 Hosting Support
* Version: 1.1.0 * Version: 1.2.0
* Author: 1984 ehf. * Author: 1984 ehf.
* Author URI: https://1984.hosting * Author URI: https://1984.hosting
* Description: Support plugin for 1984 Hosting customers. * Description: Support plugin for 1984 Hosting customers.
@@ -23,7 +23,7 @@
*/ */
class HostingSupport1984 { class HostingSupport1984 {
const HOSTING_SUPPORT_VERSION = '0.4.0'; const HOSTING_SUPPORT_VERSION = '1.2.0';
/** /**
* Construct a new HostingSupport1984 object * Construct a new HostingSupport1984 object
@@ -195,7 +195,7 @@ class HostingSupport1984 {
} }
$warning_text = $warning_text =
__( '1984 Hosting: Please do not deactivate or delete this plugin - part of your WordPress Service Pack.', 'hostingsupport1984' ); __( '1984 Hosting: Please do not deactivate or delete this plugin - part of your WordPress Security Pack.', 'hostingsupport1984' );
$logo_1984_url = plugins_url( 'icons/1984-hosting-logo.webp', __FILE__ ); $logo_1984_url = plugins_url( 'icons/1984-hosting-logo.webp', __FILE__ );
$logo_patchstack = plugins_url( 'icons/patchstack-logo.svg', __FILE__ ); $logo_patchstack = plugins_url( 'icons/patchstack-logo.svg', __FILE__ );
@@ -272,18 +272,21 @@ class HostingSupport1984 {
* *
* @return string[] * @return string[]
*/ */
private function get_protected_plugins(): array { private function get_protected_plugins(): array {
// Always protect this plugin from deactivation/deletion. if ( ! $this->is_patchstack_active() ) {
$own = plugin_basename( __FILE__ ); return array();
$protected = array( $own );
// Additionally protect Patchstack - but only while it is active.
if ( $this->is_patchstack_active() ) {
$protected[] = 'patchstack/patchstack.php';
} }
return $protected; // Protect this plugin.
} $own = plugin_basename( __FILE__ );
$protected = array( $own );
// Also protect Patchstack.
$protected[] = 'patchstack/patchstack.php';
return $protected;
}
/** /**
* Intercept admin actions attempting to deactivate or delete protected plugins and block them. * Intercept admin actions attempting to deactivate or delete protected plugins and block them.

View File

@@ -2,7 +2,7 @@
# This file is distributed under the same license as the 1984 Hosting Support plugin. # This file is distributed under the same license as the 1984 Hosting Support plugin.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 1984 Hosting Support 1.1.0\n" "Project-Id-Version: 1984 Hosting Support 1.2.0\n"
"Report-Msgid-Bugs-To: https://git.1984.is/1984/1984-hosting-support" "Report-Msgid-Bugs-To: https://git.1984.is/1984/1984-hosting-support"
"support\n" "support\n"
"POT-Creation-Date: 2025-12-02T11:33:54+00:00\n" "POT-Creation-Date: 2025-12-02T11:33:54+00:00\n"
@@ -39,10 +39,10 @@ msgstr ""
#: 1984-hosting-support.php:197 #: 1984-hosting-support.php:197
msgid "" msgid ""
"1984 Hosting: Please do not deactivate or delete this plugin - part of your " "1984 Hosting: Please do not deactivate or delete this plugin - part of your "
"WordPress Service Pack." "WordPress Security Pack."
msgstr "" msgstr ""
"1984 Hosting: Vinsamlegast ekki slökkva á eða eyða þessari viðbót - hún er " "1984 Hosting: Vinsamlegast ekki slökkva á eða eyða þessari viðbót - hún er "
"hluti af WordPress þjónustupakkanum þínum." "hluti af WordPress öryggispakkanum þínum."
#: 1984-hosting-support.php:202 #: 1984-hosting-support.php:202
msgid "Visit 1984 Hosting Homepage" msgid "Visit 1984 Hosting Homepage"

View File

@@ -2,7 +2,7 @@
# This file is distributed under the same license as the 1984 Hosting Support plugin. # This file is distributed under the same license as the 1984 Hosting Support plugin.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 1984 Hosting Support 1.1.0\n" "Project-Id-Version: 1984 Hosting Support 1.2.0\n"
"Report-Msgid-Bugs-To: https://git.1984.is/1984/1984-hosting-support\n" "Report-Msgid-Bugs-To: https://git.1984.is/1984/1984-hosting-support\n"
"Last-Translator: Sævar Bergur Sigurgeirsson <saevar@1984.is>\n" "Last-Translator: Sævar Bergur Sigurgeirsson <saevar@1984.is>\n"
"Language-Team: none\n" "Language-Team: none\n"
@@ -36,7 +36,7 @@ msgid "https://1984.hosting"
msgstr "" msgstr ""
#: 1984-hosting-support.php:197 #: 1984-hosting-support.php:197
msgid "1984 Hosting: Please do not deactivate or delete this plugin - part of your WordPress Service Pack." msgid "1984 Hosting: Please do not deactivate or delete this plugin - part of your WordPress Security Pack."
msgstr "" msgstr ""
#: 1984-hosting-support.php:202 #: 1984-hosting-support.php:202