Commit Graph

14347 Commits

Author SHA1 Message Date
Jonathan Desrosiers
f28ba0c9f6 Editor: Remove unwanted fields before saving posts.
The meta_input, file, and guid fields are not intended to be updated through user input.

Merges [44047] to trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@44295 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-18 21:31:14 +00:00
Jonathan Desrosiers
80a22dc202 PHPCS: Fix alignment issues.
This fixes some array alignment issues introduced in [44293].

git-svn-id: https://develop.svn.wordpress.org/trunk@44294 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-18 16:57:27 +00:00
Jonathan Desrosiers
a58e2a287a KSES: Conditionally remove the <form> element from $allowedposttags.
To avoid backwards compatibility issues, `<form>` is re-added if a custom filter has added the `<input>` or `<select>` elements to `$allowedposttags`.

Merges [43994] to trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@44293 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-18 16:45:54 +00:00
Jonathan Desrosiers
06f2b3f5bc Media: Improve verification of MIME file types.
Merges [43988] to trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@44292 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-18 16:34:17 +00:00
Jonathan Desrosiers
07cf8f3073 Block Editor: Show privacy help notice on Privacy Policy page.
When editing a page set to be the Privacy Policy page, display a help notice
containing a link to the Privacy Policy guide.

Merges [43920] to trunk.

Fixes #45057.

git-svn-id: https://develop.svn.wordpress.org/trunk@44291 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-18 16:13:59 +00:00
Sergey Biryukov
c7cc0cebe0 Scripts: Ensure sub-directory WordPress installs can load polyfill scripts.
`wp_get_script_polyfill()` bypasses `WP_Scripts::do_item()`, so didn't transform the script path into its fully qualified URL.

Props swissspidy, ocean90.
Merges [43960] to trunk.
Fixes #45469.

git-svn-id: https://develop.svn.wordpress.org/trunk@44286 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-18 04:04:21 +00:00
Jonathan Desrosiers
dd9db2bf0d Block Editor: Update @wordpress package dependencies.
Updates the following packages:

block-library, block-serialization-default-parser, block-serialization-spec-parser, blocks, edit-post, editor, format-library.

Merges [43955] to trunk.

Props youknowriad.

Fixes #45145.

git-svn-id: https://develop.svn.wordpress.org/trunk@44281 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 21:58:12 +00:00
Jonathan Desrosiers
e318383bd0 Block Editor: Add a placeholder for meta boxes that don't work in the block editor.
If a meta box is registered with the `__block_editor_compatible_meta_box` set to `false`, it's indicating that it doesn't work in the block editor. If that's the case, we can add a place holder to inform the user that they'll need to use the classic interface to work with this meta box.

Props pento, jorgefilipecosta, peterwilsoncc, karmatosed, noisysocks, dd32, ocean90.

Merges [43941] and [43945] to trunk.

Fixes #45217.

git-svn-id: https://develop.svn.wordpress.org/trunk@44280 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 21:51:43 +00:00
Jonathan Desrosiers
ebb311e52d Default Themes: Bump the version numbers and release dates.
The POT files for Twenty Ten and Eleven have also been updated.

Props laurelfulford, maedahbatool, mrahmadawais, pento.

Merges [43964] into trunk.

Fixes #45167.

git-svn-id: https://develop.svn.wordpress.org/trunk@44279 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 19:37:54 +00:00
Jonathan Desrosiers
0faee1f72a l10n: Ensure JavaScript language packages are loaded for the user locale.
`load_script_textdomain()` had a reversed check to decide if the user locale should be loaded. This check is now replaced with `determine_local()`.

Props ocean90.

Merges [43959] into trunk.

Fixes #45465.

git-svn-id: https://develop.svn.wordpress.org/trunk@44278 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 19:35:10 +00:00
Jonathan Desrosiers
15fa394a01 Block Editor: Fix the WordPress packages and vendor script registration.
The version is set properly and the scripts are automatically loaded in the footer.

This patch also includes a revert for the reusable blocks enqueue script.

Props pento, swissspidy, youknowriad.

Merges [43942] into trunk.

Fixes #45402.
See #45396.

git-svn-id: https://develop.svn.wordpress.org/trunk@44277 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 19:33:09 +00:00
Jonathan Desrosiers
4c636c6ec8 Query: Remove nextpage block delimiters when setting up global post data.
`WP_Query::setup_postdata()` splits the post up by `<!--nextpage-->`, which causes invalid block data to be contained in the post content.

This change removes the `<!-- wp:nextpage -->` and `<!-- /wp:nextpage -->`, as well.

Props pento, youknowriad, azaozz, noisysocks.

