diff -r fb7cd02b9848 -r 561aa6d282f6 web/wp-content/plugins/Text_Cutter.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/Text_Cutter.php Mon Feb 01 09:51:57 2010 +0000 @@ -0,0 +1,52 @@ +"; + + return (str_replace($symbole, "", $content)." YO"); +} + +function Title_Cutter($content){ + + $length = 200; + $symbole= ""; + + if(!is_single(get_the_ID())){ + + $lastpos = strrpos($content,$symbole); + + if($lastpos!=FALSE){ + return (substr($content, 0, $lastpos).""); + + } else { + if(strlen($content)>$length){ + return (substr($content, 0, $length)."[...]"); + } else { + return ($content); + } + } + }else{ + return ("".str_replace($symbole, "", $content)); + } + +} + +// Cut +add_action ( 'the_title', 'Title_Cutter'); +//add_action ( 'the_excerpt', 'Expert_without_BR',1); + +?>