Changeset 15970
- Timestamp:
- 10/26/2010 07:12:06 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r15937 r15970 862 862 * - has_archive - True to enable post type archives. Will generate the proper rewrite rules if rewrite is enabled. 863 863 * - rewrite - false to prevent rewrite. Defaults to true. Use array('slug'=>$slug) to customize permastruct; 864 * default will use $post_type as slug. Other options include 'with_front' and 'feeds'.864 * default will use $post_type as slug. Other options include 'with_front', 'feeds', and 'pages'. 865 865 * - query_var - false to prevent queries, or string to value of the query var to use for this post type 866 866 * - can_export - true allows this post type to be exported. … … 949 949 if ( ! isset( $args->rewrite['with_front'] ) ) 950 950 $args->rewrite['with_front'] = true; 951 if ( ! isset( $args->rewrite['pages'] ) ) 952 $args->rewrite['pages'] = true; 951 953 if ( ! isset( $args->rewrite['feeds'] ) || ! $args->has_archive ) 952 954 $args->rewrite['feeds'] = (bool) $args->has_archive; … … 965 967 $wp_rewrite->add_rule( "{$archive_slug}/$feeds/?$", "index.php?post_type=$post_type" . '&feed=$matches[1]', 'top' ); 966 968 } 967 $wp_rewrite->add_rule( "{$archive_slug}/page/([0-9]{1,})/?$", "index.php?post_type=$post_type" . '&paged=$matches[1]', 'top' ); 969 if ( $args->rewrite['pages'] ) 970 $wp_rewrite->add_rule( "{$archive_slug}/page/([0-9]{1,})/?$", "index.php?post_type=$post_type" . '&paged=$matches[1]', 'top' ); 968 971 } 969 972
Note: See TracChangeset
for help on using the changeset viewer.