Merges [43940] into trunk.

See #45401.

git-svn-id: https://develop.svn.wordpress.org/trunk@44276 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 19:28:49 +00:00
Jonathan Desrosiers
d75cc8612b Block Editor: Refresh nonces used by wp.apiFetch.
Adds heartbeat nonces refreshing support to `wp.apiFetch` requests.

Props pento, adamsilverstein, dd32, desrosj, youknowriad.

Merges [43939] into trunk.

Fixes #45113. 

git-svn-id: https://develop.svn.wordpress.org/trunk@44275 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 19:27:08 +00:00
Jonathan Desrosiers
d2ed5529b8 Block Editor: Fix loading the script handling the "Manage Reusable Blocks" page.
This ensures the "import from JSON" and "export JSON" buttons are shown properly. The script is loaded in the footer because it relies on the DOM being already there.

Props noisysocks, mukesh27.

Merges [43936] into trunk.

Fixes #45396.

git-svn-id: https://develop.svn.wordpress.org/trunk@44274 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 19:07:35 +00:00
Jonathan Desrosiers
9d85e5050d Block Editor: Update @wordpress package dependencies.
Update packages include:

- block-library
- components
- edit-post
- editor
- format-library
- list-reusable-blocks
- nux

Other changes:

- Fix a translator comment in `edit-form-blocks.php`.
- Rename the `gutenberg_` functions in `blocks/latest-comments.php`.

Props noisy socks, youknowriad, pinto, swissspidy.

Merges [43935] and [43949-43951] into trunk.

See #45145.

git-svn-id: https://develop.svn.wordpress.org/trunk@44273 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 19:05:30 +00:00
Jonathan Desrosiers
5c6cc0f6ce WPDB: Check that $wpdb->last_result is countable before counting with it.
`wpdb::get_col()` iterates over `$wpdb->last_result`, which can be a non-countable value, should the preceding query have failed.

Props spacedmonkey, desrosj, pento.

Merges [43934] into trunk.

See #45299.

git-svn-id: https://develop.svn.wordpress.org/trunk@44272 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 18:38:13 +00:00
Jonathan Desrosiers
6e546d482d Core Editor: Specify script versions for the WordPress packages and their vendor dependencies.
Using the `package.json` versions of the NPM dependencies as versions when registering the WordPress scripts.

Props dimadin, dd32, youknowriad.

Merges [43925] to trunk.

Fixes #45187.

git-svn-id: https://develop.svn.wordpress.org/trunk@44271 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 18:18:49 +00:00
Jonathan Desrosiers
dab0d40436 Block Editor: Fix PHP warning when loading editor styles while in RTL.
In RTL languages, WordPress adds `style-editor-rtl.css` editor styles to the global `$editor_styles`.
This patch ignores handling these styles if the file is not preset.

Also, clarify the docs for the return value of the `block_version` function.

Props mostafa.s1990, desrosj, mukesh27.

Merges [43923] and [43924] to trunk.

Fixes #45288, #45342.

git-svn-id: https://develop.svn.wordpress.org/trunk@44270 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 18:06:42 +00:00
Jonathan Desrosiers
2ae5bb324d REST API: Preserve unknown, respect null in server-side block rendering.
- Skips validation where there is no attribute definition, but keeps the attribute value. Previously, the attribute would be omitted from the attributes passed to `render_callback`. Notably, this resolves an issue where `render_callback` cannot receive a block's `align` and `customClassName` attribute values, since these are defined as a client-side filter.
- Validates `null` as a proper value in its own right. Previously, a client implementation of a block could track `{“attribute":null}` as an explicitly empty value, and the server would wrongly initiate defaulting behavior. The new behavior will now only populate a default value if the attribute is not defined at all, including when unset in its being invalid per the attribute schema. 

Props aduth, noisysocks, youknowriad, danielbachhuber.

Merges [43918] to trunk.

See #45145 for the patch, #45098 for the original ticket.

git-svn-id: https://develop.svn.wordpress.org/trunk@44269 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 17:59:44 +00:00
Jonathan Desrosiers
abc29f4cef REST API: Always include title.raw/content.raw for Blocks in context=view.
Demarcations for reusable blocks are always expected to be accessible by clients.

Props noisysocks, youknowriad.

Merges [43917] to trunk.

See #45145 for the patch, #45098 for the original ticket.

git-svn-id: https://develop.svn.wordpress.org/trunk@44268 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 17:21:05 +00:00
Jonathan Desrosiers
e0942aec0c Block Editor: Expose value of user_can_richedit().
In order for the Block Editor to know whether to allow visual editing, it needs to know the value of `user_can_richedit()`.

