[wp-trac] [WordPress Trac] #23697: Check and refresh post locks with heartbeat

WordPress Trac noreply at wordpress.org
Tue Mar 12 05:28:19 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 nacin):

 Good first pass. Based on a review:

 I am not sure why we switched from AUTOSAVE_INTERVAL * 2 to 120, is this
 because "autosave" the concept is changing as we know it?

 Please remember that get_option( 'show_avatars' ) should be checked.

 Please do not use global $post_ID. [23661] should use the original `$post
 = get_post();`

 Avatars may not be from gravatar.com, so the JS code should be removed. If
 we are going to do nasty things like parse the source URI out of
 get_avatar(), then we should also un-encode amp; there, not in JS.

 Rather than sending back new_lock as a : separated piece of data, only to
 regex out a piece of it, can we send back structured data? As in, user ID
 + time?

 Rather than `<?php if ( ! $locked ) echo ' style="display:none"'; ?>>`
 could we use a class?

 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.

 The post_lock_take_over filter (which should probably be
 post_lock_override or override_post_lock for clarity, even if "take over"
 ends up being the UI) should receive $post and $user, not just the IDs.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23697#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list