Passed
Push — update/4.0.0 ( 2862dd...fc2c28 )
by
unknown
03:10
created

add_site_favicon()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * LSX functions and definitions.
4
 *
5
 * @package lsx
6
 */
7
8
use LSX\Core;
9
10
if ( ! defined( 'ABSPATH' ) ) {
11
	exit;
12
}
13
14
define( 'LSX_VERSION', '4.0.0' );
15
16
require_once get_template_directory() . '/includes/classes/class-core.php';
17
18
/**
19
 * Contains the LSX theme object
20
 *
21
 * @return void
0 ignored issues
show
Coding Style introduced by
Function return type is void, but function contains return statement
Loading history...
22
 */
23
function lsx() {
24
	global $lsx;
25
	if ( null === $lsx ) {
26
		$lsx = new Core();
27
		$lsx->init();
28
	}
29
	return $lsx;
30
}
31
lsx();
32
33
// Add favicon to your website.
34
add_action( 'wp_head', 'add_site_favicon' );
35
function add_site_favicon() {
0 ignored issues
show
Coding Style Documentation introduced by
Missing doc comment for function add_site_favicon()
Loading history...
36
37
	echo '<link rel="shortcut icon" type="image/x-icon" href="' . get_template_directory_uri() . '/assets/images/favicon.png" />';
0 ignored issues
show
introduced by
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'get_template_directory_uri'.
Loading history...
38
39
}