Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $labels = array(
- 'name' => _x( 'Products', 'post type general name', 'dp-marketplace' ),
- 'singular_name' => _x( 'Product', 'post type singular name', 'dp-marketplace' ),
- 'add_new' => _x( 'Add Product', 'Product', 'dp-marketplace' ),
- 'add_new_item' => __( 'Create New Product', 'dp-marketplace' ),
- 'edit_item' => __( 'Edit Product', 'dp-marketplace' ),
- 'new_item' => __( 'New Product', 'dp-marketplace' ),
- 'all_items' => __( 'All Products', 'dp-marketplace' ),
- 'view_item' => __( 'View Product', 'dp-marketplace' ),
- 'search_items' => __( 'Search Products', 'dp-marketplace' ),
- 'not_found' => __( 'No products found', 'dp-marketplace' ),
- 'not_found_in_trash' => __( 'No products found in Trash', 'dp-marketplace' ),
- 'parent_item_colon' => '',
- 'menu_name' => __( 'Products', 'dp-marketplace' )
- );
- $args = array(
- 'labels' => $labels,
- 'description' => __( 'Custom user uploads for sale.', 'dp-marketplace' ),
- 'public' => TRUE,
- 'exclude_from_search' => FALSE,
- 'publicly_queryable' => TRUE,
- 'show_ui' => TRUE,
- 'show_in_nav_menus' => TRUE,
- 'show_in_menu' => TRUE,
- 'show_in_admin_bar' => TRUE,
- 'menu_position' => 1976,
- 'capability_type' => 'product',
- 'capabilities' => array(
- 'edit_post' => 'edit_product',
- 'edit_posts' => 'edit_products',
- 'edit_others_posts' => 'edit_others_products',
- 'delete_post' => 'delete_product',
- 'delete_posts' => 'delete_products',
- 'delete_others_posts' => 'delete_others_products',
- 'publish_posts' => 'publish_products',
- 'read_post' => 'read_product',
- 'read_private_posts' => 'read_private_products'
- ),
- 'hierarchical' => FALSE, // Does not list posts in admin if set to true
- 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'page-attributes' ),
- 'register_meta_box_cb' => '',
- 'taxonomies' => array( 'tags' ),
- 'has_archive' => TRUE,
- 'rewrite' => array(
- 'slug' => 'product',
- 'with_front' => TRUE,
- 'feeds' => TRUE,
- 'pages' => TRUE
- ),
- 'query_var' => TRUE,
- 'can_export' => TRUE,
- '_builtin' => false
- );
- register_post_type( 'product', $args );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement