Commit be0bee59 authored by Art4's avatar Art4
Browse files

create_function gegen anonyme function ersetzt

parent 5b908e08
......@@ -129,9 +129,13 @@ function ttrss2wp_initialize_feed($feed_url) {
// Get a SimplePie feed object from the specified feed source.
if (function_exists('fetch_feed')) {
//reduce cache period for debugging
add_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', "return " . TTRSS2WP_CACHE_OVERRIDE . ";") );
add_filter('wp_feed_cache_transient_lifetime', function($a) {
return TTRSS2WP_CACHE_OVERRIDE;
});
$rss = fetch_feed($feed_url);
remove_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', "return " . TTRSS2WP_CACHE_OVERRIDE . ";") );
remove_filter('wp_feed_cache_transient_lifetime', function($a) {
return TTRSS2WP_CACHE_OVERRIDE;
});
} else {
throw new ErrorException("TTRSS-to-WP requires Wordpress 2.8 and greater");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment