WordPress.org

Make WordPress Core

Changeset 34962


Ignore:
Timestamp:
10/08/15 21:48:25 (2 years ago)
Author:
DrewAPicture
Message:

Docs: Mark the optional parameters for WP_Rewrite::generate_rewrite_rules() as such, and improve overall formatting.

Also brings in the list of acceptable constants for the $ep_mask parameter.

See #34218.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-rewrite.php

    r34960 r34962  
    853853     * 
    854854     * @param string $permalink_structure The permalink structure. 
    855      * @param int    $ep_mask             Endpoint mask defining what endpoints are added to the structure. Default is EP_NONE. 
    856      * @param bool   $paged               Should archive pagination rules be added for the structure? Default is true. 
    857      * @param bool   $feed                Should feed rewrite rules be added for the structure? Default is true. 
    858      * @param bool   $forcomments         Should the feed rules be a query for a comments feed? Default is false. 
    859      * @param bool   $walk_dirs           Should the 'directories' making up the structure be walked over and rewrite rules 
    860      *                                    built for each in turn? Default is true. 
    861      * @param bool   $endpoints           Should endpoints be applied to the generated rewrite rules? Default is true. 
     855     * @param int    $ep_mask             Optional. Endpoint mask defining what endpoints are added to the structure. 
     856     *                                    Accepts `EP_NONE`, `EP_PERMALINK`, `EP_ATTACHMENT`, `EP_DATE`, `EP_YEAR`, 
     857     *                                    `EP_MONTH`, `EP_DAY`, `EP_ROOT`, `EP_COMMENTS`, `EP_SEARCH`, `EP_CATEGORIES`, 
     858     *                                    `EP_TAGS`, `EP_AUTHORS`, `EP_PAGES`, `EP_ALL_ARCHIVES`, and `EP_ALL`. 
     859     *                                    Default `EP_NONE`. 
     860     * @param bool   $paged               Optional. Whether archive pagination rules should be added for the structure. 
     861     *                                    Default true. 
     862     * @param bool   $feed                Optional Whether feed rewrite rules should be added for the structure. 
     863     *                                    Default true. 
     864     * @param bool   $forcomments         Optional. Whether the feed rules should be a query for a comments feed. 
     865     *                                    Default false. 
     866     * @param bool   $walk_dirs           Optional. Whether the 'directories' making up the structure should be walked 
     867     *                                    over and rewrite rules built for each in-turn. Default true. 
     868     * @param bool   $endpoints           Optional. Whether endpoints should be applied to the generated rewrite rules. 
     869     *                                    Default true. 
    862870     * @return array Rewrite rule list. 
    863871     */ 
     
    16741682     * it is an easy way of expressing a set of regular expressions that rewrite to a set of 
    16751683     * query strings. The new permastruct is added to the WP_Rewrite::$extra_permastructs array. 
     1684     * 
    16761685     * When the rewrite rules are built by WP_Rewrite::rewrite_rules(), all of these extra 
    16771686     * permastructs are passed to WP_Rewrite::generate_rewrite_rules() which transforms them 
     
    18001809        if ( $this->using_index_permalinks() ) 
    18011810            $this->root = $this->index . '/'; 
     1811 
    18021812        unset($this->author_structure); 
    18031813        unset($this->date_structure); 
Note: See TracChangeset for help on using the changeset viewer.