X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0459461f9ea42e0b090759ff6fe5f48360bef750..refs/tags/wordpress-4.5:/wp-admin/includes/plugin-install.php diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index bb450e12..b1727a27 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -285,8 +285,8 @@ function install_plugins_upload() {

- - + +
@@ -300,7 +300,8 @@ function install_plugins_upload() { * */ function install_plugins_favorites_form() { - $user = ! empty( $_GET['user'] ) ? wp_unslash( $_GET['user'] ) : get_user_option( 'wporg_favorites' ); + $user = get_user_option( 'wporg_favorites' ); + $action = 'save_wporg_username_' . get_current_user_id(); ?>

@@ -309,6 +310,7 @@ function install_plugins_favorites_form() { +

' . __( 'These suggestions are based on the plugins you and other users have installed.' ) . '

'; break; + case 'install_plugins_beta' : + printf( + '

' . __( 'You are using a development version of WordPress. These feature plugins are also under development. Learn more.' ) . '

', + 'https://make.wordpress.org/core/handbook/about/release-cycle/features-as-plugins/' + ); + break; } ?> @@ -531,12 +539,6 @@ function install_plugin_information() { echo "
\n"; - $date_format = __( 'M j, Y @ H:i' ); - - if ( ! empty( $api->last_updated ) ) { - $last_updated_timestamp = strtotime( $api->last_updated ); - } - ?>
@@ -546,9 +548,9 @@ function install_plugin_information() { author ) ) { ?>
  • author, '_blank' ); ?>
  • last_updated ) ) { ?> -
  • - -
  • +
  • + last_updated ) ) ); ?> +
  • requires ) ) { ?>
  • requires ); ?>
  • tested ) ) { ?> @@ -572,22 +574,29 @@ function install_plugin_information() { rating ) ) { ?>

    $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?> - num_ratings ), number_format_i18n( $api->num_ratings ) ); ?> + ratings ) && array_sum( (array) $api->ratings ) > 0 ) { + if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) { ?> +

    +

    + ratings as $key => $ratecount ) { // Avoid div-by-zero. $_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0; + /* translators: 1: number of stars (used to determine singular/plural), 2: number of reviews */ + $aria_label = esc_attr( sprintf( _n( 'Reviews with %1$d star: %2$s. Opens in a new window.', 'Reviews with %1$d stars: %2$s. Opens in a new window.', $key ), + $key, + number_format_i18n( $ratecount ) + ) ); ?>
    + target="_blank" aria-label=""> - +
    slug ) . '" id="plugin_update_from_iframe" class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Update Now' ) .''; + echo '' . __( 'Install Update Now' ) .''; } break; case 'newer_installed':