Edit comments improvement, multiple comment delete not implemented yet.

git-svn-id: https://develop.svn.wordpress.org/trunk@887 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2004-02-17 08:35:04 +00:00
parent 5248b39480
commit 86efd149be
4 changed files with 110 additions and 14 deletions

View File

@@ -1,5 +1,15 @@
<?php
function url_shorten ($url) {
$short_url = str_replace('http://', '', stripslashes($url));
$short_url = str_replace('www.', '', $short_url);
if ('/' == substr($short_url, -1))
$short_url = substr($short_url, 0, -1);
if (strlen($short_url) > 35)
$short_url = substr($short_url, 0, 32).'...';
return $short_url;
}
function selected($selected, $current) {
if ($selected == $current) echo ' selected="selected"';
}