class-wpml-whip-requirements.php
1.27 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* WPML_Whip_Requirements class file.
*
* @package wpml-core
*/
/**
* Class WPML_Whip_Requirements
*/
class WPML_Whip_Requirements {
/**
* Add hooks.
*/
public function add_hooks() {
add_action( 'plugins_loaded', array( $this, 'load_whip' ) );
}
/**
* Get host name for message about PHP.
*
* @return string
*/
public function whip_name_of_host() {
return 'WPML';
}
/**
* Get WPML message about PHP.
*
* @return string
*/
public function whip_message_from_host_about_php() {
$message =
'<li>' .
__( 'This will be the last version of WPML which works with the currently installed PHP version', 'sitepress' ) .
'</li>' .
'<li>' .
__( 'This version of WPML will only receive security fixes for the next 12 months', 'sitepress' ) .
'</li>';
return $message;
}
/**
* Load Whip.
*/
public function load_whip() {
if ( ! ( 'index.php' === $GLOBALS['pagenow'] && current_user_can( 'manage_options' ) ) ) {
return;
}
add_filter( 'whip_hosting_page_url_wordpress', '__return_true' );
add_filter( 'whip_name_of_host', array( $this, 'whip_name_of_host' ) );
add_filter( 'whip_message_from_host_about_php', array( $this, 'whip_message_from_host_about_php' ) );
whip_wp_check_versions( array( 'php' => '>=5.6' ) );
}
}