Opened 18 years ago
Closed 15 years ago
#4230 closed enhancement (wontfix)
Change update-links to be wp-cron compatible
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | normal | Version: | |
Component: | Cron API | Keywords: | needs-patch |
Focuses: | 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)
#2
@
18 years ago
- 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.
#3
@
18 years ago
What is your plan for update-links.php
? Update it to use this function? Delete it altogether?
#4
@
18 years ago
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.
#5
@
18 years ago
- Keywords needs-testing added
Sounds fine. This should be good to go in after a little testing.
#6
@
18 years ago
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.
#9
@
17 years ago
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.
Seems like a good use of WP-Cron.