Making WordPress.org

Changeset 13619


Ignore:
Timestamp:
04/30/2024 05:22:33 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Readme Validator: Accept a plugin slug in the readme url field.

File:
1 edited

Legend:

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

    r13513 r13619  
    1515                if ( ! empty( $_REQUEST['readme'] ) && is_string( $_REQUEST['readme'] ) ) {
    1616                        $readme_url = wp_unslash( $_REQUEST['readme'] );
     17
     18                        // If it's a slug..
     19                        if ( $readme_url === sanitize_title_with_dashes( $readme_url ) ) {
     20                                $readme_url = 'https://wordpress.org/plugins/' . $readme_url . '/';
     21                        }
    1722                }
    1823
Note: See TracChangeset for help on using the changeset viewer.