WordPress.org

Making WordPress.org

Changeset 6411


Ignore:
Timestamp:
01/22/2018 06:32:54 PM (16 months 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.

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
1 added
2 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] ) . '/' ) );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page-developers.php

    r6392 r6411  
    104104                    <?php
    105105                    /* translators: 1: URL to readme file; 2: URL to readme validator; */
    106                     printf( wp_kses_post( __( 'To make your entry in the plugin browser most useful, each plugin should have a readme file named <code>readme.txt</code> that adheres to the <a href="%1$s">WordPress plugin readme file standard</a>. You can put your readme file through the <a href="%2$s">readme validator</a> to check it.', 'wporg-plugins' ) ), esc_url( home_url( 'files/2018/01/readme.txt' ) ), esc_url( home_url( '/developers/readme-validator/' ) ) );
     106                    printf( wp_kses_post( __( 'To make your entry in the plugin browser most useful, each plugin should have a readme file named <code>readme.txt</code> that adheres to the <a href="%1$s">WordPress plugin readme file standard</a>. You can put your readme file through the <a href="%2$s">readme validator</a> to check it.', 'wporg-plugins' ) ), esc_url( home_url( 'readme.txt' ) ), esc_url( home_url( '/developers/readme-validator/' ) ) );
    107107                    ?>
    108108                </p>
Note: See TracChangeset for help on using the changeset viewer.