Props youknowriad, danielbachhuber.

Merges [43916] into trunk.

Fixes #45375.

git-svn-id: https://develop.svn.wordpress.org/trunk@44267 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 17:08:10 +00:00
Jonathan Desrosiers
ceb5011f6a PHPCS: Fix code formatting issues.
In [44264], several code formatting issues were introduced. This fixes them.

git-svn-id: https://develop.svn.wordpress.org/trunk@44266 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 17:06:03 +00:00
Jonathan Desrosiers
7134636c6b TinyMCE: Run the filters for the Classic block.
The `wp_editor_settings` and `disable_captions` filters need to be run for the Classic Block.

This fixes possible regressions in plugins that use these filters, and plugins that use them to add filters for the buttons, external plugins, etc.

Props azaozz.

Merges [43914] into trunk.

Fixes #45348.

git-svn-id: https://develop.svn.wordpress.org/trunk@44265 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 17:02:02 +00:00
Jonathan Desrosiers
a229ea9c65 Help/About: WordPress 5.0 About Page.
The About page describes all the great changes in WordPress 5.0.

Highlights:

- Warn users of Gutenberg plugin of its deactivation upon 5.0 upgrade.
- Added illustrations to the Four Freedoms page.
- Include a link to wporg user’s plugin favorites as a way to display only the classic plugin as a suggestion for install.
- Detail the Classic Editor plugin and the support timeline.

Props pixelverbieger, ocean90, karmatosed, pento, boemedia, lonelyvegan, sami.keijonen, TimothyBlynJacobs, xkon, afercia, laurelfulford, joostdevalk, ipstenu, matveb, joen, tinkerbelly, chanthaboune, kjellr, alexislloyd, melchoyce, mcsf, courtney0burton, Otto42, cathibosco, tobifjellner, helen, audrasjb, antpb, jjj, elrae, desrosj, azaozz, joemcgill, skithund, gziolo.

Merges [43913], [43921-43922], [43937-43938], [43946-43947], [43952-43953], [43967-43969] into trunk.

Fixes #45178.

git-svn-id: https://develop.svn.wordpress.org/trunk@44264 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 16:35:32 +00:00
Jonathan Desrosiers
1b14dfa064 Twenty Sixteen: Update theme’s wide image styles to include Image Blocks
Twenty Sixteen includes functionality and styles that make full-size images extend wider than the content when they are added to posts, and appear below the post meta. This update adds the same behavior to image blocks and their captions.

Merges [43911] to trunk.

Props laurelfulford.
Fixes: #45380.

git-svn-id: https://develop.svn.wordpress.org/trunk@44263 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 15:45:05 +00:00
Jonathan Desrosiers
7a20625cf0 Block Editor: Update @wordpress dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.

Merges [43891], [43903], and [43919] to trunk.

Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.

git-svn-id: https://develop.svn.wordpress.org/trunk@44262 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 15:35:21 +00:00
Jonathan Desrosiers
572207384b Block Editor: Update @wordpress dependencies.
Changes of note:

- Includes the new Annotations API package.
- `wp-polyfill-ecmascript.js` is renamed to `wp-polyfill.js`.
- `strip_dynamic_blocks()` has been removed in favor of `excerpt_remove_blocks()`.
- The PHP block parser is now syncing from the `block-serialization-default-parser` package.
- `do_blocks()` uses the new parser.
- The `do_block` filter has been removed from `do_blocks()`, in favor of a `render_block` filter in `render_block()`.

Also, a little cleanup to `render_block()`. Always normalize `$block['attrs’]` to array in `’render_block’` filter.
Props pento, azaozz.

Merges [43884] and [43888] to trunk.

See #45145, #45190, #45264, #45282.

git-svn-id: https://develop.svn.wordpress.org/trunk@44261 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 04:50:48 +00:00
Jonathan Desrosiers
e63acae939 Editor: Add custom fields meta box support in the block editor.
This brings support for the custom fields meta box into the new block editor.

The `webpack` and `copy-webpack-plugin` packages have also been updated.

This does not bump the `@wordpress` packages like in [43861] because of conflicts with package versions already installed in `trunk`. The packages will be brought up to date in a subsequent merge.

Merges [43861] and [43863] into trunk.

See #45145.
Fixes #45257.

git-svn-id: https://develop.svn.wordpress.org/trunk@44260 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 03:51:08 +00:00
Sergey Biryukov
b6a378d345 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@44257 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 01:48:05 +00:00
Sergey Biryukov
d79ec242e4 REST API: Include fields with null schema in get_fields_for_response().
In [43736], we prevented rendering fields when not present in `?_fields=`. However, because `get_fields_for_response()` is dependent on `get_item_schema()`, any custom fields registered with a null schema would be incorrectly excluded from the response. Because the REST API permits a null schema for `register_rest_field()`, those fields should be included in the available fields for a response.

Props danielbachhuber.
Merges [43908] to trunk.
Fixes #45220.

git-svn-id: https://develop.svn.wordpress.org/trunk@44254 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 01:14:17 +00:00
Sergey Biryukov
2b8464c5e5 Build Tools: Minify the package CSS when building.
CSS coming from the `@wordpress` packages wasn't being minified in the build. This had the noteable side effect of causing RTL CSS to not be loaded when `SCRIPT_DEBUG` was set to `false`.

Props websupporter.
Merges [43905] to trunk.
Fixes #45330.

git-svn-id: https://develop.svn.wordpress.org/trunk@44252 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 00:36:36 +00:00
Sergey Biryukov
e03dee4e87 Block Editor: Load TinyMCE inline scripts later.
Previously, the TinyMCE inline scripts were added on the `init` action in the block editor. In the classic editor, however, these scripts are loaded when the TinyMCE window is printed, and some plugins rely on them being loaded later, so they can attach to the appropriate filters.

Props pento.
Merges [43901] to trunk.
Fixes #45338.

git-svn-id: https://develop.svn.wordpress.org/trunk@44251 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 00:28:36 +00:00
Sergey Biryukov
c2390f96a2 REST API: Avoid using 'parent' as path argument name for autosaves.
When 'parent' is set as the path argument name, it gets passed down through to the `create_item()` method and can erroneously reset the 'parent' value on the post itself. Instead, we rename the argument to 'id' and replicate the revision controller's `get_items_permissions_check()` to instead reference 'id'.

Also ensures revision query params (of which there are many) aren't exposed as the query params for autosaves (of which there are two).

Props TimothyBlynJacobs.
Merges [43897] to trunk.
See #43316.

git-svn-id: https://develop.svn.wordpress.org/trunk@44250 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 00:23:55 +00:00
Sergey Biryukov
98968ae2fc Scripts: Fix a PHP error in admin-ajax calls.
When making an ajax request, `wp_enqueue_registered_block_scripts_and_styles()` checked if `is_admin()` was true before accessing `$current_screen`, rather than checking if `$current_screen` was defined. This is usually fine, execept for in ajax requests.

Props ocean90, foreverpinetree, pento.
Merges [43893] and [43894] to trunk.
Fixes #45302.

git-svn-id: https://develop.svn.wordpress.org/trunk@44249 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-17 00:14:27 +00:00
Sergey Biryukov
897f8bf3b4 Block Editor: Fix the TinyMCE wordpress plugin to handle hiding/showing of toolbars in the classic block. Change the classic block toolbar to use the (now fixed) wp_adv button.
Props azaozz.
Merges [43889] and [43890] to trunk.
Fixes #45264.

git-svn-id: https://develop.svn.wordpress.org/trunk@44247 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 23:55:58 +00:00
Sergey Biryukov
61234818ae Block Editor: Hide the Custom Fields meta box option if that meta box has been removed.
Some plugins remove the Custom Fields meta box, particularly when they provide functionality that replaces it. The block editor would correctly not display this meta box in these circumstances, but it still showed the option to display or hide it.

Props pento, noisysocks.
Merges [43885] to trunk.
See #45282.

git-svn-id: https://develop.svn.wordpress.org/trunk@44244 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 23:23:38 +00:00
Sergey Biryukov
4c20251e6d PHPCS: Fix errors introduced in [44241].
See #45283.

git-svn-id: https://develop.svn.wordpress.org/trunk@44243 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 23:03:25 +00:00
Sergey Biryukov
7dc55e9fbf Tests: Fix tests broken in PHP 5.x after [43879].
Props pento.
Merges [43883] to trunk.
See #45290.

git-svn-id: https://develop.svn.wordpress.org/trunk@44242 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 22:54:46 +00:00
Sergey Biryukov
8002325c92 Meta Boxes: Add the block_editor_meta_box_hidden_fields action.
Lacking an appropriate action in the classic editor, plugins that add meta boxes have historically hooked into various actions in order to add hidden input fields.

This change also adds backwards compatibility for two of the most common: `edit_form_after_title`, and `edit_form_advanced`.

Props pento, danielbachhuber.
Merges [43882] to trunk.
Fixes #45283.

