Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function oi_isChildOf($child, $parent_id)
- {
- $currentParent = get_page($child->post_parent);
- while($currentParent) {
- if($currentParent->ID == $parent_id) {
- return true;
- }
- $currentParent = get_page($currentParent->post_parent);
- }
- return false;
- }
Add Comment
Please, Sign In to add comment