Filters the human-readable difference between two timestamps.
Filtre la différence lisible par l'homme entre deux horodatages.
$text = '', $post = null
Sortie :
@param string $since The difference in human-readable text. @param int $diff The difference in seconds. @param int $from Unix timestamp from which the difference begins. @param int $to Unix timestamp to end the time difference. @param string $text Optional. The excerpt. If set to empty, an excerpt is generated. @param WP_Post|object|int $post Optional. WP_Post instance or Post ID/object. Default null. @return string The excerpt.
add_filter('wp_trim_excerpt', 'custom_excerpt_length');
function custom_excerpt_length($excerpt) {
return substr($excerpt, 0, 100) . '...';
}
Chargement des actualités...