WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 3 months ago

#25636 closed enhancement (fixed)

Autosave callbacks

Reported by: carldanley Owned by:
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: Autosave Keywords:
Focuses: Cc:

Description

When using the global autosave function to manually call an autosave on updated content, I noticed there is no way to define a callback for *after* autosave happens; whether fail/success.

That being said, it'd be good to define a callback that we can use. Please see the attached diff.

Attachments (1)

25636.diff (663 bytes) - added by carldanley 6 months ago.

Download all attachments as: .zip

Change History (4)

carldanley6 months ago

comment:1 azaozz6 months ago

Autosave is being updated/refactored in #25272 (early 3.8, another pair of eyes welcome). It will use heartbeat for transport, so the usual heartbeat events can be used to hook into it.

comment:2 SergeyBiryukov6 months ago

  • Component changed from General to Autosave
  • Type changed from defect (bug) to enhancement

comment:3 azaozz3 months ago

  • Milestone changed from Awaiting Review to 3.9
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [26995]. In addition to the Heartbeat events, autosave triggers 'after-autosave' jQuery event.

Note: See TracTickets for help on using tickets.