Falcon_Connector_WordPress::get_message_id_for_comment PHP Метод

get_message_id_for_comment() защищенный Метод

Get the Message ID for a comment
protected get_message_id_for_comment ( stdClass $comment ) : string
$comment stdClass Comment object
Результат string Message ID
    protected function get_message_id_for_comment($comment)
    {
        $post = get_post($comment->comment_post_ID);
        $type = $comment->comment_type;
        if (empty($type)) {
            $type = 'comment';
        }
        $left = 'falcon/' . $post->post_type . '/' . $post->ID . '/' . $type . '/' . $comment->comment_ID;
        $right = parse_url(home_url(), PHP_URL_HOST);
        $id = sprintf('<%s@%s>', $left, $right);
        /**
         * Filter message IDs for posts
         *
         * @param string $id Message ID (conforming to RFC5322 Message-ID semantics)
         * @param stdClass $post Post object
         */
        return apply_filters('falcon.connector.wordpress.comment_message_id', $id, $comment);
    }