Description
Display form to add a custom post type
Usage
oik_cpt_add_oik_cpt();Parameters
Returns
voidSource
File name: oik-types/admin/oik-types.phpLines:
1 to 18 of 18
function oik_cpt_add_oik_cpt( ) { global $bw_type; //print_r( $bw_type); if ( null === $bw_type ) { _oik_cpt_type_validate(); } bw_form(); stag( "table", "wide-fat" ); bw_textfield( "type", 20, "Post type", $bw_type['args']['type'] ); bw_textfield( "label", 20, "Plural label", $bw_type['args']['label'] ); $singular_name = bw_return_singular_name( $bw_type['args'] ); bw_textfield( "singular_name", 20, "Singular label", $singular_name ); bw_textarea( "description", 100, "Description", stripslashes( $bw_type['args']['description'] ), 2 ); oik_cpt_edit_type_fields( $bw_type ); etag( "table" ); p( isubmit( "_oik_cpt_add_oik_cpt", "Add new type", null, "button-primary" ) ); etag( "form" ); }View on GitHub
Called by
Invoked by
Calls
1 to 9 of 9
- bw_form() – Start a form
- bw_return_singular_name() – Return the singular name for the post_type, if defined
- bw_textarea() – Form a "textarea" field
- bw_textfield() – Form a text field
- etag() – Output an end tag
- isubmit() – Create a submit button
- oik_cpt_edit_type_fields() –
- p() – Output a paragraph of translatable text
- stag() – Output an HTML opening tag
