Commit Graph

252 Commits

Author SHA1 Message Date
Weston Ruter
d68bbe13cb TinyMCE: respect the Disable the visual editor when writing user setting and don't output the TinyMCE components when using wp_enqueue_editor().
Merges [40991] onto 4.8 branch.
Props azaozz.
Fixes #40960 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41067


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 01:55:32 +00:00
Weston Ruter
db65c15aba TinyMCE: fix directionality settings for RTL languages.
Merges [40927] to 4.8 branch.
Props westonruter, sa3idho.
Fixes #40972 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41066


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 01:45:34 +00:00
Andrew Ozz
56101fc06a TinyMCE: Force urlencoding of commas in URLs added by plugins to prevent warnings about missing stylesheets.
Fixes #40893.
Built from https://develop.svn.wordpress.org/trunk@40862


git-svn-id: http://core.svn.wordpress.org/trunk@40712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-31 22:04:43 +00:00
Andrew Ozz
dd0d110520 TinyMCE: update to 4.6.0. Has many new features and bug fixes, changelog: https://www.tinymce.com/docs/changelog/#version460-may42017.
Fixes #40690.
Built from https://develop.svn.wordpress.org/trunk@40583


git-svn-id: http://core.svn.wordpress.org/trunk@40453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 05:32:46 +00:00
Andrew Ozz
c7058c739d Editor: fix undefined var notice in editor_js() in class-wp-editor.php.
Props littler.chicken.
Fixes #40501, see #35760.
Built from https://develop.svn.wordpress.org/trunk@40515


git-svn-id: http://core.svn.wordpress.org/trunk@40391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 01:12:44 +00:00
Sergey Biryukov
ebf0b9e46e Editor: Define $suffix before using it in _WP_Editors::print_tinymce_scripts().
Props imath.
Fixes #40479. See #35760.
Built from https://develop.svn.wordpress.org/trunk@40477


git-svn-id: http://core.svn.wordpress.org/trunk@40353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 12:02:46 +00:00
Andrew Ozz
d0e4448257 Editor: Provide API for the editor to be dynamically instantiated via JS. First run.
See: #35760
Built from https://develop.svn.wordpress.org/trunk@40476


git-svn-id: http://core.svn.wordpress.org/trunk@40352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 02:38:44 +00:00
Andrew Ozz
69c29935d5 TinyMCE: improve the previews for embedded WordPress posts:
- Add option to force a sandbox iframe in wpview.
- Use it to show the embedded post preview.
- Remove the deprecated `wpembed` plugin.js

Fixes #39513.
Built from https://develop.svn.wordpress.org/trunk@40019


git-svn-id: http://core.svn.wordpress.org/trunk@39956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 04:25:44 +00:00
Andrew Ozz
e2166de4b0 Always add page-template-default class to the editor body when the template is not specified. This matches the behavior on the front-end.
Props timph (for the detailed bug report), azaozz.
Fixes #39368 for trunk.
Built from https://develop.svn.wordpress.org/trunk@39678


git-svn-id: http://core.svn.wordpress.org/trunk@39618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 01:53:43 +00:00
Andrew Ozz
95720f3b7c TinyMCE: after chats in #core-editor and #desing on Slack, the decision is to not remove Heading 1 for beta1.
See #38049.
Built from https://develop.svn.wordpress.org/trunk@38970


git-svn-id: http://core.svn.wordpress.org/trunk@38913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 22:01:33 +00:00
Andrew Ozz
11e7d3d250 TinyMCE: revert removing the numbers (2-6) after the headings in the drop-down. Seems it causes more confusion.
See #27159.
Built from https://develop.svn.wordpress.org/trunk@38946


git-svn-id: http://core.svn.wordpress.org/trunk@38889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 06:16:30 +00:00
Andrew Ozz
ed2e427b9d TinyMCE: remove the numbers (2-6) after the headings in the drop-down. These are previews for the actual styling of headings in the editor.
See #27159.
Built from https://develop.svn.wordpress.org/trunk@38939


git-svn-id: http://core.svn.wordpress.org/trunk@38882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 01:42:48 +00:00
Andrew Ozz
e1ae827577 TinyMCE: remove and rearrange some of the editor buttons to improve user experience.
Props hugobaeta, melchoyce, celloexpressions, mor10, iseulde, mrwweb.
See #27159.
Built from https://develop.svn.wordpress.org/trunk@38932


