-function wp_clear_scheduled_hook( $hook ) {
- $args = array_slice( func_get_args(), 1 );
+function wp_clear_scheduled_hook( $hook, $args = array() ) {
+ // Backward compatibility
+ // Previously this function took the arguments as discrete vars rather than an array like the rest of the API
+ if ( !is_array($args) ) {
+ _deprecated_argument( __FUNCTION__, '3.0.0', __('This argument has changed to an array to match the behavior of the other cron functions.') );
+ $args = array_slice( func_get_args(), 1 );
+ }