Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #18515, comment 5

09/09/2011 03:46:38 PM (12 years ago)


  • Ticket #18515, comment 5

    initial v1  
    33Attachement has 1 PHP File, 1 JS File, 1 CSS File and 1 PNG File.
    5 How it works:
     5'''How it works:'''
     7Plugin activation creates a table to store lock but we can use post meta table as well.
    69javascript runs every 10 seconds and pings the server to keep the lock on the post and gives the current user lock on the post. There is a configuration setting in the plugin file which is right now set to 1 minute warning if user sits idle without doing anything on the post and after 3 minutes it times out automatically and removes the lock immediately only if user sits idle. It is using jquery ui dialog to popup warnings. If user is continuously working on the post, js keeps extending timer every 10 seconds. Plugin has the cron built in that removes the lock on all posts older than threshold set in the configuration so in case someone closes the browser, cron will remove the lock on the post.
    1215We've tested this on 3.2.1.
    14 Future enhancements:
     17'''Future enhancements:'''
    15181. Configuration screen to set warning threshold and timeout minutes
    16192. better way to handle revisions' restore feature. Currently it is kind of hack since we do not have hooks to control restore link on revisions screen. We do not want any other user to restore the post from revision when someone else has the lock on the post and editing it.