You appear to be a bot. Output may be restricted
Description
Implement [bw_new] shortcode to allow the creation of a new post through a simple formThe logic implemented here will be similar to the [bw_contact_form] plugin WITH
- authority checking – does the post_type support add_new?
- spam checking – check the content against Akismet
- nonce free support for logged in users? – @TODO – demonstrate this is not a good idea
- @TODO honeypot checking for spam bots
- check if it's OK to do this for the defined post_type – default false
- check the default values for unspecified fields – perhaps WordPress already has the appropriate filters
Usage
$string = bw_new( $atts, $content, $tag );
Parameters
- $atts
- ( array ) optional – array of parameters
- $content
- ( string ) optional – not expected
- $tag
- ( string ) optional – not expected
Returns
string the generated HTMLSource
File name: oik-fields/shortcodes/oik-new.phpLines:
1 to 4 of 4
function bw_new( $atts=null, $content=null, $tag=null ) { bw_display_new_post_form( $atts ); return( bw_ret()); }View on GitHub