| 1812 | |
| 1813 | if ( !function_exists('wp_set_comment_cookie') ) : |
| 1814 | /** |
| 1815 | * Sets the cookies used to store an unauthenticated commentator's identity. Typically used |
| 1816 | * to recall previous comments by this commentator that are still held in moderation. |
| 1817 | * |
| 1818 | * @param string $author Comment author's name |
| 1819 | * @param string $email Comment author's e-mail address |
| 1820 | * @param string $url Comment author's URL (typically optional) |
| 1821 | * |
| 1822 | * @uses apply_filters() Calls 'comment_cookie_lifetime' to adjust lifetime of these cookies |
| 1823 | * |
| 1824 | */ |
| 1825 | function wp_set_comment_cookie($author,$email,$url) { |
| 1826 | $comment_cookie_lifetime = apply_filters('comment_cookie_lifetime', 30000000); |
| 1827 | setcookie('comment_author_' . COOKIEHASH, $author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); |
| 1828 | setcookie('comment_author_email_' . COOKIEHASH, $email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); |
| 1829 | setcookie('comment_author_url_' . COOKIEHASH, esc_url($url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN); |
| 1830 | } |
| 1831 | endif; |