Making WordPress.org


Ignore:
Timestamp:
09/17/2020 02:55:13 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Readme Validator: Allow validating readme.md files.

File:
1 edited

Legend:

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

    r9050 r10276  
    3131        $url = esc_url_raw( $url );
    3232
    33         if ( strtolower( substr( $url, -10 ) ) != 'readme.txt' ) {
     33        if (
     34            strtolower( substr( $url, -10 ) ) != 'readme.txt' &&
     35            strtolower( substr( $url, -9 ) ) != 'readme.md'
     36        ) {
    3437            $error = sprintf(
    3538                /* translators: %s: readme.txt */
    36                 __( 'URL must end in %s!', 'wporg-plugins' ),
    37                 '<code>readme.txt</code>'
     39                __( 'URL must end in %s or %s!', 'wporg-plugins' ),
     40                '<code>readme.txt</code>', '<code>readme.md</code>'
    3841            );
    3942            return array(
Note: See TracChangeset for help on using the changeset viewer.