Commit Graph

12481 Commits

Author SHA1 Message Date
Drew Jaynes 5b19e65c3b Docs: Add a missing DocBlock summary and `$action` parameter description for `wp_ajax_delete_page()`.
Props abhijitrakas.
Fixes #44206.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 17:00:50 +00:00
Drew Jaynes f05077e0b1 Docs: Add backtick escaping around a variable name in the DocBlock for `update_post_meta()`.
Also adds a note to the description explaining that it can be used in place of `add_post_meta()`.

See #42505.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 16:39:48 +00:00
Drew Jaynes 9c934c7272 Docs: Remove erroneous pipe character usage in the `oembed_providers` filter DocBlock.
Avoids markdown table display errors when parsed and displayed in the Code Reference.

See #42505.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 16:36:48 +00:00
Drew Jaynes 161df2a5d9 Docs: Fix an `@see` reference to use the correct class name in the `wp_script_add_data()` DocBlock.
Props joyously.
See #42505.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 16:29:48 +00:00
Drew Jaynes 92aa2f9e92 Docs: Fix a few minor inline documentation typos in a variety of files and contexts.
Props ramizmanked.
Fixes #45463.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:42:49 +00:00
Drew Jaynes 1ae038d3db Docs: Update an inline `@see` reference in the DocBlock for wpdb::prepare() to reference `wpdb::esc_like()` the method instead of `esc_like()` the nonexistent function.
Props antaltettinger.
Fixes #45204. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@44160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:30:48 +00:00
Drew Jaynes 90dea00070 Docs: Ensure the optional `$width` and `$height` parameters are documented as such with defaults in the `add_image_size()` DocBlock.
Props andrewza.
Fixes #45203.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:26:47 +00:00
Drew Jaynes 4f35907147 Customizer: Remove a line of commented-out code in `WP_Customize_Nav_Menus::customize_register()`.
Retains a more explicit future-compat version of the todo notation that used to accompany the commented-out code.

Props harsh175, dlh.
Fixes #44633.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:23:47 +00:00
Drew Jaynes 095e1c7f89 Docs: Remove references to the now-defunct `$merged_filters` global from two method DocBlocks in `WP_UnitTestCase`.
The `$merged_filters` global was removed in [38571].

Props frank-klein.
Fixes #44496.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:13:48 +00:00
Drew Jaynes d738d15862 Docs: Fix the syntax for a parameter notation and separately add a missing return notation for two `POMO_Reader` methods.
Props subrataemfluence.
Fixes #44422.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 07:06:49 +00:00
Boone Gorges 88ccca5d76 Ensure that taxonomy name passed to `get_term()` filters is non-empty.
Since [34997], the `$taxonomy` parameter of `get_term()` has been
optional. This created cases where the `$taxonomy` parameter, used
to concatenate names for some filters and passed as a parameter to
others, would be empty. This changeset ensures that it's never
empty by falling back on the `taxonomy` of the located term.

Props dlh.
Fixes #45698.
Built from https://develop.svn.wordpress.org/trunk@44325


git-svn-id: http://core.svn.wordpress.org/trunk@44155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:48:48 +00:00
desrosj eef048a3e8 Docs: Correct inline documentation versions.
[43050] updated the Cron API to return values indicating success or failure when called.

At the time, these changes were slated for 5.0, but have since been moved to the 5.1 release. This updates the inline documentation to reflect that.

Fixes #21072.
Built from https://develop.svn.wordpress.org/trunk@44324


git-svn-id: http://core.svn.wordpress.org/trunk@44154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:41:49 +00:00
laurelfulford fc094984ea Default Themes: Bump the version numbers and release dates.
Update the theme versions and release dates for the default themes, in time for WordPress 5.0.2.

The POT files for Twenty Ten and Twenty Eleven have also been updated.

Fixes #45681.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:38:04 +00:00
Boone Gorges 8b95b0faf2 Update `@since` tag on taxonomy hooks to be introduced in 5.1.0.
The hooks were added in [43558] but pulled from the 4.9.x and 5.0.x series.

Fixes #44733.
Built from https://develop.svn.wordpress.org/trunk@44321


git-svn-id: http://core.svn.wordpress.org/trunk@44151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:37:15 +00:00
Jeremy Felt 0cad45c7f8 Build: Update images following [43684].
`grunt-contrib-imagemin` was updated, which included some changes to image minification. Those changes are now applies.

Merges [43785] from the 5.0 branch to trunk.

Props netweb.
See #45080.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:36:27 +00:00
Sergey Biryukov 413050b191 Block Editor: Upgrade @WordPress packages to the latest version (4.7.1)
Updated packages:

 - @wordpress/block-library@2.2.11
 - @wordpress/edit-post@3.1.6
 - @wordpress/editor@9.0.6
 - @wordpress/format-library@1.2.9

Props youknowriad, pento.
Merges [44287] to trunk.
Fixes #45637.
Built from https://develop.svn.wordpress.org/trunk@44319


git-svn-id: http://core.svn.wordpress.org/trunk@44149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:35:38 +00:00
Sergey Biryukov 11c11199d9 i18n: Remove the `script_loader_src` filter from `load_script_textdomain()`.
This filter is superfluous here, the `load_script_textdomain_relative_path` should be used for customising the textdomain path.

Props dimadin.
Merges [44288] to trunk.
See #45528.
Built from https://develop.svn.wordpress.org/trunk@44318


git-svn-id: http://core.svn.wordpress.org/trunk@44148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:34:44 +00:00
Sergey Biryukov c2c5d30410 i18n: Prevent a PHP warning when a mu-plugin loads a textdomain.
`determine_locale()` accesses the `$pagenow` global, but this is set after mu-plugins are loaded, so we need to check that it's been set.

Props swissspidy, azaozz.
Merges [44284] to trunk.
Fixes #45668.
Built from https://develop.svn.wordpress.org/trunk@44317


git-svn-id: http://core.svn.wordpress.org/trunk@44147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:33:56 +00:00
Sergey Biryukov 0094ea41a9 I18N: Introduce `load_script_translations()` as a wrapper for loading and filtering translation data for JavaScript files.
* Introduces `pre_load_script_translations` to short-circuit the function.
* Introduces `load_script_translation_file` to filter the file path for loading script translations.
* Introduces `load_script_translations` to filter the JSON-encoded translation data.

Props johnbillion, strategio, swissspidy, dimadin, ocean90.
Merges [44232] to trunk.
Fixes #45425.
Built from https://develop.svn.wordpress.org/trunk@44316


git-svn-id: http://core.svn.wordpress.org/trunk@44146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:33:07 +00:00
desrosj 1a4d511696 Block Editor: Remove a deprecated notice being generated by the meta box compat functions.
Props pento.

Merges [44248] into trunk.

Fixes #45456.
Built from https://develop.svn.wordpress.org/trunk@44315


git-svn-id: http://core.svn.wordpress.org/trunk@44145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:32:18 +00:00
desrosj 75dfa5f7f6 Script Loader: Pass the suffix to package style handles to ensure correct file names for minified RTL stylesheets.
Props ocean90.

Merges [44231] into trunk.

See #45547.
Built from https://develop.svn.wordpress.org/trunk@44314


git-svn-id: http://core.svn.wordpress.org/trunk@44144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:31:29 +00:00
desrosj 4aa38f2193 Bundled Themes: Replace “Gutenberg” in code comments and classes.
This update replaces the term “Gutenberg” in the themes code comments and classes with something more future-friendly.

Props laurelfulford.

Merges [44213] into trunk.

Fixes #45452.
Built from https://develop.svn.wordpress.org/trunk@44313


git-svn-id: http://core.svn.wordpress.org/trunk@44143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:30:41 +00:00
desrosj 6ab27f50a6 Bundled Themes: Update default block appender selector.
The markup for the default block appender changed from a text input to a text area in the editor; this update makes the same change in the default theme styles.

Props laurelfulford.

Merges [44212] into trunk.

Fixes #45450.
Built from https://develop.svn.wordpress.org/trunk@44312


git-svn-id: http://core.svn.wordpress.org/trunk@44142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:29:51 +00:00
desrosj 876676ac80 Twenty Sixteen: Fix superscript and subscript.
When using the block-based editor in Twenty Sixteen, superscript is displaying below the baseline and subscript is displaying above the baseline. This is the opposite of what should occur. This reverses the two to display correctly.

Props greg-raven, torontodigits, JDTrower.

Merges [44210] into trunk.

