To improve the performance of `wp_upload_dir()` the result of `wp_mkdir_p()` was stored in a persistent cache, introduced in [36565]. But this becomes an issue when WordPress is scaled horizontally. You may end up caching a value for a server where the directory doesn't exist which will prevent further uploads on other servers because of the persistent cache.
The fix is to use a non-persistent cache.
Merge of [37285] to the 4.5 branch.
Props azaozz, ocean90.
See #34359.
Fixes#36621.
Built from https://develop.svn.wordpress.org/branches/4.5@37286
git-svn-id: http://core.svn.wordpress.org/branches/4.5@37252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[37028] missed some logic to capture the base emoji skin tone, to compare to the modified emoji skin tone. This caused all browsers to report that they supported skin tone modifiers, regardless of whether they actually did.
Merge of [37256] to the 4.5 branch.
Fixes#36604.
Built from https://develop.svn.wordpress.org/branches/4.5@37257
git-svn-id: http://core.svn.wordpress.org/branches/4.5@37223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adding the `singular` class per default to the list of body classes is breaking the layout of Twenty Eleven and other themes. Twenty Eleven adds the `singular` class only to single pages if the page doesn't use specific page templates.
Merge of [37249] to the 4.5 branch.
Props flixos90, swissspidy.
Fixes#36510.
Built from https://develop.svn.wordpress.org/branches/4.5@37250
git-svn-id: http://core.svn.wordpress.org/branches/4.5@37216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improper checking for 'Imagick::ALPHACHANNEL_UNDEFINED' and
'Imagick::ALPHACHANNEL_OPAQUE' caused fatal errors for some users
with Imagick when compiled against ImageMagick < 6.4.6, when these
constants were introduced. Fixes these compatibility checks.
Merge of [37192] to the 4.5 branch.
Props gblsm.
Fixes#36501.
Built from https://develop.svn.wordpress.org/branches/4.5@37245
git-svn-id: http://core.svn.wordpress.org/branches/4.5@37211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This disables the concatenation of remaining enqueued scripts once `wp_add_inline_script()` is invoked, which allows us to reliably print these scripts and their before/after inline scripts in the desired order.
Props gitlost, azaozz, swisspidy, ocean90.
Fixes#36392.
Built from https://develop.svn.wordpress.org/trunk@37171
git-svn-id: http://core.svn.wordpress.org/trunk@37138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Theme support for `customize-selective-refresh-widgets` can be added _after_ the logic for registering the settings for incoming widgets that have been changed. This is due to themes adding the theme support in `after_setup_theme` which is also the action where `WP_Customize_Widgets::register_settings()` is called. If these both happen at priority 10, which one is called first depends on which one was added first. The other issue is that at the time that `WP_Customize_Widgets::register_settings()` is called at `after_setup_theme`, it is called before `widgets_init` and thus no widgets are yet registered. This means that any settings registered at this point will always have a `refresh` transport even if the theme supports `customize-selective-refresh-widgets`, since the `WP_Widget` instance is not visible yet to see if it supports selective refresh.
The fix: Defer `WP_Customize_Widgets::register_settings()` from `after_setup_theme` to `widgets_init` at priority 95 when the widget objects have all been registered. Also, ensure that the preview filter for `sidebars_widgets` is added before the sidebars are iterated for adding the controls.
Props westonruter.
Fixes#36389.
Built from https://develop.svn.wordpress.org/trunk@37166
git-svn-id: http://core.svn.wordpress.org/trunk@37133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Percent signs are reserved characters in URIs. As such, it was impossible for
plugins to route requests to trashed posts, as happens in bbPress. The new
`__trashed` suffix should be sufficiently unique.
Also adds a test that demonstrates that the `__trashed` suffix can be
appended to slugs that contain the suffix somewhere other than the end of
the string.
Props netweb, ericlewis.
Fixes#11863.
Built from https://develop.svn.wordpress.org/trunk@37165
git-svn-id: http://core.svn.wordpress.org/trunk@37132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
You know what's wrong with the Moderate Comment Screen? It doesn't win anymore. Well, I'm going make the Moderate Comment screen win. It's going to win by showing the urls that are linked to from every anchor. It's going to win by having those urls be a lighter shade of gray than the surrounding text. Spammy links aren't going to be able to hide in commas. Spammy links aren't going to win. The Moderate Comment Screen is going to win and we are going to make the Moderate Comment Screen Great Again.
Fixes#36380
Props rachelbaker, mikeschroder, adamsilverstein, boonebgorges, melchoyce, ocean90, jorbin, pento
Built from https://develop.svn.wordpress.org/trunk@37161
git-svn-id: http://core.svn.wordpress.org/trunk@37127 1a063a9b-81f0-0310-95a4-ce76da25c4cd