| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | function wpml_jetpack_widget_get_top_posts( $posts, $post_ids, $count ) { |
||
| 8 | global $sitepress; |
||
| 9 | |||
| 10 | foreach ( $posts as $k => $post ) { |
||
| 11 | $lang_information = wpml_get_language_information( $post['post_id'] ); |
||
| 12 | $post_language = substr( $lang_information['locale'], 0, 2 ); |
||
| 13 | if ( $post_language !== $sitepress->get_current_language() ) { |
||
| 14 | unset( $posts[ $k ] ); |
||
| 15 | } |
||
| 16 | } |
||
| 17 | |||
| 18 | return $posts; |
||
| 19 | } |
||
| 20 | |||
| 36 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.