X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..607b7e02d77e7326161e8ec15639052d2040f745:/wp-admin/plugins.php diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 93aec79d..1d462381 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -10,7 +10,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! current_user_can('activate_plugins') ) - wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) ); + wp_die( __( 'Sorry, you are not allowed to manage plugins for this site.' ) ); $wp_list_table = _get_list_table('WP_Plugins_List_Table'); $pagenum = $wp_list_table->get_pagenum(); @@ -18,7 +18,7 @@ $pagenum = $wp_list_table->get_pagenum(); $action = $wp_list_table->current_action(); $plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : ''; -$s = isset($_REQUEST['s']) ? urlencode($_REQUEST['s']) : ''; +$s = isset($_REQUEST['s']) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : ''; // Clean up request URI from temporary args for screen options/paging uri's to work as expected. $_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']); @@ -30,7 +30,7 @@ if ( $action ) { switch ( $action ) { case 'activate': if ( ! current_user_can('activate_plugins') ) - wp_die(__('You do not have sufficient permissions to activate plugins for this site.')); + wp_die(__('Sorry, you are not allowed to activate plugins for this site.')); if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) { wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); @@ -69,7 +69,7 @@ if ( $action ) { case 'activate-selected': if ( ! current_user_can('activate_plugins') ) - wp_die(__('You do not have sufficient permissions to activate plugins for this site.')); + wp_die(__('Sorry, you are not allowed to activate plugins for this site.')); check_admin_referer('bulk-plugins'); @@ -147,7 +147,7 @@ if ( $action ) { case 'error_scrape': if ( ! current_user_can('activate_plugins') ) - wp_die(__('You do not have sufficient permissions to activate plugins for this site.')); + wp_die(__('Sorry, you are not allowed to activate plugins for this site.')); check_admin_referer('plugin-activation-error_' . $plugin); @@ -168,7 +168,7 @@ if ( $action ) { case 'deactivate': if ( ! current_user_can('activate_plugins') ) - wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.')); + wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.')); check_admin_referer('deactivate-plugin_' . $plugin); @@ -193,7 +193,7 @@ if ( $action ) { case 'deactivate-selected': if ( ! current_user_can('activate_plugins') ) - wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.')); + wp_die(__('Sorry, you are not allowed to deactivate plugins for this site.')); check_admin_referer('bulk-plugins'); @@ -228,7 +228,7 @@ if ( $action ) { case 'delete-selected': if ( ! current_user_can('delete_plugins') ) { - wp_die(__('You do not have sufficient permissions to delete plugins for this site.')); + wp_die(__('Sorry, you are not allowed to delete plugins for this site.')); } check_admin_referer('bulk-plugins'); @@ -256,14 +256,12 @@ if ( $action ) { ?>
$data ) { @@ -288,16 +280,6 @@ if ( $action ) { } } } - - // Add translation files. - if ( ! empty( $plugin_translations[ $plugin_slug ] ) ) { - $translations = $plugin_translations[ $plugin_slug ]; - - foreach ( $translations as $translation => $data ) { - $files_to_delete[] = $plugin_slug . '-' . $translation . '.po'; - $files_to_delete[] = $plugin_slug . '-' . $translation . '.mo'; - } - } } } $plugins_to_delete = count( $plugin_info ); @@ -321,11 +303,11 @@ if ( $action ) { foreach ( $plugin_info as $plugin ) { if ( $plugin['is_uninstallable'] ) { /* translators: 1: plugin name, 2: plugin author */ - echo '
  • ', sprintf( __( '%1$s by %2$s (will also delete its data)' ), $plugin['Name'], $plugin['AuthorName'] ), '
  • '; + echo '
  • ', sprintf( __( '%1$s by %2$s (will also delete its data)' ), '' . $plugin['Name'] . '', '' . $plugin['AuthorName'] . '' ), '
  • '; $data_to_delete = true; } else { /* translators: 1: plugin name, 2: plugin author */ - echo '
  • ', sprintf( __('%1$s by %2$s' ), $plugin['Name'], $plugin['AuthorName'] ), '
  • '; + echo '
  • ', sprintf( _x('%1$s by %2$s', 'plugin' ), '' . $plugin['Name'] . '', '' . $plugin['AuthorName'] ) . '', '
  • '; } } ?> @@ -353,17 +335,6 @@ if ( $action ) {
    - -

    -
    add_help_tab( array( 'title' => __('Overview'), 'content' => '

    ' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '

    ' . + '

    ' . __( 'The search for installed plugins will search for terms in their name, description, or author.' ) . ' ' . __( 'The search results will be updated as you type.' ) . '

    ' . '

    ' . sprintf( - /* translators: 1: Plugin Browser/Installer URL, 2: WordPress Plugin Directory URL 3: local plugin directory */ - __( 'You can find additional plugins for your site by using the Plugin Browser/Installer functionality or by browsing the WordPress Plugin Directory directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your %3$s directory. Once a plugin has been installed, you can activate it here.' ), - 'plugin-install.php', - 'https://wordpress.org/plugins/', - '/wp-content/plugins' + /* translators: %s: WordPress Plugin Directory URL */ + __( 'If you would like to see more plugins to choose from, click on the “Add New” button and you will be able to browse or search for additional plugins from the WordPress Plugin Directory. Plugins in the WordPress Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!' ), + 'https://wordpress.org/plugins/' ) . '

    ' ) ); get_current_screen()->add_help_tab( array( @@ -510,9 +480,14 @@ if ( ! empty( $invalid ) ) {

    -' . __('Search results for “%s”') . '', esc_html( $s ) ); ?> +' . __( 'Search results for “%s”' ) . '', esc_html( urldecode( $s ) ) ); +} +?>

    views(); ?> -
    + search_box( __( 'Search Installed Plugins' ), 'plugin' ); ?>
    @@ -545,9 +520,12 @@ do_action( 'pre_current_active_plugins', $plugins['all'] ); display(); ?> +