Wordpress/src/wp-admin/includes
Weston Ruter dbace684e2 Editor: Add CodeMirror-powered code editor with syntax highlighting, linting, and auto-completion.
* Code editor is integrated into the Theme/Plugin Editor, Additional CSS in Customizer, and Custom HTML widget. Code editor is not yet integrated into the post editor, and it may not be until accessibility concerns are addressed.
* The CodeMirror component in the Custom HTML widget is integrated in a similar way to TinyMCE being integrated into the Text widget, adopting the same approach for integrating dynamic JavaScript-initialized fields.
* Linting is performed for JS, CSS, HTML, and JSON via JSHint, CSSLint, HTMLHint, and JSONLint respectively. Linting is not yet supported for PHP.
* When user lacks `unfiltered_html` the capability, the Custom HTML widget will report any Kses-invalid elements and attributes as errors via a custom Kses rule for HTMLHint.
* When linting errors are detected, the user will be prevented from saving the code until the errors are fixed, reducing instances of broken websites.
* The placeholder value is removed from Custom CSS in favor of a fleshed-out section description which now auto-expands when the CSS field is empty. See #39892.
* The CodeMirror library is included as `wp.CodeMirror` to prevent conflicts with any existing `CodeMirror` global.
* An `wp.codeEditor.initialize()` API in JS is provided to convert a `textarea` into CodeMirror, with a `wp_enqueue_code_editor()` function in PHP to manage enqueueing the assets and settings needed to edit a given type of code.
* A user preference is added to manage whether or not "syntax highlighting" is enabled. The feature is opt-out, being enabled by default.
* Allowed file extensions in the theme and plugin editors have been updated to include formats which CodeMirror has modes for: `conf`, `css`, `diff`, `patch`, `html`, `htm`, `http`, `js`, `json`, `jsx`, `less`, `md`, `php`, `phtml`, `php3`, `php4`, `php5`, `php7`, `phps`, `scss`, `sass`, `sh`, `bash`, `sql`, `svg`, `xml`, `yml`, `yaml`, `txt`.

Props westonruter, georgestephanis, obenland, melchoyce, pixolin, mizejewski, michelleweber, afercia, grahamarmfield, samikeijonen, rianrietveld, iseulde.
See #38707.
Fixes #12423, #39892.


git-svn-id: https://develop.svn.wordpress.org/trunk@41376 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-13 06:07:48 +00:00
..
admin-filters.php Options, Meta APIs: Require a confirmation link in an email to be clicked when an admin attempts to change the site admin email address. 2017-08-14 20:12:23 +00:00
admin.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:30:48 +00:00
ajax-actions.php Widgets: Correctly strip slashes from widget and sidebar names to allow namespaced widgets to function correctly. 2017-08-22 14:51:47 +00:00
bookmark.php Text Changes: Unify permission error messages. 2016-06-29 15:15:40 +00:00
class-automatic-upgrader-skin.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-bulk-plugin-upgrader-skin.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-bulk-theme-upgrader-skin.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-bulk-upgrader-skin.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-core-upgrader.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
class-file-upload-upgrader.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
class-ftp-pure.php FTP: ensure that there is only one class named ftp, which is what is expected in the loading of this arcane library. This ensures that an autoload generator, something along the lines of Composer, won't hiccup when it gets to these files. 2016-08-26 18:46:17 +00:00
class-ftp-sockets.php FTP: ensure that there is only one class named ftp, which is what is expected in the loading of this arcane library. This ensures that an autoload generator, something along the lines of Composer, won't hiccup when it gets to these files. 2016-08-26 18:46:17 +00:00
class-ftp.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:30:48 +00:00
class-language-pack-upgrader-skin.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-language-pack-upgrader.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
class-pclzip.php Filesystem API: Ensure memory limit calculations by PclZip are using integers. 2016-07-19 11:54:09 +00:00
class-plugin-installer-skin.php Plugins: Introduce singular capabilities for activating and deactivating individual plugins. 2017-08-22 14:01:36 +00:00
class-plugin-upgrader-skin.php Plugins: Introduce singular capabilities for activating and deactivating individual plugins. 2017-08-22 14:01:36 +00:00
class-plugin-upgrader.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
class-theme-installer-skin.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-theme-upgrader-skin.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-theme-upgrader.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
class-walker-category-checklist.php General: Fix more instances of inconsistent parameters passed to various filters, plus fix some filter docs. 2017-08-03 16:12:25 +00:00
class-walker-nav-menu-checklist.php Docs: Walker_Nav_Menu_Checklist and Walker_Nav_Menu_Edit are part of the Navigation Menu API, but intended for use in the scope of administration. 2015-10-15 17:25:11 +00:00
class-walker-nav-menu-edit.php Menus: Visually hide the menu item edit link text in a consistent way. 2017-08-03 22:12:01 +00:00
class-wp-ajax-upgrader-skin.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-automatic-updater.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
class-wp-comments-list-table.php Docs: Remove some more top-level @aacess tags from function DocBlocks. 2017-07-27 08:18:25 +00:00
class-wp-community-events.php Dashboard: Discontinue nonessential logging of Events API requests. 2017-08-25 18:11:04 +00:00
class-wp-filesystem-base.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-filesystem-direct.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-filesystem-ftpext.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-filesystem-ftpsockets.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-filesystem-ssh2.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-importer.php Docs: Use a third-person singular verb in the DocBlock summary for WP_Importer::stop_the_insanity(). 2017-07-30 15:45:50 +00:00
class-wp-internal-pointers.php Docs: Clarify the file header summary for wp-admin/includes/class-wp-internal-pointers.php, introduced in [34241]. 2015-09-22 14:34:55 +00:00
class-wp-links-list-table.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-list-table-compat.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-list-table.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-media-list-table.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-ms-sites-list-table.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
class-wp-ms-themes-list-table.php General: Fix a typo introduced in [41219]. 2017-08-03 15:45:14 +00:00
class-wp-ms-users-list-table.php Docs: Reduce confusion in @since MU notationss by indicating the WP version (3.0.0) the code was merged into core while retaining the original context. 2017-08-01 20:43:25 +00:00
class-wp-plugin-install-list-table.php Plugins: Introduce singular capabilities for activating and deactivating individual plugins. 2017-08-22 14:01:36 +00:00
class-wp-plugins-list-table.php Plugins: Introduce singular capabilities for activating and deactivating individual plugins. 2017-08-22 14:01:36 +00:00
class-wp-post-comments-list-table.php Docs: Add missing file headers to the list table classes and adjust class DocBlocks accordingly. 2015-10-17 15:12:48 +00:00
class-wp-posts-list-table.php General: Fix various instances of incorrect filter docs and incorrect filter and action parameters. 2017-08-03 15:42:45 +00:00
class-wp-press-this.php Embeds: Remove support for oEmbedded videos from Vine. 2017-09-08 15:00:33 +00:00
class-wp-screen.php Docs: Correct description for view_mode_post_types filter added in [35357]. 2017-08-25 19:26:03 +00:00
class-wp-site-icon.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-terms-list-table.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-theme-install-list-table.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-themes-list-table.php General: Fix various instances of incorrect filter docs and incorrect filter and action parameters. 2017-08-03 15:42:45 +00:00
class-wp-upgrader-skin.php Docs: Remove @access notations from method DocBlocks in wp-admin/* classes. 2017-07-27 00:39:34 +00:00
class-wp-upgrader-skins.php Load: Re-add class-wp-upgrader-skins.php. 2016-12-03 03:39:03 +00:00
class-wp-upgrader.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
class-wp-users-list-table.php Users: After [41027], assign $author_posts_url outside of the condition to simplify the logic. 2017-07-28 14:20:22 +00:00
comment.php Text Changes: Unify permission error messages. 2016-06-29 15:15:40 +00:00
continents-cities.php I18N: Update list of continents and cities for the timezone selection. 2016-05-24 23:23:46 +00:00
credits.php I18N: Introduce a user-specific language setting. 2016-10-03 07:03:41 +00:00
dashboard.php Docs: Reduce confusion in @since MU notationss by indicating the WP version (3.0.0) the code was merged into core while retaining the original context. 2017-08-01 20:43:25 +00:00
deprecated.php Docs: Add a missing return description for the deprecated get_screen_icon() function. 2017-08-20 04:03:55 +00:00
edit-tag-messages.php Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP. 2016-05-22 18:00:23 +00:00
export.php Docs: Add missing backtick character in export_wp() DocBlock. 2017-06-27 00:57:56 +00:00
file.php Customize: Re-use homepage settings help tab text from Reading Options admin screen in description for corresponding Customizer section. 2017-09-10 17:07:50 +00:00
image-edit.php Media: Rename several attachment related parameters from $post_id to $attachment_id for clarity, and improve related 2017-08-22 11:11:23 +00:00
image.php Docs: Fix various filter documentation. 2017-08-03 14:33:19 +00:00
import.php I18N: Introduce a user-specific language setting. 2016-10-03 07:03:41 +00:00
list-table.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:30:48 +00:00
media.php Plupload: 2017-09-01 12:27:49 +00:00
menu.php Text Changes: Unify permission error messages. 2016-06-29 15:15:40 +00:00
meta-boxes.php Introduce most_used taxonomy label, for text on 'Most Used' metabox tab. 2017-07-01 14:45:02 +00:00
misc.php Options, Meta APIs: Require a confirmation link in an email to be clicked when an admin attempts to change the site admin email address. 2017-08-14 20:12:23 +00:00
ms-admin-filters.php Options, Meta APIs: Require a confirmation link in an email to be clicked when an admin attempts to change the site admin email address. 2017-08-14 20:12:23 +00:00
ms-deprecated.php Docs: Standardize and add missing deprecation notations in DocBlocks for the following functions: 2017-06-22 17:47:47 +00:00
ms.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
nav-menu.php Accessibility: Improve the Menus post type meta boxes pagination links. 2016-10-27 15:22:52 +00:00
network.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
noop.php Docs: Add missing file header to wp-admin/includes/noop.php, introduced in [34037]. 2017-01-25 23:09:37 +00:00
options.php Accessibility: Avoid a keyboard trap on the permalink custom structure setting. 2017-06-12 14:08:34 +00:00
plugin-install.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
plugin.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
post.php Post Formats: In bulk_edit_posts(), set post format before the post is updated, for consistency with edit_post(). 2017-07-30 14:40:42 +00:00
revision.php I18N: Correct various instances of incorrect usage of esc_attr_e(). 2016-08-28 18:05:02 +00:00
schema.php Multisite: Use get_network() in populate_network() to check whether a network with the given ID already exists. 2017-09-08 16:32:39 +00:00
screen.php Screen API: After [37972], ensure that $box['args'] is an array before trying to access __widget_basename. 2016-07-07 16:38:28 +00:00
taxonomy.php Store only term IDs in object term relationships caches. 2016-05-26 04:49:10 +00:00
template.php General: Fix more instances of inconsistent parameters passed to various filters, plus fix some filter docs. 2017-08-03 16:12:25 +00:00
theme-install.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
theme.php Customize: Prevent links to customize.php from being generated which have query vars from wp_removable_query_args() present. 2017-03-22 23:03:28 +00:00
translation-install.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
update-core.php Plupload: remove the reinstated plupload.js from the list of old files. 2017-09-04 10:21:33 +00:00
update.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
upgrade.php General: Improve terminology used when referring to installations of WordPress and its extensions. 2017-08-22 11:51:11 +00:00
user.php Editor: Add CodeMirror-powered code editor with syntax highlighting, linting, and auto-completion. 2017-09-13 06:07:48 +00:00
widgets.php Widgets: Add dirty state tracking for widgets on admin screen. 2017-09-08 19:10:59 +00:00