Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_feed_cache_transient_lifetime

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
27           $lifetime = $this->lifetime;
28           /**
29            * Filter the transient lifetime of the feed cache.
30            *
31            * @since 2.8.0
32            *
33            * @param int    $lifetime Cache duration in seconds. Default is 43200 seconds (12 hours).
34            * @param string $filename Unique identifier for the cache object.
35            */
36           $this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $filename);
37      }
38
39      /**
40       * @access public
41       */
42      public function save($data) {
43           if ( $data instanceof SimplePie ) {
44                $data = $data->data;
45           }