Commit Graph

170 Commits

Author SHA1 Message Date
Andrew Ozz
1a068f2a61 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@40019 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-27 04:24:58 +00:00
azaozz
9c509a1eae 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39678 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 01:52:06 +00:00
Andrew Ozz
0888864e29 TinyMCE: after chats in #core-editor and #desing on Slack, the decision is to not remove Heading 1 for beta1.
See #38049.

git-svn-id: https://develop.svn.wordpress.org/trunk@38970 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-26 22:00:07 +00:00
Andrew Ozz
9b8697aea3 TinyMCE: revert removing the numbers (2-6) after the headings in the drop-down. Seems it causes more confusion.
See #27159.

git-svn-id: https://develop.svn.wordpress.org/trunk@38946 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-26 06:15:54 +00:00
Andrew Ozz
3af74dfcbb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38939 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-26 01:41:46 +00:00
Andrew Ozz
7f8003e6ea TinyMCE: remove and rearrange some of the editor buttons to improve user experience.
Props hugobaeta, melchoyce, celloexpressions, mor10, iseulde, mrwweb.
See #27159.

git-svn-id: https://develop.svn.wordpress.org/trunk@38932 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 22:50:21 +00:00
Andrew Ozz
277bb681d7 TinyMCE: make keyboard shortcuts more discoverable by adding them to the buttons tooltips and in the Formats drop-down.
Props mor10, azaozz.
Fixes #38063.

git-svn-id: https://develop.svn.wordpress.org/trunk@38897 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 01:39:15 +00:00
Andrew Ozz
79fdcbdb07 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38803 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-17 01:10:01 +00:00
Andrew Ozz
7b3132214e TiinyMCE: update to 4.4.3, changelog: https://www.tinymce.com/docs/changelog/#version443-september12016
Fixes #38081, #38245, #37507, #37808 and #38000.

git-svn-id: https://develop.svn.wordpress.org/trunk@38773 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-11 00:09:03 +00:00
Pascal Birchler
f231e7233d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38705 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 07:03:41 +00:00
Scott Taylor
1825eff382 General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38459 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-31 05:48:49 +00:00
Andrew Ozz
861bdc722f TinyMCE: fix toolbars alignment in RTL.
Fixes #37760 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@38349 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 01:19:24 +00:00
Andrew Ozz
d16d808d8b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38159 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 23:23:21 +00:00
Andrew Ozz
fb1fbcfdc0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38126 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 03:41:17 +00:00
Andrew Ozz
616d4416e2 TinyMCE: replace the editor iframe title on MacOS to fix the help shortcut.
Props afercia, azaozz.
Fixes #36863.

git-svn-id: https://develop.svn.wordpress.org/trunk@38110 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 01:38:12 +00:00
Dominik Schilling
3baaffc5da Editor: Enqueue the wp-embed script to fix embed previews inside the media modal.
Props swissspidy.
Fixes #37334.

git-svn-id: https://develop.svn.wordpress.org/trunk@38062 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-14 13:28:36 +00:00
Sergey Biryukov
920f29616a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37985 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 12:39:01 +00:00
Andrew Ozz
faf7576562 Editor: after inserting a link detect if the URL is broken, first run.
Props iseulde, azaozz.
See #36638.

git-svn-id: https://develop.svn.wordpress.org/trunk@37741 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-17 20:40:04 +00:00
Drew Jaynes
c49afe285c 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@37492 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:14:19 +00:00
Dominik Schilling (ocean90)
54ede3d3fc Editor: Merge two strings.
Props pavelevap.
See #27756.

git-svn-id: https://develop.svn.wordpress.org/trunk@37441 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-16 18:56:52 +00:00
Drew Jaynes
195572596b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@37431 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-13 18:40:19 +00:00
Andrea Fercia
68a8211a55 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37160 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-05 22:23:23 +00:00
Andrew Ozz
bd800fbca4 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37154 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-01 21:12:18 +00:00
Dominik Schilling (ocean90)
0a9951a3b9 Editor: Make the tooltip for the 'apply' button in the inline link dialog translatable.
Props SergeyBiryukov.
Fixes #36366.

git-svn-id: https://develop.svn.wordpress.org/trunk@37091 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-29 21:10:39 +00:00
Andrew Ozz
69a7d21279 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37001 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-16 02:03:21 +00:00
Andrew Ozz
30d63dde4b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36991 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-14 20:54:58 +00:00
Andrew Ozz
289e9473df TinyMCE, inline link:
- Remove unused user setting for wpLink.
- Remove redundant text and variable from wp_link_dialog().

Props afercia, azaozz.
See #33301.

