Completed
Push — master ( b16381...2ed533 )
by Michael
07:11 queued 04:55
created

bootstrap.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * Bootstrap the plugin if version check passed.
4
 *
5
 * @package   @lasso
6
 * @author    Josh Pollock <[email protected]>
7
 * @license   GPL-2.0+
8
 */
9
/*----------------------------------------------------------------------------*
10
 * Register Autoloader
11
 *----------------------------------------------------------------------------*/
12
include_once( LASSO_DIR . '/includes/lasso_autoloader.php' );
13
$loader = new lasso_autoloader();
14
15
$loader->register();
16
17
/*----------------------------------------------------------------------------*
18
 * Public-Facing Functionality
19
 *----------------------------------------------------------------------------*/
20
//require_once plugin_dir_path( __FILE__ ) . 'public/class-lasso.php';
0 ignored issues
show
Unused Code Comprehensibility introduced by
47% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
21
22
$loader->addNamespace('lasso', LASSO_DIR . 'includes' );
23
$loader->addNamespace('lasso_public_facing', LASSO_DIR . 'public/includes' );
24
$loader->addNamespace('lasso\internal_api', LASSO_DIR . 'internal-api' );
25
new lasso\internal_api\end_points();
26
27
register_activation_hook( __FILE__, array( 'lasso_public_facing\lasso', 'activate' ) );
28
register_deactivation_hook( __FILE__, array( 'lasso_public_facing\lasso', 'deactivate' ) );
29
30
add_action( 'plugins_loaded', array( 'lasso_public_facing\lasso', 'get_instance' ) );
31
32
//load tour
33
add_action(  'init', function() {
34
	if (! is_admin() && is_user_logged_in() ) {
35
		new \lasso_public_facing\tour();
36
	}
37
});
38
39
40
/*----------------------------------------------------------------------------*
41
 * Dashboard and Administrative Functionality
42
 *----------------------------------------------------------------------------*/
43
44
if ( is_admin() ) {
45
	$loader->addNamespace('lasso_admin', LASSO_DIR . 'admin/includes' );
46
	add_action( 'plugins_loaded', array( 'lasso_admin\load_admin', 'get_instance' ) );
47
48
}
49