WordPress.org

Making WordPress.org

Ticket #3123: 3123.5.diff

File 3123.5.diff, 11.0 KB (added by xkon, 23 months ago)

Added into plugin-directory with a redirect

  • wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

     
    505505                // Handle content for broken clients that send #'s to the server
    506506                add_rewrite_rule( '^([^/]+)/\#(.*)/?$', 'index.php?name=$matches[1]', 'top' );
    507507
     508                // Handle the readme.txt redirect
     509                add_rewrite_rule( '^([^/]+)/readme.txt', 'index.php?redirect_plugin=$matches[1]', 'top' );
     510
    508511                // If changing capabilities around, uncomment this.
    509512                //Capabilities::add_roles();
    510513
     
    10721075                                }
    10731076                        }
    10741077
     1078                        // The readme.txt page.
     1079                        if ( 'readme.txt' === $path[2] ) {
     1080                                echo '<pre>';
     1081                                echo file_get_contents( dirname(__FILE__) . '/files/readme.txt' );
     1082                                echo '</pre>';
     1083                                die();
     1084                        }
     1085
    10751086                        // The about page is now over at /developers/.
    10761087                        if ( 'about' === $path[2] ) {
    10771088                                if ( isset( $path[3] ) && 'add' == $path[3] ) {
  • wordpress.org/public_html/wp-content/plugins/plugin-directory/files/readme.txt

     
     1=== Plugin Name ===
     2Contributors: (this should be a list of wordpress.org userid's)
     3Donate link: http://example.com/
     4Tags: comments, spam
     5Requires at least: 4.6
     6Tested up to: 4.7
     7Stable tag: 4.3
     8Requires PHP: 5.2.4
     9License: GPLv2 or later
     10License URI: https://www.gnu.org/licenses/gpl-2.0.html
     11
     12Here is a short description of the plugin.  This should be no more than 150 characters.  No markup here.
     13
     14== Description ==
     15
     16This is the long description.  No limit, and you can use Markdown (as well as in the following sections).
     17
     18For backwards compatibility, if this section is missing, the full length of the short description will be used, and
     19Markdown parsed.
     20
     21A few notes about the sections above:
     22
     23*   "Contributors" is a comma separated list of wordpress.org usernames
     24*   "Tags" is a comma separated list of tags that apply to the plugin
     25*   "Requires at least" is the lowest version that the plugin will work on
     26*   "Tested up to" is the highest version that you've *successfully used to test the plugin*. Note that it might work on
     27higher versions... this is just the highest one you've verified.
     28*   Stable tag should indicate the Subversion "tag" of the latest stable version, or "trunk," if you use `/trunk/` for
     29stable.
     30
     31    Note that the `readme.txt` of the stable tag is the one that is considered the defining one for the plugin, so
     32if the `/trunk/readme.txt` file says that the stable tag is `4.3`, then it is `/tags/4.3/readme.txt` that'll be used
     33for displaying information about the plugin.  In this situation, the only thing considered from the trunk `readme.txt`
     34is the stable tag pointer.  Thus, if you develop in trunk, you can update the trunk `readme.txt` to reflect changes in
     35your in-development version, without having that information incorrectly disclosed about the current stable version
     36that lacks those changes -- as long as the trunk's `readme.txt` points to the correct stable tag.
     37
     38    If no stable tag is provided, it is assumed that trunk is stable, but you should specify "trunk" if that's where
     39you put the stable version, in order to eliminate any doubt.
     40
     41== Installation ==
     42
     43This section describes how to install the plugin and get it working.
     44
     45e.g.
     46
     471. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
     481. Activate the plugin through the 'Plugins' screen in WordPress
     491. Use the Settings->Plugin Name screen to configure the plugin
     501. (Make your instructions match the desired user flow for activating and installing your plugin. Include any steps that might be needed for explanatory purposes)
     51
     52
     53== Frequently Asked Questions ==
     54
     55= A question that someone might have =
     56
     57An answer to that question.
     58
     59= What about foo bar? =
     60
     61Answer to foo bar dilemma.
     62
     63== Screenshots ==
     64
     651. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
     66the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
     67directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`
     68(or jpg, jpeg, gif).
     692. This is the second screen shot
     70
     71== Changelog ==
     72
     73= 1.0 =
     74* A change since the previous version.
     75* Another change.
     76
     77= 0.5 =
     78* List versions from most recent at top to oldest at bottom.
     79
     80== Upgrade Notice ==
     81
     82= 1.0 =
     83Upgrade notices describe the reason a user should upgrade.  No more than 300 characters.
     84
     85= 0.5 =
     86This version fixes a security related bug.  Upgrade immediately.
     87
     88== Arbitrary section ==
     89
     90You may provide arbitrary sections, in the same format as the ones above.  This may be of use for extremely complicated
     91plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or
     92"installation."  Arbitrary sections will be shown below the built-in sections outlined above.
     93
     94== A brief Markdown Example ==
     95
     96Ordered list:
     97
     981. Some feature
     991. Another feature
     1001. Something else about the plugin
     101
     102Unordered list:
     103
     104* something
     105* something else
     106* third thing
     107
     108Here's a link to [WordPress](http://wordpress.org/ "Your favorite software") and one to [Markdown's Syntax Documentation][markdown syntax].
     109Titles are optional, naturally.
     110
     111[markdown syntax]: http://daringfireball.net/projects/markdown/syntax
     112            "Markdown is what the parser uses to process much of the readme file"
     113
     114Markdown uses email style notation for blockquotes and I've been told:
     115> Asterisks for *emphasis*. Double it up  for **strong**.
     116
     117`<?php code(); // goes in backticks ?>`
  • wordpress.org/public_html/wp-content/plugins/plugin-directory/files/readme.txt

     
     1=== Plugin Name ===
     2Contributors: (this should be a list of wordpress.org userid's)
     3Donate link: http://example.com/
     4Tags: comments, spam
     5Requires at least: 4.6
     6Tested up to: 4.7
     7Stable tag: 4.3
     8Requires PHP: 5.2.4
     9License: GPLv2 or later
     10License URI: https://www.gnu.org/licenses/gpl-2.0.html
     11
     12Here is a short description of the plugin.  This should be no more than 150 characters.  No markup here.
     13
     14== Description ==
     15
     16This is the long description.  No limit, and you can use Markdown (as well as in the following sections).
     17
     18For backwards compatibility, if this section is missing, the full length of the short description will be used, and
     19Markdown parsed.
     20
     21A few notes about the sections above:
     22
     23*   "Contributors" is a comma separated list of wordpress.org usernames
     24*   "Tags" is a comma separated list of tags that apply to the plugin
     25*   "Requires at least" is the lowest version that the plugin will work on
     26*   "Tested up to" is the highest version that you've *successfully used to test the plugin*. Note that it might work on
     27higher versions... this is just the highest one you've verified.
     28*   Stable tag should indicate the Subversion "tag" of the latest stable version, or "trunk," if you use `/trunk/` for
     29stable.
     30
     31    Note that the `readme.txt` of the stable tag is the one that is considered the defining one for the plugin, so
     32if the `/trunk/readme.txt` file says that the stable tag is `4.3`, then it is `/tags/4.3/readme.txt` that'll be used
     33for displaying information about the plugin.  In this situation, the only thing considered from the trunk `readme.txt`
     34is the stable tag pointer.  Thus, if you develop in trunk, you can update the trunk `readme.txt` to reflect changes in
     35your in-development version, without having that information incorrectly disclosed about the current stable version
     36that lacks those changes -- as long as the trunk's `readme.txt` points to the correct stable tag.
     37
     38    If no stable tag is provided, it is assumed that trunk is stable, but you should specify "trunk" if that's where
     39you put the stable version, in order to eliminate any doubt.
     40
     41== Installation ==
     42
     43This section describes how to install the plugin and get it working.
     44
     45e.g.
     46
     471. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
     481. Activate the plugin through the 'Plugins' screen in WordPress
     491. Use the Settings->Plugin Name screen to configure the plugin
     501. (Make your instructions match the desired user flow for activating and installing your plugin. Include any steps that might be needed for explanatory purposes)
     51
     52
     53== Frequently Asked Questions ==
     54
     55= A question that someone might have =
     56
     57An answer to that question.
     58
     59= What about foo bar? =
     60
     61Answer to foo bar dilemma.
     62
     63== Screenshots ==
     64
     651. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
     66the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
     67directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`
     68(or jpg, jpeg, gif).
     692. This is the second screen shot
     70
     71== Changelog ==
     72
     73= 1.0 =
     74* A change since the previous version.
     75* Another change.
     76
     77= 0.5 =
     78* List versions from most recent at top to oldest at bottom.
     79
     80== Upgrade Notice ==
     81
     82= 1.0 =
     83Upgrade notices describe the reason a user should upgrade.  No more than 300 characters.
     84
     85= 0.5 =
     86This version fixes a security related bug.  Upgrade immediately.
     87
     88== Arbitrary section ==
     89
     90You may provide arbitrary sections, in the same format as the ones above.  This may be of use for extremely complicated
     91plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or
     92"installation."  Arbitrary sections will be shown below the built-in sections outlined above.
     93
     94== A brief Markdown Example ==
     95
     96Ordered list:
     97
     981. Some feature
     991. Another feature
     1001. Something else about the plugin
     101
     102Unordered list:
     103
     104* something
     105* something else
     106* third thing
     107
     108Here's a link to [WordPress](http://wordpress.org/ "Your favorite software") and one to [Markdown's Syntax Documentation][markdown syntax].
     109Titles are optional, naturally.
     110
     111[markdown syntax]: http://daringfireball.net/projects/markdown/syntax
     112            "Markdown is what the parser uses to process much of the readme file"
     113
     114Markdown uses email style notation for blockquotes and I've been told:
     115> Asterisks for *emphasis*. Double it up  for **strong**.
     116
     117`<?php code(); // goes in backticks ?>`