It adds the custom post type required for saving the code revisions ) and redirects the user from the editor to the appropriate code editor when he tries to view those posts ).
Using either, if available, POST and GET data or falling back to the appropriate default file the class generates array containing meta information on the currently viewed file ).
In attempt to have as theme or plugin file specific code this array contains 4 strings type 'plugin 'theme package theme slug or 'plugin plugin php file relative file path from the folder or WordPress plugin directory checksum md5-checksum of the file..
When file is opened in the editor and related post is found in the database the plugin checks if the post's content and the file's content still match.
If they don't the post is updated with the new content and the user is notified about the change using admin notice )..
On file updates through the editor the plugin checks if the file has changed before WordPress writes to it.
Additionally the plugin tries to do syntax check for *.php files to prevent breaking WordPress installation ).
When error is found the actual file is not written, but the user is redirected back to the editor with notification about the error and it's location with line highlighting. inc plugged php Contains slightly changed version of the pluggable wp text diff function wp text diff is utilized for generating the diffs rendered in the viewer.
However this behavior is not very helpful when viewing code revisions, wherefore the plugin suppresses it for revisions associated with the custom code revisions post type. inc metabox php The template for the revision metabox. js editors js JavaScript for customizing the editor pages.
It adds the revisions metabox below the editors, the text with link next to 'Update File button and handles the text replacement and line highlighting when error was found. css editors css Styles for the code editors.
Read more