Making WordPress.org


Ignore:
Timestamp:
02/22/2024 06:44:16 AM (2 years ago)
Author:
dd32
Message:

Plugin Directory: Readme: Add a note for when the tags specified have low usage.

See #6108.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php

    r13235 r13237  
    8181        }
    8282
    83         // Warnings.
     83        // Warnings & Notes.
    8484        if ( isset( $readme->warnings['requires_header_ignored'] ) ) {
    8585            $latest_wordpress_version = defined( 'WP_CORE_STABLE_BRANCH' ) ? WP_CORE_STABLE_BRANCH : '5.0';
     
    138138            );
    139139        } elseif ( ! count( $readme->contributors ) ) {
    140             $warnings[] = sprintf(
     140            $notes[] = sprintf(
    141141                /* translators: %s: plugin header tag */
    142142                __( 'The %s field is missing.', 'wporg-plugins' ),
     
    157157        }
    158158
    159         // Notes.
     159        if ( isset( $readme->warnings['low_usage_tags'] ) ) {
     160            $notes[] = sprintf(
     161                /* translators: %s: list of tags with low usage. */
     162                __( 'The following tags are not widely used: %s', 'wporg-plugins' ),
     163                '<code>' . implode( '</code>, <code>', array_map( 'esc_html', $readme->warnings['low_usage_tags'] ) ) . '</code>'
     164            );
     165        }
     166
    160167        if ( empty( $readme->requires ) ) {
    161168            $notes[] = sprintf(
Note: See TracChangeset for help on using the changeset viewer.