You appear to be a bot. Output may be restricted
Description
Register or update a custom post typeFields, categories and taxonomies are registered separately
Usage
oikcpt_register_post_type( $type, $data );
Parameters
- $type
- ( string ) required – the post type – expected to be lower case – sanitize_key
- $data
- ( array ) required – registration information from the bw_types options array
Returns
voidSource
File name: oik-types/oik-types.phpLines:
1 to 14 of 14
function oikcpt_register_post_type( $type, $data ) { $args = oikcpt_adjust_args( $data["args"], true ); $type_exists = post_type_exists( $type ); if ( $type_exists ) { bw_update_post_type( $type, $args ); } else { if ( isset( $args['cap'] ) ) { $args['capabilities'] = $args['cap']; unset( $args['cap'] ) ; } unset( $args['labels'] ); bw_register_post_type( $type, $args ); } }View on GitHub