[wp-trac] [WordPress Trac] #23697: Check and refresh post locks with heartbeat
WordPress Trac
noreply at wordpress.org
Tue Mar 12 08:01:33 UTC 2013
#23697: Check and refresh post locks with heartbeat
-------------------------------------+------------------
Reporter: azaozz | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.6
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: autosave-redo has-patch |
-------------------------------------+------------------
Comment (by azaozz):
Thanks for the review.
Since locks are not tied to autosave any more, using `AUTOSAVE_INTERVAL *
2` may cause some problems if set to different value. With heartbeat locks
are refreshed every 15 sec. when the user is active and every 120 sec.
when inactive. We were discussing "taking over" immediately (without
showing a notice) if the user that has the lock is inactive. Wanted to run
some more tests before adding that.
Sure, will use get_post() and get_option( 'show_avatars' ) to shorten it
there.
> Rather than sending back new_lock as a : separated piece of data...
Sure. This is unused at the moment. It was sent in the old autosave
response and can be used for lock monitoring in JS.
> Rather than <?php if ( ! $locked ) echo ' style="display:none"'; ?>>
could we use a class?
That can use the `hidden` class. Having a style attribute there optimizes
the jQuery(':hidden') check a bit for some browsers.
> wp_trash_post() or wp_delete_post() is likely invoked in other
situations where it may make sense to block it if the post is locked.
Yes, at least when bulk-trashing posts. This should have been in a
separate ticket, will open one tomorrow.
Yeah, the names can be better :) Will switch to using $post and passing it
to the filters.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23697#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list