I want to make the URL field in my comments to be required (I use this field for something else then a url). Is there a way to do this, without a plugin?
If someone could help me out or point me in the right direction that would be greatly appreciated!
Thanx in advance,
]]>I’d like to identify where in the core files “https://” is added to comment_author_url when a user posts a comment and includes their URL.
Or, failing that, how I can output <?php comment_author_email_url(); ?> without the https:// in front.
Many thanks,
Dan
]]><?php
$commenter_url = $wpdb->get_var("SELECT comment_author_url
FROM wp_comments
ORDER BY comment_author_url
LIMIT 0 , 30");
if(!empty($commenter_url)){
echo "<center><b><font color=#cc66cc>Your web url is, $commenter_url!</font></b></center>";
}else{
echo "<center><b><font color=#cc66cc>No web url available!</font></b></center>";
}
?>
I want to check comment_author_url() function. If it’s empty i want to echo different output.
How i can do this?
]]>Figured something like this:
<?php if (function_exists('comment_author_url_link')) {
echo 'yes';
} else {
echo 'no';
} ?>
…would do the trick, but it displays ‘yes’ no matter whether or not the commenter included a link with their comment.
I had asked a similar question a month or so ago about using an if exists statement with custom fields (link), and scribblerguy was kind enough to help with an undocumented function.
Is there a similar undocumented method of doing this? Or am I missing something really simple?