1 | <?php |
||||
2 | /** |
||||
3 | * The Sidebar containing the main widget areas. |
||||
4 | * |
||||
5 | * @package lsx |
||||
6 | */ |
||||
7 | |||||
8 | $show_on_front = get_option( 'show_on_front' ); |
||||
9 | |||||
10 | $layout = get_theme_mod( 'lsx_layout', '2cr' ); |
||||
11 | $layout = apply_filters( 'lsx_layout', $layout ); |
||||
12 | |||||
13 | if ( 'posts' === $show_on_front && is_home() ) { |
||||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||||
14 | $sidebar = 'home'; |
||||
15 | } else { |
||||
16 | $sidebar = 'sidebar-1'; |
||||
17 | } |
||||
18 | |||||
19 | if ( '1c' !== $layout ) : ?> |
||||
0 ignored issues
–
show
|
|||||
20 | |||||
21 | <?php lsx_sidebars_before(); ?> |
||||
22 | |||||
23 | <div id="secondary" class="widget-area <?php echo esc_attr( lsx_sidebar_class() ); ?>" role="complementary"> |
||||
24 | |||||
25 | <?php lsx_sidebar_top(); ?> |
||||
26 | |||||
27 | <h2><?php esc_html_e( 'Categories', 'lsx' ); ?></h2> |
||||
28 | |||||
29 | <aside id="categories" class="widget widget_categories"> |
||||
30 | <?php |
||||
31 | echo wp_tag_cloud( array( |
||||
0 ignored issues
–
show
Are you sure
wp_tag_cloud(array('taxonomy' => 'category')) of type array|string can be used in echo ?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
32 | 'taxonomy' => 'category', |
||||
33 | ) ); |
||||
0 ignored issues
–
show
For multi-line function calls, the closing parenthesis should be on a new line.
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line: someFunctionCall(
$firstArgument,
$secondArgument,
$thirdArgument
); // Closing parenthesis on a new line.
![]() |
|||||
34 | ?> |
||||
35 | </aside> |
||||
36 | |||||
37 | <?php lsx_sitemap_taxonomy_clouds(); ?> |
||||
38 | |||||
39 | <?php lsx_sidebar_bottom(); ?> |
||||
40 | |||||
41 | </div><!-- #secondary --> |
||||
42 | |||||
43 | <?php lsx_sidebars_after(); ?> |
||||
44 | |||||
45 | <?php endif; |
||||
0 ignored issues
–
show
|
|||||
46 |