6, 'message'=>"It's an old post!");
$options = (array) get_option('fcc_oldpost');
$options = array_merge($defaults,$options);
extract($options);
if (strtotime(get_the_time('y-m-d')) <= mktime(0,0,0,date('m')-$months))
if (is_single())
$content = '
'.stripslashes($message).'
'.$content;
return $content;
}
function fcc_oldpost_admin()
{
global $fcc_nonce,$wpdb;
if ( isset($_POST['submit']) )
{
if ( function_exists('current_user_can') && !current_user_can('manage_options') )
die(__('Cheatin’ uh?'));
check_admin_referer($fcc_nonce);
update_option('fcc_oldpost', array(
'months' => intval($wpdb->escape($_POST['months'])),
'message' => htmlentities(strip_tags($_POST['message']))
)
);
}
$fcconfig = get_option('fcc_oldpost');
?>
This plugin give the ability to show a simple warning to a reader that the post is XXX months old.