Changes between Version 1 and Version 2 of Ticket #33045, comment 1
- Timestamp:
- 07/20/2015 11:12:59 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33045, comment 1
v1 v2 1 {{{ 2 3 4 function has_parent() { 5 global $post; 6 7 if ( 0 < $post->post_parent ) { 8 return true; 9 } else { 10 return false; 11 } 12 } 13 14 15 16 function parent_page() { 17 global $post; 18 return $post->post_parent; 19 } 20 21 22 23 function is_child_of( $id ) { 24 global $post; 25 26 if( $id == $post->post_parent ) { 27 return true; 28 } else { 29 return false; 30 } 31 } 32 33 }}} 1 See the patch.