--- a/wp/wp-admin/plugin-install.php Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-admin/plugin-install.php Tue Dec 15 13:49:49 2020 +0100
@@ -5,15 +5,15 @@
* @package WordPress
* @subpackage Administration
*/
-// TODO route this pages via a specific iframe handler instead of the do_action below
-if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) {
+// TODO: Route this page via a specific iframe handler instead of the do_action below.
+if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' === $_GET['tab'] ) ) {
define( 'IFRAME_REQUEST', true );
}
/**
* WordPress Administration Bootstrap.
*/
-require_once( dirname( __FILE__ ) . '/admin.php' );
+require_once __DIR__ . '/admin.php';
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
@@ -21,7 +21,7 @@
if ( is_multisite() && ! is_network_admin() ) {
wp_redirect( network_admin_url( 'plugin-install.php' ) );
- exit();
+ exit;
}
$wp_list_table = _get_list_table( 'WP_Plugin_Install_List_Table' );
@@ -83,8 +83,12 @@
'id' => 'overview',
'title' => __( 'Overview' ),
'content' =>
- '<p>' . sprintf( __( 'Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official <a href="%s">WordPress Plugin Directory</a> are compatible with the license WordPress uses.' ), __( 'https://wordpress.org/plugins/' ) ) . '</p>' .
- '<p>' . __( 'You can find new plugins to install by searching or browsing the directory right here in your own Plugins section.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>',
+ '<p>' . sprintf(
+ /* translators: %s: https://wordpress.org/plugins/ */
+ __( 'Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from the core WordPress application by thousands of developers all over the world. All plugins in the official <a href="%s">WordPress Plugin Directory</a> are compatible with the license WordPress uses.' ),
+ __( 'https://wordpress.org/plugins/' )
+ ) . '</p>' .
+ '<p>' . __( 'You can find new plugins to install by searching or browsing the directory right here in your own Plugins section.' ) . ' <span id="live-search-desc" class="hide-if-no-js">' . __( 'The search results will be updated as you type.' ) . '</span></p>',
)
);
@@ -93,16 +97,16 @@
'id' => 'adding-plugins',
'title' => __( 'Adding Plugins' ),
'content' =>
- '<p>' . __( 'If you know what you’re looking for, Search is your best bet. The Search screen has options to search the WordPress Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.' ) . '</p>' .
- '<p>' . __( 'If you just want to get an idea of what’s available, you can browse Featured and Popular plugins by using the links above the plugins list. These sections rotate regularly.' ) . '</p>' .
- '<p>' . __( 'You can also browse a user’s favorite plugins, by using the Favorites link above the plugins list and entering their WordPress.org username.' ) . '</p>' .
- '<p>' . __( 'If you want to install a plugin that you’ve downloaded elsewhere, click the Upload Plugin button above the plugins list. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.' ) . '</p>',
+ '<p>' . __( 'If you know what you’re looking for, Search is your best bet. The Search screen has options to search the WordPress Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.' ) . '</p>' .
+ '<p>' . __( 'If you just want to get an idea of what’s available, you can browse Featured and Popular plugins by using the links above the plugins list. These sections rotate regularly.' ) . '</p>' .
+ '<p>' . __( 'You can also browse a user’s favorite plugins, by using the Favorites link above the plugins list and entering their WordPress.org username.' ) . '</p>' .
+ '<p>' . __( 'If you want to install a plugin that you’ve downloaded elsewhere, click the Upload Plugin button above the plugins list. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.' ) . '</p>',
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
- '<p>' . __( '<a href="https://codex.wordpress.org/Plugins_Add_New_Screen">Documentation on Installing Plugins</a>' ) . '</p>' .
+ '<p>' . __( '<a href="https://wordpress.org/support/article/plugins-add-new-screen/">Documentation on Installing Plugins</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
);
@@ -117,7 +121,7 @@
/**
* WordPress Administration Template Header.
*/
-include( ABSPATH . 'wp-admin/admin-header.php' );
+require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap <?php echo esc_attr( "plugin-install-tab-$tab" ); ?>">
<h1 class="wp-heading-inline">
@@ -154,7 +158,6 @@
</div>
<?php
$wp_list_table->views();
- echo '<br class="clear" />';
}
/**
@@ -180,4 +183,4 @@
/**
* WordPress Administration Template Footer.
*/
-include( ABSPATH . 'wp-admin/admin-footer.php' );
+require_once ABSPATH . 'wp-admin/admin-footer.php';