Title: [193387] trunk/Websites/webkit.org
- Revision
- 193387
- Author
- j...@apple.com
- Date
- 2015-12-03 16:23:09 -0800 (Thu, 03 Dec 2015)
Log Message
Fixed transient behavior when the cache plugin is enabled.
* wp-content/themes/webkit/functions.php:
* wp-content/themes/webkit/includes.php:
* wp-content/themes/webkit/nightly.php:
Modified Paths
Diff
Modified: trunk/Websites/webkit.org/ChangeLog (193386 => 193387)
--- trunk/Websites/webkit.org/ChangeLog 2015-12-04 00:11:32 UTC (rev 193386)
+++ trunk/Websites/webkit.org/ChangeLog 2015-12-04 00:23:09 UTC (rev 193387)
@@ -1,5 +1,13 @@
2015-12-03 Jonathan Davis <j...@apple.com>
+ Fixed transient behavior when the cache plugin is enabled.
+
+ * wp-content/themes/webkit/functions.php:
+ * wp-content/themes/webkit/includes.php:
+ * wp-content/themes/webkit/nightly.php:
+
+2015-12-03 Jonathan Davis <j...@apple.com>
+
Add sub-section anchors to code style guidelines
https://bugs.webkit.org/show_bug.cgi?id=151770
Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php (193386 => 193387)
--- trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php 2015-12-04 00:11:32 UTC (rev 193386)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php 2015-12-04 00:23:09 UTC (rev 193387)
@@ -92,6 +92,11 @@
return $content;
}
+function is_super_cache_enabled() {
+ global $super_cache_enabled;
+ return (isset($super_cache_enabled) && true === $super_cache_enabled);
+}
+
function tag_post_image_luminance( $post_id ) {
$threshold = 128;
$tags = array();
Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/includes.php (193386 => 193387)
--- trunk/Websites/webkit.org/wp-content/themes/webkit/includes.php 2015-12-04 00:11:32 UTC (rev 193386)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/includes.php 2015-12-04 00:23:09 UTC (rev 193387)
@@ -5,16 +5,13 @@
?>
<?php get_header(); ?>
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
-
- <?php
+ <?php if (have_posts()) : while (have_posts()) : the_post();
$path = dirname(ABSPATH);
$file = get_post_meta(get_the_ID(), 'include-markdown', true);
$cachekey = "cached_include_" . $file;
-
- if ( false === ( $content = get_transient($cachekey) ) ) {
+ if ( is_super_cache_enabled() || false === ( $content = get_transient($cachekey) ) ) {
ob_start();
include $path . '/' . $file;
$content = ob_get_clean();
@@ -32,24 +29,24 @@
set_transient($cachekey, $content, DAY_IN_SECONDS);
}
- ?>
+ ?>
<article class="page<?php if ( has_table_of_contents() ) echo ' with-toc';?>" id="post-<?php the_ID(); ?>">
- <h1><a href="" echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h1>
+ <h1><a href="" echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h1>
- <div class="bodycopy">
+ <div class="bodycopy">
<?php table_of_contents(); ?>
<?php
echo apply_filters('the_content', $content);
?>
- </div>
+ </div>
</article>
- <?php //comments_template(); ?>
+ <?php //comments_template(); ?>
- <?php endwhile; else:
+ <?php endwhile; else:
include('444.php');
- endif; ?>
+ endif; ?>
-<?php get_footer(); ?>
\ No newline at end of file
+<?php get_footer(); ?>
Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/nightly.php (193386 => 193387)
--- trunk/Websites/webkit.org/wp-content/themes/webkit/nightly.php 2015-12-04 00:11:32 UTC (rev 193386)
+++ trunk/Websites/webkit.org/wp-content/themes/webkit/nightly.php 2015-12-04 00:23:09 UTC (rev 193387)
@@ -19,7 +19,7 @@
$type = $types[0];
$cachekey = 'nightly_download_' . $type;
- if ( false !== ( $cached = get_transient($cachekey) ) )
+ if ( is_super_cache_enabled() || false !== ( $cached = get_transient($cachekey) ) )
return json_decode($cached);
$url = "" $type);
@@ -30,7 +30,7 @@
if ( ! empty($data) ) {
$record = explode(',', $data);
- set_transient($cachekey, json_encode($record), DAY_IN_SECONDS);
+ set_transient($cachekey, json_encode($record), HOUR_IN_SECONDS * 6); // Expire every 6 hours
return $record;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes