Commit Graph

316 Commits

Author SHA1 Message Date
Sergey Biryukov
77dfc892fe Docs: Document default values for optional parameters in various DocBlocks.
Props paulkevan, costdev, audrasjb, SergeyBiryukov.
See #56792.
Built from https://develop.svn.wordpress.org/trunk@55398


git-svn-id: http://core.svn.wordpress.org/trunk@54931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 16:39:19 +00:00
Sergey Biryukov
9c5d4ca8d1 I18N: Mark screen reader strings as such with translator comments.
This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI.

Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov.
Fixes #29748.
Built from https://develop.svn.wordpress.org/trunk@55276


git-svn-id: http://core.svn.wordpress.org/trunk@54809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:10:21 +00:00
Sergey Biryukov
3ba44120d0 Coding Standards: Always use parentheses when instantiating an object.
Note: This will be enforced by WPCS 3.0.0.

Props jrf.
See #56791.
Built from https://develop.svn.wordpress.org/trunk@54891


git-svn-id: http://core.svn.wordpress.org/trunk@54443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-11-29 15:51:14 +00:00
Sergey Biryukov
c03305852e Code Modernization: Add AllowDynamicProperties attribute to all (parent) classes.
Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.

There are a number of ways to mitigate this:
* If it is an accidental typo for a declared property: fix the typo.
* For known properties: declare them on the class.
* For unknown properties: add the magic `__get()`, `__set()`, et al. methods to the class or let the class extend `stdClass` which has highly optimized versions of these magic methods built in.
* For unknown ''use'' of dynamic properties, the `#[AllowDynamicProperties]` attribute can be added to the class. The attribute will automatically be inherited by child classes.

Trac ticket #56034 is open to investigate and handle the third and fourth type of situations, however it has become clear this will need more time and will not be ready in time for WP 6.1.

To reduce “noise” in the meantime, both in the error logs of WP users moving onto PHP 8.2, in the test run logs of WP itself, in test runs of plugins and themes, as well as to prevent duplicate tickets from being opened for the same issue, this commit adds the `#[AllowDynamicProperties]` attribute to all “parent” classes in WP.

The logic used for this commit is as follows:
* If a class already has the attribute: no action needed.
* If a class does not `extend`: add the attribute.
* If a class does `extend`:
 - If it extends `stdClass`: no action needed (as `stdClass` supports dynamic properties).
 - If it extends a PHP native class: add the attribute.
 - If it extends a class from one of WP's external dependencies: add the attribute.
* In all other cases: no action — the attribute should not be needed as child classes inherit from the parent.

Whether or not a class contains magic methods has not been taken into account, as a review of the currently existing magic methods has shown that those are generally not sturdy enough and often even set dynamic properties (which they should not). See the [https://www.youtube.com/watch?v=vDZWepDQQVE live stream from August 16, 2022] for more details.

This commit only affects classes in the `src` directory of WordPress core.
* Tests should not get this attribute, but should be fixed to not use dynamic properties instead. Patches for this are already being committed under ticket #56033.
* While a number bundled themes (2014, 2019, 2020, 2021) contain classes, they are not a part of this commit and may be updated separately.

Reference: [https://wiki.php.net/rfc/deprecate_dynamic_properties PHP RFC: Deprecate dynamic properties].

Follow-up to [53922].

Props jrf, hellofromTonya, markjaquith, peterwilsoncc, costdev, knutsp, aristath.
See #56513, #56034.
Built from https://develop.svn.wordpress.org/trunk@54133


git-svn-id: http://core.svn.wordpress.org/trunk@53692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-12 15:47:14 +00:00
John Blackbourn
6aa053dc01 Docs: Various docblock improvements.
See #54729

Built from https://develop.svn.wordpress.org/trunk@53299


git-svn-id: http://core.svn.wordpress.org/trunk@52888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-28 09:46:21 +00:00
audrasjb
223cda987f Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.

Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.

Built from https://develop.svn.wordpress.org/trunk@52978


git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 16:25:03 +00:00
Andrew Ozz
0fcde6de17 Editor: Revert [51748] and [51649]. They intorduced a bug where wp.editor may be replaced with wp.oldEditor in certain cases.
Props desrosj, davidbinda, azaozz.
Fixes #53762.
Built from https://develop.svn.wordpress.org/trunk@51768


git-svn-id: http://core.svn.wordpress.org/trunk@51375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 23:29:58 +00:00
Andrew Ozz
03bbf916a9 Editor: fix the replacement of wp.editor with wp.oldEditor in the inline script outputted when enqueueing the old editor.
Props fullofcaffeine, davidbinda, grantmkin, get_dave, azaozz.
Fixes #53762.
Built from https://develop.svn.wordpress.org/trunk@51748


git-svn-id: http://core.svn.wordpress.org/trunk@51356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 19:16:02 +00:00
Andrew Ozz
774c8047c5 Editor: Replace the remaining references to wp.editor with wp.oldEditor.
Props zieladam.
Fixes #53762.
Built from https://develop.svn.wordpress.org/trunk@51649


git-svn-id: http://core.svn.wordpress.org/trunk@51255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-08-21 00:20:00 +00:00
Andrew Ozz
8a8c4796db TinyMCE: ensure initialization runs in all cases on 'interactive' and 'complete' readyState. Fixes a rare bug when the init code is inserted in the DOM after the page has finished loading.
Props Collizo4sky, azaozz.
Fixes #53632.
Built from https://develop.svn.wordpress.org/trunk@51402


git-svn-id: http://core.svn.wordpress.org/trunk@51013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-10 23:58:57 +00:00
Andrew Ozz
34cfd7e4ad TinyMCE: Don't attempt to initialize the same instance twice. Follow up to [51082].
See #52133, #52050.
Built from https://develop.svn.wordpress.org/trunk@51085


git-svn-id: http://core.svn.wordpress.org/trunk@50694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:21:57 +00:00
Andrew Ozz
47fb9c7f3d TinyMCE: Fix initialization when the editor is in a postbox by delaying it until document.readyState === 'complete'.
Props metalandcoffee, desrosj, patkemper, herrvigg, spikeuk1, dway, mkdgs, azaozz.
Fixes #52133, #52050.
Built from https://develop.svn.wordpress.org/trunk@51082


git-svn-id: http://core.svn.wordpress.org/trunk@50691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:07:57 +00:00
desrosj
50c526f82b Editor: Hide the quicktags toolbar when JavaScript is disabled.
This adds the `hide-if-no-js` class to the quicktags toolbar in the Classic Editor. This prevents an empty space from showing when JavaScript is disabled.

Props DeusTron, sabernhardt, Boniu91, poena.
Fixes #40570.
Built from https://develop.svn.wordpress.org/trunk@50980


git-svn-id: http://core.svn.wordpress.org/trunk@50589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 19:44:57 +00:00
Sergey Biryukov
2d8633bf22 I18N: Merge duplicate "Column" strings, remove unnecessary context.
Props ramiy, justinahinon, garrett-eclipse, audrasjb.
Fixes #47259.
Built from https://develop.svn.wordpress.org/trunk@49541


git-svn-id: http://core.svn.wordpress.org/trunk@49279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-11-09 11:17:07 +00:00
John Blackbourn
57a3f803ae Docs: First pass at some inline docs fixes mostly made by PHPCBF.
See #49572, #50744
Built from https://develop.svn.wordpress.org/trunk@48586


git-svn-id: http://core.svn.wordpress.org/trunk@48348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 20:01:04 +00:00
John Blackbourn
5eb3f0ffcb Docs: Improve docs for arguments that accept a numerically indexed array of associative arrays.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48475


git-svn-id: http://core.svn.wordpress.org/trunk@48244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-14 12:10:05 +00:00
Sergey Biryukov
8713fac0d7 Docs: Remove unused @global declarations from _WP_Editors::print_tinymce_scripts().
Follow-up to [47860].

See #45398.
Built from https://develop.svn.wordpress.org/trunk@47861


git-svn-id: http://core.svn.wordpress.org/trunk@47637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-27 19:48:11 +00:00
whyisjake
552883574b Editor: Remove TinyMCE global version.
The global variable is not being used in the `editor_settings` method. 

Fixes #45398.
Props ishitaka, noisysocks, mista-flo.


Built from https://develop.svn.wordpress.org/trunk@47860


git-svn-id: http://core.svn.wordpress.org/trunk@47636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-27 19:28:12 +00:00
Sergey Biryukov
7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Sergey Biryukov
38676936ba Coding Standards: Use strict type check for in_array() and array_search() where strings are involved.
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47550


git-svn-id: http://core.svn.wordpress.org/trunk@47325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:02:11 +00:00
Sergey Biryukov
641c632b0c Coding Standards: Use Yoda conditions where appropriate.
See #49222.
Built from https://develop.svn.wordpress.org/trunk@47219


git-svn-id: http://core.svn.wordpress.org/trunk@47019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 16:55:09 +00:00
Sergey Biryukov
803feb30dd Docs: Improve description for the $editor_id parameter of wp_editor() and _WP_Editors::editor().
The restictions mentioned for the parameter value should be consistenct.

Props pbiron, SergeyBiryukov.
Fixes #49384.
Built from https://develop.svn.wordpress.org/trunk@47210


git-svn-id: http://core.svn.wordpress.org/trunk@47010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-07 23:30:05 +00:00
Sergey Biryukov
47ed56f38f Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.
Built from https://develop.svn.wordpress.org/trunk@47198


git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 06:33:11 +00:00
Sergey Biryukov
11fb46d4c6 Editor: Remove back-compat stub for Classic Editor's old distraction-free writing mode.
The original script was deprecated in [30338] and removed in [32677].

Props Presskopp, ketuchetan.
Fixes #39448.
Built from https://develop.svn.wordpress.org/trunk@47164


git-svn-id: http://core.svn.wordpress.org/trunk@46964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-02 04:15:03 +00:00
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov
dd4d98a368 Docs: In various @return tags, list the expected type first, instead of false.
Follow-up to [46696].

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47060


git-svn-id: http://core.svn.wordpress.org/trunk@46860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-11 18:32:05 +00:00
Sergey Biryukov
a2f5c24d36 Docs: Add missing descriptions and @return tags for _WP_Editors::get_mce_locale() and ::get_baseurl().
Props adnan.limdi.
Fixes #41869.
Built from https://develop.svn.wordpress.org/trunk@47023


git-svn-id: http://core.svn.wordpress.org/trunk@46823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-12-31 01:31:02 +00:00
Sergey Biryukov
7174c2a0c7 Docs: Add missing @since tags for wp-includes/class-wp-editor.php.
See #48303.
Built from https://develop.svn.wordpress.org/trunk@47022


git-svn-id: http://core.svn.wordpress.org/trunk@46822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-12-31 01:25:03 +00:00
Sergey Biryukov
0f90f6a739 Editor: Pass $editor_id parameter to tiny_mce_plugins, mce_external_plugins, and mce_external_languages filters, for consistency with teeny_mce_plugins.
Document the `classic-block` value passed to various editor filters in `wp_tinymce_inline_scripts()`.

Add missing `@since` entries for the existing `$editor_id` parameter in various filters.

Props djp424, johnbillion, SergeyBiryukov.
Fixes #48441.
Built from https://develop.svn.wordpress.org/trunk@46737


git-svn-id: http://core.svn.wordpress.org/trunk@46537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-16 16:36:02 +00:00
Sergey Biryukov
9088bea749 Docs: Make @param tags in mce_buttons and related filters consistent with the variable names.
Props upadalavipul, isabel_brison.
Fixes #41456.
Built from https://develop.svn.wordpress.org/trunk@46675


git-svn-id: http://core.svn.wordpress.org/trunk@46475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-07 07:12:06 +00:00
Dominik Schilling
6f38c7fb81 Docs: Convert 'Block Editor' to lowercase.
Props garrett-eclipse.
Fixes #45634.
Built from https://develop.svn.wordpress.org/trunk@46386


git-svn-id: http://core.svn.wordpress.org/trunk@46185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-04 20:12:58 +00:00
Andrea Fercia
93dd6d907a Accessibility: Media: Make the Image Editor buttons text visible.
User interface controls that use only icons aren't ideal for many users. 

Universal icons are rare. Icons must communicate meaning but their actual meaning varies depending on many factors including the users cultural background.
Moreover, users with cognitive impairments and speech recognition users need interface controls with visible text to be able to operate them.

- shortens some of the buttons text to: Rotate left, Rotate right, Flip vertical, Flip horizontal
- moves the Undo and Redo buttons underneath the main buttons group

Props nrqsnchz, melchoyce, karmatosed, sabernhardt, mikeschroder.
Fixes #47116.

Built from https://develop.svn.wordpress.org/trunk@46326


git-svn-id: http://core.svn.wordpress.org/trunk@46125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-26 17:16:57 +00:00
Sergey Biryukov
a9aefc83bc Code Modernization: Remove conditional use of PHP realpath().
The `realpath()` function was introduced in PHP 4.0.0. There's no point in checking if the function exists in PHP 5.6+, in only 2 instances out of 29.

Props jrf.
Fixes #48075.
Built from https://develop.svn.wordpress.org/trunk@46210


git-svn-id: http://core.svn.wordpress.org/trunk@46022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-20 20:46:56 +00:00
Sergey Biryukov
e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Aaron Jorbin
c377191858 PHP 7.4 compatibility fix / accessing arrays/string using curly brace syntax
PHP used to allow both square brackets and curly braces to be used interchangeably for accessing array elements and string offsets. The curly bracket syntax is only allowed in a limited set of cases and can be confusing for people not used to it.
PHP 7.4 will deprecate the curly brace syntax for accessing array elements and string offsets and it is expected that support will be completely removed in PHP 8.0.
Ref: https://wiki.php.net/rfc/deprecate_curly_braces_array_access

See #47751.
Props jrf.


Built from https://develop.svn.wordpress.org/trunk@45730


git-svn-id: http://core.svn.wordpress.org/trunk@45541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 20:21:55 +00:00
Andrew Ozz
ff723a2fba Editor: Make registered editor stylesheets (editor-style.css) available to the front-end.
Props webmandesign, azaozz.
Fixes #34882.
Built from https://develop.svn.wordpress.org/trunk@45621


git-svn-id: http://core.svn.wordpress.org/trunk@45432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-11 18:30:57 +00:00
Gary Pendergast
87675d288b Coding Standards: Fix all WordPress.WhiteSpace.PrecisionAlignment issues.
See #47632.


Built from https://develop.svn.wordpress.org/trunk@45602


git-svn-id: http://core.svn.wordpress.org/trunk@45413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 05:21:56 +00:00
Gary Pendergast
4803fc405e Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.
See #47632.


Built from https://develop.svn.wordpress.org/trunk@45590


git-svn-id: http://core.svn.wordpress.org/trunk@45401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-02 23:42:58 +00:00
Andrew Ozz
77e87830ae TinyMCE: Fix keyboard navigation when the dfw button is present but hidden. Ensure that button is added last in the DOM to match where it appears visually.
Props afercia, azaozz.
Fixes #46640.
Built from https://develop.svn.wordpress.org/trunk@45172


git-svn-id: http://core.svn.wordpress.org/trunk@44981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 18:08:53 +00:00
Andrew Ozz
7ab495bfed TinyMCE:
- Fix adding the keyboard shortcuts to all button tooltips in the classic editor and classic block.
- Fix translating the aria labels for all buttons.

Fixes #35710;
Built from https://develop.svn.wordpress.org/trunk@45066


git-svn-id: http://core.svn.wordpress.org/trunk@44875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-29 00:49:51 +00:00
desrosj
41aaf1d772 Editor: Fix name of the new editor for inline comment.
In [44398], an inline comment was introduced that did not refer to the new editor as the Block Editor. This corrects that comment.

See #45788.
Built from https://develop.svn.wordpress.org/trunk@44399


git-svn-id: http://core.svn.wordpress.org/trunk@44229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-05 03:48:50 +00:00
desrosj
80503c5c0e Editor: Allow the “Add Media” button tooltip to be translated in the Classic block.
In the Classic Editor, the “Add Media” button was outside of the TinyMCE editor. In the Block Editor, the “Add Media” button was moved into the TinyMCE toolbar in the Classic block, but the tooltip was not added to the list of translatable strings. This adds “Add Media” to that list.

The corresponding keyboard shortcut is also specified for the “Add Media” button.

Props afercia.

Fixes #45788.
Built from https://develop.svn.wordpress.org/trunk@44398


git-svn-id: http://core.svn.wordpress.org/trunk@44228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-05 03:40:50 +00:00
Sergey Biryukov
6ffafa5bc7 TinyMCE: Fix the keyboard shortcut (Alt+Shift+H) to not open the default Block Editor help modal and change the title of the help modal to "Classic Block Keyboard Shortcuts" in the Classic BLock. Also remove Alt+Shift+Z in the Classic Block as it conflicts with the Block Editor.
Props azaozz.
Merges [43915] to trunk.
Fixes #45365.
Built from https://develop.svn.wordpress.org/trunk@44257


git-svn-id: http://core.svn.wordpress.org/trunk@44087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:32:21 +00:00
desrosj
94ffe0db5d Classic Editor: Disable the wpautop TinyMCE plugin on block posts.
As the block editor adds its own `<p>` tags, disabling the wpautop stops the classic editor from removing them.

Props pento.

Merges [43758] to trunk.

See #45113.
Built from https://develop.svn.wordpress.org/trunk@44120


git-svn-id: http://core.svn.wordpress.org/trunk@43950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:23:55 +00:00
desrosj
6d620cd5e5 Script loading: Fix regression after [43738].
After [43738], TinyMCE would be loaded earlier than before, which makes filters run at a different time relative to the loading of TinyMCE. Fix this by calling `wp_print_scripts` at the location where TinyMCE would previously be inserted as a `<script>` tag in the page.

Also, an TinyMCE translation related `<script>` that was mistakenly removed in [44115].

Props azaozz, omarreiss, swisspidy, atimmer.

Merges [43753], [43754] to trunk.

Fixes #45065.
Built from https://develop.svn.wordpress.org/trunk@44119


git-svn-id: http://core.svn.wordpress.org/trunk@43949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:23:17 +00:00
desrosj
5db34748e6 Script loader: Adjust JS packages registration.
Adjusts the packages registration after [43723]:

    Combine the different registration functions into one `wp_default_packages` function. To reach this goal move the prefix logic into a function so it can be called from different locations. Use a static variable there to prevent duplicate inclusion of `version.php`.

    Call this function from the `wp_default_scripts` action by registering it as a default filter.

    Combine some of the logic in `_WP_Editors::print_tinymce_scripts` into `wp_register_tinymce_scripts`. The logic to force an uncompressed TinyMCE script file stays in `_WP_Editors::force_uncompressed_tinymce` because that logic is very specific to the classic editor.

    The script handle `wp-tinymce` is now a dependency of the editor script handle. In combination with the previous item, this makes the classic editor work.

    Adjust the syntax of the script paths to be more consistent with other WordPress code.

    Always use "production" mode for the media files to prevent people from inadvertently committing development files.

Props pento, omarreiss, atimmer.

Merges [43738] into trunk.

Fixes #45065.
Built from https://develop.svn.wordpress.org/trunk@44115


git-svn-id: http://core.svn.wordpress.org/trunk@43945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 17:27:38 +00:00
Gary Pendergast
56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


Built from https://develop.svn.wordpress.org/trunk@43571


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Gary Pendergast
7c696fbed2 Editor: Use apply_filters_deprecated() for some deprecated filters.
The `htmledit_pre` and `richedit_pre` filters have been deprecated since 4.3.0, since before `apply_filters_deprecated()` existed. They're now correctly run using `apply_filters_deprecated()`.

Props sebastienthivinfocom, lbenicio, ianbelanger.
Fixes #44341.


Built from https://develop.svn.wordpress.org/trunk@43464


git-svn-id: http://core.svn.wordpress.org/trunk@43291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 07:38:24 +00:00
Andrew Ozz
679f442285 TinyMCE: do not force-load external plugins, not needed any more and may cause issues.
Fixes #44330.
Built from https://develop.svn.wordpress.org/trunk@43337


git-svn-id: http://core.svn.wordpress.org/trunk@43165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:25:57 +00:00
Andrew Ozz
7b5f40133a TinyMCE: switch off concatenation when a custom TinyMCE theme is used. Prevents conflict with the default theme as it loads first.
Props programmin, azaozz.
Fixes #43969.
Built from https://develop.svn.wordpress.org/trunk@43222


git-svn-id: http://core.svn.wordpress.org/trunk@43051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 19:50:21 +00:00