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( WP_Post $post, array $data )

Delete / Trash posts related to the deleted post.


Parameters Parameters

$post

(WP_Post) (Required) WP Post that's been deleted.

$data

(array) (Required) Relationship data array.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.post.relationships.php

	private function delete_relationships( $post, $data ) {

		if ( isset( $data['post_type'] ) && isset( $data['meta_key'] ) ) {

			$this->delete_wp_posts( $post, $data );

		} elseif ( isset( $data['table_name'] ) && isset( $data['table_key'] ) ) {

			$this->delete_table_records( $post, $data );

		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.37.8 Allow for deletion of related items outside the WP core posts table.
3.16.12 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.