Fixes: #44776.
Built from https://develop.svn.wordpress.org/trunk@44311


git-svn-id: http://core.svn.wordpress.org/trunk@44141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:29:02 +00:00
desrosj 1605370d02 I18N: Fix JavaScript translations for subdirectory installations.
Fixes the `load_script_textdomain` function not resolving the md5 hash based on the relative path for WordPress installations in a subdirectory. Also adds a filter to allow sites using CDNs or other alternative asset locations to filter the relative path resolution.

Props akirk, fierevere, swissspidy, mypacecreator, babaevan, tmatsuur, ocean90, herregroen.

Merges [44209] to trunk.

Fixes #45528.
Built from https://develop.svn.wordpress.org/trunk@44310


git-svn-id: http://core.svn.wordpress.org/trunk@44140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:28:14 +00:00
Sergey Biryukov 8880458212 REST API: Remove a duplicate `require_once()`.
In `WP_REST_Attachments_Controller::create_item()`, `wp-admin/includes/image.php` was being `require_once()`-ed... twice. The superflous `require_once()` has been quietly removed.

Props david.binda.
Merges [44206] to trunk.
Fixes #45420.
Built from https://develop.svn.wordpress.org/trunk@44309


git-svn-id: http://core.svn.wordpress.org/trunk@44139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:27:26 +00:00
desrosj 7da2e20f4d Script Loader: Misplaced parenthesis when `wp-tinymce-lists` is added.
A closing parenthesis was misplaced in the `$scripts->add( 'wp-tinymce-lists' )` call, causing the dependencies and version to be incorrectly passed to `includes_url()` instead.

Also, Remove an incorrect parameter sent to `wp_get_script_polyfill()`. `wp_get_script_polyfill()` only accepts two parameters, but this call was passing a third.

Props volodymyrkolesnykov, swissspidy.

Merges [44208] and [44211] into trunk.

Fixes: #45506, #45472.
Built from https://develop.svn.wordpress.org/trunk@44308


git-svn-id: http://core.svn.wordpress.org/trunk@44138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:26:37 +00:00
desrosj 0c1769e5ba Twenty Seventeen: Bug Fixes.
- Remove unnecessary `ol` styles from editor. Twenty Seventeen was designed with bolded numbers for its ordered list styles. This was removed from the theme prior to launch, but it was left in the editor styles, so it needed to be removed there, too.
- To improve accessibility, the cookies content checkbox in the comment form needed some visible indication when it’s in focus.
- Twenty Seventeen’s editor styles contained an Internet Explorer 8 specific fix that stopped images from being scalable in the editor in other browsers. Since the editor no longer supports IE8, this fix can safely be removed.
- Fix the `font-family` used for Simplified Chinese (zh_CN) in the block editor CSS.

Props mmaumio, edpittol, pratikthink, afercia, audrasjb, mihaivalentin, subrataemfluence, vaishalipanchal, ze3kr, laurelfulford.

Merges [44203-44205] and [44235] into trunk.

Fixes #44775, #44699, #39738, #45408.
Built from https://develop.svn.wordpress.org/trunk@44307


git-svn-id: http://core.svn.wordpress.org/trunk@44137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:25:48 +00:00
desrosj 608eb55335 Bundled Themes: Fix button block custom colors on front end.
Simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.

This fix is applied to Twenty Sixteen, Twenty Fifteen and Twenty Fourteen. 

Props laurelfulford.

Merges [44197-44198] and [44200] into trunk.

Fixes #45428, #45429.
Built from https://develop.svn.wordpress.org/trunk@44306


git-svn-id: http://core.svn.wordpress.org/trunk@44136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:24:59 +00:00
desrosj a2845863e5 Twenty Nineteen: Fixes and improvements.
This commit brings over several changes that occurred upstream in the theme’s GitHub repository into core.

