// Modifier les droits de l'auteur pour qu'il puisse ajouter des videos
// http://www.filluzeau.com/654-wordpress-publier-des-videos-embed-en-auteur.html
// Récupérer le rôle auteur
$role = get_role( 'author' );
// Autoriser le code html pour ce rôle
$role->add_cap( 'unfiltered_html' );
// Ne pas compter les pings dans les commentaires
// http://www.geekpress.fr/wordpress/astuce/nombre-total-commentaires-sans-pingbacks-trackbacks-694/
add_filter('get_comments_number', 'gkp_comment_count', 0);
function gkp_comment_count( $count ) {
if ( !is_admin() ) {
global $id;
$comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));
return count($comments_by_type['comment']);
} else {
return $count;
}
}
// Fonction pour afficher la date
// sous le titre et le nom d'auteur
// https://wordpress.org/support/topic/twenty-twelve-how-to-modify-author-link-in-byline
function abyline_posted_on() {
$link= esc_url( get_permalink() );
$title= esc_attr( get_the_title() );
$time= esc_attr( get_the_time() );
$dateGMT= esc_attr( get_the_date( 'c' ) );
$date= esc_html( get_the_date() );
$authorURL= esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );
$author= esc_html( get_the_author() );
// echo ('');
//echo ('Publié le ' .$date. par '.$author.'' );
echo ('Publié le '.$date.' - par '.$author.'');
}
// ne pas afficher la version de WordPress
remove_action("wp_head", "wp_generator");
// Ne pas afficher les messages d'erreur
add_filter('login_errors',create_function('$a', "return null;"));
?> Warning: Cannot modify header information - headers already sent by (output started at /datas/vol4/yulpa164326/var/www/fablab-utopi.org/htdocs/wp-content/themes/twentytwelve-child/functions.php:1) in /datas/vol4/yulpa164326/var/www/fablab-utopi.org/htdocs/wp-includes/pluggable.php on line 1427
Warning: Cannot modify header information - headers already sent by (output started at /datas/vol4/yulpa164326/var/www/fablab-utopi.org/htdocs/wp-content/themes/twentytwelve-child/functions.php:1) in /datas/vol4/yulpa164326/var/www/fablab-utopi.org/htdocs/wp-includes/pluggable.php on line 1430