Guest User

Untitled

a guest
Dec 15th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. function oi_isChildOf($child, $parent_id)
  2. {
  3.   $currentParent = get_page($child->post_parent);
  4.   while($currentParent) {
  5.     if($currentParent->ID == $parent_id) {
  6.       return true;
  7.     }
  8.     $currentParent = get_page($currentParent->post_parent);
  9.   }
  10.   return false;
  11. }
Add Comment
Please, Sign In to add comment