- Fix the gallery caption link color. https://github.com/WordPress/twentynineteen/pull/687
- Remove left padding from pullquote blocks. https://github.com/WordPress/twentynineteen/pull/690
- Print `skip-link-focus-fix` inline instead of enqueueing as blocking script. https://github
.com/WordPress/twentynineteen/pull/47
- Fix and improve some strings with placeholders. https://github.com/WordPress/twentynineteen/pull/217
- Fixes some minor code quality issues. https://github.com/WordPress/twentynineteen/pull/237
- Fix PHP Warning: Parameter must be an array or an object that implements Countable. https://github
.com/WordPress/twentynineteen/pull/661
- Add missing text domain and escaping to comment author text. https://github.com/WordPress/twentynineteen/pull/274
- Remove hyphens rule for cover image text. https://github.com/WordPress/twentynineteen/pull/691
- Fix left/right-aligned pullquote spacing. https://github.com/WordPress/twentynineteen/pull/695
- Improve `readme.txt` to follow the correct standards for themes. https://github.com/WordPress/twentynineteen/issues/689

Props kjellr, allancole, dimadin, westonruter, khleomix, grapplerulrich, iCaleb, desrosj.

Merges [44196], [44199], and [44201-44202] into trunk.

Fixes #45424.
Built from https://develop.svn.wordpress.org/trunk@44305


git-svn-id: http://core.svn.wordpress.org/trunk@44135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:24:11 +00:00
desrosj 7cbba801e2 Twenty Thirteen: Fix button block custom colors.
Simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.

Also make sure the button’s gradient is not applied when a custom background color is added, since it will hide it.

Props laurelfulford.

Merges [44195] into trunk.

Fixes #45431.
Built from https://develop.svn.wordpress.org/trunk@44304


git-svn-id: http://core.svn.wordpress.org/trunk@44134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:23:21 +00:00
desrosj 680bbf62d9 Twenty Twelve: Fix button block custom colors.
Simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.

Also make sure the button’s gradient is not applied when a custom background color is added, since it will hide it.

Props laurelfulford.

Merges [44194] to trunk.

Fixes #45432.
Built from https://develop.svn.wordpress.org/trunk@44303


git-svn-id: http://core.svn.wordpress.org/trunk@44133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:22:31 +00:00
desrosj 01029daf49 Updating Twenty Nineteen, the new default theme for 2019.
This update changes the following:

- Properly sets the primary color hue theme option. See https://github.com/WordPress/twentynineteen/pull/683.
- Add proper frontend styles for center aligned archive and category blocks. See https://github.com/WordPress/twentynineteen/pull/684.
- Fix `image_filter` theme option conditional function. See https://github.com/WordPress/twentynineteen/pull/680.
- Remove duplicate rule-line when a separator block is followed by H1/H2 in the editor. See https://github.com/WordPress/twentynineteen/pull/686.

Props richtabor, kjellr, allancole.

Merges [44192] and [44193] to trunk.

See #45424.
Built from https://develop.svn.wordpress.org/trunk@44302


git-svn-id: http://core.svn.wordpress.org/trunk@44132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:21:42 +00:00
desrosj 3b995edda6 Twenty Eleven: Correct `font-size` and button issues.
Update a mistake in Twenty Eleven's block editor styles that erroneously sets the `font-size` to `300`, when it should set the `font-weight` to `300`. This was causing browsers in quirks mode to make the editor font size very large.

Also, simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.

Props laurelfulford.

Merges [44190] and [44191] to trunk.

Fixes #45421, #45433.
Built from https://develop.svn.wordpress.org/trunk@44301


git-svn-id: http://core.svn.wordpress.org/trunk@44131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:20:53 +00:00
desrosj b25a43d635 Updating Twenty Nineteen, the new default theme for 2019.
This update changes the following:

- Reverts the customization to the toolbar for wide and full blocks to make them more usable. More info here: https://github.com/WordPress/twentynineteen/pull/668
- Add `nowrap` to the columns block at breakpoints above `600px`. More info here: https://github.com/WordPress/twentynineteen/pull/674 

Props joen, kjellr, allancole.

Fixes #45369.

Merges [44189] into trunk.

See #45424.
Built from https://develop.svn.wordpress.org/trunk@44300


git-svn-id: http://core.svn.wordpress.org/trunk@44130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:20:04 +00:00
desrosj 7f02dfc545 Twenty Ten: Custom colors should override :visited link styles on blocks.
Make sure the block editor custom colors in the theme also override the theme's `:visited` link styles. This prevents contrast issues, like in the button block -- when the background is dark, the purple `:visited` link can be difficult to read.

Props laurelfulford.

Merges [44188] into trunk.

Fixes #45434.
Built from https://develop.svn.wordpress.org/trunk@44299


