class-notices.php
731 Bytes
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
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class WPF_Admin_Notices {
public function __construct() {
add_action( 'admin_notices', array( $this, 'plugin_activation' ));
}
/**
* Shows a notice on first activation
*
* @access public
* @return mixed
*/
public function plugin_activation() {
if(wp_fusion()->settings->get('connection_configured') == false) {
$out = '<div class="updated">';
$out .= '<p>';
$out .= 'To finish setting up WP Fusion, please go to the <a href="' . get_admin_url() . '/options-general.php?page=wpf-settings#setup">WP Fusion settings page</a>.';
$out .= '</p>';
$out .= '</div>';
echo $out;
}
}
}
new WPF_Admin_Notices;