Commit Graph

227 Commits

Author SHA1 Message Date
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
Scott Taylor
02ae926dfd Round 2 of: We should use ellipses &hellip; / … instead of three dots/periods ... e.g Loading… not Loading...
Props yoavf.
Fixes #32875.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 04:39:25 +00:00
Andrew Ozz
db0ca19899 TinyMCE: disable the native fullscreen plugin on mobile devices by default.
Props iseulde. Fixes #33137;
Built from https://develop.svn.wordpress.org/trunk@33835


git-svn-id: http://core.svn.wordpress.org/trunk@33803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-31 22:45:22 +00:00
Scott Taylor
2a44bc6a59 In _WP_Editors::editor_settings(), $first_run is unused.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-21 18:30:24 +00:00
Andrew Ozz
fb59c76858 TinyMCE: remove the spare string for the keyboard shortcuts modal.
See #31441.
Built from https://develop.svn.wordpress.org/trunk@33509


git-svn-id: http://core.svn.wordpress.org/trunk@33476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 23:20:24 +00:00
Andrew Ozz
c96977e083 TinyMCE: fix (again) the text in the keyboard shortcuts modal for the changed patterns.
See #31441.
Built from https://develop.svn.wordpress.org/trunk@33504


git-svn-id: http://core.svn.wordpress.org/trunk@33471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 21:54:24 +00:00
Andrew Ozz
c9871174d1 TinyMCE: fix the text in the keyboard shortcuts modal for the changed patterns.
See #31441.
Built from https://develop.svn.wordpress.org/trunk@33501


git-svn-id: http://core.svn.wordpress.org/trunk@33468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 21:07:23 +00:00
Ella Iseulde Van Dorpe
add46de183 Editor: word count: remove redundant script enqueuing
It is now a dependency of `post`.

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


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


git-svn-id: http://core.svn.wordpress.org/trunk@33267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-16 12:41:25 +00:00
Andrew Ozz
4bd5e2db01 TinyMCE:
- Go back to encoding the editor content only when TinyMCE is used.
- Add check and encode `</textarea>` if present.
See #32425.
Built from https://develop.svn.wordpress.org/trunk@33187


git-svn-id: http://core.svn.wordpress.org/trunk@33159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 03:19:24 +00:00
Andrew Ozz
cacf51c3ec TinyMCE: add help for the text patterns to the shortcuts help popup.
See #31441.
Built from https://develop.svn.wordpress.org/trunk@33127


git-svn-id: http://core.svn.wordpress.org/trunk@33098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-08 19:43:24 +00:00
Sergey Biryukov
4cba374f44 Make "Preformatted" string in TinyMCE translatable.
props iseulde.
fixes #32862.
Built from https://develop.svn.wordpress.org/trunk@33048


git-svn-id: http://core.svn.wordpress.org/trunk@33019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-02 12:01:24 +00:00
Andrew Ozz
7a4c8d8977 TinyMCE: add the editor focusing help the Keyboard Shortcuts modal.
See #31913.
Built from https://develop.svn.wordpress.org/trunk@32957


git-svn-id: http://core.svn.wordpress.org/trunk@32928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 18:49:25 +00:00
Andrew Ozz
561ca94998 TinyMCE: update the Keyboard Shortcuts help modal, use the TinyMCE UI API instead of an iframe.
Props iseulde, azaozz. Fixes #31913.
Built from https://develop.svn.wordpress.org/trunk@32951


git-svn-id: http://core.svn.wordpress.org/trunk@32922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 04:40:24 +00:00
Andrew Ozz
eaadfde950 Define SCRIPT_DEBUG early on every load, similarly to WP_DEBUG. Remove defined( 'SCRIPT_DEBUG' ) checks.
Fixes #32333.
Built from https://develop.svn.wordpress.org/trunk@32935