git-svn-id: http://core.svn.wordpress.org/trunk@44129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:19:15 +00:00
desrosj 110aae8048 Twenty Nineteen: Code Quality Improvements.
This change adds general code quality and documentation improvements.

More info here: https://github.com/WordPress/twentynineteen/pull/546 

Props grapplerulrich, iCaleb, allancole.

Merges [44187] to trunk.

See #45424.
Built from https://develop.svn.wordpress.org/trunk@44298


git-svn-id: http://core.svn.wordpress.org/trunk@44128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:18:26 +00:00
desrosj 5a30da57c6 PHP 7.3 Compatibility: Fix compact related notices.
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. This fixes a few more instances of unset variables in the WordPress admin.

The full RFC can be viewed here: https://wiki.php.net/rfc/compact.

See #44416.

Merges [44185] into trunk.

Fixes #45483.
Built from https://develop.svn.wordpress.org/trunk@44297


git-svn-id: http://core.svn.wordpress.org/trunk@44127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:17:37 +00:00
desrosj d6e8d93412 Block Editor: Upgrade `@wordpress` packages to match version 4.7.1.
Updated packages:

- `@wordpress/annotations
- `@wordpress/api-fetch
- `@wordpress/block-library@2.2.10
- `@wordpress/block-serialization-default-parser@2.0.2`
- `@wordpress/block-serialization-spec-parser@2.0.2`
- `@wordpress/blocks@6.0.4`
- `@wordpress/components@7.0.4`
- `@wordpress/core-data@2.0.15`
- `@wordpress/data@4.1.0`
- `@wordpress/date@3.0.1`
- `@wordpress/edit-post@3.1.5`
- `@wordpress/editor@9.0.5`
- `@wordpress/eslint-plugin@1.0.0`
- `@wordpress/format-library@1.2.8`
- `@wordpress/html-entities@2.0.4`
- `@wordpress/list-reusable-blocks@1.1.17`
- `@wordpress/notices@1.1.1`
- `@wordpress/nux@3.0.5`
- `@wordpress/rich-text@3.0.3`
- `@wordpress/url@2.3.2`
- `@wordpress/viewport@2.0.13`

This also includes the updates the Core blocks.

The script loader is updated to match the Gutenberg repository as well.

Props atimmer, gziolo, joen, youknowriad.

Merges [44183] to trunk.

Fixes #45442, #45637.
Built from https://develop.svn.wordpress.org/trunk@44296


git-svn-id: http://core.svn.wordpress.org/trunk@44126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:16:48 +00:00
desrosj 43bdb0e193 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.
Built from https://develop.svn.wordpress.org/trunk@44295


git-svn-id: http://core.svn.wordpress.org/trunk@44125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 21:32:48 +00:00
desrosj 8cb7058273 PHPCS: Fix alignment issues.
This fixes some array alignment issues introduced in [44293].
Built from https://develop.svn.wordpress.org/trunk@44294


git-svn-id: http://core.svn.wordpress.org/trunk@44124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 16:58:48 +00:00
desrosj 164452f942 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.
Built from https://develop.svn.wordpress.org/trunk@44293


git-svn-id: http://core.svn.wordpress.org/trunk@44123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 16:46:48 +00:00
desrosj 3af00578e4 Media: Improve verification of MIME file types.
Merges [43988] to trunk.
Built from https://develop.svn.wordpress.org/trunk@44292


git-svn-id: http://core.svn.wordpress.org/trunk@44122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 16:35:49 +00:00
desrosj 38d1e7233d 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.
Built from https://develop.svn.wordpress.org/trunk@44291


git-svn-id: http://core.svn.wordpress.org/trunk@44121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 16:14:49 +00:00
Sergey Biryukov 985bed281c 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.
Built from https://develop.svn.wordpress.org/trunk@44286


git-svn-id: http://core.svn.wordpress.org/trunk@44116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 04:05:48 +00:00
Sergey Biryukov 7b4a2c9827 Build/Test Tools: Remove `vendor` file name entry from `.gitignore`.
Props netweb.
Merges [43747] to trunk.
Fixes #43411.
Built from https://develop.svn.wordpress.org/trunk@44285


git-svn-id: http://core.svn.wordpress.org/trunk@44115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 03:42:49 +00:00
Sergey Biryukov 693e8303ba Build Tools: Don't minimise CSS in the unminimised files.
Props pento.
Merges [43933] to trunk.
Fixes #45201.
Built from https://develop.svn.wordpress.org/trunk@44283


git-svn-id: http://core.svn.wordpress.org/trunk@44113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 03:17:48 +00:00
Sergey Biryukov 8f4440eb10 Build Tools: Don't include `.map` files in the build.
These files are fairly large, and while they're useful in development, they're not needed in the final build.

Props pento, mcsf.
Merges [43931] and [43932] to trunk.
See #45201.
Built from https://develop.svn.wordpress.org/trunk@44282


git-svn-id: http://core.svn.wordpress.org/trunk@44112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 03:14:52 +00:00
desrosj 077e2c5fcf 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.
Built from https://develop.svn.wordpress.org/trunk@44281


git-svn-id: http://core.svn.wordpress.org/trunk@44111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 21:59:54 +00:00
desrosj 7a97c31f4e 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.
Built from https://develop.svn.wordpress.org/trunk@44280


git-svn-id: http://core.svn.wordpress.org/trunk@44110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 21:52:53 +00:00
desrosj a9b6d58870 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.
Built from https://develop.svn.wordpress.org/trunk@44279


git-svn-id: http://core.svn.wordpress.org/trunk@44109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:38:53 +00:00
desrosj d92ccd83a0 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.
Built from https://develop.svn.wordpress.org/trunk@44278


git-svn-id: http://core.svn.wordpress.org/trunk@44108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:36:52 +00:00
desrosj e188e2d3a3 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.
Built from https://develop.svn.wordpress.org/trunk@44277


git-svn-id: http://core.svn.wordpress.org/trunk@44107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:34:52 +00:00
desrosj c7c9bc7585 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.
Built from https://develop.svn.wordpress.org/trunk@44276


git-svn-id: http://core.svn.wordpress.org/trunk@44106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:29:51 +00:00
desrosj 03262a191f 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. 
Built from https://develop.svn.wordpress.org/trunk@44275


git-svn-id: http://core.svn.wordpress.org/trunk@44105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:28:51 +00:00
desrosj 54ab431046 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.
Built from https://develop.svn.wordpress.org/trunk@44274


git-svn-id: http://core.svn.wordpress.org/trunk@44104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:08:51 +00:00
desrosj 36158d7909 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.
Built from https://develop.svn.wordpress.org/trunk@44273


git-svn-id: http://core.svn.wordpress.org/trunk@44103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:06:59 +00:00
desrosj 945ba795dc 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.
Built from https://develop.svn.wordpress.org/trunk@44272


git-svn-id: http://core.svn.wordpress.org/trunk@44102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 18:39:52 +00:00
desrosj 820f643bff 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.
Built from https://develop.svn.wordpress.org/trunk@44271


git-svn-id: http://core.svn.wordpress.org/trunk@44101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 18:19:50 +00:00
desrosj 4b0f960b7c 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.
Built from https://develop.svn.wordpress.org/trunk@44270


git-svn-id: http://core.svn.wordpress.org/trunk@44100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 18:07:51 +00:00
desrosj bc9dfcfeb1 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.
Built from https://develop.svn.wordpress.org/trunk@44269


git-svn-id: http://core.svn.wordpress.org/trunk@44099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 18:00:52 +00:00
desrosj f2b97f3c7f 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.
Built from https://develop.svn.wordpress.org/trunk@44268


git-svn-id: http://core.svn.wordpress.org/trunk@44098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:22:52 +00:00
desrosj e06611512c 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.
Built from https://develop.svn.wordpress.org/trunk@44267


git-svn-id: http://core.svn.wordpress.org/trunk@44097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:09:51 +00:00
desrosj 9510a4f036 PHPCS: Fix code formatting issues.
In [44264], several code formatting issues were introduced. This fixes them.
Built from https://develop.svn.wordpress.org/trunk@44266


git-svn-id: http://core.svn.wordpress.org/trunk@44096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:07:52 +00:00
desrosj 2899f355a9 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.
Built from https://develop.svn.wordpress.org/trunk@44265


git-svn-id: http://core.svn.wordpress.org/trunk@44095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:03:51 +00:00
desrosj 9cd64e1341 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.
Built from https://develop.svn.wordpress.org/trunk@44264


git-svn-id: http://core.svn.wordpress.org/trunk@44094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:36:59 +00:00
desrosj 6bec9ed8f6 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.
Built from https://develop.svn.wordpress.org/trunk@44263


git-svn-id: http://core.svn.wordpress.org/trunk@44093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 15:46:52 +00:00
desrosj 4f86a03258 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.
Built from https://develop.svn.wordpress.org/trunk@44262


git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 15:37:00 +00:00
desrosj 9d7aa3436e 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.
Built from https://develop.svn.wordpress.org/trunk@44261


git-svn-id: http://core.svn.wordpress.org/trunk@44091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 04:52:00 +00:00
desrosj bbe9a37b6c 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.
Built from https://develop.svn.wordpress.org/trunk@44260


git-svn-id: http://core.svn.wordpress.org/trunk@44090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:52:51 +00:00
Sergey Biryukov 6ffafa5bc7 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.
Built from https://develop.svn.wordpress.org/trunk@44257


git-svn-id: http://core.svn.wordpress.org/trunk@44087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:32:21 +00:00
Sergey Biryukov 60c96f7377 Tests: Replace use of `$this->server` with `rest_get_server()` in `test_get_additional_field_registration_null_schema()`.
In [42724], `$this->server` was replaced with `rest_get_server()` for better memory recycling.

[43908], from the 5.0 branch, was merged into trunk in [44254] and used the now unavailable `$this->server`.

This updates the new test from the 5.0 branch to use the expected `rest_get_server()`.

See #45220, #41641.
Built from https://develop.svn.wordpress.org/trunk@44256


git-svn-id: http://core.svn.wordpress.org/trunk@44086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:31:30 +00:00
Sergey Biryukov 589af44fc1 Tests: Replace use of `$this->server` with `rest_get_server()` in `test_registered_query_params()`.
In [42724], `$this->server` was replaced with `rest_get_server()` for better memory recycling.

[43897], from the 5.0 branch, was merged into trunk in [44250] and used the now unavailable `$this->server`.

This updates the new test from the 5.0 branch to use the expected `rest_get_server()`.

See #43316, #41641.
Built from https://develop.svn.wordpress.org/trunk@44255


git-svn-id: http://core.svn.wordpress.org/trunk@44085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:30:39 +00:00
Sergey Biryukov ff3ea55f76 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.
Built from https://develop.svn.wordpress.org/trunk@44254


git-svn-id: http://core.svn.wordpress.org/trunk@44084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:29:47 +00:00
Sergey Biryukov 88d99119bc PHPCS: Fix errors introduced in [44250].
See #43316.
Built from https://develop.svn.wordpress.org/trunk@44253


git-svn-id: http://core.svn.wordpress.org/trunk@44083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:28:57 +00:00
Sergey Biryukov 07ce537eb8 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.
Built from https://develop.svn.wordpress.org/trunk@44252


git-svn-id: http://core.svn.wordpress.org/trunk@44082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:28:06 +00:00
Sergey Biryukov dbc692fb84 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.
Built from https://develop.svn.wordpress.org/trunk@44251


git-svn-id: http://core.svn.wordpress.org/trunk@44081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:27:12 +00:00
Sergey Biryukov 940a4be804 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.
Built from https://develop.svn.wordpress.org/trunk@44250


git-svn-id: http://core.svn.wordpress.org/trunk@44080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:26:22 +00:00
Sergey Biryukov 909cddb3b8 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.
Built from https://develop.svn.wordpress.org/trunk@44249


git-svn-id: http://core.svn.wordpress.org/trunk@44079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:25:31 +00:00
Sergey Biryukov e8cbdf9405 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.
Built from https://develop.svn.wordpress.org/trunk@44247


git-svn-id: http://core.svn.wordpress.org/trunk@44077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:23:55 +00:00
Sergey Biryukov 8f1ed83852 Build Tools: Revert unrelated changes to `Gruntfile.js` added in [44245].
See #45156.
Built from https://develop.svn.wordpress.org/trunk@44246


git-svn-id: http://core.svn.wordpress.org/trunk@44076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:23:04 +00:00
Sergey Biryukov c6d8f995cd Build Tools: Add non-minified `@wordpress` scripts to the build output.
Props atimmer.
Merges [43886] to trunk.
See #45156.
Built from https://develop.svn.wordpress.org/trunk@44245


git-svn-id: http://core.svn.wordpress.org/trunk@44075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:22:13 +00:00
Sergey Biryukov 6ef54307b1 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.
Built from https://develop.svn.wordpress.org/trunk@44244


git-svn-id: http://core.svn.wordpress.org/trunk@44074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:21:21 +00:00
Sergey Biryukov 223eb21b47 PHPCS: Fix errors introduced in [44241].
See #45283.
Built from https://develop.svn.wordpress.org/trunk@44243


git-svn-id: http://core.svn.wordpress.org/trunk@44073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:20:29 +00:00
Sergey Biryukov 659ca2bd1e Tests: Fix tests broken in PHP 5.x after [43879].
Props pento.
Merges [43883] to trunk.
See #45290.
Built from https://develop.svn.wordpress.org/trunk@44242


git-svn-id: http://core.svn.wordpress.org/trunk@44072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:19:38 +00:00
Sergey Biryukov 7f8d6eccd0 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.
Built from https://develop.svn.wordpress.org/trunk@44241


git-svn-id: http://core.svn.wordpress.org/trunk@44071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:18:47 +00:00
Sergey Biryukov eccc31aadf 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.
Built from https://develop.svn.wordpress.org/trunk@44240


git-svn-id: http://core.svn.wordpress.org/trunk@44070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:17:56 +00:00
Sergey Biryukov 9e54ec265c 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.
Built from https://develop.svn.wordpress.org/trunk@44239


git-svn-id: http://core.svn.wordpress.org/trunk@44069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:17:04 +00:00
Sergey Biryukov 030b1ba144 PHPCS: Fix errors introduced in [44236].
See #45221.
Built from https://develop.svn.wordpress.org/trunk@44238


git-svn-id: http://core.svn.wordpress.org/trunk@44068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:16:12 +00:00
Sergey Biryukov 86bff28a19 Script Loader: Ensure default packages are registered when loaded via load-scripts.php.
Props CantoThemes, ocean90.
Merges [43877] to trunk.
Fixes #45271.
Built from https://develop.svn.wordpress.org/trunk@44237


git-svn-id: http://core.svn.wordpress.org/trunk@44067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:15:20 +00:00
Sergey Biryukov c72f02aa49 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.
Built from https://develop.svn.wordpress.org/trunk@44236


git-svn-id: http://core.svn.wordpress.org/trunk@44066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:14:31 +00:00
Jeremy Felt 9988653fdf Tests: Replace uses of `$this->server` with `rest_get_server()`.
In [42724], `$this->server` was replaced with `rest_get_server()` for better memory recycling.

[43862], from the 5.0 branch, was merged into trunk in [44225] and used the now unavailable `$this->server`.

This updates the new tests from the 5.0 branch to use the expected `rest_get_server()`.

See #45269, #41641.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:12:54 +00:00
Jeremy Felt 677a497ee2 Build Tools: Update `grunt-sass` to v3 and add `node-sass` v4.
This fixes an error in the PHP 5.2 and 5.3 Travis builds after [44219].

Props netweb.
See #45241.
Fixes #45664.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:12:03 +00:00
desrosj fcaad833b7 Tests: Update a test that relied on the Hello Dolly plugin version.
[43900] changed the plugin version, causing a unit test failure.

Merges [43902] to trunk.

See #45345.
Built from https://develop.svn.wordpress.org/trunk@44230


git-svn-id: http://core.svn.wordpress.org/trunk@44060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:09:37 +00:00
desrosj 147ce45d29 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.
Built from https://develop.svn.wordpress.org/trunk@44229


git-svn-id: http://core.svn.wordpress.org/trunk@44059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:08:46 +00:00
desrosj be0b403077 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.
Built from https://develop.svn.wordpress.org/trunk@44228


git-svn-id: http://core.svn.wordpress.org/trunk@44058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:07:55 +00:00
desrosj f4fa2c362e 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.
Built from https://develop.svn.wordpress.org/trunk@44227


git-svn-id: http://core.svn.wordpress.org/trunk@44057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:07:04 +00:00
Jeremy Felt 7509965a56 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:06:12 +00:00
Jeremy Felt 58fdce722c 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:05:20 +00:00
Jeremy Felt 7ffb7340f5 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:04:29 +00:00