Completed
Push — master ( 353fd1...eae0f6 )
by Benjamin
14:14
created

activate_wp_site_monitor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * Plugin Name:  WP Site Monitor
4
 * Plugin URI:   https://github.com/BWibrew/WP-Site-Monitor/
5
 * Description:  Provides extra WP REST API endpoints to help manage sites remotely.
6
 * Version:      0.1.0
7
 * Author:       Benjamin Wibrew
8
 * Author URI:   https://github.com/BWibrew/
9
 * License:      MIT License
10
 * License URI:  http://opensource.org/licenses/MIT
11
 * Text Domain:  wp-site-monitor
12
 * Domain Path:  /languages
13
 *
14
 * @wordpress-plugin
15
 * @package WPSiteMonitor\Bootstrap
16
 * @link https://github.com/BWibrew/WP-Site-Monitor/
17
 * @since 1.0.0
18
 */
19
20
// If this file is called directly, abort.
21
if ( ! defined( 'WPINC' ) ) {
22
	die;
23
}
24
25
if ( ! defined( 'WPSM_FILE' ) ) {
26
	define( 'WPSM_FILE', __FILE__ );
27
}
28
29
if ( ! defined( 'WPSM_PATH' ) ) {
30
	define( 'WPSM_PATH', plugin_dir_path( WPSM_FILE ) );
31
}
32
33
define( 'WP_SITE_MONITOR_VERSION', '0.1.0' );
34
35
require_once WPSM_PATH . 'src/class-wp-site-monitor.php';
36
37
register_activation_hook( WPSM_FILE, array( '\WPSiteMonitor\WP_Site_Monitor', 'activate' ) );
0 ignored issues
show
Bug introduced by
The function register_activation_hook was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

37
/** @scrutinizer ignore-call */ 
38
register_activation_hook( WPSM_FILE, array( '\WPSiteMonitor\WP_Site_Monitor', 'activate' ) );
Loading history...
38
register_deactivation_hook( WPSM_FILE, array( '\WPSiteMonitor\WP_Site_Monitor', 'deactivate' ) );
0 ignored issues
show
Bug introduced by
The function register_deactivation_hook was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

38
/** @scrutinizer ignore-call */ 
39
register_deactivation_hook( WPSM_FILE, array( '\WPSiteMonitor\WP_Site_Monitor', 'deactivate' ) );
Loading history...
39
register_uninstall_hook( WPSM_FILE, array( '\WPSiteMonitor\WP_Site_Monitor', 'uninstall' ) );
0 ignored issues
show
Bug introduced by
The function register_uninstall_hook was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

39
/** @scrutinizer ignore-call */ 
40
register_uninstall_hook( WPSM_FILE, array( '\WPSiteMonitor\WP_Site_Monitor', 'uninstall' ) );
Loading history...
40
41
\WPSiteMonitor\WP_Site_Monitor::init();
42