ap_have_parent_post( boolean|integer $post_id = false )
Description #
Check if question have a parent post.
Parameters #
- $post_idboolean | integer (Optional) question or answer ID. Default value: false
Source #
File: includes/theme.php
function ap_have_parent_post( $post_id = false ) { if ( ! $post_id ) { $post_id = get_the_ID(); } // Get post. $post_o = ap_get_post( $post_id ); if ( $post_o->post_parent > 0 && 'question' === $post_o->post_type ) { return true; } return false; }
Expand full source code Collapse full source code View on GitHub: includes/theme.php:109
Add your comment