`wp_dashboard_cached_rss_widget()` contained some `func_get_args()` code that was indescribably weird.

This keeps it weird, but makes sure that `$check_urls` gets passed to the callback.

Props michalzuber, ocean90.
Fixes #28872.

Built from https://develop.svn.wordpress.org/trunk@29442


git-svn-id: http://core.svn.wordpress.org/trunk@29220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-08-07 21:47:16 +00:00
parent 002541326e
commit 19db9a253d
1 changed files with 2 additions and 2 deletions

View File

@ -845,8 +845,8 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar
} }
if ( $callback && is_callable( $callback ) ) { if ( $callback && is_callable( $callback ) ) {
$args = array_slice( func_get_args(), 2 ); $args = array_slice( func_get_args(), 3 );
array_unshift( $args, $widget_id ); array_unshift( $args, $widget_id, $check_urls );
ob_start(); ob_start();
call_user_func_array( $callback, $args ); call_user_func_array( $callback, $args );
set_transient( $cache_key, ob_get_flush(), 12 * HOUR_IN_SECONDS ); // Default lifetime in cache of 12 hours (same as the feeds) set_transient( $cache_key, ob_get_flush(), 12 * HOUR_IN_SECONDS ); // Default lifetime in cache of 12 hours (same as the feeds)