git-svn-id: https://develop.svn.wordpress.org/trunk@36985 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-14 01:38:09 +00:00
Andrew Ozz
392942e603 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36761 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-28 18:59:25 +00:00
Andrew Ozz
fb89bad3e1 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36677 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 06:20:01 +00:00
Andrew Ozz
b4779f7368 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36483 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-06 00:50:31 +00:00
Ella Iseulde Van Dorpe
b780792d87 TinyMCE: add inline link dialog
First run.
Links the advanced button to the "old" dialog for now.

See #33301.


git-svn-id: https://develop.svn.wordpress.org/trunk@36384 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-23 00:07:29 +00:00
Andrew Ozz
83f93e5e70 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@36062 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-22 22:39:01 +00:00
Pascal Birchler
94da64bff3 Docs: Improve documentation for format_for_editor() and the 'the_editor_content' filter it is hooked to.
Props AramZS for initial patch.
Fixes #34866.

git-svn-id: https://develop.svn.wordpress.org/trunk@35904 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-13 19:21:32 +00:00
John Blackbourn
3ced239517 Correct the parameter type for the $stylesheet parameter in the mce_css filter documentation.
Fixes #34721
Props hnle


git-svn-id: https://develop.svn.wordpress.org/trunk@35660 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-18 17:06:22 +00:00
Sergey Biryukov
ee4e4b8ff2 Embeds: Rename TinyMCE wpoembed plugin to wpembed.
Props swissspidy.
Fixes #34272.

git-svn-id: https://develop.svn.wordpress.org/trunk@35397 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-26 14:49:25 +00:00
Sergey Biryukov
9da02a9155 Remove unused variable in _WP_Editors::editor().
Props Athsear.
Fixes #34427.

git-svn-id: https://develop.svn.wordpress.org/trunk@35380 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-24 14:31:05 +00:00
Ella Iseulde Van Dorpe
4abf64eb14 TinyMCE: add lang attribute
This is needed to make `hyphens: auto;` work correctly.

Fixes #32555.


git-svn-id: https://develop.svn.wordpress.org/trunk@35217 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 10:10:32 +00:00
Gary Pendergast
43bd3d46c9 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@34903 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 10:35:18 +00:00
Drew Jaynes
69db043e3c Docs: There are quite alot of typos in core inline comments.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34717 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 04:12:16 +00:00
Sergey Biryukov
c57efab4f4 Add a comment to strings where the ellipsis cannot be used due to json_encode(), placeholders, or external dependencies.
Fixes #32875.

git-svn-id: https://develop.svn.wordpress.org/trunk@34233 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 11:58:41 +00:00
Dominik Schilling (ocean90)
ed36c88b73 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@34087 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-12 20:02:43 +00:00
Scott Taylor
8ed569b1ea After [33970], swap UTF-8 characters for their \u2026 escape sequence.
See #32875.


git-svn-id: https://develop.svn.wordpress.org/trunk@34013 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 20:29:18 +00:00
Sergey Biryukov
5d8eb77621 Merge two similar strings.
Props dipesh.kakadiya.
Fixes #33777.

git-svn-id: https://develop.svn.wordpress.org/trunk@33998 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 10:58:58 +00:00
Scott Taylor
d6e73d47e4 Round 2 of: We should use ellipses &hellip; / … instead of three dots/periods ... e.g Loading… not Loading...
Props yoavf.
Fixes #32875.


git-svn-id: https://develop.svn.wordpress.org/trunk@33970 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 04:38:31 +00:00
Andrew Ozz
0807da1bdd TinyMCE: disable the native fullscreen plugin on mobile devices by default.
Props iseulde. Fixes #33137;

git-svn-id: https://develop.svn.wordpress.org/trunk@33835 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 22:44:40 +00:00
Scott Taylor
a14be1fffa In _WP_Editors::editor_settings(), $first_run is unused.
See #33491.


git-svn-id: https://develop.svn.wordpress.org/trunk@33699 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 18:29:31 +00:00
Andrew Ozz
46f0c4d4e0 TinyMCE: remove the spare string for the keyboard shortcuts modal.
See #31441.

git-svn-id: https://develop.svn.wordpress.org/trunk@33509 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-29 23:19:56 +00:00
Andrew Ozz
362bb806cd TinyMCE: fix (again) the text in the keyboard shortcuts modal for the changed patterns.
See #31441.

git-svn-id: https://develop.svn.wordpress.org/trunk@33504 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-29 21:53:22 +00:00
Andrew Ozz
b1933f53dc TinyMCE: fix the text in the keyboard shortcuts modal for the changed patterns.
See #31441.

git-svn-id: https://develop.svn.wordpress.org/trunk@33501 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-29 21:06:13 +00:00
Ella Iseulde Van Dorpe
51e2bc173d Editor: word count: remove redundant script enqueuing
It is now a dependency of `post`.

Part props johnjamesjacoby.
Fixes #31766. See #30966.



git-svn-id: https://develop.svn.wordpress.org/trunk@33295 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-16 12:40:51 +00:00