Make WordPress Core

Ticket #7660: 7660.r8895.diff

File 7660.r8895.diff, 22.9 KB (added by jacobsantos, 18 years ago)

50% complete rewrite.php based off of r8895

  • rewrite.php

     
    77 */
    88
    99/**
    10  * add_rewrite_rule() - Add a straight rewrite rule
     10 * Add a straight rewrite rule.
    1111 *
    12  * {@internal Missing Long Description}}
    13  *
     12 * @see WP_Rewrite::add_rule() for long description.
    1413 * @since 2.1.0
    1514 *
    16  * @param unknown_type $regex
    17  * @param unknown_type $redirect
    18  * @param unknown_type $after
     15 * @param string $regex Regular Expression to match request against.
     16 * @param string $redirect Page to redirect to.
     17 * @param string $after Optional, default is 'bottom'. Where to add rule, can also be 'top'.
    1918 */
    2019function add_rewrite_rule($regex, $redirect, $after = 'bottom') {
    2120        global $wp_rewrite;
     
    2322}
    2423
    2524/**
    26  * add_rewrite_tag() - Add a new tag (like %postname%)
     25 * Add a new tag (like %postname%).
    2726 *
    28  * Warning: you must call this on init or earlier, otherwise
    29  * the query var addition stuff won't work
     27 * Warning: you must call this on init or earlier, otherwise the query var
     28 * addition stuff won't work.
    3029 *
    3130 * @since 2.1.0
    3231 *
    33  * @param unknown_type $tagname
    34  * @param unknown_type $regex
     32 * @param string $tagname
     33 * @param string $regex
    3534 */
    3635function add_rewrite_tag($tagname, $regex) {
    3736        //validation
     
    4746}
    4847
    4948/**
    50  * add_feed() - Add a new feed type like /atom1/
     49 * Add a new feed type like /atom1/.
    5150 *
    52  * {@internal Missing Long Description}}
    53  *
    5451 * @since 2.1.0
    5552 *
    56  * @param unknown_type $feedname
    57  * @param unknown_type $function
    58  * @return unknown
     53 * @param string $feedname
     54 * @param callback $function Callback to run on feed display.
     55 * @return string Feed action name.
    5956 */
    6057function add_feed($feedname, $function) {
    6158        global $wp_rewrite;
     
    7067}
    7168
    7269/**
    73  * {@internal Missing Description}}
     70 * Endpoint Mask for Permalink.
    7471 *
    7572 * @since 2.1.0
    7673 */
    7774define('EP_PERMALINK', 1);
    7875
    7976/**
    80  * {@internal Missing Description}}
     77 * Endpoint Mask for Attachment.
    8178 *
    8279 * @since 2.1.0
    8380 */
    8481define('EP_ATTACHMENT', 2);
    8582
    8683/**
    87  * {@internal Missing Description}}
     84 * Endpoint Mask for date.
    8885 *
    8986 * @since 2.1.0
    9087 */
    9188define('EP_DATE', 4);
    9289
    9390/**
    94  * {@internal Missing Description}}
     91 * Endpoint Mask for year
    9592 *
    9693 * @since 2.1.0
    9794 */
    9895define('EP_YEAR', 8);
    9996
    10097/**
    101  * {@internal Missing Description}}
     98 * Endpoint Mask for month.
    10299 *
    103100 * @since 2.1.0
    104101 */
    105102define('EP_MONTH', 16);
    106103
    107104/**
    108  * {@internal Missing Description}}
     105 * Endpoint Mask for day.
    109106 *
    110107 * @since 2.1.0
    111108 */
    112109define('EP_DAY', 32);
    113110
    114111/**
    115  * {@internal Missing Description}}
     112 * Endpoint Mask for root.
    116113 *
    117114 * @since 2.1.0
    118115 */
    119116define('EP_ROOT', 64);
    120117
    121118/**
    122  * {@internal Missing Description}}
     119 * Endpoint Mask for comments.
    123120 *
    124121 * @since 2.1.0
    125122 */
    126123define('EP_COMMENTS', 128);
    127124
    128125/**
    129  * {@internal Missing Description}}
     126 * Endpoint Mask for searches.
    130127 *
    131128 * @since 2.1.0
    132129 */
    133130define('EP_SEARCH', 256);
    134131
    135132/**
    136  * {@internal Missing Description}}
     133 * Endpoint Mask for categories.
    137134 *
    138135 * @since 2.1.0
    139136 */
    140137define('EP_CATEGORIES', 512);
    141138
    142139/**
    143  * {@internal Missing Description}}
     140 * Endpoint Mask for tags.
    144141 *
    145142 * @since 2.3.0
    146143 */
    147144define('EP_TAGS', 1024);
    148145
    149146/**
    150  * {@internal Missing Description}}
     147 * Endpoint Mask for authors.
    151148 *
    152149 * @since 2.1.0
    153150 */
    154151define('EP_AUTHORS', 2048);
    155152
    156153/**
    157  * {@internal Missing Description}}
     154 * Endpoint Mask for pages.
    158155 *
    159156 * @since 2.1.0
    160157 */
     
    162159
    163160//pseudo-places
    164161/**
    165  * {@internal Missing Description}}
     162 * Endpoint Mask for default, which is nothing.
    166163 *
    167164 * @since 2.1.0
    168165 */
    169166define('EP_NONE', 0);
    170167
    171168/**
    172  * {@internal Missing Description}}
     169 * Endpoint Mask for everything.
    173170 *
    174171 * @since 2.1.0
    175172 */
    176173define('EP_ALL', 8191);
    177174
    178175/**
    179  * add_rewrite_endpoint() - Add an endpoint, like /trackback/
     176 * Add an endpoint, like /trackback/.
    180177 *
    181  * {@internal Missing Long Description}}
     178 * The endpoints are added to the end of the request. So a request matching
     179 * "/2008/10/14/my_post/myep/", the endpoint will be "/myep/".
    182180 *
    183181 * @since 2.1.0
     182 * @see WP_Rewrite::add_endpoint() Parameters and more description.
     183 * @uses $wp_rewrite
    184184 *
    185185 * @param unknown_type $name
    186186 * @param unknown_type $places
     
    191191}
    192192
    193193/**
    194   * _wp_filter_taxonomy_base() - filter the URL base for taxonomies, to remove any manually prepended /index.php/
    195   * @param string $base the taxonomy base that we're going to filter
     194  * Filter the URL base for taxonomies.
     195  *
     196  * To remove any manually prepended /index.php/.
     197  *
     198  * @access private
     199  * @since unknown (2.3.0?)
     200  * @author Mark Jaquith
     201  *
     202  * @param string $base The taxonomy base that we're going to filter
    196203  * @return string
    197   * @author Mark Jaquith
    198204  */
    199205function _wp_filter_taxonomy_base( $base ) {
    200206        if ( !empty( $base ) ) {
     
    204210        return $base;
    205211}
    206212
    207 // examine a url (supposedly from this blog) and try to
    208 // determine the post ID it represents.
    209213/**
    210  * url_to_postid() - Examine a url and try to determine the post ID it represents
     214 * Examine a url and try to determine the post ID it represents.
    211215 *
    212  * {@internal Missing Long Description}}
    213  *
    214216 * Checks are supposedly from the hosted site blog.
    215217 *
    216218 * @since 1.0.0
    217219 *
    218  * @param unknown_type $url
    219  * @return unknown
     220 * @param string $url Permalink to check.
     221 * @return int Post ID, or 0 on failure.
    220222 */
    221223function url_to_postid($url) {
    222224        global $wp_rewrite;
     
    315317}
    316318
    317319/**
    318  * {@internal Missing Short Description}}
     320 * WordPress Rewrite Component.
    319321 *
    320  * {@internal Missing Long Description}}
     322 * The WordPress Rewrite class writes the rewrite module rules to the .htaccess
     323 * file. It also handles parsing the request to get the correct setup for the
     324 * WordPress Query class.
    321325 *
     326 * The Rewrite along with WP class function as a front controller for WordPress.
     327 * You can add rules to trigger your page view and processing using this
     328 * component. The full functionality of a front controller does not exist,
     329 * meaning you can't define how the template files load based on the rewrite
     330 * rules.
     331 *
    322332 * @since 1.5.0
    323333 */
    324334class WP_Rewrite {
    325335        /**
    326          * {@internal Missing Description}}
     336         * Default permalink structure for WordPress.
    327337         *
    328338         * @since 1.5.0
    329339         * @access private
    330          * @var unknown_type
     340         * @var string
    331341         */
    332342        var $permalink_structure;
    333343
    334344        /**
    335          * {@internal Missing Description}}
     345         * Whether to add trailing slashes.
    336346         *
    337347         * @since 2.2.0
    338348         * @access private
     
    341351        var $use_trailing_slashes;
    342352
    343353        /**
    344          * {@internal Missing Description}}
     354         * Customized or default category permalink base ( example.com/xx/tagname ).
    345355         *
    346356         * @since 1.5.0
    347357         * @access private
    348          * @var unknown_type
     358         * @var string
    349359         */
    350360        var $category_base;
    351361
    352362        /**
    353          * {@internal Missing Description}}
     363         * Customized or default tag permalink base ( example.com/xx/tagname ).
    354364         *
    355365         * @since 2.3.0
    356366         * @access private
    357          * @var unknown_type
     367         * @var string
    358368         */
    359369        var $tag_base;
    360370
    361371        /**
    362          * {@internal Missing Description}}
     372         * Permalink request structure for categories.
    363373         *
    364374         * @since 1.5.0
    365375         * @access private
    366          * @var unknown_type
     376         * @var string
    367377         */
    368378        var $category_structure;
    369379
    370380        /**
    371          * {@internal Missing Description}}
     381         * Permalink request structure for tags.
    372382         *
    373383         * @since 2.3.0
    374384         * @access private
    375          * @var unknown_type
     385         * @var string
    376386         */
    377387        var $tag_structure;
    378388
    379389        /**
    380          * {@internal Missing Description}}
     390         * Permalink author request base ( example.com/author/authorname ).
    381391         *
    382392         * @since 1.5.0
    383393         * @access private
     
    386396        var $author_base = 'author';
    387397
    388398        /**
    389          * {@internal Missing Description}}
     399         * Permalink request structure for author pages.
    390400         *
    391401         * @since 1.5.0
    392402         * @access private
    393          * @var unknown_type
     403         * @var string
    394404         */
    395405        var $author_structure;
    396406
    397407        /**
    398          * {@internal Missing Description}}
     408         * Permalink request structure for dates.
    399409         *
    400410         * @since 1.5.0
    401411         * @access private
    402          * @var unknown_type
     412         * @var string
    403413         */
    404414        var $date_structure;
    405415
    406416        /**
    407          * {@internal Missing Description}}
     417         * Permalink request structure for pages.
    408418         *
    409419         * @since 1.5.0
    410420         * @access private
    411          * @var unknown_type
     421         * @var string
    412422         */
    413423        var $page_structure;
    414424
    415425        /**
    416          * {@internal Missing Description}}
     426         * Search permalink base ( example.com/search/query ).
    417427         *
    418428         * @since 1.5.0
    419429         * @access private
     
    422432        var $search_base = 'search';
    423433
    424434        /**
    425          * {@internal Missing Description}}
     435         * Permalink request structure for searches.
    426436         *
    427437         * @since 1.5.0
    428438         * @access private
    429          * @var unknown_type
     439         * @var string
    430440         */
    431441        var $search_structure;
    432442
    433443        /**
    434          * {@internal Missing Description}}
     444         * Comments permalink base.
    435445         *
    436446         * @since 1.5.0
    437447         * @access private
     
    440450        var $comments_base = 'comments';
    441451
    442452        /**
    443          * {@internal Missing Description}}
     453         * Feed permalink base.
    444454         *
    445455         * @since 1.5.0
    446456         * @access private
     
    449459        var $feed_base = 'feed';
    450460
    451461        /**
    452          * {@internal Missing Description}}
     462         * Comments feed request structure permalink.
    453463         *
    454464         * @since 1.5.0
    455465         * @access private
     
    458468        var $comments_feed_structure;
    459469
    460470        /**
    461          * {@internal Missing Description}}
     471         * Feed request structure permalink.
    462472         *
    463473         * @since 1.5.0
    464474         * @access private
     
    467477        var $feed_structure;
    468478
    469479        /**
    470          * {@internal Missing Description}}
     480         * Front URL path.
    471481         *
     482         * The difference between the root property is that WordPress might be
     483         * located at example/WordPress/index.php, if permalinks are turned off. The
     484         * index.php will be the front portion. If permalinks are turned on, this
     485         * will most likely be empty or not set.
     486         *
    472487         * @since 1.5.0
    473488         * @access private
    474          * @var unknown_type
     489         * @var string
    475490         */
    476491        var $front;
    477492
    478493        /**
    479          * {@internal Missing Description}}
     494         * Root URL path to WordPress (without domain).
    480495         *
     496         * The difference between front property is that WordPress might be located
     497         * at example.com/WordPress/. The root is the 'WordPress/' portion.
     498         *
    481499         * @since 1.5.0
    482          * @access
    483          * @var unknown_type
     500         * @access private
     501         * @var string
    484502         */
    485503        var $root = '';
    486504
    487505        /**
    488          * {@internal Missing Description}}
     506         * Permalink to the home page.
    489507         *
    490508         * @since 1.5.0
    491509         * @access public
     
    498516         *
    499517         * @since 1.5.0
    500518         * @access private
    501          * @var unknown_type
     519         * @var string
    502520         */
    503521        var $matches = '';
    504522
    505523        /**
    506          * {@internal Missing Description}}
     524         * Rewrite rules to match against the request to find the redirect or query.
    507525         *
    508526         * @since 1.5.0
    509527         * @access private
     
    512530        var $rules;
    513531
    514532        /**
    515          * {@internal Missing Description}}
     533         * Additional rules added external to the rewrite class.
    516534         *
    517          * Those not generated by the class, see add_rewrite_rule()
     535         * Those not generated by the class, see add_rewrite_rule().
    518536         *
    519537         * @since 2.1.0
    520538         * @access private
     
    523541        var $extra_rules = array(); //
    524542
    525543        /**
    526          * {@internal Missing Description}}
     544         * Additional rules that belong at the beginning to match first.
    527545         *
    528          * Those not generated by the class, see add_rewrite_rule()
     546         * Those not generated by the class, see add_rewrite_rule().
    529547         *
    530548         * @since 2.3.0
    531549         * @access private
     
    547565         *
    548566         * @since 2.1.0
    549567         * @access private
    550          * @var unknown_type
     568         * @var array
    551569         */
    552570        var $extra_permastructs = array();
     571
     572        /**
     573         * Endpoints permalinks
     574         *
     575         * @since unknown
     576         * @access private
     577         * @var array
     578         */
    553579        var $endpoints;
    554580
    555581        /**
     
    643669                                        );
    644670
    645671        /**
    646          * {@internal Missing Description}}
     672         * Supported default feeds.
    647673         *
    648674         * @since 1.5.0
    649675         * @access private
     
    652678        var $feeds = array ( 'feed', 'rdf', 'rss', 'rss2', 'atom' );
    653679
    654680        /**
    655          * {@internal Missing Short Description}}
     681         * Whether permalinks are being used.
    656682         *
    657          * {@internal Missing Long Description}}
     683         * This can be either rewrite module or permalink in the HTTP query string.
    658684         *
    659685         * @since 1.5.0
    660686         * @access public
    661687         *
    662          * @return unknown
     688         * @return bool True, if permalinks are enabled.
    663689         */
    664690        function using_permalinks() {
    665691                if (empty($this->permalink_structure))
     
    669695        }
    670696
    671697        /**
    672          * {@internal Missing Short Description}}
     698         * Whether permalinks are being used and rewrite module is not enabled.
    673699         *
    674          * {@internal Missing Long Description}}
     700         * Means that permalink links are enabled and index.php is in the URL.
    675701         *
    676702         * @since 1.5.0
    677703         * @access public
    678704         *
    679          * @return unknown
     705         * @return bool
    680706         */
    681707        function using_index_permalinks() {
    682708                if (empty($this->permalink_structure)) {
     
    692718        }
    693719
    694720        /**
    695          * {@internal Missing Short Description}}
     721         * Whether permalinks are being used and rewrite module is enabled.
    696722         *
    697          * {@internal Missing Long Description}}
     723         * Using permalinks and index.php is not in the URL.
    698724         *
    699725         * @since 1.5.0
    700726         * @access public
    701727         *
    702          * @return unknown
     728         * @return bool
    703729         */
    704730        function using_mod_rewrite_permalinks() {
    705731                if ( $this->using_permalinks() && ! $this->using_index_permalinks())
     
    716742         * @since 1.5.0
    717743         * @access public
    718744         *
    719          * @param unknown_type $number
    720          * @return unknown
     745         * @param int $number Index number.
     746         * @return string
    721747         */
    722748        function preg_index($number) {
    723749                $match_prefix = '$';
     
    815841        }
    816842
    817843        /**
    818          * {@internal Missing Short Description}}
     844         * Retrieve date permalink structure, with year, month, and day.
    819845         *
    820          * {@internal Missing Long Description}}
     846         * The permalink structure for the date, if not set already depends on the
     847         * permalink structure. It can be one of three formats. The first is year,
     848         * month, day; the second is day, month, year; and the last format is month,
     849         * day, year. These are matched against the permalink structure for which
     850         * one is used. If none matches, then the default will be used, which is
     851         * year, month, day.
    821852         *
     853         * Prevents post ID and date permalinks from overlapping. In the case of
     854         * post_id, the date permalink will be prepended with front permalink with
     855         * 'date/' before the actual permalink to form the complete date permalink
     856         * structure.
     857         *
    822858         * @since 1.5.0
    823859         * @access public
    824860         *
    825          * @return unknown
     861         * @return bool|string False on no permalink structure. Date permalink structure.
    826862         */
    827863        function get_date_permastruct() {
    828864                if (isset($this->date_structure)) {
     
    869905        }
    870906
    871907        /**
    872          * {@internal Missing Short Description}}
     908         * Retrieve the year permalink structure without month and day.
    873909         *
    874          * {@internal Missing Long Description}}
     910         * Gets the date permalink structure and strips out the month and day
     911         * permalink structures.
    875912         *
    876913         * @since 1.5.0
    877914         * @access public
    878915         *
    879          * @return unknown
     916         * @return bool|string False on failure. Year structure on success.
    880917         */
    881918        function get_year_permastruct() {
    882919                $structure = $this->get_date_permastruct($this->permalink_structure);
     
    894931        }
    895932
    896933        /**
    897          * {@internal Missing Short Description}}
     934         * Retrieve the month permalink structure without day and with year.
    898935         *
    899          * {@internal Missing Long Description}}
     936         * Gets the date permalink structure and strips out the day permalink
     937         * structures. Keeps the year permalink structure.
    900938         *
    901939         * @since 1.5.0
    902940         * @access public
    903941         *
    904          * @return unknown
     942         * @return bool|string False on failure. Year/Month structure on success.
    905943         */
    906944        function get_month_permastruct() {
    907945                $structure = $this->get_date_permastruct($this->permalink_structure);
     
    918956        }
    919957
    920958        /**
    921          * {@internal Missing Short Description}}
     959         * Retrieve the day permalink structure with month and year.
    922960         *
    923          * {@internal Missing Long Description}}
     961         * Keeps date permalink structure with all year, month, and day.
    924962         *
    925963         * @since 1.5.0
    926964         * @access public
    927965         *
    928          * @return unknown
     966         * @return bool|string False on failure. Year/Month/Day structure on success.
    929967         */
    930968        function get_day_permastruct() {
    931969                return $this->get_date_permastruct($this->permalink_structure);
    932970        }
    933971
    934972        /**
    935          * {@internal Missing Short Description}}
     973         * Retrieve the permalink structure for categories.
    936974         *
    937975         * {@internal Missing Long Description}}
    938976         *
    939977         * @since 1.5.0
    940978         * @access public
    941979         *
    942          * @return unknown
     980         * @return bool|string False on failure. Category permalink structure.
    943981         */
    944982        function get_category_permastruct() {
    945983                if (isset($this->category_structure)) {
     
    9621000        }
    9631001
    9641002        /**
    965          * {@internal Missing Short Description}}
     1003         * Retrieve the permalink structure for tags.
    9661004         *
    9671005         * {@internal Missing Long Description}}
    9681006         *
    9691007         * @since 2.3.0
    9701008         * @access public
    9711009         *
    972          * @return unknown
     1010         * @return bool|string False on failure. Tag permalink structure.
    9731011         */
    9741012        function get_tag_permastruct() {
    9751013                if (isset($this->tag_structure)) {
     
    9911029                return $this->tag_structure;
    9921030        }
    9931031
     1032        /**
     1033         * Retrieve extra permalink structure by name.
     1034         *
     1035         * @since unknown
     1036         * @access public
     1037         *
     1038         * @param string $name Permalink structure name.
     1039         * @return string|bool False if not found. Permalink structure string.
     1040         */
    9941041        function get_extra_permastruct($name) {
    9951042                if ( isset($this->extra_permastructs[$name]) )
    9961043                        return $this->extra_permastructs[$name];
     
    9981045        }
    9991046
    10001047        /**
    1001          * {@internal Missing Short Description}}
     1048         * Retrieve the author permalink structure.
    10021049         *
    1003          * {@internal Missing Long Description}}
     1050         * The permalink structure is front property, author base, and finally
     1051         * '/%author%'. Will set the author_structure property and then return it
     1052         * without attempting to set the value again.
    10041053         *
    10051054         * @since 1.5.0
    10061055         * @access public
    10071056         *
    1008          * @return unknown
     1057         * @return string|bool False if not found. Permalink structure string.
    10091058         */
    10101059        function get_author_permastruct() {
    10111060                if (isset($this->author_structure)) {
     
    10231072        }
    10241073
    10251074        /**
    1026          * {@internal Missing Short Description}}
     1075         * Retrieve the search permalink structure.
    10271076         *
    1028          * {@internal Missing Long Description}}
     1077         * The permalink structure is root property, search base, and finally
     1078         * '/%search%'. Will set the search_structure property and then return it
     1079         * without attempting to set the value again.
    10291080         *
    10301081         * @since 1.5.0
    10311082         * @access public
    10321083         *
    1033          * @return unknown
     1084         * @return string|bool False if not found. Permalink structure string.
    10341085         */
    10351086        function get_search_permastruct() {
    10361087                if (isset($this->search_structure)) {
     
    10481099        }
    10491100
    10501101        /**
    1051          * {@internal Missing Short Description}}
     1102         * Retrieve the page permalink structure.
    10521103         *
    1053          * {@internal Missing Long Description}}
     1104         * The permalink structure is root property, and '%pagename%'. Will set the
     1105         * page_structure property and then return it without attempting to set the
     1106         * value again.
    10541107         *
    10551108         * @since 1.5.0
    10561109         * @access public
    10571110         *
    1058          * @return unknown
     1111         * @return string|bool False if not found. Permalink structure string.
    10591112         */
    10601113        function get_page_permastruct() {
    10611114                if (isset($this->page_structure)) {
     
    10731126        }
    10741127
    10751128        /**
    1076          * {@internal Missing Short Description}}
     1129         * Retrieve the feed permalink structure.
    10771130         *
    1078          * {@internal Missing Long Description}}
     1131         * The permalink structure is root property, feed base, and finally
     1132         * '/%feed%'. Will set the feed_structure property and then return it
     1133         * without attempting to set the value again.
    10791134         *
    10801135         * @since 1.5.0
    10811136         * @access public
    10821137         *
    1083          * @return unknown
     1138         * @return string|bool False if not found. Permalink structure string.
    10841139         */
    10851140        function get_feed_permastruct() {
    10861141                if (isset($this->feed_structure)) {
     
    10981153        }
    10991154
    11001155        /**
    1101          * {@internal Missing Short Description}}
     1156         * Retrieve the comment feed permalink structure.
    11021157         *
    1103          * {@internal Missing Long Description}}
     1158         * The permalink structure is root property, comment base property, feed
     1159         * base and finally '/%feed%'. Will set the comment_feed_structure property
     1160         * and then return it without attempting to set the value again.
    11041161         *
    11051162         * @since 1.5.0
    11061163         * @access public
    11071164         *
    1108          * @return unknown
     1165         * @return string|bool False if not found. Permalink structure string.
    11091166         */
    11101167        function get_comment_feed_permastruct() {
    11111168                if (isset($this->comment_feed_structure)) {
     
    11501207        }
    11511208
    11521209        /**
    1153          * Generate the rules from permalink structure
     1210         * Generate the rules from permalink structure.
    11541211         *
    11551212         * {@internal Missing Long Description}}
    11561213         *
     
    16401697                $wp->add_query_var($name);
    16411698        }
    16421699
     1700        /**
     1701         * {@internal Missing Short Description}}
     1702         *
     1703         * {@internal Missing Long Description}}
     1704         *
     1705         * @since unknown
     1706         * @access public
     1707         *
     1708         * @param unknown_type $name
     1709         * @param unknown_type $struct
     1710         * @param unknown_type $with_front
     1711         */
    16431712        function add_permastruct($name, $struct, $with_front = true) {
    16441713                if ( $with_front )
    16451714                        $struct = $this->front . $struct;
     
    16471716        }
    16481717
    16491718        /**
    1650          * {@internal Missing Short Description}}
     1719         * Remove rewrite rules and then recreate rewrite rules.
    16511720         *
    1652          * {@internal Missing Long Description}}
     1721         * Calls {@link WP_Rewrite::wp_rewrite_rules()} after removing the
     1722         * 'rewrite_rules' option. If the function named 'save_mod_rewrite_rules'
     1723         * exists, it will be called.
    16531724         *
    16541725         * @since 2.0.1
    16551726         * @access public
     
    17021773        }
    17031774
    17041775        /**
    1705          * {@internal Missing Short Description}}
     1776         * Set the main permalink structure for the blog.
    17061777         *
    1707          * {@internal Missing Long Description}}
     1778         * Will update the 'permalink_structure' option, if there is a difference
     1779         * between the current permalink structure and the parameter value. Calls
     1780         * {@link WP_Rewrite::init()} after the option is updated.
    17081781         *
    17091782         * @since 1.5.0
    17101783         * @access public
    17111784         *
    1712          * @param unknown_type $permalink_structure
     1785         * @param string $permalink_structure Permalink structure.
    17131786         */
    17141787        function set_permalink_structure($permalink_structure) {
    17151788                if ($permalink_structure != $this->permalink_structure) {
     
    17191792        }
    17201793
    17211794        /**
    1722          * {@internal Missing Short Description}}
     1795         * Set the category base for the category permalink.
    17231796         *
    1724          * {@internal Missing Long Description}}
     1797         * Will update the 'category_base' option, if there is a difference between
     1798         * the current category base and the parameter value. Calls
     1799         * {@link WP_Rewrite::init()} after the option is updated.
    17251800         *
    17261801         * @since 1.5.0
    17271802         * @access public
    17281803         *
    1729          * @param unknown_type $category_base
     1804         * @param string $category_base Category permalink structure base.
    17301805         */
    17311806        function set_category_base($category_base) {
    17321807                if ($category_base != $this->category_base) {
     
    17361811        }
    17371812
    17381813        /**
    1739          * {@internal Missing Short Description}}
     1814         * Set the tag base for the tag permalink.
    17401815         *
    1741          * {@internal Missing Long Description}}
     1816         * Will update the 'tag_base' option, if there is a difference between the
     1817         * current tag base and the parameter value. Calls
     1818         * {@link WP_Rewrite::init()} after the option is updated.
    17421819         *
    17431820         * @since 2.3.0
    17441821         * @access public
    17451822         *
    1746          * @param unknown_type $tag_base
     1823         * @param string $tag_base Tag permalink structure base.
    17471824         */
    17481825        function set_tag_base( $tag_base ) {
    17491826                if ( $tag_base != $this->tag_base ) {
     
    17531830        }
    17541831
    17551832        /**
    1756          * {@internal Missing Short Description}}
     1833         * PHP4 Constructor - Calls init(), which runs setup.
    17571834         *
    1758          * {@internal Missing Long Description}}
    1759          *
    17601835         * @since 1.5.0
    17611836         * @access public
    17621837         *