Passed
Pull Request — master (#7)
by Joseph
02:29
created

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
 * 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
13
namespace Subway;
14
15
if ( ! defined( 'ABSPATH' ) ) {
16
	return;
17
}
18
19
/**
20
 * Plugin i18n.
21
 */
22
final class i18 {
23
24
	/**
25
	 * Class Constructor.
26
	 *
27
	 * @return  void
28
	 */
29
	public function __construct() {
30
31
		add_action( 'plugins_loaded', array( $this, 'subway_localize_plugin' ) );
32
33
		return;
34
	}
35
36
	/**
37
	 * Subway l8n callback.
38
	 *
39
	 * @return void
40
	 */
41
	function subway_localize_plugin() {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
42
43
		$rel_path = SUBWAY_DIR_PATH . 'languages';
44
45
		load_plugin_textdomain( 'subway', false, $rel_path );
46
47
		return;
48
	}
49
50
}
51
52
$subwayi18 = new i18();
53