First draft
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
|
||||
/*
|
||||
* Plugin Name: 1984 Hosting Support
|
||||
* Version: 1.0.1
|
||||
* Author: 1984 ehf
|
||||
* Version: 1.1.0
|
||||
* Author: 1984 ehf.
|
||||
* Author URI: https://1984.hosting
|
||||
* Description: Support plugin for 1984 Hosting customers.
|
||||
* Update URI: https://git.1984.is/1984/1984-hosting-support/
|
||||
* Text Domain: hostingsupport1984
|
||||
* Domain Path: /languages
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -97,7 +99,7 @@ class HostingSupport1984
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
public function load_textdomain()
|
||||
public function load_textdomain(): bool
|
||||
{
|
||||
return load_plugin_textdomain(
|
||||
'hostingsupport1984',
|
||||
@@ -191,25 +193,34 @@ class HostingSupport1984
|
||||
return $links;
|
||||
}
|
||||
|
||||
$warning_text = '1984: Please do not deactivate or delete this plugin - part of your WordPress Service Pack.';
|
||||
$warning_text =
|
||||
__('1984 Hosting: Please do not deactivate or delete this plugin - part of your WordPress Service Pack.', 'hostingsupport1984');
|
||||
|
||||
$logo_1984_url = plugins_url('icons/1984-hosting-logo.webp', __FILE__);
|
||||
$logo_patchstack = plugins_url('icons/patchstack-logo.svg', __FILE__);
|
||||
|
||||
$warning_icon =
|
||||
'<span class="dashicons dashicons-warning" aria-hidden="true" style="color:#b32d2e;vertical-align:text-bottom;margin-right:6px;"></span>';
|
||||
$title_1984 = __('Visit 1984 Hosting Homepage', 'hostingsupport1984');
|
||||
$title_patchstack = __('Visit Patchstack Homepage', 'hostingsupport1984');
|
||||
|
||||
$links[] =
|
||||
'<span class="description" style="color:#b32d2e;font-weight:700;display:inline-flex;align-items:center;line-height:1;">' . $warning_icon . esc_html($warning_text) . '</span>' .
|
||||
'<span class="description" style="margin-left:6px;display:inline-flex;align-items:center;gap:4px;">'
|
||||
$container_open =
|
||||
'<span class="description" style="color:#b32d2e;font-weight:700;display:inline-grid;grid-template-columns:auto 1fr;column-gap:6px;row-gap:4px;align-items:center;line-height:1.5;vertical-align:middle;">';
|
||||
|
||||
$warning_icon =
|
||||
'<span class="dashicons dashicons-warning" aria-hidden="true" style="color:#b32d2e;grid-column:1;"></span>';
|
||||
|
||||
$text_html = '<span style="grid-column:2;">' . esc_html($warning_text) . '</span>';
|
||||
|
||||
|
||||
$logos_html =
|
||||
'<span style="grid-column:2;display:inline-flex;align-items:center;gap:4px;">'
|
||||
.
|
||||
'<a href="https://1984.hosting" target="_blank" rel="noopener noreferrer" title="1984 Hosting" aria-label="1984 Hosting (opens in a new tab)">'
|
||||
'<a href="https://1984.hosting" target="_blank" rel="noopener noreferrer" title="' . esc_attr($title_1984) . '" aria-label="' . esc_attr($title_1984) . '">'
|
||||
.
|
||||
'<img src="' . esc_url($logo_1984_url) . '" alt="1984 Hosting" style="height:16px;width:auto;display:inline-block;" />'
|
||||
.
|
||||
'</a>'
|
||||
.
|
||||
'<a href="https://patchstack.com" target="_blank" rel="noopener noreferrer" title="Patchstack" aria-label="Patchstack (opens in a new tab)">'
|
||||
'<a href="https://patchstack.com" target="_blank" rel="noopener noreferrer" title="' . esc_attr($title_patchstack) . '" aria-label="' . esc_attr($title_patchstack) . '">'
|
||||
.
|
||||
'<img src="' . esc_url($logo_patchstack) . '" alt="Patchstack" style="height:16px;width:auto;display:inline-block;" />'
|
||||
.
|
||||
@@ -217,6 +228,8 @@ class HostingSupport1984
|
||||
.
|
||||
'</span>';
|
||||
|
||||
$links[] = $container_open . $warning_icon . $text_html . $logos_html . '</span>';
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user