comment_exists() from skeltoac. fixes #1679
git-svn-id: http://svn.automattic.com/wordpress/trunk@2879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a0ea9e4466
commit
7d7b930e17
|
@ -478,7 +478,6 @@ function wp_delete_user($id, $reassign = 'novalue') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function post_exists($title, $content = '', $post_date = '') {
|
function post_exists($title, $content = '', $post_date = '') {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
|
@ -493,6 +492,13 @@ function post_exists($title, $content = '', $post_date = '') {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function comment_exists($comment_author, $comment_date) {
|
||||||
|
global $wpdb;
|
||||||
|
|
||||||
|
return $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments
|
||||||
|
WHERE comment_author = '$comment_author' AND comment_date = '$comment_date'");
|
||||||
|
}
|
||||||
|
|
||||||
function url_shorten ($url) {
|
function url_shorten ($url) {
|
||||||
$short_url = str_replace('http://', '', stripslashes($url));
|
$short_url = str_replace('http://', '', stripslashes($url));
|
||||||
$short_url = str_replace('www.', '', $short_url);
|
$short_url = str_replace('www.', '', $short_url);
|
||||||
|
|
Loading…
Reference in New Issue