Commit Graph

15 Commits

Author SHA1 Message Date
Peter Wilson
f3b7b7f966 Cron: Fix undefined variable notice.
Restore `$gmt_time` variable removed in error from [44483].

Props afragen.
Fixes #45870.



git-svn-id: https://develop.svn.wordpress.org/trunk@44505 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 08:36:07 +00:00
Alex Shiels
e06121f2ed Cron API: Make wp-cron.php non-blocking where possible.
This should make cron spawning faster by ensuring requests to wp-cron.php return immediately regardless of transport method. It is enabled only on recent PHP versions with fastcgi, due to historical bugs and availability of `fastcgi_finish_request()`. This needs testing on a range of platforms, to help determine if it's safe to use in other contexts also.

Props vnsavage, johnbillion, jnylen0.
See #18738, #41358


git-svn-id: https://develop.svn.wordpress.org/trunk@44488 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-09 01:05:16 +00:00
Peter Wilson
0bc20594c7 Cron API: Add function and filter to return ready cron jobs.
Add the function `wp_get_ready_cron_jobs()` to return a modified version of the cron array limited to jobs ready to be run, ie with a timestamp of `time()` or earlier.

The new function includes the filter `pre_get_ready_cron_jobs` to allow for custom cron storage systems. This rounds out the functionality added in #32656.

Props Pento for code review.
Fixes #45797.



git-svn-id: https://develop.svn.wordpress.org/trunk@44483 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-08 21:48:07 +00:00
Gary Pendergast
8f95800d52 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-30 23:09:33 +00:00
Drew Jaynes
6ebef9f76f Docs: Improve the usefulness and accuracy of the file header for wp-cron.php.
Props stevenlinx for the initial patch.
Fixes #31401.


git-svn-id: https://develop.svn.wordpress.org/trunk@41276 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-20 04:36:39 +00:00
Sergey Biryukov
c0346dc748 Docs: Add a @global entry for $wpdb in _get_cron_lock.
Props tejas5989.
Fixes #41433.

git-svn-id: https://develop.svn.wordpress.org/trunk@41146 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-25 12:55:34 +00:00
Drew Jaynes
eb60152449 Improve inline documentation for the cron lock behavior.
Props ericlewis.
Fixes #32478.


git-svn-id: https://develop.svn.wordpress.org/trunk@32580 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-24 17:25:52 +00:00
Drew Jaynes
a2d7c3fa58 Add a missing DocBlock for the core utility function _get_cron_lock().
Props mordauk, valendesigns.
Fixes #31646.


git-svn-id: https://develop.svn.wordpress.org/trunk@31804 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-17 23:37:58 +00:00
Drew Jaynes (DrewAPicture)
9b0cf1bd5b Ensure we're using the correct @ignore phpDocumentor tag to mark elements that should be skipped when parsing.
Up to this point, various core elements' DocBlocks incorrectly included an `@internal` tag as a means for skipping the parsing process. When paired with a description (inline or otherwise), `@internal` is a valid tag meant to provide internal-only context, but not necessarily to skip parsing the entire element.

See #30987.


git-svn-id: https://develop.svn.wordpress.org/trunk@31170 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-13 00:50:32 +00:00
Drew Jaynes (DrewAPicture)
6a63c5b59d Fix a phpdoc typo and multi-line comment syntax in wp-cron.php.
Props rclations.
Fixes #28231.


git-svn-id: https://develop.svn.wordpress.org/trunk@28380 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-13 04:38:15 +00:00
Drew Jaynes (DrewAPicture)
0f759f0c01 Mark the $hook and $page_hook hooks as @internal to skip parsing.
See #26869.


git-svn-id: https://develop.svn.wordpress.org/trunk@28216 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-25 07:53:09 +00:00
Andrew Nacin
8d72ad52ff Don't rely on include_path to include files.
Always use dirname() or, once available, ABSPATH.

props ketwaroo, hakre.
fixes #17092.


git-svn-id: https://develop.svn.wordpress.org/trunk@25616 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-25 00:17:40 +00:00
Andrew Nacin
63f35ba4b4 Document the event hook in wp-cron.php. see #25229.
git-svn-id: https://develop.svn.wordpress.org/trunk@25290 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 20:51:09 +00:00
Scott Taylor
22278ec6a9 Introduce wp_using_ext_object_cache() - mimic wp_suspend_cache_invalidation() and discourage direct access to $_wp_using_ext_object_cache, cleaning up importing of globals in functions and provides function to modify that global. Loads the packaged object cache when an external cache hasn't been loaded or doesn't contain wp_cache_init().
Fixes #21401.



git-svn-id: https://develop.svn.wordpress.org/trunk@25289 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 18:09:24 +00:00
Andrew Nacin
b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00