wpsc_register_post_types_products_args

Located in: wpsc-functions.php

Functions that call this hook: wpsc_register_post_types()

Arguments Accepted: $args

Version Introduced: 3.8.9

Description: Use this filter to modify Product custom post type.

Code in context:

[php firstline=”330″ highlight=”362″]

// Products

$labels = array(

‘name’ => _x( ‘Products’ , ‘post type name’ , ‘wpsc’ ),

‘singular_name’ => _x( ‘Product’ , ‘post type singular name’ , ‘wpsc’ ),

‘add_new’ => _x( ‘Add New’ , ‘admin menu: add new product’, ‘wpsc’ ),

‘add_new_item’ => __( ‘Add New Product’ , ‘wpsc’ ),

‘edit_item’ => __( ‘Edit Product’ , ‘wpsc’ ),

‘new_item’ => __( ‘New Product’ , ‘wpsc’ ),

‘view_item’ => __( ‘View Product’ , ‘wpsc’ ),

‘search_items’ => __( ‘Search Products’ , ‘wpsc’ ),

‘not_found’ => __( ‘No products found’ , ‘wpsc’ ),

‘not_found_in_trash’ => __( ‘No products found in Trash’, ‘wpsc’ ),

‘menu_name’ => __( ‘Products’ , ‘wpsc’ ),

‘parent_item_colon’ => ”,

);

$args = array(

‘capability_type’ => ‘post’,

‘supports’ => array( ‘title’, ‘editor’, ‘thumbnail’ ),

‘hierarchical’ => true,

‘exclude_from_search’ => false,

‘public’ => true,

‘show_ui’ => true,

‘show_in_nav_menus’ => true,

‘menu_icon’ => WPSC_CORE_IMAGES_URL . "/credit_cards.png",

‘labels’ => $labels,

‘query_var’ => true,

‘register_meta_box_cb’ => ‘wpsc_meta_boxes’,

‘rewrite’ => array(

‘slug’ => $wpsc_page_titles[‘products’] . ‘/%wpsc_product_category%’,

‘with_front’ => false

)

);

$args = apply_filters( ‘wpsc_register_post_types_products_args’, $args );

register_post_type( ‘wpsc-product’, $args );

[/php]