Plugins: Provide a link to searching the plugin directory when no search results are found.
Many new users do not know the difference between managing installed plugins and those found in the plugin directory. This helps with discoverability. The link is not provided in multisite installs because we assume that somebody with that kind of power in a network is experienced enough not to need it. This can always be reconsidered later. props mordauk for the initial patch. fixes #29865. Built from https://develop.svn.wordpress.org/trunk@35808 git-svn-id: http://core.svn.wordpress.org/trunk@35772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bba9132925
commit
83795d99be
|
@ -316,7 +316,16 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||
public function no_items() {
|
||||
global $plugins;
|
||||
|
||||
if ( !empty( $plugins['all'] ) )
|
||||
if ( ! empty( $_REQUEST['s'] ) ) {
|
||||
$s = esc_html( $_REQUEST['s'] );
|
||||
|
||||
printf( __( 'No plugins found for “%s”.' ), $s );
|
||||
|
||||
// We assume that somebody who can install plugins in multisite is experienced enough to not need this helper link.
|
||||
if ( ! is_multisite() && current_user_can( 'install_plugins' ) ) {
|
||||
echo ' <a href="' . esc_url( admin_url( 'plugin-install.php?tab=search&s=' . urlencode( $s ) ) ) . '">' . __( 'Search for plugins in the WordPress Plugin Directory.' ) . '</a>';
|
||||
}
|
||||
} elseif ( ! empty( $plugins['all'] ) )
|
||||
_e( 'No plugins found.' );
|
||||
else
|
||||
_e( 'You do not appear to have any plugins available at this time.' );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-35807';
|
||||
$wp_version = '4.5-alpha-35808';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue