Open KB links in Beacon popover

[MAILPOET-2179]
This commit is contained in:
Ján Mikláš
2019-08-22 16:09:38 +02:00
committed by M. Shull
parent 8c84eb6e56
commit d3d572faa9
25 changed files with 52 additions and 26 deletions

View File

@ -32,6 +32,7 @@ const SenderEmailAddressWarning = ({ emailAddress, mssActive }) => {
<p className="sender_email_address_warning">
<a
href="https://kb.mailpoet.com/article/259-your-from-address-cannot-be-yahoo-com-gmail-com-outlook-com"
data-beacon-article="5be5911104286304a71c176e"
target="_blank"
rel="noopener noreferrer"
>

View File

@ -5,7 +5,7 @@ import CronStatus from './cron_status.jsx';
import QueueStatus from './queue_status.jsx';
import Tabs from './tabs.jsx';
function renderStatusMessage(status, error, link, additionalInfo) {
function renderStatusMessage(status, error, link, linkBeacon, additionalInfo) {
const noticeType = (status) ? 'success' : 'error';
let noticeMessage = (status)
? MailPoet.I18n.t('systemStatusConnectionSuccessful')
@ -16,7 +16,7 @@ function renderStatusMessage(status, error, link, additionalInfo) {
noticeMessage,
/\[link\](.*?)\[\/link\]/g,
(match) => (
<a href={`${link}`} key="kb-link">{match}</a>
<a href={link} data-beacon-article={linkBeacon} key="kb-link">{match}</a>
)
);
}
@ -41,7 +41,7 @@ function renderCronSection(data) {
<p>
<a href={url} target="_blank" rel="noopener noreferrer">{url}</a>
</p>
{renderStatusMessage(status, error, 'https://kb.mailpoet.com/article/231-sending-does-not-work', additionalInfo)}
{renderStatusMessage(status, error, 'https://kb.mailpoet.com/article/231-sending-does-not-work', '5a0257ac2c7d3a272c0d7ad6', additionalInfo)}
</div>
);
}

View File

@ -208,6 +208,7 @@ const Statistics = ({ newsletter, isSent, currentTime }) => {
<div>
<a
href={improveStatsKBLink}
data-beacon-article="58f671152c7d3a057f8858e8"
target="_blank"
rel="noopener noreferrer"
className="mailpoet_stat_link_small"

View File

@ -60,6 +60,7 @@ export const checkCronStatus = (state) => {
(match) => (
<a
href="https://kb.mailpoet.com/article/231-sending-does-not-work"
data-beacon-article="5a0257ac2c7d3a272c0d7ad6"
target="_blank"
rel="noopener noreferrer"
key="check-cron"

View File

@ -17,6 +17,7 @@ function Fail(props) {
target="_blank"
rel="noopener noreferrer"
href="https://kb.mailpoet.com/article/231-sending-does-not-work"
data-beacon-article="5a0257ac2c7d3a272c0d7ad6"
>
{ match }
</a>

View File

@ -116,6 +116,7 @@ class NewsletterTypes extends React.Component {
title: MailPoet.I18n.t('welcomeNewsletterTypeTitle'),
description: MailPoet.I18n.t('welcomeNewsletterTypeDescription'),
videoGuide: 'https://kb.mailpoet.com/article/254-video-guide-to-welcome-emails',
videoGuideBeacon: '5b05ebf20428635ba8b2aa53',
action: (function action() {
return (
<a
@ -142,6 +143,7 @@ class NewsletterTypes extends React.Component {
title: MailPoet.I18n.t('postNotificationNewsletterTypeTitle'),
description: MailPoet.I18n.t('postNotificationNewsletterTypeDescription'),
videoGuide: 'https://kb.mailpoet.com/article/210-video-guide-to-post-notifications',
videoGuideBeacon: '59ba6fb3042863033a1cd5a5',
action: (function action() {
return (
<a
@ -189,7 +191,7 @@ class NewsletterTypes extends React.Component {
</h3>
<p>{type.description}</p>
{ type.videoGuide && (
<a className={badgeClassName} href={type.videoGuide} target="_blank" rel="noopener noreferrer">
<a className={badgeClassName} href={type.videoGuide} data-beacon-article={type.videoGuideBeacon} target="_blank" rel="noopener noreferrer">
<span className="dashicons dashicons-format-video" />
{MailPoet.I18n.t('seeVideoGuide')}
</a>

View File

@ -49,6 +49,7 @@ const Warnings = ({
return (
<a
href="https://kb.mailpoet.com/article/270-role-based-email-addresses-are-not-allowed"
data-beacon-article="5d0a1da404286318cac46fe5"
target="_blank"
rel="noopener noreferrer"
key={match}

View File

@ -30,6 +30,7 @@ const MethodPaste = ({
(match) => (
<a
href={`${kbLink}`}
data-beacon-article="57ce079f903360649f6e56fc"
key="kb-link"
target="_blank"
rel="noopener noreferrer"

View File

@ -31,6 +31,7 @@ const MethodUpload = ({ onValueChange, canFinish, onFinish }) => {
(match) => (
<a
href={`${kbLink}`}
data-beacon-article="57ce079f903360649f6e56fc"
key="kb-link"
target="_blank"
rel="noopener noreferrer"

View File

@ -55,6 +55,7 @@ function SelectImportMethod({
<a
className={badgeClasses}
href="https://kb.mailpoet.com/article/242-video-guide-importing-subscribers-using-a-csv-file"
data-beacon-article="5a8e8f0204286305fbc9be9a"
target="_blank"
rel="noopener noreferrer"
>

View File

@ -16,6 +16,7 @@ const WelcomeWizardUsageTrackingStep = (props) => (
</ul>
<a
href=" https://kb.mailpoet.com/article/130-sharing-your-data-with-us"
data-beacon-article="57ce0aaac6979108399a0454"
target="_blank"
rel="noopener noreferrer"
>

View File

@ -115,7 +115,10 @@ class Initializer {
return WPNotice::displayError(Helpers::replaceLinkTags(
WPFunctions::get()->__('Unable to connect to the database (the database is unable to open a file or folder), the connection is likely not configured correctly. Please read our [link] Knowledge Base article [/link] for steps how to resolve it.', 'mailpoet'),
'https://kb.mailpoet.com/article/200-solving-database-connection-issues',
['target' => '_blank']
[
'target' => '_blank',
'data-beacon-article' => '596de7db2c7d3a73488b2f8d',
]
));
}

View File

@ -35,7 +35,10 @@ class AfterMigrationNotice {
$message = Helpers::replaceLinkTags(
WPFunctions::get()->__('Congrats! Youre progressing well so far. Complete your upgrade thanks to this [link]checklist[/link].', 'mailpoet'),
'https://kb.mailpoet.com/article/199-checklist-after-migrating-to-mailpoet3',
['target' => '_blank']
[
'target' => '_blank',
'data-beacon-article' => '596352492c7d3a707d7b8994',
]
);
$extra_classes = 'mailpoet-dismissible-notice is-dismissible';

View File

@ -50,7 +50,10 @@ class InactiveSubscribersNotice {
$go_to_settings_string = __('Go to the Advanced Settings', 'mailpoet');
$notice = str_replace('[number]', $this->wp->numberFormatI18n($inactive_subscribers_count), $error_string);
$notice = Helpers::replaceLinkTags($notice, 'https://kb.mailpoet.com/article/264-inactive-subscribers', ['target' => '_blank']);
$notice = Helpers::replaceLinkTags($notice, 'https://kb.mailpoet.com/article/264-inactive-subscribers', [
'target' => '_blank',
'data-beacon-article' => '5cbf19622c7d3a026fd3efe1',
]);
$notice = "<p>$notice</p>";
$notice .= '<p><a href="admin.php?page=mailpoet-settings#advanced" class="button button-primary">' . $go_to_settings_string . '</a></p>';

View File

@ -29,6 +29,7 @@ class PHPVersionWarnings {
$error .= '<br><br>' . Helpers::replaceLinkTags($get_in_touch_string, 'https://www.mailpoet.com/let-us-handle-your-php-upgrade/', [
'target' => '_blank',
'class' => 'button',
'data-beacon-article' => '5ad5f8982c7d3a0e93676666',
]);
$extra_classes = 'mailpoet-dismissible-notice is-dismissible';

View File

@ -135,13 +135,13 @@
<!-- Form export links -->
<p>
<%= __('Add this form to your sidebar or footer on the [link]Widgets page[/link].')
|replaceLinkTags('widgets.php', {'target' : '_blank'})
|replaceLinkTags('widgets.php', {'target': '_blank'})
|raw
%>
</p>
<p>
<%= __('Copy and paste this [link]shortcode[/link] on to a post or page.')
|replaceLinkTags('javascript:;', {'class' : 'mailpoet_form_export_toggle', 'data-type' : 'shortcode'})
|replaceLinkTags('javascript:;', {'class': 'mailpoet_form_export_toggle', 'data-type': 'shortcode'})
|raw
%>
</p>
@ -197,7 +197,7 @@
<p class="help">
<%= __('<strong>Tip:</strong> read our [link]GDPR guide[/link] to make sure your form follows the privacy directive of the European Union.')
|replaceLinkTags('https://kb.mailpoet.com/article/246-guide-to-conform-to-gdpr?utm_source=plugin&utm_medium=formeditor&utm_campaign=helpdocs', {'target' : '_blank', id: 'mailpoet_helper_link'})
|replaceLinkTags('https://kb.mailpoet.com/article/246-guide-to-conform-to-gdpr?utm_source=plugin&utm_medium=formeditor&utm_campaign=helpdocs', {'target': '_blank', id: 'mailpoet_helper_link', 'data-beacon-article': '5a9e8cdd04286374f7089a8c'})
|raw
%>
</p>

View File

@ -6,14 +6,14 @@
<div>
<p class="mailpoet_sending_methods_help help">
<%= __('<strong>Tip:</strong> we have a [link]list of plugins[/link] that work with MailPoet if you need fancier forms.')
|replaceLinkTags('https://kb.mailpoet.com/article/198-list-of-forms-plugins-that-work-with-mailpoet?utm_source=plugin&utm_medium=settings&utm_campaign=helpdocs', {'target' : '_blank', id: 'mailpoet_helper_link'})
|replaceLinkTags('https://kb.mailpoet.com/article/198-list-of-forms-plugins-that-work-with-mailpoet?utm_source=plugin&utm_medium=settings&utm_campaign=helpdocs', {'target': '_blank', id: 'mailpoet_helper_link', 'data-beacon-article': '5953a9720428637ff8d42272'})
|raw
%>
</p>
</div>
<% set badgeClassName = (is_new_user == true) ? 'mailpoet_badge mailpoet_badge_video' : 'mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey' %>
<a class="<%= badgeClassName %>" href="https://kb.mailpoet.com/article/236-video-guide-setting-up-forms" target="_blank">
<a class="<%= badgeClassName %>" href="https://kb.mailpoet.com/article/236-video-guide-setting-up-forms" data-beacon-article="5a3d4cfc0428631938003806" target="_blank">
<span class="dashicons dashicons-format-video"></span><%= __('See video guide') %>
</a>

View File

@ -369,7 +369,7 @@
<% block translations %>
<% set helpTooltipSendPreview = __("Didn't receive the test email? Read our [link]quick guide[/link] to sending issues. <br><br>A MailPoet logo will appear in the footer of all emails sent with the free version of MailPoet.")
|replaceLinkTags('https://kb.mailpoet.com/article/146-my-newsletters-are-not-being-received', {'target' : '_blank'})
|replaceLinkTags('https://kb.mailpoet.com/article/146-my-newsletters-are-not-being-received', {'target' : '_blank', 'data-beacon-article': '580846f09033604df5166ed1'})
|escape('js') %>
<%= localize({
'failedToFetchAvailablePosts': __('Failed to fetch available posts'),

View File

@ -40,7 +40,7 @@
</label>
</div>
</div>
<p class="mailpoet_settings_notice"><%= _x('A [link]few email clients[/link] do not show background images. Make sure you have a good background color to fall back on if the image is not displayed.', 'Editor > right sidebar for column block settings.')|replaceLinkTags('https://kb.mailpoet.com/article/261-add-a-background-image-to-your-newsletter', {'target' : '_blank'})|raw %></p>
<p class="mailpoet_settings_notice"><%= _x('A [link]few email clients[/link] do not show background images. Make sure you have a good background color to fall back on if the image is not displayed.', 'Editor > right sidebar for column block settings.')|replaceLinkTags('https://kb.mailpoet.com/article/261-add-a-background-image-to-your-newsletter', {'target': '_blank', 'data-beacon-article': '5bf5863104286304a71c7e1a'})|raw %></p>
<div class="mailpoet_form_field">
<input type="button" class="button button-primary mailpoet_done_editing" value="<%= __('Done') | escape('html_attr') %>" />
</div>

View File

@ -94,6 +94,7 @@
<div style="text-align: center">
<a
href="https://kb.mailpoet.com/article/181-comparison-table-of-sending-methods?utm_source=plugin&utm_medium=premium&utm_campaign=compare"
data-beacon-article="58a7182a2c7d3a576d3548c5"
target="_blank"
>
<%= __("View full comparison table") %>
@ -104,7 +105,7 @@
</tbody>
</table>
<p><%= __("Spammers are ineligible to use the MailPoet Sending Service. We reserve the right to cancel any sending plan if we detect more than 5% hard bounces. [link]Customers are required to clean their lists before joining MailPoet[/link].")
|replaceLinkTags('https://kb.mailpoet.com/article/127-checklist-before-importing-subscribers?utm_source=plugin&utm_medium=premium&utm_campaign=clean-lists', {'target' : '_blank'})
|replaceLinkTags('https://kb.mailpoet.com/article/127-checklist-before-importing-subscribers?utm_source=plugin&utm_medium=premium&utm_campaign=clean-lists', {'target': '_blank', 'data-beacon-article': '57ce07ffc6979108399a044b'})
|raw
%></p>
</div>
@ -139,11 +140,11 @@
<br>
<div style="width: 65%; margin: 0 auto;">
<p style="text-align: center"><%= __("Already a Premium customer? [link]Add your Key in the Settings page[/link].")
|replaceLinkTags(admin_url('admin.php?page=mailpoet-settings#premium'), {'target' : '_blank'})
|replaceLinkTags(admin_url('admin.php?page=mailpoet-settings#premium'), {'target': '_blank'})
|raw
%></p>
<p style="text-align: center"><%= __("Dont need to use our sending service? Not a problem; we understand. You can also [link]buy the Premium[/link] features separately. Prices start at $149 per year for 1 website, $249 for 4 sites and $499 for an unlimited number of sites.")
|replaceLinkTags(add_referral_id('https://account.mailpoet.com/premium?utm_source=plugin&utm_medium=premium&utm_campaign=buy-premium'), {'target' : '_blank'})
|replaceLinkTags(add_referral_id('https://account.mailpoet.com/premium?utm_source=plugin&utm_medium=premium&utm_campaign=buy-premium'), {'target': '_blank'})
|raw
%></p>
</div>

View File

@ -9,7 +9,8 @@
<p class="description">
<%= __('Your bounced emails will be sent to this address.') %>
<a href="https://kb.mailpoet.com/article/180-how-bounce-management-works-in-mailpoet-3"
target="_blank"
data-beacon-article="58a5a7502c7d3a576d353c78"
target="_blank"
><%= _x('Read more.', 'support article link label') %></a>
</p>
</th>
@ -168,7 +169,8 @@
<p class="description">
<%= __("Gmail, Yahoo and other email providers will treat your emails like spam if your subscribers don't open your emails in the long run. This option will mark your subscribers as Inactive and MailPoet will stop sending to them.") %>
<a href="https://kb.mailpoet.com/article/264-inactive-subscribers"
target="_blank"
data-beacon-article="5cbf19622c7d3a026fd3efe1"
target="_blank"
><%= _x('Read more.', 'support article link label') %></a>
</p>
</th>
@ -236,6 +238,7 @@
<%= __('Share anonymous data and help us improve the plugin. We appreciate your help!') %>
<a
href="https://kb.mailpoet.com/article/130-sharing-your-data-with-us"
data-beacon-article="57ce0aaac6979108399a0454"
target="_blank"
><%= _x('Read more.', 'support article link label') %></a>
</p>

View File

@ -448,6 +448,7 @@
<p>
<a
href="https://kb.mailpoet.com/article/246-guide-to-conform-to-gdpr"
data-beacon-article="5a9e8cdd04286374f7089a8c"
title="<%= __('Read our guide') %>"
target="_blank"
><%= __('Read our guide') %></a>

View File

@ -82,10 +82,10 @@
</ul>
<p class="mailpoet_sending_methods_help">
<% set badgeClassName = (is_new_user == true) ? 'mailpoet_badge mailpoet_badge_video' : 'mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey' %>
<% set badgeClassName = (is_new_user == true) ? 'mailpoet_badge mailpoet_badge_video': 'mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey' %>
<%= __('[link]%s See video guide[/link]')
|format('<span class="dashicons dashicons-format-video"></span>')
|replaceLinkTags('https://kb.mailpoet.com/article/235-video-guide-sending-options', {'class' : badgeClassName, 'target' : '_blank'}, 'link')
|replaceLinkTags('https://kb.mailpoet.com/article/235-video-guide-sending-options', {'class': badgeClassName, 'target': '_blank', 'data-beacon-article': '5a3d4c260428631938003802'}, 'link')
|raw
%>
</p>
@ -124,7 +124,7 @@
<li class="mailpoet_error_item"><%= __("Manual configuration of SPF and DKIM required.") %></li>
<li class="mailpoet_error_item"><%=
__("Bounce handling is available, but only with an extra [link]add-on[/link].")
|replaceLinkTags('https://wordpress.org/plugins/bounce-handler-mailpoet/', {'target' : '_blank'})
|replaceLinkTags('https://wordpress.org/plugins/bounce-handler-mailpoet/', {'target': '_blank'})
|raw
%>
</li>
@ -663,7 +663,7 @@
<script type="text/javascript">
jQuery(function($) {
var tooltip = '<%= __("Didn't receive the test email? Read our [link]quick guide[/link] to sending issues.")
|replaceLinkTags('https://kb.mailpoet.com/article/146-my-newsletters-are-not-being-received', {'target' : '_blank'})
|replaceLinkTags('https://kb.mailpoet.com/article/146-my-newsletters-are-not-being-received', {'target': '_blank', 'data-beacon-article': '580846f09033604df5166ed1'})
|escape('js') %>'
MailPoet.helpTooltip.show(document.getElementById("tooltip-test"), {

View File

@ -57,7 +57,7 @@
</a>
<span>
<%= __('[link]Read guide[/link] on how to install Premium.')
|replaceLinkTags('https://kb.mailpoet.com/article/194-instructions-to-install-the-premium-plugin', {'target' : '_blank'})
|replaceLinkTags('https://kb.mailpoet.com/article/194-instructions-to-install-the-premium-plugin', {'target': '_blank', 'data-beacon-article': '59020a2d2c7d3a057f889e8f'})
|raw
%>
</span>

View File

@ -39,7 +39,7 @@
<%= __('List of fields to export') %>
<p class="description">
<%= __('[link]Read about the Global status.[/link]')
|replaceLinkTags('https://kb.mailpoet.com/article/245-what-is-global-status', {'target' : '_blank'})
|replaceLinkTags('https://kb.mailpoet.com/article/245-what-is-global-status', {'target': '_blank', 'data-beacon-article': '5a9548782c7d3a75495122f9'})
|raw
%>
</p>
@ -108,6 +108,6 @@
<% block translations %>
<%= localize({
'serverError': __('Server error:'),
'exportMessage' : __('%1$s subscribers were exported. Get the exported file [link]here[/link].')
'exportMessage': __('%1$s subscribers were exported. Get the exported file [link]here[/link].')
}) %>
<% endblock %>