`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.


git-svn-id: https://develop.svn.wordpress.org/trunk@29442 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
wonderboymusic 2014-08-07 21:46:02 +00:00
parent ec7895af29
commit fa6508e234
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 ) ) {
$args = array_slice( func_get_args(), 2 );
array_unshift( $args, $widget_id );
$args = array_slice( func_get_args(), 3 );
array_unshift( $args, $widget_id, $check_urls );
ob_start();
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)