Passed
Push — master ( a72540...ae7108 )
by Joseph
30:49 queued 11:38
created

Enqueue   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register_js() 0 15 1
1
<?php
2
/**
3
 * This file is part of the Subway WordPress Plugin Package.
4
 *
5
 * (c) Joseph Gabito <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @package Subway
11
 */
12
namespace Subway;
13
14
if ( ! defined( 'ABSPATH' ) ) {
15
   return;
16
}
17
18
final class Enqueue {
19
	
20
	public static function register_js() {
21
22
   		wp_enqueue_style( 'subway-style', SUBWAY_DIR_URL . 'assets/css/subway.css' );
23
24
   		wp_enqueue_script( 'subway-script', SUBWAY_DIR_URL . 'assets/js/subway.js', array('jquery') );
25
26
   		wp_localize_script( 'subway-script', 'subway_config', array( 
27
   				'ajax_url' => admin_url( 'admin-ajax.php' ),
28
   				'login_http_error' => __( 'An error occured while transmitting the data. Refresh the page and try again', 'subway' )
29
   			)
30
   		);
31
32
   		return;
33
   		
34
	}
35
36
}