-version ) ) : ?>
- - version ?>
-author ) ) : ?>
- - author, '_blank') ?>
-last_updated ) ) : ?>
- - last_updated)) ) ?>
-requires ) ) : ?>
- - requires) ?>
-tested ) ) : ?>
- - tested ?>
-downloaded ) ) : ?>
- - downloaded), number_format_i18n($api->downloaded)) ?>
-slug ) && empty( $api->external ) ) : ?>
-
-homepage ) ) : ?>
-
-
+ version ) ) { ?>
+ - version; ?>
+ author ) ) { ?>
+ - author, '_blank' ); ?>
+ last_updated ) ) { ?>
+ -
+ last_updated ) ) ); ?>
+
+ requires ) ) { ?>
+ - requires ); ?>
+ tested ) ) { ?>
+ - tested; ?>
+ downloaded ) ) { ?>
+ - downloaded ), number_format_i18n( $api->downloaded ) ); ?>
+ slug ) && empty( $api->external ) ) { ?>
+
+ homepage ) ) { ?>
+
+ donate_link ) && empty( $api->contributors ) ) { ?>
+
+
- rating ) ) : ?>
-
+ rating ) ) { ?>
+
$api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?>
-
num_ratings), number_format_i18n($api->num_ratings) ); ?>
-
+
num_ratings ), number_format_i18n( $api->num_ratings ) ); ?>
+ ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
+ foreach( $api->ratings as $key => $ratecount ) {
+ // Avoid div-by-zero.
+ $_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0;
+ ?>
+
+ contributors ) ) { ?>
+
+
+ contributors as $contrib_username => $contrib_profile ) {
+ if ( empty( $contrib_username ) && empty( $contrib_profile ) ) {
+ continue;
+ }
+ if ( empty( $contrib_username ) ) {
+ $contrib_username = preg_replace( '/^.+\/(.+)\/?$/', '\1', $contrib_profile );
+ }
+ $contrib_username = sanitize_user( $contrib_username );
+ if ( empty( $contrib_profile ) ) {
+ echo "- {$contrib_username}
";
+ } else {
+ echo "- {$contrib_username}
";
+ }
+ }
+ ?>
+
+ donate_link ) ) { ?>
+
+
+
tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) )
- echo '
' . __('Warning: This plugin has not been tested with your current version of WordPress.') . '
';
-
- else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) )
- echo '
' . __('Warning: This plugin has not been marked as compatible with your version of WordPress.') . '
';
-
- foreach ( (array)$api->sections as $section_name => $content ) {
-
- if ( isset( $plugins_section_titles[ $section_name ] ) )
- $title = $plugins_section_titles[ $section_name ];
- else
- $title = ucwords( str_replace( '_', ' ', $section_name ) );
+ if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
+ echo '
' . __('Warning: This plugin has not been tested with your current version of WordPress.') . '
';
+ } else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
+ echo '
' . __('Warning: This plugin has not been marked as compatible with your version of WordPress.') . '
';
+ }
+ foreach ( (array) $api->sections as $section_name => $content ) {
$content = links_add_base_url( $content, 'https://wordpress.org/plugins/' . $api->slug . '/' );
$content = links_add_target( $content, '_blank' );
$san_section = esc_attr( $section_name );
- $display = ( $section_name == $section ) ? 'block' : 'none';
+ $display = ( $section_name === $section ) ? 'block' : 'none';
echo "\t
\n";
echo $content;
@@ -429,23 +535,26 @@ function install_plugin_information() {
}
echo "
\n";
echo "
\n";
+ echo "