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

modify_archive_title()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * LSX functions and definitions - bbPress.
4
 *
5
 * @package    lsx
6
 * @subpackage bbpress
7
 */
8
9
if ( ! defined( 'ABSPATH' ) ) {
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
	exit;
11
}
12
13
global $bbpress;
14
15
if ( ! function_exists( 'lsx_bbpress_scripts_add_styles' ) ) :
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...
16
17
	/**
18
	 * bbPress enqueue styles.
0 ignored issues
show
Coding Style introduced by
Doc comment short description must start with a capital letter
Loading history...
19
	 *
20
	 * @package    lsx
21
	 * @subpackage bbpress
22
	 */
23
	function lsx_bbpress_scripts_add_styles() {
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
24
		wp_enqueue_style( 'bbpress-lsx', get_template_directory_uri() . '/assets/css/bb-press/bb-press.css', array( 'lsx_main' ), LSX_VERSION );
25
		wp_style_add_data( 'bbpress-lsx', 'rtl', 'replace' );
26
	}
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...
27
28
	add_action( 'wp_enqueue_scripts', 'lsx_bbpress_scripts_add_styles' );
29
0 ignored issues
show
Coding Style introduced by
Blank line found at end of control structure
Loading history...
30
endif;
31
32
/**** Remove "Archives:"  from the forums archive title. ******/
0 ignored issues
show
Coding Style introduced by
Block comments must be ended with */
Loading history...
33
34
add_filter( 'get_the_archive_title', 'modify_archive_title', 10, 1 );
35
36
function modify_archive_title( $title ) {
0 ignored issues
show
Coding Style Documentation introduced by
Missing doc comment for function modify_archive_title()
Loading history...
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
37
	$title = __( 'Forums', 'lsx' );
38
	return $title;
39
}
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
40