Re: Can Sticky Get a New Color when something new is posted?
From our fearless leader!
/*
Plugin Name: Recent Stickies
Author: Micheal Adams
Description: Adds a class to recent sticky posts
*/
function recent_sticky_class( $class, $topic_id ) {
$topic = get_topic( $topic_id );
if ( !$topic->topic_sticky )
return $class;
if ( get_topic_start_time( 'timestamp' ) < time() - 604800 )
return $class;
$class[] = 'recent-sticky';
return $class;
}
add_filter( 'topic_class', 'recent_sticky_class', 10, 2 );
Trent