Passed
Push — master ( e51c9a...41921a )
by Chris
04:16
created

lsx_widget_area_404_init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * LSX functions and definitions - Config.
4
 *
5
 * @package    lsx
6
 * @subpackage 404-widget
7
 */
8
9
if ( ! function_exists( 'lsx_widget_area_404_init' ) ) :
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
10
	/**
11
	 * Add Widget.
12
	 *
13
	 * @package    lsx
14
	 * @subpackage 404-widget
15
	 */
16
	function lsx_widget_area_404_init() {
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 0 found
Loading history...
17
		register_sidebar(
18
			array(
19
				'name'          => esc_html__( '404 page', 'lsx' ),
20
				'id'            => 'sidebar-404',
21
				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
22
				'after_widget'  => '</aside>',
23
				'before_title'  => '<h3 class="widget-title">',
24
				'after_title'   => '</h3>',
25
			)
26
		);
27
	}
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
28
29
endif;
30
31
add_action( 'widgets_init', 'lsx_widget_area_404_init' );
32
33
if ( ! function_exists( 'my_search_placeholder' ) ) :
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces after opening bracket; 1 found
Loading history...
Coding Style introduced by
Expected 0 spaces before closing bracket; 1 found
Loading history...
34
	/**
35
	 * Placeholder.
36
	 *
37
	 * @package    lsx
38
	 * @subpackage 404-widget
39
	 */
40
	function my_search_placeholder() {
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 0 found
Loading history...
41
		return __( 'lsdev.biz', 'lsx' );
42
	}
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
43
44
endif;
45
46
add_filter( 'search_placeholder_text', 'my_search_placeholder' );
47