mirror of
https://ghproxy.net/https://github.com/elementor/wp2static.git
synced 2025-08-29 08:32:23 +08:00
adjust typing for WPCron
This commit is contained in:
parent
bf4eecd5e7
commit
277422863a
1 changed files with 4 additions and 6 deletions
|
@ -86,16 +86,14 @@ class WPCron {
|
|||
return $cron_request;
|
||||
}
|
||||
|
||||
$headers = [
|
||||
$auth_headers = [
|
||||
'Authorization' =>
|
||||
sprintf( 'Basic %s', base64_encode( $auth_user . ':' . $auth_password ) ),
|
||||
];
|
||||
|
||||
$cron_request['args']['headers'] =
|
||||
isset( $cron_request['args']['headers'] ) ?
|
||||
array_merge( $cron_request['args']['headers'], $headers ) :
|
||||
$headers;
|
||||
$cron_request_args = (array) ( $cron_request['args'] ?? [] );
|
||||
$cron_request_headers = (array) ( $cron_request_args['headers'] ?? [] );
|
||||
|
||||
return $cron_request;
|
||||
return array_merge( $cron_request_headers, $auth_headers );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue