Make WordPress Core

Changeset 53816


Ignore:
Timestamp:
08/03/2022 01:07:05 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Site Health: Improve the wording in plugin and theme version tests.

This displays a more appropriate message in case the site does not have any active plugins or installed themes.

Follow-up to [44986], [45099], [45336].

Props Presskopp, costdev, martin.krcho, Clorith, SergeyBiryukov.
Fixes #56134.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r53355 r53816  
    429429                                        __( 'Your site has 1 active plugin, and it is up to date.' )
    430430                                );
    431                         } else {
     431                        } elseif ( $plugins_active > 0 ) {
    432432                                $result['description'] .= sprintf(
    433433                                        '<p>%s</p>',
     
    442442                                        )
    443443                                );
     444                        } else {
     445                                $result['description'] .= sprintf(
     446                                        '<p>%s</p>',
     447                                        __( 'Your site does not have any active plugins.' )
     448                                );
    444449                        }
    445450                }
     
    592597                                        __( 'Your site has 1 installed theme, and it is up to date.' )
    593598                                );
    594                         } else {
     599                        } elseif ( $themes_total > 0 ) {
    595600                                $result['description'] .= sprintf(
    596601                                        '<p>%s</p>',
     
    604609                                                $themes_total
    605610                                        )
     611                                );
     612                        } else {
     613                                $result['description'] .= sprintf(
     614                                        '<p>%s</p>',
     615                                        __( 'Your site does not have any installed themes.' )
    606616                                );
    607617                        }
Note: See TracChangeset for help on using the changeset viewer.