[wp-trac] [WordPress Trac] #44910: function for discriminating during auto saving
WordPress Trac
noreply at wordpress.org
Fri Sep 7 05:33:12 UTC 2018
#44910: function for discriminating during auto saving
-------------------------------+-----------------------------
Reporter: mt8.biz | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version:
Severity: trivial | Keywords:
Focuses: |
-------------------------------+-----------------------------
I want a function to distinguish auto saving like **wp_doing_cron** or
**wp_doing_ajax**.
The following code can be simplified.
before
{{{
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
//do something
}
}}}
after
{{{
if ( wp_doing_autosave() ) {
//do something
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44910>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list