Example #1
0
/**
 * Outputs hidden fields for comment form with unique IDs, based on post ID, making it safe for AJAX pull.
 *
 */
function cfct_comment_id_fields()
{
    global $id;
    $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
    echo cfct_get_comment_id_fields($id, $replytoid);
}
Example #2
0
 public function comment_id_fields($result, $id, $replytoid)
 {
     // Remove default WP comment ID fields
     $result = '';
     // Add trackback link, since this function renders right next to the submit button
     $result .= ' <span class="comment-form-trackback">' . sprintf(__('or, reply to this post via <a rel="trackback" href="%s">trackback</a>.', self::$i18n), get_trackback_url()) . '</span>';
     // Add our customized comment ID fields
     $result .= cfct_get_comment_id_fields($id, $replytoid);
     return $result;
 }