and this without style:
function ben_ntb_funct_filter_title( $string, $ntb ) {
// filter title news-ticker-benaceur https://benaceur-php.com/?p=1747
$d = date_i18n( 'd/m/Y', strtotime( $ntb[0] ) );
return $d.': '.$string;
}
add_filter( 'ntb_title_filter_ben', 'ben_ntb_funct_filter_title', 10, 3 );
or:
return '[ '.$d.' ] '.$string;
or number of comments:
function ben_ntb_funct_filter_title( $string, $ntb ) {
// filter title news-ticker-benaceur https://benaceur-php.com/?p=1747
$d = $ntb[3];
return '[ comment(s): '.$d.' ] '.$string;
}
add_filter( 'ntb_title_filter_ben', 'ben_ntb_funct_filter_title', 10, 3 );
author:
function ben_ntb_funct_filter_title( $string, $ntb ) {
// filter title news-ticker-benaceur https://benaceur-php.com/?p=1747
$d = $ntb[1];
return '[ author: '.$d.' ] '.$string;
}
add_filter( 'ntb_title_filter_ben', 'ben_ntb_funct_filter_title', 10, 3 );
Date of the last modification of the post:
function ben_ntb_funct_filter_title( $string, $ntb ) {
// filter title news-ticker-benaceur https://benaceur-php.com/?p=1747
$d = date_i18n( 'd/m/Y', strtotime( $ntb[2] ) );
return '[ modified: '.$d.' ] '.$string;
}
add_filter( 'ntb_title_filter_ben', 'ben_ntb_funct_filter_title', 10, 3 );
-
This reply was modified 7 years, 5 months ago by Benaceur.
-
This reply was modified 7 years, 5 months ago by Benaceur.
-
This reply was modified 7 years, 5 months ago by Benaceur.