Skip to content
Browse files

WP_OnceForm takes a form string in addition to func

  • Loading branch information...
1 parent 5ef8870 commit 041609ade4f4041c4bd7bfbefc76d9428e2e1a2a @CaptainN CaptainN committed Dec 17, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 WP_OnceForm.php
View
5 WP_OnceForm.php
@@ -33,7 +33,10 @@ public function __construct( $form_func = NULL, $validator = NULL, $action = -1
{
if ( !is_null( $form_func ) )
{
- $this->add_form_func( $form_func );
+ if ( is_callable( $form_func ) )
+ $this->add_form_func( $form_func );
+ elseif ( is_string( $form_func ) )
+ $this->parse_form( $form_func );
$this->insert_nonce( $action );

0 comments on commit 041609a

Please sign in to comment.
Something went wrong with that request. Please try again.