X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/2329f698283944696a7076258cf816545970bb47..88550bc3400cc7c035ff590ecb007c7938041ded:/wp-admin/includes/plugin-install.php diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 356fff6d..30313419 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -28,11 +28,17 @@ */ function plugins_api($action, $args = null) { - if ( is_array($args) ) - $args = (object)$args; + if ( is_array( $args ) ) { + $args = (object) $args; + } - if ( !isset($args->per_page) ) + if ( ! isset( $args->per_page ) ) { $args->per_page = 24; + } + + if ( ! isset( $args->locale ) ) { + $args->locale = get_locale(); + } /** * Override the Plugin Install API arguments. @@ -190,7 +196,7 @@ function install_search_form( $type_selector = true ) { * Upload from zip * @since 2.8.0 * - * @param string $page + * @param integer $page */ function install_plugins_upload( $page = 1 ) { ?> @@ -235,8 +241,15 @@ function install_plugins_favorites_form() { function display_plugins_table() { global $wp_list_table; - if ( current_filter() == 'install_plugins_favorites' && empty( $_GET['user'] ) && ! get_user_option( 'wporg_favorites' ) ) { - return; + switch ( current_filter() ) { + case 'install_plugins_favorites' : + if ( empty( $_GET['user'] ) && ! get_user_option( 'wporg_favorites' ) ) { + return; + } + break; + case 'install_plugins_recommended' : + echo '

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

'; + break; } ?> @@ -245,11 +258,12 @@ function display_plugins_table() { wp_unslash( $_REQUEST['plugin'] ), 'is_ssl' => is_ssl(), @@ -459,13 +477,12 @@ function install_plugin_information() { $_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0; ?>
- - - - - - + + + +
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.') . '

'; + 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.') . '

'; + echo '

' . __('Warning: This plugin has not been marked as compatible with your version of WordPress.') . '

'; } foreach ( (array) $api->sections as $section_name => $content ) {