Making WordPress.org


Ignore:
Timestamp:
01/22/2018 06:32:54 PM (7 years ago)
Author:
obenland
Message:

Plugins: Move example readme file to plugin.

Gives the file a version history and makes it available from the Plugin Directory root.
It also removes the need to update the URL every time a new version gets uploaded.

Props xkon.
Fixes #3123.

File:
1 edited

Legend:

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

    r6407 r6411  
    11331133            }
    11341134
    1135             // Browse 404's
     1135            // Browse 404s.
    11361136            if ( 'browse' === $path[2] ) {
    11371137                wp_safe_redirect( home_url( '/' ) );
     1138                die();
     1139            }
     1140
     1141            // The readme.txt page.
     1142            if ( 'readme.txt' === $path[2] ) {
     1143                header( 'Content-type: text/plain' );
     1144                echo file_get_contents( __DIR__ . '/readme/readme.txt' );
    11381145                die();
    11391146            }
     
    11481155            }
    11491156
    1150             // Otherwise, let's redirect to the search page
     1157            // Otherwise, let's redirect to the search page.
    11511158            if ( isset( $path[2] ) && ! empty( $path[2] ) ) {
    11521159                wp_safe_redirect( home_url( '/search/' . urlencode( $path[2] ) . '/' ) );
Note: See TracChangeset for help on using the changeset viewer.