-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ajax #2
base: master
Are you sure you want to change the base?
Conversation
); | ||
} | ||
|
||
public function handleRoute(\WP_REST_Request $request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move WP_REST_Request to uses
$errors = $this->form_instance->form->getErrors(); | ||
|
||
if(!empty($errors)){ | ||
$response = new \WP_REST_Response([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move WP_REST_Response to uses
} | ||
|
||
$customResponse = []; | ||
if($this->custom_handler){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use instance of
@@ -0,0 +1,93 @@ | |||
<?php | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless comment
use Develtio\WP\Hoya\Handlers\Step1FormHandleRequest; | ||
|
||
/** | ||
* Class RestApi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless comments
*/ | ||
public $form_instance; | ||
|
||
private $custom_handler = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you are able to add @var CustomHandlerInterface|null
here
p.s.
I do not know what class it should be so I put there CustomHandlerInterface
'create_cpt' => false, // enables / disables creation of CPT | ||
]; | ||
|
||
$instance = new \Develtio\WP\Forms\Modules\Forms\CreateForm('StepFirst', $options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$options has one tab and here is 2 tabs in the same if statement
No description provided.