Changeset 19738 for trunk/wp-includes/post.php
- Timestamp:
- 01/23/2012 07:12:04 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r19734 r19738 894 894 * - labels - An array of labels for this post type. By default post labels are used for non-hierarchical 895 895 * types and page labels for hierarchical ones. You can see accepted values in {@link get_post_type_labels()}. 896 * - permalink_epmask - The default rewrite endpoint bitmasks.897 896 * - has_archive - True to enable post type archives. Will generate the proper rewrite rules if rewrite is enabled. 898 897 * - rewrite - false to prevent rewrite. Defaults to true. Use array('slug'=>$slug) to customize permastruct; 899 * default will use $post_type as slug. Other options include 'with_front', 'feeds', and 'pages'.898 * default will use $post_type as slug. Other options include 'with_front', 'feeds', 'pages', and 'ep_mask'. 900 899 * - query_var - false to prevent queries, or string to value of the query var to use for this post type 901 900 * - can_export - true allows this post type to be exported. … … 925 924 'supports' => array(), 'register_meta_box_cb' => null, 926 925 'taxonomies' => array(), 'show_ui' => null, 'menu_position' => null, 'menu_icon' => null, 927 ' permalink_epmask' => EP_PERMALINK, 'can_export' => true,926 'can_export' => true, 928 927 'show_in_nav_menus' => null, 'show_in_menu' => null, 'show_in_admin_bar' => null, 929 928 ); … … 1000 999 if ( ! isset( $args->rewrite['feeds'] ) || ! $args->has_archive ) 1001 1000 $args->rewrite['feeds'] = (bool) $args->has_archive; 1001 if ( ! isset( $args->rewrite['ep_mask'] ) ) { 1002 if ( isset( $args['permalink_epmask'] ) ) 1003 $args->rewrite['ep_mask'] = $args['permalink_epmask']; 1004 else 1005 $args->rewrite['ep_mask'] = EP_PERMALINK; 1006 } 1002 1007 1003 1008 if ( $args->hierarchical ) … … 1023 1028 } 1024 1029 1025 $wp_rewrite->add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite['with_front'], $args->permalink_epmask);1030 $wp_rewrite->add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite['with_front'], $args->rewrite['ep_mask'] ); 1026 1031 } 1027 1032
Note: See TracChangeset
for help on using the changeset viewer.