wp_feed_cache_transient_lifetime

wp_feed_cache_transient_lifetime

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.9

apply_filters('wp_feed_cache_transient_lifetime') is found 2 times:

  • /wp-includes/class-wp-feed-cache-transient.php line 71
    		 *
    		 * @param int    $lifetime Cache duration in seconds. Default is 43200 seconds (12 hours).
    		 * @param string $name     Unique identifier for the cache object.
    		 */
    		$this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $name );
    	}
    
    	/**
    	 * Saves data to the transient.
    	 *
    	 * @since 2.8.0
    
  • /wp-includes/feed.php line 837
    	$feed->get_registry()->register( SimplePie\File::class, 'WP_SimplePie_File', true );
    
    	$feed->set_feed_url( $url );
    	/** This filter is documented in wp-includes/class-wp-feed-cache-transient.php */
    	$feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );
    
    	/**
    	 * Fires just before processing the SimplePie feed object.
    	 *
    	 * @since 3.0.0
    	 *
    

See this hook used in plugins: