| 630 | * Retrieve the post ID of the current comment. |
| 631 | * |
| 632 | * @since 0.0.0 |
| 633 | * |
| 634 | * @global object $comment |
| 635 | * |
| 636 | * @param int $comment_ID Optional. The ID of the comment for which to return the post ID. Default current comment ID. |
| 637 | * |
| 638 | * @return int The post ID. |
| 639 | */ |
| 640 | function get_comment_post_ID( $comment_ID = 0 ) { |
| 641 | if ( empty( $comment_ID ) ) { |
| 642 | global $comment; |
| 643 | $comment_post_ID = $comment->comment_post_ID; |
| 644 | } else { |
| 645 | $comment_post_ID = get_comment( $comment_ID )->comment_post_ID; |
| 646 | } |
| 647 | |
| 648 | /** |
| 649 | * Filter the returned post ID. |
| 650 | * |
| 651 | * @since 0.0.0 |
| 652 | * |
| 653 | * @param int $comment_post_ID The comment post ID. |
| 654 | */ |
| 655 | return apply_filters( 'get_comment_post_ID', $comment_post_ID ); |
| 656 | } |
| 657 | |
| 658 | /** |