git-svn-id: http://core.svn.wordpress.org/trunk@38875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 22:51:36 +00:00
Andrew Ozz
913926c1bd TinyMCE: make keyboard shortcuts more discoverable by adding them to the buttons tooltips and in the Formats drop-down.
Props mor10, azaozz.
Fixes #38063.
Built from https://develop.svn.wordpress.org/trunk@38897


git-svn-id: http://core.svn.wordpress.org/trunk@38840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 01:40:31 +00:00
Andrew Ozz
4996d05355 TinyMCE:
- When editing pages, add body class with the page template, or `page-template-default`.
- Change the page template class when the users select another template, similarly to changing the post type class for posts.

Props webmandesign.
Fixes #37599.
Built from https://develop.svn.wordpress.org/trunk@38803


git-svn-id: http://core.svn.wordpress.org/trunk@38746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-17 01:10:28 +00:00
Andrew Ozz
cb966db094 TiinyMCE: update to 4.4.3, changelog: https://www.tinymce.com/docs/changelog/#version443-september12016
Fixes #38081, #38245, #37507, #37808 and #38000.
Built from https://develop.svn.wordpress.org/trunk@38773


git-svn-id: http://core.svn.wordpress.org/trunk@38716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-11 00:10:32 +00:00
Pascal Birchler
4a88d55054 I18N: Introduce a user-specific language setting.
By enabling the user to select their preferred locale when editing the profile, we allow for greater personalization of the WordPress admin and therefore a better user experience.

The back end will be displayed in the user's individual locale while the locale used on the front end equals the one set for the whole site. If the user didn't specify a locale, the site's locale will be used as a fallback. The new `locale` property of the `WP_User` class can be used to retrieve the user's locale setting.

Props ocean90, ipm-frommen, swissspidy.
Fixes #29783.
Built from https://develop.svn.wordpress.org/trunk@38705


git-svn-id: http://core.svn.wordpress.org/trunk@38648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-03 07:04:29 +00:00
Scott Taylor
9383bf8f74 General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.
See #37699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 05:49:37 +00:00
Andrew Ozz
15edc78f6f TinyMCE: fix toolbars alignment in RTL.
Fixes #37760 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38349


git-svn-id: http://core.svn.wordpress.org/trunk@38290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-25 01:20:30 +00:00
Andrew Ozz
5bccb0020d TinyMCE, inline link:
- Remove proxying through WordPress to test if an URL exists.
- Fix and enhance the regex that tests if the URL is well formed.

Fixes #36638.
Built from https://develop.svn.wordpress.org/trunk@38159


git-svn-id: http://core.svn.wordpress.org/trunk@38100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-26 23:24:28 +00:00
Andrew Ozz
04319a7898 TinyMCE, link check:
- Use `wp.a11y.speak()` to announce bad URLs.
- Do not add a title to the link toolbar.
- Better error message.

Props afercia, azaozz.
See #36638.
Built from https://develop.svn.wordpress.org/trunk@38126


git-svn-id: http://core.svn.wordpress.org/trunk@38067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-21 03:42:34 +00:00
Andrew Ozz
ba81f46c64 TinyMCE: replace the editor iframe title on MacOS to fix the help shortcut.
Props afercia, azaozz.
Fixes #36863.
Built from https://develop.svn.wordpress.org/trunk@38110


git-svn-id: http://core.svn.wordpress.org/trunk@38051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 01:39:31 +00:00
Dominik Schilling
94d344829e Editor: Enqueue the wp-embed script to fix embed previews inside the media modal.
Props swissspidy.
Fixes #37334.
Built from https://develop.svn.wordpress.org/trunk@38062


git-svn-id: http://core.svn.wordpress.org/trunk@38003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-14 13:29:31 +00:00
Sergey Biryukov
139387b7e5 Docs: Use 3-digit, x.x.x-style semantic versioning for _doing_it_wrong(), _deprecated_function(), _deprecated_argument(), and _deprecated_file() throughout core.
Props metodiew.
Fixes #36495.
Built from https://develop.svn.wordpress.org/trunk@37985


git-svn-id: http://core.svn.wordpress.org/trunk@37926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-06 12:40:29 +00:00
Andrew Ozz
accf240d37 Editor: after inserting a link detect if the URL is broken, first run.
Props iseulde, azaozz.
See #36638.
Built from https://develop.svn.wordpress.org/trunk@37741


