wc_get_loop_class logic simplified

This commit is contained in:
Khan M Rashedun-Naby 2018-05-16 08:47:35 +06:00
parent 6c1234668a
commit 3f824ae000
1 changed files with 6 additions and 4 deletions

View File

@ -418,11 +418,13 @@ function wc_get_loop_class() {
if ( 0 === ( $loop_index - 1 ) % $columns || 1 === $columns ) {
return 'first';
} elseif ( 0 === $loop_index % $columns ) {
return 'last';
} else {
return '';
}
if ( 0 === $loop_index % $columns ) {
return 'last';
}
return '';
}