git-svn-id: https://develop.svn.wordpress.org/trunk@44241 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 22:51:01 +00:00
Sergey Biryukov
7f326f92a5 Block Editor: Prevent the meta box form from being accidentally submitted.
Meta boxes are loaded inside a wrapper form, that the block editor submits as part of the saving process. It shouldn't be submitted manually.

Props pento.
Merges [43880] to trunk.
Fixes #45284.

git-svn-id: https://develop.svn.wordpress.org/trunk@44240 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 22:26:30 +00:00
Sergey Biryukov
a10598acd0 I18N: Set translations for all WordPress packages scripts.
Calls `wp_set_script_translations` for all packages scripts that have translations. Also correctly sets the domain on the translations.

Props omarreiss, pento, ocean90.
Merges [43878] to trunk.
Fixes #45161.

git-svn-id: https://develop.svn.wordpress.org/trunk@44239 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 22:23:34 +00:00
Sergey Biryukov
c687f1957e PHPCS: Fix errors introduced in [44236].
See #45221.

git-svn-id: https://develop.svn.wordpress.org/trunk@44238 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 21:18:38 +00:00
Sergey Biryukov
00f638b6a5 Script Loader: Ensure default packages are registered when loaded via load-scripts.php.
Props CantoThemes, ocean90.
Merges [43877] to trunk.
Fixes #45271.

git-svn-id: https://develop.svn.wordpress.org/trunk@44237 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 20:37:30 +00:00
Sergey Biryukov
55f4475f9f TinyMCE:
- Fix parsing of the init array in script-loader.
- Do not JSON encode the options object when outputting it from PHP.
- Remove JSON decoding of TinyMCE's `style_formats` option.

Props azaozz.
Merges [43867] to trunk.
Fixes #45221.

git-svn-id: https://develop.svn.wordpress.org/trunk@44236 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 20:23:57 +00:00
Jonathan Desrosiers
14ef0dde3a Hello Dolly: Hide the lyrics in the block editor.
I'm sorry, Hello Dolly. You're my favorite plugin, but the way you output your lyrics doesn't play nicely with the block editor, particuarly on mobile devices.

This isn't Farewell Dolly, you're still on every other admin page, and I know you'll come back better and stronger.

Merges [43900] to trunk.

Props joen.
See #45345.

git-svn-id: https://develop.svn.wordpress.org/trunk@44229 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 04:51:42 +00:00
Jonathan Desrosiers
26d5633417 Docs: Future-proof comments referencing 5.0 TODOs.
Some Customizer-related files contain inline comments referencing work to do for #42364 for 5.0. Those comments are now outdated as #42364 was moved to the 5.1 milestone.

Merges [43887] to trunk.

Props dlh, pento.
Fixes #45115.

git-svn-id: https://develop.svn.wordpress.org/trunk@44228 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 04:47:41 +00:00
Jonathan Desrosiers
663a5e9662 Bundled Themes: Add theme support for responsive embeds
Add `add_theme_support( 'responsive-embeds' );` to all of the responsive default themes as part of their block editor support. This makes sure any embeds coming from the new block-based editor maintain their aspect ratios at different screen sizes.

Merges [43868] into trunk.

Props laurelfulford.
Fixes #45274.

git-svn-id: https://develop.svn.wordpress.org/trunk@44227 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 04:33:26 +00:00
Jeremy Felt
415f33c904 Formatting: Ensure wpautop() isn't run on content generated from blocks.
As `do_blocks()` is run before `wpautop()` in the_content filter, we can remove in a Just In Time fashion, before that filter is run.

After `wpautop()`s original priority has passed, we can re-add it in a Just Too Late fashion, to ensure it's available if `the_content` filter is run multiple times on a page load.

Merges [43879] and [43881] from the 5.0 branch to trunk.

Props pento, nerrad.
Fixes #45290.


git-svn-id: https://develop.svn.wordpress.org/trunk@44226 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 02:22:43 +00:00
Jeremy Felt
deab4810d0 REST API: Prevent duplicate firing of rest(_after)?_insert_attachment actions.
Merges [43862] from the 5.0 branch to trunk.

Props danielbachhuber, peterwilsoncc.
Fixes #45269.
See #42864.


git-svn-id: https://develop.svn.wordpress.org/trunk@44225 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 02:16:16 +00:00
Jeremy Felt
7f2a7a3f3e Editor: Cast the result of the default_content, default_title, and default_excerpt filters.
If a plugin returns a non-string value (or returns `null`) on these filters, it can cause errors in the block editor. Casting them as a string prevents these errors.

Merges [43858] from the 5.0 branch to trunk.

Props dd32.
See #45236.


git-svn-id: https://develop.svn.wordpress.org/trunk@44224 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 01:58:41 +00:00