pre production version :
******************************
Template evolution :
- css ( so much things)
- js ( new navigation tools ...)
- lib for php ZIp
- function.php (for download LDT and other litle function)
- page (header, home, footer, single, search, searchform, post ...)
******************************
New plug in :
- wp touch
- wp explorer
- TextCutter
- ultimate-google-analytics
- nice titles
******************************
Plug in customization :
- related-posts-by-category
- posts-of-current-category
- order-categories
- event-calendar
- translation wp explorer
- exec-php
******************************
Road map for next version :
- cleaning php code
put template function to new plugin
- cleaning Css code
- re organize Js code
- all new correction ask
<?php
/**
* @package Title_Cutter
* @author Samuel Huron
* @version 0.1
*/
/*
Plugin Name: Text Cutter
Plugin URI: http://www.iri.centrepompidou.fr
Description: This is just a simple thing to cut the title visible in navigation and in the page of post.
Author: Samuel Huron
Version: 0.1
Author URI: http://www.cybunk.com/
*/
function Expert_without_BR ($content){
$symbole= "<br/>";
return (str_replace($symbole, "", $content)." YO");
}
function Title_Cutter($content){
$length = 200;
$symbole= "<!-- cut -->";
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);
?>