function get_nightly_source() { return get_nightly_build('source'); }
} $url = sprintf(WEBKIT_NIGHTLY_ARCHIVE_URL, $type); $resource = fopen($url, 'r'); $rawdata = fread($resource, 128); list($data, ) = explode("\n", $rawdata); fclose($resource); if (!empty($data)) { $record = explode(',', $data); set_transient($cachekey, json_encode($record), HOUR_IN_SECONDS * 6); // Expire every 6 hours return $record; } return false; } add_filter('the_content', function ($content) { $build = get_nightly_build(); $source = get_nightly_source(); $content = sprintf($content, $build[0], date(get_option('date_format'), $build[1]), $build[2], $source[0], date(get_option('date_format'), $source[1]), $source[2]); return $content; }); get_header(); ?> <style> body { background: #333333; } .page-color { /*background: #333333;*/ background: linear-gradient(black, #333333 66%); }
<?php /** * Template Name: Nightly Start Page **/ $latest_nightly_build = get_nightly_build(); $latest = intval($latest_nightly_build[0]); $branch = get_query_var('nightly_branch'); $build = intval(get_query_var('nightly_build')); get_header(); add_filter('the_content', function ($content) { $branch = get_query_var('nightly_branch'); $build = intval(get_query_var('nightly_build')); if (empty($Build) || empty($branch) || $build < 11976) { $content = preg_replace('/<p>(.*?)%1\\$s<\\/p>/', '<p></p>', $content); } else { $content = sprintf($content, "r{$build}", $branch); } return $content; }); ?> <style> body { background: #333333; } header { border-bottom-color: transparent; } #nightly {