企业🤖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'); ```