From 0ebba80c02fbb823c5d248cfda9b90293ee2ec29 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Tue, 3 Dec 2013 18:46:02 +0000 Subject: [PATCH] Twenty Fourteen: remove transient usage in Ephemera widget to fix caching issues. Props obenland, closes #26210 and #26335. git-svn-id: https://develop.svn.wordpress.org/trunk@26577 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentyfourteen/inc/widgets.php | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/wp-content/themes/twentyfourteen/inc/widgets.php b/src/wp-content/themes/twentyfourteen/inc/widgets.php index 8bb90087f7..64b718e340 100644 --- a/src/wp-content/themes/twentyfourteen/inc/widgets.php +++ b/src/wp-content/themes/twentyfourteen/inc/widgets.php @@ -75,22 +75,6 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget { * @return void Echoes its output. */ public function widget( $args, $instance ) { - // If called directly, assign an unique index for caching. - if ( -1 == $this->number ) { - static $num = -1; - $this->_set( --$num ); - } - - $content = get_transient( $this->id ); - - if ( false !== $content ) { - echo $content; - return; - } - - ob_start(); - extract( $args, EXTR_SKIP ); - $format = $instance['format']; $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] ); $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $this->format_strings[ $format ] : $instance['title'], $instance, $this->id_base ); @@ -115,7 +99,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget { $tmp_content_width = $GLOBALS['content_width']; $GLOBALS['content_width'] = 306; - echo $before_widget; + echo $args['before_widget']; ?>

@@ -209,7 +193,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget { →', 'twentyfourteen' ), $this->format_strings[ $format ] ); ?> id, ob_get_flush() ); } /**