mirror of
git://develop.git.wordpress.org/
synced 2025-03-20 20:09:53 +01:00
Plugins: Move the introduction text from install_dashboard()
to display_plugins_table()
.
This brings some consistency to how the introduction is displayed for the Beta Testing, Featured, and Recommended tabs of the Add Plugins screen. This commit also reorders the `switch` cases for the text in the same order as they are displayed. Follow-up to [9141], [30889], [36297]. Props sabbir1991, kapilpaul. Fixes #55389. git-svn-id: https://develop.svn.wordpress.org/trunk@52936 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0a136d072a
commit
10875b1e42
@ -266,18 +266,8 @@ function install_popular_tags( $args = array() ) {
|
||||
* @since 2.7.0
|
||||
*/
|
||||
function install_dashboard() {
|
||||
display_plugins_table();
|
||||
?>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: https://wordpress.org/plugins/ */
|
||||
__( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%s">WordPress Plugin Directory</a> or upload a plugin in .zip format by clicking the button at the top of this page.' ),
|
||||
__( 'https://wordpress.org/plugins/' )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<?php display_plugins_table(); ?>
|
||||
|
||||
<div class="plugins-popular-tags-wrapper">
|
||||
<h2><?php _e( 'Popular tags' ); ?></h2>
|
||||
@ -395,14 +385,6 @@ function display_plugins_table() {
|
||||
global $wp_list_table;
|
||||
|
||||
switch ( current_filter() ) {
|
||||
case 'install_plugins_favorites':
|
||||
if ( empty( $_GET['user'] ) && ! get_user_option( 'wporg_favorites' ) ) {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 'install_plugins_recommended':
|
||||
echo '<p>' . __( 'These suggestions are based on the plugins you and other users have installed.' ) . '</p>';
|
||||
break;
|
||||
case 'install_plugins_beta':
|
||||
printf(
|
||||
/* translators: %s: URL to "Features as Plugins" page. */
|
||||
@ -410,8 +392,22 @@ function display_plugins_table() {
|
||||
'https://make.wordpress.org/core/handbook/about/release-cycle/features-as-plugins/'
|
||||
);
|
||||
break;
|
||||
case 'install_plugins_featured':
|
||||
printf(
|
||||
/* translators: %s: https://wordpress.org/plugins/ */
|
||||
'<p>' . __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%s">WordPress Plugin Directory</a> or upload a plugin in .zip format by clicking the button at the top of this page.' ) . '</p>',
|
||||
__( 'https://wordpress.org/plugins/' )
|
||||
);
|
||||
break;
|
||||
case 'install_plugins_recommended':
|
||||
echo '<p>' . __( 'These suggestions are based on the plugins you and other users have installed.' ) . '</p>';
|
||||
break;
|
||||
case 'install_plugins_favorites':
|
||||
if ( empty( $_GET['user'] ) && ! get_user_option( 'wporg_favorites' ) ) {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
||||
<form id="plugin-filter" method="post">
|
||||
<?php $wp_list_table->display(); ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user