Opened 6 years ago
Closed 3 years ago
#4230 closed enhancement (wontfix)
Change update-links to be wp-cron compatible
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Cron | Version: | |
| Severity: | normal | Keywords: | needs-patch |
| Cc: |
Description
update-links.php is a file that does little other than to update the links link_updated times using pingomatic when it's called. However, there's nothing in Wordpress to run it at all. The trigger has to be external.
With the addition of wp-cron to the 2.1 line, the update-links.php file should be wrapped in a function with an action hook and included into the main source, so that wp-cron can trigger it on some basis.
Further suggestion: Rig the "track link update times" checkbox on Options->Misc to activate and deactivate this wp-cron job as needed. The checking timer can be set to, say, 1-2 hours or so. Add a filter to the timer so that it can be easily modified if needed. Or make it an option or something.
Attachments (1)
Change History (12)
- Keywords has-patch added
Added patch to move update links into a cron job. Features of this patch:
- Adds two new functions. One does the updating of the links, the other manages the wp-cron scheduling based on the enabling/disabling of the links update option.
- Scheduling frequency is filtered for easy plugin changing (defaults to daily).
- Both new functions are pluggable, in case a plugin wants to change how the updating or scheduling works entirely.
comment:3
markjaquith — 6 years ago
What is your plan for update-links.php ? Update it to use this function? Delete it altogether?
Delete it altogether. The only reason to have it separate is so it can be executed separately as a cron job. With wp-cron doing it, there's no reason to have it at all. And with the function being pluggable, plugins can replace it if they like.
comment:5
markjaquith — 6 years ago
- Keywords needs-testing added
Sounds fine. This should be good to go in after a little testing.
Sounds good. Word of warning to the testers: I've never gotten the pingomatic call to actually work. I think this is a problem with pingomatic. But, since this is the current code, it's what I used for this patch.
The patch in ticket #4231 also has this code change, but also changes the update_links code to use RSS feeds to get the last updated time instead. That code actually works because it doesn't rely on pingomatic.
Any traction on this? I really want something like this put into the core code. The patch may need to be refreshed at this point.
- Component changed from Optimization to Cron
- Keywords needs-patch added; has-patch needs-testing removed
- Milestone changed from 2.9 to Future Release
not even sure this is still current...
comment:11
dd32 — 3 years ago
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from new to closed
I've removed the Link update checking from core. This is better left for plugin material. See #12437

Seems like a good use of WP-Cron.