This fixture schema ensures `wp-api-generated.js` doesn't change when running tests in local dev environments.
Merges [43851] from the 5.0 branch to trunk. `wp-api-generated.js` generated based on current trunk.
Props danielbachhuber.
Fixes#45196.
git-svn-id: https://develop.svn.wordpress.org/trunk@44217 602fd350-edb4-49c9-b593-d223f7449a82
Ensures `wp_read_video_metadata()`/`wp_read_audio_metadata()` functions are available when uploading video and audio. Fixes error introduced in [43589].
Merges [43850] from the 5.0 branch to trunk.
Props ocean90.
See #43757.
git-svn-id: https://develop.svn.wordpress.org/trunk@44216 602fd350-edb4-49c9-b593-d223f7449a82
The block editor needs to duplicate the classic meta box behaviour, so it can extract the registered meta boxes, and import them into the block editor.
To match the classic editor behaviour as closely as possible, this moves the relevant code from the classic editor, into a new function, so it can be called by both.
Merges [43837] from the 5.0 branch to trunk.
Props pento, peterwilsoncc.
Fixes#45172.
git-svn-id: https://develop.svn.wordpress.org/trunk@44214 602fd350-edb4-49c9-b593-d223f7449a82
This commit introduces the `wp_kses_uri_attributes` function and filter. The function centralizes the list of attributes, in order to prevent inconsistency, and the filter provides a way for plugins to customize the attributes.
Merges [44014] and [44017] to `trunk`.
git-svn-id: https://develop.svn.wordpress.org/trunk@44207 602fd350-edb4-49c9-b593-d223f7449a82
This fixes an issue introduced in [44166] where the `$groupby` variable was inserted too low in the `get_site_ids()` function while merging [43832] into `trunk`. The merged location did not account for a new conditional statement that existed only in `trunk`, and would have resulted in values assigned to `$groupby` being erased in certain scenarios.
Props spacedmonkey.
See #44416.
Fixes#45582.
git-svn-id: https://develop.svn.wordpress.org/trunk@44186 602fd350-edb4-49c9-b593-d223f7449a82
ftp_base::glob() used each(), which is deprecated as of PHP 7.2.
ftp_base::fget() was missing the decleration of its third parameter, $rest.
Props itowhid06, pento.
Merges [43848] to trunk.
Fixes#44489.
git-svn-id: https://develop.svn.wordpress.org/trunk@44184 602fd350-edb4-49c9-b593-d223f7449a82
is_user_logged_in() is a pluggable function, and loaded after plugins are loaded. If a plugin calls __() too early, is_user_logged_in() is missing and WordPress will fatal. get_user_locale() already handles this scenario for us, so it's safe to rely on exclusively.
Props danielbachhuber.
Merges [43846] to trunk.
See #44758.
Fixes#45235.
git-svn-id: https://develop.svn.wordpress.org/trunk@44181 602fd350-edb4-49c9-b593-d223f7449a82
This also includes the new @wordpress/format-library and @wordpress/notices packages.
package-lock.json has been completely regenerated in this commit.
Props pento.
Merges [43840] to trunk.
See #45145.
git-svn-id: https://develop.svn.wordpress.org/trunk@44177 602fd350-edb4-49c9-b593-d223f7449a82
Rather than needing to install grunt globally, this allows running grunt from node_modules, instead.
npm run grunt ... is effectively the equivalent of running grunt ....
Props andrew.taylor, pento.
Merges [43836] to trunk.
See #45214.
git-svn-id: https://develop.svn.wordpress.org/trunk@44176 602fd350-edb4-49c9-b593-d223f7449a82
We should only be showing this message in the classic editor interface, for meta boxes that are marked as being incompatible with the block editor.
Props pento.
Merges [43839] to trunk.
Fixes#45207.
git-svn-id: https://develop.svn.wordpress.org/trunk@44175 602fd350-edb4-49c9-b593-d223f7449a82
While the documentation for add_meta_box() specifices that $callback_args should be an array, this has never been enforced, and we have workarounds in place for when it's passed as something other than an array.
Rather than break sites that are passing unexpected data, we can quietly just allow for it, instead.
Props johnjamesjacoby, birgire, pento.
Merges [43838] to trunk.
Fixes#45206.
git-svn-id: https://develop.svn.wordpress.org/trunk@44174 602fd350-edb4-49c9-b593-d223f7449a82
The `get_compact_response_links()` method was introduced in WP 4.5, and this conditional is no longer necessary.
Merges [43834] from the 5.0 branch to trunk.
Props schlessera, timothyblynjacobs.
Fixes#45189.
git-svn-id: https://develop.svn.wordpress.org/trunk@44173 602fd350-edb4-49c9-b593-d223f7449a82
Also introduces a `block_editor_preload_paths` filter for plugins and themes to preload additional data.
Merges [43833] from the 5.0 branch to trunk.
Props imath, mattheu, danielbachhuber.
Fixes#45194.
git-svn-id: https://develop.svn.wordpress.org/trunk@44172 602fd350-edb4-49c9-b593-d223f7449a82
The inline script for `wp-date` incorrectly included a textdomain, and lacked translator comments.
Merges [43831] from the 5.0 branch to trunk.
Props mukesh27.
Fixes#45191, #45162.
git-svn-id: https://develop.svn.wordpress.org/trunk@44171 602fd350-edb4-49c9-b593-d223f7449a82
When `WP_DEBUG` is set, ensure that a static method callback is passed to `ReflectionMethod`, instead of `ReflectionFunction`.
Merges [43830] from the 5.0 branch to trunk.
Props DrewAPicture.
Fixes#45192.
git-svn-id: https://develop.svn.wordpress.org/trunk@44170 602fd350-edb4-49c9-b593-d223f7449a82
Adds the `wp_set_script_translations()` function which registers translations for a JavaScript file. This function takes a handle, domain and optionally a path and ensures JavaScript translation files are loaded if they exist.
Merges [43825,43828,43859,43898] from the 5.0 branch to trunk.
Props herregroen, atimmer, omarreiss, nerrad, swissspidy, ocean90, georgestephanis.
Fixes#45103, #45256.
git-svn-id: https://develop.svn.wordpress.org/trunk@44169 602fd350-edb4-49c9-b593-d223f7449a82
When switching themes, `wp_map_nav_menu_locations()` is used to ensure nav menus are placed in the relevant menu location. Occasionally, menus are registered to locations with numeric slugs, rather than strings. `wp_map_nav_menu_locations()` assumed it would be the latter, and ran `stripos()` on those numeric slugs. This behavior is deprecated in PHP 7.3.
As this is the last PHP 7.3 error in unit tests, this commit also removes PHP 7.3 from Travis' `allowed_failures` list.
Props pento, desrosj, jorbin.
Merges [43899] to trunk.
See #45018.
git-svn-id: https://develop.svn.wordpress.org/trunk@44167 602fd350-edb4-49c9-b593-d223f7449a82
In PHP 7.3, the `compact()` function has been changed to issue an `E_NOTICE` level error if a passed string refers to an unset variable. In previous versions of PHP, this notice was silently skipped. The full RFC can be viewed here: https://wiki.php.net/rfc/compact.
Props jorbin, desrosj.
Merges [43819] and [43832] to trunk.
Fixes#44416.
git-svn-id: https://develop.svn.wordpress.org/trunk@44166 602fd350-edb4-49c9-b593-d223f7449a82
`wp-date` recently added the `datetimeAbbreviated` format, but the config wasn't sending it on page load.
Props pento.
Merges [43818] to trunk.
Fixes#45158.
git-svn-id: https://develop.svn.wordpress.org/trunk@44162 602fd350-edb4-49c9-b593-d223f7449a82
For the WordPress zip we need both the minified and non-minified files. This is because of `SCRIPT_DEBUG`. So in grunt build we need to do both `grunt webpack:prod` and `grunt webpack:dev`.
Props bordoni, atimmer.
Merges [43817] to trunk.
Fixes#45156.
git-svn-id: https://develop.svn.wordpress.org/trunk@44161 602fd350-edb4-49c9-b593-d223f7449a82
A handful of code formatting issues were introduced in [44159], runs the auto-fixer on them.
git-svn-id: https://develop.svn.wordpress.org/trunk@44160 602fd350-edb4-49c9-b593-d223f7449a82
- `grunt webpack:dev` now copies packages JS into `/src/wp-includes/js/dist`, and CSS into `/src/wp-includes/css/dist`.
- `grunt webpack:prod` does the same, but into `/build` instead of `/src`.
- `grunt build` now runs the `webpack:prod` task.
Merges [43760] from the 5.0 branch to trunk.
Props atimmer, pento.
Fixes#45119.
git-svn-id: https://develop.svn.wordpress.org/trunk@44159 602fd350-edb4-49c9-b593-d223f7449a82
The add_theme_support() inline docs now includes the features that the block editor adds.
Props pento, desrosj.
Merges [43814] to trunk.
Fixes#45134.
git-svn-id: https://develop.svn.wordpress.org/trunk@44158 602fd350-edb4-49c9-b593-d223f7449a82
Blocks are able to register styles that used in the editor and the frontend, or only in the editor. These functions ensure the correct styles are loaded in the correct place.
Props pento.
Merges [43812] to trunk.
See #45065.
git-svn-id: https://develop.svn.wordpress.org/trunk@44157 602fd350-edb4-49c9-b593-d223f7449a82
To avoid this being a vector for bypassing the filetypes that are allowed to be uploaded, this attribute is only allowed to be added without a value.
Merges [43813] from the 5.0 branch to trunk.
Props kalpshit, arshidkv12, welcher, peterwilsoncc, marina_wp, pento.
Fixes#44724.
git-svn-id: https://develop.svn.wordpress.org/trunk@44156 602fd350-edb4-49c9-b593-d223f7449a82
A handful of code formatting issues were introduced in recent commits, runs the auto-fixer on them.
git-svn-id: https://develop.svn.wordpress.org/trunk@44155 602fd350-edb4-49c9-b593-d223f7449a82
Adapts the response from `WP_oEmbed_Controller::get_proxy_item()` so that the response is correctly filtered and embeds work properly in JavaSccript editors. Introduces new `get_oembed_response_data_for_url()` function for preparing internal oEmbed responses.
Merges [43810] from the 5.0 branch to trunk.
Props danielbachhuber, imath, swissspidy.
Fixes#45142.
git-svn-id: https://develop.svn.wordpress.org/trunk@44154 602fd350-edb4-49c9-b593-d223f7449a82
Because the REST API allows meta keys to have empty values, the Custom Fields meta box should permit the same behavior.
Props charlestonsw, soulseekah, danielbachhuber.
Merges [43811] to trunk.
Fixes#43559.
git-svn-id: https://develop.svn.wordpress.org/trunk@44153 602fd350-edb4-49c9-b593-d223f7449a82
A handful of items were missed when adding initial support for the new block editor to bundled themes in [43793]-[43800]. This adds support for those missed items.
Props pento, davidakennedy, laurelfulford.
Merges [43869], [43870], [43871], [43872], [43873], [43874], [43875], [43876] to trunk.
Fixes#45238, #45239, #45240, #45242, #45243, #45244, #45245, #45246.
git-svn-id: https://develop.svn.wordpress.org/trunk@44152 602fd350-edb4-49c9-b593-d223f7449a82
After [44149], we can now make twentynineteen the default theme. Twentyseventeen has been a great default, but 5.0 and twentynineteen is guten.
Merges [43809,43954] from the 5.0 branch to trunk.
Fixes#45152.
Props jorbin, SergeyBiryukov, pento, mcsf.
git-svn-id: https://develop.svn.wordpress.org/trunk@44151 602fd350-edb4-49c9-b593-d223f7449a82
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Seventeen.
These are the specific changes made to this theme:
- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
Props laurelfulford, ianbelanger, crunnells, davidkennedy.
Merges [43800] to trunk.
Fixes#45045.
git-svn-id: https://develop.svn.wordpress.org/trunk@44148 602fd350-edb4-49c9-b593-d223f7449a82
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Sixteen.
These are the specific changes made to this theme:
- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor.
Props laurelfulford, davidkennedy.
Merges [43799] to trunk.
Fixes#45044.
git-svn-id: https://develop.svn.wordpress.org/trunk@44147 602fd350-edb4-49c9-b593-d223f7449a82
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Fifteen.
These are the specific changes made to this theme:
- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor.
Props laurelfulford, davidkennedy.
Merges [43798] to trunk.
Fixes#45043.
git-svn-id: https://develop.svn.wordpress.org/trunk@44145 602fd350-edb4-49c9-b593-d223f7449a82
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Fourteen.
These are the specific changes made to this theme:
- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor.
Props laurelfulford, crunnells, ianbelanger, davidkennedy.
Merges [43797] to trunk.
Fixes#45042.
git-svn-id: https://develop.svn.wordpress.org/trunk@44144 602fd350-edb4-49c9-b593-d223f7449a82
[43723] included script metadata for the `wp-polyfill` script that was being registered as an inline script.
Merges [43802] from the 5.0 branch to trunk.
See #45065.
git-svn-id: https://develop.svn.wordpress.org/trunk@44143 602fd350-edb4-49c9-b593-d223f7449a82
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Thirteen.
These are the specific changes made to this theme:
- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor.
- Add theme support and styles for `align-wide`, to allow wide and full alignment styles on the blocks.
Props laurelfulford, ianbelanger, davidkennedy.
Merges [43796] to trunk.
Fixes#45041.
git-svn-id: https://develop.svn.wordpress.org/trunk@44142 602fd350-edb4-49c9-b593-d223f7449a82
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Twelve.
These are the specific changes made to this theme:
- Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles.
- Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles.
- Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor.
- Add theme support for `wp-block-styles`, to load the default block styles on the front end.
- Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor.
Props ianbelanger, crunnells, laurelfulford, davidakennedy.
Merges [43795] to trunk.
Fixes#45040.
git-svn-id: https://develop.svn.wordpress.org/trunk@44140 602fd350-edb4-49c9-b593-d223f7449a82