Deletes sub-components of a form that is about to be deleted.
Description
See also
Parameters
- $post_id
-
(int) (Required) Post ID. Will only be handled if a form ID.
Source
File: src/db-objects/forms/form-manager.php
protected function maybe_delete_form_subcomponents( $post_id ) { $form = $this->get( $post_id ); if ( ! $form ) { return; } $containers = $form->get_containers(); foreach ( $containers as $container ) { $container->delete(); } $submissions = $form->get_submissions(); foreach ( $submissions as $submission ) { $submission->delete(); } }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |