Version Description
- See github issue #32. Adds precision to backup naming.
- Reverts breaking changes made by commit 80e8adf to fix #15.
Download this release
Release Info
Developer | shanept |
Plugin | AceIDE |
Version | 2.6.2 |
Comparing to | |
See all releases |
Code changes from version 2.6.1 to 2.6.2
- AceIDE.php +1 -1
- CHANGELOG.md +173 -0
- README.md +78 -0
- readme.txt +7 -3
- src/IDE.php +3 -3
- src/Modules/FileOps.php +3 -2
- src/js/load-editor.js +3 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
- wporg-deploy.sh +101 -0
AceIDE.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: AceIDE
|
4 |
* Plugin URI: https://github.com/AceIDE/AceIDE
|
5 |
* Description: WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
|
6 |
-
* Version: 2.6.
|
7 |
* Author: AceIDE
|
8 |
* License: GPL3
|
9 |
**/
|
3 |
* Plugin Name: AceIDE
|
4 |
* Plugin URI: https://github.com/AceIDE/AceIDE
|
5 |
* Description: WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
|
6 |
+
* Version: 2.6.2
|
7 |
* Author: AceIDE
|
8 |
* License: GPL3
|
9 |
**/
|
CHANGELOG.md
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## AceIDE Changelog
|
2 |
+
|
3 |
+
#### 2.6.2
|
4 |
+
* See github issue #32. Adds precision to backup naming.
|
5 |
+
* Reverts breaking changes made by commit 80e8adf to fix #15.
|
6 |
+
|
7 |
+
#### 2.6.1
|
8 |
+
* See github issue #27. Fixes issue introduced in 2.6.0, attempting to fix noise in AJAX.
|
9 |
+
* See github issue #26. Fixes CSS highlighting not working.
|
10 |
+
* Bumped Ace version to 1.2.9.
|
11 |
+
* Fixed PHPParser_Error not being caught.
|
12 |
+
* Added 'aceide_parse_php' filter to allow disabling the inbuilt PHP syntax parser.
|
13 |
+
* See github issue #24. Fixes some resource URLs.
|
14 |
+
|
15 |
+
#### 2.6.0
|
16 |
+
* See github issue #15. Removes AJAX noise from ALL other plugins/themes etc. Much more solid than previous solution for github issue #5.
|
17 |
+
* Resolves github issue #21. Better error output in the event the HTTP server will not process a file upload request.
|
18 |
+
* Added plugin license.
|
19 |
+
* Resolved github issue #22. AceIDE now supports PHP 7.
|
20 |
+
|
21 |
+
#### 2.5.5
|
22 |
+
* Fixed github issue #11, where text would be replaced when clicking in replace field of the search box - Thanks to X-Raym
|
23 |
+
* Fixed shift line up/down hotkeys
|
24 |
+
* Added editor to Multisite's network admin menu - Thanks to X-Raym
|
25 |
+
* Added AceIDE logo - Thanks to Kevin Young (rdytogokev)
|
26 |
+
* Added Fullscreen editor
|
27 |
+
* Slightly modified some keyboard command handlers for usability
|
28 |
+
* Changed capability from 'create_users' to 'edit_plugins' (See GitHub issue #14)
|
29 |
+
|
30 |
+
#### 2.5.4
|
31 |
+
* Fixed broken SumoPaint image manipulation functionality (see github issue #3)
|
32 |
+
* Strips noise from other plugins upon opening files (see github issue #5)/wp-content/plugins/aceide/CHANGELOG.md
|
33 |
+
* Fixed broken zipping functionality with ZipArchive (see github issue #6)
|
34 |
+
|
35 |
+
#### 2.5.3
|
36 |
+
* Added autocomplete for taxonomy functions add_term_meta, get_term_meta, update_term_meta and delete_term_meta
|
37 |
+
* Fixed broken zipping functionality (see github issue #2)
|
38 |
+
|
39 |
+
#### 2.5.2
|
40 |
+
* Fixed AceIDE editor main class error on older versions of PHP for unknown shorthand array syntax - Thanks to X-Raym
|
41 |
+
|
42 |
+
#### 2.5.1
|
43 |
+
* Fixed dialog issues with Z order of find, settings and git dialogs
|
44 |
+
* Fixed dialog close button mislocation
|
45 |
+
|
46 |
+
#### 2.5.0
|
47 |
+
* WPide was forked into AceIDE!
|
48 |
+
* Introduced composer as a dependency management solution
|
49 |
+
* Massive code refactor to better follow Single Role Principle, and the WordPress PHP coding standards - introduces PHP namespacing into internal plugin code
|
50 |
+
* Fixed WPide admin_body_class filter issue
|
51 |
+
* Added multi-site support. (UNTESTED)
|
52 |
+
* Added Drag n' Drop file moving
|
53 |
+
* Added syntax highlighting for the Twig templating language (http://twig.sensiolabs.org)
|
54 |
+
* Added the Emmet plugin to create HTML nodes with CSS syntax (http://emmet.io)
|
55 |
+
* Upgraded Ace to v1.2.4
|
56 |
+
* Fixed SumoPaint link issues when the aceide_filesystem_root filter is not at default value
|
57 |
+
|
58 |
+
#### 2.4.0
|
59 |
+
* Context menu option added to file browser to rename, delete, download, zip, unzip!! thanks to shanept https://github.com/shanept for the code behind this.
|
60 |
+
Right click on a folder/file in the file browser to see options (Thanks to https://github.com/shanept)
|
61 |
+
* find+replace
|
62 |
+
* Stopped using the full functionality of sanitize_file_name() and using a cut down version instead that allows period, dash and underscore at the beginning and end of filename.
|
63 |
+
* corrected invalid regex for determining image type
|
64 |
+
* Changed order of PHP4 compatible constructor in an attempt to stop a PHP Strict Standard error
|
65 |
+
* Update to Ace Editor 1.2.0
|
66 |
+
* Editor settings, so that it’s possible to change the theme and other editor features/behaviours
|
67 |
+
* New application icon in menu bar
|
68 |
+
|
69 |
+
#### 2.3.2
|
70 |
+
* Update the Ace component to 1.1.1 which includes some bug fixes, a PHP worker (showing PHP errors as you work) and a greatly improved search box.
|
71 |
+
* Fixed issue with file save showing javascript alert as if there was a failure when there wasn't
|
72 |
+
* Order folders and files alphabetically
|
73 |
+
|
74 |
+
#### 2.3.1
|
75 |
+
* As a quick fix I have commentted out the git functionality as the namespacing used is causing issues with old versions of PHP
|
76 |
+
|
77 |
+
#### 2.3
|
78 |
+
* Added initial git functions using the following library: PHP-Stream-Wrapper-for-Git from https://github.com/teqneers/PHP-Stream-Wrapper-for-Git
|
79 |
+
* Initial Git functionality added - it's very experimental!
|
80 |
+
|
81 |
+
#### 2.2
|
82 |
+
* Add restore recent backup facility - It's a primative implementation at this point but it does the job. See FAQ note.
|
83 |
+
* Turned on the LESS mode when a .LESS file is edited
|
84 |
+
* Made the autocomplete functionality only be enabled for PHP files otherwise it can be a pain to write txt files like this one!
|
85 |
+
|
86 |
+
#### 2.1
|
87 |
+
* Ramped up the version number because the last one was just getting silly
|
88 |
+
* Interface changes to make the editor take up more screen space. Including hiding the WP admin menu and footer.
|
89 |
+
|
90 |
+
#### 2.0.16
|
91 |
+
* Fixed problem saving PHP documents - PHP-Parser library wasn't included in the codebase correctly
|
92 |
+
|
93 |
+
#### 2.0.15
|
94 |
+
* PHP syntax checking before saving to disk (Using: https://github.com/nikic/PHP-Parser)
|
95 |
+
|
96 |
+
#### 2.0.14
|
97 |
+
* Fixed error Warning: Creating default object from empty value in AceIDE.php
|
98 |
+
* Updated the ace editor to current build
|
99 |
+
|
100 |
+
#### 2.0.13
|
101 |
+
* Added colour assist - a colour picker that displays when you double click a hex colour code in the editor (see other notes for info).
|
102 |
+
* Added a confirm box to stop you exiting the editor by mistake and losing unsaved chnages.
|
103 |
+
* Added 'aceide_filesystem_root' filter (see other notes for info).
|
104 |
+
* A number of bug fixes.
|
105 |
+
|
106 |
+
#### 2.0.12
|
107 |
+
* Added links to the WordPress codex and the PHP manual from within the function refrence for further info
|
108 |
+
|
109 |
+
#### 2.0.11
|
110 |
+
* Newly created files use to contain a space, instead it now defaults to a blank file.
|
111 |
+
|
112 |
+
#### 2.0.10
|
113 |
+
* Fixed a problem with file loading (ajax) indicator not showing.
|
114 |
+
|
115 |
+
#### 2.0.9
|
116 |
+
* Upload snapshot of current ajaxorg editor (master/build/src) at 00:30 on the 22 May 2012. Which fixes some issues with selecting big blocks of text, code folding seems better with gutter interface hidden when not in use
|
117 |
+
|
118 |
+
#### 2.0.8
|
119 |
+
* Fix browser compatibility issues
|
120 |
+
|
121 |
+
#### 2.0.7
|
122 |
+
* Fixing issue with closing tabs not focusing onto next tab once closed.
|
123 |
+
* Fixed issue with detecting ajax url correctly which was causing all AceIDE ajax requests to fail if WordPress was installed in a subdirectory.
|
124 |
+
* Stopped autocomplete from trying to work when a js/css file is being edited.
|
125 |
+
|
126 |
+
#### 2.0.6
|
127 |
+
* Cleaned up the AceIDE class and modified the way the class is passed to WordPress actions/filters.
|
128 |
+
|
129 |
+
#### 2.0.5
|
130 |
+
* On startup the editor page now shows extra debuggin information for the filesystem API initialisation.
|
131 |
+
|
132 |
+
#### 2.0.4
|
133 |
+
* On startup the initial editor page now shows some startup info regarding file permissions to help with debugging.
|
134 |
+
|
135 |
+
#### 2.0.3
|
136 |
+
* If AceIDE cannot access your files due to permissions then when it starts up it will give you an alert to say this.
|
137 |
+
|
138 |
+
#### 2.0.2
|
139 |
+
* Image editing is now available using the SumoPaint image editor and drawing application http://www.sumopaint.com/
|
140 |
+
|
141 |
+
#### 2.0.1
|
142 |
+
* You can now create new files/folders
|
143 |
+
|
144 |
+
#### 2.0
|
145 |
+
* Recreated this plugin as a dedicated AceIDE section/app rather than extending the built in plugin/theme editor (just incase WP remove it)
|
146 |
+
* Now using the WP filesystem API (although currently restricted to local access)
|
147 |
+
* More security checks on file opening and editing
|
148 |
+
* Added new file tree for exploring the file system and opening files (any file in wp-content)
|
149 |
+
* Massive overhaul to code autocomplete functionality with the addition of function information right in the app
|
150 |
+
* Update the ajaxorg Ace Editor to the current branch
|
151 |
+
* Tabbed editing
|
152 |
+
|
153 |
+
#### 1.0.6
|
154 |
+
* Added link to meta section of plugin list for easy install of V2 Dev version if you have dismissed the alert.
|
155 |
+
|
156 |
+
#### 1.0.5
|
157 |
+
* Added the facility to download and run the cutting edge development version of AceIDE from the Github repository
|
158 |
+
|
159 |
+
#### 1.0.4
|
160 |
+
* Implemented JavaScript and CSS mode for better syntax highlighing and checking (Thanks to Thomas Wieczorek)
|
161 |
+
* Organise and format source code
|
162 |
+
|
163 |
+
#### 1.0.2
|
164 |
+
* Tidy and comment code
|
165 |
+
* Added message when backup file is generated
|
166 |
+
* Adjust code complete dropdown position
|
167 |
+
* Improved editor responsiveness when using delete or enter keys
|
168 |
+
|
169 |
+
#### 1.0.1
|
170 |
+
* Fixed "Folder name case" issue.
|
171 |
+
|
172 |
+
#### 1.0
|
173 |
+
* Initial release.
|
README.md
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## AceIDE WordPress Plugin
|
2 |
+
AceIDE is a fork of the [WPide][1] project.
|
3 |
+
|
4 |
+
AceIDE is a WordPress code editor with the long term goal of becoming the ultimate environment to code/develop WordPress themes and plugins. You can edit any files in your wp-content, not just plugins and themes. Code completion will help you remember your WordPress/PHP commands providing function reference along the way. AceIDE allows you to work with multiple files, with basic features such as the tabbed editor, syntax highlighting and line numbers. It also provides some more advanced features such as syntax verification and automatic backups upon saving.
|
5 |
+
|
6 |
+
Contributions and feedback is encouraged! If you find an issue, please let us know via the WordPress support forums, or the [GitHub issue tracker][3]. Code contributions are welcomed as a pull request to our GitHub repo.
|
7 |
+
|
8 |
+
This plugin would not be possible without the [Ajax.org Cloud9 Editor][4] which is the embedded code editor that powers much of the functionality.
|
9 |
+
|
10 |
+
This plugin performs best in the Chrome web browser.
|
11 |
+
|
12 |
+
Contributors: Shane Thompson, [WPsites][5], [Thomas Wieczorek][6], X-Raym, [Kevin Young][7]
|
13 |
+
Tags: code, theme editor, plugin editor, code editor
|
14 |
+
Requires at least: 3.0
|
15 |
+
Tested up to: 4.9.1
|
16 |
+
Stable tag: 2.6.2
|
17 |
+
|
18 |
+
### Current Features:
|
19 |
+
- Syntax highlighting
|
20 |
+
- PHP syntax checking before saving to disk to try and banish white screen of death after uploading invalid PHP
|
21 |
+
- Line numbers
|
22 |
+
- Find+replace
|
23 |
+
- Code autocomplete for WordPress and PHP functions along with function description, arguments and return value where applicable
|
24 |
+
- Colour assist - a colour picker that only shows once you double click a hex colour code in the editor. You can also drag your own image into the colour picker to use instead of the default swatch (see other notes for info).
|
25 |
+
- Automatic backup of every file you edit. (one daily backup and one hourly backup of each file stored in plugins/AceIDE/backups/filepath)
|
26 |
+
- File tree allowing you to access and edit any file in your wp-content folder (plugins, themes, uploads etc)
|
27 |
+
- Use the file browser to rename, delete, download, zip and unzip files (so you can download a zipped version of your whole theme for example)
|
28 |
+
- Create new files and directories
|
29 |
+
- Highlight matching parentheses
|
30 |
+
- Code folding
|
31 |
+
- Auto indentation
|
32 |
+
- Tabbed interface for editing multiple files (editing both plugin and theme files at the same time)
|
33 |
+
- Using the WordPress filesystem API, although currently direct access is forced (edit AceIDE.php in the constructor to change this behaviour) ftp/ssh connections aren't setup yet, since WP will not remember a password need to work out how that will work. Maybe use modal to request password when you save but be able to click save all and save a batch with that password. Passwords defined in wp-config.php are persistent and would fix this problem but people don't generally add those details. Open to ideas here.
|
34 |
+
- Image editing/drawing
|
35 |
+
- WordPress Multisite support
|
36 |
+
|
37 |
+
### Feature ideas and improvements:
|
38 |
+
- Improve the code autocomplete command information, providing more information on the commands, adding links through to the WordPress codex and PHP.net website for further info.
|
39 |
+
- Create an admin panel to choose between syntax highlighting themes and turn on/off other Ajax.org Cloud9 functionality
|
40 |
+
- Better automated file backup process
|
41 |
+
- Templates/shortcuts for frequently used code snippets, maybe even with an interface to accept variables that could be injected into code snippet templates.
|
42 |
+
- Integration with version control systems such as Git
|
43 |
+
|
44 |
+
As with most plugins this one is open source. For issue tracking, further information and anyone wishing to get involved and help contribute to this project can do so over on [GitHub][2].
|
45 |
+
**Please read CONTRIBUTING.md before submitting a pull request.**
|
46 |
+
|
47 |
+
### Installation
|
48 |
+
1. Run `composer install` to install project dependencies
|
49 |
+
1. Upload the AceIDE folder to the `/wp-content/plugins/` directory
|
50 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress
|
51 |
+
1. Access AceIDE by clicking the AceIDE menu item in your main administration menu
|
52 |
+
|
53 |
+
### Screenshots
|
54 |
+
1. Editor view, showing line numbers and syntax highlighting.
|
55 |
+
1. Image editor in action
|
56 |
+
1. Showing auto complete, function reference and file tree.
|
57 |
+
1. Default colour picker image
|
58 |
+
|
59 |
+
### Changelog
|
60 |
+
Please have a look at CHANGELOG.md
|
61 |
+
|
62 |
+
### Contributors
|
63 |
+
|
64 |
+
Simon Dunton - http://www.wpsites.co.uk
|
65 |
+
Thomas Wieczorek - http://www.wieczo.net
|
66 |
+
Shane Thompson
|
67 |
+
X-Raym
|
68 |
+
Kevin Young - https://rdytogo.com/
|
69 |
+
|
70 |
+
**Please read CONTRIBUTING.md before submitting a pull request.**
|
71 |
+
|
72 |
+
[1]: https://github.com/WPSites/WPide
|
73 |
+
[2]: https://github.com/AceIDE/AceIDE
|
74 |
+
[3]: https://github.com/AceIDE/AceIDE/issues
|
75 |
+
[4]: http://ace.ajax.org
|
76 |
+
[5]: http://www.wpsites.co.uk
|
77 |
+
[6]: http://www.wieczo.net
|
78 |
+
[7]: https://rdytogo.com/
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: shanept, WPsites, Thomas Wieczorek, x-raym, rdytogollc
|
|
3 |
Tags: code, theme editor, plugin editor, code editor
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.9.1
|
6 |
-
Stable tag: 2.6.
|
7 |
|
8 |
A fork of the WPide project, AceIDE is a code editor with the long term goal of becoming the ultimate environment to develop themes and plugins.
|
9 |
|
@@ -62,6 +62,10 @@ AceIDE on GitHub: https://github.com/AceIDE/editor/
|
|
62 |
1. Default colour picker image
|
63 |
|
64 |
== Changelog ==
|
|
|
|
|
|
|
|
|
65 |
= 2.6.1 =
|
66 |
* See github issue #27. Fixes issue introduced in 2.6.0, attempting to fix nois$
|
67 |
* See github issue #26. Fixes CSS highlighting not working.
|
@@ -105,13 +109,13 @@ AceIDE on GitHub: https://github.com/AceIDE/editor/
|
|
105 |
= 2.5.0 =
|
106 |
* WPide was forked into AceIDE!
|
107 |
* Introduced composer as a dependency management solution
|
108 |
-
* Massive code refactor to better follow Single Role Principle, and the WordPress PHP coding standards - introduces PHP namespacing into internal plugin code
|
109 |
* Fixed WPide admin_body_class filter issue
|
110 |
* Added multi-site support. (UNTESTED)
|
111 |
* Added Drag n' Drop file moving
|
112 |
* Added syntax highlighting for the Twig templating language (http://twig.sensiolabs.org)
|
113 |
* Added the Emmet plugin to create HTML nodes with CSS syntax (http://emmet.io)
|
114 |
-
* Upgraded Ace to v1.2.4
|
115 |
* Fixed SumoPaint link issues when the aceide_filesystem_root filter is not at default value
|
116 |
|
117 |
= 2.4.0 =
|
3 |
Tags: code, theme editor, plugin editor, code editor
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.9.1
|
6 |
+
Stable tag: 2.6.2
|
7 |
|
8 |
A fork of the WPide project, AceIDE is a code editor with the long term goal of becoming the ultimate environment to develop themes and plugins.
|
9 |
|
62 |
1. Default colour picker image
|
63 |
|
64 |
== Changelog ==
|
65 |
+
= 2.6.2 =
|
66 |
+
* See github issue #32. Adds precision to backup naming.
|
67 |
+
* Reverts breaking changes made by commit 80e8adf to fix #15.
|
68 |
+
|
69 |
= 2.6.1 =
|
70 |
* See github issue #27. Fixes issue introduced in 2.6.0, attempting to fix nois$
|
71 |
* See github issue #26. Fixes CSS highlighting not working.
|
109 |
= 2.5.0 =
|
110 |
* WPide was forked into AceIDE!
|
111 |
* Introduced composer as a dependency management solution
|
112 |
+
* Massive code refactor to better follow Single Role Principle, and the WordPress PHP coding standards - introduces PHP namespacing into internal plugin code
|
113 |
* Fixed WPide admin_body_class filter issue
|
114 |
* Added multi-site support. (UNTESTED)
|
115 |
* Added Drag n' Drop file moving
|
116 |
* Added syntax highlighting for the Twig templating language (http://twig.sensiolabs.org)
|
117 |
* Added the Emmet plugin to create HTML nodes with CSS syntax (http://emmet.io)
|
118 |
+
* Upgraded Ace to v1.2.4
|
119 |
* Fixed SumoPaint link issues when the aceide_filesystem_root filter is not at default value
|
120 |
|
121 |
= 2.4.0 =
|
src/IDE.php
CHANGED
@@ -178,7 +178,7 @@ class IDE
|
|
178 |
|
179 |
// Specify custom AJAX handler
|
180 |
wp_localize_script( 'aceide-load-editor', 'aceajax', array(
|
181 |
-
'url' =>
|
182 |
) );
|
183 |
|
184 |
// load color picker
|
@@ -736,7 +736,7 @@ class IDE
|
|
736 |
<div id="aceide_toolbar_tabs"> </div>
|
737 |
<div id="dialog_window_minimized_container"></div>
|
738 |
</div>
|
739 |
-
|
740 |
<div id="aceide_toolbar_buttons">
|
741 |
<div id="aceide_message"></div>
|
742 |
<a class="button restore" style="display:none;" title="<?php esc_attr_e( 'Restore the active tab' ); ?>" href="#"><?php _e( 'Restore ✜' ); ?></a>
|
@@ -746,7 +746,7 @@ class IDE
|
|
746 |
<div id="aceide_footer_message"></div>
|
747 |
<div id="aceide_footer_message_last_saved"></div>
|
748 |
<div id="aceide_footer_message_unsaved"></div>
|
749 |
-
|
750 |
<a href="#" id="aceide_save" alt="<?php esc_attr_e( 'Keyboard shortcut to save [Ctrl/Cmd + S]' ); ?>" title="<?php esc_attr_e( 'Keyboard shortcut to save [Ctrl/Cmd + S]' ); ?>" class="button-primary"><?php esc_html_e( 'SAVE FILE' ); ?></a>
|
751 |
<?php if ( defined( 'WP_DEBUG' ) && WP_DEBUG ): ?>
|
752 |
<a href="#" id="aceide_git" alt="Open the Git overlay" title="Open the Git overlay" class="button-secondary"><?php esc_html_e( 'Git' ); ?></a>
|
178 |
|
179 |
// Specify custom AJAX handler
|
180 |
wp_localize_script( 'aceide-load-editor', 'aceajax', array(
|
181 |
+
'url' => admin_url( 'admin-ajax.php' )
|
182 |
) );
|
183 |
|
184 |
// load color picker
|
736 |
<div id="aceide_toolbar_tabs"> </div>
|
737 |
<div id="dialog_window_minimized_container"></div>
|
738 |
</div>
|
739 |
+
|
740 |
<div id="aceide_toolbar_buttons">
|
741 |
<div id="aceide_message"></div>
|
742 |
<a class="button restore" style="display:none;" title="<?php esc_attr_e( 'Restore the active tab' ); ?>" href="#"><?php _e( 'Restore ✜' ); ?></a>
|
746 |
<div id="aceide_footer_message"></div>
|
747 |
<div id="aceide_footer_message_last_saved"></div>
|
748 |
<div id="aceide_footer_message_unsaved"></div>
|
749 |
+
|
750 |
<a href="#" id="aceide_save" alt="<?php esc_attr_e( 'Keyboard shortcut to save [Ctrl/Cmd + S]' ); ?>" title="<?php esc_attr_e( 'Keyboard shortcut to save [Ctrl/Cmd + S]' ); ?>" class="button-primary"><?php esc_html_e( 'SAVE FILE' ); ?></a>
|
751 |
<?php if ( defined( 'WP_DEBUG' ) && WP_DEBUG ): ?>
|
752 |
<a href="#" id="aceide_git" alt="Open the Git overlay" title="Open the Git overlay" class="button-secondary"><?php esc_html_e( 'Git' ); ?></a>
|
src/Modules/FileOps.php
CHANGED
@@ -54,6 +54,7 @@ class FileOps implements Module
|
|
54 |
ob_end_clean();
|
55 |
}
|
56 |
|
|
|
57 |
echo $wp_filesystem->get_contents($file_name);
|
58 |
die(); // this is required to return a proper result
|
59 |
}
|
@@ -116,7 +117,7 @@ class FileOps implements Module
|
|
116 |
$file_name = $root . stripslashes( $_POST['filename'] );
|
117 |
|
118 |
// set backup filename
|
119 |
-
$backup_path = 'backups' . preg_replace( "#\.php$#i", "_" . date( "Y-m-d-H" ) . ".php", $_POST['filename'] );
|
120 |
$backup_path_full = plugin_dir_path( dirname( dirname( __FILE__ ) ) ) . $backup_path;
|
121 |
// create backup directory if not there
|
122 |
$new_file_info = pathinfo( $backup_path_full );
|
@@ -270,7 +271,7 @@ die();
|
|
270 |
if (ob_get_level()) {
|
271 |
ob_end_clean();
|
272 |
}
|
273 |
-
|
274 |
echo __( 'The target file doesn\'t exist!' );
|
275 |
exit;
|
276 |
}
|
54 |
ob_end_clean();
|
55 |
}
|
56 |
|
57 |
+
echo '===FILE_CONTENTS_START===';
|
58 |
echo $wp_filesystem->get_contents($file_name);
|
59 |
die(); // this is required to return a proper result
|
60 |
}
|
117 |
$file_name = $root . stripslashes( $_POST['filename'] );
|
118 |
|
119 |
// set backup filename
|
120 |
+
$backup_path = 'backups' . preg_replace( "#\.php$#i", "_" . date( "Y-m-d-H-i-s" ) . ".php", $_POST['filename'] );
|
121 |
$backup_path_full = plugin_dir_path( dirname( dirname( __FILE__ ) ) ) . $backup_path;
|
122 |
// create backup directory if not there
|
123 |
$new_file_info = pathinfo( $backup_path_full );
|
271 |
if (ob_get_level()) {
|
272 |
ob_end_clean();
|
273 |
}
|
274 |
+
|
275 |
echo __( 'The target file doesn\'t exist!' );
|
276 |
exit;
|
277 |
}
|
src/js/load-editor.js
CHANGED
@@ -528,6 +528,9 @@ function aceide_set_file_contents(file, callback_func){
|
|
528 |
|
529 |
jQuery("#aceide_toolbar_tabs").append('<span id="'+the_id+'" sessionrel="'+last_added_editor_session+'" title=" '+file+' " rel="'+file+'" class="aceide_tab">'+ the_path +'<a class="close_tab" href="#">x</a></span>');
|
530 |
|
|
|
|
|
|
|
531 |
saved_editor_sessions[last_added_editor_session] = new EditSession(response);//set saved session
|
532 |
saved_editor_sessions[last_added_editor_session].on('change', onSessionChange);
|
533 |
saved_undo_manager[last_added_editor_session] = new UndoManager(editor.getSession().getUndoManager());//new undo manager for this session
|
528 |
|
529 |
jQuery("#aceide_toolbar_tabs").append('<span id="'+the_id+'" sessionrel="'+last_added_editor_session+'" title=" '+file+' " rel="'+file+'" class="aceide_tab">'+ the_path +'<a class="close_tab" href="#">x</a></span>');
|
530 |
|
531 |
+
//trim everything before, and including, the start of file marker
|
532 |
+
response = response.substring(response.indexOf('===FILE_CONTENTS_START===') + 25);
|
533 |
+
|
534 |
saved_editor_sessions[last_added_editor_session] = new EditSession(response);//set saved session
|
535 |
saved_editor_sessions[last_added_editor_session].on('change', onSessionChange);
|
536 |
saved_undo_manager[last_added_editor_session] = new UndoManager(editor.getSession().getUndoManager());//new undo manager for this session
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitcd03a0861b9f130974a656eee364ecd1::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit4c3174ac4bf370c3acc8c379bef0ab9a
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit4c3174ac4bf370c3acc8c379bef0ab9a
|
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
-
$includeFiles = Composer\Autoload\
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
-
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
-
function
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitcd03a0861b9f130974a656eee364ecd1
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitcd03a0861b9f130974a656eee364ecd1', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitcd03a0861b9f130974a656eee364ecd1', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitcd03a0861b9f130974a656eee364ecd1::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInitcd03a0861b9f130974a656eee364ecd1::$files;
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequirecd03a0861b9f130974a656eee364ecd1($fileIdentifier, $file);
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
function composerRequirecd03a0861b9f130974a656eee364ecd1($fileIdentifier, $file)
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
@@ -52,9 +52,9 @@ class ComposerStaticInit4c3174ac4bf370c3acc8c379bef0ab9a
|
|
52 |
public static function getInitializer(ClassLoader $loader)
|
53 |
{
|
54 |
return \Closure::bind(function () use ($loader) {
|
55 |
-
$loader->prefixLengthsPsr4 =
|
56 |
-
$loader->prefixDirsPsr4 =
|
57 |
-
$loader->prefixesPsr0 =
|
58 |
|
59 |
}, null, ClassLoader::class);
|
60 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitcd03a0861b9f130974a656eee364ecd1
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
52 |
public static function getInitializer(ClassLoader $loader)
|
53 |
{
|
54 |
return \Closure::bind(function () use ($loader) {
|
55 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitcd03a0861b9f130974a656eee364ecd1::$prefixLengthsPsr4;
|
56 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitcd03a0861b9f130974a656eee364ecd1::$prefixDirsPsr4;
|
57 |
+
$loader->prefixesPsr0 = ComposerStaticInitcd03a0861b9f130974a656eee364ecd1::$prefixesPsr0;
|
58 |
|
59 |
}, null, ClassLoader::class);
|
60 |
}
|
wporg-deploy.sh
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#! /bin/bash
|
2 |
+
#
|
3 |
+
# WordPress.org SVN deploy script for easily publishing your WordPress plugins that primarily use the Git version control system.
|
4 |
+
#
|
5 |
+
# Deploy script came from here: https://github.com/thenbrent/multisite-user-management/blob/master/deploy.sh
|
6 |
+
# Which is a modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
|
7 |
+
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
|
8 |
+
|
9 |
+
# This script needs to be executable (chmod +x wporg-deploy.sh)
|
10 |
+
|
11 |
+
# main config
|
12 |
+
PLUGINSLUG="aceide"
|
13 |
+
CURRENTDIR=`pwd`
|
14 |
+
MAINFILE="AceIDE.php" # this should be the name of your main php file in the wordpress plugin
|
15 |
+
|
16 |
+
# git config
|
17 |
+
GITPATH="$CURRENTDIR/" # this file should be in the base of your git repository
|
18 |
+
|
19 |
+
# svn config
|
20 |
+
SVNPATH="/tmp/$PLUGINSLUG" # path to a temp SVN repo. No trailing slash required and don't add trunk.
|
21 |
+
SVNURL="https://plugins.svn.wordpress.org/aceide" # Remote SVN repo on wordpress.org, with no trailing slash
|
22 |
+
SVNUSER="shanept" # your svn username
|
23 |
+
SVNIGNORE="
|
24 |
+
backups
|
25 |
+
.DS_Store
|
26 |
+
CHANGELOG.md" #other files you you don't need to publish to the WP.org repo
|
27 |
+
|
28 |
+
|
29 |
+
# Let's begin...
|
30 |
+
echo ".........................................."
|
31 |
+
echo
|
32 |
+
echo "Preparing to deploy wordpress plugin"
|
33 |
+
echo
|
34 |
+
echo ".........................................."
|
35 |
+
echo
|
36 |
+
|
37 |
+
# Check version in readme.txt is the same as plugin file
|
38 |
+
NEWVERSION1=`grep "^Stable tag" $GITPATH/readme.txt | awk -F' ' '{print $3}'`
|
39 |
+
echo "readme.txt version: $NEWVERSION1"
|
40 |
+
NEWVERSION2=`grep "^Stable tag" $GITPATH/README.md | awk -F' ' '{print $3}'`
|
41 |
+
echo "README.md version: $NEWVERSION2"
|
42 |
+
NEWVERSION3=`grep -m 1 "^#### [0-9\\.]*$" $GITPATH/CHANGELOG.md | awk -F' ' '{print $2}'`
|
43 |
+
echo "CHANGELOG.md version: $NEWVERSION3"
|
44 |
+
NEWVERSION4=`grep "^ \\* Version" $GITPATH/$MAINFILE | awk -F' ' '{print $3}'`
|
45 |
+
echo "$MAINFILE version: $NEWVERSION4"
|
46 |
+
echo
|
47 |
+
|
48 |
+
if [ "$NEWVERSION1" != "$NEWVERSION2" ]; then echo >&2 "Versions don't match. Exiting...."; exit 1; fi
|
49 |
+
if [ "$NEWVERSION1" != "$NEWVERSION3" ]; then echo >&2 "Versions don't match. Exiting...."; exit 1; fi
|
50 |
+
if [ "$NEWVERSION1" != "$NEWVERSION4" ]; then echo >&2 "Versions don't match. Exiting...."; exit 1; fi
|
51 |
+
command -v composer >/dev/null 2>&1 || { echo >&2 "Composer not installed. Exiting...."; exit 1; }
|
52 |
+
|
53 |
+
echo "Versions all match. Let's proceed..."
|
54 |
+
|
55 |
+
cd $GITPATH
|
56 |
+
echo -e "Enter a commit message for this new version: \c"
|
57 |
+
read COMMITMSG
|
58 |
+
git commit -am "$COMMITMSG"
|
59 |
+
|
60 |
+
echo "Tagging new version in git"
|
61 |
+
git tag -a "$NEWVERSION1" -m "Tagging version $NEWVERSION1"
|
62 |
+
|
63 |
+
echo "Pushing latest commit to origin, with tags"
|
64 |
+
git push origin master
|
65 |
+
git push origin master --tags
|
66 |
+
|
67 |
+
echo
|
68 |
+
echo "Creating local copy of SVN repo ..."
|
69 |
+
svn co $SVNURL $SVNPATH
|
70 |
+
|
71 |
+
echo "Exporting the HEAD of master from git to the trunk of SVN"
|
72 |
+
git checkout-index -a -f --prefix=$SVNPATH/trunk/
|
73 |
+
|
74 |
+
echo "Ignoring github specific files and deployment script"
|
75 |
+
svn propset svn:ignore "wporg-deploy.sh
|
76 |
+
README.md
|
77 |
+
.git
|
78 |
+
.gitignore $SVNIGNORE" "$SVNPATH/trunk/"
|
79 |
+
|
80 |
+
echo "Changing directory to SVN"
|
81 |
+
cd $SVNPATH/trunk/
|
82 |
+
|
83 |
+
|
84 |
+
echo "Installing composer dependencies"
|
85 |
+
composer install --no-dev
|
86 |
+
|
87 |
+
echo "Committing to trunk"
|
88 |
+
# Add all new files that are not set to be ignored
|
89 |
+
svn status | grep -v "^.[ \t]*\..*" | grep "^?" | awk '{print $2}' | xargs svn add
|
90 |
+
svn commit --username=$SVNUSER -m "$COMMITMSG"
|
91 |
+
|
92 |
+
echo "Creating new SVN tag & committing it"
|
93 |
+
cd $SVNPATH
|
94 |
+
svn copy trunk/ tags/$NEWVERSION1/
|
95 |
+
cd $SVNPATH/tags/$NEWVERSION1
|
96 |
+
svn commit --username=$SVNUSER -m "Tagging version $NEWVERSION1"
|
97 |
+
|
98 |
+
echo "Removing temporary directory $SVNPATH"
|
99 |
+
rm -fr $SVNPATH/
|
100 |
+
|
101 |
+
echo "*** FIN ***"
|