From aad8b9805ec9239b3e40f99f7e002aa07a74dcb6 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 26 Aug 2016 17:52:05 +0000 Subject: [PATCH] Load: remove `class-feed.php` (There is no class named `Feed` or `WP_Feed`, it just loads other classes) and, instead, move the `require` calls to the only place they are ever included: inside `fetch_feed()`. This simplifies the include path. Tested with this feed in a widget: `http://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml`. See #36335. git-svn-id: https://develop.svn.wordpress.org/trunk@38374 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/update-core.php | 1 + src/wp-includes/class-feed.php | 15 --------------- src/wp-includes/feed.php | 10 ++++++++-- 3 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 src/wp-includes/class-feed.php diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php index d18675b797..f6e83aff26 100644 --- a/src/wp-admin/includes/update-core.php +++ b/src/wp-admin/includes/update-core.php @@ -706,6 +706,7 @@ $_old_files = array( // 4.6 'wp-admin/includes/class-wp-automatic-upgrader.php', // Wrong file name, see #37628. // 4.7 +'wp-includes/class-feed.php', 'wp-includes/locale.php', 'wp-includes/session.php', ); diff --git a/src/wp-includes/class-feed.php b/src/wp-includes/class-feed.php deleted file mode 100644 index 04ceb4d8eb..0000000000 --- a/src/wp-includes/class-feed.php +++ /dev/null @@ -1,15 +0,0 @@ -set_file_class( 'WP_SimplePie_File' ); $feed->set_feed_url( $url ); - /** This filter is documented in wp-includes/class-feed.php */ + /** 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.