This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action ('save_post','purge_redis'); | |
| function purge_redis (){ | |
| include ('predis.php'); | |
| $redis = new Predis\Client(''); | |
| $domain = $_SERVER['HTTP_HOST']; | |
| $url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; | |
| $url = str_replace('?r=y', '', $url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //le chemin de l'image a ajouter | |
| $image_path=''; | |
| //le temps d'expiration' | |
| $expire= time() - 360000; //valable 1 heure | |
| //je vérifie que l'image existe et qu'elle n'est pas expirée | |
| if (file_exists ($image_path) && filemtime($image_path) > $expire) | |
| { | |
| //si elle existe je ne fais rien | |
| } //fin if |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //le chemin de l'image a ajouter | |
| $image_path=''; | |
| //le temps d'expiration' | |
| $expire= time() - 360000; //valable 1 heure | |
| //je vérifie que l'image existe et qu'elle n'est pas expirée | |
| if (file_exists ($image_path) && filemtime($image_path) > $expire) | |
| { | |
| //si elle existe je ne fais rien | |
| } //fin if |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function meta_robots(){ | |
| if(is_home() && get_query_var('paged') > 1)){ | |
| echo '<meta name="robots" content="noindex,follow" />'."\n"; | |
| } | |
| } | |
| add_action('wp_head', 'meta_robots'); |
NewerOlder