function tube_getcustomfield($filedname, $page_current_id = NULL)
{
if($page_current_id==NULL)
$page_current_id = get_page_id();
$value = get_post_meta($page_current_id, $filedname, true);
return $value;
}
function tube_get_limited_string($output, $max_char)
{
$output = str_replace(']]>', ']]>', $output);
$output = strip_tags($output);
if ((strlen($output)>$max_char) && ($espacio = strpos($output, " ", $max_char )))
{
$output = substr($output, 0, $espacio).'...';
return $output;
}
else
{
return $output;
}
}