class-wpml-compatiblity-divi-notice.php
1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
class WPML_Compatibility_Divi_Notice extends WPML_Notice {
const ID = 'wpml-compatibility-divi-editor-warning';
const GROUP = 'wpml-compatibility-divi';
public function __construct() {
parent::__construct( self::ID, $this->get_message(), self::GROUP );
$this->set_dismissible( true );
$this->set_css_class_types( 'warning' );
}
/**
* @return string
*/
private function get_message() {
$msg = esc_html_x(
'You are using DIVI theme, and you have chosen to use the standard editor for translating content.',
'Use Translation Editor notice 1/3',
'sitepress'
);
$msg .= ' ' . esc_html_x(
'Some functionalities may not work properly. We encourage you to switch to use the Translation Editor.',
'Use Translation Editor notice 2/3',
'sitepress'
);
$msg .= ' ' . sprintf(
/* translators: %s will be replaced with a URL. */
esc_html_x(
'You can find more information here: %s',
'Use Translation Editor notice 2/3',
'sitepress'
),
'<a href="https://wpml.org/errata/some-internal-taxonomies-will-be-missing-when-you-translate-divi-layouts/?utm_source=plugin&utm_medium=gui&utm_campaign=wpmlcore">Some internal taxonomies will be missing when you translate Divi layouts</a>'
);
return $msg;
}
}