Skip to content
Permalink
396bfd4a62
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
20 lines (19 sloc) 452 Bytes
<?php
// private pages
if(!function_exists('is_parent_private')){
function is_parent_private($id){
$page = get_post($id);
if($page->post_parent > 0){
$parent = get_post($page->post_parent);
$private = get_post_meta($parent->ID, 'uc-private', true);
if($private == 'admins' || $private == 'users' || $private == 'list'){
return $parent->ID;
}
else return is_parent_private($parent->ID);
}
else{
return false;
}
}
}
?>