git-svn-id: http://core.svn.wordpress.org/trunk@37706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-17 20:41:28 +00:00
Drew Jaynes
602b51a209 Docs: Standardize filter docs in core classes in wp-includes/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:15:28 +00:00
Dominik Schilling
693dfe3453 Editor: Merge two strings.
Props pavelevap.
See #27756.
Built from https://develop.svn.wordpress.org/trunk@37441


git-svn-id: http://core.svn.wordpress.org/trunk@37407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-16 18:57:29 +00:00
Drew Jaynes
b1804afeaf Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs.
Also use 'back-compat' in some inline comments where backward compatibility is the subject and shorthand feels more natural.

Note: 'backwards compatibility/compatibile' can also be considered correct, though it's primary seen in regular use in British English.

Props ocean90.
Fixes #36835.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-13 18:41:31 +00:00
Andrea Fercia
1bb3dd0ee7 Accessibility: improvements for the Editor wpLink modal form fields.
Adds `aria-describedby` attributes to the modal form fields after it
was partly restored in [37154].

Fixes #33301.
Built from https://develop.svn.wordpress.org/trunk@37160


git-svn-id: http://core.svn.wordpress.org/trunk@37126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-05 22:24:27 +00:00
Andrew Ozz
2618ccf64d Editor, wpLink:
- Restore the bottom half of the modal.
- Make it always expanded and remove the toggle. It is used as advanced link options now, no need to have simple mode.

Props iseulde, adamsilverstein, azaozz.
Fixes #36359.
Built from https://develop.svn.wordpress.org/trunk@37154


git-svn-id: http://core.svn.wordpress.org/trunk@37120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-01 21:13:29 +00:00
Dominik Schilling
9a16bfb5dc Editor: Make the tooltip for the 'apply' button in the inline link dialog translatable.
Props SergeyBiryukov.
Fixes #36366.
Built from https://develop.svn.wordpress.org/trunk@37091


git-svn-id: http://core.svn.wordpress.org/trunk@37058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-29 21:11:28 +00:00
Andrew Ozz
571cf91329 TinyMCE, inline link:
- Remove bottom box-shadow from the Apply button so it matches the rest.
- Change the tooltip for the cogwheel button to Link options.

See #33301.
Built from https://develop.svn.wordpress.org/trunk@37001


git-svn-id: http://core.svn.wordpress.org/trunk@36968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-16 02:04:27 +00:00
Andrew Ozz
b9a3602070 wpLink: fix accessibility issues:
- Add role=dialog and an aria-labelledby attribute to the modal container.
- Change the modal title to h1.
- Remove one ` ` that gets read out as `blank` by screen readers.
- Replace the Cancel link with a button.
- Clean up unused CSS.

Props afercia.
Fixes #30468.
Built from https://develop.svn.wordpress.org/trunk@36991


git-svn-id: http://core.svn.wordpress.org/trunk@36958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-14 20:55:26 +00:00
Andrew Ozz
13c885bdce TinyMCE, inline link:
- Remove unused user setting for wpLink.
- Remove redundant text and variable from wp_link_dialog().

Props afercia, azaozz.
See #33301.
Built from https://develop.svn.wordpress.org/trunk@36985


git-svn-id: http://core.svn.wordpress.org/trunk@36952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-14 01:39:26 +00:00
Andrew Ozz
d0b708fcb9 TinyMCE textpattern:
- Add description of the new patterns to the Shortcuts help modal.
- Fix the layout a bit and make the patterns in two columns.
- Disable the `textpatterns` plugin in IE < 9.

See #33300.
Built from https://develop.svn.wordpress.org/trunk@36761


git-svn-id: http://core.svn.wordpress.org/trunk@36728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-28 19:00:27 +00:00
Andrew Ozz
771cfe22ba TinyMCE, inline link dialog:
- Remove the bottom half of the (old) modal and add autocomplete on the URL field.
- Disable the inline edit dialog in old IE (7, 8 and 9). Use only the modal there.
- Fix in IE10 and 11.
- Fix (most?) remaining edge cases.
- Fix focusing the inline dialog, the modal and the editor.

See #33301.
Built from https://develop.svn.wordpress.org/trunk@36677


git-svn-id: http://core.svn.wordpress.org/trunk@36644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 06:20:26 +00:00
Andrew Ozz
3a2ef071d4 TinyMCE inline link:
- Fix not displaying anything when the URL is only a fragment. Show the whole URL.
- Fix editing a link when it is the very first word in the editor.
- Fix editing a link then some of the surrounding text or space is selected. Change the selection to only the link node.
- Add placeholder when adding new link.

See #33301.
Built from https://develop.svn.wordpress.org/trunk@36483


git-svn-id: http://core.svn.wordpress.org/trunk@36450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-06 00:51:27 +00:00
Ella Iseulde Van Dorpe
3663a5bca5 TinyMCE: add inline link dialog
First run.
Links the advanced button to the "old" dialog for now.

See #33301.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-23 00:08:26 +00:00
Andrew Ozz
e7b3d9cd11 Editor: remove the format_for_editor filter from the_editor_content after it runs as the next editor instance on the same page may not need it.
Props marcochiesi, azaozz.
Fixes #28403.
Built from https://develop.svn.wordpress.org/trunk@36062


git-svn-id: http://core.svn.wordpress.org/trunk@36027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-22 22:39:31 +00:00
Pascal Birchler
47306630ca Docs: Improve documentation for format_for_editor() and the 'the_editor_content' filter it is hooked to.
Props AramZS for initial patch.
Fixes #34866.
Built from https://develop.svn.wordpress.org/trunk@35904


git-svn-id: http://core.svn.wordpress.org/trunk@35868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-13 19:22:26 +00:00
John Blackbourn
aeaea96bed Correct the parameter type for the $stylesheet parameter in the mce_css filter documentation.
Fixes #34721
Props hnle

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


git-svn-id: http://core.svn.wordpress.org/trunk@35624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 17:07:37 +00:00
Sergey Biryukov
ae58f104cb Embeds: Rename TinyMCE wpoembed plugin to wpembed.
Props swissspidy.
Fixes #34272.
Built from https://develop.svn.wordpress.org/trunk@35397


git-svn-id: http://core.svn.wordpress.org/trunk@35361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-26 14:50:26 +00:00
Sergey Biryukov
a9dd940635 Remove unused variable in _WP_Editors::editor().
Props Athsear.
Fixes #34427.
Built from https://develop.svn.wordpress.org/trunk@35380


git-svn-id: http://core.svn.wordpress.org/trunk@35344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-24 14:32:27 +00:00
Ella Iseulde Van Dorpe
bafdd96ebf TinyMCE: add lang attribute
This is needed to make `hyphens: auto;` work correctly.

Fixes #32555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-16 10:11:27 +00:00
Gary Pendergast
83c3e3e00e Embeds: Add oEmbed provider support.
For the past 6 years, WordPress has operated as an oEmbed consumer, allowing users to easily embed content from other sites. By adding oEmbed provider support, this allows any oEmbed consumer to embed posts from WordPress sites.

In addition to creating an oEmbed provider, WordPress' oEmbed consumer code has been enhanced to work with any site that provides oEmbed data (as long as it matches some strict security rules), and provides a preview from within the post editor.

For security, embeds appear within a sandboxed iframe - the iframe content is a template that can be styled or replaced entirely by the theme on the provider site.

Props swissspidy, pento, melchoyce, netweb, pfefferle, johnbillion, extendwings, davidbinda, danielbachhuber, SergeyBiryukov, afercia

Fixes #32522.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 10:36:25 +00:00
Drew Jaynes
8b4c499664 Docs: There are quite alot of typos in core inline comments.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 04:13:48 +00:00
Sergey Biryukov
53ac914bd5 Add a comment to strings where the ellipsis cannot be used due to json_encode(), placeholders, or external dependencies.
Fixes #32875.
Built from https://develop.svn.wordpress.org/trunk@34233


git-svn-id: http://core.svn.wordpress.org/trunk@34197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 11:59:26 +00:00
Dominik Schilling
4d5cd90b46 Revert [34013] and parts of [33970].
* `_WP_Editors::wp_mce_translation()` can't be changed without changing strings in TinyMCE and plugins.
* `\u2026` is escaped by `json_encode()` to `\\u2026`, makes `\u2026` visible in our UI.

See #32875.
Built from https://develop.svn.wordpress.org/trunk@34087


git-svn-id: http://core.svn.wordpress.org/trunk@34055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-12 20:03:24 +00:00
Scott Taylor
6ea147d51c After [33970], swap UTF-8 characters for their \u2026 escape sequence.
See #32875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 20:30:24 +00:00
Sergey Biryukov
f9e7fb306c Merge two similar strings.
Props dipesh.kakadiya.
Fixes #33777.
Built from https://develop.svn.wordpress.org/trunk@33998


git-svn-id: http://core.svn.wordpress.org/trunk@33967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 10:59:27 +00:00