Ticket #29204: 29204.4.diff
File 29204.4.diff, 1.8 KB (added by , 4 years ago) |
---|
-
src/wp-includes/class-wp-feed-cache.php
5 5 * @package WordPress 6 6 * @subpackage Feed 7 7 * @since 4.7.0 8 * @deprecated 5.6.0 8 9 */ 9 10 11 _deprecated_file( 12 basename( __FILE__ ), 13 '5.6.0', 14 '', 15 __( 'This file is only loaded for backward compatibility with SimplePie 1.2.x. Please consider switching to a recent SimplePie version.' ) 16 ); 17 10 18 /** 11 19 * Core class used to implement a feed cache. 12 20 * -
src/wp-includes/feed.php
789 789 require_once ABSPATH . WPINC . '/class-simplepie.php'; 790 790 } 791 791 792 require_once ABSPATH . WPINC . '/class-wp-feed-cache.php';793 792 require_once ABSPATH . WPINC . '/class-wp-feed-cache-transient.php'; 794 793 require_once ABSPATH . WPINC . '/class-wp-simplepie-file.php'; 795 794 require_once ABSPATH . WPINC . '/class-wp-simplepie-sanitize-kses.php'; … … 801 800 // constructor sets it before we have a chance to set the sanitization class. 802 801 $feed->sanitize = new WP_SimplePie_Sanitize_KSES(); 803 802 804 $feed->set_cache_class( 'WP_Feed_Cache' ); 803 // Register the cache handler using the recommended method for SimplePie 1.3 or later. 804 if ( method_exists( 'SimplePie_Cache', 'register' ) ) { 805 SimplePie_Cache::register( 'wp_transient', 'WP_Feed_Cache_Transient' ); 806 $feed->set_cache_location( 'wp_transient' ); 807 } else { 808 // Back-compat for SimplePie 1.2.x. 809 require_once ABSPATH . WPINC . '/class-wp-feed-cache.php'; 810 $feed->set_cache_class( 'WP_Feed_Cache' ); 811 } 812 805 813 $feed->set_file_class( 'WP_SimplePie_File' ); 806 814 807 815 $feed->set_feed_url( $url );