Changeset 34960
- Timestamp:
- 10/08/2015 09:34:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-rewrite.php
r34958 r34960 395 395 return false; 396 396 } 397 397 398 // If the index is not in the permalink, we're using mod_rewrite. 398 399 return preg_match( '#^/*' . $this->index . '#', $this->permalink_structure ); … … 1685 1686 * @param string $name Name for permalink structure. 1686 1687 * @param string $struct Permalink structure (e.g. category/%category%) 1687 * @param array $args Optional configuration for building the rules from the permalink structure: 1688 * - with_front (bool) - Should the structure be prepended with WP_Rewrite::$front? Default is true. 1689 * - ep_mask (int) - Endpoint mask defining what endpoints are added to the structure. Default is EP_NONE. 1690 * - paged (bool) - Should archive pagination rules be added for the structure? Default is true. 1691 * - feed (bool) - Should feed rewrite rules be added for the structure? Default is true. 1692 * - forcomments (bool) - Should the feed rules be a query for a comments feed? Default is false. 1693 * - walk_dirs (bool) - Should the 'directories' making up the structure be walked over and rewrite 1694 * rules built for each in turn? Default is true. 1695 * - endpoints (bool) - Should endpoints be applied to the generated rewrite rules? Default is true. 1688 * @param array $args { 1689 * Optional. Arguments for building rewrite rules based on the permalink structure. 1690 * Default empty array. 1691 * 1692 * @type bool $with_front Whether the structure should be prepended with `WP_Rewrite::$front`. 1693 * Default true. 1694 * @type int $ep_mask The endpoint mask defining which endpoints are added to the structure. 1695 * Accepts `EP_NONE`, `EP_PERMALINK`, `EP_ATTACHMENT`, `EP_DATE`, `EP_YEAR`, 1696 * `EP_MONTH`, `EP_DAY`, `EP_ROOT`, `EP_COMMENTS`, `EP_SEARCH`, `EP_CATEGORIES`, 1697 * `EP_TAGS`, `EP_AUTHORS`, `EP_PAGES`, `EP_ALL_ARCHIVES`, and `EP_ALL`. 1698 * Default `EP_NONE`. 1699 * @type bool $paged Whether archive pagination rules should be added for the structure. 1700 * Default true. 1701 * @type bool $feed Whether feed rewrite rules should be added for the structure. Default true. 1702 * @type bool $forcomments Whether the feed rules should be a query for a comments feed. Default false. 1703 * @type bool $walk_dirs Whether the 'directories' making up the structure should be walked over 1704 * and rewrite rules built for each in-turn. Default true. 1705 * @type bool $endpoints Whether endpoints should be applied to the generated rules. Default true. 1706 * } 1696 1707 */ 1697 1708 public function add_permastruct( $name, $struct, $args = array() ) {
Note: See TracChangeset
for help on using the changeset viewer.