Learndash_Admin_Post_Edit::filter_post_parent

Learndash_Admin_Post_Edit::filter_post_parent( integer $post_parent,  integer $post_id,  array $new_postarr = array(),  array $postarr = array() )

Filter post_parent before update/insert. Ensure the post_parent fiel is zero for course post types.


Description #


Parameters #

$post_parent

(integer) (Required) Post Parent post ID.

$post_id

(integer) (Required) Post ID being edited.

$new_postarr

(array) (Optional) Array of updated POST fields to be saved.

Default value: array()

$postarr

(array) (Optional) Array of previous POST fields to be saved.

Default value: array()


Return #

(integer) $post_parent


Source #

File: includes/admin/class-learndash-admin-posts-edit.php


Changelog #

Changelog
Version Description
3.1 Introduced.