"weblizar", "page" => $paged, "per_page" => $per_page, "fields" => array( "last_updated" => true, "downloaded" => true, "icons" => true ), "locale" => get_locale(), ); $arges = apply_filters( "install_plugins_table_api_args_$tab", $args ); $api = plugins_api( "query_plugins", $arges ); $item = $api->plugins; if(!function_exists("wp_star_rating")) { function wp_star_rating( $args = array() ) { $defaults = array( 'rating' => 0, 'type' => 'rating', 'number' => 0, ); $r = wp_parse_args( $args, $defaults ); // Non-english decimal places when the $rating is coming from a string $rating = str_replace( ',', '.', $r['rating'] ); // Convert Percentage to star rating, 0..5 in .5 increments if ( 'percent' == $r['type'] ) { $rating = round( $rating / 10, 0 ) / 2; } // Calculate the number of each type of star needed $full_stars = floor( $rating ); $half_stars = ceil( $rating - $full_stars ); $empty_stars = 5 - $full_stars - $half_stars; if ( $r['number'] ) { /* translators: 1: The rating, 2: The number of ratings */ $format = _n( '%1$s rating based on %2$s rating', '%1$s rating based on %2$s ratings', $r['number'] ); $title = sprintf( $format, number_format_i18n( $rating, 1 ), number_format_i18n( $r['number'] ) ); } else { /* translators: 1: The rating */ $title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) ); } echo '
'; echo '' . $title . ''; echo str_repeat( '
', $full_stars ); echo str_repeat( '
', $half_stars ); echo str_repeat( '
', $empty_stars); echo '
'; } } ?>