git-svn-id: http://core.svn.wordpress.org/trunk@32906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-25 02:29:31 +00:00
Andrew Ozz
e4758f42e5 Update the TinyMCE initialization:
- Replace `wp_htmledit_pre()` and `wp_richedit_pre()` with `format_for_editor()`.
- Replace the `'htmledit_pre'` and `'richedit_pre'` filters with `'format_for_editor'`.
- Do not run the post content through `wpautop()` in PHP when the visual editor is default. Run the textarea content through the JS wpautop on initializing TinyMCE.
- Simplify both editors initialization.
- Improve setting of `wpActiveEditor` in Quicktags.
- Improve editor.js, use `tinymce.$` when possible.
See #32425.
Built from https://develop.svn.wordpress.org/trunk@32899


git-svn-id: http://core.svn.wordpress.org/trunk@32870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-21 22:01:28 +00:00
Ella Iseulde Van Dorpe
356fd0ff81 TinyMCE: add wptextpattern plugin
This plugin can automatically format text patterns as you type. It includes two patterns: unordered (`* ` and `- `) and ordered list (`1. ` and `1) `). If the transformation in unwanted, the user can undo the change by pressing backspace, using the undo shortcut, or the undo button in the toolbar.

This is the first TinyMCE plugin that has unit tests and there's some good groundwork for adding tests to existing plugins in the future.

First run. See #31441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-06 20:07:24 +00:00
Andrew Ozz
b3d04247b7 Editor:
- Remove the old DFW.
- Add back-compat stub for wp-fullscreen.js.
- Keep wp_ajax_wp_fullscreen_save_post() for now.
See #30949.
Built from https://develop.svn.wordpress.org/trunk@32677


git-svn-id: http://core.svn.wordpress.org/trunk@32647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-01 17:38:29 +00:00
Scott Taylor
94f29f27a1 Clean up @global doc blocks/imports for class-wp-editor.php.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-22 05:10:24 +00:00
Scott Taylor
3a5f584109 Add missing doc blocks to class-wp-editor.php.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-22 03:52:27 +00:00
Gary Pendergast
168729cb0d Remove some old backwards compatilibity code from TinyMCE.
Props azaozz.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-20 05:50:27 +00:00
Andrew Ozz
011fbf462f wpLink: always show the URL field at the top.
Fixes #28206.
Built from https://develop.svn.wordpress.org/trunk@32017


git-svn-id: http://core.svn.wordpress.org/trunk@31996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-04 21:18:28 +00:00
Andrew Ozz
7289cfcc7c TinyMCE: remove block_formats setting, this is now the default in TinyMCE 4.1.9.
Props iseulde. Fixes #31585.
Built from https://develop.svn.wordpress.org/trunk@31735


git-svn-id: http://core.svn.wordpress.org/trunk@31716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:57:28 +00:00
Gary Pendergast
46e2a65cf1 Add emoji support, with Twemoji fallback.
Replace exisiting smilies with equivalent emoji, or with shiny new smiley images where no emoji existed.

Props batmoo, joen and mkaz for the original plugin upon which this is based.

Props pento, iseulde, kraftbj and peterwilsoncc for making the internet's dreams come true.

See #31242


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


git-svn-id: http://core.svn.wordpress.org/trunk@31714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 22:49:28 +00:00
Dominik Schilling
d97fc40a0c Editor: Hide TinyMCE help button on mobile.
props MattyRob, iseulde.
fixes #31161.
Built from https://develop.svn.wordpress.org/trunk@31718


git-svn-id: http://core.svn.wordpress.org/trunk@31699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 16:02:26 +00:00
Helen Hou-Sandí
4cf596708a wpLink: Title case "Link Text", as it's an existing string.
see #28206.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 03:03:28 +00:00
Andrew Ozz
eb878043a5 wpLink: change the text label to Link text, always focus the URK field, fix Ctrl/Cmd + K shortcut. See #28206.
Built from https://develop.svn.wordpress.org/trunk@31714


git-svn-id: http://core.svn.wordpress.org/trunk@31695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 03:01:27 +00:00