Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Post_Relationships::delete_relationships( obj $post, array $data )
Delete / Trash posts related to the deleted post
Description Description
Parameters Parameters
- $post
-
(obj) (Required) WP Post that's been deleted
- $data
-
(array) (Required) relationship data array
Return Return
(void)
Source Source
File: includes/class.llms.post.relationships.php
private function delete_relationships( $post, $data ) { $relationships = $this->get_related_posts( $post->ID, $data['post_type'], $data['meta_key'] ); $force = ( 'delete' === $data['action'] ); foreach ( $relationships as $id ) { wp_delete_post( $id, $force ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.12 | Introduced. |