Making WordPress.org

Changeset 7021


Ignore:
Timestamp:
04/04/2018 03:05:24 AM (7 years ago)
Author:
dd32
Message:

Plugin Directory: Readme Validator: Add a warning when a contributor in the readme is ignored.

Fixes #249.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme
Files:
2 edited

Legend:

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

    r6287 r7021  
    8787     */
    8888    public $faq = array();
     89
     90    /**
     91     * Flag to specify that a Contributor was ignored.
     92     *
     93     * @var bool
     94     */
     95    public $contributor_ignored = false;
    8996
    9097    /**
     
    544551            if ( ! $user ) {
    545552                unset( $users[ $i ] );
     553                $this->contributor_ignored = true;
    546554                continue;
    547555            }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php

    r6287 r7021  
    8989            $warnings[] = sprintf( __( 'No %s listed.', 'wporg-plugins' ), '<code>Contributors</code>' );
    9090        }
     91        if ( $readme->contributor_ignored ) {
     92            /* Translators: 1: Plugin header tag; */
     93            $warnings[] = sprintf( __( 'One or more %1$s listed were ignored. %1$s should only contain WordPress.org usernames.', 'wporg-plugins' ), '<code>Contributors</code>' );
     94        }
    9195
    9296        // Notes.
Note: See TracChangeset for help on using the changeset viewer.