Completed
Pull Request — master (#39)
by
unknown
01:55
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 80%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 26
ccs 4
cts 5
cp 0.8
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A plugins_loaded() 0 5 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
		add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
18 1
	}
19
20
	/**
21
	 * Load the plugin textdomain.
22
	 *
23
	 * @access public
24
	 */
25 1
	public function plugins_loaded() {
26
		// initialize translations
27
		$path = dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages';
28
		load_plugin_textdomain( 'carbon_breadcrumbs', false, $path );
29 1
	}
30
31
}