#35393 closed enhancement (wontfix)
should "publish_future_post" be "wp_publish_future_post"?
| Reported by: | ixmati | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Cron API | Version: | 4.4.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
I notice that other WP cron jobs called are prefixed by "wp_", but not "publish_future_post", which makes it harder to see that this job is part of WP core.
Change History (2)
#1
@
11 years ago
- Component General → Cron API
- Milestone Awaiting Review
- Resolution → wontfix
- Status new → closed
#2
@
11 years ago
OK, understood. Thanks for the explanation and the read.
I was thinking maybe something like an alias so the code could become more standardized and be backward compatible:
use function wp_publish_future_post as publish_future_post;
But inspired by @nacin, I'll file this personally under "Code should not be rewritten under the cloaks of readability, narrow personal opinion, or general subjectiveness."
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @ixmati, thanks for opening this ticket and welcome to WordPress Trac!
Although it does not have the
wp_*prefix, it is in the WordPress core software, so hopefully this explains that it is part of core.The WordPress project has a commitment to backwards compatibility. Renaming the event could be a breaking change — a plugin could expect the event to be named
publish_future_post, and changing it would break the plugin. @nacin has a good note on not refactoring code if we don't have to, which is a good read.