Completed
Push — master ( a335d3...313064 )
by Marin
02:16
created

Carbon_Breadcrumb_L10n   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 42.86%
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 26
ccs 3
cts 7
cp 0.4286
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A plugins_loaded() 0 5 1
A __construct() 0 4 1
1
<?php
2
/**
3
 * Localization class.
4
 * Adds support for translations.
5
 */
6
class Carbon_Breadcrumb_L10n {
7
8
	/**
9
	 * Constructor.
10
	 *
11
	 * Initializes and hooks the plugin localization functionality.
12
	 *
13
	 * @access public
14
	 */
15 1
	public function __construct() {
16
		// register our plugins_loaded method
17 1
		add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
18 1
	}
19
20
	/**
21
	 * Load the plugin textdomain.
22
	 *
23
	 * @access public
24
	 */
25
	public function plugins_loaded() {
26
		// initialize translations
27
		$path = dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages';
28
		load_plugin_textdomain( 'carbon_breadcrumbs', false, $path );
29
	}
30
31
}