ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` function content_countdown($atts, $content = null) { extract(shortcode_atts(array( 'month' => '', 'day' => '', 'year' => '' ), $atts)); $remain = ceil((mktime( 0,0,0,(int)$month,(int)$day,(int)$year) - time())/86400); if( $remain > 1 ) { return $daysremain = "<div class=\"event\">Just <b>($remain)</b> days until content is available</div>"; } else if($remain == 1 ) { return $daysremain = "<div class=\"event\">Just <b>($remain)</b> day until content is available</div>"; } else { return $content; } } add_shortcode('cdt', 'content_countdown'); ```