Completed
Push — master ( f8bba6...3fc6af )
by SILENT
02:31
created

extras.php ➔ strip_body_classes()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Custom functions that act independently of the theme templates
4
 *
5
 * Eventually, some of the functionality here could be replaced by core features.
6
 *
7
 * @package WordPress
8
 * @subpackage Strip
9
 */
10
11
/**
12
 * Adds custom classes to the array of body classes.
13
 *
14
 * @param $strings $classes group-blog.
0 ignored issues
show
Documentation introduced by
The doc-type $strings could not be parsed: Unknown type name "$strings" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
15
 */
16
function strip_body_classes( $classes ) {
17
	// Adds a class of group-blog to blogs with more than 1 published author.
18
	if ( is_multi_author() ) {
19
		$classes[] = 'group-blog';
20
	}
21
22
	return $classes;
23
}
24
add_filter( 'body_class', 'strip_body_classes' );
25