class-wp-feed-cache.php 996 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Feed API: WP_Feed_Cache class
  4. *
  5. * @package WordPress
  6. * @subpackage Feed
  7. * @since 4.7.0
  8. * @deprecated 5.6.0
  9. */
  10. _deprecated_file(
  11. basename( __FILE__ ),
  12. '5.6.0',
  13. '',
  14. __( 'This file is only loaded for backward compatibility with SimplePie 1.2.x. Please consider switching to a recent SimplePie version.' )
  15. );
  16. /**
  17. * Core class used to implement a feed cache.
  18. *
  19. * @since 2.8.0
  20. *
  21. * @see SimplePie_Cache
  22. */
  23. #[AllowDynamicProperties]
  24. class WP_Feed_Cache extends SimplePie_Cache {
  25. /**
  26. * Creates a new SimplePie_Cache object.
  27. *
  28. * @since 2.8.0
  29. *
  30. * @param string $location URL location (scheme is used to determine handler).
  31. * @param string $filename Unique identifier for cache object.
  32. * @param string $extension 'spi' or 'spc'.
  33. * @return WP_Feed_Cache_Transient Feed cache handler object that uses transients.
  34. */
  35. public function create( $location, $filename, $extension ) {
  36. return new WP_Feed_Cache_Transient( $location, $filename, $extension );
  37. }
  38. }