Changeset 8516 for trunk/wp-includes/cron.php
- Timestamp:
- 08/01/2008 05:00:07 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/cron.php
r8514 r8516 72 72 } 73 73 74 /** 75 * Send request to run cron through HTTP request that doesn't halt page loading. 76 * 77 * @since 2.1.0 78 * 79 * @return null CRON could not be spawned, because it is not needed to run. 80 */ 74 81 function spawn_cron() { 75 82 $crons = _get_cron_array(); … … 82 89 return; 83 90 84 $cron_url = get_option( 'siteurl' ) . '/wp-cron.php'; 85 $parts = parse_url( $cron_url ); 91 $cron_url = get_option( 'siteurl' ) . '/wp-cron.php?check=' . wp_hash('187425'); 86 92 87 if ($parts['scheme'] == 'https') { 88 // support for SSL was added in 4.3.0 89 if (version_compare(phpversion(), '4.3.0', '>=') && function_exists('openssl_open')) { 90 $port = isset($parts['port']) ? $parts['port'] : 443; 91 $argyle = @fsockopen('ssl://' . $parts['host'], $port, $errno, $errstr, 0.01); 92 } else { 93 return false; 94 } 95 } else { 96 $port = isset($parts['port']) ? $parts['port'] : 80; 97 $argyle = @ fsockopen( $parts['host'], $port, $errno, $errstr, 0.01 ); 98 } 99 100 if ( $argyle ) 101 fputs( $argyle, 102 "GET {$parts['path']}?check=" . wp_hash('187425') . " HTTP/1.0\r\n" 103 . "Host: {$_SERVER['HTTP_HOST']}\r\n\r\n" 104 ); 93 wp_remote_post($cron_url, array('timeout' => 0.01)); 105 94 } 106 95
Note: See TracChangeset
for help on using the changeset viewer.