WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
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 | function save($data) { |
40 | if ( is_a($data, 'SimplePie') ) |
41 | $data = $data->data; |
42 |
|
43 | set_transient($this->name, $data, $this->lifetime); |
44 | set_transient($this->mod_name, time(), $this->lifetime); |
45 | return true; |