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.8

apply_filters('wp_feed_cache_transient_lifetime') is found 2 times:

  • /wp-includes/class-wp-feed-cache-transient.php line 70
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
         *
         * @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 832
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    $feed->set_file_class( 'WP_SimplePie_File' );
     
    $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: