Description
Show the "oik" new post formThis form contains the fields specified in "format" for the required "post_type" with the "format" being determined by the post type in response to "oik_add_new_format_$post_type" filter and the "fields" being determined by the post type in response to "oik_add_new__fields" filter
Usage
_bw_show_new_post_form_oik( $atts );Parameters
- $atts
- ( mixed ) required –
Returns
voidSource
File name: oik-fields/shortcodes/oik-new.phpLines:
1 to 24 of 24
function _bw_show_new_post_form_oik( $atts ) { $post_type = bw_array_get( $atts, "post_type", null ); bw_context( "post_type", $post_type ); $handle = apply_filters( "oik_add_new_{$post_type}", true ); if ( $handle ) { $format = apply_filters( "oik_add_new_format_{$post_type}", bw_add_new_format_default() , $post_type ); $fields = bw_add_new_fields_defaults( $post_type ); $fields = apply_filters( "oik_add_new_fields_{$post_type}", $fields, $post_type ); oik_require( "bobbforms.inc" ); $class = bw_array_get( $atts, "class", "bw_new_post" ); sdiv( $class ); bw_form_tag( $format ); stag( "table" ); bw_form_as_required( $format, $fields ); etag( "table" ); e( wp_nonce_field( "_oik_new_post_form", "_oik_new_post_nonce", false, false ) ); //e( ihidden( "oiku_email_to", $email_to ) ); $text = bw_get_add_new_button_text( $post_type ); e( isubmit( bw_new_post_form_id(), $text, null ) ); etag( "form" ); ediv(); } }View on GitHub
Invoked by
Calls
1 to 13 of 13
- bw_add_new_fields_defaults() – Return all the fields to be used in an "Add new" form
- bw_add_new_format_default() – Return the default format for the "Add new" form
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_context() – Set/return some contextual information
- bw_form_as_required() – Format the "Add new" form as specified by the parameters
- bw_form_tag() – Create the form tag
- bw_get_add_new_button_text() – Display the "Add new" button for the post type.
- bw_new_post_form_id() – Return a unique new post form ID
- ediv() – End a div
- etag() – Output an end tag
- isubmit() – Create a submit button
- sdiv() – Start a div
- stag() – Output an HTML opening tag
Call hooks
1 to 3 of 3
