Forums
-
- Forum
- Posts
-
- Installation
- 28,499
- Troubleshooting
- 62,655
- Themes
- 10,431
- Plugins
- 15,360
- Requests & Feedback
- 14,973
- Showcase
- 3,256
-
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