Passed
Push — master ( 4e17db...db96e2 )
by Virginia
04:08
created

bbpress.php ➔ modify_archive_title()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
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' ) ) {
10
	exit;
11
}
12
13
global $bbpress;
14
15 View Code Duplication
if ( ! function_exists( 'lsx_bbpress_scripts_add_styles' ) ) :
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
16
17
	/**
18
	 * bbPress enqueue styles.
19
	 *
20
	 * @package    lsx
21
	 * @subpackage bbpress
22
	 */
23
	function lsx_bbpress_scripts_add_styles() {
24
		wp_enqueue_style( 'bbpress-lsx', get_template_directory_uri() . '/assets/css/bb-press.css', array( 'lsx_main' ), LSX_VERSION );
25
		wp_style_add_data( 'bbpress-lsx', 'rtl', 'replace' );
26
	}
27
28
	add_action( 'wp_enqueue_scripts', 'lsx_bbpress_scripts_add_styles' );
29
30
endif;
31
32
/**** Remove "Archives:"  from the forums archive title. ******/
33
34
add_filter( 'get_the_archive_title', 'modify_archive_title', 10, 1 );
35
 
36
function modify_archive_title( $title ) {
0 ignored issues
show
Unused Code introduced by
The parameter $title is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
37
    $title = "Forums";
38
    return $title;
39
}
40